RTEMS 4.11Annotated Report
Tue Sep 20 07:45:16 2011
0200ae24 <IMFS_Set_handlers>:
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200ae24: c2 02 00 00 ld [ %o0 ], %g1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200ae28: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
switch( node->type ) {
200ae2c: c2 00 60 4c ld [ %g1 + 0x4c ], %g1
200ae30: 80 a0 60 07 cmp %g1, 7
200ae34: 18 80 00 0a bgu 200ae5c <IMFS_Set_handlers+0x38> <== NEVER TAKEN
200ae38: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
200ae3c: 83 28 60 02 sll %g1, 2, %g1
200ae40: 07 00 80 2b sethi %hi(0x200ac00), %g3
200ae44: 86 10 e1 a8 or %g3, 0x1a8, %g3 ! 200ada8 <IMFS_create_root_node+0x40>
200ae48: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
200ae4c: 81 c0 40 00 jmp %g1
200ae50: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200ae54: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200ae58: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200ae5c: 81 c3 e0 08 retl
200ae60: 90 10 20 00 clr %o0
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200ae64: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200ae68: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200ae6c: 81 c3 e0 08 retl
200ae70: 90 10 20 00 clr %o0
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200ae74: 03 00 80 6f sethi %hi(0x201bc00), %g1
200ae78: 82 10 60 84 or %g1, 0x84, %g1 ! 201bc84 <IMFS_link_handlers>
200ae7c: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200ae80: 81 c3 e0 08 retl
200ae84: 90 10 20 00 clr %o0
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200ae88: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200ae8c: c2 22 20 08 st %g1, [ %o0 + 8 ]
break;
}
return 0;
}
200ae90: 81 c3 e0 08 retl
200ae94: 90 10 20 00 clr %o0
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200ae98: 03 00 80 6f sethi %hi(0x201bc00), %g1
200ae9c: 82 10 60 14 or %g1, 0x14, %g1 ! 201bc14 <IMFS_device_handlers>
200aea0: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200aea4: 81 c3 e0 08 retl
200aea8: 90 10 20 00 clr %o0
0200ac34 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
200ac34: 9d e3 bf a0 save %sp, -96, %sp
200ac38: 82 10 00 18 mov %i0, %g1
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
200ac3c: 80 a0 60 00 cmp %g1, 0
200ac40: 02 80 00 2b be 200acec <IMFS_create_node+0xb8> <== NEVER TAKEN
200ac44: b0 10 20 00 clr %i0
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
200ac48: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
200ac4c: e0 00 40 00 ld [ %g1 ], %l0
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
200ac50: 80 a6 60 07 cmp %i1, 7
200ac54: 02 80 00 28 be 200acf4 <IMFS_create_node+0xc0>
200ac58: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
200ac5c: 03 00 80 73 sethi %hi(0x201cc00), %g1
200ac60: c2 00 63 9c ld [ %g1 + 0x39c ], %g1 ! 201cf9c <rtems_current_user_env>
200ac64: 90 10 00 19 mov %i1, %o0
200ac68: d4 00 60 2c ld [ %g1 + 0x2c ], %o2
200ac6c: 92 10 00 1a mov %i2, %o1
200ac70: 7f ff ff d6 call 200abc8 <IMFS_allocate_node>
200ac74: 94 2e c0 0a andn %i3, %o2, %o2
if ( !node )
200ac78: b0 92 20 00 orcc %o0, 0, %i0
200ac7c: 02 80 00 1c be 200acec <IMFS_create_node+0xb8>
200ac80: 80 a6 60 01 cmp %i1, 1
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
200ac84: 02 80 00 24 be 200ad14 <IMFS_create_node+0xe0>
200ac88: 80 a6 60 03 cmp %i1, 3
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
200ac8c: 02 80 00 0e be 200acc4 <IMFS_create_node+0x90>
200ac90: 80 a6 60 04 cmp %i1, 4
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
200ac94: 02 80 00 0c be 200acc4 <IMFS_create_node+0x90>
200ac98: 80 a6 60 02 cmp %i1, 2
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
200ac9c: 02 80 00 28 be 200ad3c <IMFS_create_node+0x108>
200aca0: 80 a6 60 06 cmp %i1, 6
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
200aca4: 02 80 00 22 be 200ad2c <IMFS_create_node+0xf8>
200aca8: 80 a6 60 05 cmp %i1, 5
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
200acac: 02 80 00 29 be 200ad50 <IMFS_create_node+0x11c>
200acb0: 80 a6 60 07 cmp %i1, 7
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
200acb4: 22 80 00 06 be,a 200accc <IMFS_create_node+0x98> <== ALWAYS TAKEN
200acb8: c0 26 20 50 clr [ %i0 + 0x50 ]
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
200acbc: 10 80 00 05 b 200acd0 <IMFS_create_node+0x9c> <== NOT EXECUTED
200acc0: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
200acc4: c2 07 00 00 ld [ %i4 ], %g1
200acc8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
200accc: c2 07 60 04 ld [ %i5 + 4 ], %g1
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
200acd0: e0 26 20 08 st %l0, [ %i0 + 8 ]
node->st_ino = ++fs_info->ino_count;
200acd4: 82 00 60 01 inc %g1
200acd8: c2 27 60 04 st %g1, [ %i5 + 4 ]
200acdc: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
200ace0: 90 04 20 50 add %l0, 0x50, %o0
200ace4: 7f ff f1 ca call 200740c <_Chain_Append>
200ace8: 92 10 00 18 mov %i0, %o1
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
200acec: 81 c7 e0 08 ret
200acf0: 81 e8 00 00 restore
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
200acf4: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
200acf8: 03 00 80 6e sethi %hi(0x201b800), %g1
200acfc: 82 10 63 8c or %g1, 0x38c, %g1 ! 201bb8c <rtems_filesystem_handlers_default>
200ad00: 80 a0 80 01 cmp %g2, %g1
200ad04: 12 bf ff d7 bne 200ac60 <IMFS_create_node+0x2c>
200ad08: 03 00 80 73 sethi %hi(0x201cc00), %g1
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
200ad0c: 81 c7 e0 08 ret
200ad10: 81 e8 00 00 restore
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 );
200ad14: 82 06 20 50 add %i0, 0x50, %g1
200ad18: 84 06 20 54 add %i0, 0x54, %g2
head->next = tail;
head->previous = NULL;
200ad1c: c0 26 20 54 clr [ %i0 + 0x54 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ad20: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
head->previous = NULL;
tail->previous = head;
200ad24: 10 bf ff ea b 200accc <IMFS_create_node+0x98>
200ad28: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
200ad2c: c0 26 20 50 clr [ %i0 + 0x50 ]
200ad30: c0 26 20 54 clr [ %i0 + 0x54 ]
node->info.linearfile.direct = 0;
200ad34: 10 bf ff e6 b 200accc <IMFS_create_node+0x98>
200ad38: c0 26 20 58 clr [ %i0 + 0x58 ]
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
200ad3c: c4 07 00 00 ld [ %i4 ], %g2
node->info.device.minor = info->device.minor;
200ad40: c2 07 20 04 ld [ %i4 + 4 ], %g1
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
200ad44: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
node->info.device.minor = info->device.minor;
200ad48: 10 bf ff e1 b 200accc <IMFS_create_node+0x98>
200ad4c: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
200ad50: c0 26 20 50 clr [ %i0 + 0x50 ]
200ad54: c0 26 20 54 clr [ %i0 + 0x54 ]
node->info.file.indirect = 0;
200ad58: c0 26 20 58 clr [ %i0 + 0x58 ]
node->info.file.doubly_indirect = 0;
200ad5c: c0 26 20 5c clr [ %i0 + 0x5c ]
node->info.file.triply_indirect = 0;
200ad60: 10 bf ff db b 200accc <IMFS_create_node+0x98>
200ad64: c0 26 20 60 clr [ %i0 + 0x60 ]
02005160 <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
2005160: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2005164: fa 06 20 50 ld [ %i0 + 0x50 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2005168: b8 06 20 54 add %i0, 0x54, %i4
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
200516c: 80 a7 40 1c cmp %i5, %i4
2005170: 02 80 00 1e be 20051e8 <IMFS_dump_directory+0x88>
2005174: 31 00 80 8b sethi %hi(0x2022c00), %i0
2005178: 21 00 80 93 sethi %hi(0x2024c00), %l0
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
200517c: b0 16 21 68 or %i0, 0x168, %i0
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2005180: a2 06 60 01 add %i1, 1, %l1
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
2005184: 80 a6 60 00 cmp %i1, 0
2005188: 06 80 00 0e bl 20051c0 <IMFS_dump_directory+0x60> <== NEVER TAKEN
200518c: 01 00 00 00 nop
2005190: b6 10 20 00 clr %i3 ! 0 <PROM_START>
2005194: b4 14 20 e0 or %l0, 0xe0, %i2
fprintf(stdout, "...." );
2005198: c2 06 80 00 ld [ %i2 ], %g1
200519c: 90 10 00 18 mov %i0, %o0
20051a0: d6 00 60 08 ld [ %g1 + 8 ], %o3
20051a4: 92 10 20 01 mov 1, %o1
20051a8: 40 00 40 31 call 201526c <fwrite>
20051ac: 94 10 20 04 mov 4, %o2
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
20051b0: b6 06 e0 01 inc %i3
20051b4: 80 a6 40 1b cmp %i1, %i3
20051b8: 36 bf ff f9 bge,a 200519c <IMFS_dump_directory+0x3c>
20051bc: c2 06 80 00 ld [ %i2 ], %g1
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
20051c0: 7f ff ff a2 call 2005048 <IMFS_print_jnode>
20051c4: 90 10 00 1d mov %i5, %o0
if ( the_jnode->type == IMFS_DIRECTORY )
20051c8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
20051cc: 80 a0 60 01 cmp %g1, 1
20051d0: 22 80 00 08 be,a 20051f0 <IMFS_dump_directory+0x90>
20051d4: 90 10 00 1d mov %i5, %o0
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20051d8: fa 07 40 00 ld [ %i5 ], %i5
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20051dc: 80 a7 40 1c cmp %i5, %i4
20051e0: 12 bf ff ea bne 2005188 <IMFS_dump_directory+0x28>
20051e4: 80 a6 60 00 cmp %i1, 0
20051e8: 81 c7 e0 08 ret
20051ec: 81 e8 00 00 restore
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
20051f0: 7f ff ff dc call 2005160 <IMFS_dump_directory>
20051f4: 92 10 00 11 mov %l1, %o1
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20051f8: 10 bf ff f9 b 20051dc <IMFS_dump_directory+0x7c>
20051fc: fa 07 40 00 ld [ %i5 ], %i5
0200afac <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200afac: 9d e3 bf 70 save %sp, -144, %sp
int i = 0;
200afb0: c0 27 bf f8 clr [ %fp + -8 ]
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200afb4: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
200afb8: 92 10 00 19 mov %i1, %o1
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
200afbc: 80 8e bf f8 btst -8, %i2
200afc0: 12 80 00 c1 bne 200b2c4 <IMFS_eval_path+0x318> <== NEVER TAKEN
200afc4: ba 10 00 18 mov %i0, %i5
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200afc8: f8 06 c0 00 ld [ %i3 ], %i4
200afcc: 90 10 20 00 clr %o0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200afd0: 21 00 80 73 sethi %hi(0x201cc00), %l0
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
200afd4: 90 07 40 08 add %i5, %o0, %o0
200afd8: 94 07 bf d0 add %fp, -48, %o2
200afdc: 40 00 02 93 call 200ba28 <IMFS_get_token>
200afe0: 96 07 bf fc add %fp, -4, %o3
pathnamelen -= len;
200afe4: c2 07 bf fc ld [ %fp + -4 ], %g1
200afe8: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
i += len;
200afec: c4 07 bf f8 ld [ %fp + -8 ], %g2
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
200aff0: b2 10 00 08 mov %o0, %i1
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
200aff4: d0 06 c0 00 ld [ %i3 ], %o0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
200aff8: 92 22 40 01 sub %o1, %g1, %o1
i += len;
200affc: 82 00 80 01 add %g2, %g1, %g1
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
200b000: d2 27 a0 48 st %o1, [ %fp + 0x48 ]
i += len;
if ( !pathloc->node_access )
200b004: 80 a2 20 00 cmp %o0, 0
200b008: 02 80 00 99 be 200b26c <IMFS_eval_path+0x2c0> <== NEVER TAKEN
200b00c: c2 27 bf f8 st %g1, [ %fp + -8 ]
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
200b010: 80 a6 60 00 cmp %i1, 0
200b014: 32 80 00 15 bne,a 200b068 <IMFS_eval_path+0xbc>
200b018: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
* new fs root node and let let the mounted filesystem set the handlers.
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
200b01c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200b020: 80 a0 60 01 cmp %g1, 1
200b024: 22 80 00 98 be,a 200b284 <IMFS_eval_path+0x2d8>
200b028: c6 02 20 5c ld [ %o0 + 0x5c ], %g3
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
200b02c: 7f ff ff 7e call 200ae24 <IMFS_Set_handlers>
200b030: 90 10 00 1b mov %i3, %o0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
200b034: 92 10 00 1a mov %i2, %o1
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
200b038: b0 10 00 08 mov %o0, %i0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
200b03c: 7f ff ff 9c call 200aeac <IMFS_evaluate_permission>
200b040: 90 10 00 1b mov %i3, %o0
200b044: 80 a2 20 00 cmp %o0, 0
200b048: 12 80 00 c6 bne 200b360 <IMFS_eval_path+0x3b4>
200b04c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
200b050: 40 00 12 9f call 200facc <__errno>
200b054: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200b058: 82 10 20 0d mov 0xd, %g1
200b05c: c2 22 00 00 st %g1, [ %o0 ]
return result;
}
200b060: 81 c7 e0 08 ret
200b064: 81 e8 00 00 restore
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
200b068: 80 a0 60 01 cmp %g1, 1
200b06c: 22 80 00 53 be,a 200b1b8 <IMFS_eval_path+0x20c>
200b070: 90 10 00 1b mov %i3, %o0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200b074: 80 a6 60 03 cmp %i1, 3
200b078: 02 80 00 0b be 200b0a4 <IMFS_eval_path+0xf8>
200b07c: 80 a6 60 04 cmp %i1, 4
200b080: 02 80 00 30 be 200b140 <IMFS_eval_path+0x194>
200b084: 80 a6 60 02 cmp %i1, 2
200b088: 02 80 00 1c be 200b0f8 <IMFS_eval_path+0x14c>
200b08c: 80 a6 60 04 cmp %i1, 4
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
200b090: 02 bf ff e3 be 200b01c <IMFS_eval_path+0x70> <== NEVER TAKEN
200b094: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
200b098: b8 10 00 08 mov %o0, %i4
200b09c: 10 bf ff ce b 200afd4 <IMFS_eval_path+0x28>
200b0a0: d0 07 bf f8 ld [ %fp + -8 ], %o0
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
200b0a4: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200b0a8: 80 a0 60 03 cmp %g1, 3
200b0ac: 02 80 00 4d be 200b1e0 <IMFS_eval_path+0x234>
200b0b0: 80 a0 60 04 cmp %g1, 4
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
200b0b4: 22 80 00 66 be,a 200b24c <IMFS_eval_path+0x2a0>
200b0b8: 90 10 00 1b mov %i3, %o0
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200b0bc: 80 a0 60 01 cmp %g1, 1
200b0c0: 12 80 00 87 bne 200b2dc <IMFS_eval_path+0x330>
200b0c4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
200b0c8: 40 00 02 35 call 200b99c <IMFS_find_match_in_dir>
200b0cc: 92 07 bf d0 add %fp, -48, %o1
if ( !node )
200b0d0: b8 92 20 00 orcc %o0, 0, %i4
200b0d4: 02 80 00 66 be 200b26c <IMFS_eval_path+0x2c0>
200b0d8: 01 00 00 00 nop
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200b0dc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200b0e0: 80 a0 60 01 cmp %g1, 1
200b0e4: 02 80 00 1d be 200b158 <IMFS_eval_path+0x1ac>
200b0e8: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
}
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
200b0ec: f8 26 c0 00 st %i4, [ %i3 ]
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
200b0f0: 10 bf ff b9 b 200afd4 <IMFS_eval_path+0x28>
200b0f4: d0 07 bf f8 ld [ %fp + -8 ], %o0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200b0f8: c2 04 23 9c ld [ %l0 + 0x39c ], %g1
200b0fc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
200b100: 80 a0 40 08 cmp %g1, %o0
200b104: 02 80 00 34 be 200b1d4 <IMFS_eval_path+0x228>
200b108: b8 10 00 08 mov %o0, %i4
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200b10c: c6 06 e0 10 ld [ %i3 + 0x10 ], %g3
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
200b110: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
200b114: 80 a2 00 01 cmp %o0, %g1
200b118: 22 80 00 38 be,a 200b1f8 <IMFS_eval_path+0x24c>
200b11c: c2 00 e0 08 ld [ %g3 + 8 ], %g1
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
200b120: f8 02 20 08 ld [ %o0 + 8 ], %i4
200b124: 80 a7 20 00 cmp %i4, 0
200b128: 02 80 00 73 be 200b2f4 <IMFS_eval_path+0x348>
200b12c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
pathloc->node_access = node;
200b130: f8 26 c0 00 st %i4, [ %i3 ]
200b134: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
200b138: 10 bf ff a7 b 200afd4 <IMFS_eval_path+0x28>
200b13c: d0 07 bf f8 ld [ %fp + -8 ], %o0
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200b140: 40 00 12 63 call 200facc <__errno>
200b144: b0 10 3f ff mov -1, %i0
200b148: 82 10 20 5b mov 0x5b, %g1
200b14c: c2 22 00 00 st %g1, [ %o0 ]
200b150: 81 c7 e0 08 ret
200b154: 81 e8 00 00 restore
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200b158: c2 07 20 5c ld [ %i4 + 0x5c ], %g1
200b15c: 80 a0 60 00 cmp %g1, 0
200b160: 22 bf ff e4 be,a 200b0f0 <IMFS_eval_path+0x144>
200b164: f8 26 c0 00 st %i4, [ %i3 ]
IMFS_skip_separator( pathname, &pathnamelen, &i);
200b168: 90 10 00 1d mov %i5, %o0
200b16c: 92 07 a0 48 add %fp, 0x48, %o1
200b170: 7f ff ff 16 call 200adc8 <IMFS_skip_separator>
200b174: 94 07 bf f8 add %fp, -8, %o2
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
200b178: c2 07 bf f8 ld [ %fp + -8 ], %g1
200b17c: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2
200b180: 80 a0 a0 2e cmp %g2, 0x2e
200b184: 12 80 00 61 bne 200b308 <IMFS_eval_path+0x35c>
200b188: 90 07 40 01 add %i5, %g1, %o0
200b18c: c4 4a 20 01 ldsb [ %o0 + 1 ], %g2
200b190: 80 a0 a0 2e cmp %g2, 0x2e
200b194: 12 80 00 5d bne 200b308 <IMFS_eval_path+0x35c>
200b198: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
pathnamelen,
flags, pathloc );
}
i += 2;
pathnamelen -= 2;
node = node->Parent;
200b19c: f8 07 20 08 ld [ %i4 + 8 ], %i4
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
200b1a0: 82 00 60 02 add %g1, 2, %g1
pathnamelen -= 2;
200b1a4: 92 02 7f fe add %o1, -2, %o1
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
200b1a8: c2 27 bf f8 st %g1, [ %fp + -8 ]
pathnamelen -= 2;
200b1ac: d2 27 a0 48 st %o1, [ %fp + 0x48 ]
}
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
200b1b0: 10 bf ff d0 b 200b0f0 <IMFS_eval_path+0x144>
200b1b4: f8 26 c0 00 st %i4, [ %i3 ]
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
200b1b8: 7f ff ff 3d call 200aeac <IMFS_evaluate_permission>
200b1bc: 92 10 20 01 mov 1, %o1
200b1c0: 80 a2 20 00 cmp %o0, 0
200b1c4: 02 80 00 63 be 200b350 <IMFS_eval_path+0x3a4>
200b1c8: 01 00 00 00 nop
200b1cc: 10 bf ff aa b 200b074 <IMFS_eval_path+0xc8>
200b1d0: d0 06 c0 00 ld [ %i3 ], %o0
200b1d4: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
200b1d8: 10 bf ff 7f b 200afd4 <IMFS_eval_path+0x28>
200b1dc: d0 07 bf f8 ld [ %fp + -8 ], %o0
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
200b1e0: 90 10 00 1b mov %i3, %o0
200b1e4: 7f ff ff 5d call 200af58 <IMFS_evaluate_hard_link>
200b1e8: 92 10 20 00 clr %o1
node = pathloc->node_access;
200b1ec: d0 06 c0 00 ld [ %i3 ], %o0
200b1f0: 10 bf ff b3 b 200b0bc <IMFS_eval_path+0x110>
200b1f4: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200b1f8: c4 07 bf fc ld [ %fp + -4 ], %g2
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b1fc: c2 26 c0 00 st %g1, [ %i3 ]
200b200: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200b204: d0 07 bf f8 ld [ %fp + -8 ], %o0
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b208: c2 26 e0 04 st %g1, [ %i3 + 4 ]
200b20c: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200b210: 90 22 00 02 sub %o0, %g2, %o0
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b214: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200b218: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
200b21c: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200b220: c2 00 40 00 ld [ %g1 ], %g1
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b224: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200b228: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
200b22c: 90 07 40 08 add %i5, %o0, %o0
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b230: c6 26 e0 10 st %g3, [ %i3 + 0x10 ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200b234: 92 00 80 09 add %g2, %o1, %o1
200b238: 94 10 00 1a mov %i2, %o2
200b23c: 9f c0 40 00 call %g1
200b240: 96 10 00 1b mov %i3, %o3
200b244: 81 c7 e0 08 ret
200b248: 91 e8 00 08 restore %g0, %o0, %o0
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
200b24c: 40 00 00 47 call 200b368 <IMFS_evaluate_sym_link>
200b250: 92 10 20 00 clr %o1
200b254: b0 10 00 08 mov %o0, %i0
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
200b258: 80 a6 3f ff cmp %i0, -1
200b25c: 02 bf ff 81 be 200b060 <IMFS_eval_path+0xb4> <== NEVER TAKEN
200b260: d0 06 c0 00 ld [ %i3 ], %o0
200b264: 10 bf ff 96 b 200b0bc <IMFS_eval_path+0x110>
200b268: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
200b26c: 40 00 12 18 call 200facc <__errno>
200b270: b0 10 3f ff mov -1, %i0
200b274: 82 10 20 02 mov 2, %g1
200b278: c2 22 00 00 st %g1, [ %o0 ]
200b27c: 81 c7 e0 08 ret
200b280: 81 e8 00 00 restore
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
200b284: 80 a0 e0 00 cmp %g3, 0
200b288: 02 bf ff 69 be 200b02c <IMFS_eval_path+0x80> <== ALWAYS TAKEN
200b28c: c4 07 bf fc ld [ %fp + -4 ], %g2
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b290: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED
200b294: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
200b298: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200b29c: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b2a0: c2 26 e0 04 st %g1, [ %i3 + 4 ] <== NOT EXECUTED
200b2a4: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200b2a8: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b2ac: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
200b2b0: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 <== NOT EXECUTED
200b2b4: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200b2b8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b2bc: 10 bf ff db b 200b228 <IMFS_eval_path+0x27c> <== NOT EXECUTED
200b2c0: c6 00 e0 2c ld [ %g3 + 0x2c ], %g3 <== NOT EXECUTED
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
200b2c4: 40 00 12 02 call 200facc <__errno> <== NOT EXECUTED
200b2c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b2cc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
200b2d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b2d4: 81 c7 e0 08 ret <== NOT EXECUTED
200b2d8: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200b2dc: 40 00 11 fc call 200facc <__errno>
200b2e0: b0 10 3f ff mov -1, %i0
200b2e4: 82 10 20 14 mov 0x14, %g1
200b2e8: c2 22 00 00 st %g1, [ %o0 ]
200b2ec: 81 c7 e0 08 ret
200b2f0: 81 e8 00 00 restore
flags,pathloc);
}
} else {
if ( !node->Parent )
rtems_set_errno_and_return_minus_one( ENOENT );
200b2f4: 40 00 11 f6 call 200facc <__errno>
200b2f8: b0 10 3f ff mov -1, %i0
200b2fc: f2 22 00 00 st %i1, [ %o0 ]
200b300: 81 c7 e0 08 ret
200b304: 81 e8 00 00 restore
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b308: c4 07 20 5c ld [ %i4 + 0x5c ], %g2
return (*pathloc->ops->evalpath_h)( &pathname[i],
200b30c: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b310: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
return (*pathloc->ops->evalpath_h)( &pathname[i],
200b314: 94 10 00 1a mov %i2, %o2
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b318: c2 26 c0 00 st %g1, [ %i3 ]
200b31c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
return (*pathloc->ops->evalpath_h)( &pathname[i],
200b320: 96 10 00 1b mov %i3, %o3
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b324: c2 26 e0 04 st %g1, [ %i3 + 4 ]
200b328: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
200b32c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200b330: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1
200b334: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)( &pathname[i],
200b338: c2 00 40 00 ld [ %g1 ], %g1
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b33c: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2
return (*pathloc->ops->evalpath_h)( &pathname[i],
200b340: 9f c0 40 00 call %g1
200b344: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
200b348: 81 c7 e0 08 ret
200b34c: 91 e8 00 08 restore %g0, %o0, %o0
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
200b350: 40 00 11 df call 200facc <__errno>
200b354: b0 10 3f ff mov -1, %i0
200b358: 82 10 20 0d mov 0xd, %g1
200b35c: c2 22 00 00 st %g1, [ %o0 ]
200b360: 81 c7 e0 08 ret
200b364: 81 e8 00 00 restore
0200b4d4 <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
200b4d4: 9d e3 bf 70 save %sp, -144, %sp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200b4d8: fa 06 40 00 ld [ %i1 ], %i5
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
200b4dc: c0 27 bf f4 clr [ %fp + -12 ]
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
200b4e0: 40 00 17 13 call 201112c <strlen>
200b4e4: 90 10 00 18 mov %i0, %o0
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
200b4e8: b8 10 00 18 mov %i0, %i4
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
200b4ec: 92 10 00 08 mov %o0, %o1
200b4f0: 82 10 20 00 clr %g1
200b4f4: d0 27 bf fc st %o0, [ %fp + -4 ]
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200b4f8: 37 00 80 73 sethi %hi(0x201cc00), %i3
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
200b4fc: 90 07 00 01 add %i4, %g1, %o0
200b500: 94 07 bf d0 add %fp, -48, %o2
200b504: 40 00 01 49 call 200ba28 <IMFS_get_token>
200b508: 96 07 bf f8 add %fp, -8, %o3
pathlen -= len;
200b50c: c2 07 bf f8 ld [ %fp + -8 ], %g1
200b510: c4 07 bf fc ld [ %fp + -4 ], %g2
i += len;
200b514: c6 07 bf f4 ld [ %fp + -12 ], %g3
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
200b518: a0 10 00 08 mov %o0, %l0
pathlen -= len;
i += len;
if ( !pathloc->node_access )
200b51c: d0 06 40 00 ld [ %i1 ], %o0
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
200b520: 84 20 80 01 sub %g2, %g1, %g2
i += len;
200b524: 82 00 c0 01 add %g3, %g1, %g1
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
200b528: c4 27 bf fc st %g2, [ %fp + -4 ]
i += len;
if ( !pathloc->node_access )
200b52c: 80 a2 20 00 cmp %o0, 0
200b530: 02 80 00 a1 be 200b7b4 <IMFS_evaluate_for_make+0x2e0> <== NEVER TAKEN
200b534: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
200b538: 80 a4 20 00 cmp %l0, 0
200b53c: 32 80 00 08 bne,a 200b55c <IMFS_evaluate_for_make+0x88>
200b540: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200b544: 40 00 11 62 call 200facc <__errno>
200b548: b0 10 3f ff mov -1, %i0
200b54c: 82 10 20 11 mov 0x11, %g1
200b550: c2 22 00 00 st %g1, [ %o0 ]
200b554: 81 c7 e0 08 ret
200b558: 81 e8 00 00 restore
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
200b55c: 80 a0 60 01 cmp %g1, 1
200b560: 22 80 00 5e be,a 200b6d8 <IMFS_evaluate_for_make+0x204>
200b564: 90 10 00 19 mov %i1, %o0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200b568: 80 a4 20 02 cmp %l0, 2
200b56c: 02 80 00 1a be 200b5d4 <IMFS_evaluate_for_make+0x100>
200b570: c2 06 e3 9c ld [ %i3 + 0x39c ], %g1
200b574: 08 80 00 0a bleu 200b59c <IMFS_evaluate_for_make+0xc8>
200b578: 80 a4 20 00 cmp %l0, 0
200b57c: 80 a4 20 03 cmp %l0, 3
200b580: 02 80 00 26 be 200b618 <IMFS_evaluate_for_make+0x144>
200b584: 80 a4 20 04 cmp %l0, 4
200b588: 02 80 00 0d be 200b5bc <IMFS_evaluate_for_make+0xe8> <== ALWAYS TAKEN
200b58c: c2 07 bf f4 ld [ %fp + -12 ], %g1
200b590: d2 07 bf fc ld [ %fp + -4 ], %o1
200b594: 10 bf ff da b 200b4fc <IMFS_evaluate_for_make+0x28>
200b598: ba 10 00 08 mov %o0, %i5
200b59c: 12 bf ff fd bne 200b590 <IMFS_evaluate_for_make+0xbc> <== ALWAYS TAKEN
200b5a0: c2 07 bf f4 ld [ %fp + -12 ], %g1
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200b5a4: 40 00 11 4a call 200facc <__errno> <== NOT EXECUTED
200b5a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b5ac: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED
200b5b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b5b4: 81 c7 e0 08 ret <== NOT EXECUTED
200b5b8: 81 e8 00 00 restore <== NOT EXECUTED
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200b5bc: 40 00 11 44 call 200facc <__errno>
200b5c0: b0 10 3f ff mov -1, %i0
200b5c4: 82 10 20 5b mov 0x5b, %g1
200b5c8: c2 22 00 00 st %g1, [ %o0 ]
200b5cc: 81 c7 e0 08 ret
200b5d0: 81 e8 00 00 restore
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200b5d4: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
200b5d8: 80 a7 40 08 cmp %i5, %o0
200b5dc: 02 80 00 7c be 200b7cc <IMFS_evaluate_for_make+0x2f8>
200b5e0: c2 07 bf f4 ld [ %fp + -12 ], %g1
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200b5e4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
200b5e8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
200b5ec: 80 a2 00 01 cmp %o0, %g1
200b5f0: 22 80 00 79 be,a 200b7d4 <IMFS_evaluate_for_make+0x300>
200b5f4: c2 00 a0 08 ld [ %g2 + 8 ], %g1
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
200b5f8: fa 02 20 08 ld [ %o0 + 8 ], %i5
200b5fc: 80 a7 60 00 cmp %i5, 0
200b600: 02 80 00 8e be 200b838 <IMFS_evaluate_for_make+0x364>
200b604: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
200b608: fa 26 40 00 st %i5, [ %i1 ]
200b60c: c2 07 bf f4 ld [ %fp + -12 ], %g1
break;
200b610: 10 bf ff bb b 200b4fc <IMFS_evaluate_for_make+0x28>
200b614: d2 07 bf fc ld [ %fp + -4 ], %o1
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
200b618: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200b61c: 80 a0 60 03 cmp %g1, 3
200b620: 02 80 00 35 be 200b6f4 <IMFS_evaluate_for_make+0x220>
200b624: 80 a0 60 04 cmp %g1, 4
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
200b628: 22 80 00 34 be,a 200b6f8 <IMFS_evaluate_for_make+0x224>
200b62c: 90 10 00 19 mov %i1, %o0
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
200b630: 80 a2 20 00 cmp %o0, 0
200b634: 02 80 00 7b be 200b820 <IMFS_evaluate_for_make+0x34c> <== NEVER TAKEN
200b638: 01 00 00 00 nop
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200b63c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200b640: 80 a0 60 01 cmp %g1, 1
200b644: 12 80 00 77 bne 200b820 <IMFS_evaluate_for_make+0x34c>
200b648: 01 00 00 00 nop
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
200b64c: 40 00 00 d4 call 200b99c <IMFS_find_match_in_dir>
200b650: 92 07 bf d0 add %fp, -48, %o1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
200b654: ba 92 20 00 orcc %o0, 0, %i5
200b658: 02 80 00 42 be 200b760 <IMFS_evaluate_for_make+0x28c>
200b65c: c2 07 bf f4 ld [ %fp + -12 ], %g1
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200b660: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200b664: 80 a0 60 01 cmp %g1, 1
200b668: 22 80 00 06 be,a 200b680 <IMFS_evaluate_for_make+0x1ac>
200b66c: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
200b670: c2 07 bf f4 ld [ %fp + -12 ], %g1
200b674: d2 07 bf fc ld [ %fp + -4 ], %o1
}
i += 2;
pathlen -= 2;
node = node->Parent;
}
pathloc->node_access = node;
200b678: 10 bf ff a1 b 200b4fc <IMFS_evaluate_for_make+0x28>
200b67c: fa 26 40 00 st %i5, [ %i1 ]
*/
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200b680: 80 a0 60 00 cmp %g1, 0
200b684: 02 bf ff fb be 200b670 <IMFS_evaluate_for_make+0x19c>
200b688: 90 10 00 1c mov %i4, %o0
IMFS_skip_separator( path, &pathlen, &i);
200b68c: 92 07 bf fc add %fp, -4, %o1
200b690: 7f ff fd ce call 200adc8 <IMFS_skip_separator>
200b694: 94 07 bf f4 add %fp, -12, %o2
if ((path[i] != '.') || (path[i + 1] != '.')) {
200b698: c2 07 bf f4 ld [ %fp + -12 ], %g1
200b69c: c4 4f 00 01 ldsb [ %i4 + %g1 ], %g2
200b6a0: 80 a0 a0 2e cmp %g2, 0x2e
200b6a4: 12 80 00 70 bne 200b864 <IMFS_evaluate_for_make+0x390>
200b6a8: 90 07 00 01 add %i4, %g1, %o0
200b6ac: c4 4a 20 01 ldsb [ %o0 + 1 ], %g2
200b6b0: 80 a0 a0 2e cmp %g2, 0x2e
200b6b4: 12 80 00 6c bne 200b864 <IMFS_evaluate_for_make+0x390> <== NEVER TAKEN
200b6b8: d2 07 bf fc ld [ %fp + -4 ], %o1
pathloc,
name );
}
i += 2;
pathlen -= 2;
node = node->Parent;
200b6bc: fa 07 60 08 ld [ %i5 + 8 ], %i5
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
200b6c0: 82 00 60 02 add %g1, 2, %g1
pathlen -= 2;
200b6c4: 92 02 7f fe add %o1, -2, %o1
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
200b6c8: c2 27 bf f4 st %g1, [ %fp + -12 ]
pathlen -= 2;
200b6cc: d2 27 bf fc st %o1, [ %fp + -4 ]
node = node->Parent;
}
pathloc->node_access = node;
200b6d0: 10 bf ff 8b b 200b4fc <IMFS_evaluate_for_make+0x28>
200b6d4: fa 26 40 00 st %i5, [ %i1 ]
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
200b6d8: 7f ff fd f5 call 200aeac <IMFS_evaluate_permission>
200b6dc: 92 10 20 01 mov 1, %o1
200b6e0: 80 a2 20 00 cmp %o0, 0
200b6e4: 02 80 00 5a be 200b84c <IMFS_evaluate_for_make+0x378>
200b6e8: 01 00 00 00 nop
200b6ec: 10 bf ff 9f b 200b568 <IMFS_evaluate_for_make+0x94>
200b6f0: d0 06 40 00 ld [ %i1 ], %o0
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
200b6f4: 90 10 00 19 mov %i1, %o0
200b6f8: 7f ff ff 40 call 200b3f8 <IMFS_evaluate_link>
200b6fc: 92 10 20 00 clr %o1
if ( result == -1 )
200b700: 80 a2 3f ff cmp %o0, -1
200b704: 02 bf ff 94 be 200b554 <IMFS_evaluate_for_make+0x80> <== NEVER TAKEN
200b708: b0 10 00 08 mov %o0, %i0
200b70c: 10 bf ff c9 b 200b630 <IMFS_evaluate_for_make+0x15c>
200b710: d0 06 40 00 ld [ %i1 ], %o0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
200b714: 7f ff fd c4 call 200ae24 <IMFS_Set_handlers>
200b718: 90 10 00 19 mov %i1, %o0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
200b71c: c2 06 40 00 ld [ %i1 ], %g1
200b720: c2 00 60 4c ld [ %g1 + 0x4c ], %g1
200b724: 80 a0 60 01 cmp %g1, 1
200b728: 12 80 00 3e bne 200b820 <IMFS_evaluate_for_make+0x34c> <== NEVER TAKEN
200b72c: b0 10 00 08 mov %o0, %i0
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
200b730: 90 10 00 19 mov %i1, %o0
200b734: 7f ff fd de call 200aeac <IMFS_evaluate_permission>
200b738: 92 10 20 03 mov 3, %o1
200b73c: 80 a2 20 00 cmp %o0, 0
200b740: 12 80 00 47 bne 200b85c <IMFS_evaluate_for_make+0x388>
200b744: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
200b748: 40 00 10 e1 call 200facc <__errno>
200b74c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200b750: 82 10 20 0d mov 0xd, %g1
200b754: c2 22 00 00 st %g1, [ %o0 ]
return result;
}
200b758: 81 c7 e0 08 ret
200b75c: 81 e8 00 00 restore
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
200b760: c4 07 bf f8 ld [ %fp + -8 ], %g2
200b764: 84 20 40 02 sub %g1, %g2, %g2
200b768: 84 07 00 02 add %i4, %g2, %g2
200b76c: c4 26 80 00 st %g2, [ %i2 ]
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
200b770: d0 0f 00 01 ldub [ %i4 + %g1 ], %o0
200b774: 91 2a 20 18 sll %o0, 0x18, %o0
200b778: 80 a2 20 00 cmp %o0, 0
200b77c: 12 80 00 09 bne 200b7a0 <IMFS_evaluate_for_make+0x2cc>
200b780: 01 00 00 00 nop
200b784: 30 bf ff e4 b,a 200b714 <IMFS_evaluate_for_make+0x240>
200b788: 82 00 60 01 inc %g1
200b78c: d0 0f 00 01 ldub [ %i4 + %g1 ], %o0
200b790: 91 2a 20 18 sll %o0, 0x18, %o0
200b794: 80 a2 20 00 cmp %o0, 0
200b798: 02 bf ff df be 200b714 <IMFS_evaluate_for_make+0x240>
200b79c: c2 27 bf f4 st %g1, [ %fp + -12 ]
if ( !IMFS_is_separator( path[ i ] ) )
200b7a0: 7f ff e1 dd call 2003f14 <rtems_filesystem_is_separator>
200b7a4: 91 3a 20 18 sra %o0, 0x18, %o0
200b7a8: 80 a2 20 00 cmp %o0, 0
200b7ac: 12 bf ff f7 bne 200b788 <IMFS_evaluate_for_make+0x2b4>
200b7b0: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_set_errno_and_return_minus_one( ENOENT );
200b7b4: 40 00 10 c6 call 200facc <__errno>
200b7b8: b0 10 3f ff mov -1, %i0
200b7bc: 82 10 20 02 mov 2, %g1
200b7c0: c2 22 00 00 st %g1, [ %o0 ]
200b7c4: 81 c7 e0 08 ret
200b7c8: 81 e8 00 00 restore
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
200b7cc: 10 bf ff 4c b 200b4fc <IMFS_evaluate_for_make+0x28>
200b7d0: d2 07 bf fc ld [ %fp + -4 ], %o1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b7d4: c6 07 bf f8 ld [ %fp + -8 ], %g3
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b7d8: c2 26 40 00 st %g1, [ %i1 ]
200b7dc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b7e0: d0 07 bf f4 ld [ %fp + -12 ], %o0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b7e4: c2 26 60 04 st %g1, [ %i1 + 4 ]
200b7e8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b7ec: 90 22 00 03 sub %o0, %g3, %o0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b7f0: c2 26 60 08 st %g1, [ %i1 + 8 ]
200b7f4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b7f8: 90 07 00 08 add %i4, %o0, %o0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b7fc: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b800: c2 00 60 04 ld [ %g1 + 4 ], %g1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b804: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b808: 92 10 00 19 mov %i1, %o1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200b80c: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200b810: 9f c0 40 00 call %g1
200b814: 94 10 00 1a mov %i2, %o2
200b818: 81 c7 e0 08 ret
200b81c: 91 e8 00 08 restore %g0, %o0, %o0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200b820: 40 00 10 ab call 200facc <__errno>
200b824: b0 10 3f ff mov -1, %i0
200b828: 82 10 20 14 mov 0x14, %g1
200b82c: c2 22 00 00 st %g1, [ %o0 ]
200b830: 81 c7 e0 08 ret
200b834: 81 e8 00 00 restore
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
rtems_set_errno_and_return_minus_one( ENOENT );
200b838: 40 00 10 a5 call 200facc <__errno>
200b83c: b0 10 3f ff mov -1, %i0
200b840: e0 22 00 00 st %l0, [ %o0 ]
200b844: 81 c7 e0 08 ret
200b848: 81 e8 00 00 restore
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
200b84c: 40 00 10 a0 call 200facc <__errno>
200b850: b0 10 3f ff mov -1, %i0
200b854: 82 10 20 0d mov 0xd, %g1
200b858: c2 22 00 00 st %g1, [ %o0 ]
200b85c: 81 c7 e0 08 ret
200b860: 81 e8 00 00 restore
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b864: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
return (*pathloc->ops->evalformake_h)( &path[i],
200b868: 92 10 00 19 mov %i1, %o1
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b86c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
return (*pathloc->ops->evalformake_h)( &path[i],
200b870: 94 10 00 1a mov %i2, %o2
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b874: c2 26 40 00 st %g1, [ %i1 ]
200b878: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
200b87c: c2 26 60 04 st %g1, [ %i1 + 4 ]
200b880: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
200b884: c2 26 60 08 st %g1, [ %i1 + 8 ]
200b888: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1
200b88c: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return (*pathloc->ops->evalformake_h)( &path[i],
200b890: c2 00 60 04 ld [ %g1 + 4 ], %g1
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200b894: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2
return (*pathloc->ops->evalformake_h)( &path[i],
200b898: 9f c0 40 00 call %g1
200b89c: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
200b8a0: 81 c7 e0 08 ret
200b8a4: 91 e8 00 08 restore %g0, %o0, %o0
0200b3f8 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200b3f8: 9d e3 bf a0 save %sp, -96, %sp
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200b3fc: 3b 00 80 73 sethi %hi(0x201cc00), %i5
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200b400: b8 10 00 18 mov %i0, %i4
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200b404: 10 80 00 07 b 200b420 <IMFS_evaluate_link+0x28>
200b408: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
200b40c: 02 80 00 21 be 200b490 <IMFS_evaluate_link+0x98>
200b410: 84 00 bf fd add %g2, -3, %g2
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
200b414: 80 a0 a0 01 cmp %g2, 1
200b418: 38 80 00 1c bgu,a 200b488 <IMFS_evaluate_link+0x90> <== ALWAYS TAKEN
200b41c: c0 30 60 30 clrh [ %g1 + 0x30 ]
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
200b420: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
200b424: f6 07 00 00 ld [ %i4 ], %i3
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
200b428: 84 00 a0 01 inc %g2
200b42c: c4 30 60 30 sth %g2, [ %g1 + 0x30 ]
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
200b430: 85 28 a0 10 sll %g2, 0x10, %g2
200b434: 85 30 a0 10 srl %g2, 0x10, %g2
200b438: 80 a0 a0 05 cmp %g2, 5
200b43c: 18 80 00 20 bgu 200b4bc <IMFS_evaluate_link+0xc4>
200b440: 01 00 00 00 nop
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
200b444: c4 06 e0 4c ld [ %i3 + 0x4c ], %g2
200b448: 80 a0 a0 03 cmp %g2, 3
200b44c: 12 bf ff f0 bne 200b40c <IMFS_evaluate_link+0x14>
200b450: 80 a0 a0 04 cmp %g2, 4
result = IMFS_evaluate_hard_link( node, flags );
200b454: 90 10 00 1c mov %i4, %o0
200b458: 7f ff fe c0 call 200af58 <IMFS_evaluate_hard_link>
200b45c: 92 10 00 19 mov %i1, %o1
200b460: b0 10 00 08 mov %o0, %i0
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
200b464: 80 a6 20 00 cmp %i0, 0
200b468: 12 80 00 12 bne 200b4b0 <IMFS_evaluate_link+0xb8>
200b46c: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
200b470: c4 06 e0 4c ld [ %i3 + 0x4c ], %g2
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
200b474: 84 00 bf fd add %g2, -3, %g2
200b478: 80 a0 a0 01 cmp %g2, 1
200b47c: 08 bf ff e9 bleu 200b420 <IMFS_evaluate_link+0x28> <== ALWAYS TAKEN
200b480: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
200b484: c0 30 60 30 clrh [ %g1 + 0x30 ] <== NOT EXECUTED
return result;
}
200b488: 81 c7 e0 08 ret
200b48c: 91 e8 20 00 restore %g0, 0, %o0
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
200b490: 90 10 00 1c mov %i4, %o0
200b494: 7f ff ff b5 call 200b368 <IMFS_evaluate_sym_link>
200b498: 92 10 00 19 mov %i1, %o1
200b49c: b0 10 00 08 mov %o0, %i0
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
200b4a0: 80 a6 20 00 cmp %i0, 0
200b4a4: 22 bf ff f4 be,a 200b474 <IMFS_evaluate_link+0x7c>
200b4a8: c4 06 e0 4c ld [ %i3 + 0x4c ], %g2
200b4ac: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
200b4b0: c0 30 60 30 clrh [ %g1 + 0x30 ]
return result;
}
200b4b4: 81 c7 e0 08 ret
200b4b8: 81 e8 00 00 restore
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200b4bc: 40 00 11 84 call 200facc <__errno>
200b4c0: c0 30 60 30 clrh [ %g1 + 0x30 ]
200b4c4: 82 10 20 5c mov 0x5c, %g1
200b4c8: c2 22 00 00 st %g1, [ %o0 ]
200b4cc: 81 c7 e0 08 ret
200b4d0: 91 e8 3f ff restore %g0, -1, %o0
0200aeac <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
200aeac: 9d e3 bf a0 save %sp, -96, %sp
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
200aeb0: 80 8e 7f f8 btst -8, %i1
200aeb4: 12 80 00 23 bne 200af40 <IMFS_evaluate_permission+0x94> <== NEVER TAKEN
200aeb8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200aebc: 40 00 04 21 call 200bf40 <geteuid>
200aec0: fa 06 00 00 ld [ %i0 ], %i5
st_gid = getegid();
200aec4: 40 00 04 1b call 200bf30 <getegid>
200aec8: b8 10 00 08 mov %o0, %i4
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200aecc: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1
200aed0: b9 2f 20 10 sll %i4, 0x10, %i4
200aed4: b9 37 20 10 srl %i4, 0x10, %i4
200aed8: 80 a0 40 1c cmp %g1, %i4
200aedc: 02 80 00 0c be 200af0c <IMFS_evaluate_permission+0x60>
200aee0: 91 2a 20 10 sll %o0, 0x10, %o0
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200aee4: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1
200aee8: 91 32 20 10 srl %o0, 0x10, %o0
200aeec: 80 a0 40 08 cmp %g1, %o0
200aef0: 02 80 00 0e be 200af28 <IMFS_evaluate_permission+0x7c>
200aef4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
200aef8: b2 2e 40 01 andn %i1, %g1, %i1
200aefc: 80 a0 00 19 cmp %g0, %i1
200af00: b0 60 3f ff subx %g0, -1, %i0
return 0;
}
200af04: 81 c7 e0 08 ret
200af08: 81 e8 00 00 restore
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200af0c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
200af10: b3 2e 60 06 sll %i1, 6, %i1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
200af14: b2 2e 40 01 andn %i1, %g1, %i1
200af18: 80 a0 00 19 cmp %g0, %i1
200af1c: b0 60 3f ff subx %g0, -1, %i0
return 0;
}
200af20: 81 c7 e0 08 ret
200af24: 81 e8 00 00 restore
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
200af28: b3 2e 60 03 sll %i1, 3, %i1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
200af2c: b2 2e 40 01 andn %i1, %g1, %i1
200af30: 80 a0 00 19 cmp %g0, %i1
200af34: b0 60 3f ff subx %g0, -1, %i0
return 0;
}
200af38: 81 c7 e0 08 ret
200af3c: 81 e8 00 00 restore
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200af40: 40 00 12 e3 call 200facc <__errno> <== NOT EXECUTED
200af44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200af48: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200af4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200af50: 81 c7 e0 08 ret <== NOT EXECUTED
200af54: 81 e8 00 00 restore <== NOT EXECUTED
02003874 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
2003874: 9d e3 bf a0 save %sp, -96, %sp
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
2003878: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200387c: 92 10 00 19 mov %i1, %o1
2003880: d0 00 60 50 ld [ %g1 + 0x50 ], %o0
2003884: 98 10 00 18 mov %i0, %o4
2003888: 94 10 00 1a mov %i2, %o2
200388c: 40 00 2a 9d call 200e300 <pipe_lseek>
2003890: 96 10 00 1b mov %i3, %o3
2003894: b1 3a 20 1f sra %o0, 0x1f, %i0
IMFS_FIFO_RETURN(err);
2003898: 80 a6 20 00 cmp %i0, 0
200389c: 06 80 00 04 bl 20038ac <IMFS_fifo_lseek+0x38> <== ALWAYS TAKEN
20038a0: b2 10 00 08 mov %o0, %i1
}
20038a4: 81 c7 e0 08 ret <== NOT EXECUTED
20038a8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
20038ac: 40 00 38 29 call 2011950 <__errno>
20038b0: 31 3f ff ff sethi %hi(0xfffffc00), %i0
20038b4: 82 20 00 19 neg %i1, %g1
20038b8: c2 22 00 00 st %g1, [ %o0 ]
20038bc: b0 16 23 ff or %i0, 0x3ff, %i0
}
20038c0: 81 c7 e0 08 ret
20038c4: 93 e8 00 18 restore %g0, %i0, %o1
020038c8 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20038c8: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
20038cc: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20038d0: 96 10 00 18 mov %i0, %o3
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
20038d4: d0 07 60 50 ld [ %i5 + 0x50 ], %o0
20038d8: 92 10 00 19 mov %i1, %o1
20038dc: 40 00 29 eb call 200e088 <pipe_write>
20038e0: 94 10 00 1a mov %i2, %o2
if (err > 0) {
20038e4: b0 92 20 00 orcc %o0, 0, %i0
20038e8: 04 80 00 09 ble 200390c <IMFS_fifo_write+0x44>
20038ec: 90 07 bf f8 add %fp, -8, %o0
IMFS_mtime_ctime_update(jnode);
20038f0: 40 00 04 77 call 2004acc <gettimeofday>
20038f4: 92 10 20 00 clr %o1
20038f8: c2 07 bf f8 ld [ %fp + -8 ], %g1
20038fc: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
2003900: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
2003904: 81 c7 e0 08 ret
2003908: 81 e8 00 00 restore
}
IMFS_FIFO_RETURN(err);
200390c: 80 a6 20 00 cmp %i0, 0
2003910: 12 80 00 04 bne 2003920 <IMFS_fifo_write+0x58> <== ALWAYS TAKEN
2003914: 01 00 00 00 nop
}
2003918: 81 c7 e0 08 ret <== NOT EXECUTED
200391c: 81 e8 00 00 restore <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
2003920: 40 00 38 0c call 2011950 <__errno>
2003924: 01 00 00 00 nop
2003928: 82 20 00 18 neg %i0, %g1
200392c: c2 22 00 00 st %g1, [ %o0 ]
}
2003930: 81 c7 e0 08 ret
2003934: 91 e8 3f ff restore %g0, -1, %o0
0200b99c <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
200b99c: 9d e3 bf a0 save %sp, -96, %sp
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
200b9a0: 13 00 80 6e sethi %hi(0x201b800), %o1
200b9a4: 90 10 00 19 mov %i1, %o0
200b9a8: 40 00 13 f0 call 2010968 <strcmp>
200b9ac: 92 12 63 f8 or %o1, 0x3f8, %o1
200b9b0: 80 a2 20 00 cmp %o0, 0
200b9b4: 02 80 00 19 be 200ba18 <IMFS_find_match_in_dir+0x7c> <== NEVER TAKEN
200b9b8: 90 10 00 19 mov %i1, %o0
return directory;
if ( !strcmp( name, dotdotname ) )
200b9bc: 13 00 80 6f sethi %hi(0x201bc00), %o1
200b9c0: 40 00 13 ea call 2010968 <strcmp>
200b9c4: 92 12 60 00 mov %o1, %o1 ! 201bc00 <dotdotname>
200b9c8: 80 a2 20 00 cmp %o0, 0
200b9cc: 02 80 00 12 be 200ba14 <IMFS_find_match_in_dir+0x78> <== NEVER TAKEN
200b9d0: b8 06 20 54 add %i0, 0x54, %i4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b9d4: fa 06 20 50 ld [ %i0 + 0x50 ], %i5
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
200b9d8: 80 a7 40 1c cmp %i5, %i4
200b9dc: 12 80 00 06 bne 200b9f4 <IMFS_find_match_in_dir+0x58>
200b9e0: b0 10 20 00 clr %i0
200b9e4: 30 80 00 0d b,a 200ba18 <IMFS_find_match_in_dir+0x7c>
200b9e8: 80 a7 40 1c cmp %i5, %i4
200b9ec: 02 80 00 0d be 200ba20 <IMFS_find_match_in_dir+0x84>
200b9f0: 01 00 00 00 nop
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
200b9f4: 92 07 60 0c add %i5, 0xc, %o1
200b9f8: 40 00 13 dc call 2010968 <strcmp>
200b9fc: 90 10 00 19 mov %i1, %o0
200ba00: 80 a2 20 00 cmp %o0, 0
200ba04: 32 bf ff f9 bne,a 200b9e8 <IMFS_find_match_in_dir+0x4c>
200ba08: fa 07 40 00 ld [ %i5 ], %i5
return the_jnode;
}
return 0;
}
200ba0c: 81 c7 e0 08 ret
200ba10: 91 e8 00 1d restore %g0, %i5, %o0
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
200ba14: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
200ba18: 81 c7 e0 08 ret
200ba1c: 81 e8 00 00 restore
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
200ba20: 81 c7 e0 08 ret
200ba24: 91 e8 20 00 restore %g0, 0, %o0
0200b8a8 <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
200b8a8: 9d e3 bf 88 save %sp, -120, %sp
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
200b8ac: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
loc = temp_mt_entry->mt_fs_root;
200b8b0: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
200b8b4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
200b8b8: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
200b8bc: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200b8c0: f8 27 bf ec st %i4, [ %fp + -20 ]
200b8c4: c8 27 bf f0 st %g4, [ %fp + -16 ]
200b8c8: c6 27 bf f4 st %g3, [ %fp + -12 ]
200b8cc: c4 27 bf f8 st %g2, [ %fp + -8 ]
200b8d0: c2 27 bf fc st %g1, [ %fp + -4 ]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
200b8d4: c0 26 20 1c clr [ %i0 + 0x1c ]
do {
next = jnode->Parent;
200b8d8: fa 07 20 08 ld [ %i4 + 8 ], %i5
loc.node_access = (void *)jnode;
200b8dc: f8 27 bf ec st %i4, [ %fp + -20 ]
IMFS_Set_handlers( &loc );
200b8e0: 7f ff fd 51 call 200ae24 <IMFS_Set_handlers>
200b8e4: 90 07 bf ec add %fp, -20, %o0
if ( jnode->type != IMFS_DIRECTORY ) {
200b8e8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200b8ec: 80 a0 60 01 cmp %g1, 1
200b8f0: 32 80 00 1d bne,a 200b964 <IMFS_fsunmount+0xbc> <== NEVER TAKEN
200b8f4: 90 10 20 00 clr %o0 <== NOT EXECUTED
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
200b8f8: c4 07 20 50 ld [ %i4 + 0x50 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200b8fc: 82 07 20 54 add %i4, 0x54, %g1
200b900: 80 a0 80 01 cmp %g2, %g1
200b904: 02 80 00 17 be 200b960 <IMFS_fsunmount+0xb8>
200b908: 80 a7 20 00 cmp %i4, 0
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
200b90c: 02 80 00 1e be 200b984 <IMFS_fsunmount+0xdc> <== NEVER TAKEN
200b910: 01 00 00 00 nop
if ( jnode->type == IMFS_DIRECTORY ) {
200b914: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200b918: 80 a0 60 01 cmp %g1, 1
200b91c: 32 bf ff f0 bne,a 200b8dc <IMFS_fsunmount+0x34> <== NEVER TAKEN
200b920: fa 07 20 08 ld [ %i4 + 8 ], %i5 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200b924: c2 07 20 50 ld [ %i4 + 0x50 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200b928: 84 07 20 54 add %i4, 0x54, %g2
if ( jnode_has_children( jnode ) )
200b92c: 80 a0 40 02 cmp %g1, %g2
200b930: 02 bf ff ea be 200b8d8 <IMFS_fsunmount+0x30>
200b934: 80 a0 60 00 cmp %g1, 0
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
200b938: 02 80 00 17 be 200b994 <IMFS_fsunmount+0xec> <== NEVER TAKEN
200b93c: b8 10 00 01 mov %g1, %i4
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200b940: 90 07 bf ec add %fp, -20, %o0
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
200b944: fa 07 20 08 ld [ %i4 + 8 ], %i5
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200b948: 7f ff fd 37 call 200ae24 <IMFS_Set_handlers>
200b94c: f8 27 bf ec st %i4, [ %fp + -20 ]
if ( jnode->type != IMFS_DIRECTORY ) {
200b950: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200b954: 80 a0 60 01 cmp %g1, 1
200b958: 22 bf ff e9 be,a 200b8fc <IMFS_fsunmount+0x54>
200b95c: c4 07 20 50 ld [ %i4 + 0x50 ], %g2
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
200b960: 90 10 20 00 clr %o0
200b964: 7f ff db 83 call 2002770 <IMFS_unlink>
200b968: 92 07 bf ec add %fp, -20, %o1
if (result != 0)
200b96c: 80 a2 20 00 cmp %o0, 0
200b970: 12 80 00 07 bne 200b98c <IMFS_fsunmount+0xe4> <== NEVER TAKEN
200b974: b8 10 00 1d mov %i5, %i4
return -1;
jnode = next;
}
if ( jnode != NULL ) {
200b978: 80 a7 20 00 cmp %i4, 0
200b97c: 32 bf ff e7 bne,a 200b918 <IMFS_fsunmount+0x70>
200b980: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
}
}
} while (jnode != NULL);
return 0;
}
200b984: 81 c7 e0 08 ret
200b988: 91 e8 20 00 restore %g0, 0, %o0
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
200b98c: 81 c7 e0 08 ret <== NOT EXECUTED
200b990: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
200b994: 81 c7 e0 08 ret <== NOT EXECUTED
200b998: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200ba28 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
200ba28: 9d e3 bf a0 save %sp, -96, %sp
register int i = 0;
200ba2c: ba 10 20 00 clr %i5
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
200ba30: 10 80 00 08 b 200ba50 <IMFS_get_token+0x28>
200ba34: f8 0e 00 00 ldub [ %i0 ], %i4
200ba38: 16 80 00 0c bge 200ba68 <IMFS_get_token+0x40> <== NEVER TAKEN
200ba3c: 80 a7 60 20 cmp %i5, 0x20
token[i] = c;
200ba40: f8 2e 80 1d stb %i4, [ %i2 + %i5 ]
if ( i == IMFS_NAME_MAX )
200ba44: 02 80 00 25 be 200bad8 <IMFS_get_token+0xb0>
200ba48: ba 07 60 01 inc %i5
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
200ba4c: f8 0e 00 1d ldub [ %i0 + %i5 ], %i4
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
200ba50: a1 2f 20 18 sll %i4, 0x18, %l0
200ba54: 7f ff e1 30 call 2003f14 <rtems_filesystem_is_separator>
200ba58: 91 3c 20 18 sra %l0, 0x18, %o0
200ba5c: 80 a2 20 00 cmp %o0, 0
200ba60: 02 bf ff f6 be 200ba38 <IMFS_get_token+0x10>
200ba64: 80 a7 40 19 cmp %i5, %i1
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
200ba68: 80 a7 60 00 cmp %i5, 0
200ba6c: 12 80 00 0c bne 200ba9c <IMFS_get_token+0x74>
200ba70: 82 06 80 1d add %i2, %i5, %g1
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
200ba74: 80 a4 20 00 cmp %l0, 0
200ba78: 02 80 00 1a be 200bae0 <IMFS_get_token+0xb8>
200ba7c: f8 2e 80 00 stb %i4, [ %i2 ]
200ba80: 80 a6 60 00 cmp %i1, 0
200ba84: 22 80 00 18 be,a 200bae4 <IMFS_get_token+0xbc>
200ba88: fa 26 c0 00 st %i5, [ %i3 ]
i++;
200ba8c: ba 10 20 01 mov 1, %i5
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200ba90: fa 26 c0 00 st %i5, [ %i3 ]
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
200ba94: 81 c7 e0 08 ret
200ba98: 91 e8 20 01 restore %g0, 1, %o0
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
200ba9c: c2 48 7f ff ldsb [ %g1 + -1 ], %g1
200baa0: 80 a0 60 00 cmp %g1, 0
200baa4: 32 80 00 02 bne,a 200baac <IMFS_get_token+0x84> <== ALWAYS TAKEN
200baa8: c0 2e 80 1d clrb [ %i2 + %i5 ]
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200baac: fa 26 c0 00 st %i5, [ %i3 ]
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
200bab0: 90 10 00 1a mov %i2, %o0
200bab4: 13 00 80 6f sethi %hi(0x201bc00), %o1
type = IMFS_UP_DIR;
200bab8: b0 10 20 02 mov 2, %i0
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
200babc: 40 00 13 ab call 2010968 <strcmp>
200bac0: 92 12 60 10 or %o1, 0x10, %o1
200bac4: 80 a2 20 00 cmp %o0, 0
200bac8: 12 80 00 09 bne 200baec <IMFS_get_token+0xc4>
200bacc: 90 10 00 1a mov %i2, %o0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
200bad0: 81 c7 e0 08 ret
200bad4: 81 e8 00 00 restore
200bad8: 81 c7 e0 08 ret
200badc: 91 e8 20 04 restore %g0, 4, %o0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200bae0: fa 26 c0 00 st %i5, [ %i3 ]
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
200bae4: 81 c7 e0 08 ret
200bae8: 91 e8 20 00 restore %g0, 0, %o0
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
200baec: 13 00 80 6f sethi %hi(0x201bc00), %o1
200baf0: 40 00 13 9e call 2010968 <strcmp>
200baf4: 92 12 60 08 or %o1, 8, %o1 ! 201bc08 <dotdotname+0x8>
200baf8: 80 a0 00 08 cmp %g0, %o0
200bafc: b0 40 3f ff addx %g0, -1, %i0
200bb00: b0 0e 3f fe and %i0, -2, %i0
200bb04: 81 c7 e0 08 ret
200bb08: 91 ee 20 03 restore %i0, 3, %o0
0200234c <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
200234c: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
2002350: 03 00 80 73 sethi %hi(0x201cc00), %g1
2002354: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 201ceb4 <imfs_rq_memfile_bytes_per_block>
/*
* 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) {
2002358: 80 a0 60 10 cmp %g1, 0x10
200235c: 02 80 00 0d be 2002390 <IMFS_initialize_support+0x44>
2002360: 86 10 20 05 mov 5, %g3
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
2002364: 80 a0 60 0f cmp %g1, 0xf
2002368: 04 80 00 09 ble 200238c <IMFS_initialize_support+0x40>
200236c: 84 10 20 20 mov 0x20, %g2
/*
* 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) {
2002370: 80 a0 40 02 cmp %g1, %g2
2002374: 22 80 00 08 be,a 2002394 <IMFS_initialize_support+0x48>
2002378: 05 00 80 75 sethi %hi(0x201d400), %g2
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
200237c: 06 80 00 04 bl 200238c <IMFS_initialize_support+0x40> <== NEVER TAKEN
2002380: 86 80 ff ff addcc %g3, -1, %g3
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
2002384: 12 bf ff fb bne 2002370 <IMFS_initialize_support+0x24> <== ALWAYS TAKEN
2002388: 85 28 a0 01 sll %g2, 1, %g2
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
200238c: 82 10 20 80 mov 0x80, %g1
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
2002390: 05 00 80 75 sethi %hi(0x201d400), %g2
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
2002394: 40 00 22 75 call 200ad68 <IMFS_create_root_node>
2002398: c2 20 a2 a8 st %g1, [ %g2 + 0x2a8 ] ! 201d6a8 <imfs_memfile_bytes_per_block>
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
200239c: 94 10 20 30 mov 0x30, %o2
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
20023a0: d0 26 20 1c st %o0, [ %i0 + 0x1c ]
20023a4: ba 10 00 08 mov %o0, %i5
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
20023a8: f6 26 20 24 st %i3, [ %i0 + 0x24 ]
temp_mt_entry->mt_fs_root.ops = op_table;
20023ac: f2 26 20 28 st %i1, [ %i0 + 0x28 ]
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
20023b0: 90 06 20 38 add %i0, 0x38, %o0
20023b4: 13 00 80 6e sethi %hi(0x201b800), %o1
20023b8: 40 00 38 21 call 201043c <memcpy>
20023bc: 92 12 63 c4 or %o1, 0x3c4, %o1 ! 201bbc4 <IMFS_LIMITS_AND_OPTIONS>
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
20023c0: 90 10 20 01 mov 1, %o0
20023c4: 40 00 01 ca call 2002aec <calloc>
20023c8: 92 10 20 14 mov 0x14, %o1
if ( !fs_info ) {
20023cc: 80 a2 20 00 cmp %o0, 0
20023d0: 02 80 00 0f be 200240c <IMFS_initialize_support+0xc0>
20023d4: 03 00 80 75 sethi %hi(0x201d400), %g1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
20023d8: c6 00 62 ac ld [ %g1 + 0x2ac ], %g3 ! 201d6ac <imfs_instance.6100>
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
20023dc: d0 26 20 34 st %o0, [ %i0 + 0x34 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
20023e0: 84 10 20 01 mov 1, %g2
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
20023e4: c6 22 00 00 st %g3, [ %o0 ]
fs_info->ino_count = 1;
20023e8: c4 22 20 04 st %g2, [ %o0 + 4 ]
fs_info->memfile_handlers = memfile_handlers;
20023ec: f4 22 20 08 st %i2, [ %o0 + 8 ]
fs_info->directory_handlers = directory_handlers;
20023f0: f6 22 20 0c st %i3, [ %o0 + 0xc ]
fs_info->fifo_handlers = fifo_handlers;
20023f4: f8 22 20 10 st %i4, [ %o0 + 0x10 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
20023f8: 86 00 e0 01 inc %g3
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
20023fc: c4 27 60 38 st %g2, [ %i5 + 0x38 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
2002400: c6 20 62 ac st %g3, [ %g1 + 0x2ac ]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
2002404: 81 c7 e0 08 ret
2002408: 91 e8 20 00 restore %g0, 0, %o0
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
200240c: 40 00 02 c5 call 2002f20 <free>
2002410: 90 10 00 1d mov %i5, %o0
rtems_set_errno_and_return_minus_one(ENOMEM);
2002414: 40 00 35 ae call 200facc <__errno>
2002418: b0 10 3f ff mov -1, %i0
200241c: 82 10 20 0c mov 0xc, %g1
2002420: c2 22 00 00 st %g1, [ %o0 ]
2002424: 81 c7 e0 08 ret
2002428: 81 e8 00 00 restore
0200e404 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
200e404: 9d e3 bf 98 save %sp, -104, %sp
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200e408: 03 00 80 75 sethi %hi(0x201d400), %g1
200e40c: fa 00 62 a8 ld [ %g1 + 0x2a8 ], %i5 ! 201d6a8 <imfs_memfile_bytes_per_block>
200e410: b9 37 60 02 srl %i5, 2, %i4
200e414: 92 10 00 1c mov %i4, %o1
200e418: 40 00 28 ed call 20187cc <.umul>
200e41c: 90 07 20 01 add %i4, 1, %o0
200e420: 92 10 00 1c mov %i4, %o1
200e424: 40 00 28 ea call 20187cc <.umul>
200e428: 90 02 20 01 inc %o0
200e42c: 92 10 00 1d mov %i5, %o1
200e430: 40 00 28 e7 call 20187cc <.umul>
200e434: 90 02 3f ff add %o0, -1, %o0
200e438: 82 10 20 00 clr %g1
200e43c: 80 a0 40 19 cmp %g1, %i1
200e440: 04 80 00 42 ble 200e548 <IMFS_memfile_extend+0x144>
200e444: b8 10 00 18 mov %i0, %i4
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200e448: f0 07 20 50 ld [ %i4 + 0x50 ], %i0
200e44c: 80 a6 40 18 cmp %i1, %i0
200e450: 04 80 00 2a ble 200e4f8 <IMFS_memfile_extend+0xf4> <== ALWAYS TAKEN
200e454: e0 07 20 54 ld [ %i4 + 0x54 ], %l0
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e458: a3 3f 60 1f sra %i5, 0x1f, %l1 <== NOT EXECUTED
200e45c: 96 10 00 1d mov %i5, %o3
200e460: 94 10 00 11 mov %l1, %o2
200e464: 90 10 00 19 mov %i1, %o0
200e468: 40 00 2a 6b call 2018e14 <__divdi3>
200e46c: 92 10 00 1a mov %i2, %o1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e470: 90 10 00 18 mov %i0, %o0
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e474: b6 10 00 09 mov %o1, %i3
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e478: 94 10 00 11 mov %l1, %o2
200e47c: 92 10 00 10 mov %l0, %o1
200e480: 40 00 2a 65 call 2018e14 <__divdi3>
200e484: 96 10 00 1d mov %i5, %o3
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200e488: 80 a6 c0 09 cmp %i3, %o1
200e48c: 0a 80 00 21 bcs 200e510 <IMFS_memfile_extend+0x10c> <== NEVER TAKEN
200e490: b0 10 00 09 mov %o1, %i0
200e494: 10 80 00 05 b 200e4a8 <IMFS_memfile_extend+0xa4>
200e498: ba 10 00 09 mov %o1, %i5
200e49c: 80 a6 c0 1d cmp %i3, %i5
200e4a0: 0a 80 00 1d bcs 200e514 <IMFS_memfile_extend+0x110>
200e4a4: 92 10 20 00 clr %o1
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
200e4a8: 92 10 00 1d mov %i5, %o1
200e4ac: 7f ff ff 39 call 200e190 <IMFS_memfile_addblock>
200e4b0: 90 10 00 1c mov %i4, %o0
200e4b4: 80 a2 20 00 cmp %o0, 0
200e4b8: 22 bf ff f9 be,a 200e49c <IMFS_memfile_extend+0x98>
200e4bc: ba 07 60 01 inc %i5
for ( ; block>=old_blocks ; block-- ) {
200e4c0: 10 80 00 06 b 200e4d8 <IMFS_memfile_extend+0xd4>
200e4c4: 80 a6 00 1d cmp %i0, %i5
IMFS_memfile_remove_block( the_jnode, block );
200e4c8: 90 10 00 1c mov %i4, %o0
200e4cc: 7f ff ff c2 call 200e3d4 <IMFS_memfile_remove_block>
200e4d0: ba 07 7f ff add %i5, -1, %i5
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
200e4d4: 80 a6 00 1d cmp %i0, %i5
200e4d8: 08 bf ff fc bleu 200e4c8 <IMFS_memfile_extend+0xc4>
200e4dc: 92 10 00 1d mov %i5, %o1
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
200e4e0: 40 00 05 7b call 200facc <__errno>
200e4e4: b0 10 3f ff mov -1, %i0
200e4e8: 82 10 20 1c mov 0x1c, %g1
200e4ec: c2 22 00 00 st %g1, [ %o0 ]
200e4f0: 81 c7 e0 08 ret
200e4f4: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200e4f8: 12 80 00 04 bne 200e508 <IMFS_memfile_extend+0x104>
200e4fc: 80 a6 80 10 cmp %i2, %l0
200e500: 18 bf ff d7 bgu 200e45c <IMFS_memfile_extend+0x58>
200e504: a3 3f 60 1f sra %i5, 0x1f, %l1
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
200e508: 81 c7 e0 08 ret
200e50c: 91 e8 20 00 restore %g0, 0, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
200e510: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
200e514: f2 27 20 50 st %i1, [ %i4 + 0x50 ]
200e518: f4 27 20 54 st %i2, [ %i4 + 0x54 ]
IMFS_update_ctime(the_jnode);
200e51c: 7f ff d2 ab call 2002fc8 <gettimeofday>
200e520: 90 07 bf f8 add %fp, -8, %o0
200e524: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_update_mtime(the_jnode);
200e528: 90 07 bf f8 add %fp, -8, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
200e52c: c2 27 20 48 st %g1, [ %i4 + 0x48 ]
IMFS_update_mtime(the_jnode);
200e530: 7f ff d2 a6 call 2002fc8 <gettimeofday>
200e534: 92 10 20 00 clr %o1
200e538: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e53c: c2 27 20 44 st %g1, [ %i4 + 0x44 ]
return 0;
200e540: 81 c7 e0 08 ret
200e544: 91 e8 20 00 restore %g0, 0, %o0
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200e548: 12 80 00 04 bne 200e558 <IMFS_memfile_extend+0x154> <== NEVER TAKEN
200e54c: 80 a2 00 1a cmp %o0, %i2
200e550: 38 bf ff bf bgu,a 200e44c <IMFS_memfile_extend+0x48>
200e554: f0 07 20 50 ld [ %i4 + 0x50 ], %i0
rtems_set_errno_and_return_minus_one( EINVAL );
200e558: 40 00 05 5d call 200facc <__errno>
200e55c: b0 10 3f ff mov -1, %i0
200e560: 82 10 20 16 mov 0x16, %g1
200e564: c2 22 00 00 st %g1, [ %o0 ]
200e568: 81 c7 e0 08 ret
200e56c: 81 e8 00 00 restore
0200dcb4 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
200dcb4: 9d e3 bf a0 save %sp, -96, %sp
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200dcb8: 03 00 80 75 sethi %hi(0x201d400), %g1
200dcbc: fa 00 62 a8 ld [ %g1 + 0x2a8 ], %i5 ! 201d6a8 <imfs_memfile_bytes_per_block>
200dcc0: bb 37 60 02 srl %i5, 2, %i5
200dcc4: 82 07 7f ff add %i5, -1, %g1
200dcc8: 80 a6 40 01 cmp %i1, %g1
200dccc: 18 80 00 0b bgu 200dcf8 <IMFS_memfile_get_block_pointer+0x44>
200dcd0: b8 10 00 18 mov %i0, %i4
p = info->indirect;
if ( malloc_it ) {
200dcd4: 80 a6 a0 00 cmp %i2, 0
200dcd8: 12 80 00 50 bne 200de18 <IMFS_memfile_get_block_pointer+0x164>
200dcdc: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200dce0: 80 a2 20 00 cmp %o0, 0
200dce4: 02 80 00 64 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200dce8: b0 10 20 00 clr %i0
return 0;
return &info->indirect[ my_block ];
200dcec: b3 2e 60 02 sll %i1, 2, %i1
200dcf0: 81 c7 e0 08 ret
200dcf4: 91 ea 00 19 restore %o0, %i1, %o0
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
200dcf8: 90 07 60 01 add %i5, 1, %o0
200dcfc: 40 00 2a b4 call 20187cc <.umul>
200dd00: 92 10 00 1d mov %i5, %o1
200dd04: 82 02 3f ff add %o0, -1, %g1
200dd08: 80 a6 40 01 cmp %i1, %g1
200dd0c: 08 80 00 2c bleu 200ddbc <IMFS_memfile_get_block_pointer+0x108>
200dd10: b6 10 00 08 mov %o0, %i3
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
200dd14: 90 02 20 01 inc %o0
200dd18: 40 00 2a ad call 20187cc <.umul>
200dd1c: 92 10 00 1d mov %i5, %o1
200dd20: 90 02 3f ff add %o0, -1, %o0
200dd24: 80 a6 40 08 cmp %i1, %o0
200dd28: 18 80 00 53 bgu 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200dd2c: b0 10 20 00 clr %i0
my_block -= FIRST_TRIPLY_INDIRECT;
200dd30: b2 26 40 1b sub %i1, %i3, %i1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200dd34: 92 10 00 1d mov %i5, %o1
200dd38: 40 00 2b 8b call 2018b64 <.urem>
200dd3c: 90 10 00 19 mov %i1, %o0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200dd40: 92 10 00 1d mov %i5, %o1
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200dd44: a0 10 00 08 mov %o0, %l0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200dd48: 40 00 2a db call 20188b4 <.udiv>
200dd4c: 90 10 00 19 mov %i1, %o0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200dd50: 92 10 00 1d mov %i5, %o1
200dd54: 40 00 2a d8 call 20188b4 <.udiv>
200dd58: b6 10 00 08 mov %o0, %i3
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200dd5c: 92 10 00 1d mov %i5, %o1
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200dd60: b2 10 00 08 mov %o0, %i1
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200dd64: 40 00 2b 80 call 2018b64 <.urem>
200dd68: 90 10 00 1b mov %i3, %o0
p = info->triply_indirect;
200dd6c: c2 07 20 60 ld [ %i4 + 0x60 ], %g1
if ( malloc_it ) {
200dd70: 80 a6 a0 00 cmp %i2, 0
200dd74: 02 80 00 33 be 200de40 <IMFS_memfile_get_block_pointer+0x18c>
200dd78: ba 10 00 08 mov %o0, %i5
if ( !p ) {
200dd7c: 80 a0 60 00 cmp %g1, 0
200dd80: 02 80 00 66 be 200df18 <IMFS_memfile_get_block_pointer+0x264>
200dd84: 01 00 00 00 nop
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
200dd88: b3 2e 60 02 sll %i1, 2, %i1
200dd8c: c4 00 40 19 ld [ %g1 + %i1 ], %g2
if ( !p1 ) {
200dd90: 80 a0 a0 00 cmp %g2, 0
200dd94: 02 80 00 5a be 200defc <IMFS_memfile_get_block_pointer+0x248>
200dd98: b2 00 40 19 add %g1, %i1, %i1
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
200dd9c: bb 2f 60 02 sll %i5, 2, %i5
200dda0: d0 00 80 1d ld [ %g2 + %i5 ], %o0
if ( !p2 ) {
200dda4: 80 a2 20 00 cmp %o0, 0
200dda8: 02 80 00 47 be 200dec4 <IMFS_memfile_get_block_pointer+0x210>
200ddac: ba 00 80 1d add %g2, %i5, %i5
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
200ddb0: b1 2c 20 02 sll %l0, 2, %i0
200ddb4: 81 c7 e0 08 ret
200ddb8: 91 ea 00 18 restore %o0, %i0, %o0
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
200ddbc: b2 26 40 1d sub %i1, %i5, %i1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200ddc0: 92 10 00 1d mov %i5, %o1
200ddc4: 40 00 2b 68 call 2018b64 <.urem>
200ddc8: 90 10 00 19 mov %i1, %o0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200ddcc: 92 10 00 1d mov %i5, %o1
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200ddd0: b6 10 00 08 mov %o0, %i3
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200ddd4: 40 00 2a b8 call 20188b4 <.udiv>
200ddd8: 90 10 00 19 mov %i1, %o0
p = info->doubly_indirect;
200dddc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
if ( malloc_it ) {
200dde0: 80 a6 a0 00 cmp %i2, 0
200dde4: 02 80 00 26 be 200de7c <IMFS_memfile_get_block_pointer+0x1c8>
200dde8: ba 10 00 08 mov %o0, %i5
if ( !p ) {
200ddec: 80 a0 60 00 cmp %g1, 0
200ddf0: 02 80 00 3c be 200dee0 <IMFS_memfile_get_block_pointer+0x22c>
200ddf4: 01 00 00 00 nop
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
200ddf8: bb 2f 60 02 sll %i5, 2, %i5
200ddfc: d0 00 40 1d ld [ %g1 + %i5 ], %o0
if ( !p1 ) {
200de00: 80 a2 20 00 cmp %o0, 0
200de04: 02 80 00 29 be 200dea8 <IMFS_memfile_get_block_pointer+0x1f4>
200de08: ba 00 40 1d add %g1, %i5, %i5
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
}
return (block_p *)&p1[ singly ];
200de0c: b1 2e e0 02 sll %i3, 2, %i0
200de10: 81 c7 e0 08 ret
200de14: 91 ea 00 18 restore %o0, %i0, %o0
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
200de18: 80 a2 20 00 cmp %o0, 0
200de1c: 32 bf ff b5 bne,a 200dcf0 <IMFS_memfile_get_block_pointer+0x3c>
200de20: b3 2e 60 02 sll %i1, 2, %i1
p = memfile_alloc_block();
200de24: 7f ff ff 97 call 200dc80 <memfile_alloc_block>
200de28: b0 10 20 00 clr %i0
if ( !p )
200de2c: 80 a2 20 00 cmp %o0, 0
200de30: 02 80 00 11 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200de34: 01 00 00 00 nop
return 0;
info->indirect = p;
200de38: 10 bf ff ad b 200dcec <IMFS_memfile_get_block_pointer+0x38>
200de3c: d0 27 20 58 st %o0, [ %i4 + 0x58 ]
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
200de40: 80 a0 60 00 cmp %g1, 0
200de44: 02 80 00 0c be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200de48: b3 2e 60 02 sll %i1, 2, %i1
return 0;
p1 = (block_p *) p[ triply ];
200de4c: c2 00 40 19 ld [ %g1 + %i1 ], %g1
if ( !p1 )
200de50: 80 a0 60 00 cmp %g1, 0
200de54: 02 80 00 08 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200de58: bb 2a 20 02 sll %o0, 2, %i5
return 0;
p2 = (block_p *)p1[ doubly ];
200de5c: c2 00 40 1d ld [ %g1 + %i5 ], %g1
if ( !p2 )
200de60: 80 a0 60 00 cmp %g1, 0
200de64: 02 80 00 04 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200de68: 01 00 00 00 nop
return 0;
return (block_p *)&p2[ singly ];
200de6c: b1 2c 20 02 sll %l0, 2, %i0
200de70: b0 00 40 18 add %g1, %i0, %i0
/*
* This means the requested block number is out of range.
*/
return 0;
}
200de74: 81 c7 e0 08 ret
200de78: 81 e8 00 00 restore
}
return (block_p *)&p1[ singly ];
}
if ( !p )
200de7c: 80 a0 60 00 cmp %g1, 0
200de80: 02 bf ff fd be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200de84: b0 10 20 00 clr %i0
return 0;
p = (block_p *)p[ doubly ];
200de88: bb 2a 20 02 sll %o0, 2, %i5
200de8c: c2 00 40 1d ld [ %g1 + %i5 ], %g1
if ( !p )
200de90: 80 a0 60 00 cmp %g1, 0
200de94: 02 bf ff f8 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200de98: 01 00 00 00 nop
return 0;
return (block_p *)&p[ singly ];
200de9c: b1 2e e0 02 sll %i3, 2, %i0
200dea0: 81 c7 e0 08 ret
200dea4: 91 e8 40 18 restore %g1, %i0, %o0
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
200dea8: 7f ff ff 76 call 200dc80 <memfile_alloc_block>
200deac: b0 10 20 00 clr %i0
if ( !p1 )
200deb0: 80 a2 20 00 cmp %o0, 0
200deb4: 02 bf ff f0 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200deb8: 01 00 00 00 nop
return 0;
p[ doubly ] = (block_p) p1;
200debc: 10 bf ff d4 b 200de0c <IMFS_memfile_get_block_pointer+0x158>
200dec0: d0 27 40 00 st %o0, [ %i5 ]
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
200dec4: 7f ff ff 6f call 200dc80 <memfile_alloc_block>
200dec8: b0 10 20 00 clr %i0
if ( !p2 )
200decc: 80 a2 20 00 cmp %o0, 0
200ded0: 02 bf ff e9 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200ded4: 01 00 00 00 nop
return 0;
p1[ doubly ] = (block_p) p2;
200ded8: 10 bf ff b6 b 200ddb0 <IMFS_memfile_get_block_pointer+0xfc>
200dedc: d0 27 40 00 st %o0, [ %i5 ]
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200dee0: 7f ff ff 68 call 200dc80 <memfile_alloc_block>
200dee4: b0 10 20 00 clr %i0
if ( !p )
200dee8: 80 a2 20 00 cmp %o0, 0
200deec: 02 bf ff e2 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200def0: 82 10 00 08 mov %o0, %g1
return 0;
info->doubly_indirect = p;
200def4: 10 bf ff c1 b 200ddf8 <IMFS_memfile_get_block_pointer+0x144>
200def8: d0 27 20 5c st %o0, [ %i4 + 0x5c ]
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
200defc: 7f ff ff 61 call 200dc80 <memfile_alloc_block>
200df00: b0 10 20 00 clr %i0
if ( !p1 )
200df04: 80 a2 20 00 cmp %o0, 0
200df08: 02 bf ff db be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200df0c: 84 10 00 08 mov %o0, %g2
return 0;
p[ triply ] = (block_p) p1;
200df10: 10 bf ff a3 b 200dd9c <IMFS_memfile_get_block_pointer+0xe8>
200df14: d0 26 40 00 st %o0, [ %i1 ]
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200df18: 7f ff ff 5a call 200dc80 <memfile_alloc_block>
200df1c: 01 00 00 00 nop
if ( !p )
200df20: 82 92 20 00 orcc %o0, 0, %g1
200df24: 02 bf ff d4 be 200de74 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200df28: 01 00 00 00 nop
return 0;
info->triply_indirect = p;
200df2c: 10 bf ff 97 b 200dd88 <IMFS_memfile_get_block_pointer+0xd4>
200df30: c2 27 20 60 st %g1, [ %i4 + 0x60 ]
0200df34 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200df34: 9d e3 bf 98 save %sp, -104, %sp
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
200df38: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200df3c: ba 10 00 18 mov %i0, %i5
200df40: a0 10 00 19 mov %i1, %l0
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
200df44: 80 a0 60 06 cmp %g1, 6
200df48: 02 80 00 64 be 200e0d8 <IMFS_memfile_read+0x1a4>
200df4c: a2 10 00 1a mov %i2, %l1
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
200df50: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
200df54: 82 10 00 1a mov %i2, %g1
if ( last_byte > the_jnode->info.file.size )
200df58: 86 10 20 00 clr %g3
200df5c: c8 06 20 54 ld [ %i0 + 0x54 ], %g4
200df60: 80 a0 c0 02 cmp %g3, %g2
200df64: 04 80 00 41 ble 200e068 <IMFS_memfile_read+0x134> <== ALWAYS TAKEN
200df68: b4 07 00 1a add %i4, %i2, %i2
my_length = the_jnode->info.file.size - start;
200df6c: b8 21 00 01 sub %g4, %g1, %i4 <== NOT EXECUTED
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200df70: 33 00 80 75 sethi %hi(0x201d400), %i1 <== NOT EXECUTED
200df74: f4 06 62 a8 ld [ %i1 + 0x2a8 ], %i2 ! 201d6a8 <imfs_memfile_bytes_per_block>
200df78: 90 10 00 10 mov %l0, %o0
200df7c: b1 3e a0 1f sra %i2, 0x1f, %i0
200df80: 92 10 00 11 mov %l1, %o1
200df84: 94 10 00 18 mov %i0, %o2
200df88: 40 00 2c 89 call 20191ac <__moddi3>
200df8c: 96 10 00 1a mov %i2, %o3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200df90: 90 10 00 10 mov %l0, %o0
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200df94: a4 10 00 09 mov %o1, %l2
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200df98: 94 10 00 18 mov %i0, %o2
200df9c: 92 10 00 11 mov %l1, %o1
200dfa0: 40 00 2b 9d call 2018e14 <__divdi3>
200dfa4: 96 10 00 1a mov %i2, %o3
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
200dfa8: a2 10 00 1b mov %i3, %l1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200dfac: a0 10 00 09 mov %o1, %l0
if ( start_offset ) {
200dfb0: 80 a4 a0 00 cmp %l2, 0
200dfb4: 02 80 00 14 be 200e004 <IMFS_memfile_read+0xd0>
200dfb8: b0 10 20 00 clr %i0
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200dfbc: 90 10 00 1d mov %i5, %o0
200dfc0: 7f ff ff 3d call 200dcb4 <IMFS_memfile_get_block_pointer>
200dfc4: 94 10 20 00 clr %o2
if ( !block_ptr )
200dfc8: 80 a2 20 00 cmp %o0, 0
200dfcc: 02 80 00 25 be 200e060 <IMFS_memfile_read+0x12c> <== NEVER TAKEN
200dfd0: b4 26 80 12 sub %i2, %l2, %i2
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200dfd4: 80 a7 00 1a cmp %i4, %i2
200dfd8: 18 80 00 53 bgu 200e124 <IMFS_memfile_read+0x1f0>
200dfdc: b0 10 00 1c mov %i4, %i0
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
200dfe0: d2 02 00 00 ld [ %o0 ], %o1
200dfe4: 94 10 00 18 mov %i0, %o2
200dfe8: 90 10 00 1b mov %i3, %o0
200dfec: 40 00 09 14 call 201043c <memcpy>
200dff0: 92 02 40 12 add %o1, %l2, %o1
dest += to_copy;
block++;
my_length -= to_copy;
200dff4: f4 06 62 a8 ld [ %i1 + 0x2a8 ], %i2
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
200dff8: a2 06 c0 18 add %i3, %i0, %l1
block++;
200dffc: a0 04 20 01 inc %l0
my_length -= to_copy;
200e000: b8 27 00 18 sub %i4, %i0, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e004: 80 a7 00 1a cmp %i4, %i2
200e008: 1a 80 00 0e bcc 200e040 <IMFS_memfile_read+0x10c>
200e00c: 94 10 20 00 clr %o2
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200e010: 10 80 00 1e b 200e088 <IMFS_memfile_read+0x154>
200e014: 80 a7 20 00 cmp %i4, 0
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200e018: d2 00 40 00 ld [ %g1 ], %o1
200e01c: 40 00 09 08 call 201043c <memcpy>
200e020: b8 27 00 1a sub %i4, %i2, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e024: c2 06 62 a8 ld [ %i1 + 0x2a8 ], %g1
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
200e028: a2 04 40 1a add %l1, %i2, %l1
block++;
200e02c: a0 04 20 01 inc %l0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e030: 80 a0 40 1c cmp %g1, %i4
200e034: 18 80 00 14 bgu 200e084 <IMFS_memfile_read+0x150>
200e038: b0 06 00 1a add %i0, %i2, %i0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e03c: 94 10 20 00 clr %o2
200e040: 92 10 00 10 mov %l0, %o1
200e044: 7f ff ff 1c call 200dcb4 <IMFS_memfile_get_block_pointer>
200e048: 90 10 00 1d mov %i5, %o0
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200e04c: 94 10 00 1a mov %i2, %o2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e050: 82 10 00 08 mov %o0, %g1
if ( !block_ptr )
200e054: 80 a0 60 00 cmp %g1, 0
200e058: 12 bf ff f0 bne 200e018 <IMFS_memfile_read+0xe4> <== ALWAYS TAKEN
200e05c: 90 10 00 11 mov %l1, %o0
}
IMFS_update_atime( the_jnode );
return copied;
}
200e060: 81 c7 e0 08 ret <== NOT EXECUTED
200e064: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
200e068: 12 bf ff c3 bne 200df74 <IMFS_memfile_read+0x40> <== NEVER TAKEN
200e06c: 33 00 80 75 sethi %hi(0x201d400), %i1
200e070: 80 a6 80 04 cmp %i2, %g4
200e074: 08 bf ff c1 bleu 200df78 <IMFS_memfile_read+0x44>
200e078: f4 06 62 a8 ld [ %i1 + 0x2a8 ], %i2
my_length = the_jnode->info.file.size - start;
200e07c: 10 bf ff be b 200df74 <IMFS_memfile_read+0x40>
200e080: b8 21 00 01 sub %g4, %g1, %i4
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200e084: 80 a7 20 00 cmp %i4, 0
200e088: 02 80 00 0e be 200e0c0 <IMFS_memfile_read+0x18c>
200e08c: 90 07 bf f8 add %fp, -8, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e090: 90 10 00 1d mov %i5, %o0
200e094: 92 10 00 10 mov %l0, %o1
200e098: 7f ff ff 07 call 200dcb4 <IMFS_memfile_get_block_pointer>
200e09c: 94 10 20 00 clr %o2
if ( !block_ptr )
200e0a0: 80 a2 20 00 cmp %o0, 0
200e0a4: 02 bf ff ef be 200e060 <IMFS_memfile_read+0x12c> <== NEVER TAKEN
200e0a8: 94 10 00 1c mov %i4, %o2
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
200e0ac: d2 02 00 00 ld [ %o0 ], %o1
200e0b0: 90 10 00 11 mov %l1, %o0
200e0b4: 40 00 08 e2 call 201043c <memcpy>
200e0b8: b0 06 00 1c add %i0, %i4, %i0
copied += my_length;
}
IMFS_update_atime( the_jnode );
200e0bc: 90 07 bf f8 add %fp, -8, %o0
200e0c0: 7f ff d3 c2 call 2002fc8 <gettimeofday>
200e0c4: 92 10 20 00 clr %o1
200e0c8: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e0cc: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return copied;
}
200e0d0: 81 c7 e0 08 ret
200e0d4: 81 e8 00 00 restore
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
200e0d8: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4
200e0dc: 82 10 20 00 clr %g1
200e0e0: 86 a3 40 1a subcc %o5, %i2, %g3
200e0e4: 84 63 00 19 subx %o4, %i1, %g2
200e0e8: 80 a0 40 02 cmp %g1, %g2
200e0ec: 04 80 00 10 ble 200e12c <IMFS_memfile_read+0x1f8> <== ALWAYS TAKEN
200e0f0: d2 06 20 58 ld [ %i0 + 0x58 ], %o1
my_length = the_jnode->info.linearfile.size - start;
200e0f4: b0 23 40 11 sub %o5, %l1, %i0 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
200e0f8: 92 02 40 11 add %o1, %l1, %o1
200e0fc: 94 10 00 18 mov %i0, %o2
200e100: 40 00 08 cf call 201043c <memcpy>
200e104: 90 10 00 1b mov %i3, %o0
IMFS_update_atime( the_jnode );
200e108: 90 07 bf f8 add %fp, -8, %o0
200e10c: 7f ff d3 af call 2002fc8 <gettimeofday>
200e110: 92 10 20 00 clr %o1
200e114: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e118: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return my_length;
200e11c: 81 c7 e0 08 ret
200e120: 81 e8 00 00 restore
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200e124: 10 bf ff af b 200dfe0 <IMFS_memfile_read+0xac>
200e128: b0 10 00 1a mov %i2, %i0
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
200e12c: 12 80 00 04 bne 200e13c <IMFS_memfile_read+0x208> <== NEVER TAKEN
200e130: 80 a7 00 03 cmp %i4, %g3
200e134: 38 bf ff f1 bgu,a 200e0f8 <IMFS_memfile_read+0x1c4> <== ALWAYS TAKEN
200e138: b0 23 40 11 sub %o5, %l1, %i0
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200e13c: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
200e140: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200e144: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200e148: 40 00 08 bd call 201043c <memcpy> <== NOT EXECUTED
200e14c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
IMFS_update_atime( the_jnode );
200e150: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
200e154: 7f ff d3 9d call 2002fc8 <gettimeofday> <== NOT EXECUTED
200e158: 92 10 20 00 clr %o1 <== NOT EXECUTED
200e15c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
200e160: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
return my_length;
200e164: 81 c7 e0 08 ret <== NOT EXECUTED
200e168: 81 e8 00 00 restore <== NOT EXECUTED
0200e25c <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
200e25c: 9d e3 bf a0 save %sp, -96, %sp
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
200e260: 39 00 80 75 sethi %hi(0x201d400), %i4
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e264: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
200e268: f4 07 22 a8 ld [ %i4 + 0x2a8 ], %i2
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e26c: 80 a0 60 00 cmp %g1, 0
200e270: 02 80 00 05 be 200e284 <IMFS_memfile_remove+0x28>
200e274: b5 36 a0 02 srl %i2, 2, %i2
memfile_free_blocks_in_table( &info->indirect, to_free );
200e278: 90 06 20 58 add %i0, 0x58, %o0
200e27c: 7f ff ff e2 call 200e204 <memfile_free_blocks_in_table>
200e280: 92 10 00 1a mov %i2, %o1
}
if ( info->doubly_indirect ) {
200e284: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
200e288: 80 a0 60 00 cmp %g1, 0
200e28c: 02 80 00 1b be 200e2f8 <IMFS_memfile_remove+0x9c>
200e290: c4 07 22 a8 ld [ %i4 + 0x2a8 ], %g2
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e294: 85 30 a0 02 srl %g2, 2, %g2
200e298: 80 a0 a0 00 cmp %g2, 0
200e29c: 02 80 00 14 be 200e2ec <IMFS_memfile_remove+0x90> <== NEVER TAKEN
200e2a0: 90 10 20 00 clr %o0
200e2a4: 37 00 80 75 sethi %hi(0x201d400), %i3
200e2a8: ba 10 20 00 clr %i5
200e2ac: 10 80 00 03 b 200e2b8 <IMFS_memfile_remove+0x5c>
200e2b0: b6 16 e2 a8 or %i3, 0x2a8, %i3
200e2b4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
if ( info->doubly_indirect[i] ) {
200e2b8: 91 2a 20 02 sll %o0, 2, %o0
200e2bc: c4 00 40 08 ld [ %g1 + %o0 ], %g2
200e2c0: 80 a0 a0 00 cmp %g2, 0
200e2c4: 02 80 00 04 be 200e2d4 <IMFS_memfile_remove+0x78> <== NEVER TAKEN
200e2c8: 90 00 40 08 add %g1, %o0, %o0
memfile_free_blocks_in_table(
200e2cc: 7f ff ff ce call 200e204 <memfile_free_blocks_in_table>
200e2d0: 92 10 00 1a mov %i2, %o1
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e2d4: c2 06 c0 00 ld [ %i3 ], %g1
200e2d8: ba 07 60 01 inc %i5
200e2dc: 83 30 60 02 srl %g1, 2, %g1
200e2e0: 80 a7 40 01 cmp %i5, %g1
200e2e4: 0a bf ff f4 bcs 200e2b4 <IMFS_memfile_remove+0x58>
200e2e8: 90 10 00 1d mov %i5, %o0
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
200e2ec: 90 06 20 5c add %i0, 0x5c, %o0
200e2f0: 7f ff ff c5 call 200e204 <memfile_free_blocks_in_table>
200e2f4: 92 10 00 1a mov %i2, %o1
}
if ( info->triply_indirect ) {
200e2f8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
200e2fc: 80 a2 20 00 cmp %o0, 0
200e300: 02 80 00 33 be 200e3cc <IMFS_memfile_remove+0x170>
200e304: c2 07 22 a8 ld [ %i4 + 0x2a8 ], %g1
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e308: 83 30 60 02 srl %g1, 2, %g1
200e30c: 80 a0 60 00 cmp %g1, 0
200e310: 22 80 00 2d be,a 200e3c4 <IMFS_memfile_remove+0x168> <== NEVER TAKEN
200e314: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
200e318: f8 02 00 00 ld [ %o0 ], %i4
if ( !p ) /* ensure we have a valid pointer */
200e31c: 80 a7 20 00 cmp %i4, 0
200e320: 22 80 00 29 be,a 200e3c4 <IMFS_memfile_remove+0x168> <== NEVER TAKEN
200e324: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
200e328: 37 00 80 75 sethi %hi(0x201d400), %i3
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200e32c: a0 10 20 00 clr %l0
if ( !p ) /* ensure we have a valid pointer */
200e330: b2 10 20 00 clr %i1
200e334: b6 16 e2 a8 or %i3, 0x2a8, %i3
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200e338: 80 a0 60 00 cmp %g1, 0
200e33c: 22 80 00 13 be,a 200e388 <IMFS_memfile_remove+0x12c> <== NEVER TAKEN
200e340: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED
200e344: 90 10 20 00 clr %o0
200e348: ba 10 20 00 clr %i5
if ( p[j] ) {
200e34c: 91 2a 20 02 sll %o0, 2, %o0
200e350: c2 07 00 08 ld [ %i4 + %o0 ], %g1
200e354: 80 a0 60 00 cmp %g1, 0
200e358: 02 80 00 04 be 200e368 <IMFS_memfile_remove+0x10c> <== NEVER TAKEN
200e35c: 90 07 00 08 add %i4, %o0, %o0
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
200e360: 7f ff ff a9 call 200e204 <memfile_free_blocks_in_table>
200e364: 92 10 00 1a mov %i2, %o1
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200e368: c2 06 c0 00 ld [ %i3 ], %g1
200e36c: ba 07 60 01 inc %i5
200e370: 83 30 60 02 srl %g1, 2, %g1
200e374: 80 a7 40 01 cmp %i5, %g1
200e378: 0a bf ff f5 bcs 200e34c <IMFS_memfile_remove+0xf0>
200e37c: 90 10 00 1d mov %i5, %o0
200e380: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
200e384: 90 02 00 10 add %o0, %l0, %o0
200e388: 7f ff ff 9f call 200e204 <memfile_free_blocks_in_table>
200e38c: 92 10 00 1a mov %i2, %o1
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e390: c2 06 c0 00 ld [ %i3 ], %g1
200e394: b2 06 60 01 inc %i1
200e398: 83 30 60 02 srl %g1, 2, %g1
200e39c: 80 a6 40 01 cmp %i1, %g1
200e3a0: 1a 80 00 09 bcc 200e3c4 <IMFS_memfile_remove+0x168>
200e3a4: 90 06 20 60 add %i0, 0x60, %o0
p = (block_p *) info->triply_indirect[i];
200e3a8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
200e3ac: a1 2e 60 02 sll %i1, 2, %l0
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200e3b0: f8 02 00 10 ld [ %o0 + %l0 ], %i4
if ( !p ) /* ensure we have a valid pointer */
200e3b4: 80 a7 20 00 cmp %i4, 0
200e3b8: 12 bf ff e1 bne 200e33c <IMFS_memfile_remove+0xe0> <== ALWAYS TAKEN
200e3bc: 80 a0 60 00 cmp %g1, 0
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
200e3c0: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
200e3c4: 7f ff ff 90 call 200e204 <memfile_free_blocks_in_table>
200e3c8: 92 10 00 1a mov %i2, %o1
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
200e3cc: 81 c7 e0 08 ret
200e3d0: 91 e8 20 00 restore %g0, 0, %o0
0200e570 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200e570: 9d e3 bf 98 save %sp, -104, %sp
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
200e574: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200e578: ba 10 00 18 mov %i0, %i5
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
200e57c: 80 a0 60 00 cmp %g1, 0
200e580: 06 80 00 5c bl 200e6f0 <IMFS_memfile_write+0x180> <== NEVER TAKEN
200e584: 94 07 00 1a add %i4, %i2, %o2
200e588: 80 a0 60 00 cmp %g1, 0
200e58c: 22 80 00 56 be,a 200e6e4 <IMFS_memfile_write+0x174> <== ALWAYS TAKEN
200e590: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e594: 23 00 80 75 sethi %hi(0x201d400), %l1 <== NOT EXECUTED
200e598: e0 04 62 a8 ld [ %l1 + 0x2a8 ], %l0 ! 201d6a8 <imfs_memfile_bytes_per_block>
200e59c: 92 10 00 1a mov %i2, %o1
200e5a0: b1 3c 20 1f sra %l0, 0x1f, %i0
200e5a4: 96 10 00 10 mov %l0, %o3
200e5a8: 94 10 00 18 mov %i0, %o2
200e5ac: 40 00 2b 00 call 20191ac <__moddi3>
200e5b0: 90 10 00 19 mov %i1, %o0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e5b4: 94 10 00 18 mov %i0, %o2
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e5b8: a4 10 00 09 mov %o1, %l2
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e5bc: 90 10 00 19 mov %i1, %o0
200e5c0: 92 10 00 1a mov %i2, %o1
200e5c4: 40 00 2a 14 call 2018e14 <__divdi3>
200e5c8: 96 10 00 10 mov %l0, %o3
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
200e5cc: b0 10 20 00 clr %i0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
200e5d0: 80 a4 a0 00 cmp %l2, 0
200e5d4: 12 80 00 1a bne 200e63c <IMFS_memfile_write+0xcc>
200e5d8: b4 10 00 09 mov %o1, %i2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e5dc: 80 a7 00 10 cmp %i4, %l0
200e5e0: 1a 80 00 0e bcc 200e618 <IMFS_memfile_write+0xa8>
200e5e4: 92 10 00 1a mov %i2, %o1
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
200e5e8: 10 80 00 2a b 200e690 <IMFS_memfile_write+0x120>
200e5ec: 80 a7 20 00 cmp %i4, 0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
200e5f0: d0 02 00 00 ld [ %o0 ], %o0
200e5f4: 40 00 07 92 call 201043c <memcpy>
200e5f8: b8 27 00 10 sub %i4, %l0, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e5fc: c2 04 62 a8 ld [ %l1 + 0x2a8 ], %g1
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
200e600: b6 06 c0 10 add %i3, %l0, %i3
block++;
200e604: b4 06 a0 01 inc %i2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e608: 80 a0 40 1c cmp %g1, %i4
200e60c: 18 80 00 20 bgu 200e68c <IMFS_memfile_write+0x11c>
200e610: b0 06 00 10 add %i0, %l0, %i0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e614: 92 10 00 1a mov %i2, %o1
200e618: 94 10 20 00 clr %o2
200e61c: 7f ff fd a6 call 200dcb4 <IMFS_memfile_get_block_pointer>
200e620: 90 10 00 1d mov %i5, %o0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
200e624: 92 10 00 1b mov %i3, %o1
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
200e628: 80 a2 20 00 cmp %o0, 0
200e62c: 12 bf ff f1 bne 200e5f0 <IMFS_memfile_write+0x80> <== ALWAYS TAKEN
200e630: 94 10 00 10 mov %l0, %o2
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
200e634: 81 c7 e0 08 ret <== NOT EXECUTED
200e638: 81 e8 00 00 restore <== NOT EXECUTED
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e63c: 90 10 00 1d mov %i5, %o0
200e640: 94 10 20 00 clr %o2
200e644: 7f ff fd 9c call 200dcb4 <IMFS_memfile_get_block_pointer>
200e648: b0 10 20 00 clr %i0
if ( !block_ptr )
200e64c: 80 a2 20 00 cmp %o0, 0
200e650: 02 80 00 32 be 200e718 <IMFS_memfile_write+0x1a8> <== NEVER TAKEN
200e654: 01 00 00 00 nop
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200e658: b0 24 00 12 sub %l0, %l2, %i0
200e65c: 80 a6 00 1c cmp %i0, %i4
200e660: 18 80 00 30 bgu 200e720 <IMFS_memfile_write+0x1b0>
200e664: d0 02 00 00 ld [ %o0 ], %o0
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200e668: 92 10 00 1b mov %i3, %o1
200e66c: 90 02 00 12 add %o0, %l2, %o0
200e670: 94 10 00 18 mov %i0, %o2
200e674: 40 00 07 72 call 201043c <memcpy>
200e678: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
200e67c: b4 06 a0 01 inc %i2
my_length -= to_copy;
200e680: b8 27 00 18 sub %i4, %i0, %i4
copied += to_copy;
200e684: 10 bf ff d6 b 200e5dc <IMFS_memfile_write+0x6c>
200e688: e0 04 62 a8 ld [ %l1 + 0x2a8 ], %l0
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
200e68c: 80 a7 20 00 cmp %i4, 0
200e690: 02 80 00 0e be 200e6c8 <IMFS_memfile_write+0x158>
200e694: 90 07 bf f8 add %fp, -8, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e698: 90 10 00 1d mov %i5, %o0
200e69c: 92 10 00 1a mov %i2, %o1
200e6a0: 7f ff fd 85 call 200dcb4 <IMFS_memfile_get_block_pointer>
200e6a4: 94 10 20 00 clr %o2
if ( !block_ptr )
200e6a8: 80 a2 20 00 cmp %o0, 0
200e6ac: 02 bf ff e2 be 200e634 <IMFS_memfile_write+0xc4> <== NEVER TAKEN
200e6b0: 92 10 00 1b mov %i3, %o1
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
200e6b4: d0 02 00 00 ld [ %o0 ], %o0
200e6b8: 94 10 00 1c mov %i4, %o2
200e6bc: 40 00 07 60 call 201043c <memcpy>
200e6c0: b0 06 00 1c add %i0, %i4, %i0
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
200e6c4: 90 07 bf f8 add %fp, -8, %o0
200e6c8: 7f ff d2 40 call 2002fc8 <gettimeofday>
200e6cc: 92 10 20 00 clr %o1
200e6d0: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e6d4: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
200e6d8: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
return copied;
}
200e6dc: 81 c7 e0 08 ret
200e6e0: 81 e8 00 00 restore
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
200e6e4: 80 a0 40 0a cmp %g1, %o2
200e6e8: 1a bf ff ac bcc 200e598 <IMFS_memfile_write+0x28>
200e6ec: 23 00 80 75 sethi %hi(0x201d400), %l1
status = IMFS_memfile_extend( the_jnode, last_byte );
200e6f0: 90 10 00 1d mov %i5, %o0
200e6f4: 7f ff ff 44 call 200e404 <IMFS_memfile_extend>
200e6f8: 92 10 20 00 clr %o1
if ( status )
200e6fc: 80 a2 20 00 cmp %o0, 0
200e700: 02 bf ff a6 be 200e598 <IMFS_memfile_write+0x28>
200e704: 23 00 80 75 sethi %hi(0x201d400), %l1
rtems_set_errno_and_return_minus_one( ENOSPC );
200e708: 40 00 04 f1 call 200facc <__errno>
200e70c: b0 10 3f ff mov -1, %i0
200e710: 82 10 20 1c mov 0x1c, %g1
200e714: c2 22 00 00 st %g1, [ %o0 ]
200e718: 81 c7 e0 08 ret
200e71c: 81 e8 00 00 restore
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200e720: b0 10 00 1c mov %i4, %i0
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200e724: 92 10 00 1b mov %i3, %o1
200e728: 90 02 00 12 add %o0, %l2, %o0
200e72c: 94 10 00 18 mov %i0, %o2
200e730: 40 00 07 43 call 201043c <memcpy>
200e734: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
200e738: b4 06 a0 01 inc %i2
my_length -= to_copy;
200e73c: b8 27 00 18 sub %i4, %i0, %i4
copied += to_copy;
200e740: 10 bf ff a7 b 200e5dc <IMFS_memfile_write+0x6c>
200e744: e0 04 62 a8 ld [ %l1 + 0x2a8 ], %l0
020025d4 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
20025d4: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
20025d8: c2 06 20 08 ld [ %i0 + 8 ], %g1
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
20025dc: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
20025e0: 80 a0 a0 01 cmp %g2, 1
20025e4: 12 80 00 05 bne 20025f8 <IMFS_mount+0x24> <== NEVER TAKEN
20025e8: 01 00 00 00 nop
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
20025ec: f0 20 60 5c st %i0, [ %g1 + 0x5c ]
return 0;
}
20025f0: 81 c7 e0 08 ret
20025f4: 91 e8 20 00 restore %g0, 0, %o0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
20025f8: 40 00 35 35 call 200facc <__errno> <== NOT EXECUTED
20025fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002600: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2002604: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002608: 81 c7 e0 08 ret <== NOT EXECUTED
200260c: 81 e8 00 00 restore <== NOT EXECUTED
02005048 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
2005048: 9d e3 bf a0 save %sp, -96, %sp
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
200504c: 3b 00 80 93 sethi %hi(0x2024c00), %i5
2005050: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1 ! 2024ce0 <_impure_ptr>
2005054: 90 06 20 0c add %i0, 0xc, %o0
2005058: 40 00 3d 63 call 20145e4 <fputs>
200505c: d2 00 60 08 ld [ %g1 + 8 ], %o1
switch( the_jnode->type ) {
2005060: f4 06 20 4c ld [ %i0 + 0x4c ], %i2
2005064: 80 a6 a0 07 cmp %i2, 7
2005068: 08 80 00 07 bleu 2005084 <IMFS_print_jnode+0x3c> <== ALWAYS TAKEN
200506c: 83 2e a0 02 sll %i2, 2, %g1
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
2005070: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1 <== NOT EXECUTED
2005074: 33 00 80 8b sethi %hi(0x2022c00), %i1 <== NOT EXECUTED
2005078: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED
200507c: 40 00 3d 09 call 20144a0 <fprintf> <== NOT EXECUTED
2005080: 93 ee 61 58 restore %i1, 0x158, %o1 <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
2005084: 05 00 80 14 sethi %hi(0x2005000), %g2
2005088: 84 10 a0 28 or %g2, 0x28, %g2 ! 2005028 <console_inbyte_nonblocking+0xac>
200508c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2005090: 81 c0 40 00 jmp %g1
2005094: 01 00 00 00 nop
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2005098: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1
200509c: 31 00 80 8b sethi %hi(0x2022c00), %i0
20050a0: f6 00 60 08 ld [ %g1 + 8 ], %i3
20050a4: b0 16 21 28 or %i0, 0x128, %i0
20050a8: b2 10 20 01 mov 1, %i1
20050ac: 40 00 40 70 call 201526c <fwrite>
20050b0: 95 e8 20 13 restore %g0, 0x13, %o2
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
20050b4: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1
20050b8: 31 00 80 8b sethi %hi(0x2022c00), %i0
20050bc: f6 00 60 08 ld [ %g1 + 8 ], %i3
20050c0: b0 16 21 40 or %i0, 0x140, %i0
20050c4: b2 10 20 01 mov 1, %i1
20050c8: 40 00 40 69 call 201526c <fwrite>
20050cc: 95 e8 20 12 restore %g0, 0x12, %o2
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
20050d0: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1
20050d4: d4 06 20 54 ld [ %i0 + 0x54 ], %o2
20050d8: d0 00 60 08 ld [ %g1 + 8 ], %o0
20050dc: 13 00 80 8b sethi %hi(0x2022c00), %o1
20050e0: 40 00 3c f0 call 20144a0 <fprintf>
20050e4: 92 12 61 18 or %o1, 0x118, %o1 ! 2022d18 <rtems_filesystem_table+0x15e4>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
20050e8: 31 00 80 8b sethi %hi(0x2022c00), %i0
20050ec: 40 00 44 62 call 2016274 <puts>
20050f0: 91 ee 20 a0 restore %i0, 0xa0, %o0
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
20050f4: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1
20050f8: d4 06 20 54 ld [ %i0 + 0x54 ], %o2
20050fc: d6 06 20 58 ld [ %i0 + 0x58 ], %o3
2005100: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005104: 13 00 80 8b sethi %hi(0x2022c00), %o1
2005108: 40 00 3c e6 call 20144a0 <fprintf>
200510c: 92 12 61 08 or %o1, 0x108, %o1 ! 2022d08 <rtems_filesystem_table+0x15d4>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
2005110: 31 00 80 8b sethi %hi(0x2022c00), %i0
2005114: 40 00 44 58 call 2016274 <puts>
2005118: 91 ee 20 a0 restore %i0, 0xa0, %o0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
200511c: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1
2005120: 90 10 20 2f mov 0x2f, %o0
2005124: d2 00 60 08 ld [ %g1 + 8 ], %o1
2005128: 40 00 3c fa call 2014510 <fputc>
200512c: 31 00 80 8b sethi %hi(0x2022c00), %i0
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
2005130: 40 00 44 51 call 2016274 <puts>
2005134: 91 ee 20 a0 restore %i0, 0xa0, %o0
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
2005138: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1
200513c: d4 06 20 50 ld [ %i0 + 0x50 ], %o2
2005140: d6 06 20 54 ld [ %i0 + 0x54 ], %o3
2005144: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005148: 13 00 80 8b sethi %hi(0x2022c00), %o1
200514c: 40 00 3c d5 call 20144a0 <fprintf>
2005150: 92 12 60 f0 or %o1, 0xf0, %o1 ! 2022cf0 <rtems_filesystem_table+0x15bc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
2005154: 31 00 80 8b sethi %hi(0x2022c00), %i0
2005158: 40 00 44 47 call 2016274 <puts>
200515c: 91 ee 20 a0 restore %i0, 0xa0, %o0
0200261c <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
200261c: c8 02 00 00 ld [ %o0 ], %g4
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
2002620: 80 a2 a0 00 cmp %o2, 0
2002624: 02 80 00 13 be 2002670 <IMFS_readlink+0x54> <== NEVER TAKEN
2002628: 90 10 20 00 clr %o0
200262c: c2 01 20 50 ld [ %g4 + 0x50 ], %g1
2002630: c4 48 40 00 ldsb [ %g1 ], %g2
2002634: 80 a0 a0 00 cmp %g2, 0
2002638: 02 80 00 0e be 2002670 <IMFS_readlink+0x54> <== NEVER TAKEN
200263c: c2 08 40 00 ldub [ %g1 ], %g1
2002640: 10 80 00 07 b 200265c <IMFS_readlink+0x40>
2002644: 84 10 20 00 clr %g2
2002648: c2 01 20 50 ld [ %g4 + 0x50 ], %g1
200264c: c6 48 40 08 ldsb [ %g1 + %o0 ], %g3
2002650: 80 a0 e0 00 cmp %g3, 0
2002654: 02 80 00 07 be 2002670 <IMFS_readlink+0x54>
2002658: c2 08 40 08 ldub [ %g1 + %o0 ], %g1
buf[i] = node->info.sym_link.name[i];
200265c: c2 2a 40 02 stb %g1, [ %o1 + %g2 ]
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
2002660: 90 02 20 01 inc %o0
2002664: 80 a2 00 0a cmp %o0, %o2
2002668: 12 bf ff f8 bne 2002648 <IMFS_readlink+0x2c>
200266c: 84 10 00 08 mov %o0, %g2
buf[i] = node->info.sym_link.name[i];
return i;
}
2002670: 81 c3 e0 08 retl
02002678 <IMFS_rename>:
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
2002678: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
200267c: fa 06 40 00 ld [ %i1 ], %i5
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
2002680: 92 10 00 1b mov %i3, %o1
2002684: 90 07 60 0c add %i5, 0xc, %o0
2002688: 40 00 3a da call 20111f0 <strncpy>
200268c: 94 10 20 20 mov 0x20, %o2
if ( the_jnode->Parent != NULL )
2002690: c2 07 60 08 ld [ %i5 + 8 ], %g1
2002694: 80 a0 60 00 cmp %g1, 0
2002698: 22 80 00 05 be,a 20026ac <IMFS_rename+0x34> <== NEVER TAKEN
200269c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
20026a0: 40 00 13 66 call 2007438 <_Chain_Extract>
20026a4: 90 10 00 1d mov %i5, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
20026a8: c2 06 80 00 ld [ %i2 ], %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
20026ac: 92 10 00 1d mov %i5, %o1
20026b0: 90 00 60 50 add %g1, 0x50, %o0
20026b4: 40 00 13 56 call 200740c <_Chain_Append>
20026b8: c2 27 60 08 st %g1, [ %i5 + 8 ]
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
20026bc: 90 07 bf f8 add %fp, -8, %o0
20026c0: 40 00 02 42 call 2002fc8 <gettimeofday>
20026c4: 92 10 20 00 clr %o1
20026c8: c2 07 bf f8 ld [ %fp + -8 ], %g1
20026cc: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
return 0;
}
20026d0: 81 c7 e0 08 ret
20026d4: 91 e8 20 00 restore %g0, 0, %o0
0200adc8 <IMFS_skip_separator>:
static void IMFS_skip_separator (
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
200adc8: 9d e3 bf a0 save %sp, -96, %sp
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
200adcc: 10 80 00 0f b 200ae08 <IMFS_skip_separator+0x40>
200add0: c2 06 80 00 ld [ %i2 ], %g1
200add4: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2
200add8: 80 a0 a0 00 cmp %g2, 0
200addc: 02 80 00 10 be 200ae1c <IMFS_skip_separator+0x54>
200ade0: 82 00 60 01 inc %g1
200ade4: c4 06 40 00 ld [ %i1 ], %g2
200ade8: 80 a0 a0 00 cmp %g2, 0
200adec: 02 80 00 0c be 200ae1c <IMFS_skip_separator+0x54> <== NEVER TAKEN
200adf0: 01 00 00 00 nop
++(*index);
200adf4: c2 26 80 00 st %g1, [ %i2 ]
--(*len);
200adf8: c2 06 40 00 ld [ %i1 ], %g1
200adfc: 82 00 7f ff add %g1, -1, %g1
200ae00: c2 26 40 00 st %g1, [ %i1 ]
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
200ae04: c2 06 80 00 ld [ %i2 ], %g1
200ae08: 7f ff e4 43 call 2003f14 <rtems_filesystem_is_separator>
200ae0c: d0 4e 00 01 ldsb [ %i0 + %g1 ], %o0
200ae10: 80 a2 20 00 cmp %o0, 0
200ae14: 32 bf ff f0 bne,a 200add4 <IMFS_skip_separator+0xc>
200ae18: c2 06 80 00 ld [ %i2 ], %g1
200ae1c: 81 c7 e0 08 ret
200ae20: 81 e8 00 00 restore
0200bc20 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
200bc20: 9d e3 bf a0 save %sp, -96, %sp
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
200bc24: c2 06 00 00 ld [ %i0 ], %g1
switch ( the_jnode->type ) {
200bc28: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200bc2c: 80 a0 a0 07 cmp %g2, 7
200bc30: 08 80 00 08 bleu 200bc50 <IMFS_stat+0x30> <== ALWAYS TAKEN
200bc34: 85 28 a0 02 sll %g2, 2, %g2
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
200bc38: 40 00 0f a5 call 200facc <__errno>
200bc3c: b0 10 3f ff mov -1, %i0
200bc40: 82 10 20 86 mov 0x86, %g1
200bc44: c2 22 00 00 st %g1, [ %o0 ]
200bc48: 81 c7 e0 08 ret
200bc4c: 81 e8 00 00 restore
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
200bc50: 07 00 80 2f sethi %hi(0x200bc00), %g3
200bc54: 86 10 e0 00 mov %g3, %g3 ! 200bc00 <IMFS_rmnod+0x24>
200bc58: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
200bc5c: 81 c0 80 00 jmp %g2
200bc60: 01 00 00 00 nop
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
200bc64: c0 26 60 20 clr [ %i1 + 0x20 ]
200bc68: c0 26 60 24 clr [ %i1 + 0x24 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
200bc6c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
200bc70: d6 00 60 30 ld [ %g1 + 0x30 ], %o3
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
200bc74: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
200bc78: f0 10 60 3e lduh [ %g1 + 0x3e ], %i0
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
200bc7c: d8 10 60 34 lduh [ %g1 + 0x34 ], %o4
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
200bc80: d4 00 80 00 ld [ %g2 ], %o2
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200bc84: da 00 60 38 ld [ %g1 + 0x38 ], %o5
buf->st_uid = the_jnode->st_uid;
200bc88: de 10 60 3c lduh [ %g1 + 0x3c ], %o7
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
200bc8c: c8 00 60 40 ld [ %g1 + 0x40 ], %g4
buf->st_mtime = the_jnode->stat_mtime;
200bc90: c6 00 60 44 ld [ %g1 + 0x44 ], %g3
buf->st_ctime = the_jnode->stat_ctime;
200bc94: c4 00 60 48 ld [ %g1 + 0x48 ], %g2
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200bc98: 03 00 80 73 sethi %hi(0x201cc00), %g1
200bc9c: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 201ceb4 <imfs_rq_memfile_bytes_per_block>
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
200bca0: d6 26 60 0c st %o3, [ %i1 + 0xc ]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
200bca4: f0 36 60 14 sth %i0, [ %i1 + 0x14 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
200bca8: d4 26 60 04 st %o2, [ %i1 + 4 ]
200bcac: 17 00 00 3f sethi %hi(0xfc00), %o3
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
200bcb0: d8 36 60 10 sth %o4, [ %i1 + 0x10 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
200bcb4: 96 12 e3 fe or %o3, 0x3fe, %o3
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200bcb8: da 26 60 08 st %o5, [ %i1 + 8 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
200bcbc: d6 26 40 00 st %o3, [ %i1 ]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
200bcc0: de 36 60 12 sth %o7, [ %i1 + 0x12 ]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
200bcc4: c8 26 60 28 st %g4, [ %i1 + 0x28 ]
buf->st_mtime = the_jnode->stat_mtime;
200bcc8: c6 26 60 30 st %g3, [ %i1 + 0x30 ]
buf->st_ctime = the_jnode->stat_ctime;
200bccc: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200bcd0: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
return 0;
}
200bcd4: 81 c7 e0 08 ret
200bcd8: 91 e8 20 00 restore %g0, 0, %o0
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
200bcdc: c6 00 60 54 ld [ %g1 + 0x54 ], %g3
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
200bce0: c4 00 60 50 ld [ %g1 + 0x50 ], %g2
break;
200bce4: 10 bf ff e2 b 200bc6c <IMFS_stat+0x4c>
200bce8: c4 3e 60 18 std %g2, [ %i1 + 0x18 ]
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
200bcec: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2
break;
200bcf0: 10 bf ff df b 200bc6c <IMFS_stat+0x4c>
200bcf4: c4 3e 60 20 std %g2, [ %i1 + 0x20 ]
02002770 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
2002770: 9d e3 bf 80 save %sp, -128, %sp
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
2002774: fa 06 40 00 ld [ %i1 ], %i5
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
2002778: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200277c: 80 a0 60 03 cmp %g1, 3
2002780: 02 80 00 09 be 20027a4 <IMFS_unlink+0x34>
2002784: b8 10 00 18 mov %i0, %i4
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
2002788: c2 06 60 08 ld [ %i1 + 8 ], %g1
200278c: 90 10 00 1c mov %i4, %o0
2002790: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002794: 9f c0 40 00 call %g1
2002798: 92 10 00 19 mov %i1, %o1
return result;
}
200279c: 81 c7 e0 08 ret
20027a0: 91 e8 00 08 restore %g0, %o0, %o0
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
20027a4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
20027a8: 80 a0 60 00 cmp %g1, 0
20027ac: 02 80 00 2b be 2002858 <IMFS_unlink+0xe8> <== NEVER TAKEN
20027b0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
20027b4: c6 06 60 0c ld [ %i1 + 0xc ], %g3
20027b8: f0 06 60 04 ld [ %i1 + 4 ], %i0
20027bc: c8 06 60 08 ld [ %i1 + 8 ], %g4
20027c0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
20027c4: c6 27 bf f0 st %g3, [ %fp + -16 ]
the_link.node_access = node->info.hard_link.link_node;
20027c8: c2 27 bf e4 st %g1, [ %fp + -28 ]
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
20027cc: f0 27 bf e8 st %i0, [ %fp + -24 ]
20027d0: c8 27 bf ec st %g4, [ %fp + -20 ]
20027d4: c4 27 bf f4 st %g2, [ %fp + -12 ]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
20027d8: 40 00 21 93 call 200ae24 <IMFS_Set_handlers>
20027dc: 90 07 bf e4 add %fp, -28, %o0
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
20027e0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
20027e4: c6 10 60 34 lduh [ %g1 + 0x34 ], %g3
20027e8: 80 a0 e0 01 cmp %g3, 1
20027ec: 02 80 00 10 be 200282c <IMFS_unlink+0xbc>
20027f0: 84 00 ff ff add %g3, -1, %g2
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
20027f4: 90 07 bf f8 add %fp, -8, %o0
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
20027f8: c4 30 60 34 sth %g2, [ %g1 + 0x34 ]
IMFS_update_ctime( node->info.hard_link.link_node );
20027fc: 40 00 01 f3 call 2002fc8 <gettimeofday>
2002800: 92 10 20 00 clr %o1
2002804: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
2002808: c4 07 bf f8 ld [ %fp + -8 ], %g2
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
200280c: 90 10 00 1c mov %i4, %o0
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
2002810: c4 20 60 48 st %g2, [ %g1 + 0x48 ]
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
2002814: c2 06 60 08 ld [ %i1 + 8 ], %g1
2002818: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
200281c: 9f c0 40 00 call %g1
2002820: 92 10 00 19 mov %i1, %o1
return result;
}
2002824: 81 c7 e0 08 ret
2002828: 91 e8 00 08 restore %g0, %o0, %o0
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
200282c: c2 07 bf ec ld [ %fp + -20 ], %g1
2002830: 90 10 00 1c mov %i4, %o0
2002834: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002838: 92 07 bf e4 add %fp, -28, %o1
200283c: 9f c0 40 00 call %g1
2002840: b0 10 3f ff mov -1, %i0
if ( result != 0 )
2002844: 80 a2 20 00 cmp %o0, 0
2002848: 22 bf ff d1 be,a 200278c <IMFS_unlink+0x1c>
200284c: c2 06 60 08 ld [ %i1 + 8 ], %g1
2002850: 81 c7 e0 08 ret
2002854: 81 e8 00 00 restore
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
2002858: 40 00 34 9d call 200facc <__errno> <== NOT EXECUTED
200285c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002860: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2002864: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002868: 81 c7 e0 08 ret <== NOT EXECUTED
200286c: 81 e8 00 00 restore <== NOT EXECUTED
02002870 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2002870: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2002874: c2 06 20 08 ld [ %i0 + 8 ], %g1
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002878: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200287c: 80 a0 a0 01 cmp %g2, 1
2002880: 12 80 00 09 bne 20028a4 <IMFS_unmount+0x34> <== NEVER TAKEN
2002884: 01 00 00 00 nop
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
2002888: c4 00 60 5c ld [ %g1 + 0x5c ], %g2
200288c: 80 a0 a0 00 cmp %g2, 0
2002890: 02 80 00 0b be 20028bc <IMFS_unmount+0x4c> <== NEVER TAKEN
2002894: 01 00 00 00 nop
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
2002898: c0 20 60 5c clr [ %g1 + 0x5c ]
return 0;
}
200289c: 81 c7 e0 08 ret
20028a0: 91 e8 20 00 restore %g0, 0, %o0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
20028a4: 40 00 34 8a call 200facc <__errno> <== NOT EXECUTED
20028a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20028ac: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
20028b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20028b4: 81 c7 e0 08 ret <== NOT EXECUTED
20028b8: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
20028bc: 40 00 34 84 call 200facc <__errno> <== NOT EXECUTED
20028c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20028c4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20028c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20028cc: 81 c7 e0 08 ret <== NOT EXECUTED
20028d0: 81 e8 00 00 restore <== NOT EXECUTED
020031b4 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
20031b4: 9d e3 bf a0 save %sp, -96, %sp
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
20031b8: 03 00 80 75 sethi %hi(0x201d400), %g1
20031bc: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201d694 <rtems_malloc_statistics_helpers>
20031c0: 80 a0 60 00 cmp %g1, 0
20031c4: 02 80 00 05 be 20031d8 <RTEMS_Malloc_Initialize+0x24>
20031c8: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->initialize)();
20031cc: c2 00 40 00 ld [ %g1 ], %g1
20031d0: 9f c0 40 00 call %g1
20031d4: 01 00 00 00 nop
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
20031d8: 7f ff ff dd call 200314c <malloc_deferred_frees_initialize>
20031dc: 01 00 00 00 nop
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
20031e0: 03 00 80 75 sethi %hi(0x201d400), %g1
20031e4: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 201d690 <rtems_malloc_sbrk_helpers>
20031e8: 80 a0 60 00 cmp %g1, 0
20031ec: 02 80 00 08 be 200320c <RTEMS_Malloc_Initialize+0x58>
20031f0: 90 10 00 18 mov %i0, %o0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
20031f4: c2 00 40 00 ld [ %g1 ], %g1
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
20031f8: b2 06 00 19 add %i0, %i1, %i1
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
20031fc: 9f c0 40 00 call %g1
2003200: 92 10 00 1a mov %i2, %o1
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
heap_begin = new_heap_begin;
2003204: b0 10 00 08 mov %o0, %i0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2003208: b2 26 40 08 sub %i1, %o0, %i1
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
200320c: 39 00 80 75 sethi %hi(0x201d400), %i4
2003210: c2 0f 22 98 ldub [ %i4 + 0x298 ], %g1 ! 201d698 <rtems_unified_work_area>
2003214: 80 a0 60 00 cmp %g1, 0
2003218: 12 80 00 10 bne 2003258 <RTEMS_Malloc_Initialize+0xa4>
200321c: 3b 00 80 73 sethi %hi(0x201cc00), %i5
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
2003220: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003224: c2 08 61 b4 ldub [ %g1 + 0x1b4 ], %g1 ! 201cdb4 <Configuration+0x28>
2003228: 80 a0 60 00 cmp %g1, 0
200322c: 12 80 00 13 bne 2003278 <RTEMS_Malloc_Initialize+0xc4>
2003230: 90 10 00 18 mov %i0, %o0
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
2003234: 3b 00 80 73 sethi %hi(0x201cc00), %i5
2003238: d0 07 62 70 ld [ %i5 + 0x270 ], %o0 ! 201ce70 <RTEMS_Malloc_Heap>
200323c: 92 10 00 18 mov %i0, %o1
2003240: 94 10 00 19 mov %i1, %o2
2003244: 40 00 12 50 call 2007b84 <_Heap_Initialize>
2003248: 96 10 20 08 mov 8, %o3
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
200324c: 80 a2 20 00 cmp %o0, 0
2003250: 02 80 00 13 be 200329c <RTEMS_Malloc_Initialize+0xe8>
2003254: 01 00 00 00 nop
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
2003258: 39 00 80 76 sethi %hi(0x201d800), %i4
200325c: d0 07 62 70 ld [ %i5 + 0x270 ], %o0
2003260: 40 00 15 55 call 20087b4 <_Protected_heap_Get_size>
2003264: fa 07 21 50 ld [ %i4 + 0x150 ], %i5
2003268: ba 02 00 1d add %o0, %i5, %i5
200326c: fa 27 21 50 st %i5, [ %i4 + 0x150 ]
}
2003270: 81 c7 e0 08 ret
2003274: 81 e8 00 00 restore
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
2003278: 92 10 20 00 clr %o1
200327c: 40 00 34 ac call 201052c <memset>
2003280: 94 10 00 19 mov %i1, %o2
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
2003284: c2 0f 22 98 ldub [ %i4 + 0x298 ], %g1
2003288: 80 a0 60 00 cmp %g1, 0
200328c: 22 bf ff eb be,a 2003238 <RTEMS_Malloc_Initialize+0x84> <== ALWAYS TAKEN
2003290: 3b 00 80 73 sethi %hi(0x201cc00), %i5
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
2003294: 10 bf ff f2 b 200325c <RTEMS_Malloc_Initialize+0xa8> <== NOT EXECUTED
2003298: 39 00 80 76 sethi %hi(0x201d800), %i4 <== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
200329c: 40 00 0f 71 call 2007060 <rtems_fatal_error_occurred>
20032a0: 90 10 20 1a mov 0x1a, %o0
020027d4 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
20027d4: 9d e3 bf 98 save %sp, -104, %sp
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
20027d8: 80 a6 3f ff cmp %i0, -1
20027dc: 02 80 00 5d be 2002950 <Stack_check_Dump_threads_usage+0x17c>
20027e0: b6 06 20 b8 add %i0, 0xb8, %i3
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
20027e4: e0 06 21 40 ld [ %i0 + 0x140 ], %l0
20027e8: f4 06 20 bc ld [ %i0 + 0xbc ], %i2
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
20027ec: f8 06 c0 00 ld [ %i3 ], %i4
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
20027f0: 82 06 a0 20 add %i2, 0x20, %g1
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
20027f4: b8 07 3f f0 add %i4, -16, %i4
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
20027f8: 86 0f 3f fc and %i4, -4, %g3
20027fc: 86 00 40 03 add %g1, %g3, %g3
2002800: 80 a0 40 03 cmp %g1, %g3
2002804: 1a 80 00 12 bcc 200284c <Stack_check_Dump_threads_usage+0x78><== NEVER TAKEN
2002808: ba 10 20 00 clr %i5
if (*base != U32_PATTERN)
200280c: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4
2002810: 05 29 69 69 sethi %hi(0xa5a5a400), %g2
2002814: 84 10 a1 a5 or %g2, 0x1a5, %g2 ! a5a5a5a5 <RAM_END+0xa365a5a5>
2002818: 80 a1 00 02 cmp %g4, %g2
200281c: 22 80 00 08 be,a 200283c <Stack_check_Dump_threads_usage+0x68><== ALWAYS TAKEN
2002820: 82 00 60 04 add %g1, 4, %g1
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
2002824: 10 80 00 36 b 20028fc <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
2002828: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
200282c: 80 a0 80 04 cmp %g2, %g4
2002830: 12 80 00 32 bne 20028f8 <Stack_check_Dump_threads_usage+0x124>
2002834: ba 10 20 00 clr %i5
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
2002838: 82 00 60 04 add %g1, 4, %g1
200283c: 80 a0 c0 01 cmp %g3, %g1
2002840: 38 bf ff fb bgu,a 200282c <Stack_check_Dump_threads_usage+0x58><== ALWAYS TAKEN
2002844: c4 00 40 00 ld [ %g1 ], %g2
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
2002848: ba 10 20 00 clr %i5 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
200284c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2002850: 02 80 00 32 be 2002918 <Stack_check_Dump_threads_usage+0x144><== NOT EXECUTED
2002854: 33 00 80 66 sethi %hi(0x2019800), %i1 <== NOT EXECUTED
#endif
{
(*print_handler)(
2002858: e2 06 20 08 ld [ %i0 + 8 ], %l1
200285c: 35 00 80 66 sethi %hi(0x2019800), %i2
2002860: 33 00 80 66 sethi %hi(0x2019800), %i1
2002864: e4 06 a1 f4 ld [ %i2 + 0x1f4 ], %l2
2002868: f0 06 61 f0 ld [ %i1 + 0x1f0 ], %i0
200286c: 94 07 bf f8 add %fp, -8, %o2
2002870: 92 10 20 05 mov 5, %o1
2002874: 40 00 19 58 call 2008dd4 <rtems_object_get_name>
2002878: 90 10 00 11 mov %l1, %o0
200287c: 13 00 80 60 sethi %hi(0x2018000), %o1
2002880: 96 10 00 08 mov %o0, %o3
2002884: 94 10 00 11 mov %l1, %o2
2002888: 90 10 00 12 mov %l2, %o0
200288c: 9f c6 00 00 call %i0
2002890: 92 12 63 28 or %o1, 0x328, %o1
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
2002894: d4 06 e0 04 ld [ %i3 + 4 ], %o2
2002898: d6 06 c0 00 ld [ %i3 ], %o3
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
200289c: c2 06 61 f0 ld [ %i1 + 0x1f0 ], %g1
20028a0: d0 06 a1 f4 ld [ %i2 + 0x1f4 ], %o0
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
20028a4: 96 02 ff ff add %o3, -1, %o3
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
20028a8: 13 00 80 60 sethi %hi(0x2018000), %o1
20028ac: 96 02 80 0b add %o2, %o3, %o3
20028b0: 92 12 63 48 or %o1, 0x348, %o1
20028b4: 98 10 00 10 mov %l0, %o4
20028b8: 9f c0 40 00 call %g1
20028bc: 9a 10 00 1c mov %i4, %o5
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20028c0: 03 00 80 66 sethi %hi(0x2019800), %g1
20028c4: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 20199ec <Stack_check_Initialized>
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
20028c8: 07 00 80 66 sethi %hi(0x2019800), %g3
20028cc: 05 00 80 66 sethi %hi(0x2019800), %g2
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20028d0: 80 a0 60 00 cmp %g1, 0
(*print_handler)( print_context, "Unavailable\n" );
20028d4: d0 00 a1 f4 ld [ %g2 + 0x1f4 ], %o0
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20028d8: 02 80 00 19 be 200293c <Stack_check_Dump_threads_usage+0x168><== NEVER TAKEN
20028dc: c2 00 e1 f0 ld [ %g3 + 0x1f0 ], %g1
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
20028e0: 94 10 00 1d mov %i5, %o2
20028e4: 13 00 80 60 sethi %hi(0x2018000), %o1
20028e8: 9f c0 40 00 call %g1
20028ec: 92 12 63 78 or %o1, 0x378, %o1 ! 2018378 <rtems_filesystem_table+0x444>
20028f0: 81 c7 e0 08 ret
20028f4: 81 e8 00 00 restore
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
20028f8: 80 a0 60 00 cmp %g1, 0
20028fc: 02 bf ff d4 be 200284c <Stack_check_Dump_threads_usage+0x78><== NEVER TAKEN
2002900: 80 a6 20 00 cmp %i0, 0
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
2002904: ba 06 a0 10 add %i2, 0x10, %i5
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
2002908: ba 07 40 1c add %i5, %i4, %i5
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
200290c: 12 bf ff d3 bne 2002858 <Stack_check_Dump_threads_usage+0x84>
2002910: ba 27 40 01 sub %i5, %g1, %i5
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
2002914: 33 00 80 66 sethi %hi(0x2019800), %i1
2002918: 35 00 80 66 sethi %hi(0x2019800), %i2
200291c: c2 06 61 f0 ld [ %i1 + 0x1f0 ], %g1
2002920: d0 06 a1 f4 ld [ %i2 + 0x1f4 ], %o0
2002924: 94 10 3f ff mov -1, %o2
2002928: 13 00 80 60 sethi %hi(0x2018000), %o1
200292c: 9f c0 40 00 call %g1
2002930: 92 12 63 38 or %o1, 0x338, %o1 ! 2018338 <rtems_filesystem_table+0x404>
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
2002934: 10 bf ff d9 b 2002898 <Stack_check_Dump_threads_usage+0xc4>
2002938: d4 06 e0 04 ld [ %i3 + 4 ], %o2
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
200293c: 13 00 80 60 sethi %hi(0x2018000), %o1 <== NOT EXECUTED
2002940: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002944: 92 12 63 68 or %o1, 0x368, %o1 ! 2018368 <rtems_filesystem_table+0x434><== NOT EXECUTED
2002948: 81 c7 e0 08 ret <== NOT EXECUTED
200294c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
2002950: 37 00 80 67 sethi %hi(0x2019c00), %i3
2002954: b6 16 e0 94 or %i3, 0x94, %i3 ! 2019c94 <Stack_check_Interrupt_stack>
2002958: f4 06 e0 04 ld [ %i3 + 4 ], %i2
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
200295c: a0 10 20 00 clr %l0
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
2002960: 80 a6 a0 00 cmp %i2, 0
2002964: 12 bf ff a2 bne 20027ec <Stack_check_Dump_threads_usage+0x18><== ALWAYS TAKEN
2002968: b0 10 20 00 clr %i0
200296c: 81 c7 e0 08 ret <== NOT EXECUTED
2002970: 81 e8 00 00 restore <== NOT EXECUTED
02002974 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
2002974: 9d e3 bf a0 save %sp, -96, %sp
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
2002978: 3b 00 80 66 sethi %hi(0x2019800), %i5
200297c: c2 07 61 ec ld [ %i5 + 0x1ec ], %g1 ! 20199ec <Stack_check_Initialized>
2002980: 80 a0 60 00 cmp %g1, 0
2002984: 12 80 00 20 bne 2002a04 <Stack_check_Initialize+0x90>
2002988: 07 00 80 67 sethi %hi(0x2019c00), %g3
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
200298c: 09 3f bb 7c sethi %hi(0xfeedf000), %g4
2002990: 82 10 e0 84 or %g3, 0x84, %g1
2002994: 88 11 20 0d or %g4, 0xd, %g4
2002998: c8 20 e0 84 st %g4, [ %g3 + 0x84 ]
200299c: 07 02 eb 43 sethi %hi(0xbad0c00), %g3
20029a0: 86 10 e1 06 or %g3, 0x106, %g3 ! bad0d06 <RAM_END+0x96d0d06>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
20029a4: 05 00 80 69 sethi %hi(0x201a400), %g2
20029a8: d0 00 a0 10 ld [ %g2 + 0x10 ], %o0 ! 201a410 <_Per_CPU_Information>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
20029ac: c6 20 60 04 st %g3, [ %g1 + 4 ]
20029b0: 07 37 ab 7c sethi %hi(0xdeadf000), %g3
20029b4: 86 10 e0 0d or %g3, 0xd, %g3 ! deadf00d <RAM_END+0xdc6df00d>
20029b8: c6 20 60 08 st %g3, [ %g1 + 8 ]
20029bc: 07 18 03 43 sethi %hi(0x600d0c00), %g3
20029c0: 86 10 e1 06 or %g3, 0x106, %g3 ! 600d0d06 <RAM_END+0x5dcd0d06>
20029c4: c6 20 60 0c st %g3, [ %g1 + 0xc ]
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
20029c8: 80 a2 20 00 cmp %o0, 0
20029cc: 02 80 00 0c be 20029fc <Stack_check_Initialize+0x88> <== NEVER TAKEN
20029d0: 84 10 a0 10 or %g2, 0x10, %g2
20029d4: d4 00 a0 04 ld [ %g2 + 4 ], %o2
20029d8: 80 a2 a0 00 cmp %o2, 0
20029dc: 02 80 00 08 be 20029fc <Stack_check_Initialize+0x88> <== NEVER TAKEN
20029e0: 03 00 80 67 sethi %hi(0x2019c00), %g1
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
20029e4: 84 10 60 94 or %g1, 0x94, %g2 ! 2019c94 <Stack_check_Interrupt_stack>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
20029e8: 94 22 80 08 sub %o2, %o0, %o2
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
20029ec: d0 20 a0 04 st %o0, [ %g2 + 4 ]
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
20029f0: d4 20 60 94 st %o2, [ %g1 + 0x94 ]
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
20029f4: 40 00 40 97 call 2012c50 <memset>
20029f8: 92 10 20 a5 mov 0xa5, %o1
}
#endif
Stack_check_Initialized = 1;
20029fc: 82 10 20 01 mov 1, %g1
2002a00: c2 27 61 ec st %g1, [ %i5 + 0x1ec ]
2002a04: 81 c7 e0 08 ret
2002a08: 81 e8 00 00 restore
02002a7c <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)
{
2002a7c: 9d e3 bf 80 save %sp, -128, %sp
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
2002a80: 11 00 80 60 sethi %hi(0x2018000), %o0
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
2002a84: fa 06 20 bc ld [ %i0 + 0xbc ], %i5
char name[32];
printk("BLOWN STACK!!!\n");
2002a88: 40 00 07 98 call 20048e8 <printk>
2002a8c: 90 12 23 80 or %o0, 0x380, %o0
printk("task control block: 0x%08" PRIxPTR "\n", running);
2002a90: 92 10 00 18 mov %i0, %o1
2002a94: 11 00 80 60 sethi %hi(0x2018000), %o0
2002a98: 40 00 07 94 call 20048e8 <printk>
2002a9c: 90 12 23 90 or %o0, 0x390, %o0 ! 2018390 <rtems_filesystem_table+0x45c>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
2002aa0: d2 06 20 08 ld [ %i0 + 8 ], %o1
2002aa4: 11 00 80 60 sethi %hi(0x2018000), %o0
2002aa8: 40 00 07 90 call 20048e8 <printk>
2002aac: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 20183b0 <rtems_filesystem_table+0x47c>
printk(
2002ab0: d2 06 20 0c ld [ %i0 + 0xc ], %o1
2002ab4: 11 00 80 60 sethi %hi(0x2018000), %o0
2002ab8: 40 00 07 8c call 20048e8 <printk>
2002abc: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 20183c8 <rtems_filesystem_table+0x494>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
2002ac0: d0 06 20 08 ld [ %i0 + 8 ], %o0
2002ac4: 94 07 bf e0 add %fp, -32, %o2
2002ac8: 40 00 18 c3 call 2008dd4 <rtems_object_get_name>
2002acc: 92 10 20 20 mov 0x20, %o1
2002ad0: 92 10 00 08 mov %o0, %o1
2002ad4: 11 00 80 60 sethi %hi(0x2018000), %o0
2002ad8: 40 00 07 84 call 20048e8 <printk>
2002adc: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 20183e0 <rtems_filesystem_table+0x4ac>
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
2002ae0: d4 06 20 bc ld [ %i0 + 0xbc ], %o2
2002ae4: d2 06 20 b8 ld [ %i0 + 0xb8 ], %o1
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
2002ae8: 11 00 80 60 sethi %hi(0x2018000), %o0
2002aec: 96 02 80 09 add %o2, %o1, %o3
2002af0: 40 00 07 7e call 20048e8 <printk>
2002af4: 90 12 23 f8 or %o0, 0x3f8, %o0
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
2002af8: 80 a6 60 00 cmp %i1, 0
2002afc: 02 80 00 04 be 2002b0c <Stack_check_report_blown_task+0x90><== ALWAYS TAKEN
2002b00: 92 10 20 10 mov 0x10, %o1
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
2002b04: 40 00 1a d5 call 2009658 <rtems_fatal_error_occurred>
2002b08: 90 10 20 81 mov 0x81, %o0
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
2002b0c: 11 00 80 61 sethi %hi(0x2018400), %o0
2002b10: 94 07 60 08 add %i5, 8, %o2
2002b14: 90 12 20 30 or %o0, 0x30, %o0
2002b18: 40 00 07 74 call 20048e8 <printk>
2002b1c: 96 07 60 18 add %i5, 0x18, %o3
2002b20: 30 bf ff f9 b,a 2002b04 <Stack_check_report_blown_task+0x88>
0200729c <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
200729c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
20072a0: 39 00 80 77 sethi %hi(0x201dc00), %i4
20072a4: fa 07 20 f4 ld [ %i4 + 0xf4 ], %i5 ! 201dcf4 <_API_extensions_List>
20072a8: b8 17 20 f4 or %i4, 0xf4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
20072ac: b8 07 20 04 add %i4, 4, %i4
20072b0: 80 a7 40 1c cmp %i5, %i4
20072b4: 02 80 00 09 be 20072d8 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
20072b8: 01 00 00 00 nop
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
20072bc: c2 07 60 08 ld [ %i5 + 8 ], %g1
20072c0: 9f c0 40 00 call %g1
20072c4: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
20072c8: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
20072cc: 80 a7 40 1c cmp %i5, %i4
20072d0: 32 bf ff fc bne,a 20072c0 <_API_extensions_Run_postdriver+0x24>
20072d4: c2 07 60 08 ld [ %i5 + 8 ], %g1
20072d8: 81 c7 e0 08 ret
20072dc: 81 e8 00 00 restore
020072e0 <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
20072e0: 9d e3 bf a0 save %sp, -96, %sp
20072e4: 39 00 80 77 sethi %hi(0x201dc00), %i4
20072e8: fa 07 20 f4 ld [ %i4 + 0xf4 ], %i5 ! 201dcf4 <_API_extensions_List>
20072ec: b8 17 20 f4 or %i4, 0xf4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
20072f0: b8 07 20 04 add %i4, 4, %i4
20072f4: 80 a7 40 1c cmp %i5, %i4
20072f8: 02 80 00 0a be 2007320 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
20072fc: 37 00 80 78 sethi %hi(0x201e000), %i3
2007300: b6 16 e0 40 or %i3, 0x40, %i3 ! 201e040 <_Per_CPU_Information>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
2007304: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2007308: 9f c0 40 00 call %g1
200730c: d0 06 e0 0c ld [ %i3 + 0xc ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2007310: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2007314: 80 a7 40 1c cmp %i5, %i4
2007318: 32 bf ff fc bne,a 2007308 <_API_extensions_Run_postswitch+0x28>
200731c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2007320: 81 c7 e0 08 ret
2007324: 81 e8 00 00 restore
020095b8 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
20095b8: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
20095bc: 03 00 80 6c sethi %hi(0x201b000), %g1
* 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 );
20095c0: 7f ff e7 f2 call 2003588 <sparc_disable_interrupts>
20095c4: fa 00 61 0c ld [ %g1 + 0x10c ], %i5 ! 201b10c <_Per_CPU_Information+0xc>
20095c8: 84 10 00 08 mov %o0, %g2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
20095cc: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
20095d0: 80 a0 60 00 cmp %g1, 0
20095d4: 02 80 00 2b be 2009680 <_CORE_RWLock_Release+0xc8>
20095d8: 80 a0 60 01 cmp %g1, 1
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
20095dc: 22 80 00 22 be,a 2009664 <_CORE_RWLock_Release+0xac>
20095e0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
20095e4: c0 27 60 34 clr [ %i5 + 0x34 ]
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
20095e8: c0 26 20 44 clr [ %i0 + 0x44 ]
_ISR_Enable( level );
20095ec: 7f ff e7 eb call 2003598 <sparc_enable_interrupts>
20095f0: 90 10 00 02 mov %g2, %o0
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
20095f4: 40 00 07 fb call 200b5e0 <_Thread_queue_Dequeue>
20095f8: 90 10 00 18 mov %i0, %o0
if ( next ) {
20095fc: 80 a2 20 00 cmp %o0, 0
2009600: 22 80 00 24 be,a 2009690 <_CORE_RWLock_Release+0xd8>
2009604: b0 10 20 00 clr %i0
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
2009608: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
200960c: 80 a0 60 01 cmp %g1, 1
2009610: 02 80 00 22 be 2009698 <_CORE_RWLock_Release+0xe0>
2009614: 84 10 20 01 mov 1, %g2
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
2009618: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200961c: 82 00 60 01 inc %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2009620: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
2009624: 10 80 00 09 b 2009648 <_CORE_RWLock_Release+0x90>
2009628: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
200962c: 80 a0 60 01 cmp %g1, 1
2009630: 02 80 00 0b be 200965c <_CORE_RWLock_Release+0xa4> <== NEVER TAKEN
2009634: 90 10 00 18 mov %i0, %o0
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
2009638: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200963c: 82 00 60 01 inc %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
2009640: 40 00 08 f8 call 200ba20 <_Thread_queue_Extract>
2009644: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
2009648: 40 00 09 47 call 200bb64 <_Thread_queue_First>
200964c: 90 10 00 18 mov %i0, %o0
if ( !next ||
2009650: 92 92 20 00 orcc %o0, 0, %o1
2009654: 32 bf ff f6 bne,a 200962c <_CORE_RWLock_Release+0x74>
2009658: c2 02 60 30 ld [ %o1 + 0x30 ], %g1
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200965c: 81 c7 e0 08 ret
2009660: 91 e8 20 00 restore %g0, 0, %o0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
2009664: 82 00 7f ff add %g1, -1, %g1
if ( the_rwlock->number_of_readers != 0 ) {
2009668: 80 a0 60 00 cmp %g1, 0
200966c: 02 bf ff de be 20095e4 <_CORE_RWLock_Release+0x2c>
2009670: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/* must be unlocked again */
_ISR_Enable( level );
2009674: 7f ff e7 c9 call 2003598 <sparc_enable_interrupts>
2009678: b0 10 20 00 clr %i0
return CORE_RWLOCK_SUCCESSFUL;
200967c: 30 80 00 05 b,a 2009690 <_CORE_RWLock_Release+0xd8>
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
2009680: 7f ff e7 c6 call 2003598 <sparc_enable_interrupts>
2009684: b0 10 20 00 clr %i0
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
2009688: 82 10 20 02 mov 2, %g1
200968c: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
2009690: 81 c7 e0 08 ret
2009694: 81 e8 00 00 restore
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
2009698: 82 10 20 02 mov 2, %g1
200969c: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
20096a0: 81 c7 e0 08 ret
20096a4: 91 e8 20 00 restore %g0, 0, %o0
020096a8 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
20096a8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
20096ac: 90 10 00 18 mov %i0, %o0
20096b0: 40 00 06 f5 call 200b284 <_Thread_Get>
20096b4: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20096b8: c2 07 bf fc ld [ %fp + -4 ], %g1
20096bc: 80 a0 60 00 cmp %g1, 0
20096c0: 12 80 00 09 bne 20096e4 <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN
20096c4: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
20096c8: 40 00 09 69 call 200bc6c <_Thread_queue_Process_timeout>
20096cc: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
20096d0: 03 00 80 6a sethi %hi(0x201a800), %g1
20096d4: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 201abc0 <_Thread_Dispatch_disable_level>
20096d8: 84 00 bf ff add %g2, -1, %g2
20096dc: c4 20 63 c0 st %g2, [ %g1 + 0x3c0 ]
return _Thread_Dispatch_disable_level;
20096e0: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1
20096e4: 81 c7 e0 08 ret
20096e8: 81 e8 00 00 restore
02010b2c <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
2010b2c: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
2010b30: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
2010b34: f4 26 20 44 st %i2, [ %i0 + 0x44 ]
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
2010b38: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
2010b3c: c0 26 20 60 clr [ %i0 + 0x60 ]
the_message_queue->notify_argument = the_argument;
2010b40: c0 26 20 64 clr [ %i0 + 0x64 ]
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
2010b44: 80 8e e0 03 btst 3, %i3
2010b48: 02 80 00 0a be 2010b70 <_CORE_message_queue_Initialize+0x44>
2010b4c: b8 10 00 1b mov %i3, %i4
allocated_message_size += sizeof(uint32_t);
2010b50: b8 06 e0 04 add %i3, 4, %i4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
2010b54: b8 0f 3f fc and %i4, -4, %i4
}
if (allocated_message_size < maximum_message_size)
2010b58: 80 a6 c0 1c cmp %i3, %i4
2010b5c: 08 80 00 05 bleu 2010b70 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN
2010b60: ba 10 20 00 clr %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2010b64: b0 0f 60 01 and %i5, 1, %i0
2010b68: 81 c7 e0 08 ret
2010b6c: 81 e8 00 00 restore
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
2010b70: b8 07 20 14 add %i4, 0x14, %i4
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
2010b74: 90 10 20 00 clr %o0
2010b78: 92 10 00 1a mov %i2, %o1
2010b7c: 94 10 20 00 clr %o2
2010b80: 96 10 00 1c mov %i4, %o3
2010b84: 40 00 45 70 call 2022144 <__muldi3>
2010b88: ba 10 20 00 clr %i5
if ( x > SIZE_MAX )
2010b8c: 80 a2 20 00 cmp %o0, 0
2010b90: 34 bf ff f6 bg,a 2010b68 <_CORE_message_queue_Initialize+0x3c>
2010b94: b0 0f 60 01 and %i5, 1, %i0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
2010b98: 40 00 0d 36 call 2014070 <_Workspace_Allocate>
2010b9c: 90 10 00 09 mov %o1, %o0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
2010ba0: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
2010ba4: 80 a2 20 00 cmp %o0, 0
2010ba8: 02 bf ff ef be 2010b64 <_CORE_message_queue_Initialize+0x38>
2010bac: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
2010bb0: 90 06 20 68 add %i0, 0x68, %o0
2010bb4: 94 10 00 1a mov %i2, %o2
2010bb8: 40 00 17 f7 call 2016b94 <_Chain_Initialize>
2010bbc: 96 10 00 1c mov %i4, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2010bc0: c4 06 40 00 ld [ %i1 ], %g2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2010bc4: 82 06 20 50 add %i0, 0x50, %g1
2010bc8: 84 18 a0 01 xor %g2, 1, %g2
2010bcc: 80 a0 00 02 cmp %g0, %g2
2010bd0: 84 06 20 54 add %i0, 0x54, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2010bd4: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2010bd8: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
2010bdc: 90 10 00 18 mov %i0, %o0
head->previous = NULL;
2010be0: c0 26 20 54 clr [ %i0 + 0x54 ]
2010be4: 92 60 3f ff subx %g0, -1, %o1
2010be8: 94 10 20 80 mov 0x80, %o2
2010bec: 96 10 20 06 mov 6, %o3
2010bf0: 40 00 0a 8d call 2013624 <_Thread_queue_Initialize>
2010bf4: ba 10 20 01 mov 1, %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2010bf8: b0 0f 60 01 and %i5, 1, %i0
2010bfc: 81 c7 e0 08 ret
2010c00: 81 e8 00 00 restore
02007840 <_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
)
{
2007840: 9d e3 bf a0 save %sp, -96, %sp
2007844: ba 10 00 18 mov %i0, %i5
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2007848: b0 10 20 00 clr %i0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
200784c: 40 00 07 cc call 200977c <_Thread_queue_Dequeue>
2007850: 90 10 00 1d mov %i5, %o0
2007854: 80 a2 20 00 cmp %o0, 0
2007858: 02 80 00 04 be 2007868 <_CORE_semaphore_Surrender+0x28>
200785c: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
2007860: 81 c7 e0 08 ret
2007864: 81 e8 00 00 restore
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
2007868: 7f ff ea 5f call 20021e4 <sparc_disable_interrupts>
200786c: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
2007870: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2007874: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
2007878: 80 a0 40 02 cmp %g1, %g2
200787c: 1a 80 00 05 bcc 2007890 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN
2007880: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2007884: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2007888: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
200788c: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
2007890: 7f ff ea 59 call 20021f4 <sparc_enable_interrupts>
2007894: 01 00 00 00 nop
}
return status;
}
2007898: 81 c7 e0 08 ret
200789c: 81 e8 00 00 restore
0200d240 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
200d240: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
200d244: c0 26 20 04 clr [ %i0 + 4 ]
size_t node_size
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200d248: ba 06 20 04 add %i0, 4, %i5
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200d24c: 80 a6 a0 00 cmp %i2, 0
200d250: 02 80 00 12 be 200d298 <_Chain_Initialize+0x58> <== NEVER TAKEN
200d254: 90 10 00 18 mov %i0, %o0
200d258: b4 06 bf ff add %i2, -1, %i2
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
200d25c: 82 10 00 19 mov %i1, %g1
head->previous = NULL;
while ( count-- ) {
200d260: 92 10 00 1a mov %i2, %o1
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
200d264: 10 80 00 05 b 200d278 <_Chain_Initialize+0x38>
200d268: 84 10 00 18 mov %i0, %g2
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200d26c: 84 10 00 01 mov %g1, %g2
200d270: b4 06 bf ff add %i2, -1, %i2
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
200d274: 82 10 00 03 mov %g3, %g1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
200d278: c2 20 80 00 st %g1, [ %g2 ]
next->previous = current;
200d27c: c4 20 60 04 st %g2, [ %g1 + 4 ]
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200d280: 80 a6 a0 00 cmp %i2, 0
200d284: 12 bf ff fa bne 200d26c <_Chain_Initialize+0x2c>
200d288: 86 00 40 1b add %g1, %i3, %g3
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
200d28c: 40 00 2d 50 call 20187cc <.umul>
200d290: 90 10 00 1b mov %i3, %o0
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200d294: 90 06 40 08 add %i1, %o0, %o0
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
200d298: fa 22 00 00 st %i5, [ %o0 ]
tail->previous = current;
200d29c: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
200d2a0: 81 c7 e0 08 ret
200d2a4: 81 e8 00 00 restore
020064b0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
20064b0: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
20064b4: fa 06 21 58 ld [ %i0 + 0x158 ], %i5
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
20064b8: 7f ff ef 4b call 20021e4 <sparc_disable_interrupts>
20064bc: f8 06 20 30 ld [ %i0 + 0x30 ], %i4
pending_events = api->pending_events;
20064c0: c4 07 40 00 ld [ %i5 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
20064c4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
20064c8: 86 88 40 02 andcc %g1, %g2, %g3
20064cc: 02 80 00 39 be 20065b0 <_Event_Surrender+0x100>
20064d0: 09 00 80 78 sethi %hi(0x201e000), %g4
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
20064d4: 88 11 20 40 or %g4, 0x40, %g4 ! 201e040 <_Per_CPU_Information>
20064d8: f2 01 20 08 ld [ %g4 + 8 ], %i1
20064dc: 80 a6 60 00 cmp %i1, 0
20064e0: 32 80 00 1c bne,a 2006550 <_Event_Surrender+0xa0>
20064e4: c8 01 20 0c ld [ %g4 + 0xc ], %g4
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
20064e8: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
20064ec: 80 89 21 00 btst 0x100, %g4
20064f0: 02 80 00 30 be 20065b0 <_Event_Surrender+0x100>
20064f4: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
20064f8: 02 80 00 04 be 2006508 <_Event_Surrender+0x58>
20064fc: 80 8f 20 02 btst 2, %i4
2006500: 02 80 00 2c be 20065b0 <_Event_Surrender+0x100> <== NEVER TAKEN
2006504: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2006508: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
200650c: 84 28 80 03 andn %g2, %g3, %g2
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
2006510: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
2006514: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2006518: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
200651c: 7f ff ef 36 call 20021f4 <sparc_enable_interrupts>
2006520: 01 00 00 00 nop
2006524: 7f ff ef 30 call 20021e4 <sparc_disable_interrupts>
2006528: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
200652c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
2006530: 80 a0 60 02 cmp %g1, 2
2006534: 02 80 00 21 be 20065b8 <_Event_Surrender+0x108>
2006538: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
200653c: 7f ff ef 2e call 20021f4 <sparc_enable_interrupts>
2006540: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2006544: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2006548: 40 00 0a b4 call 2009018 <_Thread_Clear_state>
200654c: 81 e8 00 00 restore
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
2006550: 80 a6 00 04 cmp %i0, %g4
2006554: 32 bf ff e6 bne,a 20064ec <_Event_Surrender+0x3c>
2006558: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
200655c: 09 00 80 79 sethi %hi(0x201e400), %g4
2006560: f2 01 20 40 ld [ %g4 + 0x40 ], %i1 ! 201e440 <_Event_Sync_state>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
2006564: 80 a6 60 02 cmp %i1, 2
2006568: 02 80 00 07 be 2006584 <_Event_Surrender+0xd4> <== NEVER TAKEN
200656c: 80 a0 40 03 cmp %g1, %g3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
2006570: f2 01 20 40 ld [ %g4 + 0x40 ], %i1
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2006574: 80 a6 60 01 cmp %i1, 1
2006578: 32 bf ff dd bne,a 20064ec <_Event_Surrender+0x3c>
200657c: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
2006580: 80 a0 40 03 cmp %g1, %g3
2006584: 02 80 00 04 be 2006594 <_Event_Surrender+0xe4>
2006588: 80 8f 20 02 btst 2, %i4
200658c: 02 80 00 09 be 20065b0 <_Event_Surrender+0x100> <== NEVER TAKEN
2006590: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2006594: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2006598: 84 28 80 03 andn %g2, %g3, %g2
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
200659c: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
20065a0: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20065a4: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
20065a8: 82 10 20 03 mov 3, %g1
20065ac: c2 21 20 40 st %g1, [ %g4 + 0x40 ]
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
20065b0: 7f ff ef 11 call 20021f4 <sparc_enable_interrupts>
20065b4: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
20065b8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
20065bc: 7f ff ef 0e call 20021f4 <sparc_enable_interrupts>
20065c0: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
20065c4: 40 00 0f ab call 200a470 <_Watchdog_Remove>
20065c8: 90 06 20 48 add %i0, 0x48, %o0
20065cc: b2 16 63 f8 or %i1, 0x3f8, %i1
20065d0: 40 00 0a 92 call 2009018 <_Thread_Clear_state>
20065d4: 81 e8 00 00 restore
020065d8 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
20065d8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
20065dc: 90 10 00 18 mov %i0, %o0
20065e0: 40 00 0b 90 call 2009420 <_Thread_Get>
20065e4: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20065e8: c2 07 bf fc ld [ %fp + -4 ], %g1
20065ec: 80 a0 60 00 cmp %g1, 0
20065f0: 12 80 00 16 bne 2006648 <_Event_Timeout+0x70> <== NEVER TAKEN
20065f4: ba 10 00 08 mov %o0, %i5
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
20065f8: 7f ff ee fb call 20021e4 <sparc_disable_interrupts>
20065fc: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
2006600: 03 00 80 78 sethi %hi(0x201e000), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
2006604: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 ! 201e04c <_Per_CPU_Information+0xc>
2006608: 80 a7 40 01 cmp %i5, %g1
200660c: 02 80 00 11 be 2006650 <_Event_Timeout+0x78>
2006610: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2006614: 82 10 20 06 mov 6, %g1
2006618: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
200661c: 7f ff ee f6 call 20021f4 <sparc_enable_interrupts>
2006620: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2006624: 90 10 00 1d mov %i5, %o0
2006628: 13 04 00 ff sethi %hi(0x1003fc00), %o1
200662c: 40 00 0a 7b call 2009018 <_Thread_Clear_state>
2006630: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2006634: 03 00 80 76 sethi %hi(0x201d800), %g1
2006638: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201db00 <_Thread_Dispatch_disable_level>
200663c: 84 00 bf ff add %g2, -1, %g2
2006640: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
2006644: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
2006648: 81 c7 e0 08 ret
200664c: 81 e8 00 00 restore
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
2006650: 03 00 80 79 sethi %hi(0x201e400), %g1
2006654: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 201e440 <_Event_Sync_state>
2006658: 80 a0 a0 01 cmp %g2, 1
200665c: 32 bf ff ef bne,a 2006618 <_Event_Timeout+0x40>
2006660: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2006664: 84 10 20 02 mov 2, %g2
2006668: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
200666c: 10 bf ff eb b 2006618 <_Event_Timeout+0x40>
2006670: 82 10 20 06 mov 6, %g1
0200d478 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
200d478: 9d e3 bf 98 save %sp, -104, %sp
200d47c: ba 10 00 18 mov %i0, %i5
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
200d480: a0 06 60 04 add %i1, 4, %l0
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
200d484: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
200d488: 80 a6 40 10 cmp %i1, %l0
200d48c: 18 80 00 23 bgu 200d518 <_Heap_Allocate_aligned_with_boundary+0xa0>
200d490: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
200d494: 80 a6 e0 00 cmp %i3, 0
200d498: 12 80 00 7d bne 200d68c <_Heap_Allocate_aligned_with_boundary+0x214>
200d49c: 80 a6 40 1b cmp %i1, %i3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200d4a0: e2 07 60 08 ld [ %i5 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d4a4: 80 a7 40 11 cmp %i5, %l1
200d4a8: 02 80 00 18 be 200d508 <_Heap_Allocate_aligned_with_boundary+0x90>
200d4ac: b8 10 20 00 clr %i4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d4b0: 82 05 a0 07 add %l6, 7, %g1
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200d4b4: ae 10 20 04 mov 4, %l7
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d4b8: c2 27 bf fc st %g1, [ %fp + -4 ]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200d4bc: 10 80 00 0b b 200d4e8 <_Heap_Allocate_aligned_with_boundary+0x70>
200d4c0: ae 25 c0 19 sub %l7, %i1, %l7
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
200d4c4: 12 80 00 17 bne 200d520 <_Heap_Allocate_aligned_with_boundary+0xa8>
200d4c8: b0 04 60 08 add %l1, 8, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d4cc: 80 a6 20 00 cmp %i0, 0
200d4d0: 12 80 00 5b bne 200d63c <_Heap_Allocate_aligned_with_boundary+0x1c4>
200d4d4: b8 07 20 01 inc %i4
break;
}
block = block->next;
200d4d8: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d4dc: 80 a7 40 11 cmp %i5, %l1
200d4e0: 22 80 00 0b be,a 200d50c <_Heap_Allocate_aligned_with_boundary+0x94>
200d4e4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
200d4e8: e4 04 60 04 ld [ %l1 + 4 ], %l2
200d4ec: 80 a4 00 12 cmp %l0, %l2
200d4f0: 0a bf ff f5 bcs 200d4c4 <_Heap_Allocate_aligned_with_boundary+0x4c>
200d4f4: 80 a6 a0 00 cmp %i2, 0
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
200d4f8: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d4fc: 80 a7 40 11 cmp %i5, %l1
200d500: 12 bf ff fa bne 200d4e8 <_Heap_Allocate_aligned_with_boundary+0x70>
200d504: b8 07 20 01 inc %i4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200d508: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200d50c: 80 a0 40 1c cmp %g1, %i4
200d510: 0a 80 00 5a bcs 200d678 <_Heap_Allocate_aligned_with_boundary+0x200>
200d514: b0 10 20 00 clr %i0
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
200d518: 81 c7 e0 08 ret
200d51c: 81 e8 00 00 restore
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
200d520: c4 07 bf fc ld [ %fp + -4 ], %g2
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
200d524: ea 07 60 14 ld [ %i5 + 0x14 ], %l5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200d528: a4 0c bf fe and %l2, -2, %l2
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
200d52c: 82 20 80 15 sub %g2, %l5, %g1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
200d530: a4 04 40 12 add %l1, %l2, %l2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d534: 92 10 00 1a mov %i2, %o1
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
200d538: b0 05 c0 12 add %l7, %l2, %i0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d53c: a4 00 40 12 add %g1, %l2, %l2
200d540: 40 00 2d 89 call 2018b64 <.urem>
200d544: 90 10 00 18 mov %i0, %o0
200d548: b0 26 00 08 sub %i0, %o0, %i0
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
200d54c: 80 a4 80 18 cmp %l2, %i0
200d550: 1a 80 00 06 bcc 200d568 <_Heap_Allocate_aligned_with_boundary+0xf0>
200d554: a8 04 60 08 add %l1, 8, %l4
200d558: 90 10 00 12 mov %l2, %o0
200d55c: 40 00 2d 82 call 2018b64 <.urem>
200d560: 92 10 00 1a mov %i2, %o1
200d564: b0 24 80 08 sub %l2, %o0, %i0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
200d568: 80 a6 e0 00 cmp %i3, 0
200d56c: 02 80 00 24 be 200d5fc <_Heap_Allocate_aligned_with_boundary+0x184>
200d570: 80 a5 00 18 cmp %l4, %i0
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
200d574: a4 06 00 19 add %i0, %i1, %l2
200d578: 92 10 00 1b mov %i3, %o1
200d57c: 40 00 2d 7a call 2018b64 <.urem>
200d580: 90 10 00 12 mov %l2, %o0
200d584: 90 24 80 08 sub %l2, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200d588: 80 a6 00 08 cmp %i0, %o0
200d58c: 1a 80 00 1b bcc 200d5f8 <_Heap_Allocate_aligned_with_boundary+0x180>
200d590: 80 a2 00 12 cmp %o0, %l2
200d594: 1a 80 00 1a bcc 200d5fc <_Heap_Allocate_aligned_with_boundary+0x184>
200d598: 80 a5 00 18 cmp %l4, %i0
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
200d59c: a6 05 00 19 add %l4, %i1, %l3
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
200d5a0: 80 a4 c0 08 cmp %l3, %o0
200d5a4: 08 80 00 08 bleu 200d5c4 <_Heap_Allocate_aligned_with_boundary+0x14c>
200d5a8: b0 10 20 00 clr %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d5ac: 10 bf ff c9 b 200d4d0 <_Heap_Allocate_aligned_with_boundary+0x58>
200d5b0: 80 a6 20 00 cmp %i0, 0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200d5b4: 1a 80 00 11 bcc 200d5f8 <_Heap_Allocate_aligned_with_boundary+0x180>
200d5b8: 80 a4 c0 08 cmp %l3, %o0
if ( boundary_line < boundary_floor ) {
200d5bc: 18 bf ff c4 bgu 200d4cc <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN
200d5c0: b0 10 20 00 clr %i0
return 0;
}
alloc_begin = boundary_line - alloc_size;
200d5c4: b0 22 00 19 sub %o0, %i1, %i0
200d5c8: 92 10 00 1a mov %i2, %o1
200d5cc: 40 00 2d 66 call 2018b64 <.urem>
200d5d0: 90 10 00 18 mov %i0, %o0
200d5d4: 92 10 00 1b mov %i3, %o1
200d5d8: b0 26 00 08 sub %i0, %o0, %i0
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
200d5dc: a4 06 00 19 add %i0, %i1, %l2
200d5e0: 40 00 2d 61 call 2018b64 <.urem>
200d5e4: 90 10 00 12 mov %l2, %o0
200d5e8: 90 24 80 08 sub %l2, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200d5ec: 80 a2 00 12 cmp %o0, %l2
200d5f0: 0a bf ff f1 bcs 200d5b4 <_Heap_Allocate_aligned_with_boundary+0x13c>
200d5f4: 80 a6 00 08 cmp %i0, %o0
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
200d5f8: 80 a5 00 18 cmp %l4, %i0
200d5fc: 18 80 00 22 bgu 200d684 <_Heap_Allocate_aligned_with_boundary+0x20c>
200d600: 82 10 3f f8 mov -8, %g1
200d604: 90 10 00 18 mov %i0, %o0
200d608: a4 20 40 11 sub %g1, %l1, %l2
200d60c: 92 10 00 16 mov %l6, %o1
200d610: 40 00 2d 55 call 2018b64 <.urem>
200d614: a4 04 80 18 add %l2, %i0, %l2
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
200d618: 90 a4 80 08 subcc %l2, %o0, %o0
200d61c: 02 bf ff ad be 200d4d0 <_Heap_Allocate_aligned_with_boundary+0x58>
200d620: 80 a6 20 00 cmp %i0, 0
200d624: 80 a2 00 15 cmp %o0, %l5
return alloc_begin;
}
}
return 0;
200d628: 82 40 3f ff addx %g0, -1, %g1
200d62c: b0 0e 00 01 and %i0, %g1, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d630: 80 a6 20 00 cmp %i0, 0
200d634: 02 bf ff a9 be 200d4d8 <_Heap_Allocate_aligned_with_boundary+0x60>
200d638: b8 07 20 01 inc %i4
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d63c: c4 07 60 48 ld [ %i5 + 0x48 ], %g2
stats->searches += search_count;
200d640: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d644: 84 00 a0 01 inc %g2
stats->searches += search_count;
200d648: 82 00 40 1c add %g1, %i4, %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d64c: c4 27 60 48 st %g2, [ %i5 + 0x48 ]
stats->searches += search_count;
200d650: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200d654: 90 10 00 1d mov %i5, %o0
200d658: 92 10 00 11 mov %l1, %o1
200d65c: 94 10 00 18 mov %i0, %o2
200d660: 7f ff e9 9d call 2007cd4 <_Heap_Block_allocate>
200d664: 96 10 00 19 mov %i1, %o3
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200d668: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200d66c: 80 a0 40 1c cmp %g1, %i4
200d670: 1a 80 00 03 bcc 200d67c <_Heap_Allocate_aligned_with_boundary+0x204>
200d674: 01 00 00 00 nop
stats->max_search = search_count;
200d678: f8 27 60 44 st %i4, [ %i5 + 0x44 ]
}
return (void *) alloc_begin;
}
200d67c: 81 c7 e0 08 ret
200d680: 81 e8 00 00 restore
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
200d684: 10 bf ff 92 b 200d4cc <_Heap_Allocate_aligned_with_boundary+0x54>
200d688: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
200d68c: 18 bf ff a3 bgu 200d518 <_Heap_Allocate_aligned_with_boundary+0xa0>
200d690: 80 a6 a0 00 cmp %i2, 0
return NULL;
}
if ( alignment == 0 ) {
200d694: 22 bf ff 83 be,a 200d4a0 <_Heap_Allocate_aligned_with_boundary+0x28>
200d698: b4 10 00 16 mov %l6, %i2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200d69c: 10 bf ff 82 b 200d4a4 <_Heap_Allocate_aligned_with_boundary+0x2c>
200d6a0: e2 07 60 08 ld [ %i5 + 8 ], %l1
0200d280 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
200d280: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
200d284: c0 27 bf f8 clr [ %fp + -8 ]
Heap_Block *extend_last_block = NULL;
200d288: c0 27 bf fc clr [ %fp + -4 ]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
200d28c: ba 06 40 1a add %i1, %i2, %i5
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
200d290: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
200d294: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
200d298: d6 06 20 14 ld [ %i0 + 0x14 ], %o3
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
200d29c: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
200d2a0: 80 a6 40 1d cmp %i1, %i5
200d2a4: 08 80 00 05 bleu 200d2b8 <_Heap_Extend+0x38>
200d2a8: a2 10 20 00 clr %l1
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
200d2ac: b0 0c 60 01 and %l1, 1, %i0
200d2b0: 81 c7 e0 08 ret
200d2b4: 81 e8 00 00 restore
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
200d2b8: 90 10 00 19 mov %i1, %o0
200d2bc: 92 10 00 1a mov %i2, %o1
200d2c0: 94 10 00 10 mov %l0, %o2
200d2c4: 98 07 bf f8 add %fp, -8, %o4
200d2c8: 7f ff e9 4a call 20077f0 <_Heap_Get_first_and_last_block>
200d2cc: 9a 07 bf fc add %fp, -4, %o5
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
200d2d0: 80 8a 20 ff btst 0xff, %o0
200d2d4: 02 bf ff f6 be 200d2ac <_Heap_Extend+0x2c>
200d2d8: aa 10 20 00 clr %l5
200d2dc: a2 10 00 1c mov %i4, %l1
200d2e0: ac 10 20 00 clr %l6
200d2e4: a6 10 20 00 clr %l3
200d2e8: 10 80 00 14 b 200d338 <_Heap_Extend+0xb8>
200d2ec: a8 10 20 00 clr %l4
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
200d2f0: 2a 80 00 02 bcs,a 200d2f8 <_Heap_Extend+0x78>
200d2f4: ac 10 00 11 mov %l1, %l6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d2f8: 90 10 00 1a mov %i2, %o0
200d2fc: 40 00 18 31 call 20133c0 <.urem>
200d300: 92 10 00 10 mov %l0, %o1
200d304: 82 06 bf f8 add %i2, -8, %g1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200d308: 80 a6 80 19 cmp %i2, %i1
200d30c: 02 80 00 1c be 200d37c <_Heap_Extend+0xfc>
200d310: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
200d314: 80 a6 40 1a cmp %i1, %i2
200d318: 38 80 00 02 bgu,a 200d320 <_Heap_Extend+0xa0>
200d31c: aa 10 00 01 mov %g1, %l5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200d320: e2 00 60 04 ld [ %g1 + 4 ], %l1
200d324: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d328: a2 04 40 01 add %l1, %g1, %l1
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200d32c: 80 a7 00 11 cmp %i4, %l1
200d330: 22 80 00 1b be,a 200d39c <_Heap_Extend+0x11c>
200d334: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200d338: 80 a4 40 1c cmp %l1, %i4
200d33c: 02 80 00 66 be 200d4d4 <_Heap_Extend+0x254>
200d340: 82 10 00 11 mov %l1, %g1
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200d344: 80 a0 40 1d cmp %g1, %i5
200d348: 0a 80 00 70 bcs 200d508 <_Heap_Extend+0x288>
200d34c: f4 04 40 00 ld [ %l1 ], %i2
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
200d350: 80 a0 40 1d cmp %g1, %i5
200d354: 12 bf ff e7 bne 200d2f0 <_Heap_Extend+0x70>
200d358: 80 a7 40 1a cmp %i5, %i2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d35c: 90 10 00 1a mov %i2, %o0
200d360: 40 00 18 18 call 20133c0 <.urem>
200d364: 92 10 00 10 mov %l0, %o1
200d368: 82 06 bf f8 add %i2, -8, %g1
200d36c: a8 10 00 11 mov %l1, %l4
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200d370: 80 a6 80 19 cmp %i2, %i1
200d374: 12 bf ff e8 bne 200d314 <_Heap_Extend+0x94> <== ALWAYS TAKEN
200d378: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
200d37c: fa 24 40 00 st %i5, [ %l1 ]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200d380: e2 00 60 04 ld [ %g1 + 4 ], %l1
200d384: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d388: a2 04 40 01 add %l1, %g1, %l1
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200d38c: 80 a7 00 11 cmp %i4, %l1
200d390: 12 bf ff ea bne 200d338 <_Heap_Extend+0xb8> <== NEVER TAKEN
200d394: a6 10 00 01 mov %g1, %l3
if ( extend_area_begin < heap->area_begin ) {
200d398: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200d39c: 80 a6 40 01 cmp %i1, %g1
200d3a0: 3a 80 00 55 bcc,a 200d4f4 <_Heap_Extend+0x274>
200d3a4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
heap->area_begin = extend_area_begin;
200d3a8: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200d3ac: c2 07 bf f8 ld [ %fp + -8 ], %g1
200d3b0: c4 07 bf fc ld [ %fp + -4 ], %g2
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200d3b4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
200d3b8: 86 20 80 01 sub %g2, %g1, %g3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
200d3bc: fa 20 40 00 st %i5, [ %g1 ]
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
200d3c0: b8 10 e0 01 or %g3, 1, %i4
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
200d3c4: f8 20 60 04 st %i4, [ %g1 + 4 ]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
200d3c8: c6 20 80 00 st %g3, [ %g2 ]
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200d3cc: 80 a1 00 01 cmp %g4, %g1
200d3d0: 08 80 00 43 bleu 200d4dc <_Heap_Extend+0x25c>
200d3d4: c0 20 a0 04 clr [ %g2 + 4 ]
heap->first_block = extend_first_block;
200d3d8: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200d3dc: 80 a5 20 00 cmp %l4, 0
200d3e0: 02 80 00 63 be 200d56c <_Heap_Extend+0x2ec>
200d3e4: b2 06 60 08 add %i1, 8, %i1
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
200d3e8: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
200d3ec: 92 10 00 1c mov %i4, %o1
200d3f0: 40 00 17 f4 call 20133c0 <.urem>
200d3f4: 90 10 00 19 mov %i1, %o0
if ( remainder != 0 ) {
200d3f8: 80 a2 20 00 cmp %o0, 0
200d3fc: 02 80 00 04 be 200d40c <_Heap_Extend+0x18c>
200d400: c4 05 00 00 ld [ %l4 ], %g2
return value - remainder + alignment;
200d404: b2 06 40 1c add %i1, %i4, %i1
200d408: b2 26 40 08 sub %i1, %o0, %i1
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
200d40c: 82 06 7f f8 add %i1, -8, %g1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
200d410: c4 26 7f f8 st %g2, [ %i1 + -8 ]
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
200d414: 84 25 00 01 sub %l4, %g1, %g2
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
200d418: 84 10 a0 01 or %g2, 1, %g2
_Heap_Free_block( heap, new_first_block );
200d41c: 90 10 00 18 mov %i0, %o0
200d420: 92 10 00 01 mov %g1, %o1
200d424: 7f ff ff 8d call 200d258 <_Heap_Free_block>
200d428: c4 26 7f fc st %g2, [ %i1 + -4 ]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
200d42c: 80 a4 e0 00 cmp %l3, 0
200d430: 02 80 00 3b be 200d51c <_Heap_Extend+0x29c>
200d434: ba 07 7f f8 add %i5, -8, %i5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d438: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
200d43c: ba 27 40 13 sub %i5, %l3, %i5
200d440: 40 00 17 e0 call 20133c0 <.urem>
200d444: 90 10 00 1d mov %i5, %o0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
200d448: c2 04 e0 04 ld [ %l3 + 4 ], %g1
200d44c: ba 27 40 08 sub %i5, %o0, %i5
200d450: 82 20 40 1d sub %g1, %i5, %g1
| HEAP_PREV_BLOCK_USED;
200d454: 82 10 60 01 or %g1, 1, %g1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200d458: 84 07 40 13 add %i5, %l3, %g2
200d45c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d460: c2 04 e0 04 ld [ %l3 + 4 ], %g1
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
200d464: 90 10 00 18 mov %i0, %o0
200d468: 82 08 60 01 and %g1, 1, %g1
200d46c: 92 10 00 13 mov %l3, %o1
block->size_and_flag = size | flag;
200d470: ba 17 40 01 or %i5, %g1, %i5
200d474: 7f ff ff 79 call 200d258 <_Heap_Free_block>
200d478: fa 24 e0 04 st %i5, [ %l3 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200d47c: 80 a4 e0 00 cmp %l3, 0
200d480: 02 80 00 34 be 200d550 <_Heap_Extend+0x2d0>
200d484: 80 a5 20 00 cmp %l4, 0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
200d488: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200d48c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d490: c4 00 60 04 ld [ %g1 + 4 ], %g2
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200d494: 86 20 c0 01 sub %g3, %g1, %g3
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d498: 84 08 a0 01 and %g2, 1, %g2
block->size_and_flag = size | flag;
200d49c: 84 10 80 03 or %g2, %g3, %g2
200d4a0: c4 20 60 04 st %g2, [ %g1 + 4 ]
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
200d4a4: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200d4a8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
200d4ac: a2 10 20 01 mov 1, %l1
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200d4b0: a4 20 80 12 sub %g2, %l2, %l2
/* Statistics */
stats->size += extended_size;
200d4b4: 82 00 40 12 add %g1, %l2, %g1
if ( extended_size_ptr != NULL )
200d4b8: 80 a6 e0 00 cmp %i3, 0
200d4bc: 02 bf ff 7c be 200d2ac <_Heap_Extend+0x2c> <== NEVER TAKEN
200d4c0: c2 26 20 2c st %g1, [ %i0 + 0x2c ]
*extended_size_ptr = extended_size;
200d4c4: e4 26 c0 00 st %l2, [ %i3 ]
return true;
}
200d4c8: b0 0c 60 01 and %l1, 1, %i0
200d4cc: 81 c7 e0 08 ret
200d4d0: 81 e8 00 00 restore
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200d4d4: 10 bf ff 9c b 200d344 <_Heap_Extend+0xc4>
200d4d8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
200d4dc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d4e0: 80 a0 40 02 cmp %g1, %g2
200d4e4: 2a bf ff be bcs,a 200d3dc <_Heap_Extend+0x15c>
200d4e8: c4 26 20 24 st %g2, [ %i0 + 0x24 ]
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200d4ec: 10 bf ff bd b 200d3e0 <_Heap_Extend+0x160>
200d4f0: 80 a5 20 00 cmp %l4, 0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
200d4f4: 80 a7 40 01 cmp %i5, %g1
200d4f8: 38 bf ff ad bgu,a 200d3ac <_Heap_Extend+0x12c>
200d4fc: fa 26 20 1c st %i5, [ %i0 + 0x1c ]
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200d500: 10 bf ff ac b 200d3b0 <_Heap_Extend+0x130>
200d504: c2 07 bf f8 ld [ %fp + -8 ], %g1
(uintptr_t) start_block : heap->area_begin;
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200d508: 80 a6 40 1a cmp %i1, %i2
200d50c: 1a bf ff 92 bcc 200d354 <_Heap_Extend+0xd4>
200d510: 80 a0 40 1d cmp %g1, %i5
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
200d514: 10 bf ff 66 b 200d2ac <_Heap_Extend+0x2c>
200d518: a2 10 20 00 clr %l1
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
200d51c: 80 a5 60 00 cmp %l5, 0
200d520: 02 bf ff d7 be 200d47c <_Heap_Extend+0x1fc>
200d524: c4 07 bf f8 ld [ %fp + -8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d528: c6 05 60 04 ld [ %l5 + 4 ], %g3
_Heap_Link_above(
200d52c: c2 07 bf fc ld [ %fp + -4 ], %g1
200d530: 86 08 e0 01 and %g3, 1, %g3
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
200d534: 84 20 80 15 sub %g2, %l5, %g2
block->size_and_flag = size | flag;
200d538: 84 10 c0 02 or %g3, %g2, %g2
200d53c: c4 25 60 04 st %g2, [ %l5 + 4 ]
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
200d540: c4 00 60 04 ld [ %g1 + 4 ], %g2
200d544: 84 10 a0 01 or %g2, 1, %g2
200d548: 10 bf ff cd b 200d47c <_Heap_Extend+0x1fc>
200d54c: c4 20 60 04 st %g2, [ %g1 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200d550: 32 bf ff cf bne,a 200d48c <_Heap_Extend+0x20c>
200d554: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
_Heap_Free_block( heap, extend_first_block );
200d558: d2 07 bf f8 ld [ %fp + -8 ], %o1
200d55c: 7f ff ff 3f call 200d258 <_Heap_Free_block>
200d560: 90 10 00 18 mov %i0, %o0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
200d564: 10 bf ff ca b 200d48c <_Heap_Extend+0x20c>
200d568: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
200d56c: 80 a5 a0 00 cmp %l6, 0
200d570: 02 bf ff b0 be 200d430 <_Heap_Extend+0x1b0>
200d574: 80 a4 e0 00 cmp %l3, 0
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
200d578: ac 25 80 02 sub %l6, %g2, %l6
200d57c: ac 15 a0 01 or %l6, 1, %l6
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
200d580: 10 bf ff ac b 200d430 <_Heap_Extend+0x1b0>
200d584: ec 20 a0 04 st %l6, [ %g2 + 4 ]
0200d6a4 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200d6a4: 9d e3 bf a0 save %sp, -96, %sp
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
200d6a8: 80 a6 60 00 cmp %i1, 0
200d6ac: 02 80 00 56 be 200d804 <_Heap_Free+0x160>
200d6b0: 84 10 20 01 mov 1, %g2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d6b4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200d6b8: 40 00 2d 2b call 2018b64 <.urem>
200d6bc: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
200d6c0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d6c4: ba 06 7f f8 add %i1, -8, %i5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200d6c8: ba 27 40 08 sub %i5, %o0, %i5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200d6cc: 80 a7 40 01 cmp %i5, %g1
200d6d0: 0a 80 00 4d bcs 200d804 <_Heap_Free+0x160>
200d6d4: 84 10 20 00 clr %g2
200d6d8: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200d6dc: 80 a7 40 04 cmp %i5, %g4
200d6e0: 38 80 00 4a bgu,a 200d808 <_Heap_Free+0x164>
200d6e4: b0 08 a0 01 and %g2, 1, %i0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200d6e8: de 07 60 04 ld [ %i5 + 4 ], %o7
- 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;
200d6ec: b2 0b ff fe and %o7, -2, %i1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d6f0: 86 06 40 1d add %i1, %i5, %g3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200d6f4: 80 a0 40 03 cmp %g1, %g3
200d6f8: 38 80 00 44 bgu,a 200d808 <_Heap_Free+0x164> <== NEVER TAKEN
200d6fc: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
200d700: 80 a1 00 03 cmp %g4, %g3
200d704: 2a 80 00 41 bcs,a 200d808 <_Heap_Free+0x164> <== NEVER TAKEN
200d708: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
200d70c: da 00 e0 04 ld [ %g3 + 4 ], %o5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
200d710: 80 8b 60 01 btst 1, %o5
200d714: 02 80 00 3c be 200d804 <_Heap_Free+0x160>
200d718: 98 0b 7f fe and %o5, -2, %o4
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
200d71c: 80 a1 00 03 cmp %g4, %g3
200d720: 02 80 00 06 be 200d738 <_Heap_Free+0x94>
200d724: 9a 10 20 00 clr %o5
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200d728: 84 00 c0 0c add %g3, %o4, %g2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d72c: da 00 a0 04 ld [ %g2 + 4 ], %o5
200d730: 9a 0b 60 01 and %o5, 1, %o5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
200d734: 9a 1b 60 01 xor %o5, 1, %o5
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
200d738: 80 8b e0 01 btst 1, %o7
200d73c: 12 80 00 1c bne 200d7ac <_Heap_Free+0x108>
200d740: 80 8b 60 ff btst 0xff, %o5
uintptr_t const prev_size = block->prev_size;
200d744: d6 07 40 00 ld [ %i5 ], %o3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d748: 9e 27 40 0b sub %i5, %o3, %o7
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200d74c: 80 a0 40 0f cmp %g1, %o7
200d750: 18 80 00 2d bgu 200d804 <_Heap_Free+0x160> <== NEVER TAKEN
200d754: 84 10 20 00 clr %g2
200d758: 80 a1 00 0f cmp %g4, %o7
200d75c: 2a 80 00 2b bcs,a 200d808 <_Heap_Free+0x164> <== NEVER TAKEN
200d760: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d764: c2 03 e0 04 ld [ %o7 + 4 ], %g1
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
200d768: 80 88 60 01 btst 1, %g1
200d76c: 02 80 00 26 be 200d804 <_Heap_Free+0x160> <== NEVER TAKEN
200d770: 80 8b 60 ff btst 0xff, %o5
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200d774: 02 80 00 39 be 200d858 <_Heap_Free+0x1b4>
200d778: 96 06 40 0b add %i1, %o3, %o3
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200d77c: c2 00 e0 08 ld [ %g3 + 8 ], %g1
200d780: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
}
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;
200d784: c6 06 20 38 ld [ %i0 + 0x38 ], %g3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
200d788: c2 20 a0 08 st %g1, [ %g2 + 8 ]
next->prev = prev;
200d78c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200d790: 82 00 ff ff add %g3, -1, %g1
200d794: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
200d798: 98 02 c0 0c add %o3, %o4, %o4
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d79c: 82 13 20 01 or %o4, 1, %g1
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200d7a0: d8 23 00 0f st %o4, [ %o4 + %o7 ]
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;
200d7a4: 10 80 00 0e b 200d7dc <_Heap_Free+0x138>
200d7a8: c2 23 e0 04 st %g1, [ %o7 + 4 ]
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
200d7ac: 22 80 00 19 be,a 200d810 <_Heap_Free+0x16c>
200d7b0: c4 06 20 08 ld [ %i0 + 8 ], %g2
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200d7b4: c4 00 e0 08 ld [ %g3 + 8 ], %g2
200d7b8: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
200d7bc: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = prev;
200d7c0: c2 27 60 0c st %g1, [ %i5 + 0xc ]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
200d7c4: 98 03 00 19 add %o4, %i1, %o4
next->prev = new_block;
200d7c8: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
prev->next = new_block;
200d7cc: fa 20 60 08 st %i5, [ %g1 + 8 ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d7d0: 84 13 20 01 or %o4, 1, %g2
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200d7d4: d8 23 00 1d st %o4, [ %o4 + %i5 ]
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;
200d7d8: c4 27 60 04 st %g2, [ %i5 + 4 ]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200d7dc: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
200d7e0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
200d7e4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200d7e8: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
200d7ec: 82 00 60 01 inc %g1
stats->free_size += block_size;
200d7f0: b2 00 c0 19 add %g3, %i1, %i1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200d7f4: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
200d7f8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
200d7fc: f2 26 20 30 st %i1, [ %i0 + 0x30 ]
return( true );
200d800: 84 10 20 01 mov 1, %g2
}
200d804: b0 08 a0 01 and %g2, 1, %i0
200d808: 81 c7 e0 08 ret
200d80c: 81 e8 00 00 restore
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
200d810: 82 16 60 01 or %i1, 1, %g1
200d814: c2 27 60 04 st %g1, [ %i5 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d818: c8 00 e0 04 ld [ %g3 + 4 ], %g4
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
200d81c: f0 27 60 0c st %i0, [ %i5 + 0xc ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200d820: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
200d824: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
200d828: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d82c: 84 09 3f fe and %g4, -2, %g2
next_block->prev_size = block_size;
200d830: f2 26 40 1d st %i1, [ %i1 + %i5 ]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d834: c4 20 e0 04 st %g2, [ %g3 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
200d838: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200d83c: 82 00 60 01 inc %g1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
200d840: fa 26 20 08 st %i5, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
200d844: 80 a0 40 02 cmp %g1, %g2
200d848: 08 bf ff e5 bleu 200d7dc <_Heap_Free+0x138>
200d84c: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200d850: 10 bf ff e3 b 200d7dc <_Heap_Free+0x138>
200d854: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d858: 82 12 e0 01 or %o3, 1, %g1
200d85c: c2 23 e0 04 st %g1, [ %o7 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d860: c2 00 e0 04 ld [ %g3 + 4 ], %g1
next_block->prev_size = size;
200d864: d6 26 40 1d st %o3, [ %i1 + %i5 ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d868: 82 08 7f fe and %g1, -2, %g1
200d86c: 10 bf ff dc b 200d7dc <_Heap_Free+0x138>
200d870: c2 20 e0 04 st %g1, [ %g3 + 4 ]
0200dd8c <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
200dd8c: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *the_block = the_heap->first_block;
200dd90: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
Heap_Block *const end = the_heap->last_block;
200dd94: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
memset(the_info, 0, sizeof(*the_info));
200dd98: 92 10 20 00 clr %o1
200dd9c: 90 10 00 19 mov %i1, %o0
200dda0: 40 00 0a 9b call 201080c <memset>
200dda4: 94 10 20 18 mov 0x18, %o2
while ( the_block != end ) {
200dda8: 80 a7 40 1c cmp %i5, %i4
200ddac: 02 80 00 17 be 200de08 <_Heap_Get_information+0x7c> <== NEVER TAKEN
200ddb0: 01 00 00 00 nop
200ddb4: c6 07 60 04 ld [ %i5 + 4 ], %g3
- 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;
200ddb8: 84 08 ff fe and %g3, -2, %g2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200ddbc: ba 07 40 02 add %i5, %g2, %i5
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
200ddc0: c6 07 60 04 ld [ %i5 + 4 ], %g3
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
200ddc4: 80 88 e0 01 btst 1, %g3
200ddc8: 02 80 00 03 be 200ddd4 <_Heap_Get_information+0x48>
200ddcc: 82 10 00 19 mov %i1, %g1
info = &the_info->Used;
200ddd0: 82 06 60 0c add %i1, 0xc, %g1
else
info = &the_info->Free;
info->number++;
200ddd4: de 00 40 00 ld [ %g1 ], %o7
info->total += the_size;
200ddd8: f0 00 60 08 ld [ %g1 + 8 ], %i0
if ( info->largest < the_size )
200dddc: c8 00 60 04 ld [ %g1 + 4 ], %g4
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
200dde0: 9e 03 e0 01 inc %o7
info->total += the_size;
200dde4: b0 06 00 02 add %i0, %g2, %i0
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
200dde8: de 20 40 00 st %o7, [ %g1 ]
info->total += the_size;
if ( info->largest < the_size )
200ddec: 80 a1 00 02 cmp %g4, %g2
200ddf0: 1a 80 00 03 bcc 200ddfc <_Heap_Get_information+0x70>
200ddf4: f0 20 60 08 st %i0, [ %g1 + 8 ]
info->largest = the_size;
200ddf8: c4 20 60 04 st %g2, [ %g1 + 4 ]
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
200ddfc: 80 a7 00 1d cmp %i4, %i5
200de00: 12 bf ff ef bne 200ddbc <_Heap_Get_information+0x30>
200de04: 84 08 ff fe and %g3, -2, %g2
200de08: 81 c7 e0 08 ret
200de0c: 81 e8 00 00 restore
0201ac14 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
201ac14: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
201ac18: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
201ac1c: 7f ff f7 d2 call 2018b64 <.urem>
201ac20: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
201ac24: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
201ac28: 84 06 7f f8 add %i1, -8, %g2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
201ac2c: 84 20 80 08 sub %g2, %o0, %g2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
201ac30: 80 a0 80 01 cmp %g2, %g1
201ac34: 0a 80 00 16 bcs 201ac8c <_Heap_Size_of_alloc_area+0x78>
201ac38: 86 10 20 00 clr %g3
201ac3c: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
201ac40: 80 a0 80 04 cmp %g2, %g4
201ac44: 18 80 00 13 bgu 201ac90 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
201ac48: b0 08 e0 01 and %g3, 1, %i0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
201ac4c: f0 00 a0 04 ld [ %g2 + 4 ], %i0
201ac50: b0 0e 3f fe and %i0, -2, %i0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
201ac54: 84 06 00 02 add %i0, %g2, %g2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
201ac58: 80 a0 40 02 cmp %g1, %g2
201ac5c: 18 80 00 0d bgu 201ac90 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
201ac60: b0 08 e0 01 and %g3, 1, %i0
201ac64: 80 a1 00 02 cmp %g4, %g2
201ac68: 0a 80 00 0a bcs 201ac90 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
201ac6c: 01 00 00 00 nop
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
201ac70: c2 00 a0 04 ld [ %g2 + 4 ], %g1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
201ac74: 80 88 60 01 btst 1, %g1
201ac78: 02 80 00 06 be 201ac90 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
201ac7c: 84 20 80 19 sub %g2, %i1, %g2
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
201ac80: 86 10 20 01 mov 1, %g3
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
201ac84: 84 00 a0 04 add %g2, 4, %g2
201ac88: c4 26 80 00 st %g2, [ %i2 ]
return true;
}
201ac8c: b0 08 e0 01 and %g3, 1, %i0
201ac90: 81 c7 e0 08 ret
201ac94: 81 e8 00 00 restore
02008768 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
2008768: 9d e3 bf 80 save %sp, -128, %sp
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
200876c: 3b 00 80 21 sethi %hi(0x2008400), %i5
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
2008770: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
2008774: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
2008778: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *const last_block = heap->last_block;
200877c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
2008780: 80 a6 a0 00 cmp %i2, 0
2008784: 02 80 00 04 be 2008794 <_Heap_Walk+0x2c>
2008788: ba 17 62 fc or %i5, 0x2fc, %i5
200878c: 3b 00 80 21 sethi %hi(0x2008400), %i5
2008790: ba 17 63 04 or %i5, 0x304, %i5 ! 2008704 <_Heap_Walk_print>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
2008794: 03 00 80 65 sethi %hi(0x2019400), %g1
2008798: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 20195c4 <_System_state_Current>
200879c: 80 a0 a0 03 cmp %g2, 3
20087a0: 02 80 00 05 be 20087b4 <_Heap_Walk+0x4c>
20087a4: 82 10 20 01 mov 1, %g1
block = next_block;
} while ( block != first_block );
return true;
}
20087a8: b0 08 60 01 and %g1, 1, %i0
20087ac: 81 c7 e0 08 ret
20087b0: 81 e8 00 00 restore
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
20087b4: da 06 20 18 ld [ %i0 + 0x18 ], %o5
20087b8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
20087bc: c4 06 20 08 ld [ %i0 + 8 ], %g2
20087c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
20087c4: 90 10 00 19 mov %i1, %o0
20087c8: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
20087cc: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
20087d0: e2 23 a0 64 st %l1, [ %sp + 0x64 ]
20087d4: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
20087d8: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
20087dc: 92 10 20 00 clr %o1
20087e0: 96 10 00 10 mov %l0, %o3
20087e4: 15 00 80 5a sethi %hi(0x2016800), %o2
20087e8: 98 10 00 1b mov %i3, %o4
20087ec: 9f c7 40 00 call %i5
20087f0: 94 12 a1 30 or %o2, 0x130, %o2
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
20087f4: 80 a4 20 00 cmp %l0, 0
20087f8: 02 80 00 28 be 2008898 <_Heap_Walk+0x130>
20087fc: 80 8c 20 07 btst 7, %l0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
2008800: 12 80 00 2d bne 20088b4 <_Heap_Walk+0x14c>
2008804: 90 10 00 1b mov %i3, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2008808: 7f ff e4 b1 call 2001acc <.urem>
200880c: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
2008810: 80 a2 20 00 cmp %o0, 0
2008814: 12 80 00 30 bne 20088d4 <_Heap_Walk+0x16c>
2008818: 90 07 20 08 add %i4, 8, %o0
200881c: 7f ff e4 ac call 2001acc <.urem>
2008820: 92 10 00 10 mov %l0, %o1
);
return false;
}
if (
2008824: 80 a2 20 00 cmp %o0, 0
2008828: 32 80 00 33 bne,a 20088f4 <_Heap_Walk+0x18c>
200882c: 90 10 00 19 mov %i1, %o0
block = next_block;
} while ( block != first_block );
return true;
}
2008830: e8 07 20 04 ld [ %i4 + 4 ], %l4
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
2008834: 80 8d 20 01 btst 1, %l4
2008838: 22 80 00 36 be,a 2008910 <_Heap_Walk+0x1a8>
200883c: 90 10 00 19 mov %i1, %o0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2008840: c2 04 60 04 ld [ %l1 + 4 ], %g1
2008844: 82 08 7f fe and %g1, -2, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2008848: 82 04 40 01 add %l1, %g1, %g1
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200884c: c4 00 60 04 ld [ %g1 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
2008850: 80 88 a0 01 btst 1, %g2
2008854: 02 80 00 0a be 200887c <_Heap_Walk+0x114>
2008858: 80 a7 00 01 cmp %i4, %g1
);
return false;
}
if (
200885c: 02 80 00 33 be 2008928 <_Heap_Walk+0x1c0>
2008860: 90 10 00 19 mov %i1, %o0
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
2008864: 92 10 20 01 mov 1, %o1
2008868: 15 00 80 5a sethi %hi(0x2016800), %o2
200886c: 9f c7 40 00 call %i5
2008870: 94 12 a2 a8 or %o2, 0x2a8, %o2 ! 2016aa8 <_Status_Object_name_errors_to_status+0x1f0>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008874: 10 bf ff cd b 20087a8 <_Heap_Walk+0x40>
2008878: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
200887c: 90 10 00 19 mov %i1, %o0
2008880: 92 10 20 01 mov 1, %o1
2008884: 15 00 80 5a sethi %hi(0x2016800), %o2
2008888: 9f c7 40 00 call %i5
200888c: 94 12 a2 90 or %o2, 0x290, %o2 ! 2016a90 <_Status_Object_name_errors_to_status+0x1d8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008890: 10 bf ff c6 b 20087a8 <_Heap_Walk+0x40>
2008894: 82 10 20 00 clr %g1
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
2008898: 90 10 00 19 mov %i1, %o0
200889c: 92 10 20 01 mov 1, %o1
20088a0: 15 00 80 5a sethi %hi(0x2016800), %o2
20088a4: 9f c7 40 00 call %i5
20088a8: 94 12 a1 c8 or %o2, 0x1c8, %o2 ! 20169c8 <_Status_Object_name_errors_to_status+0x110>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
20088ac: 10 bf ff bf b 20087a8 <_Heap_Walk+0x40>
20088b0: 82 10 20 00 clr %g1
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
20088b4: 90 10 00 19 mov %i1, %o0
20088b8: 92 10 20 01 mov 1, %o1
20088bc: 96 10 00 10 mov %l0, %o3
20088c0: 15 00 80 5a sethi %hi(0x2016800), %o2
20088c4: 9f c7 40 00 call %i5
20088c8: 94 12 a1 e0 or %o2, 0x1e0, %o2 ! 20169e0 <_Status_Object_name_errors_to_status+0x128>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
20088cc: 10 bf ff b7 b 20087a8 <_Heap_Walk+0x40>
20088d0: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
20088d4: 90 10 00 19 mov %i1, %o0
20088d8: 92 10 20 01 mov 1, %o1
20088dc: 96 10 00 1b mov %i3, %o3
20088e0: 15 00 80 5a sethi %hi(0x2016800), %o2
20088e4: 9f c7 40 00 call %i5
20088e8: 94 12 a2 00 or %o2, 0x200, %o2 ! 2016a00 <_Status_Object_name_errors_to_status+0x148>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
20088ec: 10 bf ff af b 20087a8 <_Heap_Walk+0x40>
20088f0: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
20088f4: 92 10 20 01 mov 1, %o1
20088f8: 96 10 00 1c mov %i4, %o3
20088fc: 15 00 80 5a sethi %hi(0x2016800), %o2
2008900: 9f c7 40 00 call %i5
2008904: 94 12 a2 28 or %o2, 0x228, %o2 ! 2016a28 <_Status_Object_name_errors_to_status+0x170>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008908: 10 bf ff a8 b 20087a8 <_Heap_Walk+0x40>
200890c: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
2008910: 92 10 20 01 mov 1, %o1
2008914: 15 00 80 5a sethi %hi(0x2016800), %o2
2008918: 9f c7 40 00 call %i5
200891c: 94 12 a2 60 or %o2, 0x260, %o2 ! 2016a60 <_Status_Object_name_errors_to_status+0x1a8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008920: 10 bf ff a2 b 20087a8 <_Heap_Walk+0x40>
2008924: 82 10 20 00 clr %g1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
2008928: f4 06 20 08 ld [ %i0 + 8 ], %i2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
200892c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
2008930: 80 a6 00 1a cmp %i0, %i2
2008934: 02 80 00 0d be 2008968 <_Heap_Walk+0x200>
2008938: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200893c: 80 a0 40 1a cmp %g1, %i2
2008940: 28 80 00 bc bleu,a 2008c30 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN
2008944: e6 06 20 24 ld [ %i0 + 0x24 ], %l3
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
2008948: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200894c: 92 10 20 01 mov 1, %o1
2008950: 96 10 00 1a mov %i2, %o3
2008954: 15 00 80 5a sethi %hi(0x2016800), %o2
2008958: 9f c7 40 00 call %i5
200895c: 94 12 a2 d8 or %o2, 0x2d8, %o2 ! 2016ad8 <_Status_Object_name_errors_to_status+0x220>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008960: 10 bf ff 92 b 20087a8 <_Heap_Walk+0x40>
2008964: 82 10 20 00 clr %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
2008968: 2d 00 80 5b sethi %hi(0x2016c00), %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
200896c: 2f 00 80 5b sethi %hi(0x2016c00), %l7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2008970: a4 10 00 1c mov %i4, %l2
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
2008974: ac 15 a1 08 or %l6, 0x108, %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
2008978: ae 15 e0 f0 or %l7, 0xf0, %l7
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200897c: 2b 00 80 5b sethi %hi(0x2016c00), %l5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2008980: a6 0d 3f fe and %l4, -2, %l3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2008984: b4 04 c0 12 add %l3, %l2, %i2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2008988: 80 a0 40 1a cmp %g1, %i2
200898c: 28 80 00 0b bleu,a 20089b8 <_Heap_Walk+0x250> <== ALWAYS TAKEN
2008990: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
2008994: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2008998: 92 10 20 01 mov 1, %o1
200899c: 96 10 00 12 mov %l2, %o3
20089a0: 15 00 80 5a sethi %hi(0x2016800), %o2
20089a4: 98 10 00 1a mov %i2, %o4
20089a8: 9f c7 40 00 call %i5
20089ac: 94 12 a3 80 or %o2, 0x380, %o2
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
20089b0: 10 bf ff 7e b 20087a8 <_Heap_Walk+0x40>
20089b4: 82 10 20 00 clr %g1
20089b8: 80 a0 40 1a cmp %g1, %i2
20089bc: 0a bf ff f7 bcs 2008998 <_Heap_Walk+0x230>
20089c0: 90 10 00 19 mov %i1, %o0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
20089c4: 82 1c 80 11 xor %l2, %l1, %g1
20089c8: 80 a0 00 01 cmp %g0, %g1
20089cc: 82 40 20 00 addx %g0, 0, %g1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
20089d0: 90 10 00 13 mov %l3, %o0
20089d4: c2 27 bf fc st %g1, [ %fp + -4 ]
20089d8: 7f ff e4 3d call 2001acc <.urem>
20089dc: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
20089e0: 80 a2 20 00 cmp %o0, 0
20089e4: 02 80 00 05 be 20089f8 <_Heap_Walk+0x290>
20089e8: c2 07 bf fc ld [ %fp + -4 ], %g1
20089ec: 80 88 60 ff btst 0xff, %g1
20089f0: 12 80 00 76 bne 2008bc8 <_Heap_Walk+0x460>
20089f4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
20089f8: 80 a6 c0 13 cmp %i3, %l3
20089fc: 08 80 00 05 bleu 2008a10 <_Heap_Walk+0x2a8>
2008a00: 80 a4 80 1a cmp %l2, %i2
2008a04: 80 88 60 ff btst 0xff, %g1
2008a08: 12 80 00 78 bne 2008be8 <_Heap_Walk+0x480> <== ALWAYS TAKEN
2008a0c: 80 a4 80 1a cmp %l2, %i2
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
2008a10: 2a 80 00 06 bcs,a 2008a28 <_Heap_Walk+0x2c0>
2008a14: c2 06 a0 04 ld [ %i2 + 4 ], %g1
2008a18: 80 88 60 ff btst 0xff, %g1
2008a1c: 12 80 00 7d bne 2008c10 <_Heap_Walk+0x4a8>
2008a20: 90 10 00 19 mov %i1, %o0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2008a24: c2 06 a0 04 ld [ %i2 + 4 ], %g1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
2008a28: 80 88 60 01 btst 1, %g1
2008a2c: 02 80 00 19 be 2008a90 <_Heap_Walk+0x328>
2008a30: a8 0d 20 01 and %l4, 1, %l4
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
2008a34: 80 a5 20 00 cmp %l4, 0
2008a38: 22 80 00 0e be,a 2008a70 <_Heap_Walk+0x308>
2008a3c: da 04 80 00 ld [ %l2 ], %o5
(*printer)(
2008a40: 90 10 00 19 mov %i1, %o0
2008a44: 92 10 20 00 clr %o1
2008a48: 94 10 00 17 mov %l7, %o2
2008a4c: 96 10 00 12 mov %l2, %o3
2008a50: 9f c7 40 00 call %i5
2008a54: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
2008a58: 80 a7 00 1a cmp %i4, %i2
2008a5c: 02 80 00 42 be 2008b64 <_Heap_Walk+0x3fc>
2008a60: a4 10 00 1a mov %i2, %l2
2008a64: e8 06 a0 04 ld [ %i2 + 4 ], %l4
2008a68: 10 bf ff c6 b 2008980 <_Heap_Walk+0x218>
2008a6c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
2008a70: 96 10 00 12 mov %l2, %o3
2008a74: 90 10 00 19 mov %i1, %o0
2008a78: 92 10 20 00 clr %o1
2008a7c: 94 10 00 16 mov %l6, %o2
2008a80: 9f c7 40 00 call %i5
2008a84: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
2008a88: 10 bf ff f5 b 2008a5c <_Heap_Walk+0x2f4>
2008a8c: 80 a7 00 1a cmp %i4, %i2
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
2008a90: da 04 a0 0c ld [ %l2 + 0xc ], %o5
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2008a94: c2 06 20 08 ld [ %i0 + 8 ], %g1
2008a98: 05 00 80 5a sethi %hi(0x2016800), %g2
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
2008a9c: c8 06 20 0c ld [ %i0 + 0xc ], %g4
2008aa0: 80 a0 40 0d cmp %g1, %o5
2008aa4: 02 80 00 05 be 2008ab8 <_Heap_Walk+0x350>
2008aa8: 86 10 a0 f0 or %g2, 0xf0, %g3
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
2008aac: 80 a6 00 0d cmp %i0, %o5
2008ab0: 02 80 00 3c be 2008ba0 <_Heap_Walk+0x438>
2008ab4: 86 15 60 b8 or %l5, 0xb8, %g3
block->next,
block->next == last_free_block ?
2008ab8: c2 04 a0 08 ld [ %l2 + 8 ], %g1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2008abc: 1f 00 80 5a sethi %hi(0x2016800), %o7
2008ac0: 80 a1 00 01 cmp %g4, %g1
2008ac4: 02 80 00 05 be 2008ad8 <_Heap_Walk+0x370>
2008ac8: 84 13 e1 10 or %o7, 0x110, %g2
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
2008acc: 80 a6 00 01 cmp %i0, %g1
2008ad0: 02 80 00 31 be 2008b94 <_Heap_Walk+0x42c>
2008ad4: 84 15 60 b8 or %l5, 0xb8, %g2
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2008ad8: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2008adc: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
2008ae0: c4 23 a0 64 st %g2, [ %sp + 0x64 ]
2008ae4: 90 10 00 19 mov %i1, %o0
2008ae8: 92 10 20 00 clr %o1
2008aec: 15 00 80 5b sethi %hi(0x2016c00), %o2
2008af0: 96 10 00 12 mov %l2, %o3
2008af4: 94 12 a0 48 or %o2, 0x48, %o2
2008af8: 9f c7 40 00 call %i5
2008afc: 98 10 00 13 mov %l3, %o4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
2008b00: da 06 80 00 ld [ %i2 ], %o5
2008b04: 80 a4 c0 0d cmp %l3, %o5
2008b08: 12 80 00 19 bne 2008b6c <_Heap_Walk+0x404>
2008b0c: 80 a5 20 00 cmp %l4, 0
);
return false;
}
if ( !prev_used ) {
2008b10: 02 80 00 27 be 2008bac <_Heap_Walk+0x444>
2008b14: 90 10 00 19 mov %i1, %o0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
2008b18: c2 06 20 08 ld [ %i0 + 8 ], %g1
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
2008b1c: 80 a6 00 01 cmp %i0, %g1
2008b20: 02 80 00 0b be 2008b4c <_Heap_Walk+0x3e4> <== NEVER TAKEN
2008b24: 92 10 20 01 mov 1, %o1
if ( free_block == block ) {
2008b28: 80 a4 80 01 cmp %l2, %g1
2008b2c: 02 bf ff cc be 2008a5c <_Heap_Walk+0x2f4>
2008b30: 80 a7 00 1a cmp %i4, %i2
return true;
}
free_block = free_block->next;
2008b34: c2 00 60 08 ld [ %g1 + 8 ], %g1
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
2008b38: 80 a6 00 01 cmp %i0, %g1
2008b3c: 12 bf ff fc bne 2008b2c <_Heap_Walk+0x3c4>
2008b40: 80 a4 80 01 cmp %l2, %g1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
2008b44: 90 10 00 19 mov %i1, %o0
2008b48: 92 10 20 01 mov 1, %o1
2008b4c: 96 10 00 12 mov %l2, %o3
2008b50: 15 00 80 5b sethi %hi(0x2016c00), %o2
2008b54: 9f c7 40 00 call %i5
2008b58: 94 12 a1 30 or %o2, 0x130, %o2 ! 2016d30 <_Status_Object_name_errors_to_status+0x478>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
2008b5c: 10 bf ff 13 b 20087a8 <_Heap_Walk+0x40>
2008b60: 82 10 20 00 clr %g1
}
block = next_block;
} while ( block != first_block );
return true;
2008b64: 10 bf ff 11 b 20087a8 <_Heap_Walk+0x40>
2008b68: 82 10 20 01 mov 1, %g1
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
2008b6c: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
2008b70: 90 10 00 19 mov %i1, %o0
2008b74: 92 10 20 01 mov 1, %o1
2008b78: 96 10 00 12 mov %l2, %o3
2008b7c: 15 00 80 5b sethi %hi(0x2016c00), %o2
2008b80: 98 10 00 13 mov %l3, %o4
2008b84: 9f c7 40 00 call %i5
2008b88: 94 12 a0 80 or %o2, 0x80, %o2
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
2008b8c: 10 bf ff 07 b 20087a8 <_Heap_Walk+0x40>
2008b90: 82 10 20 00 clr %g1
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
2008b94: 05 00 80 5a sethi %hi(0x2016800), %g2
2008b98: 10 bf ff d0 b 2008ad8 <_Heap_Walk+0x370>
2008b9c: 84 10 a1 20 or %g2, 0x120, %g2 ! 2016920 <_Status_Object_name_errors_to_status+0x68>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
2008ba0: 07 00 80 5a sethi %hi(0x2016800), %g3
2008ba4: 10 bf ff c5 b 2008ab8 <_Heap_Walk+0x350>
2008ba8: 86 10 e1 00 or %g3, 0x100, %g3 ! 2016900 <_Status_Object_name_errors_to_status+0x48>
return false;
}
if ( !prev_used ) {
(*printer)(
2008bac: 92 10 20 01 mov 1, %o1
2008bb0: 96 10 00 12 mov %l2, %o3
2008bb4: 15 00 80 5b sethi %hi(0x2016c00), %o2
2008bb8: 9f c7 40 00 call %i5
2008bbc: 94 12 a0 c0 or %o2, 0xc0, %o2 ! 2016cc0 <_Status_Object_name_errors_to_status+0x408>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
2008bc0: 10 bf fe fa b 20087a8 <_Heap_Walk+0x40>
2008bc4: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
2008bc8: 92 10 20 01 mov 1, %o1
2008bcc: 96 10 00 12 mov %l2, %o3
2008bd0: 15 00 80 5a sethi %hi(0x2016800), %o2
2008bd4: 98 10 00 13 mov %l3, %o4
2008bd8: 9f c7 40 00 call %i5
2008bdc: 94 12 a3 b0 or %o2, 0x3b0, %o2
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
2008be0: 10 bf fe f2 b 20087a8 <_Heap_Walk+0x40>
2008be4: 82 10 20 00 clr %g1
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
2008be8: 90 10 00 19 mov %i1, %o0
2008bec: 92 10 20 01 mov 1, %o1
2008bf0: 96 10 00 12 mov %l2, %o3
2008bf4: 15 00 80 5a sethi %hi(0x2016800), %o2
2008bf8: 98 10 00 13 mov %l3, %o4
2008bfc: 94 12 a3 e0 or %o2, 0x3e0, %o2
2008c00: 9f c7 40 00 call %i5
2008c04: 9a 10 00 1b mov %i3, %o5
block,
block_size,
min_block_size
);
return false;
2008c08: 10 bf fe e8 b 20087a8 <_Heap_Walk+0x40>
2008c0c: 82 10 20 00 clr %g1
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
2008c10: 92 10 20 01 mov 1, %o1
2008c14: 96 10 00 12 mov %l2, %o3
2008c18: 15 00 80 5b sethi %hi(0x2016c00), %o2
2008c1c: 98 10 00 1a mov %i2, %o4
2008c20: 9f c7 40 00 call %i5
2008c24: 94 12 a0 10 or %o2, 0x10, %o2
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
2008c28: 10 bf fe e0 b 20087a8 <_Heap_Walk+0x40>
2008c2c: 82 10 20 00 clr %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2008c30: 80 a6 80 13 cmp %i2, %l3
2008c34: 18 bf ff 46 bgu 200894c <_Heap_Walk+0x1e4> <== NEVER TAKEN
2008c38: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2008c3c: c2 27 bf fc st %g1, [ %fp + -4 ]
2008c40: 90 06 a0 08 add %i2, 8, %o0
2008c44: 7f ff e3 a2 call 2001acc <.urem>
2008c48: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
2008c4c: 80 a2 20 00 cmp %o0, 0
2008c50: 12 80 00 36 bne 2008d28 <_Heap_Walk+0x5c0> <== NEVER TAKEN
2008c54: c2 07 bf fc ld [ %fp + -4 ], %g1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2008c58: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2008c5c: 84 08 bf fe and %g2, -2, %g2
block = next_block;
} while ( block != first_block );
return true;
}
2008c60: 84 06 80 02 add %i2, %g2, %g2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2008c64: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2008c68: 80 88 a0 01 btst 1, %g2
2008c6c: 12 80 00 27 bne 2008d08 <_Heap_Walk+0x5a0> <== NEVER TAKEN
2008c70: 84 10 00 18 mov %i0, %g2
2008c74: 10 80 00 19 b 2008cd8 <_Heap_Walk+0x570>
2008c78: a4 10 00 1a mov %i2, %l2
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
2008c7c: 80 a6 00 1a cmp %i0, %i2
2008c80: 02 bf ff 3a be 2008968 <_Heap_Walk+0x200>
2008c84: 80 a6 80 01 cmp %i2, %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2008c88: 0a bf ff 31 bcs 200894c <_Heap_Walk+0x1e4>
2008c8c: 90 10 00 19 mov %i1, %o0
2008c90: 80 a6 80 13 cmp %i2, %l3
2008c94: 18 bf ff 2f bgu 2008950 <_Heap_Walk+0x1e8> <== NEVER TAKEN
2008c98: 92 10 20 01 mov 1, %o1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2008c9c: c2 27 bf fc st %g1, [ %fp + -4 ]
2008ca0: 90 06 a0 08 add %i2, 8, %o0
2008ca4: 7f ff e3 8a call 2001acc <.urem>
2008ca8: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
2008cac: 80 a2 20 00 cmp %o0, 0
2008cb0: 12 80 00 1e bne 2008d28 <_Heap_Walk+0x5c0>
2008cb4: c2 07 bf fc ld [ %fp + -4 ], %g1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2008cb8: c6 06 a0 04 ld [ %i2 + 4 ], %g3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2008cbc: 84 10 00 12 mov %l2, %g2
2008cc0: 86 08 ff fe and %g3, -2, %g3
block = next_block;
} while ( block != first_block );
return true;
}
2008cc4: 86 06 80 03 add %i2, %g3, %g3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2008cc8: c6 00 e0 04 ld [ %g3 + 4 ], %g3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2008ccc: 80 88 e0 01 btst 1, %g3
2008cd0: 12 80 00 0e bne 2008d08 <_Heap_Walk+0x5a0>
2008cd4: a4 10 00 1a mov %i2, %l2
);
return false;
}
if ( free_block->prev != prev_block ) {
2008cd8: d8 06 a0 0c ld [ %i2 + 0xc ], %o4
2008cdc: 80 a3 00 02 cmp %o4, %g2
2008ce0: 22 bf ff e7 be,a 2008c7c <_Heap_Walk+0x514>
2008ce4: f4 06 a0 08 ld [ %i2 + 8 ], %i2
(*printer)(
2008ce8: 90 10 00 19 mov %i1, %o0
2008cec: 92 10 20 01 mov 1, %o1
2008cf0: 96 10 00 1a mov %i2, %o3
2008cf4: 15 00 80 5a sethi %hi(0x2016800), %o2
2008cf8: 9f c7 40 00 call %i5
2008cfc: 94 12 a3 48 or %o2, 0x348, %o2 ! 2016b48 <_Status_Object_name_errors_to_status+0x290>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008d00: 10 bf fe aa b 20087a8 <_Heap_Walk+0x40>
2008d04: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
2008d08: 90 10 00 19 mov %i1, %o0
2008d0c: 92 10 20 01 mov 1, %o1
2008d10: 96 10 00 1a mov %i2, %o3
2008d14: 15 00 80 5a sethi %hi(0x2016800), %o2
2008d18: 9f c7 40 00 call %i5
2008d1c: 94 12 a3 28 or %o2, 0x328, %o2 ! 2016b28 <_Status_Object_name_errors_to_status+0x270>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008d20: 10 bf fe a2 b 20087a8 <_Heap_Walk+0x40>
2008d24: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
2008d28: 90 10 00 19 mov %i1, %o0
2008d2c: 92 10 20 01 mov 1, %o1
2008d30: 96 10 00 1a mov %i2, %o3
2008d34: 15 00 80 5a sethi %hi(0x2016800), %o2
2008d38: 9f c7 40 00 call %i5
2008d3c: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 2016af8 <_Status_Object_name_errors_to_status+0x240>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2008d40: 10 bf fe 9a b 20087a8 <_Heap_Walk+0x40>
2008d44: 82 10 20 00 clr %g1
02007150 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
2007150: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2007154: 39 00 80 79 sethi %hi(0x201e400), %i4
2007158: c2 07 20 84 ld [ %i4 + 0x84 ], %g1 ! 201e484 <_IO_Number_of_drivers>
200715c: 80 a0 60 00 cmp %g1, 0
2007160: 02 80 00 0c be 2007190 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
2007164: ba 10 20 00 clr %i5
2007168: b8 17 20 84 or %i4, 0x84, %i4
(void) rtems_io_initialize( major, 0, NULL );
200716c: 90 10 00 1d mov %i5, %o0
2007170: 92 10 20 00 clr %o1
2007174: 40 00 18 1b call 200d1e0 <rtems_io_initialize>
2007178: 94 10 20 00 clr %o2
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
200717c: c2 07 00 00 ld [ %i4 ], %g1
2007180: ba 07 60 01 inc %i5
2007184: 80 a0 40 1d cmp %g1, %i5
2007188: 18 bf ff fa bgu 2007170 <_IO_Initialize_all_drivers+0x20>
200718c: 90 10 00 1d mov %i5, %o0
2007190: 81 c7 e0 08 ret
2007194: 81 e8 00 00 restore
02007084 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
2007084: 9d e3 bf a0 save %sp, -96, %sp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
2007088: 03 00 80 73 sethi %hi(0x201cc00), %g1
200708c: 82 10 61 8c or %g1, 0x18c, %g1 ! 201cd8c <Configuration>
drivers_in_table = Configuration.number_of_device_drivers;
2007090: f8 00 60 30 ld [ %g1 + 0x30 ], %i4
number_of_drivers = Configuration.maximum_drivers;
2007094: f2 00 60 2c ld [ %g1 + 0x2c ], %i1
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
2007098: 80 a7 00 19 cmp %i4, %i1
200709c: 0a 80 00 08 bcs 20070bc <_IO_Manager_initialization+0x38>
20070a0: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
20070a4: 03 00 80 79 sethi %hi(0x201e400), %g1
20070a8: fa 20 60 88 st %i5, [ %g1 + 0x88 ] ! 201e488 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
20070ac: 03 00 80 79 sethi %hi(0x201e400), %g1
20070b0: f8 20 60 84 st %i4, [ %g1 + 0x84 ] ! 201e484 <_IO_Number_of_drivers>
return;
20070b4: 81 c7 e0 08 ret
20070b8: 81 e8 00 00 restore
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
20070bc: 83 2e 60 03 sll %i1, 3, %g1
20070c0: b5 2e 60 05 sll %i1, 5, %i2
20070c4: b4 26 80 01 sub %i2, %g1, %i2
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
20070c8: 40 00 0d 74 call 200a698 <_Workspace_Allocate_or_fatal_error>
20070cc: 90 10 00 1a mov %i2, %o0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
20070d0: 03 00 80 79 sethi %hi(0x201e400), %g1
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
20070d4: 37 00 80 79 sethi %hi(0x201e400), %i3
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
20070d8: f2 20 60 84 st %i1, [ %g1 + 0x84 ]
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
20070dc: d0 26 e0 88 st %o0, [ %i3 + 0x88 ]
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
20070e0: 92 10 20 00 clr %o1
20070e4: 40 00 25 12 call 201052c <memset>
20070e8: 94 10 00 1a mov %i2, %o2
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20070ec: 80 a7 20 00 cmp %i4, 0
20070f0: 02 bf ff f1 be 20070b4 <_IO_Manager_initialization+0x30> <== NEVER TAKEN
20070f4: f6 06 e0 88 ld [ %i3 + 0x88 ], %i3
20070f8: 82 10 20 00 clr %g1
20070fc: 88 10 20 00 clr %g4
_IO_Driver_address_table[index] = driver_table[index];
2007100: c4 07 40 01 ld [ %i5 + %g1 ], %g2
2007104: 86 07 40 01 add %i5, %g1, %g3
2007108: c4 26 c0 01 st %g2, [ %i3 + %g1 ]
200710c: f4 00 e0 04 ld [ %g3 + 4 ], %i2
2007110: 84 06 c0 01 add %i3, %g1, %g2
2007114: f4 20 a0 04 st %i2, [ %g2 + 4 ]
2007118: f4 00 e0 08 ld [ %g3 + 8 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
200711c: 88 01 20 01 inc %g4
_IO_Driver_address_table[index] = driver_table[index];
2007120: f4 20 a0 08 st %i2, [ %g2 + 8 ]
2007124: f4 00 e0 0c ld [ %g3 + 0xc ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007128: 82 00 60 18 add %g1, 0x18, %g1
_IO_Driver_address_table[index] = driver_table[index];
200712c: f4 20 a0 0c st %i2, [ %g2 + 0xc ]
2007130: f4 00 e0 10 ld [ %g3 + 0x10 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007134: 80 a1 00 1c cmp %g4, %i4
_IO_Driver_address_table[index] = driver_table[index];
2007138: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
200713c: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007140: 12 bf ff f0 bne 2007100 <_IO_Manager_initialization+0x7c>
2007144: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
2007148: 81 c7 e0 08 ret
200714c: 81 e8 00 00 restore
02007ec8 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2007ec8: 9d e3 bf a0 save %sp, -96, %sp
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
2007ecc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2007ed0: ba 10 00 18 mov %i0, %i5
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
2007ed4: 80 a0 60 00 cmp %g1, 0
2007ed8: 02 80 00 19 be 2007f3c <_Objects_Allocate+0x74> <== NEVER TAKEN
2007edc: b0 10 20 00 clr %i0
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2007ee0: b8 07 60 20 add %i5, 0x20, %i4
2007ee4: 7f ff fd 5e call 200745c <_Chain_Get>
2007ee8: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
2007eec: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
2007ef0: 80 a0 60 00 cmp %g1, 0
2007ef4: 02 80 00 12 be 2007f3c <_Objects_Allocate+0x74>
2007ef8: b0 10 00 08 mov %o0, %i0
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
2007efc: 80 a2 20 00 cmp %o0, 0
2007f00: 02 80 00 11 be 2007f44 <_Objects_Allocate+0x7c>
2007f04: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
2007f08: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
2007f0c: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
2007f10: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
2007f14: 40 00 42 68 call 20188b4 <.udiv>
2007f18: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
2007f1c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2007f20: 91 2a 20 02 sll %o0, 2, %o0
2007f24: c6 00 40 08 ld [ %g1 + %o0 ], %g3
information->inactive--;
2007f28: c4 17 60 2c lduh [ %i5 + 0x2c ], %g2
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2007f2c: 86 00 ff ff add %g3, -1, %g3
2007f30: c6 20 40 08 st %g3, [ %g1 + %o0 ]
information->inactive--;
2007f34: 82 00 bf ff add %g2, -1, %g1
2007f38: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
2007f3c: 81 c7 e0 08 ret
2007f40: 81 e8 00 00 restore
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
2007f44: 40 00 00 10 call 2007f84 <_Objects_Extend_information>
2007f48: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2007f4c: 7f ff fd 44 call 200745c <_Chain_Get>
2007f50: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
2007f54: b0 92 20 00 orcc %o0, 0, %i0
2007f58: 32 bf ff ed bne,a 2007f0c <_Objects_Allocate+0x44>
2007f5c: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
);
}
#endif
return the_object;
}
2007f60: 81 c7 e0 08 ret
2007f64: 81 e8 00 00 restore
02007f84 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
2007f84: 9d e3 bf 90 save %sp, -112, %sp
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
2007f88: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2007f8c: f8 16 20 0a lduh [ %i0 + 0xa ], %i4
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
2007f90: 80 a4 20 00 cmp %l0, 0
2007f94: 02 80 00 a6 be 200822c <_Objects_Extend_information+0x2a8>
2007f98: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2007f9c: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2
2007fa0: b3 2e 60 10 sll %i1, 0x10, %i1
2007fa4: 92 10 00 1a mov %i2, %o1
2007fa8: 40 00 42 43 call 20188b4 <.udiv>
2007fac: 91 36 60 10 srl %i1, 0x10, %o0
2007fb0: a7 2a 20 10 sll %o0, 0x10, %l3
2007fb4: a7 34 e0 10 srl %l3, 0x10, %l3
for ( ; block < block_count; block++ ) {
2007fb8: 80 a4 e0 00 cmp %l3, 0
2007fbc: 02 80 00 a3 be 2008248 <_Objects_Extend_information+0x2c4><== NEVER TAKEN
2007fc0: 90 10 00 1a mov %i2, %o0
if ( information->object_blocks[ block ] == NULL ) {
2007fc4: c2 04 00 00 ld [ %l0 ], %g1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2007fc8: ba 10 00 1c mov %i4, %i5
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
2007fcc: 80 a0 60 00 cmp %g1, 0
2007fd0: 12 80 00 08 bne 2007ff0 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN
2007fd4: b6 10 20 00 clr %i3
do_extend = false;
2007fd8: 10 80 00 a0 b 2008258 <_Objects_Extend_information+0x2d4> <== NOT EXECUTED
2007fdc: b4 10 20 00 clr %i2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
2007fe0: c2 04 00 01 ld [ %l0 + %g1 ], %g1
2007fe4: 80 a0 60 00 cmp %g1, 0
2007fe8: 22 80 00 08 be,a 2008008 <_Objects_Extend_information+0x84>
2007fec: b4 10 20 00 clr %i2
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2007ff0: b6 06 e0 01 inc %i3
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
2007ff4: ba 07 40 1a add %i5, %i2, %i5
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2007ff8: 80 a4 c0 1b cmp %l3, %i3
2007ffc: 18 bf ff f9 bgu 2007fe0 <_Objects_Extend_information+0x5c>
2008000: 83 2e e0 02 sll %i3, 2, %g1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
2008004: b4 10 20 01 mov 1, %i2
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
2008008: b3 36 60 10 srl %i1, 0x10, %i1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
200800c: 03 00 00 3f sethi %hi(0xfc00), %g1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
2008010: b2 06 40 08 add %i1, %o0, %i1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
2008014: 82 10 63 ff or %g1, 0x3ff, %g1
2008018: 80 a6 40 01 cmp %i1, %g1
200801c: 18 80 00 93 bgu 2008268 <_Objects_Extend_information+0x2e4>
2008020: 01 00 00 00 nop
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
2008024: 40 00 41 ea call 20187cc <.umul>
2008028: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
200802c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2008030: 80 a0 60 00 cmp %g1, 0
2008034: 02 80 00 6a be 20081dc <_Objects_Extend_information+0x258>
2008038: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
200803c: 40 00 09 89 call 200a660 <_Workspace_Allocate>
2008040: 01 00 00 00 nop
if ( !new_object_block )
2008044: a0 92 20 00 orcc %o0, 0, %l0
2008048: 02 80 00 88 be 2008268 <_Objects_Extend_information+0x2e4>
200804c: 01 00 00 00 nop
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
2008050: 80 8e a0 ff btst 0xff, %i2
2008054: 22 80 00 3f be,a 2008150 <_Objects_Extend_information+0x1cc>
2008058: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
200805c: b4 04 e0 01 add %l3, 1, %i2
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2008060: 91 2e a0 01 sll %i2, 1, %o0
2008064: 90 02 00 1a add %o0, %i2, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
2008068: 90 06 40 08 add %i1, %o0, %o0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
200806c: 90 02 00 1c add %o0, %i4, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
2008070: 40 00 09 7c call 200a660 <_Workspace_Allocate>
2008074: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
2008078: a2 92 20 00 orcc %o0, 0, %l1
200807c: 02 80 00 79 be 2008260 <_Objects_Extend_information+0x2dc>
2008080: b5 2e a0 02 sll %i2, 2, %i2
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2008084: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2008088: 80 a7 00 01 cmp %i4, %g1
200808c: a4 04 40 1a add %l1, %i2, %l2
2008090: 0a 80 00 57 bcs 20081ec <_Objects_Extend_information+0x268>
2008094: b4 04 80 1a add %l2, %i2, %i2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2008098: 80 a7 20 00 cmp %i4, 0
200809c: 02 80 00 07 be 20080b8 <_Objects_Extend_information+0x134><== NEVER TAKEN
20080a0: 82 10 20 00 clr %g1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
20080a4: 85 28 60 02 sll %g1, 2, %g2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
20080a8: 82 00 60 01 inc %g1
20080ac: 80 a7 00 01 cmp %i4, %g1
20080b0: 18 bf ff fd bgu 20080a4 <_Objects_Extend_information+0x120><== NEVER TAKEN
20080b4: c0 20 80 1a clr [ %g2 + %i2 ]
20080b8: a7 2c e0 02 sll %l3, 2, %l3
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
20080bc: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
20080c0: c0 24 40 13 clr [ %l1 + %l3 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
20080c4: 86 07 40 03 add %i5, %g3, %g3
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
20080c8: 80 a7 40 03 cmp %i5, %g3
20080cc: 1a 80 00 0a bcc 20080f4 <_Objects_Extend_information+0x170><== NEVER TAKEN
20080d0: c0 24 80 13 clr [ %l2 + %l3 ]
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
20080d4: 83 2f 60 02 sll %i5, 2, %g1
20080d8: 84 10 00 1d mov %i5, %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
20080dc: 82 06 80 01 add %i2, %g1, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
20080e0: c0 20 40 00 clr [ %g1 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
20080e4: 84 00 a0 01 inc %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
20080e8: 80 a0 c0 02 cmp %g3, %g2
20080ec: 18 bf ff fd bgu 20080e0 <_Objects_Extend_information+0x15c>
20080f0: 82 00 60 04 add %g1, 4, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
20080f4: 7f ff e8 3c call 20021e4 <sparc_disable_interrupts>
20080f8: 01 00 00 00 nop
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20080fc: c6 06 00 00 ld [ %i0 ], %g3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
2008100: c4 16 20 04 lduh [ %i0 + 4 ], %g2
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
2008104: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
2008108: f2 36 20 10 sth %i1, [ %i0 + 0x10 ]
200810c: 87 28 e0 18 sll %g3, 0x18, %g3
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008110: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
2008114: e2 26 20 34 st %l1, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
2008118: e4 26 20 30 st %l2, [ %i0 + 0x30 ]
information->local_table = local_table;
200811c: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
2008120: b3 2e 60 10 sll %i1, 0x10, %i1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008124: 03 00 00 40 sethi %hi(0x10000), %g1
2008128: b3 36 60 10 srl %i1, 0x10, %i1
200812c: 82 10 c0 01 or %g3, %g1, %g1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008130: 82 10 40 02 or %g1, %g2, %g1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008134: 82 10 40 19 or %g1, %i1, %g1
2008138: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
200813c: 7f ff e8 2e call 20021f4 <sparc_enable_interrupts>
2008140: 01 00 00 00 nop
_Workspace_Free( old_tables );
2008144: 40 00 09 4f call 200a680 <_Workspace_Free>
2008148: 90 10 00 1c mov %i4, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
200814c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2008150: b7 2e e0 02 sll %i3, 2, %i3
2008154: e0 20 40 1b st %l0, [ %g1 + %i3 ]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2008158: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
200815c: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
2008160: d2 00 40 1b ld [ %g1 + %i3 ], %o1
2008164: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
2008168: 90 07 bf f4 add %fp, -12, %o0
200816c: 40 00 14 35 call 200d240 <_Chain_Initialize>
2008170: 39 00 00 40 sethi %hi(0x10000), %i4
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2008174: 10 80 00 0d b 20081a8 <_Objects_Extend_information+0x224>
2008178: b4 06 20 20 add %i0, 0x20, %i2
the_object->id = _Objects_Build_id(
200817c: c6 16 20 04 lduh [ %i0 + 4 ], %g3
2008180: 85 28 a0 18 sll %g2, 0x18, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008184: 87 28 e0 1b sll %g3, 0x1b, %g3
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008188: 84 10 80 1c or %g2, %i4, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
200818c: 84 10 80 03 or %g2, %g3, %g2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008190: 84 10 80 1d or %g2, %i5, %g2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2008194: 90 10 00 1a mov %i2, %o0
2008198: 92 10 00 01 mov %g1, %o1
index++;
200819c: ba 07 60 01 inc %i5
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
20081a0: 7f ff fc 9b call 200740c <_Chain_Append>
20081a4: c4 20 60 08 st %g2, [ %g1 + 8 ]
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
20081a8: 7f ff fc ad call 200745c <_Chain_Get>
20081ac: 90 07 bf f4 add %fp, -12, %o0
20081b0: 82 92 20 00 orcc %o0, 0, %g1
20081b4: 32 bf ff f2 bne,a 200817c <_Objects_Extend_information+0x1f8>
20081b8: c4 06 00 00 ld [ %i0 ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
20081bc: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
20081c0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
20081c4: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
20081c8: c8 20 c0 1b st %g4, [ %g3 + %i3 ]
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
20081cc: 82 00 80 04 add %g2, %g4, %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
20081d0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
20081d4: 81 c7 e0 08 ret
20081d8: 81 e8 00 00 restore
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
20081dc: 40 00 09 2f call 200a698 <_Workspace_Allocate_or_fatal_error>
20081e0: 01 00 00 00 nop
20081e4: 10 bf ff 9b b 2008050 <_Objects_Extend_information+0xcc>
20081e8: a0 10 00 08 mov %o0, %l0
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
20081ec: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
20081f0: a7 2c e0 02 sll %l3, 2, %l3
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
20081f4: 40 00 20 92 call 201043c <memcpy>
20081f8: 94 10 00 13 mov %l3, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
20081fc: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
2008200: 94 10 00 13 mov %l3, %o2
2008204: 40 00 20 8e call 201043c <memcpy>
2008208: 90 10 00 12 mov %l2, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
200820c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
2008210: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
2008214: b8 07 00 01 add %i4, %g1, %i4
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
2008218: 90 10 00 1a mov %i2, %o0
200821c: 40 00 20 88 call 201043c <memcpy>
2008220: 95 2f 20 02 sll %i4, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2008224: 10 bf ff a7 b 20080c0 <_Objects_Extend_information+0x13c>
2008228: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
200822c: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2008230: ba 10 00 1c mov %i4, %i5
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
2008234: b4 10 20 01 mov 1, %i2
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
2008238: b6 10 20 00 clr %i3
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
200823c: a6 10 20 00 clr %l3
2008240: 10 bf ff 72 b 2008008 <_Objects_Extend_information+0x84>
2008244: b3 2e 60 10 sll %i1, 0x10, %i1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2008248: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
200824c: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
2008250: 10 bf ff 6e b 2008008 <_Objects_Extend_information+0x84> <== NOT EXECUTED
2008254: b6 10 20 00 clr %i3 <== NOT EXECUTED
2008258: 10 bf ff 6c b 2008008 <_Objects_Extend_information+0x84> <== NOT EXECUTED
200825c: b6 10 20 00 clr %i3 <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
2008260: 40 00 09 08 call 200a680 <_Workspace_Free>
2008264: 90 10 00 10 mov %l0, %o0
return;
2008268: 81 c7 e0 08 ret
200826c: 81 e8 00 00 restore
02008314 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
2008314: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
2008318: 80 a6 60 00 cmp %i1, 0
200831c: 02 80 00 17 be 2008378 <_Objects_Get_information+0x64>
2008320: ba 10 20 00 clr %i5
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
2008324: 40 00 15 54 call 200d874 <_Objects_API_maximum_class>
2008328: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
200832c: 80 a2 20 00 cmp %o0, 0
2008330: 02 80 00 12 be 2008378 <_Objects_Get_information+0x64>
2008334: 80 a2 00 19 cmp %o0, %i1
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
2008338: 0a 80 00 10 bcs 2008378 <_Objects_Get_information+0x64>
200833c: 03 00 80 76 sethi %hi(0x201d800), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2008340: b1 2e 20 02 sll %i0, 2, %i0
2008344: 82 10 62 68 or %g1, 0x268, %g1
2008348: c2 00 40 18 ld [ %g1 + %i0 ], %g1
200834c: 80 a0 60 00 cmp %g1, 0
2008350: 02 80 00 0a be 2008378 <_Objects_Get_information+0x64> <== NEVER TAKEN
2008354: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
2008358: fa 00 40 19 ld [ %g1 + %i1 ], %i5
if ( !info )
200835c: 80 a7 60 00 cmp %i5, 0
2008360: 02 80 00 06 be 2008378 <_Objects_Get_information+0x64> <== NEVER TAKEN
2008364: 01 00 00 00 nop
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
2008368: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1
return NULL;
200836c: 80 a0 00 01 cmp %g0, %g1
2008370: 82 60 20 00 subx %g0, 0, %g1
2008374: ba 0f 40 01 and %i5, %g1, %i5
#endif
return info;
}
2008378: 81 c7 e0 08 ret
200837c: 91 e8 00 1d restore %g0, %i5, %o0
02009b58 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
2009b58: 9d e3 bf 90 save %sp, -112, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
2009b5c: 80 a6 60 00 cmp %i1, 0
2009b60: 02 80 00 41 be 2009c64 <_Objects_Get_name_as_string+0x10c>
2009b64: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( name == NULL )
2009b68: 02 80 00 3a be 2009c50 <_Objects_Get_name_as_string+0xf8>
2009b6c: 80 a6 20 00 cmp %i0, 0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2009b70: 02 80 00 3a be 2009c58 <_Objects_Get_name_as_string+0x100>
2009b74: 03 00 80 82 sethi %hi(0x2020800), %g1
information = _Objects_Get_information_id( tmpId );
2009b78: 7f ff ff ba call 2009a60 <_Objects_Get_information_id>
2009b7c: 90 10 00 18 mov %i0, %o0
if ( !information )
2009b80: ba 92 20 00 orcc %o0, 0, %i5
2009b84: 02 80 00 38 be 2009c64 <_Objects_Get_name_as_string+0x10c>
2009b88: 92 10 00 18 mov %i0, %o1
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
2009b8c: 40 00 00 3f call 2009c88 <_Objects_Get>
2009b90: 94 07 bf fc add %fp, -4, %o2
switch ( location ) {
2009b94: c2 07 bf fc ld [ %fp + -4 ], %g1
2009b98: 80 a0 60 00 cmp %g1, 0
2009b9c: 32 80 00 33 bne,a 2009c68 <_Objects_Get_name_as_string+0x110>
2009ba0: b4 10 20 00 clr %i2
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
2009ba4: c2 0f 60 38 ldub [ %i5 + 0x38 ], %g1
2009ba8: 80 a0 60 00 cmp %g1, 0
2009bac: 32 80 00 31 bne,a 2009c70 <_Objects_Get_name_as_string+0x118>
2009bb0: c4 02 20 0c ld [ %o0 + 0xc ], %g2
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
2009bb4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
2009bb8: c0 2f bf f4 clrb [ %fp + -12 ]
{
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;
2009bbc: 85 30 60 08 srl %g1, 8, %g2
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2009bc0: 89 30 60 18 srl %g1, 0x18, %g4
lname[ 1 ] = (u32_name >> 16) & 0xff;
2009bc4: 87 30 60 10 srl %g1, 0x10, %g3
lname[ 2 ] = (u32_name >> 8) & 0xff;
2009bc8: c4 2f bf f2 stb %g2, [ %fp + -14 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2009bcc: c8 2f bf f0 stb %g4, [ %fp + -16 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
2009bd0: c6 2f bf f1 stb %g3, [ %fp + -15 ]
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
2009bd4: c2 2f bf f3 stb %g1, [ %fp + -13 ]
lname[ 4 ] = '\0';
s = lname;
2009bd8: 84 07 bf f0 add %fp, -16, %g2
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2009bdc: b2 86 7f ff addcc %i1, -1, %i1
2009be0: 02 80 00 1a be 2009c48 <_Objects_Get_name_as_string+0xf0> <== NEVER TAKEN
2009be4: 82 10 00 1a mov %i2, %g1
2009be8: c8 48 80 00 ldsb [ %g2 ], %g4
2009bec: 80 a1 20 00 cmp %g4, 0
2009bf0: 02 80 00 16 be 2009c48 <_Objects_Get_name_as_string+0xf0>
2009bf4: c6 08 80 00 ldub [ %g2 ], %g3
2009bf8: 31 00 80 7e sethi %hi(0x201f800), %i0
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
2009bfc: b2 06 80 19 add %i2, %i1, %i1
2009c00: 10 80 00 05 b 2009c14 <_Objects_Get_name_as_string+0xbc>
2009c04: b0 16 20 7c or %i0, 0x7c, %i0
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2009c08: 80 a1 20 00 cmp %g4, 0
2009c0c: 02 80 00 0f be 2009c48 <_Objects_Get_name_as_string+0xf0>
2009c10: c6 08 80 00 ldub [ %g2 ], %g3
*d = (isprint((unsigned char)*s)) ? *s : '*';
2009c14: fa 06 00 00 ld [ %i0 ], %i5
2009c18: 88 08 e0 ff and %g3, 0xff, %g4
2009c1c: 88 07 40 04 add %i5, %g4, %g4
2009c20: c8 49 20 01 ldsb [ %g4 + 1 ], %g4
2009c24: 80 89 20 97 btst 0x97, %g4
2009c28: 12 80 00 03 bne 2009c34 <_Objects_Get_name_as_string+0xdc>
2009c2c: 84 00 a0 01 inc %g2
2009c30: 86 10 20 2a mov 0x2a, %g3
2009c34: c6 28 40 00 stb %g3, [ %g1 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2009c38: 82 00 60 01 inc %g1
2009c3c: 80 a0 40 19 cmp %g1, %i1
2009c40: 32 bf ff f2 bne,a 2009c08 <_Objects_Get_name_as_string+0xb0>
2009c44: c8 48 80 00 ldsb [ %g2 ], %g4
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
2009c48: 40 00 03 e2 call 200abd0 <_Thread_Enable_dispatch>
2009c4c: c0 28 40 00 clrb [ %g1 ]
return name;
}
return NULL; /* unreachable path */
}
2009c50: 81 c7 e0 08 ret
2009c54: 91 e8 00 1a restore %g0, %i2, %o0
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2009c58: c2 00 63 6c ld [ %g1 + 0x36c ], %g1
2009c5c: 10 bf ff c7 b 2009b78 <_Objects_Get_name_as_string+0x20>
2009c60: f0 00 60 08 ld [ %g1 + 8 ], %i0
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
2009c64: b4 10 20 00 clr %i2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
2009c68: 81 c7 e0 08 ret
2009c6c: 91 e8 00 1a restore %g0, %i2, %o0
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
2009c70: 80 a0 a0 00 cmp %g2, 0
2009c74: 12 bf ff da bne 2009bdc <_Objects_Get_name_as_string+0x84>
2009c78: 82 10 00 1a mov %i2, %g1
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
2009c7c: 40 00 03 d5 call 200abd0 <_Thread_Enable_dispatch>
2009c80: c0 28 40 00 clrb [ %g1 ]
2009c84: 30 bf ff f3 b,a 2009c50 <_Objects_Get_name_as_string+0xf8>
02008008 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
2008008: 9d e3 bf a0 save %sp, -96, %sp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
200800c: 90 10 20 00 clr %o0
)
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
2008010: 80 a6 20 00 cmp %i0, 0
2008014: 02 80 00 19 be 2008078 <_Objects_Get_next+0x70>
2008018: ba 10 00 18 mov %i0, %i5
return NULL;
if ( !location_p )
200801c: 80 a6 a0 00 cmp %i2, 0
2008020: 02 80 00 16 be 2008078 <_Objects_Get_next+0x70>
2008024: 80 a6 e0 00 cmp %i3, 0
return NULL;
if ( !next_id_p )
2008028: 02 80 00 14 be 2008078 <_Objects_Get_next+0x70>
200802c: 83 2e 60 10 sll %i1, 0x10, %g1
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
2008030: 80 a0 60 00 cmp %g1, 0
2008034: 22 80 00 13 be,a 2008080 <_Objects_Get_next+0x78>
2008038: f2 06 20 08 ld [ %i0 + 8 ], %i1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
200803c: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2008040: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008044: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008048: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
200804c: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008050: 80 a0 80 01 cmp %g2, %g1
2008054: 0a 80 00 13 bcs 20080a0 <_Objects_Get_next+0x98>
2008058: 94 10 00 1a mov %i2, %o2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
200805c: 40 00 00 18 call 20080bc <_Objects_Get>
2008060: b2 06 60 01 inc %i1
next_id++;
} while (*location_p != OBJECTS_LOCAL);
2008064: c2 06 80 00 ld [ %i2 ], %g1
2008068: 80 a0 60 00 cmp %g1, 0
200806c: 32 bf ff f5 bne,a 2008040 <_Objects_Get_next+0x38>
2008070: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
*next_id_p = next_id;
2008074: f2 26 c0 00 st %i1, [ %i3 ]
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
2008078: 81 c7 e0 08 ret
200807c: 91 e8 00 08 restore %g0, %o0, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008080: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2008084: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008088: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
200808c: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008090: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008094: 80 a0 80 01 cmp %g2, %g1
2008098: 1a bf ff f1 bcc 200805c <_Objects_Get_next+0x54> <== ALWAYS TAKEN
200809c: 94 10 00 1a mov %i2, %o2
{
*location_p = OBJECTS_ERROR;
20080a0: 82 10 20 01 mov 1, %g1
20080a4: c2 26 80 00 st %g1, [ %i2 ]
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
20080a8: 90 10 20 00 clr %o0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
20080ac: 82 10 3f ff mov -1, %g1
20080b0: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
20080b4: 81 c7 e0 08 ret
20080b8: 91 e8 00 08 restore %g0, %o0, %o0
02008dd8 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
2008dd8: 9d e3 bf 98 save %sp, -104, %sp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2008ddc: 80 a6 20 00 cmp %i0, 0
2008de0: 12 80 00 06 bne 2008df8 <_Objects_Id_to_name+0x20>
2008de4: 83 36 20 18 srl %i0, 0x18, %g1
2008de8: 03 00 80 7c sethi %hi(0x201f000), %g1
2008dec: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 201f3dc <_Per_CPU_Information+0xc>
2008df0: f0 00 60 08 ld [ %g1 + 8 ], %i0
2008df4: 83 36 20 18 srl %i0, 0x18, %g1
2008df8: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2008dfc: 84 00 7f ff add %g1, -1, %g2
2008e00: 80 a0 a0 02 cmp %g2, 2
2008e04: 18 80 00 12 bgu 2008e4c <_Objects_Id_to_name+0x74>
2008e08: ba 10 20 03 mov 3, %i5
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
2008e0c: 83 28 60 02 sll %g1, 2, %g1
2008e10: 05 00 80 7b sethi %hi(0x201ec00), %g2
2008e14: 84 10 a1 f8 or %g2, 0x1f8, %g2 ! 201edf8 <_Objects_Information_table>
2008e18: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2008e1c: 80 a0 60 00 cmp %g1, 0
2008e20: 02 80 00 0b be 2008e4c <_Objects_Id_to_name+0x74>
2008e24: 85 36 20 1b srl %i0, 0x1b, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
2008e28: 85 28 a0 02 sll %g2, 2, %g2
2008e2c: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
2008e30: 80 a2 20 00 cmp %o0, 0
2008e34: 02 80 00 06 be 2008e4c <_Objects_Id_to_name+0x74> <== NEVER TAKEN
2008e38: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
2008e3c: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
2008e40: 80 a0 60 00 cmp %g1, 0
2008e44: 02 80 00 04 be 2008e54 <_Objects_Id_to_name+0x7c> <== ALWAYS TAKEN
2008e48: 92 10 00 18 mov %i0, %o1
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
2008e4c: 81 c7 e0 08 ret
2008e50: 91 e8 00 1d restore %g0, %i5, %o0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
2008e54: 7f ff ff c3 call 2008d60 <_Objects_Get>
2008e58: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
2008e5c: 80 a2 20 00 cmp %o0, 0
2008e60: 02 bf ff fb be 2008e4c <_Objects_Id_to_name+0x74>
2008e64: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
2008e68: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
2008e6c: ba 10 20 00 clr %i5
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
2008e70: 40 00 03 b7 call 2009d4c <_Thread_Enable_dispatch>
2008e74: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
2008e78: 30 bf ff f5 b,a 2008e4c <_Objects_Id_to_name+0x74>
02008650 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
2008650: 9d e3 bf a0 save %sp, -96, %sp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
2008654: fa 16 20 0a lduh [ %i0 + 0xa ], %i5
block_count = (information->maximum - index_base) /
2008658: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4
200865c: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
2008660: 92 10 00 1c mov %i4, %o1
2008664: 40 00 40 94 call 20188b4 <.udiv>
2008668: 90 22 00 1d sub %o0, %i5, %o0
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
200866c: 80 a2 20 00 cmp %o0, 0
2008670: 02 80 00 34 be 2008740 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN
2008674: 01 00 00 00 nop
if ( information->inactive_per_block[ block ] ==
2008678: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
200867c: c2 01 00 00 ld [ %g4 ], %g1
2008680: 80 a7 00 01 cmp %i4, %g1
2008684: 02 80 00 0f be 20086c0 <_Objects_Shrink_information+0x70> <== NEVER TAKEN
2008688: 82 10 20 00 clr %g1
200868c: 10 80 00 07 b 20086a8 <_Objects_Shrink_information+0x58>
2008690: b6 10 20 04 mov 4, %i3
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
2008694: 86 06 e0 04 add %i3, 4, %g3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
2008698: 80 a7 00 02 cmp %i4, %g2
200869c: 02 80 00 0a be 20086c4 <_Objects_Shrink_information+0x74>
20086a0: ba 07 40 1c add %i5, %i4, %i5
20086a4: b6 10 00 03 mov %g3, %i3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
20086a8: 82 00 60 01 inc %g1
20086ac: 80 a0 40 08 cmp %g1, %o0
20086b0: 32 bf ff f9 bne,a 2008694 <_Objects_Shrink_information+0x44>
20086b4: c4 01 00 1b ld [ %g4 + %i3 ], %g2
20086b8: 81 c7 e0 08 ret
20086bc: 81 e8 00 00 restore
if ( information->inactive_per_block[ block ] ==
20086c0: b6 10 20 00 clr %i3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
20086c4: 10 80 00 06 b 20086dc <_Objects_Shrink_information+0x8c>
20086c8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
20086cc: 80 a7 20 00 cmp %i4, 0
20086d0: 22 80 00 12 be,a 2008718 <_Objects_Shrink_information+0xc8>
20086d4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
20086d8: 90 10 00 1c mov %i4, %o0
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
20086dc: c2 12 20 0a lduh [ %o0 + 0xa ], %g1
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
20086e0: 80 a0 40 1d cmp %g1, %i5
20086e4: 0a bf ff fa bcs 20086cc <_Objects_Shrink_information+0x7c>
20086e8: f8 02 00 00 ld [ %o0 ], %i4
(index < (index_base + information->allocation_size))) {
20086ec: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
20086f0: 84 07 40 02 add %i5, %g2, %g2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
20086f4: 80 a0 40 02 cmp %g1, %g2
20086f8: 1a bf ff f6 bcc 20086d0 <_Objects_Shrink_information+0x80>
20086fc: 80 a7 20 00 cmp %i4, 0
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
2008700: 7f ff fb 4e call 2007438 <_Chain_Extract>
2008704: 01 00 00 00 nop
}
}
while ( the_object );
2008708: 80 a7 20 00 cmp %i4, 0
200870c: 12 bf ff f4 bne 20086dc <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN
2008710: 90 10 00 1c mov %i4, %o0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2008714: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
2008718: 40 00 07 da call 200a680 <_Workspace_Free>
200871c: d0 00 40 1b ld [ %g1 + %i3 ], %o0
information->object_blocks[ block ] = NULL;
2008720: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2008724: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2008728: c0 20 40 1b clr [ %g1 + %i3 ]
information->inactive_per_block[ block ] = 0;
200872c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive -= information->allocation_size;
2008730: c2 16 20 14 lduh [ %i0 + 0x14 ], %g1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
2008734: c0 20 c0 1b clr [ %g3 + %i3 ]
information->inactive -= information->allocation_size;
2008738: 82 20 80 01 sub %g2, %g1, %g1
200873c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
return;
2008740: 81 c7 e0 08 ret
2008744: 81 e8 00 00 restore
0200f0b4 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
200f0b4: 9d e3 bf a0 save %sp, -96, %sp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
200f0b8: f4 06 20 08 ld [ %i0 + 8 ], %i2
200f0bc: 3b 00 80 77 sethi %hi(0x201dc00), %i5
200f0c0: b3 36 a0 18 srl %i2, 0x18, %i1
200f0c4: ba 17 63 18 or %i5, 0x318, %i5
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 ];
200f0c8: b5 2e a0 10 sll %i2, 0x10, %i2
200f0cc: b2 0e 60 07 and %i1, 7, %i1
200f0d0: b5 36 a0 0e srl %i2, 0xe, %i2
200f0d4: b2 06 60 04 add %i1, 4, %i1
200f0d8: b3 2e 60 02 sll %i1, 2, %i1
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
200f0dc: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3
200f0e0: 80 a6 e0 00 cmp %i3, 0
200f0e4: 02 80 00 20 be 200f164 <_POSIX_Keys_Run_destructors+0xb0>
200f0e8: b8 10 20 01 mov 1, %i4
200f0ec: 84 10 20 01 mov 1, %g2
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
200f0f0: c6 07 60 1c ld [ %i5 + 0x1c ], %g3
_POSIX_Keys_Information.local_table [ index ];
200f0f4: 83 2f 20 10 sll %i4, 0x10, %g1
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
200f0f8: 83 30 60 0e srl %g1, 0xe, %g1
200f0fc: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
200f100: 80 a0 60 00 cmp %g1, 0
200f104: 02 80 00 10 be 200f144 <_POSIX_Keys_Run_destructors+0x90>
200f108: 86 00 40 19 add %g1, %i1, %g3
200f10c: c8 00 60 10 ld [ %g1 + 0x10 ], %g4
200f110: 80 a1 20 00 cmp %g4, 0
200f114: 22 80 00 0d be,a 200f148 <_POSIX_Keys_Run_destructors+0x94>
200f118: b8 07 20 01 inc %i4
void *value = key->Values [ thread_api ][ thread_index ];
200f11c: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200f120: d0 00 c0 1a ld [ %g3 + %i2 ], %o0
if ( value != NULL ) {
200f124: 80 a2 20 00 cmp %o0, 0
200f128: 22 80 00 08 be,a 200f148 <_POSIX_Keys_Run_destructors+0x94><== ALWAYS TAKEN
200f12c: b8 07 20 01 inc %i4
key->Values [ thread_api ][ thread_index ] = NULL;
200f130: c0 20 c0 1a clr [ %g3 + %i2 ] <== NOT EXECUTED
(*key->destructor)( value );
200f134: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200f138: 9f c0 40 00 call %g1 <== NOT EXECUTED
200f13c: 01 00 00 00 nop <== NOT EXECUTED
done = false;
200f140: 84 10 20 00 clr %g2 ! 0 <PROM_START> <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
200f144: b8 07 20 01 inc %i4
200f148: 83 2f 20 10 sll %i4, 0x10, %g1
200f14c: 83 30 60 10 srl %g1, 0x10, %g1
200f150: 80 a6 c0 01 cmp %i3, %g1
200f154: 1a bf ff e7 bcc 200f0f0 <_POSIX_Keys_Run_destructors+0x3c>
200f158: 80 88 a0 ff btst 0xff, %g2
* 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 ) {
200f15c: 22 bf ff e1 be,a 200f0e0 <_POSIX_Keys_Run_destructors+0x2c><== NEVER TAKEN
200f160: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3 <== NOT EXECUTED
200f164: 81 c7 e0 08 ret
200f168: 81 e8 00 00 restore
0200b628 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
200b628: 9d e3 bf 98 save %sp, -104, %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(
200b62c: 11 00 80 9f sethi %hi(0x2027c00), %o0
200b630: 92 10 00 18 mov %i0, %o1
200b634: 90 12 23 5c or %o0, 0x35c, %o0
200b638: 40 00 0d 4c call 200eb68 <_Objects_Get>
200b63c: 94 07 bf f8 add %fp, -8, %o2
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
200b640: c2 07 bf f8 ld [ %fp + -8 ], %g1
200b644: 80 a0 60 00 cmp %g1, 0
200b648: 22 80 00 08 be,a 200b668 <_POSIX_Message_queue_Receive_support+0x40>
200b64c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
200b650: 40 00 2d 42 call 2016b58 <__errno>
200b654: b0 10 3f ff mov -1, %i0
200b658: 82 10 20 09 mov 9, %g1
200b65c: c2 22 00 00 st %g1, [ %o0 ]
}
200b660: 81 c7 e0 08 ret
200b664: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
200b668: 84 08 60 03 and %g1, 3, %g2
200b66c: 80 a0 a0 01 cmp %g2, 1
200b670: 02 80 00 3a be 200b758 <_POSIX_Message_queue_Receive_support+0x130>
200b674: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
200b678: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
200b67c: c4 02 20 68 ld [ %o0 + 0x68 ], %g2
200b680: 80 a0 80 1a cmp %g2, %i2
200b684: 18 80 00 24 bgu 200b714 <_POSIX_Message_queue_Receive_support+0xec>
200b688: 84 10 3f ff mov -1, %g2
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
200b68c: c4 27 bf fc st %g2, [ %fp + -4 ]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
200b690: 80 a7 20 00 cmp %i4, 0
200b694: 12 80 00 1b bne 200b700 <_POSIX_Message_queue_Receive_support+0xd8>
200b698: 98 10 20 00 clr %o4
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
200b69c: 9a 10 00 1d mov %i5, %o5
200b6a0: 90 02 20 1c add %o0, 0x1c, %o0
200b6a4: 92 10 00 18 mov %i0, %o1
200b6a8: 94 10 00 19 mov %i1, %o2
200b6ac: 96 07 bf fc add %fp, -4, %o3
200b6b0: 40 00 08 c4 call 200d9c0 <_CORE_message_queue_Seize>
200b6b4: 98 0b 20 01 and %o4, 1, %o4
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
200b6b8: 40 00 11 1d call 200fb2c <_Thread_Enable_dispatch>
200b6bc: 3b 00 80 9f sethi %hi(0x2027c00), %i5
if (msg_prio) {
200b6c0: 80 a6 e0 00 cmp %i3, 0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
200b6c4: ba 17 63 d0 or %i5, 0x3d0, %i5
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
200b6c8: 02 80 00 07 be 200b6e4 <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN
200b6cc: c2 07 60 0c ld [ %i5 + 0xc ], %g1
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
200b6d0: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
200b6d4: 85 38 e0 1f sra %g3, 0x1f, %g2
200b6d8: 86 18 80 03 xor %g2, %g3, %g3
200b6dc: 84 20 c0 02 sub %g3, %g2, %g2
*msg_prio = _POSIX_Message_queue_Priority_from_core(
200b6e0: c4 26 c0 00 st %g2, [ %i3 ]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
200b6e4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
200b6e8: 80 a0 60 00 cmp %g1, 0
200b6ec: 12 80 00 12 bne 200b734 <_POSIX_Message_queue_Receive_support+0x10c>
200b6f0: 01 00 00 00 nop
return length_out;
200b6f4: f0 07 bf fc ld [ %fp + -4 ], %i0
200b6f8: 81 c7 e0 08 ret
200b6fc: 81 e8 00 00 restore
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
200b700: 05 00 00 10 sethi %hi(0x4000), %g2
200b704: 82 08 40 02 and %g1, %g2, %g1
200b708: 80 a0 00 01 cmp %g0, %g1
200b70c: 10 bf ff e4 b 200b69c <_POSIX_Message_queue_Receive_support+0x74>
200b710: 98 60 3f ff subx %g0, -1, %o4
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
200b714: 40 00 11 06 call 200fb2c <_Thread_Enable_dispatch>
200b718: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EMSGSIZE );
200b71c: 40 00 2d 0f call 2016b58 <__errno>
200b720: 01 00 00 00 nop
200b724: 82 10 20 7a mov 0x7a, %g1 ! 7a <PROM_START+0x7a>
200b728: c2 22 00 00 st %g1, [ %o0 ]
200b72c: 81 c7 e0 08 ret
200b730: 81 e8 00 00 restore
}
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
200b734: 40 00 2d 09 call 2016b58 <__errno>
200b738: b0 10 3f ff mov -1, %i0
200b73c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200b740: b6 10 00 08 mov %o0, %i3
200b744: 40 00 00 a3 call 200b9d0 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
200b748: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
200b74c: d0 26 c0 00 st %o0, [ %i3 ]
200b750: 81 c7 e0 08 ret
200b754: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
200b758: 40 00 10 f5 call 200fb2c <_Thread_Enable_dispatch>
200b75c: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EBADF );
200b760: 40 00 2c fe call 2016b58 <__errno>
200b764: 01 00 00 00 nop
200b768: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
200b76c: c2 22 00 00 st %g1, [ %o0 ]
200b770: 81 c7 e0 08 ret
200b774: 81 e8 00 00 restore
0200c278 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
Thread_Control *the_thread
)
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
200c278: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
200c27c: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2
200c280: 80 a0 a0 00 cmp %g2, 0
200c284: 12 80 00 06 bne 200c29c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24><== NEVER TAKEN
200c288: 01 00 00 00 nop
200c28c: c4 00 60 dc ld [ %g1 + 0xdc ], %g2
200c290: 80 a0 a0 01 cmp %g2, 1
200c294: 22 80 00 05 be,a 200c2a8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30>
200c298: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1
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();
200c29c: 82 13 c0 00 mov %o7, %g1
200c2a0: 7f ff f3 d1 call 20091e4 <_Thread_Enable_dispatch>
200c2a4: 9e 10 40 00 mov %g1, %o7
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
200c2a8: 80 a0 60 00 cmp %g1, 0
200c2ac: 02 bf ff fc be 200c29c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24>
200c2b0: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200c2b4: 03 00 80 60 sethi %hi(0x2018000), %g1
200c2b8: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20181d0 <_Thread_Dispatch_disable_level>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
200c2bc: 92 10 3f ff mov -1, %o1
200c2c0: 84 00 bf ff add %g2, -1, %g2
200c2c4: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ]
return _Thread_Dispatch_disable_level;
200c2c8: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1
200c2cc: 82 13 c0 00 mov %o7, %g1
200c2d0: 40 00 01 da call 200ca38 <_POSIX_Thread_Exit>
200c2d4: 9e 10 40 00 mov %g1, %o7
0200d79c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
200d79c: 9d e3 bf a0 save %sp, -96, %sp
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
200d7a0: d0 06 40 00 ld [ %i1 ], %o0
200d7a4: 7f ff ff f1 call 200d768 <_POSIX_Priority_Is_valid>
200d7a8: ba 10 00 18 mov %i0, %i5
200d7ac: 80 8a 20 ff btst 0xff, %o0
200d7b0: 02 80 00 34 be 200d880 <_POSIX_Thread_Translate_sched_param+0xe4><== NEVER TAKEN
200d7b4: b0 10 20 16 mov 0x16, %i0
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
200d7b8: c0 26 80 00 clr [ %i2 ]
*budget_callout = NULL;
200d7bc: c0 26 c0 00 clr [ %i3 ]
if ( policy == SCHED_OTHER ) {
200d7c0: 80 a7 60 00 cmp %i5, 0
200d7c4: 02 80 00 2d be 200d878 <_POSIX_Thread_Translate_sched_param+0xdc>
200d7c8: b0 10 20 00 clr %i0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
200d7cc: 80 a7 60 01 cmp %i5, 1
200d7d0: 02 80 00 2c be 200d880 <_POSIX_Thread_Translate_sched_param+0xe4>
200d7d4: 80 a7 60 02 cmp %i5, 2
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
200d7d8: 02 80 00 2c be 200d888 <_POSIX_Thread_Translate_sched_param+0xec>
200d7dc: 80 a7 60 04 cmp %i5, 4
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
200d7e0: 12 80 00 28 bne 200d880 <_POSIX_Thread_Translate_sched_param+0xe4>
200d7e4: b0 10 20 16 mov 0x16, %i0
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
200d7e8: c2 06 60 08 ld [ %i1 + 8 ], %g1
200d7ec: 80 a0 60 00 cmp %g1, 0
200d7f0: 32 80 00 07 bne,a 200d80c <_POSIX_Thread_Translate_sched_param+0x70>
200d7f4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200d7f8: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200d7fc: 80 a0 60 00 cmp %g1, 0
200d800: 02 80 00 23 be 200d88c <_POSIX_Thread_Translate_sched_param+0xf0>
200d804: 01 00 00 00 nop
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
200d808: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200d80c: 80 a0 60 00 cmp %g1, 0
200d810: 12 80 00 06 bne 200d828 <_POSIX_Thread_Translate_sched_param+0x8c>
200d814: 01 00 00 00 nop
200d818: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200d81c: 80 a0 60 00 cmp %g1, 0
200d820: 02 80 00 18 be 200d880 <_POSIX_Thread_Translate_sched_param+0xe4>
200d824: b0 10 20 16 mov 0x16, %i0
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200d828: 7f ff f5 26 call 200acc0 <_Timespec_To_ticks>
200d82c: 90 06 60 08 add %i1, 8, %o0
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
200d830: b0 10 20 16 mov 0x16, %i0
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 ) <
200d834: ba 10 00 08 mov %o0, %i5
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
200d838: 7f ff f5 22 call 200acc0 <_Timespec_To_ticks>
200d83c: 90 06 60 10 add %i1, 0x10, %o0
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 ) <
200d840: 80 a7 40 08 cmp %i5, %o0
200d844: 0a 80 00 12 bcs 200d88c <_POSIX_Thread_Translate_sched_param+0xf0>
200d848: 01 00 00 00 nop
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
200d84c: 7f ff ff c7 call 200d768 <_POSIX_Priority_Is_valid>
200d850: d0 06 60 04 ld [ %i1 + 4 ], %o0
200d854: 80 8a 20 ff btst 0xff, %o0
200d858: 02 80 00 0a be 200d880 <_POSIX_Thread_Translate_sched_param+0xe4>
200d85c: 82 10 20 03 mov 3, %g1
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
200d860: c2 26 80 00 st %g1, [ %i2 ]
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
200d864: 03 00 80 1b sethi %hi(0x2006c00), %g1
200d868: 82 10 60 7c or %g1, 0x7c, %g1 ! 2006c7c <_POSIX_Threads_Sporadic_budget_callout>
200d86c: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
return EINVAL;
}
200d870: 81 c7 e0 08 ret
200d874: 91 e8 20 00 restore %g0, 0, %o0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200d878: 82 10 20 01 mov 1, %g1
200d87c: c2 26 80 00 st %g1, [ %i2 ]
return 0;
200d880: 81 c7 e0 08 ret
200d884: 81 e8 00 00 restore
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
200d888: fa 26 80 00 st %i5, [ %i2 ]
return 0;
200d88c: 81 c7 e0 08 ret
200d890: 81 e8 00 00 restore
0200c9bc <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
200c9bc: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
200c9c0: f0 06 61 5c ld [ %i1 + 0x15c ], %i0
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
200c9c4: 40 00 09 a0 call 200f044 <_POSIX_Threads_cancel_run>
200c9c8: 90 10 00 19 mov %i1, %o0
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
200c9cc: 90 10 00 19 mov %i1, %o0
200c9d0: 40 00 09 b9 call 200f0b4 <_POSIX_Keys_Run_destructors>
200c9d4: ba 06 20 44 add %i0, 0x44, %i5
/*
* 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 )) )
200c9d8: 10 80 00 03 b 200c9e4 <_POSIX_Threads_Delete_extension+0x28>
200c9dc: f8 06 60 28 ld [ %i1 + 0x28 ], %i4
*(void **)the_thread->Wait.return_argument = value_ptr;
200c9e0: f8 20 40 00 st %i4, [ %g1 ] <== 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 )) )
200c9e4: 7f ff f3 66 call 200977c <_Thread_queue_Dequeue>
200c9e8: 90 10 00 1d mov %i5, %o0
200c9ec: 80 a2 20 00 cmp %o0, 0
200c9f0: 32 bf ff fc bne,a 200c9e0 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN
200c9f4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
200c9f8: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
200c9fc: 80 a0 60 04 cmp %g1, 4
200ca00: 02 80 00 05 be 200ca14 <_POSIX_Threads_Delete_extension+0x58>
200ca04: 01 00 00 00 nop
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
200ca08: c0 26 61 5c clr [ %i1 + 0x15c ]
_Workspace_Free( api );
200ca0c: 7f ff f7 1d call 200a680 <_Workspace_Free>
200ca10: 81 e8 00 00 restore
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
200ca14: 7f ff f6 97 call 200a470 <_Watchdog_Remove>
200ca18: 90 06 20 a8 add %i0, 0xa8, %o0
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
200ca1c: c0 26 61 5c clr [ %i1 + 0x15c ]
_Workspace_Free( api );
200ca20: 7f ff f7 18 call 200a680 <_Workspace_Free>
200ca24: 81 e8 00 00 restore
0200697c <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
200697c: 9d e3 bf 58 save %sp, -168, %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;
2006980: 03 00 80 76 sethi %hi(0x201d800), %g1
2006984: 82 10 60 14 or %g1, 0x14, %g1 ! 201d814 <Configuration_POSIX_API>
maximum = Configuration_POSIX_API.number_of_initialization_threads;
2006988: f6 00 60 30 ld [ %g1 + 0x30 ], %i3
if ( !user_threads || maximum == 0 )
200698c: 80 a6 e0 00 cmp %i3, 0
2006990: 02 80 00 18 be 20069f0 <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN
2006994: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
2006998: 80 a7 60 00 cmp %i5, 0
200699c: 02 80 00 15 be 20069f0 <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN
20069a0: b8 10 20 00 clr %i4
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
20069a4: 40 00 1b bc call 200d894 <pthread_attr_init>
20069a8: 90 07 bf bc add %fp, -68, %o0
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
20069ac: 92 10 20 02 mov 2, %o1
20069b0: 40 00 1b c5 call 200d8c4 <pthread_attr_setinheritsched>
20069b4: 90 07 bf bc add %fp, -68, %o0
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
20069b8: d2 07 60 04 ld [ %i5 + 4 ], %o1
20069bc: 40 00 1b d2 call 200d904 <pthread_attr_setstacksize>
20069c0: 90 07 bf bc add %fp, -68, %o0
status = pthread_create(
20069c4: d4 07 40 00 ld [ %i5 ], %o2
20069c8: 90 07 bf fc add %fp, -4, %o0
20069cc: 92 07 bf bc add %fp, -68, %o1
20069d0: 7f ff fe fd call 20065c4 <pthread_create>
20069d4: 96 10 20 00 clr %o3
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
20069d8: 94 92 20 00 orcc %o0, 0, %o2
20069dc: 12 80 00 07 bne 20069f8 <_POSIX_Threads_Initialize_user_threads_body+0x7c>
20069e0: b8 07 20 01 inc %i4
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
20069e4: 80 a6 c0 1c cmp %i3, %i4
20069e8: 18 bf ff ef bgu 20069a4 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN
20069ec: ba 07 60 08 add %i5, 8, %i5
20069f0: 81 c7 e0 08 ret
20069f4: 81 e8 00 00 restore
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
20069f8: 90 10 20 02 mov 2, %o0
20069fc: 40 00 08 55 call 2008b50 <_Internal_error_Occurred>
2006a00: 92 10 20 01 mov 1, %o1
0200cb5c <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
200cb5c: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200cb60: fa 06 61 5c ld [ %i1 + 0x15c ], %i5
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
200cb64: 40 00 04 09 call 200db88 <_Timespec_To_ticks>
200cb68: 90 07 60 98 add %i5, 0x98, %o0
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
200cb6c: c4 07 60 88 ld [ %i5 + 0x88 ], %g2
200cb70: 03 00 80 73 sethi %hi(0x201cc00), %g1
200cb74: d2 08 61 cc ldub [ %g1 + 0x1cc ], %o1 ! 201cdcc <rtems_maximum_priority>
*/
#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 ) {
200cb78: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
200cb7c: 92 22 40 02 sub %o1, %g2, %o1
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;
200cb80: d0 26 60 78 st %o0, [ %i1 + 0x78 ]
*/
#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 ) {
200cb84: 80 a0 60 00 cmp %g1, 0
200cb88: 12 80 00 06 bne 200cba0 <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NEVER TAKEN
200cb8c: d2 26 60 18 st %o1, [ %i1 + 0x18 ]
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
200cb90: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200cb94: 80 a0 40 09 cmp %g1, %o1
200cb98: 38 80 00 09 bgu,a 200cbbc <_POSIX_Threads_Sporadic_budget_TSR+0x60>
200cb9c: 90 10 00 19 mov %i1, %o0
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
200cba0: 40 00 03 fa call 200db88 <_Timespec_To_ticks>
200cba4: 90 07 60 90 add %i5, 0x90, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cba8: 31 00 80 76 sethi %hi(0x201d800), %i0
200cbac: b2 07 60 a8 add %i5, 0xa8, %i1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200cbb0: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cbb4: 7f ff f5 cd call 200a2e8 <_Watchdog_Insert>
200cbb8: 91 ee 23 bc restore %i0, 0x3bc, %o0
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
200cbbc: 7f ff f0 cc call 2008eec <_Thread_Change_priority>
200cbc0: 94 10 20 01 mov 1, %o2
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
200cbc4: 40 00 03 f1 call 200db88 <_Timespec_To_ticks>
200cbc8: 90 07 60 90 add %i5, 0x90, %o0
200cbcc: 31 00 80 76 sethi %hi(0x201d800), %i0
200cbd0: b2 07 60 a8 add %i5, 0xa8, %i1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200cbd4: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cbd8: 7f ff f5 c4 call 200a2e8 <_Watchdog_Insert>
200cbdc: 91 ee 23 bc restore %i0, 0x3bc, %o0
0200cbe0 <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200cbe0: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
200cbe4: c6 00 a0 8c ld [ %g2 + 0x8c ], %g3
200cbe8: 05 00 80 73 sethi %hi(0x201cc00), %g2
200cbec: d2 08 a1 cc ldub [ %g2 + 0x1cc ], %o1 ! 201cdcc <rtems_maximum_priority>
*/
#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 ) {
200cbf0: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
200cbf4: 92 22 40 03 sub %o1, %g3, %o1
/*
* 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 */
200cbf8: 86 10 3f ff mov -1, %g3
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
200cbfc: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
*/
#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 ) {
200cc00: 80 a0 a0 00 cmp %g2, 0
200cc04: 12 80 00 06 bne 200cc1c <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NEVER TAKEN
200cc08: c6 22 20 78 st %g3, [ %o0 + 0x78 ]
/*
* 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 ) {
200cc0c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200cc10: 80 a0 40 09 cmp %g1, %o1
200cc14: 0a 80 00 04 bcs 200cc24 <_POSIX_Threads_Sporadic_budget_callout+0x44><== ALWAYS TAKEN
200cc18: 94 10 20 01 mov 1, %o2
200cc1c: 81 c3 e0 08 retl <== NOT EXECUTED
200cc20: 01 00 00 00 nop <== NOT EXECUTED
_Thread_Change_priority( the_thread, new_priority, true );
200cc24: 82 13 c0 00 mov %o7, %g1
200cc28: 7f ff f0 b1 call 2008eec <_Thread_Change_priority>
200cc2c: 9e 10 40 00 mov %g1, %o7
0200f044 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
200f044: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
200f048: f8 06 21 5c ld [ %i0 + 0x15c ], %i4
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
200f04c: 84 10 20 01 mov 1, %g2
while ( !_Chain_Is_empty( handler_stack ) ) {
200f050: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200f054: b6 07 20 e8 add %i4, 0xe8, %i3
200f058: 80 a0 40 1b cmp %g1, %i3
200f05c: 02 80 00 14 be 200f0ac <_POSIX_Threads_cancel_run+0x68>
200f060: c4 27 20 d8 st %g2, [ %i4 + 0xd8 ]
_ISR_Disable( level );
200f064: 7f ff cc 60 call 20021e4 <sparc_disable_interrupts>
200f068: 01 00 00 00 nop
handler = (POSIX_Cancel_Handler_control *)
200f06c: fa 07 20 ec ld [ %i4 + 0xec ], %i5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
200f070: c4 07 40 00 ld [ %i5 ], %g2
previous = the_node->previous;
200f074: c2 07 60 04 ld [ %i5 + 4 ], %g1
next->previous = previous;
200f078: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
200f07c: c4 20 40 00 st %g2, [ %g1 ]
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
200f080: 7f ff cc 5d call 20021f4 <sparc_enable_interrupts>
200f084: 01 00 00 00 nop
(*handler->routine)( handler->arg );
200f088: c2 07 60 08 ld [ %i5 + 8 ], %g1
200f08c: 9f c0 40 00 call %g1
200f090: d0 07 60 0c ld [ %i5 + 0xc ], %o0
_Workspace_Free( handler );
200f094: 7f ff ed 7b call 200a680 <_Workspace_Free>
200f098: 90 10 00 1d mov %i5, %o0
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
200f09c: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1
200f0a0: 80 a0 40 1b cmp %g1, %i3
200f0a4: 12 bf ff f0 bne 200f064 <_POSIX_Threads_cancel_run+0x20> <== NEVER TAKEN
200f0a8: 01 00 00 00 nop
200f0ac: 81 c7 e0 08 ret
200f0b0: 81 e8 00 00 restore
020066a4 <_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)
{
20066a4: 9d e3 bf a0 save %sp, -96, %sp
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
20066a8: c4 06 60 68 ld [ %i1 + 0x68 ], %g2
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
20066ac: c2 06 60 54 ld [ %i1 + 0x54 ], %g1
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
20066b0: 84 00 a0 01 inc %g2
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
20066b4: 80 a0 60 00 cmp %g1, 0
20066b8: 12 80 00 0e bne 20066f0 <_POSIX_Timer_TSR+0x4c>
20066bc: c4 26 60 68 st %g2, [ %i1 + 0x68 ]
20066c0: c2 06 60 58 ld [ %i1 + 0x58 ], %g1
20066c4: 80 a0 60 00 cmp %g1, 0
20066c8: 32 80 00 0b bne,a 20066f4 <_POSIX_Timer_TSR+0x50> <== ALWAYS TAKEN
20066cc: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
20066d0: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
20066d4: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== 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 ) ) {
20066d8: d0 06 60 38 ld [ %i1 + 0x38 ], %o0
20066dc: 40 00 1a 46 call 200cff4 <pthread_kill>
20066e0: d2 06 60 44 ld [ %i1 + 0x44 ], %o1
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
20066e4: c0 26 60 68 clr [ %i1 + 0x68 ]
20066e8: 81 c7 e0 08 ret
20066ec: 81 e8 00 00 restore
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
20066f0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
20066f4: d4 06 60 08 ld [ %i1 + 8 ], %o2
20066f8: 90 06 60 10 add %i1, 0x10, %o0
20066fc: 98 10 00 19 mov %i1, %o4
2006700: 17 00 80 19 sethi %hi(0x2006400), %o3
2006704: 40 00 1b 63 call 200d490 <_POSIX_Timer_Insert_helper>
2006708: 96 12 e2 a4 or %o3, 0x2a4, %o3 ! 20066a4 <_POSIX_Timer_TSR>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
200670c: 80 8a 20 ff btst 0xff, %o0
2006710: 02 bf ff f6 be 20066e8 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
2006714: 01 00 00 00 nop
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
2006718: 40 00 05 ec call 2007ec8 <_TOD_Get>
200671c: 90 06 60 6c add %i1, 0x6c, %o0
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
2006720: 82 10 20 03 mov 3, %g1
2006724: 10 bf ff ed b 20066d8 <_POSIX_Timer_TSR+0x34>
2006728: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
0200f16c <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
200f16c: 9d e3 bf 68 save %sp, -152, %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,
200f170: 98 10 20 01 mov 1, %o4
200f174: 90 10 00 18 mov %i0, %o0
200f178: 92 10 00 19 mov %i1, %o1
200f17c: 94 07 bf f4 add %fp, -12, %o2
200f180: 40 00 00 2e call 200f238 <_POSIX_signals_Clear_signals>
200f184: 96 10 00 1a mov %i2, %o3
200f188: 80 8a 20 ff btst 0xff, %o0
200f18c: 02 80 00 23 be 200f218 <_POSIX_signals_Check_signal+0xac>
200f190: 82 10 20 00 clr %g1
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
200f194: 85 2e 60 02 sll %i1, 2, %g2
200f198: 37 00 80 78 sethi %hi(0x201e000), %i3
200f19c: b9 2e 60 04 sll %i1, 4, %i4
200f1a0: b6 16 e0 a0 or %i3, 0xa0, %i3
200f1a4: b8 27 00 02 sub %i4, %g2, %i4
200f1a8: 84 06 c0 1c add %i3, %i4, %g2
200f1ac: fa 00 a0 08 ld [ %g2 + 8 ], %i5
200f1b0: 80 a7 60 01 cmp %i5, 1
200f1b4: 02 80 00 19 be 200f218 <_POSIX_signals_Check_signal+0xac> <== NEVER TAKEN
200f1b8: 21 00 80 78 sethi %hi(0x201e000), %l0
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
200f1bc: f4 06 20 d0 ld [ %i0 + 0xd0 ], %i2
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200f1c0: c2 00 a0 04 ld [ %g2 + 4 ], %g1
/*
* 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,
200f1c4: a0 14 20 40 or %l0, 0x40, %l0
200f1c8: d2 04 20 0c ld [ %l0 + 0xc ], %o1
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200f1cc: 82 10 40 1a or %g1, %i2, %g1
/*
* 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,
200f1d0: 90 07 bf cc add %fp, -52, %o0
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200f1d4: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ]
/*
* 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,
200f1d8: 92 02 60 20 add %o1, 0x20, %o1
200f1dc: 40 00 04 98 call 201043c <memcpy>
200f1e0: 94 10 20 28 mov 0x28, %o2
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
200f1e4: c2 06 c0 1c ld [ %i3 + %i4 ], %g1
200f1e8: 80 a0 60 02 cmp %g1, 2
200f1ec: 02 80 00 0e be 200f224 <_POSIX_signals_Check_signal+0xb8>
200f1f0: 90 10 00 19 mov %i1, %o0
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
200f1f4: 9f c7 40 00 call %i5
200f1f8: 01 00 00 00 nop
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
200f1fc: d0 04 20 0c ld [ %l0 + 0xc ], %o0
200f200: 92 07 bf cc add %fp, -52, %o1
200f204: 90 02 20 20 add %o0, 0x20, %o0
200f208: 40 00 04 8d call 201043c <memcpy>
200f20c: 94 10 20 28 mov 0x28, %o2
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
200f210: 82 10 20 01 mov 1, %g1
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200f214: f4 26 20 d0 st %i2, [ %i0 + 0xd0 ]
return true;
}
200f218: b0 08 60 01 and %g1, 1, %i0
200f21c: 81 c7 e0 08 ret
200f220: 81 e8 00 00 restore
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
200f224: 92 07 bf f4 add %fp, -12, %o1
200f228: 9f c7 40 00 call %i5
200f22c: 94 10 20 00 clr %o2
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
200f230: 10 bf ff f4 b 200f200 <_POSIX_signals_Check_signal+0x94>
200f234: d0 04 20 0c ld [ %l0 + 0xc ], %o0
0200fa20 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
200fa20: 9d e3 bf a0 save %sp, -96, %sp
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
200fa24: 7f ff c9 f0 call 20021e4 <sparc_disable_interrupts>
200fa28: 01 00 00 00 nop
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
200fa2c: 85 2e 20 04 sll %i0, 4, %g2
200fa30: 83 2e 20 02 sll %i0, 2, %g1
200fa34: 82 20 80 01 sub %g2, %g1, %g1
200fa38: 05 00 80 78 sethi %hi(0x201e000), %g2
200fa3c: 84 10 a0 a0 or %g2, 0xa0, %g2 ! 201e0a0 <_POSIX_signals_Vectors>
200fa40: c4 00 80 01 ld [ %g2 + %g1 ], %g2
200fa44: 80 a0 a0 02 cmp %g2, 2
200fa48: 02 80 00 0b be 200fa74 <_POSIX_signals_Clear_process_signals+0x54>
200fa4c: 05 00 80 78 sethi %hi(0x201e000), %g2
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
200fa50: 03 00 80 78 sethi %hi(0x201e000), %g1
200fa54: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 201e294 <_POSIX_signals_Pending>
200fa58: 86 10 20 01 mov 1, %g3
200fa5c: b0 06 3f ff add %i0, -1, %i0
200fa60: b1 28 c0 18 sll %g3, %i0, %i0
200fa64: b0 28 80 18 andn %g2, %i0, %i0
200fa68: f0 20 62 94 st %i0, [ %g1 + 0x294 ]
}
_ISR_Enable( level );
200fa6c: 7f ff c9 e2 call 20021f4 <sparc_enable_interrupts>
200fa70: 91 e8 00 08 restore %g0, %o0, %o0
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
200fa74: 84 10 a2 98 or %g2, 0x298, %g2
200fa78: c6 00 40 02 ld [ %g1 + %g2 ], %g3
200fa7c: 82 00 40 02 add %g1, %g2, %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200fa80: 82 00 60 04 add %g1, 4, %g1
200fa84: 80 a0 c0 01 cmp %g3, %g1
200fa88: 02 bf ff f3 be 200fa54 <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN
200fa8c: 03 00 80 78 sethi %hi(0x201e000), %g1
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
200fa90: 7f ff c9 d9 call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
200fa94: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020071a8 <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
20071a8: 82 10 20 1b mov 0x1b, %g1
20071ac: 86 10 20 01 mov 1, %g3
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
20071b0: 84 00 7f ff add %g1, -1, %g2
20071b4: 85 28 c0 02 sll %g3, %g2, %g2
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
20071b8: 80 88 80 08 btst %g2, %o0
20071bc: 12 80 00 11 bne 2007200 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN
20071c0: 01 00 00 00 nop
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
20071c4: 82 00 60 01 inc %g1
20071c8: 80 a0 60 20 cmp %g1, 0x20
20071cc: 12 bf ff fa bne 20071b4 <_POSIX_signals_Get_lowest+0xc>
20071d0: 84 00 7f ff add %g1, -1, %g2
20071d4: 82 10 20 01 mov 1, %g1
20071d8: 10 80 00 05 b 20071ec <_POSIX_signals_Get_lowest+0x44>
20071dc: 86 10 20 01 mov 1, %g3
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
20071e0: 80 a0 60 1b cmp %g1, 0x1b
20071e4: 02 80 00 07 be 2007200 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN
20071e8: 01 00 00 00 nop
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
20071ec: 84 00 7f ff add %g1, -1, %g2
20071f0: 85 28 c0 02 sll %g3, %g2, %g2
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
20071f4: 80 88 80 08 btst %g2, %o0
20071f8: 22 bf ff fa be,a 20071e0 <_POSIX_signals_Get_lowest+0x38>
20071fc: 82 00 60 01 inc %g1
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
2007200: 81 c3 e0 08 retl
2007204: 90 10 00 01 mov %g1, %o0
0200c70c <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
200c70c: 9d e3 bf a0 save %sp, -96, %sp
/*
* 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;
200c710: 35 00 80 78 sethi %hi(0x201e000), %i2
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200c714: f8 06 21 5c ld [ %i0 + 0x15c ], %i4
/*
* 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;
200c718: b4 16 a0 40 or %i2, 0x40, %i2
200c71c: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
200c720: 80 a7 20 00 cmp %i4, 0
200c724: 02 80 00 34 be 200c7f4 <_POSIX_signals_Post_switch_extension+0xe8>
200c728: f2 00 60 34 ld [ %g1 + 0x34 ], %i1
*
* 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 );
200c72c: 7f ff d6 ae call 20021e4 <sparc_disable_interrupts>
200c730: 37 00 80 78 sethi %hi(0x201e000), %i3
200c734: b6 16 e2 94 or %i3, 0x294, %i3 ! 201e294 <_POSIX_signals_Pending>
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
200c738: c6 06 c0 00 ld [ %i3 ], %g3
200c73c: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1
* 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 &
200c740: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2
(api->signals_pending | _POSIX_signals_Pending)) ) {
200c744: 82 10 c0 01 or %g3, %g1, %g1
* 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 &
200c748: 80 a8 40 02 andncc %g1, %g2, %g0
200c74c: 02 80 00 26 be 200c7e4 <_POSIX_signals_Post_switch_extension+0xd8>
200c750: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
200c754: 7f ff d6 a8 call 20021f4 <sparc_enable_interrupts>
200c758: ba 10 20 1b mov 0x1b, %i5 ! 1b <PROM_START+0x1b>
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
200c75c: 92 10 00 1d mov %i5, %o1
200c760: 94 10 20 00 clr %o2
200c764: 40 00 0a 82 call 200f16c <_POSIX_signals_Check_signal>
200c768: 90 10 00 1c mov %i4, %o0
_POSIX_signals_Check_signal( api, signo, true );
200c76c: 92 10 00 1d mov %i5, %o1
200c770: 90 10 00 1c mov %i4, %o0
200c774: 40 00 0a 7e call 200f16c <_POSIX_signals_Check_signal>
200c778: 94 10 20 01 mov 1, %o2
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200c77c: ba 07 60 01 inc %i5
200c780: 80 a7 60 20 cmp %i5, 0x20
200c784: 12 bf ff f7 bne 200c760 <_POSIX_signals_Post_switch_extension+0x54>
200c788: 92 10 00 1d mov %i5, %o1
200c78c: ba 10 20 01 mov 1, %i5
_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 );
200c790: 92 10 00 1d mov %i5, %o1
200c794: 94 10 20 00 clr %o2
200c798: 40 00 0a 75 call 200f16c <_POSIX_signals_Check_signal>
200c79c: 90 10 00 1c mov %i4, %o0
_POSIX_signals_Check_signal( api, signo, true );
200c7a0: 92 10 00 1d mov %i5, %o1
200c7a4: 90 10 00 1c mov %i4, %o0
200c7a8: 40 00 0a 71 call 200f16c <_POSIX_signals_Check_signal>
200c7ac: 94 10 20 01 mov 1, %o2
_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++ ) {
200c7b0: ba 07 60 01 inc %i5
200c7b4: 80 a7 60 1b cmp %i5, 0x1b
200c7b8: 12 bf ff f7 bne 200c794 <_POSIX_signals_Post_switch_extension+0x88>
200c7bc: 92 10 00 1d mov %i5, %o1
*
* 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 );
200c7c0: 7f ff d6 89 call 20021e4 <sparc_disable_interrupts>
200c7c4: 01 00 00 00 nop
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
200c7c8: c6 06 c0 00 ld [ %i3 ], %g3
200c7cc: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1
* 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 &
200c7d0: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2
(api->signals_pending | _POSIX_signals_Pending)) ) {
200c7d4: 82 10 c0 01 or %g3, %g1, %g1
* 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 &
200c7d8: 80 a8 40 02 andncc %g1, %g2, %g0
200c7dc: 12 bf ff de bne 200c754 <_POSIX_signals_Post_switch_extension+0x48><== NEVER TAKEN
200c7e0: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
200c7e4: 7f ff d6 84 call 20021f4 <sparc_enable_interrupts>
200c7e8: 01 00 00 00 nop
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
200c7ec: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
200c7f0: f2 20 60 34 st %i1, [ %g1 + 0x34 ]
200c7f4: 81 c7 e0 08 ret
200c7f8: 81 e8 00 00 restore
0201a824 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
201a824: 9d e3 bf a0 save %sp, -96, %sp
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
201a828: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
201a82c: 05 04 00 20 sethi %hi(0x10008000), %g2
201a830: 86 10 20 01 mov 1, %g3
201a834: ba 06 7f ff add %i1, -1, %i5
201a838: 88 08 40 02 and %g1, %g2, %g4
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
201a83c: da 06 21 5c ld [ %i0 + 0x15c ], %o5
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
201a840: 80 a1 00 02 cmp %g4, %g2
201a844: 02 80 00 1c be 201a8b4 <_POSIX_signals_Unblock_thread+0x90>
201a848: 9f 28 c0 1d sll %g3, %i5, %o7
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
201a84c: c4 03 60 d0 ld [ %o5 + 0xd0 ], %g2
201a850: 80 ab c0 02 andncc %o7, %g2, %g0
201a854: 02 80 00 15 be 201a8a8 <_POSIX_signals_Unblock_thread+0x84>
201a858: ba 10 20 00 clr %i5
201a85c: 05 04 00 00 sethi %hi(0x10000000), %g2
* 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 ) ) {
201a860: 80 88 40 02 btst %g1, %g2
201a864: 02 80 00 29 be 201a908 <_POSIX_signals_Unblock_thread+0xe4>
201a868: 80 a0 60 00 cmp %g1, 0
the_thread->Wait.return_code = EINTR;
201a86c: 84 10 20 04 mov 4, %g2
201a870: c4 26 20 34 st %g2, [ %i0 + 0x34 ]
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
201a874: 05 00 00 ef sethi %hi(0x3bc00), %g2
201a878: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 <PROM_START+0x3bee0>
/*
* 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) )
201a87c: 80 88 40 02 btst %g1, %g2
201a880: 12 80 00 36 bne 201a958 <_POSIX_signals_Unblock_thread+0x134>
201a884: 80 88 60 08 btst 8, %g1
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
201a888: 22 80 00 09 be,a 201a8ac <_POSIX_signals_Unblock_thread+0x88><== NEVER TAKEN
201a88c: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
201a890: 7f ff be f8 call 200a470 <_Watchdog_Remove>
201a894: 90 06 20 48 add %i0, 0x48, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
201a898: 13 04 00 ff sethi %hi(0x1003fc00), %o1
201a89c: 90 10 00 18 mov %i0, %o0
201a8a0: 7f ff b9 de call 2009018 <_Thread_Clear_state>
201a8a4: 92 12 63 f8 or %o1, 0x3f8, %o1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
201a8a8: b0 0f 60 01 and %i5, 1, %i0
201a8ac: 81 c7 e0 08 ret
201a8b0: 81 e8 00 00 restore
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
201a8b4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
201a8b8: 80 8b c0 01 btst %o7, %g1
201a8bc: 22 80 00 21 be,a 201a940 <_POSIX_signals_Unblock_thread+0x11c>
201a8c0: c2 03 60 d0 ld [ %o5 + 0xd0 ], %g1
the_thread->Wait.return_code = EINTR;
201a8c4: 82 10 20 04 mov 4, %g1
201a8c8: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
201a8cc: 80 a6 a0 00 cmp %i2, 0
201a8d0: 02 80 00 27 be 201a96c <_POSIX_signals_Unblock_thread+0x148>
201a8d4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
201a8d8: c4 06 80 00 ld [ %i2 ], %g2
201a8dc: c4 20 40 00 st %g2, [ %g1 ]
201a8e0: c4 06 a0 04 ld [ %i2 + 4 ], %g2
201a8e4: c4 20 60 04 st %g2, [ %g1 + 4 ]
201a8e8: c4 06 a0 08 ld [ %i2 + 8 ], %g2
201a8ec: c4 20 60 08 st %g2, [ %g1 + 8 ]
}
_Thread_queue_Extract_with_proxy( the_thread );
201a8f0: 90 10 00 18 mov %i0, %o0
201a8f4: 7f ff bc b2 call 2009bbc <_Thread_queue_Extract_with_proxy>
201a8f8: ba 10 20 01 mov 1, %i5
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
201a8fc: b0 0f 60 01 and %i5, 1, %i0
201a900: 81 c7 e0 08 ret
201a904: 81 e8 00 00 restore
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
201a908: 12 bf ff e8 bne 201a8a8 <_POSIX_signals_Unblock_thread+0x84><== NEVER TAKEN
201a90c: 03 00 80 78 sethi %hi(0x201e000), %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201a910: 82 10 60 40 or %g1, 0x40, %g1 ! 201e040 <_Per_CPU_Information>
201a914: c4 00 60 08 ld [ %g1 + 8 ], %g2
201a918: 80 a0 a0 00 cmp %g2, 0
201a91c: 22 bf ff e4 be,a 201a8ac <_POSIX_signals_Unblock_thread+0x88>
201a920: b0 0f 60 01 and %i5, 1, %i0
201a924: c4 00 60 0c ld [ %g1 + 0xc ], %g2
201a928: 80 a6 00 02 cmp %i0, %g2
201a92c: 22 bf ff df be,a 201a8a8 <_POSIX_signals_Unblock_thread+0x84><== ALWAYS TAKEN
201a930: c6 28 60 18 stb %g3, [ %g1 + 0x18 ]
201a934: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED
201a938: 81 c7 e0 08 ret <== NOT EXECUTED
201a93c: 81 e8 00 00 restore <== NOT EXECUTED
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
201a940: 80 ab c0 01 andncc %o7, %g1, %g0
201a944: 12 bf ff e0 bne 201a8c4 <_POSIX_signals_Unblock_thread+0xa0>
201a948: ba 10 20 00 clr %i5
201a94c: b0 0f 60 01 and %i5, 1, %i0
201a950: 81 c7 e0 08 ret
201a954: 81 e8 00 00 restore
/*
* 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) )
_Thread_queue_Extract_with_proxy( the_thread );
201a958: 7f ff bc 99 call 2009bbc <_Thread_queue_Extract_with_proxy>
201a95c: 90 10 00 18 mov %i0, %o0
201a960: b0 0f 60 01 and %i5, 1, %i0
201a964: 81 c7 e0 08 ret
201a968: 81 e8 00 00 restore
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
201a96c: 84 10 20 01 mov 1, %g2
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
201a970: f2 20 40 00 st %i1, [ %g1 ]
the_info->si_code = SI_USER;
201a974: c4 20 60 04 st %g2, [ %g1 + 4 ]
the_info->si_value.sival_int = 0;
201a978: 10 bf ff de b 201a8f0 <_POSIX_signals_Unblock_thread+0xcc>
201a97c: c0 20 60 08 clr [ %g1 + 8 ]
0200e47c <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200e47c: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
200e480: 80 a6 60 00 cmp %i1, 0
200e484: 02 80 00 4c be 200e5b4 <_RBTree_Extract_unprotected+0x138>
200e488: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
200e48c: c2 06 20 08 ld [ %i0 + 8 ], %g1
200e490: 80 a0 40 19 cmp %g1, %i1
200e494: 22 80 00 59 be,a 200e5f8 <_RBTree_Extract_unprotected+0x17c>
200e498: c2 06 60 08 ld [ %i1 + 8 ], %g1
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
200e49c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200e4a0: 80 a0 40 19 cmp %g1, %i1
200e4a4: 22 80 00 46 be,a 200e5bc <_RBTree_Extract_unprotected+0x140>
200e4a8: c2 06 60 04 ld [ %i1 + 4 ], %g1
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200e4ac: fa 06 60 04 ld [ %i1 + 4 ], %i5
200e4b0: 80 a7 60 00 cmp %i5, 0
200e4b4: 22 80 00 4a be,a 200e5dc <_RBTree_Extract_unprotected+0x160>
200e4b8: f8 06 60 08 ld [ %i1 + 8 ], %i4
200e4bc: c2 06 60 08 ld [ %i1 + 8 ], %g1
200e4c0: 80 a0 60 00 cmp %g1, 0
200e4c4: 32 80 00 05 bne,a 200e4d8 <_RBTree_Extract_unprotected+0x5c>
200e4c8: c2 07 60 08 ld [ %i5 + 8 ], %g1
200e4cc: 10 80 00 50 b 200e60c <_RBTree_Extract_unprotected+0x190>
200e4d0: b8 10 00 1d mov %i5, %i4
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
200e4d4: c2 07 60 08 ld [ %i5 + 8 ], %g1
200e4d8: 80 a0 60 00 cmp %g1, 0
200e4dc: 32 bf ff fe bne,a 200e4d4 <_RBTree_Extract_unprotected+0x58>
200e4e0: ba 10 00 01 mov %g1, %i5
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
200e4e4: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
200e4e8: 80 a7 20 00 cmp %i4, 0
200e4ec: 02 80 00 54 be 200e63c <_RBTree_Extract_unprotected+0x1c0>
200e4f0: 01 00 00 00 nop
leaf->parent = target->parent;
200e4f4: c2 07 40 00 ld [ %i5 ], %g1
200e4f8: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200e4fc: c4 07 40 00 ld [ %i5 ], %g2
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200e500: c2 06 40 00 ld [ %i1 ], %g1
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200e504: c8 00 a0 04 ld [ %g2 + 4 ], %g4
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
200e508: c6 07 60 0c ld [ %i5 + 0xc ], %g3
dir = target != target->parent->child[0];
200e50c: 88 19 00 1d xor %g4, %i5, %g4
200e510: 80 a0 00 04 cmp %g0, %g4
200e514: 88 40 20 00 addx %g0, 0, %g4
target->parent->child[dir] = leaf;
200e518: 89 29 20 02 sll %g4, 2, %g4
200e51c: 84 00 80 04 add %g2, %g4, %g2
200e520: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200e524: c4 00 60 04 ld [ %g1 + 4 ], %g2
200e528: 84 18 80 19 xor %g2, %i1, %g2
200e52c: 80 a0 00 02 cmp %g0, %g2
200e530: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = target;
200e534: 85 28 a0 02 sll %g2, 2, %g2
200e538: 82 00 40 02 add %g1, %g2, %g1
200e53c: fa 20 60 04 st %i5, [ %g1 + 4 ]
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
200e540: c2 06 60 08 ld [ %i1 + 8 ], %g1
200e544: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
200e548: c2 06 60 08 ld [ %i1 + 8 ], %g1
200e54c: 80 a0 60 00 cmp %g1, 0
200e550: 32 80 00 02 bne,a 200e558 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN
200e554: fa 20 40 00 st %i5, [ %g1 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
200e558: c2 06 60 04 ld [ %i1 + 4 ], %g1
200e55c: c2 27 60 04 st %g1, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
200e560: c2 06 60 04 ld [ %i1 + 4 ], %g1
200e564: 80 a0 60 00 cmp %g1, 0
200e568: 32 80 00 02 bne,a 200e570 <_RBTree_Extract_unprotected+0xf4>
200e56c: fa 20 40 00 st %i5, [ %g1 ]
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200e570: c4 06 40 00 ld [ %i1 ], %g2
target->color = the_node->color;
200e574: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200e578: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
200e57c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
200e580: 80 a0 e0 00 cmp %g3, 0
200e584: 32 80 00 06 bne,a 200e59c <_RBTree_Extract_unprotected+0x120>
200e588: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
200e58c: 80 a7 20 00 cmp %i4, 0
200e590: 32 80 00 02 bne,a 200e598 <_RBTree_Extract_unprotected+0x11c>
200e594: c0 27 20 0c clr [ %i4 + 0xc ]
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
200e598: c2 06 20 04 ld [ %i0 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
200e59c: c0 26 60 08 clr [ %i1 + 8 ]
200e5a0: c0 26 60 04 clr [ %i1 + 4 ]
200e5a4: 80 a0 60 00 cmp %g1, 0
200e5a8: 02 80 00 03 be 200e5b4 <_RBTree_Extract_unprotected+0x138>
200e5ac: c0 26 40 00 clr [ %i1 ]
200e5b0: c0 20 60 0c clr [ %g1 + 0xc ]
200e5b4: 81 c7 e0 08 ret
200e5b8: 81 e8 00 00 restore
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
200e5bc: 80 a0 60 00 cmp %g1, 0
200e5c0: 22 80 00 28 be,a 200e660 <_RBTree_Extract_unprotected+0x1e4>
200e5c4: c2 06 40 00 ld [ %i1 ], %g1
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200e5c8: fa 06 60 04 ld [ %i1 + 4 ], %i5
200e5cc: 80 a7 60 00 cmp %i5, 0
200e5d0: 12 bf ff bb bne 200e4bc <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN
200e5d4: c2 26 20 0c st %g1, [ %i0 + 0xc ]
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
200e5d8: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
if( leaf ) {
200e5dc: 80 a7 20 00 cmp %i4, 0
200e5e0: 32 80 00 0c bne,a 200e610 <_RBTree_Extract_unprotected+0x194>
200e5e4: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
200e5e8: 7f ff fe e0 call 200e168 <_RBTree_Extract_validate_unprotected>
200e5ec: 90 10 00 19 mov %i1, %o0
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200e5f0: 10 80 00 0a b 200e618 <_RBTree_Extract_unprotected+0x19c>
200e5f4: c2 06 40 00 ld [ %i1 ], %g1
if (!the_node) return;
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
200e5f8: 80 a0 60 00 cmp %g1, 0
200e5fc: 22 80 00 14 be,a 200e64c <_RBTree_Extract_unprotected+0x1d0>
200e600: c2 06 40 00 ld [ %i1 ], %g1
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
200e604: 10 bf ff a6 b 200e49c <_RBTree_Extract_unprotected+0x20>
200e608: c2 26 20 08 st %g1, [ %i0 + 8 ]
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
200e60c: c2 06 40 00 ld [ %i1 ], %g1
200e610: c2 27 00 00 st %g1, [ %i4 ]
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200e614: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
200e618: c6 06 60 0c ld [ %i1 + 0xc ], %g3
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200e61c: c4 00 60 04 ld [ %g1 + 4 ], %g2
200e620: 84 18 80 19 xor %g2, %i1, %g2
200e624: 80 a0 00 02 cmp %g0, %g2
200e628: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = leaf;
200e62c: 85 28 a0 02 sll %g2, 2, %g2
200e630: 82 00 40 02 add %g1, %g2, %g1
200e634: 10 bf ff d3 b 200e580 <_RBTree_Extract_unprotected+0x104>
200e638: f8 20 60 04 st %i4, [ %g1 + 4 ]
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
200e63c: 7f ff fe cb call 200e168 <_RBTree_Extract_validate_unprotected>
200e640: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
200e644: 10 bf ff af b 200e500 <_RBTree_Extract_unprotected+0x84>
200e648: c4 07 40 00 ld [ %i5 ], %g2
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200e64c: 80 a6 00 01 cmp %i0, %g1
200e650: 12 bf ff 93 bne 200e49c <_RBTree_Extract_unprotected+0x20>
200e654: c2 26 20 08 st %g1, [ %i0 + 8 ]
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
200e658: 10 bf ff 91 b 200e49c <_RBTree_Extract_unprotected+0x20>
200e65c: c0 26 20 08 clr [ %i0 + 8 ]
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200e660: 80 a6 00 01 cmp %i0, %g1
200e664: 12 bf ff 92 bne 200e4ac <_RBTree_Extract_unprotected+0x30>
200e668: c2 26 20 0c st %g1, [ %i0 + 0xc ]
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
200e66c: 10 bf ff 90 b 200e4ac <_RBTree_Extract_unprotected+0x30>
200e670: c0 26 20 0c clr [ %i0 + 0xc ]
0200e168 <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
200e168: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
200e16c: c2 06 00 00 ld [ %i0 ], %g1
if(!parent->parent) return;
200e170: c4 00 40 00 ld [ %g1 ], %g2
200e174: 80 a0 a0 00 cmp %g2, 0
200e178: 02 80 00 bf be 200e474 <_RBTree_Extract_validate_unprotected+0x30c>
200e17c: 01 00 00 00 nop
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
200e180: c4 00 60 04 ld [ %g1 + 4 ], %g2
200e184: 80 a6 00 02 cmp %i0, %g2
200e188: 22 80 00 02 be,a 200e190 <_RBTree_Extract_validate_unprotected+0x28>
200e18c: c4 00 60 08 ld [ %g1 + 8 ], %g2
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
200e190: 98 10 20 01 mov 1, %o4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200e194: c6 06 20 0c ld [ %i0 + 0xc ], %g3
200e198: 80 a0 e0 01 cmp %g3, 1
200e19c: 22 80 00 58 be,a 200e2fc <_RBTree_Extract_validate_unprotected+0x194>
200e1a0: c2 06 00 00 ld [ %i0 ], %g1
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
200e1a4: c6 00 40 00 ld [ %g1 ], %g3
200e1a8: 80 a0 e0 00 cmp %g3, 0
200e1ac: 02 80 00 53 be 200e2f8 <_RBTree_Extract_validate_unprotected+0x190>
200e1b0: 80 a0 a0 00 cmp %g2, 0
200e1b4: 22 80 00 07 be,a 200e1d0 <_RBTree_Extract_validate_unprotected+0x68><== NEVER TAKEN
200e1b8: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED
200e1bc: c8 00 a0 0c ld [ %g2 + 0xc ], %g4
200e1c0: 80 a1 20 01 cmp %g4, 1
200e1c4: 22 80 00 28 be,a 200e264 <_RBTree_Extract_validate_unprotected+0xfc>
200e1c8: de 00 60 04 ld [ %g1 + 4 ], %o7
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
200e1cc: c6 00 a0 08 ld [ %g2 + 8 ], %g3
200e1d0: 80 a0 e0 00 cmp %g3, 0
200e1d4: 22 80 00 07 be,a 200e1f0 <_RBTree_Extract_validate_unprotected+0x88>
200e1d8: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200e1dc: c6 00 e0 0c ld [ %g3 + 0xc ], %g3
200e1e0: 80 a0 e0 01 cmp %g3, 1
200e1e4: 22 80 00 4c be,a 200e314 <_RBTree_Extract_validate_unprotected+0x1ac>
200e1e8: c6 00 60 04 ld [ %g1 + 4 ], %g3
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
200e1ec: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200e1f0: 80 a0 e0 00 cmp %g3, 0
200e1f4: 22 80 00 07 be,a 200e210 <_RBTree_Extract_validate_unprotected+0xa8>
200e1f8: d8 20 a0 0c st %o4, [ %g2 + 0xc ]
200e1fc: c6 00 e0 0c ld [ %g3 + 0xc ], %g3
200e200: 80 a0 e0 01 cmp %g3, 1
200e204: 22 80 00 44 be,a 200e314 <_RBTree_Extract_validate_unprotected+0x1ac>
200e208: c6 00 60 04 ld [ %g1 + 4 ], %g3
sibling->color = RBT_RED;
200e20c: d8 20 a0 0c st %o4, [ %g2 + 0xc ]
200e210: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200e214: 80 a0 a0 01 cmp %g2, 1
200e218: 22 80 00 38 be,a 200e2f8 <_RBTree_Extract_validate_unprotected+0x190>
200e21c: c0 20 60 0c clr [ %g1 + 0xc ]
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
200e220: c6 00 40 00 ld [ %g1 ], %g3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200e224: 80 a0 e0 00 cmp %g3, 0
200e228: 02 80 00 0a be 200e250 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN
200e22c: 84 10 20 00 clr %g2
if(!(the_node->parent->parent)) return NULL;
200e230: c8 00 c0 00 ld [ %g3 ], %g4
200e234: 80 a1 20 00 cmp %g4, 0
200e238: 02 80 00 07 be 200e254 <_RBTree_Extract_validate_unprotected+0xec>
200e23c: b0 10 00 01 mov %g1, %i0
if(the_node == the_node->parent->child[RBT_LEFT])
200e240: c4 00 e0 04 ld [ %g3 + 4 ], %g2
200e244: 80 a0 40 02 cmp %g1, %g2
200e248: 22 80 00 05 be,a 200e25c <_RBTree_Extract_validate_unprotected+0xf4>
200e24c: c4 00 e0 08 ld [ %g3 + 8 ], %g2
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
200e250: b0 10 00 01 mov %g1, %i0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200e254: 10 bf ff d0 b 200e194 <_RBTree_Extract_validate_unprotected+0x2c>
200e258: 82 10 00 03 mov %g3, %g1
200e25c: 10 bf ff ce b 200e194 <_RBTree_Extract_validate_unprotected+0x2c>
200e260: 82 10 00 03 mov %g3, %g1
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
200e264: c8 20 60 0c st %g4, [ %g1 + 0xc ]
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
200e268: 9e 1b c0 18 xor %o7, %i0, %o7
200e26c: 80 a0 00 0f cmp %g0, %o7
200e270: 9a 40 20 00 addx %g0, 0, %o5
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200e274: 88 21 00 0d sub %g4, %o5, %g4
200e278: 89 29 20 02 sll %g4, 2, %g4
200e27c: 88 00 40 04 add %g1, %g4, %g4
200e280: de 01 20 04 ld [ %g4 + 4 ], %o7
200e284: 80 a3 e0 00 cmp %o7, 0
200e288: 02 80 00 16 be 200e2e0 <_RBTree_Extract_validate_unprotected+0x178><== NEVER TAKEN
200e28c: c0 20 a0 0c clr [ %g2 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200e290: 85 2b 60 02 sll %o5, 2, %g2
200e294: 96 03 c0 02 add %o7, %g2, %o3
200e298: d4 02 e0 04 ld [ %o3 + 4 ], %o2
200e29c: d4 21 20 04 st %o2, [ %g4 + 4 ]
if (c->child[dir])
200e2a0: c8 02 e0 04 ld [ %o3 + 4 ], %g4
200e2a4: 80 a1 20 00 cmp %g4, 0
200e2a8: 02 80 00 04 be 200e2b8 <_RBTree_Extract_validate_unprotected+0x150><== NEVER TAKEN
200e2ac: 84 03 c0 02 add %o7, %g2, %g2
c->child[dir]->parent = the_node;
200e2b0: c2 21 00 00 st %g1, [ %g4 ]
200e2b4: c6 00 40 00 ld [ %g1 ], %g3
c->child[dir] = the_node;
200e2b8: c2 20 a0 04 st %g1, [ %g2 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e2bc: c4 00 e0 04 ld [ %g3 + 4 ], %g2
c->parent = the_node->parent;
200e2c0: c6 23 c0 00 st %g3, [ %o7 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e2c4: 84 18 40 02 xor %g1, %g2, %g2
c->parent = the_node->parent;
the_node->parent = c;
200e2c8: de 20 40 00 st %o7, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e2cc: 80 a0 00 02 cmp %g0, %g2
200e2d0: 84 40 20 00 addx %g0, 0, %g2
200e2d4: 85 28 a0 02 sll %g2, 2, %g2
200e2d8: 86 00 c0 02 add %g3, %g2, %g3
200e2dc: de 20 e0 04 st %o7, [ %g3 + 4 ]
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
200e2e0: 80 a0 00 0d cmp %g0, %o5
200e2e4: 84 60 3f ff subx %g0, -1, %g2
200e2e8: 85 28 a0 02 sll %g2, 2, %g2
200e2ec: 84 00 40 02 add %g1, %g2, %g2
200e2f0: 10 bf ff b7 b 200e1cc <_RBTree_Extract_validate_unprotected+0x64>
200e2f4: c4 00 a0 04 ld [ %g2 + 4 ], %g2
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200e2f8: c2 06 00 00 ld [ %i0 ], %g1
200e2fc: c2 00 40 00 ld [ %g1 ], %g1
200e300: 80 a0 60 00 cmp %g1, 0
200e304: 22 80 00 02 be,a 200e30c <_RBTree_Extract_validate_unprotected+0x1a4>
200e308: c0 26 20 0c clr [ %i0 + 0xc ]
200e30c: 81 c7 e0 08 ret
200e310: 81 e8 00 00 restore
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
200e314: 86 18 c0 18 xor %g3, %i0, %g3
200e318: 80 a0 00 03 cmp %g0, %g3
200e31c: 86 40 20 00 addx %g0, 0, %g3
if (!_RBTree_Is_red(sibling->child[!dir])) {
200e320: 80 a0 00 03 cmp %g0, %g3
200e324: 9e 60 3f ff subx %g0, -1, %o7
200e328: 9f 2b e0 02 sll %o7, 2, %o7
200e32c: 88 00 80 0f add %g2, %o7, %g4
200e330: c8 01 20 04 ld [ %g4 + 4 ], %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200e334: 80 a1 20 00 cmp %g4, 0
200e338: 22 80 00 07 be,a 200e354 <_RBTree_Extract_validate_unprotected+0x1ec>
200e33c: 89 28 e0 02 sll %g3, 2, %g4
200e340: da 01 20 0c ld [ %g4 + 0xc ], %o5
200e344: 80 a3 60 01 cmp %o5, 1
200e348: 22 80 00 28 be,a 200e3e8 <_RBTree_Extract_validate_unprotected+0x280>
200e34c: de 00 60 0c ld [ %g1 + 0xc ], %o7
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
200e350: 89 28 e0 02 sll %g3, 2, %g4
200e354: 88 00 80 04 add %g2, %g4, %g4
200e358: d6 01 20 04 ld [ %g4 + 4 ], %o3
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
200e35c: 88 10 20 01 mov 1, %g4
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
200e360: 98 18 e0 01 xor %g3, 1, %o4
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
200e364: c8 20 a0 0c st %g4, [ %g2 + 0xc ]
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200e368: 9a 21 00 0c sub %g4, %o4, %o5
200e36c: 9b 2b 60 02 sll %o5, 2, %o5
200e370: 9a 00 80 0d add %g2, %o5, %o5
200e374: c8 03 60 04 ld [ %o5 + 4 ], %g4
200e378: 80 a1 20 00 cmp %g4, 0
200e37c: 02 80 00 16 be 200e3d4 <_RBTree_Extract_validate_unprotected+0x26c><== NEVER TAKEN
200e380: c0 22 e0 0c clr [ %o3 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200e384: 99 2b 20 02 sll %o4, 2, %o4
200e388: 96 01 00 0c add %g4, %o4, %o3
200e38c: d4 02 e0 04 ld [ %o3 + 4 ], %o2
200e390: d4 23 60 04 st %o2, [ %o5 + 4 ]
if (c->child[dir])
200e394: da 02 e0 04 ld [ %o3 + 4 ], %o5
200e398: 80 a3 60 00 cmp %o5, 0
200e39c: 32 80 00 02 bne,a 200e3a4 <_RBTree_Extract_validate_unprotected+0x23c>
200e3a0: c4 23 40 00 st %g2, [ %o5 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e3a4: da 00 80 00 ld [ %g2 ], %o5
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200e3a8: 98 01 00 0c add %g4, %o4, %o4
200e3ac: c4 23 20 04 st %g2, [ %o4 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e3b0: d8 03 60 04 ld [ %o5 + 4 ], %o4
c->parent = the_node->parent;
200e3b4: da 21 00 00 st %o5, [ %g4 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e3b8: 98 18 80 0c xor %g2, %o4, %o4
c->parent = the_node->parent;
the_node->parent = c;
200e3bc: c8 20 80 00 st %g4, [ %g2 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e3c0: 80 a0 00 0c cmp %g0, %o4
200e3c4: 84 40 20 00 addx %g0, 0, %g2
200e3c8: 85 28 a0 02 sll %g2, 2, %g2
200e3cc: 9a 03 40 02 add %o5, %g2, %o5
200e3d0: c8 23 60 04 st %g4, [ %o5 + 4 ]
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
200e3d4: 84 00 40 0f add %g1, %o7, %g2
200e3d8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200e3dc: 9e 00 80 0f add %g2, %o7, %o7
200e3e0: c8 03 e0 04 ld [ %o7 + 4 ], %g4
}
sibling->color = parent->color;
200e3e4: de 00 60 0c ld [ %g1 + 0xc ], %o7
200e3e8: de 20 a0 0c st %o7, [ %g2 + 0xc ]
parent->color = RBT_BLACK;
200e3ec: c0 20 60 0c clr [ %g1 + 0xc ]
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200e3f0: 9e 10 20 01 mov 1, %o7
200e3f4: 9e 23 c0 03 sub %o7, %g3, %o7
200e3f8: 9f 2b e0 02 sll %o7, 2, %o7
200e3fc: 9e 00 40 0f add %g1, %o7, %o7
200e400: c4 03 e0 04 ld [ %o7 + 4 ], %g2
200e404: 80 a0 a0 00 cmp %g2, 0
200e408: 02 bf ff bc be 200e2f8 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN
200e40c: c0 21 20 0c clr [ %g4 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200e410: 87 28 e0 02 sll %g3, 2, %g3
200e414: 88 00 80 03 add %g2, %g3, %g4
200e418: da 01 20 04 ld [ %g4 + 4 ], %o5
200e41c: da 23 e0 04 st %o5, [ %o7 + 4 ]
if (c->child[dir])
200e420: c8 01 20 04 ld [ %g4 + 4 ], %g4
200e424: 80 a1 20 00 cmp %g4, 0
200e428: 32 80 00 02 bne,a 200e430 <_RBTree_Extract_validate_unprotected+0x2c8>
200e42c: c2 21 00 00 st %g1, [ %g4 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e430: c8 00 40 00 ld [ %g1 ], %g4
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200e434: 86 00 80 03 add %g2, %g3, %g3
200e438: c2 20 e0 04 st %g1, [ %g3 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e43c: c6 01 20 04 ld [ %g4 + 4 ], %g3
c->parent = the_node->parent;
200e440: c8 20 80 00 st %g4, [ %g2 ]
the_node->parent = c;
200e444: c4 20 40 00 st %g2, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e448: 86 18 40 03 xor %g1, %g3, %g3
200e44c: 80 a0 00 03 cmp %g0, %g3
200e450: 82 40 20 00 addx %g0, 0, %g1
200e454: 83 28 60 02 sll %g1, 2, %g1
200e458: 88 01 00 01 add %g4, %g1, %g4
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200e45c: c2 06 00 00 ld [ %i0 ], %g1
200e460: c4 21 20 04 st %g2, [ %g4 + 4 ]
200e464: c2 00 40 00 ld [ %g1 ], %g1
200e468: 80 a0 60 00 cmp %g1, 0
200e46c: 22 bf ff a8 be,a 200e30c <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
200e470: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
200e474: 81 c7 e0 08 ret
200e478: 81 e8 00 00 restore
02009f5c <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
2009f5c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
2009f60: 7f ff e6 59 call 20038c4 <sparc_disable_interrupts>
2009f64: b8 10 00 18 mov %i0, %i4
2009f68: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
2009f6c: f6 06 20 04 ld [ %i0 + 4 ], %i3
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2009f70: 80 a6 e0 00 cmp %i3, 0
2009f74: 02 80 00 15 be 2009fc8 <_RBTree_Find+0x6c> <== NEVER TAKEN
2009f78: b0 10 20 00 clr %i0
compare_result = the_rbtree->compare_function(the_node, iter_node);
2009f7c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
2009f80: 92 10 00 1b mov %i3, %o1
2009f84: 9f c0 40 00 call %g1
2009f88: 90 10 00 19 mov %i1, %o0
if (compare_result == 0) {
2009f8c: 80 a2 20 00 cmp %o0, 0
2009f90: 12 80 00 06 bne 2009fa8 <_RBTree_Find+0x4c>
2009f94: 82 1a 20 01 xor %o0, 1, %g1
found = iter_node;
if ( the_rbtree->is_unique )
2009f98: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2
2009f9c: 80 a0 a0 00 cmp %g2, 0
2009fa0: 12 80 00 0e bne 2009fd8 <_RBTree_Find+0x7c>
2009fa4: b0 10 00 1b mov %i3, %i0
break;
}
RBTree_Direction dir = (compare_result == 1);
2009fa8: 80 a0 00 01 cmp %g0, %g1
2009fac: 82 60 3f ff subx %g0, -1, %g1
iter_node = iter_node->child[dir];
2009fb0: 83 28 60 02 sll %g1, 2, %g1
2009fb4: b6 06 c0 01 add %i3, %g1, %i3
2009fb8: f6 06 e0 04 ld [ %i3 + 4 ], %i3
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2009fbc: 80 a6 e0 00 cmp %i3, 0
2009fc0: 32 bf ff f0 bne,a 2009f80 <_RBTree_Find+0x24>
2009fc4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
2009fc8: 7f ff e6 43 call 20038d4 <sparc_enable_interrupts>
2009fcc: 90 10 00 1d mov %i5, %o0
return return_node;
}
2009fd0: 81 c7 e0 08 ret
2009fd4: 81 e8 00 00 restore
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
2009fd8: 7f ff e6 3f call 20038d4 <sparc_enable_interrupts>
2009fdc: 90 10 00 1d mov %i5, %o0
return return_node;
}
2009fe0: 81 c7 e0 08 ret
2009fe4: 81 e8 00 00 restore
0200a2d0 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
200a2d0: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
200a2d4: 80 a6 20 00 cmp %i0, 0
200a2d8: 02 80 00 0f be 200a314 <_RBTree_Initialize+0x44> <== NEVER TAKEN
200a2dc: 80 a6 e0 00 cmp %i3, 0
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
200a2e0: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
200a2e4: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
200a2e8: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
200a2ec: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
200a2f0: f2 26 20 10 st %i1, [ %i0 + 0x10 ]
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200a2f4: 02 80 00 08 be 200a314 <_RBTree_Initialize+0x44> <== NEVER TAKEN
200a2f8: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert(the_rbtree, next);
200a2fc: 92 10 00 1a mov %i2, %o1
200a300: 7f ff ff ef call 200a2bc <_RBTree_Insert>
200a304: 90 10 00 18 mov %i0, %o0
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200a308: b6 86 ff ff addcc %i3, -1, %i3
200a30c: 12 bf ff fc bne 200a2fc <_RBTree_Initialize+0x2c>
200a310: b4 06 80 1c add %i2, %i4, %i2
200a314: 81 c7 e0 08 ret
200a318: 81 e8 00 00 restore
0200e69c <_RBTree_Validate_insert_unprotected>:
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
200e69c: 9d e3 bf a0 save %sp, -96, %sp
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200e6a0: 96 10 20 01 mov 1, %o3
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
200e6a4: c2 06 00 00 ld [ %i0 ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200e6a8: c4 00 40 00 ld [ %g1 ], %g2
200e6ac: 86 90 a0 00 orcc %g2, 0, %g3
200e6b0: 22 80 00 06 be,a 200e6c8 <_RBTree_Validate_insert_unprotected+0x2c>
200e6b4: c0 26 20 0c clr [ %i0 + 0xc ]
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200e6b8: c8 00 60 0c ld [ %g1 + 0xc ], %g4
200e6bc: 80 a1 20 01 cmp %g4, 1
200e6c0: 22 80 00 04 be,a 200e6d0 <_RBTree_Validate_insert_unprotected+0x34>
200e6c4: c8 00 80 00 ld [ %g2 ], %g4
200e6c8: 81 c7 e0 08 ret
200e6cc: 81 e8 00 00 restore
)
{
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;
200e6d0: 80 a1 20 00 cmp %g4, 0
200e6d4: 02 80 00 0c be 200e704 <_RBTree_Validate_insert_unprotected+0x68><== NEVER TAKEN
200e6d8: de 00 a0 04 ld [ %g2 + 4 ], %o7
{
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])
200e6dc: 80 a0 40 0f cmp %g1, %o7
200e6e0: 02 80 00 59 be 200e844 <_RBTree_Validate_insert_unprotected+0x1a8>
200e6e4: 88 10 00 0f mov %o7, %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200e6e8: 80 a1 20 00 cmp %g4, 0
200e6ec: 22 80 00 07 be,a 200e708 <_RBTree_Validate_insert_unprotected+0x6c>
200e6f0: c8 00 60 04 ld [ %g1 + 4 ], %g4
200e6f4: da 01 20 0c ld [ %g4 + 0xc ], %o5
200e6f8: 80 a3 60 01 cmp %o5, 1
200e6fc: 22 80 00 4c be,a 200e82c <_RBTree_Validate_insert_unprotected+0x190>
200e700: c0 20 60 0c clr [ %g1 + 0xc ]
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200e704: c8 00 60 04 ld [ %g1 + 4 ], %g4
RBTree_Direction pdir = the_node->parent != g->child[0];
200e708: 9e 18 40 0f xor %g1, %o7, %o7
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];
200e70c: 88 19 00 18 xor %g4, %i0, %g4
200e710: 80 a0 00 04 cmp %g0, %g4
200e714: 9a 40 20 00 addx %g0, 0, %o5
RBTree_Direction pdir = the_node->parent != g->child[0];
200e718: 80 a0 00 0f cmp %g0, %o7
200e71c: 88 40 20 00 addx %g0, 0, %g4
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200e720: 80 a3 40 04 cmp %o5, %g4
200e724: 02 80 00 46 be 200e83c <_RBTree_Validate_insert_unprotected+0x1a0>
200e728: 98 22 c0 0d sub %o3, %o5, %o4
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200e72c: 98 22 c0 04 sub %o3, %g4, %o4
200e730: 9b 2b 20 02 sll %o4, 2, %o5
200e734: 9a 00 40 0d add %g1, %o5, %o5
200e738: de 03 60 04 ld [ %o5 + 4 ], %o7
200e73c: 80 a3 e0 00 cmp %o7, 0
200e740: 02 80 00 16 be 200e798 <_RBTree_Validate_insert_unprotected+0xfc><== NEVER TAKEN
200e744: 89 29 20 02 sll %g4, 2, %g4
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200e748: 94 03 c0 04 add %o7, %g4, %o2
200e74c: d2 02 a0 04 ld [ %o2 + 4 ], %o1
200e750: d2 23 60 04 st %o1, [ %o5 + 4 ]
if (c->child[dir])
200e754: da 02 a0 04 ld [ %o2 + 4 ], %o5
200e758: 80 a3 60 00 cmp %o5, 0
200e75c: 22 80 00 05 be,a 200e770 <_RBTree_Validate_insert_unprotected+0xd4>
200e760: 9a 03 c0 04 add %o7, %g4, %o5
c->child[dir]->parent = the_node;
200e764: c2 23 40 00 st %g1, [ %o5 ]
200e768: c4 00 40 00 ld [ %g1 ], %g2
c->child[dir] = the_node;
200e76c: 9a 03 c0 04 add %o7, %g4, %o5
200e770: c2 23 60 04 st %g1, [ %o5 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e774: da 00 a0 04 ld [ %g2 + 4 ], %o5
c->parent = the_node->parent;
200e778: c4 23 c0 00 st %g2, [ %o7 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e77c: 9a 18 40 0d xor %g1, %o5, %o5
c->parent = the_node->parent;
the_node->parent = c;
200e780: de 20 40 00 st %o7, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e784: 80 a0 00 0d cmp %g0, %o5
200e788: 82 40 20 00 addx %g0, 0, %g1
200e78c: 83 28 60 02 sll %g1, 2, %g1
200e790: 84 00 80 01 add %g2, %g1, %g2
200e794: de 20 a0 04 st %o7, [ %g2 + 4 ]
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
200e798: b0 06 00 04 add %i0, %g4, %i0
200e79c: f0 06 20 04 ld [ %i0 + 4 ], %i0
200e7a0: c2 06 00 00 ld [ %i0 ], %g1
}
the_node->parent->color = RBT_BLACK;
200e7a4: c0 20 60 0c clr [ %g1 + 0xc ]
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200e7a8: 88 00 c0 04 add %g3, %g4, %g4
200e7ac: c2 01 20 04 ld [ %g4 + 4 ], %g1
200e7b0: 80 a0 60 00 cmp %g1, 0
200e7b4: 02 bf ff bc be 200e6a4 <_RBTree_Validate_insert_unprotected+0x8><== NEVER TAKEN
200e7b8: d6 20 e0 0c st %o3, [ %g3 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200e7bc: 99 2b 20 02 sll %o4, 2, %o4
200e7c0: 84 00 40 0c add %g1, %o4, %g2
200e7c4: de 00 a0 04 ld [ %g2 + 4 ], %o7
200e7c8: de 21 20 04 st %o7, [ %g4 + 4 ]
if (c->child[dir])
200e7cc: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200e7d0: 80 a0 a0 00 cmp %g2, 0
200e7d4: 32 80 00 02 bne,a 200e7dc <_RBTree_Validate_insert_unprotected+0x140>
200e7d8: c6 20 80 00 st %g3, [ %g2 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e7dc: c4 00 c0 00 ld [ %g3 ], %g2
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200e7e0: 98 00 40 0c add %g1, %o4, %o4
200e7e4: c6 23 20 04 st %g3, [ %o4 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e7e8: c8 00 a0 04 ld [ %g2 + 4 ], %g4
c->parent = the_node->parent;
200e7ec: c4 20 40 00 st %g2, [ %g1 ]
the_node->parent = c;
200e7f0: c2 20 c0 00 st %g1, [ %g3 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200e7f4: 88 19 00 03 xor %g4, %g3, %g4
200e7f8: 80 a0 00 04 cmp %g0, %g4
200e7fc: 86 40 20 00 addx %g0, 0, %g3
200e800: 87 28 e0 02 sll %g3, 2, %g3
200e804: 84 00 80 03 add %g2, %g3, %g2
200e808: c2 20 a0 04 st %g1, [ %g2 + 4 ]
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
200e80c: c2 06 00 00 ld [ %i0 ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200e810: c4 00 40 00 ld [ %g1 ], %g2
200e814: 86 90 a0 00 orcc %g2, 0, %g3
200e818: 32 bf ff a9 bne,a 200e6bc <_RBTree_Validate_insert_unprotected+0x20><== ALWAYS TAKEN
200e81c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
/* 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;
200e820: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
200e824: 81 c7 e0 08 ret <== NOT EXECUTED
200e828: 81 e8 00 00 restore <== NOT EXECUTED
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;
200e82c: c0 21 20 0c clr [ %g4 + 0xc ]
g->color = RBT_RED;
200e830: da 20 a0 0c st %o5, [ %g2 + 0xc ]
200e834: 10 bf ff 9c b 200e6a4 <_RBTree_Validate_insert_unprotected+0x8>
200e838: b0 10 00 02 mov %g2, %i0
200e83c: 10 bf ff da b 200e7a4 <_RBTree_Validate_insert_unprotected+0x108>
200e840: 89 2b 60 02 sll %o5, 2, %g4
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
200e844: 10 bf ff a9 b 200e6e8 <_RBTree_Validate_insert_unprotected+0x4c>
200e848: c8 00 a0 08 ld [ %g2 + 8 ], %g4
02006d28 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2006d28: 9d e3 bf 98 save %sp, -104, %sp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
2006d2c: 03 00 80 73 sethi %hi(0x201cc00), %g1
2006d30: 82 10 61 d4 or %g1, 0x1d4, %g1 ! 201cdd4 <Configuration_RTEMS_API>
2006d34: fa 00 60 2c ld [ %g1 + 0x2c ], %i5
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
2006d38: 80 a7 60 00 cmp %i5, 0
2006d3c: 02 80 00 18 be 2006d9c <_RTEMS_tasks_Initialize_user_tasks_body+0x74>
2006d40: f6 00 60 28 ld [ %g1 + 0x28 ], %i3
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
2006d44: 80 a6 e0 00 cmp %i3, 0
2006d48: 02 80 00 15 be 2006d9c <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN
2006d4c: b8 10 20 00 clr %i4
return_value = rtems_task_create(
2006d50: d4 07 60 04 ld [ %i5 + 4 ], %o2
2006d54: d0 07 40 00 ld [ %i5 ], %o0
2006d58: d2 07 60 08 ld [ %i5 + 8 ], %o1
2006d5c: d6 07 60 14 ld [ %i5 + 0x14 ], %o3
2006d60: d8 07 60 0c ld [ %i5 + 0xc ], %o4
2006d64: 7f ff ff 70 call 2006b24 <rtems_task_create>
2006d68: 9a 07 bf fc add %fp, -4, %o5
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
2006d6c: 94 92 20 00 orcc %o0, 0, %o2
2006d70: 12 80 00 0d bne 2006da4 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
2006d74: d0 07 bf fc ld [ %fp + -4 ], %o0
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
2006d78: d4 07 60 18 ld [ %i5 + 0x18 ], %o2
2006d7c: 40 00 00 0e call 2006db4 <rtems_task_start>
2006d80: d2 07 60 10 ld [ %i5 + 0x10 ], %o1
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
2006d84: 94 92 20 00 orcc %o0, 0, %o2
2006d88: 12 80 00 07 bne 2006da4 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
2006d8c: b8 07 20 01 inc %i4
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
2006d90: 80 a7 00 1b cmp %i4, %i3
2006d94: 12 bf ff ef bne 2006d50 <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN
2006d98: ba 07 60 1c add %i5, 0x1c, %i5
2006d9c: 81 c7 e0 08 ret
2006da0: 81 e8 00 00 restore
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
2006da4: 90 10 20 01 mov 1, %o0
2006da8: 40 00 04 1b call 2007e14 <_Internal_error_Occurred>
2006dac: 92 10 20 01 mov 1, %o1
0200cf08 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
200cf08: c2 02 21 64 ld [ %o0 + 0x164 ], %g1
while (tvp) {
200cf0c: 80 a0 60 00 cmp %g1, 0
200cf10: 22 80 00 0c be,a 200cf40 <_RTEMS_tasks_Switch_extension+0x38>
200cf14: c2 02 61 64 ld [ %o1 + 0x164 ], %g1
tvp->tval = *tvp->ptr;
200cf18: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->gval;
200cf1c: c6 00 60 08 ld [ %g1 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
200cf20: c8 00 80 00 ld [ %g2 ], %g4
200cf24: c8 20 60 0c st %g4, [ %g1 + 0xc ]
*tvp->ptr = tvp->gval;
200cf28: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200cf2c: c2 00 40 00 ld [ %g1 ], %g1
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
200cf30: 80 a0 60 00 cmp %g1, 0
200cf34: 32 bf ff fa bne,a 200cf1c <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN
200cf38: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
200cf3c: c2 02 61 64 ld [ %o1 + 0x164 ], %g1
while (tvp) {
200cf40: 80 a0 60 00 cmp %g1, 0
200cf44: 02 80 00 0b be 200cf70 <_RTEMS_tasks_Switch_extension+0x68>
200cf48: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
200cf4c: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->tval;
200cf50: c6 00 60 0c ld [ %g1 + 0xc ], %g3
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
200cf54: c8 00 80 00 ld [ %g2 ], %g4
200cf58: c8 20 60 08 st %g4, [ %g1 + 8 ]
*tvp->ptr = tvp->tval;
200cf5c: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200cf60: c2 00 40 00 ld [ %g1 ], %g1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
200cf64: 80 a0 60 00 cmp %g1, 0
200cf68: 32 bf ff fa bne,a 200cf50 <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN
200cf6c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
200cf70: 81 c3 e0 08 retl
02007aec <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2007aec: 9d e3 bf 98 save %sp, -104, %sp
2007af0: 11 00 80 7e sethi %hi(0x201f800), %o0
2007af4: 92 10 00 18 mov %i0, %o1
2007af8: 90 12 20 44 or %o0, 0x44, %o0
2007afc: 40 00 08 53 call 2009c48 <_Objects_Get>
2007b00: 94 07 bf fc add %fp, -4, %o2
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
2007b04: c2 07 bf fc ld [ %fp + -4 ], %g1
2007b08: 80 a0 60 00 cmp %g1, 0
2007b0c: 12 80 00 17 bne 2007b68 <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN
2007b10: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2007b14: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2007b18: 03 00 00 10 sethi %hi(0x4000), %g1
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
2007b1c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2007b20: 80 88 80 01 btst %g2, %g1
2007b24: 22 80 00 08 be,a 2007b44 <_Rate_monotonic_Timeout+0x58>
2007b28: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2007b2c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2007b30: c2 07 60 08 ld [ %i5 + 8 ], %g1
2007b34: 80 a0 80 01 cmp %g2, %g1
2007b38: 02 80 00 1a be 2007ba0 <_Rate_monotonic_Timeout+0xb4>
2007b3c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
2007b40: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2007b44: 80 a0 60 01 cmp %g1, 1
2007b48: 02 80 00 0a be 2007b70 <_Rate_monotonic_Timeout+0x84>
2007b4c: 82 10 20 04 mov 4, %g1
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2007b50: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2007b54: 03 00 80 7e sethi %hi(0x201f800), %g1
2007b58: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 ! 201f9b0 <_Thread_Dispatch_disable_level>
2007b5c: 84 00 bf ff add %g2, -1, %g2
2007b60: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ]
return _Thread_Dispatch_disable_level;
2007b64: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1
2007b68: 81 c7 e0 08 ret
2007b6c: 81 e8 00 00 restore
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2007b70: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
2007b74: 90 10 00 1d mov %i5, %o0
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2007b78: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
2007b7c: 7f ff fe 49 call 20074a0 <_Rate_monotonic_Initiate_statistics>
2007b80: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007b84: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007b88: 11 00 80 7e sethi %hi(0x201f800), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007b8c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007b90: 90 12 22 6c or %o0, 0x26c, %o0
2007b94: 40 00 10 50 call 200bcd4 <_Watchdog_Insert>
2007b98: 92 07 60 10 add %i5, 0x10, %o1
2007b9c: 30 bf ff ee b,a 2007b54 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007ba0: 40 00 0b 33 call 200a86c <_Thread_Clear_state>
2007ba4: 92 12 63 f8 or %o1, 0x3f8, %o1
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
2007ba8: 10 bf ff f5 b 2007b7c <_Rate_monotonic_Timeout+0x90>
2007bac: 90 10 00 1d mov %i5, %o0
0200a644 <_Scheduler_CBS_Budget_callout>:
#include <rtems/rtems/signal.h>
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
200a644: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200a648: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1
if ( the_thread->real_priority != new_priority )
200a64c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200a650: 80 a0 40 09 cmp %g1, %o1
200a654: 32 80 00 02 bne,a 200a65c <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
200a658: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200a65c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a660: 80 a0 40 09 cmp %g1, %o1
200a664: 02 80 00 04 be 200a674 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
200a668: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200a66c: 40 00 01 a0 call 200acec <_Thread_Change_priority>
200a670: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200a674: f0 06 20 8c ld [ %i0 + 0x8c ], %i0
if ( sched_info->cbs_server->cbs_budget_overrun ) {
200a678: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200a67c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200a680: 80 a0 a0 00 cmp %g2, 0
200a684: 02 80 00 09 be 200a6a8 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
200a688: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
200a68c: d0 00 40 00 ld [ %g1 ], %o0
200a690: 7f ff ff d1 call 200a5d4 <_Scheduler_CBS_Get_server_id>
200a694: 92 07 bf fc add %fp, -4, %o1
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
200a698: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200a69c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200a6a0: 9f c0 40 00 call %g1
200a6a4: d0 07 bf fc ld [ %fp + -4 ], %o0
200a6a8: 81 c7 e0 08 ret
200a6ac: 81 e8 00 00 restore
0200a1ac <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
200a1ac: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a1b0: 39 00 80 81 sethi %hi(0x2020400), %i4
200a1b4: c2 07 21 d0 ld [ %i4 + 0x1d0 ], %g1 ! 20205d0 <_Scheduler_CBS_Maximum_servers>
200a1b8: 80 a0 60 00 cmp %g1, 0
200a1bc: 02 80 00 18 be 200a21c <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN
200a1c0: 03 00 80 83 sethi %hi(0x2020c00), %g1
200a1c4: 37 00 80 83 sethi %hi(0x2020c00), %i3
200a1c8: c4 06 e3 54 ld [ %i3 + 0x354 ], %g2 ! 2020f54 <_Scheduler_CBS_Server_list>
200a1cc: ba 10 20 00 clr %i5
200a1d0: b8 17 21 d0 or %i4, 0x1d0, %i4
if ( _Scheduler_CBS_Server_list[ i ] )
200a1d4: 83 2f 60 02 sll %i5, 2, %g1
200a1d8: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200a1dc: 80 a0 60 00 cmp %g1, 0
200a1e0: 02 80 00 05 be 200a1f4 <_Scheduler_CBS_Cleanup+0x48>
200a1e4: 90 10 00 1d mov %i5, %o0
_Scheduler_CBS_Destroy_server( i );
200a1e8: 40 00 00 45 call 200a2fc <_Scheduler_CBS_Destroy_server>
200a1ec: 01 00 00 00 nop
200a1f0: c4 06 e3 54 ld [ %i3 + 0x354 ], %g2
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a1f4: c2 07 00 00 ld [ %i4 ], %g1
200a1f8: ba 07 60 01 inc %i5
200a1fc: 80 a0 40 1d cmp %g1, %i5
200a200: 18 bf ff f6 bgu 200a1d8 <_Scheduler_CBS_Cleanup+0x2c>
200a204: 83 2f 60 02 sll %i5, 2, %g1
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
return SCHEDULER_CBS_OK;
}
200a208: b0 10 20 00 clr %i0
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
200a20c: 40 00 08 c1 call 200c510 <_Workspace_Free>
200a210: 90 10 00 02 mov %g2, %o0
return SCHEDULER_CBS_OK;
}
200a214: 81 c7 e0 08 ret
200a218: 81 e8 00 00 restore
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a21c: 10 bf ff fb b 200a208 <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED
200a220: c4 00 63 54 ld [ %g1 + 0x354 ], %g2 <== NOT EXECUTED
0200a224 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200a224: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200a228: c2 06 20 04 ld [ %i0 + 4 ], %g1
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200a22c: ba 10 00 18 mov %i0, %i5
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200a230: 80 a0 60 00 cmp %g1, 0
200a234: 04 80 00 30 ble 200a2f4 <_Scheduler_CBS_Create_server+0xd0>
200a238: b0 10 3f ee mov -18, %i0
200a23c: c2 07 40 00 ld [ %i5 ], %g1
200a240: 80 a0 60 00 cmp %g1, 0
200a244: 04 80 00 2c ble 200a2f4 <_Scheduler_CBS_Create_server+0xd0>
200a248: 03 00 80 81 sethi %hi(0x2020400), %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a24c: c6 00 61 d0 ld [ %g1 + 0x1d0 ], %g3 ! 20205d0 <_Scheduler_CBS_Maximum_servers>
200a250: 80 a0 e0 00 cmp %g3, 0
200a254: 02 80 00 28 be 200a2f4 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200a258: b0 10 3f e6 mov -26, %i0
if ( !_Scheduler_CBS_Server_list[i] )
200a25c: 37 00 80 83 sethi %hi(0x2020c00), %i3
200a260: f8 06 e3 54 ld [ %i3 + 0x354 ], %i4 ! 2020f54 <_Scheduler_CBS_Server_list>
200a264: c2 07 00 00 ld [ %i4 ], %g1
200a268: 80 a0 60 00 cmp %g1, 0
200a26c: 02 80 00 0e be 200a2a4 <_Scheduler_CBS_Create_server+0x80>
200a270: 82 10 20 00 clr %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a274: 10 80 00 07 b 200a290 <_Scheduler_CBS_Create_server+0x6c>
200a278: 82 00 60 01 inc %g1
if ( !_Scheduler_CBS_Server_list[i] )
200a27c: c4 07 00 18 ld [ %i4 + %i0 ], %g2
200a280: 80 a0 a0 00 cmp %g2, 0
200a284: 22 80 00 0a be,a 200a2ac <_Scheduler_CBS_Create_server+0x88>
200a288: c2 26 80 00 st %g1, [ %i2 ]
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a28c: 82 00 60 01 inc %g1
200a290: 80 a0 40 03 cmp %g1, %g3
200a294: 12 bf ff fa bne 200a27c <_Scheduler_CBS_Create_server+0x58>
200a298: b1 28 60 02 sll %g1, 2, %i0
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
200a29c: 81 c7 e0 08 ret
200a2a0: 91 e8 3f e6 restore %g0, -26, %o0
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
200a2a4: b0 10 20 00 clr %i0
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
200a2a8: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
200a2ac: 40 00 08 91 call 200c4f0 <_Workspace_Allocate>
200a2b0: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
200a2b4: c2 06 80 00 ld [ %i2 ], %g1
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
200a2b8: d0 27 00 18 st %o0, [ %i4 + %i0 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
200a2bc: c4 06 e3 54 ld [ %i3 + 0x354 ], %g2
200a2c0: 83 28 60 02 sll %g1, 2, %g1
200a2c4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
200a2c8: 80 a0 60 00 cmp %g1, 0
200a2cc: 02 80 00 0a be 200a2f4 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200a2d0: b0 10 3f ef mov -17, %i0
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200a2d4: c4 07 40 00 ld [ %i5 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
200a2d8: b0 10 20 00 clr %i0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200a2dc: c4 20 60 04 st %g2, [ %g1 + 4 ]
200a2e0: c4 07 60 04 ld [ %i5 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
200a2e4: f2 20 60 0c st %i1, [ %g1 + 0xc ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200a2e8: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
200a2ec: 84 10 3f ff mov -1, %g2
200a2f0: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
200a2f4: 81 c7 e0 08 ret
200a2f8: 81 e8 00 00 restore
0200a36c <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
200a36c: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
200a370: 92 07 bf fc add %fp, -4, %o1
200a374: 40 00 03 ab call 200b220 <_Thread_Get>
200a378: 90 10 00 19 mov %i1, %o0
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200a37c: b8 92 20 00 orcc %o0, 0, %i4
200a380: 22 80 00 06 be,a 200a398 <_Scheduler_CBS_Detach_thread+0x2c>
200a384: 03 00 80 81 sethi %hi(0x2020400), %g1
_Thread_Enable_dispatch();
200a388: 40 00 03 99 call 200b1ec <_Thread_Enable_dispatch>
200a38c: 01 00 00 00 nop
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200a390: fa 07 20 8c ld [ %i4 + 0x8c ], %i5
}
if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
200a394: 03 00 80 81 sethi %hi(0x2020400), %g1
200a398: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20205d0 <_Scheduler_CBS_Maximum_servers>
200a39c: 80 a0 80 18 cmp %g2, %i0
200a3a0: 08 80 00 1a bleu 200a408 <_Scheduler_CBS_Detach_thread+0x9c>
200a3a4: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
200a3a8: 80 a7 20 00 cmp %i4, 0
200a3ac: 02 80 00 17 be 200a408 <_Scheduler_CBS_Detach_thread+0x9c>
200a3b0: 01 00 00 00 nop
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
200a3b4: 03 00 80 83 sethi %hi(0x2020c00), %g1
200a3b8: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 2020f54 <_Scheduler_CBS_Server_list>
200a3bc: b1 2e 20 02 sll %i0, 2, %i0
200a3c0: c4 00 40 18 ld [ %g1 + %i0 ], %g2
200a3c4: 80 a0 a0 00 cmp %g2, 0
200a3c8: 02 80 00 10 be 200a408 <_Scheduler_CBS_Detach_thread+0x9c>
200a3cc: 82 10 3f e7 mov -25, %g1
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
200a3d0: c6 00 80 00 ld [ %g2 ], %g3
200a3d4: 80 a0 c0 19 cmp %g3, %i1
200a3d8: 12 80 00 0c bne 200a408 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
200a3dc: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200a3e0: 82 10 3f ff mov -1, %g1
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200a3e4: c6 07 20 a4 ld [ %i4 + 0xa4 ], %g3
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200a3e8: c2 20 80 00 st %g1, [ %g2 ]
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200a3ec: c2 0f 20 a0 ldub [ %i4 + 0xa0 ], %g1
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200a3f0: c4 07 20 a8 ld [ %i4 + 0xa8 ], %g2
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info->cbs_server = NULL;
200a3f4: c0 27 60 18 clr [ %i5 + 0x18 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200a3f8: c2 2f 20 74 stb %g1, [ %i4 + 0x74 ]
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200a3fc: c6 27 20 7c st %g3, [ %i4 + 0x7c ]
the_thread->budget_callout = the_thread->Start.budget_callout;
200a400: c4 27 20 80 st %g2, [ %i4 + 0x80 ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
200a404: 82 10 20 00 clr %g1
}
200a408: 81 c7 e0 08 ret
200a40c: 91 e8 00 01 restore %g0, %g1, %o0
0200a454 <_Scheduler_CBS_Get_execution_time>:
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
200a454: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
200a458: 03 00 80 81 sethi %hi(0x2020400), %g1
200a45c: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 20205d0 <_Scheduler_CBS_Maximum_servers>
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
200a460: ba 10 00 18 mov %i0, %i5
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
200a464: 80 a0 40 1d cmp %g1, %i5
200a468: 08 80 00 0e bleu 200a4a0 <_Scheduler_CBS_Get_execution_time+0x4c>
200a46c: b0 10 3f ee mov -18, %i0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
200a470: 39 00 80 83 sethi %hi(0x2020c00), %i4
200a474: c2 07 23 54 ld [ %i4 + 0x354 ], %g1 ! 2020f54 <_Scheduler_CBS_Server_list>
200a478: bb 2f 60 02 sll %i5, 2, %i5
200a47c: c2 00 40 1d ld [ %g1 + %i5 ], %g1
200a480: 80 a0 60 00 cmp %g1, 0
200a484: 02 80 00 07 be 200a4a0 <_Scheduler_CBS_Get_execution_time+0x4c>
200a488: b0 10 3f e7 mov -25, %i0
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( !_Scheduler_CBS_Server_list[server_id]->task_id ) {
200a48c: d0 00 40 00 ld [ %g1 ], %o0
200a490: 80 a2 20 00 cmp %o0, 0
200a494: 12 80 00 0a bne 200a4bc <_Scheduler_CBS_Get_execution_time+0x68><== ALWAYS TAKEN
200a498: b0 10 20 00 clr %i0
*exec_time = 0;
200a49c: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
return SCHEDULER_CBS_OK;
200a4a0: 81 c7 e0 08 ret
200a4a4: 81 e8 00 00 restore
_Thread_Enable_dispatch();
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
the_thread->cpu_time_budget;
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
200a4a8: c2 00 40 1d ld [ %g1 + %i5 ], %g1
200a4ac: c2 00 60 08 ld [ %g1 + 8 ], %g1
200a4b0: c2 26 40 00 st %g1, [ %i1 ]
}
return SCHEDULER_CBS_OK;
}
200a4b4: 81 c7 e0 08 ret
200a4b8: 91 e8 20 00 restore %g0, 0, %o0
if ( !_Scheduler_CBS_Server_list[server_id]->task_id ) {
*exec_time = 0;
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
200a4bc: 40 00 03 59 call 200b220 <_Thread_Get>
200a4c0: 92 07 bf fc add %fp, -4, %o1
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200a4c4: b6 92 20 00 orcc %o0, 0, %i3
200a4c8: 02 bf ff f8 be 200a4a8 <_Scheduler_CBS_Get_execution_time+0x54>
200a4cc: c2 07 23 54 ld [ %i4 + 0x354 ], %g1
_Thread_Enable_dispatch();
200a4d0: 40 00 03 47 call 200b1ec <_Thread_Enable_dispatch>
200a4d4: b0 10 20 00 clr %i0
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
200a4d8: c4 07 23 54 ld [ %i4 + 0x354 ], %g2
200a4dc: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1
200a4e0: c4 00 80 1d ld [ %g2 + %i5 ], %g2
200a4e4: c4 00 a0 08 ld [ %g2 + 8 ], %g2
200a4e8: 82 20 80 01 sub %g2, %g1, %g1
200a4ec: c2 26 40 00 st %g1, [ %i1 ]
200a4f0: 81 c7 e0 08 ret
200a4f4: 81 e8 00 00 restore
0200a5d4 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200a5d4: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a5d8: 03 00 80 81 sethi %hi(0x2020400), %g1
200a5dc: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 20205d0 <_Scheduler_CBS_Maximum_servers>
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200a5e0: 84 10 00 18 mov %i0, %g2
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a5e4: 80 a0 60 00 cmp %g1, 0
200a5e8: 02 80 00 13 be 200a634 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN
200a5ec: b0 10 3f e7 mov -25, %i0
200a5f0: 07 00 80 83 sethi %hi(0x2020c00), %g3
200a5f4: de 00 e3 54 ld [ %g3 + 0x354 ], %o7 ! 2020f54 <_Scheduler_CBS_Server_list>
200a5f8: 86 10 20 00 clr %g3
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Get_server_id (
200a5fc: 89 28 e0 02 sll %g3, 2, %g4
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
200a600: c8 03 c0 04 ld [ %o7 + %g4 ], %g4
200a604: 80 a1 20 00 cmp %g4, 0
200a608: 22 80 00 07 be,a 200a624 <_Scheduler_CBS_Get_server_id+0x50>
200a60c: 86 00 e0 01 inc %g3
200a610: c8 01 00 00 ld [ %g4 ], %g4
200a614: 80 a1 00 02 cmp %g4, %g2
200a618: 22 80 00 09 be,a 200a63c <_Scheduler_CBS_Get_server_id+0x68>
200a61c: c6 26 40 00 st %g3, [ %i1 ]
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200a620: 86 00 e0 01 inc %g3
200a624: 80 a0 c0 01 cmp %g3, %g1
200a628: 12 bf ff f6 bne 200a600 <_Scheduler_CBS_Get_server_id+0x2c>
200a62c: 89 28 e0 02 sll %g3, 2, %g4
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
200a630: b0 10 3f e7 mov -25, %i0
}
200a634: 81 c7 e0 08 ret
200a638: 81 e8 00 00 restore
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
200a63c: 81 c7 e0 08 ret
200a640: 91 e8 20 00 restore %g0, 0, %o0
0200a6b0 <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
200a6b0: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
200a6b4: 3b 00 80 81 sethi %hi(0x2020400), %i5
200a6b8: d0 07 61 d0 ld [ %i5 + 0x1d0 ], %o0 ! 20205d0 <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
200a6bc: b0 10 3f ef mov -17, %i0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
200a6c0: 40 00 07 8c call 200c4f0 <_Workspace_Allocate>
200a6c4: 91 2a 20 02 sll %o0, 2, %o0
200a6c8: 09 00 80 83 sethi %hi(0x2020c00), %g4
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
200a6cc: 80 a2 20 00 cmp %o0, 0
200a6d0: 02 80 00 0f be 200a70c <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200a6d4: d0 21 23 54 st %o0, [ %g4 + 0x354 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200a6d8: c6 07 61 d0 ld [ %i5 + 0x1d0 ], %g3
200a6dc: 80 a0 e0 00 cmp %g3, 0
200a6e0: 02 80 00 0b be 200a70c <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200a6e4: b0 10 20 00 clr %i0
200a6e8: 10 80 00 03 b 200a6f4 <_Scheduler_CBS_Initialize+0x44>
200a6ec: 82 10 20 00 clr %g1
200a6f0: d0 01 23 54 ld [ %g4 + 0x354 ], %o0
_Scheduler_CBS_Server_list[i] = NULL;
200a6f4: 85 28 60 02 sll %g1, 2, %g2
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200a6f8: 82 00 60 01 inc %g1
200a6fc: 80 a0 40 03 cmp %g1, %g3
200a700: 12 bf ff fc bne 200a6f0 <_Scheduler_CBS_Initialize+0x40>
200a704: c0 22 00 02 clr [ %o0 + %g2 ]
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
200a708: b0 10 20 00 clr %i0
}
200a70c: 81 c7 e0 08 ret
200a710: 81 e8 00 00 restore
02009188 <_Scheduler_CBS_Release_job>:
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
2009188: c2 02 20 8c ld [ %o0 + 0x8c ], %g1
if (deadline) {
200918c: 80 a2 60 00 cmp %o1, 0
2009190: 02 80 00 11 be 20091d4 <_Scheduler_CBS_Release_job+0x4c>
2009194: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
2009198: 80 a0 60 00 cmp %g1, 0
200919c: 02 80 00 13 be 20091e8 <_Scheduler_CBS_Release_job+0x60>
20091a0: 07 00 80 7d sethi %hi(0x201f400), %g3
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
20091a4: c4 00 60 04 ld [ %g1 + 4 ], %g2
20091a8: d2 00 e2 9c ld [ %g3 + 0x29c ], %o1
20091ac: 92 02 40 02 add %o1, %g2, %o1
20091b0: 05 20 00 00 sethi %hi(0x80000000), %g2
20091b4: 92 2a 40 02 andn %o1, %g2, %o1
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
20091b8: c2 00 60 08 ld [ %g1 + 8 ], %g1
20091bc: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
the_thread->real_priority = new_priority;
20091c0: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
20091c4: 94 10 20 01 mov 1, %o2
20091c8: 82 13 c0 00 mov %o7, %g1
20091cc: 40 00 01 4c call 20096fc <_Thread_Change_priority>
20091d0: 9e 10 40 00 mov %g1, %o7
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
20091d4: 80 a0 60 00 cmp %g1, 0
20091d8: 12 bf ff f8 bne 20091b8 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN
20091dc: d2 02 20 b0 ld [ %o0 + 0xb0 ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
the_thread->real_priority = new_priority;
20091e0: 10 bf ff f9 b 20091c4 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED
20091e4: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
20091e8: 03 00 80 7d sethi %hi(0x201f400), %g1
20091ec: c2 00 62 9c ld [ %g1 + 0x29c ], %g1 ! 201f69c <_Watchdog_Ticks_since_boot>
20091f0: 92 02 40 01 add %o1, %g1, %o1
20091f4: 03 20 00 00 sethi %hi(0x80000000), %g1
20091f8: 10 bf ff f2 b 20091c0 <_Scheduler_CBS_Release_job+0x38>
20091fc: 92 2a 40 01 andn %o1, %g1, %o1
02009200 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
2009200: 9d e3 bf a0 save %sp, -96, %sp
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
2009204: 40 00 00 5b call 2009370 <_Scheduler_EDF_Enqueue>
2009208: 90 10 00 18 mov %i0, %o0
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
200920c: c2 06 20 8c ld [ %i0 + 0x8c ], %g1
2009210: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
2009214: 80 a7 60 00 cmp %i5, 0
2009218: 02 80 00 19 be 200927c <_Scheduler_CBS_Unblock+0x7c>
200921c: 03 00 80 7d sethi %hi(0x201f400), %g1
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
2009220: d2 07 60 04 ld [ %i5 + 4 ], %o1
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
2009224: d0 00 62 9c ld [ %g1 + 0x29c ], %o0
2009228: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200922c: 40 00 43 77 call 201a008 <.umul>
2009230: 90 27 00 08 sub %i4, %o0, %o0
2009234: d2 06 20 78 ld [ %i0 + 0x78 ], %o1
2009238: b6 10 00 08 mov %o0, %i3
200923c: 40 00 43 73 call 201a008 <.umul>
2009240: d0 07 60 08 ld [ %i5 + 8 ], %o0
2009244: 80 a6 c0 08 cmp %i3, %o0
2009248: 24 80 00 0e ble,a 2009280 <_Scheduler_CBS_Unblock+0x80>
200924c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
2009250: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1
if ( the_thread->real_priority != new_priority )
2009254: 80 a7 00 09 cmp %i4, %o1
2009258: 32 80 00 02 bne,a 2009260 <_Scheduler_CBS_Unblock+0x60>
200925c: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
2009260: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
2009264: 80 a2 00 09 cmp %o0, %o1
2009268: 02 80 00 07 be 2009284 <_Scheduler_CBS_Unblock+0x84>
200926c: 3b 00 80 7e sethi %hi(0x201f800), %i5
_Thread_Change_priority(the_thread, new_priority, true);
2009270: 90 10 00 18 mov %i0, %o0
2009274: 40 00 01 22 call 20096fc <_Thread_Change_priority>
2009278: 94 10 20 01 mov 1, %o2
200927c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
2009280: 3b 00 80 7e sethi %hi(0x201f800), %i5
2009284: ba 17 62 d0 or %i5, 0x2d0, %i5 ! 201fad0 <_Per_CPU_Information>
2009288: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200928c: d2 00 60 14 ld [ %g1 + 0x14 ], %o1
2009290: 03 00 80 7a sethi %hi(0x201e800), %g1
2009294: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 ! 201e8c4 <_Scheduler+0x30>
2009298: 9f c0 40 00 call %g1
200929c: 01 00 00 00 nop
20092a0: 80 a2 20 00 cmp %o0, 0
20092a4: 04 80 00 0a ble 20092cc <_Scheduler_CBS_Unblock+0xcc>
20092a8: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
20092ac: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
20092b0: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
20092b4: c2 08 60 74 ldub [ %g1 + 0x74 ], %g1
20092b8: 80 a0 60 00 cmp %g1, 0
20092bc: 22 80 00 06 be,a 20092d4 <_Scheduler_CBS_Unblock+0xd4> <== NEVER TAKEN
20092c0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
20092c4: 82 10 20 01 mov 1, %g1
20092c8: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
20092cc: 81 c7 e0 08 ret
20092d0: 81 e8 00 00 restore
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
20092d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20092d8: 12 bf ff fd bne 20092cc <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED
20092dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
20092e0: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
20092e4: 30 bf ff fa b,a 20092cc <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED
020092e8 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
20092e8: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
20092ec: 40 00 07 10 call 200af2c <_Workspace_Allocate>
20092f0: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
20092f4: 80 a2 20 00 cmp %o0, 0
20092f8: 02 80 00 05 be 200930c <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
20092fc: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
2009300: d0 26 20 8c st %o0, [ %i0 + 0x8c ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
2009304: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
2009308: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
200930c: 81 c7 e0 08 ret
2009310: 91 e8 00 08 restore %g0, %o0, %o0
0200931c <_Scheduler_EDF_Release_job>:
uint32_t deadline
)
{
Priority_Control new_priority;
if (deadline) {
200931c: 80 a2 60 00 cmp %o1, 0
2009320: 12 80 00 07 bne 200933c <_Scheduler_EDF_Release_job+0x20> <== ALWAYS TAKEN
2009324: 94 10 20 01 mov 1, %o2
new_priority = (_Watchdog_Ticks_since_boot + deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
2009328: d2 02 20 b0 ld [ %o0 + 0xb0 ], %o1 <== NOT EXECUTED
}
the_thread->real_priority = new_priority;
200932c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED
_Thread_Change_priority(the_thread, new_priority, true);
2009330: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2009334: 40 00 00 ca call 200965c <_Thread_Change_priority> <== NOT EXECUTED
2009338: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
{
Priority_Control new_priority;
if (deadline) {
/* Initializing or shifting deadline. */
new_priority = (_Watchdog_Ticks_since_boot + deadline)
200933c: 03 00 80 7d sethi %hi(0x201f400), %g1
2009340: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 201f5ec <_Watchdog_Ticks_since_boot>
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
_Thread_Change_priority(the_thread, new_priority, true);
2009344: 94 10 20 01 mov 1, %o2
{
Priority_Control new_priority;
if (deadline) {
/* Initializing or shifting deadline. */
new_priority = (_Watchdog_Ticks_since_boot + deadline)
2009348: 92 02 40 01 add %o1, %g1, %o1
200934c: 03 20 00 00 sethi %hi(0x80000000), %g1
2009350: 92 2a 40 01 andn %o1, %g1, %o1
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
2009354: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
2009358: 82 13 c0 00 mov %o7, %g1
200935c: 40 00 00 c0 call 200965c <_Thread_Change_priority>
2009360: 9e 10 40 00 mov %g1, %o7
0200938c <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
200938c: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
2009390: 7f ff ff a0 call 2009210 <_Scheduler_EDF_Enqueue>
2009394: 90 10 00 18 mov %i0, %o0
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
2009398: 3b 00 80 7e sethi %hi(0x201f800), %i5
200939c: ba 17 62 20 or %i5, 0x220, %i5 ! 201fa20 <_Per_CPU_Information>
20093a0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
20093a4: d0 00 60 14 ld [ %g1 + 0x14 ], %o0
20093a8: 03 00 80 7a sethi %hi(0x201e800), %g1
20093ac: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 201e824 <_Scheduler+0x30>
20093b0: 9f c0 40 00 call %g1
20093b4: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
20093b8: 80 a2 20 00 cmp %o0, 0
20093bc: 26 80 00 04 bl,a 20093cc <_Scheduler_EDF_Unblock+0x40>
20093c0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20093c4: 81 c7 e0 08 ret
20093c8: 81 e8 00 00 restore
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
20093cc: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
20093d0: c2 08 60 74 ldub [ %g1 + 0x74 ], %g1
20093d4: 80 a0 60 00 cmp %g1, 0
20093d8: 22 80 00 06 be,a 20093f0 <_Scheduler_EDF_Unblock+0x64>
20093dc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
20093e0: 82 10 20 01 mov 1, %g1
20093e4: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
20093e8: 81 c7 e0 08 ret
20093ec: 81 e8 00 00 restore
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
20093f0: 80 a0 60 00 cmp %g1, 0
20093f4: 12 bf ff f4 bne 20093c4 <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN
20093f8: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
20093fc: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
2009400: 30 bf ff fa b,a 20093e8 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED
02008c14 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
2008c14: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
executing = _Thread_Executing;
2008c18: 03 00 80 78 sethi %hi(0x201e000), %g1
2008c1c: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 ! 201e04c <_Per_CPU_Information+0xc>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
2008c20: c2 0a 20 74 ldub [ %o0 + 0x74 ], %g1
2008c24: 80 a0 60 00 cmp %g1, 0
2008c28: 02 80 00 26 be 2008cc0 <_Scheduler_priority_Tick+0xac>
2008c2c: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
2008c30: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2008c34: 80 a0 60 00 cmp %g1, 0
2008c38: 12 80 00 22 bne 2008cc0 <_Scheduler_priority_Tick+0xac>
2008c3c: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
2008c40: c2 02 20 7c ld [ %o0 + 0x7c ], %g1
2008c44: 80 a0 60 01 cmp %g1, 1
2008c48: 0a 80 00 07 bcs 2008c64 <_Scheduler_priority_Tick+0x50>
2008c4c: 80 a0 60 02 cmp %g1, 2
2008c50: 28 80 00 10 bleu,a 2008c90 <_Scheduler_priority_Tick+0x7c>
2008c54: c2 02 20 78 ld [ %o0 + 0x78 ], %g1
2008c58: 80 a0 60 03 cmp %g1, 3
2008c5c: 22 80 00 04 be,a 2008c6c <_Scheduler_priority_Tick+0x58> <== ALWAYS TAKEN
2008c60: c2 02 20 78 ld [ %o0 + 0x78 ], %g1
2008c64: 81 c7 e0 08 ret
2008c68: 81 e8 00 00 restore
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
2008c6c: 82 00 7f ff add %g1, -1, %g1
2008c70: 80 a0 60 00 cmp %g1, 0
2008c74: 12 bf ff fc bne 2008c64 <_Scheduler_priority_Tick+0x50>
2008c78: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
(*executing->budget_callout)( executing );
2008c7c: c2 02 20 80 ld [ %o0 + 0x80 ], %g1
2008c80: 9f c0 40 00 call %g1
2008c84: 01 00 00 00 nop
2008c88: 81 c7 e0 08 ret
2008c8c: 81 e8 00 00 restore
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 ) {
2008c90: 82 00 7f ff add %g1, -1, %g1
2008c94: 80 a0 60 00 cmp %g1, 0
2008c98: 14 bf ff f3 bg 2008c64 <_Scheduler_priority_Tick+0x50>
2008c9c: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
2008ca0: 03 00 80 73 sethi %hi(0x201cc00), %g1
2008ca4: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 ! 201ce80 <_Scheduler+0xc>
2008ca8: 9f c0 40 00 call %g1
2008cac: d0 27 bf fc st %o0, [ %fp + -4 ]
* 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;
2008cb0: 03 00 80 76 sethi %hi(0x201d800), %g1
2008cb4: d0 07 bf fc ld [ %fp + -4 ], %o0
2008cb8: c2 00 62 64 ld [ %g1 + 0x264 ], %g1
2008cbc: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
2008cc0: 81 c7 e0 08 ret
2008cc4: 81 e8 00 00 restore
02009384 <_Scheduler_simple_Ready_queue_enqueue_first>:
{
Chain_Control *ready;
Chain_Node *the_node;
Thread_Control *current;
ready = (Chain_Control *)_Scheduler.information;
2009384: 03 00 80 77 sethi %hi(0x201dc00), %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2009388: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201dd54 <_Scheduler>
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
200938c: c6 02 20 14 ld [ %o0 + 0x14 ], %g3
2009390: c2 00 40 00 ld [ %g1 ], %g1
2009394: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
2009398: 80 a0 80 03 cmp %g2, %g3
200939c: 3a 80 00 08 bcc,a 20093bc <_Scheduler_simple_Ready_queue_enqueue_first+0x38>
20093a0: c2 00 60 04 ld [ %g1 + 4 ], %g1
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
20093a4: c2 00 40 00 ld [ %g1 ], %g1
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
20093a8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
20093ac: 80 a0 80 03 cmp %g2, %g3
20093b0: 2a bf ff fe bcs,a 20093a8 <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN
20093b4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
current = (Thread_Control *)current->Object.Node.previous;
20093b8: c2 00 60 04 ld [ %g1 + 4 ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
20093bc: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
20093c0: c2 22 20 04 st %g1, [ %o0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
20093c4: d0 20 40 00 st %o0, [ %g1 ]
the_node->next = before_node;
20093c8: c4 22 00 00 st %g2, [ %o0 ]
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
20093cc: 81 c3 e0 08 retl
20093d0: d0 20 a0 04 st %o0, [ %g2 + 4 ]
020074ec <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
20074ec: 9d e3 bf a0 save %sp, -96, %sp
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
20074f0: 03 00 80 7d sethi %hi(0x201f400), %g1
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
20074f4: ba 10 20 00 clr %i5
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
20074f8: 80 a6 20 00 cmp %i0, 0
20074fc: 02 80 00 2c be 20075ac <_TOD_Validate+0xc0> <== NEVER TAKEN
2007500: d2 00 60 b8 ld [ %g1 + 0xb8 ], %o1
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
2007504: 11 00 03 d0 sethi %hi(0xf4000), %o0
2007508: 40 00 4c ff call 201a904 <.udiv>
200750c: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
2007510: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2007514: 80 a2 00 01 cmp %o0, %g1
2007518: 28 80 00 26 bleu,a 20075b0 <_TOD_Validate+0xc4>
200751c: b0 0f 60 01 and %i5, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
2007520: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2007524: 80 a0 60 3b cmp %g1, 0x3b
2007528: 38 80 00 22 bgu,a 20075b0 <_TOD_Validate+0xc4>
200752c: b0 0f 60 01 and %i5, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
2007530: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2007534: 80 a0 60 3b cmp %g1, 0x3b
2007538: 38 80 00 1e bgu,a 20075b0 <_TOD_Validate+0xc4>
200753c: b0 0f 60 01 and %i5, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
2007540: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2007544: 80 a0 60 17 cmp %g1, 0x17
2007548: 38 80 00 1a bgu,a 20075b0 <_TOD_Validate+0xc4>
200754c: b0 0f 60 01 and %i5, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
2007550: c2 06 20 04 ld [ %i0 + 4 ], %g1
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
2007554: 80 a0 60 00 cmp %g1, 0
2007558: 02 80 00 15 be 20075ac <_TOD_Validate+0xc0> <== NEVER TAKEN
200755c: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
2007560: 38 80 00 14 bgu,a 20075b0 <_TOD_Validate+0xc4>
2007564: b0 0f 60 01 and %i5, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
2007568: c4 06 00 00 ld [ %i0 ], %g2
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
200756c: 80 a0 a7 c3 cmp %g2, 0x7c3
2007570: 28 80 00 10 bleu,a 20075b0 <_TOD_Validate+0xc4>
2007574: b0 0f 60 01 and %i5, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
2007578: c6 06 20 08 ld [ %i0 + 8 ], %g3
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
200757c: 80 a0 e0 00 cmp %g3, 0
2007580: 02 80 00 0b be 20075ac <_TOD_Validate+0xc0> <== NEVER TAKEN
2007584: 80 88 a0 03 btst 3, %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
2007588: 32 80 00 0c bne,a 20075b8 <_TOD_Validate+0xcc>
200758c: 83 28 60 02 sll %g1, 2, %g1
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2007590: 82 00 60 0d add %g1, 0xd, %g1
2007594: 05 00 80 78 sethi %hi(0x201e000), %g2
2007598: 83 28 60 02 sll %g1, 2, %g1
200759c: 84 10 a0 08 or %g2, 8, %g2
20075a0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
20075a4: 80 a0 40 03 cmp %g1, %g3
20075a8: ba 60 3f ff subx %g0, -1, %i5
if ( the_tod->day > days_in_month )
return false;
return true;
}
20075ac: b0 0f 60 01 and %i5, 1, %i0
20075b0: 81 c7 e0 08 ret
20075b4: 81 e8 00 00 restore
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
20075b8: 05 00 80 78 sethi %hi(0x201e000), %g2
20075bc: 84 10 a0 08 or %g2, 8, %g2 ! 201e008 <_TOD_Days_per_month>
20075c0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
20075c4: 80 a0 40 03 cmp %g1, %g3
20075c8: 10 bf ff f9 b 20075ac <_TOD_Validate+0xc0>
20075cc: ba 60 3f ff subx %g0, -1, %i5
02008eec <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2008eec: 9d e3 bf a0 save %sp, -96, %sp
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
2008ef0: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
2008ef4: 40 00 03 ac call 2009da4 <_Thread_Set_transient>
2008ef8: 90 10 00 18 mov %i0, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
2008efc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2008f00: 80 a0 40 19 cmp %g1, %i1
2008f04: 02 80 00 05 be 2008f18 <_Thread_Change_priority+0x2c>
2008f08: ba 10 00 18 mov %i0, %i5
_Thread_Set_priority( the_thread, new_priority );
2008f0c: 90 10 00 18 mov %i0, %o0
2008f10: 40 00 03 8b call 2009d3c <_Thread_Set_priority>
2008f14: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
2008f18: 7f ff e4 b3 call 20021e4 <sparc_disable_interrupts>
2008f1c: 01 00 00 00 nop
2008f20: b2 10 00 08 mov %o0, %i1
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
2008f24: f6 07 60 10 ld [ %i5 + 0x10 ], %i3
if ( state != STATES_TRANSIENT ) {
2008f28: 80 a6 e0 04 cmp %i3, 4
2008f2c: 02 80 00 18 be 2008f8c <_Thread_Change_priority+0xa0>
2008f30: 80 8f 20 04 btst 4, %i4
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
2008f34: 02 80 00 0b be 2008f60 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN
2008f38: 82 0e ff fb and %i3, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
2008f3c: 7f ff e4 ae call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
2008f40: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
2008f44: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
2008f48: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2008f4c: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED
2008f50: 32 80 00 0d bne,a 2008f84 <_Thread_Change_priority+0x98> <== NOT EXECUTED
2008f54: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED
2008f58: 81 c7 e0 08 ret
2008f5c: 81 e8 00 00 restore
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2008f60: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
2008f64: 7f ff e4 a4 call 20021f4 <sparc_enable_interrupts>
2008f68: 90 10 00 19 mov %i1, %o0
2008f6c: 03 00 00 ef sethi %hi(0x3bc00), %g1
2008f70: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2008f74: 80 8e c0 01 btst %i3, %g1
2008f78: 02 bf ff f8 be 2008f58 <_Thread_Change_priority+0x6c>
2008f7c: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
2008f80: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
2008f84: 40 00 03 3d call 2009c78 <_Thread_queue_Requeue>
2008f88: 93 e8 00 1d restore %g0, %i5, %o1
2008f8c: 39 00 80 73 sethi %hi(0x201cc00), %i4
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
2008f90: 12 80 00 08 bne 2008fb0 <_Thread_Change_priority+0xc4> <== NEVER TAKEN
2008f94: b8 17 22 74 or %i4, 0x274, %i4 ! 201ce74 <_Scheduler>
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
if ( prepend_it )
2008f98: 80 a6 a0 00 cmp %i2, 0
2008f9c: 02 80 00 1b be 2009008 <_Thread_Change_priority+0x11c>
2008fa0: c0 27 60 10 clr [ %i5 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
2008fa4: c2 07 20 28 ld [ %i4 + 0x28 ], %g1
2008fa8: 9f c0 40 00 call %g1
2008fac: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
2008fb0: 7f ff e4 91 call 20021f4 <sparc_enable_interrupts>
2008fb4: 90 10 00 19 mov %i1, %o0
2008fb8: 7f ff e4 8b call 20021e4 <sparc_disable_interrupts>
2008fbc: 01 00 00 00 nop
2008fc0: b0 10 00 08 mov %o0, %i0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
2008fc4: c2 07 20 08 ld [ %i4 + 8 ], %g1
2008fc8: 9f c0 40 00 call %g1
2008fcc: 01 00 00 00 nop
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
2008fd0: 03 00 80 78 sethi %hi(0x201e000), %g1
2008fd4: 82 10 60 40 or %g1, 0x40, %g1 ! 201e040 <_Per_CPU_Information>
2008fd8: c4 00 60 0c ld [ %g1 + 0xc ], %g2
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
2008fdc: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
2008fe0: 80 a0 80 03 cmp %g2, %g3
2008fe4: 02 80 00 07 be 2009000 <_Thread_Change_priority+0x114>
2008fe8: 01 00 00 00 nop
2008fec: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2
2008ff0: 80 a0 a0 00 cmp %g2, 0
2008ff4: 02 80 00 03 be 2009000 <_Thread_Change_priority+0x114>
2008ff8: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
2008ffc: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
_ISR_Enable( level );
2009000: 7f ff e4 7d call 20021f4 <sparc_enable_interrupts>
2009004: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
2009008: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
200900c: 9f c0 40 00 call %g1
2009010: 90 10 00 1d mov %i5, %o0
2009014: 30 bf ff e7 b,a 2008fb0 <_Thread_Change_priority+0xc4>
02009230 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
2009230: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2009234: 90 10 00 18 mov %i0, %o0
2009238: 40 00 00 7a call 2009420 <_Thread_Get>
200923c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2009240: c2 07 bf fc ld [ %fp + -4 ], %g1
2009244: 80 a0 60 00 cmp %g1, 0
2009248: 12 80 00 09 bne 200926c <_Thread_Delay_ended+0x3c> <== NEVER TAKEN
200924c: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
2009250: 7f ff ff 72 call 2009018 <_Thread_Clear_state>
2009254: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_END+0xdc00018>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2009258: 03 00 80 76 sethi %hi(0x201d800), %g1
200925c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201db00 <_Thread_Dispatch_disable_level>
2009260: 84 00 bf ff add %g2, -1, %g2
2009264: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
2009268: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
200926c: 81 c7 e0 08 ret
2009270: 81 e8 00 00 restore
02009274 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
2009274: 9d e3 bf 90 save %sp, -112, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2009278: 21 00 80 76 sethi %hi(0x201d800), %l0
200927c: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ! 201db00 <_Thread_Dispatch_disable_level>
2009280: 82 00 60 01 inc %g1
2009284: c2 24 23 00 st %g1, [ %l0 + 0x300 ]
return _Thread_Dispatch_disable_level;
2009288: c2 04 23 00 ld [ %l0 + 0x300 ], %g1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
200928c: 39 00 80 78 sethi %hi(0x201e000), %i4
2009290: b8 17 20 40 or %i4, 0x40, %i4 ! 201e040 <_Per_CPU_Information>
_ISR_Disable( level );
2009294: 7f ff e3 d4 call 20021e4 <sparc_disable_interrupts>
2009298: fa 07 20 0c ld [ %i4 + 0xc ], %i5
while ( _Thread_Dispatch_necessary == true ) {
200929c: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
20092a0: 80 a0 60 00 cmp %g1, 0
20092a4: 02 80 00 48 be 20093c4 <_Thread_Dispatch+0x150>
20092a8: 01 00 00 00 nop
heir = _Thread_Heir;
20092ac: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
20092b0: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
20092b4: 80 a7 40 1b cmp %i5, %i3
20092b8: 02 80 00 43 be 20093c4 <_Thread_Dispatch+0x150>
20092bc: f6 27 20 0c st %i3, [ %i4 + 0xc ]
20092c0: 31 00 80 76 sethi %hi(0x201d800), %i0
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
20092c4: 23 00 80 76 sethi %hi(0x201d800), %l1
20092c8: b0 16 23 88 or %i0, 0x388, %i0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
20092cc: b2 07 20 1c add %i4, 0x1c, %i1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
20092d0: 10 80 00 37 b 20093ac <_Thread_Dispatch+0x138>
20092d4: 35 00 80 76 sethi %hi(0x201d800), %i2
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
20092d8: 7f ff e3 c7 call 20021f4 <sparc_enable_interrupts>
20092dc: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
20092e0: 40 00 10 4b call 200d40c <_TOD_Get_uptime>
20092e4: 90 07 bf f0 add %fp, -16, %o0
_Timestamp_Subtract(
20092e8: 90 10 00 19 mov %i1, %o0
20092ec: 92 07 bf f0 add %fp, -16, %o1
20092f0: 40 00 03 28 call 2009f90 <_Timespec_Subtract>
20092f4: 94 07 bf f8 add %fp, -8, %o2
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
20092f8: 90 07 60 84 add %i5, 0x84, %o0
20092fc: 40 00 03 0c call 2009f2c <_Timespec_Add_to>
2009300: 92 07 bf f8 add %fp, -8, %o1
_Thread_Time_of_last_context_switch = uptime;
2009304: c4 07 bf f0 ld [ %fp + -16 ], %g2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2009308: c2 06 00 00 ld [ %i0 ], %g1
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
200930c: c4 27 20 1c st %g2, [ %i4 + 0x1c ]
2009310: c4 07 bf f4 ld [ %fp + -12 ], %g2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2009314: 80 a0 60 00 cmp %g1, 0
2009318: 02 80 00 06 be 2009330 <_Thread_Dispatch+0xbc> <== NEVER TAKEN
200931c: c4 27 20 20 st %g2, [ %i4 + 0x20 ]
executing->libc_reent = *_Thread_libc_reent;
2009320: c4 00 40 00 ld [ %g1 ], %g2
2009324: c4 27 61 54 st %g2, [ %i5 + 0x154 ]
*_Thread_libc_reent = heir->libc_reent;
2009328: c4 06 e1 54 ld [ %i3 + 0x154 ], %g2
200932c: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
2009330: 90 10 00 1d mov %i5, %o0
2009334: 40 00 03 db call 200a2a0 <_User_extensions_Thread_switch>
2009338: 92 10 00 1b mov %i3, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
200933c: 90 07 60 c8 add %i5, 0xc8, %o0
2009340: 40 00 05 1f call 200a7bc <_CPU_Context_switch>
2009344: 92 06 e0 c8 add %i3, 0xc8, %o1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2009348: c2 07 61 50 ld [ %i5 + 0x150 ], %g1
200934c: 80 a0 60 00 cmp %g1, 0
2009350: 02 80 00 0c be 2009380 <_Thread_Dispatch+0x10c>
2009354: d0 06 a3 84 ld [ %i2 + 0x384 ], %o0
2009358: 80 a7 40 08 cmp %i5, %o0
200935c: 02 80 00 09 be 2009380 <_Thread_Dispatch+0x10c>
2009360: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
2009364: 02 80 00 04 be 2009374 <_Thread_Dispatch+0x100>
2009368: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200936c: 40 00 04 da call 200a6d4 <_CPU_Context_save_fp>
2009370: 90 02 21 50 add %o0, 0x150, %o0
_Context_Restore_fp( &executing->fp_context );
2009374: 40 00 04 f5 call 200a748 <_CPU_Context_restore_fp>
2009378: 90 07 61 50 add %i5, 0x150, %o0
_Thread_Allocated_fp = executing;
200937c: fa 26 a3 84 st %i5, [ %i2 + 0x384 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
2009380: 7f ff e3 99 call 20021e4 <sparc_disable_interrupts>
2009384: fa 07 20 0c ld [ %i4 + 0xc ], %i5
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
2009388: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
200938c: 80 a0 60 00 cmp %g1, 0
2009390: 02 80 00 0d be 20093c4 <_Thread_Dispatch+0x150>
2009394: 01 00 00 00 nop
heir = _Thread_Heir;
2009398: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
200939c: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
20093a0: 80 a6 c0 1d cmp %i3, %i5
20093a4: 02 80 00 08 be 20093c4 <_Thread_Dispatch+0x150> <== NEVER TAKEN
20093a8: f6 27 20 0c st %i3, [ %i4 + 0xc ]
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
20093ac: c2 06 e0 7c ld [ %i3 + 0x7c ], %g1
20093b0: 80 a0 60 01 cmp %g1, 1
20093b4: 12 bf ff c9 bne 20092d8 <_Thread_Dispatch+0x64>
20093b8: c2 04 62 64 ld [ %l1 + 0x264 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
20093bc: 10 bf ff c7 b 20092d8 <_Thread_Dispatch+0x64>
20093c0: c2 26 e0 78 st %g1, [ %i3 + 0x78 ]
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
20093c4: 7f ff e3 8c call 20021f4 <sparc_enable_interrupts>
20093c8: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
20093cc: c2 04 23 00 ld [ %l0 + 0x300 ], %g1
20093d0: 82 00 7f ff add %g1, -1, %g1
20093d4: c2 24 23 00 st %g1, [ %l0 + 0x300 ]
return _Thread_Dispatch_disable_level;
20093d8: c2 04 23 00 ld [ %l0 + 0x300 ], %g1
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
20093dc: 7f ff f7 c1 call 20072e0 <_API_extensions_Run_postswitch>
20093e0: 01 00 00 00 nop
}
20093e4: 81 c7 e0 08 ret
20093e8: 81 e8 00 00 restore
0200f864 <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200f864: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
200f868: 03 00 80 78 sethi %hi(0x201e000), %g1
200f86c: fa 00 60 4c ld [ %g1 + 0x4c ], %i5 ! 201e04c <_Per_CPU_Information+0xc>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
200f870: 3f 00 80 3e sethi %hi(0x200f800), %i7
200f874: be 17 e0 64 or %i7, 0x64, %i7 ! 200f864 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200f878: d0 07 60 ac ld [ %i5 + 0xac ], %o0
_ISR_Set_level(level);
200f87c: 7f ff ca 5e call 20021f4 <sparc_enable_interrupts>
200f880: 91 2a 20 08 sll %o0, 8, %o0
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f884: c4 07 61 50 ld [ %i5 + 0x150 ], %g2
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f888: 03 00 80 75 sethi %hi(0x201d400), %g1
doneConstructors = true;
200f88c: 86 10 20 01 mov 1, %g3
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f890: f6 08 63 bc ldub [ %g1 + 0x3bc ], %i3
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f894: 80 a0 a0 00 cmp %g2, 0
200f898: 02 80 00 0c be 200f8c8 <_Thread_Handler+0x64>
200f89c: c6 28 63 bc stb %g3, [ %g1 + 0x3bc ]
#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 );
200f8a0: 39 00 80 76 sethi %hi(0x201d800), %i4
200f8a4: d0 07 23 84 ld [ %i4 + 0x384 ], %o0 ! 201db84 <_Thread_Allocated_fp>
200f8a8: 80 a7 40 08 cmp %i5, %o0
200f8ac: 02 80 00 07 be 200f8c8 <_Thread_Handler+0x64>
200f8b0: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200f8b4: 22 80 00 05 be,a 200f8c8 <_Thread_Handler+0x64>
200f8b8: fa 27 23 84 st %i5, [ %i4 + 0x384 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200f8bc: 7f ff eb 86 call 200a6d4 <_CPU_Context_save_fp>
200f8c0: 90 02 21 50 add %o0, 0x150, %o0
_Thread_Allocated_fp = executing;
200f8c4: fa 27 23 84 st %i5, [ %i4 + 0x384 ]
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
200f8c8: 7f ff e9 f4 call 200a098 <_User_extensions_Thread_begin>
200f8cc: 90 10 00 1d mov %i5, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200f8d0: 7f ff e6 c7 call 20093ec <_Thread_Enable_dispatch>
200f8d4: 01 00 00 00 nop
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
200f8d8: 80 8e e0 ff btst 0xff, %i3
200f8dc: 02 80 00 0e be 200f914 <_Thread_Handler+0xb0>
200f8e0: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f8e4: c2 07 60 94 ld [ %i5 + 0x94 ], %g1
200f8e8: 80 a0 60 00 cmp %g1, 0
200f8ec: 02 80 00 0e be 200f924 <_Thread_Handler+0xc0>
200f8f0: 80 a0 60 01 cmp %g1, 1
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
200f8f4: 22 80 00 11 be,a 200f938 <_Thread_Handler+0xd4> <== ALWAYS TAKEN
200f8f8: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
200f8fc: 7f ff e9 fb call 200a0e8 <_User_extensions_Thread_exitted>
200f900: 90 10 00 1d mov %i5, %o0
_Internal_error_Occurred(
200f904: 90 10 20 00 clr %o0
200f908: 92 10 20 01 mov 1, %o1
200f90c: 7f ff e1 42 call 2007e14 <_Internal_error_Occurred>
200f910: 94 10 20 05 mov 5, %o2
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
200f914: 40 00 35 0f call 201cd50 <_init>
200f918: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f91c: 10 bf ff f3 b 200f8e8 <_Thread_Handler+0x84>
200f920: c2 07 60 94 ld [ %i5 + 0x94 ], %g1
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
200f924: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
200f928: 9f c0 40 00 call %g1
200f92c: d0 07 60 9c ld [ %i5 + 0x9c ], %o0
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
200f930: 10 bf ff f3 b 200f8fc <_Thread_Handler+0x98>
200f934: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
200f938: 9f c0 40 00 call %g1
200f93c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
200f940: 10 bf ff ef b 200f8fc <_Thread_Handler+0x98>
200f944: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
020094d0 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
20094d0: 9d e3 bf a0 save %sp, -96, %sp
20094d4: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
20094d8: c0 26 61 58 clr [ %i1 + 0x158 ]
20094dc: c0 26 61 5c clr [ %i1 + 0x15c ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
20094e0: c0 26 61 54 clr [ %i1 + 0x154 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
20094e4: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
20094e8: e4 00 40 00 ld [ %g1 ], %l2
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
20094ec: 80 a6 a0 00 cmp %i2, 0
20094f0: 02 80 00 6b be 200969c <_Thread_Initialize+0x1cc>
20094f4: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
20094f8: c0 2e 60 b4 clrb [ %i1 + 0xb4 ]
20094fc: 90 10 00 1b mov %i3, %o0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
2009500: f4 26 60 bc st %i2, [ %i1 + 0xbc ]
the_stack->size = size;
2009504: d0 26 60 b8 st %o0, [ %i1 + 0xb8 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2009508: 80 a7 20 00 cmp %i4, 0
200950c: 12 80 00 48 bne 200962c <_Thread_Initialize+0x15c>
2009510: b6 10 20 00 clr %i3
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2009514: 39 00 80 76 sethi %hi(0x201d800), %i4
2009518: c2 07 23 94 ld [ %i4 + 0x394 ], %g1 ! 201db94 <_Thread_Maximum_extensions>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
200951c: f6 26 61 50 st %i3, [ %i1 + 0x150 ]
the_thread->Start.fp_context = fp_area;
2009520: f6 26 60 c0 st %i3, [ %i1 + 0xc0 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2009524: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
2009528: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
200952c: c0 26 60 68 clr [ %i1 + 0x68 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2009530: 80 a0 60 00 cmp %g1, 0
2009534: 12 80 00 46 bne 200964c <_Thread_Initialize+0x17c>
2009538: c0 26 60 6c clr [ %i1 + 0x6c ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200953c: c0 26 61 60 clr [ %i1 + 0x160 ]
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
2009540: b4 10 20 00 clr %i2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2009544: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2009548: e2 2e 60 a0 stb %l1, [ %i1 + 0xa0 ]
the_thread->Start.budget_algorithm = budget_algorithm;
200954c: e0 26 60 a4 st %l0, [ %i1 + 0xa4 ]
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
2009550: 80 a4 20 02 cmp %l0, 2
2009554: 12 80 00 05 bne 2009568 <_Thread_Initialize+0x98>
2009558: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ]
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
200955c: 03 00 80 76 sethi %hi(0x201d800), %g1
2009560: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 201da64 <_Thread_Ticks_per_timeslice>
2009564: c2 26 60 78 st %g1, [ %i1 + 0x78 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
2009568: c4 07 a0 68 ld [ %fp + 0x68 ], %g2
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
200956c: 03 00 80 73 sethi %hi(0x201cc00), %g1
2009570: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 201ce8c <_Scheduler+0x18>
2009574: c4 26 60 ac st %g2, [ %i1 + 0xac ]
the_thread->current_state = STATES_DORMANT;
2009578: 84 10 20 01 mov 1, %g2
the_thread->Wait.queue = NULL;
200957c: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
2009580: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
2009584: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
2009588: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
200958c: fa 26 60 b0 st %i5, [ %i1 + 0xb0 ]
2009590: 9f c0 40 00 call %g1
2009594: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
2009598: b8 92 20 00 orcc %o0, 0, %i4
200959c: 22 80 00 13 be,a 20095e8 <_Thread_Initialize+0x118>
20095a0: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
goto failed;
_Thread_Set_priority( the_thread, priority );
20095a4: 90 10 00 19 mov %i1, %o0
20095a8: 40 00 01 e5 call 2009d3c <_Thread_Set_priority>
20095ac: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20095b0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
20095b4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
20095b8: c0 26 60 84 clr [ %i1 + 0x84 ]
20095bc: c0 26 60 88 clr [ %i1 + 0x88 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20095c0: 83 28 60 02 sll %g1, 2, %g1
20095c4: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20095c8: e4 26 60 0c st %l2, [ %i1 + 0xc ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
20095cc: 90 10 00 19 mov %i1, %o0
20095d0: 40 00 02 ed call 200a184 <_User_extensions_Thread_create>
20095d4: b0 10 20 01 mov 1, %i0
if ( extension_status )
20095d8: 80 8a 20 ff btst 0xff, %o0
20095dc: 32 80 00 12 bne,a 2009624 <_Thread_Initialize+0x154>
20095e0: b0 0e 20 01 and %i0, 1, %i0
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
20095e4: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
20095e8: 40 00 04 26 call 200a680 <_Workspace_Free>
20095ec: b0 10 20 00 clr %i0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
20095f0: 40 00 04 24 call 200a680 <_Workspace_Free>
20095f4: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
20095f8: 40 00 04 22 call 200a680 <_Workspace_Free>
20095fc: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
_Workspace_Free( extensions_area );
2009600: 40 00 04 20 call 200a680 <_Workspace_Free>
2009604: 90 10 00 1a mov %i2, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
2009608: 40 00 04 1e call 200a680 <_Workspace_Free>
200960c: 90 10 00 1b mov %i3, %o0
#endif
_Workspace_Free( sched );
2009610: 40 00 04 1c call 200a680 <_Workspace_Free>
2009614: 90 10 00 1c mov %i4, %o0
_Thread_Stack_Free( the_thread );
2009618: 40 00 02 0d call 2009e4c <_Thread_Stack_Free>
200961c: 90 10 00 19 mov %i1, %o0
return false;
}
2009620: b0 0e 20 01 and %i0, 1, %i0
2009624: 81 c7 e0 08 ret
2009628: 81 e8 00 00 restore
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
200962c: 40 00 04 0d call 200a660 <_Workspace_Allocate>
2009630: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
2009634: b6 92 20 00 orcc %o0, 0, %i3
2009638: 32 bf ff b8 bne,a 2009518 <_Thread_Initialize+0x48>
200963c: 39 00 80 76 sethi %hi(0x201d800), %i4
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
2009640: b4 10 20 00 clr %i2
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
2009644: 10 bf ff e8 b 20095e4 <_Thread_Initialize+0x114>
2009648: b8 10 20 00 clr %i4
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
200964c: 82 00 60 01 inc %g1
2009650: 40 00 04 04 call 200a660 <_Workspace_Allocate>
2009654: 91 28 60 02 sll %g1, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
2009658: b4 92 20 00 orcc %o0, 0, %i2
200965c: 02 80 00 1d be 20096d0 <_Thread_Initialize+0x200>
2009660: 86 10 00 1a mov %i2, %g3
goto failed;
}
the_thread->extensions = (void **) extensions_area;
2009664: f4 26 61 60 st %i2, [ %i1 + 0x160 ]
2009668: c8 07 23 94 ld [ %i4 + 0x394 ], %g4
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
200966c: 84 10 20 00 clr %g2
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
2009670: 10 80 00 03 b 200967c <_Thread_Initialize+0x1ac>
2009674: 82 10 20 00 clr %g1
2009678: c6 06 61 60 ld [ %i1 + 0x160 ], %g3
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
200967c: 85 28 a0 02 sll %g2, 2, %g2
2009680: c0 20 c0 02 clr [ %g3 + %g2 ]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
2009684: 82 00 60 01 inc %g1
2009688: 80 a0 40 04 cmp %g1, %g4
200968c: 08 bf ff fb bleu 2009678 <_Thread_Initialize+0x1a8>
2009690: 84 10 00 01 mov %g1, %g2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2009694: 10 bf ff ad b 2009548 <_Thread_Initialize+0x78>
2009698: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200969c: 90 10 00 19 mov %i1, %o0
20096a0: 40 00 01 d0 call 2009de0 <_Thread_Stack_Allocate>
20096a4: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
20096a8: 80 a2 00 1b cmp %o0, %i3
20096ac: 0a 80 00 07 bcs 20096c8 <_Thread_Initialize+0x1f8>
20096b0: 80 a2 20 00 cmp %o0, 0
20096b4: 02 80 00 05 be 20096c8 <_Thread_Initialize+0x1f8> <== NEVER TAKEN
20096b8: 82 10 20 01 mov 1, %g1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
20096bc: f4 06 60 c4 ld [ %i1 + 0xc4 ], %i2
the_thread->Start.core_allocated_stack = true;
20096c0: 10 bf ff 90 b 2009500 <_Thread_Initialize+0x30>
20096c4: c2 2e 60 b4 stb %g1, [ %i1 + 0xb4 ]
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
20096c8: 10 bf ff d6 b 2009620 <_Thread_Initialize+0x150>
20096cc: b0 10 20 00 clr %i0
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
20096d0: 10 bf ff c5 b 20095e4 <_Thread_Initialize+0x114>
20096d4: b8 10 20 00 clr %i4
02009e4c <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
2009e4c: 9d e3 bf a0 save %sp, -96, %sp
#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 )
2009e50: c2 0e 20 b4 ldub [ %i0 + 0xb4 ], %g1
2009e54: 80 a0 60 00 cmp %g1, 0
2009e58: 02 80 00 0b be 2009e84 <_Thread_Stack_Free+0x38> <== NEVER TAKEN
2009e5c: 01 00 00 00 nop
* 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.
*/
if ( Configuration.stack_free_hook )
2009e60: 03 00 80 73 sethi %hi(0x201cc00), %g1
2009e64: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 201cdb0 <Configuration+0x24>
2009e68: 80 a0 60 00 cmp %g1, 0
2009e6c: 22 80 00 08 be,a 2009e8c <_Thread_Stack_Free+0x40>
2009e70: f0 06 20 bc ld [ %i0 + 0xbc ], %i0
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
2009e74: 9f c0 40 00 call %g1
2009e78: d0 06 20 bc ld [ %i0 + 0xbc ], %o0
2009e7c: 81 c7 e0 08 ret
2009e80: 81 e8 00 00 restore
2009e84: 81 c7 e0 08 ret <== NOT EXECUTED
2009e88: 81 e8 00 00 restore <== NOT EXECUTED
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
2009e8c: 40 00 01 fd call 200a680 <_Workspace_Free>
2009e90: 81 e8 00 00 restore
02009c78 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
2009c78: 9d e3 bf 98 save %sp, -104, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
2009c7c: 80 a6 20 00 cmp %i0, 0
2009c80: 02 80 00 13 be 2009ccc <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
2009c84: 01 00 00 00 nop
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
2009c88: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
2009c8c: 80 a7 20 01 cmp %i4, 1
2009c90: 02 80 00 04 be 2009ca0 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
2009c94: 01 00 00 00 nop
2009c98: 81 c7 e0 08 ret <== NOT EXECUTED
2009c9c: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
2009ca0: 7f ff e1 51 call 20021e4 <sparc_disable_interrupts>
2009ca4: 01 00 00 00 nop
2009ca8: ba 10 00 08 mov %o0, %i5
2009cac: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2009cb0: 03 00 00 ef sethi %hi(0x3bc00), %g1
2009cb4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
2009cb8: 80 88 80 01 btst %g2, %g1
2009cbc: 12 80 00 06 bne 2009cd4 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
2009cc0: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
2009cc4: 7f ff e1 4c call 20021f4 <sparc_enable_interrupts>
2009cc8: 90 10 00 1d mov %i5, %o0
2009ccc: 81 c7 e0 08 ret
2009cd0: 81 e8 00 00 restore
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
2009cd4: 92 10 00 19 mov %i1, %o1
2009cd8: 94 10 20 01 mov 1, %o2
2009cdc: 40 00 0f 4f call 200da18 <_Thread_queue_Extract_priority_helper>
2009ce0: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
2009ce4: 90 10 00 18 mov %i0, %o0
2009ce8: 92 10 00 19 mov %i1, %o1
2009cec: 7f ff ff 35 call 20099c0 <_Thread_queue_Enqueue_priority>
2009cf0: 94 07 bf fc add %fp, -4, %o2
2009cf4: 30 bf ff f4 b,a 2009cc4 <_Thread_queue_Requeue+0x4c>
02009cf8 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
2009cf8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2009cfc: 90 10 00 18 mov %i0, %o0
2009d00: 7f ff fd c8 call 2009420 <_Thread_Get>
2009d04: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2009d08: c2 07 bf fc ld [ %fp + -4 ], %g1
2009d0c: 80 a0 60 00 cmp %g1, 0
2009d10: 12 80 00 09 bne 2009d34 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN
2009d14: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
2009d18: 40 00 0f 79 call 200dafc <_Thread_queue_Process_timeout>
2009d1c: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2009d20: 03 00 80 76 sethi %hi(0x201d800), %g1
2009d24: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201db00 <_Thread_Dispatch_disable_level>
2009d28: 84 00 bf ff add %g2, -1, %g2
2009d2c: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
2009d30: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
2009d34: 81 c7 e0 08 ret
2009d38: 81 e8 00 00 restore
0201650c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
201650c: 9d e3 bf 88 save %sp, -120, %sp
2016510: 23 00 80 ee sethi %hi(0x203b800), %l1
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2016514: a6 07 bf e8 add %fp, -24, %l3
2016518: b2 07 bf ec add %fp, -20, %i1
201651c: b6 07 bf f4 add %fp, -12, %i3
2016520: a4 07 bf f8 add %fp, -8, %l2
2016524: 21 00 80 ee sethi %hi(0x203b800), %l0
2016528: 29 00 80 ee sethi %hi(0x203b800), %l4
201652c: f2 27 bf e8 st %i1, [ %fp + -24 ]
head->previous = NULL;
2016530: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
2016534: e6 27 bf f0 st %l3, [ %fp + -16 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2016538: e4 27 bf f4 st %l2, [ %fp + -12 ]
head->previous = NULL;
201653c: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
2016540: f6 27 bf fc st %i3, [ %fp + -4 ]
2016544: a2 14 61 0c or %l1, 0x10c, %l1
2016548: b8 06 20 30 add %i0, 0x30, %i4
201654c: a0 14 20 8c or %l0, 0x8c, %l0
2016550: b4 06 20 68 add %i0, 0x68, %i2
2016554: a8 15 20 00 mov %l4, %l4
2016558: ae 06 20 08 add %i0, 8, %l7
201655c: ac 06 20 40 add %i0, 0x40, %l6
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
2016560: aa 10 20 01 mov 1, %l5
{
/*
* 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;
2016564: e6 26 20 78 st %l3, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2016568: c2 04 40 00 ld [ %l1 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
201656c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2016570: 94 10 00 1b mov %i3, %o2
2016574: 90 10 00 1c mov %i4, %o0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2016578: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
201657c: 40 00 13 4d call 201b2b0 <_Watchdog_Adjust_to_chain>
2016580: 92 20 40 09 sub %g1, %o1, %o1
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2016584: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
2016588: fa 04 00 00 ld [ %l0 ], %i5
/*
* 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 ) {
201658c: 80 a7 40 0a cmp %i5, %o2
2016590: 18 80 00 2e bgu 2016648 <_Timer_server_Body+0x13c>
2016594: 92 27 40 0a sub %i5, %o2, %o1
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
2016598: 80 a7 40 0a cmp %i5, %o2
201659c: 0a 80 00 2f bcs 2016658 <_Timer_server_Body+0x14c>
20165a0: 90 10 00 1a mov %i2, %o0
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
20165a4: fa 26 20 74 st %i5, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
20165a8: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
20165ac: 40 00 03 22 call 2017234 <_Chain_Get>
20165b0: 01 00 00 00 nop
if ( timer == NULL ) {
20165b4: 92 92 20 00 orcc %o0, 0, %o1
20165b8: 02 80 00 10 be 20165f8 <_Timer_server_Body+0xec>
20165bc: 01 00 00 00 nop
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
20165c0: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
20165c4: 80 a0 60 01 cmp %g1, 1
20165c8: 02 80 00 28 be 2016668 <_Timer_server_Body+0x15c>
20165cc: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
20165d0: 12 bf ff f6 bne 20165a8 <_Timer_server_Body+0x9c> <== NEVER TAKEN
20165d4: 92 02 60 10 add %o1, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
20165d8: 40 00 13 67 call 201b374 <_Watchdog_Insert>
20165dc: 90 10 00 1a mov %i2, %o0
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
20165e0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
20165e4: 40 00 03 14 call 2017234 <_Chain_Get>
20165e8: 01 00 00 00 nop
if ( timer == NULL ) {
20165ec: 92 92 20 00 orcc %o0, 0, %o1
20165f0: 32 bf ff f5 bne,a 20165c4 <_Timer_server_Body+0xb8> <== NEVER TAKEN
20165f4: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
20165f8: 7f ff e2 35 call 200eecc <sparc_disable_interrupts>
20165fc: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
2016600: c2 07 bf e8 ld [ %fp + -24 ], %g1
2016604: 80 a0 40 19 cmp %g1, %i1
2016608: 02 80 00 1c be 2016678 <_Timer_server_Body+0x16c> <== ALWAYS TAKEN
201660c: 01 00 00 00 nop
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
2016610: 7f ff e2 33 call 200eedc <sparc_enable_interrupts> <== NOT EXECUTED
2016614: 01 00 00 00 nop <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2016618: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
201661c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2016620: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
2016624: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2016628: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
201662c: 40 00 13 21 call 201b2b0 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED
2016630: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2016634: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
2016638: fa 04 00 00 ld [ %l0 ], %i5 <== NOT EXECUTED
/*
* 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 ) {
201663c: 80 a7 40 0a cmp %i5, %o2 <== NOT EXECUTED
2016640: 08 bf ff d7 bleu 201659c <_Timer_server_Body+0x90> <== NOT EXECUTED
2016644: 92 27 40 0a sub %i5, %o2, %o1 <== NOT EXECUTED
/*
* 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 );
2016648: 90 10 00 1a mov %i2, %o0
201664c: 40 00 13 19 call 201b2b0 <_Watchdog_Adjust_to_chain>
2016650: 94 10 00 1b mov %i3, %o2
2016654: 30 bf ff d4 b,a 20165a4 <_Timer_server_Body+0x98>
/*
* 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 );
2016658: 92 10 20 01 mov 1, %o1
201665c: 40 00 12 e6 call 201b1f4 <_Watchdog_Adjust>
2016660: 94 22 80 1d sub %o2, %i5, %o2
2016664: 30 bf ff d0 b,a 20165a4 <_Timer_server_Body+0x98>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2016668: 90 10 00 1c mov %i4, %o0
201666c: 40 00 13 42 call 201b374 <_Watchdog_Insert>
2016670: 92 02 60 10 add %o1, 0x10, %o1
2016674: 30 bf ff cd b,a 20165a8 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
2016678: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
201667c: 7f ff e2 18 call 200eedc <sparc_enable_interrupts>
2016680: 01 00 00 00 nop
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
2016684: c2 07 bf f4 ld [ %fp + -12 ], %g1
2016688: 80 a0 40 12 cmp %g1, %l2
201668c: 12 80 00 0c bne 20166bc <_Timer_server_Body+0x1b0>
2016690: 01 00 00 00 nop
2016694: 30 80 00 13 b,a 20166e0 <_Timer_server_Body+0x1d4>
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
new_first->previous = head;
2016698: f6 20 60 04 st %i3, [ %g1 + 4 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
201669c: c2 27 bf f4 st %g1, [ %fp + -12 ]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
20166a0: c0 27 60 08 clr [ %i5 + 8 ]
_ISR_Enable( level );
20166a4: 7f ff e2 0e call 200eedc <sparc_enable_interrupts>
20166a8: 01 00 00 00 nop
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
20166ac: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
20166b0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20166b4: 9f c0 40 00 call %g1
20166b8: d2 07 60 24 ld [ %i5 + 0x24 ], %o1
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
20166bc: 7f ff e2 04 call 200eecc <sparc_disable_interrupts>
20166c0: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20166c4: fa 07 bf f4 ld [ %fp + -12 ], %i5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
20166c8: 80 a7 40 12 cmp %i5, %l2
20166cc: 32 bf ff f3 bne,a 2016698 <_Timer_server_Body+0x18c>
20166d0: c2 07 40 00 ld [ %i5 ], %g1
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
20166d4: 7f ff e2 02 call 200eedc <sparc_enable_interrupts>
20166d8: 01 00 00 00 nop
20166dc: 30 bf ff a2 b,a 2016564 <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
20166e0: c0 2e 20 7c clrb [ %i0 + 0x7c ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20166e4: c2 05 00 00 ld [ %l4 ], %g1
20166e8: 82 00 60 01 inc %g1
20166ec: c2 25 00 00 st %g1, [ %l4 ]
return _Thread_Dispatch_disable_level;
20166f0: c2 05 00 00 ld [ %l4 ], %g1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
20166f4: d0 06 00 00 ld [ %i0 ], %o0
20166f8: 40 00 11 23 call 201ab84 <_Thread_Set_state>
20166fc: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
2016700: 7f ff ff 5b call 201646c <_Timer_server_Reset_interval_system_watchdog>
2016704: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
2016708: 7f ff ff 6d call 20164bc <_Timer_server_Reset_tod_system_watchdog>
201670c: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
2016710: 40 00 0e 9d call 201a184 <_Thread_Enable_dispatch>
2016714: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2016718: 90 10 00 17 mov %l7, %o0
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
201671c: ea 2e 20 7c stb %l5, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2016720: 40 00 13 77 call 201b4fc <_Watchdog_Remove>
2016724: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2016728: 40 00 13 75 call 201b4fc <_Watchdog_Remove>
201672c: 90 10 00 16 mov %l6, %o0
2016730: 30 bf ff 8d b,a 2016564 <_Timer_server_Body+0x58>
02016734 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
2016734: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
2016738: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
201673c: 80 a0 60 00 cmp %g1, 0
2016740: 02 80 00 05 be 2016754 <_Timer_server_Schedule_operation_method+0x20>
2016744: ba 10 00 19 mov %i1, %i5
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
2016748: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
201674c: 40 00 02 a6 call 20171e4 <_Chain_Append>
2016750: 81 e8 00 00 restore
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2016754: 03 00 80 ee sethi %hi(0x203b800), %g1
2016758: c4 00 60 00 ld [ %g1 ], %g2
201675c: 84 00 a0 01 inc %g2
2016760: c4 20 60 00 st %g2, [ %g1 ]
return _Thread_Dispatch_disable_level;
2016764: c2 00 60 00 ld [ %g1 ], %g1
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2016768: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
201676c: 80 a0 60 01 cmp %g1, 1
2016770: 02 80 00 28 be 2016810 <_Timer_server_Schedule_operation_method+0xdc>
2016774: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2016778: 02 80 00 04 be 2016788 <_Timer_server_Schedule_operation_method+0x54>
201677c: 01 00 00 00 nop
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2016780: 40 00 0e 81 call 201a184 <_Thread_Enable_dispatch>
2016784: 81 e8 00 00 restore
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2016788: 7f ff e1 d1 call 200eecc <sparc_disable_interrupts>
201678c: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2016790: c4 06 20 68 ld [ %i0 + 0x68 ], %g2
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
2016794: c6 06 20 74 ld [ %i0 + 0x74 ], %g3
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2016798: 88 06 20 6c add %i0, 0x6c, %g4
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
201679c: 03 00 80 ee sethi %hi(0x203b800), %g1
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
20167a0: 80 a0 80 04 cmp %g2, %g4
20167a4: 02 80 00 0d be 20167d8 <_Timer_server_Schedule_operation_method+0xa4>
20167a8: c2 00 60 8c ld [ %g1 + 0x8c ], %g1
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
20167ac: de 00 a0 10 ld [ %g2 + 0x10 ], %o7
if ( snapshot > last_snapshot ) {
20167b0: 80 a0 40 03 cmp %g1, %g3
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
20167b4: 88 03 c0 03 add %o7, %g3, %g4
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
20167b8: 08 80 00 07 bleu 20167d4 <_Timer_server_Schedule_operation_method+0xa0>
20167bc: 88 21 00 01 sub %g4, %g1, %g4
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
20167c0: 86 20 40 03 sub %g1, %g3, %g3
if (delta_interval > delta) {
20167c4: 80 a3 c0 03 cmp %o7, %g3
20167c8: 08 80 00 03 bleu 20167d4 <_Timer_server_Schedule_operation_method+0xa0><== NEVER TAKEN
20167cc: 88 10 20 00 clr %g4
delta_interval -= delta;
20167d0: 88 23 c0 03 sub %o7, %g3, %g4
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
20167d4: c8 20 a0 10 st %g4, [ %g2 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
20167d8: c2 26 20 74 st %g1, [ %i0 + 0x74 ]
_ISR_Enable( level );
20167dc: 7f ff e1 c0 call 200eedc <sparc_enable_interrupts>
20167e0: 01 00 00 00 nop
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
20167e4: 90 06 20 68 add %i0, 0x68, %o0
20167e8: 40 00 12 e3 call 201b374 <_Watchdog_Insert>
20167ec: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
20167f0: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
20167f4: 80 a0 60 00 cmp %g1, 0
20167f8: 12 bf ff e2 bne 2016780 <_Timer_server_Schedule_operation_method+0x4c>
20167fc: 01 00 00 00 nop
_Timer_server_Reset_tod_system_watchdog( ts );
2016800: 7f ff ff 2f call 20164bc <_Timer_server_Reset_tod_system_watchdog>
2016804: 90 10 00 18 mov %i0, %o0
}
}
_Thread_Enable_dispatch();
2016808: 40 00 0e 5f call 201a184 <_Thread_Enable_dispatch>
201680c: 81 e8 00 00 restore
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2016810: 7f ff e1 af call 200eecc <sparc_disable_interrupts>
2016814: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
2016818: 05 00 80 ee sethi %hi(0x203b800), %g2
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
201681c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2016820: c4 00 a1 0c ld [ %g2 + 0x10c ], %g2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
2016824: c8 06 20 3c ld [ %i0 + 0x3c ], %g4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2016828: 86 06 20 34 add %i0, 0x34, %g3
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
201682c: 80 a0 40 03 cmp %g1, %g3
2016830: 02 80 00 08 be 2016850 <_Timer_server_Schedule_operation_method+0x11c>
2016834: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
2016838: de 00 60 10 ld [ %g1 + 0x10 ], %o7
if (delta_interval > delta) {
201683c: 80 a1 00 0f cmp %g4, %o7
2016840: 1a 80 00 03 bcc 201684c <_Timer_server_Schedule_operation_method+0x118>
2016844: 86 10 20 00 clr %g3
delta_interval -= delta;
2016848: 86 23 c0 04 sub %o7, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
201684c: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
2016850: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
2016854: 7f ff e1 a2 call 200eedc <sparc_enable_interrupts>
2016858: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
201685c: 90 06 20 30 add %i0, 0x30, %o0
2016860: 40 00 12 c5 call 201b374 <_Watchdog_Insert>
2016864: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2016868: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
201686c: 80 a0 60 00 cmp %g1, 0
2016870: 12 bf ff c4 bne 2016780 <_Timer_server_Schedule_operation_method+0x4c>
2016874: 01 00 00 00 nop
_Timer_server_Reset_interval_system_watchdog( ts );
2016878: 7f ff fe fd call 201646c <_Timer_server_Reset_interval_system_watchdog>
201687c: 90 10 00 18 mov %i0, %o0
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2016880: 40 00 0e 41 call 201a184 <_Thread_Enable_dispatch>
2016884: 81 e8 00 00 restore
0200a134 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
200a134: 9d e3 bf a0 save %sp, -96, %sp
200a138: 39 00 80 77 sethi %hi(0x201dc00), %i4
200a13c: b8 17 20 e8 or %i4, 0xe8, %i4 ! 201dce8 <_User_extensions_List>
200a140: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200a144: 80 a7 40 1c cmp %i5, %i4
200a148: 02 80 00 0d be 200a17c <_User_extensions_Fatal+0x48> <== NEVER TAKEN
200a14c: 01 00 00 00 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
200a150: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200a154: 80 a0 60 00 cmp %g1, 0
200a158: 02 80 00 05 be 200a16c <_User_extensions_Fatal+0x38>
200a15c: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
200a160: 92 10 00 19 mov %i1, %o1
200a164: 9f c0 40 00 call %g1
200a168: 94 10 00 1a mov %i2, %o2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200a16c: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200a170: 80 a7 40 1c cmp %i5, %i4
200a174: 32 bf ff f8 bne,a 200a154 <_User_extensions_Fatal+0x20>
200a178: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200a17c: 81 c7 e0 08 ret
200a180: 81 e8 00 00 restore
02009fe0 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
2009fe0: 9d e3 bf a0 save %sp, -96, %sp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
2009fe4: 07 00 80 73 sethi %hi(0x201cc00), %g3
2009fe8: 86 10 e1 8c or %g3, 0x18c, %g3 ! 201cd8c <Configuration>
initial_extensions = Configuration.User_extension_table;
2009fec: f6 00 e0 3c ld [ %g3 + 0x3c ], %i3
2009ff0: 3b 00 80 77 sethi %hi(0x201dc00), %i5
2009ff4: 09 00 80 76 sethi %hi(0x201d800), %g4
2009ff8: 84 17 60 e8 or %i5, 0xe8, %g2
2009ffc: 82 11 23 04 or %g4, 0x304, %g1
200a000: b4 00 a0 04 add %g2, 4, %i2
200a004: b8 00 60 04 add %g1, 4, %i4
200a008: f4 27 60 e8 st %i2, [ %i5 + 0xe8 ]
head->previous = NULL;
200a00c: c0 20 a0 04 clr [ %g2 + 4 ]
tail->previous = head;
200a010: c4 20 a0 08 st %g2, [ %g2 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200a014: f8 21 23 04 st %i4, [ %g4 + 0x304 ]
head->previous = NULL;
200a018: c0 20 60 04 clr [ %g1 + 4 ]
tail->previous = head;
200a01c: c2 20 60 08 st %g1, [ %g1 + 8 ]
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
200a020: 80 a6 e0 00 cmp %i3, 0
200a024: 02 80 00 1b be 200a090 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200a028: f4 00 e0 38 ld [ %g3 + 0x38 ], %i2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
200a02c: 83 2e a0 02 sll %i2, 2, %g1
200a030: b9 2e a0 04 sll %i2, 4, %i4
200a034: b8 27 00 01 sub %i4, %g1, %i4
200a038: b8 07 00 1a add %i4, %i2, %i4
200a03c: b9 2f 20 02 sll %i4, 2, %i4
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200a040: 40 00 01 96 call 200a698 <_Workspace_Allocate_or_fatal_error>
200a044: 90 10 00 1c mov %i4, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200a048: 92 10 20 00 clr %o1
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200a04c: ba 10 00 08 mov %o0, %i5
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200a050: 40 00 19 37 call 201052c <memset>
200a054: 94 10 00 1c mov %i4, %o2
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200a058: 80 a6 a0 00 cmp %i2, 0
200a05c: 02 80 00 0d be 200a090 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200a060: b8 10 20 00 clr %i4
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
200a064: 92 10 00 1b mov %i3, %o1
200a068: 94 10 20 20 mov 0x20, %o2
200a06c: 40 00 18 f4 call 201043c <memcpy>
200a070: 90 07 60 14 add %i5, 0x14, %o0
_User_extensions_Add_set( extension );
200a074: 40 00 0e e6 call 200dc0c <_User_extensions_Add_set>
200a078: 90 10 00 1d mov %i5, %o0
200a07c: b8 07 20 01 inc %i4
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
200a080: ba 07 60 34 add %i5, 0x34, %i5
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200a084: 80 a7 00 1a cmp %i4, %i2
200a088: 12 bf ff f7 bne 200a064 <_User_extensions_Handler_initialization+0x84>
200a08c: b6 06 e0 20 add %i3, 0x20, %i3
200a090: 81 c7 e0 08 ret
200a094: 81 e8 00 00 restore
0200a098 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
200a098: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200a09c: 39 00 80 77 sethi %hi(0x201dc00), %i4
200a0a0: fa 07 20 e8 ld [ %i4 + 0xe8 ], %i5 ! 201dce8 <_User_extensions_List>
200a0a4: b8 17 20 e8 or %i4, 0xe8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200a0a8: b8 07 20 04 add %i4, 4, %i4
200a0ac: 80 a7 40 1c cmp %i5, %i4
200a0b0: 02 80 00 0c be 200a0e0 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
200a0b4: 01 00 00 00 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
200a0b8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200a0bc: 80 a0 60 00 cmp %g1, 0
200a0c0: 02 80 00 04 be 200a0d0 <_User_extensions_Thread_begin+0x38>
200a0c4: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
200a0c8: 9f c0 40 00 call %g1
200a0cc: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200a0d0: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200a0d4: 80 a7 40 1c cmp %i5, %i4
200a0d8: 32 bf ff f9 bne,a 200a0bc <_User_extensions_Thread_begin+0x24>
200a0dc: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200a0e0: 81 c7 e0 08 ret
200a0e4: 81 e8 00 00 restore
0200a184 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
200a184: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200a188: 39 00 80 77 sethi %hi(0x201dc00), %i4
200a18c: fa 07 20 e8 ld [ %i4 + 0xe8 ], %i5 ! 201dce8 <_User_extensions_List>
200a190: b8 17 20 e8 or %i4, 0xe8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200a194: b8 07 20 04 add %i4, 4, %i4
200a198: 80 a7 40 1c cmp %i5, %i4
200a19c: 02 80 00 12 be 200a1e4 <_User_extensions_Thread_create+0x60><== NEVER TAKEN
200a1a0: 82 10 20 01 mov 1, %g1
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
200a1a4: 37 00 80 78 sethi %hi(0x201e000), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
200a1a8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200a1ac: 80 a0 60 00 cmp %g1, 0
200a1b0: 02 80 00 08 be 200a1d0 <_User_extensions_Thread_create+0x4c>
200a1b4: 84 16 e0 40 or %i3, 0x40, %g2
status = (*the_extension->Callouts.thread_create)(
200a1b8: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200a1bc: 9f c0 40 00 call %g1
200a1c0: 92 10 00 18 mov %i0, %o1
_Thread_Executing,
the_thread
);
if ( !status )
200a1c4: 80 8a 20 ff btst 0xff, %o0
200a1c8: 02 80 00 0a be 200a1f0 <_User_extensions_Thread_create+0x6c>
200a1cc: 82 10 20 00 clr %g1
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200a1d0: fa 07 40 00 ld [ %i5 ], %i5
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200a1d4: 80 a7 40 1c cmp %i5, %i4
200a1d8: 32 bf ff f5 bne,a 200a1ac <_User_extensions_Thread_create+0x28>
200a1dc: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if ( !status )
return false;
}
}
return true;
200a1e0: 82 10 20 01 mov 1, %g1
}
200a1e4: b0 08 60 01 and %g1, 1, %i0
200a1e8: 81 c7 e0 08 ret
200a1ec: 81 e8 00 00 restore
200a1f0: b0 08 60 01 and %g1, 1, %i0
200a1f4: 81 c7 e0 08 ret
200a1f8: 81 e8 00 00 restore
0200a1fc <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
200a1fc: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200a200: 39 00 80 77 sethi %hi(0x201dc00), %i4
200a204: b8 17 20 e8 or %i4, 0xe8, %i4 ! 201dce8 <_User_extensions_List>
200a208: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200a20c: 80 a7 40 1c cmp %i5, %i4
200a210: 02 80 00 0d be 200a244 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN
200a214: 37 00 80 78 sethi %hi(0x201e000), %i3
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
200a218: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200a21c: 80 a0 60 00 cmp %g1, 0
200a220: 02 80 00 05 be 200a234 <_User_extensions_Thread_delete+0x38>
200a224: 84 16 e0 40 or %i3, 0x40, %g2
(*the_extension->Callouts.thread_delete)(
200a228: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200a22c: 9f c0 40 00 call %g1
200a230: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200a234: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200a238: 80 a7 40 1c cmp %i5, %i4
200a23c: 32 bf ff f8 bne,a 200a21c <_User_extensions_Thread_delete+0x20>
200a240: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200a244: 81 c7 e0 08 ret
200a248: 81 e8 00 00 restore
0200a0e8 <_User_extensions_Thread_exitted>:
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
200a0e8: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200a0ec: 39 00 80 77 sethi %hi(0x201dc00), %i4
200a0f0: b8 17 20 e8 or %i4, 0xe8, %i4 ! 201dce8 <_User_extensions_List>
200a0f4: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200a0f8: 80 a7 40 1c cmp %i5, %i4
200a0fc: 02 80 00 0c be 200a12c <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
200a100: 01 00 00 00 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
200a104: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200a108: 80 a0 60 00 cmp %g1, 0
200a10c: 02 80 00 04 be 200a11c <_User_extensions_Thread_exitted+0x34>
200a110: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
200a114: 9f c0 40 00 call %g1
200a118: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200a11c: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200a120: 80 a7 40 1c cmp %i5, %i4
200a124: 32 bf ff f9 bne,a 200a108 <_User_extensions_Thread_exitted+0x20>
200a128: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200a12c: 81 c7 e0 08 ret
200a130: 81 e8 00 00 restore
0200aa8c <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
200aa8c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200aa90: 39 00 80 7a sethi %hi(0x201e800), %i4
200aa94: fa 07 20 18 ld [ %i4 + 0x18 ], %i5 ! 201e818 <_User_extensions_List>
200aa98: b8 17 20 18 or %i4, 0x18, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200aa9c: b8 07 20 04 add %i4, 4, %i4
200aaa0: 80 a7 40 1c cmp %i5, %i4
200aaa4: 02 80 00 0d be 200aad8 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
200aaa8: 37 00 80 7a sethi %hi(0x201e800), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
200aaac: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200aab0: 80 a0 60 00 cmp %g1, 0
200aab4: 02 80 00 05 be 200aac8 <_User_extensions_Thread_restart+0x3c>
200aab8: 84 16 e3 70 or %i3, 0x370, %g2
(*the_extension->Callouts.thread_restart)(
200aabc: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200aac0: 9f c0 40 00 call %g1
200aac4: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200aac8: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200aacc: 80 a7 40 1c cmp %i5, %i4
200aad0: 32 bf ff f8 bne,a 200aab0 <_User_extensions_Thread_restart+0x24>
200aad4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200aad8: 81 c7 e0 08 ret
200aadc: 81 e8 00 00 restore
0200a24c <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
200a24c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200a250: 39 00 80 77 sethi %hi(0x201dc00), %i4
200a254: fa 07 20 e8 ld [ %i4 + 0xe8 ], %i5 ! 201dce8 <_User_extensions_List>
200a258: b8 17 20 e8 or %i4, 0xe8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200a25c: b8 07 20 04 add %i4, 4, %i4
200a260: 80 a7 40 1c cmp %i5, %i4
200a264: 02 80 00 0d be 200a298 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
200a268: 37 00 80 78 sethi %hi(0x201e000), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
200a26c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200a270: 80 a0 60 00 cmp %g1, 0
200a274: 02 80 00 05 be 200a288 <_User_extensions_Thread_start+0x3c>
200a278: 84 16 e0 40 or %i3, 0x40, %g2
(*the_extension->Callouts.thread_start)(
200a27c: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200a280: 9f c0 40 00 call %g1
200a284: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200a288: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200a28c: 80 a7 40 1c cmp %i5, %i4
200a290: 32 bf ff f8 bne,a 200a270 <_User_extensions_Thread_start+0x24>
200a294: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200a298: 81 c7 e0 08 ret
200a29c: 81 e8 00 00 restore
0200a2a0 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
200a2a0: 9d e3 bf a0 save %sp, -96, %sp
200a2a4: 39 00 80 76 sethi %hi(0x201d800), %i4
200a2a8: fa 07 23 04 ld [ %i4 + 0x304 ], %i5 ! 201db04 <_User_extensions_Switches_list>
200a2ac: b8 17 23 04 or %i4, 0x304, %i4
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200a2b0: b8 07 20 04 add %i4, 4, %i4
200a2b4: 80 a7 40 1c cmp %i5, %i4
200a2b8: 02 80 00 0a be 200a2e0 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
200a2bc: 01 00 00 00 nop
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
200a2c0: c2 07 60 08 ld [ %i5 + 8 ], %g1
200a2c4: 90 10 00 18 mov %i0, %o0
200a2c8: 9f c0 40 00 call %g1
200a2cc: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
200a2d0: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200a2d4: 80 a7 40 1c cmp %i5, %i4
200a2d8: 32 bf ff fb bne,a 200a2c4 <_User_extensions_Thread_switch+0x24>
200a2dc: c2 07 60 08 ld [ %i5 + 8 ], %g1
200a2e0: 81 c7 e0 08 ret
200a2e4: 81 e8 00 00 restore
0200bd70 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200bd70: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200bd74: 7f ff dc 6f call 2002f30 <sparc_disable_interrupts>
200bd78: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200bd7c: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200bd80: b6 06 20 04 add %i0, 4, %i3
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200bd84: 80 a0 40 1b cmp %g1, %i3
200bd88: 02 80 00 1e be 200be00 <_Watchdog_Adjust+0x90>
200bd8c: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200bd90: 12 80 00 1e bne 200be08 <_Watchdog_Adjust+0x98>
200bd94: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200bd98: 80 a6 a0 00 cmp %i2, 0
200bd9c: 02 80 00 19 be 200be00 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200bda0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200bda4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200bda8: 80 a6 80 1c cmp %i2, %i4
200bdac: 1a 80 00 0a bcc 200bdd4 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN
200bdb0: b2 10 20 01 mov 1, %i1
_Watchdog_First( header )->delta_interval -= units;
200bdb4: 10 80 00 1c b 200be24 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED
200bdb8: b8 27 00 1a sub %i4, %i2, %i4 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200bdbc: 02 80 00 11 be 200be00 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200bdc0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200bdc4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200bdc8: 80 a7 00 1a cmp %i4, %i2
200bdcc: 38 80 00 16 bgu,a 200be24 <_Watchdog_Adjust+0xb4>
200bdd0: b8 27 00 1a sub %i4, %i2, %i4
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
200bdd4: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
_ISR_Enable( level );
200bdd8: 7f ff dc 5a call 2002f40 <sparc_enable_interrupts>
200bddc: 01 00 00 00 nop
_Watchdog_Tickle( header );
200bde0: 40 00 00 ab call 200c08c <_Watchdog_Tickle>
200bde4: 90 10 00 1d mov %i5, %o0
_ISR_Disable( level );
200bde8: 7f ff dc 52 call 2002f30 <sparc_disable_interrupts>
200bdec: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200bdf0: c2 07 40 00 ld [ %i5 ], %g1
if ( _Chain_Is_empty( header ) )
200bdf4: 80 a6 c0 01 cmp %i3, %g1
200bdf8: 32 bf ff f1 bne,a 200bdbc <_Watchdog_Adjust+0x4c>
200bdfc: b4 a6 80 1c subcc %i2, %i4, %i2
}
break;
}
}
_ISR_Enable( level );
200be00: 7f ff dc 50 call 2002f40 <sparc_enable_interrupts>
200be04: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
200be08: 12 bf ff fe bne 200be00 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200be0c: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200be10: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200be14: b4 00 80 1a add %g2, %i2, %i2
200be18: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
200be1c: 7f ff dc 49 call 2002f40 <sparc_enable_interrupts>
200be20: 91 e8 00 08 restore %g0, %o0, %o0
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
200be24: 10 bf ff f7 b 200be00 <_Watchdog_Adjust+0x90>
200be28: f8 20 60 10 st %i4, [ %g1 + 0x10 ]
0200a470 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
200a470: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
200a474: 7f ff df 5c call 20021e4 <sparc_disable_interrupts>
200a478: 01 00 00 00 nop
previous_state = the_watchdog->state;
200a47c: fa 06 20 08 ld [ %i0 + 8 ], %i5
switch ( previous_state ) {
200a480: 80 a7 60 01 cmp %i5, 1
200a484: 02 80 00 2a be 200a52c <_Watchdog_Remove+0xbc>
200a488: 03 00 80 77 sethi %hi(0x201dc00), %g1
200a48c: 1a 80 00 09 bcc 200a4b0 <_Watchdog_Remove+0x40>
200a490: 80 a7 60 03 cmp %i5, 3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200a494: 03 00 80 77 sethi %hi(0x201dc00), %g1
200a498: c2 00 60 0c ld [ %g1 + 0xc ], %g1 ! 201dc0c <_Watchdog_Ticks_since_boot>
200a49c: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200a4a0: 7f ff df 55 call 20021f4 <sparc_enable_interrupts>
200a4a4: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200a4a8: 81 c7 e0 08 ret
200a4ac: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
200a4b0: 18 bf ff fa bgu 200a498 <_Watchdog_Remove+0x28> <== NEVER TAKEN
200a4b4: 03 00 80 77 sethi %hi(0x201dc00), %g1
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
200a4b8: c2 06 00 00 ld [ %i0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
200a4bc: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200a4c0: c4 00 40 00 ld [ %g1 ], %g2
200a4c4: 80 a0 a0 00 cmp %g2, 0
200a4c8: 02 80 00 07 be 200a4e4 <_Watchdog_Remove+0x74>
200a4cc: 05 00 80 77 sethi %hi(0x201dc00), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200a4d0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200a4d4: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
200a4d8: 84 00 c0 02 add %g3, %g2, %g2
200a4dc: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200a4e0: 05 00 80 77 sethi %hi(0x201dc00), %g2
200a4e4: c4 00 a0 08 ld [ %g2 + 8 ], %g2 ! 201dc08 <_Watchdog_Sync_count>
200a4e8: 80 a0 a0 00 cmp %g2, 0
200a4ec: 22 80 00 07 be,a 200a508 <_Watchdog_Remove+0x98>
200a4f0: c4 06 20 04 ld [ %i0 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
200a4f4: 05 00 80 78 sethi %hi(0x201e000), %g2
200a4f8: c6 00 a0 48 ld [ %g2 + 0x48 ], %g3 ! 201e048 <_Per_CPU_Information+0x8>
200a4fc: 05 00 80 76 sethi %hi(0x201d800), %g2
200a500: c6 20 a3 a8 st %g3, [ %g2 + 0x3a8 ] ! 201dba8 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200a504: c4 06 20 04 ld [ %i0 + 4 ], %g2
next->previous = previous;
200a508: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
200a50c: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200a510: 03 00 80 77 sethi %hi(0x201dc00), %g1
200a514: c2 00 60 0c ld [ %g1 + 0xc ], %g1 ! 201dc0c <_Watchdog_Ticks_since_boot>
200a518: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200a51c: 7f ff df 36 call 20021f4 <sparc_enable_interrupts>
200a520: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200a524: 81 c7 e0 08 ret
200a528: 81 e8 00 00 restore
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200a52c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
200a530: c0 26 20 08 clr [ %i0 + 8 ]
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200a534: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200a538: 7f ff df 2f call 20021f4 <sparc_enable_interrupts>
200a53c: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200a540: 81 c7 e0 08 ret
200a544: 81 e8 00 00 restore
0200b58c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200b58c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200b590: 7f ff dd 49 call 2002ab4 <sparc_disable_interrupts>
200b594: 01 00 00 00 nop
200b598: ba 10 00 08 mov %o0, %i5
printk( "Watchdog Chain: %s %p\n", name, header );
200b59c: 11 00 80 76 sethi %hi(0x201d800), %o0
200b5a0: 94 10 00 19 mov %i1, %o2
200b5a4: 92 10 00 18 mov %i0, %o1
200b5a8: 7f ff e4 61 call 200472c <printk>
200b5ac: 90 12 20 e0 or %o0, 0xe0, %o0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200b5b0: f8 06 40 00 ld [ %i1 ], %i4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200b5b4: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200b5b8: 80 a7 00 19 cmp %i4, %i1
200b5bc: 02 80 00 0f be 200b5f8 <_Watchdog_Report_chain+0x6c>
200b5c0: 11 00 80 76 sethi %hi(0x201d800), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200b5c4: 92 10 00 1c mov %i4, %o1
200b5c8: 40 00 00 0f call 200b604 <_Watchdog_Report>
200b5cc: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
200b5d0: f8 07 00 00 ld [ %i4 ], %i4
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
200b5d4: 80 a7 00 19 cmp %i4, %i1
200b5d8: 12 bf ff fc bne 200b5c8 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
200b5dc: 92 10 00 1c mov %i4, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200b5e0: 11 00 80 76 sethi %hi(0x201d800), %o0
200b5e4: 92 10 00 18 mov %i0, %o1
200b5e8: 7f ff e4 51 call 200472c <printk>
200b5ec: 90 12 20 f8 or %o0, 0xf8, %o0
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
200b5f0: 7f ff dd 35 call 2002ac4 <sparc_enable_interrupts>
200b5f4: 91 e8 00 1d restore %g0, %i5, %o0
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200b5f8: 7f ff e4 4d call 200472c <printk>
200b5fc: 90 12 21 08 or %o0, 0x108, %o0
200b600: 30 bf ff fc b,a 200b5f0 <_Watchdog_Report_chain+0x64>
02013c00 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
2013c00: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
2013c04: c0 27 bf fc clr [ %fp + -4 ]
uint32_t count,
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2013c08: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2013c0c: 80 a6 e0 00 cmp %i3, 0
2013c10: 12 80 00 12 bne 2013c58 <_fat_block_read+0x58> <== ALWAYS TAKEN
2013c14: b0 10 20 00 clr %i0
2013c18: 30 80 00 1a b,a 2013c80 <_fat_block_read+0x80> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2013c1c: e0 17 40 00 lduh [ %i5 ], %l0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2013c20: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2013c24: a0 24 00 1a sub %l0, %i2, %l0
2013c28: 80 a4 00 1b cmp %l0, %i3
2013c2c: 08 80 00 03 bleu 2013c38 <_fat_block_read+0x38>
2013c30: b2 06 60 01 inc %i1
2013c34: a0 10 00 1b mov %i3, %l0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2013c38: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
2013c3c: 94 10 00 10 mov %l0, %o2
2013c40: 40 00 2b 78 call 201ea20 <memcpy>
2013c44: 92 02 40 1a add %o1, %i2, %o1
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2013c48: b6 a6 c0 10 subcc %i3, %l0, %i3
2013c4c: 02 80 00 0d be 2013c80 <_fat_block_read+0x80>
2013c50: b0 04 00 18 add %l0, %i0, %i0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
ofs = 0;
2013c54: b4 10 20 00 clr %i2
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2013c58: 92 10 00 19 mov %i1, %o1
2013c5c: 94 10 20 01 mov 1, %o2
2013c60: 96 07 bf fc add %fp, -4, %o3
2013c64: 7f ff ff 04 call 2013874 <fat_buf_access>
2013c68: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
2013c6c: 80 a2 20 00 cmp %o0, 0
2013c70: 02 bf ff eb be 2013c1c <_fat_block_read+0x1c> <== ALWAYS TAKEN
2013c74: 90 07 00 18 add %i4, %i0, %o0
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
2013c78: 81 c7 e0 08 ret <== NOT EXECUTED
2013c7c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
2013c80: 81 c7 e0 08 ret
2013c84: 81 e8 00 00 restore
02013d44 <_fat_block_release>:
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2013d44: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED
2013d48: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2013d4c: 7f ff ff 51 call 2013a90 <fat_buf_release> <== NOT EXECUTED
2013d50: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02013c88 <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
2013c88: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
2013c8c: c0 27 bf fc clr [ %fp + -4 ]
uint32_t offset,
uint32_t count,
const void *buff)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2013c90: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
2013c94: a2 10 20 01 mov 1, %l1
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
2013c98: 80 a6 e0 00 cmp %i3, 0
2013c9c: 12 80 00 14 bne 2013cec <_fat_block_write+0x64> <== ALWAYS TAKEN
2013ca0: b0 10 20 00 clr %i0
2013ca4: 30 80 00 26 b,a 2013d3c <_fat_block_write+0xb4> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2013ca8: 96 07 bf fc add %fp, -4, %o3
2013cac: 7f ff fe f2 call 2013874 <fat_buf_access>
2013cb0: 90 10 00 10 mov %l0, %o0
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2013cb4: 92 07 00 18 add %i4, %i0, %o1
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
2013cb8: 80 a2 20 00 cmp %o0, 0
2013cbc: 12 80 00 1e bne 2013d34 <_fat_block_write+0xac> <== NEVER TAKEN
2013cc0: 94 10 00 1d mov %i5, %o2
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2013cc4: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
2013cc8: b0 07 40 18 add %i5, %i0, %i0
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2013ccc: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
2013cd0: b2 06 60 01 inc %i1
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2013cd4: 40 00 2b 53 call 201ea20 <memcpy>
2013cd8: 90 02 00 1a add %o0, %i2, %o0
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
2013cdc: b6 a6 c0 1d subcc %i3, %i5, %i3
2013ce0: 02 80 00 17 be 2013d3c <_fat_block_write+0xb4>
2013ce4: e2 2c 20 84 stb %l1, [ %l0 + 0x84 ]
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
ofs = 0;
2013ce8: b4 10 20 00 clr %i2
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
2013cec: c2 14 00 00 lduh [ %l0 ], %g1
2013cf0: ba 20 40 1a sub %g1, %i2, %i5
2013cf4: 80 a7 40 1b cmp %i5, %i3
2013cf8: 08 80 00 03 bleu 2013d04 <_fat_block_write+0x7c>
2013cfc: 92 10 00 19 mov %i1, %o1
2013d00: ba 10 00 1b mov %i3, %i5
if (c == fs_info->vol.bps)
2013d04: 80 a0 40 1d cmp %g1, %i5
2013d08: 32 bf ff e8 bne,a 2013ca8 <_fat_block_write+0x20>
2013d0c: 94 10 20 01 mov 1, %o2
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
2013d10: 92 10 00 19 mov %i1, %o1
2013d14: 94 10 20 02 mov 2, %o2
2013d18: 90 10 00 10 mov %l0, %o0
2013d1c: 7f ff fe d6 call 2013874 <fat_buf_access>
2013d20: 96 07 bf fc add %fp, -4, %o3
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2013d24: 92 07 00 18 add %i4, %i0, %o1
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
2013d28: 80 a2 20 00 cmp %o0, 0
2013d2c: 02 bf ff e6 be 2013cc4 <_fat_block_write+0x3c> <== ALWAYS TAKEN
2013d30: 94 10 00 1d mov %i5, %o2
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
2013d34: 81 c7 e0 08 ret <== NOT EXECUTED
2013d38: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
2013d3c: 81 c7 e0 08 ret
2013d40: 81 e8 00 00 restore
020202bc <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
20202bc: 9d e3 bf 58 save %sp, -168, %sp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
20202c0: 7f ff 92 be call 2004db8 <rtems_filesystem_dirname>
20202c4: 90 10 00 19 mov %i1, %o0
if ( old_parent_pathlen == 0 )
20202c8: 80 a2 20 00 cmp %o0, 0
20202cc: 12 80 00 2b bne 2020378 <_rename_r+0xbc>
20202d0: b8 10 00 08 mov %o0, %i4
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
20202d4: ba 07 bf d0 add %fp, -48, %i5
20202d8: 90 10 00 19 mov %i1, %o0
20202dc: 92 07 bf f8 add %fp, -8, %o1
20202e0: 94 10 00 1d mov %i5, %o2
20202e4: 7f ff 99 21 call 2006768 <rtems_filesystem_get_start_loc>
20202e8: b8 10 20 00 clr %i4
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
20202ec: b6 10 20 00 clr %i3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
20202f0: c2 07 bf d0 ld [ %fp + -48 ], %g1
name = old + old_parent_pathlen;
20202f4: b2 06 40 1c add %i1, %i4, %i1
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
20202f8: c2 27 bf bc st %g1, [ %fp + -68 ]
20202fc: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = old + old_parent_pathlen;
2020300: f2 27 bf fc st %i1, [ %fp + -4 ]
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
2020304: c2 27 bf c0 st %g1, [ %fp + -64 ]
2020308: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
202030c: 90 10 00 19 mov %i1, %o0
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
2020310: c2 27 bf c4 st %g1, [ %fp + -60 ]
2020314: c2 07 bf dc ld [ %fp + -36 ], %g1
2020318: c2 27 bf c8 st %g1, [ %fp + -56 ]
202031c: c2 07 bf e0 ld [ %fp + -32 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2020320: 7f ff cd 3d call 2013814 <strlen>
2020324: c2 27 bf cc st %g1, [ %fp + -52 ]
2020328: 92 10 00 08 mov %o0, %o1
202032c: 7f ff 92 b2 call 2004df4 <rtems_filesystem_prefix_separators>
2020330: 90 10 00 19 mov %i1, %o0
2020334: b2 06 40 08 add %i1, %o0, %i1
2020338: f2 27 bf fc st %i1, [ %fp + -4 ]
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
202033c: 7f ff cd 36 call 2013814 <strlen>
2020340: 90 10 00 19 mov %i1, %o0
2020344: 94 10 20 00 clr %o2
2020348: 92 10 00 08 mov %o0, %o1
202034c: 96 07 bf bc add %fp, -68, %o3
2020350: 90 10 00 19 mov %i1, %o0
2020354: 7f ff 92 6d call 2004d08 <rtems_filesystem_evaluate_relative_path>
2020358: 98 10 20 00 clr %o4
0, &old_loc, false );
if ( result != 0 ) {
202035c: 80 a2 20 00 cmp %o0, 0
2020360: 02 80 00 17 be 20203bc <_rename_r+0x100>
2020364: 80 8e e0 ff btst 0xff, %i3
if ( free_old_parentloc )
2020368: 12 80 00 11 bne 20203ac <_rename_r+0xf0>
202036c: b0 10 3f ff mov -1, %i0
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
2020370: 81 c7 e0 08 ret
2020374: 81 e8 00 00 restore
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
2020378: ba 07 bf d0 add %fp, -48, %i5
202037c: 90 10 00 19 mov %i1, %o0
2020380: 92 10 00 1c mov %i4, %o1
2020384: 94 10 20 02 mov 2, %o2
2020388: 96 10 00 1d mov %i5, %o3
202038c: 98 10 20 00 clr %o4
2020390: 7f ff 92 7b call 2004d7c <rtems_filesystem_evaluate_path>
2020394: b0 10 3f ff mov -1, %i0
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
2020398: 80 a2 20 00 cmp %o0, 0
202039c: 12 bf ff f5 bne 2020370 <_rename_r+0xb4> <== NEVER TAKEN
20203a0: b6 10 20 01 mov 1, %i3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
20203a4: 10 bf ff d4 b 20202f4 <_rename_r+0x38>
20203a8: c2 07 bf d0 ld [ %fp + -48 ], %g1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
20203ac: 7f ff 93 08 call 2004fcc <rtems_filesystem_freenode>
20203b0: 90 10 00 1d mov %i5, %o0
20203b4: 81 c7 e0 08 ret
20203b8: 81 e8 00 00 restore
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
20203bc: 90 10 00 1a mov %i2, %o0
20203c0: 92 07 bf f8 add %fp, -8, %o1
20203c4: 7f ff 98 e9 call 2006768 <rtems_filesystem_get_start_loc>
20203c8: 94 07 bf e4 add %fp, -28, %o2
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
20203cc: c2 07 bf f0 ld [ %fp + -16 ], %g1
20203d0: d0 07 bf f8 ld [ %fp + -8 ], %o0
20203d4: c2 00 60 04 ld [ %g1 + 4 ], %g1
20203d8: 90 06 80 08 add %i2, %o0, %o0
20203dc: 92 07 bf e4 add %fp, -28, %o1
20203e0: 9f c0 40 00 call %g1
20203e4: 94 07 bf fc add %fp, -4, %o2
if ( result != 0 ) {
20203e8: 80 a2 20 00 cmp %o0, 0
20203ec: 12 80 00 29 bne 2020490 <_rename_r+0x1d4>
20203f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
20203f4: c4 07 bf e0 ld [ %fp + -32 ], %g2
20203f8: 80 a0 80 01 cmp %g2, %g1
20203fc: 12 80 00 15 bne 2020450 <_rename_r+0x194>
2020400: c2 07 bf f0 ld [ %fp + -16 ], %g1
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
2020404: d6 07 bf fc ld [ %fp + -4 ], %o3
2020408: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
202040c: 92 07 bf bc add %fp, -68, %o1
2020410: 94 07 bf e4 add %fp, -28, %o2
2020414: 9f c0 40 00 call %g1
2020418: 90 10 00 1d mov %i5, %o0
202041c: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &new_parent_loc );
2020420: 7f ff 92 eb call 2004fcc <rtems_filesystem_freenode>
2020424: 90 07 bf e4 add %fp, -28, %o0
if ( free_old_parentloc )
2020428: 80 8e e0 ff btst 0xff, %i3
202042c: 12 80 00 06 bne 2020444 <_rename_r+0x188>
2020430: 01 00 00 00 nop
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
2020434: 7f ff 92 e6 call 2004fcc <rtems_filesystem_freenode>
2020438: 90 07 bf bc add %fp, -68, %o0
return result;
}
202043c: 81 c7 e0 08 ret
2020440: 81 e8 00 00 restore
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
2020444: 7f ff 92 e2 call 2004fcc <rtems_filesystem_freenode>
2020448: 90 10 00 1d mov %i5, %o0
202044c: 30 bf ff fa b,a 2020434 <_rename_r+0x178>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
2020450: 7f ff 92 df call 2004fcc <rtems_filesystem_freenode>
2020454: 90 07 bf e4 add %fp, -28, %o0
if ( free_old_parentloc )
2020458: 80 8e e0 ff btst 0xff, %i3
202045c: 12 80 00 0a bne 2020484 <_rename_r+0x1c8>
2020460: 01 00 00 00 nop
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
2020464: 7f ff 92 da call 2004fcc <rtems_filesystem_freenode>
2020468: 90 07 bf bc add %fp, -68, %o0
rtems_set_errno_and_return_minus_one( EXDEV );
202046c: 7f ff c7 9b call 20122d8 <__errno>
2020470: b0 10 3f ff mov -1, %i0
2020474: 82 10 20 12 mov 0x12, %g1
2020478: c2 22 00 00 st %g1, [ %o0 ]
202047c: 81 c7 e0 08 ret
2020480: 81 e8 00 00 restore
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
2020484: 7f ff 92 d2 call 2004fcc <rtems_filesystem_freenode>
2020488: 90 10 00 1d mov %i5, %o0
202048c: 30 bf ff f6 b,a 2020464 <_rename_r+0x1a8>
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
2020490: 7f ff 92 cf call 2004fcc <rtems_filesystem_freenode>
2020494: 90 07 bf e4 add %fp, -28, %o0
if ( free_old_parentloc )
2020498: 80 8e e0 ff btst 0xff, %i3
202049c: 02 80 00 05 be 20204b0 <_rename_r+0x1f4>
20204a0: 90 07 bf bc add %fp, -68, %o0
rtems_filesystem_freenode( &old_parent_loc );
20204a4: 7f ff 92 ca call 2004fcc <rtems_filesystem_freenode>
20204a8: 90 10 00 1d mov %i5, %o0
rtems_filesystem_freenode( &old_loc );
20204ac: 90 07 bf bc add %fp, -68, %o0
20204b0: 7f ff 92 c7 call 2004fcc <rtems_filesystem_freenode>
20204b4: b0 10 3f ff mov -1, %i0
return -1;
20204b8: 81 c7 e0 08 ret
20204bc: 81 e8 00 00 restore
0200646c <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
200646c: 9d e3 bf 98 save %sp, -104, %sp
long adjustment;
/*
* Simple validations
*/
if ( !delta )
2006470: ba 96 20 00 orcc %i0, 0, %i5
2006474: 02 80 00 54 be 20065c4 <adjtime+0x158>
2006478: 03 00 03 d0 sethi %hi(0xf4000), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
200647c: c4 07 60 04 ld [ %i5 + 4 ], %g2
2006480: 82 10 62 3f or %g1, 0x23f, %g1
2006484: 80 a0 80 01 cmp %g2, %g1
2006488: 18 80 00 4f bgu 20065c4 <adjtime+0x158>
200648c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
2006490: 22 80 00 06 be,a 20064a8 <adjtime+0x3c>
2006494: c2 07 40 00 ld [ %i5 ], %g1
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
2006498: c0 26 60 04 clr [ %i1 + 4 ]
200649c: c4 07 60 04 ld [ %i5 + 4 ], %g2
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
20064a0: c0 26 40 00 clr [ %i1 ]
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
20064a4: c2 07 40 00 ld [ %i5 ], %g1
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
20064a8: 07 00 80 63 sethi %hi(0x2018c00), %g3
20064ac: c8 00 e0 58 ld [ %g3 + 0x58 ], %g4 ! 2018c58 <Configuration+0xc>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
20064b0: 9f 28 60 08 sll %g1, 8, %o7
20064b4: 87 28 60 03 sll %g1, 3, %g3
20064b8: 86 23 c0 03 sub %o7, %g3, %g3
20064bc: 9f 28 e0 06 sll %g3, 6, %o7
20064c0: 86 23 c0 03 sub %o7, %g3, %g3
20064c4: 82 00 c0 01 add %g3, %g1, %g1
20064c8: 83 28 60 06 sll %g1, 6, %g1
adjustment += delta->tv_usec;
20064cc: 84 00 40 02 add %g1, %g2, %g2
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
20064d0: 80 a0 80 04 cmp %g2, %g4
20064d4: 0a 80 00 3a bcs 20065bc <adjtime+0x150>
20064d8: b0 10 20 00 clr %i0
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20064dc: 03 00 80 66 sethi %hi(0x2019800), %g1
20064e0: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 2019ac0 <_Thread_Dispatch_disable_level>
20064e4: 84 00 a0 01 inc %g2
20064e8: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ]
return _Thread_Dispatch_disable_level;
20064ec: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
20064f0: 40 00 06 75 call 2007ec4 <_TOD_Get>
20064f4: 90 07 bf f8 add %fp, -8, %o0
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
20064f8: c2 07 60 04 ld [ %i5 + 4 ], %g1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
20064fc: c8 07 bf f8 ld [ %fp + -8 ], %g4
2006500: c4 07 40 00 ld [ %i5 ], %g2
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
2006504: 87 28 60 02 sll %g1, 2, %g3
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
2006508: 84 01 00 02 add %g4, %g2, %g2
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
200650c: 89 28 60 07 sll %g1, 7, %g4
2006510: 86 21 00 03 sub %g4, %g3, %g3
2006514: 82 00 c0 01 add %g3, %g1, %g1
2006518: c6 07 bf fc ld [ %fp + -4 ], %g3
200651c: 83 28 60 03 sll %g1, 3, %g1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
2006520: c4 27 bf f8 st %g2, [ %fp + -8 ]
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
2006524: 82 00 40 03 add %g1, %g3, %g1
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
2006528: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3
200652c: 86 10 e1 ff or %g3, 0x1ff, %g3 ! 3b9ac9ff <RAM_END+0x395ac9ff>
2006530: 80 a0 40 03 cmp %g1, %g3
2006534: 08 80 00 0a bleu 200655c <adjtime+0xf0>
2006538: c2 27 bf fc st %g1, [ %fp + -4 ]
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
200653c: 09 31 19 4d sethi %hi(0xc4653400), %g4
2006540: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 <RAM_END+0xc2253600>
2006544: 82 00 40 04 add %g1, %g4, %g1
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
2006548: 80 a0 40 03 cmp %g1, %g3
200654c: 18 bf ff fe bgu 2006544 <adjtime+0xd8> <== NEVER TAKEN
2006550: 84 00 a0 01 inc %g2
2006554: c2 27 bf fc st %g1, [ %fp + -4 ]
2006558: c4 27 bf f8 st %g2, [ %fp + -8 ]
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
200655c: 09 31 19 4d sethi %hi(0xc4653400), %g4
2006560: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 <RAM_END+0xc2253600>
2006564: 80 a0 40 04 cmp %g1, %g4
2006568: 18 80 00 0a bgu 2006590 <adjtime+0x124> <== NEVER TAKEN
200656c: c4 07 bf f8 ld [ %fp + -8 ], %g2
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
2006570: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3
2006574: 86 10 e2 00 or %g3, 0x200, %g3 ! 3b9aca00 <RAM_END+0x395aca00>
2006578: 82 00 40 03 add %g1, %g3, %g1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
200657c: 80 a0 40 04 cmp %g1, %g4
2006580: 08 bf ff fe bleu 2006578 <adjtime+0x10c>
2006584: 84 00 bf ff add %g2, -1, %g2
2006588: c2 27 bf fc st %g1, [ %fp + -4 ]
200658c: c4 27 bf f8 st %g2, [ %fp + -8 ]
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
2006590: 40 00 06 77 call 2007f6c <_TOD_Set>
2006594: 90 07 bf f8 add %fp, -8, %o0
_Thread_Enable_dispatch();
2006598: 40 00 0d 1b call 2009a04 <_Thread_Enable_dispatch>
200659c: b0 10 20 00 clr %i0
/* set the user's output */
if ( olddelta )
20065a0: 80 a6 60 00 cmp %i1, 0
20065a4: 02 80 00 0c be 20065d4 <adjtime+0x168>
20065a8: 01 00 00 00 nop
*olddelta = *delta;
20065ac: c2 07 40 00 ld [ %i5 ], %g1
20065b0: c2 26 40 00 st %g1, [ %i1 ]
20065b4: c2 07 60 04 ld [ %i5 + 4 ], %g1
20065b8: c2 26 60 04 st %g1, [ %i1 + 4 ]
return 0;
}
20065bc: 81 c7 e0 08 ret
20065c0: 81 e8 00 00 restore
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
20065c4: 40 00 27 0a call 20101ec <__errno>
20065c8: b0 10 3f ff mov -1, %i0
20065cc: 82 10 20 16 mov 0x16, %g1
20065d0: c2 22 00 00 st %g1, [ %o0 ]
20065d4: 81 c7 e0 08 ret
20065d8: 81 e8 00 00 restore
02006cd8 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
2006cd8: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
2006cdc: 3b 00 80 67 sethi %hi(0x2019c00), %i5
2006ce0: 40 00 04 91 call 2007f24 <pthread_mutex_lock>
2006ce4: 90 17 61 3c or %i5, 0x13c, %o0 ! 2019d3c <aio_request_queue>
if (fcntl (fildes, F_GETFD) < 0) {
2006ce8: 90 10 00 18 mov %i0, %o0
2006cec: 40 00 1e ab call 200e798 <fcntl>
2006cf0: 92 10 20 01 mov 1, %o1
2006cf4: 80 a2 20 00 cmp %o0, 0
2006cf8: 06 80 00 6c bl 2006ea8 <aio_cancel+0x1d0>
2006cfc: 80 a6 60 00 cmp %i1, 0
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
2006d00: 02 80 00 3b be 2006dec <aio_cancel+0x114>
2006d04: 92 10 00 18 mov %i0, %o1
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
2006d08: f8 06 40 00 ld [ %i1 ], %i4
2006d0c: 80 a7 00 18 cmp %i4, %i0
2006d10: 12 80 00 2f bne 2006dcc <aio_cancel+0xf4>
2006d14: 90 17 61 3c or %i5, 0x13c, %o0
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);
2006d18: 92 10 00 1c mov %i4, %o1
2006d1c: 11 00 80 67 sethi %hi(0x2019c00), %o0
2006d20: 94 10 20 00 clr %o2
2006d24: 40 00 00 cc call 2007054 <rtems_aio_search_fd>
2006d28: 90 12 21 84 or %o0, 0x184, %o0
if (r_chain == NULL) {
2006d2c: b0 92 20 00 orcc %o0, 0, %i0
2006d30: 22 80 00 0f be,a 2006d6c <aio_cancel+0x94>
2006d34: ba 17 61 3c or %i5, 0x13c, %i5
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
2006d38: b8 06 20 1c add %i0, 0x1c, %i4
2006d3c: 40 00 04 7a call 2007f24 <pthread_mutex_lock>
2006d40: 90 10 00 1c mov %i4, %o0
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
2006d44: 92 10 00 19 mov %i1, %o1
2006d48: 40 00 01 e4 call 20074d8 <rtems_aio_remove_req>
2006d4c: 90 06 20 08 add %i0, 8, %o0
2006d50: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&r_chain->mutex);
2006d54: 40 00 04 94 call 2007fa4 <pthread_mutex_unlock>
2006d58: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2006d5c: 40 00 04 92 call 2007fa4 <pthread_mutex_unlock>
2006d60: 90 17 61 3c or %i5, 0x13c, %o0
return result;
}
return AIO_ALLDONE;
}
2006d64: 81 c7 e0 08 ret
2006d68: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2006d6c: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
2006d70: 82 07 60 58 add %i5, 0x58, %g1
2006d74: 80 a0 80 01 cmp %g2, %g1
2006d78: 02 80 00 0f be 2006db4 <aio_cancel+0xdc> <== NEVER TAKEN
2006d7c: 90 07 60 54 add %i5, 0x54, %o0
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
2006d80: 92 10 00 1c mov %i4, %o1
2006d84: 40 00 00 b4 call 2007054 <rtems_aio_search_fd>
2006d88: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2006d8c: 80 a2 20 00 cmp %o0, 0
2006d90: 02 80 00 0e be 2006dc8 <aio_cancel+0xf0>
2006d94: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
2006d98: 40 00 01 d0 call 20074d8 <rtems_aio_remove_req>
2006d9c: 90 02 20 08 add %o0, 8, %o0
2006da0: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&aio_request_queue.mutex);
2006da4: 40 00 04 80 call 2007fa4 <pthread_mutex_unlock>
2006da8: 90 10 00 1d mov %i5, %o0
return result;
2006dac: 81 c7 e0 08 ret
2006db0: 81 e8 00 00 restore
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
2006db4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2006db8: 40 00 04 7b call 2007fa4 <pthread_mutex_unlock>
2006dbc: b0 10 20 02 mov 2, %i0
return AIO_ALLDONE;
2006dc0: 81 c7 e0 08 ret
2006dc4: 81 e8 00 00 restore
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
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);
2006dc8: 90 10 00 1d mov %i5, %o0
2006dcc: 40 00 04 76 call 2007fa4 <pthread_mutex_unlock>
2006dd0: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one (EINVAL);
2006dd4: 40 00 2c f3 call 20121a0 <__errno>
2006dd8: 01 00 00 00 nop
2006ddc: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2006de0: c2 22 00 00 st %g1, [ %o0 ]
2006de4: 81 c7 e0 08 ret
2006de8: 81 e8 00 00 restore
/* 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);
2006dec: 11 00 80 67 sethi %hi(0x2019c00), %o0
2006df0: 94 10 20 00 clr %o2
2006df4: 40 00 00 98 call 2007054 <rtems_aio_search_fd>
2006df8: 90 12 21 84 or %o0, 0x184, %o0
if (r_chain == NULL) {
2006dfc: b8 92 20 00 orcc %o0, 0, %i4
2006e00: 02 80 00 0f be 2006e3c <aio_cancel+0x164>
2006e04: b2 07 20 1c add %i4, 0x1c, %i1
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
2006e08: 40 00 04 47 call 2007f24 <pthread_mutex_lock>
2006e0c: 90 10 00 19 mov %i1, %o0
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2006e10: 40 00 0b 08 call 2009a30 <_Chain_Extract>
2006e14: 90 10 00 1c mov %i4, %o0
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
2006e18: 40 00 01 9c call 2007488 <rtems_aio_remove_fd>
2006e1c: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&r_chain->mutex);
2006e20: 40 00 04 61 call 2007fa4 <pthread_mutex_unlock>
2006e24: 90 10 00 19 mov %i1, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2006e28: 90 17 61 3c or %i5, 0x13c, %o0
2006e2c: 40 00 04 5e call 2007fa4 <pthread_mutex_unlock>
2006e30: b0 10 20 00 clr %i0
return AIO_CANCELED;
2006e34: 81 c7 e0 08 ret
2006e38: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2006e3c: ba 17 61 3c or %i5, 0x13c, %i5
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)) {
2006e40: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
2006e44: 82 07 60 58 add %i5, 0x58, %g1
2006e48: 80 a0 80 01 cmp %g2, %g1
2006e4c: 02 bf ff da be 2006db4 <aio_cancel+0xdc> <== NEVER TAKEN
2006e50: 90 07 60 54 add %i5, 0x54, %o0
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
2006e54: 92 10 00 18 mov %i0, %o1
2006e58: 40 00 00 7f call 2007054 <rtems_aio_search_fd>
2006e5c: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2006e60: b8 92 20 00 orcc %o0, 0, %i4
2006e64: 22 bf ff d5 be,a 2006db8 <aio_cancel+0xe0>
2006e68: 90 10 00 1d mov %i5, %o0
2006e6c: 40 00 0a f1 call 2009a30 <_Chain_Extract>
2006e70: b2 07 20 1c add %i4, 0x1c, %i1
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
2006e74: 40 00 01 85 call 2007488 <rtems_aio_remove_fd>
2006e78: 90 10 00 1c mov %i4, %o0
pthread_mutex_destroy (&r_chain->mutex);
2006e7c: 40 00 03 7f call 2007c78 <pthread_mutex_destroy>
2006e80: 90 10 00 19 mov %i1, %o0
pthread_cond_destroy (&r_chain->mutex);
2006e84: 40 00 02 9e call 20078fc <pthread_cond_destroy>
2006e88: 90 10 00 19 mov %i1, %o0
free (r_chain);
2006e8c: 7f ff f2 0a call 20036b4 <free>
2006e90: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
2006e94: b0 10 20 00 clr %i0
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
pthread_cond_destroy (&r_chain->mutex);
free (r_chain);
pthread_mutex_unlock (&aio_request_queue.mutex);
2006e98: 40 00 04 43 call 2007fa4 <pthread_mutex_unlock>
2006e9c: 90 10 00 1d mov %i5, %o0
return AIO_CANCELED;
2006ea0: 81 c7 e0 08 ret
2006ea4: 81 e8 00 00 restore
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
2006ea8: 40 00 04 3f call 2007fa4 <pthread_mutex_unlock>
2006eac: 90 17 61 3c or %i5, 0x13c, %o0
rtems_set_errno_and_return_minus_one (EBADF);
2006eb0: 40 00 2c bc call 20121a0 <__errno>
2006eb4: b0 10 3f ff mov -1, %i0
2006eb8: 82 10 20 09 mov 9, %g1
2006ebc: c2 22 00 00 st %g1, [ %o0 ]
2006ec0: 81 c7 e0 08 ret
2006ec4: 81 e8 00 00 restore
02006ed0 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
2006ed0: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
2006ed4: 03 00 00 08 sethi %hi(0x2000), %g1
2006ed8: 80 a6 00 01 cmp %i0, %g1
2006edc: 12 80 00 14 bne 2006f2c <aio_fsync+0x5c>
2006ee0: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2006ee4: d0 06 40 00 ld [ %i1 ], %o0
2006ee8: 40 00 1e 2c call 200e798 <fcntl>
2006eec: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
2006ef0: 90 0a 20 03 and %o0, 3, %o0
2006ef4: 90 02 3f ff add %o0, -1, %o0
2006ef8: 80 a2 20 01 cmp %o0, 1
2006efc: 18 80 00 0c bgu 2006f2c <aio_fsync+0x5c>
2006f00: ba 10 20 09 mov 9, %i5
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
2006f04: 7f ff f3 76 call 2003cdc <malloc>
2006f08: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
2006f0c: 80 a2 20 00 cmp %o0, 0
2006f10: 02 80 00 06 be 2006f28 <aio_fsync+0x58> <== NEVER TAKEN
2006f14: 82 10 20 03 mov 3, %g1
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
2006f18: f2 22 20 14 st %i1, [ %o0 + 0x14 ]
req->aiocbp->aio_lio_opcode = LIO_SYNC;
2006f1c: c2 26 60 30 st %g1, [ %i1 + 0x30 ]
return rtems_aio_enqueue (req);
2006f20: 40 00 01 8a call 2007548 <rtems_aio_enqueue>
2006f24: 91 e8 00 08 restore %g0, %o0, %o0
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2006f28: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
2006f2c: 82 10 3f ff mov -1, %g1
2006f30: fa 26 60 34 st %i5, [ %i1 + 0x34 ]
2006f34: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
2006f38: 40 00 2c 9a call 20121a0 <__errno>
2006f3c: b0 10 3f ff mov -1, %i0
2006f40: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
2006f44: 81 c7 e0 08 ret
2006f48: 81 e8 00 00 restore
0200772c <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
200772c: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2007730: d0 06 00 00 ld [ %i0 ], %o0
2007734: 40 00 1c 19 call 200e798 <fcntl>
2007738: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
200773c: 90 0a 20 03 and %o0, 3, %o0
2007740: 80 a2 20 02 cmp %o0, 2
2007744: 12 80 00 1b bne 20077b0 <aio_read+0x84>
2007748: 80 a2 20 00 cmp %o0, 0
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
200774c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2007750: 80 a0 60 00 cmp %g1, 0
2007754: 12 80 00 0f bne 2007790 <aio_read+0x64>
2007758: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
200775c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007760: 80 a0 60 00 cmp %g1, 0
2007764: 06 80 00 0c bl 2007794 <aio_read+0x68>
2007768: 82 10 3f ff mov -1, %g1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
200776c: 7f ff f1 5c call 2003cdc <malloc>
2007770: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
2007774: 80 a2 20 00 cmp %o0, 0
2007778: 02 80 00 12 be 20077c0 <aio_read+0x94> <== NEVER TAKEN
200777c: 82 10 20 01 mov 1, %g1
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
2007780: f0 22 20 14 st %i0, [ %o0 + 0x14 ]
req->aiocbp->aio_lio_opcode = LIO_READ;
2007784: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
return rtems_aio_enqueue (req);
2007788: 7f ff ff 70 call 2007548 <rtems_aio_enqueue>
200778c: 91 e8 00 08 restore %g0, %o0, %o0
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2007790: 82 10 3f ff mov -1, %g1
2007794: fa 26 20 34 st %i5, [ %i0 + 0x34 ]
2007798: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
200779c: 40 00 2a 81 call 20121a0 <__errno>
20077a0: b0 10 3f ff mov -1, %i0
20077a4: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
20077a8: 81 c7 e0 08 ret
20077ac: 81 e8 00 00 restore
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
20077b0: 02 bf ff e7 be 200774c <aio_read+0x20> <== NEVER TAKEN
20077b4: ba 10 20 09 mov 9, %i5
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
20077b8: 10 bf ff f7 b 2007794 <aio_read+0x68>
20077bc: 82 10 3f ff mov -1, %g1
20077c0: 10 bf ff f4 b 2007790 <aio_read+0x64> <== NOT EXECUTED
20077c4: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
020077d0 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
20077d0: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
20077d4: d0 06 00 00 ld [ %i0 ], %o0
20077d8: 40 00 1b f0 call 200e798 <fcntl>
20077dc: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
20077e0: 90 0a 20 03 and %o0, 3, %o0
20077e4: 90 02 3f ff add %o0, -1, %o0
20077e8: 80 a2 20 01 cmp %o0, 1
20077ec: 18 80 00 14 bgu 200783c <aio_write+0x6c>
20077f0: ba 10 20 09 mov 9, %i5
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
20077f4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20077f8: 80 a0 60 00 cmp %g1, 0
20077fc: 12 80 00 10 bne 200783c <aio_write+0x6c>
2007800: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
2007804: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007808: 80 a0 60 00 cmp %g1, 0
200780c: 06 80 00 0d bl 2007840 <aio_write+0x70>
2007810: 82 10 3f ff mov -1, %g1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
2007814: 7f ff f1 32 call 2003cdc <malloc>
2007818: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
200781c: 80 a2 20 00 cmp %o0, 0
2007820: 02 80 00 06 be 2007838 <aio_write+0x68> <== NEVER TAKEN
2007824: 82 10 20 02 mov 2, %g1
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
2007828: f0 22 20 14 st %i0, [ %o0 + 0x14 ]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
200782c: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
return rtems_aio_enqueue (req);
2007830: 7f ff ff 46 call 2007548 <rtems_aio_enqueue>
2007834: 91 e8 00 08 restore %g0, %o0, %o0
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2007838: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
200783c: 82 10 3f ff mov -1, %g1
2007840: fa 26 20 34 st %i5, [ %i0 + 0x34 ]
2007844: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
2007848: 40 00 2a 56 call 20121a0 <__errno>
200784c: b0 10 3f ff mov -1, %i0
2007850: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
2007854: 81 c7 e0 08 ret
2007858: 81 e8 00 00 restore
02004b98 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
2004b98: 9d e3 bf 88 save %sp, -120, %sp
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
2004b9c: 3b 00 80 8b sethi %hi(0x2022c00), %i5
2004ba0: f8 07 62 5c ld [ %i5 + 0x25c ], %i4 ! 2022e5c <rtems_current_user_env>
2004ba4: 03 00 80 8e sethi %hi(0x2023800), %g1
2004ba8: 82 10 60 14 or %g1, 0x14, %g1 ! 2023814 <rtems_global_user_env>
2004bac: 80 a7 00 01 cmp %i4, %g1
2004bb0: 02 80 00 20 be 2004c30 <chroot+0x98>
2004bb4: 01 00 00 00 nop
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
2004bb8: 7f ff ff c3 call 2004ac4 <chdir>
2004bbc: 90 10 00 18 mov %i0, %o0
if (result) {
2004bc0: 80 a2 20 00 cmp %o0, 0
2004bc4: 12 80 00 27 bne 2004c60 <chroot+0xc8>
2004bc8: 92 10 20 01 mov 1, %o1
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
2004bcc: 11 00 80 83 sethi %hi(0x2020c00), %o0
2004bd0: 94 10 20 00 clr %o2
2004bd4: 90 12 23 58 or %o0, 0x358, %o0
2004bd8: 96 07 bf ec add %fp, -20, %o3
2004bdc: 40 00 00 68 call 2004d7c <rtems_filesystem_evaluate_path>
2004be0: 98 10 20 00 clr %o4
2004be4: 80 a2 20 00 cmp %o0, 0
2004be8: 12 80 00 1e bne 2004c60 <chroot+0xc8> <== NEVER TAKEN
2004bec: d0 07 62 5c ld [ %i5 + 0x25c ], %o0
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
2004bf0: b0 10 20 00 clr %i0
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
2004bf4: 40 00 00 f6 call 2004fcc <rtems_filesystem_freenode>
2004bf8: 90 02 20 18 add %o0, 0x18, %o0
rtems_filesystem_root = loc;
2004bfc: c2 07 62 5c ld [ %i5 + 0x25c ], %g1
2004c00: c4 07 bf ec ld [ %fp + -20 ], %g2
2004c04: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
2004c08: c4 07 bf f0 ld [ %fp + -16 ], %g2
2004c0c: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
2004c10: c4 07 bf f4 ld [ %fp + -12 ], %g2
2004c14: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
2004c18: c4 07 bf f8 ld [ %fp + -8 ], %g2
2004c1c: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2004c20: c4 07 bf fc ld [ %fp + -4 ], %g2
2004c24: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
return 0;
}
2004c28: 81 c7 e0 08 ret
2004c2c: 81 e8 00 00 restore
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
2004c30: 40 00 05 a3 call 20062bc <rtems_libio_set_private_env>
2004c34: 01 00 00 00 nop
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
2004c38: c2 07 62 5c ld [ %i5 + 0x25c ], %g1
2004c3c: 80 a0 40 1c cmp %g1, %i4
2004c40: 12 bf ff de bne 2004bb8 <chroot+0x20>
2004c44: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004c48: 40 00 35 a4 call 20122d8 <__errno>
2004c4c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2004c50: 82 10 20 86 mov 0x86, %g1
2004c54: c2 22 00 00 st %g1, [ %o0 ]
2004c58: 81 c7 e0 08 ret
2004c5c: 81 e8 00 00 restore
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
2004c60: 40 00 35 9e call 20122d8 <__errno>
2004c64: b0 10 3f ff mov -1, %i0
2004c68: 40 00 35 9c call 20122d8 <__errno>
2004c6c: ba 10 00 08 mov %o0, %i5
2004c70: c2 02 00 00 ld [ %o0 ], %g1
2004c74: c2 27 40 00 st %g1, [ %i5 ]
2004c78: 81 c7 e0 08 ret
2004c7c: 81 e8 00 00 restore
020062d4 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
20062d4: 9d e3 bf a0 save %sp, -96, %sp
if ( !tp )
20062d8: 80 a6 60 00 cmp %i1, 0
20062dc: 02 80 00 20 be 200635c <clock_gettime+0x88>
20062e0: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
20062e4: 02 80 00 19 be 2006348 <clock_gettime+0x74>
20062e8: 80 a6 20 04 cmp %i0, 4
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
20062ec: 02 80 00 12 be 2006334 <clock_gettime+0x60> <== NEVER TAKEN
20062f0: 80 a6 20 02 cmp %i0, 2
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
20062f4: 02 80 00 10 be 2006334 <clock_gettime+0x60>
20062f8: 80 a6 20 03 cmp %i0, 3
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
20062fc: 02 80 00 08 be 200631c <clock_gettime+0x48>
2006300: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
2006304: 40 00 29 43 call 2010810 <__errno>
2006308: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200630c: 82 10 20 16 mov 0x16, %g1
2006310: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
2006314: 81 c7 e0 08 ret
2006318: 81 e8 00 00 restore
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
200631c: 40 00 29 3d call 2010810 <__errno>
2006320: b0 10 3f ff mov -1, %i0
2006324: 82 10 20 58 mov 0x58, %g1
2006328: c2 22 00 00 st %g1, [ %o0 ]
200632c: 81 c7 e0 08 ret
2006330: 81 e8 00 00 restore
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
2006334: 90 10 00 19 mov %i1, %o0
2006338: 40 00 08 40 call 2008438 <_TOD_Get_uptime_as_timespec>
200633c: b0 10 20 00 clr %i0
return 0;
2006340: 81 c7 e0 08 ret
2006344: 81 e8 00 00 restore
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
2006348: 90 10 00 19 mov %i1, %o0
200634c: 40 00 08 20 call 20083cc <_TOD_Get>
2006350: b0 10 20 00 clr %i0
return 0;
2006354: 81 c7 e0 08 ret
2006358: 81 e8 00 00 restore
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
200635c: 40 00 29 2d call 2010810 <__errno>
2006360: b0 10 3f ff mov -1, %i0
2006364: 82 10 20 16 mov 0x16, %g1
2006368: c2 22 00 00 st %g1, [ %o0 ]
200636c: 81 c7 e0 08 ret
2006370: 81 e8 00 00 restore
02006374 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
2006374: 9d e3 bf a0 save %sp, -96, %sp
if ( !tp )
2006378: 80 a6 60 00 cmp %i1, 0
200637c: 02 80 00 25 be 2006410 <clock_settime+0x9c> <== NEVER TAKEN
2006380: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2006384: 02 80 00 0c be 20063b4 <clock_settime+0x40>
2006388: 80 a6 20 02 cmp %i0, 2
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
200638c: 02 80 00 1b be 20063f8 <clock_settime+0x84>
2006390: 80 a6 20 03 cmp %i0, 3
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
2006394: 02 80 00 19 be 20063f8 <clock_settime+0x84>
2006398: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
200639c: 40 00 29 1d call 2010810 <__errno>
20063a0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
20063a4: 82 10 20 16 mov 0x16, %g1
20063a8: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
20063ac: 81 c7 e0 08 ret
20063b0: 81 e8 00 00 restore
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
20063b4: c4 06 40 00 ld [ %i1 ], %g2
20063b8: 03 08 76 b9 sethi %hi(0x21dae400), %g1
20063bc: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff <RAM_END+0x1f9ae4ff>
20063c0: 80 a0 80 01 cmp %g2, %g1
20063c4: 08 80 00 13 bleu 2006410 <clock_settime+0x9c>
20063c8: 03 00 80 69 sethi %hi(0x201a400), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20063cc: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 201a660 <_Thread_Dispatch_disable_level>
20063d0: 84 00 a0 01 inc %g2
20063d4: c4 20 62 60 st %g2, [ %g1 + 0x260 ]
return _Thread_Dispatch_disable_level;
20063d8: c2 00 62 60 ld [ %g1 + 0x260 ], %g1
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
20063dc: 90 10 00 19 mov %i1, %o0
20063e0: 40 00 08 2e call 2008498 <_TOD_Set>
20063e4: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20063e8: 40 00 0e d2 call 2009f30 <_Thread_Enable_dispatch>
20063ec: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
20063f0: 81 c7 e0 08 ret
20063f4: 81 e8 00 00 restore
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
20063f8: 40 00 29 06 call 2010810 <__errno>
20063fc: b0 10 3f ff mov -1, %i0
2006400: 82 10 20 58 mov 0x58, %g1
2006404: c2 22 00 00 st %g1, [ %o0 ]
2006408: 81 c7 e0 08 ret
200640c: 81 e8 00 00 restore
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
2006410: 40 00 29 00 call 2010810 <__errno>
2006414: b0 10 3f ff mov -1, %i0
2006418: 82 10 20 16 mov 0x16, %g1
200641c: c2 22 00 00 st %g1, [ %o0 ]
2006420: 81 c7 e0 08 ret
2006424: 81 e8 00 00 restore
02002834 <create_disk>:
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2002834: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2002838: 39 00 80 6a sethi %hi(0x201a800), %i4
200283c: e0 07 21 d0 ld [ %i4 + 0x1d0 ], %l0 ! 201a9d0 <disktab_size>
2002840: 03 00 80 6a sethi %hi(0x201a800), %g1
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2002844: ba 10 00 18 mov %i0, %i5
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2002848: 80 a6 00 10 cmp %i0, %l0
200284c: 0a 80 00 16 bcs 20028a4 <create_disk+0x70>
2002850: e2 00 61 d4 ld [ %g1 + 0x1d4 ], %l1
rtems_disk_device_table *table = disktab;
2002854: 27 00 80 6a sethi %hi(0x201a800), %l3
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
2002858: a5 2c 20 01 sll %l0, 1, %l2
if (major >= new_size) {
200285c: 80 a6 00 12 cmp %i0, %l2
2002860: 0a 80 00 03 bcs 200286c <create_disk+0x38> <== NEVER TAKEN
2002864: d0 04 e1 d4 ld [ %l3 + 0x1d4 ], %o0
new_size = major + 1;
2002868: a4 06 20 01 add %i0, 1, %l2
}
table = realloc(table, new_size * sizeof(*table));
200286c: 93 2c a0 03 sll %l2, 3, %o1
2002870: 40 00 08 31 call 2004934 <realloc>
2002874: b0 10 20 1a mov 0x1a, %i0
if (table == NULL) {
2002878: 80 a2 20 00 cmp %o0, 0
200287c: 02 80 00 1b be 20028e8 <create_disk+0xb4> <== ALWAYS TAKEN
2002880: a2 10 00 08 mov %o0, %l1
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2002884: 94 24 80 10 sub %l2, %l0, %o2 <== NOT EXECUTED
2002888: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED
200288c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2002890: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED
2002894: 40 00 46 a2 call 201431c <memset> <== NOT EXECUTED
2002898: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED
disktab = table;
200289c: e2 24 e1 d4 st %l1, [ %l3 + 0x1d4 ] <== NOT EXECUTED
disktab_size = new_size;
20028a0: e4 27 21 d0 st %l2, [ %i4 + 0x1d0 ] <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
20028a4: 83 2f 60 03 sll %i5, 3, %g1
20028a8: e0 04 40 01 ld [ %l1 + %g1 ], %l0
20028ac: a2 04 40 01 add %l1, %g1, %l1
20028b0: 80 a4 20 00 cmp %l0, 0
20028b4: 02 80 00 0f be 20028f0 <create_disk+0xbc>
20028b8: e4 04 60 04 ld [ %l1 + 4 ], %l2
20028bc: 80 a6 40 12 cmp %i1, %l2
20028c0: 1a 80 00 0d bcc 20028f4 <create_disk+0xc0> <== NEVER TAKEN
20028c4: 80 a4 a0 00 cmp %l2, 0
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
disktab [major].size = new_size;
}
return disktab [major].minor + minor;
20028c8: 83 2e 60 02 sll %i1, 2, %g1
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
20028cc: b8 84 00 01 addcc %l0, %g1, %i4
20028d0: 02 80 00 06 be 20028e8 <create_disk+0xb4> <== NEVER TAKEN
20028d4: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
20028d8: c2 04 00 01 ld [ %l0 + %g1 ], %g1
20028dc: 80 a0 60 00 cmp %g1, 0
20028e0: 02 80 00 20 be 2002960 <create_disk+0x12c>
20028e4: b0 10 20 0c mov 0xc, %i0
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
20028e8: 81 c7 e0 08 ret
20028ec: 81 e8 00 00 restore
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
20028f0: 80 a4 a0 00 cmp %l2, 0
20028f4: 12 80 00 15 bne 2002948 <create_disk+0x114> <== NEVER TAKEN
20028f8: b8 10 20 08 mov 8, %i4
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
}
if (minor >= new_size) {
20028fc: 80 a6 40 1c cmp %i1, %i4
2002900: 3a 80 00 02 bcc,a 2002908 <create_disk+0xd4>
2002904: b8 06 60 01 add %i1, 1, %i4
new_size = minor + 1;
}
table = realloc(table, new_size * sizeof(*table));
2002908: 90 10 00 10 mov %l0, %o0
200290c: 93 2f 20 02 sll %i4, 2, %o1
2002910: 40 00 08 09 call 2004934 <realloc>
2002914: b0 10 20 1a mov 0x1a, %i0
if (table == NULL) {
2002918: 80 a2 20 00 cmp %o0, 0
200291c: 02 bf ff f3 be 20028e8 <create_disk+0xb4>
2002920: a0 10 00 08 mov %o0, %l0
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2002924: 94 27 00 12 sub %i4, %l2, %o2
2002928: 91 2c a0 02 sll %l2, 2, %o0
200292c: 92 10 20 00 clr %o1
2002930: 90 04 00 08 add %l0, %o0, %o0
2002934: 40 00 46 7a call 201431c <memset>
2002938: 95 2a a0 02 sll %o2, 2, %o2
disktab [major].minor = table;
200293c: e0 24 40 00 st %l0, [ %l1 ]
disktab [major].size = new_size;
2002940: 10 bf ff e2 b 20028c8 <create_disk+0x94>
2002944: f8 24 60 04 st %i4, [ %l1 + 4 ]
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
2002948: b9 2c a0 01 sll %l2, 1, %i4 <== NOT EXECUTED
}
if (minor >= new_size) {
200294c: 80 a6 40 1c cmp %i1, %i4 <== NOT EXECUTED
2002950: 0a bf ff ef bcs 200290c <create_disk+0xd8> <== NOT EXECUTED
2002954: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002958: 10 bf ff ed b 200290c <create_disk+0xd8> <== NOT EXECUTED
200295c: b8 06 60 01 add %i1, 1, %i4 <== NOT EXECUTED
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
2002960: 90 10 20 38 mov 0x38, %o0
2002964: 40 00 05 1d call 2003dd8 <malloc>
2002968: b0 10 20 1a mov 0x1a, %i0
if (dd == NULL) {
200296c: 80 a2 20 00 cmp %o0, 0
2002970: 02 bf ff de be 20028e8 <create_disk+0xb4> <== NEVER TAKEN
2002974: a0 10 00 08 mov %o0, %l0
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
2002978: 80 a6 a0 00 cmp %i2, 0
200297c: 02 80 00 0f be 20029b8 <create_disk+0x184>
2002980: a2 10 20 00 clr %l1
alloc_name = strdup(name);
2002984: 40 00 47 44 call 2014694 <strdup>
2002988: 90 10 00 1a mov %i2, %o0
if (alloc_name == NULL) {
200298c: a2 92 20 00 orcc %o0, 0, %l1
2002990: 02 80 00 15 be 20029e4 <create_disk+0x1b0> <== NEVER TAKEN
2002994: b4 10 00 08 mov %o0, %i2
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
2002998: 94 10 00 1d mov %i5, %o2
200299c: 13 00 00 18 sethi %hi(0x6000), %o1
20029a0: 96 10 00 19 mov %i1, %o3
20029a4: 40 00 05 5d call 2003f18 <mknod>
20029a8: 92 12 61 ff or %o1, 0x1ff, %o1
20029ac: 80 a2 20 00 cmp %o0, 0
20029b0: 06 80 00 0b bl 20029dc <create_disk+0x1a8> <== NEVER TAKEN
20029b4: 90 10 00 1a mov %i2, %o0
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
20029b8: fa 24 00 00 st %i5, [ %l0 ]
20029bc: f2 24 20 04 st %i1, [ %l0 + 4 ]
dd->name = alloc_name;
20029c0: e2 24 20 10 st %l1, [ %l0 + 0x10 ]
dd->uses = 0;
20029c4: c0 24 20 14 clr [ %l0 + 0x14 ]
dd->deleted = false;
20029c8: c0 2c 20 30 clrb [ %l0 + 0x30 ]
*dd_entry = dd;
20029cc: e0 27 00 00 st %l0, [ %i4 ]
*dd_ptr = dd;
20029d0: e0 26 c0 00 st %l0, [ %i3 ]
return RTEMS_SUCCESSFUL;
}
20029d4: 81 c7 e0 08 ret
20029d8: 91 e8 20 00 restore %g0, 0, %o0
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
20029dc: 40 00 04 1d call 2003a50 <free> <== NOT EXECUTED
20029e0: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
free(dd);
20029e4: 40 00 04 1b call 2003a50 <free> <== NOT EXECUTED
20029e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
20029ec: 81 c7 e0 08 ret <== NOT EXECUTED
20029f0: 81 e8 00 00 restore <== NOT EXECUTED
0200a8d4 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
200a8d4: 9d e3 bf a0 save %sp, -96, %sp
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
200a8d8: 80 8e bf f8 btst -8, %i2
200a8dc: 12 80 00 33 bne 200a9a8 <devFS_evaluate_path+0xd4> <== NEVER TAKEN
200a8e0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
200a8e4: f4 06 c0 00 ld [ %i3 ], %i2
if (!device_name_table)
200a8e8: 80 a6 a0 00 cmp %i2, 0
200a8ec: 02 80 00 35 be 200a9c0 <devFS_evaluate_path+0xec>
200a8f0: 03 00 80 63 sethi %hi(0x2018c00), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
200a8f4: e0 00 63 2c ld [ %g1 + 0x32c ], %l0 ! 2018f2c <rtems_device_table_size>
* handlers.
*/
extern rtems_filesystem_file_handlers_r devFS_file_handlers;
int devFS_evaluate_path(
200a8f8: ba 10 20 00 clr %i5
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
200a8fc: 80 a4 20 00 cmp %l0, 0
200a900: 02 80 00 18 be 200a960 <devFS_evaluate_path+0x8c> <== NEVER TAKEN
200a904: 82 10 20 00 clr %g1
if (!device_name_table[i].device_name)
200a908: a3 28 60 02 sll %g1, 2, %l1
200a90c: 83 28 60 04 sll %g1, 4, %g1
200a910: a2 04 40 01 add %l1, %g1, %l1
200a914: f8 06 80 11 ld [ %i2 + %l1 ], %i4
200a918: 80 a7 20 00 cmp %i4, 0
200a91c: 02 80 00 0d be 200a950 <devFS_evaluate_path+0x7c>
200a920: a2 06 80 11 add %i2, %l1, %l1
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
200a924: 90 10 00 18 mov %i0, %o0
200a928: 92 10 00 1c mov %i4, %o1
200a92c: 40 00 0f 79 call 200e710 <strncmp>
200a930: 94 10 00 19 mov %i1, %o2
200a934: 80 a2 20 00 cmp %o0, 0
200a938: 32 80 00 07 bne,a 200a954 <devFS_evaluate_path+0x80>
200a93c: ba 07 60 01 inc %i5
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
200a940: c2 4f 00 19 ldsb [ %i4 + %i1 ], %g1
200a944: 80 a0 60 00 cmp %g1, 0
200a948: 02 80 00 0c be 200a978 <devFS_evaluate_path+0xa4>
200a94c: 03 00 80 64 sethi %hi(0x2019000), %g1
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
200a950: ba 07 60 01 inc %i5
200a954: 80 a7 40 10 cmp %i5, %l0
200a958: 12 bf ff ec bne 200a908 <devFS_evaluate_path+0x34>
200a95c: 82 10 00 1d mov %i5, %g1
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
200a960: 40 00 0b ca call 200d888 <__errno>
200a964: b0 10 3f ff mov -1, %i0
200a968: 82 10 20 02 mov 2, %g1
200a96c: c2 22 00 00 st %g1, [ %o0 ]
}
200a970: 81 c7 e0 08 ret
200a974: 81 e8 00 00 restore
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
200a978: c2 00 60 94 ld [ %g1 + 0x94 ], %g1
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
200a97c: 05 00 80 63 sethi %hi(0x2018c00), %g2
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
200a980: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
200a984: 84 10 a3 f4 or %g2, 0x3f4, %g2
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
200a988: e2 26 c0 00 st %l1, [ %i3 ]
pathloc->handlers = &devFS_file_handlers;
200a98c: c4 26 e0 08 st %g2, [ %i3 + 8 ]
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
200a990: c2 26 e0 10 st %g1, [ %i3 + 0x10 ]
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
200a994: 05 00 80 64 sethi %hi(0x2019000), %g2
200a998: 84 10 a0 2c or %g2, 0x2c, %g2 ! 201902c <devFS_ops>
200a99c: c4 26 e0 0c st %g2, [ %i3 + 0xc ]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
200a9a0: 81 c7 e0 08 ret
200a9a4: 91 e8 20 00 restore %g0, 0, %o0
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200a9a8: 40 00 0b b8 call 200d888 <__errno> <== NOT EXECUTED
200a9ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a9b0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200a9b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a9b8: 81 c7 e0 08 ret <== NOT EXECUTED
200a9bc: 81 e8 00 00 restore <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
200a9c0: 40 00 0b b2 call 200d888 <__errno>
200a9c4: b0 10 3f ff mov -1, %i0
200a9c8: 82 10 20 0e mov 0xe, %g1
200a9cc: c2 22 00 00 st %g1, [ %o0 ]
200a9d0: 81 c7 e0 08 ret
200a9d4: 81 e8 00 00 restore
02002d68 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
2002d68: 9d e3 bf a0 save %sp, -96, %sp
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
2002d6c: c2 4e 00 00 ldsb [ %i0 ], %g1
2002d70: 80 a0 60 64 cmp %g1, 0x64
2002d74: 02 80 00 43 be 2002e80 <devFS_mknod+0x118>
2002d78: ba 10 00 18 mov %i0, %i5
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
2002d7c: 03 00 00 3c sethi %hi(0xf000), %g1
2002d80: 05 00 00 08 sethi %hi(0x2000), %g2
2002d84: 82 0e 40 01 and %i1, %g1, %g1
2002d88: 80 a0 40 02 cmp %g1, %g2
2002d8c: 12 80 00 4b bne 2002eb8 <devFS_mknod+0x150>
2002d90: 05 00 00 18 sethi %hi(0x6000), %g2
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
2002d94: f0 07 00 00 ld [ %i4 ], %i0
if (!device_name_table)
2002d98: 80 a6 20 00 cmp %i0, 0
2002d9c: 02 80 00 56 be 2002ef4 <devFS_mknod+0x18c>
2002da0: 03 00 80 63 sethi %hi(0x2018c00), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
2002da4: e0 00 63 2c ld [ %g1 + 0x32c ], %l0 ! 2018f2c <rtems_device_table_size>
2002da8: 80 a4 20 00 cmp %l0, 0
2002dac: 02 80 00 4c be 2002edc <devFS_mknod+0x174>
2002db0: 82 10 20 00 clr %g1
#include <stdlib.h>
#include <rtems/seterr.h>
#include "devfs.h"
int devFS_mknod(
2002db4: a2 10 3f ff mov -1, %l1
2002db8: 10 80 00 0a b 2002de0 <devFS_mknod+0x78>
2002dbc: b8 10 20 00 clr %i4
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
2002dc0: 40 00 2d f6 call 200e598 <strcmp>
2002dc4: 01 00 00 00 nop
2002dc8: 80 a2 20 00 cmp %o0, 0
2002dcc: 02 80 00 27 be 2002e68 <devFS_mknod+0x100>
2002dd0: b8 07 20 01 inc %i4
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
2002dd4: 80 a7 00 10 cmp %i4, %l0
2002dd8: 02 80 00 0e be 2002e10 <devFS_mknod+0xa8>
2002ddc: 82 10 00 1c mov %i4, %g1
if (device_name_table[i].device_name == NULL)
2002de0: 85 28 60 02 sll %g1, 2, %g2
2002de4: 83 28 60 04 sll %g1, 4, %g1
2002de8: 82 00 80 01 add %g2, %g1, %g1
2002dec: d2 06 00 01 ld [ %i0 + %g1 ], %o1
2002df0: 80 a2 60 00 cmp %o1, 0
2002df4: 12 bf ff f3 bne 2002dc0 <devFS_mknod+0x58>
2002df8: 90 10 00 1d mov %i5, %o0
2002dfc: a2 10 00 1c mov %i4, %l1
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
2002e00: b8 07 20 01 inc %i4
2002e04: 80 a7 00 10 cmp %i4, %l0
2002e08: 12 bf ff f6 bne 2002de0 <devFS_mknod+0x78>
2002e0c: 82 10 00 1c mov %i4, %g1
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
2002e10: 80 a4 7f ff cmp %l1, -1
2002e14: 02 80 00 32 be 2002edc <devFS_mknod+0x174> <== NEVER TAKEN
2002e18: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
2002e1c: 7f ff ff 44 call 2002b2c <sparc_disable_interrupts>
2002e20: 01 00 00 00 nop
2002e24: a0 10 00 08 mov %o0, %l0
device_name_table[slot].device_name = (char *)path;
2002e28: 83 2c 60 02 sll %l1, 2, %g1
device_name_table[slot].device_name_length = strlen(path);
2002e2c: 90 10 00 1d mov %i5, %o0
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
2002e30: a3 2c 60 04 sll %l1, 4, %l1
2002e34: a2 00 40 11 add %g1, %l1, %l1
2002e38: b8 06 00 11 add %i0, %l1, %i4
device_name_table[slot].device_name_length = strlen(path);
2002e3c: 40 00 2e 04 call 200e64c <strlen>
2002e40: fa 26 00 11 st %i5, [ %i0 + %l1 ]
device_name_table[slot].major = major;
2002e44: f4 27 20 08 st %i2, [ %i4 + 8 ]
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
2002e48: d0 27 20 04 st %o0, [ %i4 + 4 ]
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
2002e4c: f6 27 20 0c st %i3, [ %i4 + 0xc ]
device_name_table[slot].mode = mode;
2002e50: f2 27 20 10 st %i1, [ %i4 + 0x10 ]
_ISR_Enable(level);
return 0;
2002e54: b0 10 20 00 clr %i0
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
2002e58: 7f ff ff 39 call 2002b3c <sparc_enable_interrupts>
2002e5c: 90 10 00 10 mov %l0, %o0
return 0;
}
2002e60: 81 c7 e0 08 ret
2002e64: 81 e8 00 00 restore
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
2002e68: 40 00 2a 88 call 200d888 <__errno>
2002e6c: b0 10 3f ff mov -1, %i0
2002e70: 82 10 20 11 mov 0x11, %g1
2002e74: c2 22 00 00 st %g1, [ %o0 ]
2002e78: 81 c7 e0 08 ret
2002e7c: 81 e8 00 00 restore
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
2002e80: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1
2002e84: 80 a0 60 65 cmp %g1, 0x65
2002e88: 12 bf ff be bne 2002d80 <devFS_mknod+0x18> <== NEVER TAKEN
2002e8c: 03 00 00 3c sethi %hi(0xf000), %g1
2002e90: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1
2002e94: 80 a0 60 76 cmp %g1, 0x76
2002e98: 12 bf ff ba bne 2002d80 <devFS_mknod+0x18> <== NEVER TAKEN
2002e9c: 03 00 00 3c sethi %hi(0xf000), %g1
(path[2] == 'v') && (path[3] == '\0'))
2002ea0: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1
2002ea4: 80 a0 60 00 cmp %g1, 0
2002ea8: 12 bf ff b5 bne 2002d7c <devFS_mknod+0x14>
2002eac: b0 10 20 00 clr %i0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
2002eb0: 81 c7 e0 08 ret
2002eb4: 81 e8 00 00 restore
if ((path[0] == 'd') && (path[1] == 'e') &&
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
2002eb8: 80 a0 40 02 cmp %g1, %g2
2002ebc: 22 bf ff b7 be,a 2002d98 <devFS_mknod+0x30>
2002ec0: f0 07 00 00 ld [ %i4 ], %i0
rtems_set_errno_and_return_minus_one( EINVAL );
2002ec4: 40 00 2a 71 call 200d888 <__errno>
2002ec8: b0 10 3f ff mov -1, %i0
2002ecc: 82 10 20 16 mov 0x16, %g1
2002ed0: c2 22 00 00 st %g1, [ %o0 ]
2002ed4: 81 c7 e0 08 ret
2002ed8: 81 e8 00 00 restore
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
2002edc: 40 00 2a 6b call 200d888 <__errno>
2002ee0: b0 10 3f ff mov -1, %i0
2002ee4: 82 10 20 0c mov 0xc, %g1
2002ee8: c2 22 00 00 st %g1, [ %o0 ]
2002eec: 81 c7 e0 08 ret
2002ef0: 81 e8 00 00 restore
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
2002ef4: 40 00 2a 65 call 200d888 <__errno>
2002ef8: b0 10 3f ff mov -1, %i0
2002efc: 82 10 20 0e mov 0xe, %g1
2002f00: c2 22 00 00 st %g1, [ %o0 ]
2002f04: 81 c7 e0 08 ret
2002f08: 81 e8 00 00 restore
020027bc <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
20027bc: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20027c0: 03 00 80 6a sethi %hi(0x201a800), %g1
20027c4: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 201a9cc <diskdevs_mutex>
20027c8: 92 10 20 00 clr %o1
20027cc: 94 10 20 00 clr %o2
20027d0: 40 00 13 a8 call 2007670 <rtems_semaphore_obtain>
20027d4: b0 10 20 16 mov 0x16, %i0
if (sc == RTEMS_SUCCESSFUL) {
20027d8: 80 a2 20 00 cmp %o0, 0
20027dc: 12 80 00 05 bne 20027f0 <disk_lock+0x34> <== NEVER TAKEN
20027e0: 84 10 20 01 mov 1, %g2
diskdevs_protected = true;
20027e4: 03 00 80 6a sethi %hi(0x201a800), %g1
return RTEMS_SUCCESSFUL;
20027e8: b0 10 20 00 clr %i0
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
20027ec: c4 28 61 c8 stb %g2, [ %g1 + 0x1c8 ]
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
}
}
20027f0: 81 c7 e0 08 ret
20027f4: 81 e8 00 00 restore
020027f8 <disk_unlock>:
static void
disk_unlock(void)
{
20027f8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
20027fc: 03 00 80 6a sethi %hi(0x201a800), %g1
2002800: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 201a9cc <diskdevs_mutex>
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2002804: 03 00 80 6a sethi %hi(0x201a800), %g1
2002808: c0 28 61 c8 clrb [ %g1 + 0x1c8 ] ! 201a9c8 <diskdevs_protected>
sc = rtems_semaphore_release(diskdevs_mutex);
200280c: 40 00 13 e3 call 2007798 <rtems_semaphore_release>
2002810: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2002814: 80 a2 20 00 cmp %o0, 0
2002818: 12 80 00 04 bne 2002828 <disk_unlock+0x30> <== NEVER TAKEN
200281c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
2002820: 81 c7 e0 08 ret
2002824: 81 e8 00 00 restore
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2002828: 40 00 15 2c call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200282c: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
02003f88 <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
2003f88: 9d e3 bf a0 save %sp, -96, %sp
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
2003f8c: 7f ff f8 96 call 20021e4 <sparc_disable_interrupts>
2003f90: ba 10 00 18 mov %i0, %i5
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2003f94: c4 06 20 84 ld [ %i0 + 0x84 ], %g2
2003f98: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2003f9c: 80 a0 80 01 cmp %g2, %g1
2003fa0: 02 80 00 14 be 2003ff0 <drainOutput.part.0+0x68> <== ALWAYS TAKEN
2003fa4: 01 00 00 00 nop
tty->rawOutBufState = rob_wait;
2003fa8: b8 10 20 02 mov 2, %i4 ! 2 <PROM_START+0x2> <== NOT EXECUTED
2003fac: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED
rtems_interrupt_enable (level);
2003fb0: 7f ff f8 91 call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
2003fb4: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain(
2003fb8: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
2003fbc: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003fc0: 40 00 0a 64 call 2006950 <rtems_semaphore_obtain> <== NOT EXECUTED
2003fc4: 94 10 20 00 clr %o2 <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2003fc8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003fcc: 12 80 00 0b bne 2003ff8 <drainOutput.part.0+0x70> <== NOT EXECUTED
2003fd0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2003fd4: 7f ff f8 84 call 20021e4 <sparc_disable_interrupts> <== NOT EXECUTED
2003fd8: 01 00 00 00 nop <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2003fdc: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
2003fe0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED
2003fe4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003fe8: 32 bf ff f2 bne,a 2003fb0 <drainOutput.part.0+0x28> <== NOT EXECUTED
2003fec: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
2003ff0: 7f ff f8 81 call 20021f4 <sparc_enable_interrupts>
2003ff4: 91 e8 00 08 restore %g0, %o0, %o0
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2003ff8: 40 00 0c 1a call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
02004d2c <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2004d2c: 9d e3 bf 98 save %sp, -104, %sp
if ((tty->termios.c_lflag & ECHOCTL) &&
2004d30: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
2004d34: 80 88 62 00 btst 0x200, %g1
2004d38: 02 80 00 08 be 2004d58 <echo+0x2c> <== NEVER TAKEN
2004d3c: 03 00 80 74 sethi %hi(0x201d000), %g1
iscntrl(c) && (c != '\t') && (c != '\n')) {
2004d40: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201d15c <__ctype_ptr__>
2004d44: 82 00 40 18 add %g1, %i0, %g1
2004d48: c2 08 60 01 ldub [ %g1 + 1 ], %g1
2004d4c: 80 88 60 20 btst 0x20, %g1
2004d50: 12 80 00 07 bne 2004d6c <echo+0x40>
2004d54: 80 a6 20 09 cmp %i0, 9
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
2004d58: 90 10 00 18 mov %i0, %o0
2004d5c: 7f ff ff 8d call 2004b90 <oproc>
2004d60: 92 10 00 19 mov %i1, %o1
2004d64: 81 c7 e0 08 ret
2004d68: 81 e8 00 00 restore
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
2004d6c: 02 bf ff fc be 2004d5c <echo+0x30>
2004d70: 90 10 00 18 mov %i0, %o0
2004d74: 80 a6 20 0a cmp %i0, 0xa
2004d78: 02 bf ff f9 be 2004d5c <echo+0x30>
2004d7c: 82 10 20 5e mov 0x5e, %g1
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2004d80: b0 1e 20 40 xor %i0, 0x40, %i0
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2004d84: c2 2f bf f8 stb %g1, [ %fp + -8 ]
echobuf[1] = c ^ 0x40;
2004d88: f0 2f bf f9 stb %i0, [ %fp + -7 ]
rtems_termios_puts (echobuf, 2, tty);
2004d8c: 90 07 bf f8 add %fp, -8, %o0
2004d90: 92 10 20 02 mov 2, %o1
2004d94: 7f ff ff 2f call 2004a50 <rtems_termios_puts>
2004d98: 94 10 00 19 mov %i1, %o2
tty->column += 2;
2004d9c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2004da0: 82 00 60 02 add %g1, 2, %g1
2004da4: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
2004da8: 81 c7 e0 08 ret
2004dac: 81 e8 00 00 restore
02003c20 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
2003c20: 03 00 80 61 sethi %hi(0x2018400), %g1
2003c24: d0 00 63 70 ld [ %g1 + 0x370 ], %o0 ! 2018770 <group_fp>
2003c28: 80 a2 20 00 cmp %o0, 0
2003c2c: 02 80 00 05 be 2003c40 <endgrent+0x20> <== NEVER TAKEN
2003c30: 01 00 00 00 nop
fclose(group_fp);
2003c34: 82 13 c0 00 mov %o7, %g1
2003c38: 40 00 32 a0 call 20106b8 <fclose>
2003c3c: 9e 10 40 00 mov %g1, %o7
2003c40: 81 c3 e0 08 retl <== NOT EXECUTED
02003a94 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
2003a94: 03 00 80 61 sethi %hi(0x2018400), %g1
2003a98: d0 00 62 90 ld [ %g1 + 0x290 ], %o0 ! 2018690 <passwd_fp>
2003a9c: 80 a2 20 00 cmp %o0, 0
2003aa0: 02 80 00 05 be 2003ab4 <endpwent+0x20> <== NEVER TAKEN
2003aa4: 01 00 00 00 nop
fclose(passwd_fp);
2003aa8: 82 13 c0 00 mov %o7, %g1
2003aac: 40 00 33 03 call 20106b8 <fclose>
2003ab0: 9e 10 40 00 mov %g1, %o7
2003ab4: 81 c3 e0 08 retl <== NOT EXECUTED
02004db0 <erase>:
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
2004db0: 9d e3 bf a0 save %sp, -96, %sp
if (tty->ccount == 0)
2004db4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2004db8: 80 a0 60 00 cmp %g1, 0
2004dbc: 02 80 00 37 be 2004e98 <erase+0xe8>
2004dc0: ba 10 00 18 mov %i0, %i5
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2004dc4: c6 06 20 3c ld [ %i0 + 0x3c ], %g3
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
2004dc8: 80 a6 60 00 cmp %i1, 0
2004dcc: 12 80 00 35 bne 2004ea0 <erase+0xf0>
2004dd0: 84 08 e0 08 and %g3, 8, %g2
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2004dd4: 31 00 80 6e sethi %hi(0x201b800), %i0
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
2004dd8: 37 00 80 6e sethi %hi(0x201b800), %i3
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2004ddc: 35 00 80 74 sethi %hi(0x201d000), %i2
rtems_termios_puts ("\b \b", 3, tty);
2004de0: b0 16 21 c8 or %i0, 0x1c8, %i0
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
2004de4: 10 80 00 0d b 2004e18 <erase+0x68>
2004de8: b6 16 e1 c0 or %i3, 0x1c0, %i3
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2004dec: 12 80 00 6b bne 2004f98 <erase+0x1e8> <== NOT EXECUTED
2004df0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2004df4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2004df8: 02 80 00 66 be 2004f90 <erase+0x1e0> <== NEVER TAKEN
2004dfc: 01 00 00 00 nop
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
2004e00: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2004e04: 80 a0 60 00 cmp %g1, 0
2004e08: 02 80 00 62 be 2004f90 <erase+0x1e0>
2004e0c: 01 00 00 00 nop
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
2004e10: c6 07 60 3c ld [ %i5 + 0x3c ], %g3
2004e14: 84 08 e0 08 and %g3, 8, %g2
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
2004e18: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
2004e1c: 82 00 7f ff add %g1, -1, %g1
2004e20: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
if (tty->termios.c_lflag & ECHO) {
2004e24: 80 a0 a0 00 cmp %g2, 0
2004e28: 02 bf ff f3 be 2004df4 <erase+0x44> <== NEVER TAKEN
2004e2c: f8 09 00 01 ldub [ %g4 + %g1 ], %i4
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2004e30: 80 a6 60 00 cmp %i1, 0
2004e34: 12 80 00 05 bne 2004e48 <erase+0x98>
2004e38: b8 0f 20 ff and %i4, 0xff, %i4
2004e3c: 80 88 e0 10 btst 0x10, %g3
2004e40: 22 80 00 52 be,a 2004f88 <erase+0x1d8> <== NEVER TAKEN
2004e44: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
2004e48: 80 a7 20 09 cmp %i4, 9
2004e4c: 02 80 00 25 be 2004ee0 <erase+0x130>
2004e50: b8 07 20 01 inc %i4
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2004e54: c2 06 a1 5c ld [ %i2 + 0x15c ], %g1
2004e58: c2 08 40 1c ldub [ %g1 + %i4 ], %g1
2004e5c: 80 88 60 20 btst 0x20, %g1
2004e60: 12 bf ff e3 bne 2004dec <erase+0x3c> <== NEVER TAKEN
2004e64: 80 88 e2 00 btst 0x200, %g3
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2004e68: 11 00 80 6e sethi %hi(0x201b800), %o0
2004e6c: 92 10 20 03 mov 3, %o1
2004e70: 90 12 21 c8 or %o0, 0x1c8, %o0
2004e74: 7f ff fe f7 call 2004a50 <rtems_termios_puts>
2004e78: 94 10 00 1d mov %i5, %o2
if (tty->column)
2004e7c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2004e80: 80 a0 60 00 cmp %g1, 0
2004e84: 02 bf ff dd be 2004df8 <erase+0x48> <== NEVER TAKEN
2004e88: 80 a6 60 00 cmp %i1, 0
tty->column--;
2004e8c: 82 00 7f ff add %g1, -1, %g1
}
}
}
if (!lineFlag)
2004e90: 12 bf ff dc bne 2004e00 <erase+0x50>
2004e94: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
2004e98: 81 c7 e0 08 ret
2004e9c: 81 e8 00 00 restore
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2004ea0: 84 88 e0 08 andcc %g3, 8, %g2
2004ea4: 22 bf ff fd be,a 2004e98 <erase+0xe8> <== NEVER TAKEN
2004ea8: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
2004eac: 80 88 e0 10 btst 0x10, %g3
2004eb0: 32 bf ff ca bne,a 2004dd8 <erase+0x28> <== ALWAYS TAKEN
2004eb4: 31 00 80 6e sethi %hi(0x201b800), %i0
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
2004eb8: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 ! 201b844 <rtems_status_assoc+0x74><== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
2004ebc: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
2004ec0: 7f ff ff 9b call 2004d2c <echo> <== NOT EXECUTED
2004ec4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2004ec8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
2004ecc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2004ed0: 02 bf ff f2 be 2004e98 <erase+0xe8> <== NOT EXECUTED
2004ed4: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
echo ('\n', tty);
2004ed8: 7f ff ff 95 call 2004d2c <echo> <== NOT EXECUTED
2004edc: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2004ee0: 80 a0 60 00 cmp %g1, 0
2004ee4: 02 80 00 17 be 2004f40 <erase+0x190>
2004ee8: f8 07 60 2c ld [ %i5 + 0x2c ], %i4
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
2004eec: da 06 a1 5c ld [ %i2 + 0x15c ], %o5
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
2004ef0: 84 10 20 00 clr %g2
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
2004ef4: 10 80 00 07 b 2004f10 <erase+0x160>
2004ef8: 98 08 e2 00 and %g3, 0x200, %o4
2004efc: 32 80 00 02 bne,a 2004f04 <erase+0x154> <== NOT EXECUTED
2004f00: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2004f04: 80 a0 40 02 cmp %g1, %g2
2004f08: 22 80 00 0f be,a 2004f44 <erase+0x194> <== NEVER TAKEN
2004f0c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
c = tty->cbuf[i++];
2004f10: c6 09 00 02 ldub [ %g4 + %g2 ], %g3
2004f14: 84 00 a0 01 inc %g2
if (c == '\t') {
2004f18: 80 a0 e0 09 cmp %g3, 9
2004f1c: 02 80 00 18 be 2004f7c <erase+0x1cc>
2004f20: 9e 03 40 03 add %o5, %g3, %o7
col = (col | 7) + 1;
} else if (iscntrl (c)) {
2004f24: de 0b e0 01 ldub [ %o7 + 1 ], %o7
2004f28: 80 8b e0 20 btst 0x20, %o7
2004f2c: 12 bf ff f4 bne 2004efc <erase+0x14c> <== NEVER TAKEN
2004f30: 80 a3 20 00 cmp %o4, 0
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2004f34: 80 a0 40 02 cmp %g1, %g2
2004f38: 12 bf ff f6 bne 2004f10 <erase+0x160>
2004f3c: b8 07 20 01 inc %i4
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2004f40: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2004f44: 80 a7 00 01 cmp %i4, %g1
2004f48: 16 bf ff ac bge 2004df8 <erase+0x48> <== NEVER TAKEN
2004f4c: 80 a6 60 00 cmp %i1, 0
rtems_termios_puts ("\b", 1, tty);
2004f50: 90 10 00 1b mov %i3, %o0
2004f54: 92 10 20 01 mov 1, %o1
2004f58: 7f ff fe be call 2004a50 <rtems_termios_puts>
2004f5c: 94 10 00 1d mov %i5, %o2
tty->column--;
2004f60: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2004f64: 82 00 7f ff add %g1, -1, %g1
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2004f68: 80 a0 40 1c cmp %g1, %i4
2004f6c: 14 bf ff f9 bg 2004f50 <erase+0x1a0>
2004f70: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2004f74: 10 bf ff a1 b 2004df8 <erase+0x48>
2004f78: 80 a6 60 00 cmp %i1, 0
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
2004f7c: b8 17 20 07 or %i4, 7, %i4
2004f80: 10 bf ff e1 b 2004f04 <erase+0x154>
2004f84: b8 07 20 01 inc %i4
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
2004f88: 7f ff ff 69 call 2004d2c <echo> <== NOT EXECUTED
2004f8c: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED
2004f90: 81 c7 e0 08 ret
2004f94: 81 e8 00 00 restore
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2004f98: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2004f9c: 7f ff fe ad call 2004a50 <rtems_termios_puts> <== NOT EXECUTED
2004fa0: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
if (tty->column)
2004fa4: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
2004fa8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004fac: 22 80 00 05 be,a 2004fc0 <erase+0x210> <== NOT EXECUTED
2004fb0: c2 06 a1 5c ld [ %i2 + 0x15c ], %g1 <== NOT EXECUTED
tty->column--;
2004fb4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2004fb8: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
2004fbc: c2 06 a1 5c ld [ %i2 + 0x15c ], %g1 <== NOT EXECUTED
2004fc0: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 <== NOT EXECUTED
2004fc4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2004fc8: 02 bf ff a9 be 2004e6c <erase+0xbc> <== NOT EXECUTED
2004fcc: 11 00 80 6e sethi %hi(0x201b800), %o0 <== NOT EXECUTED
2004fd0: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
2004fd4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2004fd8: 12 bf ff a6 bne 2004e70 <erase+0xc0> <== NOT EXECUTED
2004fdc: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2004fe0: 10 bf ff 86 b 2004df8 <erase+0x48> <== NOT EXECUTED
2004fe4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
02013874 <fat_buf_access>:
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
2013874: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2013878: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1
201387c: 80 a0 60 00 cmp %g1, 0
2013880: 22 80 00 5c be,a 20139f0 <fat_buf_access+0x17c>
2013884: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0
2013888: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
201388c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
2013890: 80 a0 80 01 cmp %g2, %g1
2013894: 08 80 00 68 bleu 2013a34 <fat_buf_access+0x1c0> <== ALWAYS TAKEN
2013898: b8 10 20 00 clr %i4
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
201389c: 80 a6 40 01 cmp %i1, %g1
20138a0: 22 80 00 51 be,a 20139e4 <fat_buf_access+0x170>
20138a4: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
{
if (fs_info->c.modified)
20138a8: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1
20138ac: 80 a0 60 00 cmp %g1, 0
20138b0: 02 80 00 3b be 201399c <fat_buf_access+0x128>
20138b4: b8 8f 20 ff andcc %i4, 0xff, %i4
{
if (sec_of_fat && !fs_info->vol.mirror)
20138b8: 02 80 00 06 be 20138d0 <fat_buf_access+0x5c> <== ALWAYS TAKEN
20138bc: 01 00 00 00 nop
20138c0: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
20138c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20138c8: 22 80 00 63 be,a 2013a54 <fat_buf_access+0x1e0> <== NOT EXECUTED
20138cc: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
20138d0: 7f ff fa 08 call 20120f0 <rtems_bdbuf_release_modified>
20138d4: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
fs_info->c.state = FAT_CACHE_EMPTY;
20138d8: c0 2e 20 85 clrb [ %i0 + 0x85 ]
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
20138dc: 80 a2 20 00 cmp %o0, 0
20138e0: 12 80 00 66 bne 2013a78 <fat_buf_access+0x204> <== NEVER TAKEN
20138e4: c0 2e 20 84 clrb [ %i0 + 0x84 ]
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
20138e8: 80 a7 20 00 cmp %i4, 0
20138ec: 22 80 00 32 be,a 20139b4 <fat_buf_access+0x140> <== ALWAYS TAKEN
20138f0: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0
20138f4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
20138f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20138fc: 32 80 00 2e bne,a 20139b4 <fat_buf_access+0x140> <== NOT EXECUTED
2013900: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2013904: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED
2013908: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
201390c: 08 80 00 29 bleu 20139b0 <fat_buf_access+0x13c> <== NOT EXECUTED
2013910: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
2013914: 10 80 00 10 b 2013954 <fat_buf_access+0xe0> <== NOT EXECUTED
2013918: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
201391c: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED
2013920: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED
2013924: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED
2013928: 40 00 2c 3e call 201ea20 <memcpy> <== NOT EXECUTED
201392c: a0 04 20 01 inc %l0 <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
2013930: 7f ff f9 f0 call 20120f0 <rtems_bdbuf_release_modified> <== NOT EXECUTED
2013934: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
2013938: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201393c: 12 80 00 12 bne 2013984 <fat_buf_access+0x110> <== NOT EXECUTED
2013940: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2013944: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED
2013948: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
201394c: 28 80 00 1a bleu,a 20139b4 <fat_buf_access+0x140> <== NOT EXECUTED
2013950: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
2013954: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED
2013958: 40 00 5c 0f call 202a994 <.umul> <== NOT EXECUTED
201395c: f8 1e 20 58 ldd [ %i0 + 0x58 ], %i4 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
2013960: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED
2013964: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
2013968: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED
201396c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2013970: 7f ff f8 b9 call 2011c54 <rtems_bdbuf_get> <== NOT EXECUTED
2013974: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
2013978: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201397c: 02 bf ff e8 be 201391c <fat_buf_access+0xa8> <== NOT EXECUTED
2013980: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
2013984: 40 00 29 58 call 201dee4 <__errno> <== NOT EXECUTED
2013988: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201398c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2013990: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013994: 81 c7 e0 08 ret <== NOT EXECUTED
2013998: 81 e8 00 00 restore <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
201399c: 7f ff f9 9b call 2012008 <rtems_bdbuf_release>
20139a0: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
20139a4: 80 a2 20 00 cmp %o0, 0
20139a8: 12 80 00 34 bne 2013a78 <fat_buf_access+0x204> <== NEVER TAKEN
20139ac: c0 2e 20 85 clrb [ %i0 + 0x85 ]
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
20139b0: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0
20139b4: 94 10 00 19 mov %i1, %o2
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
20139b8: 80 a6 a0 01 cmp %i2, 1
20139bc: 02 80 00 2b be 2013a68 <fat_buf_access+0x1f4>
20139c0: 96 06 20 88 add %i0, 0x88, %o3
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
20139c4: 7f ff f8 a4 call 2011c54 <rtems_bdbuf_get>
20139c8: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
20139cc: 80 a2 20 00 cmp %o0, 0
20139d0: 12 80 00 2a bne 2013a78 <fat_buf_access+0x204> <== NEVER TAKEN
20139d4: 82 10 20 01 mov 1, %g1
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
20139d8: f2 26 20 80 st %i1, [ %i0 + 0x80 ]
fs_info->c.state = FAT_CACHE_ACTUAL;
20139dc: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ]
}
*buf = fs_info->c.buf;
20139e0: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
20139e4: c2 26 c0 00 st %g1, [ %i3 ]
return RC_OK;
}
20139e8: 81 c7 e0 08 ret
20139ec: 91 e8 20 00 restore %g0, 0, %o0
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
20139f0: 94 10 00 19 mov %i1, %o2
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
20139f4: 80 a6 a0 01 cmp %i2, 1
20139f8: 02 80 00 13 be 2013a44 <fat_buf_access+0x1d0>
20139fc: 96 06 20 88 add %i0, 0x88, %o3
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
2013a00: 7f ff f8 95 call 2011c54 <rtems_bdbuf_get>
2013a04: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
2013a08: 80 a2 20 00 cmp %o0, 0
2013a0c: 12 80 00 1b bne 2013a78 <fat_buf_access+0x204> <== NEVER TAKEN
2013a10: 82 10 20 01 mov 1, %g1
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2013a14: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
2013a18: f2 26 20 80 st %i1, [ %i0 + 0x80 ]
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
2013a1c: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ]
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
2013a20: c0 2e 20 84 clrb [ %i0 + 0x84 ]
fs_info->c.state = FAT_CACHE_ACTUAL;
2013a24: 82 10 00 19 mov %i1, %g1
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2013a28: 80 a0 80 01 cmp %g2, %g1
2013a2c: 18 bf ff 9c bgu 201389c <fat_buf_access+0x28> <== NEVER TAKEN
2013a30: b8 10 20 00 clr %i4
2013a34: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
2013a38: 80 a0 40 02 cmp %g1, %g2
2013a3c: 10 bf ff 98 b 201389c <fat_buf_access+0x28>
2013a40: b8 40 20 00 addx %g0, 0, %i4
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
2013a44: 7f ff f8 b9 call 2011d28 <rtems_bdbuf_read>
2013a48: 01 00 00 00 nop
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
2013a4c: 10 bf ff f0 b 2013a0c <fat_buf_access+0x198>
2013a50: 80 a2 20 00 cmp %o0, 0
if (fs_info->c.blk_num != blk)
{
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
2013a54: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
2013a58: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
2013a5c: 40 00 2b f1 call 201ea20 <memcpy> <== NOT EXECUTED
2013a60: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED
2013a64: 30 bf ff 9b b,a 20138d0 <fat_buf_access+0x5c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
2013a68: 7f ff f8 b0 call 2011d28 <rtems_bdbuf_read>
2013a6c: 01 00 00 00 nop
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
2013a70: 10 bf ff d8 b 20139d0 <fat_buf_access+0x15c>
2013a74: 80 a2 20 00 cmp %o0, 0
rtems_set_errno_and_return_minus_one(EIO);
2013a78: 40 00 29 1b call 201dee4 <__errno> <== NOT EXECUTED
2013a7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013a80: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2013a84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013a88: 81 c7 e0 08 ret <== NOT EXECUTED
2013a8c: 81 e8 00 00 restore <== NOT EXECUTED
02013a90 <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
2013a90: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2013a94: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
2013a98: b6 10 00 18 mov %i0, %i3
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2013a9c: 80 a0 60 00 cmp %g1, 0
2013aa0: 02 80 00 43 be 2013bac <fat_buf_release+0x11c>
2013aa4: b0 10 20 00 clr %i0
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2013aa8: c2 06 e0 80 ld [ %i3 + 0x80 ], %g1
2013aac: c4 16 e0 14 lduh [ %i3 + 0x14 ], %g2
2013ab0: 80 a0 40 02 cmp %g1, %g2
2013ab4: 0a 80 00 05 bcs 2013ac8 <fat_buf_release+0x38> <== NEVER TAKEN
2013ab8: b8 10 20 00 clr %i4
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
2013abc: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2
2013ac0: 80 a0 40 02 cmp %g1, %g2
2013ac4: b8 40 20 00 addx %g0, 0, %i4
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
2013ac8: c2 0e e0 84 ldub [ %i3 + 0x84 ], %g1
2013acc: 80 a0 60 00 cmp %g1, 0
2013ad0: 02 80 00 39 be 2013bb4 <fat_buf_release+0x124>
2013ad4: b8 8f 20 ff andcc %i4, 0xff, %i4
{
if (sec_of_fat && !fs_info->vol.mirror)
2013ad8: 02 80 00 06 be 2013af0 <fat_buf_release+0x60>
2013adc: 01 00 00 00 nop
2013ae0: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1
2013ae4: 80 a0 60 00 cmp %g1, 0
2013ae8: 22 80 00 3b be,a 2013bd4 <fat_buf_release+0x144> <== ALWAYS TAKEN
2013aec: c2 06 e0 88 ld [ %i3 + 0x88 ], %g1
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
2013af0: 7f ff f9 80 call 20120f0 <rtems_bdbuf_release_modified>
2013af4: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013af8: 80 a2 20 00 cmp %o0, 0
2013afc: 12 80 00 3b bne 2013be8 <fat_buf_release+0x158> <== NEVER TAKEN
2013b00: 80 a7 20 00 cmp %i4, 0
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
2013b04: 02 80 00 31 be 2013bc8 <fat_buf_release+0x138>
2013b08: c0 2e e0 84 clrb [ %i3 + 0x84 ]
2013b0c: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1
2013b10: 80 a0 60 00 cmp %g1, 0
2013b14: 32 80 00 2e bne,a 2013bcc <fat_buf_release+0x13c> <== NEVER TAKEN
2013b18: c0 2e e0 85 clrb [ %i3 + 0x85 ] <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2013b1c: c2 0e e0 09 ldub [ %i3 + 9 ], %g1
2013b20: 80 a0 60 01 cmp %g1, 1
2013b24: 08 80 00 29 bleu 2013bc8 <fat_buf_release+0x138> <== NEVER TAKEN
2013b28: b4 10 20 01 mov 1, %i2
2013b2c: 10 80 00 10 b 2013b6c <fat_buf_release+0xdc>
2013b30: 90 10 20 01 mov 1, %o0
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
2013b34: d2 06 e0 8c ld [ %i3 + 0x8c ], %o1
2013b38: d4 16 c0 00 lduh [ %i3 ], %o2
2013b3c: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
2013b40: 40 00 2b b8 call 201ea20 <memcpy>
2013b44: b4 06 a0 01 inc %i2
sc = rtems_bdbuf_release_modified(b);
2013b48: 7f ff f9 6a call 20120f0 <rtems_bdbuf_release_modified>
2013b4c: d0 07 bf fc ld [ %fp + -4 ], %o0
if ( sc != RTEMS_SUCCESSFUL)
2013b50: 80 a2 20 00 cmp %o0, 0
2013b54: 12 80 00 12 bne 2013b9c <fat_buf_release+0x10c> <== NEVER TAKEN
2013b58: 90 0e a0 ff and %i2, 0xff, %o0
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2013b5c: c2 0e e0 09 ldub [ %i3 + 9 ], %g1
2013b60: 80 a2 00 01 cmp %o0, %g1
2013b64: 3a 80 00 1a bcc,a 2013bcc <fat_buf_release+0x13c> <== ALWAYS TAKEN
2013b68: c0 2e e0 85 clrb [ %i3 + 0x85 ]
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
2013b6c: d2 06 e0 18 ld [ %i3 + 0x18 ], %o1
2013b70: 40 00 5b 89 call 202a994 <.umul>
2013b74: f8 1e e0 58 ldd [ %i3 + 0x58 ], %i4
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
2013b78: d4 06 e0 80 ld [ %i3 + 0x80 ], %o2
2013b7c: 96 07 bf fc add %fp, -4, %o3
2013b80: 94 02 00 0a add %o0, %o2, %o2
2013b84: 92 10 00 1d mov %i5, %o1
2013b88: 7f ff f8 33 call 2011c54 <rtems_bdbuf_get>
2013b8c: 90 10 00 1c mov %i4, %o0
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
2013b90: 80 a2 20 00 cmp %o0, 0
2013b94: 02 bf ff e8 be 2013b34 <fat_buf_release+0xa4> <== ALWAYS TAKEN
2013b98: c2 07 bf fc ld [ %fp + -4 ], %g1
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
2013b9c: 40 00 28 d2 call 201dee4 <__errno> <== NOT EXECUTED
2013ba0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013ba4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2013ba8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013bac: 81 c7 e0 08 ret
2013bb0: 81 e8 00 00 restore
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
2013bb4: 7f ff f9 15 call 2012008 <rtems_bdbuf_release>
2013bb8: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013bbc: 80 a2 20 00 cmp %o0, 0
2013bc0: 12 80 00 0a bne 2013be8 <fat_buf_release+0x158> <== NEVER TAKEN
2013bc4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
2013bc8: c0 2e e0 85 clrb [ %i3 + 0x85 ]
return RC_OK;
}
2013bcc: 81 c7 e0 08 ret
2013bd0: 91 e8 20 00 restore %g0, 0, %o0
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
2013bd4: d0 06 e0 8c ld [ %i3 + 0x8c ], %o0
2013bd8: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
2013bdc: 40 00 2b 91 call 201ea20 <memcpy>
2013be0: d4 16 c0 00 lduh [ %i3 ], %o2
2013be4: 30 bf ff c3 b,a 2013af0 <fat_buf_release+0x60>
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2013be8: 40 00 28 bf call 201dee4 <__errno> <== NOT EXECUTED
2013bec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013bf0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2013bf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013bf8: 81 c7 e0 08 ret <== NOT EXECUTED
2013bfc: 81 e8 00 00 restore <== NOT EXECUTED
02013d54 <fat_cluster_read>:
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
2013d54: 98 10 00 0a mov %o2, %o4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2013d58: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2013d5c: 12 80 00 06 bne 2013d74 <fat_cluster_read+0x20> <== NOT EXECUTED
2013d60: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED
2013d64: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2013d68: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2013d6c: 32 80 00 0e bne,a 2013da4 <fat_cluster_read+0x50> <== NOT EXECUTED
2013d70: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2013d74: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
2013d78: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2013d7c: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
2013d80: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
2013d84: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
2013d88: 94 10 20 00 clr %o2 <== NOT EXECUTED
2013d8c: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2013d90: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
2013d94: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2013d98: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2013d9c: 7f ff ff 99 call 2013c00 <_fat_block_read> <== NOT EXECUTED
2013da0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
2013da4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2013da8: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
2013dac: 94 10 20 00 clr %o2 <== NOT EXECUTED
2013db0: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
2013db4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2013db8: 7f ff ff 92 call 2013c00 <_fat_block_read> <== NOT EXECUTED
2013dbc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02013dc0 <fat_cluster_write>:
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
2013dc0: 98 10 00 0a mov %o2, %o4
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2013dc4: 80 a2 60 00 cmp %o1, 0
2013dc8: 12 80 00 06 bne 2013de0 <fat_cluster_write+0x20> <== ALWAYS TAKEN
2013dcc: c2 02 20 34 ld [ %o0 + 0x34 ], %g1
2013dd0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2013dd4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2013dd8: 32 80 00 0e bne,a 2013e10 <fat_cluster_write+0x50> <== NOT EXECUTED
2013ddc: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2013de0: c6 08 60 05 ldub [ %g1 + 5 ], %g3
2013de4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2013de8: d6 08 60 04 ldub [ %g1 + 4 ], %o3
2013dec: c2 08 60 02 ldub [ %g1 + 2 ], %g1
2013df0: 92 02 7f fe add %o1, -2, %o1
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
2013df4: 94 10 20 00 clr %o2
2013df8: 93 2a 40 03 sll %o1, %g3, %o1
2013dfc: 97 2a c0 01 sll %o3, %g1, %o3
2013e00: 92 02 40 02 add %o1, %g2, %o1
2013e04: 82 13 c0 00 mov %o7, %g1
2013e08: 7f ff ff a0 call 2013c88 <_fat_block_write>
2013e0c: 9e 10 40 00 mov %g1, %o7
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
2013e10: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2013e14: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
2013e18: 94 10 20 00 clr %o2 <== NOT EXECUTED
2013e1c: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
2013e20: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2013e24: 7f ff ff 99 call 2013c88 <_fat_block_write> <== NOT EXECUTED
2013e28: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0201403c <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
201403c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2014040: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2014044: 87 2e 60 18 sll %i1, 0x18, %g3 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
2014048: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201404c: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2014050: 83 36 60 08 srl %i1, 8, %g1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2014054: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2014058: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201405c: 87 2e a0 18 sll %i2, 0x18, %g3 <== NOT EXECUTED
2014060: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2014064: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2014068: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201406c: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2014070: 83 36 a0 18 srl %i2, 0x18, %g1 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2014074: b3 2e 60 08 sll %i1, 8, %i1 <== NOT EXECUTED
2014078: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED
201407c: 84 10 80 19 or %g2, %i1, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2014080: 89 36 a0 08 srl %i2, 8, %g4 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2014084: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
2014088: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201408c: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2014090: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
2014094: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
2014098: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
201409c: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
20140a0: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED
20140a4: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
20140a8: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_free_count = 0;
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
20140ac: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
20140b0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
ret1 = _fat_block_write(mt_entry,
20140b4: 7f ff fe f5 call 2013c88 <_fat_block_write> <== NOT EXECUTED
20140b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
20140bc: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
20140c0: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
20140c4: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED
20140c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20140cc: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
20140d0: 7f ff fe ee call 2013c88 <_fat_block_write> <== NOT EXECUTED
20140d4: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
20140d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20140dc: 06 80 00 06 bl 20140f4 <fat_fat32_update_fsinfo_sector+0xb8><== NOT EXECUTED
20140e0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20140e4: 06 80 00 04 bl 20140f4 <fat_fat32_update_fsinfo_sector+0xb8><== NOT EXECUTED
20140e8: b0 10 20 00 clr %i0 <== NOT EXECUTED
return -1;
return RC_OK;
}
20140ec: 81 c7 e0 08 ret <== NOT EXECUTED
20140f0: 81 e8 00 00 restore <== NOT EXECUTED
20140f4: 81 c7 e0 08 ret <== NOT EXECUTED
20140f8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02012ff0 <fat_file_close>:
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2012ff0: 9d e3 bf a0 save %sp, -96, %sp
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
2012ff4: c2 06 60 08 ld [ %i1 + 8 ], %g1
2012ff8: 80 a0 60 01 cmp %g1, 1
2012ffc: 08 80 00 07 bleu 2013018 <fat_file_close+0x28>
2013000: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
{
fat_fd->links_num--;
2013004: 82 00 7f ff add %g1, -1, %g1
return rc;
2013008: 90 10 20 00 clr %o0
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
{
fat_fd->links_num--;
201300c: c2 26 60 08 st %g1, [ %i1 + 8 ]
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
return rc;
}
2013010: 81 c7 e0 08 ret
2013014: 91 e8 00 08 restore %g0, %o0, %o0
return rc;
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
2013018: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
201301c: 80 88 60 01 btst 1, %g1
2013020: 22 80 00 16 be,a 2013078 <fat_file_close+0x88> <== ALWAYS TAKEN
2013024: d2 06 60 0c ld [ %i1 + 0xc ], %o1
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
2013028: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201302c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2013030: 7f ff ff ac call 2012ee0 <fat_file_truncate> <== NOT EXECUTED
2013034: 94 10 20 00 clr %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2013038: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201303c: 12 bf ff f5 bne 2013010 <fat_file_close+0x20> <== NOT EXECUTED
2013040: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2013044: 7f ff df dd call 200afb8 <_Chain_Extract> <== NOT EXECUTED
2013048: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
201304c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED
2013050: 40 00 03 f6 call 2014028 <fat_ino_is_unique> <== NOT EXECUTED
2013054: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2013058: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201305c: 32 80 00 13 bne,a 20130a8 <fat_file_close+0xb8> <== NOT EXECUTED
2013060: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
2013064: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2013068: 7f ff ca dc call 2005bd8 <free>
201306c: b0 10 00 1d mov %i5, %i0
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
2013070: 40 00 02 88 call 2013a90 <fat_buf_release>
2013074: 81 e8 00 00 restore
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
2013078: 40 00 03 ec call 2014028 <fat_ino_is_unique>
201307c: 90 10 00 18 mov %i0, %o0
2013080: 80 8a 20 ff btst 0xff, %o0
2013084: 02 80 00 05 be 2013098 <fat_file_close+0xa8> <== ALWAYS TAKEN
2013088: 01 00 00 00 nop
{
fat_fd->links_num = 0;
201308c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
2013090: 40 00 02 80 call 2013a90 <fat_buf_release> <== NOT EXECUTED
2013094: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
2013098: 7f ff df c8 call 200afb8 <_Chain_Extract>
201309c: 90 10 00 19 mov %i1, %o0
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
20130a0: 10 bf ff f2 b 2013068 <fat_file_close+0x78>
20130a4: 90 10 00 19 mov %i1, %o0
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
fat_free_unique_ino(mt_entry, fat_fd->ino);
20130a8: 40 00 03 d2 call 2013ff0 <fat_free_unique_ino> <== NOT EXECUTED
20130ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
20130b0: 10 bf ff ee b 2013068 <fat_file_close+0x78> <== NOT EXECUTED
20130b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
0201368c <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201368c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2013690: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
2013694: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2013698: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
201369c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
return RC_OK;
20136a0: b4 10 20 00 clr %i2 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
20136a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20136a8: 12 80 00 04 bne 20136b8 <fat_file_datasync+0x2c> <== NOT EXECUTED
20136ac: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
20136b0: 81 c7 e0 08 ret <== NOT EXECUTED
20136b4: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
20136b8: 40 00 00 f6 call 2013a90 <fat_buf_release> <== NOT EXECUTED
20136bc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rc != RC_OK)
20136c0: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
20136c4: 12 bf ff fb bne 20136b0 <fat_file_datasync+0x24> <== NOT EXECUTED
20136c8: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
20136cc: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
20136d0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED
20136d4: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED
20136d8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20136dc: 1a bf ff f5 bcc 20136b0 <fat_file_datasync+0x24> <== NOT EXECUTED
20136e0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20136e4: 02 80 00 23 be 2013770 <fat_file_datasync+0xe4> <== NOT EXECUTED
20136e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20136ec: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED
20136f0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
20136f4: b6 02 7f fe add %o1, -2, %i3 <== NOT EXECUTED
20136f8: b7 2e c0 02 sll %i3, %g2, %i3 <== NOT EXECUTED
20136fc: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
2013700: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED
2013704: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2013708: 02 80 00 20 be 2013788 <fat_file_datasync+0xfc> <== NOT EXECUTED
201370c: ba 10 20 00 clr %i5 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
2013710: 10 80 00 0c b 2013740 <fat_file_datasync+0xb4> <== NOT EXECUTED
2013714: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
2013718: 7f ff fa 99 call 201217c <rtems_bdbuf_sync> <== NOT EXECUTED
201371c: ba 07 60 01 inc %i5 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
2013720: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013724: 12 80 00 0d bne 2013758 <fat_file_datasync+0xcc> <== NOT EXECUTED
2013728: 01 00 00 00 nop <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
201372c: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED
2013730: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
2013734: 08 80 00 15 bleu 2013788 <fat_file_datasync+0xfc> <== NOT EXECUTED
2013738: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
201373c: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED
2013740: 94 07 40 1b add %i5, %i3, %o2 <== NOT EXECUTED
2013744: 7f ff f9 79 call 2011d28 <rtems_bdbuf_read> <== NOT EXECUTED
2013748: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
201374c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013750: 02 bf ff f2 be 2013718 <fat_file_datasync+0x8c> <== NOT EXECUTED
2013754: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
2013758: 40 00 29 e3 call 201dee4 <__errno> <== NOT EXECUTED
201375c: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED
2013760: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2013764: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
2013768: 81 c7 e0 08 ret <== NOT EXECUTED
201376c: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2013770: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2013774: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2013778: 22 bf ff de be,a 20136f0 <fat_file_datasync+0x64> <== NOT EXECUTED
201377c: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2013780: 10 bf ff e0 b 2013700 <fat_file_datasync+0x74> <== NOT EXECUTED
2013784: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2013788: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201378c: 40 00 21 22 call 201bc14 <fat_get_fat_cluster> <== NOT EXECUTED
2013790: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2013794: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013798: 02 bf ff cd be 20136cc <fat_file_datasync+0x40> <== NOT EXECUTED
201379c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20137a0: 10 bf ff c4 b 20136b0 <fat_file_datasync+0x24> <== NOT EXECUTED
20137a4: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
02013194 <fat_file_extend>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
2013194: 9d e3 bf 90 save %sp, -112, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2013198: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
uint32_t old_last_cl;
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
201319c: f4 26 c0 00 st %i2, [ %i3 ]
if (new_length <= fat_fd->fat_file_size)
20131a0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
uint32_t *a_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
20131a4: c0 27 bf f0 clr [ %fp + -16 ]
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
20131a8: c0 27 bf f8 clr [ %fp + -8 ]
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
20131ac: ba 10 00 18 mov %i0, %i5
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
20131b0: 80 a6 80 01 cmp %i2, %g1
20131b4: 08 80 00 3d bleu 20132a8 <fat_file_extend+0x114>
20131b8: b0 10 20 00 clr %i0
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20131bc: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
20131c0: 80 a0 a0 01 cmp %g2, 1
20131c4: 22 80 00 3b be,a 20132b0 <fat_file_extend+0x11c> <== NEVER TAKEN
20131c8: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
20131cc: c6 17 20 06 lduh [ %i4 + 6 ], %g3
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
20131d0: a4 26 80 01 sub %i2, %g1, %l2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
20131d4: 84 00 ff ff add %g3, -1, %g2
20131d8: a0 08 80 01 and %g2, %g1, %l0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
20131dc: a0 20 c0 10 sub %g3, %l0, %l0
20131e0: a0 0c 00 02 and %l0, %g2, %l0
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
if (bytes2add > bytes_remain)
20131e4: 80 a4 00 12 cmp %l0, %l2
20131e8: 1a 80 00 30 bcc 20132a8 <fat_file_extend+0x114>
20131ec: b0 10 20 00 clr %i0
/*
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
20131f0: a4 a4 80 10 subcc %l2, %l0, %l2
20131f4: 02 80 00 2d be 20132a8 <fat_file_extend+0x114> <== NEVER TAKEN
20131f8: a2 04 bf ff add %l2, -1, %l1
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
20131fc: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2013200: 90 10 00 1d mov %i5, %o0
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
2013204: a3 34 40 01 srl %l1, %g1, %l1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2013208: 92 07 bf f0 add %fp, -16, %o1
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
201320c: a2 04 60 01 inc %l1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2013210: 96 07 bf fc add %fp, -4, %o3
2013214: 94 10 00 11 mov %l1, %o2
2013218: 40 00 24 02 call 201c220 <fat_scan_fat_for_free_clusters>
201321c: 98 07 bf f8 add %fp, -8, %o4
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
2013220: b0 92 20 00 orcc %o0, 0, %i0
2013224: 12 80 00 21 bne 20132a8 <fat_file_extend+0x114> <== NEVER TAKEN
2013228: c2 07 bf fc ld [ %fp + -4 ], %g1
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
201322c: 80 94 00 01 orcc %l0, %g1, %g0
2013230: 02 80 00 27 be 20132cc <fat_file_extend+0x138> <== NEVER TAKEN
2013234: 80 a4 40 01 cmp %l1, %g1
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
2013238: 02 80 00 0b be 2013264 <fat_file_extend+0xd0> <== ALWAYS TAKEN
201323c: 88 38 00 01 xnor %g0, %g1, %g4
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
2013240: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
2013244: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
2013248: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
201324c: a2 01 00 11 add %g4, %l1, %l1 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
2013250: a4 0c 80 03 and %l2, %g3, %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
2013254: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
2013258: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
201325c: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
2013260: e4 26 c0 00 st %l2, [ %i3 ] <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
2013264: d6 06 60 18 ld [ %i1 + 0x18 ], %o3
2013268: 80 a2 e0 00 cmp %o3, 0
201326c: 32 80 00 1e bne,a 20132e4 <fat_file_extend+0x150>
2013270: d2 06 60 3c ld [ %i1 + 0x3c ], %o1
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
2013274: c4 07 bf f0 ld [ %fp + -16 ], %g2
fat_fd->map.file_cln = 0;
2013278: c0 26 60 34 clr [ %i1 + 0x34 ]
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
201327c: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
2013280: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
}
fat_buf_release(fs_info);
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
2013284: 80 a0 60 00 cmp %g1, 0
2013288: 22 80 00 08 be,a 20132a8 <fat_file_extend+0x114> <== NEVER TAKEN
201328c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED
{
fat_fd->map.last_cln = last_cl;
2013290: c4 07 bf f8 ld [ %fp + -8 ], %g2
if (fat_fd->fat_file_type == FAT_DIRECTORY)
2013294: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
2013298: 80 a0 60 01 cmp %g1, 1
201329c: 02 80 00 20 be 201331c <fat_file_extend+0x188>
20132a0: c4 26 60 3c st %g2, [ %i1 + 0x3c ]
return rc;
}
}
}
fat_fd->fat_file_size = new_length;
20132a4: f4 26 60 18 st %i2, [ %i1 + 0x18 ]
return RC_OK;
}
20132a8: 81 c7 e0 08 ret
20132ac: 81 e8 00 00 restore
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20132b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20132b4: 32 bf ff c7 bne,a 20131d0 <fat_file_extend+0x3c> <== NOT EXECUTED
20132b8: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
20132bc: c4 0f 20 0a ldub [ %i4 + 0xa ], %g2 <== NOT EXECUTED
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20132c0: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
20132c4: 22 bf ff c3 be,a 20131d0 <fat_file_extend+0x3c> <== NOT EXECUTED
20132c8: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
20132cc: 40 00 2b 06 call 201dee4 <__errno> <== NOT EXECUTED
20132d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20132d4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
20132d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20132dc: 81 c7 e0 08 ret <== NOT EXECUTED
20132e0: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
20132e4: 80 a2 7f ff cmp %o1, -1
20132e8: 22 80 00 19 be,a 201334c <fat_file_extend+0x1b8> <== NEVER TAKEN
20132ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
20132f0: d2 27 bf f4 st %o1, [ %fp + -12 ]
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
20132f4: d4 07 bf f0 ld [ %fp + -16 ], %o2
20132f8: 40 00 22 cf call 201be34 <fat_set_fat_cluster>
20132fc: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
2013300: 82 92 20 00 orcc %o0, 0, %g1
2013304: 12 80 00 0d bne 2013338 <fat_file_extend+0x1a4> <== NEVER TAKEN
2013308: d2 07 bf f0 ld [ %fp + -16 ], %o1
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
201330c: 40 00 01 e1 call 2013a90 <fat_buf_release>
2013310: 90 10 00 1c mov %i4, %o0
2013314: 10 bf ff dc b 2013284 <fat_file_extend+0xf0>
2013318: c2 07 bf fc ld [ %fp + -4 ], %g1
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
201331c: d2 07 bf f0 ld [ %fp + -16 ], %o1
2013320: 40 00 02 c3 call 2013e2c <fat_init_clusters_chain>
2013324: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
2013328: 82 92 20 00 orcc %o0, 0, %g1
201332c: 22 bf ff df be,a 20132a8 <fat_file_extend+0x114> <== ALWAYS TAKEN
2013330: f4 26 60 18 st %i2, [ %i1 + 0x18 ]
{
fat_free_fat_clusters_chain(mt_entry, chain);
2013334: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED
2013338: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201333c: 40 00 23 80 call 201c13c <fat_free_fat_clusters_chain> <== NOT EXECUTED
2013340: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
2013344: 81 c7 e0 08 ret <== NOT EXECUTED
2013348: 81 e8 00 00 restore <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201334c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013350: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2013354: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED
2013358: 7f ff ff 58 call 20130b8 <fat_file_ioctl> <== NOT EXECUTED
201335c: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
2013360: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
2013364: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013368: 02 bf ff e3 be 20132f4 <fat_file_extend+0x160> <== NOT EXECUTED
201336c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
2013370: 10 bf ff f2 b 2013338 <fat_file_extend+0x1a4> <== NOT EXECUTED
2013374: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED
020130b8 <fat_file_ioctl>:
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
20130b8: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
20130bc: 82 07 a0 50 add %fp, 0x50, %g1
20130c0: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
20130c4: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
20130c8: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int cmd,
...)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
20130cc: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
20130d0: c2 27 bf fc st %g1, [ %fp + -4 ]
switch (cmd)
20130d4: 80 a6 a0 01 cmp %i2, 1
20130d8: 02 80 00 08 be 20130f8 <fat_file_ioctl+0x40> <== ALWAYS TAKEN
20130dc: c6 06 20 34 ld [ %i0 + 0x34 ], %g3
*ret = cur_cln;
break;
default:
errno = EINVAL;
20130e0: 40 00 2b 81 call 201dee4 <__errno> <== NOT EXECUTED
20130e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20130e8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20130ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rc = -1;
break;
}
va_end(ap);
return rc;
}
20130f0: 81 c7 e0 08 ret <== NOT EXECUTED
20130f4: 81 e8 00 00 restore <== NOT EXECUTED
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
20130f8: c8 06 60 18 ld [ %i1 + 0x18 ], %g4
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
20130fc: ba 07 a0 58 add %fp, 0x58, %i5
2013100: fa 27 bf fc st %i5, [ %fp + -4 ]
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
2013104: 84 10 00 1b mov %i3, %g2
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
2013108: 80 a6 c0 04 cmp %i3, %g4
201310c: 1a 80 00 1c bcc 201317c <fat_file_ioctl+0xc4> <== NEVER TAKEN
2013110: ba 10 00 1c mov %i4, %i5
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2013114: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2013118: 80 a0 60 01 cmp %g1, 1
201311c: 22 80 00 0e be,a 2013154 <fat_file_ioctl+0x9c>
2013120: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
2013124: d4 08 e0 08 ldub [ %g3 + 8 ], %o2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
2013128: 90 10 00 18 mov %i0, %o0
201312c: 92 10 00 19 mov %i1, %o1
2013130: 95 30 80 0a srl %g2, %o2, %o2
2013134: 7f ff fe 0b call 2012960 <fat_file_lseek>
2013138: 96 07 bf f8 add %fp, -8, %o3
if ( rc != RC_OK )
201313c: b0 92 60 00 orcc %o1, 0, %i0
2013140: 12 bf ff ec bne 20130f0 <fat_file_ioctl+0x38> <== NEVER TAKEN
2013144: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
*ret = cur_cln;
2013148: c2 27 40 00 st %g1, [ %i5 ]
break;
201314c: 81 c7 e0 08 ret
2013150: 81 e8 00 00 restore
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2013154: 80 a0 60 00 cmp %g1, 0
2013158: 32 bf ff f4 bne,a 2013128 <fat_file_ioctl+0x70> <== NEVER TAKEN
201315c: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2013160: c2 08 e0 0a ldub [ %g3 + 0xa ], %g1
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2013164: 80 88 60 03 btst 3, %g1
2013168: 22 bf ff f0 be,a 2013128 <fat_file_ioctl+0x70> <== NEVER TAKEN
201316c: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
2013170: c0 27 00 00 clr [ %i4 ]
rc = RC_OK;
break;
2013174: 81 c7 e0 08 ret
2013178: 91 e8 20 00 restore %g0, 0, %o0
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
201317c: 40 00 2b 5a call 201dee4 <__errno> <== NOT EXECUTED
2013180: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013184: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2013188: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201318c: 81 c7 e0 08 ret <== NOT EXECUTED
2013190: 81 e8 00 00 restore <== NOT EXECUTED
02012960 <fat_file_lseek>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
2012960: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2012964: f8 06 60 34 ld [ %i1 + 0x34 ], %i4
2012968: 80 a7 00 1a cmp %i4, %i2
201296c: 22 80 00 21 be,a 20129f0 <fat_file_lseek+0x90> <== ALWAYS TAKEN
2012970: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
2012974: 2a 80 00 16 bcs,a 20129cc <fat_file_lseek+0x6c> <== NOT EXECUTED
2012978: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
201297c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
2012980: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
2012984: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2012988: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201298c: 02 80 00 13 be 20129d8 <fat_file_lseek+0x78> <== NOT EXECUTED
2012990: ba 10 20 00 clr %i5 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2012994: 10 80 00 06 b 20129ac <fat_file_lseek+0x4c> <== NOT EXECUTED
2012998: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
201299c: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED
20129a0: 02 80 00 0e be 20129d8 <fat_file_lseek+0x78> <== NOT EXECUTED
20129a4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20129a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20129ac: 40 00 24 9a call 201bc14 <fat_get_fat_cluster> <== NOT EXECUTED
20129b0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
20129b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20129b8: 22 bf ff f9 be,a 201299c <fat_file_lseek+0x3c> <== NOT EXECUTED
20129bc: ba 07 60 01 inc %i5 <== NOT EXECUTED
return rc;
20129c0: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED
20129c4: 81 c7 e0 08 ret <== NOT EXECUTED
20129c8: 93 e8 00 08 restore %g0, %o0, %o1 <== NOT EXECUTED
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
20129cc: b8 26 80 1c sub %i2, %i4, %i4 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
20129d0: 10 bf ff ee b 2012988 <fat_file_lseek+0x28> <== NOT EXECUTED
20129d4: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
20129d8: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
20129dc: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED
*disk_cln = cur_cln;
20129e0: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
}
return RC_OK;
20129e4: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
20129e8: 81 c7 e0 08 ret <== NOT EXECUTED
20129ec: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
20129f0: b0 10 20 00 clr %i0
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
20129f4: c2 26 c0 00 st %g1, [ %i3 ]
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
20129f8: 81 c7 e0 08 ret
20129fc: 93 e8 20 00 restore %g0, 0, %o1
020135e0 <fat_file_mark_removed>:
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
20135e0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
20135e4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
20135e8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
20135ec: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
20135f0: 02 80 00 0c be 2013620 <fat_file_mark_removed+0x40> <== NOT EXECUTED
20135f4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20135f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20135fc: 32 80 00 1f bne,a 2013678 <fat_file_mark_removed+0x98> <== NOT EXECUTED
2013600: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
2013604: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 <== NOT EXECUTED
2013608: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
201360c: 22 80 00 1b be,a 2013678 <fat_file_mark_removed+0x98> <== NOT EXECUTED
2013610: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2013614: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2013618: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED
201361c: 87 28 c0 02 sll %g3, %g2, %g3 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2013620: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED
2013624: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2013628: b9 30 a0 09 srl %g2, 9, %i4 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
201362c: 85 30 a0 05 srl %g2, 5, %g2 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2013630: 86 00 c0 1c add %g3, %i4, %g3 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2013634: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2013638: b9 28 e0 04 sll %g3, 4, %i4 <== NOT EXECUTED
201363c: 7f ff de 5f call 200afb8 <_Chain_Extract> <== NOT EXECUTED
2013640: b8 07 00 02 add %i4, %g2, %i4 <== 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);
2013644: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
2013648: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED
201364c: 83 2f 20 02 sll %i4, 2, %g1 <== 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 );
2013650: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2013654: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED
2013658: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED
201365c: 7f ff de 4c call 200af8c <_Chain_Append> <== NOT EXECUTED
2013660: 90 02 00 1c add %o0, %i4, %o0 <== 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;
2013664: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED
2013668: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
201366c: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED
}
2013670: 81 c7 e0 08 ret <== NOT EXECUTED
2013674: 81 e8 00 00 restore <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2013678: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 <== NOT EXECUTED
201367c: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED
2013680: 87 28 40 03 sll %g1, %g3, %g3 <== NOT EXECUTED
2013684: 10 bf ff e5 b 2013618 <fat_file_mark_removed+0x38> <== NOT EXECUTED
2013688: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED
02012a00 <fat_file_open>:
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
2012a00: 9d e3 bf a0 save %sp, -96, %sp
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012a04: c2 06 40 00 ld [ %i1 ], %g1
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2012a08: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2012a0c: 80 a0 60 01 cmp %g1, 1
2012a10: 02 80 00 0c be 2012a40 <fat_file_open+0x40>
2012a14: 84 10 20 01 mov 1, %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2012a18: 80 a0 60 00 cmp %g1, 0
2012a1c: 32 80 00 7d bne,a 2012c10 <fat_file_open+0x210>
2012a20: c4 0f 60 05 ldub [ %i5 + 5 ], %g2
2012a24: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2
2012a28: 80 88 a0 03 btst 3, %g2
2012a2c: 22 80 00 79 be,a 2012c10 <fat_file_open+0x210> <== NEVER TAKEN
2012a30: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2012a34: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2012a38: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
2012a3c: 85 28 80 03 sll %g2, %g3, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2012a40: c2 06 60 04 ld [ %i1 + 4 ], %g1
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2012a44: de 07 60 68 ld [ %i5 + 0x68 ], %o7
2012a48: b9 30 60 09 srl %g1, 9, %i4
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2012a4c: 83 30 60 05 srl %g1, 5, %g1
2012a50: 82 08 60 0f and %g1, 0xf, %g1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012a54: 84 00 80 1c add %g2, %i4, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2012a58: b9 28 a0 04 sll %g2, 4, %i4
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012a5c: b8 07 00 01 add %i4, %g1, %i4
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
2012a60: 82 0f 20 01 and %i4, 1, %g1
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2012a64: 85 28 60 02 sll %g1, 2, %g2
2012a68: a1 28 60 04 sll %g1, 4, %l0
2012a6c: a0 24 00 02 sub %l0, %g2, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2012a70: c2 03 c0 10 ld [ %o7 + %l0 ], %g1
2012a74: 9e 03 c0 10 add %o7, %l0, %o7
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2012a78: 9e 03 e0 04 add %o7, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2012a7c: 80 a0 40 0f cmp %g1, %o7
2012a80: 22 80 00 1f be,a 2012afc <fat_file_open+0xfc>
2012a84: c4 07 60 6c ld [ %i5 + 0x6c ], %g2
2012a88: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2012a8c: 80 a0 a0 01 cmp %g2, 1
2012a90: 02 80 00 0c be 2012ac0 <fat_file_open+0xc0>
2012a94: 88 10 20 01 mov 1, %g4
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2012a98: 80 a0 a0 00 cmp %g2, 0
2012a9c: 32 80 00 62 bne,a 2012c24 <fat_file_open+0x224>
2012aa0: c8 0f 60 05 ldub [ %i5 + 5 ], %g4
2012aa4: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3
2012aa8: 80 88 e0 03 btst 3, %g3
2012aac: 22 80 00 5e be,a 2012c24 <fat_file_open+0x224> <== NEVER TAKEN
2012ab0: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2012ab4: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2012ab8: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
2012abc: 89 29 00 03 sll %g4, %g3, %g4
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2012ac0: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
2012ac4: b7 30 e0 09 srl %g3, 9, %i3
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2012ac8: 85 30 e0 05 srl %g3, 5, %g2
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012acc: 88 01 00 1b add %g4, %i3, %g4
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2012ad0: 84 08 a0 0f and %g2, 0xf, %g2
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2012ad4: 87 29 20 04 sll %g4, 4, %g3
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012ad8: 86 00 c0 02 add %g3, %g2, %g3
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
2012adc: 80 a7 00 03 cmp %i4, %g3
2012ae0: 22 80 00 56 be,a 2012c38 <fat_file_open+0x238>
2012ae4: c4 00 60 08 ld [ %g1 + 8 ], %g2
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
2012ae8: c2 00 40 00 ld [ %g1 ], %g1
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2012aec: 80 a0 40 0f cmp %g1, %o7
2012af0: 32 bf ff e7 bne,a 2012a8c <fat_file_open+0x8c>
2012af4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2012af8: c4 07 60 6c ld [ %i5 + 0x6c ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2012afc: c2 00 80 10 ld [ %g2 + %l0 ], %g1
2012b00: 84 00 80 10 add %g2, %l0, %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2012b04: 9e 00 a0 04 add %g2, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2012b08: 80 a0 40 0f cmp %g1, %o7
2012b0c: 02 80 00 1f be 2012b88 <fat_file_open+0x188> <== ALWAYS TAKEN
2012b10: a2 10 3f ff mov -1, %l1
2012b14: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2012b18: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED
2012b1c: 02 80 00 0c be 2012b4c <fat_file_open+0x14c> <== NOT EXECUTED
2012b20: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2012b24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2012b28: 32 80 00 49 bne,a 2012c4c <fat_file_open+0x24c> <== NOT EXECUTED
2012b2c: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
2012b30: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 <== NOT EXECUTED
2012b34: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
2012b38: 22 80 00 45 be,a 2012c4c <fat_file_open+0x24c> <== NOT EXECUTED
2012b3c: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2012b40: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2012b44: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED
2012b48: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2012b4c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
2012b50: b7 30 e0 09 srl %g3, 9, %i3 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2012b54: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012b58: 88 01 00 1b add %g4, %i3, %g4 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2012b5c: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2012b60: 87 29 20 04 sll %g4, 4, %g3 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2012b64: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
2012b68: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED
2012b6c: 02 80 00 3d be 2012c60 <fat_file_open+0x260> <== NOT EXECUTED
2012b70: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
2012b74: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2012b78: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED
2012b7c: 32 bf ff e7 bne,a 2012b18 <fat_file_open+0x118> <== NOT EXECUTED
2012b80: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
return 0;
}
}
the_node = the_node->next;
}
return -1;
2012b84: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
2012b88: 7f ff cd e4 call 2006318 <malloc>
2012b8c: 90 10 20 44 mov 0x44, %o0
2012b90: d0 26 80 00 st %o0, [ %i2 ]
if ( lfat_fd == NULL )
2012b94: 80 a2 20 00 cmp %o0, 0
2012b98: 02 80 00 40 be 2012c98 <fat_file_open+0x298> <== NEVER TAKEN
2012b9c: b6 10 00 08 mov %o0, %i3
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
2012ba0: 92 10 20 00 clr %o1
2012ba4: 40 00 2f db call 201eb10 <memset>
2012ba8: 94 10 20 44 mov 0x44, %o2
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
2012bac: de 0e e0 30 ldub [ %i3 + 0x30 ], %o7
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
2012bb0: c8 06 40 00 ld [ %i1 ], %g4
2012bb4: c6 06 60 04 ld [ %i1 + 4 ], %g3
2012bb8: c4 06 60 08 ld [ %i1 + 8 ], %g2
2012bbc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
2012bc0: b2 0b ff fe and %o7, -2, %i1
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
2012bc4: c8 26 e0 20 st %g4, [ %i3 + 0x20 ]
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
2012bc8: 9e 10 20 01 mov 1, %o7
lfat_fd->flags &= ~FAT_FILE_REMOVED;
2012bcc: f2 2e e0 30 stb %i1, [ %i3 + 0x30 ]
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
2012bd0: de 26 e0 08 st %o7, [ %i3 + 8 ]
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
2012bd4: b2 10 3f ff mov -1, %i1
lfat_fd->dir_pos = *dir_pos;
2012bd8: c6 26 e0 24 st %g3, [ %i3 + 0x24 ]
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
2012bdc: f2 26 e0 3c st %i1, [ %i3 + 0x3c ]
lfat_fd->dir_pos = *dir_pos;
2012be0: c4 26 e0 28 st %g2, [ %i3 + 0x28 ]
if ( rc != RC_OK )
2012be4: 80 a4 60 00 cmp %l1, 0
2012be8: 02 80 00 25 be 2012c7c <fat_file_open+0x27c> <== NEVER TAKEN
2012bec: c2 26 e0 2c st %g1, [ %i3 + 0x2c ]
lfat_fd->ino = key;
2012bf0: f8 26 e0 0c st %i4, [ %i3 + 0xc ]
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
2012bf4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2012bf8: 92 10 00 1b mov %i3, %o1
2012bfc: 90 02 00 10 add %o0, %l0, %o0
2012c00: 7f ff e0 e3 call 200af8c <_Chain_Append>
2012c04: b0 10 20 00 clr %i0
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
2012c08: 81 c7 e0 08 ret
2012c0c: 81 e8 00 00 restore
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2012c10: c6 07 60 30 ld [ %i5 + 0x30 ], %g3
2012c14: 82 00 7f fe add %g1, -2, %g1
2012c18: 85 28 40 02 sll %g1, %g2, %g2
2012c1c: 10 bf ff 87 b 2012a38 <fat_file_open+0x38>
2012c20: 84 00 80 03 add %g2, %g3, %g2
2012c24: c6 07 60 30 ld [ %i5 + 0x30 ], %g3
2012c28: 84 00 bf fe add %g2, -2, %g2
2012c2c: 89 28 80 04 sll %g2, %g4, %g4
2012c30: 10 bf ff a2 b 2012ab8 <fat_file_open+0xb8>
2012c34: 88 01 00 03 add %g4, %g3, %g4
/* access "valid" hash table */
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
2012c38: c2 26 80 00 st %g1, [ %i2 ]
lfat_fd->links_num++;
2012c3c: 84 00 a0 01 inc %g2
2012c40: c4 20 60 08 st %g2, [ %g1 + 8 ]
return rc;
2012c44: 81 c7 e0 08 ret
2012c48: 91 e8 20 00 restore %g0, 0, %o0
2012c4c: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 <== NOT EXECUTED
2012c50: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED
2012c54: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED
2012c58: 10 bf ff bb b 2012b44 <fat_file_open+0x144> <== NOT EXECUTED
2012c5c: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
2012c60: 02 bf ff ca be 2012b88 <fat_file_open+0x188> <== NOT EXECUTED
2012c64: a2 10 20 00 clr %l1 <== NOT EXECUTED
2012c68: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
2012c6c: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED
2012c70: 32 bf ff c2 bne,a 2012b78 <fat_file_open+0x178> <== NOT EXECUTED
2012c74: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2012c78: 30 bf ff c4 b,a 2012b88 <fat_file_open+0x188> <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
2012c7c: 40 00 04 9d call 2013ef0 <fat_get_unique_ino> <== NOT EXECUTED
2012c80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
2012c84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012c88: 12 bf ff db bne 2012bf4 <fat_file_open+0x1f4> <== NOT EXECUTED
2012c8c: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED
{
free((*fat_fd));
2012c90: 7f ff cb d2 call 2005bd8 <free> <== NOT EXECUTED
2012c94: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
2012c98: 40 00 2c 93 call 201dee4 <__errno> <== NOT EXECUTED
2012c9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012ca0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2012ca4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012ca8: 81 c7 e0 08 ret <== NOT EXECUTED
2012cac: 81 e8 00 00 restore <== NOT EXECUTED
02012cc8 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
2012cc8: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
2012ccc: c0 27 bf fc clr [ %fp + -4 ]
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
2012cd0: ba 10 00 18 mov %i0, %i5
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2012cd4: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
2012cd8: 80 a6 e0 00 cmp %i3, 0
2012cdc: 02 80 00 7f be 2012ed8 <fat_file_read+0x210> <== NEVER TAKEN
2012ce0: b0 10 20 00 clr %i0
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
2012ce4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
2012ce8: 80 a0 40 1a cmp %g1, %i2
2012cec: 08 80 00 7b bleu 2012ed8 <fat_file_read+0x210> <== NEVER TAKEN
2012cf0: 80 a6 c0 01 cmp %i3, %g1
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
2012cf4: 08 80 00 4c bleu 2012e24 <fat_file_read+0x15c> <== ALWAYS TAKEN
2012cf8: 84 20 40 1b sub %g1, %i3, %g2
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
2012cfc: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2012d00: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2012d04: 80 a0 60 01 cmp %g1, 1
2012d08: 22 80 00 4c be,a 2012e38 <fat_file_read+0x170>
2012d0c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2012d10: e6 0c 60 08 ldub [ %l1 + 8 ], %l3
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2012d14: e0 14 60 06 lduh [ %l1 + 6 ], %l0
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2012d18: a7 36 80 13 srl %i2, %l3, %l3
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
2012d1c: 90 10 00 1d mov %i5, %o0
2012d20: 92 10 00 19 mov %i1, %o1
2012d24: 94 10 00 13 mov %l3, %o2
2012d28: 7f ff ff 0e call 2012960 <fat_file_lseek>
2012d2c: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
2012d30: b0 92 60 00 orcc %o1, 0, %i0
2012d34: 12 80 00 69 bne 2012ed8 <fat_file_read+0x210> <== NEVER TAKEN
2012d38: a1 2c 20 10 sll %l0, 0x10, %l0
return rc;
while (count > 0)
2012d3c: a8 10 20 00 clr %l4
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2012d40: a1 34 20 10 srl %l0, 0x10, %l0
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2012d44: a4 10 20 00 clr %l2
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2012d48: a0 04 3f ff add %l0, -1, %l0
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2012d4c: 80 a6 e0 00 cmp %i3, 0
2012d50: 02 80 00 5b be 2012ebc <fat_file_read+0x1f4> <== NEVER TAKEN
2012d54: b4 0e 80 10 and %i2, %l0, %i2
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
2012d58: c4 0c 60 02 ldub [ %l1 + 2 ], %g2
2012d5c: d4 14 40 00 lduh [ %l1 ], %o2
return rc;
while (count > 0)
2012d60: 10 80 00 20 b 2012de0 <fat_file_read+0x118>
2012d64: 82 10 00 1a mov %i2, %g1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2012d68: f0 08 e0 0a ldub [ %g3 + 0xa ], %i0 <== NOT EXECUTED
2012d6c: 80 8e 20 03 btst 3, %i0 <== NOT EXECUTED
2012d70: 22 80 00 26 be,a 2012e08 <fat_file_read+0x140> <== NOT EXECUTED
2012d74: f0 08 e0 05 ldub [ %g3 + 5 ], %i0 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2012d78: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
2012d7c: 85 30 40 02 srl %g1, %g2, %g2
byte = ofs & (fs_info->vol.bps - 1);
2012d80: 95 2a a0 10 sll %o2, 0x10, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
2012d84: 98 07 00 12 add %i4, %l2, %o4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2012d88: 95 32 a0 10 srl %o2, 0x10, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
2012d8c: 92 02 40 02 add %o1, %g2, %o1
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2012d90: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
2012d94: 96 10 00 10 mov %l0, %o3
2012d98: 94 0a 80 01 and %o2, %g1, %o2
2012d9c: 40 00 03 99 call 2013c00 <_fat_block_read>
2012da0: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2012da4: 94 07 bf fc add %fp, -4, %o2
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
2012da8: 80 a2 20 00 cmp %o0, 0
2012dac: 06 80 00 3c bl 2012e9c <fat_file_read+0x1d4> <== NEVER TAKEN
2012db0: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
2012db4: e8 07 bf fc ld [ %fp + -4 ], %l4
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
2012db8: a4 04 80 10 add %l2, %l0, %l2
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2012dbc: 40 00 23 96 call 201bc14 <fat_get_fat_cluster>
2012dc0: 92 10 00 14 mov %l4, %o1
if ( rc != RC_OK )
2012dc4: 80 a2 20 00 cmp %o0, 0
2012dc8: 12 80 00 15 bne 2012e1c <fat_file_read+0x154> <== NEVER TAKEN
2012dcc: b6 a6 c0 10 subcc %i3, %l0, %i3
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2012dd0: 02 80 00 3a be 2012eb8 <fat_file_read+0x1f0> <== ALWAYS TAKEN
2012dd4: 82 10 20 00 clr %g1
2012dd8: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 <== NOT EXECUTED
2012ddc: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
2012de0: e0 14 60 06 lduh [ %l1 + 6 ], %l0
2012de4: a0 24 00 01 sub %l0, %g1, %l0
2012de8: 80 a4 00 1b cmp %l0, %i3
2012dec: 08 80 00 03 bleu 2012df8 <fat_file_read+0x130>
2012df0: c8 07 bf fc ld [ %fp + -4 ], %g4
2012df4: a0 10 00 1b mov %i3, %l0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2012df8: 80 a1 20 00 cmp %g4, 0
2012dfc: 02 bf ff db be 2012d68 <fat_file_read+0xa0> <== NEVER TAKEN
2012e00: c6 07 60 34 ld [ %i5 + 0x34 ], %g3
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2012e04: f0 08 e0 05 ldub [ %g3 + 5 ], %i0
2012e08: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3
2012e0c: 92 01 3f fe add %g4, -2, %o1
2012e10: 93 2a 40 18 sll %o1, %i0, %o1
2012e14: 10 bf ff da b 2012d7c <fat_file_read+0xb4>
2012e18: 92 02 40 03 add %o1, %g3, %o1
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
2012e1c: 81 c7 e0 08 ret <== NOT EXECUTED
2012e20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
2012e24: 80 a6 80 02 cmp %i2, %g2
2012e28: 28 bf ff b7 bleu,a 2012d04 <fat_file_read+0x3c> <== ALWAYS TAKEN
2012e2c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
2012e30: 10 bf ff b4 b 2012d00 <fat_file_read+0x38> <== NOT EXECUTED
2012e34: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2012e38: 80 a0 60 00 cmp %g1, 0
2012e3c: 32 bf ff b6 bne,a 2012d14 <fat_file_read+0x4c> <== NEVER TAKEN
2012e40: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2012e44: c2 0c 60 0a ldub [ %l1 + 0xa ], %g1
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2012e48: 80 88 60 03 btst 3, %g1
2012e4c: 22 bf ff b2 be,a 2012d14 <fat_file_read+0x4c> <== NEVER TAKEN
2012e50: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
2012e54: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2012e58: 80 a0 60 00 cmp %g1, 0
2012e5c: 32 80 00 12 bne,a 2012ea4 <fat_file_read+0x1dc> <== NEVER TAKEN
2012e60: c6 0c 60 05 ldub [ %l1 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2012e64: d2 04 60 1c ld [ %l1 + 0x1c ], %o1
sec += (start >> fs_info->vol.sec_log2);
2012e68: c2 0c 60 02 ldub [ %l1 + 2 ], %g1
byte = start & (fs_info->vol.bps - 1);
2012e6c: d4 14 40 00 lduh [ %l1 ], %o2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
2012e70: 83 36 80 01 srl %i2, %g1, %g1
byte = start & (fs_info->vol.bps - 1);
2012e74: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
2012e78: 90 10 00 1d mov %i5, %o0
2012e7c: 92 02 40 01 add %o1, %g1, %o1
2012e80: 94 0e 80 0a and %i2, %o2, %o2
2012e84: 96 10 00 1b mov %i3, %o3
2012e88: 40 00 03 5e call 2013c00 <_fat_block_read>
2012e8c: 98 10 00 1c mov %i4, %o4
if ( ret < 0 )
2012e90: b0 92 20 00 orcc %o0, 0, %i0
2012e94: 16 80 00 11 bge 2012ed8 <fat_file_read+0x210> <== ALWAYS TAKEN
2012e98: 01 00 00 00 nop
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
2012e9c: 81 c7 e0 08 ret <== NOT EXECUTED
2012ea0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2012ea4: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
2012ea8: 92 00 7f fe add %g1, -2, %o1 <== NOT EXECUTED
2012eac: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2012eb0: 10 bf ff ee b 2012e68 <fat_file_read+0x1a0> <== NOT EXECUTED
2012eb4: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
2012eb8: b0 10 00 12 mov %l2, %i0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2012ebc: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
2012ec0: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
2012ec4: e8 26 60 38 st %l4, [ %i1 + 0x38 ]
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2012ec8: a4 06 80 12 add %i2, %l2, %l2
2012ecc: a5 34 80 01 srl %l2, %g1, %l2
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
2012ed0: a6 04 80 13 add %l2, %l3, %l3
2012ed4: e6 26 60 34 st %l3, [ %i1 + 0x34 ]
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
2012ed8: 81 c7 e0 08 ret
2012edc: 81 e8 00 00 restore
020137a8 <fat_file_size>:
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
20137a8: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
20137ac: fa 06 60 1c ld [ %i1 + 0x1c ], %i5
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20137b0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
20137b4: fa 27 bf fc st %i5, [ %fp + -4 ]
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
20137b8: b6 10 00 18 mov %i0, %i3
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20137bc: 80 a0 60 01 cmp %g1, 1
20137c0: 02 80 00 21 be 2013844 <fat_file_size+0x9c> <== NEVER TAKEN
20137c4: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
20137c8: c4 07 20 0c ld [ %i4 + 0xc ], %g2
20137cc: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
20137d0: 84 0f 40 02 and %i5, %g2, %g2
20137d4: 80 a0 80 01 cmp %g2, %g1
20137d8: 0a 80 00 0e bcs 2013810 <fat_file_size+0x68> <== ALWAYS TAKEN
20137dc: c0 26 60 18 clr [ %i1 + 0x18 ]
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
20137e0: 10 80 00 15 b 2013834 <fat_file_size+0x8c> <== NOT EXECUTED
20137e4: ba 10 20 00 clr %i5 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
20137e8: de 06 60 18 ld [ %i1 + 0x18 ], %o7
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
20137ec: c6 07 20 0c ld [ %i4 + 0xc ], %g3
20137f0: c4 07 20 10 ld [ %i4 + 0x10 ], %g2
20137f4: c2 07 bf fc ld [ %fp + -4 ], %g1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
20137f8: 88 03 c0 04 add %o7, %g4, %g4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
20137fc: 86 08 40 03 and %g1, %g3, %g3
2013800: 80 a0 c0 02 cmp %g3, %g2
2013804: 1a 80 00 0c bcc 2013834 <fat_file_size+0x8c> <== ALWAYS TAKEN
2013808: c8 26 60 18 st %g4, [ %i1 + 0x18 ]
201380c: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2013810: 92 10 00 1d mov %i5, %o1
2013814: 90 10 00 1b mov %i3, %o0
2013818: 40 00 20 ff call 201bc14 <fat_get_fat_cluster>
201381c: 94 07 bf fc add %fp, -4, %o2
if ( rc != RC_OK )
2013820: 80 a2 20 00 cmp %o0, 0
2013824: 22 bf ff f1 be,a 20137e8 <fat_file_size+0x40> <== ALWAYS TAKEN
2013828: c8 17 20 06 lduh [ %i4 + 6 ], %g4
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
201382c: 81 c7 e0 08 ret <== NOT EXECUTED
2013830: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
2013834: 90 10 20 00 clr %o0
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
2013838: fa 26 60 3c st %i5, [ %i1 + 0x3c ]
return rc;
}
201383c: 81 c7 e0 08 ret
2013840: 91 e8 00 08 restore %g0, %o0, %o0
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2013844: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED
2013848: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201384c: 32 bf ff e0 bne,a 20137cc <fat_file_size+0x24> <== NOT EXECUTED
2013850: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2013854: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2013858: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201385c: 22 bf ff dc be,a 20137cc <fat_file_size+0x24> <== NOT EXECUTED
2013860: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
2013864: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED
return rc;
2013868: 90 10 20 00 clr %o0 <== NOT EXECUTED
201386c: 10 bf ff f0 b 201382c <fat_file_size+0x84> <== NOT EXECUTED
2013870: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED
02012ee0 <fat_file_truncate>:
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
2012ee0: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
2012ee4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
2012ee8: 84 10 3f ff mov -1, %g2
uint32_t new_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
2012eec: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
2012ef0: c4 27 bf fc st %g2, [ %fp + -4 ]
if ( new_length >= fat_fd->fat_file_size )
2012ef4: 80 a0 40 1a cmp %g1, %i2
2012ef8: 08 80 00 21 bleu 2012f7c <fat_file_truncate+0x9c> <== NEVER TAKEN
2012efc: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
return rc;
assert(fat_fd->fat_file_size);
2012f00: 80 a0 60 00 cmp %g1, 0
2012f04: 02 80 00 33 be 2012fd0 <fat_file_truncate+0xf0> <== NEVER TAKEN
2012f08: 11 00 80 b6 sethi %hi(0x202d800), %o0
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
2012f0c: c6 08 a0 08 ldub [ %g2 + 8 ], %g3
2012f10: c4 10 a0 06 lduh [ %g2 + 6 ], %g2
2012f14: 84 00 bf ff add %g2, -1, %g2
2012f18: b4 00 80 1a add %g2, %i2, %i2
2012f1c: b5 36 80 03 srl %i2, %g3, %i2
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
2012f20: 87 2e 80 03 sll %i2, %g3, %g3
2012f24: 80 a0 40 03 cmp %g1, %g3
2012f28: 08 80 00 13 bleu 2012f74 <fat_file_truncate+0x94> <== NEVER TAKEN
2012f2c: 92 10 20 00 clr %o1
return RC_OK;
if (cl_start != 0)
2012f30: 80 a6 a0 00 cmp %i2, 0
2012f34: 02 80 00 09 be 2012f58 <fat_file_truncate+0x78> <== ALWAYS TAKEN
2012f38: 90 10 00 18 mov %i0, %o0
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
2012f3c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2012f40: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED
2012f44: 7f ff fe 87 call 2012960 <fat_file_lseek> <== NOT EXECUTED
2012f48: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc != RC_OK)
2012f4c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2012f50: 12 80 00 09 bne 2012f74 <fat_file_truncate+0x94> <== NOT EXECUTED
2012f54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
2012f58: 92 10 00 19 mov %i1, %o1
2012f5c: 94 10 00 1a mov %i2, %o2
2012f60: 7f ff fe 80 call 2012960 <fat_file_lseek>
2012f64: 96 07 bf f8 add %fp, -8, %o3
if (rc != RC_OK)
2012f68: 80 a2 60 00 cmp %o1, 0
2012f6c: 22 80 00 07 be,a 2012f88 <fat_file_truncate+0xa8> <== ALWAYS TAKEN
2012f70: d2 07 bf f8 ld [ %fp + -8 ], %o1
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
2012f74: 81 c7 e0 08 ret
2012f78: 91 e8 00 09 restore %g0, %o1, %o0
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
return rc;
2012f7c: 92 10 20 00 clr %o1 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
2012f80: 81 c7 e0 08 ret <== NOT EXECUTED
2012f84: 91 e8 00 09 restore %g0, %o1, %o0 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
2012f88: 40 00 24 6d call 201c13c <fat_free_fat_clusters_chain>
2012f8c: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
2012f90: 92 92 20 00 orcc %o0, 0, %o1
2012f94: 12 bf ff f8 bne 2012f74 <fat_file_truncate+0x94> <== NEVER TAKEN
2012f98: 80 a6 a0 00 cmp %i2, 0
return rc;
if (cl_start != 0)
2012f9c: 02 bf ff f6 be 2012f74 <fat_file_truncate+0x94> <== ALWAYS TAKEN
2012fa0: 90 10 00 18 mov %i0, %o0
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
2012fa4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
2012fa8: 40 00 23 a3 call 201be34 <fat_set_fat_cluster> <== NOT EXECUTED
2012fac: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2012fb0: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED
2012fb4: 12 bf ff f0 bne 2012f74 <fat_file_truncate+0x94> <== NOT EXECUTED
2012fb8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
2012fbc: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
2012fc0: c2 26 60 38 st %g1, [ %i1 + 0x38 ] <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
2012fc4: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
2012fc8: 10 bf ff eb b 2012f74 <fat_file_truncate+0x94> <== NOT EXECUTED
2012fcc: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
2012fd0: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
2012fd4: 17 00 80 b6 sethi %hi(0x202d800), %o3 <== NOT EXECUTED
2012fd8: 90 12 22 90 or %o0, 0x290, %o0 <== NOT EXECUTED
2012fdc: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED
2012fe0: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED
2012fe4: 40 00 0b 02 call 2015bec <__assert_func> <== NOT EXECUTED
2012fe8: 96 12 e2 d8 or %o3, 0x2d8, %o3 <== NOT EXECUTED
02013378 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
2013378: 9d e3 bf 98 save %sp, -104, %sp
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
201337c: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t cl_start = 0;
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
2013380: c0 27 bf fc clr [ %fp + -4 ]
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
2013384: ba 10 00 18 mov %i0, %i5
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2013388: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
201338c: 80 a6 e0 00 cmp %i3, 0
2013390: 02 80 00 82 be 2013598 <fat_file_write+0x220> <== NEVER TAKEN
2013394: b0 10 20 00 clr %i0
return cmpltd;
if ( start > fat_fd->fat_file_size )
2013398: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
201339c: 80 a0 40 1a cmp %g1, %i2
20133a0: 0a 80 00 7a bcs 2013588 <fat_file_write+0x210> <== NEVER TAKEN
20133a4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
20133a8: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
20133ac: 80 a6 c0 01 cmp %i3, %g1
20133b0: 18 80 00 76 bgu 2013588 <fat_file_write+0x210> <== NEVER TAKEN
20133b4: 82 20 40 1b sub %g1, %i3, %g1
20133b8: 80 a6 80 01 cmp %i2, %g1
20133bc: 18 80 00 73 bgu 2013588 <fat_file_write+0x210> <== NEVER TAKEN
20133c0: a2 06 c0 1a add %i3, %i2, %l1
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
20133c4: 90 10 00 1d mov %i5, %o0
20133c8: 92 10 00 19 mov %i1, %o1
20133cc: 94 10 00 11 mov %l1, %o2
20133d0: 7f ff ff 71 call 2013194 <fat_file_extend>
20133d4: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
20133d8: b0 92 20 00 orcc %o0, 0, %i0
20133dc: 12 80 00 6f bne 2013598 <fat_file_write+0x220> <== NEVER TAKEN
20133e0: c2 07 bf fc ld [ %fp + -4 ], %g1
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
20133e4: 80 a4 40 01 cmp %l1, %g1
20133e8: 32 80 00 02 bne,a 20133f0 <fat_file_write+0x78> <== NEVER TAKEN
20133ec: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20133f0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
20133f4: 80 a0 60 01 cmp %g1, 1
20133f8: 22 80 00 45 be,a 201350c <fat_file_write+0x194>
20133fc: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2013400: e4 0c 20 08 ldub [ %l0 + 8 ], %l2
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2013404: e2 14 20 06 lduh [ %l0 + 6 ], %l1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2013408: a5 36 80 12 srl %i2, %l2, %l2
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
201340c: 90 10 00 1d mov %i5, %o0
2013410: 92 10 00 19 mov %i1, %o1
2013414: 94 10 00 12 mov %l2, %o2
2013418: 7f ff fd 52 call 2012960 <fat_file_lseek>
201341c: 96 07 bf f8 add %fp, -8, %o3
if (rc != RC_OK)
2013420: b0 92 60 00 orcc %o1, 0, %i0
2013424: 12 80 00 5d bne 2013598 <fat_file_write+0x220> <== NEVER TAKEN
2013428: 83 2c 60 10 sll %l1, 0x10, %g1
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
201342c: 83 30 60 10 srl %g1, 0x10, %g1
2013430: 82 00 7f ff add %g1, -1, %g1
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2013434: a2 10 20 00 clr %l1
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2013438: b4 0e 80 01 and %i2, %g1, %i2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
201343c: a8 10 20 00 clr %l4
2013440: 80 a6 e0 00 cmp %i3, 0
2013444: 12 80 00 20 bne 20134c4 <fat_file_write+0x14c> <== ALWAYS TAKEN
2013448: 82 10 00 1a mov %i2, %g1
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
201344c: 10 80 00 5d b 20135c0 <fat_file_write+0x248> <== NOT EXECUTED
2013450: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2013454: c8 08 a0 0a ldub [ %g2 + 0xa ], %g4 <== NOT EXECUTED
2013458: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED
201345c: 22 80 00 25 be,a 20134f0 <fat_file_write+0x178> <== NOT EXECUTED
2013460: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2013464: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
2013468: c4 0c 20 02 ldub [ %l0 + 2 ], %g2
byte = ofs & (fs_info->vol.bps - 1);
201346c: d4 14 00 00 lduh [ %l0 ], %o2
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
2013470: 85 30 40 02 srl %g1, %g2, %g2
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
2013474: 98 07 00 11 add %i4, %l1, %o4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2013478: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
201347c: 92 02 40 02 add %o1, %g2, %o1
2013480: 94 08 40 0a and %g1, %o2, %o2
2013484: 40 00 02 01 call 2013c88 <_fat_block_write>
2013488: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
201348c: 94 07 bf f8 add %fp, -8, %o2
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
2013490: 80 a2 20 00 cmp %o0, 0
2013494: 06 80 00 1c bl 2013504 <fat_file_write+0x18c> <== NEVER TAKEN
2013498: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
201349c: e8 07 bf f8 ld [ %fp + -8 ], %l4
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
20134a0: e6 07 bf fc ld [ %fp + -4 ], %l3
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20134a4: 40 00 21 dc call 201bc14 <fat_get_fat_cluster>
20134a8: 92 10 00 14 mov %l4, %o1
if ( rc != RC_OK )
20134ac: b0 92 20 00 orcc %o0, 0, %i0
20134b0: 12 80 00 3a bne 2013598 <fat_file_write+0x220> <== NEVER TAKEN
20134b4: b6 a6 c0 13 subcc %i3, %l3, %i3
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20134b8: 02 80 00 40 be 20135b8 <fat_file_write+0x240>
20134bc: a2 04 40 13 add %l1, %l3, %l1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
20134c0: 82 10 20 00 clr %g1
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
20134c4: d6 14 20 06 lduh [ %l0 + 6 ], %o3
20134c8: 96 22 c0 01 sub %o3, %g1, %o3
20134cc: 80 a2 c0 1b cmp %o3, %i3
20134d0: 08 80 00 03 bleu 20134dc <fat_file_write+0x164>
20134d4: c6 07 bf f8 ld [ %fp + -8 ], %g3
20134d8: 96 10 00 1b mov %i3, %o3
20134dc: d6 27 bf fc st %o3, [ %fp + -4 ]
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20134e0: 80 a0 e0 00 cmp %g3, 0
20134e4: 02 bf ff dc be 2013454 <fat_file_write+0xdc> <== NEVER TAKEN
20134e8: c4 07 60 34 ld [ %i5 + 0x34 ], %g2
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20134ec: c8 08 a0 05 ldub [ %g2 + 5 ], %g4
20134f0: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2
20134f4: 92 00 ff fe add %g3, -2, %o1
20134f8: 93 2a 40 04 sll %o1, %g4, %o1
20134fc: 10 bf ff db b 2013468 <fat_file_write+0xf0>
2013500: 92 02 40 02 add %o1, %g2, %o1
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
2013504: 81 c7 e0 08 ret <== NOT EXECUTED
2013508: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
201350c: 80 a0 60 00 cmp %g1, 0
2013510: 32 bf ff bd bne,a 2013404 <fat_file_write+0x8c> <== NEVER TAKEN
2013514: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2013518: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
201351c: 80 88 60 03 btst 3, %g1
2013520: 22 bf ff b9 be,a 2013404 <fat_file_write+0x8c> <== NEVER TAKEN
2013524: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
2013528: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201352c: 80 a0 a0 00 cmp %g2, 0
2013530: 12 80 00 1c bne 20135a0 <fat_file_write+0x228> <== NEVER TAKEN
2013534: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2013538: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
201353c: 80 88 e0 03 btst 3, %g3
2013540: 22 80 00 19 be,a 20135a4 <fat_file_write+0x22c> <== NEVER TAKEN
2013544: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2013548: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
sec += (start >> fs_info->vol.sec_log2);
201354c: c2 0c 20 02 ldub [ %l0 + 2 ], %g1
byte = start & (fs_info->vol.bps - 1);
2013550: d4 14 00 00 lduh [ %l0 ], %o2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
2013554: 83 36 80 01 srl %i2, %g1, %g1
byte = start & (fs_info->vol.bps - 1);
2013558: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
201355c: 90 10 00 1d mov %i5, %o0
2013560: 92 02 40 01 add %o1, %g1, %o1
2013564: 94 0e 80 0a and %i2, %o2, %o2
2013568: 96 10 00 1b mov %i3, %o3
201356c: 40 00 01 c7 call 2013c88 <_fat_block_write>
2013570: 98 10 00 1c mov %i4, %o4
if ( ret < 0 )
2013574: b0 92 20 00 orcc %o0, 0, %i0
2013578: 16 80 00 18 bge 20135d8 <fat_file_write+0x260> <== ALWAYS TAKEN
201357c: 01 00 00 00 nop
return -1;
2013580: 81 c7 e0 08 ret <== NOT EXECUTED
2013584: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
2013588: 40 00 2a 57 call 201dee4 <__errno> <== NOT EXECUTED
201358c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013590: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2013594: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013598: 81 c7 e0 08 ret <== NOT EXECUTED
201359c: 81 e8 00 00 restore <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20135a0: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
20135a4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
20135a8: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED
20135ac: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
20135b0: 10 bf ff e7 b 201354c <fat_file_write+0x1d4> <== NOT EXECUTED
20135b4: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20135b8: b0 10 00 11 mov %l1, %i0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
20135bc: c2 0c 20 08 ldub [ %l0 + 8 ], %g1
20135c0: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
20135c4: e8 26 60 38 st %l4, [ %i1 + 0x38 ]
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
20135c8: a2 06 80 11 add %i2, %l1, %l1
20135cc: a3 34 40 01 srl %l1, %g1, %l1
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
20135d0: a4 04 40 12 add %l1, %l2, %l2
20135d4: e4 26 60 34 st %l2, [ %i1 + 0x34 ]
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
20135d8: 81 c7 e0 08 ret
20135dc: 81 e8 00 00 restore
0201c13c <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
201c13c: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
201c140: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
201c144: c0 27 bf fc clr [ %fp + -4 ]
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
201c148: c4 07 60 0c ld [ %i5 + 0xc ], %g2
201c14c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201c150: 84 0e 40 02 and %i1, %g2, %g2
201c154: 80 a0 80 01 cmp %g2, %g1
201c158: 1a 80 00 25 bcc 201c1ec <fat_free_fat_clusters_chain+0xb0><== NEVER TAKEN
201c15c: b8 10 00 18 mov %i0, %i4
201c160: b6 10 00 19 mov %i1, %i3
201c164: b4 10 20 00 clr %i2
201c168: 10 80 00 0e b 201c1a0 <fat_free_fat_clusters_chain+0x64>
201c16c: a0 10 20 00 clr %l0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
201c170: 7f ff ff 31 call 201be34 <fat_set_fat_cluster>
201c174: 01 00 00 00 nop
if ( rc != RC_OK )
201c178: 80 a2 20 00 cmp %o0, 0
201c17c: 02 80 00 03 be 201c188 <fat_free_fat_clusters_chain+0x4c> <== ALWAYS TAKEN
201c180: f6 07 bf fc ld [ %fp + -4 ], %i3
201c184: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
201c188: c4 07 60 0c ld [ %i5 + 0xc ], %g2
201c18c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201c190: 84 0e c0 02 and %i3, %g2, %g2
201c194: 80 a0 80 01 cmp %g2, %g1
201c198: 1a 80 00 17 bcc 201c1f4 <fat_free_fat_clusters_chain+0xb8><== ALWAYS TAKEN
201c19c: b4 06 a0 01 inc %i2
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
201c1a0: 92 10 00 1b mov %i3, %o1
201c1a4: 94 07 bf fc add %fp, -4, %o2
201c1a8: 7f ff fe 9b call 201bc14 <fat_get_fat_cluster>
201c1ac: 90 10 00 1c mov %i4, %o0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
201c1b0: 92 10 00 1b mov %i3, %o1
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
201c1b4: b0 10 00 08 mov %o0, %i0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
201c1b8: 94 10 20 00 clr %o2
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
if ( rc != RC_OK )
201c1bc: 80 a6 20 00 cmp %i0, 0
201c1c0: 02 bf ff ec be 201c170 <fat_free_fat_clusters_chain+0x34> <== ALWAYS TAKEN
201c1c4: 90 10 00 1c mov %i4, %o0
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
201c1c8: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED
201c1cc: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201c1d0: 02 80 00 03 be 201c1dc <fat_free_fat_clusters_chain+0xa0> <== NOT EXECUTED
201c1d4: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
201c1d8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
fat_buf_release(fs_info);
201c1dc: 7f ff de 2d call 2013a90 <fat_buf_release> <== NOT EXECUTED
201c1e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
201c1e4: 81 c7 e0 08 ret <== NOT EXECUTED
201c1e8: 81 e8 00 00 restore <== NOT EXECUTED
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
201c1ec: b4 10 20 00 clr %i2 <== NOT EXECUTED
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
201c1f0: a0 10 20 00 clr %l0 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
201c1f4: c2 07 60 40 ld [ %i5 + 0x40 ], %g1
201c1f8: 80 a0 7f ff cmp %g1, -1
201c1fc: 02 80 00 04 be 201c20c <fat_free_fat_clusters_chain+0xd0> <== ALWAYS TAKEN
201c200: f2 27 60 44 st %i1, [ %i5 + 0x44 ]
fs_info->vol.free_cls += freed_cls_cnt;
201c204: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED
201c208: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
fat_buf_release(fs_info);
201c20c: b0 10 00 10 mov %l0, %i0
201c210: 7f ff de 20 call 2013a90 <fat_buf_release>
201c214: 90 10 00 1d mov %i5, %o0
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
201c218: 81 c7 e0 08 ret
201c21c: 81 e8 00 00 restore
02013ff0 <fat_free_unique_ino>:
void
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
2013ff0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
2013ff4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
2013ff8: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED
2013ffc: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED
2014000: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED
2014004: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED
2014008: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED
201400c: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED
2014010: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED
2014014: 85 2b c0 02 sll %o7, %g2, %g2 <== NOT EXECUTED
2014018: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED
201401c: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED
}
2014020: 81 c7 e0 08 ret <== NOT EXECUTED
2014024: 81 e8 00 00 restore <== NOT EXECUTED
0201bc14 <fat_get_fat_cluster>:
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
201bc14: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
201bc18: c0 27 bf fc clr [ %fp + -4 ]
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
201bc1c: 80 a6 60 01 cmp %i1, 1
201bc20: 08 80 00 26 bleu 201bcb8 <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
201bc24: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
201bc28: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
201bc2c: 82 00 60 01 inc %g1
201bc30: 80 a6 40 01 cmp %i1, %g1
201bc34: 18 80 00 21 bgu 201bcb8 <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
201bc38: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201bc3c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
201bc40: 80 88 60 01 btst 1, %g1
201bc44: 12 80 00 23 bne 201bcd0 <fat_get_fat_cluster+0xbc> <== ALWAYS TAKEN
201bc48: f6 0f 60 02 ldub [ %i5 + 2 ], %i3
201bc4c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
201bc50: 02 80 00 30 be 201bd10 <fat_get_fat_cluster+0xfc> <== NOT EXECUTED
201bc54: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
201bc58: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED
201bc5c: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED
201bc60: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201bc64: e0 17 40 00 lduh [ %i5 ], %l0 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201bc68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bc6c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201bc70: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201bc74: 7f ff df 00 call 2013874 <fat_buf_access> <== NOT EXECUTED
201bc78: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc != RC_OK)
201bc7c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201bc80: 12 80 00 5a bne 201bde8 <fat_get_fat_cluster+0x1d4> <== NOT EXECUTED
201bc84: 01 00 00 00 nop <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
201bc88: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201bc8c: a1 2c 20 10 sll %l0, 0x10, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
201bc90: 80 a0 60 02 cmp %g1, 2
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201bc94: a1 34 20 10 srl %l0, 0x10, %l0
201bc98: a0 04 3f ff add %l0, -1, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
201bc9c: 02 80 00 21 be 201bd20 <fat_get_fat_cluster+0x10c> <== NEVER TAKEN
201bca0: b8 0f 00 10 and %i4, %l0, %i4
201bca4: 80 a0 60 04 cmp %g1, 4
201bca8: 02 80 00 3e be 201bda0 <fat_get_fat_cluster+0x18c> <== NEVER TAKEN
201bcac: 80 a0 60 01 cmp %g1, 1
201bcb0: 02 80 00 29 be 201bd54 <fat_get_fat_cluster+0x140> <== ALWAYS TAKEN
201bcb4: c2 07 bf fc ld [ %fp + -4 ], %g1
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
201bcb8: 40 00 08 8b call 201dee4 <__errno> <== NOT EXECUTED
201bcbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bcc0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201bcc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201bcc8: 81 c7 e0 08 ret <== NOT EXECUTED
201bccc: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201bcd0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
201bcd4: b9 36 60 01 srl %i1, 1, %i4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201bcd8: e0 17 40 00 lduh [ %i5 ], %l0
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201bcdc: b8 07 00 19 add %i4, %i1, %i4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201bce0: 90 10 00 1d mov %i5, %o0
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201bce4: b7 37 00 1b srl %i4, %i3, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201bce8: 94 10 20 01 mov 1, %o2
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201bcec: b6 06 c0 01 add %i3, %g1, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201bcf0: 96 07 bf fc add %fp, -4, %o3
201bcf4: 7f ff de e0 call 2013874 <fat_buf_access>
201bcf8: 92 10 00 1b mov %i3, %o1
if (rc != RC_OK)
201bcfc: b0 92 20 00 orcc %o0, 0, %i0
201bd00: 22 bf ff e3 be,a 201bc8c <fat_get_fat_cluster+0x78> <== ALWAYS TAKEN
201bd04: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
201bd08: 81 c7 e0 08 ret <== NOT EXECUTED
201bd0c: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201bd10: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED
201bd14: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED
201bd18: 10 bf ff d3 b 201bc64 <fat_get_fat_cluster+0x50> <== NOT EXECUTED
201bd1c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
201bd20: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
201bd24: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
201bd28: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
201bd2c: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
201bd30: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
201bd34: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201bd38: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
201bd3c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED
201bd40: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED
201bd44: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
201bd48: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
break;
201bd4c: 81 c7 e0 08 ret <== NOT EXECUTED
201bd50: 81 e8 00 00 restore <== NOT EXECUTED
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
201bd54: c6 17 40 00 lduh [ %i5 ], %g3
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
201bd58: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
if ( ofs == (fs_info->vol.bps - 1) )
201bd5c: 86 00 ff ff add %g3, -1, %g3
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
201bd60: c2 08 80 1c ldub [ %g2 + %i4 ], %g1
if ( ofs == (fs_info->vol.bps - 1) )
201bd64: 80 a0 c0 1c cmp %g3, %i4
201bd68: 02 80 00 22 be 201bdf0 <fat_get_fat_cluster+0x1dc> <== NEVER TAKEN
201bd6c: c2 26 80 00 st %g1, [ %i2 ]
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
201bd70: b8 00 80 1c add %g2, %i4, %i4
201bd74: c4 0f 20 01 ldub [ %i4 + 1 ], %g2
201bd78: 85 28 a0 08 sll %g2, 8, %g2
201bd7c: 82 10 80 01 or %g2, %g1, %g1
201bd80: c2 26 80 00 st %g1, [ %i2 ]
}
if ( FAT_CLUSTER_IS_ODD(cln) )
201bd84: 80 8e 60 01 btst 1, %i1
201bd88: 22 80 00 17 be,a 201bde4 <fat_get_fat_cluster+0x1d0>
201bd8c: 82 08 6f ff and %g1, 0xfff, %g1
*ret_val = (*ret_val) >> FAT12_SHIFT;
201bd90: 83 30 60 04 srl %g1, 4, %g1
201bd94: c2 26 80 00 st %g1, [ %i2 ]
201bd98: 81 c7 e0 08 ret
201bd9c: 81 e8 00 00 restore
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
201bda0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201bda4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201bda8: c2 00 40 1c ld [ %g1 + %i4 ], %g1 <== NOT EXECUTED
201bdac: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201bdb0: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201bdb4: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201bdb8: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201bdbc: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201bdc0: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201bdc4: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201bdc8: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201bdcc: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
201bdd0: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201bdd4: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
*ret_val = CF_LE_L(*ret_val);
201bdd8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
break;
201bddc: 81 c7 e0 08 ret <== NOT EXECUTED
201bde0: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
201bde4: c2 26 80 00 st %g1, [ %i2 ]
201bde8: 81 c7 e0 08 ret
201bdec: 81 e8 00 00 restore
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
201bdf0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bdf4: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED
201bdf8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201bdfc: 7f ff de 9e call 2013874 <fat_buf_access> <== NOT EXECUTED
201be00: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
201be04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201be08: 12 80 00 09 bne 201be2c <fat_get_fat_cluster+0x218> <== NOT EXECUTED
201be0c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
201be10: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
201be14: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2 <== NOT EXECUTED
201be18: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED
201be1c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
201be20: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
201be24: 10 bf ff d8 b 201bd84 <fat_get_fat_cluster+0x170> <== NOT EXECUTED
201be28: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
201be2c: 81 c7 e0 08 ret <== NOT EXECUTED
201be30: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02013ef0 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2013ef0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2013ef4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
2013ef8: 39 03 ff ff sethi %hi(0xffffc00), %i4 <== NOT EXECUTED
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2013efc: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
2013f00: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
2013f04: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2013f08: 22 80 00 20 be,a 2013f88 <fat_get_unique_ino+0x98> <== NOT EXECUTED
2013f0c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
2013f10: c6 07 60 70 ld [ %i5 + 0x70 ], %g3 <== NOT EXECUTED
2013f14: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
2013f18: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED
2013f1c: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED
2013f20: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED
2013f24: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED
2013f28: 89 39 00 0f sra %g4, %o7, %g4 <== NOT EXECUTED
2013f2c: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED
2013f30: 02 80 00 1d be 2013fa4 <fat_get_unique_ino+0xb4> <== NOT EXECUTED
2013f34: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
2013f38: 10 80 00 0a b 2013f60 <fat_get_unique_ino+0x70> <== NOT EXECUTED
2013f3c: 88 10 20 00 clr %g4 <== NOT EXECUTED
2013f40: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED
2013f44: da 48 c0 02 ldsb [ %g3 + %g2 ], %o5 <== NOT EXECUTED
2013f48: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED
2013f4c: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED
2013f50: 9b 3b 40 0f sra %o5, %o7, %o5 <== NOT EXECUTED
2013f54: 80 8b 60 01 btst 1, %o5 <== NOT EXECUTED
2013f58: 02 80 00 13 be 2013fa4 <fat_get_unique_ino+0xb4> <== NOT EXECUTED
2013f5c: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
2013f60: 82 00 60 01 inc %g1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
2013f64: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
2013f68: 0a 80 00 03 bcs 2013f74 <fat_get_unique_ino+0x84> <== NOT EXECUTED
2013f6c: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED
fs_info->index = 0;
2013f70: c0 27 60 74 clr [ %i5 + 0x74 ] <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
2013f74: 88 01 20 01 inc %g4 <== NOT EXECUTED
2013f78: 80 a1 00 09 cmp %g4, %o1 <== NOT EXECUTED
2013f7c: 32 bf ff f1 bne,a 2013f40 <fat_get_unique_ino+0x50> <== NOT EXECUTED
2013f80: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
2013f84: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2013f88: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED
2013f8c: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED
2013f90: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
2013f94: 0a 80 00 0c bcs 2013fc4 <fat_get_unique_ino+0xd4> <== NOT EXECUTED
2013f98: b0 10 20 00 clr %i0 <== NOT EXECUTED
2013f9c: 81 c7 e0 08 ret <== NOT EXECUTED
2013fa0: 81 e8 00 00 restore <== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
2013fa4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2013fa8: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED
2013fac: 84 13 c0 02 or %o7, %g2, %g2 <== NOT EXECUTED
2013fb0: c4 2b 00 00 stb %g2, [ %o4 ] <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
2013fb4: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED
2013fb8: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2013fbc: 81 c7 e0 08 ret <== NOT EXECUTED
2013fc0: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
2013fc4: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
2013fc8: 7f ff cc 5b call 2007134 <realloc> <== NOT EXECUTED
2013fcc: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED
if (fs_info->uino != NULL)
2013fd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013fd4: 12 80 00 04 bne 2013fe4 <fat_get_unique_ino+0xf4> <== NOT EXECUTED
2013fd8: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
2013fdc: 81 c7 e0 08 ret <== NOT EXECUTED
2013fe0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
if (fs_info->uino != NULL)
fs_info->index = fs_info->uino_pool_size;
2013fe4: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 <== NOT EXECUTED
2013fe8: 10 bf ff c7 b 2013f04 <fat_get_unique_ino+0x14> <== NOT EXECUTED
2013fec: d2 27 60 74 st %o1, [ %i5 + 0x74 ] <== NOT EXECUTED
02013e2c <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
2013e2c: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2013e30: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t cur_cln = start_cln;
2013e34: f2 27 bf fc st %i1, [ %fp + -4 ]
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
2013e38: d0 17 60 06 lduh [ %i5 + 6 ], %o0
2013e3c: 92 10 20 01 mov 1, %o1
2013e40: 7f ff c6 08 call 2005660 <calloc>
2013e44: b8 10 00 18 mov %i0, %i4
if ( buf == NULL )
2013e48: b6 92 20 00 orcc %o0, 0, %i3
2013e4c: 32 80 00 04 bne,a 2013e5c <fat_init_clusters_chain+0x30> <== ALWAYS TAKEN
2013e50: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2013e54: 30 80 00 21 b,a 2013ed8 <fat_init_clusters_chain+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2013e58: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2013e5c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2013e60: 84 0e 40 02 and %i1, %g2, %g2
2013e64: 80 a0 80 01 cmp %g2, %g1
2013e68: 1a 80 00 12 bcc 2013eb0 <fat_init_clusters_chain+0x84>
2013e6c: 94 10 00 1b mov %i3, %o2
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
2013e70: 92 10 00 19 mov %i1, %o1
2013e74: 7f ff ff d3 call 2013dc0 <fat_cluster_write>
2013e78: 90 10 00 1c mov %i4, %o0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2013e7c: 94 07 bf fc add %fp, -4, %o2
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
2013e80: 80 a2 3f ff cmp %o0, -1
2013e84: 02 80 00 10 be 2013ec4 <fat_init_clusters_chain+0x98> <== NEVER TAKEN
2013e88: 90 10 00 1c mov %i4, %o0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2013e8c: 40 00 1f 62 call 201bc14 <fat_get_fat_cluster>
2013e90: d2 07 bf fc ld [ %fp + -4 ], %o1
if ( rc != RC_OK )
2013e94: b0 92 20 00 orcc %o0, 0, %i0
2013e98: 22 bf ff f0 be,a 2013e58 <fat_init_clusters_chain+0x2c> <== ALWAYS TAKEN
2013e9c: f2 07 bf fc ld [ %fp + -4 ], %i1
{
free(buf);
2013ea0: 7f ff c7 4e call 2005bd8 <free> <== NOT EXECUTED
2013ea4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
return rc;
2013ea8: 81 c7 e0 08 ret <== NOT EXECUTED
2013eac: 81 e8 00 00 restore <== NOT EXECUTED
}
}
free(buf);
return rc;
2013eb0: b0 10 20 00 clr %i0
free(buf);
return rc;
}
}
free(buf);
2013eb4: 7f ff c7 49 call 2005bd8 <free>
2013eb8: 90 10 00 1b mov %i3, %o0
return rc;
}
2013ebc: 81 c7 e0 08 ret
2013ec0: 81 e8 00 00 restore
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
{
free(buf);
2013ec4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2013ec8: 7f ff c7 44 call 2005bd8 <free> <== NOT EXECUTED
2013ecc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
2013ed0: 81 c7 e0 08 ret <== NOT EXECUTED
2013ed4: 81 e8 00 00 restore <== NOT EXECUTED
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
2013ed8: 40 00 28 03 call 201dee4 <__errno> <== NOT EXECUTED
2013edc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013ee0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2013ee4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013ee8: 81 c7 e0 08 ret <== NOT EXECUTED
2013eec: 81 e8 00 00 restore <== NOT EXECUTED
0201421c <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
201421c: 9d e3 bf 18 save %sp, -232, %sp
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
2014220: d0 06 20 70 ld [ %i0 + 0x70 ], %o0
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2014224: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2014228: b8 10 00 18 mov %i0, %i4
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;
201422c: c0 27 bf fc clr [ %fp + -4 ]
rc = stat(mt_entry->dev, &stat_buf);
2014230: 7f ff cc 7a call 2007418 <stat>
2014234: 92 07 bf a8 add %fp, -88, %o1
if (rc == -1)
2014238: 80 a2 3f ff cmp %o0, -1
201423c: 02 80 01 0d be 2014670 <fat_init_volume_info+0x454> <== NEVER TAKEN
2014240: b0 10 00 08 mov %o0, %i0
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
2014244: c4 07 bf b4 ld [ %fp + -76 ], %g2
2014248: 03 00 00 3c sethi %hi(0xf000), %g1
201424c: 84 08 80 01 and %g2, %g1, %g2
2014250: 03 00 00 18 sethi %hi(0x6000), %g1
2014254: 80 a0 80 01 cmp %g2, %g1
2014258: 12 80 01 9a bne 20148c0 <fat_init_volume_info+0x6a4> <== NEVER TAKEN
201425c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
2014260: 7f ff c2 3b call 2004b4c <rtems_disk_obtain>
2014264: d0 1f bf c0 ldd [ %fp + -64 ], %o0
if (vol->dd == NULL)
2014268: 80 a2 20 00 cmp %o0, 0
201426c: 02 80 01 c7 be 2014988 <fat_init_volume_info+0x76c> <== NEVER TAKEN
2014270: d0 27 60 60 st %o0, [ %i5 + 0x60 ]
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
2014274: d0 1f bf c0 ldd [ %fp + -64 ], %o0
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
2014278: 94 10 20 00 clr %o2
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
201427c: d0 3f 60 58 std %o0, [ %i5 + 0x58 ]
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
2014280: 7f ff f6 aa call 2011d28 <rtems_bdbuf_read>
2014284: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL)
2014288: 80 a2 20 00 cmp %o0, 0
201428c: 12 80 01 ab bne 2014938 <fat_init_volume_info+0x71c> <== NEVER TAKEN
2014290: d0 07 bf fc ld [ %fp + -4 ], %o0
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
2014294: c2 02 20 24 ld [ %o0 + 0x24 ], %g1
2014298: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
201429c: c6 08 60 0c ldub [ %g1 + 0xc ], %g3
20142a0: c4 2f bf a3 stb %g2, [ %fp + -93 ]
20142a4: c4 08 60 11 ldub [ %g1 + 0x11 ], %g2
20142a8: c6 2f bf a4 stb %g3, [ %fp + -92 ]
20142ac: c6 08 60 12 ldub [ %g1 + 0x12 ], %g3
20142b0: c4 2f bf a1 stb %g2, [ %fp + -95 ]
20142b4: c4 08 60 23 ldub [ %g1 + 0x23 ], %g2
20142b8: c6 2f bf a0 stb %g3, [ %fp + -96 ]
20142bc: c6 08 60 26 ldub [ %g1 + 0x26 ], %g3
20142c0: c4 2f bf 97 stb %g2, [ %fp + -105 ]
20142c4: c4 08 60 28 ldub [ %g1 + 0x28 ], %g2
20142c8: f2 08 60 0e ldub [ %g1 + 0xe ], %i1
20142cc: c6 2f bf 9f stb %g3, [ %fp + -97 ]
20142d0: c6 08 60 2c ldub [ %g1 + 0x2c ], %g3
20142d4: c4 2f bf 8f stb %g2, [ %fp + -113 ]
20142d8: c4 08 60 2d ldub [ %g1 + 0x2d ], %g2
20142dc: f2 2f bf a2 stb %i1, [ %fp + -94 ]
20142e0: c6 2f bf 9c stb %g3, [ %fp + -100 ]
20142e4: c8 08 60 0f ldub [ %g1 + 0xf ], %g4
20142e8: f6 08 60 0d ldub [ %g1 + 0xd ], %i3
20142ec: f4 08 60 10 ldub [ %g1 + 0x10 ], %i2
20142f0: f2 08 60 13 ldub [ %g1 + 0x13 ], %i1
20142f4: f0 08 60 14 ldub [ %g1 + 0x14 ], %i0
20142f8: e0 08 60 16 ldub [ %g1 + 0x16 ], %l0
20142fc: e2 08 60 17 ldub [ %g1 + 0x17 ], %l1
2014300: ea 08 60 20 ldub [ %g1 + 0x20 ], %l5
2014304: ec 08 60 21 ldub [ %g1 + 0x21 ], %l6
2014308: ee 08 60 22 ldub [ %g1 + 0x22 ], %l7
201430c: e6 08 60 24 ldub [ %g1 + 0x24 ], %l3
2014310: e8 08 60 25 ldub [ %g1 + 0x25 ], %l4
2014314: e4 08 60 27 ldub [ %g1 + 0x27 ], %l2
2014318: c4 2f bf 9b stb %g2, [ %fp + -101 ]
201431c: c6 08 60 2e ldub [ %g1 + 0x2e ], %g3
2014320: c4 08 60 2f ldub [ %g1 + 0x2f ], %g2
2014324: c6 2f bf 9a stb %g3, [ %fp + -102 ]
2014328: c6 08 60 30 ldub [ %g1 + 0x30 ], %g3
201432c: c2 08 60 31 ldub [ %g1 + 0x31 ], %g1
2014330: c4 2f bf 87 stb %g2, [ %fp + -121 ]
sc = rtems_bdbuf_release( block);
2014334: c8 27 bf 78 st %g4, [ %fp + -136 ]
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
2014338: c6 2f bf 9e stb %g3, [ %fp + -98 ]
sc = rtems_bdbuf_release( block);
201433c: 7f ff f7 33 call 2012008 <rtems_bdbuf_release>
2014340: c2 2f bf 9d stb %g1, [ %fp + -99 ]
if (sc != RTEMS_SUCCESSFUL)
2014344: 80 a2 20 00 cmp %o0, 0
2014348: 12 80 01 7c bne 2014938 <fat_init_volume_info+0x71c> <== NEVER TAKEN
201434c: c8 07 bf 78 ld [ %fp + -136 ], %g4
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
2014350: c2 0f bf a4 ldub [ %fp + -92 ], %g1
2014354: c4 0f bf a3 ldub [ %fp + -93 ], %g2
2014358: 83 28 60 08 sll %g1, 8, %g1
201435c: 92 10 40 02 or %g1, %g2, %o1
2014360: d2 37 40 00 sth %o1, [ %i5 ]
if ( (vol->bps != 512) &&
2014364: 93 2a 60 10 sll %o1, 0x10, %o1
2014368: 83 32 60 10 srl %o1, 0x10, %g1
201436c: 80 a0 64 00 cmp %g1, 0x400
2014370: 12 80 00 c2 bne 2014678 <fat_init_volume_info+0x45c> <== ALWAYS TAKEN
2014374: 80 a0 62 00 cmp %g1, 0x200
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2014378: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
201437c: 80 88 60 01 btst 1, %g1
2014380: 12 80 00 0a bne 20143a8 <fat_init_volume_info+0x18c> <== ALWAYS TAKEN
2014384: c0 2f 60 03 clrb [ %i5 + 3 ]
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2014388: 10 80 00 03 b 2014394 <fat_init_volume_info+0x178> <== NOT EXECUTED
201438c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2014390: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
2014394: 83 38 60 01 sra %g1, 1, %g1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2014398: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
201439c: 02 bf ff fd be 2014390 <fat_init_volume_info+0x174> <== NOT EXECUTED
20143a0: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED
20143a4: c4 2f 60 03 stb %g2, [ %i5 + 3 ] <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
20143a8: c0 2f 60 02 clrb [ %i5 + 2 ]
20143ac: 93 32 60 10 srl %o1, 0x10, %o1
20143b0: 84 10 20 01 mov 1, %g2
20143b4: 80 8a 60 01 btst 1, %o1
20143b8: 02 80 00 05 be 20143cc <fat_init_volume_info+0x1b0> <== ALWAYS TAKEN
20143bc: 82 10 00 09 mov %o1, %g1
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
20143c0: 10 80 00 09 b 20143e4 <fat_init_volume_info+0x1c8> <== NOT EXECUTED
20143c4: f6 2f 60 04 stb %i3, [ %i5 + 4 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
20143c8: 84 10 00 03 mov %g3, %g2
i >>= 1, vol->sec_log2++);
20143cc: 83 38 60 01 sra %g1, 1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
20143d0: 80 88 60 01 btst 1, %g1
20143d4: 02 bf ff fd be 20143c8 <fat_init_volume_info+0x1ac>
20143d8: 86 00 a0 01 add %g2, 1, %g3
20143dc: c4 2f 60 02 stb %g2, [ %i5 + 2 ]
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
20143e0: f6 2f 60 04 stb %i3, [ %i5 + 4 ]
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
20143e4: b6 8e e0 ff andcc %i3, 0xff, %i3
20143e8: 02 80 01 3c be 20148d8 <fat_init_volume_info+0x6bc> <== NEVER TAKEN
20143ec: 82 10 00 1b mov %i3, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
20143f0: c0 2f 60 05 clrb [ %i5 + 5 ]
20143f4: 80 8e e0 01 btst 1, %i3
20143f8: 12 80 00 0b bne 2014424 <fat_init_volume_info+0x208> <== NEVER TAKEN
20143fc: 84 10 20 00 clr %g2
2014400: 10 80 00 03 b 201440c <fat_init_volume_info+0x1f0>
2014404: 84 10 20 01 mov 1, %g2
2014408: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
201440c: 83 38 60 01 sra %g1, 1, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
2014410: 80 88 60 01 btst 1, %g1
2014414: 02 bf ff fd be 2014408 <fat_init_volume_info+0x1ec> <== NEVER TAKEN
2014418: 86 00 a0 01 add %g2, 1, %g3
201441c: c4 2f 60 05 stb %g2, [ %i5 + 5 ]
2014420: 84 08 a0 ff and %g2, 0xff, %g2
i >>= 1, vol->spc_log2++);
/*
* "bytes per cluster" value greater than 32K is invalid
*/
if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT)
2014424: 85 2a 40 02 sll %o1, %g2, %g2
2014428: c4 37 60 06 sth %g2, [ %i5 + 6 ]
201442c: 83 28 a0 10 sll %g2, 0x10, %g1
2014430: 05 00 00 20 sethi %hi(0x8000), %g2
2014434: 83 30 60 10 srl %g1, 0x10, %g1
2014438: 80 a0 40 02 cmp %g1, %g2
201443c: 18 80 01 27 bgu 20148d8 <fat_init_volume_info+0x6bc> <== NEVER TAKEN
2014440: 80 88 60 01 btst 1, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
2014444: c0 2f 60 08 clrb [ %i5 + 8 ]
2014448: 02 80 00 05 be 201445c <fat_init_volume_info+0x240> <== ALWAYS TAKEN
201444c: 84 10 20 01 mov 1, %g2
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
2014450: 10 80 00 09 b 2014474 <fat_init_volume_info+0x258> <== NOT EXECUTED
2014454: c6 0f bf a2 ldub [ %fp + -94 ], %g3 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
2014458: 84 10 00 03 mov %g3, %g2
i >>= 1, vol->bpc_log2++);
201445c: 83 38 60 01 sra %g1, 1, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
2014460: 80 88 60 01 btst 1, %g1
2014464: 02 bf ff fd be 2014458 <fat_init_volume_info+0x23c>
2014468: 86 00 a0 01 add %g2, 1, %g3
201446c: c4 2f 60 08 stb %g2, [ %i5 + 8 ]
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
2014470: c6 0f bf a2 ldub [ %fp + -94 ], %g3
2014474: 88 09 20 ff and %g4, 0xff, %g4
2014478: 89 29 20 08 sll %g4, 8, %g4
201447c: 86 11 00 03 or %g4, %g3, %g3
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2014480: c4 0f bf a0 ldub [ %fp + -96 ], %g2
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
2014484: c6 27 bf a4 st %g3, [ %fp + -92 ]
2014488: c6 37 60 14 sth %g3, [ %i5 + 0x14 ]
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
201448c: c6 0f bf a1 ldub [ %fp + -95 ], %g3
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2014490: 82 02 7f ff add %o1, -1, %g1
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2014494: 85 28 a0 08 sll %g2, 8, %g2
2014498: 84 10 80 03 or %g2, %g3, %g2
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
201449c: 87 28 a0 10 sll %g2, 0x10, %g3
20144a0: 87 30 e0 0b srl %g3, 0xb, %g3
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
20144a4: c4 37 60 20 sth %g2, [ %i5 + 0x20 ]
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
20144a8: 90 00 c0 01 add %g3, %g1, %o0
20144ac: 40 00 59 76 call 202aa84 <.div>
20144b0: f4 2f 60 09 stb %i2, [ %i5 + 9 ]
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
20144b4: c4 0f 60 02 ldub [ %i5 + 2 ], %g2
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
20144b8: d0 27 60 24 st %o0, [ %i5 + 0x24 ]
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
20144bc: 85 2a 00 02 sll %o0, %g2, %g2
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
20144c0: 82 10 00 08 mov %o0, %g1
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
20144c4: a2 0c 60 ff and %l1, 0xff, %l1
20144c8: a0 0c 20 ff and %l0, 0xff, %l0
20144cc: 91 2c 60 08 sll %l1, 8, %o0
20144d0: 90 12 00 10 or %o0, %l0, %o0
20144d4: 91 2a 20 10 sll %o0, 0x10, %o0
20144d8: 80 a2 20 00 cmp %o0, 0
20144dc: 02 80 00 e6 be 2014874 <fat_init_volume_info+0x658> <== NEVER TAKEN
20144e0: c4 27 60 28 st %g2, [ %i5 + 0x28 ]
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
20144e4: 91 32 20 10 srl %o0, 0x10, %o0
20144e8: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
20144ec: c2 27 bf 7c st %g1, [ %fp + -132 ]
20144f0: 40 00 59 29 call 202a994 <.umul>
20144f4: 92 0e a0 ff and %i2, 0xff, %o1
20144f8: c2 07 bf 7c ld [ %fp + -132 ], %g1
20144fc: c6 07 bf a4 ld [ %fp + -92 ], %g3
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
2014500: b2 0e 60 ff and %i1, 0xff, %i1
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
2014504: 85 28 e0 10 sll %g3, 0x10, %g2
2014508: 85 30 a0 10 srl %g2, 0x10, %g2
201450c: 84 02 00 02 add %o0, %g2, %g2
2014510: 82 00 80 01 add %g2, %g1, %g1
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
2014514: c4 27 60 1c st %g2, [ %i5 + 0x1c ]
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
2014518: 90 0e 20 ff and %i0, 0xff, %o0
201451c: 91 2a 20 08 sll %o0, 8, %o0
2014520: 90 12 00 19 or %o0, %i1, %o0
2014524: 91 2a 20 10 sll %o0, 0x10, %o0
2014528: 80 a2 20 00 cmp %o0, 0
201452c: 02 80 00 c6 be 2014844 <fat_init_volume_info+0x628> <== NEVER TAKEN
2014530: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
2014534: 91 32 20 10 srl %o0, 0x10, %o0
2014538: d0 27 60 2c st %o0, [ %i5 + 0x2c ]
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
201453c: 90 22 00 01 sub %o0, %g1, %o0
2014540: 40 00 59 4f call 202aa7c <.udiv>
2014544: 92 10 00 1b mov %i3, %o1
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
2014548: 80 a2 2f f4 cmp %o0, 0xff4
201454c: 18 80 00 56 bgu 20146a4 <fat_init_volume_info+0x488> <== NEVER TAKEN
2014550: d0 27 60 34 st %o0, [ %i5 + 0x34 ]
{
vol->type = FAT_FAT12;
2014554: 82 10 20 01 mov 1, %g1
2014558: c2 2f 60 0a stb %g1, [ %i5 + 0xa ]
vol->mask = FAT_FAT12_MASK;
201455c: 82 10 2f ff mov 0xfff, %g1
2014560: c2 27 60 0c st %g1, [ %i5 + 0xc ]
vol->eoc_val = FAT_FAT12_EOC;
2014564: 82 10 2f f8 mov 0xff8, %g1
2014568: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
201456c: 82 10 3f ff mov -1, %g1
}
}
}
else
{
vol->rdir_cl = 0;
2014570: c0 27 60 38 clr [ %i5 + 0x38 ]
vol->mirror = 0;
2014574: c0 2f 60 48 clrb [ %i5 + 0x48 ]
vol->afat = 0;
2014578: c0 2f 60 50 clrb [ %i5 + 0x50 ]
vol->free_cls = 0xFFFFFFFF;
201457c: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
vol->next_cl = 0xFFFFFFFF;
2014580: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2014584: 7f ff fd 43 call 2013a90 <fat_buf_release>
2014588: d0 07 20 34 ld [ %i4 + 0x34 ], %o0
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
201458c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
2014590: 40 00 59 01 call 202a994 <.umul>
2014594: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0
2014598: c2 17 60 14 lduh [ %i5 + 0x14 ], %g1
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
201459c: 92 10 20 0c mov 0xc, %o1
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
20145a0: 82 02 00 01 add %o0, %g1, %g1
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
20145a4: 90 10 20 02 mov 2, %o0
20145a8: 7f ff c4 2e call 2005660 <calloc>
20145ac: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
if ( fs_info->vhash == NULL )
20145b0: 80 a2 20 00 cmp %o0, 0
20145b4: 02 80 01 1a be 2014a1c <fat_init_volume_info+0x800> <== NEVER TAKEN
20145b8: d0 27 60 68 st %o0, [ %i5 + 0x68 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
20145bc: 86 02 20 04 add %o0, 4, %g3
20145c0: 82 02 20 0c add %o0, 0xc, %g1
20145c4: 84 02 20 10 add %o0, 0x10, %g2
head->next = tail;
20145c8: c6 22 00 00 st %g3, [ %o0 ]
head->previous = NULL;
20145cc: c0 22 20 04 clr [ %o0 + 4 ]
tail->previous = head;
20145d0: d0 22 20 08 st %o0, [ %o0 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
20145d4: c4 22 20 0c st %g2, [ %o0 + 0xc ]
head->previous = NULL;
20145d8: c0 22 20 10 clr [ %o0 + 0x10 ]
tail->previous = head;
20145dc: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
20145e0: 92 10 20 0c mov 0xc, %o1
20145e4: 7f ff c4 1f call 2005660 <calloc>
20145e8: 90 10 20 02 mov 2, %o0
if ( fs_info->rhash == NULL )
20145ec: 80 a2 20 00 cmp %o0, 0
20145f0: 02 80 01 00 be 20149f0 <fat_init_volume_info+0x7d4> <== NEVER TAKEN
20145f4: d0 27 60 6c st %o0, [ %i5 + 0x6c ]
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 );
20145f8: 82 02 20 0c add %o0, 0xc, %g1
20145fc: 84 02 20 04 add %o0, 4, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2014600: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2014604: 82 02 20 10 add %o0, 0x10, %g1
head->next = tail;
2014608: c4 22 00 00 st %g2, [ %o0 ]
head->previous = NULL;
201460c: c0 22 20 04 clr [ %o0 + 4 ]
tail->previous = head;
2014610: d0 22 20 08 st %o0, [ %o0 + 8 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
2014614: c0 22 20 10 clr [ %o0 + 0x10 ]
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2014618: c4 07 60 2c ld [ %i5 + 0x2c ], %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
201461c: c2 22 20 0c st %g1, [ %o0 + 0xc ]
2014620: c2 0f 60 03 ldub [ %i5 + 3 ], %g1
fs_info->index = 0;
2014624: c0 27 60 74 clr [ %i5 + 0x74 ]
}
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;
2014628: 83 28 80 01 sll %g2, %g1, %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
201462c: 84 10 21 00 mov 0x100, %g2
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2014630: 83 28 60 04 sll %g1, 4, %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
2014634: c4 27 60 78 st %g2, [ %i5 + 0x78 ]
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2014638: c2 27 60 7c st %g1, [ %i5 + 0x7c ]
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
201463c: 90 10 21 00 mov 0x100, %o0
2014640: 7f ff c4 08 call 2005660 <calloc>
2014644: 92 10 20 01 mov 1, %o1
if ( fs_info->uino == NULL )
2014648: 80 a2 20 00 cmp %o0, 0
201464c: 02 80 00 d5 be 20149a0 <fat_init_volume_info+0x784> <== NEVER TAKEN
2014650: d0 27 60 70 st %o0, [ %i5 + 0x70 ]
rtems_disk_release(vol->dd);
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));
2014654: d0 17 40 00 lduh [ %i5 ], %o0
2014658: 7f ff c4 02 call 2005660 <calloc>
201465c: 92 10 20 01 mov 1, %o1
2014660: d0 27 60 8c st %o0, [ %i5 + 0x8c ]
if (fs_info->sec_buf == NULL)
2014664: 80 a2 20 00 cmp %o0, 0
2014668: 02 80 00 a5 be 20148fc <fat_init_volume_info+0x6e0> <== NEVER TAKEN
201466c: b0 10 20 00 clr %i0
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
2014670: 81 c7 e0 08 ret
2014674: 81 e8 00 00 restore
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
if ( (vol->bps != 512) &&
2014678: 22 bf ff 41 be,a 201437c <fat_init_volume_info+0x160> <== ALWAYS TAKEN
201467c: 83 32 60 19 srl %o1, 0x19, %g1
(vol->bps != 1024) &&
2014680: 80 a0 68 00 cmp %g1, 0x800 <== NOT EXECUTED
2014684: 22 bf ff 41 be,a 2014388 <fat_init_volume_info+0x16c> <== NOT EXECUTED
2014688: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
(vol->bps != 2048) &&
201468c: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED
2014690: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2014694: 12 80 00 91 bne 20148d8 <fat_init_volume_info+0x6bc> <== NOT EXECUTED
2014698: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
201469c: 10 bf ff 3e b 2014394 <fat_init_volume_info+0x178> <== NOT EXECUTED
20146a0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
20146a4: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED
20146a8: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <PROM_START+0xfff4> <== NOT EXECUTED
20146ac: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED
20146b0: 08 80 00 7c bleu 20148a0 <fat_init_volume_info+0x684> <== NOT EXECUTED
20146b4: 84 10 63 ff or %g1, 0x3ff, %g2 <== NOT EXECUTED
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
20146b8: c6 0f bf 8f ldub [ %fp + -113 ], %g3 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
20146bc: f6 0f bf 9b ldub [ %fp + -101 ], %i3 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
20146c0: 82 08 ff 80 and %g3, -128, %g1 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
20146c4: f4 0f bf 9c ldub [ %fp + -100 ], %i2 <== NOT EXECUTED
20146c8: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED
20146cc: f2 0f bf 87 ldub [ %fp + -121 ], %i1 <== NOT EXECUTED
20146d0: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
20146d4: 05 03 ff ff sethi %hi(0xffffc00), %g2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
20146d8: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
20146dc: 88 10 a3 ff or %g2, 0x3ff, %g4 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
20146e0: 86 16 c0 03 or %i3, %g3, %g3 <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
vol->eoc_val = FAT_FAT32_EOC;
20146e4: 84 10 a3 f8 or %g2, 0x3f8, %g2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
20146e8: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED
20146ec: b7 2e 60 18 sll %i1, 0x18, %i3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
20146f0: b4 10 20 04 mov 4, %i2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
20146f4: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
20146f8: f4 2f 60 0a stb %i2, [ %i5 + 0xa ] <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
20146fc: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
2014700: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2014704: c6 27 60 38 st %g3, [ %i5 + 0x38 ] <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
2014708: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED
201470c: 02 80 00 6b be 20148b8 <fat_init_volume_info+0x69c> <== NOT EXECUTED
2014710: c2 2f 60 48 stb %g1, [ %i5 + 0x48 ] <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
2014714: c4 0f bf 8f ldub [ %fp + -113 ], %g2 <== NOT EXECUTED
2014718: 82 08 a0 0f and %g2, 0xf, %g1 <== NOT EXECUTED
201471c: c2 2f 60 50 stb %g1, [ %i5 + 0x50 ] <== NOT EXECUTED
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
2014720: d2 0f bf 9d ldub [ %fp + -99 ], %o1 <== NOT EXECUTED
2014724: c2 0f bf 9e ldub [ %fp + -98 ], %g1 <== NOT EXECUTED
2014728: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED
201472c: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
2014730: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED
if( vol->info_sec == 0 )
2014734: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED
2014738: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED
201473c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2014740: 02 80 00 66 be 20148d8 <fat_init_volume_info+0x6bc> <== NOT EXECUTED
2014744: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
2014748: 94 10 20 00 clr %o2 <== NOT EXECUTED
201474c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
2014750: 7f ff fd 2c call 2013c00 <_fat_block_read> <== NOT EXECUTED
2014754: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
2014758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201475c: 06 80 00 b9 bl 2014a40 <fat_init_volume_info+0x824> <== NOT EXECUTED
2014760: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
2014764: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED
2014768: c8 0f bf f2 ldub [ %fp + -14 ], %g4 <== NOT EXECUTED
201476c: c6 0f bf f0 ldub [ %fp + -16 ], %g3 <== NOT EXECUTED
2014770: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED
2014774: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2014778: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
201477c: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED
2014780: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
2014784: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
2014788: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED
201478c: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <RAM_END+0x3f215252><== NOT EXECUTED
2014790: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2014794: 12 80 00 72 bne 201495c <fat_init_volume_info+0x740> <== NOT EXECUTED
2014798: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
201479c: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
20147a0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20147a4: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED
20147a8: 7f ff fd 16 call 2013c00 <_fat_block_read> <== NOT EXECUTED
20147ac: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
20147b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20147b4: 06 80 00 88 bl 20149d4 <fat_init_volume_info+0x7b8> <== NOT EXECUTED
20147b8: c6 0f bf f5 ldub [ %fp + -11 ], %g3 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20147bc: f0 0f bf f6 ldub [ %fp + -10 ], %i0 <== NOT EXECUTED
20147c0: f2 0f bf f4 ldub [ %fp + -12 ], %i1 <== NOT EXECUTED
20147c4: f4 0f bf f7 ldub [ %fp + -9 ], %i2 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20147c8: f6 0f bf f9 ldub [ %fp + -7 ], %i3 <== NOT EXECUTED
20147cc: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED
20147d0: c8 0f bf f8 ldub [ %fp + -8 ], %g4 <== NOT EXECUTED
20147d4: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20147d8: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20147dc: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20147e0: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
20147e4: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED
20147e8: 86 10 c0 18 or %g3, %i0, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20147ec: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20147f0: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20147f4: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20147f8: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20147fc: 82 16 c0 01 or %i3, %g1, %g1 <== NOT EXECUTED
2014800: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
2014804: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2014808: c6 27 60 40 st %g3, [ %i5 + 0x40 ] <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
201480c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2014810: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
2014814: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2014818: 7f ff fe 09 call 201403c <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
201481c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
2014820: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2014824: 02 bf ff 58 be 2014584 <fat_init_volume_info+0x368> <== NOT EXECUTED
2014828: 01 00 00 00 nop <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
201482c: 7f ff fc 99 call 2013a90 <fat_buf_release> <== NOT EXECUTED
2014830: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
0xFFFFFFFF);
if ( rc != RC_OK )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
2014834: 7f ff c0 e5 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
2014838: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
return rc;
201483c: 81 c7 e0 08 ret <== NOT EXECUTED
2014840: 81 e8 00 00 restore <== NOT EXECUTED
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
2014844: f2 0f bf 97 ldub [ %fp + -105 ], %i1 <== NOT EXECUTED
2014848: 90 0d a0 ff and %l6, 0xff, %o0 <== NOT EXECUTED
201484c: ae 0d e0 ff and %l7, 0xff, %l7 <== NOT EXECUTED
2014850: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED
2014854: af 2d e0 10 sll %l7, 0x10, %l7 <== NOT EXECUTED
2014858: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED
201485c: 90 12 00 17 or %o0, %l7, %o0 <== NOT EXECUTED
2014860: 85 2e 60 18 sll %i1, 0x18, %g2 <== NOT EXECUTED
2014864: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED
2014868: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
201486c: 10 bf ff 34 b 201453c <fat_init_volume_info+0x320> <== NOT EXECUTED
2014870: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
2014874: c4 0f bf 9f ldub [ %fp + -97 ], %g2 <== NOT EXECUTED
2014878: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED
201487c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
2014880: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED
2014884: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED
2014888: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
201488c: a5 2c a0 18 sll %l2, 0x18, %l2 <== NOT EXECUTED
2014890: 90 12 00 13 or %o0, %l3, %o0 <== NOT EXECUTED
2014894: 90 12 00 12 or %o0, %l2, %o0 <== NOT EXECUTED
2014898: 10 bf ff 15 b 20144ec <fat_init_volume_info+0x2d0> <== NOT EXECUTED
201489c: d0 27 60 18 st %o0, [ %i5 + 0x18 ] <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
20148a0: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
20148a4: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
20148a8: c6 2f 60 0a stb %g3, [ %i5 + 0xa ] <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
20148ac: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
20148b0: 10 bf ff 2f b 201456c <fat_init_volume_info+0x350> <== NOT EXECUTED
20148b4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
20148b8: 10 bf ff 9a b 2014720 <fat_init_volume_info+0x504> <== NOT EXECUTED
20148bc: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED
if (rc == -1)
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
20148c0: 40 00 25 89 call 201dee4 <__errno> <== NOT EXECUTED
20148c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20148c8: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED
20148cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20148d0: 81 c7 e0 08 ret <== NOT EXECUTED
20148d4: 81 e8 00 00 restore <== NOT EXECUTED
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
if( vol->info_sec == 0 )
{
rtems_disk_release(vol->dd);
20148d8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20148dc: 7f ff c0 bb call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
20148e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
20148e4: 40 00 25 80 call 201dee4 <__errno> <== NOT EXECUTED
20148e8: 01 00 00 00 nop <== NOT EXECUTED
20148ec: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
20148f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20148f4: 81 c7 e0 08 ret <== NOT EXECUTED
20148f8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
20148fc: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2014900: 7f ff c0 b2 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
2014904: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
2014908: 7f ff c4 b4 call 2005bd8 <free> <== NOT EXECUTED
201490c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
2014910: 7f ff c4 b2 call 2005bd8 <free> <== NOT EXECUTED
2014914: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
free(fs_info->uino);
2014918: 7f ff c4 b0 call 2005bd8 <free> <== NOT EXECUTED
201491c: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2014920: 40 00 25 71 call 201dee4 <__errno> <== NOT EXECUTED
2014924: 01 00 00 00 nop <== NOT EXECUTED
2014928: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
201492c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return RC_OK;
}
2014930: 81 c7 e0 08 ret <== NOT EXECUTED
2014934: 81 e8 00 00 restore <== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
2014938: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
201493c: 7f ff c0 a3 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
2014940: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
2014944: 40 00 25 68 call 201dee4 <__errno> <== NOT EXECUTED
2014948: 01 00 00 00 nop <== NOT EXECUTED
201494c: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2014950: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014954: 81 c7 e0 08 ret <== NOT EXECUTED
2014958: 81 e8 00 00 restore <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
201495c: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED
2014960: 7f ff fc 4c call 2013a90 <fat_buf_release> <== NOT EXECUTED
2014964: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
2014968: 7f ff c0 98 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
201496c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
2014970: 40 00 25 5d call 201dee4 <__errno> <== NOT EXECUTED
2014974: 01 00 00 00 nop <== NOT EXECUTED
2014978: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
201497c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014980: 81 c7 e0 08 ret <== NOT EXECUTED
2014984: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
2014988: 40 00 25 57 call 201dee4 <__errno> <== NOT EXECUTED
201498c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2014990: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2014994: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014998: 81 c7 e0 08 ret <== NOT EXECUTED
201499c: 81 e8 00 00 restore <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
20149a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20149a4: 7f ff c0 89 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
20149a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
20149ac: 7f ff c4 8b call 2005bd8 <free> <== NOT EXECUTED
20149b0: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
20149b4: 7f ff c4 89 call 2005bd8 <free> <== NOT EXECUTED
20149b8: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
20149bc: 40 00 25 4a call 201dee4 <__errno> <== NOT EXECUTED
20149c0: 01 00 00 00 nop <== NOT EXECUTED
20149c4: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
20149c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20149cc: 81 c7 e0 08 ret <== NOT EXECUTED
20149d0: 81 e8 00 00 restore <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
20149d4: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED
20149d8: 7f ff fc 2e call 2013a90 <fat_buf_release> <== NOT EXECUTED
20149dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
20149e0: 7f ff c0 7a call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
20149e4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
return -1;
20149e8: 81 c7 e0 08 ret <== NOT EXECUTED
20149ec: 81 e8 00 00 restore <== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
20149f0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20149f4: 7f ff c0 75 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
20149f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
20149fc: 7f ff c4 77 call 2005bd8 <free> <== NOT EXECUTED
2014a00: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2014a04: 40 00 25 38 call 201dee4 <__errno> <== NOT EXECUTED
2014a08: 01 00 00 00 nop <== NOT EXECUTED
2014a0c: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2014a10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014a14: 81 c7 e0 08 ret <== NOT EXECUTED
2014a18: 81 e8 00 00 restore <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
2014a1c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2014a20: 7f ff c0 6a call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
2014a24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2014a28: 40 00 25 2f call 201dee4 <__errno> <== NOT EXECUTED
2014a2c: 01 00 00 00 nop <== NOT EXECUTED
2014a30: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2014a34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014a38: 81 c7 e0 08 ret <== NOT EXECUTED
2014a3c: 81 e8 00 00 restore <== NOT EXECUTED
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
{
rtems_disk_release(vol->dd);
2014a40: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2014a44: 7f ff c0 61 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
2014a48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
2014a4c: 81 c7 e0 08 ret <== NOT EXECUTED
2014a50: 81 e8 00 00 restore <== NOT EXECUTED
0201c220 <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
201c220: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
201c224: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
uint32_t cl4find = 2;
uint32_t next_cln = 0;
201c228: c0 27 bf fc clr [ %fp + -4 ]
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
201c22c: e6 04 20 34 ld [ %l0 + 0x34 ], %l3
uint32_t i = 2;
*cls_added = 0;
201c230: c0 26 c0 00 clr [ %i3 ]
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
201c234: ba 10 00 18 mov %i0, %i5
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
201c238: 80 a6 a0 00 cmp %i2, 0
201c23c: 02 80 00 46 be 201c354 <fat_scan_fat_for_free_clusters+0x134><== NEVER TAKEN
201c240: b0 10 20 00 clr %i0
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
201c244: e2 04 20 44 ld [ %l0 + 0x44 ], %l1
201c248: 80 a4 7f ff cmp %l1, -1
201c24c: 22 80 00 02 be,a 201c254 <fat_scan_fat_for_free_clusters+0x34>
201c250: a2 10 20 02 mov 2, %l1
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
201c254: a6 04 e0 02 add %l3, 2, %l3
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
201c258: 80 a4 e0 02 cmp %l3, 2
201c25c: 08 80 00 40 bleu 201c35c <fat_scan_fat_for_free_clusters+0x13c><== NEVER TAKEN
201c260: a4 10 20 02 mov 2, %l2
201c264: 10 80 00 17 b 201c2c0 <fat_scan_fat_for_free_clusters+0xa0>
201c268: a8 10 20 00 clr %l4
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
201c26c: 90 10 00 1d mov %i5, %o0
201c270: 92 10 00 11 mov %l1, %o1
201c274: 7f ff fe f0 call 201be34 <fat_set_fat_cluster>
201c278: 94 10 3f ff mov -1, %o2
if ( rc != RC_OK )
201c27c: 80 a2 20 00 cmp %o0, 0
201c280: 32 80 00 35 bne,a 201c354 <fat_scan_fat_for_free_clusters+0x134><== NEVER TAKEN
201c284: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
201c288: c2 06 c0 00 ld [ %i3 ], %g1
201c28c: 82 00 60 01 inc %g1
/* have we satisfied request ? */
if (*cls_added == count)
201c290: 80 a6 80 01 cmp %i2, %g1
201c294: 02 80 00 49 be 201c3b8 <fat_scan_fat_for_free_clusters+0x198><== ALWAYS TAKEN
201c298: c2 26 c0 00 st %g1, [ %i3 ]
201c29c: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
}
i++;
cl4find++;
201c2a0: a2 04 60 01 inc %l1 <== NOT EXECUTED
if (cl4find >= data_cls_val)
201c2a4: 80 a4 c0 11 cmp %l3, %l1
201c2a8: 18 80 00 03 bgu 201c2b4 <fat_scan_fat_for_free_clusters+0x94><== ALWAYS TAKEN
201c2ac: a4 04 a0 01 inc %l2
cl4find = 2;
201c2b0: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
201c2b4: 80 a4 c0 12 cmp %l3, %l2
201c2b8: 28 80 00 2b bleu,a 201c364 <fat_scan_fat_for_free_clusters+0x144><== NEVER TAKEN
201c2bc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
201c2c0: 90 10 00 1d mov %i5, %o0
201c2c4: 92 10 00 11 mov %l1, %o1
201c2c8: 7f ff fe 53 call 201bc14 <fat_get_fat_cluster>
201c2cc: 94 07 bf fc add %fp, -4, %o2
if ( rc != RC_OK )
201c2d0: b0 92 20 00 orcc %o0, 0, %i0
201c2d4: 12 80 00 30 bne 201c394 <fat_scan_fat_for_free_clusters+0x174><== NEVER TAKEN
201c2d8: c2 07 bf fc ld [ %fp + -4 ], %g1
if (*cls_added != 0)
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
201c2dc: 80 a0 60 00 cmp %g1, 0
201c2e0: 32 bf ff f1 bne,a 201c2a4 <fat_scan_fat_for_free_clusters+0x84>
201c2e4: a2 04 60 01 inc %l1
/*
* We are enforced to process allocation of the first free cluster
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
201c2e8: c2 06 c0 00 ld [ %i3 ], %g1
201c2ec: 80 a0 60 00 cmp %g1, 0
201c2f0: 22 bf ff df be,a 201c26c <fat_scan_fat_for_free_clusters+0x4c><== ALWAYS TAKEN
201c2f4: e2 26 40 00 st %l1, [ %i1 ]
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
201c2f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c2fc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201c300: 7f ff fe cd call 201be34 <fat_set_fat_cluster> <== NOT EXECUTED
201c304: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201c308: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
201c30c: 12 80 00 37 bne 201c3e8 <fat_scan_fat_for_free_clusters+0x1c8><== NOT EXECUTED
201c310: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
201c314: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c318: 7f ff fe c7 call 201be34 <fat_set_fat_cluster> <== NOT EXECUTED
201c31c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201c320: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED
201c324: 22 bf ff da be,a 201c28c <fat_scan_fat_for_free_clusters+0x6c><== NOT EXECUTED
201c328: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
201c32c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
201c330: 7f ff ff 83 call 201c13c <fat_free_fat_clusters_chain> <== NOT EXECUTED
201c334: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
201c338: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c33c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201c340: 7f ff fe bd call 201be34 <fat_set_fat_cluster> <== NOT EXECUTED
201c344: 94 10 20 00 clr %o2 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
201c348: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
201c34c: 7f ff dd d1 call 2013a90 <fat_buf_release> <== NOT EXECUTED
201c350: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return rc;
201c354: 81 c7 e0 08 ret <== NOT EXECUTED
201c358: 81 e8 00 00 restore <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
201c35c: a8 10 20 00 clr %l4 <== NOT EXECUTED
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
201c360: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED
201c364: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201c368: 02 80 00 05 be 201c37c <fat_scan_fat_for_free_clusters+0x15c><== NOT EXECUTED
201c36c: e8 24 20 44 st %l4, [ %l0 + 0x44 ] <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
201c370: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
201c374: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
201c378: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
*last_cl = save_cln;
201c37c: e8 27 00 00 st %l4, [ %i4 ] <== NOT EXECUTED
fat_buf_release(fs_info);
201c380: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
201c384: 7f ff dd c3 call 2013a90 <fat_buf_release> <== NOT EXECUTED
201c388: b0 10 20 00 clr %i0 <== NOT EXECUTED
return RC_OK;
201c38c: 81 c7 e0 08 ret <== NOT EXECUTED
201c390: 81 e8 00 00 restore <== NOT EXECUTED
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
{
if (*cls_added != 0)
201c394: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
201c398: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201c39c: 02 80 00 17 be 201c3f8 <fat_scan_fat_for_free_clusters+0x1d8><== NOT EXECUTED
201c3a0: 01 00 00 00 nop <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
201c3a4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
201c3a8: 7f ff ff 65 call 201c13c <fat_free_fat_clusters_chain> <== NOT EXECUTED
201c3ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c3b0: 81 c7 e0 08 ret <== NOT EXECUTED
201c3b4: 81 e8 00 00 restore <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
201c3b8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
201c3bc: 80 a0 7f ff cmp %g1, -1
201c3c0: 02 80 00 05 be 201c3d4 <fat_scan_fat_for_free_clusters+0x1b4><== ALWAYS TAKEN
201c3c4: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
fs_info->vol.free_cls -= (*cls_added);
201c3c8: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
201c3cc: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
201c3d0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
*last_cl = save_cln;
201c3d4: e2 27 00 00 st %l1, [ %i4 ]
fat_buf_release(fs_info);
201c3d8: 7f ff dd ae call 2013a90 <fat_buf_release>
201c3dc: 90 10 00 10 mov %l0, %o0
return rc;
201c3e0: 81 c7 e0 08 ret
201c3e4: 81 e8 00 00 restore
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
201c3e8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
201c3ec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c3f0: 7f ff ff 53 call 201c13c <fat_free_fat_clusters_chain> <== NOT EXECUTED
201c3f4: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
201c3f8: 81 c7 e0 08 ret <== NOT EXECUTED
201c3fc: 81 e8 00 00 restore <== NOT EXECUTED
0201be34 <fat_set_fat_cluster>:
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
201be34: 9d e3 bf 98 save %sp, -104, %sp
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
201be38: c0 27 bf fc clr [ %fp + -4 ]
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
201be3c: 80 a6 60 01 cmp %i1, 1
201be40: 08 80 00 90 bleu 201c080 <fat_set_fat_cluster+0x24c> <== NEVER TAKEN
201be44: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
201be48: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
201be4c: 82 00 60 01 inc %g1
201be50: 80 a6 40 01 cmp %i1, %g1
201be54: 18 80 00 8b bgu 201c080 <fat_set_fat_cluster+0x24c> <== NEVER TAKEN
201be58: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201be5c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
201be60: 80 88 60 01 btst 1, %g1
201be64: 12 80 00 22 bne 201beec <fat_set_fat_cluster+0xb8> <== ALWAYS TAKEN
201be68: e0 0f 60 02 ldub [ %i5 + 2 ], %l0
201be6c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
201be70: 02 80 00 25 be 201bf04 <fat_set_fat_cluster+0xd0> <== NOT EXECUTED
201be74: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
201be78: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED
201be7c: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED
201be80: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201be84: e2 17 40 00 lduh [ %i5 ], %l1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201be88: 90 10 00 1d mov %i5, %o0
201be8c: 92 10 00 10 mov %l0, %o1
201be90: 94 10 20 01 mov 1, %o2
201be94: 7f ff de 78 call 2013874 <fat_buf_access>
201be98: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
201be9c: b0 92 20 00 orcc %o0, 0, %i0
201bea0: 12 80 00 11 bne 201bee4 <fat_set_fat_cluster+0xb0> <== NEVER TAKEN
201bea4: a3 2c 60 10 sll %l1, 0x10, %l1
return rc;
switch ( fs_info->vol.type )
201bea8: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3
201beac: 80 a6 e0 02 cmp %i3, 2
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201beb0: a3 34 60 10 srl %l1, 0x10, %l1
201beb4: a2 04 7f ff add %l1, -1, %l1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
201beb8: 02 80 00 17 be 201bf14 <fat_set_fat_cluster+0xe0> <== NEVER TAKEN
201bebc: b8 0f 00 11 and %i4, %l1, %i4
201bec0: 80 a6 e0 04 cmp %i3, 4
201bec4: 02 80 00 3d be 201bfb8 <fat_set_fat_cluster+0x184> <== NEVER TAKEN
201bec8: 80 a6 e0 01 cmp %i3, 1
201becc: 02 80 00 1d be 201bf40 <fat_set_fat_cluster+0x10c> <== ALWAYS TAKEN
201bed0: 80 8e 60 01 btst 1, %i1
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
201bed4: 40 00 08 04 call 201dee4 <__errno> <== NOT EXECUTED
201bed8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bedc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201bee0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
break;
}
return RC_OK;
}
201bee4: 81 c7 e0 08 ret <== NOT EXECUTED
201bee8: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201beec: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
201bef0: b9 36 60 01 srl %i1, 1, %i4
201bef4: b8 07 00 19 add %i4, %i1, %i4
201bef8: a1 37 00 10 srl %i4, %l0, %l0
201befc: 10 bf ff e2 b 201be84 <fat_set_fat_cluster+0x50>
201bf00: a0 04 00 01 add %l0, %g1, %l0
201bf04: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED
201bf08: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED
201bf0c: 10 bf ff de b 201be84 <fat_set_fat_cluster+0x50> <== NOT EXECUTED
201bf10: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
201bf14: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
201bf18: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
201bf1c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
201bf20: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED
201bf24: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED
201bf28: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
201bf2c: f4 30 40 1c sth %i2, [ %g1 + %i4 ] <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
201bf30: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201bf34: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED
201bf38: 81 c7 e0 08 ret <== NOT EXECUTED
201bf3c: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
201bf40: 02 80 00 35 be 201c014 <fat_set_fat_cluster+0x1e0>
201bf44: c2 07 bf fc ld [ %fp + -4 ], %g1
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
201bf48: 85 2e a0 04 sll %i2, 4, %g2
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
201bf4c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
201bf50: c6 08 40 1c ldub [ %g1 + %i4 ], %g3
201bf54: 86 08 e0 0f and %g3, 0xf, %g3
201bf58: c6 28 40 1c stb %g3, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
201bf5c: c2 07 bf fc ld [ %fp + -4 ], %g1
201bf60: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
201bf64: c6 08 40 1c ldub [ %g1 + %i4 ], %g3
201bf68: 84 10 c0 02 or %g3, %g2, %g2
201bf6c: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
201bf70: c2 17 40 00 lduh [ %i5 ], %g1
201bf74: 82 00 7f ff add %g1, -1, %g1
201bf78: 80 a0 40 1c cmp %g1, %i4
201bf7c: 02 80 00 5c be 201c0ec <fat_set_fat_cluster+0x2b8> <== NEVER TAKEN
201bf80: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ]
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
201bf84: c2 07 bf fc ld [ %fp + -4 ], %g1
201bf88: b8 07 20 01 inc %i4
201bf8c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201bf90: b5 2e a0 14 sll %i2, 0x14, %i2
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
201bf94: c0 28 40 1c clrb [ %g1 + %i4 ]
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
201bf98: c2 07 bf fc ld [ %fp + -4 ], %g1
(uint8_t )((fat16_clv & 0xFF00)>>8);
201bf9c: b5 36 a0 18 srl %i2, 0x18, %i2
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
201bfa0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
201bfa4: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201bfa8: 84 10 80 1a or %g2, %i2, %g2
201bfac: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
201bfb0: 81 c7 e0 08 ret
201bfb4: 81 e8 00 00 restore
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
201bfb8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201bfbc: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
201bfc0: 03 3c 00 00 sethi %hi(0xf0000000), %g1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
201bfc4: c6 00 80 1c ld [ %g2 + %i4 ], %g3 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
201bfc8: 82 2e 80 01 andn %i2, %g1, %g1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201bfcc: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201bfd0: b7 30 60 08 srl %g1, 8, %i3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201bfd4: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201bfd8: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201bfdc: b4 16 80 04 or %i2, %g4, %i2 <== NOT EXECUTED
201bfe0: b7 2e e0 10 sll %i3, 0x10, %i3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201bfe4: 89 30 60 10 srl %g1, 0x10, %g4 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
201bfe8: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED
201bfec: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201bff0: 82 16 80 1b or %i2, %i3, %g1 <== NOT EXECUTED
201bff4: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED
201bff8: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
fat32_clv | (*((uint32_t *)(block0->buffer + ofs)));
201bffc: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
201c000: c2 20 80 1c st %g1, [ %g2 + %i4 ] <== NOT EXECUTED
201c004: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201c008: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED
201c00c: 81 c7 e0 08 ret <== NOT EXECUTED
201c010: 81 e8 00 00 restore <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
201c014: b4 0e af ff and %i2, 0xfff, %i2
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
201c018: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
201c01c: c0 28 40 1c clrb [ %g1 + %i4 ]
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
201c020: c2 07 bf fc ld [ %fp + -4 ], %g1
201c024: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
201c028: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201c02c: 84 16 80 02 or %i2, %g2, %g2
201c030: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
201c034: c2 17 40 00 lduh [ %i5 ], %g1
201c038: 82 00 7f ff add %g1, -1, %g1
201c03c: 80 a0 40 1c cmp %g1, %i4
201c040: 02 80 00 16 be 201c098 <fat_set_fat_cluster+0x264> <== NEVER TAKEN
201c044: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ]
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
201c048: c2 07 bf fc ld [ %fp + -4 ], %g1
201c04c: b8 07 20 01 inc %i4
201c050: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201c054: b5 36 a0 08 srl %i2, 8, %i2
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
201c058: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201c05c: 84 08 bf f0 and %g2, -16, %g2
201c060: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
201c064: c2 07 bf fc ld [ %fp + -4 ], %g1
201c068: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
201c06c: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201c070: b4 10 80 1a or %g2, %i2, %i2
201c074: f4 28 40 1c stb %i2, [ %g1 + %i4 ]
201c078: 81 c7 e0 08 ret
201c07c: 81 e8 00 00 restore
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
201c080: 40 00 07 99 call 201dee4 <__errno> <== NOT EXECUTED
201c084: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c088: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c08c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c090: 81 c7 e0 08 ret <== NOT EXECUTED
201c094: 81 e8 00 00 restore <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
201c098: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c09c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED
201c0a0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201c0a4: 7f ff dd f4 call 2013874 <fat_buf_access> <== NOT EXECUTED
201c0a8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
201c0ac: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201c0b0: 12 bf ff 8d bne 201bee4 <fat_set_fat_cluster+0xb0> <== NOT EXECUTED
201c0b4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201c0b8: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
201c0bc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
201c0c0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
201c0c4: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED
201c0c8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
201c0cc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201c0d0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
201c0d4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
201c0d8: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED
201c0dc: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
201c0e0: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] <== NOT EXECUTED
201c0e4: 81 c7 e0 08 ret <== NOT EXECUTED
201c0e8: 81 e8 00 00 restore <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
201c0ec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c0f0: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED
201c0f4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201c0f8: 7f ff dd df call 2013874 <fat_buf_access> <== NOT EXECUTED
201c0fc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
201c100: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201c104: 12 bf ff 78 bne 201bee4 <fat_set_fat_cluster+0xb0> <== NOT EXECUTED
201c108: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201c10c: 87 2e a0 14 sll %i2, 0x14, %g3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
201c110: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201c114: 87 30 e0 18 srl %g3, 0x18, %g3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
201c118: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
201c11c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201c120: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
201c124: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
201c128: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
201c12c: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
201c130: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] <== NOT EXECUTED
201c134: 81 c7 e0 08 ret <== NOT EXECUTED
201c138: 81 e8 00 00 restore <== NOT EXECUTED
020140fc <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
20140fc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2014100: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
2014104: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
2014108: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
201410c: 12 80 00 3a bne 20141f4 <fat_shutdown_drive+0xf8> <== NOT EXECUTED
2014110: b8 10 20 00 clr %i4 <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
rc = -1;
}
fat_buf_release(fs_info);
2014114: 7f ff fe 5f call 2013a90 <fat_buf_release> <== NOT EXECUTED
2014118: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
201411c: 7f ff f8 74 call 20122ec <rtems_bdbuf_syncdev> <== NOT EXECUTED
2014120: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED
2014124: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014128: 32 80 00 3b bne,a 2014214 <fat_shutdown_drive+0x118> <== NOT EXECUTED
201412c: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
rc = -1;
2014130: b4 10 20 00 clr %i2 <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
2014134: f6 07 60 68 ld [ %i5 + 0x68 ], %i3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
2014138: 10 80 00 04 b 2014148 <fat_shutdown_drive+0x4c> <== NOT EXECUTED
201413c: b6 06 c0 1a add %i3, %i2, %i3 <== NOT EXECUTED
free(node);
2014140: 7f ff c6 a6 call 2005bd8 <free> <== NOT EXECUTED
2014144: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
2014148: 7f ff db a5 call 200afdc <_Chain_Get> <== NOT EXECUTED
201414c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
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 )
2014150: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014154: 12 bf ff fb bne 2014140 <fat_shutdown_drive+0x44> <== NOT EXECUTED
2014158: 01 00 00 00 nop <== NOT EXECUTED
201415c: b4 06 a0 0c add %i2, 0xc, %i2 <== NOT EXECUTED
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
2014160: 80 a6 a0 18 cmp %i2, 0x18 <== NOT EXECUTED
2014164: 32 bf ff f5 bne,a 2014138 <fat_shutdown_drive+0x3c> <== NOT EXECUTED
2014168: f6 07 60 68 ld [ %i5 + 0x68 ], %i3 <== NOT EXECUTED
201416c: b4 10 20 00 clr %i2 <== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
2014170: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
2014174: 10 80 00 04 b 2014184 <fat_shutdown_drive+0x88> <== NOT EXECUTED
2014178: b6 06 c0 1a add %i3, %i2, %i3 <== NOT EXECUTED
free(node);
201417c: 7f ff c6 97 call 2005bd8 <free> <== NOT EXECUTED
2014180: 01 00 00 00 nop <== NOT EXECUTED
2014184: 7f ff db 96 call 200afdc <_Chain_Get> <== NOT EXECUTED
2014188: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
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 )
201418c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014190: 12 bf ff fb bne 201417c <fat_shutdown_drive+0x80> <== NOT EXECUTED
2014194: 01 00 00 00 nop <== NOT EXECUTED
2014198: b4 06 a0 0c add %i2, 0xc, %i2 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
201419c: 80 a6 a0 18 cmp %i2, 0x18 <== NOT EXECUTED
20141a0: 32 bf ff f5 bne,a 2014174 <fat_shutdown_drive+0x78> <== NOT EXECUTED
20141a4: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
20141a8: 7f ff c6 8c call 2005bd8 <free> <== NOT EXECUTED
20141ac: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
20141b0: 7f ff c6 8a call 2005bd8 <free> <== NOT EXECUTED
20141b4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
free(fs_info->uino);
20141b8: 7f ff c6 88 call 2005bd8 <free> <== NOT EXECUTED
20141bc: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
free(fs_info->sec_buf);
20141c0: 7f ff c6 86 call 2005bd8 <free> <== NOT EXECUTED
20141c4: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
rtems_disk_release(fs_info->vol.dd);
20141c8: 7f ff c2 80 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
20141cc: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
if (rc)
20141d0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20141d4: 02 80 00 06 be 20141ec <fat_shutdown_drive+0xf0> <== NOT EXECUTED
20141d8: 01 00 00 00 nop <== NOT EXECUTED
errno = EIO;
20141dc: 40 00 27 42 call 201dee4 <__errno> <== NOT EXECUTED
20141e0: 01 00 00 00 nop <== NOT EXECUTED
20141e4: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
20141e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return rc;
}
20141ec: 81 c7 e0 08 ret <== NOT EXECUTED
20141f0: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
20141f4: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED
20141f8: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED
20141fc: 7f ff ff 90 call 201403c <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
2014200: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
2014204: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2014208: 32 bf ff c3 bne,a 2014114 <fat_shutdown_drive+0x18> <== NOT EXECUTED
201420c: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
2014210: 30 bf ff c1 b,a 2014114 <fat_shutdown_drive+0x18> <== NOT EXECUTED
}
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
2014214: 10 bf ff c8 b 2014134 <fat_shutdown_drive+0x38> <== NOT EXECUTED
2014218: b4 10 20 00 clr %i2 <== NOT EXECUTED
0201b1e8 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
201b1e8: 9d e3 bf 90 save %sp, -112, %sp
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
201b1ec: 03 00 80 77 sethi %hi(0x201dc00), %g1
201b1f0: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 201df38 <rtems_libio_number_iops>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
201b1f4: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
201b1f8: 82 07 a0 4c add %fp, 0x4c, %g1
201b1fc: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
201b200: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
201b204: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
201b208: 80 a6 00 02 cmp %i0, %g2
201b20c: 1a 80 00 65 bcc 201b3a0 <fcntl+0x1b8>
201b210: c2 27 bf fc st %g1, [ %fp + -4 ]
iop = rtems_libio_iop( fd );
201b214: 3b 00 80 7a sethi %hi(0x201e800), %i5
201b218: c6 07 62 10 ld [ %i5 + 0x210 ], %g3 ! 201ea10 <rtems_libio_iops>
201b21c: 93 2e 20 06 sll %i0, 6, %o1
201b220: 92 00 c0 09 add %g3, %o1, %o1
rtems_libio_check_is_open(iop);
201b224: d0 02 60 18 ld [ %o1 + 0x18 ], %o0
201b228: 80 8a 21 00 btst 0x100, %o0
201b22c: 02 80 00 5d be 201b3a0 <fcntl+0x1b8>
201b230: 80 a6 60 09 cmp %i1, 9
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
201b234: 08 80 00 08 bleu 201b254 <fcntl+0x6c>
201b238: 89 2e 60 02 sll %i1, 2, %g4
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
201b23c: 7f ff d5 16 call 2010694 <__errno>
201b240: b0 10 3f ff mov -1, %i0
201b244: 82 10 20 16 mov 0x16, %g1
201b248: c2 22 00 00 st %g1, [ %o0 ]
201b24c: 81 c7 e0 08 ret
201b250: 81 e8 00 00 restore
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
201b254: 31 00 80 6c sethi %hi(0x201b000), %i0
201b258: b0 16 21 c0 or %i0, 0x1c0, %i0 ! 201b1c0 <_calloc_r+0x14>
201b25c: c8 06 00 04 ld [ %i0 + %g4 ], %g4
201b260: 81 c1 00 00 jmp %g4
201b264: 01 00 00 00 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
201b268: 7f ff d5 0b call 2010694 <__errno>
201b26c: 01 00 00 00 nop
201b270: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
201b274: c2 22 00 00 st %g1, [ %o0 ]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
201b278: 81 c7 e0 08 ret
201b27c: 91 e8 3f ff restore %g0, -1, %o0
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
201b280: d0 00 40 00 ld [ %g1 ], %o0
201b284: 7f ff a1 80 call 2003884 <rtems_libio_fcntl_flags>
201b288: d2 27 bf f4 st %o1, [ %fp + -12 ]
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
201b28c: d2 07 bf f4 ld [ %fp + -12 ], %o1
201b290: 90 0a 22 01 and %o0, 0x201, %o0
201b294: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
201b298: b0 10 20 00 clr %i0
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
201b29c: 82 08 7d fe and %g1, -514, %g1
201b2a0: 82 12 00 01 or %o0, %g1, %g1
201b2a4: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
201b2a8: c2 02 60 24 ld [ %o1 + 0x24 ], %g1
201b2ac: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
201b2b0: 9f c0 40 00 call %g1
201b2b4: 90 10 00 19 mov %i1, %o0
if (err) {
201b2b8: b2 92 20 00 orcc %o0, 0, %i1
201b2bc: 12 80 00 04 bne 201b2cc <fcntl+0xe4> <== NEVER TAKEN
201b2c0: 01 00 00 00 nop
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
201b2c4: 81 c7 e0 08 ret
201b2c8: 81 e8 00 00 restore
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
201b2cc: 7f ff d4 f2 call 2010694 <__errno> <== NOT EXECUTED
201b2d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201b2d4: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
201b2d8: 81 c7 e0 08 ret <== NOT EXECUTED
201b2dc: 81 e8 00 00 restore <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
201b2e0: 7f ff a1 76 call 20038b8 <rtems_libio_to_fcntl_flags>
201b2e4: d2 27 bf f4 st %o1, [ %fp + -12 ]
201b2e8: d2 07 bf f4 ld [ %fp + -12 ], %o1
201b2ec: b0 10 00 08 mov %o0, %i0
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
201b2f0: 80 a6 20 00 cmp %i0, 0
201b2f4: 36 bf ff ee bge,a 201b2ac <fcntl+0xc4> <== ALWAYS TAKEN
201b2f8: c2 02 60 24 ld [ %o1 + 0x24 ], %g1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
201b2fc: 81 c7 e0 08 ret <== NOT EXECUTED
201b300: 81 e8 00 00 restore <== NOT EXECUTED
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
201b304: c2 00 40 00 ld [ %g1 ], %g1
201b308: 80 a0 60 00 cmp %g1, 0
201b30c: 22 80 00 22 be,a 201b394 <fcntl+0x1ac>
201b310: 90 0a 37 ff and %o0, -2049, %o0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
201b314: 90 12 28 00 or %o0, 0x800, %o0
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
201b318: b0 10 20 00 clr %i0
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
201b31c: 10 bf ff e3 b 201b2a8 <fcntl+0xc0>
201b320: d0 22 60 18 st %o0, [ %o1 + 0x18 ]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
201b324: 90 0a 28 00 and %o0, 0x800, %o0
201b328: 80 a0 00 08 cmp %g0, %o0
201b32c: 10 bf ff df b 201b2a8 <fcntl+0xc0>
201b330: b0 40 20 00 addx %g0, 0, %i0
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
201b334: c8 00 40 00 ld [ %g1 ], %g4
if ( fd2 )
201b338: 80 a1 20 00 cmp %g4, 0
201b33c: 02 80 00 1f be 201b3b8 <fcntl+0x1d0>
201b340: b0 10 20 00 clr %i0
diop = rtems_libio_iop( fd2 );
201b344: 80 a0 80 04 cmp %g2, %g4
201b348: 08 80 00 05 bleu 201b35c <fcntl+0x174> <== NEVER TAKEN
201b34c: 82 10 20 00 clr %g1
201b350: 83 29 20 06 sll %g4, 6, %g1
201b354: 82 00 c0 01 add %g3, %g1, %g1
201b358: b0 10 00 01 mov %g1, %i0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
201b35c: c4 02 60 1c ld [ %o1 + 0x1c ], %g2
ret = (int) (diop - rtems_libio_iops);
201b360: b0 26 00 03 sub %i0, %g3, %i0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
201b364: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
201b368: c4 02 60 20 ld [ %o1 + 0x20 ], %g2
ret = -1;
break;
}
}
diop->flags = iop->flags;
201b36c: d0 20 60 18 st %o0, [ %g1 + 0x18 ]
diop->pathinfo = iop->pathinfo;
201b370: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
201b374: c4 02 60 24 ld [ %o1 + 0x24 ], %g2
ret = (int) (diop - rtems_libio_iops);
201b378: b1 3e 20 06 sra %i0, 6, %i0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
201b37c: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
201b380: c4 02 60 28 ld [ %o1 + 0x28 ], %g2
201b384: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
201b388: c4 02 60 2c ld [ %o1 + 0x2c ], %g2
201b38c: 10 bf ff d9 b 201b2f0 <fcntl+0x108>
201b390: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
201b394: b0 10 20 00 clr %i0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
201b398: 10 bf ff c4 b 201b2a8 <fcntl+0xc0>
201b39c: d0 22 60 18 st %o0, [ %o1 + 0x18 ]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
201b3a0: 7f ff d4 bd call 2010694 <__errno>
201b3a4: b0 10 3f ff mov -1, %i0
201b3a8: 82 10 20 09 mov 9, %g1
201b3ac: c2 22 00 00 st %g1, [ %o0 ]
201b3b0: 81 c7 e0 08 ret
201b3b4: 81 e8 00 00 restore
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
201b3b8: 7f ff a1 57 call 2003914 <rtems_libio_allocate>
201b3bc: d2 27 bf f4 st %o1, [ %fp + -12 ]
if ( diop == 0 ) {
201b3c0: 82 92 20 00 orcc %o0, 0, %g1
201b3c4: 02 bf ff ad be 201b278 <fcntl+0x90> <== NEVER TAKEN
201b3c8: d2 07 bf f4 ld [ %fp + -12 ], %o1
201b3cc: d0 02 60 18 ld [ %o1 + 0x18 ], %o0
201b3d0: c6 07 62 10 ld [ %i5 + 0x210 ], %g3
201b3d4: 10 bf ff e2 b 201b35c <fcntl+0x174>
201b3d8: b0 10 00 01 mov %g1, %i0
0200da0c <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200da0c: 9d e3 bf 98 save %sp, -104, %sp
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
200da10: 3b 00 80 88 sethi %hi(0x2022000), %i5
200da14: d0 07 63 8c ld [ %i5 + 0x38c ], %o0 ! 202238c <pipe_semaphore>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200da18: b8 10 00 18 mov %i0, %i4
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
200da1c: 80 a2 20 00 cmp %o0, 0
200da20: 02 80 00 54 be 200db70 <fifo_open+0x164>
200da24: b4 17 63 8c or %i5, 0x38c, %i2
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200da28: 92 10 20 00 clr %o1
200da2c: 94 10 20 00 clr %o2
200da30: 7f ff eb bb call 200891c <rtems_semaphore_obtain>
200da34: b0 10 3f f4 mov -12, %i0
}
if (sc == RTEMS_SUCCESSFUL) {
200da38: 80 a2 20 00 cmp %o0, 0
200da3c: 12 80 01 18 bne 200de9c <fifo_open+0x490> <== NEVER TAKEN
200da40: 01 00 00 00 nop
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
200da44: f6 07 00 00 ld [ %i4 ], %i3
if (pipe == NULL) {
200da48: 80 a6 e0 00 cmp %i3, 0
200da4c: 02 80 00 91 be 200dc90 <fifo_open+0x284>
200da50: 01 00 00 00 nop
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200da54: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
200da58: 92 10 20 00 clr %o1
200da5c: 7f ff eb b0 call 200891c <rtems_semaphore_obtain>
200da60: 94 10 20 00 clr %o2
err = -EINTR;
if (*pipep == NULL) {
200da64: c2 07 00 00 ld [ %i4 ], %g1
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200da68: 80 a0 00 08 cmp %g0, %o0
200da6c: b0 60 20 00 subx %g0, 0, %i0
err = -EINTR;
if (*pipep == NULL) {
200da70: 80 a0 60 00 cmp %g1, 0
200da74: 02 80 00 d9 be 200ddd8 <fifo_open+0x3cc>
200da78: b0 0e 3f fc and %i0, -4, %i0
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200da7c: 7f ff eb f2 call 2008a44 <rtems_semaphore_release>
200da80: d0 07 63 8c ld [ %i5 + 0x38c ], %o0
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
200da84: 80 a6 20 00 cmp %i0, 0
200da88: 12 80 01 05 bne 200de9c <fifo_open+0x490> <== NEVER TAKEN
200da8c: 01 00 00 00 nop
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200da90: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200da94: 82 08 60 06 and %g1, 6, %g1
200da98: 80 a0 60 04 cmp %g1, 4
200da9c: 02 80 00 42 be 200dba4 <fifo_open+0x198>
200daa0: fa 07 00 00 ld [ %i4 ], %i5
200daa4: 80 a0 60 06 cmp %g1, 6
200daa8: 02 80 00 65 be 200dc3c <fifo_open+0x230>
200daac: 80 a0 60 02 cmp %g1, 2
200dab0: 22 80 00 07 be,a 200dacc <fifo_open+0xc0> <== ALWAYS TAKEN
200dab4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
200dab8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200dabc: 7f ff eb e2 call 2008a44 <rtems_semaphore_release>
200dac0: b0 10 20 00 clr %i0
return 0;
200dac4: 81 c7 e0 08 ret
200dac8: 81 e8 00 00 restore
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200dacc: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
if (pipe->Readers ++ == 0)
200dad0: 86 00 60 01 add %g1, 1, %g3
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200dad4: 84 00 a0 01 inc %g2
if (pipe->Readers ++ == 0)
200dad8: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200dadc: 80 a0 60 00 cmp %g1, 0
200dae0: 02 80 00 d4 be 200de30 <fifo_open+0x424> <== ALWAYS TAKEN
200dae4: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
200dae8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
200daec: 80 a0 60 00 cmp %g1, 0
200daf0: 32 bf ff f3 bne,a 200dabc <fifo_open+0xb0>
200daf4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
/* Not an error */
if (LIBIO_NODELAY(iop))
200daf8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200dafc: 80 88 60 01 btst 1, %g1
200db00: 32 bf ff ef bne,a 200dabc <fifo_open+0xb0>
200db04: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
break;
prevCounter = pipe->writerCounter;
200db08: 10 80 00 0c b 200db38 <fifo_open+0x12c>
200db0c: f6 07 60 24 ld [ %i5 + 0x24 ], %i3
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200db10: 92 10 20 00 clr %o1
200db14: 7f ff eb 82 call 200891c <rtems_semaphore_obtain>
200db18: 94 10 20 00 clr %o2
200db1c: 80 a2 20 00 cmp %o0, 0
200db20: 12 80 00 0f bne 200db5c <fifo_open+0x150> <== NEVER TAKEN
200db24: b0 10 3f fc mov -4, %i0
goto out_error;
} while (prevCounter == pipe->writerCounter);
200db28: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
200db2c: 80 a0 40 1b cmp %g1, %i3
200db30: 32 bf ff e3 bne,a 200dabc <fifo_open+0xb0> <== ALWAYS TAKEN
200db34: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
200db38: 7f ff eb c3 call 2008a44 <rtems_semaphore_release>
200db3c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (! PIPE_READWAIT(pipe))
200db40: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200db44: 40 00 07 13 call 200f790 <rtems_barrier_wait>
200db48: 92 10 20 00 clr %o1
200db4c: 80 a2 20 00 cmp %o0, 0
200db50: 22 bf ff f0 be,a 200db10 <fifo_open+0x104> <== ALWAYS TAKEN
200db54: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
200db58: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
200db5c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200db60: 7f ff ff 68 call 200d900 <pipe_release>
200db64: 92 10 00 19 mov %i1, %o1
return err;
}
200db68: 81 c7 e0 08 ret
200db6c: 81 e8 00 00 restore
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200db70: 37 00 80 89 sethi %hi(0x2022400), %i3
200db74: d0 06 e1 0c ld [ %i3 + 0x10c ], %o0 ! 202250c <rtems_libio_semaphore>
200db78: 92 10 20 00 clr %o1
200db7c: 7f ff eb 68 call 200891c <rtems_semaphore_obtain>
200db80: 94 10 20 00 clr %o2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
200db84: c2 07 63 8c ld [ %i5 + 0x38c ], %g1
200db88: 80 a0 60 00 cmp %g1, 0
200db8c: 02 80 00 9a be 200ddf4 <fifo_open+0x3e8> <== ALWAYS TAKEN
200db90: 98 10 00 1a mov %i2, %o4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200db94: 7f ff eb ac call 2008a44 <rtems_semaphore_release> <== NOT EXECUTED
200db98: d0 06 e1 0c ld [ %i3 + 0x10c ], %o0 <== NOT EXECUTED
200db9c: 10 bf ff a3 b 200da28 <fifo_open+0x1c> <== NOT EXECUTED
200dba0: d0 07 63 8c ld [ %i5 + 0x38c ], %o0 <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200dba4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
200dba8: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
if (pipe->Writers ++ == 0)
200dbac: 86 00 60 01 add %g1, 1, %g3
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
200dbb0: 84 00 a0 01 inc %g2
if (pipe->Writers ++ == 0)
200dbb4: c6 27 60 14 st %g3, [ %i5 + 0x14 ]
200dbb8: 80 a0 60 00 cmp %g1, 0
200dbbc: 02 80 00 a7 be 200de58 <fifo_open+0x44c> <== ALWAYS TAKEN
200dbc0: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200dbc4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
200dbc8: 80 a0 60 00 cmp %g1, 0
200dbcc: 32 bf ff bc bne,a 200dabc <fifo_open+0xb0>
200dbd0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200dbd4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200dbd8: 80 88 60 01 btst 1, %g1
200dbdc: 32 80 00 b2 bne,a 200dea4 <fifo_open+0x498>
200dbe0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
200dbe4: 10 80 00 0c b 200dc14 <fifo_open+0x208>
200dbe8: f6 07 60 20 ld [ %i5 + 0x20 ], %i3
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200dbec: 92 10 20 00 clr %o1
200dbf0: 7f ff eb 4b call 200891c <rtems_semaphore_obtain>
200dbf4: 94 10 20 00 clr %o2
200dbf8: 80 a2 20 00 cmp %o0, 0
200dbfc: 12 bf ff d8 bne 200db5c <fifo_open+0x150> <== NEVER TAKEN
200dc00: b0 10 3f fc mov -4, %i0
goto out_error;
} while (prevCounter == pipe->readerCounter);
200dc04: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200dc08: 80 a0 40 1b cmp %g1, %i3
200dc0c: 32 bf ff ac bne,a 200dabc <fifo_open+0xb0> <== ALWAYS TAKEN
200dc10: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
200dc14: 7f ff eb 8c call 2008a44 <rtems_semaphore_release>
200dc18: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (! PIPE_WRITEWAIT(pipe))
200dc1c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200dc20: 40 00 06 dc call 200f790 <rtems_barrier_wait>
200dc24: 92 10 20 00 clr %o1
200dc28: 80 a2 20 00 cmp %o0, 0
200dc2c: 22 bf ff f0 be,a 200dbec <fifo_open+0x1e0> <== ALWAYS TAKEN
200dc30: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
200dc34: 10 bf ff ca b 200db5c <fifo_open+0x150> <== NOT EXECUTED
200dc38: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
200dc3c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200dc40: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
if (pipe->Readers ++ == 0)
200dc44: 86 00 60 01 add %g1, 1, %g3
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200dc48: 84 00 a0 01 inc %g2
if (pipe->Readers ++ == 0)
200dc4c: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200dc50: 80 a0 60 00 cmp %g1, 0
200dc54: 02 80 00 7c be 200de44 <fifo_open+0x438> <== ALWAYS TAKEN
200dc58: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200dc5c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200dc60: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
if (pipe->Writers ++ == 0)
200dc64: 86 00 60 01 add %g1, 1, %g3
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200dc68: 84 00 a0 01 inc %g2
if (pipe->Writers ++ == 0)
200dc6c: c6 27 60 14 st %g3, [ %i5 + 0x14 ]
200dc70: 80 a0 60 00 cmp %g1, 0
200dc74: 12 bf ff 91 bne 200dab8 <fifo_open+0xac> <== NEVER TAKEN
200dc78: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
PIPE_WAKEUPREADERS(pipe);
200dc7c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200dc80: 40 00 06 ad call 200f734 <rtems_barrier_release>
200dc84: 92 07 bf f8 add %fp, -8, %o1
break;
}
PIPE_UNLOCK(pipe);
200dc88: 10 bf ff 8d b 200dabc <fifo_open+0xb0>
200dc8c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
200dc90: 7f ff dd 5c call 2005200 <malloc>
200dc94: 90 10 20 34 mov 0x34, %o0
if (pipe == NULL)
200dc98: b6 92 20 00 orcc %o0, 0, %i3
200dc9c: 02 80 00 8e be 200ded4 <fifo_open+0x4c8>
200dca0: 82 10 22 00 mov 0x200, %g1
return err;
memset(pipe, 0, sizeof(pipe_control_t));
200dca4: c0 26 c0 00 clr [ %i3 ]
200dca8: c0 26 e0 08 clr [ %i3 + 8 ]
200dcac: c0 26 e0 0c clr [ %i3 + 0xc ]
200dcb0: c0 26 e0 10 clr [ %i3 + 0x10 ]
200dcb4: c0 26 e0 14 clr [ %i3 + 0x14 ]
200dcb8: c0 26 e0 18 clr [ %i3 + 0x18 ]
200dcbc: c0 26 e0 1c clr [ %i3 + 0x1c ]
200dcc0: c0 26 e0 20 clr [ %i3 + 0x20 ]
200dcc4: c0 26 e0 24 clr [ %i3 + 0x24 ]
200dcc8: c0 26 e0 28 clr [ %i3 + 0x28 ]
200dccc: c0 26 e0 2c clr [ %i3 + 0x2c ]
200dcd0: c0 26 e0 30 clr [ %i3 + 0x30 ]
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
200dcd4: 90 10 22 00 mov 0x200, %o0
200dcd8: 7f ff dd 4a call 2005200 <malloc>
200dcdc: c2 26 e0 04 st %g1, [ %i3 + 4 ]
if (! pipe->Buffer)
200dce0: 80 a2 20 00 cmp %o0, 0
200dce4: 02 80 00 7a be 200decc <fifo_open+0x4c0> <== NEVER TAKEN
200dce8: d0 26 c0 00 st %o0, [ %i3 ]
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
200dcec: 35 00 80 86 sethi %hi(0x2021800), %i2
200dcf0: d0 4e a3 84 ldsb [ %i2 + 0x384 ], %o0 ! 2021b84 <c.6642>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
200dcf4: 31 14 12 5c sethi %hi(0x50497000), %i0
200dcf8: 82 16 22 00 or %i0, 0x200, %g1 ! 50497200 <RAM_END+0x4e097200>
200dcfc: 92 10 20 00 clr %o1
200dd00: 94 10 20 00 clr %o2
200dd04: 90 12 00 01 or %o0, %g1, %o0
200dd08: 40 00 06 31 call 200f5cc <rtems_barrier_create>
200dd0c: 96 06 e0 2c add %i3, 0x2c, %o3
200dd10: 80 a2 20 00 cmp %o0, 0
200dd14: 12 80 00 6c bne 200dec4 <fifo_open+0x4b8>
200dd18: d0 4e a3 84 ldsb [ %i2 + 0x384 ], %o0
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
200dd1c: 03 14 12 5d sethi %hi(0x50497400), %g1
200dd20: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <RAM_END+0x4e097700>
200dd24: 92 10 20 00 clr %o1
200dd28: 94 10 20 00 clr %o2
200dd2c: 90 12 00 01 or %o0, %g1, %o0
200dd30: 40 00 06 27 call 200f5cc <rtems_barrier_create>
200dd34: 96 06 e0 30 add %i3, 0x30, %o3
200dd38: 80 a2 20 00 cmp %o0, 0
200dd3c: 12 80 00 60 bne 200debc <fifo_open+0x4b0>
200dd40: d0 4e a3 84 ldsb [ %i2 + 0x384 ], %o0
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
200dd44: b0 16 23 00 or %i0, 0x300, %i0
200dd48: 92 10 20 01 mov 1, %o1
200dd4c: 90 12 00 18 or %o0, %i0, %o0
200dd50: 94 10 20 10 mov 0x10, %o2
200dd54: 96 10 20 00 clr %o3
200dd58: 7f ff ea 4a call 2008680 <rtems_semaphore_create>
200dd5c: 98 06 e0 28 add %i3, 0x28, %o4
200dd60: 80 a2 20 00 cmp %o0, 0
200dd64: 12 80 00 54 bne 200deb4 <fifo_open+0x4a8>
200dd68: 94 07 bf fc add %fp, -4, %o2
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
200dd6c: d2 06 e0 2c ld [ %i3 + 0x2c ], %o1
200dd70: 21 00 80 8c sethi %hi(0x2023000), %l0
200dd74: 7f ff f1 69 call 200a318 <_Objects_Get>
200dd78: 90 14 20 10 or %l0, 0x10, %o0 ! 2023010 <_Barrier_Information>
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
200dd7c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200dd80: 31 04 00 00 sethi %hi(0x10000000), %i0
200dd84: 82 10 40 18 or %g1, %i0, %g1
_Thread_Enable_dispatch();
200dd88: 7f ff f5 42 call 200b290 <_Thread_Enable_dispatch>
200dd8c: c2 22 20 4c st %g1, [ %o0 + 0x4c ]
200dd90: d2 06 e0 30 ld [ %i3 + 0x30 ], %o1
200dd94: 94 07 bf fc add %fp, -4, %o2
200dd98: 7f ff f1 60 call 200a318 <_Objects_Get>
200dd9c: 90 14 20 10 or %l0, 0x10, %o0
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
200dda0: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200dda4: b0 10 40 18 or %g1, %i0, %i0
_Thread_Enable_dispatch();
200dda8: 7f ff f5 3a call 200b290 <_Thread_Enable_dispatch>
200ddac: f0 22 20 4c st %i0, [ %o0 + 0x4c ]
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
200ddb0: c2 0e a3 84 ldub [ %i2 + 0x384 ], %g1
200ddb4: 84 00 60 01 add %g1, 1, %g2
200ddb8: 83 28 60 18 sll %g1, 0x18, %g1
200ddbc: 83 38 60 18 sra %g1, 0x18, %g1
200ddc0: 80 a0 60 7a cmp %g1, 0x7a
200ddc4: 12 bf ff 24 bne 200da54 <fifo_open+0x48>
200ddc8: c4 2e a3 84 stb %g2, [ %i2 + 0x384 ]
c = 'a';
200ddcc: 82 10 20 61 mov 0x61, %g1
200ddd0: 10 bf ff 21 b 200da54 <fifo_open+0x48>
200ddd4: c2 2e a3 84 stb %g1, [ %i2 + 0x384 ]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
200ddd8: 80 a6 20 00 cmp %i0, 0
200dddc: 12 80 00 24 bne 200de6c <fifo_open+0x460> <== NEVER TAKEN
200dde0: d0 07 63 8c ld [ %i5 + 0x38c ], %o0
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200dde4: 7f ff eb 18 call 2008a44 <rtems_semaphore_release>
200dde8: f6 27 00 00 st %i3, [ %i4 ]
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200ddec: 10 bf ff 2a b 200da94 <fifo_open+0x88>
200ddf0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
200ddf4: 92 10 20 01 mov 1, %o1
200ddf8: 94 10 20 54 mov 0x54, %o2
200ddfc: 96 10 20 00 clr %o3
200de00: 11 14 12 54 sethi %hi(0x50495000), %o0
200de04: 7f ff ea 1f call 2008680 <rtems_semaphore_create>
200de08: 90 12 20 45 or %o0, 0x45, %o0 ! 50495045 <RAM_END+0x4e095045>
200de0c: b4 10 00 08 mov %o0, %i2
200de10: d0 06 e1 0c ld [ %i3 + 0x10c ], %o0
200de14: 7f ff eb 0c call 2008a44 <rtems_semaphore_release>
200de18: b0 10 3f f4 mov -12, %i0
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
200de1c: 80 a6 a0 00 cmp %i2, 0
200de20: 12 bf ff 29 bne 200dac4 <fifo_open+0xb8>
200de24: d0 07 63 8c ld [ %i5 + 0x38c ], %o0
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200de28: 10 bf ff 01 b 200da2c <fifo_open+0x20>
200de2c: 92 10 20 00 clr %o1
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200de30: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200de34: 40 00 06 40 call 200f734 <rtems_barrier_release>
200de38: 92 07 bf f8 add %fp, -8, %o1
if (pipe->Writers == 0) {
200de3c: 10 bf ff 2c b 200daec <fifo_open+0xe0>
200de40: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200de44: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200de48: 40 00 06 3b call 200f734 <rtems_barrier_release>
200de4c: 92 07 bf f8 add %fp, -8, %o1
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200de50: 10 bf ff 84 b 200dc60 <fifo_open+0x254>
200de54: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
200de58: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200de5c: 40 00 06 36 call 200f734 <rtems_barrier_release>
200de60: 92 07 bf f8 add %fp, -8, %o1
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200de64: 10 bf ff 59 b 200dbc8 <fifo_open+0x1bc>
200de68: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200de6c: 40 00 06 09 call 200f690 <rtems_barrier_delete> <== NOT EXECUTED
200de70: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
200de74: 40 00 06 07 call 200f690 <rtems_barrier_delete> <== NOT EXECUTED
200de78: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
200de7c: 7f ff ea 71 call 2008840 <rtems_semaphore_delete> <== NOT EXECUTED
200de80: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
free(pipe->Buffer);
200de84: 7f ff da e0 call 2004a04 <free> <== NOT EXECUTED
200de88: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free(pipe);
200de8c: 7f ff da de call 2004a04 <free> <== NOT EXECUTED
200de90: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200de94: 7f ff ea ec call 2008a44 <rtems_semaphore_release>
200de98: d0 07 63 8c ld [ %i5 + 0x38c ], %o0
200de9c: 81 c7 e0 08 ret
200dea0: 81 e8 00 00 restore
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
200dea4: 7f ff ea e8 call 2008a44 <rtems_semaphore_release>
200dea8: b0 10 3f fa mov -6, %i0
err = -ENXIO;
goto out_error;
200deac: 10 bf ff 2d b 200db60 <fifo_open+0x154>
200deb0: 90 10 00 1c mov %i4, %o0
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
200deb4: 40 00 05 f7 call 200f690 <rtems_barrier_delete>
200deb8: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
200debc: 40 00 05 f5 call 200f690 <rtems_barrier_delete>
200dec0: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0
err_rbar:
free(pipe->Buffer);
200dec4: 7f ff da d0 call 2004a04 <free>
200dec8: d0 06 c0 00 ld [ %i3 ], %o0
err_buf:
free(pipe);
200decc: 7f ff da ce call 2004a04 <free>
200ded0: 90 10 00 1b mov %i3, %o0
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
200ded4: 10 bf ff f0 b 200de94 <fifo_open+0x488>
200ded8: b0 10 3f f4 mov -12, %i0
02003748 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
2003748: 9d e3 bf a0 save %sp, -96, %sp
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
200374c: 03 00 80 5f sethi %hi(0x2017c00), %g1
2003750: c2 00 61 58 ld [ %g1 + 0x158 ], %g1 ! 2017d58 <rtems_libio_number_iops>
2003754: 80 a6 00 01 cmp %i0, %g1
2003758: 1a 80 00 3b bcc 2003844 <fpathconf+0xfc>
200375c: 03 00 80 61 sethi %hi(0x2018400), %g1
iop = rtems_libio_iop(fd);
2003760: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 20187a0 <rtems_libio_iops>
2003764: b1 2e 20 06 sll %i0, 6, %i0
2003768: b0 00 40 18 add %g1, %i0, %i0
rtems_libio_check_is_open(iop);
200376c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2003770: 80 88 61 00 btst 0x100, %g1
2003774: 02 80 00 34 be 2003844 <fpathconf+0xfc> <== NEVER TAKEN
2003778: 80 a6 60 0b cmp %i1, 0xb
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
200377c: 08 80 00 08 bleu 200379c <fpathconf+0x54>
2003780: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2003784: 40 00 33 b3 call 2010650 <__errno>
2003788: b0 10 3f ff mov -1, %i0
200378c: 82 10 20 16 mov 0x16, %g1
2003790: c2 22 00 00 st %g1, [ %o0 ]
break;
}
return return_value;
}
2003794: 81 c7 e0 08 ret
2003798: 81 e8 00 00 restore
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
200379c: b3 2e 60 02 sll %i1, 2, %i1
20037a0: 05 00 80 0d sethi %hi(0x2003400), %g2
20037a4: 84 10 a3 18 or %g2, 0x318, %g2 ! 2003718 <fdatasync+0x6c>
20037a8: c4 00 80 19 ld [ %g2 + %i1 ], %g2
20037ac: 81 c0 80 00 jmp %g2
20037b0: 01 00 00 00 nop
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
20037b4: f0 00 60 5c ld [ %g1 + 0x5c ], %i0
break;
20037b8: 81 c7 e0 08 ret
20037bc: 81 e8 00 00 restore
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
20037c0: f0 00 60 50 ld [ %g1 + 0x50 ], %i0
break;
20037c4: 81 c7 e0 08 ret
20037c8: 81 e8 00 00 restore
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
20037cc: f0 00 60 64 ld [ %g1 + 0x64 ], %i0
break;
20037d0: 81 c7 e0 08 ret
20037d4: 81 e8 00 00 restore
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
20037d8: f0 00 60 58 ld [ %g1 + 0x58 ], %i0
break;
20037dc: 81 c7 e0 08 ret
20037e0: 81 e8 00 00 restore
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
20037e4: f0 00 60 54 ld [ %g1 + 0x54 ], %i0
break;
20037e8: 81 c7 e0 08 ret
20037ec: 81 e8 00 00 restore
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
20037f0: f0 00 60 4c ld [ %g1 + 0x4c ], %i0
break;
20037f4: 81 c7 e0 08 ret
20037f8: 81 e8 00 00 restore
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
20037fc: f0 00 60 48 ld [ %g1 + 0x48 ], %i0
break;
2003800: 81 c7 e0 08 ret
2003804: 81 e8 00 00 restore
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
2003808: f0 00 60 44 ld [ %g1 + 0x44 ], %i0
break;
200380c: 81 c7 e0 08 ret
2003810: 81 e8 00 00 restore
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
2003814: f0 00 60 40 ld [ %g1 + 0x40 ], %i0
break;
2003818: 81 c7 e0 08 ret
200381c: 81 e8 00 00 restore
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
2003820: f0 00 60 3c ld [ %g1 + 0x3c ], %i0
break;
2003824: 81 c7 e0 08 ret
2003828: 81 e8 00 00 restore
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
200382c: f0 00 60 38 ld [ %g1 + 0x38 ], %i0
break;
2003830: 81 c7 e0 08 ret
2003834: 81 e8 00 00 restore
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
2003838: f0 00 60 60 ld [ %g1 + 0x60 ], %i0
break;
200383c: 81 c7 e0 08 ret
2003840: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
2003844: 40 00 33 83 call 2010650 <__errno>
2003848: b0 10 3f ff mov -1, %i0
200384c: 82 10 20 09 mov 9, %g1
2003850: c2 22 00 00 st %g1, [ %o0 ]
2003854: 81 c7 e0 08 ret
2003858: 81 e8 00 00 restore
02002f20 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
2002f20: 9d e3 bf a0 save %sp, -96, %sp
MSBUMP(free_calls, 1);
2002f24: 03 00 80 76 sethi %hi(0x201d800), %g1
2002f28: 82 10 61 50 or %g1, 0x150, %g1 ! 201d950 <rtems_malloc_statistics>
2002f2c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
#include <stdlib.h>
void free(
void *ptr
)
{
2002f30: b2 10 00 18 mov %i0, %i1
MSBUMP(free_calls, 1);
2002f34: 84 00 a0 01 inc %g2
if ( !ptr )
2002f38: 80 a6 20 00 cmp %i0, 0
2002f3c: 02 80 00 15 be 2002f90 <free+0x70>
2002f40: c4 20 60 0c st %g2, [ %g1 + 0xc ]
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2002f44: 03 00 80 77 sethi %hi(0x201dc00), %g1
2002f48: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201dc54 <_System_state_Current>
2002f4c: 80 a0 60 03 cmp %g1, 3
2002f50: 02 80 00 17 be 2002fac <free+0x8c> <== ALWAYS TAKEN
2002f54: 03 00 80 75 sethi %hi(0x201d400), %g1
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2002f58: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201d694 <rtems_malloc_statistics_helpers>
2002f5c: 80 a0 60 00 cmp %g1, 0
2002f60: 02 80 00 06 be 2002f78 <free+0x58>
2002f64: 3b 00 80 73 sethi %hi(0x201cc00), %i5
(*rtems_malloc_statistics_helpers->at_free)(ptr);
2002f68: c2 00 60 08 ld [ %g1 + 8 ], %g1
2002f6c: 9f c0 40 00 call %g1
2002f70: 90 10 00 19 mov %i1, %o0
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
2002f74: 3b 00 80 73 sethi %hi(0x201cc00), %i5
2002f78: d0 07 62 70 ld [ %i5 + 0x270 ], %o0 ! 201ce70 <RTEMS_Malloc_Heap>
2002f7c: 40 00 16 01 call 2008780 <_Protected_heap_Free>
2002f80: 92 10 00 19 mov %i1, %o1
2002f84: 80 8a 20 ff btst 0xff, %o0
2002f88: 22 80 00 04 be,a 2002f98 <free+0x78>
2002f8c: c2 07 62 70 ld [ %i5 + 0x270 ], %g1
2002f90: 81 c7 e0 08 ret
2002f94: 81 e8 00 00 restore
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
2002f98: 31 00 80 6e sethi %hi(0x201b800), %i0
2002f9c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2
2002fa0: f6 00 60 1c ld [ %g1 + 0x1c ], %i3
2002fa4: 40 00 03 ae call 2003e5c <printk>
2002fa8: 91 ee 21 38 restore %i0, 0x138, %o0
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
2002fac: 40 00 00 5d call 2003120 <malloc_is_system_state_OK>
2002fb0: 01 00 00 00 nop
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2002fb4: 80 8a 20 ff btst 0xff, %o0
2002fb8: 12 bf ff e8 bne 2002f58 <free+0x38>
2002fbc: 03 00 80 75 sethi %hi(0x201d400), %g1
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
2002fc0: 40 00 00 77 call 200319c <malloc_deferred_free>
2002fc4: 81 e8 00 00 restore
02006284 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2006284: 9d e3 bf a0 save %sp, -96, %sp
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
2006288: 03 00 80 8e sethi %hi(0x2023800), %g1
200628c: 82 10 60 14 or %g1, 0x14, %g1 ! 2023814 <rtems_global_user_env>
2006290: 80 a6 00 01 cmp %i0, %g1
2006294: 02 80 00 08 be 20062b4 <free_user_env+0x30> <== NEVER TAKEN
2006298: 01 00 00 00 nop
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
200629c: 7f ff fb 4c call 2004fcc <rtems_filesystem_freenode>
20062a0: 90 06 20 04 add %i0, 4, %o0
rtems_filesystem_freenode( &env->root_directory);
20062a4: 7f ff fb 4a call 2004fcc <rtems_filesystem_freenode>
20062a8: 90 06 20 18 add %i0, 0x18, %o0
free(env);
20062ac: 7f ff fb 4f call 2004fe8 <free>
20062b0: 81 e8 00 00 restore
20062b4: 81 c7 e0 08 ret <== NOT EXECUTED
20062b8: 81 e8 00 00 restore <== NOT EXECUTED
020026d0 <get_disk_entry>:
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
20026d0: 03 00 80 6a sethi %hi(0x201a800), %g1
20026d4: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 201a9d0 <disktab_size>
20026d8: 80 a0 40 08 cmp %g1, %o0
20026dc: 08 80 00 1e bleu 2002754 <get_disk_entry+0x84> <== NEVER TAKEN
20026e0: 84 10 20 00 clr %g2
20026e4: 03 00 80 6a sethi %hi(0x201a800), %g1
20026e8: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 201a9d4 <disktab>
20026ec: 80 a0 60 00 cmp %g1, 0
20026f0: 02 80 00 19 be 2002754 <get_disk_entry+0x84> <== NEVER TAKEN
20026f4: 01 00 00 00 nop
rtems_disk_device_table *dtab = disktab + major;
20026f8: 91 2a 20 03 sll %o0, 3, %o0
20026fc: 86 00 40 08 add %g1, %o0, %g3
if (minor < dtab->size && dtab->minor != NULL) {
2002700: c6 00 e0 04 ld [ %g3 + 4 ], %g3
2002704: 80 a0 c0 09 cmp %g3, %o1
2002708: 08 80 00 13 bleu 2002754 <get_disk_entry+0x84> <== NEVER TAKEN
200270c: 01 00 00 00 nop
2002710: c2 00 40 08 ld [ %g1 + %o0 ], %g1
2002714: 80 a0 60 00 cmp %g1, 0
2002718: 02 80 00 0f be 2002754 <get_disk_entry+0x84> <== NEVER TAKEN
200271c: 93 2a 60 02 sll %o1, 2, %o1
rtems_disk_device *dd = dtab->minor [minor];
2002720: c4 00 40 09 ld [ %g1 + %o1 ], %g2
if (dd != NULL && !lookup_only) {
2002724: 80 a0 a0 00 cmp %g2, 0
2002728: 02 80 00 0b be 2002754 <get_disk_entry+0x84>
200272c: 80 a2 a0 00 cmp %o2, 0
2002730: 12 80 00 09 bne 2002754 <get_disk_entry+0x84>
2002734: 01 00 00 00 nop
if (!dd->deleted) {
2002738: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1
200273c: 80 a0 60 00 cmp %g1, 0
2002740: 32 80 00 07 bne,a 200275c <get_disk_entry+0x8c>
2002744: 84 10 20 00 clr %g2
++dd->uses;
2002748: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
200274c: 82 00 60 01 inc %g1
2002750: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
return dd;
}
}
return NULL;
}
2002754: 81 c3 e0 08 retl
2002758: 90 10 00 02 mov %g2, %o0
200275c: 81 c3 e0 08 retl
2002760: 90 10 00 02 mov %g2, %o0
0201b4ac <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
201b4ac: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
201b4b0: 03 00 80 77 sethi %hi(0x201dc00), %g1
201b4b4: c2 00 63 38 ld [ %g1 + 0x338 ], %g1 ! 201df38 <rtems_libio_number_iops>
201b4b8: 80 a6 00 01 cmp %i0, %g1
201b4bc: 1a 80 00 06 bcc 201b4d4 <getdents+0x28> <== NEVER TAKEN
201b4c0: ba 10 20 00 clr %i5
201b4c4: 03 00 80 7a sethi %hi(0x201e800), %g1
201b4c8: fa 00 62 10 ld [ %g1 + 0x210 ], %i5 ! 201ea10 <rtems_libio_iops>
201b4cc: b1 2e 20 06 sll %i0, 6, %i0
201b4d0: ba 07 40 18 add %i5, %i0, %i5
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
201b4d4: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
201b4d8: de 07 60 1c ld [ %i5 + 0x1c ], %o7
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
201b4dc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
201b4e0: f0 07 60 20 ld [ %i5 + 0x20 ], %i0
201b4e4: c8 07 60 24 ld [ %i5 + 0x24 ], %g4
201b4e8: c6 07 60 2c ld [ %i5 + 0x2c ], %g3
201b4ec: de 27 bf ec st %o7, [ %fp + -20 ]
201b4f0: f0 27 bf f0 st %i0, [ %fp + -16 ]
201b4f4: c8 27 bf f4 st %g4, [ %fp + -12 ]
201b4f8: c4 27 bf f8 st %g2, [ %fp + -8 ]
201b4fc: c6 27 bf fc st %g3, [ %fp + -4 ]
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
201b500: 9f c0 40 00 call %g1
201b504: 90 07 bf ec add %fp, -20, %o0
201b508: 80 a2 20 01 cmp %o0, 1
201b50c: 12 80 00 09 bne 201b530 <getdents+0x84>
201b510: 90 10 00 1d mov %i5, %o0
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
201b514: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
201b518: c2 00 60 08 ld [ %g1 + 8 ], %g1
201b51c: 92 10 00 19 mov %i1, %o1
201b520: 9f c0 40 00 call %g1
201b524: 94 10 00 1a mov %i2, %o2
}
201b528: 81 c7 e0 08 ret
201b52c: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
201b530: 7f ff d4 59 call 2010694 <__errno>
201b534: b0 10 3f ff mov -1, %i0
201b538: 82 10 20 14 mov 0x14, %g1
201b53c: c2 22 00 00 st %g1, [ %o0 ]
201b540: 81 c7 e0 08 ret
201b544: 81 e8 00 00 restore
0200eb80 <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
200eb80: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
200eb84: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2
200eb88: 80 a0 a0 01 cmp %g2, 1
200eb8c: 12 80 00 05 bne 200eba0 <imfs_dir_open+0x20> <== NEVER TAKEN
200eb90: 82 10 3f ff mov -1, %g1
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
200eb94: c0 22 20 10 clr [ %o0 + 0x10 ]
200eb98: c0 22 20 14 clr [ %o0 + 0x14 ]
return 0;
200eb9c: 82 10 20 00 clr %g1
}
200eba0: 81 c3 e0 08 retl
200eba4: 90 10 00 01 mov %g1, %o0
0200eba8 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200eba8: 9d e3 be 88 save %sp, -376, %sp
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
200ebac: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200ebb0: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200ebb4: f8 06 e0 50 ld [ %i3 + 0x50 ], %i4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200ebb8: b6 06 e0 54 add %i3, 0x54, %i3
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
200ebbc: 80 a7 00 1b cmp %i4, %i3
200ebc0: 02 80 00 34 be 200ec90 <imfs_dir_read+0xe8>
200ebc4: b0 10 20 00 clr %i0
/* Move to the first of the desired directory entries */
the_node = rtems_chain_first( the_chain );
bytes_transferred = 0;
first_entry = iop->offset;
200ebc8: e0 07 60 14 ld [ %i5 + 0x14 ], %l0
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
200ebcc: 90 10 00 1a mov %i2, %o0
200ebd0: 40 00 27 39 call 20188b4 <.udiv>
200ebd4: 92 10 21 18 mov 0x118, %o1
for (
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
200ebd8: b4 10 20 00 clr %i2
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
200ebdc: 83 2a 20 03 sll %o0, 3, %g1
200ebe0: 91 2a 20 05 sll %o0, 5, %o0
200ebe4: 82 00 40 08 add %g1, %o0, %g1
200ebe8: a3 28 60 03 sll %g1, 3, %l1
200ebec: a2 24 40 01 sub %l1, %g1, %l1
200ebf0: a2 04 40 10 add %l1, %l0, %l1
/* The directory was not empty so try to move to the desired entry in chain*/
for (
200ebf4: 80 a4 60 00 cmp %l1, 0
200ebf8: 14 80 00 09 bg 200ec1c <imfs_dir_read+0x74> <== ALWAYS TAKEN
200ebfc: a4 10 21 18 mov 0x118, %l2
200ec00: 30 80 00 24 b,a 200ec90 <imfs_dir_read+0xe8> <== NOT EXECUTED
200ec04: 80 a4 40 1a cmp %l1, %i2
200ec08: 04 80 00 22 ble 200ec90 <imfs_dir_read+0xe8> <== NEVER TAKEN
200ec0c: f8 07 00 00 ld [ %i4 ], %i4
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
200ec10: 80 a7 00 1b cmp %i4, %i3
200ec14: 02 80 00 1f be 200ec90 <imfs_dir_read+0xe8>
200ec18: 01 00 00 00 nop
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
200ec1c: 80 a4 00 1a cmp %l0, %i2
200ec20: 34 bf ff f9 bg,a 200ec04 <imfs_dir_read+0x5c>
200ec24: b4 06 a1 18 add %i2, 0x118, %i2
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
200ec28: c2 07 20 38 ld [ %i4 + 0x38 ], %g1
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200ec2c: 85 3e a0 1f sra %i2, 0x1f, %g2
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200ec30: a6 07 20 0c add %i4, 0xc, %l3
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200ec34: c4 27 be f0 st %g2, [ %fp + -272 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
200ec38: c2 27 be e8 st %g1, [ %fp + -280 ]
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200ec3c: f4 27 be f4 st %i2, [ %fp + -268 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
200ec40: e4 37 be f8 sth %l2, [ %fp + -264 ]
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200ec44: 40 00 09 3a call 201112c <strlen>
200ec48: 90 10 00 13 mov %l3, %o0
strcpy( tmp_dirent.d_name, the_jnode->name );
200ec4c: 92 10 00 13 mov %l3, %o1
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200ec50: d0 37 be fa sth %o0, [ %fp + -262 ]
strcpy( tmp_dirent.d_name, the_jnode->name );
200ec54: 40 00 07 72 call 2010a1c <strcpy>
200ec58: 90 07 be fc add %fp, -260, %o0
memcpy(
200ec5c: 90 06 40 18 add %i1, %i0, %o0
200ec60: 92 07 be e8 add %fp, -280, %o1
200ec64: 40 00 05 f6 call 201043c <memcpy>
200ec68: 94 10 21 18 mov 0x118, %o2
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
200ec6c: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
200ec70: b4 06 a1 18 add %i2, 0x118, %i2
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
200ec74: 86 80 e1 18 addcc %g3, 0x118, %g3
200ec78: 84 40 a0 00 addx %g2, 0, %g2
200ec7c: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
bytes_transferred = bytes_transferred + sizeof( struct dirent );
200ec80: b0 06 21 18 add %i0, 0x118, %i0
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
200ec84: 80 a4 40 1a cmp %l1, %i2
200ec88: 14 bf ff e2 bg 200ec10 <imfs_dir_read+0x68> <== NEVER TAKEN
200ec8c: f8 07 00 00 ld [ %i4 ], %i4
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
200ec90: 81 c7 e0 08 ret
200ec94: 81 e8 00 00 restore
0200edf0 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200edf0: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200edf4: fa 06 40 00 ld [ %i1 ], %i5
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
200edf8: c4 07 60 50 ld [ %i5 + 0x50 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200edfc: 82 07 60 54 add %i5, 0x54, %g1
200ee00: 80 a0 80 01 cmp %g2, %g1
200ee04: 12 80 00 18 bne 200ee64 <imfs_dir_rmnod+0x74>
200ee08: 01 00 00 00 nop
static inline bool rtems_filesystem_is_root_location(
const rtems_filesystem_location_info_t *loc
)
{
return loc->mt_entry->mt_fs_root.node_access == loc->node_access;
200ee0c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
/*
* You cannot remove the file system root node.
*/
if ( rtems_filesystem_is_root_location(pathloc) )
200ee10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200ee14: 80 a7 40 01 cmp %i5, %g1
200ee18: 02 80 00 0d be 200ee4c <imfs_dir_rmnod+0x5c>
200ee1c: 01 00 00 00 nop
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
200ee20: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
200ee24: 80 a0 60 00 cmp %g1, 0
200ee28: 12 80 00 09 bne 200ee4c <imfs_dir_rmnod+0x5c> <== NEVER TAKEN
200ee2c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
200ee30: 7f ff f3 37 call 200bb0c <IMFS_create_orphan>
200ee34: 90 10 00 1d mov %i5, %o0
IMFS_check_node_remove( the_jnode );
200ee38: 90 10 00 1d mov %i5, %o0
200ee3c: 7f ff f3 46 call 200bb54 <IMFS_check_node_remove>
200ee40: b0 10 20 00 clr %i0
return 0;
}
200ee44: 81 c7 e0 08 ret
200ee48: 81 e8 00 00 restore
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
200ee4c: 40 00 03 20 call 200facc <__errno>
200ee50: b0 10 3f ff mov -1, %i0
200ee54: 82 10 20 10 mov 0x10, %g1
200ee58: c2 22 00 00 st %g1, [ %o0 ]
200ee5c: 81 c7 e0 08 ret
200ee60: 81 e8 00 00 restore
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
200ee64: 40 00 03 1a call 200facc <__errno>
200ee68: b0 10 3f ff mov -1, %i0
200ee6c: 82 10 20 5a mov 0x5a, %g1
200ee70: c2 22 00 00 st %g1, [ %o0 ]
200ee74: 81 c7 e0 08 ret
200ee78: 81 e8 00 00 restore
02003684 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
2003684: 9d e3 bf a0 save %sp, -96, %sp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
2003688: 03 00 80 61 sethi %hi(0x2018400), %g1
200368c: c4 48 61 a8 ldsb [ %g1 + 0x1a8 ], %g2 ! 20185a8 <etc_passwd_initted.6533>
2003690: 80 a0 a0 00 cmp %g2, 0
2003694: 22 80 00 04 be,a 20036a4 <init_etc_passwd_group+0x20>
2003698: 84 10 20 01 mov 1, %g2
200369c: 81 c7 e0 08 ret
20036a0: 81 e8 00 00 restore
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
20036a4: 92 10 21 ff mov 0x1ff, %o1
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
20036a8: c4 28 61 a8 stb %g2, [ %g1 + 0x1a8 ]
mkdir("/etc", 0777);
20036ac: 11 00 80 5c sethi %hi(0x2017000), %o0
20036b0: 40 00 02 6d call 2004064 <mkdir>
20036b4: 90 12 20 80 or %o0, 0x80, %o0 ! 2017080 <IMFS_ops+0x94>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
20036b8: 39 00 80 5c sethi %hi(0x2017000), %i4
20036bc: 3b 00 80 5c sethi %hi(0x2017000), %i5
20036c0: 90 17 20 88 or %i4, 0x88, %o0
20036c4: 40 00 35 dc call 2010e34 <fopen>
20036c8: 92 17 60 98 or %i5, 0x98, %o1
20036cc: 80 a2 20 00 cmp %o0, 0
20036d0: 22 80 00 0d be,a 2003704 <init_etc_passwd_group+0x80>
20036d4: 90 17 20 88 or %i4, 0x88, %o0
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
20036d8: 40 00 33 f8 call 20106b8 <fclose>
20036dc: 01 00 00 00 nop
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
20036e0: 39 00 80 5c sethi %hi(0x2017000), %i4
20036e4: 92 17 60 98 or %i5, 0x98, %o1
20036e8: 40 00 35 d3 call 2010e34 <fopen>
20036ec: 90 17 21 10 or %i4, 0x110, %o0
20036f0: 80 a2 20 00 cmp %o0, 0
20036f4: 22 80 00 11 be,a 2003738 <init_etc_passwd_group+0xb4>
20036f8: 90 17 21 10 or %i4, 0x110, %o0
fclose(fp);
20036fc: 40 00 33 ef call 20106b8 <fclose>
2003700: 91 e8 00 08 restore %g0, %o0, %o0
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
2003704: 13 00 80 5c sethi %hi(0x2017000), %o1
2003708: 40 00 35 cb call 2010e34 <fopen>
200370c: 92 12 60 a0 or %o1, 0xa0, %o1 ! 20170a0 <IMFS_ops+0xb4>
2003710: b0 92 20 00 orcc %o0, 0, %i0
2003714: 02 bf ff f3 be 20036e0 <init_etc_passwd_group+0x5c> <== NEVER TAKEN
2003718: 92 10 20 01 mov 1, %o1
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
200371c: 94 10 20 66 mov 0x66, %o2
2003720: 96 10 00 18 mov %i0, %o3
2003724: 11 00 80 5c sethi %hi(0x2017000), %o0
2003728: 40 00 37 ad call 20115dc <fwrite>
200372c: 90 12 20 a8 or %o0, 0xa8, %o0 ! 20170a8 <IMFS_ops+0xbc>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
2003730: 10 bf ff ea b 20036d8 <init_etc_passwd_group+0x54>
2003734: 90 10 00 18 mov %i0, %o0
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
2003738: 13 00 80 5c sethi %hi(0x2017000), %o1
200373c: 40 00 35 be call 2010e34 <fopen>
2003740: 92 12 60 a0 or %o1, 0xa0, %o1 ! 20170a0 <IMFS_ops+0xb4>
2003744: b0 92 20 00 orcc %o0, 0, %i0
2003748: 02 bf ff d5 be 200369c <init_etc_passwd_group+0x18> <== NEVER TAKEN
200374c: 01 00 00 00 nop
fprintf( fp, "root:x:0:root\n"
2003750: 92 10 20 01 mov 1, %o1 ! 1 <PROM_START+0x1>
2003754: 11 00 80 5c sethi %hi(0x2017000), %o0
2003758: 94 10 20 2a mov 0x2a, %o2
200375c: 96 10 00 18 mov %i0, %o3
2003760: 40 00 37 9f call 20115dc <fwrite>
2003764: 90 12 21 20 or %o0, 0x120, %o0
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
2003768: 40 00 33 d4 call 20106b8 <fclose>
200376c: 81 e8 00 00 restore
02004fe8 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2004fe8: 9d e3 bf a0 save %sp, -96, %sp
if (tty->termios.c_iflag & ISTRIP)
2004fec: c2 06 60 30 ld [ %i1 + 0x30 ], %g1
2004ff0: 80 88 60 20 btst 0x20, %g1
2004ff4: 02 80 00 03 be 2005000 <iproc+0x18> <== ALWAYS TAKEN
2004ff8: ba 10 00 18 mov %i0, %i5
c &= 0x7f;
2004ffc: ba 0e 20 7f and %i0, 0x7f, %i5 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
2005000: 80 88 62 00 btst 0x200, %g1
2005004: 02 80 00 0d be 2005038 <iproc+0x50>
2005008: 80 a7 60 0d cmp %i5, 0xd
c = tolower (c);
200500c: 05 00 80 74 sethi %hi(0x201d000), %g2
2005010: c6 00 a1 5c ld [ %g2 + 0x15c ], %g3 ! 201d15c <__ctype_ptr__>
2005014: 84 10 00 1d mov %i5, %g2
2005018: ba 00 c0 1d add %g3, %i5, %i5
200501c: c6 0f 60 01 ldub [ %i5 + 1 ], %g3
2005020: 86 08 e0 03 and %g3, 3, %g3
2005024: 80 a0 e0 01 cmp %g3, 1
2005028: 22 80 00 02 be,a 2005030 <iproc+0x48>
200502c: 84 00 a0 20 add %g2, 0x20, %g2
2005030: ba 08 a0 ff and %g2, 0xff, %i5
if (c == '\r') {
2005034: 80 a7 60 0d cmp %i5, 0xd
2005038: 02 80 00 17 be 2005094 <iproc+0xac>
200503c: 80 a7 60 0a cmp %i5, 0xa
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
2005040: 02 80 00 40 be 2005140 <iproc+0x158>
2005044: 80 a7 60 00 cmp %i5, 0
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2005048: 32 80 00 1a bne,a 20050b0 <iproc+0xc8> <== ALWAYS TAKEN
200504c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
2005050: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2005054: 05 00 80 73 sethi %hi(0x201cc00), %g2
2005058: c4 00 a3 94 ld [ %g2 + 0x394 ], %g2 ! 201cf94 <rtems_termios_cbufsize>
200505c: 84 00 bf ff add %g2, -1, %g2
2005060: 80 a0 40 02 cmp %g1, %g2
2005064: 16 80 00 46 bge 200517c <iproc+0x194> <== NEVER TAKEN
2005068: b0 10 20 00 clr %i0
if (tty->termios.c_lflag & ECHO)
200506c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2
2005070: 80 88 a0 08 btst 8, %g2
2005074: 12 80 00 38 bne 2005154 <iproc+0x16c> <== ALWAYS TAKEN
2005078: 90 10 00 1d mov %i5, %o0
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
200507c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3
2005080: 84 00 60 01 add %g1, 1, %g2
2005084: fa 28 c0 01 stb %i5, [ %g3 + %g1 ]
2005088: c4 26 60 20 st %g2, [ %i1 + 0x20 ]
}
return 0;
}
200508c: 81 c7 e0 08 ret
2005090: 91 e8 20 00 restore %g0, 0, %o0
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
2005094: 80 88 60 80 btst 0x80, %g1
2005098: 12 80 00 39 bne 200517c <iproc+0x194> <== NEVER TAKEN
200509c: b0 10 20 00 clr %i0
return 0;
if (tty->termios.c_iflag & ICRNL)
20050a0: 80 88 61 00 btst 0x100, %g1
20050a4: 32 80 00 02 bne,a 20050ac <iproc+0xc4> <== ALWAYS TAKEN
20050a8: ba 10 20 0a mov 0xa, %i5
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
20050ac: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
20050b0: 80 88 60 02 btst 2, %g1
20050b4: 22 bf ff e8 be,a 2005054 <iproc+0x6c>
20050b8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
if (c == tty->termios.c_cc[VERASE]) {
20050bc: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2
20050c0: 80 a0 80 1d cmp %g2, %i5
20050c4: 02 80 00 3d be 20051b8 <iproc+0x1d0>
20050c8: 90 10 00 19 mov %i1, %o0
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
20050cc: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2
20050d0: 80 a0 80 1d cmp %g2, %i5
20050d4: 02 80 00 28 be 2005174 <iproc+0x18c>
20050d8: 92 10 20 01 mov 1, %o1
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
20050dc: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2
20050e0: 80 a0 80 1d cmp %g2, %i5
20050e4: 02 80 00 26 be 200517c <iproc+0x194> <== NEVER TAKEN
20050e8: b0 10 20 01 mov 1, %i0
return 1;
} else if (c == '\n') {
20050ec: 80 a7 60 0a cmp %i5, 0xa
20050f0: 02 80 00 25 be 2005184 <iproc+0x19c>
20050f4: 80 88 60 48 btst 0x48, %g1
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
20050f8: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2
20050fc: 80 a0 80 1d cmp %g2, %i5
2005100: 02 80 00 07 be 200511c <iproc+0x134> <== NEVER TAKEN
2005104: 80 88 60 08 btst 8, %g1
2005108: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2
200510c: 80 a0 80 1d cmp %g2, %i5
2005110: 32 bf ff d1 bne,a 2005054 <iproc+0x6c> <== ALWAYS TAKEN
2005114: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
2005118: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
200511c: 32 80 00 12 bne,a 2005164 <iproc+0x17c> <== NOT EXECUTED
2005120: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2005124: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2005128: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
200512c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
2005130: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] <== NOT EXECUTED
2005134: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
return 1;
2005138: 81 c7 e0 08 ret <== NOT EXECUTED
200513c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
2005140: 80 88 60 40 btst 0x40, %g1
2005144: 32 bf ff da bne,a 20050ac <iproc+0xc4> <== NEVER TAKEN
2005148: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
200514c: 10 bf ff d9 b 20050b0 <iproc+0xc8>
2005150: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
2005154: 7f ff fe f6 call 2004d2c <echo>
2005158: 92 10 00 19 mov %i1, %o1
200515c: 10 bf ff c8 b 200507c <iproc+0x94>
2005160: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
2005164: 7f ff fe f2 call 2004d2c <echo> <== NOT EXECUTED
2005168: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
200516c: 10 bf ff ef b 2005128 <iproc+0x140> <== NOT EXECUTED
2005170: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
2005174: 7f ff ff 0f call 2004db0 <erase>
2005178: b0 10 20 00 clr %i0
return 0;
200517c: 81 c7 e0 08 ret
2005180: 81 e8 00 00 restore
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
2005184: 22 80 00 06 be,a 200519c <iproc+0x1b4> <== NEVER TAKEN
2005188: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
200518c: 90 10 20 0a mov 0xa, %o0
2005190: 7f ff fe e7 call 2004d2c <echo>
2005194: 92 10 00 19 mov %i1, %o1
tty->cbuf[tty->ccount++] = c;
2005198: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
200519c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
20051a0: 86 10 20 0a mov 0xa, %g3
20051a4: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
20051a8: 82 00 60 01 inc %g1
20051ac: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
return 1;
20051b0: 81 c7 e0 08 ret
20051b4: 91 e8 20 01 restore %g0, 1, %o0
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
20051b8: 92 10 20 00 clr %o1
20051bc: 7f ff fe fd call 2004db0 <erase>
20051c0: b0 10 20 00 clr %i0
return 0;
20051c4: 81 c7 e0 08 ret
20051c8: 81 e8 00 00 restore
0201a4e4 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
201a4e4: 9d e3 bf 90 save %sp, -112, %sp
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
201a4e8: 7f ff fe e2 call 201a070 <getpid>
201a4ec: 01 00 00 00 nop
201a4f0: 80 a2 00 18 cmp %o0, %i0
201a4f4: 12 80 00 af bne 201a7b0 <killinfo+0x2cc>
201a4f8: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
201a4fc: 02 80 00 b3 be 201a7c8 <killinfo+0x2e4>
201a500: 82 06 7f ff add %i1, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201a504: 80 a0 60 1f cmp %g1, 0x1f
201a508: 18 80 00 b0 bgu 201a7c8 <killinfo+0x2e4>
201a50c: b7 2e 60 02 sll %i1, 2, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
201a510: 39 00 80 78 sethi %hi(0x201e000), %i4
201a514: a1 2e 60 04 sll %i1, 4, %l0
201a518: b8 17 20 a0 or %i4, 0xa0, %i4
201a51c: 84 24 00 1b sub %l0, %i3, %g2
201a520: 84 07 00 02 add %i4, %g2, %g2
201a524: c4 00 a0 08 ld [ %g2 + 8 ], %g2
201a528: 80 a0 a0 01 cmp %g2, 1
201a52c: 02 80 00 3f be 201a628 <killinfo+0x144>
201a530: b0 10 20 00 clr %i0
/*
* 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 ) )
201a534: 80 a6 60 04 cmp %i1, 4
201a538: 02 80 00 3e be 201a630 <killinfo+0x14c>
201a53c: 80 a6 60 08 cmp %i1, 8
201a540: 02 80 00 3c be 201a630 <killinfo+0x14c>
201a544: 80 a6 60 0b cmp %i1, 0xb
201a548: 02 80 00 3a be 201a630 <killinfo+0x14c>
201a54c: ba 10 20 01 mov 1, %i5
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
201a550: f2 27 bf f4 st %i1, [ %fp + -12 ]
siginfo->si_code = SI_USER;
201a554: fa 27 bf f8 st %i5, [ %fp + -8 ]
if ( !value ) {
201a558: 80 a6 a0 00 cmp %i2, 0
201a55c: 02 80 00 3b be 201a648 <killinfo+0x164>
201a560: bb 2f 40 01 sll %i5, %g1, %i5
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
201a564: c2 06 80 00 ld [ %i2 ], %g1
201a568: c2 27 bf fc st %g1, [ %fp + -4 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
201a56c: 03 00 80 76 sethi %hi(0x201d800), %g1
201a570: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201db00 <_Thread_Dispatch_disable_level>
201a574: 84 00 a0 01 inc %g2
201a578: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
201a57c: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
/*
* 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;
201a580: 03 00 80 78 sethi %hi(0x201e000), %g1
201a584: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 ! 201e04c <_Per_CPU_Information+0xc>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
201a588: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
201a58c: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1
201a590: 80 af 40 01 andncc %i5, %g1, %g0
201a594: 12 80 00 16 bne 201a5ec <killinfo+0x108>
201a598: 07 00 80 78 sethi %hi(0x201e000), %g3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
201a59c: d0 00 e2 2c ld [ %g3 + 0x22c ], %o0 ! 201e22c <_POSIX_signals_Wait_queue>
201a5a0: 86 10 e2 2c or %g3, 0x22c, %g3
/* 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 );
201a5a4: 86 00 e0 04 add %g3, 4, %g3
201a5a8: 80 a2 00 03 cmp %o0, %g3
201a5ac: 32 80 00 0d bne,a 201a5e0 <killinfo+0xfc>
201a5b0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201a5b4: 10 80 00 27 b 201a650 <killinfo+0x16c>
201a5b8: 03 00 80 73 sethi %hi(0x201cc00), %g1
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
201a5bc: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1
201a5c0: 80 af 40 01 andncc %i5, %g1, %g0
201a5c4: 12 80 00 0b bne 201a5f0 <killinfo+0x10c>
201a5c8: 92 10 00 19 mov %i1, %o1
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 ) {
201a5cc: d0 02 00 00 ld [ %o0 ], %o0
/* 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 );
201a5d0: 80 a2 00 03 cmp %o0, %g3
201a5d4: 02 80 00 1f be 201a650 <killinfo+0x16c> <== ALWAYS TAKEN
201a5d8: 03 00 80 73 sethi %hi(0x201cc00), %g1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
201a5dc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 <== NOT EXECUTED
201a5e0: 80 8f 40 01 btst %i5, %g1
201a5e4: 02 bf ff f6 be 201a5bc <killinfo+0xd8>
201a5e8: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
/*
* 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 ) ) {
201a5ec: 92 10 00 19 mov %i1, %o1
201a5f0: 40 00 00 8d call 201a824 <_POSIX_signals_Unblock_thread>
201a5f4: 94 07 bf f4 add %fp, -12, %o2
201a5f8: 80 8a 20 ff btst 0xff, %o0
201a5fc: 12 80 00 5a bne 201a764 <killinfo+0x280>
201a600: 01 00 00 00 nop
/*
* 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 );
201a604: 40 00 00 7f call 201a800 <_POSIX_signals_Set_process_signals>
201a608: 90 10 00 1d mov %i5, %o0
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
201a60c: b6 24 00 1b sub %l0, %i3, %i3
201a610: c2 07 00 1b ld [ %i4 + %i3 ], %g1
201a614: 80 a0 60 02 cmp %g1, 2
201a618: 02 80 00 57 be 201a774 <killinfo+0x290>
201a61c: 11 00 80 78 sethi %hi(0x201e000), %o0
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
201a620: 7f ff bb 73 call 20093ec <_Thread_Enable_dispatch>
201a624: b0 10 20 00 clr %i0
return 0;
}
201a628: 81 c7 e0 08 ret
201a62c: 81 e8 00 00 restore
* 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 ) )
return pthread_kill( pthread_self(), sig );
201a630: 40 00 01 0f call 201aa6c <pthread_self>
201a634: 01 00 00 00 nop
201a638: 40 00 00 d2 call 201a980 <pthread_kill>
201a63c: 92 10 00 19 mov %i1, %o1
201a640: 81 c7 e0 08 ret
201a644: 91 e8 00 08 restore %g0, %o0, %o0
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
201a648: 10 bf ff c9 b 201a56c <killinfo+0x88>
201a64c: c0 27 bf fc clr [ %fp + -4 ]
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201a650: c8 08 61 cc ldub [ %g1 + 0x1cc ], %g4
201a654: 1b 00 80 76 sethi %hi(0x201d800), %o5
201a658: 88 01 20 01 inc %g4
201a65c: 9a 13 62 70 or %o5, 0x270, %o5
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
201a660: 90 10 20 00 clr %o0
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
201a664: 98 03 60 08 add %o5, 8, %o4
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
201a668: 15 04 00 00 sethi %hi(0x10000000), %o2
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 ] )
201a66c: c2 03 40 00 ld [ %o5 ], %g1
201a670: 80 a0 60 00 cmp %g1, 0
201a674: 22 80 00 31 be,a 201a738 <killinfo+0x254> <== NEVER TAKEN
201a678: 9a 03 60 04 add %o5, 4, %o5 <== NOT EXECUTED
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
201a67c: c2 00 60 04 ld [ %g1 + 4 ], %g1
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
201a680: f4 10 60 10 lduh [ %g1 + 0x10 ], %i2
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a684: 80 a6 a0 00 cmp %i2, 0
201a688: 02 80 00 2b be 201a734 <killinfo+0x250>
201a68c: f0 00 60 1c ld [ %g1 + 0x1c ], %i0
201a690: 82 10 20 01 mov 1, %g1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
201a694: 85 28 60 02 sll %g1, 2, %g2
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
the_thread = (Thread_Control *) object_table[ index ];
201a698: c4 06 00 02 ld [ %i0 + %g2 ], %g2
if ( !the_thread )
201a69c: 80 a0 a0 00 cmp %g2, 0
201a6a0: 22 80 00 22 be,a 201a728 <killinfo+0x244>
201a6a4: 82 00 60 01 inc %g1
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
201a6a8: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3
201a6ac: 80 a0 c0 04 cmp %g3, %g4
201a6b0: 38 80 00 1e bgu,a 201a728 <killinfo+0x244>
201a6b4: 82 00 60 01 inc %g1
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
201a6b8: de 00 a1 5c ld [ %g2 + 0x15c ], %o7
201a6bc: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7
201a6c0: 80 af 40 0f andncc %i5, %o7, %g0
201a6c4: 22 80 00 19 be,a 201a728 <killinfo+0x244>
201a6c8: 82 00 60 01 inc %g1
*
* 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 ) {
201a6cc: 80 a0 c0 04 cmp %g3, %g4
201a6d0: 2a 80 00 14 bcs,a 201a720 <killinfo+0x23c>
201a6d4: 88 10 00 03 mov %g3, %g4
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
201a6d8: 80 a2 20 00 cmp %o0, 0
201a6dc: 22 80 00 13 be,a 201a728 <killinfo+0x244> <== NEVER TAKEN
201a6e0: 82 00 60 01 inc %g1 <== NOT EXECUTED
201a6e4: de 02 20 10 ld [ %o0 + 0x10 ], %o7
201a6e8: 80 a3 e0 00 cmp %o7, 0
201a6ec: 22 80 00 0f be,a 201a728 <killinfo+0x244> <== NEVER TAKEN
201a6f0: 82 00 60 01 inc %g1 <== NOT EXECUTED
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201a6f4: d6 00 a0 10 ld [ %g2 + 0x10 ], %o3
201a6f8: 80 a2 e0 00 cmp %o3, 0
201a6fc: 22 80 00 09 be,a 201a720 <killinfo+0x23c>
201a700: 88 10 00 03 mov %g3, %g4
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
201a704: 80 8b c0 0a btst %o7, %o2
201a708: 32 80 00 08 bne,a 201a728 <killinfo+0x244>
201a70c: 82 00 60 01 inc %g1
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
201a710: 80 8a c0 0a btst %o3, %o2
201a714: 22 80 00 05 be,a 201a728 <killinfo+0x244>
201a718: 82 00 60 01 inc %g1
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201a71c: 88 10 00 03 mov %g3, %g4
201a720: 90 10 00 02 mov %g2, %o0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a724: 82 00 60 01 inc %g1
201a728: 80 a6 80 01 cmp %i2, %g1
201a72c: 1a bf ff db bcc 201a698 <killinfo+0x1b4>
201a730: 85 28 60 02 sll %g1, 2, %g2
201a734: 9a 03 60 04 add %o5, 4, %o5
* + 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++) {
201a738: 80 a3 40 0c cmp %o5, %o4
201a73c: 32 bf ff cd bne,a 201a670 <killinfo+0x18c>
201a740: c2 03 40 00 ld [ %o5 ], %g1
}
}
}
}
if ( interested ) {
201a744: 80 a2 20 00 cmp %o0, 0
201a748: 02 bf ff af be 201a604 <killinfo+0x120>
201a74c: 92 10 00 19 mov %i1, %o1
/*
* 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 ) ) {
201a750: 40 00 00 35 call 201a824 <_POSIX_signals_Unblock_thread>
201a754: 94 07 bf f4 add %fp, -12, %o2
201a758: 80 8a 20 ff btst 0xff, %o0
201a75c: 02 bf ff aa be 201a604 <killinfo+0x120> <== ALWAYS TAKEN
201a760: 01 00 00 00 nop
_Thread_Enable_dispatch();
201a764: 7f ff bb 22 call 20093ec <_Thread_Enable_dispatch>
201a768: b0 10 20 00 clr %i0 ! 0 <PROM_START>
return 0;
201a76c: 81 c7 e0 08 ret
201a770: 81 e8 00 00 restore
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
201a774: 7f ff b3 3a call 200745c <_Chain_Get>
201a778: 90 12 22 20 or %o0, 0x220, %o0
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
201a77c: 92 92 20 00 orcc %o0, 0, %o1
201a780: 02 80 00 18 be 201a7e0 <killinfo+0x2fc>
201a784: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201a788: 11 00 80 78 sethi %hi(0x201e000), %o0
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
201a78c: c2 22 60 08 st %g1, [ %o1 + 8 ]
201a790: c2 07 bf f8 ld [ %fp + -8 ], %g1
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201a794: 90 12 22 98 or %o0, 0x298, %o0
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
201a798: c2 22 60 0c st %g1, [ %o1 + 0xc ]
201a79c: c2 07 bf fc ld [ %fp + -4 ], %g1
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201a7a0: 90 02 00 1b add %o0, %i3, %o0
201a7a4: 7f ff b3 1a call 200740c <_Chain_Append>
201a7a8: c2 22 60 10 st %g1, [ %o1 + 0x10 ]
201a7ac: 30 bf ff 9d b,a 201a620 <killinfo+0x13c>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
201a7b0: 7f ff d4 c7 call 200facc <__errno>
201a7b4: b0 10 3f ff mov -1, %i0
201a7b8: 82 10 20 03 mov 3, %g1
201a7bc: c2 22 00 00 st %g1, [ %o0 ]
201a7c0: 81 c7 e0 08 ret
201a7c4: 81 e8 00 00 restore
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
201a7c8: 7f ff d4 c1 call 200facc <__errno>
201a7cc: b0 10 3f ff mov -1, %i0
201a7d0: 82 10 20 16 mov 0x16, %g1
201a7d4: c2 22 00 00 st %g1, [ %o0 ]
201a7d8: 81 c7 e0 08 ret
201a7dc: 81 e8 00 00 restore
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
201a7e0: 7f ff bb 03 call 20093ec <_Thread_Enable_dispatch>
201a7e4: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EAGAIN );
201a7e8: 7f ff d4 b9 call 200facc <__errno>
201a7ec: 01 00 00 00 nop
201a7f0: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
201a7f4: c2 22 00 00 st %g1, [ %o0 ]
201a7f8: 81 c7 e0 08 ret
201a7fc: 81 e8 00 00 restore
02003854 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
2003854: 9d e3 bf a0 save %sp, -96, %sp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
2003858: 03 00 80 77 sethi %hi(0x201dc00), %g1
200385c: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201dc54 <_System_state_Current>
2003860: 80 a0 60 03 cmp %g1, 3
2003864: 02 80 00 04 be 2003874 <libc_wrapup+0x20> <== ALWAYS TAKEN
2003868: 3b 00 80 74 sethi %hi(0x201d000), %i5
200386c: 81 c7 e0 08 ret <== NOT EXECUTED
2003870: 81 e8 00 00 restore <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
2003874: 05 00 80 70 sethi %hi(0x201c000), %g2
2003878: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
200387c: f8 00 a3 10 ld [ %g2 + 0x310 ], %i4
2003880: 80 a0 40 1c cmp %g1, %i4
2003884: 02 80 00 05 be 2003898 <libc_wrapup+0x44>
2003888: 01 00 00 00 nop
_wrapup_reent(_global_impure_ptr);
200388c: 40 00 33 cc call 20107bc <_wrapup_reent>
2003890: 90 10 00 1c mov %i4, %o0
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
2003894: f8 27 61 60 st %i4, [ %i5 + 0x160 ]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
2003898: 40 00 30 df call 200fc14 <fclose>
200389c: d0 07 20 04 ld [ %i4 + 4 ], %o0
fclose (stdout);
20038a0: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
20038a4: 40 00 30 dc call 200fc14 <fclose>
20038a8: d0 00 60 08 ld [ %g1 + 8 ], %o0
fclose (stderr);
20038ac: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
20038b0: f0 00 60 0c ld [ %g1 + 0xc ], %i0
20038b4: 40 00 30 d8 call 200fc14 <fclose>
20038b8: 81 e8 00 00 restore
020032a8 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
20032a8: 9d e3 bf a0 save %sp, -96, %sp
void *return_this;
MSBUMP(malloc_calls, 1);
20032ac: 03 00 80 76 sethi %hi(0x201d800), %g1
20032b0: 82 10 61 50 or %g1, 0x150, %g1 ! 201d950 <rtems_malloc_statistics>
20032b4: c4 00 60 04 ld [ %g1 + 4 ], %g2
#include "malloc_p.h"
void *malloc(
size_t size
)
{
20032b8: ba 10 00 18 mov %i0, %i5
void *return_this;
MSBUMP(malloc_calls, 1);
20032bc: 84 00 a0 01 inc %g2
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
20032c0: 7f ff ff aa call 2003168 <malloc_deferred_frees_process>
20032c4: c4 20 60 04 st %g2, [ %g1 + 4 ]
/*
* Validate the parameters
*/
if ( !size )
20032c8: 80 a7 60 00 cmp %i5, 0
20032cc: 02 80 00 1e be 2003344 <malloc+0x9c>
20032d0: b0 10 20 00 clr %i0
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
20032d4: 03 00 80 77 sethi %hi(0x201dc00), %g1
20032d8: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201dc54 <_System_state_Current>
20032dc: 80 a0 60 03 cmp %g1, 3
20032e0: 02 80 00 1b be 200334c <malloc+0xa4>
20032e4: 03 00 80 73 sethi %hi(0x201cc00), %g1
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
20032e8: d0 00 62 70 ld [ %g1 + 0x270 ], %o0 ! 201ce70 <RTEMS_Malloc_Heap>
20032ec: 92 10 00 1d mov %i5, %o1
20032f0: 94 10 20 00 clr %o2
20032f4: 40 00 15 15 call 2008748 <_Protected_heap_Allocate_aligned_with_boundary>
20032f8: 96 10 20 00 clr %o3
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
20032fc: b0 92 20 00 orcc %o0, 0, %i0
2003300: 02 80 00 21 be 2003384 <malloc+0xdc> <== NEVER TAKEN
2003304: 03 00 80 75 sethi %hi(0x201d400), %g1
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
2003308: 03 00 80 75 sethi %hi(0x201d400), %g1
200330c: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 201d68c <rtems_malloc_dirty_helper>
2003310: 80 a0 60 00 cmp %g1, 0
2003314: 02 80 00 04 be 2003324 <malloc+0x7c>
2003318: 90 10 00 18 mov %i0, %o0
(*rtems_malloc_dirty_helper)( return_this, size );
200331c: 9f c0 40 00 call %g1
2003320: 92 10 00 1d mov %i5, %o1
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2003324: 03 00 80 75 sethi %hi(0x201d400), %g1
2003328: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201d694 <rtems_malloc_statistics_helpers>
200332c: 80 a0 60 00 cmp %g1, 0
2003330: 02 80 00 25 be 20033c4 <malloc+0x11c>
2003334: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
2003338: c2 00 60 04 ld [ %g1 + 4 ], %g1
200333c: 9f c0 40 00 call %g1
2003340: 90 10 00 18 mov %i0, %o0
return return_this;
}
2003344: 81 c7 e0 08 ret
2003348: 81 e8 00 00 restore
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
200334c: 7f ff ff 75 call 2003120 <malloc_is_system_state_OK>
2003350: 01 00 00 00 nop
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2003354: 80 8a 20 ff btst 0xff, %o0
2003358: 02 bf ff fb be 2003344 <malloc+0x9c> <== NEVER TAKEN
200335c: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003360: d0 00 62 70 ld [ %g1 + 0x270 ], %o0 ! 201ce70 <RTEMS_Malloc_Heap>
2003364: 92 10 00 1d mov %i5, %o1
2003368: 94 10 20 00 clr %o2
200336c: 40 00 14 f7 call 2008748 <_Protected_heap_Allocate_aligned_with_boundary>
2003370: 96 10 20 00 clr %o3
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
2003374: b0 92 20 00 orcc %o0, 0, %i0
2003378: 12 bf ff e5 bne 200330c <malloc+0x64>
200337c: 03 00 80 75 sethi %hi(0x201d400), %g1
if (rtems_malloc_sbrk_helpers)
2003380: 03 00 80 75 sethi %hi(0x201d400), %g1
2003384: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 201d690 <rtems_malloc_sbrk_helpers>
2003388: 80 a0 60 00 cmp %g1, 0
200338c: 02 80 00 0a be 20033b4 <malloc+0x10c>
2003390: 01 00 00 00 nop
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
2003394: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003398: 9f c0 40 00 call %g1
200339c: 90 10 00 1d mov %i5, %o0
if ( !return_this ) {
20033a0: 80 a2 20 00 cmp %o0, 0
20033a4: 02 80 00 04 be 20033b4 <malloc+0x10c>
20033a8: 01 00 00 00 nop
20033ac: 10 bf ff d7 b 2003308 <malloc+0x60>
20033b0: b0 10 00 08 mov %o0, %i0
errno = ENOMEM;
20033b4: 40 00 31 c6 call 200facc <__errno>
20033b8: 01 00 00 00 nop
20033bc: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
20033c0: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
20033c4: 81 c7 e0 08 ret
20033c8: 81 e8 00 00 restore
020030fc <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
20030fc: 9d e3 bf a0 save %sp, -96, %sp
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
2003100: 03 00 80 5c sethi %hi(0x2017000), %g1
2003104: fa 00 61 88 ld [ %g1 + 0x188 ], %i5 ! 2017188 <RTEMS_Malloc_Sbrk_amount>
if ( sbrk_amount == 0 )
2003108: 80 a7 60 00 cmp %i5, 0
200310c: 02 80 00 20 be 200318c <malloc_sbrk_extend_and_allocate+0x90><== NEVER TAKEN
2003110: b2 10 00 18 mov %i0, %i1
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
2003114: 92 10 00 1d mov %i5, %o1
2003118: 40 00 3f fe call 2013110 <.udiv>
200311c: 90 06 00 1d add %i0, %i5, %o0
2003120: 40 00 3f c2 call 2013028 <.umul>
2003124: 92 10 00 1d mov %i5, %o1
starting_address = (void *) sbrk(the_size);
2003128: 7f ff f8 b3 call 20013f4 <sbrk>
200312c: ba 10 00 08 mov %o0, %i5
if ( starting_address == (void*) -1 )
2003130: 80 a2 3f ff cmp %o0, -1
2003134: 02 80 00 16 be 200318c <malloc_sbrk_extend_and_allocate+0x90>
2003138: 92 10 00 08 mov %o0, %o1
return (void *) 0;
if ( !_Protected_heap_Extend(
200313c: 39 00 80 59 sethi %hi(0x2016400), %i4
2003140: d0 07 21 60 ld [ %i4 + 0x160 ], %o0 ! 2016560 <RTEMS_Malloc_Heap>
2003144: 40 00 14 a1 call 20083c8 <_Protected_heap_Extend>
2003148: 94 10 00 1d mov %i5, %o2
200314c: 80 8a 20 ff btst 0xff, %o0
2003150: 02 80 00 09 be 2003174 <malloc_sbrk_extend_and_allocate+0x78>
2003154: 03 00 80 5c sethi %hi(0x2017000), %g1
2003158: f0 07 21 60 ld [ %i4 + 0x160 ], %i0
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
200315c: c4 00 61 58 ld [ %g1 + 0x158 ], %g2
2003160: b4 10 20 00 clr %i2
2003164: ba 07 40 02 add %i5, %g2, %i5
2003168: fa 20 61 58 st %i5, [ %g1 + 0x158 ]
200316c: 40 00 14 89 call 2008390 <_Protected_heap_Allocate_aligned_with_boundary>
2003170: 97 e8 20 00 restore %g0, 0, %o3
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
2003174: 7f ff f8 a0 call 20013f4 <sbrk>
2003178: 90 20 00 1d neg %i5, %o0
errno = ENOMEM;
200317c: 40 00 32 2c call 200fa2c <__errno>
2003180: 01 00 00 00 nop
2003184: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
2003188: c2 22 00 00 st %g1, [ %o0 ]
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
200318c: 81 c7 e0 08 ret
2003190: 91 e8 20 00 restore %g0, 0, %o0
02003194 <malloc_sbrk_initialize>:
void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
2003194: 9d e3 bf a0 save %sp, -96, %sp
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
2003198: 03 00 80 5c sethi %hi(0x2017000), %g1
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
200319c: 80 a6 20 00 cmp %i0, 0
20031a0: 02 80 00 04 be 20031b0 <malloc_sbrk_initialize+0x1c>
20031a4: f2 20 61 88 st %i1, [ %g1 + 0x188 ]
}
starting_address = (void *)uaddress;
}
return starting_address;
}
20031a8: 81 c7 e0 08 ret
20031ac: 81 e8 00 00 restore
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
20031b0: 7f ff f8 91 call 20013f4 <sbrk>
20031b4: 90 10 00 19 mov %i1, %o0
if (uaddress == (uintptr_t) -1) {
20031b8: 80 a2 3f ff cmp %o0, -1
20031bc: 02 80 00 08 be 20031dc <malloc_sbrk_initialize+0x48> <== ALWAYS TAKEN
20031c0: 80 8a 20 07 btst 7, %o0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
20031c4: 02 80 00 04 be 20031d4 <malloc_sbrk_initialize+0x40> <== NOT EXECUTED
20031c8: 01 00 00 00 nop <== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
20031cc: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED
20031d0: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
20031d4: 81 c7 e0 08 ret <== NOT EXECUTED
20031d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
if (uaddress == (uintptr_t) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
20031dc: 40 00 0e df call 2006d58 <rtems_fatal_error_occurred>
20031e0: 90 10 20 1a mov 0x1a, %o0
0200e204 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
200e204: 9d e3 bf a0 save %sp, -96, %sp
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200e208: 80 a6 60 00 cmp %i1, 0
200e20c: 04 80 00 0f ble 200e248 <memfile_free_blocks_in_table+0x44><== NEVER TAKEN
200e210: d0 06 00 00 ld [ %i0 ], %o0
200e214: ba 10 00 08 mov %o0, %i5
200e218: b8 10 20 00 clr %i4
if ( b[i] ) {
200e21c: d0 07 40 00 ld [ %i5 ], %o0
200e220: 80 a2 20 00 cmp %o0, 0
200e224: 02 80 00 05 be 200e238 <memfile_free_blocks_in_table+0x34>
200e228: b8 07 20 01 inc %i4
memfile_free_block( b[i] );
200e22c: 7f ff ff ed call 200e1e0 <memfile_free_block>
200e230: 01 00 00 00 nop
b[i] = 0;
200e234: c0 27 40 00 clr [ %i5 ]
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200e238: 80 a7 00 19 cmp %i4, %i1
200e23c: 12 bf ff f8 bne 200e21c <memfile_free_blocks_in_table+0x18>
200e240: ba 07 60 04 add %i5, 4, %i5
200e244: d0 06 00 00 ld [ %i0 ], %o0
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
200e248: 7f ff ff e6 call 200e1e0 <memfile_free_block>
200e24c: 01 00 00 00 nop
*block_table = 0;
200e250: c0 26 00 00 clr [ %i0 ]
}
200e254: 81 c7 e0 08 ret
200e258: 81 e8 00 00 restore
0200e830 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
200e830: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
200e834: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
200e838: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
200e83c: 80 a0 40 19 cmp %g1, %i1
200e840: 06 80 00 13 bl 200e88c <memfile_ftruncate+0x5c> <== NEVER TAKEN
200e844: 90 10 00 1d mov %i5, %o0
200e848: 22 80 00 0d be,a 200e87c <memfile_ftruncate+0x4c>
200e84c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
/*
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
200e850: f2 27 60 50 st %i1, [ %i5 + 0x50 ]
200e854: f4 27 60 54 st %i2, [ %i5 + 0x54 ]
iop->size = the_jnode->info.file.size;
200e858: f2 26 20 08 st %i1, [ %i0 + 8 ]
200e85c: f4 26 20 0c st %i2, [ %i0 + 0xc ]
IMFS_update_atime( the_jnode );
200e860: 90 07 bf f8 add %fp, -8, %o0
200e864: 7f ff d1 d9 call 2002fc8 <gettimeofday>
200e868: 92 10 20 00 clr %o1
200e86c: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e870: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return 0;
}
200e874: 81 c7 e0 08 ret
200e878: 91 e8 20 00 restore %g0, 0, %o0
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
200e87c: 80 a0 40 1a cmp %g1, %i2
200e880: 3a bf ff f5 bcc,a 200e854 <memfile_ftruncate+0x24>
200e884: f2 27 60 50 st %i1, [ %i5 + 0x50 ]
return IMFS_memfile_extend( the_jnode, length );
200e888: 90 10 00 1d mov %i5, %o0
200e88c: 92 10 00 19 mov %i1, %o1
200e890: 7f ff fe dd call 200e404 <IMFS_memfile_extend>
200e894: 94 10 00 1a mov %i2, %o2
200e898: 81 c7 e0 08 ret
200e89c: 91 e8 00 08 restore %g0, %o0, %o0
0200e8a0 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
200e8a0: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
200e8a4: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
if (the_jnode->type == IMFS_LINEAR_FILE) {
200e8a8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200e8ac: 80 a0 60 06 cmp %g1, 6
200e8b0: 02 80 00 0f be 200e8ec <memfile_lseek+0x4c>
200e8b4: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
200e8b8: 90 10 00 1d mov %i5, %o0
200e8bc: 92 10 00 02 mov %g2, %o1
200e8c0: 7f ff fe d1 call 200e404 <IMFS_memfile_extend>
200e8c4: 94 10 00 03 mov %g3, %o2
200e8c8: 80 a2 20 00 cmp %o0, 0
200e8cc: 12 80 00 19 bne 200e930 <memfile_lseek+0x90>
200e8d0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
200e8d4: d8 1f 60 50 ldd [ %i5 + 0x50 ], %o4
200e8d8: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
200e8dc: d8 3e 20 08 std %o4, [ %i0 + 8 ]
}
return iop->offset;
}
200e8e0: b0 10 00 02 mov %g2, %i0
200e8e4: 81 c7 e0 08 ret
200e8e8: 93 e8 00 03 restore %g0, %g3, %o1
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
200e8ec: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
200e8f0: 80 a0 80 01 cmp %g2, %g1
200e8f4: 14 80 00 08 bg 200e914 <memfile_lseek+0x74> <== NEVER TAKEN
200e8f8: c8 07 60 54 ld [ %i5 + 0x54 ], %g4
200e8fc: 80 a0 80 01 cmp %g2, %g1
200e900: 32 bf ff f9 bne,a 200e8e4 <memfile_lseek+0x44> <== NEVER TAKEN
200e904: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
200e908: 80 a0 c0 04 cmp %g3, %g4
200e90c: 28 bf ff f6 bleu,a 200e8e4 <memfile_lseek+0x44> <== ALWAYS TAKEN
200e910: b0 10 00 02 mov %g2, %i0
iop->offset = the_jnode->info.linearfile.size;
200e914: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED
200e918: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
200e91c: c8 26 20 14 st %g4, [ %i0 + 0x14 ] <== NOT EXECUTED
200e920: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
200e924: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
200e928: 81 c7 e0 08 ret <== NOT EXECUTED
200e92c: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
200e930: 40 00 04 67 call 200facc <__errno>
200e934: 01 00 00 00 nop
200e938: 05 3f ff ff sethi %hi(0xfffffc00), %g2
200e93c: 82 10 20 1c mov 0x1c, %g1
200e940: 84 10 a3 ff or %g2, 0x3ff, %g2
200e944: c2 22 00 00 st %g1, [ %o0 ]
200e948: 10 bf ff e6 b 200e8e0 <memfile_lseek+0x40>
200e94c: 86 10 00 02 mov %g2, %g3
0200e780 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200e780: 9d e3 bf a0 save %sp, -96, %sp
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
200e784: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200e788: ba 10 00 18 mov %i0, %i5
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
200e78c: 80 88 62 04 btst 0x204, %g1
200e790: 02 80 00 06 be 200e7a8 <memfile_open+0x28>
200e794: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
200e798: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
200e79c: 80 a0 a0 06 cmp %g2, 6
200e7a0: 22 80 00 0c be,a 200e7d0 <memfile_open+0x50> <== NEVER TAKEN
200e7a4: d8 07 20 54 ld [ %i4 + 0x54 ], %o4 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
200e7a8: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
200e7ac: 80 88 62 00 btst 0x200, %g1
200e7b0: 22 80 00 05 be,a 200e7c4 <memfile_open+0x44>
200e7b4: c4 3f 60 08 std %g2, [ %i5 + 8 ]
iop->offset = the_jnode->info.file.size;
200e7b8: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
200e7bc: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2
iop->size = the_jnode->info.file.size;
200e7c0: c4 3f 60 08 std %g2, [ %i5 + 8 ]
return 0;
200e7c4: b0 10 20 00 clr %i0
}
200e7c8: 81 c7 e0 08 ret
200e7cc: 81 e8 00 00 restore
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
200e7d0: d6 07 20 58 ld [ %i4 + 0x58 ], %o3 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
200e7d4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
200e7d8: c0 27 20 50 clr [ %i4 + 0x50 ] <== NOT EXECUTED
200e7dc: c0 27 20 54 clr [ %i4 + 0x54 ] <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
200e7e0: c2 27 20 4c st %g1, [ %i4 + 0x4c ] <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
200e7e4: c0 27 20 58 clr [ %i4 + 0x58 ] <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
200e7e8: c0 27 20 5c clr [ %i4 + 0x5c ] <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
200e7ec: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED
200e7f0: 12 80 00 06 bne 200e808 <memfile_open+0x88> <== NOT EXECUTED
200e7f4: c0 27 20 60 clr [ %i4 + 0x60 ] <== NOT EXECUTED
200e7f8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
200e7fc: 84 10 20 00 clr %g2 <== NOT EXECUTED
200e800: 10 bf ff eb b 200e7ac <memfile_open+0x2c> <== NOT EXECUTED
200e804: 86 10 20 00 clr %g3 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
200e808: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200e80c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200e810: 94 10 20 00 clr %o2 <== NOT EXECUTED
200e814: 7f ff ff 57 call 200e570 <IMFS_memfile_write> <== NOT EXECUTED
200e818: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200e81c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
200e820: 02 bf ff ea be 200e7c8 <memfile_open+0x48> <== NOT EXECUTED
200e824: 01 00 00 00 nop <== NOT EXECUTED
200e828: 10 bf ff e0 b 200e7a8 <memfile_open+0x28> <== NOT EXECUTED
200e82c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED
020033e8 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
20033e8: 9d e3 bf 80 save %sp, -128, %sp
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
20033ec: 05 00 00 10 sethi %hi(0x4000), %g2
20033f0: 03 00 00 3c sethi %hi(0xf000), %g1
20033f4: 82 0e 40 01 and %i1, %g1, %g1
20033f8: 80 a0 40 02 cmp %g1, %g2
20033fc: 02 80 00 18 be 200345c <mknod+0x74>
2003400: 90 10 00 18 mov %i0, %o0
2003404: 08 80 00 0f bleu 2003440 <mknod+0x58>
2003408: 05 00 00 04 sethi %hi(0x1000), %g2
200340c: 05 00 00 18 sethi %hi(0x6000), %g2
2003410: 80 a0 40 02 cmp %g1, %g2
2003414: 02 80 00 12 be 200345c <mknod+0x74>
2003418: 05 00 00 20 sethi %hi(0x8000), %g2
200341c: 80 a0 40 02 cmp %g1, %g2
2003420: 02 80 00 10 be 2003460 <mknod+0x78> <== ALWAYS TAKEN
2003424: 92 07 bf f8 add %fp, -8, %o1
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2003428: 40 00 31 a9 call 200facc <__errno>
200342c: b0 10 3f ff mov -1, %i0
2003430: 82 10 20 16 mov 0x16, %g1
2003434: c2 22 00 00 st %g1, [ %o0 ]
2003438: 81 c7 e0 08 ret
200343c: 81 e8 00 00 restore
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2003440: 80 a0 40 02 cmp %g1, %g2
2003444: 02 80 00 05 be 2003458 <mknod+0x70>
2003448: 05 00 00 08 sethi %hi(0x2000), %g2
200344c: 80 a0 40 02 cmp %g1, %g2
2003450: 12 bf ff f6 bne 2003428 <mknod+0x40>
2003454: 01 00 00 00 nop
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2003458: 90 10 00 18 mov %i0, %o0
200345c: 92 07 bf f8 add %fp, -8, %o1
2003460: 40 00 02 8b call 2003e8c <rtems_filesystem_get_start_loc>
2003464: 94 07 bf e4 add %fp, -28, %o2
result = (*temp_loc.ops->evalformake_h)(
2003468: c2 07 bf f0 ld [ %fp + -16 ], %g1
200346c: d0 07 bf f8 ld [ %fp + -8 ], %o0
2003470: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003474: 90 06 00 08 add %i0, %o0, %o0
2003478: 92 07 bf e4 add %fp, -28, %o1
200347c: 94 07 bf fc add %fp, -4, %o2
2003480: 9f c0 40 00 call %g1
2003484: b0 10 3f ff mov -1, %i0
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
2003488: 80 a2 20 00 cmp %o0, 0
200348c: 12 bf ff eb bne 2003438 <mknod+0x50>
2003490: c2 07 bf f0 ld [ %fp + -16 ], %g1
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
2003494: d0 07 bf fc ld [ %fp + -4 ], %o0
2003498: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
200349c: 92 10 00 19 mov %i1, %o1
20034a0: 94 10 00 1a mov %i2, %o2
20034a4: 96 10 00 1b mov %i3, %o3
20034a8: 9f c0 40 00 call %g1
20034ac: 98 07 bf e4 add %fp, -28, %o4
20034b0: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &temp_loc );
20034b4: 7f ff fe 94 call 2002f04 <rtems_filesystem_freenode>
20034b8: 90 07 bf e4 add %fp, -28, %o0
return result;
}
20034bc: 81 c7 e0 08 ret
20034c0: 81 e8 00 00 restore
0200354c <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
200354c: 9d e3 bf 88 save %sp, -120, %sp
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
2003550: 80 a6 e0 01 cmp %i3, 1
2003554: 18 80 00 85 bgu 2003768 <mount+0x21c>
2003558: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
200355c: 40 00 23 67 call 200c2f8 <rtems_filesystem_get_mount_handler>
2003560: 90 10 00 1a mov %i2, %o0
if ( !mount_h )
2003564: a2 92 20 00 orcc %o0, 0, %l1
2003568: 02 80 00 80 be 2003768 <mount+0x21c>
200356c: 80 a0 00 19 cmp %g0, %i1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2003570: a0 40 20 00 addx %g0, 0, %l0
2003574: 80 a4 20 00 cmp %l0, 0
2003578: 02 80 00 77 be 2003754 <mount+0x208>
200357c: 90 10 00 19 mov %i1, %o0
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
2003580: 40 00 36 eb call 201112c <strlen>
2003584: ae 10 00 19 mov %i1, %l7
2003588: ac 10 00 08 mov %o0, %l6
200358c: a8 02 20 01 add %o0, 1, %l4
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2003590: 40 00 36 e7 call 201112c <strlen>
2003594: 90 10 00 1a mov %i2, %o0
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2003598: a4 10 20 00 clr %l2
200359c: 80 a6 20 00 cmp %i0, 0
20035a0: 02 80 00 05 be 20035b4 <mount+0x68>
20035a4: aa 10 00 08 mov %o0, %l5
20035a8: 40 00 36 e1 call 201112c <strlen>
20035ac: 90 10 00 18 mov %i0, %o0
20035b0: a4 02 20 01 add %o0, 1, %l2
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
20035b4: 92 05 40 14 add %l5, %l4, %o1
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
20035b8: 90 10 20 01 mov 1, %o0
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
20035bc: 92 02 60 75 add %o1, 0x75, %o1
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
20035c0: 7f ff fd 4b call 2002aec <calloc>
20035c4: 92 02 40 12 add %o1, %l2, %o1
if ( mt_entry != NULL ) {
20035c8: ba 92 20 00 orcc %o0, 0, %i5
20035cc: 02 80 00 5c be 200373c <mount+0x1f0> <== NEVER TAKEN
20035d0: a6 07 60 74 add %i5, 0x74, %l3
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
20035d4: 92 10 00 1a mov %i2, %o1
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
20035d8: aa 05 60 01 inc %l5
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
20035dc: 90 10 00 13 mov %l3, %o0
20035e0: 40 00 33 97 call 201043c <memcpy>
20035e4: 94 10 00 15 mov %l5, %o2
mt_entry->type = str;
str += filesystemtype_size;
20035e8: b4 04 c0 15 add %l3, %l5, %i2
memcpy( str, source_or_null, source_size );
20035ec: 94 10 00 12 mov %l2, %o2
20035f0: 92 10 00 18 mov %i0, %o1
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
20035f4: e6 27 60 6c st %l3, [ %i5 + 0x6c ]
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
20035f8: 40 00 33 91 call 201043c <memcpy>
20035fc: 90 10 00 1a mov %i2, %o0
mt_entry->dev = str;
str += source_size;
2003600: a4 06 80 12 add %i2, %l2, %l2
memcpy( str, target, target_size );
2003604: 92 10 00 17 mov %l7, %o1
2003608: 94 10 00 14 mov %l4, %o2
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
200360c: f4 27 60 70 st %i2, [ %i5 + 0x70 ]
str += source_size;
memcpy( str, target, target_size );
2003610: 40 00 33 8b call 201043c <memcpy>
2003614: 90 10 00 12 mov %l2, %o0
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2003618: 90 07 60 38 add %i5, 0x38, %o0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
200361c: e4 27 60 68 st %l2, [ %i5 + 0x68 ]
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
2003620: fa 27 60 2c st %i5, [ %i5 + 0x2c ]
mt_entry->options = options;
2003624: f6 27 60 30 st %i3, [ %i5 + 0x30 ]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2003628: 94 10 20 30 mov 0x30, %o2
200362c: 13 00 80 6e sethi %hi(0x201b800), %o1
2003630: 40 00 33 83 call 201043c <memcpy>
2003634: 92 12 61 70 or %o1, 0x170, %o1 ! 201b970 <rtems_filesystem_default_pathconf>
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
2003638: 80 a4 20 00 cmp %l0, 0
200363c: 12 80 00 11 bne 2003680 <mount+0x134>
2003640: 03 00 80 73 sethi %hi(0x201cc00), %g1
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
2003644: c4 00 63 7c ld [ %g1 + 0x37c ], %g2 ! 201cf7c <mount_chain>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2003648: 82 10 63 7c or %g1, 0x37c, %g1
200364c: 82 00 60 04 add %g1, 4, %g1
2003650: 80 a0 80 01 cmp %g2, %g1
2003654: 02 80 00 26 be 20036ec <mount+0x1a0> <== ALWAYS TAKEN
2003658: b6 10 20 00 clr %i3
errno = EINVAL;
200365c: 40 00 31 1c call 200facc <__errno> <== NOT EXECUTED
2003660: 01 00 00 00 nop <== NOT EXECUTED
2003664: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2003668: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
200366c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2003670: 7f ff fe 2c call 2002f20 <free> <== NOT EXECUTED
2003674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003678: 81 c7 e0 08 ret
200367c: 81 e8 00 00 restore
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
2003680: 90 10 00 19 mov %i1, %o0
2003684: 92 10 00 16 mov %l6, %o1
2003688: 94 10 20 07 mov 7, %o2
200368c: 96 07 bf ec add %fp, -20, %o3
2003690: 7f ff fd e3 call 2002e1c <rtems_filesystem_evaluate_path>
2003694: 98 10 20 01 mov 1, %o4
2003698: 80 a2 3f ff cmp %o0, -1
200369c: 02 bf ff f4 be 200366c <mount+0x120> <== NEVER TAKEN
20036a0: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
20036a4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
20036a8: 9f c0 40 00 call %g1
20036ac: 90 07 bf ec add %fp, -20, %o0
20036b0: 80 a2 20 01 cmp %o0, 1
20036b4: 02 80 00 4e be 20037ec <mount+0x2a0>
20036b8: d2 07 bf ec ld [ %fp + -20 ], %o1
errno = ENOTDIR;
20036bc: 40 00 31 04 call 200facc <__errno>
20036c0: 01 00 00 00 nop
20036c4: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
20036c8: c2 22 00 00 st %g1, [ %o0 ]
return 0;
cleanup_and_bail:
free( mt_entry );
20036cc: 7f ff fe 15 call 2002f20 <free>
20036d0: 90 10 00 1d mov %i5, %o0
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
20036d4: b6 07 bf ec add %fp, -20, %i3
free( mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
20036d8: b0 10 3f ff mov -1, %i0
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
20036dc: 7f ff fe 0a call 2002f04 <rtems_filesystem_freenode>
20036e0: 90 10 00 1b mov %i3, %o0
return -1;
}
20036e4: 81 c7 e0 08 ret
20036e8: 81 e8 00 00 restore
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
20036ec: 90 10 00 1d mov %i5, %o0
20036f0: 9f c4 40 00 call %l1
20036f4: 92 10 00 1c mov %i4, %o1
20036f8: 80 a2 20 00 cmp %o0, 0
20036fc: 22 80 00 21 be,a 2003780 <mount+0x234>
2003700: 39 00 80 76 sethi %hi(0x201d800), %i4
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
2003704: c2 07 bf f8 ld [ %fp + -8 ], %g1
2003708: 90 10 00 1d mov %i5, %o0
200370c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2003710: 9f c0 40 00 call %g1
2003714: b0 10 3f ff mov -1, %i0
return 0;
cleanup_and_bail:
free( mt_entry );
2003718: 7f ff fe 02 call 2002f20 <free>
200371c: 90 10 00 1d mov %i5, %o0
if ( loc_to_free )
2003720: 80 a6 e0 00 cmp %i3, 0
2003724: 02 bf ff d5 be 2003678 <mount+0x12c> <== NEVER TAKEN
2003728: 90 10 00 1b mov %i3, %o0
rtems_filesystem_freenode( loc_to_free );
200372c: 7f ff fd f6 call 2002f04 <rtems_filesystem_freenode>
2003730: b0 10 3f ff mov -1, %i0
return -1;
}
2003734: 81 c7 e0 08 ret
2003738: 81 e8 00 00 restore
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
200373c: 40 00 30 e4 call 200facc <__errno> <== NOT EXECUTED
2003740: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003744: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2003748: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200374c: 81 c7 e0 08 ret <== NOT EXECUTED
2003750: 81 e8 00 00 restore <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2003754: 2f 00 80 6d sethi %hi(0x201b400), %l7
2003758: a8 10 20 02 mov 2, %l4
200375c: ac 10 20 01 mov 1, %l6
2003760: 10 bf ff 8c b 2003590 <mount+0x44>
2003764: ae 15 e0 40 or %l7, 0x40, %l7
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
2003768: 40 00 30 d9 call 200facc <__errno>
200376c: b0 10 3f ff mov -1, %i0
2003770: 82 10 20 16 mov 0x16, %g1
2003774: c2 22 00 00 st %g1, [ %o0 ]
2003778: 81 c7 e0 08 ret
200377c: 81 e8 00 00 restore
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
2003780: d0 07 21 3c ld [ %i4 + 0x13c ], %o0
2003784: 94 10 20 00 clr %o2
2003788: 40 00 0c 72 call 2006950 <rtems_semaphore_obtain>
200378c: 92 10 20 00 clr %o1
2003790: 92 10 00 1d mov %i5, %o1
2003794: 11 00 80 73 sethi %hi(0x201cc00), %o0
2003798: 40 00 0f 1d call 200740c <_Chain_Append>
200379c: 90 12 23 7c or %o0, 0x37c, %o0 ! 201cf7c <mount_chain>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
20037a0: d0 07 21 3c ld [ %i4 + 0x13c ], %o0
20037a4: 40 00 0c b5 call 2006a78 <rtems_semaphore_release>
20037a8: b0 10 20 00 clr %i0
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
20037ac: 80 a4 20 00 cmp %l0, 0
20037b0: 12 bf ff b2 bne 2003678 <mount+0x12c>
20037b4: 03 00 80 73 sethi %hi(0x201cc00), %g1
rtems_filesystem_root = mt_entry->mt_fs_root;
20037b8: f6 07 60 1c ld [ %i5 + 0x1c ], %i3
20037bc: f8 07 60 20 ld [ %i5 + 0x20 ], %i4
20037c0: c8 07 60 24 ld [ %i5 + 0x24 ], %g4
20037c4: c6 07 60 28 ld [ %i5 + 0x28 ], %g3
20037c8: c4 07 60 2c ld [ %i5 + 0x2c ], %g2
20037cc: c2 00 63 9c ld [ %g1 + 0x39c ], %g1
20037d0: f6 20 60 18 st %i3, [ %g1 + 0x18 ]
20037d4: f8 20 60 1c st %i4, [ %g1 + 0x1c ]
20037d8: c8 20 60 20 st %g4, [ %g1 + 0x20 ]
20037dc: c6 20 60 24 st %g3, [ %g1 + 0x24 ]
20037e0: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
20037e4: 81 c7 e0 08 ret
20037e8: 81 e8 00 00 restore
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
20037ec: 11 00 80 0d sethi %hi(0x2003400), %o0
20037f0: 7f ff ff 3a call 20034d8 <rtems_filesystem_mount_iterate>
20037f4: 90 12 20 c4 or %o0, 0xc4, %o0 ! 20034c4 <is_node_fs_root>
20037f8: 80 8a 20 ff btst 0xff, %o0
20037fc: 02 80 00 07 be 2003818 <mount+0x2cc>
2003800: c4 07 bf f8 ld [ %fp + -8 ], %g2
errno = EBUSY;
2003804: 40 00 30 b2 call 200facc <__errno>
2003808: 01 00 00 00 nop
200380c: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10>
goto cleanup_and_bail;
2003810: 10 bf ff af b 20036cc <mount+0x180>
2003814: c2 22 00 00 st %g1, [ %o0 ]
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
2003818: c6 07 bf ec ld [ %fp + -20 ], %g3
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
200381c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
2003820: c6 27 60 08 st %g3, [ %i5 + 8 ]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
2003824: c4 27 60 14 st %g2, [ %i5 + 0x14 ]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
2003828: c6 07 bf f4 ld [ %fp + -12 ], %g3
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
200382c: c4 07 bf fc ld [ %fp + -4 ], %g2
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
2003830: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2003834: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
2003838: 90 10 00 1d mov %i5, %o0
200383c: 9f c0 40 00 call %g1
2003840: b6 07 bf ec add %fp, -20, %i3
2003844: 80 a2 20 00 cmp %o0, 0
2003848: 02 bf ff aa be 20036f0 <mount+0x1a4> <== ALWAYS TAKEN
200384c: 90 10 00 1d mov %i5, %o0
2003850: 30 bf ff 9f b,a 20036cc <mount+0x180> <== NOT EXECUTED
02003670 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2003670: 9d e3 bf a0 save %sp, -96, %sp
int rv = -1;
if (target != NULL) {
2003674: 90 96 60 00 orcc %i1, 0, %o0
2003678: 02 80 00 0b be 20036a4 <mount_and_make_target_path+0x34>
200367c: 01 00 00 00 nop
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
2003680: 40 00 02 5f call 2003ffc <rtems_mkdir>
2003684: 92 10 21 ff mov 0x1ff, %o1 ! 1ff <PROM_START+0x1ff>
if (rv == 0) {
2003688: 82 92 20 00 orcc %o0, 0, %g1
200368c: 02 80 00 04 be 200369c <mount_and_make_target_path+0x2c> <== ALWAYS TAKEN
2003690: 01 00 00 00 nop
} else {
errno = EINVAL;
}
return rv;
}
2003694: 81 c7 e0 08 ret
2003698: 91 e8 00 01 restore %g0, %g1, %o0
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
200369c: 40 00 00 2a call 2003744 <mount>
20036a0: 81 e8 00 00 restore
options,
data
);
}
} else {
errno = EINVAL;
20036a4: 40 00 30 ab call 200f950 <__errno>
20036a8: 01 00 00 00 nop
20036ac: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
20036b0: 82 10 3f ff mov -1, %g1
options,
data
);
}
} else {
errno = EINVAL;
20036b4: 10 bf ff f8 b 2003694 <mount_and_make_target_path+0x24>
20036b8: c4 22 00 00 st %g2, [ %o0 ]
0200b434 <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
200b434: 9d e3 bf 90 save %sp, -112, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200b438: 03 00 80 9e sethi %hi(0x2027800), %g1
200b43c: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 2027a90 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
200b440: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200b444: 84 00 a0 01 inc %g2
200b448: c4 20 62 90 st %g2, [ %g1 + 0x290 ]
return _Thread_Dispatch_disable_level;
200b44c: c2 00 62 90 ld [ %g1 + 0x290 ], %g1
200b450: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200b454: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200b458: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
200b45c: a0 8e 62 00 andcc %i1, 0x200, %l0
200b460: 12 80 00 34 bne 200b530 <mq_open+0xfc>
200b464: b4 10 20 00 clr %i2
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
200b468: 39 00 80 9f sethi %hi(0x2027c00), %i4
200b46c: 40 00 0c 74 call 200e63c <_Objects_Allocate>
200b470: 90 17 23 5c or %i4, 0x35c, %o0 ! 2027f5c <_POSIX_Message_queue_Information_fds>
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
200b474: ba 92 20 00 orcc %o0, 0, %i5
200b478: 02 80 00 37 be 200b554 <mq_open+0x120> <== NEVER TAKEN
200b47c: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
200b480: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
200b484: 90 10 00 18 mov %i0, %o0
200b488: 40 00 1e f5 call 201305c <_POSIX_Message_queue_Name_to_id>
200b48c: 92 07 bf f4 add %fp, -12, %o1
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
200b490: b6 92 20 00 orcc %o0, 0, %i3
200b494: 22 80 00 0f be,a 200b4d0 <mq_open+0x9c>
200b498: b2 0e 6a 00 and %i1, 0xa00, %i1
/*
* 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) ) ) {
200b49c: 80 a6 e0 02 cmp %i3, 2
200b4a0: 02 80 00 40 be 200b5a0 <mq_open+0x16c>
200b4a4: 80 a4 20 00 cmp %l0, 0
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
200b4a8: 90 17 23 5c or %i4, 0x35c, %o0
200b4ac: 40 00 0d 4e call 200e9e4 <_Objects_Free>
200b4b0: 92 10 00 1d mov %i5, %o1
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
200b4b4: 40 00 11 9e call 200fb2c <_Thread_Enable_dispatch>
200b4b8: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
200b4bc: 40 00 2d a7 call 2016b58 <__errno>
200b4c0: 01 00 00 00 nop
200b4c4: f6 22 00 00 st %i3, [ %o0 ]
200b4c8: 81 c7 e0 08 ret
200b4cc: 81 e8 00 00 restore
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
200b4d0: 80 a6 6a 00 cmp %i1, 0xa00
200b4d4: 02 80 00 28 be 200b574 <mq_open+0x140>
200b4d8: d2 07 bf f4 ld [ %fp + -12 ], %o1
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
200b4dc: 94 07 bf fc add %fp, -4, %o2
200b4e0: 11 00 80 9f sethi %hi(0x2027c00), %o0
200b4e4: 40 00 0d a1 call 200eb68 <_Objects_Get>
200b4e8: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 2027dd0 <_POSIX_Message_queue_Information>
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
200b4ec: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
200b4f0: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
200b4f4: 84 00 a0 01 inc %g2
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
200b4f8: b8 17 23 5c or %i4, 0x35c, %i4
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
200b4fc: c4 22 20 18 st %g2, [ %o0 + 0x18 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200b500: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
200b504: d0 27 bf f8 st %o0, [ %fp + -8 ]
the_mq->open_count += 1;
the_mq_fd->Queue = the_mq;
200b508: d0 27 60 10 st %o0, [ %i5 + 0x10 ]
200b50c: 83 28 60 02 sll %g1, 2, %g1
200b510: fa 20 80 01 st %i5, [ %g2 + %g1 ]
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
200b514: 40 00 11 86 call 200fb2c <_Thread_Enable_dispatch>
200b518: c0 27 60 0c clr [ %i5 + 0xc ]
_Thread_Enable_dispatch();
200b51c: 40 00 11 84 call 200fb2c <_Thread_Enable_dispatch>
200b520: 01 00 00 00 nop
return (mqd_t)the_mq_fd->Object.id;
200b524: f0 07 60 08 ld [ %i5 + 8 ], %i0
200b528: 81 c7 e0 08 ret
200b52c: 81 e8 00 00 restore
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
200b530: 82 07 a0 54 add %fp, 0x54, %g1
200b534: f4 07 a0 50 ld [ %fp + 0x50 ], %i2
200b538: c2 27 bf f0 st %g1, [ %fp + -16 ]
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
200b53c: 39 00 80 9f sethi %hi(0x2027c00), %i4
200b540: 40 00 0c 3f call 200e63c <_Objects_Allocate>
200b544: 90 17 23 5c or %i4, 0x35c, %o0 ! 2027f5c <_POSIX_Message_queue_Information_fds>
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
200b548: ba 92 20 00 orcc %o0, 0, %i5
200b54c: 32 bf ff ce bne,a 200b484 <mq_open+0x50>
200b550: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_Thread_Enable_dispatch();
200b554: 40 00 11 76 call 200fb2c <_Thread_Enable_dispatch>
200b558: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( ENFILE );
200b55c: 40 00 2d 7f call 2016b58 <__errno>
200b560: 01 00 00 00 nop
200b564: 82 10 20 17 mov 0x17, %g1 ! 17 <PROM_START+0x17>
200b568: c2 22 00 00 st %g1, [ %o0 ]
200b56c: 81 c7 e0 08 ret
200b570: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
200b574: 90 17 23 5c or %i4, 0x35c, %o0
200b578: 40 00 0d 1b call 200e9e4 <_Objects_Free>
200b57c: 92 10 00 1d mov %i5, %o1
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
200b580: 40 00 11 6b call 200fb2c <_Thread_Enable_dispatch>
200b584: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
200b588: 40 00 2d 74 call 2016b58 <__errno>
200b58c: 01 00 00 00 nop
200b590: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
200b594: c2 22 00 00 st %g1, [ %o0 ]
200b598: 81 c7 e0 08 ret
200b59c: 81 e8 00 00 restore
if ( status ) {
/*
* 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) ) ) {
200b5a0: 02 bf ff c3 be 200b4ac <mq_open+0x78>
200b5a4: 90 17 23 5c or %i4, 0x35c, %o0
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
200b5a8: 90 10 00 18 mov %i0, %o0
200b5ac: 92 10 20 01 mov 1, %o1
200b5b0: 94 10 00 1a mov %i2, %o2
200b5b4: 40 00 1e 45 call 2012ec8 <_POSIX_Message_queue_Create_support>
200b5b8: 96 07 bf f8 add %fp, -8, %o3
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
200b5bc: 80 a2 3f ff cmp %o0, -1
200b5c0: 02 80 00 0d be 200b5f4 <mq_open+0x1c0>
200b5c4: c6 07 bf f8 ld [ %fp + -8 ], %g3
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
200b5c8: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
200b5cc: b8 17 23 5c or %i4, 0x35c, %i4
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200b5d0: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
200b5d4: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200b5d8: 83 28 60 02 sll %g1, 2, %g1
200b5dc: fa 20 80 01 st %i5, [ %g2 + %g1 ]
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
200b5e0: 40 00 11 53 call 200fb2c <_Thread_Enable_dispatch>
200b5e4: c0 27 60 0c clr [ %i5 + 0xc ]
return (mqd_t) the_mq_fd->Object.id;
200b5e8: f0 07 60 08 ld [ %i5 + 8 ], %i0
}
200b5ec: 81 c7 e0 08 ret
200b5f0: 81 e8 00 00 restore
200b5f4: 90 17 23 5c or %i4, 0x35c, %o0
200b5f8: 92 10 00 1d mov %i5, %o1
200b5fc: 40 00 0c fa call 200e9e4 <_Objects_Free>
200b600: b0 10 3f ff mov -1, %i0
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
200b604: 40 00 11 4a call 200fb2c <_Thread_Enable_dispatch>
200b608: 01 00 00 00 nop
return (mqd_t) -1;
200b60c: 81 c7 e0 08 ret
200b610: 81 e8 00 00 restore
02018ce4 <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
2018ce4: 9d e3 bf 00 save %sp, -256, %sp
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
2018ce8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
2018cec: c0 27 bf f8 clr [ %fp + -8 ]
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
2018cf0: e0 00 60 34 ld [ %g1 + 0x34 ], %l0
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
2018cf4: c0 37 bf fc clrh [ %fp + -4 ]
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2018cf8: 82 10 3f ff mov -1, %g1
uint16_t date = 0;
2018cfc: c0 37 bf fe clrh [ %fp + -2 ]
2018d00: c2 27 bf f0 st %g1, [ %fp + -16 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2018d04: c2 27 bf f4 st %g1, [ %fp + -12 ]
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
2018d08: c0 27 bf e8 clr [ %fp + -24 ]
dir_pos->sname.ofs = 0;
2018d0c: c0 27 bf ec clr [ %fp + -20 ]
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
2018d10: c0 27 bf a8 clr [ %fp + -88 ]
2018d14: c0 27 bf ac clr [ %fp + -84 ]
2018d18: c0 27 bf b0 clr [ %fp + -80 ]
2018d1c: c0 27 bf b4 clr [ %fp + -76 ]
2018d20: c0 27 bf b8 clr [ %fp + -72 ]
2018d24: c0 27 bf bc clr [ %fp + -68 ]
2018d28: c0 27 bf c0 clr [ %fp + -64 ]
2018d2c: c0 27 bf c4 clr [ %fp + -60 ]
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
2018d30: c0 27 bf 68 clr [ %fp + -152 ]
2018d34: c0 27 bf 6c clr [ %fp + -148 ]
2018d38: c0 27 bf 70 clr [ %fp + -144 ]
2018d3c: c0 27 bf 74 clr [ %fp + -140 ]
2018d40: c0 27 bf 78 clr [ %fp + -136 ]
2018d44: c0 27 bf 7c clr [ %fp + -132 ]
2018d48: c0 27 bf 80 clr [ %fp + -128 ]
2018d4c: c0 27 bf 84 clr [ %fp + -124 ]
2018d50: c0 27 bf 88 clr [ %fp + -120 ]
2018d54: c0 27 bf 8c clr [ %fp + -116 ]
2018d58: c0 27 bf 90 clr [ %fp + -112 ]
2018d5c: c0 27 bf 94 clr [ %fp + -108 ]
2018d60: c0 27 bf 98 clr [ %fp + -104 ]
2018d64: c0 27 bf 9c clr [ %fp + -100 ]
2018d68: c0 27 bf a0 clr [ %fp + -96 ]
name_type = msdos_long_to_short (name, name_len,
2018d6c: 94 07 bf a8 add %fp, -88, %o2
2018d70: 96 10 20 0b mov 0xb, %o3
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;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
2018d74: e2 06 00 00 ld [ %i0 ], %l1
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
name_type = msdos_long_to_short (name, name_len,
2018d78: 92 10 00 1b mov %i3, %o1
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
2018d7c: c0 27 bf a4 clr [ %fp + -92 ]
name_type = msdos_long_to_short (name, name_len,
2018d80: 40 00 04 2b call 2019e2c <msdos_long_to_short>
2018d84: 90 10 00 1a mov %i2, %o0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
2018d88: b8 10 00 18 mov %i0, %i4
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
name_type = msdos_long_to_short (name, name_len,
2018d8c: a4 10 00 08 mov %o0, %l2
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
2018d90: c0 2f bf b4 clrb [ %fp + -76 ]
/* set up last write date and time */
time_ret = time(NULL);
2018d94: 90 10 20 00 clr %o0
2018d98: 40 00 25 1c call 2022208 <time>
2018d9c: b0 10 3f ff mov -1, %i0
if ( time_ret == -1 )
2018da0: 80 a2 3f ff cmp %o0, -1
2018da4: 02 80 00 29 be 2018e48 <msdos_creat_node+0x164> <== NEVER TAKEN
2018da8: 92 07 bf fe add %fp, -2, %o1
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
2018dac: 40 00 10 76 call 201cf84 <msdos_date_unix2dos>
2018db0: 94 07 bf fc add %fp, -4, %o2
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
2018db4: c8 17 bf fc lduh [ %fp + -4 ], %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2018db8: c6 17 bf fe lduh [ %fp + -2 ], %g3
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
2018dbc: 89 29 20 10 sll %g4, 0x10, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2018dc0: 87 28 e0 10 sll %g3, 0x10, %g3
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
2018dc4: 85 31 20 08 srl %g4, 8, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2018dc8: 83 30 e0 08 srl %g3, 8, %g1
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
2018dcc: 89 31 20 18 srl %g4, 0x18, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2018dd0: 87 30 e0 18 srl %g3, 0x18, %g3
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
2018dd4: 84 10 80 04 or %g2, %g4, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2018dd8: 82 10 40 03 or %g1, %g3, %g1
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
2018ddc: c4 37 bf b6 sth %g2, [ %fp + -74 ]
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
2018de0: c4 37 bf be sth %g2, [ %fp + -66 ]
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2018de4: c2 37 bf b8 sth %g1, [ %fp + -72 ]
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
2018de8: c2 37 bf c0 sth %g1, [ %fp + -64 ]
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
2018dec: c2 37 bf ba sth %g1, [ %fp + -70 ]
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
2018df0: 80 a6 60 01 cmp %i1, 1
2018df4: 02 80 00 17 be 2018e50 <msdos_creat_node+0x16c>
2018df8: c0 27 bf c4 clr [ %fp + -60 ]
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
2018dfc: 80 a6 60 03 cmp %i1, 3
2018e00: 02 80 00 18 be 2018e60 <msdos_creat_node+0x17c> <== NEVER TAKEN
2018e04: c2 0f bf b3 ldub [ %fp + -77 ], %g1
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
2018e08: 82 10 60 20 or %g1, 0x20, %g1
2018e0c: c2 2f bf b3 stb %g1, [ %fp + -77 ]
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
2018e10: 82 07 bf a8 add %fp, -88, %g1
2018e14: 90 10 00 1c mov %i4, %o0
2018e18: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2018e1c: 92 10 20 01 mov 1, %o1
2018e20: 94 10 00 1a mov %i2, %o2
2018e24: 96 10 00 1b mov %i3, %o3
2018e28: 98 10 00 12 mov %l2, %o4
2018e2c: 40 00 09 cc call 201b55c <msdos_get_name_node>
2018e30: 9a 07 bf e8 add %fp, -24, %o5
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
2018e34: b0 92 20 00 orcc %o0, 0, %i0
2018e38: 12 80 00 04 bne 2018e48 <msdos_creat_node+0x164> <== NEVER TAKEN
2018e3c: 80 a6 60 01 cmp %i1, 1
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
2018e40: 22 80 00 33 be,a 2018f0c <msdos_creat_node+0x228>
2018e44: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
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;
}
2018e48: 81 c7 e0 08 ret
2018e4c: 81 e8 00 00 restore
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
2018e50: c2 0f bf b3 ldub [ %fp + -77 ], %g1
2018e54: 82 10 60 10 or %g1, 0x10, %g1
2018e58: 10 bf ff ee b 2018e10 <msdos_creat_node+0x12c>
2018e5c: c2 2f bf b3 stb %g1, [ %fp + -77 ]
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
2018e60: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
2018e64: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2018e68: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2018e6c: 12 80 00 06 bne 2018e84 <msdos_creat_node+0x1a0> <== NOT EXECUTED
2018e70: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED
2018e74: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 <== NOT EXECUTED
2018e78: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
2018e7c: 32 80 00 07 bne,a 2018e98 <msdos_creat_node+0x1b4> <== NOT EXECUTED
2018e80: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2018e84: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
2018e88: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
2018e8c: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED
2018e90: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2018e94: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
2018e98: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 <== NOT EXECUTED
2018e9c: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
2018ea0: d4 14 00 00 lduh [ %l0 ], %o2 <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
2018ea4: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
2018ea8: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_read(parent_loc->mt_entry,
2018eac: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2018eb0: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
2018eb4: 96 10 20 20 mov 0x20, %o3 <== NOT EXECUTED
2018eb8: 98 07 bf c8 add %fp, -56, %o4 <== NOT EXECUTED
2018ebc: 7f ff eb 51 call 2013c00 <_fat_block_read> <== NOT EXECUTED
2018ec0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
2018ec4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2018ec8: 06 bf ff e0 bl 2018e48 <msdos_creat_node+0x164> <== NOT EXECUTED
2018ecc: c2 0f bf d3 ldub [ %fp + -45 ], %g1 <== NOT EXECUTED
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
2018ed0: de 0f bf d5 ldub [ %fp + -43 ], %o7 <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
2018ed4: f0 17 bf d6 lduh [ %fp + -42 ], %i0 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
2018ed8: fa 17 bf d8 lduh [ %fp + -40 ], %i5 <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
2018edc: c8 07 bf e4 ld [ %fp + -28 ], %g4 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
2018ee0: c6 17 bf e2 lduh [ %fp + -30 ], %g3 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
2018ee4: c4 17 bf dc lduh [ %fp + -36 ], %g2 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
2018ee8: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
2018eec: de 2f bf b5 stb %o7, [ %fp + -75 ] <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
2018ef0: f0 37 bf b6 sth %i0, [ %fp + -74 ] <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
2018ef4: fa 37 bf b8 sth %i5, [ %fp + -72 ] <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
2018ef8: c8 27 bf c4 st %g4, [ %fp + -60 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
2018efc: c6 37 bf c2 sth %g3, [ %fp + -62 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
2018f00: c4 37 bf bc sth %g2, [ %fp + -68 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
2018f04: 10 bf ff c3 b 2018e10 <msdos_creat_node+0x12c> <== NOT EXECUTED
2018f08: c2 2f bf b3 stb %g1, [ %fp + -77 ] <== NOT EXECUTED
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
2018f0c: 92 07 bf e8 add %fp, -24, %o1
2018f10: 7f ff e6 bc call 2012a00 <fat_file_open>
2018f14: 94 07 bf f8 add %fp, -8, %o2
if (rc != RC_OK)
2018f18: b0 92 20 00 orcc %o0, 0, %i0
2018f1c: 32 80 00 58 bne,a 201907c <msdos_creat_node+0x398> <== NEVER TAKEN
2018f20: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
2018f24: fa 07 bf f8 ld [ %fp + -8 ], %i5
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
2018f28: 03 00 08 00 sethi %hi(0x200000), %g1
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
2018f2c: c0 27 60 18 clr [ %i5 + 0x18 ]
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
2018f30: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
2018f34: f2 27 60 10 st %i1, [ %i5 + 0x10 ]
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
2018f38: 03 00 80 b7 sethi %hi(0x202dc00), %g1
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
2018f3c: c4 1f bf a8 ldd [ %fp + -88 ], %g2
2018f40: d8 1f bf b0 ldd [ %fp + -80 ], %o4
2018f44: f4 1f bf b8 ldd [ %fp + -72 ], %i2
2018f48: f0 1f bf c0 ldd [ %fp + -64 ], %i0
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
2018f4c: d2 00 63 84 ld [ %g1 + 0x384 ], %o1
2018f50: 94 10 20 0b mov 0xb, %o2
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
2018f54: c4 3f bf 68 std %g2, [ %fp + -152 ]
2018f58: d8 3f bf 70 std %o4, [ %fp + -144 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
2018f5c: c4 3f bf 88 std %g2, [ %fp + -120 ]
2018f60: d8 3f bf 90 std %o4, [ %fp + -112 ]
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
2018f64: f4 3f bf 78 std %i2, [ %fp + -136 ]
2018f68: f0 3f bf 80 std %i0, [ %fp + -128 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
2018f6c: f4 3f bf 98 std %i2, [ %fp + -104 ]
2018f70: f0 3f bf a0 std %i0, [ %fp + -96 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
2018f74: 40 00 16 ab call 201ea20 <memcpy>
2018f78: 90 07 bf 68 add %fp, -152, %o0
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
2018f7c: 03 00 80 b7 sethi %hi(0x202dc00), %g1
2018f80: d2 00 63 80 ld [ %g1 + 0x380 ], %o1 ! 202df80 <MSDOS_DOTDOT_NAME>
2018f84: 90 07 bf 88 add %fp, -120, %o0
2018f88: 40 00 16 a6 call 201ea20 <memcpy>
2018f8c: 94 10 20 0b mov 0xb, %o2
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
2018f90: c2 04 60 20 ld [ %l1 + 0x20 ], %g1
2018f94: 80 a0 60 01 cmp %g1, 1
2018f98: 22 80 00 3e be,a 2019090 <msdos_creat_node+0x3ac>
2018f9c: c2 04 60 24 ld [ %l1 + 0x24 ], %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
2018fa0: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
2018fa4: 85 28 60 10 sll %g1, 0x10, %g2
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
2018fa8: 83 30 60 10 srl %g1, 0x10, %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
2018fac: 89 30 a0 08 srl %g2, 8, %g4
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
2018fb0: 83 28 60 10 sll %g1, 0x10, %g1
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
2018fb4: 85 30 a0 18 srl %g2, 0x18, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
2018fb8: 87 30 60 08 srl %g1, 8, %g3
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
2018fbc: 84 11 00 02 or %g4, %g2, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
2018fc0: 83 30 60 18 srl %g1, 0x18, %g1
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
2018fc4: c4 37 bf a2 sth %g2, [ %fp + -94 ]
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
2018fc8: 82 10 c0 01 or %g3, %g1, %g1
2018fcc: c2 37 bf 9c sth %g1, [ %fp + -100 ]
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
2018fd0: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
2018fd4: 92 10 00 1d mov %i5, %o1
2018fd8: 94 10 20 00 clr %o2
2018fdc: 96 10 20 40 mov 0x40, %o3
2018fe0: 7f ff e8 e6 call 2013378 <fat_file_write>
2018fe4: 98 07 bf 68 add %fp, -152, %o4
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
2018fe8: 80 a2 20 00 cmp %o0, 0
2018fec: 06 80 00 33 bl 20190b8 <msdos_creat_node+0x3d4> <== NEVER TAKEN
2018ff0: d2 07 bf f8 ld [ %fp + -8 ], %o1
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
2018ff4: c2 14 20 06 lduh [ %l0 + 6 ], %g1
2018ff8: c6 02 60 18 ld [ %o1 + 0x18 ], %g3
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
2018ffc: c4 02 60 1c ld [ %o1 + 0x1c ], %g2
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
2019000: 82 00 c0 01 add %g3, %g1, %g1
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
2019004: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
2019008: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
201900c: 83 28 a0 10 sll %g2, 0x10, %g1
2019010: 89 30 60 08 srl %g1, 8, %g4
/* 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)) =
2019014: 83 30 60 18 srl %g1, 0x18, %g1
2019018: 82 11 00 01 or %g4, %g1, %g1
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
201901c: 85 30 a0 10 srl %g2, 0x10, %g2
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
2019020: c2 37 bf 82 sth %g1, [ %fp + -126 ]
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));
2019024: 85 28 a0 10 sll %g2, 0x10, %g2
2019028: 87 30 a0 08 srl %g2, 8, %g3
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)) =
201902c: 85 30 a0 18 srl %g2, 0x18, %g2
2019030: 82 10 c0 02 or %g3, %g2, %g1
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
2019034: 94 10 20 00 clr %o2
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)) =
2019038: c2 37 bf 7c sth %g1, [ %fp + -132 ]
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
201903c: 96 10 20 20 mov 0x20, %o3
2019040: 7f ff e8 ce call 2013378 <fat_file_write>
2019044: 98 07 bf 68 add %fp, -152, %o4
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
2019048: 80 a2 20 00 cmp %o0, 0
201904c: 06 80 00 08 bl 201906c <msdos_creat_node+0x388> <== NEVER TAKEN
2019050: b0 10 3f ff mov -1, %i0
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
2019054: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
2019058: 40 00 04 86 call 201a270 <msdos_set_first_cluster_num>
201905c: d2 07 bf f8 ld [ %fp + -8 ], %o1
if (rc != RC_OK)
2019060: b0 92 20 00 orcc %o0, 0, %i0
2019064: 22 80 00 17 be,a 20190c0 <msdos_creat_node+0x3dc> <== ALWAYS TAKEN
2019068: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
201906c: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
2019070: 7f ff e7 e0 call 2012ff0 <fat_file_close> <== NOT EXECUTED
2019074: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
2019078: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
201907c: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
2019080: 40 00 04 de call 201a3f8 <msdos_set_first_char4file_name> <== NOT EXECUTED
2019084: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
return rc;
}
2019088: 81 c7 e0 08 ret <== NOT EXECUTED
201908c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
2019090: 80 a0 60 00 cmp %g1, 0
2019094: 32 bf ff c4 bne,a 2018fa4 <msdos_creat_node+0x2c0> <== NEVER TAKEN
2019098: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
201909c: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
20190a0: 80 88 60 04 btst 4, %g1
20190a4: 22 bf ff c0 be,a 2018fa4 <msdos_creat_node+0x2c0> <== ALWAYS TAKEN
20190a8: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
20190ac: c0 37 bf a2 clrh [ %fp + -94 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
20190b0: 10 bf ff c8 b 2018fd0 <msdos_creat_node+0x2ec> <== NOT EXECUTED
20190b4: c0 37 bf 9c clrh [ %fp + -100 ] <== NOT EXECUTED
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
{
rc = -1;
20190b8: 10 bf ff ed b 201906c <msdos_creat_node+0x388> <== NOT EXECUTED
20190bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
20190c0: 7f ff e7 cc call 2012ff0 <fat_file_close>
20190c4: d2 07 bf f8 ld [ %fp + -8 ], %o1
20190c8: 81 c7 e0 08 ret
20190cc: 81 e8 00 00 restore
0201d100 <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)
{
201d100: 9d e3 bf a0 save %sp, -96, %sp
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201d104: 03 00 80 be sethi %hi(0x202f800), %g1
201d108: c4 10 62 96 lduh [ %g1 + 0x296 ], %g2 ! 202fa96 <lastdosdate>
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
201d10c: 9e 0e 67 e0 and %i1, 0x7e0, %o7
201d110: 87 33 e0 04 srl %o7, 4, %g3
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201d114: 89 36 60 0b srl %i1, 0xb, %g4
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
201d118: 9e 23 c0 03 sub %o7, %g3, %o7
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201d11c: 88 09 20 1f and %g4, 0x1f, %g4
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
201d120: b2 0e 60 1f and %i1, 0x1f, %i1
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201d124: 9b 29 20 03 sll %g4, 3, %o5
201d128: 87 29 20 07 sll %g4, 7, %g3
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201d12c: 80 a0 80 18 cmp %g2, %i0
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201d130: 86 20 c0 0d sub %g3, %o5, %g3
201d134: 85 28 e0 04 sll %g3, 4, %g2
201d138: 86 20 80 03 sub %g2, %g3, %g3
201d13c: 86 00 c0 0f add %g3, %o7, %g3
201d140: b2 00 c0 19 add %g3, %i1, %i1
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201d144: 02 80 00 37 be 201d220 <msdos_date_dos2unix+0x120>
201d148: b3 2e 60 01 sll %i1, 1, %i1
lastdosdate = dd;
201d14c: f0 30 62 96 sth %i0, [ %g1 + 0x296 ]
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
201d150: 89 36 20 09 srl %i0, 9, %g4
for (y = 0; y < year; y++)
201d154: 88 89 20 7f andcc %g4, 0x7f, %g4
201d158: 02 80 00 36 be 201d230 <msdos_date_dos2unix+0x130> <== NEVER TAKEN
201d15c: 82 10 20 00 clr %g1
201d160: 84 10 20 00 clr %g2
201d164: 10 80 00 06 b 201d17c <msdos_date_dos2unix+0x7c>
201d168: 86 10 21 6e mov 0x16e, %g3
days += y & 0x03 ? 365 : 366;
201d16c: 86 08 a0 03 and %g2, 3, %g3
201d170: 80 a0 00 03 cmp %g0, %g3
201d174: 86 60 3f ff subx %g0, -1, %g3
201d178: 86 00 e1 6d add %g3, 0x16d, %g3
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
201d17c: 84 00 a0 01 inc %g2
201d180: 80 a0 80 04 cmp %g2, %g4
201d184: 12 bf ff fa bne 201d16c <msdos_date_dos2unix+0x6c>
201d188: 82 00 40 03 add %g1, %g3, %g1
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
201d18c: 09 00 80 bc sethi %hi(0x202f000), %g4
201d190: 80 88 a0 03 btst 3, %g2
201d194: 02 80 00 04 be 201d1a4 <msdos_date_dos2unix+0xa4> <== ALWAYS TAKEN
201d198: 88 11 23 68 or %g4, 0x368, %g4
201d19c: 09 00 80 bc sethi %hi(0x202f000), %g4 <== NOT EXECUTED
201d1a0: 88 11 23 50 or %g4, 0x350, %g4 ! 202f350 <regyear> <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
201d1a4: 9e 0e 21 e0 and %i0, 0x1e0, %o7
201d1a8: 9f 33 e0 05 srl %o7, 5, %o7
if (month == 0) {
201d1ac: 80 a3 e0 00 cmp %o7, 0
201d1b0: 22 80 00 0c be,a 201d1e0 <msdos_date_dos2unix+0xe0> <== NEVER TAKEN
201d1b4: b0 0e 20 1f and %i0, 0x1f, %i0 <== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
201d1b8: 9e 83 ff ff addcc %o7, -1, %o7
201d1bc: 02 80 00 08 be 201d1dc <msdos_date_dos2unix+0xdc> <== ALWAYS TAKEN
201d1c0: 84 10 20 00 clr %g2
* Convert from dos' idea of time to unix'. This will probably only be
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
201d1c4: 87 28 a0 01 sll %g2, 1, %g3 <== NOT EXECUTED
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
days += months[m];
201d1c8: c6 11 00 03 lduh [ %g4 + %g3 ], %g3 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
201d1cc: 84 00 a0 01 inc %g2 <== NOT EXECUTED
201d1d0: 80 a0 80 0f cmp %g2, %o7 <== NOT EXECUTED
201d1d4: 0a bf ff fc bcs 201d1c4 <msdos_date_dos2unix+0xc4> <== NOT EXECUTED
201d1d8: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
201d1dc: b0 0e 20 1f and %i0, 0x1f, %i0
201d1e0: b0 06 3f ff add %i0, -1, %i0
201d1e4: 82 06 00 01 add %i0, %g1, %g1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
201d1e8: 85 28 60 07 sll %g1, 7, %g2
201d1ec: 83 28 60 09 sll %g1, 9, %g1
201d1f0: 82 20 40 02 sub %g1, %g2, %g1
201d1f4: 85 28 60 04 sll %g1, 4, %g2
201d1f8: 82 20 80 01 sub %g2, %g1, %g1
201d1fc: 85 28 60 04 sll %g1, 4, %g2
201d200: 82 20 80 01 sub %g2, %g1, %g1
201d204: 05 04 b3 a9 sethi %hi(0x12cea400), %g2
201d208: 84 10 a2 00 or %g2, 0x200, %g2 ! 12cea600 <RAM_END+0x108ea600>
201d20c: 82 00 40 02 add %g1, %g2, %g1
201d210: 05 00 80 be sethi %hi(0x202f800), %g2
201d214: c2 20 a2 98 st %g1, [ %g2 + 0x298 ] ! 202fa98 <lastseconds>
}
return seconds + lastseconds;
}
201d218: 81 c7 e0 08 ret
201d21c: 91 e8 40 19 restore %g1, %i1, %o0
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201d220: 03 00 80 be sethi %hi(0x202f800), %g1
201d224: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 202fa98 <lastseconds>
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
}
return seconds + lastseconds;
}
201d228: 81 c7 e0 08 ret
201d22c: 91 e8 40 19 restore %g1, %i1, %o0
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
201d230: 09 00 80 bc sethi %hi(0x202f000), %g4 <== NOT EXECUTED
201d234: 10 bf ff dc b 201d1a4 <msdos_date_dos2unix+0xa4> <== NOT EXECUTED
201d238: 88 11 23 68 or %g4, 0x368, %g4 ! 202f368 <leapyear> <== NOT EXECUTED
0201cf84 <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)
{
201cf84: 9d e3 bf a0 save %sp, -96, %sp
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
201cf88: 03 00 80 be sethi %hi(0x202f800), %g1
201cf8c: c4 00 62 88 ld [ %g1 + 0x288 ], %g2 ! 202fa88 <lasttime>
201cf90: 80 a0 80 18 cmp %g2, %i0
201cf94: 02 80 00 4d be 201d0c8 <msdos_date_unix2dos+0x144>
201cf98: 92 10 20 3c mov 0x3c, %o1
lasttime = t;
201cf9c: f0 20 62 88 st %i0, [ %g1 + 0x288 ]
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
201cfa0: 40 00 36 b7 call 202aa7c <.udiv>
201cfa4: 90 10 00 18 mov %i0, %o0
201cfa8: 40 00 37 61 call 202ad2c <.urem>
201cfac: 92 10 20 3c mov 0x3c, %o1
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
201cfb0: 92 10 2e 10 mov 0xe10, %o1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
201cfb4: bb 2a 20 05 sll %o0, 5, %i5
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
201cfb8: 40 00 36 b1 call 202aa7c <.udiv>
201cfbc: 90 10 00 18 mov %i0, %o0
201cfc0: 40 00 37 5b call 202ad2c <.urem>
201cfc4: 92 10 20 18 mov 0x18, %o1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
201cfc8: 83 2a 20 0b sll %o0, 0xb, %g1
201cfcc: 92 10 20 3c mov 0x3c, %o1
201cfd0: ba 07 40 01 add %i5, %g1, %i5
201cfd4: 40 00 37 56 call 202ad2c <.urem>
201cfd8: 90 10 00 18 mov %i0, %o0
201cfdc: 03 00 80 be sethi %hi(0x202f800), %g1
201cfe0: 91 32 20 01 srl %o0, 1, %o0
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
201cfe4: 13 00 00 54 sethi %hi(0x15000), %o1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
201cfe8: ba 07 40 08 add %i5, %o0, %i5
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
201cfec: 92 12 61 80 or %o1, 0x180, %o1
201cff0: 90 10 00 18 mov %i0, %o0
201cff4: 40 00 36 a2 call 202aa7c <.udiv>
201cff8: fa 30 62 8c sth %i5, [ %g1 + 0x28c ]
if (days != lastday) {
201cffc: 03 00 80 be sethi %hi(0x202f800), %g1
201d000: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 202fa90 <lastday>
201d004: 80 a2 00 02 cmp %o0, %g2
201d008: 02 80 00 38 be 201d0e8 <msdos_date_unix2dos+0x164>
201d00c: b0 10 00 1d mov %i5, %i0
lastday = days;
201d010: d0 20 62 90 st %o0, [ %g1 + 0x290 ]
for (year = 1970;; year++) {
201d014: 10 80 00 03 b 201d020 <msdos_date_unix2dos+0x9c>
201d018: 82 10 27 b2 mov 0x7b2, %g1
201d01c: 82 00 60 01 inc %g1
inc = year & 0x03 ? 365 : 366;
201d020: 86 08 60 03 and %g1, 3, %g3
201d024: 80 a0 00 03 cmp %g0, %g3
201d028: 84 60 3f ff subx %g0, -1, %g2
201d02c: 84 00 a1 6d add %g2, 0x16d, %g2
if (days < inc)
201d030: 80 a2 00 02 cmp %o0, %g2
201d034: 3a bf ff fa bcc,a 201d01c <msdos_date_unix2dos+0x98>
201d038: 90 22 00 02 sub %o0, %g2, %o0
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
201d03c: 09 00 80 bc sethi %hi(0x202f000), %g4
201d040: 80 a0 e0 00 cmp %g3, 0
201d044: 12 80 00 1c bne 201d0b4 <msdos_date_unix2dos+0x130> <== NEVER TAKEN
201d048: 88 11 23 68 or %g4, 0x368, %g4
for (month = 0; month < 12; month++) {
201d04c: 84 10 20 00 clr %g2
/*
* Convert the unix version of time to dos's idea of time to be used in
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
201d050: 87 28 a0 01 sll %g2, 1, %g3
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
if (days < months[month])
201d054: c6 11 00 03 lduh [ %g4 + %g3 ], %g3
201d058: 80 a0 c0 08 cmp %g3, %o0
201d05c: 18 80 00 19 bgu 201d0c0 <msdos_date_unix2dos+0x13c> <== ALWAYS TAKEN
201d060: 84 00 a0 01 inc %g2
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
201d064: 80 a0 a0 0c cmp %g2, 0xc <== NOT EXECUTED
201d068: 12 bf ff fa bne 201d050 <msdos_date_unix2dos+0xcc> <== NOT EXECUTED
201d06c: 90 22 00 03 sub %o0, %g3, %o0 <== NOT EXECUTED
201d070: 84 10 21 a0 mov 0x1a0, %g2 <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
201d074: 84 00 a0 01 inc %g2
201d078: 07 00 80 be sethi %hi(0x202f800), %g3
201d07c: 90 00 80 08 add %g2, %o0, %o0
201d080: d0 30 e2 94 sth %o0, [ %g3 + 0x294 ]
* 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)
201d084: 80 a0 67 bc cmp %g1, 0x7bc
201d088: 08 80 00 07 bleu 201d0a4 <msdos_date_unix2dos+0x120> <== NEVER TAKEN
201d08c: 84 10 00 08 mov %o0, %g2
lastddate += (year - 1980) <<
201d090: 82 00 78 44 add %g1, -1980, %g1
201d094: 83 28 60 09 sll %g1, 9, %g1
201d098: 90 02 00 01 add %o0, %g1, %o0
201d09c: 84 10 00 08 mov %o0, %g2
201d0a0: d0 30 e2 94 sth %o0, [ %g3 + 0x294 ]
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
201d0a4: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
201d0a8: c4 36 40 00 sth %g2, [ %i1 ]
}
201d0ac: 81 c7 e0 08 ret
201d0b0: 81 e8 00 00 restore
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
201d0b4: 09 00 80 bc sethi %hi(0x202f000), %g4 <== NOT EXECUTED
201d0b8: 10 bf ff e5 b 201d04c <msdos_date_unix2dos+0xc8> <== NOT EXECUTED
201d0bc: 88 11 23 50 or %g4, 0x350, %g4 ! 202f350 <regyear> <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
201d0c0: 10 bf ff ed b 201d074 <msdos_date_unix2dos+0xf0>
201d0c4: 85 28 a0 05 sll %g2, 5, %g2
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
201d0c8: 03 00 80 be sethi %hi(0x202f800), %g1
201d0cc: f0 10 62 8c lduh [ %g1 + 0x28c ], %i0 ! 202fa8c <lastdtime>
201d0d0: 03 00 80 be sethi %hi(0x202f800), %g1
201d0d4: c4 10 62 94 lduh [ %g1 + 0x294 ], %g2 ! 202fa94 <lastddate>
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
201d0d8: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
201d0dc: c4 36 40 00 sth %g2, [ %i1 ]
}
201d0e0: 81 c7 e0 08 ret
201d0e4: 81 e8 00 00 restore
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
201d0e8: 03 00 80 be sethi %hi(0x202f800), %g1
201d0ec: c4 10 62 94 lduh [ %g1 + 0x294 ], %g2 ! 202fa94 <lastddate>
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
201d0f0: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
201d0f4: c4 36 40 00 sth %g2, [ %i1 ]
}
201d0f8: 81 c7 e0 08 ret
201d0fc: 81 e8 00 00 restore
0201dc34 <msdos_dir_chmod>:
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
201dc34: 81 c3 e0 08 retl <== NOT EXECUTED
201dc38: 90 10 20 00 clr %o0 <== NOT EXECUTED
0201d4ec <msdos_dir_close>:
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
201d4ec: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201d4f0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201d4f4: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
int
msdos_dir_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201d4f8: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201d4fc: 92 10 20 00 clr %o1
201d500: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201d504: 7f ff b3 a5 call 200a398 <rtems_semaphore_obtain>
201d508: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201d50c: 80 a2 20 00 cmp %o0, 0
201d510: 12 80 00 11 bne 201d554 <msdos_dir_close+0x68> <== NEVER TAKEN
201d514: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
201d518: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
201d51c: 7f ff d6 b5 call 2012ff0 <fat_file_close>
201d520: 92 10 00 1c mov %i4, %o1
201d524: b0 10 00 08 mov %o0, %i0
if (rc != RC_OK)
201d528: 80 a6 20 00 cmp %i0, 0
201d52c: 12 80 00 06 bne 201d544 <msdos_dir_close+0x58> <== NEVER TAKEN
201d530: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
201d534: 7f ff b3 e3 call 200a4c0 <rtems_semaphore_release>
201d538: 01 00 00 00 nop
return RC_OK;
}
201d53c: 81 c7 e0 08 ret
201d540: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201d544: 7f ff b3 df call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201d548: 01 00 00 00 nop <== NOT EXECUTED
return rc;
201d54c: 81 c7 e0 08 ret <== NOT EXECUTED
201d550: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
201d554: 40 00 02 64 call 201dee4 <__errno> <== NOT EXECUTED
201d558: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201d55c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201d560: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201d564: 81 c7 e0 08 ret <== NOT EXECUTED
201d568: 81 e8 00 00 restore <== NOT EXECUTED
0201a5b4 <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
)
{
201a5b4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201a5b8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== 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,
201a5bc: 39 00 80 b7 sethi %hi(0x202dc00), %i4 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
201a5c0: ec 17 40 00 lduh [ %i5 ], %l6 <== NOT EXECUTED
201a5c4: e2 07 60 9c ld [ %i5 + 0x9c ], %l1 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
201a5c8: 21 00 80 b7 sethi %hi(0x202dc00), %l0 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
201a5cc: c0 2e 80 00 clrb [ %i2 ] <== NOT EXECUTED
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
201a5d0: b6 10 20 00 clr %i3 <== NOT EXECUTED
201a5d4: ad 2d a0 10 sll %l6, 0x10, %l6 <== 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,
201a5d8: b8 17 23 40 or %i4, 0x340, %i4 <== NOT EXECUTED
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
201a5dc: a0 14 23 50 or %l0, 0x350, %l0 <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
201a5e0: ad 35 a0 10 srl %l6, 0x10, %l6 <== NOT EXECUTED
201a5e4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201a5e8: 40 00 40 eb call 202a994 <.umul> <== NOT EXECUTED
201a5ec: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
201a5f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201a5f4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201a5f8: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
201a5fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201a600: 7f ff e1 b2 call 2012cc8 <fat_file_read> <== NOT EXECUTED
201a604: 98 10 00 11 mov %l1, %o4 <== NOT EXECUTED
201a608: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201a60c: 02 80 00 34 be 201a6dc <msdos_dir_is_empty+0x128> <== NOT EXECUTED
201a610: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201a614: 24 80 00 27 ble,a 201a6b0 <msdos_dir_is_empty+0xfc> <== NOT EXECUTED
201a618: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
201a61c: ec 17 40 00 lduh [ %i5 ], %l6 <== NOT EXECUTED
201a620: ad 2d a0 10 sll %l6, 0x10, %l6 <== NOT EXECUTED
201a624: ab 35 a0 10 srl %l6, 0x10, %l5 <== NOT EXECUTED
201a628: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED
201a62c: 12 80 00 2e bne 201a6e4 <msdos_dir_is_empty+0x130> <== NOT EXECUTED
201a630: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
201a634: 02 80 00 27 be 201a6d0 <msdos_dir_is_empty+0x11c> <== NOT EXECUTED
201a638: a6 10 20 00 clr %l3 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
201a63c: e2 07 60 9c ld [ %i5 + 0x9c ], %l1 <== NOT EXECUTED
201a640: a4 10 00 11 mov %l1, %l2 <== 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)) ==
201a644: e8 0c 80 00 ldub [ %l2 ], %l4 <== NOT EXECUTED
201a648: 80 a5 20 e5 cmp %l4, 0xe5 <== NOT EXECUTED
201a64c: 22 80 00 1c be,a 201a6bc <msdos_dir_is_empty+0x108> <== NOT EXECUTED
201a650: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
201a654: c2 0c a0 0b ldub [ %l2 + 0xb ], %g1 <== NOT EXECUTED
201a658: 82 08 60 3f and %g1, 0x3f, %g1 <== NOT EXECUTED
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
201a65c: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED
201a660: 02 80 00 16 be 201a6b8 <msdos_dir_is_empty+0x104> <== NOT EXECUTED
201a664: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
201a668: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201a66c: 40 00 14 99 call 201f8d0 <strncmp> <== NOT EXECUTED
201a670: 94 10 20 0b mov 0xb, %o2 <== 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) ||
201a674: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201a678: 22 80 00 11 be,a 201a6bc <msdos_dir_is_empty+0x108> <== NOT EXECUTED
201a67c: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
201a680: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
201a684: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201a688: 40 00 14 92 call 201f8d0 <strncmp> <== NOT EXECUTED
201a68c: 94 10 20 0b mov 0xb, %o2 <== 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) ||
201a690: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201a694: 22 80 00 0a be,a 201a6bc <msdos_dir_is_empty+0x108> <== NOT EXECUTED
201a698: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
201a69c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
201a6a0: 12 80 00 04 bne 201a6b0 <msdos_dir_is_empty+0xfc> <== NOT EXECUTED
201a6a4: b0 10 20 00 clr %i0 <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
201a6a8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a6ac: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
return RC_OK;
201a6b0: 81 c7 e0 08 ret <== NOT EXECUTED
201a6b4: 81 e8 00 00 restore <== 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)
201a6b8: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
201a6bc: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED
201a6c0: 0a bf ff e1 bcs 201a644 <msdos_dir_is_empty+0x90> <== NOT EXECUTED
201a6c4: a4 04 a0 20 add %l2, 0x20, %l2 <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
201a6c8: 10 bf ff c6 b 201a5e0 <msdos_dir_is_empty+0x2c> <== NOT EXECUTED
201a6cc: b6 06 e0 01 inc %i3 <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
201a6d0: e2 07 60 9c ld [ %i5 + 0x9c ], %l1 <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
201a6d4: 10 bf ff c3 b 201a5e0 <msdos_dir_is_empty+0x2c> <== NOT EXECUTED
201a6d8: b6 06 e0 01 inc %i3 <== NOT EXECUTED
}
*ret_val = true;
return RC_OK;
201a6dc: 10 bf ff f3 b 201a6a8 <msdos_dir_is_empty+0xf4> <== NOT EXECUTED
201a6e0: b0 10 20 00 clr %i0 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
201a6e4: 11 00 80 b7 sethi %hi(0x202dc00), %o0 <== NOT EXECUTED
201a6e8: 15 00 80 b7 sethi %hi(0x202dc00), %o2 <== NOT EXECUTED
201a6ec: 17 00 80 b7 sethi %hi(0x202dc00), %o3 <== NOT EXECUTED
201a6f0: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED
201a6f4: 92 10 23 b5 mov 0x3b5, %o1 <== NOT EXECUTED
201a6f8: 94 12 a3 88 or %o2, 0x388, %o2 <== NOT EXECUTED
201a6fc: 7f ff ed 3c call 2015bec <__assert_func> <== NOT EXECUTED
201a700: 96 12 e3 20 or %o3, 0x320, %o3 <== NOT EXECUTED
0201dafc <msdos_dir_lseek>:
* RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
201dafc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
switch (whence)
201db00: 80 a6 e0 01 cmp %i3, 1 <== NOT EXECUTED
201db04: 28 80 00 09 bleu,a 201db28 <msdos_dir_lseek+0x2c> <== NOT EXECUTED
201db08: b0 10 20 00 clr %i0 <== NOT EXECUTED
* Movement past the end of the directory via lseek is not a
* permitted operation
*/
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
201db0c: 40 00 00 f6 call 201dee4 <__errno> <== NOT EXECUTED
201db10: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
201db14: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201db18: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
201db1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201db20: 81 c7 e0 08 ret <== NOT EXECUTED
201db24: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
break;
}
return RC_OK;
}
201db28: 81 c7 e0 08 ret <== NOT EXECUTED
201db2c: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
0201d468 <msdos_dir_open>:
* set apropriately)
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
201d468: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201d46c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201d470: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201d474: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201d478: 92 10 20 00 clr %o1
201d47c: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
201d480: 94 10 20 00 clr %o2
201d484: 7f ff b3 c5 call 200a398 <rtems_semaphore_obtain>
201d488: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201d48c: 80 a2 20 00 cmp %o0, 0
201d490: 12 80 00 11 bne 201d4d4 <msdos_dir_open+0x6c> <== NEVER TAKEN
201d494: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
201d498: 7f ff d6 06 call 2012cb0 <fat_file_reopen>
201d49c: 90 10 00 1b mov %i3, %o0
201d4a0: b0 10 00 08 mov %o0, %i0
if (rc != RC_OK)
201d4a4: 80 a6 20 00 cmp %i0, 0
201d4a8: 12 80 00 07 bne 201d4c4 <msdos_dir_open+0x5c> <== NEVER TAKEN
201d4ac: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
201d4b0: c0 27 60 10 clr [ %i5 + 0x10 ]
rtems_semaphore_release(fs_info->vol_sema);
201d4b4: 7f ff b4 03 call 200a4c0 <rtems_semaphore_release>
201d4b8: c0 27 60 14 clr [ %i5 + 0x14 ]
return RC_OK;
}
201d4bc: 81 c7 e0 08 ret
201d4c0: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201d4c4: 7f ff b3 ff call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201d4c8: 01 00 00 00 nop <== NOT EXECUTED
return rc;
201d4cc: 81 c7 e0 08 ret <== NOT EXECUTED
201d4d0: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
201d4d4: 40 00 02 84 call 201dee4 <__errno> <== NOT EXECUTED
201d4d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201d4dc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201d4e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201d4e4: 81 c7 e0 08 ret <== NOT EXECUTED
201d4e8: 81 e8 00 00 restore <== NOT EXECUTED
0201d56c <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)
{
201d56c: 9d e3 be 68 save %sp, -408, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201d570: e8 06 20 1c ld [ %i0 + 0x1c ], %l4 <== NOT EXECUTED
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201d574: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
201d578: c2 05 20 20 ld [ %l4 + 0x20 ], %g1 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
fat_file_fd_t *tmp_fat_fd = NULL;
201d57c: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
201d580: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
201d584: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
201d588: ac 10 00 19 mov %i1, %l6 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201d58c: f6 00 a0 34 ld [ %g2 + 0x34 ], %i3 <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
201d590: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
201d594: 02 80 00 f8 be 201d974 <msdos_dir_read+0x408> <== NOT EXECUTED
201d598: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
201d59c: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
201d5a0: c4 27 be cc st %g2, [ %fp + -308 ] <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201d5a4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201d5a8: 92 10 20 00 clr %o1 <== NOT EXECUTED
201d5ac: 7f ff b3 7b call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
201d5b0: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201d5b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d5b8: 12 80 01 4b bne 201dae4 <msdos_dir_read+0x578> <== NOT EXECUTED
201d5bc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
201d5c0: 40 00 35 2f call 202aa7c <.udiv> <== NOT EXECUTED
201d5c4: 92 10 21 18 mov 0x118, %o1 <== NOT EXECUTED
201d5c8: 83 2a 20 03 sll %o0, 3, %g1 <== NOT EXECUTED
201d5cc: 91 2a 20 05 sll %o0, 5, %o0 <== NOT EXECUTED
201d5d0: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED
201d5d4: a5 28 60 03 sll %g1, 3, %l2 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
201d5d8: a4 a4 80 01 subcc %l2, %g1, %l2 <== NOT EXECUTED
201d5dc: 02 80 01 40 be 201dadc <msdos_dir_read+0x570> <== NOT EXECUTED
201d5e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
201d5e4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201d5e8: 94 10 20 00 clr %o2 <== NOT EXECUTED
201d5ec: 96 10 21 18 mov 0x118, %o3 <== NOT EXECUTED
201d5f0: 40 00 36 ad call 202b0a4 <__divdi3> <== NOT EXECUTED
201d5f4: a6 10 20 00 clr %l3 <== NOT EXECUTED
201d5f8: aa 10 20 00 clr %l5 <== NOT EXECUTED
201d5fc: b2 10 00 09 mov %o1, %i1 <== NOT EXECUTED
201d600: b0 10 20 00 clr %i0 <== NOT EXECUTED
201d604: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
201d608: a2 10 20 00 clr %l1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
201d60c: ae 10 00 16 mov %l6, %l7 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
201d610: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
201d614: d8 06 e0 9c ld [ %i3 + 0x9c ], %o4 <== NOT EXECUTED
201d618: d6 07 be cc ld [ %fp + -308 ], %o3 <== NOT EXECUTED
201d61c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
201d620: 7f ff d5 aa call 2012cc8 <fat_file_read> <== NOT EXECUTED
201d624: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d628: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
201d62c: 04 80 01 22 ble 201dab4 <msdos_dir_read+0x548> <== NOT EXECUTED
201d630: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
201d634: ec 06 e0 9c ld [ %i3 + 0x9c ], %l6 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
201d638: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
201d63c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d640: 02 80 00 c7 be 201d95c <msdos_dir_read+0x3f0> <== NOT EXECUTED
201d644: b8 10 20 00 clr %i4 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
201d648: 10 80 00 0f b 201d684 <msdos_dir_read+0x118> <== NOT EXECUTED
201d64c: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
201d650: 80 a0 a0 0f cmp %g2, 0xf <== NOT EXECUTED
201d654: 02 80 00 27 be 201d6f0 <msdos_dir_read+0x184> <== NOT EXECUTED
201d658: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d65c: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
201d660: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
201d664: 1a 80 00 19 bcc 201d6c8 <msdos_dir_read+0x15c> <== NOT EXECUTED
201d668: c8 07 be cc ld [ %fp + -308 ], %g4 <== NOT EXECUTED
{
char* entry = (char*) fs_info->cl_buf + i;
201d66c: ec 06 e0 9c ld [ %i3 + 0x9c ], %l6 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
201d670: c2 0d 80 1c ldub [ %l6 + %i4 ], %g1 <== NOT EXECUTED
201d674: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d678: 02 80 00 b9 be 201d95c <msdos_dir_read+0x3f0> <== NOT EXECUTED
201d67c: ac 05 80 1c add %l6, %i4, %l6 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
201d680: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
201d684: 22 bf ff f7 be,a 201d660 <msdos_dir_read+0xf4> <== NOT EXECUTED
201d688: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
201d68c: c4 0d a0 0b ldub [ %l6 + 0xb ], %g2 <== NOT EXECUTED
201d690: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
201d694: 12 bf ff ef bne 201d650 <msdos_dir_read+0xe4> <== NOT EXECUTED
201d698: 84 08 a0 3f and %g2, 0x3f, %g2 <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long file
* name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
201d69c: 80 a0 a0 0f cmp %g2, 0xf <== NOT EXECUTED
201d6a0: 02 80 00 13 be 201d6ec <msdos_dir_read+0x180> <== NOT EXECUTED
201d6a4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
201d6a8: 22 80 00 3c be,a 201d798 <msdos_dir_read+0x22c> <== NOT EXECUTED
201d6ac: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d6b0: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
* Skip active entries until get the entry to start from.
*/
if (start)
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
201d6b4: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d6b8: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
201d6bc: 0a bf ff ec bcs 201d66c <msdos_dir_read+0x100> <== NOT EXECUTED
201d6c0: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
201d6c4: c8 07 be cc ld [ %fp + -308 ], %g4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
201d6c8: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
201d6cc: 12 bf ff d1 bne 201d610 <msdos_dir_read+0xa4> <== NOT EXECUTED
201d6d0: a6 04 c0 04 add %l3, %g4, %l3 <== NOT EXECUTED
201d6d4: 82 10 00 11 mov %l1, %g1 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
201d6d8: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201d6dc: 7f ff b3 79 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201d6e0: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
return cmpltd;
201d6e4: 10 80 00 a2 b 201d96c <msdos_dir_read+0x400> <== NOT EXECUTED
201d6e8: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
201d6ec: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
201d6f0: 02 80 00 8f be 201d92c <msdos_dir_read+0x3c0> <== NOT EXECUTED
201d6f4: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
201d6f8: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
201d6fc: 82 08 60 3f and %g1, 0x3f, %g1 <== NOT EXECUTED
201d700: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
201d704: 22 80 00 04 be,a 201d714 <msdos_dir_read+0x1a8> <== NOT EXECUTED
201d708: da 0d a0 0d ldub [ %l6 + 0xd ], %o5 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
lfn_start = FAT_FILE_SHORT_NAME;
201d70c: 10 bf ff d4 b 201d65c <msdos_dir_read+0xf0> <== NOT EXECUTED
201d710: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
201d714: 82 0e 20 ff and %i0, 0xff, %g1 <== NOT EXECUTED
201d718: 84 0b 60 ff and %o5, 0xff, %g2 <== NOT EXECUTED
201d71c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201d720: 32 bf ff cf bne,a 201d65c <msdos_dir_read+0xf0> <== NOT EXECUTED
201d724: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
* The DOS maximum length is 255 characters without the
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
201d728: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
201d72c: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
201d730: 9f 2d 60 04 sll %l5, 4, %o7 <== NOT EXECUTED
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
201d734: ac 05 a0 01 inc %l6 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
201d738: 9e 23 c0 01 sub %o7, %g1, %o7 <== NOT EXECUTED
201d73c: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
201d740: 9e 03 c0 15 add %o7, %l5, %o7 <== NOT EXECUTED
201d744: 82 10 00 0f mov %o7, %g1 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201d748: 84 07 be d0 add %fp, -304, %g2 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
201d74c: 80 a0 60 fe cmp %g1, 0xfe <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201d750: 88 00 80 01 add %g2, %g1, %g4 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
201d754: 18 80 00 99 bgu 201d9b8 <msdos_dir_read+0x44c> <== NOT EXECUTED
201d758: 84 20 40 0f sub %g1, %o7, %g2 <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
201d75c: f0 0d 80 00 ldub [ %l6 ], %i0 <== NOT EXECUTED
201d760: f0 29 20 14 stb %i0, [ %g4 + 0x14 ] <== NOT EXECUTED
if (*p == '\0')
201d764: c8 4d 80 00 ldsb [ %l6 ], %g4 <== NOT EXECUTED
201d768: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
201d76c: 02 80 00 93 be 201d9b8 <msdos_dir_read+0x44c> <== NOT EXECUTED
201d770: 82 00 60 01 inc %g1 <== NOT EXECUTED
break;
switch (q)
201d774: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED
201d778: 02 80 00 8d be 201d9ac <msdos_dir_read+0x440> <== NOT EXECUTED
201d77c: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
201d780: 02 80 00 88 be 201d9a0 <msdos_dir_read+0x434> <== NOT EXECUTED
201d784: 80 a0 e0 0d cmp %g3, 0xd <== NOT EXECUTED
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
201d788: 02 80 00 8c be 201d9b8 <msdos_dir_read+0x44c> <== NOT EXECUTED
201d78c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
201d790: 10 bf ff ee b 201d748 <msdos_dir_read+0x1dc> <== NOT EXECUTED
201d794: ac 05 a0 02 add %l6, 2, %l6 <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(iop->pathinfo.mt_entry, fat_fd, F_CLU_NUM,
201d798: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
201d79c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201d7a0: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
201d7a4: 7f ff d6 45 call 20130b8 <fat_file_ioctl> <== NOT EXECUTED
201d7a8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
201d7ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d7b0: 12 80 00 84 bne 201d9c0 <msdos_dir_read+0x454> <== NOT EXECUTED
201d7b4: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
201d7b8: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201d7bc: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
201d7c0: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED
201d7c4: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201d7c8: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED
dir_pos.sname.ofs = i;
201d7cc: f8 27 bf ec st %i4, [ %fp + -20 ] <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
201d7d0: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
201d7d4: 7f ff d4 8b call 2012a00 <fat_file_open> <== NOT EXECUTED
201d7d8: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if (rc != RC_OK)
201d7dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d7e0: 12 80 00 78 bne 201d9c0 <msdos_dir_read+0x454> <== NOT EXECUTED
201d7e4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
201d7e8: 86 10 21 18 mov 0x118, %g3 <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
201d7ec: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
201d7f0: c0 27 be d8 clr [ %fp + -296 ] <== NOT EXECUTED
201d7f4: e2 27 be dc st %l1, [ %fp + -292 ] <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
201d7f8: c6 37 be e0 sth %g3, [ %fp + -288 ] <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
201d7fc: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
201d800: 02 80 00 31 be 201d8c4 <msdos_dir_read+0x358> <== NOT EXECUTED
201d804: c2 27 be d0 st %g1, [ %fp + -304 ] <== NOT EXECUTED
201d808: 82 10 20 00 clr %g1 <== NOT EXECUTED
201d80c: 84 10 20 00 clr %g2 <== NOT EXECUTED
201d810: 10 80 00 06 b 201d828 <msdos_dir_read+0x2bc> <== NOT EXECUTED
201d814: 86 10 20 00 clr %g3 <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
201d818: 80 a0 00 04 cmp %g0, %g4 <== NOT EXECUTED
201d81c: 84 40 3f ff addx %g0, -1, %g2 <== NOT EXECUTED
201d820: 84 08 a0 80 and %g2, 0x80, %g2 <== NOT EXECUTED
201d824: 84 00 bf 80 add %g2, -128, %g2 <== NOT EXECUTED
201d828: c8 0d 80 01 ldub [ %l6 + %g1 ], %g4 <== NOT EXECUTED
201d82c: 87 30 e0 01 srl %g3, 1, %g3 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
201d830: 82 00 60 01 inc %g1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
201d834: 84 00 c0 02 add %g3, %g2, %g2 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
201d838: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
201d83c: 84 00 80 04 add %g2, %g4, %g2 <== NOT EXECUTED
201d840: 86 08 a0 ff and %g2, 0xff, %g3 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
201d844: 12 bf ff f5 bne 201d818 <msdos_dir_read+0x2ac> <== NOT EXECUTED
201d848: 88 08 e0 01 and %g3, 1, %g4 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
201d84c: 84 1e 00 02 xor %i0, %g2, %g2 <== NOT EXECUTED
201d850: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201d854: 12 80 00 1d bne 201d8c8 <msdos_dir_read+0x35c> <== NOT EXECUTED
201d858: 84 10 20 08 mov 8, %g2 <== NOT EXECUTED
201d85c: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
201d860: 12 80 00 1b bne 201d8cc <msdos_dir_read+0x360> <== NOT EXECUTED
201d864: 82 05 80 02 add %l6, %g2, %g1 <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
201d868: 40 00 07 e9 call 201f80c <strlen> <== NOT EXECUTED
201d86c: 90 07 be e4 add %fp, -284, %o0 <== NOT EXECUTED
201d870: d0 37 be e2 sth %o0, [ %fp + -286 ] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
201d874: 92 07 be d0 add %fp, -304, %o1 <== NOT EXECUTED
201d878: 94 10 21 18 mov 0x118, %o2 <== NOT EXECUTED
201d87c: 40 00 04 69 call 201ea20 <memcpy> <== NOT EXECUTED
201d880: 90 05 c0 11 add %l7, %l1, %o0 <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
201d884: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
201d888: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
201d88c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
201d890: 86 80 e1 18 addcc %g3, 0x118, %g3 <== NOT EXECUTED
201d894: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
201d898: 7f ff d5 d6 call 2012ff0 <fat_file_close> <== NOT EXECUTED
201d89c: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
if (rc != RC_OK)
201d8a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d8a4: 12 80 00 47 bne 201d9c0 <msdos_dir_read+0x454> <== NOT EXECUTED
201d8a8: a2 04 61 18 add %l1, 0x118, %l1 <== NOT EXECUTED
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
201d8ac: a4 04 be e8 add %l2, -280, %l2 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
201d8b0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
201d8b4: 32 bf ff 6b bne,a 201d660 <msdos_dir_read+0xf4> <== NOT EXECUTED
201d8b8: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
201d8bc: 10 bf ff 87 b 201d6d8 <msdos_dir_read+0x16c> <== NOT EXECUTED
201d8c0: 82 10 00 11 mov %l1, %g1 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
201d8c4: 84 10 20 08 mov 8, %g2 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201d8c8: 82 05 80 02 add %l6, %g2, %g1 <== NOT EXECUTED
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
201d8cc: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 <== NOT EXECUTED
201d8d0: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
201d8d4: 12 80 00 42 bne 201d9dc <msdos_dir_read+0x470> <== NOT EXECUTED
201d8d8: 09 00 80 bc sethi %hi(0x202f000), %g4 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
201d8dc: 84 80 bf ff addcc %g2, -1, %g2 <== NOT EXECUTED
201d8e0: 12 bf ff fb bne 201d8cc <msdos_dir_read+0x360> <== NOT EXECUTED
201d8e4: 82 05 80 02 add %l6, %g2, %g1 <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
201d8e8: 82 07 be e4 add %fp, -284, %g1 <== NOT EXECUTED
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
201d8ec: c6 4d a0 0a ldsb [ %l6 + 0xa ], %g3 <== NOT EXECUTED
201d8f0: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
201d8f4: 12 80 00 51 bne 201da38 <msdos_dir_read+0x4cc> <== NOT EXECUTED
201d8f8: 98 10 20 03 mov 3, %o4 <== NOT EXECUTED
201d8fc: c6 4d a0 09 ldsb [ %l6 + 9 ], %g3 <== NOT EXECUTED
201d900: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
201d904: 12 80 00 4d bne 201da38 <msdos_dir_read+0x4cc> <== NOT EXECUTED
201d908: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
201d90c: c6 4d a0 08 ldsb [ %l6 + 8 ], %g3 <== NOT EXECUTED
201d910: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
201d914: 12 80 00 49 bne 201da38 <msdos_dir_read+0x4cc> <== NOT EXECUTED
201d918: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
201d91c: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
201d920: c4 37 be e2 sth %g2, [ %fp + -286 ] <== NOT EXECUTED
201d924: 10 bf ff d4 b 201d874 <msdos_dir_read+0x308> <== NOT EXECUTED
201d928: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
if (lfn_start == FAT_FILE_SHORT_NAME)
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
201d92c: 22 bf ff 4d be,a 201d660 <msdos_dir_read+0xf4> <== NOT EXECUTED
201d930: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
/*
* Remember the start location of the long file name.
*/
lfn_start =
((j * bts2rd) + i) / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201d934: a0 04 c0 1c add %l3, %i4, %l0 <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
201d938: aa 08 60 3f and %g1, 0x3f, %l5 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
201d93c: a1 34 20 05 srl %l0, 5, %l0 <== NOT EXECUTED
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
201d940: f0 0d a0 0d ldub [ %l6 + 0xd ], %i0 <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
201d944: 90 07 be e4 add %fp, -284, %o0 <== NOT EXECUTED
201d948: 92 10 20 00 clr %o1 <== NOT EXECUTED
201d94c: 40 00 04 71 call 201eb10 <memset> <== NOT EXECUTED
201d950: 94 10 21 00 mov 0x100, %o2 <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
201d954: 10 bf ff 6a b 201d6fc <msdos_dir_read+0x190> <== NOT EXECUTED
201d958: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
201d95c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201d960: 7f ff b2 d8 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201d964: e2 27 be c8 st %l1, [ %fp + -312 ] <== NOT EXECUTED
return cmpltd;
201d968: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
201d96c: 81 c7 e0 08 ret <== NOT EXECUTED
201d970: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201d974: c2 05 20 24 ld [ %l4 + 0x24 ], %g1 <== NOT EXECUTED
201d978: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d97c: 32 bf ff 09 bne,a 201d5a0 <msdos_dir_read+0x34> <== NOT EXECUTED
201d980: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
201d984: c2 0e e0 0a ldub [ %i3 + 0xa ], %g1 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201d988: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201d98c: 22 bf ff 05 be,a 201d5a0 <msdos_dir_read+0x34> <== NOT EXECUTED
201d990: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
201d994: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 <== NOT EXECUTED
201d998: 10 bf ff 03 b 201d5a4 <msdos_dir_read+0x38> <== NOT EXECUTED
201d99c: c2 27 be cc st %g1, [ %fp + -308 ] <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
201d9a0: ac 05 a0 04 add %l6, 4, %l6 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
201d9a4: 10 bf ff 69 b 201d748 <msdos_dir_read+0x1dc> <== NOT EXECUTED
201d9a8: 86 00 e0 01 inc %g3 <== NOT EXECUTED
break;
switch (q)
{
case 4:
p += 5;
201d9ac: ac 05 a0 05 add %l6, 5, %l6 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
201d9b0: 10 bf ff 66 b 201d748 <msdos_dir_read+0x1dc> <== NOT EXECUTED
201d9b4: 86 00 e0 01 inc %g3 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
201d9b8: 10 bf ff be b 201d8b0 <msdos_dir_read+0x344> <== NOT EXECUTED
201d9bc: b0 10 00 0d mov %o5, %i0 <== NOT EXECUTED
201d9c0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201d9c4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201d9c8: 7f ff b2 be call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201d9cc: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
return rc;
201d9d0: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
201d9d4: 81 c7 e0 08 ret <== NOT EXECUTED
201d9d8: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201d9dc: 82 10 20 00 clr %g1 <== NOT EXECUTED
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
201d9e0: 10 80 00 05 b 201d9f4 <msdos_dir_read+0x488> <== NOT EXECUTED
201d9e4: da 01 23 80 ld [ %g4 + 0x380 ], %o5 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
201d9e8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201d9ec: 02 80 00 0f be 201da28 <msdos_dir_read+0x4bc> <== NOT EXECUTED
201d9f0: c6 29 20 14 stb %g3, [ %g4 + 0x14 ] <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
201d9f4: c6 0d 80 01 ldub [ %l6 + %g1 ], %g3 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201d9f8: 9e 07 be d0 add %fp, -304, %o7 <== NOT EXECUTED
201d9fc: 88 03 c0 01 add %o7, %g1, %g4 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
201da00: 9e 03 40 03 add %o5, %g3, %o7 <== NOT EXECUTED
201da04: de 0b e0 01 ldub [ %o7 + 1 ], %o7 <== NOT EXECUTED
201da08: 9e 0b e0 03 and %o7, 3, %o7 <== NOT EXECUTED
201da0c: 80 a3 e0 01 cmp %o7, 1 <== NOT EXECUTED
201da10: 12 bf ff f6 bne 201d9e8 <msdos_dir_read+0x47c> <== NOT EXECUTED
201da14: 82 00 60 01 inc %g1 <== NOT EXECUTED
201da18: 86 00 e0 20 add %g3, 0x20, %g3 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
201da1c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201da20: 12 bf ff f5 bne 201d9f4 <msdos_dir_read+0x488> <== NOT EXECUTED
201da24: c6 29 20 14 stb %g3, [ %g4 + 0x14 ] <== NOT EXECUTED
201da28: 86 07 be d0 add %fp, -304, %g3 <== NOT EXECUTED
201da2c: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201da30: 10 bf ff af b 201d8ec <msdos_dir_read+0x380> <== NOT EXECUTED
201da34: 82 00 60 14 add %g1, 0x14, %g1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
201da38: 96 00 60 01 add %g1, 1, %o3 <== NOT EXECUTED
201da3c: 9e 10 20 2e mov 0x2e, %o7 <== NOT EXECUTED
201da40: de 28 40 00 stb %o7, [ %g1 ] <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
201da44: 03 00 80 bc sethi %hi(0x202f000), %g1 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
201da48: 86 03 20 01 add %o4, 1, %g3 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
201da4c: da 00 63 80 ld [ %g1 + 0x380 ], %o5 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
201da50: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
201da54: 94 03 3f ff add %o4, -1, %o2 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201da58: 9e 05 80 0c add %l6, %o4, %o7 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
201da5c: 10 80 00 06 b 201da74 <msdos_dir_read+0x508> <== NOT EXECUTED
201da60: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
201da64: c6 28 40 00 stb %g3, [ %g1 ] <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
201da68: 80 a5 80 0f cmp %l6, %o7 <== NOT EXECUTED
201da6c: 02 80 00 0e be 201daa4 <msdos_dir_read+0x538> <== NOT EXECUTED
201da70: 82 00 60 01 inc %g1 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
201da74: c6 0d a0 08 ldub [ %l6 + 8 ], %g3 <== NOT EXECUTED
201da78: 88 03 40 03 add %o5, %g3, %g4 <== NOT EXECUTED
201da7c: c8 09 20 01 ldub [ %g4 + 1 ], %g4 <== NOT EXECUTED
201da80: 88 09 20 03 and %g4, 3, %g4 <== NOT EXECUTED
201da84: 80 a1 20 01 cmp %g4, 1 <== NOT EXECUTED
201da88: 12 bf ff f7 bne 201da64 <msdos_dir_read+0x4f8> <== NOT EXECUTED
201da8c: ac 05 a0 01 inc %l6 <== NOT EXECUTED
201da90: 86 00 e0 20 add %g3, 0x20, %g3 <== NOT EXECUTED
201da94: c6 28 40 00 stb %g3, [ %g1 ] <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
201da98: 80 a5 80 0f cmp %l6, %o7 <== NOT EXECUTED
201da9c: 12 bf ff f6 bne 201da74 <msdos_dir_read+0x508> <== NOT EXECUTED
201daa0: 82 00 60 01 inc %g1 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201daa4: 84 00 a0 01 inc %g2 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
201daa8: 82 02 c0 0c add %o3, %o4, %g1 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
201daac: 10 bf ff 9c b 201d91c <msdos_dir_read+0x3b0> <== NOT EXECUTED
201dab0: 84 00 80 0a add %g2, %o2, %g2 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
201dab4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
201dab8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
201dabc: 7f ff b2 81 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201dac0: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
201dac4: 40 00 01 08 call 201dee4 <__errno> <== NOT EXECUTED
201dac8: 01 00 00 00 nop <== NOT EXECUTED
201dacc: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
201dad0: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
201dad4: 10 bf ff a6 b 201d96c <msdos_dir_read+0x400> <== NOT EXECUTED
201dad8: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
201dadc: 10 bf fe ff b 201d6d8 <msdos_dir_read+0x16c> <== NOT EXECUTED
201dae0: 82 10 20 00 clr %g1 <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201dae4: 40 00 01 00 call 201dee4 <__errno> <== NOT EXECUTED
201dae8: 01 00 00 00 nop <== NOT EXECUTED
201daec: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
201daf0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
201daf4: 10 bf ff 9e b 201d96c <msdos_dir_read+0x400> <== NOT EXECUTED
201daf8: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED
0201dc3c <msdos_dir_rmnod>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
201dc3c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201dc40: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
201dc44: fa 06 40 00 ld [ %i1 ], %i5 <== NOT EXECUTED
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201dc48: f8 00 60 34 ld [ %g1 + 0x34 ], %i4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
201dc4c: c0 2f bf ff clrb [ %fp + -1 ] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201dc50: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
201dc54: 92 10 20 00 clr %o1 <== NOT EXECUTED
201dc58: 7f ff b1 d0 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
201dc5c: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201dc60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201dc64: 12 80 00 2e bne 201dd1c <msdos_dir_rmnod+0xe0> <== NOT EXECUTED
201dc68: 01 00 00 00 nop <== 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)
201dc6c: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
201dc70: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
201dc74: 18 80 00 21 bgu 201dcf8 <msdos_dir_rmnod+0xbc> <== NOT EXECUTED
201dc78: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
201dc7c: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
201dc80: 7f ff f2 4d call 201a5b4 <msdos_dir_is_empty> <== NOT EXECUTED
201dc84: 94 07 bf ff add %fp, -1, %o2 <== NOT EXECUTED
if (rc != RC_OK)
201dc88: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dc8c: 12 80 00 17 bne 201dce8 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
201dc90: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (!is_empty)
201dc94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201dc98: 22 80 00 27 be,a 201dd34 <msdos_dir_rmnod+0xf8> <== NOT EXECUTED
201dc9c: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
201dca0: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
}
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
201dca4: c4 06 40 00 ld [ %i1 ], %g2 <== NOT EXECUTED
201dca8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED
201dcac: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201dcb0: 02 80 00 12 be 201dcf8 <msdos_dir_rmnod+0xbc> <== NOT EXECUTED
201dcb4: 92 07 60 20 add %i5, 0x20, %o1 <== NOT EXECUTED
* You cannot remove a mountpoint.
* not used - mount() not implemenetd yet.
*/
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
201dcb8: 7f ff f1 d0 call 201a3f8 <msdos_set_first_char4file_name> <== NOT EXECUTED
201dcbc: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
201dcc0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dcc4: 12 80 00 09 bne 201dce8 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
201dcc8: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
201dccc: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
201dcd0: 7f ff d6 44 call 20135e0 <fat_file_mark_removed> <== NOT EXECUTED
201dcd4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
201dcd8: 7f ff b1 fa call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201dcdc: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
201dce0: 81 c7 e0 08 ret <== NOT EXECUTED
201dce4: 81 e8 00 00 restore <== NOT EXECUTED
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201dce8: 7f ff b1 f6 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201dcec: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
201dcf0: 81 c7 e0 08 ret <== NOT EXECUTED
201dcf4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
{
rtems_semaphore_release(fs_info->vol_sema);
201dcf8: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
201dcfc: 7f ff b1 f1 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201dd00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
201dd04: 40 00 00 78 call 201dee4 <__errno> <== NOT EXECUTED
201dd08: 01 00 00 00 nop <== NOT EXECUTED
201dd0c: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10> <== NOT EXECUTED
201dd10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201dd14: 81 c7 e0 08 ret <== NOT EXECUTED
201dd18: 81 e8 00 00 restore <== NOT EXECUTED
bool is_empty = false;
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);
201dd1c: 40 00 00 72 call 201dee4 <__errno> <== NOT EXECUTED
201dd20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201dd24: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201dd28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201dd2c: 81 c7 e0 08 ret <== NOT EXECUTED
201dd30: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
201dd34: 7f ff b1 e3 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201dd38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
201dd3c: 40 00 00 6a call 201dee4 <__errno> <== NOT EXECUTED
201dd40: 01 00 00 00 nop <== NOT EXECUTED
201dd44: 82 10 20 5a mov 0x5a, %g1 ! 5a <PROM_START+0x5a> <== NOT EXECUTED
201dd48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201dd4c: 81 c7 e0 08 ret <== NOT EXECUTED
201dd50: 81 e8 00 00 restore <== NOT EXECUTED
0201db30 <msdos_dir_stat>:
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
201db30: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
201db34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
201db38: f8 06 00 00 ld [ %i0 ], %i4
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
201db3c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201db40: 92 10 20 00 clr %o1
201db44: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201db48: 7f ff b2 14 call 200a398 <rtems_semaphore_obtain>
201db4c: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201db50: 80 a2 20 00 cmp %o0, 0
201db54: 12 80 00 19 bne 201dbb8 <msdos_dir_stat+0x88> <== NEVER TAKEN
201db58: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
201db5c: c4 1f 60 58 ldd [ %i5 + 0x58 ], %g2
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;
201db60: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
201db64: f0 17 40 00 lduh [ %i5 ], %i0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
201db68: de 07 20 0c ld [ %i4 + 0xc ], %o7
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
201db6c: c8 07 20 40 ld [ %i4 + 0x40 ], %g4
rtems_semaphore_release(fs_info->vol_sema);
201db70: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
201db74: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
201db78: 05 00 00 10 sethi %hi(0x4000), %g2
201db7c: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 41ff <PROM_START+0x41ff>
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
201db80: bb 30 60 09 srl %g1, 9, %i5
buf->st_blksize = fs_info->fat.vol.bps;
201db84: f0 26 60 40 st %i0, [ %i1 + 0x40 ]
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
201db88: de 26 60 08 st %o7, [ %i1 + 8 ]
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
201db8c: c0 26 60 18 clr [ %i1 + 0x18 ]
201db90: c0 26 60 1c clr [ %i1 + 0x1c ]
buf->st_size = fat_fd->fat_file_size;
201db94: c0 26 60 20 clr [ %i1 + 0x20 ]
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
201db98: c4 26 60 0c st %g2, [ %i1 + 0xc ]
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
201db9c: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
201dba0: fa 26 60 44 st %i5, [ %i1 + 0x44 ]
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
201dba4: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
rtems_semaphore_release(fs_info->vol_sema);
201dba8: 7f ff b2 46 call 200a4c0 <rtems_semaphore_release>
201dbac: b0 10 20 00 clr %i0
return RC_OK;
}
201dbb0: 81 c7 e0 08 ret
201dbb4: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201dbb8: 40 00 00 cb call 201dee4 <__errno> <== NOT EXECUTED
201dbbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201dbc0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201dbc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201dbc8: 81 c7 e0 08 ret <== NOT EXECUTED
201dbcc: 81 e8 00 00 restore <== NOT EXECUTED
0201dbd0 <msdos_dir_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
201dbd0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201dbd4: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
int
msdos_dir_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201dbd8: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201dbdc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201dbe0: 92 10 20 00 clr %o1 <== NOT EXECUTED
201dbe4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
201dbe8: 7f ff b1 ec call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
201dbec: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201dbf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201dbf4: 12 80 00 0a bne 201dc1c <msdos_dir_sync+0x4c> <== NOT EXECUTED
201dbf8: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
201dbfc: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
201dc00: 7f ff d6 a3 call 201368c <fat_file_datasync> <== NOT EXECUTED
201dc04: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201dc08: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
201dc0c: 7f ff b2 2d call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201dc10: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
201dc14: 81 c7 e0 08 ret <== NOT EXECUTED
201dc18: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201dc1c: 40 00 00 b2 call 201dee4 <__errno> <== NOT EXECUTED
201dc20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201dc24: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201dc28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201dc2c: 81 c7 e0 08 ret <== NOT EXECUTED
201dc30: 81 e8 00 00 restore <== NOT EXECUTED
02019360 <msdos_eval4make>:
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
2019360: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2019364: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019368: 92 10 20 00 clr %o1
const char **name
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201936c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019370: 94 10 20 00 clr %o2
2019374: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
2019378: 7f ff c4 08 call 200a398 <rtems_semaphore_obtain>
201937c: b8 10 00 18 mov %i0, %i4
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019380: 80 a2 20 00 cmp %o0, 0
2019384: 12 80 00 9d bne 20195f8 <msdos_eval4make+0x298> <== NEVER TAKEN
2019388: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
201938c: d0 06 40 00 ld [ %i1 ], %o0
2019390: 80 a2 20 00 cmp %o0, 0
2019394: 02 80 00 71 be 2019558 <msdos_eval4make+0x1f8> <== NEVER TAKEN
2019398: 01 00 00 00 nop
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
201939c: 7f ff e6 45 call 2012cb0 <fat_file_reopen>
20193a0: 01 00 00 00 nop
if (rc != RC_OK)
20193a4: b0 92 20 00 orcc %o0, 0, %i0
20193a8: 12 80 00 1f bne 2019424 <msdos_eval4make+0xc4> <== NEVER TAKEN
20193ac: 01 00 00 00 nop
20193b0: b6 10 20 00 clr %i3 ! 0 <PROM_START>
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
20193b4: 21 00 80 bc sethi %hi(0x202f000), %l0
if (rc != RC_OK)
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
20193b8: a2 07 00 1b add %i4, %i3, %l1
20193bc: 40 00 19 14 call 201f80c <strlen>
20193c0: 90 10 00 11 mov %l1, %o0
20193c4: 94 07 bf fc add %fp, -4, %o2
20193c8: 92 10 00 08 mov %o0, %o1
20193cc: 96 07 bf f8 add %fp, -8, %o3
20193d0: 40 00 03 27 call 201a06c <msdos_get_token>
20193d4: 90 10 00 11 mov %l1, %o0
i += token_len;
20193d8: d4 07 bf f8 ld [ %fp + -8 ], %o2
if (rc != RC_OK)
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
20193dc: a2 10 00 08 mov %o0, %l1
i += token_len;
fat_fd = pathloc->node_access;
20193e0: e4 06 40 00 ld [ %i1 ], %l2
switch (type)
20193e4: 80 a2 20 02 cmp %o0, 2
20193e8: 02 80 00 45 be 20194fc <msdos_eval4make+0x19c>
20193ec: b6 06 c0 0a add %i3, %o2, %i3
20193f0: 80 a2 20 02 cmp %o0, 2
20193f4: 18 80 00 10 bgu 2019434 <msdos_eval4make+0xd4>
20193f8: 80 a2 20 03 cmp %o0, 3
20193fc: 80 a2 20 00 cmp %o0, 0
2019400: 32 bf ff ef bne,a 20193bc <msdos_eval4make+0x5c>
2019404: a2 07 00 1b add %i4, %i3, %l1
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
2019408: 40 00 12 b7 call 201dee4 <__errno>
201940c: b0 10 3f ff mov -1, %i0
2019410: 82 10 20 11 mov 0x11, %g1
2019414: c2 22 00 00 st %g1, [ %o0 ]
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
2019418: d0 06 60 10 ld [ %i1 + 0x10 ], %o0
201941c: 7f ff e6 f5 call 2012ff0 <fat_file_close>
2019420: 92 10 00 12 mov %l2, %o1
err:
rtems_semaphore_release(fs_info->vol_sema);
2019424: 7f ff c4 27 call 200a4c0 <rtems_semaphore_release>
2019428: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
201942c: 81 c7 e0 08 ret
2019430: 81 e8 00 00 restore
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
2019434: 02 80 00 09 be 2019458 <msdos_eval4make+0xf8> <== ALWAYS TAKEN
2019438: 80 a2 20 04 cmp %o0, 4
201943c: 32 bf ff e0 bne,a 20193bc <msdos_eval4make+0x5c> <== NOT EXECUTED
2019440: a2 07 00 1b add %i4, %i3, %l1 <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
2019444: 40 00 12 a8 call 201dee4 <__errno> <== NOT EXECUTED
2019448: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201944c: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
rc = -1;
goto error;
2019450: 10 bf ff f2 b 2019418 <msdos_eval4make+0xb8> <== NOT EXECUTED
2019454: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
2019458: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
201945c: 80 a0 60 01 cmp %g1, 1
2019460: 12 80 00 6c bne 2019610 <msdos_eval4make+0x2b0>
2019464: d2 07 bf fc ld [ %fp + -4 ], %o1
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
2019468: 40 00 08 82 call 201b670 <msdos_find_name>
201946c: 90 10 00 19 mov %i1, %o0
if (rc)
2019470: 80 a2 20 00 cmp %o0, 0
2019474: 02 bf ff d2 be 20193bc <msdos_eval4make+0x5c>
2019478: a2 07 00 1b add %i4, %i3, %l1
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
201947c: 03 00 00 1f sethi %hi(0x7c00), %g1
2019480: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
2019484: 80 a2 00 01 cmp %o0, %g1
2019488: 12 80 00 67 bne 2019624 <msdos_eval4make+0x2c4> <== NEVER TAKEN
201948c: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
}
}
*name = &path[i - token_len];
2019490: 82 26 c0 01 sub %i3, %g1, %g1
2019494: 82 07 00 01 add %i4, %g1, %g1
2019498: 10 80 00 07 b 20194b4 <msdos_eval4make+0x154>
201949c: c2 26 80 00 st %g1, [ %i2 ]
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++)
{
if (!msdos_is_separator(path[i]))
20194a0: 7f ff b8 28 call 2007540 <rtems_filesystem_is_separator>
20194a4: b6 06 e0 01 inc %i3
20194a8: 80 a2 20 00 cmp %o0, 0
20194ac: 02 80 00 5e be 2019624 <msdos_eval4make+0x2c4>
20194b0: 01 00 00 00 nop
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++)
20194b4: d0 0f 00 1b ldub [ %i4 + %i3 ], %o0
20194b8: 91 2a 20 18 sll %o0, 0x18, %o0
20194bc: 80 a2 20 00 cmp %o0, 0
20194c0: 32 bf ff f8 bne,a 20194a0 <msdos_eval4make+0x140>
20194c4: 91 3a 20 18 sra %o0, 0x18, %o0
rc = -1;
goto error;
}
}
fat_fd = pathloc->node_access;
20194c8: e4 06 40 00 ld [ %i1 ], %l2
if (fat_fd->fat_file_type != FAT_DIRECTORY)
20194cc: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
20194d0: 80 a0 60 01 cmp %g1, 1
20194d4: 12 80 00 4f bne 2019610 <msdos_eval4make+0x2b0> <== NEVER TAKEN
20194d8: 01 00 00 00 nop
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
20194dc: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
20194e0: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
20194e4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
20194e8: c2 00 60 90 ld [ %g1 + 0x90 ], %g1
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
20194ec: 7f ff c3 f5 call 200a4c0 <rtems_semaphore_release>
20194f0: c2 26 60 08 st %g1, [ %i1 + 8 ]
return RC_OK;
20194f4: 81 c7 e0 08 ret
20194f8: 81 e8 00 00 restore
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
20194fc: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
2019500: 80 a0 60 01 cmp %g1, 1
2019504: 12 80 00 43 bne 2019610 <msdos_eval4make+0x2b0> <== NEVER TAKEN
2019508: 01 00 00 00 nop
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
201950c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
}
/*
* Am I at the root of this mounted filesystem?
*/
if (rtems_filesystem_is_root_location(pathloc))
2019510: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2019514: 80 a4 80 02 cmp %l2, %g2
2019518: 02 80 00 18 be 2019578 <msdos_eval4make+0x218> <== ALWAYS TAKEN
201951c: d2 07 bf fc ld [ %fp + -4 ], %o1
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
2019520: 40 00 08 54 call 201b670 <msdos_find_name> <== NOT EXECUTED
2019524: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
if (rc != RC_OK)
2019528: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201952c: 22 bf ff a4 be,a 20193bc <msdos_eval4make+0x5c> <== NOT EXECUTED
2019530: a2 07 00 1b add %i4, %i3, %l1 <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
2019534: 03 00 00 1f sethi %hi(0x7c00), %g1 <== NOT EXECUTED
2019538: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
201953c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
2019540: 12 bf ff b6 bne 2019418 <msdos_eval4make+0xb8> <== NOT EXECUTED
2019544: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
errno = ENOENT;
2019548: 40 00 12 67 call 201dee4 <__errno> <== NOT EXECUTED
201954c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019550: 10 bf ff b2 b 2019418 <msdos_eval4make+0xb8> <== NOT EXECUTED
2019554: e2 22 00 00 st %l1, [ %o0 ] <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
2019558: 40 00 12 63 call 201dee4 <__errno> <== NOT EXECUTED
201955c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019560: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
2019564: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
2019568: 7f ff c3 d6 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201956c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
2019570: 81 c7 e0 08 ret <== NOT EXECUTED
2019574: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
2019578: c4 04 21 7c ld [ %l0 + 0x17c ], %g2
{
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
201957c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
2019580: 80 a4 80 02 cmp %l2, %g2
2019584: 02 bf ff 8e be 20193bc <msdos_eval4make+0x5c> <== ALWAYS TAKEN
2019588: a2 07 00 1b add %i4, %i3, %l1
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
201958c: d0 00 60 18 ld [ %g1 + 0x18 ], %o0 <== NOT EXECUTED
2019590: c8 00 60 08 ld [ %g1 + 8 ], %g4 <== NOT EXECUTED
2019594: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
2019598: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
201959c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
*pathloc = newloc;
20195a0: c8 26 40 00 st %g4, [ %i1 ] <== NOT EXECUTED
20195a4: c6 26 60 04 st %g3, [ %i1 + 4 ] <== NOT EXECUTED
20195a8: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED
20195ac: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED
20195b0: d0 26 60 10 st %o0, [ %i1 + 0x10 ] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
20195b4: 7f ff e6 8f call 2012ff0 <fat_file_close> <== NOT EXECUTED
20195b8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
if (rc != RC_OK)
20195bc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20195c0: 12 bf ff 99 bne 2019424 <msdos_eval4make+0xc4> <== NOT EXECUTED
20195c4: 01 00 00 00 nop <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
20195c8: 7f ff c3 be call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20195cc: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(&path[i-token_len],
20195d0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
20195d4: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
20195d8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
20195dc: b6 26 c0 02 sub %i3, %g2, %i3 <== NOT EXECUTED
20195e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20195e4: 90 07 00 1b add %i4, %i3, %o0 <== NOT EXECUTED
20195e8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20195ec: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20195f0: 81 c7 e0 08 ret <== NOT EXECUTED
20195f4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
bool done = false;
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);
20195f8: 40 00 12 3b call 201dee4 <__errno> <== NOT EXECUTED
20195fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019600: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019604: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019608: 81 c7 e0 08 ret <== NOT EXECUTED
201960c: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTDIR;
2019610: 40 00 12 35 call 201dee4 <__errno>
2019614: b0 10 3f ff mov -1, %i0
2019618: 82 10 20 14 mov 0x14, %g1
rc = -1;
goto error;
201961c: 10 bf ff 7f b 2019418 <msdos_eval4make+0xb8>
2019620: c2 22 00 00 st %g1, [ %o0 ]
*/
for( ; path[i] != '\0'; i++)
{
if (!msdos_is_separator(path[i]))
{
errno = ENOENT;
2019624: 40 00 12 30 call 201dee4 <__errno>
2019628: b0 10 3f ff mov -1, %i0
201962c: 82 10 20 02 mov 2, %g1
rc = -1;
goto error;
2019630: 10 bf ff 7a b 2019418 <msdos_eval4make+0xb8>
2019634: c2 22 00 00 st %g1, [ %o0 ]
020190d0 <msdos_eval_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
20190d0: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
20190d4: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
int token_len = 0;
20190d8: c0 27 bf f8 clr [ %fp + -8 ]
rtems_filesystem_location_info_t *pathloc
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
20190dc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
int i = 0;
int token_len = 0;
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
20190e0: 92 10 20 00 clr %o1
20190e4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
20190e8: 94 10 20 00 clr %o2
20190ec: 7f ff c4 ab call 200a398 <rtems_semaphore_obtain>
20190f0: b8 10 00 18 mov %i0, %i4
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20190f4: 80 a2 20 00 cmp %o0, 0
20190f8: 12 80 00 8c bne 2019328 <msdos_eval_path+0x258> <== NEVER TAKEN
20190fc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
2019100: d0 06 c0 00 ld [ %i3 ], %o0
2019104: 80 a2 20 00 cmp %o0, 0
2019108: 02 80 00 5f be 2019284 <msdos_eval_path+0x1b4> <== NEVER TAKEN
201910c: 01 00 00 00 nop
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
2019110: 7f ff e6 e8 call 2012cb0 <fat_file_reopen>
2019114: 01 00 00 00 nop
if (rc != RC_OK)
2019118: b0 92 20 00 orcc %o0, 0, %i0
201911c: 12 80 00 2c bne 20191cc <msdos_eval_path+0xfc> <== NEVER TAKEN
2019120: a0 10 20 00 clr %l0
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
2019124: 23 00 80 bc sethi %hi(0x202f000), %l1
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
2019128: 90 07 00 10 add %i4, %l0, %o0
201912c: 92 10 00 19 mov %i1, %o1
2019130: 94 07 bf fc add %fp, -4, %o2
2019134: 40 00 03 ce call 201a06c <msdos_get_token>
2019138: 96 07 bf f8 add %fp, -8, %o3
pathnamelen -= token_len;
201913c: d4 07 bf f8 ld [ %fp + -8 ], %o2
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
2019140: a4 10 00 08 mov %o0, %l2
pathnamelen -= token_len;
i += token_len;
fat_fd = pathloc->node_access;
2019144: e6 06 c0 00 ld [ %i3 ], %l3
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
pathnamelen -= token_len;
2019148: b2 26 40 0a sub %i1, %o2, %i1
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
201914c: 80 a2 20 03 cmp %o0, 3
2019150: 02 80 00 23 be 20191dc <msdos_eval_path+0x10c>
2019154: a0 04 00 0a add %l0, %o2, %l0
2019158: 80 a2 20 04 cmp %o0, 4
201915c: 02 80 00 15 be 20191b0 <msdos_eval_path+0xe0> <== NEVER TAKEN
2019160: 80 a2 20 02 cmp %o0, 2
2019164: 02 80 00 31 be 2019228 <msdos_eval_path+0x158>
2019168: 80 a0 00 08 cmp %g0, %o0
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
rc = -1;
goto error;
201916c: 82 40 20 00 addx %g0, 0, %g1
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
2019170: 80 a2 20 04 cmp %o0, 4
2019174: 02 80 00 04 be 2019184 <msdos_eval_path+0xb4> <== NEVER TAKEN
2019178: 80 88 60 ff btst 0xff, %g1
201917c: 12 bf ff ec bne 201912c <msdos_eval_path+0x5c>
2019180: 90 07 00 10 add %i4, %l0, %o0
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
2019184: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
2019188: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
201918c: 80 a0 60 01 cmp %g1, 1
2019190: 02 80 00 71 be 2019354 <msdos_eval_path+0x284>
2019194: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
loc->handlers = fs_info->directory_handlers;
else
loc->handlers = fs_info->file_handlers;
2019198: c2 00 a0 94 ld [ %g2 + 0x94 ], %g1
201919c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
*/
fat_fd = pathloc->node_access;
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
20191a0: 7f ff c4 c8 call 200a4c0 <rtems_semaphore_release>
20191a4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return RC_OK;
20191a8: 81 c7 e0 08 ret
20191ac: 81 e8 00 00 restore
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
20191b0: 40 00 13 4d call 201dee4 <__errno> <== NOT EXECUTED
20191b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20191b8: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
20191bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
20191c0: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
20191c4: 7f ff e7 8b call 2012ff0 <fat_file_close>
20191c8: 92 10 00 13 mov %l3, %o1
err:
rtems_semaphore_release(fs_info->vol_sema);
20191cc: 7f ff c4 bd call 200a4c0 <rtems_semaphore_release>
20191d0: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
20191d4: 81 c7 e0 08 ret
20191d8: 81 e8 00 00 restore
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
20191dc: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
20191e0: 80 a0 60 01 cmp %g1, 1
20191e4: 12 80 00 57 bne 2019340 <msdos_eval_path+0x270>
20191e8: d2 07 bf fc ld [ %fp + -4 ], %o1
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
20191ec: 40 00 09 21 call 201b670 <msdos_find_name>
20191f0: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
20191f4: 80 a2 20 00 cmp %o0, 0
20191f8: 22 bf ff cd be,a 201912c <msdos_eval_path+0x5c>
20191fc: 90 07 00 10 add %i4, %l0, %o0
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
2019200: 03 00 00 1f sethi %hi(0x7c00), %g1
2019204: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
2019208: 80 a2 00 01 cmp %o0, %g1
201920c: 12 bf ff ed bne 20191c0 <msdos_eval_path+0xf0> <== NEVER TAKEN
2019210: b0 10 00 08 mov %o0, %i0
{
errno = ENOENT;
2019214: 40 00 13 34 call 201dee4 <__errno>
2019218: b0 10 3f ff mov -1, %i0
201921c: 82 10 20 02 mov 2, %g1
2019220: 10 bf ff e8 b 20191c0 <msdos_eval_path+0xf0>
2019224: c2 22 00 00 st %g1, [ %o0 ]
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
2019228: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
201922c: 80 a0 60 01 cmp %g1, 1
2019230: 12 80 00 44 bne 2019340 <msdos_eval_path+0x270> <== NEVER TAKEN
2019234: 01 00 00 00 nop
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
2019238: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
}
/*
* Am I at the root of this mounted filesystem?
*/
if (rtems_filesystem_is_root_location(pathloc))
201923c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2019240: 80 a4 c0 02 cmp %l3, %g2
2019244: 02 80 00 18 be 20192a4 <msdos_eval_path+0x1d4> <== NEVER TAKEN
2019248: d2 07 bf fc ld [ %fp + -4 ], %o1
flags, pathloc);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
201924c: 40 00 09 09 call 201b670 <msdos_find_name>
2019250: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
2019254: 80 a2 20 00 cmp %o0, 0
2019258: 22 bf ff b5 be,a 201912c <msdos_eval_path+0x5c> <== ALWAYS TAKEN
201925c: 90 07 00 10 add %i4, %l0, %o0
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
2019260: 03 00 00 1f sethi %hi(0x7c00), %g1 <== NOT EXECUTED
2019264: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
2019268: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
201926c: 12 bf ff d5 bne 20191c0 <msdos_eval_path+0xf0> <== NOT EXECUTED
2019270: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
errno = ENOENT;
2019274: 40 00 13 1c call 201dee4 <__errno> <== NOT EXECUTED
2019278: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201927c: 10 bf ff d1 b 20191c0 <msdos_eval_path+0xf0> <== NOT EXECUTED
2019280: e4 22 00 00 st %l2, [ %o0 ] <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
2019284: 40 00 13 18 call 201dee4 <__errno> <== NOT EXECUTED
2019288: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201928c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
2019290: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
2019294: 7f ff c4 8b call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019298: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
201929c: 81 c7 e0 08 ret <== NOT EXECUTED
20192a0: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
20192a4: c4 04 61 7c ld [ %l1 + 0x17c ], %g2 <== NOT EXECUTED
{
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
20192a8: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
20192ac: 80 a4 c0 02 cmp %l3, %g2 <== NOT EXECUTED
20192b0: 02 bf ff 9f be 201912c <msdos_eval_path+0x5c> <== NOT EXECUTED
20192b4: 90 07 00 10 add %i4, %l0, %o0 <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
20192b8: d0 00 60 18 ld [ %g1 + 0x18 ], %o0 <== NOT EXECUTED
20192bc: c8 00 60 08 ld [ %g1 + 8 ], %g4 <== NOT EXECUTED
20192c0: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
20192c4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
20192c8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
*pathloc = newloc;
20192cc: c8 26 c0 00 st %g4, [ %i3 ] <== NOT EXECUTED
20192d0: c6 26 e0 04 st %g3, [ %i3 + 4 ] <== NOT EXECUTED
20192d4: c4 26 e0 08 st %g2, [ %i3 + 8 ] <== NOT EXECUTED
20192d8: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED
20192dc: d0 26 e0 10 st %o0, [ %i3 + 0x10 ] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
20192e0: 7f ff e7 44 call 2012ff0 <fat_file_close> <== NOT EXECUTED
20192e4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
if (rc != RC_OK)
20192e8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20192ec: 12 bf ff b8 bne 20191cc <msdos_eval_path+0xfc> <== NOT EXECUTED
20192f0: 01 00 00 00 nop <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
20192f4: 7f ff c4 73 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20192f8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
20192fc: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 <== NOT EXECUTED
2019300: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
2019304: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2019308: 90 24 00 09 sub %l0, %o1, %o0 <== NOT EXECUTED
201930c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2019310: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED
2019314: 90 07 00 08 add %i4, %o0, %o0 <== NOT EXECUTED
2019318: 9f c0 40 00 call %g1 <== NOT EXECUTED
201931c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
2019320: 81 c7 e0 08 ret <== NOT EXECUTED
2019324: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
const char *token;
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);
2019328: 40 00 12 ef call 201dee4 <__errno> <== NOT EXECUTED
201932c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019330: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019334: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019338: 81 c7 e0 08 ret <== NOT EXECUTED
201933c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTSUP;
2019340: 40 00 12 e9 call 201dee4 <__errno>
2019344: b0 10 3f ff mov -1, %i0
2019348: 82 10 20 86 mov 0x86, %g1
rc = -1;
goto error;
201934c: 10 bf ff 9d b 20191c0 <msdos_eval_path+0xf0>
2019350: c2 22 00 00 st %g1, [ %o0 ]
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
2019354: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1
2019358: 10 bf ff 92 b 20191a0 <msdos_eval_path+0xd0>
201935c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
02019c7c <msdos_file_chmod>:
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
2019c7c: 81 c3 e0 08 retl <== NOT EXECUTED
2019c80: 90 10 20 00 clr %o0 <== NOT EXECUTED
020196d4 <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)
{
20196d4: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20196d8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
20196dc: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
int
msdos_file_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20196e0: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
20196e4: 92 10 20 00 clr %o1
20196e8: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
20196ec: 94 10 20 00 clr %o2
20196f0: 7f ff c3 2a call 200a398 <rtems_semaphore_obtain>
20196f4: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20196f8: 80 a2 20 00 cmp %o0, 0
20196fc: 12 80 00 24 bne 201978c <msdos_file_close+0xb8> <== NEVER TAKEN
2019700: 01 00 00 00 nop
/*
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
2019704: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
2019708: 80 88 60 01 btst 1, %g1
201970c: 32 80 00 15 bne,a 2019760 <msdos_file_close+0x8c> <== NEVER TAKEN
2019710: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
2019714: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
2019718: 40 00 02 d6 call 201a270 <msdos_set_first_cluster_num>
201971c: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
2019720: b0 92 20 00 orcc %o0, 0, %i0
2019724: 12 80 00 16 bne 201977c <msdos_file_close+0xa8> <== NEVER TAKEN
2019728: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
201972c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
2019730: 40 00 03 08 call 201a350 <msdos_set_file_size>
2019734: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
2019738: b0 92 20 00 orcc %o0, 0, %i0
201973c: 12 80 00 10 bne 201977c <msdos_file_close+0xa8> <== NEVER TAKEN
2019740: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
2019744: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
2019748: 40 00 02 86 call 201a160 <msdos_set_dir_wrt_time_and_date>
201974c: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
2019750: b0 92 20 00 orcc %o0, 0, %i0
2019754: 12 80 00 0a bne 201977c <msdos_file_close+0xa8> <== NEVER TAKEN
2019758: 01 00 00 00 nop
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
201975c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
2019760: 7f ff e6 24 call 2012ff0 <fat_file_close>
2019764: 92 10 00 1c mov %i4, %o1
2019768: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
201976c: 7f ff c3 55 call 200a4c0 <rtems_semaphore_release>
2019770: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
return rc;
}
2019774: 81 c7 e0 08 ret
2019778: 81 e8 00 00 restore
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201977c: 7f ff c3 51 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019780: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
2019784: 81 c7 e0 08 ret <== NOT EXECUTED
2019788: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201978c: 40 00 11 d6 call 201dee4 <__errno> <== NOT EXECUTED
2019790: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019794: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019798: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201979c: 81 c7 e0 08 ret <== NOT EXECUTED
20197a0: 81 e8 00 00 restore <== NOT EXECUTED
02019c10 <msdos_file_datasync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
2019c10: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019c14: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
int
msdos_file_datasync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2019c18: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019c1c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019c20: 92 10 20 00 clr %o1 <== NOT EXECUTED
2019c24: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
2019c28: 7f ff c1 dc call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2019c2c: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019c30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2019c34: 12 80 00 0a bne 2019c5c <msdos_file_datasync+0x4c> <== NOT EXECUTED
2019c38: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
2019c3c: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
2019c40: 7f ff e6 93 call 201368c <fat_file_datasync> <== NOT EXECUTED
2019c44: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
2019c48: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
2019c4c: 7f ff c2 1d call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019c50: b0 10 20 00 clr %i0 <== NOT EXECUTED
return RC_OK;
}
2019c54: 81 c7 e0 08 ret <== NOT EXECUTED
2019c58: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2019c5c: 40 00 10 a2 call 201dee4 <__errno> <== NOT EXECUTED
2019c60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019c64: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019c68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019c6c: 81 c7 e0 08 ret <== NOT EXECUTED
2019c70: 81 e8 00 00 restore <== NOT EXECUTED
02019a64 <msdos_file_ftruncate>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
2019a64: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019a68: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2019a6c: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
if (length >= fat_fd->fat_file_size)
2019a70: 84 10 20 00 clr %g2
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019a74: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
2019a78: ba 10 00 18 mov %i0, %i5
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
2019a7c: 80 a0 80 19 cmp %g2, %i1
2019a80: 14 80 00 09 bg 2019aa4 <msdos_file_ftruncate+0x40> <== NEVER TAKEN
2019a84: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
2019a88: 80 a0 80 19 cmp %g2, %i1
2019a8c: 02 80 00 04 be 2019a9c <msdos_file_ftruncate+0x38> <== ALWAYS TAKEN
2019a90: 80 a0 40 1a cmp %g1, %i2
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
2019a94: 81 c7 e0 08 ret
2019a98: 91 e8 20 00 restore %g0, 0, %o0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
2019a9c: 08 bf ff fe bleu 2019a94 <msdos_file_ftruncate+0x30>
2019aa0: 01 00 00 00 nop
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019aa4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
2019aa8: 92 10 20 00 clr %o1
2019aac: 7f ff c2 3b call 200a398 <rtems_semaphore_obtain>
2019ab0: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019ab4: 80 a2 20 00 cmp %o0, 0
2019ab8: 12 80 00 16 bne 2019b10 <msdos_file_ftruncate+0xac> <== NEVER TAKEN
2019abc: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
2019ac0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
2019ac4: 7f ff e5 07 call 2012ee0 <fat_file_truncate>
2019ac8: 94 10 00 1a mov %i2, %o2
if (rc != RC_OK)
2019acc: b0 92 20 00 orcc %o0, 0, %i0
2019ad0: 12 80 00 0c bne 2019b00 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
2019ad4: 80 a6 00 19 cmp %i0, %i1
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
2019ad8: 14 80 00 07 bg 2019af4 <msdos_file_ftruncate+0x90> <== NEVER TAKEN
2019adc: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
2019ae0: 80 a6 00 19 cmp %i0, %i1
2019ae4: 12 80 00 07 bne 2019b00 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
2019ae8: 80 a0 40 1a cmp %g1, %i2
2019aec: 08 80 00 05 bleu 2019b00 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
2019af0: 01 00 00 00 nop
iop->size = fat_fd->fat_file_size = length;
2019af4: f4 27 20 18 st %i2, [ %i4 + 0x18 ]
2019af8: c0 27 60 08 clr [ %i5 + 8 ]
2019afc: f4 27 60 0c st %i2, [ %i5 + 0xc ]
rtems_semaphore_release(fs_info->vol_sema);
2019b00: 7f ff c2 70 call 200a4c0 <rtems_semaphore_release>
2019b04: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
return RC_OK;
2019b08: 81 c7 e0 08 ret
2019b0c: 81 e8 00 00 restore
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2019b10: 40 00 10 f5 call 201dee4 <__errno> <== NOT EXECUTED
2019b14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019b18: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019b1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019b20: 81 c7 e0 08 ret <== NOT EXECUTED
2019b24: 81 e8 00 00 restore <== NOT EXECUTED
02019c74 <msdos_file_ioctl>:
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
int rc = RC_OK;
return rc;
}
2019c74: 81 c3 e0 08 retl <== NOT EXECUTED
2019c78: 90 10 20 00 clr %o0 <== NOT EXECUTED
020198f0 <msdos_file_lseek>:
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
rtems_off64_t
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
20198f0: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20198f4: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
20198f8: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
rtems_off64_t
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20198fc: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
2019900: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019904: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
2019908: 92 10 20 00 clr %o1
201990c: 7f ff c2 a3 call 200a398 <rtems_semaphore_obtain>
2019910: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019914: 80 a2 20 00 cmp %o0, 0
2019918: 12 80 00 24 bne 20199a8 <msdos_file_lseek+0xb8> <== NEVER TAKEN
201991c: 92 10 00 1d mov %i5, %o1
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
2019920: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
2019924: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2019928: 7f ff e6 1b call 2013194 <fat_file_extend>
201992c: 96 07 bf fc add %fp, -4, %o3
&real_size);
if (rc != RC_OK)
2019930: b6 92 20 00 orcc %o0, 0, %i3
2019934: 12 80 00 17 bne 2019990 <msdos_file_lseek+0xa0> <== NEVER TAKEN
2019938: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
201993c: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
2019940: 80 a0 80 01 cmp %g2, %g1
2019944: 2a 80 00 0a bcs,a 201996c <msdos_file_lseek+0x7c> <== NEVER TAKEN
2019948: c2 26 20 14 st %g1, [ %i0 + 0x14 ] <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201994c: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
2019950: 82 10 00 02 mov %g2, %g1
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
2019954: c0 26 20 08 clr [ %i0 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
2019958: 7f ff c2 da call 200a4c0 <rtems_semaphore_release>
201995c: c2 26 20 0c st %g1, [ %i0 + 0xc ]
return iop->offset;
2019960: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0
}
2019964: 81 c7 e0 08 ret
2019968: 81 e8 00 00 restore
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201996c: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
2019970: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
2019974: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
2019978: c2 26 20 0c st %g1, [ %i0 + 0xc ] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
201997c: 7f ff c2 d1 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019980: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED
return iop->offset;
2019984: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
}
2019988: 81 c7 e0 08 ret <== NOT EXECUTED
201998c: 81 e8 00 00 restore <== NOT EXECUTED
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
&real_size);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2019990: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
2019994: 7f ff c2 cb call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019998: b2 10 00 1b mov %i3, %i1 <== NOT EXECUTED
return rc;
201999c: b1 3e e0 1f sra %i3, 0x1f, %i0 <== NOT EXECUTED
20199a0: 81 c7 e0 08 ret <== NOT EXECUTED
20199a4: 81 e8 00 00 restore <== NOT EXECUTED
uint32_t real_size = 0;
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);
20199a8: 40 00 11 4f call 201dee4 <__errno> <== NOT EXECUTED
20199ac: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
20199b0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20199b4: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
20199b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20199bc: 81 c7 e0 08 ret <== NOT EXECUTED
20199c0: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
02019638 <msdos_file_open>:
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
2019638: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201963c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2019640: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019644: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019648: 92 10 20 00 clr %o1
201964c: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
2019650: 94 10 20 00 clr %o2
2019654: 7f ff c3 51 call 200a398 <rtems_semaphore_obtain>
2019658: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201965c: 80 a2 20 00 cmp %o0, 0
2019660: 12 80 00 17 bne 20196bc <msdos_file_open+0x84> <== NEVER TAKEN
2019664: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
2019668: 7f ff e5 92 call 2012cb0 <fat_file_reopen>
201966c: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
2019670: b0 92 20 00 orcc %o0, 0, %i0
2019674: 12 80 00 0e bne 20196ac <msdos_file_open+0x74> <== NEVER TAKEN
2019678: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
201967c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2019680: 80 88 62 00 btst 0x200, %g1
2019684: 02 80 00 04 be 2019694 <msdos_file_open+0x5c>
2019688: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
iop->offset = fat_fd->fat_file_size;
201968c: c0 27 60 10 clr [ %i5 + 0x10 ]
2019690: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
2019694: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
2019698: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
201969c: 7f ff c3 89 call 200a4c0 <rtems_semaphore_release>
20196a0: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return RC_OK;
}
20196a4: 81 c7 e0 08 ret
20196a8: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
20196ac: 7f ff c3 85 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20196b0: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
20196b4: 81 c7 e0 08 ret <== NOT EXECUTED
20196b8: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20196bc: 40 00 12 0a call 201dee4 <__errno> <== NOT EXECUTED
20196c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20196c4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20196c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20196cc: 81 c7 e0 08 ret <== NOT EXECUTED
20196d0: 81 e8 00 00 restore <== NOT EXECUTED
020197a4 <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)
{
20197a4: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20197a8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
20197ac: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20197b0: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
20197b4: 92 10 20 00 clr %o1
20197b8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
20197bc: 7f ff c2 f7 call 200a398 <rtems_semaphore_obtain>
20197c0: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20197c4: 80 a2 20 00 cmp %o0, 0
20197c8: 12 80 00 0c bne 20197f8 <msdos_file_read+0x54> <== NEVER TAKEN
20197cc: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
20197d0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
20197d4: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
20197d8: 96 10 00 1a mov %i2, %o3
20197dc: 7f ff e5 3b call 2012cc8 <fat_file_read>
20197e0: 98 10 00 19 mov %i1, %o4
20197e4: b0 10 00 08 mov %o0, %i0
buffer);
rtems_semaphore_release(fs_info->vol_sema);
20197e8: 7f ff c3 36 call 200a4c0 <rtems_semaphore_release>
20197ec: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return ret;
}
20197f0: 81 c7 e0 08 ret
20197f4: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20197f8: 40 00 11 bb call 201dee4 <__errno> <== NOT EXECUTED
20197fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019800: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019804: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019808: 81 c7 e0 08 ret <== NOT EXECUTED
201980c: 81 e8 00 00 restore <== NOT EXECUTED
02019c84 <msdos_file_rmnod>:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
2019c84: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2019c88: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
2019c8c: f8 06 40 00 ld [ %i1 ], %i4 <== NOT EXECUTED
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2019c90: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019c94: 92 10 20 00 clr %o1 <== NOT EXECUTED
2019c98: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
2019c9c: 7f ff c1 bf call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2019ca0: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019ca4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2019ca8: 12 80 00 13 bne 2019cf4 <msdos_file_rmnod+0x70> <== NOT EXECUTED
2019cac: 92 07 20 20 add %i4, 0x20, %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
2019cb0: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
2019cb4: 40 00 01 d1 call 201a3f8 <msdos_set_first_char4file_name> <== NOT EXECUTED
2019cb8: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
2019cbc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2019cc0: 12 80 00 09 bne 2019ce4 <msdos_file_rmnod+0x60> <== NOT EXECUTED
2019cc4: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
2019cc8: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
2019ccc: 7f ff e6 45 call 20135e0 <fat_file_mark_removed> <== NOT EXECUTED
2019cd0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
2019cd4: 7f ff c1 fb call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019cd8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return RC_OK;
}
2019cdc: 81 c7 e0 08 ret <== NOT EXECUTED
2019ce0: 81 e8 00 00 restore <== NOT EXECUTED
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2019ce4: 7f ff c1 f7 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019ce8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
2019cec: 81 c7 e0 08 ret <== NOT EXECUTED
2019cf0: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2019cf4: 40 00 10 7c call 201dee4 <__errno> <== NOT EXECUTED
2019cf8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019cfc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019d00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019d04: 81 c7 e0 08 ret <== NOT EXECUTED
2019d08: 81 e8 00 00 restore <== NOT EXECUTED
020199c4 <msdos_file_stat>:
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
20199c4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
20199c8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
20199cc: f8 06 00 00 ld [ %i0 ], %i4
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
20199d0: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
20199d4: 92 10 20 00 clr %o1
20199d8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
20199dc: 7f ff c2 6f call 200a398 <rtems_semaphore_obtain>
20199e0: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20199e4: 80 a2 20 00 cmp %o0, 0
20199e8: 12 80 00 19 bne 2019a4c <msdos_file_stat+0x88> <== NEVER TAKEN
20199ec: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
20199f0: c4 1f 60 58 ldd [ %i5 + 0x58 ], %g2
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;
20199f4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
20199f8: f0 17 40 00 lduh [ %i5 ], %i0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
20199fc: de 07 20 0c ld [ %i4 + 0xc ], %o7
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
2019a00: c8 07 20 40 ld [ %i4 + 0x40 ], %g4
rtems_semaphore_release(fs_info->vol_sema);
2019a04: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
2019a08: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
2019a0c: 05 00 00 20 sethi %hi(0x8000), %g2
2019a10: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 81ff <PROM_START+0x81ff>
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
2019a14: bb 30 60 09 srl %g1, 9, %i5
buf->st_blksize = fs_info->fat.vol.bps;
2019a18: f0 26 60 40 st %i0, [ %i1 + 0x40 ]
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
2019a1c: de 26 60 08 st %o7, [ %i1 + 8 ]
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
2019a20: c0 26 60 18 clr [ %i1 + 0x18 ]
2019a24: c0 26 60 1c clr [ %i1 + 0x1c ]
buf->st_size = fat_fd->fat_file_size;
2019a28: c0 26 60 20 clr [ %i1 + 0x20 ]
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
2019a2c: c4 26 60 0c st %g2, [ %i1 + 0xc ]
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
2019a30: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
2019a34: fa 26 60 44 st %i5, [ %i1 + 0x44 ]
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
2019a38: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
rtems_semaphore_release(fs_info->vol_sema);
2019a3c: 7f ff c2 a1 call 200a4c0 <rtems_semaphore_release>
2019a40: b0 10 20 00 clr %i0
return RC_OK;
}
2019a44: 81 c7 e0 08 ret
2019a48: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2019a4c: 40 00 11 26 call 201dee4 <__errno> <== NOT EXECUTED
2019a50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019a54: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019a58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019a5c: 81 c7 e0 08 ret <== NOT EXECUTED
2019a60: 81 e8 00 00 restore <== NOT EXECUTED
02019b28 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
2019b28: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019b2c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
int
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2019b30: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019b34: f6 00 60 34 ld [ %g1 + 0x34 ], %i3 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019b38: 92 10 20 00 clr %o1 <== NOT EXECUTED
2019b3c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
2019b40: 94 10 20 00 clr %o2 <== NOT EXECUTED
2019b44: 7f ff c2 15 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2019b48: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019b4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2019b50: 12 80 00 2a bne 2019bf8 <msdos_file_sync+0xd0> <== NOT EXECUTED
2019b54: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
2019b58: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
2019b5c: 7f ff e6 cc call 201368c <fat_file_datasync> <== NOT EXECUTED
2019b60: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
2019b64: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2019b68: 12 80 00 20 bne 2019be8 <msdos_file_sync+0xc0> <== NOT EXECUTED
2019b6c: 01 00 00 00 nop <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
2019b70: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1 <== NOT EXECUTED
2019b74: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2019b78: 12 80 00 14 bne 2019bc8 <msdos_file_sync+0xa0> <== NOT EXECUTED
2019b7c: 01 00 00 00 nop <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
2019b80: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
2019b84: 40 00 01 bb call 201a270 <msdos_set_first_cluster_num> <== NOT EXECUTED
2019b88: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
2019b8c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2019b90: 32 80 00 12 bne,a 2019bd8 <msdos_file_sync+0xb0> <== NOT EXECUTED
2019b94: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
2019b98: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
2019b9c: 40 00 01 ed call 201a350 <msdos_set_file_size> <== NOT EXECUTED
2019ba0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
2019ba4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2019ba8: 32 80 00 0c bne,a 2019bd8 <msdos_file_sync+0xb0> <== NOT EXECUTED
2019bac: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
2019bb0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
2019bb4: 40 00 01 6b call 201a160 <msdos_set_dir_wrt_time_and_date><== NOT EXECUTED
2019bb8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
2019bbc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2019bc0: 32 80 00 06 bne,a 2019bd8 <msdos_file_sync+0xb0> <== NOT EXECUTED
2019bc4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rtems_semaphore_release(fs_info->vol_sema);
2019bc8: 7f ff c2 3e call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019bcc: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
return RC_OK;
}
2019bd0: 81 c7 e0 08 ret <== NOT EXECUTED
2019bd4: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2019bd8: 7f ff c2 3a call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019bdc: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
2019be0: 81 c7 e0 08 ret <== NOT EXECUTED
2019be4: 81 e8 00 00 restore <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2019be8: 7f ff c2 36 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2019bec: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
2019bf0: 81 c7 e0 08 ret <== NOT EXECUTED
2019bf4: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2019bf8: 40 00 10 bb call 201dee4 <__errno> <== NOT EXECUTED
2019bfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019c00: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019c04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019c08: 81 c7 e0 08 ret <== NOT EXECUTED
2019c0c: 81 e8 00 00 restore <== NOT EXECUTED
02019810 <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)
{
2019810: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2019814: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2019818: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201981c: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019820: 92 10 20 00 clr %o1
2019824: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
2019828: 94 10 20 00 clr %o2
201982c: 7f ff c2 db call 200a398 <rtems_semaphore_obtain>
2019830: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019834: 80 a2 20 00 cmp %o0, 0
2019838: 12 80 00 23 bne 20198c4 <msdos_file_write+0xb4> <== NEVER TAKEN
201983c: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
2019840: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
2019844: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2019848: 96 10 00 1a mov %i2, %o3
201984c: 7f ff e6 cb call 2013378 <fat_file_write>
2019850: 98 10 00 19 mov %i1, %o4
buffer);
if (ret < 0)
2019854: b0 92 20 00 orcc %o0, 0, %i0
2019858: 06 80 00 21 bl 20198dc <msdos_file_write+0xcc> <== NEVER TAKEN
201985c: 85 3e 20 1f sra %i0, 0x1f, %g2
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
2019860: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
2019864: 86 83 40 18 addcc %o5, %i0, %g3
2019868: 84 43 00 02 addx %o4, %g2, %g2
201986c: 80 a0 a0 00 cmp %g2, 0
2019870: 04 80 00 0a ble 2019898 <msdos_file_write+0x88> <== ALWAYS TAKEN
2019874: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
fat_fd->fat_file_size = iop->offset + ret;
2019878: 82 06 00 0d add %i0, %o5, %g1 <== NOT EXECUTED
201987c: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
2019880: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
2019884: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
2019888: 7f ff c3 0e call 200a4c0 <rtems_semaphore_release>
201988c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return ret;
}
2019890: 81 c7 e0 08 ret
2019894: 81 e8 00 00 restore
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
2019898: 32 bf ff fb bne,a 2019884 <msdos_file_write+0x74> <== NEVER TAKEN
201989c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
20198a0: 80 a0 c0 01 cmp %g3, %g1
20198a4: 38 bf ff f6 bgu,a 201987c <msdos_file_write+0x6c>
20198a8: 82 06 00 0d add %i0, %o5, %g1
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
20198ac: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
20198b0: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
20198b4: 7f ff c3 03 call 200a4c0 <rtems_semaphore_release>
20198b8: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return ret;
}
20198bc: 81 c7 e0 08 ret
20198c0: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20198c4: 40 00 11 88 call 201dee4 <__errno> <== NOT EXECUTED
20198c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20198cc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20198d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20198d4: 81 c7 e0 08 ret <== NOT EXECUTED
20198d8: 81 e8 00 00 restore <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
20198dc: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
20198e0: 7f ff c2 f8 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20198e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
20198e8: 81 c7 e0 08 ret <== NOT EXECUTED
20198ec: 81 e8 00 00 restore <== NOT EXECUTED
0201d23c <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
201d23c: 82 10 20 00 clr %g1
dn[i] = ' ';
201d240: 84 10 20 20 mov 0x20, %g2
201d244: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
201d248: 82 00 60 01 inc %g1
201d24c: 80 a0 60 0b cmp %g1, 0xb
201d250: 32 bf ff fe bne,a 201d248 <msdos_filename_unix2dos+0xc>
201d254: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
201d258: c2 4a 00 00 ldsb [ %o0 ], %g1
201d25c: 82 18 60 2e xor %g1, 0x2e, %g1
201d260: 80 a0 00 01 cmp %g0, %g1
201d264: 82 60 3f ff subx %g0, -1, %g1
201d268: 80 a2 60 01 cmp %o1, 1
201d26c: 02 80 00 6d be 201d420 <msdos_filename_unix2dos+0x1e4> <== NEVER TAKEN
201d270: c4 0a 00 00 ldub [ %o0 ], %g2
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
201d274: 80 a0 60 00 cmp %g1, 0
201d278: 12 80 00 72 bne 201d440 <msdos_filename_unix2dos+0x204> <== NEVER TAKEN
201d27c: 80 a2 60 02 cmp %o1, 2
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
201d280: 80 a2 60 00 cmp %o1, 0
201d284: 02 80 00 5c be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
201d288: 80 a0 60 00 cmp %g1, 0
201d28c: 32 80 00 61 bne,a 201d410 <msdos_filename_unix2dos+0x1d4><== NEVER TAKEN
201d290: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
201d294: 84 88 a0 ff andcc %g2, 0xff, %g2
201d298: 02 80 00 25 be 201d32c <msdos_filename_unix2dos+0xf0> <== NEVER TAKEN
201d29c: 80 a0 a0 2e cmp %g2, 0x2e
201d2a0: 22 80 00 24 be,a 201d330 <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
201d2a4: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
if (msdos_map[c] == 0)
201d2a8: 07 00 80 b8 sethi %hi(0x202e000), %g3
201d2ac: 86 10 e0 90 or %g3, 0x90, %g3 ! 202e090 <msdos_map>
201d2b0: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
201d2b4: 80 88 a0 ff btst 0xff, %g2
201d2b8: 12 80 00 15 bne 201d30c <msdos_filename_unix2dos+0xd0> <== ALWAYS TAKEN
201d2bc: 82 10 20 00 clr %g1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
201d2c0: 10 80 00 1c b 201d330 <msdos_filename_unix2dos+0xf4> <== NOT EXECUTED
201d2c4: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
201d2c8: 80 a0 60 07 cmp %g1, 7
201d2cc: 04 80 00 03 ble 201d2d8 <msdos_filename_unix2dos+0x9c>
201d2d0: 84 10 20 01 mov 1, %g2
201d2d4: 84 10 20 00 clr %g2
201d2d8: 80 88 a0 ff btst 0xff, %g2
201d2dc: 02 80 00 12 be 201d324 <msdos_filename_unix2dos+0xe8>
201d2e0: 80 a2 60 00 cmp %o1, 0
201d2e4: c4 0a 00 00 ldub [ %o0 ], %g2
201d2e8: 80 a0 a0 00 cmp %g2, 0
201d2ec: 02 80 00 10 be 201d32c <msdos_filename_unix2dos+0xf0> <== NEVER TAKEN
201d2f0: 80 a0 a0 2e cmp %g2, 0x2e
201d2f4: 22 80 00 0f be,a 201d330 <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
201d2f8: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
if (msdos_map[c] == 0)
201d2fc: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
201d300: 80 88 a0 ff btst 0xff, %g2
201d304: 22 80 00 0b be,a 201d330 <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
201d308: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
201d30c: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
un++;
201d310: 90 02 20 01 inc %o0
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
201d314: 92 82 7f ff addcc %o1, -1, %o1
201d318: 12 bf ff ec bne 201d2c8 <msdos_filename_unix2dos+0x8c>
201d31c: 82 00 60 01 inc %g1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
201d320: 80 a2 60 00 cmp %o1, 0
201d324: 02 80 00 34 be 201d3f4 <msdos_filename_unix2dos+0x1b8>
201d328: 01 00 00 00 nop
201d32c: c2 0a 00 00 ldub [ %o0 ], %g1
201d330: 80 a0 60 00 cmp %g1, 0
201d334: 02 80 00 30 be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
201d338: 80 a0 60 2e cmp %g1, 0x2e
un++;
201d33c: 90 02 20 01 inc %o0
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
201d340: 02 80 00 0c be 201d370 <msdos_filename_unix2dos+0x134> <== NEVER TAKEN
201d344: 92 02 7f ff add %o1, -1, %o1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
201d348: 80 a2 60 00 cmp %o1, 0
201d34c: 02 80 00 2a be 201d3f4 <msdos_filename_unix2dos+0x1b8>
201d350: 01 00 00 00 nop
201d354: c2 0a 00 00 ldub [ %o0 ], %g1
201d358: 80 a0 60 00 cmp %g1, 0
201d35c: 02 80 00 26 be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
201d360: 92 02 7f ff add %o1, -1, %o1
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
201d364: 80 a0 60 2e cmp %g1, 0x2e
201d368: 12 bf ff f8 bne 201d348 <msdos_filename_unix2dos+0x10c> <== ALWAYS TAKEN
201d36c: 90 02 20 01 inc %o0
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
201d370: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201d374: 02 80 00 20 be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201d378: 01 00 00 00 nop <== NOT EXECUTED
201d37c: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
201d380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d384: 02 80 00 1c be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201d388: 07 00 80 b8 sethi %hi(0x202e000), %g3 <== NOT EXECUTED
if (msdos_map[c] == 0)
201d38c: 86 10 e0 90 or %g3, 0x90, %g3 ! 202e090 <msdos_map> <== NOT EXECUTED
201d390: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 <== NOT EXECUTED
201d394: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201d398: 12 80 00 13 bne 201d3e4 <msdos_filename_unix2dos+0x1a8> <== NOT EXECUTED
201d39c: 82 10 20 08 mov 8, %g1 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201d3a0: 81 c3 e0 08 retl <== NOT EXECUTED
201d3a4: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
201d3a8: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED
201d3ac: 04 80 00 03 ble 201d3b8 <msdos_filename_unix2dos+0x17c> <== NOT EXECUTED
201d3b0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201d3b4: 84 10 20 00 clr %g2 <== NOT EXECUTED
201d3b8: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201d3bc: 02 80 00 0e be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201d3c0: 01 00 00 00 nop <== NOT EXECUTED
201d3c4: c4 0a 20 01 ldub [ %o0 + 1 ], %g2 <== NOT EXECUTED
201d3c8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201d3cc: 02 80 00 0a be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201d3d0: 90 02 20 01 inc %o0 <== NOT EXECUTED
if (msdos_map[c] == 0)
201d3d4: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
201d3d8: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201d3dc: 02 80 00 06 be 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201d3e0: 01 00 00 00 nop <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
201d3e4: c4 2a 80 01 stb %g2, [ %o2 + %g1 ] <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
201d3e8: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
201d3ec: 12 bf ff ef bne 201d3a8 <msdos_filename_unix2dos+0x16c> <== NOT EXECUTED
201d3f0: 82 00 60 01 inc %g1 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201d3f4: 81 c3 e0 08 retl
201d3f8: 90 10 20 00 clr %o0
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
201d3fc: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED
201d400: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED
201d404: 12 bf ff a4 bne 201d294 <msdos_filename_unix2dos+0x58> <== NOT EXECUTED
201d408: c4 0a 00 00 ldub [ %o0 ], %g2 <== NOT EXECUTED
201d40c: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
201d410: 12 bf ff fb bne 201d3fc <msdos_filename_unix2dos+0x1c0> <== NOT EXECUTED
201d414: 90 02 20 01 inc %o0 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201d418: 81 c3 e0 08 retl <== NOT EXECUTED
201d41c: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
201d420: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d424: 02 bf ff 95 be 201d278 <msdos_filename_unix2dos+0x3c> <== NOT EXECUTED
201d428: 01 00 00 00 nop <== NOT EXECUTED
dn[0] = '.';
201d42c: 82 10 20 2e mov 0x2e, %g1 ! 2e <PROM_START+0x2e> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201d430: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
201d434: c2 2a 80 00 stb %g1, [ %o2 ] <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201d438: 81 c3 e0 08 retl <== NOT EXECUTED
201d43c: 01 00 00 00 nop <== NOT EXECUTED
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
201d440: 12 bf ff 91 bne 201d284 <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
201d444: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201d448: c6 4a 20 01 ldsb [ %o0 + 1 ], %g3 <== NOT EXECUTED
201d44c: 80 a0 e0 2e cmp %g3, 0x2e <== NOT EXECUTED
201d450: 12 bf ff 8d bne 201d284 <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
201d454: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
dn[0] = '.';
201d458: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED
201d45c: c2 2a 80 00 stb %g1, [ %o2 ] <== NOT EXECUTED
dn[1] = '.';
return 0;
201d460: 10 bf ff e5 b 201d3f4 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201d464: c2 2a a0 01 stb %g1, [ %o2 + 1 ] <== NOT EXECUTED
0201b670 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
201b670: 9d e3 bf 60 save %sp, -160, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
201b674: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201b678: ba 07 bf c8 add %fp, -56, %i5
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
201b67c: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
201b680: 92 10 00 1a mov %i2, %o1
201b684: 94 10 00 1d mov %i5, %o2
201b688: 96 10 20 0b mov 0xb, %o3
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
201b68c: c0 27 bf fc clr [ %fp + -4 ]
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201b690: c0 27 bf c8 clr [ %fp + -56 ]
201b694: c0 27 bf cc clr [ %fp + -52 ]
201b698: c0 27 60 08 clr [ %i5 + 8 ]
201b69c: c0 27 60 0c clr [ %i5 + 0xc ]
201b6a0: c0 27 60 10 clr [ %i5 + 0x10 ]
201b6a4: c0 27 60 14 clr [ %i5 + 0x14 ]
201b6a8: c0 27 60 18 clr [ %i5 + 0x18 ]
201b6ac: c0 27 60 1c clr [ %i5 + 0x1c ]
name_type = msdos_long_to_short (name,
201b6b0: 7f ff f9 df call 2019e2c <msdos_long_to_short>
201b6b4: 90 10 00 19 mov %i1, %o0
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
201b6b8: b8 10 00 18 mov %i0, %i4
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
201b6bc: 98 10 00 08 mov %o0, %o4
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
201b6c0: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
201b6c4: 90 10 00 18 mov %i0, %o0
201b6c8: 92 10 20 00 clr %o1
201b6cc: 94 10 00 19 mov %i1, %o2
201b6d0: 96 10 00 1a mov %i2, %o3
201b6d4: 7f ff ff a2 call 201b55c <msdos_get_name_node>
201b6d8: 9a 07 bf ec add %fp, -20, %o5
&dir_pos, node_entry);
if (rc != RC_OK)
201b6dc: b0 92 20 00 orcc %o0, 0, %i0
201b6e0: 12 80 00 67 bne 201b87c <msdos_find_name+0x20c>
201b6e4: 01 00 00 00 nop
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
201b6e8: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
201b6ec: 31 00 00 1f sethi %hi(0x7c00), %i0
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
201b6f0: 80 88 60 08 btst 8, %g1
201b6f4: 12 80 00 1e bne 201b76c <msdos_find_name+0xfc> <== NEVER TAKEN
201b6f8: b0 16 21 01 or %i0, 0x101, %i0
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
201b6fc: 82 08 60 3f and %g1, 0x3f, %g1
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
201b700: 80 a0 60 0f cmp %g1, 0xf
201b704: 02 80 00 1a be 201b76c <msdos_find_name+0xfc> <== NEVER TAKEN
201b708: 92 07 bf ec add %fp, -20, %o1
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
201b70c: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
201b710: 7f ff dc bc call 2012a00 <fat_file_open>
201b714: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
201b718: b0 92 20 00 orcc %o0, 0, %i0
201b71c: 12 80 00 14 bne 201b76c <msdos_find_name+0xfc> <== NEVER TAKEN
201b720: f4 07 bf fc ld [ %fp + -4 ], %i2
return rc;
fat_fd->dir_pos = dir_pos;
201b724: c2 07 bf ec ld [ %fp + -20 ], %g1
* 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)
201b728: f2 06 a0 08 ld [ %i2 + 8 ], %i1
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
201b72c: c2 26 a0 20 st %g1, [ %i2 + 0x20 ]
201b730: c2 07 bf f0 ld [ %fp + -16 ], %g1
* 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)
201b734: 80 a6 60 01 cmp %i1, 1
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
201b738: c2 26 a0 24 st %g1, [ %i2 + 0x24 ]
201b73c: c2 07 bf f4 ld [ %fp + -12 ], %g1
201b740: c2 26 a0 28 st %g1, [ %i2 + 0x28 ]
201b744: c2 07 bf f8 ld [ %fp + -8 ], %g1
* 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)
201b748: 02 80 00 0b be 201b774 <msdos_find_name+0x104>
201b74c: c2 26 a0 2c st %g1, [ %i2 + 0x2c ]
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
201b750: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
201b754: 7f ff de 27 call 2012ff0 <fat_file_close>
201b758: d2 07 00 00 ld [ %i4 ], %o1
if (rc != RC_OK)
201b75c: b0 92 20 00 orcc %o0, 0, %i0
201b760: 12 80 00 44 bne 201b870 <msdos_find_name+0x200> <== NEVER TAKEN
201b764: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
201b768: c2 27 00 00 st %g1, [ %i4 ]
return rc;
}
201b76c: 81 c7 e0 08 ret
201b770: 81 e8 00 00 restore
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
201b774: c2 17 60 16 lduh [ %i5 + 0x16 ], %g1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b778: c6 17 60 1a lduh [ %i5 + 0x1a ], %g3
201b77c: c8 17 60 14 lduh [ %i5 + 0x14 ], %g4
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
201b780: c4 17 60 18 lduh [ %i5 + 0x18 ], %g2
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b784: 83 28 60 10 sll %g1, 0x10, %g1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b788: 89 29 20 10 sll %g4, 0x10, %g4
201b78c: 87 28 e0 10 sll %g3, 0x10, %g3
201b790: 9b 31 20 18 srl %g4, 0x18, %o5
201b794: 9f 30 e0 18 srl %g3, 0x18, %o7
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b798: 85 28 a0 10 sll %g2, 0x10, %g2
201b79c: 93 30 60 18 srl %g1, 0x18, %o1
201b7a0: 91 30 a0 18 srl %g2, 0x18, %o0
201b7a4: b1 30 60 08 srl %g1, 8, %i0
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b7a8: 89 31 20 08 srl %g4, 8, %g4
201b7ac: 87 30 e0 08 srl %g3, 8, %g3
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b7b0: 85 30 a0 08 srl %g2, 8, %g2
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b7b4: 03 00 00 3f sethi %hi(0xfc00), %g1
201b7b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b7bc: 84 08 80 01 and %g2, %g1, %g2
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b7c0: 88 09 00 01 and %g4, %g1, %g4
201b7c4: 86 08 c0 01 and %g3, %g1, %g3
201b7c8: 88 13 40 04 or %o5, %g4, %g4
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b7cc: 82 0e 00 01 and %i0, %g1, %g1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b7d0: 86 13 c0 03 or %o7, %g3, %g3
201b7d4: 89 29 20 10 sll %g4, 0x10, %g4
201b7d8: 86 11 00 03 or %g4, %g3, %g3
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b7dc: 92 12 40 01 or %o1, %g1, %o1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201b7e0: c6 26 a0 1c st %g3, [ %i2 + 0x1c ]
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201b7e4: 40 00 06 47 call 201d100 <msdos_date_dos2unix>
201b7e8: 90 12 00 02 or %o0, %g2, %o0
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
201b7ec: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
201b7f0: 80 88 60 10 btst 0x10, %g1
201b7f4: 12 80 00 27 bne 201b890 <msdos_find_name+0x220>
201b7f8: d0 26 a0 40 st %o0, [ %i2 + 0x40 ]
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
201b7fc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
201b800: c2 07 bf fc ld [ %fp + -4 ], %g1
201b804: bb 28 a0 18 sll %g2, 0x18, %i5
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201b808: 89 30 a0 18 srl %g2, 0x18, %g4
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201b80c: 87 30 a0 08 srl %g2, 8, %g3
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201b810: 88 17 40 04 or %i5, %g4, %g4
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201b814: 86 08 e0 ff and %g3, 0xff, %g3
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201b818: 87 28 e0 10 sll %g3, 0x10, %g3
201b81c: 86 11 00 03 or %g4, %g3, %g3
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201b820: 85 30 a0 10 srl %g2, 0x10, %g2
201b824: 84 08 a0 ff and %g2, 0xff, %g2
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201b828: 85 28 a0 08 sll %g2, 8, %g2
201b82c: 84 10 c0 02 or %g3, %g2, %g2
fat_fd->fat_file_type = FAT_FILE;
201b830: 86 10 20 05 mov 5, %g3
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
201b834: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
fat_fd->fat_file_type = FAT_FILE;
201b838: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
201b83c: 86 10 3f ff mov -1, %g3
201b840: c6 20 60 14 st %g3, [ %g1 + 0x14 ]
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201b844: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
201b848: c0 20 60 34 clr [ %g1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
201b84c: 80 a0 a0 00 cmp %g2, 0
201b850: 02 80 00 0d be 201b884 <msdos_find_name+0x214>
201b854: c6 20 60 38 st %g3, [ %g1 + 0x38 ]
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
201b858: c8 16 e0 06 lduh [ %i3 + 6 ], %g4
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
201b85c: 80 a1 00 02 cmp %g4, %g2
201b860: 0a 80 00 0a bcs 201b888 <msdos_find_name+0x218> <== NEVER TAKEN
201b864: 84 10 3f ff mov -1, %g2
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
201b868: 10 bf ff ba b 201b750 <msdos_find_name+0xe0>
201b86c: c6 20 60 3c st %g3, [ %g1 + 0x3c ]
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
if (rc != RC_OK)
{
fat_file_close(parent_loc->mt_entry, fat_fd);
201b870: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
201b874: 7f ff dd df call 2012ff0 <fat_file_close> <== NOT EXECUTED
201b878: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
return rc;
201b87c: 81 c7 e0 08 ret
201b880: 81 e8 00 00 restore
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
201b884: 84 10 3f ff mov -1, %g2
201b888: 10 bf ff b2 b 201b750 <msdos_find_name+0xe0>
201b88c: c4 20 60 3c st %g2, [ %g1 + 0x3c ]
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
201b890: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
201b894: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201b898: 05 00 08 00 sethi %hi(0x200000), %g2
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
201b89c: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
201b8a0: 92 10 00 01 mov %g1, %o1
201b8a4: 7f ff df c1 call 20137a8 <fat_file_size>
201b8a8: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
if (rc != RC_OK)
201b8ac: b0 92 20 00 orcc %o0, 0, %i0
201b8b0: 12 bf ff f0 bne 201b870 <msdos_find_name+0x200> <== NEVER TAKEN
201b8b4: c2 07 bf fc ld [ %fp + -4 ], %g1
201b8b8: 10 bf ff e3 b 201b844 <msdos_find_name+0x1d4>
201b8bc: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
0201a708 <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
)
{
201a708: 9d e3 bf 78 save %sp, -136, %sp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201a70c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201a710: f0 27 a0 44 st %i0, [ %fp + 0x44 ]
201a714: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
201a718: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201a71c: c2 27 bf e8 st %g1, [ %fp + -24 ]
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
201a720: 80 a7 20 00 cmp %i4, 0
201a724: 04 80 02 5a ble 201b08c <msdos_find_name_in_fat_file+0x984><== NEVER TAKEN
201a728: ae 10 00 1d mov %i5, %l7
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
201a72c: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201a730: 82 10 3f ff mov -1, %g1
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
201a734: c0 20 80 00 clr [ %g2 ]
dir_pos->sname.ofs = 0;
201a738: c0 20 a0 04 clr [ %g2 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201a73c: c2 20 a0 08 st %g1, [ %g2 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201a740: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
201a744: c2 27 bf f8 st %g1, [ %fp + -8 ]
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
201a748: 80 a6 a0 00 cmp %i2, 0
201a74c: 02 80 00 05 be 201a760 <msdos_find_name_in_fat_file+0x58>
201a750: c2 27 bf f4 st %g1, [ %fp + -12 ]
201a754: 80 a7 60 01 cmp %i5, 1
201a758: 02 80 00 06 be 201a770 <msdos_find_name_in_fat_file+0x68>
201a75c: c0 27 bf e4 clr [ %fp + -28 ]
lfn_entries = 0;
else
lfn_entries =
201a760: 90 07 20 0c add %i4, 0xc, %o0
201a764: 40 00 40 c8 call 202aa84 <.div>
201a768: 92 10 20 0d mov 0xd, %o1
201a76c: d0 27 bf e4 st %o0, [ %fp + -28 ]
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201a770: c6 07 a0 48 ld [ %fp + 0x48 ], %g3
201a774: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1
201a778: 80 a0 60 01 cmp %g1, 1
201a77c: 22 80 01 6e be,a 201ad34 <msdos_find_name_in_fat_file+0x62c>
201a780: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
201a784: c2 07 bf e8 ld [ %fp + -24 ], %g1
201a788: f2 10 60 06 lduh [ %g1 + 6 ], %i1
201a78c: c4 07 bf e8 ld [ %fp + -24 ], %g2
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
201a790: c6 07 bf e4 ld [ %fp + -28 ], %g3
201a794: d8 00 a0 9c ld [ %g2 + 0x9c ], %o4
201a798: 82 00 e0 01 add %g3, 1, %g1
201a79c: ba 10 00 1c mov %i4, %i5
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
201a7a0: c0 27 bf ec clr [ %fp + -20 ]
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
201a7a4: a8 10 20 00 clr %l4
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
201a7a8: b6 10 20 00 clr %i3
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
201a7ac: a0 10 20 00 clr %l0
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
201a7b0: a6 10 20 00 clr %l3
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
201a7b4: aa 10 20 00 clr %l5
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
201a7b8: ac 10 20 00 clr %l6
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
201a7bc: b0 10 20 00 clr %i0
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
201a7c0: a4 10 20 00 clr %l2
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
201a7c4: a2 10 3f ff mov -1, %l1
201a7c8: b8 10 00 01 mov %g1, %i4
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
201a7cc: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
201a7d0: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
201a7d4: d4 07 bf ec ld [ %fp + -20 ], %o2
201a7d8: 7f ff e1 3c call 2012cc8 <fat_file_read>
201a7dc: 96 10 00 19 mov %i1, %o3
201a7e0: 80 a2 20 00 cmp %o0, 0
201a7e4: 02 80 00 55 be 201a938 <msdos_find_name_in_fat_file+0x230><== NEVER TAKEN
201a7e8: 80 a2 20 1f cmp %o0, 0x1f
bool remainder_empty = false;
#if MSDOS_FIND_PRINT
printf ("MSFS:[2] dir_offset:%li\n", dir_offset);
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201a7ec: 04 80 01 89 ble 201ae10 <msdos_find_name_in_fat_file+0x708><== NEVER TAKEN
201a7f0: 80 a2 00 19 cmp %o0, %i1
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
201a7f4: 12 80 02 2e bne 201b0ac <msdos_find_name_in_fat_file+0x9a4><== NEVER TAKEN
201a7f8: c2 07 bf e8 ld [ %fp + -24 ], %g1
201a7fc: d8 00 60 9c ld [ %g1 + 0x9c ], %o4
201a800: 82 10 20 00 clr %g1
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201a804: 84 03 00 01 add %o4, %g1, %g2
* to here and write the long file name if this is the start of
* a series of empty entries. If empty_space_count is 0 then
* we are currently not inside an empty series of entries. It
* is a count of empty entries.
*/
if (empty_space_count == 0)
201a808: 80 a6 e0 00 cmp %i3, 0
201a80c: 12 80 00 04 bne 201a81c <msdos_find_name_in_fat_file+0x114><== NEVER TAKEN
201a810: de 0b 00 01 ldub [ %o4 + %g1 ], %o7
201a814: a0 10 00 01 mov %g1, %l0
201a818: a6 10 00 12 mov %l2, %l3
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
201a81c: 88 8b e0 ff andcc %o7, 0xff, %g4
201a820: 02 80 00 c6 be 201ab38 <msdos_find_name_in_fat_file+0x430>
201a824: 80 a1 20 e5 cmp %g4, 0xe5
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
201a828: 02 80 00 4a be 201a950 <msdos_find_name_in_fat_file+0x248><== NEVER TAKEN
201a82c: 80 a6 a0 00 cmp %i2, 0
* A valid entry so handle it.
*
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
201a830: 02 80 00 07 be 201a84c <msdos_find_name_in_fat_file+0x144>
201a834: c6 08 a0 0b ldub [ %g2 + 0xb ], %g3
201a838: 80 8d 20 ff btst 0xff, %l4
201a83c: 12 80 00 04 bne 201a84c <msdos_find_name_in_fat_file+0x144><== NEVER TAKEN
201a840: 01 00 00 00 nop
{
empty_space_entry = 0;
empty_space_count = 0;
201a844: b6 10 20 00 clr %i3 ! 0 <PROM_START>
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
201a848: a0 10 20 00 clr %l0
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
201a84c: 86 08 e0 3f and %g3, 0x3f, %g3
201a850: 80 a0 e0 0f cmp %g3, 0xf
201a854: 02 80 00 65 be 201a9e8 <msdos_find_name_in_fat_file+0x2e0>
201a858: 80 8e 20 ff btst 0xff, %i0
* If a LFN has been found and it matched check the
* entries have all been found and the checksum is
* correct. If this is the case return the short file
* name entry.
*/
if (lfn_matched)
201a85c: 02 80 00 4c be 201a98c <msdos_find_name_in_fat_file+0x284>
201a860: 80 a5 e0 01 cmp %l7, 1
201a864: 88 10 00 02 mov %g2, %g4
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201a868: 9a 00 a0 0a add %g2, 0xa, %o5
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
201a86c: 86 10 20 00 clr %g3
201a870: 10 80 00 0a b 201a898 <msdos_find_name_in_fat_file+0x190>
201a874: b0 10 20 00 clr %i0
201a878: b0 0e 20 ff and %i0, 0xff, %i0
201a87c: 86 0e 20 01 and %i0, 1, %g3
201a880: de 09 20 01 ldub [ %g4 + 1 ], %o7
201a884: 80 a0 00 03 cmp %g0, %g3
201a888: 88 01 20 01 inc %g4
201a88c: 86 40 3f ff addx %g0, -1, %g3
201a890: 86 08 e0 80 and %g3, 0x80, %g3
201a894: 86 00 ff 80 add %g3, -128, %g3
201a898: b1 36 20 01 srl %i0, 1, %i0
201a89c: 86 03 c0 03 add %o7, %g3, %g3
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
201a8a0: 80 a1 00 0d cmp %g4, %o5
201a8a4: 12 bf ff f5 bne 201a878 <msdos_find_name_in_fat_file+0x170>
201a8a8: b0 00 c0 18 add %g3, %i0, %i0
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
201a8ac: b0 1d 80 18 xor %l6, %i0, %i0
201a8b0: 80 8e 20 ff btst 0xff, %i0
201a8b4: 12 80 00 36 bne 201a98c <msdos_find_name_in_fat_file+0x284><== NEVER TAKEN
201a8b8: 80 a5 e0 01 cmp %l7, 1
201a8bc: 80 a5 60 00 cmp %l5, 0
201a8c0: 12 80 00 33 bne 201a98c <msdos_find_name_in_fat_file+0x284><== NEVER TAKEN
201a8c4: 80 a5 e0 01 cmp %l7, 1
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201a8c8: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
201a8cc: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
201a8d0: d6 07 bf ec ld [ %fp + -20 ], %o3
201a8d4: d8 07 a0 5c ld [ %fp + 0x5c ], %o4
201a8d8: b8 10 00 02 mov %g2, %i4
201a8dc: ba 10 00 01 mov %g1, %i5
201a8e0: 7f ff e1 f6 call 20130b8 <fat_file_ioctl>
201a8e4: 94 10 20 01 mov 1, %o2
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
201a8e8: b0 92 20 00 orcc %o0, 0, %i0
201a8ec: 12 80 00 17 bne 201a948 <msdos_find_name_in_fat_file+0x240><== NEVER TAKEN
201a8f0: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201a8f4: d2 07 bf f4 ld [ %fp + -12 ], %o1
201a8f8: 80 a2 7f ff cmp %o1, -1
201a8fc: 02 80 01 18 be 201ad5c <msdos_find_name_in_fat_file+0x654>
201a900: fa 20 e0 04 st %i5, [ %g3 + 4 ]
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201a904: 40 00 40 24 call 202a994 <.umul>
201a908: 90 10 00 19 mov %i1, %o0
201a90c: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
201a910: 96 10 00 08 mov %o0, %o3
201a914: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
201a918: 94 10 20 01 mov 1, %o2
201a91c: 7f ff e1 e7 call 20130b8 <fat_file_ioctl>
201a920: 98 07 bf f4 add %fp, -12, %o4
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
201a924: 80 a2 20 00 cmp %o0, 0
201a928: 02 80 01 0e be 201ad60 <msdos_find_name_in_fat_file+0x658><== ALWAYS TAKEN
201a92c: c2 07 bf f4 ld [ %fp + -12 ], %g1
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201a930: 81 c7 e0 08 ret <== NOT EXECUTED
201a934: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
201a938: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
201a93c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201a940: 12 80 00 8a bne 201ab68 <msdos_find_name_in_fat_file+0x460><== NOT EXECUTED
201a944: b0 16 21 01 or %i0, 0x101, %i0 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
201a948: 81 c7 e0 08 ret
201a94c: 81 e8 00 00 restore
}
break;
}
else if (entry_empty)
{
if (create_node)
201a950: 22 80 00 07 be,a 201a96c <msdos_find_name_in_fat_file+0x264><== NOT EXECUTED
201a954: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
201a958: b6 06 e0 01 inc %i3 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
201a95c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
201a960: 22 80 00 02 be,a 201a968 <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
201a964: a8 10 20 01 mov 1, %l4 <== 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)
201a968: 82 00 60 20 add %g1, 0x20, %g1
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
201a96c: 80 a6 40 01 cmp %i1, %g1
201a970: 18 bf ff a6 bgu 201a808 <msdos_find_name_in_fat_file+0x100><== ALWAYS TAKEN
201a974: 84 03 00 01 add %o4, %g1, %g2
201a978: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
201a97c: a4 04 a0 01 inc %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
201a980: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED
201a984: 10 bf ff 92 b 201a7cc <msdos_find_name_in_fat_file+0xc4> <== NOT EXECUTED
201a988: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
201a98c: 02 80 00 05 be 201a9a0 <msdos_find_name_in_fat_file+0x298>
201a990: c6 07 bf f4 ld [ %fp + -12 ], %g3
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
201a994: e2 27 bf f4 st %l1, [ %fp + -12 ]
lfn_matched = false;
201a998: 10 bf ff f4 b 201a968 <msdos_find_name_in_fat_file+0x260>
201a99c: b0 10 20 00 clr %i0
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
201a9a0: 80 a0 ff ff cmp %g3, -1
201a9a4: 32 bf ff fd bne,a 201a998 <msdos_find_name_in_fat_file+0x290><== NEVER TAKEN
201a9a8: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
201a9ac: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
201a9b0: 90 10 00 02 mov %g2, %o0
201a9b4: c2 27 bf e0 st %g1, [ %fp + -32 ]
201a9b8: c4 27 bf dc st %g2, [ %fp + -36 ]
201a9bc: d8 27 bf d8 st %o4, [ %fp + -40 ]
201a9c0: 40 00 0f ea call 201e968 <memcmp>
201a9c4: 94 10 20 0b mov 0xb, %o2
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
201a9c8: c2 07 bf e0 ld [ %fp + -32 ], %g1
201a9cc: 80 a2 20 00 cmp %o0, 0
201a9d0: c4 07 bf dc ld [ %fp + -36 ], %g2
201a9d4: 02 bf ff bd be 201a8c8 <msdos_find_name_in_fat_file+0x1c0>
201a9d8: d8 07 bf d8 ld [ %fp + -40 ], %o4
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
201a9dc: e2 27 bf f4 st %l1, [ %fp + -12 ]
lfn_matched = false;
201a9e0: 10 bf ff e2 b 201a968 <msdos_find_name_in_fat_file+0x260>
201a9e4: b0 10 20 00 clr %i0
#endif
/*
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
201a9e8: c6 07 bf f4 ld [ %fp + -12 ], %g3
201a9ec: 80 a0 ff ff cmp %g3, -1
201a9f0: 02 80 00 3d be 201aae4 <msdos_find_name_in_fat_file+0x3dc>
201a9f4: 80 89 20 40 btst 0x40, %g4
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
201a9f8: 88 09 20 3f and %g4, 0x3f, %g4
201a9fc: 80 a1 00 15 cmp %g4, %l5
201aa00: 22 80 00 04 be,a 201aa10 <msdos_find_name_in_fat_file+0x308><== ALWAYS TAKEN
201aa04: de 08 a0 0d ldub [ %g2 + 0xd ], %o7
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
201aa08: 10 bf ff d8 b 201a968 <msdos_find_name_in_fat_file+0x260> <== NOT EXECUTED
201aa0c: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
201aa10: 86 0d a0 ff and %l6, 0xff, %g3
201aa14: 80 a3 c0 03 cmp %o7, %g3
201aa18: 32 bf ff d4 bne,a 201a968 <msdos_find_name_in_fat_file+0x260><== NEVER TAKEN
201aa1c: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
201aa20: aa 05 7f ff add %l5, -1, %l5
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
201aa24: 9f 2d 60 04 sll %l5, 4, %o7
p = entry + 1;
201aa28: 84 00 a0 01 inc %g2
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
201aa2c: 87 2d 60 02 sll %l5, 2, %g3
201aa30: 86 23 c0 03 sub %o7, %g3, %g3
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
201aa34: de 48 80 00 ldsb [ %g2 ], %o7
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201aa38: b0 10 20 01 mov 1, %i0
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
201aa3c: 94 00 c0 15 add %g3, %l5, %o2
201aa40: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
p = entry + 1;
201aa44: 86 10 00 0a mov %o2, %g3
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
201aa48: 80 a3 e0 00 cmp %o7, 0
201aa4c: 02 80 00 15 be 201aaa0 <msdos_find_name_in_fat_file+0x398><== NEVER TAKEN
201aa50: 9a 06 3f ff add %i0, -1, %o5
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
201aa54: 80 a7 40 03 cmp %i5, %g3
201aa58: 24 80 00 1b ble,a 201aac4 <msdos_find_name_in_fat_file+0x3bc>
201aa5c: e2 27 bf f4 st %l1, [ %fp + -12 ]
201aa60: d6 4a 40 03 ldsb [ %o1 + %g3 ], %o3
201aa64: 80 a3 c0 0b cmp %o7, %o3
201aa68: 12 80 00 16 bne 201aac0 <msdos_find_name_in_fat_file+0x3b8>
201aa6c: 80 a3 60 04 cmp %o5, 4
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
201aa70: 02 80 00 2a be 201ab18 <msdos_find_name_in_fat_file+0x410>
201aa74: 80 a3 60 0a cmp %o5, 0xa
201aa78: 02 80 00 2c be 201ab28 <msdos_find_name_in_fat_file+0x420>
201aa7c: 80 a6 20 0d cmp %i0, 0xd
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
201aa80: 02 80 00 11 be 201aac4 <msdos_find_name_in_fat_file+0x3bc>
201aa84: 84 00 a0 02 add %g2, 2, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201aa88: b0 06 20 01 inc %i0
201aa8c: 86 00 e0 01 inc %g3
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
201aa90: de 48 80 00 ldsb [ %g2 ], %o7
201aa94: 80 a3 e0 00 cmp %o7, 0
201aa98: 12 bf ff ef bne 201aa54 <msdos_find_name_in_fat_file+0x34c>
201aa9c: 9a 06 3f ff add %i0, -1, %o5
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
201aaa0: c4 07 bf e4 ld [ %fp + -28 ], %g2
201aaa4: 80 a0 80 04 cmp %g2, %g4
201aaa8: 12 80 00 08 bne 201aac8 <msdos_find_name_in_fat_file+0x3c0><== NEVER TAKEN
201aaac: 80 a5 60 00 cmp %l5, 0
((o + i) != name_len))
201aab0: 9a 02 80 0d add %o2, %o5, %o5
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
201aab4: 80 a3 40 1d cmp %o5, %i5
201aab8: 02 80 00 04 be 201aac8 <msdos_find_name_in_fat_file+0x3c0><== ALWAYS TAKEN
201aabc: 80 a5 60 00 cmp %l5, 0
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
201aac0: e2 27 bf f4 st %l1, [ %fp + -12 ]
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
201aac4: 80 a5 60 00 cmp %l5, 0
201aac8: 12 bf ff a8 bne 201a968 <msdos_find_name_in_fat_file+0x260>
201aacc: b0 10 20 00 clr %i0
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201aad0: c4 07 bf f4 ld [ %fp + -12 ], %g2
201aad4: 84 38 00 02 xnor %g0, %g2, %g2
201aad8: 80 a0 00 02 cmp %g0, %g2
201aadc: 10 bf ff a3 b 201a968 <msdos_find_name_in_fat_file+0x260>
201aae0: b0 40 20 00 addx %g0, 0, %i0
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
201aae4: 02 bf ff a1 be 201a968 <msdos_find_name_in_fat_file+0x260>
201aae8: b0 10 20 00 clr %i0
* entry match the number we expect for this
* file name. Note we do not know the number of
* characters in the entry so this is check further
* on when the characters are checked.
*/
if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
201aaec: c6 07 bf e4 ld [ %fp + -28 ], %g3
201aaf0: 88 09 20 3f and %g4, 0x3f, %g4
201aaf4: 80 a1 00 03 cmp %g4, %g3
201aaf8: 32 bf ff 9d bne,a 201a96c <msdos_find_name_in_fat_file+0x264>
201aafc: 82 00 60 20 add %g1, 0x20, %g1
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
201ab00: e4 27 bf f4 st %l2, [ %fp + -12 ]
lfn_start.ofs = dir_entry;
201ab04: c2 27 bf f8 st %g1, [ %fp + -8 ]
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
201ab08: ec 08 a0 0d ldub [ %g2 + 0xd ], %l6
201ab0c: c8 08 80 00 ldub [ %g2 ], %g4
201ab10: 10 bf ff ba b 201a9f8 <msdos_find_name_in_fat_file+0x2f0>
201ab14: aa 10 00 03 mov %g3, %l5
}
switch (i)
{
case 4:
p += 5;
201ab18: 84 00 a0 05 add %g2, 5, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201ab1c: b0 06 20 01 inc %i0
201ab20: 10 bf ff dc b 201aa90 <msdos_find_name_in_fat_file+0x388>
201ab24: 86 00 e0 01 inc %g3
{
case 4:
p += 5;
break;
case 10:
p += 4;
201ab28: 84 00 a0 04 add %g2, 4, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201ab2c: b0 06 20 01 inc %i0
201ab30: 10 bf ff d8 b 201aa90 <msdos_find_name_in_fat_file+0x388>
201ab34: 86 00 e0 01 inc %g3
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
201ab38: 31 00 00 1f sethi %hi(0x7c00), %i0
201ab3c: ba 10 00 01 mov %g1, %i5
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
201ab40: 80 a6 a0 00 cmp %i2, 0
201ab44: 02 bf ff 81 be 201a948 <msdos_find_name_in_fat_file+0x240>
201ab48: b0 16 21 01 or %i0, 0x101, %i0
* Lets go and write the directory entries. If we have not found
* any available space add the remaining number of entries to any that
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
201ab4c: 80 8d 20 ff btst 0xff, %l4
201ab50: 12 80 00 07 bne 201ab6c <msdos_find_name_in_fat_file+0x464><== NEVER TAKEN
201ab54: 80 a5 e0 02 cmp %l7, 2
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
entries_per_block = bts2rd / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201ab58: 83 36 60 05 srl %i1, 5, %g1
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201ab5c: bb 37 60 05 srl %i5, 5, %i5
201ab60: b6 06 c0 01 add %i3, %g1, %i3
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
201ab64: b6 26 c0 1d sub %i3, %i5, %i3
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
201ab68: 80 a5 e0 02 cmp %l7, 2
201ab6c: 02 80 00 b2 be 201ae34 <msdos_find_name_in_fat_file+0x72c>
201ab70: 90 10 00 13 mov %l3, %o0
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
201ab74: c6 07 bf e4 ld [ %fp + -28 ], %g3
201ab78: 80 a0 e0 00 cmp %g3, 0
201ab7c: 02 80 00 14 be 201abcc <msdos_find_name_in_fat_file+0x4c4>
201ab80: b4 10 20 00 clr %i2
201ab84: 84 10 20 00 clr %g2
201ab88: 82 10 20 00 clr %g1
201ab8c: 10 80 00 08 b 201abac <msdos_find_name_in_fat_file+0x4a4>
201ab90: 86 10 20 00 clr %g3
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
((lfn_checksum & 1) ? 0x80 : 0) + (lfn_checksum >> 1) + *p;
201ab94: 86 0e a0 ff and %i2, 0xff, %g3
201ab98: 82 08 e0 01 and %g3, 1, %g1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
201ab9c: 80 a0 00 01 cmp %g0, %g1
201aba0: 82 40 3f ff addx %g0, -1, %g1
201aba4: 82 08 60 80 and %g1, 0x80, %g1
201aba8: 82 00 7f 80 add %g1, -128, %g1
201abac: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
201abb0: 87 30 e0 01 srl %g3, 1, %g3
201abb4: c8 0f 40 02 ldub [ %i5 + %g2 ], %g4
201abb8: 82 00 c0 01 add %g3, %g1, %g1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
201abbc: 84 00 a0 01 inc %g2
201abc0: 80 a0 a0 0b cmp %g2, 0xb
201abc4: 12 bf ff f4 bne 201ab94 <msdos_find_name_in_fat_file+0x48c>
201abc8: b4 00 40 04 add %g1, %g4, %i2
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
201abcc: 80 a6 e0 00 cmp %i3, 0
201abd0: 22 80 00 96 be,a 201ae28 <msdos_find_name_in_fat_file+0x720><== NEVER TAKEN
201abd4: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
201abd8: a4 1c c0 12 xor %l3, %l2, %l2
201abdc: 80 a0 00 12 cmp %g0, %l2
201abe0: ba 40 20 00 addx %g0, 0, %i5
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
201abe4: 82 10 3f ff mov -1, %g1
201abe8: c2 27 bf f8 st %g1, [ %fp + -8 ]
201abec: c2 27 bf f4 st %g1, [ %fp + -12 ]
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
201abf0: c2 07 bf e4 ld [ %fp + -28 ], %g1
201abf4: 80 a0 60 00 cmp %g1, 0
201abf8: 06 bf ff 54 bl 201a948 <msdos_find_name_in_fat_file+0x240><== NEVER TAKEN
201abfc: b0 10 20 00 clr %i0
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201ac00: a4 00 60 01 add %g1, 1, %l2
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
201ac04: 90 10 00 13 mov %l3, %o0
201ac08: 40 00 3f 63 call 202a994 <.umul>
201ac0c: 92 10 00 19 mov %i1, %o1
201ac10: e2 07 bf e8 ld [ %fp + -24 ], %l1
201ac14: ee 07 a0 44 ld [ %fp + 0x44 ], %l7
201ac18: ec 07 a0 48 ld [ %fp + 0x48 ], %l6
201ac1c: aa 10 00 08 mov %o0, %l5
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
201ac20: b6 10 20 00 clr %i3
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
201ac24: a8 10 00 12 mov %l2, %l4
*/
while (lfn_entry < (lfn_entries + 1))
{
int length = 0;
if (read_cluster)
201ac28: 80 8f 60 ff btst 0xff, %i5
201ac2c: 32 80 00 57 bne,a 201ad88 <msdos_find_name_in_fat_file+0x680><== NEVER TAKEN
201ac30: d8 04 60 9c ld [ %l1 + 0x9c ], %o4 <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201ac34: 80 a6 40 10 cmp %i1, %l0
201ac38: 08 80 01 10 bleu 201b078 <msdos_find_name_in_fat_file+0x970><== NEVER TAKEN
201ac3c: b8 06 e0 01 add %i3, 1, %i4
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201ac40: fa 04 60 9c ld [ %l1 + 0x9c ], %i5
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201ac44: 80 a4 80 1c cmp %l2, %i4
201ac48: 02 80 01 09 be 201b06c <msdos_find_name_in_fat_file+0x964>
201ac4c: ba 07 40 10 add %i5, %l0, %i5
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201ac50: c4 07 bf e4 ld [ %fp + -28 ], %g2
201ac54: 82 38 00 1b xnor %g0, %i3, %g1
201ac58: 82 00 40 02 add %g1, %g2, %g1
201ac5c: 87 28 60 04 sll %g1, 4, %g3
201ac60: 85 28 60 02 sll %g1, 2, %g2
201ac64: 84 20 c0 02 sub %g3, %g2, %g2
201ac68: c6 07 a0 50 ld [ %fp + 0x50 ], %g3
201ac6c: b6 10 00 10 mov %l0, %i3
201ac70: 82 00 80 01 add %g2, %g1, %g1
201ac74: ec 27 bf ec st %l6, [ %fp + -20 ]
201ac78: 82 00 c0 01 add %g3, %g1, %g1
201ac7c: ac 10 00 15 mov %l5, %l6
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201ac80: b0 10 20 20 mov 0x20, %i0
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201ac84: aa 10 00 10 mov %l0, %l5
201ac88: a0 10 00 1a mov %i2, %l0
201ac8c: b4 10 00 01 mov %g1, %i2
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
201ac90: c2 07 bf f4 ld [ %fp + -12 ], %g1
201ac94: 80 a0 7f ff cmp %g1, -1
201ac98: 22 80 00 e2 be,a 201b020 <msdos_find_name_in_fat_file+0x918>
201ac9c: e6 27 bf f4 st %l3, [ %fp + -12 ]
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201aca0: 90 10 00 1d mov %i5, %o0
201aca4: 92 10 20 00 clr %o1
201aca8: 40 00 0f 9a call 201eb10 <memset>
201acac: 94 10 20 20 mov 0x20, %o2
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201acb0: 86 10 00 1a mov %i2, %g3
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
201acb4: e0 2f 60 0d stb %l0, [ %i5 + 0xd ]
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201acb8: de 48 c0 00 ldsb [ %g3 ], %o7
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201acbc: 84 10 20 01 mov 1, %g2
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
201acc0: 82 07 60 01 add %i5, 1, %g1
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
201acc4: 9a 10 20 00 clr %o5
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201acc8: 88 00 bf ff add %g2, -1, %g4
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201accc: 80 a3 e0 00 cmp %o7, 0
201acd0: 02 80 00 11 be 201ad14 <msdos_find_name_in_fat_file+0x60c><== NEVER TAKEN
201acd4: d8 08 c0 00 ldub [ %g3 ], %o4
{
*p = *n;
201acd8: d8 28 40 00 stb %o4, [ %g1 ]
p [0] = fill;
p [1] = fill;
fill = 0xff;
}
switch (i)
201acdc: 80 a1 20 04 cmp %g4, 4
201ace0: 02 80 00 12 be 201ad28 <msdos_find_name_in_fat_file+0x620>
201ace4: 86 00 e0 01 inc %g3
201ace8: 80 a1 20 0a cmp %g4, 0xa
201acec: 02 80 00 81 be 201aef0 <msdos_find_name_in_fat_file+0x7e8>
201acf0: 80 a0 a0 0d cmp %g2, 0xd
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
201acf4: 02 80 00 82 be 201aefc <msdos_find_name_in_fat_file+0x7f4>
201acf8: 82 00 60 02 add %g1, 2, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201acfc: 84 00 a0 01 inc %g2
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201ad00: de 48 c0 00 ldsb [ %g3 ], %o7
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201ad04: 88 00 bf ff add %g2, -1, %g4
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201ad08: 80 a3 e0 00 cmp %o7, 0
201ad0c: 12 bf ff f3 bne 201acd8 <msdos_find_name_in_fat_file+0x5d0>
201ad10: d8 08 c0 00 ldub [ %g3 ], %o4
*p = *n;
n++;
}
else
{
p [0] = fill;
201ad14: da 28 40 00 stb %o5, [ %g1 ]
p [1] = fill;
201ad18: da 28 60 01 stb %o5, [ %g1 + 1 ]
fill = 0xff;
}
switch (i)
201ad1c: 80 a1 20 04 cmp %g4, 4
201ad20: 12 bf ff f2 bne 201ace8 <msdos_find_name_in_fat_file+0x5e0>
201ad24: 9a 10 3f ff mov -1, %o5
{
case 4:
p += 5;
201ad28: 82 00 60 05 add %g1, 5, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201ad2c: 10 bf ff f5 b 201ad00 <msdos_find_name_in_fat_file+0x5f8>
201ad30: 84 00 a0 01 inc %g2
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201ad34: 80 a0 60 00 cmp %g1, 0
201ad38: 12 bf fe 94 bne 201a788 <msdos_find_name_in_fat_file+0x80><== NEVER TAKEN
201ad3c: c2 07 bf e8 ld [ %fp + -24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201ad40: fa 07 bf e8 ld [ %fp + -24 ], %i5
201ad44: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201ad48: 80 88 60 03 btst 3, %g1
201ad4c: 02 bf fe 8f be 201a788 <msdos_find_name_in_fat_file+0x80> <== NEVER TAKEN
201ad50: c2 07 bf e8 ld [ %fp + -24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
201ad54: 10 bf fe 8e b 201a78c <msdos_find_name_in_fat_file+0x84>
201ad58: f2 00 e0 18 ld [ %g3 + 0x18 ], %i1
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201ad5c: 82 10 3f ff mov -1, %g1
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201ad60: fa 07 a0 5c ld [ %fp + 0x5c ], %i5
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
201ad64: d0 07 a0 60 ld [ %fp + 0x60 ], %o0
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201ad68: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = lfn_start.ofs;
201ad6c: c2 07 bf f8 ld [ %fp + -8 ], %g1
memcpy(name_dir_entry, entry,
201ad70: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
201ad74: c2 27 60 0c st %g1, [ %i5 + 0xc ]
memcpy(name_dir_entry, entry,
201ad78: 40 00 0f 2a call 201ea20 <memcpy>
201ad7c: 94 10 20 20 mov 0x20, %o2
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
201ad80: 81 c7 e0 08 ret
201ad84: 81 e8 00 00 restore
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(mt_entry, fat_fd,
201ad88: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
201ad8c: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
201ad90: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201ad94: 7f ff df cd call 2012cc8 <fat_file_read> <== NOT EXECUTED
201ad98: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
201ad9c: 80 a2 00 19 cmp %o0, %i1 <== NOT EXECUTED
201ada0: 02 bf ff a5 be 201ac34 <msdos_find_name_in_fat_file+0x52c><== NOT EXECUTED
201ada4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
{
if (ret != FAT_EOF)
201ada8: 12 80 00 1a bne 201ae10 <msdos_find_name_in_fat_file+0x708><== NOT EXECUTED
201adac: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (mt_entry, fat_fd, empty_space_offset * bts2rd,
201adb0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
201adb4: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201adb8: 7f ff e0 f7 call 2013194 <fat_file_extend> <== NOT EXECUTED
201adbc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
201adc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201adc4: 12 bf fe db bne 201a930 <msdos_find_name_in_fat_file+0x228><== NOT EXECUTED
201adc8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
201adcc: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
201add0: 12 80 00 10 bne 201ae10 <msdos_find_name_in_fat_file+0x708><== NOT EXECUTED
201add4: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
201add8: d0 04 60 9c ld [ %l1 + 0x9c ], %o0 <== NOT EXECUTED
201addc: 40 00 0f 4d call 201eb10 <memset> <== NOT EXECUTED
201ade0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
201ade4: d8 04 60 9c ld [ %l1 + 0x9c ], %o4 <== NOT EXECUTED
201ade8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
201adec: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
201adf0: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201adf4: 7f ff e1 61 call 2013378 <fat_file_write> <== NOT EXECUTED
201adf8: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
201adfc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
201ae00: 02 80 00 b5 be 201b0d4 <msdos_find_name_in_fat_file+0x9cc><== NOT EXECUTED
201ae04: 80 a2 00 19 cmp %o0, %i1 <== NOT EXECUTED
return ret;
else if (ret != bts2rd)
201ae08: 02 bf ff 8c be 201ac38 <msdos_find_name_in_fat_file+0x530><== NOT EXECUTED
201ae0c: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
201ae10: 40 00 0c 35 call 201dee4 <__errno> <== NOT EXECUTED
201ae14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201ae18: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201ae1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201ae20: 81 c7 e0 08 ret <== NOT EXECUTED
201ae24: 81 e8 00 00 restore <== NOT EXECUTED
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
{
read_cluster = true;
201ae28: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
empty_space_offset = dir_offset;
empty_space_entry = 0;
201ae2c: 10 bf ff 6e b 201abe4 <msdos_find_name_in_fat_file+0x4dc> <== NOT EXECUTED
201ae30: a0 10 20 00 clr %l0 <== NOT EXECUTED
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
201ae34: 40 00 3e d8 call 202a994 <.umul>
201ae38: 92 10 00 19 mov %i1, %o1
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201ae3c: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
201ae40: c6 07 bf e4 ld [ %fp + -28 ], %g3
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201ae44: c2 48 80 00 ldsb [ %g2 ], %g1
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
201ae48: 84 00 e0 01 add %g3, 1, %g2
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201ae4c: 80 a0 60 2e cmp %g1, 0x2e
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
201ae50: 86 02 00 10 add %o0, %l0, %g3
201ae54: 87 30 e0 05 srl %g3, 5, %g3
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201ae58: 02 80 00 05 be 201ae6c <msdos_find_name_in_fat_file+0x764><== NEVER TAKEN
201ae5c: 84 00 80 03 add %g2, %g3, %g2
201ae60: 80 a0 60 20 cmp %g1, 0x20
201ae64: 12 80 00 06 bne 201ae7c <msdos_find_name_in_fat_file+0x774><== ALWAYS TAKEN
201ae68: c6 07 a0 60 ld [ %fp + 0x60 ], %g3
*c = '_';
201ae6c: fa 07 a0 60 ld [ %fp + 0x60 ], %i5 <== NOT EXECUTED
201ae70: 82 10 20 5f mov 0x5f, %g1 <== NOT EXECUTED
201ae74: c2 2f 40 00 stb %g1, [ %i5 ] <== 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 == '.'))
201ae78: c6 07 a0 60 ld [ %fp + 0x60 ], %g3 <== NOT EXECUTED
201ae7c: c2 48 e0 01 ldsb [ %g3 + 1 ], %g1
201ae80: 80 a0 60 2e cmp %g1, 0x2e
201ae84: 02 80 00 06 be 201ae9c <msdos_find_name_in_fat_file+0x794><== NEVER TAKEN
201ae88: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
201ae8c: 80 a0 60 20 cmp %g1, 0x20
201ae90: 12 80 00 06 bne 201aea8 <msdos_find_name_in_fat_file+0x7a0><== ALWAYS TAKEN
201ae94: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
*c = '_';
201ae98: fa 07 a0 60 ld [ %fp + 0x60 ], %i5 <== NOT EXECUTED
201ae9c: 82 10 20 5f mov 0x5f, %g1 <== NOT EXECUTED
201aea0: c2 2f 60 01 stb %g1, [ %i5 + 1 ] <== 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++)
201aea4: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 <== NOT EXECUTED
201aea8: 09 00 80 b5 sethi %hi(0x202d400), %g4
201aeac: 86 00 60 02 add %g1, 2, %g3
201aeb0: 88 11 22 d0 or %g4, 0x2d0, %g4
201aeb4: 82 10 20 0c mov 0xc, %g1
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
201aeb8: bb 38 80 01 sra %g2, %g1, %i5
201aebc: ba 0f 60 0f and %i5, 0xf, %i5
201aec0: fa 09 00 1d ldub [ %g4 + %i5 ], %i5
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
201aec4: 82 00 7f fc add %g1, -4, %g1
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
201aec8: fa 28 c0 00 stb %i5, [ %g3 ]
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
201aecc: 80 a0 7f fc cmp %g1, -4
201aed0: 12 bf ff fa bne 201aeb8 <msdos_find_name_in_fat_file+0x7b0>
201aed4: 86 00 e0 01 inc %g3
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
201aed8: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
201aedc: 82 10 20 7e mov 0x7e, %g1
201aee0: c2 28 a0 06 stb %g1, [ %g2 + 6 ]
*c++ = '1';
201aee4: 82 10 20 31 mov 0x31, %g1
201aee8: 10 bf ff 23 b 201ab74 <msdos_find_name_in_fat_file+0x46c>
201aeec: c2 28 a0 07 stb %g1, [ %g2 + 7 ]
{
case 4:
p += 5;
break;
case 10:
p += 4;
201aef0: 82 00 60 04 add %g1, 4, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201aef4: 10 bf ff 83 b 201ad00 <msdos_find_name_in_fat_file+0x5f8>
201aef8: 84 00 a0 01 inc %g2
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201aefc: 82 25 00 1c sub %l4, %i4, %g1
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
201af00: 80 a7 20 01 cmp %i4, 1
201af04: 02 80 00 49 be 201b028 <msdos_find_name_in_fat_file+0x920>
201af08: c2 2f 40 00 stb %g1, [ %i5 ]
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201af0c: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201af10: b6 06 e0 20 add %i3, 0x20, %i3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201af14: 82 10 60 0f or %g1, 0xf, %g1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201af18: 80 a6 40 1b cmp %i1, %i3
201af1c: 08 80 00 4b bleu 201b048 <msdos_find_name_in_fat_file+0x940><== NEVER TAKEN
201af20: c2 2f 60 0b stb %g1, [ %i5 + 0xb ]
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201af24: fa 04 60 9c ld [ %l1 + 0x9c ], %i5
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
201af28: b8 07 20 01 inc %i4
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201af2c: ba 07 40 1b add %i5, %i3, %i5
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201af30: b0 06 20 20 add %i0, 0x20, %i0
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201af34: 80 a4 80 1c cmp %l2, %i4
201af38: 12 bf ff 56 bne 201ac90 <msdos_find_name_in_fat_file+0x588>
201af3c: b4 06 bf f3 add %i2, -13, %i2
201af40: b4 10 00 10 mov %l0, %i2
201af44: a0 10 00 15 mov %l5, %l0
201af48: aa 10 00 16 mov %l6, %l5
201af4c: ec 07 bf ec ld [ %fp + -20 ], %l6
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201af50: d8 07 a0 5c ld [ %fp + 0x5c ], %o4
201af54: 90 10 00 17 mov %l7, %o0
201af58: 92 10 00 16 mov %l6, %o1
201af5c: 94 10 20 01 mov 1, %o2
201af60: 7f ff e0 56 call 20130b8 <fat_file_ioctl>
201af64: 96 10 00 15 mov %l5, %o3
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
201af68: 80 a2 20 00 cmp %o0, 0
201af6c: 12 bf fe 71 bne 201a930 <msdos_find_name_in_fat_file+0x228><== NEVER TAKEN
201af70: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201af74: d2 07 bf f4 ld [ %fp + -12 ], %o1
201af78: 80 a2 7f ff cmp %o1, -1
201af7c: 02 80 00 3a be 201b064 <msdos_find_name_in_fat_file+0x95c>
201af80: f6 20 a0 04 st %i3, [ %g2 + 4 ]
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201af84: 40 00 3e 84 call 202a994 <.umul>
201af88: 90 10 00 19 mov %i1, %o0
201af8c: 92 10 00 16 mov %l6, %o1
201af90: 96 10 00 08 mov %o0, %o3
201af94: 94 10 20 01 mov 1, %o2
201af98: 90 10 00 17 mov %l7, %o0
201af9c: 7f ff e0 47 call 20130b8 <fat_file_ioctl>
201afa0: 98 07 bf f4 add %fp, -12, %o4
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
201afa4: 80 a2 20 00 cmp %o0, 0
201afa8: 12 bf fe 62 bne 201a930 <msdos_find_name_in_fat_file+0x228><== NEVER TAKEN
201afac: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201afb0: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201afb4: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201afb8: c2 20 e0 08 st %g1, [ %g3 + 8 ]
dir_pos->lname.ofs = lfn_start.ofs;
201afbc: c2 07 bf f8 ld [ %fp + -8 ], %g1
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201afc0: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
201afc4: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201afc8: 40 00 0e 96 call 201ea20 <memcpy>
201afcc: 94 10 20 20 mov 0x20, %o2
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
201afd0: b6 10 00 1c mov %i4, %i3
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201afd4: 96 10 00 18 mov %i0, %o3
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(mt_entry, fat_fd,
201afd8: d8 04 60 9c ld [ %l1 + 0x9c ], %o4
201afdc: 90 10 00 17 mov %l7, %o0
201afe0: 92 10 00 16 mov %l6, %o1
201afe4: 94 05 40 10 add %l5, %l0, %o2
201afe8: 7f ff e0 e4 call 2013378 <fat_file_write>
201afec: 98 03 00 10 add %o4, %l0, %o4
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
201aff0: 80 a2 3f ff cmp %o0, -1
201aff4: 02 80 00 36 be 201b0cc <msdos_find_name_in_fat_file+0x9c4><== NEVER TAKEN
201aff8: 80 a2 00 18 cmp %o0, %i0
return ret;
else if (ret != length)
201affc: 12 bf ff 85 bne 201ae10 <msdos_find_name_in_fat_file+0x708><== NEVER TAKEN
201b000: fa 07 bf e4 ld [ %fp + -28 ], %i5
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
201b004: a6 04 e0 01 inc %l3
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
201b008: 80 a7 40 1b cmp %i5, %i3
201b00c: 06 80 00 1e bl 201b084 <msdos_find_name_in_fat_file+0x97c><== ALWAYS TAKEN
201b010: aa 05 40 19 add %l5, %i1, %l5
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
201b014: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
201b018: 10 bf ff 04 b 201ac28 <msdos_find_name_in_fat_file+0x520> <== NOT EXECUTED
201b01c: a0 10 20 00 clr %l0 <== NOT EXECUTED
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
lfn_start.ofs = dir_entry;
201b020: 10 bf ff 20 b 201aca0 <msdos_find_name_in_fat_file+0x598>
201b024: f6 27 bf f8 st %i3, [ %fp + -8 ]
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
201b028: 82 10 60 40 or %g1, 0x40, %g1
201b02c: c2 2f 40 00 stb %g1, [ %i5 ]
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201b030: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201b034: b6 06 e0 20 add %i3, 0x20, %i3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201b038: 82 10 60 0f or %g1, 0xf, %g1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201b03c: 80 a6 40 1b cmp %i1, %i3
201b040: 18 bf ff b9 bgu 201af24 <msdos_find_name_in_fat_file+0x81c><== ALWAYS TAKEN
201b044: c2 2f 60 0b stb %g1, [ %i5 + 0xb ]
201b048: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED
201b04c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201b050: a0 10 00 15 mov %l5, %l0 <== NOT EXECUTED
201b054: b6 10 00 1c mov %i4, %i3 <== NOT EXECUTED
201b058: aa 10 00 16 mov %l6, %l5 <== NOT EXECUTED
201b05c: 10 bf ff df b 201afd8 <msdos_find_name_in_fat_file+0x8d0> <== NOT EXECUTED
201b060: ec 07 bf ec ld [ %fp + -20 ], %l6 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201b064: 10 bf ff d3 b 201afb0 <msdos_find_name_in_fat_file+0x8a8>
201b068: 82 10 3f ff mov -1, %g1
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201b06c: b6 10 00 10 mov %l0, %i3
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201b070: 10 bf ff b8 b 201af50 <msdos_find_name_in_fat_file+0x848>
201b074: b0 10 20 20 mov 0x20, %i0
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201b078: 96 10 20 00 clr %o3 <== NOT EXECUTED
201b07c: 10 bf ff d7 b 201afd8 <msdos_find_name_in_fat_file+0x8d0> <== NOT EXECUTED
201b080: b0 10 20 00 clr %i0 <== NOT EXECUTED
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
201b084: 81 c7 e0 08 ret
201b088: 91 e8 20 00 restore %g0, 0, %o0
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
201b08c: 11 00 80 b7 sethi %hi(0x202dc00), %o0 <== NOT EXECUTED
201b090: 15 00 80 b7 sethi %hi(0x202dc00), %o2 <== NOT EXECUTED
201b094: 17 00 80 b7 sethi %hi(0x202dc00), %o3 <== NOT EXECUTED
201b098: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED
201b09c: 92 10 24 19 mov 0x419, %o1 <== NOT EXECUTED
201b0a0: 94 12 a3 a0 or %o2, 0x3a0, %o2 <== NOT EXECUTED
201b0a4: 7f ff ea d2 call 2015bec <__assert_func> <== NOT EXECUTED
201b0a8: 96 12 e3 60 or %o3, 0x360, %o3 <== NOT EXECUTED
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
201b0ac: 11 00 80 b7 sethi %hi(0x202dc00), %o0 <== NOT EXECUTED
201b0b0: 15 00 80 b7 sethi %hi(0x202dc00), %o2 <== NOT EXECUTED
201b0b4: 17 00 80 b7 sethi %hi(0x202dc00), %o3 <== NOT EXECUTED
201b0b8: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED
201b0bc: 92 10 24 49 mov 0x449, %o1 <== NOT EXECUTED
201b0c0: 94 12 a3 a0 or %o2, 0x3a0, %o2 <== NOT EXECUTED
201b0c4: 7f ff ea ca call 2015bec <__assert_func> <== NOT EXECUTED
201b0c8: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
201b0cc: 81 c7 e0 08 ret <== NOT EXECUTED
201b0d0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
201b0d4: 81 c7 e0 08 ret <== NOT EXECUTED
201b0d8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0201b0dc <msdos_find_node_by_cluster_num_in_fat_file>:
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
201b0dc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201b0e0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
201b0e4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
201b0e8: 02 80 00 36 be 201b1c0 <msdos_find_node_by_cluster_num_in_fat_file+0xe4><== NOT EXECUTED
201b0ec: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
201b0f0: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
201b0f4: d8 04 e0 9c ld [ %l3 + 0x9c ], %o4 <== NOT EXECUTED
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
201b0f8: 23 00 00 3f sethi %hi(0xfc00), %l1 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
201b0fc: a8 10 20 00 clr %l4 <== NOT EXECUTED
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
201b100: a2 14 63 ff or %l1, 0x3ff, %l1 <== 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(mt_entry, fat_fd, j * bts2rd, bts2rd,
201b104: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201b108: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201b10c: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201b110: 7f ff de ee call 2012cc8 <fat_file_read> <== NOT EXECUTED
201b114: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED
201b118: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201b11c: 02 80 00 44 be 201b22c <msdos_find_node_by_cluster_num_in_fat_file+0x150><== NOT EXECUTED
201b120: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
201b124: 04 80 00 46 ble 201b23c <msdos_find_node_by_cluster_num_in_fat_file+0x160><== NOT EXECUTED
201b128: 80 a2 00 12 cmp %o0, %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
201b12c: 12 80 00 4a bne 201b254 <msdos_find_node_by_cluster_num_in_fat_file+0x178><== NOT EXECUTED
201b130: a0 10 20 00 clr %l0 <== NOT EXECUTED
201b134: d8 04 e0 9c ld [ %l3 + 0x9c ], %o4 <== NOT EXECUTED
201b138: ba 10 00 0c mov %o4, %i5 <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
201b13c: c2 0f 40 00 ldub [ %i5 ], %g1 <== NOT EXECUTED
201b140: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201b144: 02 80 00 1b be 201b1b0 <msdos_find_node_by_cluster_num_in_fat_file+0xd4><== NOT EXECUTED
201b148: 80 a0 60 e5 cmp %g1, 0xe5 <== 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)) ==
201b14c: 22 80 00 14 be,a 201b19c <msdos_find_node_by_cluster_num_in_fat_file+0xc0><== NOT EXECUTED
201b150: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
201b154: c2 17 60 1a lduh [ %i5 + 0x1a ], %g1 <== NOT EXECUTED
201b158: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
201b15c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201b160: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201b164: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED
201b168: 9f 30 a0 18 srl %g2, 0x18, %o7 <== NOT EXECUTED
201b16c: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
201b170: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201b174: 86 08 c0 11 and %g3, %l1, %g3 <== NOT EXECUTED
201b178: 84 08 80 11 and %g2, %l1, %g2 <== NOT EXECUTED
201b17c: 86 11 00 03 or %g4, %g3, %g3 <== NOT EXECUTED
201b180: 82 13 c0 02 or %o7, %g2, %g1 <== NOT EXECUTED
201b184: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201b188: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
201b18c: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
201b190: 22 80 00 16 be,a 201b1e8 <msdos_find_node_by_cluster_num_in_fat_file+0x10c><== NOT EXECUTED
201b194: 90 10 00 18 mov %i0, %o0 <== 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)
201b198: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED
201b19c: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED
201b1a0: 0a bf ff e7 bcs 201b13c <msdos_find_node_by_cluster_num_in_fat_file+0x60><== NOT EXECUTED
201b1a4: ba 07 60 20 add %i5, 0x20, %i5 <== NOT EXECUTED
201b1a8: 10 bf ff d7 b 201b104 <msdos_find_node_by_cluster_num_in_fat_file+0x28><== NOT EXECUTED
201b1ac: a8 05 00 12 add %l4, %l2, %l4 <== NOT EXECUTED
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
201b1b0: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
201b1b4: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
201b1b8: 81 c7 e0 08 ret <== NOT EXECUTED
201b1bc: 81 e8 00 00 restore <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201b1c0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED
201b1c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201b1c8: 32 bf ff cb bne,a 201b0f4 <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
201b1cc: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201b1d0: c2 0c e0 0a ldub [ %l3 + 0xa ], %g1 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201b1d4: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201b1d8: 22 bf ff c7 be,a 201b0f4 <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
201b1dc: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
201b1e0: 10 bf ff c5 b 201b0f4 <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
201b1e4: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
201b1e8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201b1ec: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201b1f0: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED
201b1f4: 7f ff df b1 call 20130b8 <fat_file_ioctl> <== NOT EXECUTED
201b1f8: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
201b1fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b200: 12 bf ff ee bne 201b1b8 <msdos_find_node_by_cluster_num_in_fat_file+0xdc><== NOT EXECUTED
201b204: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
201b208: e0 26 e0 04 st %l0, [ %i3 + 4 ] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201b20c: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201b210: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED
memcpy(dir_entry, entry,
201b214: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201b218: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201b21c: 40 00 0e 01 call 201ea20 <memcpy> <== NOT EXECUTED
201b220: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
201b224: 81 c7 e0 08 ret <== NOT EXECUTED
201b228: 81 e8 00 00 restore <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
201b22c: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
201b230: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
201b234: 81 c7 e0 08 ret <== NOT EXECUTED
201b238: 81 e8 00 00 restore <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
201b23c: 40 00 0b 2a call 201dee4 <__errno> <== NOT EXECUTED
201b240: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201b244: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201b248: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201b24c: 81 c7 e0 08 ret <== NOT EXECUTED
201b250: 81 e8 00 00 restore <== NOT EXECUTED
assert(ret == bts2rd);
201b254: 11 00 80 b7 sethi %hi(0x202dc00), %o0 <== NOT EXECUTED
201b258: 15 00 80 b7 sethi %hi(0x202dc00), %o2 <== NOT EXECUTED
201b25c: 17 00 80 b7 sethi %hi(0x202dc00), %o3 <== NOT EXECUTED
201b260: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED
201b264: 92 10 26 9e mov 0x69e, %o1 <== NOT EXECUTED
201b268: 94 12 a3 c0 or %o2, 0x3c0, %o2 <== NOT EXECUTED
201b26c: 7f ff ea 60 call 2015bec <__assert_func> <== NOT EXECUTED
201b270: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
0200e840 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200e840: 9d e3 bc e0 save %sp, -800, %sp
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
200e844: 92 10 20 02 mov 2, %o1
200e848: 90 10 00 19 mov %i1, %o0
200e84c: 15 00 80 b6 sethi %hi(0x202d800), %o2
200e850: 7f ff ff 63 call 200e5dc <msdos_format_printf>
200e854: 94 12 a0 e0 or %o2, 0xe0, %o2 ! 202d8e0 <_CPU_Trap_slot_template+0x64>
fd = open(devname, O_RDWR);
200e858: 90 10 00 18 mov %i0, %o0
200e85c: 7f ff e0 d6 call 2006bb4 <open>
200e860: 92 10 20 02 mov 2, %o1
if (fd == -1) {
200e864: 80 a2 3f ff cmp %o0, -1
200e868: 02 80 01 76 be 200ee40 <msdos_format+0x600> <== NEVER TAKEN
200e86c: ba 10 00 08 mov %o0, %i5
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e870: 96 10 00 18 mov %i0, %o3
200e874: 92 10 20 02 mov 2, %o1
200e878: 90 10 00 19 mov %i1, %o0
200e87c: 15 00 80 b6 sethi %hi(0x202d800), %o2
200e880: 7f ff ff 57 call 200e5dc <msdos_format_printf>
200e884: 94 12 a0 f0 or %o2, 0xf0, %o2 ! 202d8f0 <_CPU_Trap_slot_template+0x74>
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
200e888: 92 07 bf a8 add %fp, -88, %o1
200e88c: 40 00 1d 30 call 2015d4c <fstat>
200e890: 90 10 00 1d mov %i5, %o0
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200e894: 92 10 20 01 mov 1, %o1
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
200e898: b8 10 00 08 mov %o0, %i4
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200e89c: 96 10 00 18 mov %i0, %o3
200e8a0: 90 10 00 19 mov %i1, %o0
200e8a4: 15 00 80 b6 sethi %hi(0x202d800), %o2
200e8a8: 7f ff ff 4d call 200e5dc <msdos_format_printf>
200e8ac: 94 12 a1 00 or %o2, 0x100, %o2 ! 202d900 <_CPU_Trap_slot_template+0x84>
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
200e8b0: 80 a7 20 00 cmp %i4, 0
200e8b4: 12 80 03 82 bne 200f6bc <msdos_format+0xe7c> <== NEVER TAKEN
200e8b8: c4 07 bf b4 ld [ %fp + -76 ], %g2
200e8bc: 03 00 00 3c sethi %hi(0xf000), %g1
200e8c0: 84 08 80 01 and %g2, %g1, %g2
200e8c4: 03 00 00 18 sethi %hi(0x6000), %g1
200e8c8: 80 a0 80 01 cmp %g2, %g1
200e8cc: 02 80 00 16 be 200e924 <msdos_format+0xe4> <== ALWAYS TAKEN
200e8d0: 01 00 00 00 nop
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
200e8d4: 40 00 3d 84 call 201dee4 <__errno> <== NOT EXECUTED
200e8d8: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200e8dc: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED
200e8e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200e8e4: b8 10 20 00 clr %i4 <== NOT EXECUTED
}
/*
* create master boot record
*/
if (ret_val == 0) {
200e8e8: 80 a6 20 00 cmp %i0, 0
200e8ec: 02 80 00 66 be 200ea84 <msdos_format+0x244> <== ALWAYS TAKEN
200e8f0: 90 10 00 19 mov %i1, %o0
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
200e8f4: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
200e8f8: 02 80 00 05 be 200e90c <msdos_format+0xcc> <== NEVER TAKEN
200e8fc: 80 a7 20 00 cmp %i4, 0
close(fd);
200e900: 7f ff db dc call 2005870 <close>
200e904: 90 10 00 1d mov %i5, %o0
}
if (dd != NULL) {
200e908: 80 a7 20 00 cmp %i4, 0
200e90c: 02 80 00 04 be 200e91c <msdos_format+0xdc> <== NEVER TAKEN
200e910: 01 00 00 00 nop
rtems_disk_release(dd);
200e914: 7f ff d8 ad call 2004bc8 <rtems_disk_release>
200e918: 90 10 00 1c mov %i4, %o0
}
return ret_val;
}
200e91c: 81 c7 e0 08 ret
200e920: 81 e8 00 00 restore
ret_val = -1;
}
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
200e924: 7f ff d8 8a call 2004b4c <rtems_disk_obtain>
200e928: d0 1f bf c0 ldd [ %fp + -64 ], %o0
if (dd == NULL) {
200e92c: b8 92 20 00 orcc %o0, 0, %i4
200e930: 02 bf ff e9 be 200e8d4 <msdos_format+0x94> <== NEVER TAKEN
200e934: 01 00 00 00 nop
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
200e938: e0 07 20 20 ld [ %i4 + 0x20 ], %l0
fmt_params->totl_sector_cnt = dd->size;
200e93c: f0 07 20 1c ld [ %i4 + 0x1c ], %i0
total_size = dd->block_size * dd->size;
200e940: 92 10 00 10 mov %l0, %o1
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
200e944: c0 27 bf 60 clr [ %fp + -160 ]
200e948: c0 27 bf 64 clr [ %fp + -156 ]
200e94c: c0 27 bf 68 clr [ %fp + -152 ]
200e950: c0 27 bf 6c clr [ %fp + -148 ]
200e954: c0 27 bf 70 clr [ %fp + -144 ]
200e958: c0 27 bf 74 clr [ %fp + -140 ]
200e95c: c0 27 bf 78 clr [ %fp + -136 ]
200e960: c0 27 bf 7c clr [ %fp + -132 ]
200e964: c0 27 bf 80 clr [ %fp + -128 ]
200e968: c0 27 bf 84 clr [ %fp + -124 ]
200e96c: c0 27 bf 88 clr [ %fp + -120 ]
200e970: c0 27 bf 8c clr [ %fp + -116 ]
200e974: c0 27 bf 90 clr [ %fp + -112 ]
200e978: c0 27 bf 94 clr [ %fp + -108 ]
200e97c: c0 27 bf 98 clr [ %fp + -104 ]
200e980: c0 27 bf 9c clr [ %fp + -100 ]
200e984: c0 27 bf a0 clr [ %fp + -96 ]
200e988: c0 27 bf a4 clr [ %fp + -92 ]
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
200e98c: e0 27 bf 58 st %l0, [ %fp + -168 ]
fmt_params->totl_sector_cnt = dd->size;
200e990: f0 27 bf 5c st %i0, [ %fp + -164 ]
total_size = dd->block_size * dd->size;
200e994: 40 00 70 00 call 202a994 <.umul>
200e998: 90 10 00 18 mov %i0, %o0
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e99c: 9a 10 20 00 clr %o5
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
200e9a0: b6 10 00 08 mov %o0, %i3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e9a4: d0 23 a0 5c st %o0, [ %sp + 0x5c ]
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
200e9a8: b4 10 20 00 clr %i2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e9ac: 92 10 20 02 mov 2, %o1
200e9b0: f4 3f bd 50 std %i2, [ %fp + -688 ]
200e9b4: 90 10 00 19 mov %i1, %o0
200e9b8: 96 10 00 10 mov %l0, %o3
200e9bc: 15 00 80 b6 sethi %hi(0x202d800), %o2
200e9c0: 98 10 00 18 mov %i0, %o4
200e9c4: 7f ff ff 06 call 200e5dc <msdos_format_printf>
200e9c8: 94 12 a1 98 or %o2, 0x198, %o2
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200e9cc: 80 a6 60 00 cmp %i1, 0
200e9d0: 02 80 02 a5 be 200f464 <msdos_format+0xc24> <== NEVER TAKEN
200e9d4: 82 10 20 02 mov 2, %g1
(rqdata->fat_num == 0)) {
200e9d8: d6 06 60 0c ld [ %i1 + 0xc ], %o3
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200e9dc: 80 a2 e0 00 cmp %o3, 0
200e9e0: 02 80 01 27 be 200ee7c <msdos_format+0x63c> <== ALWAYS TAKEN
200e9e4: 90 10 00 19 mov %i1, %o0
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
200e9e8: 82 10 20 00 clr %g1 <== NOT EXECUTED
200e9ec: 80 a2 e0 06 cmp %o3, 6 <== NOT EXECUTED
200e9f0: 18 80 01 27 bgu 200ee8c <msdos_format+0x64c> <== NOT EXECUTED
200e9f4: a0 10 20 16 mov 0x16, %l0 <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
200e9f8: d6 2f bf 88 stb %o3, [ %fp + -120 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e9fc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200ea00: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200ea04: 96 0a e0 ff and %o3, 0xff, %o3 <== NOT EXECUTED
200ea08: 15 00 80 b6 sethi %hi(0x202d800), %o2
200ea0c: 7f ff fe f4 call 200e5dc <msdos_format_printf>
200ea10: 94 12 a1 10 or %o2, 0x110, %o2 ! 202d910 <_CPU_Trap_slot_template+0x94>
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
200ea14: 82 10 20 01 mov 1, %g1
200ea18: c2 27 bf 64 st %g1, [ %fp + -156 ]
if ((rqdata != NULL) &&
200ea1c: c2 0e 60 14 ldub [ %i1 + 0x14 ], %g1
200ea20: 80 a0 60 01 cmp %g1, 1
200ea24: 02 80 01 7c be 200f014 <msdos_format+0x7d4> <== NEVER TAKEN
200ea28: 80 a0 60 02 cmp %g1, 2
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
200ea2c: 02 80 01 7a be 200f014 <msdos_format+0x7d4> <== NEVER TAKEN
200ea30: 80 a0 60 03 cmp %g1, 3
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
200ea34: 02 80 02 f9 be 200f618 <msdos_format+0xdd8> <== NEVER TAKEN
200ea38: 80 a0 60 00 cmp %g1, 0
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
200ea3c: 12 80 02 45 bne 200f350 <msdos_format+0xb10> <== NEVER TAKEN
200ea40: f0 07 bf 5c ld [ %fp + -164 ], %i0
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
200ea44: 03 00 00 1f sethi %hi(0x7c00), %g1
200ea48: 82 10 63 a7 or %g1, 0x3a7, %g1 ! 7fa7 <PROM_START+0x7fa7>
200ea4c: 80 a6 00 01 cmp %i0, %g1
200ea50: 18 80 02 b3 bgu 200f51c <msdos_format+0xcdc> <== NEVER TAKEN
200ea54: 03 00 07 ff sethi %hi(0x1ffc00), %g1
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
200ea58: 82 10 20 01 mov 1, %g1
200ea5c: c2 2f bf 8a stb %g1, [ %fp + -118 ]
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
200ea60: 82 10 20 02 mov 2, %g1
200ea64: c2 27 bf 64 st %g1, [ %fp + -156 ]
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
200ea68: 80 a6 60 00 cmp %i1, 0
200ea6c: 12 80 01 6c bne 200f01c <msdos_format+0x7dc> <== ALWAYS TAKEN
200ea70: a0 10 20 00 clr %l0
200ea74: c4 07 bf 64 ld [ %fp + -156 ], %g2 <== NOT EXECUTED
200ea78: a0 10 00 19 mov %i1, %l0 <== NOT EXECUTED
200ea7c: 10 80 01 6e b 200f034 <msdos_format+0x7f4> <== NOT EXECUTED
200ea80: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ea84: 92 10 20 02 mov 2, %o1
200ea88: 15 00 80 b6 sethi %hi(0x202d800), %o2
200ea8c: 7f ff fe d4 call 200e5dc <msdos_format_printf>
200ea90: 94 12 a1 48 or %o2, 0x148, %o2 ! 202d948 <_CPU_Trap_slot_template+0xcc>
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200ea94: 90 10 00 1d mov %i5, %o0
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
200ea98: f6 07 bf 58 ld [ %fp + -168 ], %i3
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200ea9c: 92 10 20 00 clr %o1
200eaa0: 94 10 20 00 clr %o2
200eaa4: 7f ff dd 75 call 2006078 <lseek>
200eaa8: 96 10 20 00 clr %o3
200eaac: 80 a2 20 00 cmp %o0, 0
200eab0: 06 80 00 e2 bl 200ee38 <msdos_format+0x5f8> <== NEVER TAKEN
200eab4: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
200eab8: 92 07 bd 58 add %fp, -680, %o1
200eabc: 7f ff e1 6a call 2007064 <read>
200eac0: 94 10 00 1b mov %i3, %o2
200eac4: 80 a2 20 00 cmp %o0, 0
200eac8: 06 80 00 dc bl 200ee38 <msdos_format+0x5f8> <== NEVER TAKEN
200eacc: 90 10 00 19 mov %i1, %o0
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ead0: 92 10 20 02 mov 2, %o1
200ead4: 15 00 80 b6 sethi %hi(0x202d800), %o2
200ead8: 7f ff fe c1 call 200e5dc <msdos_format_printf>
200eadc: 94 12 a1 d0 or %o2, 0x1d0, %o2 ! 202d9d0 <_CPU_Trap_slot_template+0x154>
{
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) {
200eae0: e4 07 bf 5c ld [ %fp + -164 ], %l2
200eae4: 21 00 00 3f sethi %hi(0xfc00), %l0
200eae8: a0 14 23 ff or %l0, 0x3ff, %l0 ! ffff <PROM_START+0xffff>
200eaec: 80 a4 80 10 cmp %l2, %l0
200eaf0: 08 80 01 dd bleu 200f264 <msdos_format+0xa24> <== ALWAYS TAKEN
200eaf4: a8 10 00 12 mov %l2, %l4
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)) {
200eaf8: a0 0c 80 10 and %l2, %l0, %l0 <== NOT EXECUTED
200eafc: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED
200eb00: a3 34 a0 10 srl %l2, 0x10, %l1 <== NOT EXECUTED
200eb04: a1 34 20 08 srl %l0, 8, %l0 <== NOT EXECUTED
200eb08: a5 34 a0 18 srl %l2, 0x18, %l2 <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
200eb0c: a6 10 20 00 clr %l3 <== NOT EXECUTED
200eb10: a8 10 20 00 clr %l4 <== NOT EXECUTED
* finally we are there: let's fill in the values into the MBR
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
200eb14: 92 10 20 00 clr %o1
200eb18: 94 10 21 be mov 0x1be, %o2
200eb1c: 40 00 3f fd call 201eb10 <memset>
200eb20: 90 07 bd 58 add %fp, -680, %o0
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
200eb24: 90 07 bd 5b add %fp, -677, %o0
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
200eb28: c0 37 bf 56 clrh [ %fp + -170 ]
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
200eb2c: 92 07 bf 8b add %fp, -117, %o1
200eb30: 40 00 3f bc call 201ea20 <memcpy>
200eb34: 94 10 20 08 mov 8, %o2
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
200eb38: c2 07 bf 70 ld [ %fp + -144 ], %g1
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
200eb3c: 99 36 e0 08 srl %i3, 8, %o4
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
200eb40: 9f 30 60 08 srl %g1, 8, %o7
200eb44: c2 2f bd 69 stb %g1, [ %fp + -663 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
200eb48: c2 0f bf 89 ldub [ %fp + -119 ], %g1
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
200eb4c: c4 07 bf 60 ld [ %fp + -160 ], %g2
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
200eb50: d8 2f bd 64 stb %o4, [ %fp + -668 ]
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
200eb54: d8 07 bf 64 ld [ %fp + -156 ], %o4
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) {
200eb58: f4 0f bf 8a ldub [ %fp + -118 ], %i2
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
200eb5c: c2 2f bd 6d stb %g1, [ %fp + -659 ]
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
200eb60: 82 10 3f ff mov -1, %g1
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
200eb64: 9b 30 a0 08 srl %g2, 8, %o5
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
200eb68: 88 10 20 02 mov 2, %g4
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... */
200eb6c: 86 10 20 01 mov 1, %g3
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... */
200eb70: c2 2f bd 70 stb %g1, [ %fp + -656 ]
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
200eb74: f6 2f bd 63 stb %i3, [ %fp + -669 ]
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... */
200eb78: 82 10 20 06 mov 6, %g1
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
200eb7c: d8 2f bd 65 stb %o4, [ %fp + -667 ]
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
200eb80: c4 2f bd 66 stb %g2, [ %fp + -666 ]
200eb84: da 2f bd 67 stb %o5, [ %fp + -665 ]
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
200eb88: c8 2f bd 68 stb %g4, [ %fp + -664 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
200eb8c: de 2f bd 6a stb %o7, [ %fp + -662 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
200eb90: e8 2f bd 6b stb %l4, [ %fp + -661 ]
200eb94: e6 2f bd 6c stb %l3, [ %fp + -660 ]
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
200eb98: c2 2f bd 72 stb %g1, [ %fp + -654 ]
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
200eb9c: c6 2f bd 74 stb %g3, [ %fp + -652 ]
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
200eba0: f0 2f bd 78 stb %i0, [ %fp + -648 ]
200eba4: e0 2f bd 79 stb %l0, [ %fp + -647 ]
200eba8: e2 2f bd 7a stb %l1, [ %fp + -646 ]
if (fmt_params->fattype != FAT_FAT32) {
200ebac: 80 a6 a0 04 cmp %i2, 4
200ebb0: 02 80 02 64 be 200f540 <msdos_format+0xd00> <== NEVER TAKEN
200ebb4: e4 2f bd 7b stb %l2, [ %fp + -645 ]
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200ebb8: c2 07 bf a4 ld [ %fp + -92 ], %g1
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200ebbc: c4 07 bf 68 ld [ %fp + -152 ], %g2
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200ebc0: 89 30 60 10 srl %g1, 0x10, %g4
200ebc4: 87 30 60 18 srl %g1, 0x18, %g3
200ebc8: b1 30 60 08 srl %g1, 8, %i0
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);
200ebcc: 9f 30 a0 08 srl %g2, 8, %o7
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 */
200ebd0: c2 2f bd 7f stb %g1, [ %fp + -641 ]
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
200ebd4: 82 10 20 29 mov 0x29, %g1
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200ebd8: c4 2f bd 6e stb %g2, [ %fp + -658 ]
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);
200ebdc: c2 2f bd 7e stb %g1, [ %fp + -642 ]
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200ebe0: de 2f bd 6f stb %o7, [ %fp + -657 ]
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200ebe4: f0 2f bd 80 stb %i0, [ %fp + -640 ]
200ebe8: c8 2f bd 81 stb %g4, [ %fp + -639 ]
200ebec: c6 2f bd 82 stb %g3, [ %fp + -638 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
200ebf0: 90 07 bd 83 add %fp, -637, %o0
200ebf4: 92 07 bf 94 add %fp, -108, %o1
200ebf8: 40 00 3f 8a call 201ea20 <memcpy>
200ebfc: 94 10 20 0b mov 0xb, %o2
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
200ec00: 03 00 80 b6 sethi %hi(0x202d800), %g1
200ec04: 80 a6 a0 01 cmp %i2, 1
200ec08: 02 80 02 9b be 200f674 <msdos_format+0xe34> <== ALWAYS TAKEN
200ec0c: 82 10 60 d0 or %g1, 0xd0, %g1
200ec10: c4 10 40 00 lduh [ %g1 ], %g2
200ec14: c4 37 bd 8e sth %g2, [ %fp + -626 ]
200ec18: c4 10 60 02 lduh [ %g1 + 2 ], %g2
200ec1c: c4 37 bd 90 sth %g2, [ %fp + -624 ]
200ec20: c4 10 60 04 lduh [ %g1 + 4 ], %g2
200ec24: c4 37 bd 92 sth %g2, [ %fp + -622 ]
200ec28: c2 10 60 06 lduh [ %g1 + 6 ], %g1
200ec2c: c2 37 bd 94 sth %g1, [ %fp + -620 ]
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
200ec30: 82 10 20 55 mov 0x55, %g1
200ec34: c2 2f bf 56 stb %g1, [ %fp + -170 ]
200ec38: 82 10 3f aa mov -86, %g1
200ec3c: c2 2f bf 57 stb %g1, [ %fp + -169 ]
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
200ec40: 82 10 3f eb mov -21, %g1
200ec44: c2 2f bd 58 stb %g1, [ %fp + -680 ]
FAT_SET_VAL8(mbr,1,0x3c);
200ec48: 82 10 20 3c mov 0x3c, %g1
200ec4c: c2 2f bd 59 stb %g1, [ %fp + -679 ]
FAT_SET_VAL8(mbr,2,0x90);
200ec50: 82 10 3f 90 mov -112, %g1
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ec54: 92 10 20 02 mov 2, %o1
200ec58: 90 10 00 19 mov %i1, %o0
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
FAT_SET_VAL8(mbr,2,0x90);
200ec5c: c2 2f bd 5a stb %g1, [ %fp + -678 ]
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ec60: 15 00 80 b6 sethi %hi(0x202d800), %o2
200ec64: 7f ff fe 5e call 200e5dc <msdos_format_printf>
200ec68: 94 12 a1 60 or %o2, 0x160, %o2 ! 202d960 <_CPU_Trap_slot_template+0xe4>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
200ec6c: 90 10 00 1d mov %i5, %o0
200ec70: 92 10 20 00 clr %o1
200ec74: 94 10 00 1b mov %i3, %o2
200ec78: 7f ff fe 6e call 200e630 <msdos_format_write_sec>
200ec7c: 96 07 bd 58 add %fp, -680, %o3
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
200ec80: b0 92 20 00 orcc %o0, 0, %i0
200ec84: 12 bf ff 1c bne 200e8f4 <msdos_format+0xb4> <== NEVER TAKEN
200ec88: f4 07 bf 80 ld [ %fp + -128 ], %i2
200ec8c: 80 a6 a0 00 cmp %i2, 0
200ec90: 12 80 01 e7 bne 200f42c <msdos_format+0xbec> <== NEVER TAKEN
200ec94: 90 10 00 19 mov %i1, %o0
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
200ec98: f4 07 bf 84 ld [ %fp + -124 ], %i2
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
200ec9c: 80 a6 a0 00 cmp %i2, 0
200eca0: 12 80 01 b3 bne 200f36c <msdos_format+0xb2c> <== NEVER TAKEN
200eca4: d2 07 bf 68 ld [ %fp + -152 ], %o1
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
(rqdata,
200eca8: f4 0f bf 88 ldub [ %fp + -120 ], %i2
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
200ecac: f0 07 bf 60 ld [ %fp + -160 ], %i0
(rqdata,
200ecb0: 40 00 6f 39 call 202a994 <.umul>
200ecb4: 90 10 00 1a mov %i2, %o0
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
200ecb8: 94 10 00 18 mov %i0, %o2
(rqdata,
200ecbc: 96 10 00 08 mov %o0, %o3
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
200ecc0: 92 10 00 1d mov %i5, %o1
200ecc4: 90 10 00 19 mov %i1, %o0
200ecc8: 98 10 00 1b mov %i3, %o4
200eccc: 7f ff fe 71 call 200e690 <msdos_format_fill_sectors>
200ecd0: 9a 10 20 00 clr %o5
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
200ecd4: b0 92 20 00 orcc %o0, 0, %i0
200ecd8: 12 bf ff 07 bne 200e8f4 <msdos_format+0xb4> <== NEVER TAKEN
200ecdc: e0 07 bf 78 ld [ %fp + -136 ], %l0
ret_val = msdos_format_fill_sectors
200ece0: d6 07 bf 7c ld [ %fp + -132 ], %o3
200ece4: 90 10 00 19 mov %i1, %o0
200ece8: 92 10 00 1d mov %i5, %o1
200ecec: 94 10 00 10 mov %l0, %o2
200ecf0: 98 10 00 1b mov %i3, %o4
200ecf4: 7f ff fe 67 call 200e690 <msdos_format_fill_sectors>
200ecf8: 9a 10 20 00 clr %o5
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
200ecfc: b0 92 20 00 orcc %o0, 0, %i0
200ed00: 12 bf fe fd bne 200e8f4 <msdos_format+0xb4> <== NEVER TAKEN
200ed04: c2 0f bf a0 ldub [ %fp + -96 ], %g1
200ed08: 80 a0 60 00 cmp %g1, 0
200ed0c: 02 bf fe fb be 200e8f8 <msdos_format+0xb8> <== NEVER TAKEN
200ed10: 80 a7 7f ff cmp %i5, -1
memset(tmp_sec,0,sizeof(tmp_sec));
200ed14: 92 10 20 00 clr %o1
200ed18: 94 10 22 00 mov 0x200, %o2
200ed1c: 40 00 3f 7d call 201eb10 <memset>
200ed20: 90 07 bd 58 add %fp, -680, %o0
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
200ed24: c2 0f bf 9e ldub [ %fp + -98 ], %g1
200ed28: c6 07 bf 98 ld [ %fp + -104 ], %g3
200ed2c: c4 17 bf 9c lduh [ %fp + -100 ], %g2
200ed30: c8 07 bf 94 ld [ %fp + -108 ], %g4
200ed34: c2 2f bd 62 stb %g1, [ %fp + -670 ]
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
200ed38: 82 10 20 08 mov 8, %g1
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
200ed3c: c8 27 bd 58 st %g4, [ %fp + -680 ]
200ed40: c6 27 bd 5c st %g3, [ %fp + -676 ]
200ed44: c4 37 bd 60 sth %g2, [ %fp + -672 ]
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
200ed48: 90 10 00 1d mov %i5, %o0
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
200ed4c: c2 2f bd 63 stb %g1, [ %fp + -669 ]
ret_val = msdos_format_write_sec
200ed50: 92 10 00 10 mov %l0, %o1
200ed54: 94 10 00 1b mov %i3, %o2
200ed58: 7f ff fe 36 call 200e630 <msdos_format_write_sec>
200ed5c: 96 07 bd 58 add %fp, -680, %o3
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
200ed60: b0 92 20 00 orcc %o0, 0, %i0
200ed64: 12 bf fe e4 bne 200e8f4 <msdos_format+0xb4> <== NEVER TAKEN
200ed68: 90 07 bd 58 add %fp, -680, %o0
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
200ed6c: 92 10 20 00 clr %o1
200ed70: 40 00 3f 68 call 201eb10 <memset>
200ed74: 94 10 22 00 mov 0x200, %o2
switch(fmt_params.fattype) {
200ed78: f6 0f bf 8a ldub [ %fp + -118 ], %i3
200ed7c: 80 a6 e0 02 cmp %i3, 2
200ed80: 02 80 01 c2 be 200f488 <msdos_format+0xc48> <== NEVER TAKEN
200ed84: 80 a6 e0 04 cmp %i3, 4
200ed88: 02 80 01 d2 be 200f4d0 <msdos_format+0xc90> <== NEVER TAKEN
200ed8c: 80 a6 e0 01 cmp %i3, 1
200ed90: 02 80 01 c8 be 200f4b0 <msdos_format+0xc70> <== ALWAYS TAKEN
200ed94: c4 0f bf 89 ldub [ %fp + -119 ], %g2
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
200ed98: 40 00 3c 53 call 201dee4 <__errno> <== NOT EXECUTED
200ed9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200eda0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
200eda4: 80 a6 e0 04 cmp %i3, 4 <== NOT EXECUTED
200eda8: 12 bf fe d3 bne 200e8f4 <msdos_format+0xb4> <== NOT EXECUTED
200edac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200edb0: 82 10 20 00 clr %g1 <== NOT EXECUTED
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
200edb4: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
200edb8: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
200edbc: c4 2f bd 61 stb %g2, [ %fp + -671 ] <== NOT EXECUTED
200edc0: c4 2f bd 62 stb %g2, [ %fp + -670 ] <== NOT EXECUTED
200edc4: c6 2f bd 60 stb %g3, [ %fp + -672 ] <== NOT EXECUTED
200edc8: 84 10 20 0f mov 0xf, %g2 <== NOT EXECUTED
200edcc: c4 2f bd 63 stb %g2, [ %fp + -669 ] <== NOT EXECUTED
}
for (i = 0;
200edd0: 80 88 60 ff btst 0xff, %g1
200edd4: 02 bf fe c8 be 200e8f4 <msdos_format+0xb4> <== NEVER TAKEN
200edd8: e2 07 bf 68 ld [ %fp + -152 ], %l1
200eddc: f2 07 bf 60 ld [ %fp + -160 ], %i1
200ede0: e0 07 bf 58 ld [ %fp + -168 ], %l0
200ede4: 10 80 00 04 b 200edf4 <msdos_format+0x5b4>
200ede8: b6 10 20 00 clr %i3
200edec: 12 bf fe c3 bne 200e8f8 <msdos_format+0xb8> <== NEVER TAKEN
200edf0: 80 a7 7f ff cmp %i5, -1
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
200edf4: 92 10 00 19 mov %i1, %o1
200edf8: 90 10 00 1d mov %i5, %o0
200edfc: 94 10 00 10 mov %l0, %o2
200ee00: 7f ff fe 0c call 200e630 <msdos_format_write_sec>
200ee04: 96 07 bd 58 add %fp, -680, %o3
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
200ee08: b6 06 e0 01 inc %i3
ret_val = msdos_format_write_sec
200ee0c: b0 10 00 08 mov %o0, %i0
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
200ee10: 82 10 20 01 mov 1, %g1
200ee14: 80 a6 c0 1a cmp %i3, %i2
200ee18: 06 80 00 03 bl 200ee24 <msdos_format+0x5e4>
200ee1c: b2 06 40 11 add %i1, %l1, %i1
200ee20: 82 10 20 00 clr %g1
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
200ee24: 80 88 60 ff btst 0xff, %g1
200ee28: 32 bf ff f1 bne,a 200edec <msdos_format+0x5ac>
200ee2c: 80 a6 20 00 cmp %i0, 0
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
200ee30: 10 bf fe b2 b 200e8f8 <msdos_format+0xb8>
200ee34: 80 a7 7f ff cmp %i5, -1
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
200ee38: 10 bf fe af b 200e8f4 <msdos_format+0xb4> <== NOT EXECUTED
200ee3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ee40: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
200ee44: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200ee48: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200ee4c: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
200ee50: 7f ff fd e3 call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200ee54: 94 12 a0 f0 or %o2, 0xf0, %o2 ! 202d8f0 <_CPU_Trap_slot_template+0x74><== NOT EXECUTED
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200ee58: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
200ee5c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200ee60: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200ee64: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
200ee68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200ee6c: 7f ff fd dc call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200ee70: 94 12 a1 00 or %o2, 0x100, %o2 <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200ee74: 10 bf fe 9d b 200e8e8 <msdos_format+0xa8> <== NOT EXECUTED
200ee78: b8 10 20 00 clr %i4 <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
200ee7c: c2 2f bf 88 stb %g1, [ %fp + -120 ]
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ee80: 92 10 20 02 mov 2, %o1
200ee84: 10 bf fe e1 b 200ea08 <msdos_format+0x1c8>
200ee88: 96 10 20 02 mov 2, %o3
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
200ee8c: c2 27 bf 78 st %g1, [ %fp + -136 ] <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
200ee90: c2 07 bf 64 ld [ %fp + -156 ], %g1 <== NOT EXECUTED
200ee94: c2 27 bf 7c st %g1, [ %fp + -132 ] <== NOT EXECUTED
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
200ee98: 80 a4 20 00 cmp %l0, 0
200ee9c: 02 80 00 15 be 200eef0 <msdos_format+0x6b0> <== ALWAYS TAKEN
200eea0: 03 00 80 b4 sethi %hi(0x202d000), %g1
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200eea4: 40 00 3c 10 call 201dee4 <__errno> <== NOT EXECUTED
200eea8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200eeac: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
200eeb0: 82 10 20 00 clr %g1 <== NOT EXECUTED
ret_val = msdos_format_determine_fmt_params(dd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
200eeb4: 80 88 60 ff btst 0xff, %g1
200eeb8: 02 bf fe 8d be 200e8ec <msdos_format+0xac> <== NEVER TAKEN
200eebc: 80 a6 20 00 cmp %i0, 0
(rqdata != NULL) &&
200eec0: c2 0e 60 16 ldub [ %i1 + 0x16 ], %g1
200eec4: 80 a0 60 00 cmp %g1, 0
200eec8: 12 bf fe ef bne 200ea84 <msdos_format+0x244> <== NEVER TAKEN
200eecc: 90 10 00 19 mov %i1, %o0
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
200eed0: d6 07 bf 5c ld [ %fp + -164 ], %o3
200eed4: d8 07 bf 58 ld [ %fp + -168 ], %o4
200eed8: 92 10 00 1d mov %i5, %o1
200eedc: 94 10 20 00 clr %o2
200eee0: 7f ff fd ec call 200e690 <msdos_format_fill_sectors>
200eee4: 9a 10 3f e5 mov -27, %o5
200eee8: 10 bf fe 80 b 200e8e8 <msdos_format+0xa8>
200eeec: b0 10 00 08 mov %o0, %i0
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) &&
200eef0: 80 a6 60 00 cmp %i1, 0
200eef4: 02 80 00 06 be 200ef0c <msdos_format+0x6cc> <== NEVER TAKEN
200eef8: 88 10 61 00 or %g1, 0x100, %g4
(rqdata->OEMName != NULL)) {
200eefc: c8 06 40 00 ld [ %i1 ], %g4
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
200ef00: 80 a1 20 00 cmp %g4, 0
200ef04: 22 80 00 02 be,a 200ef0c <msdos_format+0x6cc> <== NEVER TAKEN
200ef08: 88 10 61 00 or %g1, 0x100, %g4 <== NOT EXECUTED
200ef0c: 03 00 80 bc sethi %hi(0x202f000), %g1
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
200ef10: 84 10 20 08 mov 8, %g2
if ((rqdata != NULL) &&
200ef14: f4 00 63 80 ld [ %g1 + 0x380 ], %i2
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200ef18: b0 10 20 20 mov 0x20, %i0
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
200ef1c: 10 80 00 07 b 200ef38 <msdos_format+0x6f8>
200ef20: 82 07 bf 8b add %fp, -117, %g1
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
200ef24: 82 00 60 01 inc %g1
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
200ef28: c0 28 40 00 clrb [ %g1 ]
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
200ef2c: 84 80 bf ff addcc %g2, -1, %g2
200ef30: 02 80 00 0e be 200ef68 <msdos_format+0x728> <== NEVER TAKEN
200ef34: 88 01 20 01 inc %g4
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
200ef38: c6 09 00 00 ldub [ %g4 ], %g3
200ef3c: b6 08 e0 ff and %g3, 0xff, %i3
200ef40: b6 06 80 1b add %i2, %i3, %i3
200ef44: f6 4e e0 01 ldsb [ %i3 + 1 ], %i3
200ef48: 80 8e e0 97 btst 0x97, %i3
200ef4c: 32 bf ff f6 bne,a 200ef24 <msdos_format+0x6e4>
200ef50: c6 28 40 00 stb %g3, [ %g1 ]
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200ef54: f0 28 40 00 stb %i0, [ %g1 ]
200ef58: 82 00 60 01 inc %g1
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
200ef5c: 84 80 bf ff addcc %g2, -1, %g2
200ef60: 12 bf ff f6 bne 200ef38 <msdos_format+0x6f8>
200ef64: c0 28 40 00 clrb [ %g1 ]
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
200ef68: 03 00 80 b5 sethi %hi(0x202d400), %g1
if ((rqdata != NULL) &&
200ef6c: 80 a6 60 00 cmp %i1, 0
200ef70: 02 80 00 08 be 200ef90 <msdos_format+0x750> <== NEVER TAKEN
200ef74: 88 10 60 f8 or %g1, 0xf8, %g4
(rqdata->VolLabel != NULL)) {
200ef78: c8 06 60 04 ld [ %i1 + 4 ], %g4
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
200ef7c: 80 a1 20 00 cmp %g4, 0
200ef80: 22 80 00 04 be,a 200ef90 <msdos_format+0x750> <== NEVER TAKEN
200ef84: 88 10 60 f8 or %g1, 0xf8, %g4 <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
200ef88: 82 10 20 01 mov 1, %g1
200ef8c: c2 2f bf a0 stb %g1, [ %fp + -96 ]
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
200ef90: 84 10 20 0b mov 0xb, %g2
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
200ef94: 82 07 bf 94 add %fp, -108, %g1
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200ef98: 10 80 00 07 b 200efb4 <msdos_format+0x774>
200ef9c: b0 10 20 20 mov 0x20, %i0
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
200efa0: 82 00 60 01 inc %g1
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
200efa4: c0 28 40 00 clrb [ %g1 ]
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
200efa8: 84 80 bf ff addcc %g2, -1, %g2
200efac: 02 80 00 0e be 200efe4 <msdos_format+0x7a4> <== NEVER TAKEN
200efb0: 88 01 20 01 inc %g4
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
200efb4: c6 09 00 00 ldub [ %g4 ], %g3
200efb8: b6 08 e0 ff and %g3, 0xff, %i3
200efbc: b6 06 80 1b add %i2, %i3, %i3
200efc0: f6 4e e0 01 ldsb [ %i3 + 1 ], %i3
200efc4: 80 8e e0 97 btst 0x97, %i3
200efc8: 32 bf ff f6 bne,a 200efa0 <msdos_format+0x760>
200efcc: c6 28 40 00 stb %g3, [ %g1 ]
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200efd0: f0 28 40 00 stb %i0, [ %g1 ]
200efd4: 82 00 60 01 inc %g1
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
200efd8: 84 80 bf ff addcc %g2, -1, %g2
200efdc: 12 bf ff f6 bne 200efb4 <msdos_format+0x774>
200efe0: c0 28 40 00 clrb [ %g1 ]
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
200efe4: 40 00 1e c4 call 2016af4 <rtems_clock_get_tod_timeval>
200efe8: 90 07 bf f0 add %fp, -16, %o0
if (rc == RTEMS_SUCCESSFUL) {
200efec: 80 a2 20 00 cmp %o0, 0
200eff0: 12 80 01 47 bne 200f50c <msdos_format+0xccc> <== ALWAYS TAKEN
200eff4: 01 00 00 00 nop
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
200eff8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
200effc: 83 28 60 01 sll %g1, 1, %g1 <== NOT EXECUTED
200f000: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200f004: 80 a0 00 19 cmp %g0, %i1
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
return 0;
200f008: b0 10 20 00 clr %i0
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200f00c: 10 bf ff aa b 200eeb4 <msdos_format+0x674>
200f010: 82 40 20 00 addx %g0, 0, %g1
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
200f014: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
200f018: a0 10 20 00 clr %l0 <== NOT EXECUTED
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
(rqdata->sectors_per_cluster > 0)) {
200f01c: c2 06 60 08 ld [ %i1 + 8 ], %g1
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
200f020: 84 90 60 00 orcc %g1, 0, %g2
200f024: 12 80 00 05 bne 200f038 <msdos_format+0x7f8> <== NEVER TAKEN
200f028: f0 07 bf 58 ld [ %fp + -168 ], %i0
200f02c: c4 07 bf 64 ld [ %fp + -156 ], %g2
200f030: 82 10 00 02 mov %g2, %g1
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
200f034: f0 07 bf 58 ld [ %fp + -168 ], %i0
200f038: b4 10 20 08 mov 8, %i2
200f03c: b6 10 20 80 mov 0x80, %i3
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
200f040: 80 a6 c0 01 cmp %i3, %g1
200f044: 38 80 00 79 bgu,a 200f228 <msdos_format+0x9e8>
200f048: b4 86 bf ff addcc %i2, -1, %i2
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
200f04c: 11 00 00 20 sethi %hi(0x8000), %o0
200f050: 40 00 6e 8b call 202aa7c <.udiv>
200f054: 92 10 00 18 mov %i0, %o1
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
200f058: 80 a2 00 1b cmp %o0, %i3
200f05c: 0a 80 00 72 bcs 200f224 <msdos_format+0x9e4> <== NEVER TAKEN
200f060: 84 10 00 1b mov %i3, %g2
200f064: f6 27 bf 64 st %i3, [ %fp + -156 ]
}
}
}
}
if (ret_val == 0) {
200f068: 80 a4 20 00 cmp %l0, 0
200f06c: 12 80 00 73 bne 200f238 <msdos_format+0x9f8> <== NEVER TAKEN
200f070: f6 07 bf 64 ld [ %fp + -156 ], %i3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f074: 90 10 00 19 mov %i1, %o0
200f078: 92 10 20 02 mov 2, %o1
200f07c: 96 10 00 1b mov %i3, %o3
200f080: 15 00 80 b6 sethi %hi(0x202d800), %o2
200f084: 7f ff fd 56 call 200e5dc <msdos_format_printf>
200f088: 94 12 a1 28 or %o2, 0x128, %o2 ! 202d928 <_CPU_Trap_slot_template+0xac>
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
200f08c: f0 0f bf 8a ldub [ %fp + -118 ], %i0
200f090: 80 a6 20 04 cmp %i0, 4
200f094: 02 80 01 56 be 200f5ec <msdos_format+0xdac> <== NEVER TAKEN
200f098: 82 10 20 01 mov 1, %g1
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
200f09c: 80 a6 60 00 cmp %i1, 0
200f0a0: 02 80 00 06 be 200f0b8 <msdos_format+0x878> <== NEVER TAKEN
200f0a4: c2 27 bf 60 st %g1, [ %fp + -160 ]
(rqdata->files_per_root_dir > 0)) {
200f0a8: f4 06 60 10 ld [ %i1 + 0x10 ], %i2
/* 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) &&
200f0ac: 80 a6 a0 00 cmp %i2, 0
200f0b0: 12 80 00 07 bne 200f0cc <msdos_format+0x88c> <== NEVER TAKEN
200f0b4: b4 06 bf ff add %i2, -1, %i2
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
200f0b8: 82 1e 20 02 xor %i0, 2, %g1
200f0bc: 80 a0 00 01 cmp %g0, %g1
200f0c0: b4 40 3f ff addx %g0, -1, %i2
200f0c4: b4 0e a1 c0 and %i2, 0x1c0, %i2
200f0c8: b4 06 a0 3f add %i2, 0x3f, %i2
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
200f0cc: e2 07 bf 58 ld [ %fp + -168 ], %l1
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
200f0d0: a4 10 20 01 mov 1, %l2
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
200f0d4: 93 2c 60 01 sll %l1, 1, %o1
200f0d8: 93 32 60 05 srl %o1, 5, %o1
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
200f0dc: b4 06 80 09 add %i2, %o1, %i2
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
200f0e0: 40 00 6f 13 call 202ad2c <.urem>
200f0e4: 90 10 00 1a mov %i2, %o0
200f0e8: 90 26 80 08 sub %i2, %o0, %o0
200f0ec: d0 27 bf 70 st %o0, [ %fp + -144 ]
200f0f0: 91 2a 20 05 sll %o0, 5, %o0
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
200f0f4: 92 10 00 11 mov %l1, %o1
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
200f0f8: a8 04 7f ff add %l1, -1, %l4
/ fmt_params->bytes_per_sector);
200f0fc: 40 00 6e 60 call 202aa7c <.udiv>
200f100: 90 05 00 08 add %l4, %o0, %o0
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
200f104: ea 07 bf 5c ld [ %fp + -164 ], %l5
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
200f108: 82 10 00 08 mov %o0, %g1
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
200f10c: d0 27 bf 74 st %o0, [ %fp + -140 ]
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
200f110: a4 25 40 12 sub %l5, %l2, %l2
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
200f114: 11 00 00 20 sethi %hi(0x8000), %o0
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
200f118: aa 24 80 01 sub %l2, %g1, %l5
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
200f11c: 40 00 6e 58 call 202aa7c <.udiv>
200f120: 92 10 00 11 mov %l1, %o1
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
200f124: c2 0f bf 88 ldub [ %fp + -120 ], %g1
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
200f128: 80 a6 c0 08 cmp %i3, %o0
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
200f12c: c2 2f bd 4b stb %g1, [ %fp + -693 ]
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
200f130: 08 80 00 07 bleu 200f14c <msdos_format+0x90c> <== ALWAYS TAKEN
200f134: ac 08 60 ff and %g1, 0xff, %l6
sectors_per_cluster /= 2;
200f138: b7 36 e0 01 srl %i3, 1, %i3 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
200f13c: 80 a6 c0 08 cmp %i3, %o0 <== NOT EXECUTED
200f140: 38 bf ff ff bgu,a 200f13c <msdos_format+0x8fc> <== NOT EXECUTED
200f144: b7 36 e0 01 srl %i3, 1, %i3 <== NOT EXECUTED
200f148: ec 0f bd 4b ldub [ %fp + -693 ], %l6 <== NOT EXECUTED
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
200f14c: 82 1e 20 02 xor %i0, 2, %g1
200f150: 27 00 00 3f sethi %hi(0xfc00), %l3
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
200f154: 80 a0 00 01 cmp %g0, %g1
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
200f158: a6 14 e3 f5 or %l3, 0x3f5, %l3
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
200f15c: 82 60 3f ff subx %g0, -1, %g1
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
200f160: 25 00 00 20 sethi %hi(0x8000), %l2
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
200f164: c2 27 bd 4c st %g1, [ %fp + -692 ]
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
200f168: 90 10 00 15 mov %l5, %o0
200f16c: 40 00 6e 44 call 202aa7c <.udiv>
200f170: 92 10 00 1b mov %i3, %o1
if (fattype == FAT_FAT12) {
200f174: 80 a6 20 01 cmp %i0, 1
200f178: 02 80 00 41 be 200f27c <msdos_format+0xa3c> <== ALWAYS TAKEN
200f17c: b4 10 00 08 mov %o0, %i2
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
200f180: 80 a6 20 02 cmp %i0, 2 <== NOT EXECUTED
200f184: 02 80 00 78 be 200f364 <msdos_format+0xb24> <== NOT EXECUTED
200f188: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
200f18c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200f190: 40 00 6e 3b call 202aa7c <.udiv> <== NOT EXECUTED
200f194: 90 02 00 14 add %o0, %l4, %o0 <== NOT EXECUTED
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
200f198: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
200f19c: 40 00 6d fe call 202a994 <.umul> <== NOT EXECUTED
200f1a0: ae 10 00 08 mov %o0, %l7 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
200f1a4: 82 06 ff ff add %i3, -1, %g1 <== NOT EXECUTED
/ sectors_per_cluster));
200f1a8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f1ac: 40 00 6e 34 call 202aa7c <.udiv> <== NOT EXECUTED
200f1b0: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
200f1b4: b4 26 80 08 sub %i2, %o0, %i2 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
200f1b8: 80 a4 c0 1a cmp %l3, %i2 <== NOT EXECUTED
200f1bc: 1a 80 00 42 bcc 200f2c4 <msdos_format+0xa84> <== NOT EXECUTED
200f1c0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f1c4: c2 07 bd 4c ld [ %fp + -692 ], %g1 <== NOT EXECUTED
200f1c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200f1cc: 02 80 00 3f be 200f2c8 <msdos_format+0xa88> <== NOT EXECUTED
200f1d0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
200f1d4: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
200f1d8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200f1dc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f1e0: 40 00 6d ed call 202a994 <.umul> <== NOT EXECUTED
200f1e4: b4 10 20 00 clr %i2 <== NOT EXECUTED
200f1e8: 80 a2 00 12 cmp %o0, %l2 <== NOT EXECUTED
200f1ec: 08 80 00 3c bleu 200f2dc <msdos_format+0xa9c> <== NOT EXECUTED
200f1f0: 80 8e a0 ff btst 0xff, %i2 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200f1f4: 40 00 3b 3c call 201dee4 <__errno> <== NOT EXECUTED
200f1f8: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
200f1fc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
200f200: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200f204: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
200f208: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
200f20c: 40 00 6d e2 call 202a994 <.umul> <== NOT EXECUTED
200f210: c0 27 bf 64 clr [ %fp + -156 ] <== NOT EXECUTED
200f214: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
200f218: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
200f21c: 10 80 00 0d b 200f250 <msdos_format+0xa10> <== NOT EXECUTED
200f220: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
200f224: b4 86 bf ff addcc %i2, -1, %i2 <== NOT EXECUTED
200f228: 02 80 01 23 be 200f6b4 <msdos_format+0xe74> <== NEVER TAKEN
200f22c: b7 36 e0 01 srl %i3, 1, %i3
200f230: 10 bf ff 84 b 200f040 <msdos_format+0x800>
200f234: 82 10 00 02 mov %g2, %g1
}
}
}
}
if (ret_val == 0) {
200f238: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
200f23c: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
200f240: 40 00 6d d5 call 202a994 <.umul> <== NOT EXECUTED
200f244: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
200f248: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
200f24c: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
200f250: 80 a6 e0 00 cmp %i3, 0
200f254: 02 bf ff 0f be 200ee90 <msdos_format+0x650> <== NEVER TAKEN
200f258: c2 27 bf 78 st %g1, [ %fp + -136 ]
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
200f25c: 10 bf ff 0f b 200ee98 <msdos_format+0x658>
200f260: f6 27 bf 7c st %i3, [ %fp + -132 ]
{
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) {
200f264: a7 34 a0 08 srl %l2, 8, %l3
200f268: a2 10 20 00 clr %l1
200f26c: a4 10 20 00 clr %l2
200f270: a0 10 20 00 clr %l0
200f274: 10 bf fe 28 b 200eb14 <msdos_format+0x2d4>
200f278: b0 10 20 00 clr %i0
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
200f27c: 92 10 00 11 mov %l1, %o1
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
200f280: 91 2a 20 01 sll %o0, 1, %o0
200f284: 90 02 00 1a add %o0, %i2, %o0
200f288: 91 32 20 01 srl %o0, 1, %o0
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
200f28c: 40 00 6d fc call 202aa7c <.udiv>
200f290: 90 02 00 14 add %o0, %l4, %o0
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
200f294: 92 10 00 16 mov %l6, %o1
200f298: 40 00 6d bf call 202a994 <.umul>
200f29c: ae 10 00 08 mov %o0, %l7
+ (sectors_per_cluster - 1))
200f2a0: 82 06 ff ff add %i3, -1, %g1
/ sectors_per_cluster));
200f2a4: 92 10 00 1b mov %i3, %o1
200f2a8: 40 00 6d f5 call 202aa7c <.udiv>
200f2ac: 90 00 40 08 add %g1, %o0, %o0
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
200f2b0: b4 26 80 08 sub %i2, %o0, %i2
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
200f2b4: 80 a6 af f5 cmp %i2, 0xff5
200f2b8: 38 bf ff c8 bgu,a 200f1d8 <msdos_format+0x998> <== NEVER TAKEN
200f2bc: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
200f2c0: 90 10 00 1b mov %i3, %o0
200f2c4: 92 10 00 11 mov %l1, %o1
200f2c8: 40 00 6d b3 call 202a994 <.umul>
200f2cc: b4 10 20 01 mov 1, %i2
200f2d0: 80 a2 00 12 cmp %o0, %l2
200f2d4: 18 bf ff c8 bgu 200f1f4 <msdos_format+0x9b4> <== NEVER TAKEN
200f2d8: 80 8e a0 ff btst 0xff, %i2
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
200f2dc: 02 bf ff a4 be 200f16c <msdos_format+0x92c> <== NEVER TAKEN
200f2e0: 90 10 00 15 mov %l5, %o0
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
200f2e4: ee 27 bf 68 st %l7, [ %fp + -152 ]
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
200f2e8: 80 a6 60 00 cmp %i1, 0
200f2ec: 02 80 00 47 be 200f408 <msdos_format+0xbc8> <== NEVER TAKEN
200f2f0: f6 27 bf 64 st %i3, [ %fp + -156 ]
(rqdata->media != 0)) {
200f2f4: f6 0e 60 15 ldub [ %i1 + 0x15 ], %i3
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
200f2f8: b4 8e e0 ff andcc %i3, 0xff, %i2
200f2fc: 22 80 00 44 be,a 200f40c <msdos_format+0xbcc> <== ALWAYS TAKEN
200f300: d2 07 bf 68 ld [ %fp + -152 ], %o1
(rqdata->media != 0)) {
const char valid_media_codes[] =
200f304: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
200f308: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
200f30c: 13 00 80 b6 sethi %hi(0x202d800), %o1 <== NOT EXECUTED
200f310: 40 00 3d c4 call 201ea20 <memcpy> <== NOT EXECUTED
200f314: 92 12 61 e8 or %o1, 0x1e8, %o1 ! 202d9e8 <_CPU_Trap_slot_template+0x16c><== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
200f318: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
200f31c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200f320: 40 00 3d 4d call 201e854 <memchr> <== NOT EXECUTED
200f324: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
200f328: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f32c: 02 80 00 d7 be 200f688 <msdos_format+0xe48> <== NOT EXECUTED
200f330: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
200f334: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
200f338: 40 00 6d 97 call 202a994 <.umul> <== NOT EXECUTED
200f33c: f6 2f bf 89 stb %i3, [ %fp + -119 ] <== NOT EXECUTED
200f340: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
200f344: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
200f348: 10 bf ff c2 b 200f250 <msdos_format+0xa10> <== NOT EXECUTED
200f34c: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
200f350: 40 00 3a e5 call 201dee4 <__errno> <== NOT EXECUTED
200f354: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
200f358: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200f35c: 10 bf ff 30 b 200f01c <msdos_format+0x7dc> <== NOT EXECUTED
200f360: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
fat_capacity = fatdata_cluster_cnt * 2;
200f364: 10 bf ff 8a b 200f18c <msdos_format+0x94c> <== NOT EXECUTED
200f368: 91 2e a0 01 sll %i2, 1, %o0 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
200f36c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200f370: 94 10 22 00 mov 0x200, %o2 <== NOT EXECUTED
200f374: 40 00 3d e7 call 201eb10 <memset> <== NOT EXECUTED
200f378: 90 07 bd 58 add %fp, -680, %o0 <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
200f37c: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED
200f380: c4 2f bd 5a stb %g2, [ %fp + -678 ] <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
200f384: c4 2f bf 3f stb %g2, [ %fp + -193 ] <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
200f388: 84 10 20 55 mov 0x55, %g2 <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
200f38c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
200f390: b0 10 20 52 mov 0x52, %i0 <== NOT EXECUTED
200f394: 86 10 20 41 mov 0x41, %g3 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
200f398: 88 10 20 72 mov 0x72, %g4 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
200f39c: c4 2f bf 56 stb %g2, [ %fp + -170 ] <== NOT EXECUTED
200f3a0: 84 10 3f aa mov -86, %g2 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
200f3a4: f0 2f bd 58 stb %i0, [ %fp + -680 ] <== NOT EXECUTED
200f3a8: f0 2f bd 59 stb %i0, [ %fp + -679 ] <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
200f3ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
200f3b0: c6 2f bd 5b stb %g3, [ %fp + -677 ] <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
200f3b4: c8 2f bf 3c stb %g4, [ %fp + -196 ] <== NOT EXECUTED
200f3b8: c8 2f bf 3d stb %g4, [ %fp + -195 ] <== NOT EXECUTED
200f3bc: c6 2f bf 3e stb %g3, [ %fp + -194 ] <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
200f3c0: c4 2f bf 57 stb %g2, [ %fp + -169 ] <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
200f3c4: c2 2f bf 40 stb %g1, [ %fp + -192 ] <== NOT EXECUTED
200f3c8: c2 2f bf 41 stb %g1, [ %fp + -191 ] <== NOT EXECUTED
200f3cc: c2 2f bf 42 stb %g1, [ %fp + -190 ] <== NOT EXECUTED
200f3d0: c2 2f bf 43 stb %g1, [ %fp + -189 ] <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
200f3d4: c2 2f bf 44 stb %g1, [ %fp + -188 ] <== NOT EXECUTED
200f3d8: c2 2f bf 45 stb %g1, [ %fp + -187 ] <== NOT EXECUTED
200f3dc: c2 2f bf 46 stb %g1, [ %fp + -186 ] <== NOT EXECUTED
200f3e0: c2 2f bf 47 stb %g1, [ %fp + -185 ] <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
200f3e4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200f3e8: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
200f3ec: 7f ff fc 91 call 200e630 <msdos_format_write_sec> <== NOT EXECUTED
200f3f0: 96 07 bd 58 add %fp, -680, %o3 <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
200f3f4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200f3f8: 12 bf fd 40 bne 200e8f8 <msdos_format+0xb8> <== NOT EXECUTED
200f3fc: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
(rqdata,
200f400: 10 bf fe 2a b 200eca8 <msdos_format+0x468> <== NOT EXECUTED
200f404: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
200f408: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
200f40c: d0 0f bd 4b ldub [ %fp + -693 ], %o0
200f410: 82 10 3f f8 mov -8, %g1
200f414: 40 00 6d 60 call 202a994 <.umul>
200f418: c2 2f bf 89 stb %g1, [ %fp + -119 ]
200f41c: c2 07 bf 60 ld [ %fp + -160 ], %g1
200f420: f6 07 bf 74 ld [ %fp + -140 ], %i3
200f424: 10 bf ff 8b b 200f250 <msdos_format+0xa10>
200f428: 82 02 00 01 add %o0, %g1, %g1
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f42c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200f430: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
200f434: 7f ff fc 6a call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200f438: 94 12 a1 78 or %o2, 0x178, %o2 ! 202d978 <_CPU_Trap_slot_template+0xfc><== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
200f43c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200f440: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200f444: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
200f448: 7f ff fc 7a call 200e630 <msdos_format_write_sec> <== NOT EXECUTED
200f44c: 96 07 bd 58 add %fp, -680, %o3 <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
200f450: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200f454: 02 bf fe 12 be 200ec9c <msdos_format+0x45c> <== NOT EXECUTED
200f458: f4 07 bf 84 ld [ %fp + -124 ], %i2 <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
200f45c: 10 bf fd 27 b 200e8f8 <msdos_format+0xb8> <== NOT EXECUTED
200f460: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f464: 90 10 20 00 clr %o0 <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
200f468: c2 2f bf 88 stb %g1, [ %fp + -120 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f46c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200f470: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
200f474: 96 10 20 02 mov 2, %o3 <== NOT EXECUTED
200f478: 7f ff fc 59 call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200f47c: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
200f480: 10 bf fd 72 b 200ea48 <msdos_format+0x208> <== NOT EXECUTED
200f484: 03 00 00 1f sethi %hi(0x7c00), %g1 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
200f488: c6 0f bf 89 ldub [ %fp + -119 ], %g3 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
200f48c: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
200f490: 82 20 00 1a neg %i2, %g1 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
200f494: c6 2f bd 58 stb %g3, [ %fp + -680 ] <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
200f498: c4 2f bd 59 stb %g2, [ %fp + -679 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
200f49c: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
200f4a0: c4 2f bd 5b stb %g2, [ %fp + -677 ] <== NOT EXECUTED
200f4a4: c6 2f bd 5a stb %g3, [ %fp + -678 ] <== NOT EXECUTED
break;
200f4a8: 10 bf fe 4a b 200edd0 <msdos_format+0x590> <== NOT EXECUTED
200f4ac: 83 30 60 1f srl %g1, 0x1f, %g1 <== NOT EXECUTED
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
200f4b0: 82 20 00 1a neg %i2, %g1
memset(tmp_sec,0,sizeof(tmp_sec));
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
200f4b4: c4 2f bd 58 stb %g2, [ %fp + -680 ]
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
200f4b8: 84 10 3f 8f mov -113, %g2
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
200f4bc: 83 30 60 1f srl %g1, 0x1f, %g1
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
200f4c0: c4 2f bd 59 stb %g2, [ %fp + -679 ]
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
200f4c4: 84 10 3f ff mov -1, %g2
break;
200f4c8: 10 bf fe 42 b 200edd0 <msdos_format+0x590>
200f4cc: c4 2f bd 5a stb %g2, [ %fp + -678 ]
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
200f4d0: c6 0f bf 89 ldub [ %fp + -119 ], %g3 <== NOT EXECUTED
200f4d4: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
200f4d8: 82 20 00 1a neg %i2, %g1 <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
200f4dc: c6 2f bd 58 stb %g3, [ %fp + -680 ] <== NOT EXECUTED
200f4e0: c4 2f bd 59 stb %g2, [ %fp + -679 ] <== NOT EXECUTED
200f4e4: c4 2f bd 5a stb %g2, [ %fp + -678 ] <== NOT EXECUTED
200f4e8: c4 2f bd 5b stb %g2, [ %fp + -677 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
200f4ec: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
200f4f0: c4 2f bd 5d stb %g2, [ %fp + -675 ] <== NOT EXECUTED
200f4f4: c4 2f bd 5e stb %g2, [ %fp + -674 ] <== NOT EXECUTED
200f4f8: c6 2f bd 5c stb %g3, [ %fp + -676 ] <== NOT EXECUTED
200f4fc: 84 10 20 0f mov 0xf, %g2 <== NOT EXECUTED
200f500: 83 30 60 1f srl %g1, 0x1f, %g1 <== NOT EXECUTED
200f504: 10 bf fe 2c b 200edb4 <msdos_format+0x574> <== NOT EXECUTED
200f508: c4 2f bd 5f stb %g2, [ %fp + -673 ] <== NOT EXECUTED
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
200f50c: 40 00 3d cb call 201ec38 <rand>
200f510: 01 00 00 00 nop
200f514: 10 bf fe bc b 200f004 <msdos_format+0x7c4>
200f518: d0 27 bf a4 st %o0, [ %fp + -92 ]
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
200f51c: 82 10 62 9f or %g1, 0x29f, %g1 <== NOT EXECUTED
200f520: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
200f524: 18 80 00 41 bgu 200f628 <msdos_format+0xde8> <== NOT EXECUTED
200f528: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
200f52c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
200f530: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
200f534: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
200f538: 10 bf fd 4c b 200ea68 <msdos_format+0x228> <== NOT EXECUTED
200f53c: c2 27 bf 64 st %g1, [ %fp + -156 ] <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
200f540: c2 07 bf 68 ld [ %fp + -152 ], %g1 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
200f544: c4 07 bf 80 ld [ %fp + -128 ], %g2 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
200f548: 9b 30 60 08 srl %g1, 8, %o5 <== NOT EXECUTED
200f54c: 9f 30 60 10 srl %g1, 0x10, %o7 <== NOT EXECUTED
200f550: b1 30 60 18 srl %g1, 0x18, %i0 <== NOT EXECUTED
200f554: c2 2f bd 7c stb %g1, [ %fp + -644 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
200f558: 82 10 20 29 mov 0x29, %g1 <== NOT EXECUTED
200f55c: c2 2f bd 9a stb %g1, [ %fp + -614 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
200f560: 03 00 00 11 sethi %hi(0x4400), %g1 <== NOT EXECUTED
200f564: 82 10 62 41 or %g1, 0x241, %g1 ! 4641 <PROM_START+0x4641> <== NOT EXECUTED
200f568: c2 37 bd aa sth %g1, [ %fp + -598 ] <== NOT EXECUTED
200f56c: 03 00 00 15 sethi %hi(0x5400), %g1 <== NOT EXECUTED
200f570: 82 10 60 33 or %g1, 0x33, %g1 ! 5433 <PROM_START+0x5433> <== NOT EXECUTED
200f574: c2 37 bd ac sth %g1, [ %fp + -596 ] <== NOT EXECUTED
200f578: 03 00 00 0c sethi %hi(0x3000), %g1 <== NOT EXECUTED
200f57c: 82 10 62 20 or %g1, 0x220, %g1 ! 3220 <PROM_START+0x3220> <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
200f580: b5 30 a0 08 srl %g2, 8, %i2 <== 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),
200f584: c2 37 bd ae sth %g1, [ %fp + -594 ] <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
200f588: da 2f bd 7d stb %o5, [ %fp + -643 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
200f58c: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
200f590: de 2f bd 7e stb %o7, [ %fp + -642 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
200f594: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
200f598: f0 2f bd 7f stb %i0, [ %fp + -641 ] <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
200f59c: c8 2f bd 84 stb %g4, [ %fp + -636 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
200f5a0: c6 2f bd 88 stb %g3, [ %fp + -632 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
200f5a4: c4 2f bd 8a stb %g2, [ %fp + -630 ] <== NOT EXECUTED
200f5a8: f4 2f bd 8b stb %i2, [ %fp + -629 ] <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
200f5ac: c0 27 bd 8c clr [ %fp + -628 ] <== NOT EXECUTED
200f5b0: c0 27 bd 90 clr [ %fp + -624 ] <== NOT EXECUTED
200f5b4: c0 27 bd 94 clr [ %fp + -620 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
200f5b8: c0 2f bd 9f clrb [ %fp + -609 ] <== NOT EXECUTED
200f5bc: c0 2f bd a0 clrb [ %fp + -608 ] <== NOT EXECUTED
200f5c0: c0 2f bd a1 clrb [ %fp + -607 ] <== NOT EXECUTED
200f5c4: c0 2f bd a2 clrb [ %fp + -606 ] <== NOT EXECUTED
200f5c8: c0 2f bd a3 clrb [ %fp + -605 ] <== NOT EXECUTED
200f5cc: c0 2f bd a4 clrb [ %fp + -604 ] <== NOT EXECUTED
200f5d0: c0 2f bd a5 clrb [ %fp + -603 ] <== NOT EXECUTED
200f5d4: c0 2f bd a6 clrb [ %fp + -602 ] <== NOT EXECUTED
200f5d8: c0 2f bd a7 clrb [ %fp + -601 ] <== NOT EXECUTED
200f5dc: c0 2f bd a8 clrb [ %fp + -600 ] <== NOT EXECUTED
200f5e0: c0 2f bd a9 clrb [ %fp + -599 ] <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
200f5e4: 10 bf fd 93 b 200ec30 <msdos_format+0x3f0> <== NOT EXECUTED
200f5e8: c2 37 bd b0 sth %g1, [ %fp + -592 ] <== 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;
200f5ec: 82 10 20 20 mov 0x20, %g1 <== NOT EXECUTED
200f5f0: c2 27 bf 60 st %g1, [ %fp + -160 ] <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
200f5f4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
200f5f8: c0 27 bf 70 clr [ %fp + -144 ] <== NOT EXECUTED
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
200f5fc: c2 27 bf 80 st %g1, [ %fp + -128 ] <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
200f600: e2 07 bf 58 ld [ %fp + -168 ], %l1 <== NOT EXECUTED
200f604: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200f608: a4 10 20 20 mov 0x20, %l2 <== NOT EXECUTED
200f60c: c2 27 bf 84 st %g1, [ %fp + -124 ] <== NOT EXECUTED
200f610: 10 bf fe b9 b 200f0f4 <msdos_format+0x8b4> <== NOT EXECUTED
200f614: 90 10 20 00 clr %o0 <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
200f618: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
200f61c: a0 10 20 00 clr %l0 <== NOT EXECUTED
200f620: 10 bf fe 7f b 200f01c <msdos_format+0x7dc> <== NOT EXECUTED
200f624: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
200f628: 84 10 20 00 clr %g2 <== NOT EXECUTED
200f62c: 07 10 00 00 sethi %hi(0x40000000), %g3 <== NOT EXECUTED
200f630: 86 86 c0 03 addcc %i3, %g3, %g3 <== NOT EXECUTED
200f634: 84 46 80 02 addx %i2, %g2, %g2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
200f638: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
200f63c: 89 28 a0 02 sll %g2, 2, %g4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
200f640: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
200f644: 85 30 e0 1e srl %g3, 0x1e, %g2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
200f648: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
200f64c: 10 80 00 04 b 200f65c <msdos_format+0xe1c> <== NOT EXECUTED
200f650: 88 11 00 02 or %g4, %g2, %g4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
200f654: 02 80 00 0b be 200f680 <msdos_format+0xe40> <== NOT EXECUTED
200f658: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
200f65c: 85 28 c0 01 sll %g3, %g1, %g2 <== NOT EXECUTED
200f660: 80 88 80 04 btst %g2, %g4 <== NOT EXECUTED
200f664: 02 bf ff fc be 200f654 <msdos_format+0xe14> <== NOT EXECUTED
200f668: 82 80 7f ff addcc %g1, -1, %g1 <== NOT EXECUTED
break;
fmt_params->sectors_per_cluster = 1 << b;
200f66c: 10 bf fc ff b 200ea68 <msdos_format+0x228> <== NOT EXECUTED
200f670: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
200f674: 03 00 80 b6 sethi %hi(0x202d800), %g1
200f678: 10 bf fd 66 b 200ec10 <msdos_format+0x3d0>
200f67c: 82 10 60 c0 or %g1, 0xc0, %g1 ! 202d8c0 <_CPU_Trap_slot_template+0x44>
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
200f680: 10 bf fc fa b 200ea68 <msdos_format+0x228> <== NOT EXECUTED
200f684: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
200f688: 40 00 3a 17 call 201dee4 <__errno> <== NOT EXECUTED
200f68c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
200f690: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200f694: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
200f698: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f69c: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
200f6a0: 40 00 6c bd call 202a994 <.umul> <== NOT EXECUTED
200f6a4: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
200f6a8: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
200f6ac: 10 bf fe e9 b 200f250 <msdos_format+0xa10> <== NOT EXECUTED
200f6b0: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
200f6b4: 10 bf fe 6d b 200f068 <msdos_format+0x828> <== NOT EXECUTED
200f6b8: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
200f6bc: 10 bf fc 8a b 200e8e4 <msdos_format+0xa4> <== NOT EXECUTED
200f6c0: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
0200e690 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200e690: 9d e3 bf a0 save %sp, -96, %sp
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
200e694: 7f ff df 21 call 2006318 <malloc>
200e698: 90 10 00 1c mov %i4, %o0
if (fill_buffer == NULL) {
200e69c: a0 92 20 00 orcc %o0, 0, %l0
200e6a0: 02 80 00 47 be 200e7bc <msdos_format_fill_sectors+0x12c> <== NEVER TAKEN
200e6a4: 92 10 00 1d mov %i5, %o1
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
200e6a8: 40 00 41 1a call 201eb10 <memset>
200e6ac: 94 10 00 1c mov %i4, %o2
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e6b0: 90 10 00 18 mov %i0, %o0
200e6b4: 92 10 20 02 mov 2, %o1
200e6b8: 15 00 80 b6 sethi %hi(0x202d800), %o2
200e6bc: 7f ff ff c8 call 200e5dc <msdos_format_printf>
200e6c0: 94 12 a0 90 or %o2, 0x90, %o2 ! 202d890 <_CPU_Trap_slot_template+0x14>
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200e6c4: 80 a6 e0 00 cmp %i3, 0
200e6c8: 02 80 00 56 be 200e820 <msdos_format_fill_sectors+0x190> <== NEVER TAKEN
200e6cc: 83 2e e0 04 sll %i3, 4, %g1
200e6d0: bb 2e e0 02 sll %i3, 2, %i5
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
200e6d4: 29 00 80 b3 sethi %hi(0x202cc00), %l4
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200e6d8: ba 07 40 01 add %i5, %g1, %i5
200e6dc: a2 10 00 1b mov %i3, %l1
200e6e0: 83 2f 60 02 sll %i5, 2, %g1
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
200e6e4: a4 10 3f ff mov -1, %l2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200e6e8: ba 07 40 01 add %i5, %g1, %i5
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
200e6ec: 10 80 00 10 b 200e72c <msdos_format_fill_sectors+0x9c>
200e6f0: a8 15 20 40 or %l4, 0x40, %l4
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
200e6f4: 92 10 00 1a mov %i2, %o1
200e6f8: 90 10 00 19 mov %i1, %o0
200e6fc: 94 10 00 1c mov %i4, %o2
200e700: 96 10 00 10 mov %l0, %o3
200e704: 7f ff ff cb call 200e630 <msdos_format_write_sec>
200e708: a2 04 7f ff add %l1, -1, %l1
start_sector++;
200e70c: b4 06 a0 01 inc %i2
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
200e710: a6 10 00 08 mov %o0, %l3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200e714: 80 a2 20 00 cmp %o0, 0
200e718: 12 80 00 1c bne 200e788 <msdos_format_fill_sectors+0xf8> <== NEVER TAKEN
200e71c: ba 07 7f 9c add %i5, -100, %i5
200e720: 80 a4 60 00 cmp %l1, 0
200e724: 02 80 00 1a be 200e78c <msdos_format_fill_sectors+0xfc>
200e728: 90 10 00 18 mov %i0, %o0
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
200e72c: 92 10 00 1b mov %i3, %o1
200e730: 40 00 70 d3 call 202aa7c <.udiv>
200e734: 90 10 00 1d mov %i5, %o0
if (percent != last_percent) {
200e738: 80 a2 00 12 cmp %o0, %l2
200e73c: 02 bf ff ee be 200e6f4 <msdos_format_fill_sectors+0x64>
200e740: 80 8a 20 01 btst 1, %o0
if ((percent & 1) == 0)
200e744: 12 bf ff ec bne 200e6f4 <msdos_format_fill_sectors+0x64>
200e748: a4 10 00 08 mov %o0, %l2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
200e74c: 90 10 00 18 mov %i0, %o0
200e750: 92 10 20 02 mov 2, %o1
200e754: 7f ff ff a2 call 200e5dc <msdos_format_printf>
200e758: 94 10 00 14 mov %l4, %o2
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
200e75c: 92 10 00 1a mov %i2, %o1
200e760: 90 10 00 19 mov %i1, %o0
200e764: 94 10 00 1c mov %i4, %o2
200e768: 96 10 00 10 mov %l0, %o3
200e76c: 7f ff ff b1 call 200e630 <msdos_format_write_sec>
200e770: a2 04 7f ff add %l1, -1, %l1
start_sector++;
200e774: b4 06 a0 01 inc %i2
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
200e778: a6 10 00 08 mov %o0, %l3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200e77c: 80 a2 20 00 cmp %o0, 0
200e780: 02 bf ff e8 be 200e720 <msdos_format_fill_sectors+0x90> <== ALWAYS TAKEN
200e784: ba 07 7f 9c add %i5, -100, %i5
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
200e788: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e78c: 92 10 20 02 mov 2, %o1
200e790: 15 00 80 b5 sethi %hi(0x202d400), %o2
200e794: 7f ff ff 92 call 200e5dc <msdos_format_printf>
200e798: 94 12 a0 48 or %o2, 0x48, %o2 ! 202d448 <rtems_filesystem_table+0x2f8>
if (ret_val)
200e79c: 80 a4 e0 00 cmp %l3, 0
200e7a0: 12 80 00 16 bne 200e7f8 <msdos_format_fill_sectors+0x168> <== NEVER TAKEN
200e7a4: 90 10 00 18 mov %i0, %o0
/*
* cleanup
*/
if (fill_buffer != NULL) {
free(fill_buffer);
200e7a8: 90 10 00 10 mov %l0, %o0
200e7ac: 7f ff dd 0b call 2005bd8 <free>
200e7b0: b0 10 00 13 mov %l3, %i0
fill_buffer = NULL;
}
return ret_val;
}
200e7b4: 81 c7 e0 08 ret
200e7b8: 81 e8 00 00 restore
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
200e7bc: 40 00 3d ca call 201dee4 <__errno> <== NOT EXECUTED
200e7c0: a6 10 3f ff mov -1, %l3 <== NOT EXECUTED
200e7c4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e7c8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
200e7cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200e7d0: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
200e7d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e7d8: 7f ff ff 81 call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200e7dc: 94 12 a0 90 or %o2, 0x90, %o2 <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
200e7e0: 15 00 80 b5 sethi %hi(0x202d400), %o2 <== NOT EXECUTED
200e7e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e7e8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200e7ec: 7f ff ff 7c call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200e7f0: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200e7f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e7f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200e7fc: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
200e800: 15 00 80 b6 sethi %hi(0x202d800), %o2 <== NOT EXECUTED
200e804: 7f ff ff 76 call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200e808: 94 12 a0 a0 or %o2, 0xa0, %o2 ! 202d8a0 <_CPU_Trap_slot_template+0x24><== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
200e80c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
200e810: 12 bf ff e7 bne 200e7ac <msdos_format_fill_sectors+0x11c> <== NOT EXECUTED
200e814: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
free(fill_buffer);
fill_buffer = NULL;
}
return ret_val;
}
200e818: 81 c7 e0 08 ret <== NOT EXECUTED
200e81c: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
200e820: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e824: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
200e828: a6 10 20 00 clr %l3 <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
200e82c: 15 00 80 b5 sethi %hi(0x202d400), %o2 <== NOT EXECUTED
200e830: 7f ff ff 6b call 200e5dc <msdos_format_printf> <== NOT EXECUTED
200e834: 94 12 a0 48 or %o2, 0x48, %o2 ! 202d448 <rtems_filesystem_table+0x2f8><== NOT EXECUTED
/*
* cleanup
*/
if (fill_buffer != NULL) {
free(fill_buffer);
200e838: 10 bf ff dd b 200e7ac <msdos_format_fill_sectors+0x11c> <== NOT EXECUTED
200e83c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
0200e5dc <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
200e5dc: 9d e3 bf 98 save %sp, -104, %sp
va_list args;
va_start (args, format);
200e5e0: 94 07 a0 50 add %fp, 0x50, %o2
200e5e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200e5e8: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200e5ec: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
if (rqdata != NULL && rqdata->info_level >= info_level)
200e5f0: 80 a6 20 00 cmp %i0, 0
200e5f4: 02 80 00 0d be 200e628 <msdos_format_printf+0x4c> <== NEVER TAKEN
200e5f8: d4 27 bf fc st %o2, [ %fp + -4 ]
200e5fc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200e600: 80 a0 40 19 cmp %g1, %i1
200e604: 06 80 00 09 bl 200e628 <msdos_format_printf+0x4c> <== ALWAYS TAKEN
200e608: 3b 00 80 bc sethi %hi(0x202f000), %i5
{
vfprintf (stdout, format, args);
200e60c: c2 07 63 88 ld [ %i5 + 0x388 ], %g1 ! 202f388 <_impure_ptr><== NOT EXECUTED
200e610: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200e614: 40 00 5e 0d call 2025e48 <vfprintf> <== NOT EXECUTED
200e618: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
fflush (stdout);
200e61c: c2 07 63 88 ld [ %i5 + 0x388 ], %g1 <== NOT EXECUTED
200e620: 40 00 3f 41 call 201e324 <fflush> <== NOT EXECUTED
200e624: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
200e628: 81 c7 e0 08 ret
200e62c: 81 e8 00 00 restore
0200e630 <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200e630: 9d e3 bf a0 save %sp, -96, %sp
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200e634: 94 10 20 00 clr %o2
200e638: 96 10 00 1a mov %i2, %o3
200e63c: 90 10 20 00 clr %o0
200e640: 40 00 72 67 call 202afdc <__muldi3>
200e644: 92 10 00 19 mov %i1, %o1
200e648: 84 10 00 08 mov %o0, %g2
200e64c: 86 10 00 09 mov %o1, %g3
200e650: 90 10 00 18 mov %i0, %o0
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200e654: ba 10 00 18 mov %i0, %i5
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200e658: 92 10 00 02 mov %g2, %o1
200e65c: 94 10 00 03 mov %g3, %o2
200e660: 96 10 20 00 clr %o3
200e664: 7f ff de 85 call 2006078 <lseek>
200e668: b0 10 3f ff mov -1, %i0
200e66c: 80 a2 20 00 cmp %o0, 0
200e670: 06 80 00 06 bl 200e688 <msdos_format_write_sec+0x58> <== NEVER TAKEN
200e674: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
200e678: 92 10 00 1b mov %i3, %o1
200e67c: 7f ff ed 4c call 2009bac <write>
200e680: 94 10 00 1a mov %i2, %o2
200e684: b1 3a 20 1f sra %o0, 0x1f, %i0
ret_val = -1;
}
}
return ret_val;
}
200e688: 81 c7 e0 08 ret
200e68c: 81 e8 00 00 restore
02019d0c <msdos_free_node_info>:
* RC_OK on success, or -1 code if error occured
*
*/
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
2019d0c: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2019d10: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019d14: 92 10 20 00 clr %o1
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2019d18: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2019d1c: 94 10 20 00 clr %o2
2019d20: 7f ff c1 9e call 200a398 <rtems_semaphore_obtain>
2019d24: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2019d28: 80 a2 20 00 cmp %o0, 0
2019d2c: 12 80 00 0a bne 2019d54 <msdos_free_node_info+0x48> <== NEVER TAKEN
2019d30: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
2019d34: d2 06 00 00 ld [ %i0 ], %o1
2019d38: 7f ff e4 ae call 2012ff0 <fat_file_close>
2019d3c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
2019d40: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
2019d44: 7f ff c1 df call 200a4c0 <rtems_semaphore_release>
2019d48: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
2019d4c: 81 c7 e0 08 ret
2019d50: 81 e8 00 00 restore
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2019d54: 40 00 10 64 call 201dee4 <__errno> <== NOT EXECUTED
2019d58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019d5c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2019d60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019d64: 81 c7 e0 08 ret <== NOT EXECUTED
2019d68: 81 e8 00 00 restore <== NOT EXECUTED
0201b278 <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
)
{
201b278: 9d e3 bf 50 save %sp, -176, %sp <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201b27c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
201b280: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
201b284: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
201b288: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
201b28c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201b290: 7f ff dd dc call 2012a00 <fat_file_open> <== NOT EXECUTED
201b294: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc != RC_OK)
201b298: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b29c: 12 80 00 a4 bne 201b52c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b4><== NOT EXECUTED
201b2a0: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201b2a4: 03 00 08 00 sethi %hi(0x200000), %g1 <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
201b2a8: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
201b2ac: f2 22 60 1c st %i1, [ %o1 + 0x1c ] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
201b2b0: e2 22 60 10 st %l1, [ %o1 + 0x10 ] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
201b2b4: c0 22 60 34 clr [ %o1 + 0x34 ] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201b2b8: c2 22 60 14 st %g1, [ %o1 + 0x14 ] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201b2bc: f2 22 60 38 st %i1, [ %o1 + 0x38 ] <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
201b2c0: 7f ff e1 3a call 20137a8 <fat_file_size> <== NOT EXECUTED
201b2c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc != RC_OK)
201b2c8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b2cc: 12 80 00 95 bne 201b520 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2a8><== NOT EXECUTED
201b2d0: b2 07 bf b8 add %fp, -72, %i1 <== NOT EXECUTED
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
201b2d4: 31 00 80 b3 sethi %hi(0x202cc00), %i0 <== NOT EXECUTED
201b2d8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201b2dc: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
201b2e0: 96 10 20 0b mov 0xb, %o3 <== NOT EXECUTED
201b2e4: 90 16 20 40 or %i0, 0x40, %o0 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201b2e8: c0 27 bf b8 clr [ %fp + -72 ] <== NOT EXECUTED
201b2ec: c0 27 bf bc clr [ %fp + -68 ] <== NOT EXECUTED
201b2f0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
201b2f4: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
201b2f8: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED
201b2fc: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED
201b300: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
201b304: 7f ff fa ca call 2019e2c <msdos_long_to_short> <== NOT EXECUTED
201b308: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
201b30c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
201b310: 96 16 20 40 or %i0, 0x40, %o3 <== NOT EXECUTED
201b314: f4 23 a0 5c st %i2, [ %sp + 0x5c ] <== NOT EXECUTED
201b318: f2 23 a0 60 st %i1, [ %sp + 0x60 ] <== NOT EXECUTED
201b31c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b320: 94 10 20 00 clr %o2 <== NOT EXECUTED
201b324: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
201b328: 7f ff fc f8 call 201a708 <msdos_find_name_in_fat_file> <== NOT EXECUTED
201b32c: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
201b330: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b334: 12 80 00 7b bne 201b520 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2a8><== NOT EXECUTED
201b338: a0 07 bf d8 add %fp, -40, %l0 <== NOT EXECUTED
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
201b33c: 31 00 80 b2 sethi %hi(0x202c800), %i0 <== NOT EXECUTED
201b340: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
201b344: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201b348: 96 10 20 0b mov 0xb, %o3 <== NOT EXECUTED
201b34c: 90 16 22 c8 or %i0, 0x2c8, %o0 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201b350: c0 27 bf d8 clr [ %fp + -40 ] <== NOT EXECUTED
201b354: c0 27 bf dc clr [ %fp + -36 ] <== NOT EXECUTED
201b358: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
201b35c: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
201b360: c0 24 20 10 clr [ %l0 + 0x10 ] <== NOT EXECUTED
201b364: c0 24 20 14 clr [ %l0 + 0x14 ] <== NOT EXECUTED
201b368: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
201b36c: 7f ff fa b0 call 2019e2c <msdos_long_to_short> <== NOT EXECUTED
201b370: c0 24 20 1c clr [ %l0 + 0x1c ] <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
201b374: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
201b378: 96 16 22 c8 or %i0, 0x2c8, %o3 <== NOT EXECUTED
201b37c: f4 23 a0 5c st %i2, [ %sp + 0x5c ] <== NOT EXECUTED
201b380: e0 23 a0 60 st %l0, [ %sp + 0x60 ] <== NOT EXECUTED
201b384: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b388: 94 10 20 00 clr %o2 <== NOT EXECUTED
201b38c: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
201b390: 7f ff fc de call 201a708 <msdos_find_name_in_fat_file> <== NOT EXECUTED
201b394: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201b398: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
201b39c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201b3a0: 12 80 00 65 bne 201b534 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2bc><== NOT EXECUTED
201b3a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
201b3a8: e4 16 60 1a lduh [ %i1 + 0x1a ], %l2 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
201b3ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b3b0: 7f ff df 10 call 2012ff0 <fat_file_close> <== NOT EXECUTED
201b3b4: f2 16 60 14 lduh [ %i1 + 0x14 ], %i1 <== NOT EXECUTED
if ( rc != RC_OK )
201b3b8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b3bc: 12 80 00 5c bne 201b52c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b4><== NOT EXECUTED
201b3c0: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
201b3c4: c4 14 20 1a lduh [ %l0 + 0x1a ], %g2 <== NOT EXECUTED
201b3c8: c6 14 20 14 lduh [ %l0 + 0x14 ], %g3 <== NOT EXECUTED
201b3cc: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201b3d0: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201b3d4: 89 30 a0 18 srl %g2, 0x18, %g4 <== NOT EXECUTED
201b3d8: b1 30 e0 18 srl %g3, 0x18, %i0 <== NOT EXECUTED
201b3dc: 87 30 e0 08 srl %g3, 8, %g3 <== NOT EXECUTED
201b3e0: 82 10 63 ff or %g1, 0x3ff, %g1 <== NOT EXECUTED
201b3e4: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201b3e8: 86 08 c0 01 and %g3, %g1, %g3 <== NOT EXECUTED
201b3ec: 82 08 80 01 and %g2, %g1, %g1 <== NOT EXECUTED
201b3f0: 86 16 00 03 or %i0, %g3, %g3 <== NOT EXECUTED
201b3f4: 82 11 00 01 or %g4, %g1, %g1 <== NOT EXECUTED
201b3f8: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201b3fc: 80 90 c0 01 orcc %g3, %g1, %g0 <== NOT EXECUTED
201b400: 12 80 00 07 bne 201b41c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1a4><== NOT EXECUTED
201b404: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201b408: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
201b40c: c0 26 a0 04 clr [ %i2 + 4 ] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201b410: c2 26 a0 08 st %g1, [ %i2 + 8 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201b414: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
/*
* we handle root dir for all FAT types in the same way with the
* ordinary directories ( through fat_file_* calls )
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
201b418: e2 26 80 00 st %l1, [ %i2 ] <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
201b41c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201b420: 7f ff dd 78 call 2012a00 <fat_file_open> <== NOT EXECUTED
201b424: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc != RC_OK)
201b428: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b42c: 12 80 00 40 bne 201b52c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b4><== NOT EXECUTED
201b430: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
201b434: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
201b438: c8 14 20 1a lduh [ %l0 + 0x1a ], %g4 <== NOT EXECUTED
201b43c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201b440: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
201b444: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED
201b448: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED
201b44c: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED
201b450: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
201b454: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
201b458: b1 31 20 18 srl %g4, 0x18, %i0 <== NOT EXECUTED
201b45c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201b460: 89 31 20 08 srl %g4, 8, %g4 <== NOT EXECUTED
201b464: 86 09 00 03 and %g4, %g3, %g3 <== NOT EXECUTED
201b468: 82 16 00 03 or %i0, %g3, %g1 <== NOT EXECUTED
201b46c: 82 90 80 01 orcc %g2, %g1, %g1 <== NOT EXECUTED
201b470: 12 80 00 35 bne 201b544 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2cc><== NOT EXECUTED
201b474: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
201b478: c2 07 20 38 ld [ %i4 + 0x38 ], %g1 <== NOT EXECUTED
201b47c: c2 22 60 1c st %g1, [ %o1 + 0x1c ] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201b480: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 <== NOT EXECUTED
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
201b484: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201b488: c4 22 60 10 st %g2, [ %o1 + 0x10 ] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201b48c: 05 00 08 00 sethi %hi(0x200000), %g2 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
201b490: c0 22 60 34 clr [ %o1 + 0x34 ] <== 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;
201b494: c4 22 60 14 st %g2, [ %o1 + 0x14 ] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201b498: c2 22 60 38 st %g1, [ %o1 + 0x38 ] <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
201b49c: 7f ff e0 c3 call 20137a8 <fat_file_size> <== NOT EXECUTED
201b4a0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201b4a4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
201b4a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201b4ac: 12 80 00 22 bne 201b534 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2bc><== NOT EXECUTED
201b4b0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
201b4b4: 87 2e 60 10 sll %i1, 0x10, %g3 <== NOT EXECUTED
201b4b8: a5 2c a0 10 sll %l2, 0x10, %l2 <== NOT EXECUTED
201b4bc: 95 30 e0 18 srl %g3, 0x18, %o2 <== NOT EXECUTED
201b4c0: 83 34 a0 18 srl %l2, 0x18, %g1 <== NOT EXECUTED
201b4c4: 87 30 e0 08 srl %g3, 8, %g3 <== NOT EXECUTED
201b4c8: a5 34 a0 08 srl %l2, 8, %l2 <== NOT EXECUTED
201b4cc: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED
201b4d0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff> <== NOT EXECUTED
201b4d4: 86 08 c0 02 and %g3, %g2, %g3 <== NOT EXECUTED
201b4d8: 84 0c 80 02 and %l2, %g2, %g2 <== NOT EXECUTED
201b4dc: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
201b4e0: 94 12 80 03 or %o2, %g3, %o2 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
201b4e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b4e8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
201b4ec: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
201b4f0: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
201b4f4: 7f ff fe fa call 201b0dc <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
201b4f8: 94 12 80 01 or %o2, %g1, %o2 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201b4fc: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
201b500: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
201b504: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201b508: 12 80 00 11 bne 201b54c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2d4><== NOT EXECUTED
201b50c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
201b510: 7f ff de b8 call 2012ff0 <fat_file_close> <== NOT EXECUTED
201b514: 01 00 00 00 nop <== NOT EXECUTED
return rc;
}
201b518: 81 c7 e0 08 ret <== NOT EXECUTED
201b51c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201b520: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
201b524: 7f ff de b3 call 2012ff0 <fat_file_close> <== NOT EXECUTED
201b528: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
201b52c: 81 c7 e0 08 ret <== NOT EXECUTED
201b530: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201b534: 7f ff de af call 2012ff0 <fat_file_close> <== NOT EXECUTED
201b538: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
201b53c: 81 c7 e0 08 ret <== NOT EXECUTED
201b540: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
201b544: 10 bf ff cf b 201b480 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x208><== NOT EXECUTED
201b548: c2 22 60 1c st %g1, [ %o1 + 0x1c ] <== NOT EXECUTED
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201b54c: 7f ff de a9 call 2012ff0 <fat_file_close> <== NOT EXECUTED
201b550: 01 00 00 00 nop <== NOT EXECUTED
return rc;
201b554: 81 c7 e0 08 ret <== NOT EXECUTED
201b558: 81 e8 00 00 restore <== NOT EXECUTED
0201b55c <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201b55c: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
201b560: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
201b564: d2 06 00 00 ld [ %i0 ], %o1
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201b568: e0 07 a0 5c ld [ %fp + 0x5c ], %l0
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
201b56c: 9a 10 00 1c mov %i4, %o5
201b570: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
201b574: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
201b578: 94 10 00 19 mov %i1, %o2
201b57c: 96 10 00 1a mov %i2, %o3
201b580: 7f ff fc 62 call 201a708 <msdos_find_name_in_fat_file>
201b584: 98 10 00 1b mov %i3, %o4
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
201b588: 03 00 00 1f sethi %hi(0x7c00), %g1
201b58c: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
201b590: 80 a2 00 01 cmp %o0, %g1
201b594: 12 80 00 2e bne 201b64c <msdos_get_name_node+0xf0>
201b598: b8 10 00 08 mov %o0, %i4
return rc;
if (!create_node)
201b59c: 80 a6 60 00 cmp %i1, 0
201b5a0: 12 80 00 29 bne 201b644 <msdos_get_name_node+0xe8>
201b5a4: 01 00 00 00 nop
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
201b5a8: 03 00 00 1f sethi %hi(0x7c00), %g1
201b5ac: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
201b5b0: 80 a7 00 01 cmp %i4, %g1
201b5b4: 02 80 00 24 be 201b644 <msdos_get_name_node+0xe8>
201b5b8: 01 00 00 00 nop
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
201b5bc: 80 a7 20 00 cmp %i4, 0
201b5c0: 12 80 00 21 bne 201b644 <msdos_get_name_node+0xe8> <== NEVER TAKEN
201b5c4: 01 00 00 00 nop
{
if (strncmp(name, "..", 2) == 0)
201b5c8: 90 10 00 1a mov %i2, %o0
201b5cc: 94 10 20 02 mov 2, %o2
201b5d0: 13 00 80 b2 sethi %hi(0x202c800), %o1
201b5d4: 40 00 10 bf call 201f8d0 <strncmp>
201b5d8: 92 12 62 c8 or %o1, 0x2c8, %o1 ! 202cac8 <_rodata_start+0x228>
201b5dc: 80 a2 20 00 cmp %o0, 0
201b5e0: 12 80 00 19 bne 201b644 <msdos_get_name_node+0xe8>
201b5e4: 01 00 00 00 nop
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
201b5e8: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1
201b5ec: c6 14 20 1a lduh [ %l0 + 0x1a ], %g3
201b5f0: 83 28 60 10 sll %g1, 0x10, %g1
201b5f4: 05 00 00 3f sethi %hi(0xfc00), %g2
201b5f8: b3 30 60 18 srl %g1, 0x18, %i1
201b5fc: 84 10 a3 ff or %g2, 0x3ff, %g2
201b600: 83 30 60 08 srl %g1, 8, %g1
201b604: 82 08 40 02 and %g1, %g2, %g1
201b608: 87 28 e0 10 sll %g3, 0x10, %g3
201b60c: b2 16 40 01 or %i1, %g1, %i1
201b610: 89 30 e0 18 srl %g3, 0x18, %g4
201b614: b3 2e 60 10 sll %i1, 0x10, %i1
201b618: 87 30 e0 08 srl %g3, 8, %g3
201b61c: 84 08 c0 02 and %g3, %g2, %g2
201b620: 82 11 00 02 or %g4, %g2, %g1
/* are we right under root dir ? */
if (dotdot_cln == 0)
201b624: b2 96 40 01 orcc %i1, %g1, %i1
201b628: 12 80 00 0e bne 201b660 <msdos_get_name_node+0x104> <== NEVER TAKEN
201b62c: 82 10 3f ff mov -1, %g1
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
201b630: c0 27 60 04 clr [ %i5 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201b634: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201b638: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
201b63c: 82 10 20 01 mov 1, %g1
201b640: c2 27 40 00 st %g1, [ %i5 ]
}
}
}
}
return rc;
}
201b644: 81 c7 e0 08 ret
201b648: 91 e8 00 1c restore %g0, %i4, %o0
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
201b64c: 80 a2 20 00 cmp %o0, 0
201b650: 22 bf ff d4 be,a 201b5a0 <msdos_get_name_node+0x44> <== ALWAYS TAKEN
201b654: 80 a6 60 00 cmp %i1, 0
}
}
}
}
return rc;
}
201b658: 81 c7 e0 08 ret <== NOT EXECUTED
201b65c: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
201b660: f0 06 20 10 ld [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
201b664: b4 10 00 1d mov %i5, %i2 <== NOT EXECUTED
201b668: 7f ff ff 04 call 201b278 <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
201b66c: 97 e8 00 10 restore %g0, %l0, %o3 <== NOT EXECUTED
0201a06c <msdos_get_token>:
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
201a06c: 9d e3 bf a0 save %sp, -96, %sp
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
201a070: c0 26 80 00 clr [ %i2 ]
*ret_token_len = 0;
201a074: c0 26 c0 00 clr [ %i3 ]
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
201a078: b8 10 00 18 mov %i0, %i4
int i = 0;
*ret_token = NULL;
*ret_token_len = 0;
if (pathlen == 0)
201a07c: ba 10 20 00 clr %i5
201a080: 80 a6 60 00 cmp %i1, 0
201a084: 12 80 00 0d bne 201a0b8 <msdos_get_token+0x4c>
201a088: b0 10 20 00 clr %i0
201a08c: 30 80 00 33 b,a 201a158 <msdos_get_token+0xec>
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
201a090: 16 80 00 10 bge 201a0d0 <msdos_get_token+0x64> <== NEVER TAKEN
201a094: 80 a7 60 00 cmp %i5, 0
{
if ( !msdos_is_valid_name_char(path[i]) )
201a098: d0 4f 00 1d ldsb [ %i4 + %i5 ], %o0
201a09c: 7f ff ff 49 call 2019dc0 <msdos_is_valid_name_char>
201a0a0: ba 07 60 01 inc %i5
201a0a4: 80 a2 20 00 cmp %o0, 0
201a0a8: 02 80 00 22 be 201a130 <msdos_get_token+0xc4> <== NEVER TAKEN
201a0ac: 80 a7 61 04 cmp %i5, 0x104
return MSDOS_INVALID_TOKEN;
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
201a0b0: 02 80 00 11 be 201a0f4 <msdos_get_token+0x88> <== NEVER TAKEN
201a0b4: b0 10 20 04 mov 4, %i0
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
201a0b8: 7f ff b5 22 call 2007540 <rtems_filesystem_is_separator>
201a0bc: d0 4f 00 1d ldsb [ %i4 + %i5 ], %o0
201a0c0: 80 a2 20 00 cmp %o0, 0
201a0c4: 02 bf ff f3 be 201a090 <msdos_get_token+0x24>
201a0c8: 80 a7 40 19 cmp %i5, %i1
*ret_token = path;
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
201a0cc: 80 a7 60 00 cmp %i5, 0
201a0d0: 12 80 00 0b bne 201a0fc <msdos_get_token+0x90>
201a0d4: f8 26 80 00 st %i4, [ %i2 ]
{
if ( (*path != '\0') && pathlen )
201a0d8: c2 4f 00 00 ldsb [ %i4 ], %g1
201a0dc: 80 a0 60 00 cmp %g1, 0
201a0e0: 22 80 00 04 be,a 201a0f0 <msdos_get_token+0x84>
201a0e4: b0 10 20 00 clr %i0
{
i++;
201a0e8: ba 10 20 01 mov 1, %i5
type = MSDOS_CURRENT_DIR;
201a0ec: b0 10 20 01 mov 1, %i0
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
201a0f0: fa 26 c0 00 st %i5, [ %i3 ]
type = MSDOS_CURRENT_DIR;
return type;
}
}
return type;
201a0f4: 81 c7 e0 08 ret
201a0f8: 81 e8 00 00 restore
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
201a0fc: 80 a7 60 02 cmp %i5, 2
201a100: 02 80 00 0e be 201a138 <msdos_get_token+0xcc>
201a104: fa 26 c0 00 st %i5, [ %i3 ]
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
201a108: 80 a7 60 01 cmp %i5, 1
201a10c: 12 bf ff fa bne 201a0f4 <msdos_get_token+0x88>
201a110: b0 10 20 03 mov 3, %i0
201a114: c2 4f 00 00 ldsb [ %i4 ], %g1
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
msdos_token_types_t type = MSDOS_NAME;
201a118: 82 18 60 2e xor %g1, 0x2e, %g1
201a11c: 80 a0 00 01 cmp %g0, %g1
201a120: b0 40 3f ff addx %g0, -1, %i0
201a124: b0 0e 3f fe and %i0, -2, %i0
201a128: 81 c7 e0 08 ret
201a12c: 91 ee 20 03 restore %i0, 3, %o0
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
return MSDOS_INVALID_TOKEN;
201a130: 81 c7 e0 08 ret <== NOT EXECUTED
201a134: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
201a138: c2 4f 00 00 ldsb [ %i4 ], %g1
201a13c: 80 a0 60 2e cmp %g1, 0x2e
201a140: 12 bf ff ed bne 201a0f4 <msdos_get_token+0x88> <== NEVER TAKEN
201a144: b0 10 20 03 mov 3, %i0
201a148: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
msdos_token_types_t type = MSDOS_NAME;
201a14c: 82 18 60 2e xor %g1, 0x2e, %g1
201a150: 80 a0 00 01 cmp %g0, %g1
201a154: b0 46 3f ff addx %i0, -1, %i0
201a158: 81 c7 e0 08 ret
201a15c: 81 e8 00 00 restore
0200f6e8 <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
)
{
200f6e8: 9d e3 bf 88 save %sp, -120, %sp
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
200f6ec: 90 10 20 01 mov 1, %o0
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
200f6f0: c0 27 bf fc clr [ %fp + -4 ]
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
200f6f4: 92 10 20 a0 mov 0xa0, %o1
200f6f8: 7f ff d7 da call 2005660 <calloc>
200f6fc: b8 10 00 18 mov %i0, %i4
if (!fs_info)
200f700: 80 a2 20 00 cmp %o0, 0
200f704: 02 80 00 56 be 200f85c <msdos_initialize_support+0x174> <== NEVER TAKEN
200f708: ba 10 00 08 mov %o0, %i5
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
200f70c: d0 27 20 34 st %o0, [ %i4 + 0x34 ]
rc = fat_init_volume_info(temp_mt_entry);
200f710: 40 00 12 c3 call 201421c <fat_init_volume_info>
200f714: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
200f718: b0 92 20 00 orcc %o0, 0, %i0
200f71c: 12 80 00 36 bne 200f7f4 <msdos_initialize_support+0x10c> <== NEVER TAKEN
200f720: 82 10 3f ff mov -1, %g1
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
200f724: f4 27 60 94 st %i2, [ %i5 + 0x94 ]
fs_info->directory_handlers = directory_handlers;
200f728: f6 27 60 90 st %i3, [ %i5 + 0x90 ]
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
200f72c: c0 27 bf f0 clr [ %fp + -16 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
200f730: c2 27 bf f4 st %g1, [ %fp + -12 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
200f734: c2 27 bf f8 st %g1, [ %fp + -8 ]
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
200f738: b4 10 20 01 mov 1, %i2
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
200f73c: 90 10 00 1c mov %i4, %o0
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
200f740: f4 27 bf ec st %i2, [ %fp + -20 ]
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
200f744: 92 07 bf ec add %fp, -20, %o1
200f748: 40 00 0c ae call 2012a00 <fat_file_open>
200f74c: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
200f750: b0 92 20 00 orcc %o0, 0, %i0
200f754: 12 80 00 2e bne 200f80c <msdos_initialize_support+0x124> <== NEVER TAKEN
200f758: d2 07 bf fc ld [ %fp + -4 ], %o1
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
200f75c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
200f760: 05 00 08 00 sethi %hi(0x200000), %g2
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
200f764: f4 22 60 10 st %i2, [ %o1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
200f768: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
fat_fd->cln = fs_info->fat.vol.rdir_cl;
200f76c: c2 22 60 1c st %g1, [ %o1 + 0x1c ]
fat_fd->map.file_cln = 0;
200f770: c0 22 60 34 clr [ %o1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
200f774: 80 a0 60 00 cmp %g1, 0
200f778: 12 80 00 2b bne 200f824 <msdos_initialize_support+0x13c> <== NEVER TAKEN
200f77c: c2 22 60 38 st %g1, [ %o1 + 0x38 ]
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
200f780: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
200f784: d0 17 60 06 lduh [ %i5 + 6 ], %o0
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
200f788: 80 a2 00 01 cmp %o0, %g1
200f78c: 0a 80 00 1e bcs 200f804 <msdos_initialize_support+0x11c> <== ALWAYS TAKEN
200f790: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
200f794: 7f ff d7 b3 call 2005660 <calloc>
200f798: 92 10 20 01 mov 1, %o1
if (fs_info->cl_buf == NULL)
200f79c: 80 a2 20 00 cmp %o0, 0
200f7a0: 02 80 00 28 be 200f840 <msdos_initialize_support+0x158> <== NEVER TAKEN
200f7a4: d0 27 60 9c st %o0, [ %i5 + 0x9c ]
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
sc = rtems_semaphore_create(3,
200f7a8: 90 10 20 03 mov 3, %o0
200f7ac: 92 10 20 01 mov 1, %o1
200f7b0: 94 10 20 10 mov 0x10, %o2
200f7b4: 96 10 20 00 clr %o3
200f7b8: 7f ff ea 51 call 200a0fc <rtems_semaphore_create>
200f7bc: 98 07 60 98 add %i5, 0x98, %o4
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
200f7c0: 80 a2 20 00 cmp %o0, 0
200f7c4: 12 80 00 2c bne 200f874 <msdos_initialize_support+0x18c> <== NEVER TAKEN
200f7c8: c2 07 bf fc ld [ %fp + -4 ], %g1
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
200f7cc: f6 27 20 24 st %i3, [ %i4 + 0x24 ]
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
200f7d0: c2 27 20 1c st %g1, [ %i4 + 0x1c ]
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
200f7d4: f2 27 20 28 st %i1, [ %i4 + 0x28 ]
return rc;
}
200f7d8: 81 c7 e0 08 ret
200f7dc: 81 e8 00 00 restore
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
200f7e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200f7e4: 40 00 0e 03 call 2012ff0 <fat_file_close> <== NOT EXECUTED
200f7e8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
200f7ec: 40 00 12 44 call 20140fc <fat_shutdown_drive> <== NOT EXECUTED
200f7f0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
200f7f4: 7f ff d8 f9 call 2005bd8 <free> <== NOT EXECUTED
200f7f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
200f7fc: 81 c7 e0 08 ret <== NOT EXECUTED
200f800: 81 e8 00 00 restore <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
200f804: 10 bf ff e4 b 200f794 <msdos_initialize_support+0xac>
200f808: 90 10 00 01 mov %g1, %o0
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
if (rc != RC_OK)
{
fat_shutdown_drive(temp_mt_entry);
200f80c: 40 00 12 3c call 20140fc <fat_shutdown_drive> <== NOT EXECUTED
200f810: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
200f814: 7f ff d8 f1 call 2005bd8 <free> <== NOT EXECUTED
200f818: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
200f81c: 81 c7 e0 08 ret <== NOT EXECUTED
200f820: 81 e8 00 00 restore <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
200f824: 40 00 0f e1 call 20137a8 <fat_file_size> <== NOT EXECUTED
200f828: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if ( rc != RC_OK )
200f82c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
200f830: 12 bf ff ec bne 200f7e0 <msdos_initialize_support+0xf8> <== NOT EXECUTED
200f834: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
200f838: 10 bf ff d7 b 200f794 <msdos_initialize_support+0xac> <== NOT EXECUTED
200f83c: d0 17 60 06 lduh [ %i5 + 6 ], %o0 <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
200f840: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
200f844: 40 00 0d eb call 2012ff0 <fat_file_close> <== NOT EXECUTED
200f848: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
200f84c: 40 00 12 2c call 20140fc <fat_shutdown_drive> <== NOT EXECUTED
200f850: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
200f854: 7f ff d8 e1 call 2005bd8 <free> <== NOT EXECUTED
200f858: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
200f85c: 40 00 39 a2 call 201dee4 <__errno> <== NOT EXECUTED
200f860: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f864: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200f868: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f86c: 81 c7 e0 08 ret <== NOT EXECUTED
200f870: 81 e8 00 00 restore <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
200f874: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
200f878: 40 00 0d de call 2012ff0 <fat_file_close> <== NOT EXECUTED
200f87c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
200f880: 40 00 12 1f call 20140fc <fat_shutdown_drive> <== NOT EXECUTED
200f884: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info->cl_buf);
200f888: d0 07 60 9c ld [ %i5 + 0x9c ], %o0 <== NOT EXECUTED
200f88c: 7f ff d8 d3 call 2005bd8 <free> <== NOT EXECUTED
200f890: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info);
200f894: 7f ff d8 d1 call 2005bd8 <free> <== NOT EXECUTED
200f898: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
200f89c: 40 00 39 92 call 201dee4 <__errno> <== NOT EXECUTED
200f8a0: 01 00 00 00 nop <== NOT EXECUTED
200f8a4: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
200f8a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f8ac: 81 c7 e0 08 ret <== NOT EXECUTED
200f8b0: 81 e8 00 00 restore <== NOT EXECUTED
02019dc0 <msdos_is_valid_name_char>:
* MSDOS_NAME_LONG - Valid in a long name only.
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
2019dc0: 9d e3 bf a0 save %sp, -96, %sp
if (strchr(" +,;=[]", ch) != NULL)
2019dc4: 11 00 80 b7 sethi %hi(0x202dc00), %o0
2019dc8: 92 10 00 18 mov %i0, %o1
* MSDOS_NAME_LONG - Valid in a long name only.
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
2019dcc: ba 10 00 18 mov %i0, %i5
if (strchr(" +,;=[]", ch) != NULL)
2019dd0: 90 12 22 b0 or %o0, 0x2b0, %o0
2019dd4: 40 00 14 2a call 201ee7c <strchr>
2019dd8: b0 10 20 02 mov 2, %i0
2019ddc: 80 a2 20 00 cmp %o0, 0
2019de0: 12 80 00 11 bne 2019e24 <msdos_is_valid_name_char+0x64> <== NEVER TAKEN
2019de4: 80 a7 60 2e cmp %i5, 0x2e
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
2019de8: 02 80 00 0f be 2019e24 <msdos_is_valid_name_char+0x64>
2019dec: b0 10 20 01 mov 1, %i0
2019df0: 03 00 80 bc sethi %hi(0x202f000), %g1
2019df4: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 202f380 <__ctype_ptr__>
2019df8: 82 0f 60 ff and %i5, 0xff, %g1
2019dfc: 82 00 80 01 add %g2, %g1, %g1
2019e00: c2 08 60 01 ldub [ %g1 + 1 ], %g1
2019e04: 80 88 60 07 btst 7, %g1
2019e08: 12 80 00 07 bne 2019e24 <msdos_is_valid_name_char+0x64>
2019e0c: 92 10 00 1d mov %i5, %o1
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
2019e10: 11 00 80 b7 sethi %hi(0x202dc00), %o0
2019e14: 40 00 14 1a call 201ee7c <strchr>
2019e18: 90 12 22 b8 or %o0, 0x2b8, %o0 ! 202deb8 <msdos_file_handlers+0x40>
return MSDOS_NAME_SHORT;
2019e1c: 80 a0 00 08 cmp %g0, %o0
2019e20: b0 40 20 00 addx %g0, 0, %i0
return MSDOS_NAME_INVALID;
}
2019e24: 81 c7 e0 08 ret
2019e28: 81 e8 00 00 restore
02019e2c <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)
{
2019e2c: 9d e3 bf a0 save %sp, -96, %sp
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
2019e30: 92 10 20 20 mov 0x20, %o1
2019e34: 90 10 00 1a mov %i2, %o0
2019e38: 40 00 13 36 call 201eb10 <memset>
2019e3c: 94 10 00 1b mov %i3, %o2
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
2019e40: f8 0e 00 00 ldub [ %i0 ], %i4
2019e44: a1 2f 20 18 sll %i4, 0x18, %l0
2019e48: 83 3c 20 18 sra %l0, 0x18, %g1
2019e4c: 82 18 60 2e xor %g1, 0x2e, %g1
2019e50: 80 a0 00 01 cmp %g0, %g1
2019e54: 82 60 3f ff subx %g0, -1, %g1
2019e58: 80 a6 60 01 cmp %i1, 1
2019e5c: 02 80 00 16 be 2019eb4 <msdos_long_to_short+0x88> <== NEVER TAKEN
2019e60: ba 10 00 18 mov %i0, %i5
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
2019e64: 80 a0 60 00 cmp %g1, 0
2019e68: 12 80 00 59 bne 2019fcc <msdos_long_to_short+0x1a0>
2019e6c: 80 a6 60 02 cmp %i1, 2
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
2019e70: 80 a6 60 00 cmp %i1, 0
2019e74: 04 80 00 77 ble 201a050 <msdos_long_to_short+0x224> <== NEVER TAKEN
2019e78: 83 3c 20 18 sra %l0, 0x18, %g1
if ((lfn[i] != ' ') && (lfn[i] != '.'))
2019e7c: 80 a0 60 2e cmp %g1, 0x2e
2019e80: 12 80 00 70 bne 201a040 <msdos_long_to_short+0x214> <== ALWAYS TAKEN
2019e84: 80 a0 60 20 cmp %g1, 0x20
2019e88: 10 80 00 05 b 2019e9c <msdos_long_to_short+0x70> <== NOT EXECUTED
2019e8c: 82 10 20 00 clr %g1 <== NOT EXECUTED
2019e90: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
2019e94: 12 80 00 0e bne 2019ecc <msdos_long_to_short+0xa0> <== NOT EXECUTED
2019e98: 80 a0 a0 20 cmp %g2, 0x20 <== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
2019e9c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2019ea0: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED
2019ea4: 32 bf ff fb bne,a 2019e90 <msdos_long_to_short+0x64> <== NOT EXECUTED
2019ea8: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 <== NOT EXECUTED
if (i == lfn_len)
{
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: INVALID[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
2019eac: 81 c7 e0 08 ret <== NOT EXECUTED
2019eb0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
2019eb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2019eb8: 02 bf ff ec be 2019e68 <msdos_long_to_short+0x3c> <== NOT EXECUTED
2019ebc: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED
{
sfn[0] = '.';
2019ec0: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
2019ec4: 81 c7 e0 08 ret <== NOT EXECUTED
2019ec8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
2019ecc: 22 bf ff f5 be,a 2019ea0 <msdos_long_to_short+0x74> <== NOT EXECUTED
2019ed0: 82 00 60 01 inc %g1 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
2019ed4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2019ed8: 04 80 00 63 ble 201a064 <msdos_long_to_short+0x238> <== NEVER TAKEN
2019edc: 80 a4 20 00 cmp %l0, 0
2019ee0: 02 80 00 61 be 201a064 <msdos_long_to_short+0x238> <== NEVER TAKEN
2019ee4: a2 10 00 1d mov %i5, %l1
2019ee8: a6 10 20 00 clr %l3
2019eec: a8 10 20 00 clr %l4
2019ef0: b6 10 20 00 clr %i3
2019ef4: 10 80 00 1e b 2019f6c <msdos_long_to_short+0x140>
2019ef8: a4 10 3f ff mov -1, %l2
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
{
if (is_dot || ((count - dot_at) > 3))
2019efc: 12 80 00 3f bne 2019ff8 <msdos_long_to_short+0x1cc> <== NOT EXECUTED
2019f00: 82 26 c0 12 sub %i3, %l2, %g1 <== NOT EXECUTED
2019f04: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
2019f08: 14 80 00 3d bg 2019ffc <msdos_long_to_short+0x1d0> <== NOT EXECUTED
2019f0c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
}
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
2019f10: 82 07 3f bf add %i4, -65, %g1 <== NOT EXECUTED
2019f14: 82 08 60 ff and %g1, 0xff, %g1
2019f18: 80 a0 60 19 cmp %g1, 0x19
2019f1c: 28 80 00 07 bleu,a 2019f38 <msdos_long_to_short+0x10c> <== NEVER TAKEN
2019f20: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
2019f24: b8 07 3f 9f add %i4, -97, %i4
2019f28: b8 0f 20 ff and %i4, 0xff, %i4
2019f2c: 80 a7 20 19 cmp %i4, 0x19
2019f30: 28 80 00 02 bleu,a 2019f38 <msdos_long_to_short+0x10c>
2019f34: a8 10 20 01 mov 1, %l4
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
2019f38: f8 0c 60 01 ldub [ %l1 + 1 ], %i4
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
count++;
2019f3c: b6 06 e0 01 inc %i3
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
2019f40: a1 2f 20 18 sll %i4, 0x18, %l0
2019f44: 80 a4 20 00 cmp %l0, 0
2019f48: 02 80 00 38 be 201a028 <msdos_long_to_short+0x1fc>
2019f4c: a2 04 60 01 inc %l1
2019f50: 80 a6 40 1b cmp %i1, %i3
2019f54: 14 80 00 03 bg 2019f60 <msdos_long_to_short+0x134>
2019f58: 82 10 20 01 mov 1, %g1
2019f5c: 82 10 20 00 clr %g1
2019f60: 80 88 60 ff btst 0xff, %g1
2019f64: 02 80 00 32 be 201a02c <msdos_long_to_short+0x200>
2019f68: 80 8d 20 ff btst 0xff, %l4
{
bool is_dot = *name == '.';
msdos_name_type_t type = msdos_is_valid_name_char(*name);
2019f6c: a1 3c 20 18 sra %l0, 0x18, %l0
2019f70: 7f ff ff 94 call 2019dc0 <msdos_is_valid_name_char>
2019f74: 90 10 00 10 mov %l0, %o0
#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))
2019f78: 80 a2 20 02 cmp %o0, 2
2019f7c: 02 80 00 26 be 201a014 <msdos_long_to_short+0x1e8> <== NEVER TAKEN
2019f80: 80 a2 20 00 cmp %o0, 0
2019f84: 02 80 00 24 be 201a014 <msdos_long_to_short+0x1e8>
2019f88: a0 1c 20 2e xor %l0, 0x2e, %l0
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
2019f8c: 80 a0 00 10 cmp %g0, %l0
2019f90: 82 60 3f ff subx %g0, -1, %g1
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
2019f94: 80 a4 bf ff cmp %l2, -1
2019f98: 12 bf ff d9 bne 2019efc <msdos_long_to_short+0xd0> <== NEVER TAKEN
2019f9c: 80 88 60 ff btst 0xff, %g1
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
2019fa0: 80 a6 e0 08 cmp %i3, 8
2019fa4: 02 80 00 06 be 2019fbc <msdos_long_to_short+0x190>
2019fa8: 80 88 60 ff btst 0xff, %g1
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
2019fac: 22 bf ff da be,a 2019f14 <msdos_long_to_short+0xe8> <== ALWAYS TAKEN
2019fb0: 82 07 3f bf add %i4, -65, %g1
2019fb4: 10 bf ff e1 b 2019f38 <msdos_long_to_short+0x10c> <== NOT EXECUTED
2019fb8: a4 10 00 1b mov %i3, %l2 <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
2019fbc: 02 80 00 0f be 2019ff8 <msdos_long_to_short+0x1cc> <== ALWAYS TAKEN
2019fc0: a4 10 20 08 mov 8, %l2
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
2019fc4: 10 bf ff de b 2019f3c <msdos_long_to_short+0x110> <== NOT EXECUTED
2019fc8: f8 0c 60 01 ldub [ %l1 + 1 ], %i4 <== 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))
2019fcc: 12 bf ff aa bne 2019e74 <msdos_long_to_short+0x48> <== NEVER TAKEN
2019fd0: 80 a6 60 00 cmp %i1, 0
2019fd4: c2 4f 60 01 ldsb [ %i5 + 1 ], %g1
2019fd8: 80 a0 60 2e cmp %g1, 0x2e
2019fdc: 32 bf ff a6 bne,a 2019e74 <msdos_long_to_short+0x48> <== NEVER TAKEN
2019fe0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
2019fe4: 82 10 20 2e mov 0x2e, %g1
2019fe8: c2 2e a0 01 stb %g1, [ %i2 + 1 ]
2019fec: c2 2e 80 00 stb %g1, [ %i2 ]
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
2019ff0: 81 c7 e0 08 ret
2019ff4: 91 e8 20 01 restore %g0, 1, %o0
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[2]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
2019ff8: b0 10 20 02 mov 2, %i0
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
2019ffc: 90 10 00 1d mov %i5, %o0
201a000: 92 10 00 19 mov %i1, %o1
201a004: 40 00 0c 8e call 201d23c <msdos_filename_unix2dos>
201a008: 94 10 00 1a mov %i2, %o2
201a00c: 81 c7 e0 08 ret
201a010: 81 e8 00 00 restore
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
if (type == MSDOS_NAME_INVALID)
201a014: b0 92 20 00 orcc %o0, 0, %i0
201a018: 12 bf ff fa bne 201a000 <msdos_long_to_short+0x1d4> <== NEVER TAKEN
201a01c: 90 10 00 1d mov %i5, %o0
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
201a020: 81 c7 e0 08 ret
201a024: 81 e8 00 00 restore
count++;
name++;
}
if (lowercase && uppercase)
201a028: 80 8d 20 ff btst 0xff, %l4
201a02c: 02 bf ff f4 be 2019ffc <msdos_long_to_short+0x1d0> <== NEVER TAKEN
201a030: b0 10 20 01 mov 1, %i0
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
201a034: b0 0c e0 01 and %l3, 1, %i0
201a038: 10 bf ff f1 b 2019ffc <msdos_long_to_short+0x1d0>
201a03c: b0 06 20 01 inc %i0
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201a040: 22 bf ff 97 be,a 2019e9c <msdos_long_to_short+0x70> <== NEVER TAKEN
201a044: 82 10 20 00 clr %g1 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
201a048: 10 bf ff a4 b 2019ed8 <msdos_long_to_short+0xac>
201a04c: 80 a6 60 00 cmp %i1, 0
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
201a050: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201a054: 12 bf ff a1 bne 2019ed8 <msdos_long_to_short+0xac> <== NOT EXECUTED
201a058: b0 10 20 00 clr %i0 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
201a05c: 81 c7 e0 08 ret <== NOT EXECUTED
201a060: 81 e8 00 00 restore <== NOT EXECUTED
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
201a064: 10 bf ff e6 b 2019ffc <msdos_long_to_short+0x1d0> <== NOT EXECUTED
201a068: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
0200f8b4 <msdos_mknod>:
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
200f8b4: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
200f8b8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
200f8bc: 05 00 00 3c sethi %hi(0xf000), %g2
rtems_filesystem_location_info_t *pathloc
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
200f8c0: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
200f8c4: 84 0e 40 02 and %i1, %g2, %g2
200f8c8: 03 00 00 10 sethi %hi(0x4000), %g1
200f8cc: 80 a0 80 01 cmp %g2, %g1
200f8d0: 02 80 00 1a be 200f938 <msdos_mknod+0x84>
200f8d4: 03 00 00 20 sethi %hi(0x8000), %g1
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
200f8d8: 80 a0 80 01 cmp %g2, %g1
200f8dc: 12 80 00 1f bne 200f958 <msdos_mknod+0xa4> <== NEVER TAKEN
200f8e0: b6 10 20 05 mov 5, %i3
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
200f8e4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
200f8e8: 92 10 20 00 clr %o1
200f8ec: 7f ff ea ab call 200a398 <rtems_semaphore_obtain>
200f8f0: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200f8f4: 80 a2 20 00 cmp %o0, 0
200f8f8: 12 80 00 12 bne 200f940 <msdos_mknod+0x8c> <== NEVER TAKEN
200f8fc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
200f900: 40 00 3f c3 call 201f80c <strlen>
200f904: 90 10 00 18 mov %i0, %o0
200f908: 94 10 00 18 mov %i0, %o2
200f90c: 96 10 00 08 mov %o0, %o3
200f910: 92 10 00 1b mov %i3, %o1
200f914: 90 10 00 1c mov %i4, %o0
200f918: 98 10 00 19 mov %i1, %o4
200f91c: 40 00 24 f2 call 2018ce4 <msdos_creat_node>
200f920: 9a 10 20 00 clr %o5
200f924: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
200f928: 7f ff ea e6 call 200a4c0 <rtems_semaphore_release>
200f92c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
200f930: 81 c7 e0 08 ret
200f934: 81 e8 00 00 restore
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
200f938: 10 bf ff eb b 200f8e4 <msdos_mknod+0x30>
200f93c: b6 10 20 01 mov 1, %i3
rtems_set_errno_and_return_minus_one(EINVAL);
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);
200f940: 40 00 39 69 call 201dee4 <__errno> <== NOT EXECUTED
200f944: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f948: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
200f94c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f950: 81 c7 e0 08 ret <== NOT EXECUTED
200f954: 81 e8 00 00 restore <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
200f958: 40 00 39 63 call 201dee4 <__errno> <== NOT EXECUTED
200f95c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f960: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200f964: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f968: 81 c7 e0 08 ret <== NOT EXECUTED
200f96c: 81 e8 00 00 restore <== NOT EXECUTED
0200f97c <msdos_rename>:
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
200f97c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
200f980: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
200f984: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f988: 40 00 3f a1 call 201f80c <strlen> <== NOT EXECUTED
200f98c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
200f990: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
200f994: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
const char *new_name)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
200f998: f8 06 40 00 ld [ %i1 ], %i4 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
200f99c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f9a0: 40 00 29 b3 call 201a06c <msdos_get_token> <== NOT EXECUTED
200f9a4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
200f9a8: 80 a2 20 03 cmp %o0, 3 <== NOT EXECUTED
200f9ac: 12 80 00 1d bne 200fa20 <msdos_rename+0xa4> <== NOT EXECUTED
200f9b0: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
/*
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
200f9b4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
200f9b8: 7f ff ea 78 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
200f9bc: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200f9c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f9c4: 12 80 00 1d bne 200fa38 <msdos_rename+0xbc> <== NOT EXECUTED
200f9c8: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
200f9cc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
200f9d0: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
200f9d4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
200f9d8: 19 00 00 20 sethi %hi(0x8000), %o4 <== NOT EXECUTED
200f9dc: 40 00 24 c2 call 2018ce4 <msdos_creat_node> <== NOT EXECUTED
200f9e0: 9a 10 00 1c mov %i4, %o5 <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
200f9e4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200f9e8: 12 80 00 0a bne 200fa10 <msdos_rename+0x94> <== NOT EXECUTED
200f9ec: 92 07 20 20 add %i4, 0x20, %o1 <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
200f9f0: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
200f9f4: 40 00 2a 81 call 201a3f8 <msdos_set_first_char4file_name> <== NOT EXECUTED
200f9f8: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
200f9fc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
200fa00: 7f ff ea b0 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
200fa04: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
200fa08: 81 c7 e0 08 ret <== NOT EXECUTED
200fa0c: 81 e8 00 00 restore <== NOT EXECUTED
rc = msdos_creat_node(new_parent_loc,
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
200fa10: 7f ff ea ac call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
200fa14: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
200fa18: 81 c7 e0 08 ret <== NOT EXECUTED
200fa1c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
200fa20: 40 00 39 31 call 201dee4 <__errno> <== NOT EXECUTED
200fa24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200fa28: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
200fa2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200fa30: 81 c7 e0 08 ret <== NOT EXECUTED
200fa34: 81 e8 00 00 restore <== NOT EXECUTED
* lock volume
*/
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);
200fa38: 40 00 39 2b call 201dee4 <__errno> <== NOT EXECUTED
200fa3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200fa40: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
200fa44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200fa48: 81 c7 e0 08 ret <== NOT EXECUTED
200fa4c: 81 e8 00 00 restore <== NOT EXECUTED
0201a160 <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
)
{
201a160: 9d e3 bf 98 save %sp, -104, %sp
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
201a164: d0 06 60 40 ld [ %i1 + 0x40 ], %o0
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201a168: f6 06 20 34 ld [ %i0 + 0x34 ], %i3
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
201a16c: 92 07 bf fe add %fp, -2, %o1
201a170: 40 00 0b 85 call 201cf84 <msdos_date_unix2dos>
201a174: 94 07 bf fc add %fp, -4, %o2
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
201a178: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201a17c: 80 a0 a0 00 cmp %g2, 0
201a180: 12 80 00 06 bne 201a198 <msdos_set_dir_wrt_time_and_date+0x38><== ALWAYS TAKEN
201a184: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
201a188: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 <== NOT EXECUTED
201a18c: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
201a190: 32 80 00 07 bne,a 201a1ac <msdos_set_dir_wrt_time_and_date+0x4c><== NOT EXECUTED
201a194: f8 00 60 1c ld [ %g1 + 0x1c ], %i4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201a198: c6 08 60 05 ldub [ %g1 + 5 ], %g3
201a19c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
201a1a0: b8 00 bf fe add %g2, -2, %i4
201a1a4: b9 2f 00 03 sll %i4, %g3, %i4
201a1a8: b8 07 00 01 add %i4, %g1, %i4
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a1ac: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201a1b0: fa 16 c0 00 lduh [ %i3 ], %i5
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a1b4: c6 0e e0 02 ldub [ %i3 + 2 ], %g3
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
201a1b8: c2 17 bf fc lduh [ %fp + -4 ], %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a1bc: 87 30 80 03 srl %g2, %g3, %g3
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
201a1c0: 83 28 60 10 sll %g1, 0x10, %g1
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201a1c4: ba 07 7f ff add %i5, -1, %i5
201a1c8: ba 0f 40 02 and %i5, %g2, %i5
time_val = CT_LE_W(time_val);
201a1cc: 85 30 60 08 srl %g1, 8, %g2
201a1d0: 83 30 60 18 srl %g1, 0x18, %g1
201a1d4: 82 10 80 01 or %g2, %g1, %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a1d8: b8 07 00 03 add %i4, %g3, %i4
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
201a1dc: 94 07 60 16 add %i5, 0x16, %o2
201a1e0: 92 10 00 1c mov %i4, %o1
201a1e4: 96 10 20 02 mov 2, %o3
201a1e8: 98 07 bf fc add %fp, -4, %o4
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
201a1ec: c2 37 bf fc sth %g1, [ %fp + -4 ]
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
201a1f0: 7f ff e6 a6 call 2013c88 <_fat_block_write>
201a1f4: 90 10 00 18 mov %i0, %o0
2, (char *)(&time_val));
date = CT_LE_W(date);
201a1f8: c2 17 bf fe lduh [ %fp + -2 ], %g1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201a1fc: 94 07 60 18 add %i5, 0x18, %o2
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
201a200: 83 28 60 10 sll %g1, 0x10, %g1
201a204: 85 30 60 08 srl %g1, 8, %g2
201a208: 83 30 60 18 srl %g1, 0x18, %g1
201a20c: 82 10 80 01 or %g2, %g1, %g1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201a210: 96 10 20 02 mov 2, %o3
201a214: 98 07 bf fe add %fp, -2, %o4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
201a218: c2 37 bf fe sth %g1, [ %fp + -2 ]
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201a21c: 92 10 00 1c mov %i4, %o1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
201a220: b4 10 00 08 mov %o0, %i2
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201a224: 7f ff e6 99 call 2013c88 <_fat_block_write>
201a228: 90 10 00 18 mov %i0, %o0
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
201a22c: 92 10 00 1c mov %i4, %o1
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201a230: b6 10 00 08 mov %o0, %i3
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
201a234: 94 07 60 12 add %i5, 0x12, %o2
201a238: 90 10 00 18 mov %i0, %o0
201a23c: 96 10 20 02 mov 2, %o3
201a240: 7f ff e6 92 call 2013c88 <_fat_block_write>
201a244: 98 07 bf fe add %fp, -2, %o4
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
201a248: 80 a6 e0 00 cmp %i3, 0
201a24c: 06 80 00 07 bl 201a268 <msdos_set_dir_wrt_time_and_date+0x108><== NEVER TAKEN
201a250: 80 a6 a0 00 cmp %i2, 0
201a254: 06 80 00 05 bl 201a268 <msdos_set_dir_wrt_time_and_date+0x108><== NEVER TAKEN
201a258: 01 00 00 00 nop
return -1;
201a25c: b1 3a 20 1f sra %o0, 0x1f, %i0
201a260: 81 c7 e0 08 ret
201a264: 81 e8 00 00 restore
return RC_OK;
}
201a268: 81 c7 e0 08 ret <== NOT EXECUTED
201a26c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0201a350 <msdos_set_file_size>:
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201a350: 9d e3 bf 98 save %sp, -104, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
201a354: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201a358: 90 10 00 18 mov %i0, %o0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201a35c: 80 a0 60 00 cmp %g1, 0
201a360: 12 80 00 06 bne 201a378 <msdos_set_file_size+0x28> <== ALWAYS TAKEN
201a364: c8 06 20 34 ld [ %i0 + 0x34 ], %g4
201a368: c4 09 20 0a ldub [ %g4 + 0xa ], %g2 <== NOT EXECUTED
201a36c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
201a370: 32 80 00 07 bne,a 201a38c <msdos_set_file_size+0x3c> <== NOT EXECUTED
201a374: d2 01 20 1c ld [ %g4 + 0x1c ], %o1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201a378: c6 09 20 05 ldub [ %g4 + 5 ], %g3
201a37c: c4 01 20 30 ld [ %g4 + 0x30 ], %g2
201a380: 92 00 7f fe add %g1, -2, %o1
201a384: 93 2a 40 03 sll %o1, %g3, %o1
201a388: 92 02 40 02 add %o1, %g2, %o1
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
201a38c: c6 06 60 18 ld [ %i1 + 0x18 ], %g3
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a390: c4 09 20 02 ldub [ %g4 + 2 ], %g2
201a394: f2 06 60 24 ld [ %i1 + 0x24 ], %i1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
201a398: d4 11 00 00 lduh [ %g4 ], %o2
201a39c: 9f 28 e0 18 sll %g3, 0x18, %o7
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a3a0: 85 36 40 02 srl %i1, %g2, %g2
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201a3a4: 83 30 e0 18 srl %g3, 0x18, %g1
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201a3a8: 89 30 e0 08 srl %g3, 8, %g4
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201a3ac: 82 13 c0 01 or %o7, %g1, %g1
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201a3b0: 88 09 20 ff and %g4, 0xff, %g4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201a3b4: 87 30 e0 10 srl %g3, 0x10, %g3
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201a3b8: 89 29 20 10 sll %g4, 0x10, %g4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201a3bc: 86 08 e0 ff and %g3, 0xff, %g3
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201a3c0: 82 10 40 04 or %g1, %g4, %g1
201a3c4: 87 28 e0 08 sll %g3, 8, %g3
201a3c8: 82 10 40 03 or %g1, %g3, %g1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
201a3cc: 92 02 40 02 add %o1, %g2, %o1
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
201a3d0: c2 27 bf fc st %g1, [ %fp + -4 ]
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
201a3d4: 96 10 20 04 mov 4, %o3
201a3d8: 98 07 bf fc add %fp, -4, %o4
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
201a3dc: 94 02 bf ff add %o2, -1, %o2
201a3e0: 94 0a 80 19 and %o2, %i1, %o2
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
201a3e4: 7f ff e6 29 call 2013c88 <_fat_block_write>
201a3e8: 94 02 a0 1c add %o2, 0x1c, %o2
(char *)(&le_new_length));
if ( ret < 0 )
return -1;
return RC_OK;
}
201a3ec: b1 3a 20 1f sra %o0, 0x1f, %i0
201a3f0: 81 c7 e0 08 ret
201a3f4: 81 e8 00 00 restore
0201a3f8 <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
)
{
201a3f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201a3fc: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
201a400: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED
201a404: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
201a408: f6 06 40 00 ld [ %i1 ], %i3 <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201a40c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201a410: f4 2f a0 4c stb %i2, [ %fp + 0x4c ] <== 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;
201a414: c6 27 bf f8 st %g3, [ %fp + -8 ] <== NOT EXECUTED
201a418: c4 27 bf fc st %g2, [ %fp + -4 ] <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201a41c: b8 10 00 18 mov %i0, %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201a420: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201a424: 02 80 00 58 be 201a584 <msdos_set_first_char4file_name+0x18c><== NOT EXECUTED
201a428: e0 06 60 04 ld [ %i1 + 4 ], %l0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
201a42c: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
201a430: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201a434: 02 80 00 5b be 201a5a0 <msdos_set_first_char4file_name+0x1a8><== NOT EXECUTED
201a438: f4 17 60 06 lduh [ %i5 + 6 ], %i2 <== NOT EXECUTED
start = dir_pos->sname;
201a43c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201a440: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
201a444: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201a448: 86 10 00 1d mov %i5, %g3 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
201a44c: 10 80 00 1e b 201a4c4 <msdos_set_first_char4file_name+0xcc><== NOT EXECUTED
201a450: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201a454: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED
201a458: 22 80 00 1f be,a 201a4d4 <msdos_set_first_char4file_name+0xdc><== NOT EXECUTED
201a45c: c8 08 e0 05 ldub [ %g3 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
201a460: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
201a464: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201a468: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201a46c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201a470: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201a474: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201a478: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201a47c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201a480: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
201a484: 7f ff e6 01 call 2013c88 <_fat_block_write> <== NOT EXECUTED
201a488: 98 07 a0 4c add %fp, 0x4c, %o4 <== NOT EXECUTED
&fchar);
if (ret < 0)
201a48c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201a490: 06 80 00 23 bl 201a51c <msdos_set_first_char4file_name+0x124><== NOT EXECUTED
201a494: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
201a498: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
201a49c: 80 a2 40 1b cmp %o1, %i3 <== NOT EXECUTED
201a4a0: 02 80 00 21 be 201a524 <msdos_set_first_char4file_name+0x12c><== NOT EXECUTED
201a4a4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201a4a8: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
if (start.ofs >= dir_block_size)
201a4ac: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
201a4b0: 08 80 00 23 bleu 201a53c <msdos_set_first_char4file_name+0x144><== NOT EXECUTED
201a4b4: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
201a4b8: c6 07 20 34 ld [ %i4 + 0x34 ], %g3 <== NOT EXECUTED
201a4bc: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
201a4c0: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201a4c4: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201a4c8: 22 bf ff e3 be,a 201a454 <msdos_set_first_char4file_name+0x5c><== NOT EXECUTED
201a4cc: c8 08 e0 0a ldub [ %g3 + 0xa ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201a4d0: c8 08 e0 05 ldub [ %g3 + 5 ], %g4 <== NOT EXECUTED
201a4d4: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
201a4d8: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
201a4dc: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201a4e0: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
201a4e4: 93 2a 40 04 sll %o1, %g4, %o1 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201a4e8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201a4ec: 92 02 40 03 add %o1, %g3, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201a4f0: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201a4f4: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201a4f8: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201a4fc: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201a500: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
201a504: 7f ff e5 e1 call 2013c88 <_fat_block_write> <== NOT EXECUTED
201a508: 98 07 a0 4c add %fp, 0x4c, %o4 <== NOT EXECUTED
&fchar);
if (ret < 0)
201a50c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201a510: 16 bf ff e3 bge 201a49c <msdos_set_first_char4file_name+0xa4><== NOT EXECUTED
201a514: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
return -1;
201a518: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
201a51c: 81 c7 e0 08 ret <== NOT EXECUTED
201a520: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
&fchar);
if (ret < 0)
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
201a524: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
201a528: 32 bf ff e1 bne,a 201a4ac <msdos_set_first_char4file_name+0xb4><== NOT EXECUTED
201a52c: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
return rc;
start.ofs = 0;
}
}
return RC_OK;
201a530: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
201a534: 81 c7 e0 08 ret <== NOT EXECUTED
201a538: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201a53c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
201a540: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201a544: 12 80 00 06 bne 201a55c <msdos_set_first_char4file_name+0x164><== NOT EXECUTED
201a548: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201a54c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201a550: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201a554: 32 bf ff f8 bne,a 201a534 <msdos_set_first_char4file_name+0x13c><== NOT EXECUTED
201a558: 90 10 20 00 clr %o0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
201a55c: 40 00 05 ae call 201bc14 <fat_get_fat_cluster> <== NOT EXECUTED
201a560: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201a564: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201a568: 12 bf ff ed bne 201a51c <msdos_set_first_char4file_name+0x124><== NOT EXECUTED
201a56c: 82 10 20 00 clr %g1 <== NOT EXECUTED
return rc;
start.ofs = 0;
201a570: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
201a574: c6 07 20 34 ld [ %i4 + 0x34 ], %g3 <== NOT EXECUTED
201a578: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
201a57c: 10 bf ff b4 b 201a44c <msdos_set_first_char4file_name+0x54><== NOT EXECUTED
201a580: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201a584: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201a588: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201a58c: 02 bf ff a9 be 201a430 <msdos_set_first_char4file_name+0x38><== NOT EXECUTED
201a590: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
201a594: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201a598: 12 bf ff a9 bne 201a43c <msdos_set_first_char4file_name+0x44><== NOT EXECUTED
201a59c: f4 07 60 28 ld [ %i5 + 0x28 ], %i2 <== NOT EXECUTED
start = dir_pos->sname;
201a5a0: c4 06 40 00 ld [ %i1 ], %g2 <== NOT EXECUTED
201a5a4: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED
201a5a8: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
201a5ac: 10 bf ff a4 b 201a43c <msdos_set_first_char4file_name+0x44><== NOT EXECUTED
201a5b0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
0201a270 <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
)
{
201a270: 9d e3 bf 98 save %sp, -104, %sp
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
201a274: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
201a278: c0 37 bf fe clrh [ %fp + -2 ]
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
201a27c: f6 06 60 1c ld [ %i1 + 0x1c ], %i3
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201a280: 80 a0 60 00 cmp %g1, 0
201a284: 12 80 00 06 bne 201a29c <msdos_set_first_cluster_num+0x2c>
201a288: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
201a28c: c6 08 a0 0a ldub [ %g2 + 0xa ], %g3
201a290: 80 88 e0 03 btst 3, %g3
201a294: 32 80 00 07 bne,a 201a2b0 <msdos_set_first_cluster_num+0x40><== ALWAYS TAKEN
201a298: f8 00 a0 1c ld [ %g2 + 0x1c ], %i4
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201a29c: c8 08 a0 05 ldub [ %g2 + 5 ], %g4
201a2a0: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3
201a2a4: b8 00 7f fe add %g1, -2, %i4
201a2a8: b9 2f 00 04 sll %i4, %g4, %i4
201a2ac: b8 07 00 03 add %i4, %g3, %i4
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a2b0: c6 06 60 24 ld [ %i1 + 0x24 ], %g3
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201a2b4: fa 10 80 00 lduh [ %g2 ], %i5
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a2b8: c4 08 a0 02 ldub [ %g2 + 2 ], %g2
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
201a2bc: 83 2e e0 10 sll %i3, 0x10, %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201a2c0: 85 30 c0 02 srl %g3, %g2, %g2
201a2c4: b8 07 00 02 add %i4, %g2, %i4
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
201a2c8: 85 30 60 08 srl %g1, 8, %g2
201a2cc: 83 30 60 18 srl %g1, 0x18, %g1
201a2d0: 82 10 80 01 or %g2, %g1, %g1
ret1 = _fat_block_write(mt_entry, sec,
201a2d4: 92 10 00 1c mov %i4, %o1
201a2d8: 96 10 20 02 mov 2, %o3
201a2dc: 98 07 bf fc add %fp, -4, %o4
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
201a2e0: c2 37 bf fc sth %g1, [ %fp + -4 ]
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201a2e4: ba 07 7f ff add %i5, -1, %i5
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
201a2e8: 90 10 00 18 mov %i0, %o0
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201a2ec: ba 0f 40 03 and %i5, %g3, %i5
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
201a2f0: 7f ff e6 66 call 2013c88 <_fat_block_write>
201a2f4: 94 07 60 1a add %i5, 0x1a, %o2
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201a2f8: b7 36 e0 10 srl %i3, 0x10, %i3
201a2fc: b7 2e e0 10 sll %i3, 0x10, %i3
201a300: 83 36 e0 08 srl %i3, 8, %g1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
201a304: b4 10 00 08 mov %o0, %i2
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
201a308: 92 10 00 1c mov %i4, %o1
201a30c: 90 10 00 18 mov %i0, %o0
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201a310: b7 36 e0 18 srl %i3, 0x18, %i3
ret2 = _fat_block_write(mt_entry, sec,
201a314: 94 07 60 14 add %i5, 0x14, %o2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201a318: b6 10 40 1b or %g1, %i3, %i3
ret2 = _fat_block_write(mt_entry, sec,
201a31c: 96 10 20 02 mov 2, %o3
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201a320: f6 37 bf fe sth %i3, [ %fp + -2 ]
ret2 = _fat_block_write(mt_entry, sec,
201a324: 7f ff e6 59 call 2013c88 <_fat_block_write>
201a328: 98 07 bf fe add %fp, -2, %o4
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
201a32c: 80 a2 20 00 cmp %o0, 0
201a330: 06 80 00 06 bl 201a348 <msdos_set_first_cluster_num+0xd8> <== NEVER TAKEN
201a334: 80 a6 a0 00 cmp %i2, 0
201a338: 06 80 00 04 bl 201a348 <msdos_set_first_cluster_num+0xd8> <== NEVER TAKEN
201a33c: b0 10 20 00 clr %i0
return -1;
return RC_OK;
}
201a340: 81 c7 e0 08 ret
201a344: 81 e8 00 00 restore
201a348: 81 c7 e0 08 ret <== NOT EXECUTED
201a34c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02019d6c <msdos_shut_down>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
2019d6c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
2019d70: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
2019d74: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
2019d78: 7f ff e4 9e call 2012ff0 <fat_file_close> <== NOT EXECUTED
2019d7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
2019d80: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
2019d84: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
2019d88: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2019d8c: 7f ff e8 dc call 20140fc <fat_shutdown_drive> <== NOT EXECUTED
2019d90: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED
2019d94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2019d98: 32 80 00 02 bne,a 2019da0 <msdos_shut_down+0x34> <== NOT EXECUTED
2019d9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
2019da0: 7f ff c1 47 call 200a2bc <rtems_semaphore_delete> <== NOT EXECUTED
2019da4: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
free(fs_info->cl_buf);
2019da8: 7f ff af 8c call 2005bd8 <free> <== NOT EXECUTED
2019dac: d0 07 20 9c ld [ %i4 + 0x9c ], %o0 <== NOT EXECUTED
free(temp_mt_entry->fs_info);
2019db0: 7f ff af 8a call 2005bd8 <free> <== NOT EXECUTED
2019db4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
return rc;
}
2019db8: 81 c7 e0 08 ret <== NOT EXECUTED
2019dbc: 81 e8 00 00 restore <== NOT EXECUTED
02003af4 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
2003af4: 9d e3 bf a0 save %sp, -96, %sp
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
2003af8: 03 00 80 74 sethi %hi(0x201d000), %g1
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
2003afc: 80 a6 00 19 cmp %i0, %i1
2003b00: 02 80 00 03 be 2003b0c <newlib_delete_hook+0x18>
2003b04: fa 00 61 60 ld [ %g1 + 0x160 ], %i5
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
2003b08: fa 06 61 54 ld [ %i1 + 0x154 ], %i5
}
if (ptr && ptr != _global_impure_ptr) {
2003b0c: 80 a7 60 00 cmp %i5, 0
2003b10: 02 80 00 0b be 2003b3c <newlib_delete_hook+0x48> <== NEVER TAKEN
2003b14: 03 00 80 70 sethi %hi(0x201c000), %g1
2003b18: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201c310 <_global_impure_ptr>
2003b1c: 80 a7 40 01 cmp %i5, %g1
2003b20: 02 80 00 07 be 2003b3c <newlib_delete_hook+0x48>
2003b24: 13 00 80 0e sethi %hi(0x2003800), %o1
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
2003b28: 90 10 00 1d mov %i5, %o0
2003b2c: 40 00 31 ff call 2010328 <_fwalk>
2003b30: 92 12 60 e4 or %o1, 0xe4, %o1
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
2003b34: 40 00 1a d3 call 200a680 <_Workspace_Free>
2003b38: 90 10 00 1d mov %i5, %o0
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
2003b3c: 80 a6 00 19 cmp %i0, %i1
2003b40: 12 80 00 04 bne 2003b50 <newlib_delete_hook+0x5c>
2003b44: c0 26 61 54 clr [ %i1 + 0x154 ]
_REENT = 0;
2003b48: 03 00 80 74 sethi %hi(0x201d000), %g1
2003b4c: c0 20 61 60 clr [ %g1 + 0x160 ] ! 201d160 <_impure_ptr>
2003b50: 81 c7 e0 08 ret
2003b54: 81 e8 00 00 restore
020038e4 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
20038e4: 9d e3 bf a0 save %sp, -96, %sp
switch ( fileno(fp) ) {
20038e8: 40 00 31 98 call 200ff48 <fileno>
20038ec: 90 10 00 18 mov %i0, %o0
20038f0: 80 a2 20 02 cmp %o0, 2
20038f4: 28 80 00 06 bleu,a 200390c <newlib_free_buffers+0x28> <== ALWAYS TAKEN
20038f8: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
20038fc: 40 00 30 c6 call 200fc14 <fclose> <== NOT EXECUTED
2003900: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
return 0;
}
2003904: 81 c7 e0 08 ret
2003908: 91 e8 20 00 restore %g0, 0, %o0
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
200390c: 80 88 60 80 btst 0x80, %g1
2003910: 02 bf ff fd be 2003904 <newlib_free_buffers+0x20> <== ALWAYS TAKEN
2003914: 01 00 00 00 nop
free( fp->_bf._base );
2003918: 7f ff fd 82 call 2002f20 <free> <== NOT EXECUTED
200391c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2003920: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2003924: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2003928: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
200392c: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2003930: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
2003934: 81 c7 e0 08 ret <== NOT EXECUTED
2003938: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02003bcc <open>:
int open(
const char *pathname,
int flags,
...
)
{
2003bcc: 9d e3 bf 88 save %sp, -120, %sp
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
2003bd0: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2003bd4: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003bd8: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2003bdc: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2003be0: 82 06 60 01 add %i1, 1, %g1
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
2003be4: b6 08 60 01 and %g1, 1, %i3
if ( ( status & _FWRITE ) == _FWRITE )
2003be8: 80 88 60 02 btst 2, %g1
2003bec: 02 80 00 03 be 2003bf8 <open+0x2c>
2003bf0: b7 2e e0 02 sll %i3, 2, %i3
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
2003bf4: b6 16 e0 02 or %i3, 2, %i3
va_start(ap, flags);
mode = va_arg( ap, int );
2003bf8: 82 07 a0 50 add %fp, 0x50, %g1
2003bfc: f8 07 a0 4c ld [ %fp + 0x4c ], %i4
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
2003c00: 40 00 20 f8 call 200bfe0 <rtems_libio_allocate>
2003c04: c2 27 bf fc st %g1, [ %fp + -4 ]
if ( iop == 0 ) {
2003c08: ba 92 20 00 orcc %o0, 0, %i5
2003c0c: 22 80 00 2f be,a 2003cc8 <open+0xfc>
2003c10: b6 10 20 17 mov 0x17, %i3
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2003c14: 40 00 35 46 call 201112c <strlen>
2003c18: 90 10 00 18 mov %i0, %o0
2003c1c: 94 10 00 1b mov %i3, %o2
2003c20: 92 10 00 08 mov %o0, %o1
2003c24: 96 07 bf e8 add %fp, -24, %o3
2003c28: 90 10 00 18 mov %i0, %o0
2003c2c: 7f ff fc 7c call 2002e1c <rtems_filesystem_evaluate_path>
2003c30: 98 10 20 01 mov 1, %o4
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
2003c34: 80 a2 3f ff cmp %o0, -1
2003c38: 02 80 00 40 be 2003d38 <open+0x16c>
2003c3c: 82 0e 6a 00 and %i1, 0xa00, %g1
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
2003c40: 80 a0 6a 00 cmp %g1, 0xa00
2003c44: 02 80 00 26 be 2003cdc <open+0x110>
2003c48: b4 07 bf e8 add %fp, -24, %i2
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
2003c4c: f6 07 60 18 ld [ %i5 + 0x18 ], %i3
2003c50: 40 00 20 c0 call 200bf50 <rtems_libio_fcntl_flags>
2003c54: 90 10 00 19 mov %i1, %o0
iop->pathinfo = loc;
2003c58: c4 07 bf f0 ld [ %fp + -16 ], %g2
2003c5c: c6 07 bf e8 ld [ %fp + -24 ], %g3
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
2003c60: c2 00 80 00 ld [ %g2 ], %g1
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
2003c64: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
2003c68: c4 07 bf f4 ld [ %fp + -12 ], %g2
2003c6c: c6 27 60 1c st %g3, [ %i5 + 0x1c ]
2003c70: c4 27 60 28 st %g2, [ %i5 + 0x28 ]
2003c74: c6 07 bf ec ld [ %fp + -20 ], %g3
2003c78: c4 07 bf f8 ld [ %fp + -8 ], %g2
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
2003c7c: b6 12 00 1b or %o0, %i3, %i3
iop->pathinfo = loc;
2003c80: c6 27 60 20 st %g3, [ %i5 + 0x20 ]
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
2003c84: f6 27 60 18 st %i3, [ %i5 + 0x18 ]
iop->pathinfo = loc;
2003c88: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
2003c8c: 90 10 00 1d mov %i5, %o0
2003c90: 92 10 00 18 mov %i0, %o1
2003c94: 94 10 00 19 mov %i1, %o2
2003c98: 9f c0 40 00 call %g1
2003c9c: 96 10 00 1c mov %i4, %o3
if ( rc ) {
2003ca0: 80 a2 20 00 cmp %o0, 0
2003ca4: 12 80 00 1a bne 2003d0c <open+0x140>
2003ca8: 80 8e 64 00 btst 0x400, %i1
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
2003cac: 12 80 00 2d bne 2003d60 <open+0x194>
2003cb0: 39 00 80 76 sethi %hi(0x201d800), %i4
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2003cb4: f0 07 21 34 ld [ %i4 + 0x134 ], %i0 ! 201d934 <rtems_libio_iops>
2003cb8: ba 27 40 18 sub %i5, %i0, %i5
2003cbc: b1 3f 60 06 sra %i5, 6, %i0
}
2003cc0: 81 c7 e0 08 ret
2003cc4: 81 e8 00 00 restore
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
2003cc8: 40 00 2f 81 call 200facc <__errno>
2003ccc: b0 10 3f ff mov -1, %i0
2003cd0: f6 22 00 00 st %i3, [ %o0 ]
2003cd4: 81 c7 e0 08 ret
2003cd8: 81 e8 00 00 restore
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
2003cdc: b6 10 20 11 mov 0x11, %i3
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
2003ce0: 80 a7 60 00 cmp %i5, 0
2003ce4: 02 80 00 05 be 2003cf8 <open+0x12c>
2003ce8: 80 a6 a0 00 cmp %i2, 0
rtems_libio_free( iop );
2003cec: 40 00 20 e5 call 200c080 <rtems_libio_free>
2003cf0: 90 10 00 1d mov %i5, %o0
if ( loc_to_free )
2003cf4: 80 a6 a0 00 cmp %i2, 0
2003cf8: 02 bf ff f4 be 2003cc8 <open+0xfc>
2003cfc: 01 00 00 00 nop
rtems_filesystem_freenode( loc_to_free );
2003d00: 7f ff fc 81 call 2002f04 <rtems_filesystem_freenode>
2003d04: 90 10 00 1a mov %i2, %o0
2003d08: 30 bf ff f0 b,a 2003cc8 <open+0xfc>
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
2003d0c: 40 00 2f 70 call 200facc <__errno>
2003d10: b4 07 bf e8 add %fp, -24, %i2
2003d14: f6 02 00 00 ld [ %o0 ], %i3
2003d18: 39 00 80 76 sethi %hi(0x201d800), %i4
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
2003d1c: 80 a6 e0 00 cmp %i3, 0
2003d20: 12 bf ff f0 bne 2003ce0 <open+0x114> <== ALWAYS TAKEN
2003d24: f0 07 21 34 ld [ %i4 + 0x134 ], %i0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2003d28: ba 27 40 18 sub %i5, %i0, %i5 <== NOT EXECUTED
2003d2c: b1 3f 60 06 sra %i5, 6, %i0 <== NOT EXECUTED
}
2003d30: 81 c7 e0 08 ret <== NOT EXECUTED
2003d34: 81 e8 00 00 restore <== NOT EXECUTED
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
2003d38: 40 00 2f 65 call 200facc <__errno>
2003d3c: 01 00 00 00 nop
2003d40: c2 02 00 00 ld [ %o0 ], %g1
2003d44: 80 a0 60 02 cmp %g1, 2
2003d48: 02 80 00 1d be 2003dbc <open+0x1f0>
2003d4c: b4 10 20 00 clr %i2
rc = errno;
2003d50: 40 00 2f 5f call 200facc <__errno>
2003d54: 01 00 00 00 nop
goto done;
2003d58: 10 bf ff f0 b 2003d18 <open+0x14c>
2003d5c: f6 02 00 00 ld [ %o0 ], %i3
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
2003d60: d0 07 21 34 ld [ %i4 + 0x134 ], %o0
2003d64: 92 10 20 00 clr %o1
2003d68: 94 10 20 00 clr %o2
2003d6c: 90 27 40 08 sub %i5, %o0, %o0
2003d70: 40 00 20 38 call 200be50 <ftruncate>
2003d74: 91 3a 20 06 sra %o0, 6, %o0
if ( rc ) {
2003d78: b6 92 20 00 orcc %o0, 0, %i3
2003d7c: 02 bf ff cf be 2003cb8 <open+0xec>
2003d80: f0 07 21 34 ld [ %i4 + 0x134 ], %i0
if(errno) rc = errno;
2003d84: 40 00 2f 52 call 200facc <__errno>
2003d88: 01 00 00 00 nop
2003d8c: c2 02 00 00 ld [ %o0 ], %g1
2003d90: 80 a0 60 00 cmp %g1, 0
2003d94: 12 80 00 1a bne 2003dfc <open+0x230> <== ALWAYS TAKEN
2003d98: 01 00 00 00 nop
close( iop - rtems_libio_iops );
2003d9c: d0 07 21 34 ld [ %i4 + 0x134 ], %o0
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
2003da0: b4 10 20 00 clr %i2
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
2003da4: 90 27 40 08 sub %i5, %o0, %o0
/* those are released by close(): */
iop = 0;
2003da8: ba 10 20 00 clr %i5
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
2003dac: 40 00 20 07 call 200bdc8 <close>
2003db0: 91 3a 20 06 sra %o0, 6, %o0
2003db4: 10 bf ff da b 2003d1c <open+0x150>
2003db8: 39 00 80 76 sethi %hi(0x201d800), %i4
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2003dbc: 80 8e 62 00 btst 0x200, %i1
2003dc0: 02 bf ff c8 be 2003ce0 <open+0x114>
2003dc4: b6 10 20 02 mov 2, %i3
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
2003dc8: 90 10 00 18 mov %i0, %o0
2003dcc: 13 00 00 20 sethi %hi(0x8000), %o1
2003dd0: 94 10 20 00 clr %o2
2003dd4: 92 17 00 09 or %i4, %o1, %o1
2003dd8: 7f ff fd 84 call 20033e8 <mknod>
2003ddc: 96 10 20 00 clr %o3
if ( rc ) {
2003de0: 80 a2 20 00 cmp %o0, 0
2003de4: 02 80 00 0a be 2003e0c <open+0x240> <== ALWAYS TAKEN
2003de8: 01 00 00 00 nop
rc = errno;
2003dec: 40 00 2f 38 call 200facc <__errno> <== NOT EXECUTED
2003df0: 39 00 80 76 sethi %hi(0x201d800), %i4 <== NOT EXECUTED
goto done;
2003df4: 10 bf ff ca b 2003d1c <open+0x150> <== NOT EXECUTED
2003df8: f6 02 00 00 ld [ %o0 ], %i3 <== NOT EXECUTED
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
2003dfc: 40 00 2f 34 call 200facc <__errno>
2003e00: 01 00 00 00 nop
2003e04: 10 bf ff e6 b 2003d9c <open+0x1d0>
2003e08: f6 02 00 00 ld [ %o0 ], %i3
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
2003e0c: 40 00 34 c8 call 201112c <strlen>
2003e10: 90 10 00 18 mov %i0, %o0
2003e14: 94 10 20 00 clr %o2
2003e18: 92 10 00 08 mov %o0, %o1
2003e1c: 96 07 bf e8 add %fp, -24, %o3
2003e20: 90 10 00 18 mov %i0, %o0
2003e24: 98 10 20 01 mov 1, %o4
2003e28: 7f ff fb fd call 2002e1c <rtems_filesystem_evaluate_path>
2003e2c: b6 10 20 0d mov 0xd, %i3
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
2003e30: 80 a2 20 00 cmp %o0, 0
2003e34: 12 bf ff ac bne 2003ce4 <open+0x118> <== NEVER TAKEN
2003e38: 80 a7 60 00 cmp %i5, 0
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
2003e3c: 10 bf ff 85 b 2003c50 <open+0x84>
2003e40: f6 07 60 18 ld [ %i5 + 0x18 ], %i3
02004b90 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
2004b90: 9d e3 bf a0 save %sp, -96, %sp
int i;
if (tty->termios.c_oflag & OPOST) {
2004b94: c2 06 60 34 ld [ %i1 + 0x34 ], %g1
2004b98: 80 88 60 01 btst 1, %g1
2004b9c: 02 80 00 21 be 2004c20 <oproc+0x90> <== NEVER TAKEN
2004ba0: f0 2f a0 44 stb %i0, [ %fp + 0x44 ]
switch (c) {
2004ba4: 80 a6 20 09 cmp %i0, 9
2004ba8: 22 80 00 3d be,a 2004c9c <oproc+0x10c>
2004bac: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
2004bb0: 08 80 00 22 bleu 2004c38 <oproc+0xa8> <== NEVER TAKEN
2004bb4: 80 a6 20 08 cmp %i0, 8
2004bb8: 80 a6 20 0a cmp %i0, 0xa
2004bbc: 02 80 00 2b be 2004c68 <oproc+0xd8>
2004bc0: 80 a6 20 0d cmp %i0, 0xd
2004bc4: 02 80 00 44 be 2004cd4 <oproc+0x144> <== NEVER TAKEN
2004bc8: 80 88 60 10 btst 0x10, %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2004bcc: 80 88 60 02 btst 2, %g1
c = toupper(c);
2004bd0: 03 00 80 74 sethi %hi(0x201d000), %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2004bd4: 02 80 00 0b be 2004c00 <oproc+0x70> <== ALWAYS TAKEN
2004bd8: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201d15c <__ctype_ptr__>
c = toupper(c);
2004bdc: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED
2004be0: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
2004be4: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED
2004be8: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED
2004bec: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED
2004bf0: 22 80 00 02 be,a 2004bf8 <oproc+0x68> <== NOT EXECUTED
2004bf4: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED
2004bf8: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
2004bfc: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED
if (!iscntrl(c))
2004c00: b0 00 40 18 add %g1, %i0, %i0
2004c04: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2004c08: 80 88 60 20 btst 0x20, %g1
2004c0c: 12 80 00 06 bne 2004c24 <oproc+0x94> <== NEVER TAKEN
2004c10: 90 07 a0 44 add %fp, 0x44, %o0
tty->column++;
2004c14: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2004c18: 82 00 60 01 inc %g1
2004c1c: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
break;
}
}
rtems_termios_puts (&c, 1, tty);
2004c20: 90 07 a0 44 add %fp, 0x44, %o0
2004c24: 92 10 20 01 mov 1, %o1
2004c28: 7f ff ff 8a call 2004a50 <rtems_termios_puts>
2004c2c: 94 10 00 19 mov %i1, %o2
2004c30: 81 c7 e0 08 ret
2004c34: 81 e8 00 00 restore
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
2004c38: 12 bf ff e6 bne 2004bd0 <oproc+0x40> <== NOT EXECUTED
2004c3c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
2004c40: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2004c44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004c48: 04 bf ff f6 ble 2004c20 <oproc+0x90> <== NOT EXECUTED
2004c4c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2004c50: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
tty->column += i;
break;
case '\b':
if (tty->column > 0)
tty->column--;
2004c54: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2004c58: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2004c5c: 7f ff ff 7d call 2004a50 <rtems_termios_puts> <== NOT EXECUTED
2004c60: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2004c64: 30 80 00 30 b,a 2004d24 <oproc+0x194> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
2004c68: 80 88 60 20 btst 0x20, %g1
2004c6c: 32 80 00 02 bne,a 2004c74 <oproc+0xe4> <== NEVER TAKEN
2004c70: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
tty->column = 0;
if (tty->termios.c_oflag & ONLCR) {
2004c74: 80 88 60 04 btst 4, %g1
2004c78: 22 bf ff eb be,a 2004c24 <oproc+0x94> <== NEVER TAKEN
2004c7c: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
rtems_termios_puts ("\r", 1, tty);
2004c80: 92 10 20 01 mov 1, %o1
2004c84: 11 00 80 6e sethi %hi(0x201b800), %o0
2004c88: 94 10 00 19 mov %i1, %o2
2004c8c: 7f ff ff 71 call 2004a50 <rtems_termios_puts>
2004c90: 90 12 21 a8 or %o0, 0x1a8, %o0
tty->column = 0;
2004c94: 10 bf ff e3 b 2004c20 <oproc+0x90>
2004c98: c0 26 60 28 clr [ %i1 + 0x28 ]
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2004c9c: 05 00 00 06 sethi %hi(0x1800), %g2
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
2004ca0: 88 08 e0 07 and %g3, 7, %g4
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2004ca4: 82 08 40 02 and %g1, %g2, %g1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
2004ca8: 92 10 20 08 mov 8, %o1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2004cac: 80 a0 40 02 cmp %g1, %g2
2004cb0: 02 80 00 17 be 2004d0c <oproc+0x17c> <== ALWAYS TAKEN
2004cb4: 92 22 40 04 sub %o1, %g4, %o1
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
2004cb8: 92 00 c0 09 add %g3, %o1, %o1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2004cbc: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
2004cc0: d2 26 60 28 st %o1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2004cc4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2004cc8: 7f ff ff 62 call 2004a50 <rtems_termios_puts> <== NOT EXECUTED
2004ccc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2004cd0: 30 80 00 15 b,a 2004d24 <oproc+0x194> <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2004cd4: 02 80 00 06 be 2004cec <oproc+0x15c> <== NOT EXECUTED
2004cd8: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2004cdc: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED
2004ce0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004ce4: 02 bf ff d3 be 2004c30 <oproc+0xa0> <== NOT EXECUTED
2004ce8: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
2004cec: 22 bf ff cd be,a 2004c20 <oproc+0x90> <== NOT EXECUTED
2004cf0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
c = '\n';
2004cf4: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2004cf8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2004cfc: 02 bf ff c9 be 2004c20 <oproc+0x90> <== NOT EXECUTED
2004d00: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
break;
2004d04: 10 bf ff c7 b 2004c20 <oproc+0x90> <== NOT EXECUTED
2004d08: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
2004d0c: 86 00 c0 09 add %g3, %o1, %g3
rtems_termios_puts ( " ", i, tty);
2004d10: 11 00 80 6e sethi %hi(0x201b800), %o0
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
2004d14: c6 26 60 28 st %g3, [ %i1 + 0x28 ]
rtems_termios_puts ( " ", i, tty);
2004d18: 90 12 21 b0 or %o0, 0x1b0, %o0
2004d1c: 7f ff ff 4d call 2004a50 <rtems_termios_puts>
2004d20: 94 10 00 19 mov %i1, %o2
return;
2004d24: 81 c7 e0 08 ret
2004d28: 81 e8 00 00 restore
0200cc68 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
200cc68: 9d e3 bf 90 save %sp, -112, %sp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
200cc6c: 92 10 21 ff mov 0x1ff, %o1
200cc70: 11 00 80 76 sethi %hi(0x201d800), %o0
return -1;
200cc74: ba 10 3f ff mov -1, %i5
)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
200cc78: 40 00 06 18 call 200e4d8 <rtems_mkdir>
200cc7c: 90 12 20 70 or %o0, 0x70, %o0
200cc80: 80 a2 20 00 cmp %o0, 0
200cc84: 12 80 00 33 bne 200cd50 <pipe_create+0xe8> <== NEVER TAKEN
200cc88: 03 00 80 7b sethi %hi(0x201ec00), %g1
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200cc8c: d4 10 60 4c lduh [ %g1 + 0x4c ], %o2 ! 201ec4c <rtems_pipe_no>
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200cc90: 05 0b dd 1b sethi %hi(0x2f746c00), %g2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200cc94: 88 02 a0 01 add %o2, 1, %g4
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200cc98: 84 10 a1 70 or %g2, 0x170, %g2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200cc9c: c8 30 60 4c sth %g4, [ %g1 + 0x4c ]
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200cca0: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3
200cca4: 03 00 00 19 sethi %hi(0x6400), %g1
200cca8: 86 10 e2 69 or %g3, 0x269, %g3
200ccac: 82 10 62 6f or %g1, 0x26f, %g1
200ccb0: c4 3f bf f0 std %g2, [ %fp + -16 ]
200ccb4: c2 37 bf f8 sth %g1, [ %fp + -8 ]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200ccb8: 95 2a a0 10 sll %o2, 0x10, %o2
200ccbc: 90 07 bf fa add %fp, -6, %o0
200ccc0: 95 32 a0 10 srl %o2, 0x10, %o2
200ccc4: 13 00 80 76 sethi %hi(0x201d800), %o1
200ccc8: 40 00 14 71 call 2011e8c <sprintf>
200cccc: 92 12 60 78 or %o1, 0x78, %o1 ! 201d878 <_CPU_Trap_slot_template+0x1c>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
200ccd0: 90 07 bf f0 add %fp, -16, %o0
200ccd4: 40 00 05 47 call 200e1f0 <mkfifo>
200ccd8: 92 10 21 80 mov 0x180, %o1
200ccdc: 80 a2 20 00 cmp %o0, 0
200cce0: 12 80 00 31 bne 200cda4 <pipe_create+0x13c>
200cce4: 90 07 bf f0 add %fp, -16, %o0
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
200cce8: 7f ff e0 af call 2004fa4 <open>
200ccec: 13 00 00 10 sethi %hi(0x4000), %o1
if (filsdes[0] < 0) {
200ccf0: 80 a2 20 00 cmp %o0, 0
200ccf4: 06 80 00 1f bl 200cd70 <pipe_create+0x108>
200ccf8: d0 26 00 00 st %o0, [ %i0 ]
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
200ccfc: 03 00 80 78 sethi %hi(0x201e000), %g1
200cd00: c4 00 63 58 ld [ %g1 + 0x358 ], %g2 ! 201e358 <rtems_libio_number_iops>
200cd04: 80 a2 00 02 cmp %o0, %g2
200cd08: 0a 80 00 15 bcs 200cd5c <pipe_create+0xf4> <== ALWAYS TAKEN
200cd0c: 82 10 20 00 clr %g1
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200cd10: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
filsdes[1] = open(fifopath, O_WRONLY);
200cd14: 90 07 bf f0 add %fp, -16, %o0
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200cd18: 84 08 bf fe and %g2, -2, %g2
filsdes[1] = open(fifopath, O_WRONLY);
200cd1c: 92 10 20 01 mov 1, %o1
200cd20: 7f ff e0 a1 call 2004fa4 <open>
200cd24: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
200cd28: d0 26 20 04 st %o0, [ %i0 + 4 ]
if (filsdes[1] < 0) {
200cd2c: 80 a2 20 00 cmp %o0, 0
200cd30: 06 80 00 17 bl 200cd8c <pipe_create+0x124>
200cd34: b8 10 20 00 clr %i4
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
200cd38: 7f ff e9 37 call 2007214 <unlink>
200cd3c: 90 07 bf f0 add %fp, -16, %o0
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
200cd40: ba 10 20 00 clr %i5
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
200cd44: 80 a7 20 00 cmp %i4, 0
200cd48: 12 80 00 1a bne 200cdb0 <pipe_create+0x148>
200cd4c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(err);
return 0;
}
200cd50: b0 10 00 1d mov %i5, %i0
200cd54: 81 c7 e0 08 ret
200cd58: 81 e8 00 00 restore
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
200cd5c: 03 00 80 7b sethi %hi(0x201ec00), %g1
200cd60: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 201edc8 <rtems_libio_iops>
200cd64: 91 2a 20 06 sll %o0, 6, %o0
200cd68: 10 bf ff ea b 200cd10 <pipe_create+0xa8>
200cd6c: 82 00 40 08 add %g1, %o0, %g1
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
200cd70: 40 00 11 6c call 2011320 <__errno>
200cd74: ba 10 20 00 clr %i5
200cd78: f8 02 00 00 ld [ %o0 ], %i4
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
200cd7c: 7f ff e9 26 call 2007214 <unlink>
200cd80: 90 07 bf f0 add %fp, -16, %o0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
200cd84: 10 bf ff f1 b 200cd48 <pipe_create+0xe0>
200cd88: 80 a7 20 00 cmp %i4, 0
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
200cd8c: 40 00 11 65 call 2011320 <__errno>
200cd90: 01 00 00 00 nop
200cd94: f8 02 00 00 ld [ %o0 ], %i4
close(filsdes[0]);
200cd98: 7f ff dc 42 call 2003ea0 <close>
200cd9c: d0 06 00 00 ld [ %i0 ], %o0
200cda0: 30 bf ff e6 b,a 200cd38 <pipe_create+0xd0>
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
200cda4: 40 00 11 5f call 2011320 <__errno>
200cda8: b0 10 00 1d mov %i5, %i0
200cdac: 30 bf ff ea b,a 200cd54 <pipe_create+0xec>
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
200cdb0: 40 00 11 5c call 2011320 <__errno>
200cdb4: ba 10 3f ff mov -1, %i5
200cdb8: 10 bf ff e6 b 200cd50 <pipe_create+0xe8>
200cdbc: f8 22 00 00 st %i4, [ %o0 ]
0200e29c <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
200e29c: 9d e3 bf a0 save %sp, -96, %sp
if (cmd == FIONREAD) {
200e2a0: 03 10 01 19 sethi %hi(0x40046400), %g1
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
200e2a4: ba 10 00 18 mov %i0, %i5
if (cmd == FIONREAD) {
200e2a8: 82 10 62 7f or %g1, 0x27f, %g1
200e2ac: 80 a6 40 01 cmp %i1, %g1
200e2b0: 12 80 00 12 bne 200e2f8 <pipe_ioctl+0x5c>
200e2b4: b0 10 3f ea mov -22, %i0
if (buffer == NULL)
200e2b8: 80 a6 a0 00 cmp %i2, 0
200e2bc: 02 80 00 0f be 200e2f8 <pipe_ioctl+0x5c>
200e2c0: b0 10 3f f2 mov -14, %i0
return -EFAULT;
if (! PIPE_LOCK(pipe))
200e2c4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200e2c8: 92 10 20 00 clr %o1
200e2cc: 94 10 20 00 clr %o2
200e2d0: 7f ff e9 93 call 200891c <rtems_semaphore_obtain>
200e2d4: b0 10 3f fc mov -4, %i0
200e2d8: 80 a2 20 00 cmp %o0, 0
200e2dc: 12 80 00 07 bne 200e2f8 <pipe_ioctl+0x5c> <== NEVER TAKEN
200e2e0: 01 00 00 00 nop
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
200e2e4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
PIPE_UNLOCK(pipe);
200e2e8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
return 0;
200e2ec: b0 10 20 00 clr %i0
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
200e2f0: 7f ff e9 d5 call 2008a44 <rtems_semaphore_release>
200e2f4: c2 26 80 00 st %g1, [ %i2 ]
return 0;
}
return -EINVAL;
}
200e2f8: 81 c7 e0 08 ret
200e2fc: 81 e8 00 00 restore
0200dedc <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200dedc: 9d e3 bf 98 save %sp, -104, %sp
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200dee0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200dee4: ba 10 00 18 mov %i0, %i5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200dee8: 92 10 20 00 clr %o1
200deec: 94 10 20 00 clr %o2
200def0: 7f ff ea 8b call 200891c <rtems_semaphore_obtain>
200def4: b0 10 3f fc mov -4, %i0
200def8: 80 a2 20 00 cmp %o0, 0
200defc: 12 80 00 2c bne 200dfac <pipe_read+0xd0> <== NEVER TAKEN
200df00: a0 10 20 00 clr %l0
return -EINTR;
while (read < count) {
200df04: 80 a6 a0 00 cmp %i2, 0
200df08: 02 80 00 52 be 200e050 <pipe_read+0x174> <== NEVER TAKEN
200df0c: b0 10 20 00 clr %i0
while (PIPE_EMPTY(pipe)) {
200df10: f8 07 60 0c ld [ %i5 + 0xc ], %i4
200df14: 80 a7 20 00 cmp %i4, 0
200df18: 12 80 00 29 bne 200dfbc <pipe_read+0xe0>
200df1c: 82 26 80 10 sub %i2, %l0, %g1
/* Not an error */
if (pipe->Writers == 0)
200df20: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200df24: 80 a0 60 00 cmp %g1, 0
200df28: 22 80 00 1c be,a 200df98 <pipe_read+0xbc>
200df2c: b8 10 20 00 clr %i4
goto out_locked;
if (LIBIO_NODELAY(iop)) {
200df30: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
200df34: 80 88 60 01 btst 1, %g1
200df38: 32 80 00 18 bne,a 200df98 <pipe_read+0xbc>
200df3c: b8 10 3f f5 mov -11, %i4
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200df40: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
PIPE_UNLOCK(pipe);
200df44: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200df48: 82 00 60 01 inc %g1
PIPE_UNLOCK(pipe);
200df4c: 7f ff ea be call 2008a44 <rtems_semaphore_release>
200df50: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
if (! PIPE_READWAIT(pipe))
200df54: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200df58: 40 00 06 0e call 200f790 <rtems_barrier_wait>
200df5c: 92 10 20 00 clr %o1
200df60: 80 a0 00 08 cmp %g0, %o0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200df64: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
200df68: b8 60 20 00 subx %g0, 0, %i4
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200df6c: 92 10 20 00 clr %o1
200df70: 94 10 20 00 clr %o2
200df74: 7f ff ea 6a call 200891c <rtems_semaphore_obtain>
200df78: b8 0f 3f fc and %i4, -4, %i4
200df7c: 80 a2 20 00 cmp %o0, 0
200df80: 12 80 00 36 bne 200e058 <pipe_read+0x17c> <== NEVER TAKEN
200df84: 80 a7 20 00 cmp %i4, 0
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
200df88: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200df8c: 82 00 7f ff add %g1, -1, %g1
if (ret != 0)
200df90: 02 bf ff e0 be 200df10 <pipe_read+0x34> <== ALWAYS TAKEN
200df94: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
200df98: 7f ff ea ab call 2008a44 <rtems_semaphore_release>
200df9c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
out_nolock:
if (read > 0)
200dfa0: 80 a6 20 00 cmp %i0, 0
200dfa4: 04 80 00 04 ble 200dfb4 <pipe_read+0xd8>
200dfa8: 01 00 00 00 nop
return read;
return ret;
}
200dfac: 81 c7 e0 08 ret
200dfb0: 81 e8 00 00 restore
200dfb4: 81 c7 e0 08 ret
200dfb8: 91 e8 00 1c restore %g0, %i4, %o0
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
200dfbc: 80 a7 00 01 cmp %i4, %g1
200dfc0: 38 80 00 02 bgu,a 200dfc8 <pipe_read+0xec>
200dfc4: b8 10 00 01 mov %g1, %i4
chunk1 = pipe->Size - pipe->Start;
200dfc8: c2 07 60 08 ld [ %i5 + 8 ], %g1
200dfcc: e2 07 60 04 ld [ %i5 + 4 ], %l1
200dfd0: a2 24 40 01 sub %l1, %g1, %l1
if (chunk > chunk1) {
200dfd4: 80 a7 00 11 cmp %i4, %l1
200dfd8: 04 80 00 22 ble 200e060 <pipe_read+0x184>
200dfdc: d2 07 40 00 ld [ %i5 ], %o1
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
200dfe0: 94 10 00 11 mov %l1, %o2
200dfe4: 92 02 40 01 add %o1, %g1, %o1
200dfe8: 40 00 12 b6 call 2012ac0 <memcpy>
200dfec: 90 06 40 10 add %i1, %l0, %o0
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
200dff0: d2 07 40 00 ld [ %i5 ], %o1
200dff4: 90 04 00 11 add %l0, %l1, %o0
200dff8: 94 27 00 11 sub %i4, %l1, %o2
200dffc: 40 00 12 b1 call 2012ac0 <memcpy>
200e000: 90 06 40 08 add %i1, %o0, %o0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
200e004: d0 07 60 08 ld [ %i5 + 8 ], %o0
pipe->Start %= pipe->Size;
200e008: d2 07 60 04 ld [ %i5 + 4 ], %o1
200e00c: 40 00 40 4d call 201e140 <.urem>
200e010: 90 07 00 08 add %i4, %o0, %o0
pipe->Length -= chunk;
200e014: c2 07 60 0c ld [ %i5 + 0xc ], %g1
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
200e018: d0 27 60 08 st %o0, [ %i5 + 8 ]
pipe->Length -= chunk;
200e01c: 82 20 40 1c sub %g1, %i4, %g1
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
200e020: 80 a0 60 00 cmp %g1, 0
200e024: 12 80 00 03 bne 200e030 <pipe_read+0x154>
200e028: c2 27 60 0c st %g1, [ %i5 + 0xc ]
pipe->Start = 0;
200e02c: c0 27 60 08 clr [ %i5 + 8 ]
if (pipe->waitingWriters > 0)
200e030: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200e034: 80 a0 60 00 cmp %g1, 0
200e038: 32 80 00 10 bne,a 200e078 <pipe_read+0x19c>
200e03c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
200e040: b0 06 00 1c add %i0, %i4, %i0
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
200e044: 80 a6 00 1a cmp %i0, %i2
200e048: 0a bf ff b2 bcs 200df10 <pipe_read+0x34> <== NEVER TAKEN
200e04c: a0 10 00 18 mov %i0, %l0
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
200e050: 10 bf ff d2 b 200df98 <pipe_read+0xbc>
200e054: b8 10 20 00 clr %i4
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
200e058: 10 bf ff d2 b 200dfa0 <pipe_read+0xc4> <== NOT EXECUTED
200e05c: b8 10 3f fc mov -4, %i4 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
200e060: 90 06 40 10 add %i1, %l0, %o0
200e064: 92 02 40 01 add %o1, %g1, %o1
200e068: 40 00 12 96 call 2012ac0 <memcpy>
200e06c: 94 10 00 1c mov %i4, %o2
pipe->Start += chunk;
200e070: 10 bf ff e6 b 200e008 <pipe_read+0x12c>
200e074: d0 07 60 08 ld [ %i5 + 8 ], %o0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
200e078: 40 00 05 af call 200f734 <rtems_barrier_release>
200e07c: 92 07 bf fc add %fp, -4, %o1
read += chunk;
200e080: 10 bf ff f1 b 200e044 <pipe_read+0x168>
200e084: b0 06 00 1c add %i0, %i4, %i0
0200d900 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200d900: 9d e3 bf 98 save %sp, -104, %sp
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
200d904: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
200d908: fa 06 00 00 ld [ %i0 ], %i5
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
200d90c: 80 88 60 02 btst 2, %g1
200d910: 02 80 00 05 be 200d924 <pipe_release+0x24>
200d914: b8 08 60 06 and %g1, 6, %i4
pipe->Readers --;
200d918: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200d91c: 82 00 7f ff add %g1, -1, %g1
200d920: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
if (mode & LIBIO_FLAGS_WRITE)
200d924: 80 8f 20 04 btst 4, %i4
200d928: 02 80 00 05 be 200d93c <pipe_release+0x3c>
200d92c: 01 00 00 00 nop
pipe->Writers --;
200d930: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200d934: 82 00 7f ff add %g1, -1, %g1
200d938: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
PIPE_UNLOCK(pipe);
200d93c: 7f ff ec 42 call 2008a44 <rtems_semaphore_release>
200d940: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (pipe->Readers == 0 && pipe->Writers == 0) {
200d944: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200d948: 80 a0 60 00 cmp %g1, 0
200d94c: 12 80 00 0c bne 200d97c <pipe_release+0x7c>
200d950: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200d954: 80 a0 60 00 cmp %g1, 0
200d958: 02 80 00 1d be 200d9cc <pipe_release+0xcc>
200d95c: 80 a7 20 04 cmp %i4, 4
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
200d960: 32 80 00 14 bne,a 200d9b0 <pipe_release+0xb0> <== ALWAYS TAKEN
200d964: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200d968: 03 00 80 88 sethi %hi(0x2022000), %g1 <== NOT EXECUTED
200d96c: 7f ff ec 36 call 2008a44 <rtems_semaphore_release> <== NOT EXECUTED
200d970: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 202238c <pipe_semaphore><== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200d974: 81 c7 e0 08 ret <== NOT EXECUTED
200d978: 81 e8 00 00 restore <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
200d97c: 80 a0 60 00 cmp %g1, 0
200d980: 12 bf ff fa bne 200d968 <pipe_release+0x68> <== NEVER TAKEN
200d984: 80 a7 20 02 cmp %i4, 2
200d988: 02 bf ff f9 be 200d96c <pipe_release+0x6c> <== NEVER TAKEN
200d98c: 03 00 80 88 sethi %hi(0x2022000), %g1
PIPE_WAKEUPREADERS(pipe);
200d990: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200d994: 40 00 07 68 call 200f734 <rtems_barrier_release>
200d998: 92 07 bf fc add %fp, -4, %o1
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200d99c: 03 00 80 88 sethi %hi(0x2022000), %g1
200d9a0: 7f ff ec 29 call 2008a44 <rtems_semaphore_release>
200d9a4: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 202238c <pipe_semaphore>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200d9a8: 81 c7 e0 08 ret
200d9ac: 81 e8 00 00 restore
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
200d9b0: 40 00 07 61 call 200f734 <rtems_barrier_release>
200d9b4: 92 07 bf fc add %fp, -4, %o1
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200d9b8: 03 00 80 88 sethi %hi(0x2022000), %g1
200d9bc: 7f ff ec 22 call 2008a44 <rtems_semaphore_release>
200d9c0: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 202238c <pipe_semaphore>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200d9c4: 81 c7 e0 08 ret
200d9c8: 81 e8 00 00 restore
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200d9cc: 40 00 07 31 call 200f690 <rtems_barrier_delete>
200d9d0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
rtems_barrier_delete(pipe->writeBarrier);
200d9d4: 40 00 07 2f call 200f690 <rtems_barrier_delete>
200d9d8: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
rtems_semaphore_delete(pipe->Semaphore);
200d9dc: 7f ff eb 99 call 2008840 <rtems_semaphore_delete>
200d9e0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
free(pipe->Buffer);
200d9e4: 7f ff dc 08 call 2004a04 <free>
200d9e8: d0 07 40 00 ld [ %i5 ], %o0
free(pipe);
200d9ec: 7f ff dc 06 call 2004a04 <free>
200d9f0: 90 10 00 1d mov %i5, %o0
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
200d9f4: 03 00 80 88 sethi %hi(0x2022000), %g1
200d9f8: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 202238c <pipe_semaphore>
200d9fc: 7f ff ec 12 call 2008a44 <rtems_semaphore_release>
200da00: c0 26 00 00 clr [ %i0 ]
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200da04: 81 c7 e0 08 ret
200da08: 81 e8 00 00 restore
0200e088 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200e088: 9d e3 bf 98 save %sp, -104, %sp
200e08c: ba 10 00 18 mov %i0, %i5
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
200e090: 80 a6 a0 00 cmp %i2, 0
200e094: 12 80 00 04 bne 200e0a4 <pipe_write+0x1c> <== ALWAYS TAKEN
200e098: b0 10 20 00 clr %i0
#endif
if (written > 0)
return written;
return ret;
}
200e09c: 81 c7 e0 08 ret
200e0a0: 81 e8 00 00 restore
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
200e0a4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200e0a8: 92 10 20 00 clr %o1
200e0ac: 94 10 20 00 clr %o2
200e0b0: 7f ff ea 1b call 200891c <rtems_semaphore_obtain>
200e0b4: b0 10 3f fc mov -4, %i0
200e0b8: 80 a2 20 00 cmp %o0, 0
200e0bc: 12 bf ff f8 bne 200e09c <pipe_write+0x14> <== NEVER TAKEN
200e0c0: 01 00 00 00 nop
return -EINTR;
if (pipe->Readers == 0) {
200e0c4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200e0c8: 80 a0 60 00 cmp %g1, 0
200e0cc: 02 80 00 60 be 200e24c <pipe_write+0x1c4>
200e0d0: b8 10 3f e0 mov -32, %i4
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
200e0d4: e4 07 60 04 ld [ %i5 + 4 ], %l2
200e0d8: 80 a6 80 12 cmp %i2, %l2
200e0dc: 08 80 00 5a bleu 200e244 <pipe_write+0x1bc> <== ALWAYS TAKEN
200e0e0: a0 10 20 01 mov 1, %l0
200e0e4: a2 10 20 00 clr %l1
200e0e8: b0 10 20 00 clr %i0
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
200e0ec: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200e0f0: b8 24 80 01 sub %l2, %g1, %i4
200e0f4: 80 a7 00 10 cmp %i4, %l0
200e0f8: 1a 80 00 27 bcc 200e194 <pipe_write+0x10c>
200e0fc: 84 26 80 11 sub %i2, %l1, %g2
if (LIBIO_NODELAY(iop)) {
200e100: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
200e104: 80 88 60 01 btst 1, %g1
200e108: 32 80 00 45 bne,a 200e21c <pipe_write+0x194>
200e10c: b8 10 3f f5 mov -11, %i4
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
200e110: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
PIPE_UNLOCK(pipe);
200e114: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
200e118: 82 00 60 01 inc %g1
PIPE_UNLOCK(pipe);
200e11c: 7f ff ea 4a call 2008a44 <rtems_semaphore_release>
200e120: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
if (! PIPE_WRITEWAIT(pipe))
200e124: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200e128: 40 00 05 9a call 200f790 <rtems_barrier_wait>
200e12c: 92 10 20 00 clr %o1
200e130: 80 a0 00 08 cmp %g0, %o0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200e134: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
200e138: b8 60 20 00 subx %g0, 0, %i4
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200e13c: 92 10 20 00 clr %o1
200e140: 94 10 20 00 clr %o2
200e144: 7f ff e9 f6 call 200891c <rtems_semaphore_obtain>
200e148: b8 0f 3f fc and %i4, -4, %i4
200e14c: 80 a2 20 00 cmp %o0, 0
200e150: 12 80 00 47 bne 200e26c <pipe_write+0x1e4> <== NEVER TAKEN
200e154: 80 a7 20 00 cmp %i4, 0
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
200e158: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200e15c: 82 00 7f ff add %g1, -1, %g1
if (ret != 0)
200e160: 12 80 00 2f bne 200e21c <pipe_write+0x194> <== NEVER TAKEN
200e164: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
goto out_locked;
if (pipe->Readers == 0) {
200e168: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200e16c: 80 a0 60 00 cmp %g1, 0
200e170: 02 80 00 2b be 200e21c <pipe_write+0x194> <== NEVER TAKEN
200e174: b8 10 3f e0 mov -32, %i4
200e178: e4 07 60 04 ld [ %i5 + 4 ], %l2
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
200e17c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200e180: b8 24 80 01 sub %l2, %g1, %i4
200e184: 80 a7 00 10 cmp %i4, %l0
200e188: 2a bf ff df bcs,a 200e104 <pipe_write+0x7c> <== NEVER TAKEN
200e18c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
200e190: 84 26 80 11 sub %i2, %l1, %g2
200e194: 80 a7 00 02 cmp %i4, %g2
200e198: 38 80 00 02 bgu,a 200e1a0 <pipe_write+0x118>
200e19c: b8 10 00 02 mov %g2, %i4
chunk1 = pipe->Size - PIPE_WSTART(pipe);
200e1a0: d0 07 60 08 ld [ %i5 + 8 ], %o0
200e1a4: 92 10 00 12 mov %l2, %o1
200e1a8: 40 00 3f e6 call 201e140 <.urem>
200e1ac: 90 00 40 08 add %g1, %o0, %o0
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
200e1b0: c2 07 40 00 ld [ %i5 ], %g1
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
200e1b4: a0 24 80 08 sub %l2, %o0, %l0
if (chunk > chunk1) {
200e1b8: 80 a7 00 10 cmp %i4, %l0
200e1bc: 04 80 00 2e ble 200e274 <pipe_write+0x1ec>
200e1c0: 92 06 40 11 add %i1, %l1, %o1
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
200e1c4: 94 10 00 10 mov %l0, %o2
200e1c8: 40 00 12 3e call 2012ac0 <memcpy>
200e1cc: 90 00 40 08 add %g1, %o0, %o0
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
200e1d0: d0 07 40 00 ld [ %i5 ], %o0
200e1d4: 92 04 00 11 add %l0, %l1, %o1
200e1d8: 94 27 00 10 sub %i4, %l0, %o2
200e1dc: 40 00 12 39 call 2012ac0 <memcpy>
200e1e0: 92 06 40 09 add %i1, %o1, %o1
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
200e1e4: c4 07 60 0c ld [ %i5 + 0xc ], %g2
if (pipe->waitingReaders > 0)
200e1e8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
200e1ec: 84 00 80 1c add %g2, %i4, %g2
if (pipe->waitingReaders > 0)
200e1f0: 80 a0 60 00 cmp %g1, 0
200e1f4: 12 80 00 25 bne 200e288 <pipe_write+0x200>
200e1f8: c4 27 60 0c st %g2, [ %i5 + 0xc ]
PIPE_WAKEUPREADERS(pipe);
written += chunk;
200e1fc: b0 06 00 1c add %i0, %i4, %i0
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
200e200: 80 a6 80 18 cmp %i2, %i0
200e204: 08 80 00 05 bleu 200e218 <pipe_write+0x190> <== ALWAYS TAKEN
200e208: a2 10 00 18 mov %i0, %l1
200e20c: e4 07 60 04 ld [ %i5 + 4 ], %l2 <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
200e210: 10 bf ff b7 b 200e0ec <pipe_write+0x64> <== NOT EXECUTED
200e214: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
200e218: b8 10 20 00 clr %i4
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
200e21c: 7f ff ea 0a call 2008a44 <rtems_semaphore_release>
200e220: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
200e224: 80 a7 3f e0 cmp %i4, -32
200e228: 02 80 00 0b be 200e254 <pipe_write+0x1cc>
200e22c: 01 00 00 00 nop
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
200e230: 80 a6 20 00 cmp %i0, 0
200e234: 14 bf ff 9a bg 200e09c <pipe_write+0x14>
200e238: 01 00 00 00 nop
return written;
return ret;
}
200e23c: 81 c7 e0 08 ret
200e240: 91 e8 00 1c restore %g0, %i4, %o0
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
200e244: 10 bf ff a8 b 200e0e4 <pipe_write+0x5c>
200e248: a0 10 00 1a mov %i2, %l0
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
200e24c: 10 bf ff f4 b 200e21c <pipe_write+0x194>
200e250: b0 10 20 00 clr %i0
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
200e254: 40 00 02 23 call 200eae0 <getpid>
200e258: 01 00 00 00 nop
200e25c: 40 00 03 01 call 200ee60 <kill>
200e260: 92 10 20 0d mov 0xd, %o1 ! d <PROM_START+0xd>
#endif
if (written > 0)
200e264: 10 bf ff f4 b 200e234 <pipe_write+0x1ac>
200e268: 80 a6 20 00 cmp %i0, 0
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
200e26c: 10 bf ff f1 b 200e230 <pipe_write+0x1a8> <== NOT EXECUTED
200e270: b8 10 3f fc mov -4, %i4 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
200e274: 90 00 40 08 add %g1, %o0, %o0
200e278: 40 00 12 12 call 2012ac0 <memcpy>
200e27c: 94 10 00 1c mov %i4, %o2
pipe->Length += chunk;
200e280: 10 bf ff da b 200e1e8 <pipe_write+0x160>
200e284: c4 07 60 0c ld [ %i5 + 0xc ], %g2
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
200e288: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200e28c: 40 00 05 2a call 200f734 <rtems_barrier_release>
200e290: 92 07 bf fc add %fp, -4, %o1
written += chunk;
200e294: 10 bf ff db b 200e200 <pipe_write+0x178>
200e298: b0 06 00 1c add %i0, %i4, %i0
020074ac <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
20074ac: 05 00 80 91 sethi %hi(0x2024400), %g2
20074b0: 84 10 a1 48 or %g2, 0x148, %g2 ! 2024548 <rtems_malloc_statistics>
20074b4: c6 00 a0 08 ld [ %g2 + 8 ], %g3
20074b8: 86 00 e0 01 inc %g3
20074bc: c6 20 a0 08 st %g3, [ %g2 + 8 ]
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
20074c0: 84 02 7f ff add %o1, -1, %g2
20074c4: 80 88 80 09 btst %g2, %o1
20074c8: 22 80 00 04 be,a 20074d8 <posix_memalign+0x2c> <== ALWAYS TAKEN
20074cc: 80 a2 60 03 cmp %o1, 3
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
20074d0: 81 c3 e0 08 retl
20074d4: 90 10 20 16 mov 0x16, %o0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
20074d8: 08 bf ff fe bleu 20074d0 <posix_memalign+0x24>
20074dc: 01 00 00 00 nop
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
20074e0: 82 13 c0 00 mov %o7, %g1
20074e4: 40 00 00 8c call 2007714 <rtems_memalign>
20074e8: 9e 10 40 00 mov %g1, %o7
0200ba9c <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
200ba9c: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
200baa0: 80 a0 60 00 cmp %g1, 0
200baa4: 02 80 00 06 be 200babc <pthread_attr_setschedpolicy+0x20>
200baa8: 90 10 20 16 mov 0x16, %o0
200baac: c4 00 40 00 ld [ %g1 ], %g2
200bab0: 80 a0 a0 00 cmp %g2, 0
200bab4: 12 80 00 04 bne 200bac4 <pthread_attr_setschedpolicy+0x28>
200bab8: 80 a2 60 04 cmp %o1, 4
return 0;
default:
return ENOTSUP;
}
}
200babc: 81 c3 e0 08 retl
200bac0: 01 00 00 00 nop
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
200bac4: 18 80 00 09 bgu 200bae8 <pthread_attr_setschedpolicy+0x4c>
200bac8: 84 10 20 01 mov 1, %g2 ! 1 <PROM_START+0x1>
200bacc: 85 28 80 09 sll %g2, %o1, %g2
200bad0: 80 88 a0 17 btst 0x17, %g2
200bad4: 02 80 00 05 be 200bae8 <pthread_attr_setschedpolicy+0x4c> <== NEVER TAKEN
200bad8: 01 00 00 00 nop
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
200badc: d2 20 60 14 st %o1, [ %g1 + 0x14 ]
return 0;
200bae0: 81 c3 e0 08 retl
200bae4: 90 10 20 00 clr %o0
default:
return ENOTSUP;
}
}
200bae8: 81 c3 e0 08 retl
200baec: 90 10 20 86 mov 0x86, %o0
02006880 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
2006880: 9d e3 bf 90 save %sp, -112, %sp
2006884: ba 10 00 18 mov %i0, %i5
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
2006888: 80 a7 60 00 cmp %i5, 0
200688c: 02 80 00 27 be 2006928 <pthread_barrier_init+0xa8>
2006890: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( count == 0 )
2006894: 80 a6 a0 00 cmp %i2, 0
2006898: 02 80 00 24 be 2006928 <pthread_barrier_init+0xa8>
200689c: 80 a6 60 00 cmp %i1, 0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
20068a0: 02 80 00 24 be 2006930 <pthread_barrier_init+0xb0>
20068a4: 90 07 bf f8 add %fp, -8, %o0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
20068a8: c2 06 40 00 ld [ %i1 ], %g1
20068ac: 80 a0 60 00 cmp %g1, 0
20068b0: 02 80 00 1e be 2006928 <pthread_barrier_init+0xa8>
20068b4: b0 10 20 16 mov 0x16, %i0
return EINVAL;
switch ( the_attr->process_shared ) {
20068b8: c2 06 60 04 ld [ %i1 + 4 ], %g1
20068bc: 80 a0 60 00 cmp %g1, 0
20068c0: 12 80 00 1a bne 2006928 <pthread_barrier_init+0xa8> <== NEVER TAKEN
20068c4: 03 00 80 61 sethi %hi(0x2018400), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20068c8: c4 00 61 c0 ld [ %g1 + 0x1c0 ], %g2 ! 20185c0 <_Thread_Dispatch_disable_level>
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
20068cc: c0 27 bf f0 clr [ %fp + -16 ]
20068d0: 84 00 a0 01 inc %g2
the_attributes.maximum_count = count;
20068d4: f4 27 bf f4 st %i2, [ %fp + -12 ]
20068d8: c4 20 61 c0 st %g2, [ %g1 + 0x1c0 ]
return _Thread_Dispatch_disable_level;
20068dc: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1
* 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 *)
20068e0: 37 00 80 62 sethi %hi(0x2018800), %i3
20068e4: 40 00 08 c8 call 2008c04 <_Objects_Allocate>
20068e8: 90 16 e1 80 or %i3, 0x180, %o0 ! 2018980 <_POSIX_Barrier_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
20068ec: b8 92 20 00 orcc %o0, 0, %i4
20068f0: 02 80 00 14 be 2006940 <pthread_barrier_init+0xc0>
20068f4: 90 07 20 10 add %i4, 0x10, %o0
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
20068f8: 40 00 06 0a call 2008120 <_CORE_barrier_Initialize>
20068fc: 92 07 bf f0 add %fp, -16, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2006900: c4 17 20 0a lduh [ %i4 + 0xa ], %g2
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
2006904: b6 16 e1 80 or %i3, 0x180, %i3
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006908: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
200690c: c2 07 20 08 ld [ %i4 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006910: 85 28 a0 02 sll %g2, 2, %g2
2006914: f8 20 c0 02 st %i4, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2006918: c0 27 20 0c clr [ %i4 + 0xc ]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
200691c: c2 27 40 00 st %g1, [ %i5 ]
_Thread_Enable_dispatch();
2006920: 40 00 0d d6 call 200a078 <_Thread_Enable_dispatch>
2006924: b0 10 20 00 clr %i0
return 0;
}
2006928: 81 c7 e0 08 ret
200692c: 81 e8 00 00 restore
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
2006930: 7f ff ff 9c call 20067a0 <pthread_barrierattr_init>
2006934: b2 07 bf f8 add %fp, -8, %i1
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2006938: 10 bf ff dd b 20068ac <pthread_barrier_init+0x2c>
200693c: c2 06 40 00 ld [ %i1 ], %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
2006940: 40 00 0d ce call 200a078 <_Thread_Enable_dispatch>
2006944: b0 10 20 0b mov 0xb, %i0
return EAGAIN;
2006948: 81 c7 e0 08 ret
200694c: 81 e8 00 00 restore
0200611c <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
200611c: 9d e3 bf a0 save %sp, -96, %sp
/*
* 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 )
2006120: 80 a6 20 00 cmp %i0, 0
2006124: 02 80 00 16 be 200617c <pthread_cleanup_push+0x60>
2006128: 01 00 00 00 nop
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200612c: 03 00 80 62 sethi %hi(0x2018800), %g1
2006130: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 2018b00 <_Thread_Dispatch_disable_level>
2006134: 84 00 a0 01 inc %g2
2006138: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
200613c: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
2006140: 40 00 12 f5 call 200ad14 <_Workspace_Allocate>
2006144: 90 10 20 10 mov 0x10, %o0
if ( handler ) {
2006148: 80 a2 20 00 cmp %o0, 0
200614c: 02 80 00 0a be 2006174 <pthread_cleanup_push+0x58> <== NEVER TAKEN
2006150: 01 00 00 00 nop
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2006154: 03 00 80 64 sethi %hi(0x2019000), %g1
2006158: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 ! 201904c <_Per_CPU_Information+0xc>
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
200615c: 92 10 00 08 mov %o0, %o1
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;
2006160: c2 00 61 5c ld [ %g1 + 0x15c ], %g1
handler->routine = routine;
2006164: f0 22 20 08 st %i0, [ %o0 + 8 ]
handler->arg = arg;
2006168: f2 22 20 0c st %i1, [ %o0 + 0xc ]
_Chain_Append( handler_stack, &handler->Node );
200616c: 40 00 06 50 call 2007aac <_Chain_Append>
2006170: 90 00 60 e4 add %g1, 0xe4, %o0
}
_Thread_Enable_dispatch();
2006174: 40 00 0e 1a call 20099dc <_Thread_Enable_dispatch>
2006178: 81 e8 00 00 restore
200617c: 81 c7 e0 08 ret
2006180: 81 e8 00 00 restore
02007088 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
2007088: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
200708c: 80 a6 60 00 cmp %i1, 0
2007090: 02 80 00 27 be 200712c <pthread_cond_init+0xa4>
2007094: ba 10 00 18 mov %i0, %i5
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
2007098: c2 06 60 04 ld [ %i1 + 4 ], %g1
200709c: 80 a0 60 01 cmp %g1, 1
20070a0: 02 80 00 21 be 2007124 <pthread_cond_init+0x9c> <== NEVER TAKEN
20070a4: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !the_attr->is_initialized )
20070a8: c2 06 40 00 ld [ %i1 ], %g1
20070ac: 80 a0 60 00 cmp %g1, 0
20070b0: 02 80 00 1d be 2007124 <pthread_cond_init+0x9c>
20070b4: 03 00 80 65 sethi %hi(0x2019400), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20070b8: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 2019700 <_Thread_Dispatch_disable_level>
20070bc: 84 00 a0 01 inc %g2
20070c0: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
20070c4: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
20070c8: 37 00 80 66 sethi %hi(0x2019800), %i3
20070cc: 40 00 0a 61 call 2009a50 <_Objects_Allocate>
20070d0: 90 16 e3 58 or %i3, 0x358, %o0 ! 2019b58 <_POSIX_Condition_variables_Information>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
20070d4: b8 92 20 00 orcc %o0, 0, %i4
20070d8: 02 80 00 18 be 2007138 <pthread_cond_init+0xb0>
20070dc: 90 07 20 18 add %i4, 0x18, %o0
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
20070e0: c2 06 60 04 ld [ %i1 + 4 ], %g1
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
20070e4: 92 10 20 00 clr %o1
20070e8: 15 04 00 02 sethi %hi(0x10000800), %o2
20070ec: 96 10 20 74 mov 0x74, %o3
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
20070f0: c2 27 20 10 st %g1, [ %i4 + 0x10 ]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
20070f4: 40 00 11 9f call 200b770 <_Thread_queue_Initialize>
20070f8: c0 27 20 14 clr [ %i4 + 0x14 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20070fc: c4 17 20 0a lduh [ %i4 + 0xa ], %g2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
2007100: b6 16 e3 58 or %i3, 0x358, %i3
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007104: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007108: c2 07 20 08 ld [ %i4 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200710c: 85 28 a0 02 sll %g2, 2, %g2
2007110: f8 20 c0 02 st %i4, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2007114: c0 27 20 0c clr [ %i4 + 0xc ]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
2007118: c2 27 40 00 st %g1, [ %i5 ]
_Thread_Enable_dispatch();
200711c: 40 00 0f 6a call 200aec4 <_Thread_Enable_dispatch>
2007120: b0 10 20 00 clr %i0
return 0;
}
2007124: 81 c7 e0 08 ret
2007128: 81 e8 00 00 restore
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
200712c: 33 00 80 5f sethi %hi(0x2017c00), %i1
2007130: 10 bf ff da b 2007098 <pthread_cond_init+0x10>
2007134: b2 16 62 b4 or %i1, 0x2b4, %i1 ! 2017eb4 <_POSIX_Condition_variables_Default_attributes>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
2007138: 40 00 0f 63 call 200aec4 <_Thread_Enable_dispatch>
200713c: b0 10 20 0c mov 0xc, %i0
return ENOMEM;
2007140: 81 c7 e0 08 ret
2007144: 81 e8 00 00 restore
02006eec <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
2006eec: 82 10 00 08 mov %o0, %g1
if ( !attr || attr->is_initialized == false )
2006ef0: 80 a0 60 00 cmp %g1, 0
2006ef4: 02 80 00 06 be 2006f0c <pthread_condattr_destroy+0x20>
2006ef8: 90 10 20 16 mov 0x16, %o0
2006efc: c4 00 40 00 ld [ %g1 ], %g2
2006f00: 80 a0 a0 00 cmp %g2, 0
2006f04: 32 80 00 04 bne,a 2006f14 <pthread_condattr_destroy+0x28><== ALWAYS TAKEN
2006f08: c0 20 40 00 clr [ %g1 ]
return EINVAL;
attr->is_initialized = false;
return 0;
}
2006f0c: 81 c3 e0 08 retl
2006f10: 01 00 00 00 nop
2006f14: 81 c3 e0 08 retl
2006f18: 90 10 20 00 clr %o0 ! 0 <PROM_START>
020065c4 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
20065c4: 9d e3 bf 58 save %sp, -168, %sp
20065c8: ba 10 00 18 mov %i0, %i5
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
20065cc: 80 a6 a0 00 cmp %i2, 0
20065d0: 02 80 00 63 be 200675c <pthread_create+0x198>
20065d4: b0 10 20 0e mov 0xe, %i0
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
20065d8: 80 a6 60 00 cmp %i1, 0
20065dc: 22 80 00 62 be,a 2006764 <pthread_create+0x1a0>
20065e0: 33 00 80 72 sethi %hi(0x201c800), %i1
if ( !the_attr->is_initialized )
20065e4: c2 06 40 00 ld [ %i1 ], %g1
20065e8: 80 a0 60 00 cmp %g1, 0
20065ec: 02 80 00 5c be 200675c <pthread_create+0x198>
20065f0: b0 10 20 16 mov 0x16, %i0
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
20065f4: c2 06 60 04 ld [ %i1 + 4 ], %g1
20065f8: 80 a0 60 00 cmp %g1, 0
20065fc: 02 80 00 07 be 2006618 <pthread_create+0x54>
2006600: 03 00 80 76 sethi %hi(0x201d800), %g1
2006604: c4 06 60 08 ld [ %i1 + 8 ], %g2
2006608: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200660c: 80 a0 80 01 cmp %g2, %g1
2006610: 0a 80 00 83 bcs 200681c <pthread_create+0x258>
2006614: 01 00 00 00 nop
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
2006618: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200661c: 80 a0 60 01 cmp %g1, 1
2006620: 02 80 00 53 be 200676c <pthread_create+0x1a8>
2006624: 80 a0 60 02 cmp %g1, 2
2006628: 12 80 00 4d bne 200675c <pthread_create+0x198>
200662c: b0 10 20 16 mov 0x16, %i0
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
2006630: da 06 60 18 ld [ %i1 + 0x18 ], %o5
2006634: de 06 60 1c ld [ %i1 + 0x1c ], %o7
2006638: f0 06 60 20 ld [ %i1 + 0x20 ], %i0
200663c: c8 06 60 24 ld [ %i1 + 0x24 ], %g4
2006640: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
2006644: c4 06 60 2c ld [ %i1 + 0x2c ], %g2
2006648: c2 06 60 30 ld [ %i1 + 0x30 ], %g1
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
200664c: f8 06 60 14 ld [ %i1 + 0x14 ], %i4
schedparam = the_attr->schedparam;
2006650: da 27 bf dc st %o5, [ %fp + -36 ]
2006654: de 27 bf e0 st %o7, [ %fp + -32 ]
2006658: f0 27 bf e4 st %i0, [ %fp + -28 ]
200665c: c8 27 bf e8 st %g4, [ %fp + -24 ]
2006660: c6 27 bf ec st %g3, [ %fp + -20 ]
2006664: c4 27 bf f0 st %g2, [ %fp + -16 ]
2006668: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
200666c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2006670: 80 a0 60 00 cmp %g1, 0
2006674: 12 80 00 3a bne 200675c <pthread_create+0x198>
2006678: b0 10 20 86 mov 0x86, %i0
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
200667c: d0 07 bf dc ld [ %fp + -36 ], %o0
2006680: 40 00 1c 3a call 200d768 <_POSIX_Priority_Is_valid>
2006684: b0 10 20 16 mov 0x16, %i0
2006688: 80 8a 20 ff btst 0xff, %o0
200668c: 02 80 00 34 be 200675c <pthread_create+0x198> <== NEVER TAKEN
2006690: 03 00 80 76 sethi %hi(0x201d800), %g1
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
2006694: e4 07 bf dc ld [ %fp + -36 ], %l2
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
2006698: e6 08 60 0c ldub [ %g1 + 0xc ], %l3
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
200669c: 90 10 00 1c mov %i4, %o0
20066a0: 92 07 bf dc add %fp, -36, %o1
20066a4: 94 07 bf f8 add %fp, -8, %o2
20066a8: 40 00 1c 3d call 200d79c <_POSIX_Thread_Translate_sched_param>
20066ac: 96 07 bf fc add %fp, -4, %o3
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
20066b0: b0 92 20 00 orcc %o0, 0, %i0
20066b4: 12 80 00 2a bne 200675c <pthread_create+0x198>
20066b8: 23 00 80 79 sethi %hi(0x201e400), %l1
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
20066bc: d0 04 61 a4 ld [ %l1 + 0x1a4 ], %o0 ! 201e5a4 <_RTEMS_Allocator_Mutex>
20066c0: 40 00 06 81 call 20080c4 <_API_Mutex_Lock>
20066c4: 29 00 80 79 sethi %hi(0x201e400), %l4
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
20066c8: 40 00 09 4f call 2008c04 <_Objects_Allocate>
20066cc: 90 15 23 40 or %l4, 0x340, %o0 ! 201e740 <_POSIX_Threads_Information>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
20066d0: a0 92 20 00 orcc %o0, 0, %l0
20066d4: 02 80 00 1f be 2006750 <pthread_create+0x18c>
20066d8: 05 00 80 76 sethi %hi(0x201d800), %g2
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
20066dc: c2 06 60 08 ld [ %i1 + 8 ], %g1
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
20066e0: d6 00 a0 10 ld [ %g2 + 0x10 ], %o3
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
20066e4: c0 27 bf d4 clr [ %fp + -44 ]
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
20066e8: 97 2a e0 01 sll %o3, 1, %o3
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
20066ec: 80 a2 c0 01 cmp %o3, %g1
20066f0: 1a 80 00 03 bcc 20066fc <pthread_create+0x138>
20066f4: d4 06 60 04 ld [ %i1 + 4 ], %o2
20066f8: 96 10 00 01 mov %g1, %o3
20066fc: c2 07 bf f8 ld [ %fp + -8 ], %g1
2006700: 9a 0c e0 ff and %l3, 0xff, %o5
2006704: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
2006708: 82 10 20 01 mov 1, %g1
200670c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2006710: c2 07 bf fc ld [ %fp + -4 ], %g1
2006714: c0 23 a0 68 clr [ %sp + 0x68 ]
2006718: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
200671c: 82 07 bf d4 add %fp, -44, %g1
2006720: 90 15 23 40 or %l4, 0x340, %o0
2006724: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2006728: 92 10 00 10 mov %l0, %o1
200672c: 98 10 20 01 mov 1, %o4
2006730: 40 00 0e 8b call 200a15c <_Thread_Initialize>
2006734: 9a 23 40 12 sub %o5, %l2, %o5
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
2006738: 80 8a 20 ff btst 0xff, %o0
200673c: 12 80 00 1f bne 20067b8 <pthread_create+0x1f4>
2006740: 11 00 80 79 sethi %hi(0x201e400), %o0
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
2006744: 92 10 00 10 mov %l0, %o1
2006748: 40 00 0a 19 call 2008fac <_Objects_Free>
200674c: 90 12 23 40 or %o0, 0x340, %o0
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
2006750: d0 04 61 a4 ld [ %l1 + 0x1a4 ], %o0
2006754: 40 00 06 71 call 2008118 <_API_Mutex_Unlock>
2006758: b0 10 20 0b mov 0xb, %i0
return EAGAIN;
200675c: 81 c7 e0 08 ret
2006760: 81 e8 00 00 restore
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
2006764: 10 bf ff a0 b 20065e4 <pthread_create+0x20>
2006768: b2 16 62 dc or %i1, 0x2dc, %i1
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
200676c: 03 00 80 7a sethi %hi(0x201e800), %g1
2006770: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 201ea4c <_Per_CPU_Information+0xc>
2006774: c2 00 61 5c ld [ %g1 + 0x15c ], %g1
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
2006778: d8 00 60 88 ld [ %g1 + 0x88 ], %o4
200677c: da 00 60 8c ld [ %g1 + 0x8c ], %o5
2006780: de 00 60 90 ld [ %g1 + 0x90 ], %o7
2006784: f0 00 60 94 ld [ %g1 + 0x94 ], %i0
2006788: c8 00 60 98 ld [ %g1 + 0x98 ], %g4
200678c: c6 00 60 9c ld [ %g1 + 0x9c ], %g3
2006790: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
2006794: f8 00 60 84 ld [ %g1 + 0x84 ], %i4
schedparam = api->schedparam;
2006798: d8 27 bf dc st %o4, [ %fp + -36 ]
200679c: da 27 bf e0 st %o5, [ %fp + -32 ]
20067a0: de 27 bf e4 st %o7, [ %fp + -28 ]
20067a4: f0 27 bf e8 st %i0, [ %fp + -24 ]
20067a8: c8 27 bf ec st %g4, [ %fp + -20 ]
20067ac: c6 27 bf f0 st %g3, [ %fp + -16 ]
break;
20067b0: 10 bf ff af b 200666c <pthread_create+0xa8>
20067b4: c4 27 bf f4 st %g2, [ %fp + -12 ]
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20067b8: e4 04 21 5c ld [ %l0 + 0x15c ], %l2
api->Attributes = *the_attr;
20067bc: 92 10 00 19 mov %i1, %o1
20067c0: 94 10 20 40 mov 0x40, %o2
20067c4: 40 00 29 2a call 2010c6c <memcpy>
20067c8: 90 10 00 12 mov %l2, %o0
api->detachstate = the_attr->detachstate;
20067cc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
20067d0: 92 07 bf dc add %fp, -36, %o1
20067d4: 94 10 20 1c mov 0x1c, %o2
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
20067d8: c2 24 a0 40 st %g1, [ %l2 + 0x40 ]
api->schedpolicy = schedpolicy;
20067dc: f8 24 a0 84 st %i4, [ %l2 + 0x84 ]
api->schedparam = schedparam;
20067e0: 40 00 29 23 call 2010c6c <memcpy>
20067e4: 90 04 a0 88 add %l2, 0x88, %o0
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
20067e8: 90 10 00 10 mov %l0, %o0
20067ec: 92 10 20 01 mov 1, %o1
20067f0: 94 10 00 1a mov %i2, %o2
20067f4: 96 10 00 1b mov %i3, %o3
20067f8: 40 00 10 dd call 200ab6c <_Thread_Start>
20067fc: 98 10 20 00 clr %o4
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
2006800: 80 a7 20 04 cmp %i4, 4
2006804: 02 80 00 08 be 2006824 <pthread_create+0x260>
2006808: 01 00 00 00 nop
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
200680c: c2 04 20 08 ld [ %l0 + 8 ], %g1
_RTEMS_Unlock_allocator();
2006810: d0 04 61 a4 ld [ %l1 + 0x1a4 ], %o0
2006814: 40 00 06 41 call 2008118 <_API_Mutex_Unlock>
2006818: c2 27 40 00 st %g1, [ %i5 ]
return 0;
200681c: 81 c7 e0 08 ret
2006820: 81 e8 00 00 restore
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
2006824: 40 00 11 27 call 200acc0 <_Timespec_To_ticks>
2006828: 90 04 a0 90 add %l2, 0x90, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200682c: 92 04 a0 a8 add %l2, 0xa8, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006830: d0 24 a0 b4 st %o0, [ %l2 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006834: 11 00 80 79 sethi %hi(0x201e400), %o0
2006838: 40 00 12 15 call 200b08c <_Watchdog_Insert>
200683c: 90 12 21 bc or %o0, 0x1bc, %o0 ! 201e5bc <_Watchdog_Ticks_chain>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
2006840: 10 bf ff f4 b 2006810 <pthread_create+0x24c>
2006844: c2 04 20 08 ld [ %l0 + 8 ], %g1
0201a980 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
201a980: 9d e3 bf 98 save %sp, -104, %sp
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
201a984: 80 a6 60 00 cmp %i1, 0
201a988: 02 80 00 2d be 201aa3c <pthread_kill+0xbc>
201a98c: b6 06 7f ff add %i1, -1, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201a990: 80 a6 e0 1f cmp %i3, 0x1f
201a994: 18 80 00 2a bgu 201aa3c <pthread_kill+0xbc>
201a998: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
201a99c: 7f ff ba a1 call 2009420 <_Thread_Get>
201a9a0: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
201a9a4: c2 07 bf fc ld [ %fp + -4 ], %g1
201a9a8: 80 a0 60 00 cmp %g1, 0
201a9ac: 12 80 00 2a bne 201aa54 <pthread_kill+0xd4> <== NEVER TAKEN
201a9b0: ba 10 00 08 mov %o0, %i5
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
201a9b4: 83 2e 60 02 sll %i1, 2, %g1
201a9b8: 85 2e 60 04 sll %i1, 4, %g2
201a9bc: 84 20 80 01 sub %g2, %g1, %g2
201a9c0: 03 00 80 78 sethi %hi(0x201e000), %g1
201a9c4: 82 10 60 a0 or %g1, 0xa0, %g1 ! 201e0a0 <_POSIX_signals_Vectors>
201a9c8: 82 00 40 02 add %g1, %g2, %g1
201a9cc: c4 00 60 08 ld [ %g1 + 8 ], %g2
201a9d0: 80 a0 a0 01 cmp %g2, 1
201a9d4: 02 80 00 14 be 201aa24 <pthread_kill+0xa4>
201a9d8: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201a9dc: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2
201a9e0: b8 10 20 01 mov 1, %i4
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201a9e4: 92 10 00 19 mov %i1, %o1
201a9e8: b7 2f 00 1b sll %i4, %i3, %i3
201a9ec: 94 10 20 00 clr %o2
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201a9f0: b6 10 80 1b or %g2, %i3, %i3
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201a9f4: 7f ff ff 8c call 201a824 <_POSIX_signals_Unblock_thread>
201a9f8: f6 20 60 d4 st %i3, [ %g1 + 0xd4 ]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201a9fc: 03 00 80 78 sethi %hi(0x201e000), %g1
201aa00: 82 10 60 40 or %g1, 0x40, %g1 ! 201e040 <_Per_CPU_Information>
201aa04: c4 00 60 08 ld [ %g1 + 8 ], %g2
201aa08: 80 a0 a0 00 cmp %g2, 0
201aa0c: 02 80 00 06 be 201aa24 <pthread_kill+0xa4>
201aa10: 01 00 00 00 nop
201aa14: c4 00 60 0c ld [ %g1 + 0xc ], %g2
201aa18: 80 a7 40 02 cmp %i5, %g2
201aa1c: 02 80 00 06 be 201aa34 <pthread_kill+0xb4>
201aa20: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
}
_Thread_Enable_dispatch();
201aa24: 7f ff ba 72 call 20093ec <_Thread_Enable_dispatch>
201aa28: b0 10 20 00 clr %i0 ! 0 <PROM_START>
return 0;
201aa2c: 81 c7 e0 08 ret
201aa30: 81 e8 00 00 restore
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
201aa34: f8 28 60 18 stb %i4, [ %g1 + 0x18 ]
201aa38: 30 bf ff fb b,a 201aa24 <pthread_kill+0xa4>
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
201aa3c: 7f ff d4 24 call 200facc <__errno>
201aa40: b0 10 3f ff mov -1, %i0
201aa44: 82 10 20 16 mov 0x16, %g1
201aa48: c2 22 00 00 st %g1, [ %o0 ]
201aa4c: 81 c7 e0 08 ret
201aa50: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
201aa54: 7f ff d4 1e call 200facc <__errno> <== NOT EXECUTED
201aa58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201aa5c: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
201aa60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
201aa64: 81 c7 e0 08 ret <== NOT EXECUTED
201aa68: 81 e8 00 00 restore <== NOT EXECUTED
02008550 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
2008550: 9d e3 bf 98 save %sp, -104, %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 );
2008554: 90 10 00 19 mov %i1, %o0
2008558: 40 00 00 37 call 2008634 <_POSIX_Absolute_timeout_to_ticks>
200855c: 92 07 bf fc add %fp, -4, %o1
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2008560: d4 07 bf fc ld [ %fp + -4 ], %o2
*
* 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 );
2008564: ba 10 00 08 mov %o0, %i5
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
2008568: 80 a7 60 03 cmp %i5, 3
200856c: 02 80 00 09 be 2008590 <pthread_mutex_timedlock+0x40>
2008570: 90 10 00 18 mov %i0, %o0
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2008574: 7f ff ff be call 200846c <_POSIX_Mutex_Lock_support>
2008578: 92 10 20 00 clr %o1
* 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) ) {
200857c: 80 a2 20 10 cmp %o0, 0x10
2008580: 02 80 00 08 be 20085a0 <pthread_mutex_timedlock+0x50>
2008584: 80 a7 60 00 cmp %i5, 0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
2008588: 81 c7 e0 08 ret
200858c: 91 e8 00 08 restore %g0, %o0, %o0
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2008590: 7f ff ff b7 call 200846c <_POSIX_Mutex_Lock_support>
2008594: 92 10 20 01 mov 1, %o1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
2008598: 81 c7 e0 08 ret
200859c: 91 e8 00 08 restore %g0, %o0, %o0
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
20085a0: 32 80 00 04 bne,a 20085b0 <pthread_mutex_timedlock+0x60> <== ALWAYS TAKEN
20085a4: ba 07 7f ff add %i5, -1, %i5
return EINVAL;
20085a8: 10 bf ff f8 b 2008588 <pthread_mutex_timedlock+0x38> <== NOT EXECUTED
20085ac: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
20085b0: 80 a7 60 01 cmp %i5, 1
20085b4: 28 bf ff f5 bleu,a 2008588 <pthread_mutex_timedlock+0x38><== ALWAYS TAKEN
20085b8: 90 10 20 74 mov 0x74, %o0
20085bc: 30 bf ff f3 b,a 2008588 <pthread_mutex_timedlock+0x38> <== NOT EXECUTED
02005e44 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
2005e44: 82 10 00 08 mov %o0, %g1
if ( !attr )
2005e48: 80 a0 60 00 cmp %g1, 0
2005e4c: 02 80 00 06 be 2005e64 <pthread_mutexattr_gettype+0x20>
2005e50: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2005e54: c4 00 40 00 ld [ %g1 ], %g2
2005e58: 80 a0 a0 00 cmp %g2, 0
2005e5c: 12 80 00 04 bne 2005e6c <pthread_mutexattr_gettype+0x28>
2005e60: 80 a2 60 00 cmp %o1, 0
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
}
2005e64: 81 c3 e0 08 retl
2005e68: 01 00 00 00 nop
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
2005e6c: 02 bf ff fe be 2005e64 <pthread_mutexattr_gettype+0x20> <== NEVER TAKEN
2005e70: 01 00 00 00 nop
return EINVAL;
*type = attr->type;
2005e74: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
return 0;
2005e78: 90 10 20 00 clr %o0
}
2005e7c: 81 c3 e0 08 retl
2005e80: c2 22 40 00 st %g1, [ %o1 ]
02008124 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
2008124: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
2008128: 80 a0 60 00 cmp %g1, 0
200812c: 02 80 00 06 be 2008144 <pthread_mutexattr_setpshared+0x20>
2008130: 90 10 20 16 mov 0x16, %o0
2008134: c4 00 40 00 ld [ %g1 ], %g2
2008138: 80 a0 a0 00 cmp %g2, 0
200813c: 12 80 00 04 bne 200814c <pthread_mutexattr_setpshared+0x28>
2008140: 80 a2 60 01 cmp %o1, 1
return 0;
default:
return EINVAL;
}
}
2008144: 81 c3 e0 08 retl
2008148: 01 00 00 00 nop
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
200814c: 18 bf ff fe bgu 2008144 <pthread_mutexattr_setpshared+0x20><== NEVER TAKEN
2008150: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2008154: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
default:
return EINVAL;
}
}
2008158: 81 c3 e0 08 retl
200815c: 90 10 20 00 clr %o0
02005ed8 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
2005ed8: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
2005edc: 80 a0 60 00 cmp %g1, 0
2005ee0: 02 80 00 06 be 2005ef8 <pthread_mutexattr_settype+0x20>
2005ee4: 90 10 20 16 mov 0x16, %o0
2005ee8: c4 00 40 00 ld [ %g1 ], %g2
2005eec: 80 a0 a0 00 cmp %g2, 0
2005ef0: 12 80 00 04 bne 2005f00 <pthread_mutexattr_settype+0x28> <== ALWAYS TAKEN
2005ef4: 80 a2 60 03 cmp %o1, 3
return 0;
default:
return EINVAL;
}
}
2005ef8: 81 c3 e0 08 retl
2005efc: 01 00 00 00 nop
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( type ) {
2005f00: 18 bf ff fe bgu 2005ef8 <pthread_mutexattr_settype+0x20>
2005f04: 01 00 00 00 nop
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
2005f08: d2 20 60 10 st %o1, [ %g1 + 0x10 ]
return 0;
default:
return EINVAL;
}
}
2005f0c: 81 c3 e0 08 retl
2005f10: 90 10 20 00 clr %o0
02006d14 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
2006d14: 9d e3 bf 98 save %sp, -104, %sp
if ( !once_control || !init_routine )
2006d18: 80 a6 60 00 cmp %i1, 0
2006d1c: 12 80 00 04 bne 2006d2c <pthread_once+0x18>
2006d20: ba 10 00 18 mov %i0, %i5
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
2006d24: 81 c7 e0 08 ret
2006d28: 91 e8 20 16 restore %g0, 0x16, %o0
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
2006d2c: 80 a6 20 00 cmp %i0, 0
2006d30: 22 80 00 13 be,a 2006d7c <pthread_once+0x68>
2006d34: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !once_control->init_executed ) {
2006d38: c2 06 20 04 ld [ %i0 + 4 ], %g1
2006d3c: 80 a0 60 00 cmp %g1, 0
2006d40: 12 80 00 0f bne 2006d7c <pthread_once+0x68>
2006d44: b0 10 20 00 clr %i0
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2006d48: 90 10 21 00 mov 0x100, %o0
2006d4c: 92 10 21 00 mov 0x100, %o1
2006d50: 40 00 03 0e call 2007988 <rtems_task_mode>
2006d54: 94 07 bf fc add %fp, -4, %o2
if ( !once_control->init_executed ) {
2006d58: c2 07 60 04 ld [ %i5 + 4 ], %g1
2006d5c: 80 a0 60 00 cmp %g1, 0
2006d60: 02 80 00 09 be 2006d84 <pthread_once+0x70> <== ALWAYS TAKEN
2006d64: 82 10 20 01 mov 1, %g1
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2006d68: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
2006d6c: 92 10 21 00 mov 0x100, %o1
2006d70: 94 07 bf fc add %fp, -4, %o2
2006d74: 40 00 03 05 call 2007988 <rtems_task_mode>
2006d78: b0 10 20 00 clr %i0
2006d7c: 81 c7 e0 08 ret
2006d80: 81 e8 00 00 restore
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
2006d84: c2 27 40 00 st %g1, [ %i5 ]
once_control->init_executed = true;
(*init_routine)();
2006d88: 9f c6 40 00 call %i1
2006d8c: c2 27 60 04 st %g1, [ %i5 + 4 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2006d90: 10 bf ff f7 b 2006d6c <pthread_once+0x58>
2006d94: d0 07 bf fc ld [ %fp + -4 ], %o0
020073f0 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
20073f0: 9d e3 bf 90 save %sp, -112, %sp
20073f4: ba 10 00 18 mov %i0, %i5
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
20073f8: 80 a7 60 00 cmp %i5, 0
20073fc: 02 80 00 24 be 200748c <pthread_rwlock_init+0x9c>
2007400: b0 10 20 16 mov 0x16, %i0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2007404: 80 a6 60 00 cmp %i1, 0
2007408: 02 80 00 23 be 2007494 <pthread_rwlock_init+0xa4>
200740c: 90 07 bf f4 add %fp, -12, %o0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2007410: c2 06 40 00 ld [ %i1 ], %g1
2007414: 80 a0 60 00 cmp %g1, 0
2007418: 02 80 00 1d be 200748c <pthread_rwlock_init+0x9c> <== NEVER TAKEN
200741c: b0 10 20 16 mov 0x16, %i0
return EINVAL;
switch ( the_attr->process_shared ) {
2007420: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007424: 80 a0 60 00 cmp %g1, 0
2007428: 12 80 00 19 bne 200748c <pthread_rwlock_init+0x9c> <== NEVER TAKEN
200742c: 03 00 80 6a sethi %hi(0x201a800), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007430: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 201abc0 <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
2007434: c0 27 bf fc clr [ %fp + -4 ]
2007438: 84 00 a0 01 inc %g2
200743c: c4 20 63 c0 st %g2, [ %g1 + 0x3c0 ]
return _Thread_Dispatch_disable_level;
2007440: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1
* 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 *)
2007444: 37 00 80 6b sethi %hi(0x201ac00), %i3
2007448: 40 00 0a 65 call 2009ddc <_Objects_Allocate>
200744c: 90 16 e1 c0 or %i3, 0x1c0, %o0 ! 201adc0 <_POSIX_RWLock_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
2007450: b8 92 20 00 orcc %o0, 0, %i4
2007454: 02 80 00 14 be 20074a4 <pthread_rwlock_init+0xb4>
2007458: 90 07 20 10 add %i4, 0x10, %o0
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
200745c: 40 00 07 f5 call 2009430 <_CORE_RWLock_Initialize>
2007460: 92 07 bf fc add %fp, -4, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007464: c4 17 20 0a lduh [ %i4 + 0xa ], %g2
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
2007468: b6 16 e1 c0 or %i3, 0x1c0, %i3
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200746c: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007470: c2 07 20 08 ld [ %i4 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007474: 85 28 a0 02 sll %g2, 2, %g2
2007478: f8 20 c0 02 st %i4, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
200747c: c0 27 20 0c clr [ %i4 + 0xc ]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
2007480: c2 27 40 00 st %g1, [ %i5 ]
_Thread_Enable_dispatch();
2007484: 40 00 0f 73 call 200b250 <_Thread_Enable_dispatch>
2007488: b0 10 20 00 clr %i0
return 0;
}
200748c: 81 c7 e0 08 ret
2007490: 81 e8 00 00 restore
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
2007494: 40 00 02 80 call 2007e94 <pthread_rwlockattr_init>
2007498: b2 07 bf f4 add %fp, -12, %i1
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
200749c: 10 bf ff de b 2007414 <pthread_rwlock_init+0x24>
20074a0: c2 06 40 00 ld [ %i1 ], %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
20074a4: 40 00 0f 6b call 200b250 <_Thread_Enable_dispatch>
20074a8: b0 10 20 0b mov 0xb, %i0
return EAGAIN;
20074ac: 81 c7 e0 08 ret
20074b0: 81 e8 00 00 restore
02007524 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2007524: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
2007528: 80 a6 20 00 cmp %i0, 0
200752c: 02 80 00 24 be 20075bc <pthread_rwlock_timedrdlock+0x98>
2007530: ba 10 20 16 mov 0x16, %i5
*
* 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 );
2007534: 92 07 bf fc add %fp, -4, %o1
2007538: 40 00 1c bf call 200e834 <_POSIX_Absolute_timeout_to_ticks>
200753c: 90 10 00 19 mov %i1, %o0
2007540: d2 06 00 00 ld [ %i0 ], %o1
2007544: b8 10 00 08 mov %o0, %i4
2007548: 94 07 bf f8 add %fp, -8, %o2
200754c: 11 00 80 6b sethi %hi(0x201ac00), %o0
2007550: 40 00 0b 6e call 200a308 <_Objects_Get>
2007554: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 201adc0 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2007558: c2 07 bf f8 ld [ %fp + -8 ], %g1
200755c: 80 a0 60 00 cmp %g1, 0
2007560: 12 80 00 17 bne 20075bc <pthread_rwlock_timedrdlock+0x98>
2007564: d6 07 bf fc ld [ %fp + -4 ], %o3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
2007568: d2 06 00 00 ld [ %i0 ], %o1
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
200756c: 82 1f 20 03 xor %i4, 3, %g1
2007570: 90 02 20 10 add %o0, 0x10, %o0
2007574: 80 a0 00 01 cmp %g0, %g1
2007578: 98 10 20 00 clr %o4
200757c: b6 60 3f ff subx %g0, -1, %i3
2007580: 40 00 07 b6 call 2009458 <_CORE_RWLock_Obtain_for_reading>
2007584: 94 10 00 1b mov %i3, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2007588: 40 00 0f 32 call 200b250 <_Thread_Enable_dispatch>
200758c: 01 00 00 00 nop
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
2007590: 03 00 80 6c sethi %hi(0x201b000), %g1
2007594: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 201b10c <_Per_CPU_Information+0xc>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
2007598: 80 a6 e0 00 cmp %i3, 0
200759c: 12 80 00 05 bne 20075b0 <pthread_rwlock_timedrdlock+0x8c>
20075a0: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
20075a4: 80 a2 20 02 cmp %o0, 2
20075a8: 02 80 00 07 be 20075c4 <pthread_rwlock_timedrdlock+0xa0>
20075ac: 80 a7 20 00 cmp %i4, 0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
20075b0: 40 00 00 39 call 2007694 <_POSIX_RWLock_Translate_core_RWLock_return_code>
20075b4: 01 00 00 00 nop
20075b8: ba 10 00 08 mov %o0, %i5
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20075bc: 81 c7 e0 08 ret
20075c0: 91 e8 00 1d restore %g0, %i5, %o0
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
20075c4: 02 bf ff fe be 20075bc <pthread_rwlock_timedrdlock+0x98> <== NEVER TAKEN
20075c8: b8 07 3f ff add %i4, -1, %i4
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
20075cc: 80 a7 20 01 cmp %i4, 1
20075d0: 18 bf ff f8 bgu 20075b0 <pthread_rwlock_timedrdlock+0x8c> <== NEVER TAKEN
20075d4: ba 10 20 74 mov 0x74, %i5
20075d8: 30 bf ff f9 b,a 20075bc <pthread_rwlock_timedrdlock+0x98>
020075dc <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
20075dc: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
20075e0: 80 a6 20 00 cmp %i0, 0
20075e4: 02 80 00 24 be 2007674 <pthread_rwlock_timedwrlock+0x98>
20075e8: ba 10 20 16 mov 0x16, %i5
*
* 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 );
20075ec: 92 07 bf fc add %fp, -4, %o1
20075f0: 40 00 1c 91 call 200e834 <_POSIX_Absolute_timeout_to_ticks>
20075f4: 90 10 00 19 mov %i1, %o0
20075f8: d2 06 00 00 ld [ %i0 ], %o1
20075fc: b8 10 00 08 mov %o0, %i4
2007600: 94 07 bf f8 add %fp, -8, %o2
2007604: 11 00 80 6b sethi %hi(0x201ac00), %o0
2007608: 40 00 0b 40 call 200a308 <_Objects_Get>
200760c: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 201adc0 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2007610: c2 07 bf f8 ld [ %fp + -8 ], %g1
2007614: 80 a0 60 00 cmp %g1, 0
2007618: 12 80 00 17 bne 2007674 <pthread_rwlock_timedwrlock+0x98>
200761c: d6 07 bf fc ld [ %fp + -4 ], %o3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
2007620: d2 06 00 00 ld [ %i0 ], %o1
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
2007624: 82 1f 20 03 xor %i4, 3, %g1
2007628: 90 02 20 10 add %o0, 0x10, %o0
200762c: 80 a0 00 01 cmp %g0, %g1
2007630: 98 10 20 00 clr %o4
2007634: b6 60 3f ff subx %g0, -1, %i3
2007638: 40 00 07 be call 2009530 <_CORE_RWLock_Obtain_for_writing>
200763c: 94 10 00 1b mov %i3, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2007640: 40 00 0f 04 call 200b250 <_Thread_Enable_dispatch>
2007644: 01 00 00 00 nop
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
2007648: 03 00 80 6c sethi %hi(0x201b000), %g1
200764c: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 201b10c <_Per_CPU_Information+0xc>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
2007650: 80 a6 e0 00 cmp %i3, 0
2007654: 12 80 00 05 bne 2007668 <pthread_rwlock_timedwrlock+0x8c>
2007658: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
200765c: 80 a2 20 02 cmp %o0, 2
2007660: 02 80 00 07 be 200767c <pthread_rwlock_timedwrlock+0xa0>
2007664: 80 a7 20 00 cmp %i4, 0
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
2007668: 40 00 00 0b call 2007694 <_POSIX_RWLock_Translate_core_RWLock_return_code>
200766c: 01 00 00 00 nop
2007670: ba 10 00 08 mov %o0, %i5
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2007674: 81 c7 e0 08 ret
2007678: 91 e8 00 1d restore %g0, %i5, %o0
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
200767c: 02 bf ff fe be 2007674 <pthread_rwlock_timedwrlock+0x98> <== NEVER TAKEN
2007680: b8 07 3f ff add %i4, -1, %i4
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2007684: 80 a7 20 01 cmp %i4, 1
2007688: 18 bf ff f8 bgu 2007668 <pthread_rwlock_timedwrlock+0x8c> <== NEVER TAKEN
200768c: ba 10 20 74 mov 0x74, %i5
2007690: 30 bf ff f9 b,a 2007674 <pthread_rwlock_timedwrlock+0x98>
02007ebc <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
2007ebc: 82 10 00 08 mov %o0, %g1
if ( !attr )
2007ec0: 80 a0 60 00 cmp %g1, 0
2007ec4: 02 80 00 06 be 2007edc <pthread_rwlockattr_setpshared+0x20>
2007ec8: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2007ecc: c4 00 40 00 ld [ %g1 ], %g2
2007ed0: 80 a0 a0 00 cmp %g2, 0
2007ed4: 12 80 00 04 bne 2007ee4 <pthread_rwlockattr_setpshared+0x28>
2007ed8: 80 a2 60 01 cmp %o1, 1
return 0;
default:
return EINVAL;
}
}
2007edc: 81 c3 e0 08 retl
2007ee0: 01 00 00 00 nop
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
2007ee4: 18 bf ff fe bgu 2007edc <pthread_rwlockattr_setpshared+0x20><== NEVER TAKEN
2007ee8: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2007eec: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
default:
return EINVAL;
}
}
2007ef0: 81 c3 e0 08 retl
2007ef4: 90 10 20 00 clr %o0
02008ed4 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
2008ed4: 9d e3 bf 90 save %sp, -112, %sp
2008ed8: ba 10 00 18 mov %i0, %i5
int rc;
/*
* Check all the parameters
*/
if ( !param )
2008edc: 80 a6 a0 00 cmp %i2, 0
2008ee0: 02 80 00 38 be 2008fc0 <pthread_setschedparam+0xec>
2008ee4: b0 10 20 16 mov 0x16, %i0
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
2008ee8: 90 10 00 19 mov %i1, %o0
2008eec: 92 10 00 1a mov %i2, %o1
2008ef0: 94 07 bf f4 add %fp, -12, %o2
2008ef4: 40 00 1a 73 call 200f8c0 <_POSIX_Thread_Translate_sched_param>
2008ef8: 96 07 bf f8 add %fp, -8, %o3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
2008efc: b0 92 20 00 orcc %o0, 0, %i0
2008f00: 12 80 00 30 bne 2008fc0 <pthread_setschedparam+0xec>
2008f04: 90 10 00 1d mov %i5, %o0
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
2008f08: 40 00 0c 82 call 200c110 <_Thread_Get>
2008f0c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2008f10: c2 07 bf fc ld [ %fp + -4 ], %g1
2008f14: 80 a0 60 00 cmp %g1, 0
2008f18: 12 80 00 2c bne 2008fc8 <pthread_setschedparam+0xf4>
2008f1c: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
2008f20: fa 02 21 5c ld [ %o0 + 0x15c ], %i5
if ( api->schedpolicy == SCHED_SPORADIC )
2008f24: c2 07 60 84 ld [ %i5 + 0x84 ], %g1
2008f28: 80 a0 60 04 cmp %g1, 4
2008f2c: 02 80 00 33 be 2008ff8 <pthread_setschedparam+0x124>
2008f30: 01 00 00 00 nop
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
2008f34: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
api->schedparam = *param;
2008f38: c2 06 80 00 ld [ %i2 ], %g1
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
2008f3c: 80 a6 60 00 cmp %i1, 0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
2008f40: c2 27 60 88 st %g1, [ %i5 + 0x88 ]
2008f44: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2008f48: c4 27 60 8c st %g2, [ %i5 + 0x8c ]
2008f4c: c4 06 a0 08 ld [ %i2 + 8 ], %g2
2008f50: c4 27 60 90 st %g2, [ %i5 + 0x90 ]
2008f54: c4 06 a0 0c ld [ %i2 + 0xc ], %g2
2008f58: c4 27 60 94 st %g2, [ %i5 + 0x94 ]
2008f5c: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2
2008f60: c4 27 60 98 st %g2, [ %i5 + 0x98 ]
2008f64: c4 06 a0 14 ld [ %i2 + 0x14 ], %g2
2008f68: c4 27 60 9c st %g2, [ %i5 + 0x9c ]
2008f6c: c4 06 a0 18 ld [ %i2 + 0x18 ], %g2
2008f70: c4 27 60 a0 st %g2, [ %i5 + 0xa0 ]
the_thread->budget_algorithm = budget_algorithm;
2008f74: c4 07 bf f4 ld [ %fp + -12 ], %g2
2008f78: c4 27 20 7c st %g2, [ %i4 + 0x7c ]
the_thread->budget_callout = budget_callout;
2008f7c: c4 07 bf f8 ld [ %fp + -8 ], %g2
switch ( api->schedpolicy ) {
2008f80: 06 80 00 0e bl 2008fb8 <pthread_setschedparam+0xe4> <== NEVER TAKEN
2008f84: c4 27 20 80 st %g2, [ %i4 + 0x80 ]
2008f88: 80 a6 60 02 cmp %i1, 2
2008f8c: 04 80 00 11 ble 2008fd0 <pthread_setschedparam+0xfc>
2008f90: 07 00 80 6d sethi %hi(0x201b400), %g3
2008f94: 80 a6 60 04 cmp %i1, 4
2008f98: 12 80 00 08 bne 2008fb8 <pthread_setschedparam+0xe4> <== NEVER TAKEN
2008f9c: 01 00 00 00 nop
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
2008fa0: c2 27 60 a4 st %g1, [ %i5 + 0xa4 ]
_Watchdog_Remove( &api->Sporadic_timer );
2008fa4: 40 00 10 f2 call 200d36c <_Watchdog_Remove>
2008fa8: 90 07 60 a8 add %i5, 0xa8, %o0
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
2008fac: 90 10 20 00 clr %o0
2008fb0: 7f ff ff 7e call 2008da8 <_POSIX_Threads_Sporadic_budget_TSR>
2008fb4: 92 10 00 1c mov %i4, %o1
break;
}
_Thread_Enable_dispatch();
2008fb8: 40 00 0c 49 call 200c0dc <_Thread_Enable_dispatch>
2008fbc: 01 00 00 00 nop
return 0;
2008fc0: 81 c7 e0 08 ret
2008fc4: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
2008fc8: 81 c7 e0 08 ret
2008fcc: 91 e8 20 03 restore %g0, 3, %o0
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
2008fd0: 05 00 80 70 sethi %hi(0x201c000), %g2
2008fd4: d2 08 e1 5c ldub [ %g3 + 0x15c ], %o1
2008fd8: c4 00 a2 14 ld [ %g2 + 0x214 ], %g2
2008fdc: 92 22 40 01 sub %o1, %g1, %o1
2008fe0: c4 27 20 78 st %g2, [ %i4 + 0x78 ]
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
2008fe4: 90 10 00 1c mov %i4, %o0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
the_thread->real_priority =
2008fe8: d2 27 20 18 st %o1, [ %i4 + 0x18 ]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
2008fec: 40 00 0a fc call 200bbdc <_Thread_Change_priority>
2008ff0: 94 10 20 01 mov 1, %o2
the_thread,
the_thread->real_priority,
true
);
break;
2008ff4: 30 bf ff f1 b,a 2008fb8 <pthread_setschedparam+0xe4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
2008ff8: 40 00 10 dd call 200d36c <_Watchdog_Remove>
2008ffc: 90 07 60 a8 add %i5, 0xa8, %o0
api->schedpolicy = policy;
2009000: 10 bf ff ce b 2008f38 <pthread_setschedparam+0x64>
2009004: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
02006974 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
2006974: 9d e3 bf a0 save %sp, -96, %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() )
2006978: 3b 00 80 64 sethi %hi(0x2019000), %i5
200697c: ba 17 60 40 or %i5, 0x40, %i5 ! 2019040 <_Per_CPU_Information>
2006980: c2 07 60 08 ld [ %i5 + 8 ], %g1
2006984: 80 a0 60 00 cmp %g1, 0
2006988: 12 80 00 16 bne 20069e0 <pthread_testcancel+0x6c> <== NEVER TAKEN
200698c: 01 00 00 00 nop
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2006990: 03 00 80 62 sethi %hi(0x2018800), %g1
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2006994: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2006998: c6 00 63 00 ld [ %g1 + 0x300 ], %g3
200699c: c4 00 a1 5c ld [ %g2 + 0x15c ], %g2
20069a0: 86 00 e0 01 inc %g3
20069a4: c6 20 63 00 st %g3, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
20069a8: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
20069ac: c2 00 a0 d8 ld [ %g2 + 0xd8 ], %g1
20069b0: 80 a0 60 00 cmp %g1, 0
20069b4: 12 80 00 0d bne 20069e8 <pthread_testcancel+0x74> <== NEVER TAKEN
20069b8: 01 00 00 00 nop
20069bc: c2 00 a0 e0 ld [ %g2 + 0xe0 ], %g1
20069c0: 80 a0 60 00 cmp %g1, 0
20069c4: 02 80 00 09 be 20069e8 <pthread_testcancel+0x74>
20069c8: 01 00 00 00 nop
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
20069cc: 40 00 0c 04 call 20099dc <_Thread_Enable_dispatch>
20069d0: b2 10 3f ff mov -1, %i1 ! ffffffff <RAM_END+0xfdbfffff>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
20069d4: f0 07 60 0c ld [ %i5 + 0xc ], %i0
20069d8: 40 00 1a 3b call 200d2c4 <_POSIX_Thread_Exit>
20069dc: 81 e8 00 00 restore
20069e0: 81 c7 e0 08 ret <== NOT EXECUTED
20069e4: 81 e8 00 00 restore <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
20069e8: 40 00 0b fd call 20099dc <_Thread_Enable_dispatch>
20069ec: 81 e8 00 00 restore
0200b6d8 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
200b6d8: 9d e3 bf a0 save %sp, -96, %sp
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
200b6dc: 7f ff e1 bf call 2003dd8 <malloc>
200b6e0: 90 10 20 10 mov 0x10, %o0
if (rd == NULL) {
200b6e4: ba 92 20 00 orcc %o0, 0, %i5
200b6e8: 02 80 00 0b be 200b714 <ramdisk_allocate+0x3c> <== NEVER TAKEN
200b6ec: 80 a6 20 00 cmp %i0, 0
return NULL;
}
if (area_begin == NULL) {
200b6f0: 02 80 00 0b be 200b71c <ramdisk_allocate+0x44> <== ALWAYS TAKEN
200b6f4: 90 10 00 1a mov %i2, %o0
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
200b6f8: c0 2f 60 0d clrb [ %i5 + 0xd ] <== NOT EXECUTED
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
200b6fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
200b700: f2 27 40 00 st %i1, [ %i5 ]
rd->block_num = block_count;
200b704: f4 27 60 04 st %i2, [ %i5 + 4 ]
rd->area = area_begin;
200b708: f0 27 60 08 st %i0, [ %i5 + 8 ]
rd->trace = trace;
200b70c: f6 2f 60 0e stb %i3, [ %i5 + 0xe ]
rd->initialized = true;
200b710: c2 2f 60 0c stb %g1, [ %i5 + 0xc ]
return rd;
}
200b714: 81 c7 e0 08 ret
200b718: 91 e8 00 1d restore %g0, %i5, %o0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
200b71c: 7f ff e0 5a call 2003884 <calloc>
200b720: 92 10 00 19 mov %i1, %o1
if (area_begin == NULL) {
200b724: b0 92 20 00 orcc %o0, 0, %i0
200b728: 02 80 00 04 be 200b738 <ramdisk_allocate+0x60> <== NEVER TAKEN
200b72c: 82 10 20 01 mov 1, %g1
free(rd);
return NULL;
}
rd->malloced = true;
200b730: 10 bf ff f4 b 200b700 <ramdisk_allocate+0x28>
200b734: c2 2f 60 0d stb %g1, [ %i5 + 0xd ]
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
free(rd);
200b738: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200b73c: 7f ff e0 c5 call 2003a50 <free> <== NOT EXECUTED
200b740: ba 10 20 00 clr %i5 <== NOT EXECUTED
return NULL;
200b744: 30 bf ff f4 b,a 200b714 <ramdisk_allocate+0x3c> <== NOT EXECUTED
0200b748 <ramdisk_free>:
return rd;
}
void ramdisk_free(ramdisk *rd)
{
200b748: 9d e3 bf a0 save %sp, -96, %sp
if (rd != NULL) {
200b74c: 80 a6 20 00 cmp %i0, 0
200b750: 02 80 00 0c be 200b780 <ramdisk_free+0x38> <== NEVER TAKEN
200b754: 01 00 00 00 nop
if (rd->malloced) {
200b758: c2 0e 20 0d ldub [ %i0 + 0xd ], %g1
200b75c: 80 a0 60 00 cmp %g1, 0
200b760: 12 80 00 04 bne 200b770 <ramdisk_free+0x28> <== ALWAYS TAKEN
200b764: 01 00 00 00 nop
free(rd->area);
}
free(rd);
200b768: 7f ff e0 ba call 2003a50 <free> <== NOT EXECUTED
200b76c: 81 e8 00 00 restore <== NOT EXECUTED
void ramdisk_free(ramdisk *rd)
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
200b770: 7f ff e0 b8 call 2003a50 <free>
200b774: d0 06 20 08 ld [ %i0 + 8 ], %o0
}
free(rd);
200b778: 7f ff e0 b6 call 2003a50 <free>
200b77c: 81 e8 00 00 restore
200b780: 81 c7 e0 08 ret <== NOT EXECUTED
200b784: 81 e8 00 00 restore <== NOT EXECUTED
0200b5b4 <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200b5b4: 9d e3 bf a0 save %sp, -96, %sp
switch (req)
200b5b8: 03 30 06 10 sethi %hi(0xc0184000), %g1
200b5bc: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201>
200b5c0: 80 a6 40 01 cmp %i1, %g1
200b5c4: 02 80 00 04 be 200b5d4 <ramdisk_ioctl+0x20>
200b5c8: ba 10 00 1a mov %i2, %i5
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
200b5cc: 40 00 0b 7a call 200e3b4 <rtems_blkdev_ioctl>
200b5d0: 81 e8 00 00 restore
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
200b5d4: c2 06 80 00 ld [ %i2 ], %g1
200b5d8: 80 a0 60 00 cmp %g1, 0
200b5dc: 12 80 00 1d bne 200b650 <ramdisk_ioctl+0x9c>
200b5e0: f4 06 20 2c ld [ %i0 + 0x2c ], %i2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200b5e4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200b5e8: 80 a0 60 00 cmp %g1, 0
200b5ec: 02 80 00 11 be 200b630 <ramdisk_ioctl+0x7c> <== NEVER TAKEN
200b5f0: f0 06 a0 08 ld [ %i2 + 8 ], %i0
200b5f4: b8 07 60 18 add %i5, 0x18, %i4
200b5f8: b6 10 20 00 clr %i3
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
200b5fc: d0 07 00 00 ld [ %i4 ], %o0
200b600: d2 06 80 00 ld [ %i2 ], %o1
200b604: 40 00 2e 0b call 2016e30 <.umul>
200b608: f2 07 20 08 ld [ %i4 + 8 ], %i1
200b60c: d4 07 20 04 ld [ %i4 + 4 ], %o2
200b610: 92 06 00 08 add %i0, %o0, %o1
200b614: 40 00 23 06 call 201422c <memcpy>
200b618: 90 10 00 19 mov %i1, %o0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200b61c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200b620: b6 06 e0 01 inc %i3
200b624: 80 a6 c0 01 cmp %i3, %g1
200b628: 0a bf ff f5 bcs 200b5fc <ramdisk_ioctl+0x48> <== NEVER TAKEN
200b62c: b8 07 20 10 add %i4, 0x10, %i4
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200b630: c2 07 60 04 ld [ %i5 + 4 ], %g1
200b634: d0 07 60 08 ld [ %i5 + 8 ], %o0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
200b638: c0 27 60 0c clr [ %i5 + 0xc ]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200b63c: 92 10 20 00 clr %o1
200b640: 9f c0 40 00 call %g1
200b644: b0 10 20 00 clr %i0
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
200b648: 81 c7 e0 08 ret
200b64c: 81 e8 00 00 restore
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
200b650: 80 a0 60 01 cmp %g1, 1
200b654: 22 80 00 08 be,a 200b674 <ramdisk_ioctl+0xc0> <== ALWAYS TAKEN
200b658: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
200b65c: 40 00 20 b2 call 2013924 <__errno> <== NOT EXECUTED
200b660: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b664: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200b668: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
200b66c: 81 c7 e0 08 ret <== NOT EXECUTED
200b670: 81 e8 00 00 restore <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200b674: 80 a0 60 00 cmp %g1, 0
200b678: 02 bf ff ee be 200b630 <ramdisk_ioctl+0x7c> <== NEVER TAKEN
200b67c: f2 06 a0 08 ld [ %i2 + 8 ], %i1
200b680: b8 07 60 18 add %i5, 0x18, %i4
200b684: b6 10 20 00 clr %i3
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
200b688: d0 07 00 00 ld [ %i4 ], %o0
200b68c: d2 06 80 00 ld [ %i2 ], %o1
200b690: 40 00 2d e8 call 2016e30 <.umul>
200b694: b6 06 e0 01 inc %i3
200b698: d2 07 20 08 ld [ %i4 + 8 ], %o1
200b69c: d4 07 20 04 ld [ %i4 + 4 ], %o2
200b6a0: 40 00 22 e3 call 201422c <memcpy>
200b6a4: 90 06 40 08 add %i1, %o0, %o0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200b6a8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200b6ac: 80 a6 c0 01 cmp %i3, %g1
200b6b0: 0a bf ff f6 bcs 200b688 <ramdisk_ioctl+0xd4>
200b6b4: b8 07 20 10 add %i4, 0x10, %i4
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200b6b8: c2 07 60 04 ld [ %i5 + 4 ], %g1
200b6bc: d0 07 60 08 ld [ %i5 + 8 ], %o0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
200b6c0: c0 27 60 0c clr [ %i5 + 0xc ]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200b6c4: 92 10 20 00 clr %o1
200b6c8: 9f c0 40 00 call %g1
200b6cc: b0 10 20 00 clr %i0
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
200b6d0: 81 c7 e0 08 ret
200b6d4: 81 e8 00 00 restore
0200b788 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
200b788: 9d e3 bf 90 save %sp, -112, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200b78c: 90 10 20 00 clr %o0
const char *disk,
dev_t *dev_ptr
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
200b790: c0 27 bf fc clr [ %fp + -4 ]
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200b794: 94 07 bf fc add %fp, -4, %o2
200b798: 13 00 80 65 sethi %hi(0x2019400), %o1
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
200b79c: ba 10 00 18 mov %i0, %i5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200b7a0: 92 12 63 54 or %o1, 0x354, %o1
200b7a4: 7f ff f1 9b call 2007e10 <rtems_io_register_driver>
200b7a8: b0 10 20 0d mov 0xd, %i0
if (sc != RTEMS_SUCCESSFUL) {
200b7ac: 80 a2 20 00 cmp %o0, 0
200b7b0: 12 80 00 1c bne 200b820 <ramdisk_register+0x98> <== NEVER TAKEN
200b7b4: 96 10 00 1a mov %i2, %o3
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
200b7b8: 92 10 00 1d mov %i5, %o1
200b7bc: 7f ff ff c7 call 200b6d8 <ramdisk_allocate>
200b7c0: 94 10 00 19 mov %i1, %o2
if (rd == NULL) {
200b7c4: b4 92 20 00 orcc %o0, 0, %i2
200b7c8: 02 80 00 14 be 200b818 <ramdisk_register+0x90> <== NEVER TAKEN
200b7cc: e0 07 bf fc ld [ %fp + -4 ], %l0
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
200b7d0: f6 23 a0 5c st %i3, [ %sp + 0x5c ]
200b7d4: 90 10 00 10 mov %l0, %o0
200b7d8: 92 10 20 00 clr %o1
200b7dc: 94 10 00 1d mov %i5, %o2
200b7e0: 96 10 00 19 mov %i1, %o3
200b7e4: 9a 10 00 1a mov %i2, %o5
200b7e8: 19 00 80 2d sethi %hi(0x200b400), %o4
200b7ec: 7f ff dc 82 call 20029f4 <rtems_disk_create_phys>
200b7f0: 98 13 21 b4 or %o4, 0x1b4, %o4 ! 200b5b4 <ramdisk_ioctl>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
200b7f4: 80 a2 20 00 cmp %o0, 0
200b7f8: 12 80 00 06 bne 200b810 <ramdisk_register+0x88> <== NEVER TAKEN
200b7fc: 01 00 00 00 nop
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
200b800: e0 27 00 00 st %l0, [ %i4 ]
200b804: c0 27 20 04 clr [ %i4 + 4 ]
return RTEMS_SUCCESSFUL;
}
200b808: 81 c7 e0 08 ret
200b80c: 91 e8 20 00 restore %g0, 0, %o0
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
ramdisk_free(rd);
200b810: 7f ff ff ce call 200b748 <ramdisk_free> <== NOT EXECUTED
200b814: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_io_unregister_driver(major);
200b818: 7f ff f1 e6 call 2007fb0 <rtems_io_unregister_driver> <== NOT EXECUTED
200b81c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
200b820: 81 c7 e0 08 ret <== NOT EXECUTED
200b824: 81 e8 00 00 restore <== NOT EXECUTED
0201a1b8 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
201a1b8: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201a1bc: 03 00 80 73 sethi %hi(0x201cc00), %g1
201a1c0: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 201ceb8 <rtems_libio_number_iops>
201a1c4: 80 a6 00 01 cmp %i0, %g1
201a1c8: 1a 80 00 1e bcc 201a240 <read+0x88>
201a1cc: 03 00 80 76 sethi %hi(0x201d800), %g1
iop = rtems_libio_iop( fd );
201a1d0: fa 00 61 34 ld [ %g1 + 0x134 ], %i5 ! 201d934 <rtems_libio_iops>
201a1d4: b1 2e 20 06 sll %i0, 6, %i0
201a1d8: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
201a1dc: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201a1e0: 80 88 61 00 btst 0x100, %g1
201a1e4: 02 80 00 17 be 201a240 <read+0x88>
201a1e8: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201a1ec: 02 80 00 1b be 201a258 <read+0xa0> <== NEVER TAKEN
201a1f0: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201a1f4: 02 80 00 11 be 201a238 <read+0x80>
201a1f8: b0 10 20 00 clr %i0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
201a1fc: 80 88 60 02 btst 2, %g1
201a200: 02 80 00 10 be 201a240 <read+0x88>
201a204: 90 10 00 1d mov %i5, %o0
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
201a208: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
201a20c: c2 00 60 08 ld [ %g1 + 8 ], %g1
201a210: 92 10 00 19 mov %i1, %o1
201a214: 9f c0 40 00 call %g1
201a218: 94 10 00 1a mov %i2, %o2
if ( rc > 0 )
201a21c: b0 92 20 00 orcc %o0, 0, %i0
201a220: 04 80 00 06 ble 201a238 <read+0x80>
201a224: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
201a228: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201a22c: 86 83 40 18 addcc %o5, %i0, %g3
201a230: 84 43 00 02 addx %o4, %g2, %g2
201a234: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
return rc;
}
201a238: 81 c7 e0 08 ret
201a23c: 81 e8 00 00 restore
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
201a240: 7f ff d6 23 call 200facc <__errno>
201a244: b0 10 3f ff mov -1, %i0
201a248: 82 10 20 09 mov 9, %g1
201a24c: c2 22 00 00 st %g1, [ %o0 ]
201a250: 81 c7 e0 08 ret
201a254: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
201a258: 7f ff d6 1d call 200facc <__errno> <== NOT EXECUTED
201a25c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201a260: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201a264: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201a268: 81 c7 e0 08 ret <== NOT EXECUTED
201a26c: 81 e8 00 00 restore <== NOT EXECUTED
020050dc <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
20050dc: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
20050e0: 80 a6 60 00 cmp %i1, 0
20050e4: 02 80 00 26 be 200517c <readlink+0xa0>
20050e8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
20050ec: 40 00 34 99 call 2012350 <strlen>
20050f0: 90 10 00 18 mov %i0, %o0
20050f4: 94 10 20 00 clr %o2
20050f8: 92 10 00 08 mov %o0, %o1
20050fc: 96 07 bf ec add %fp, -20, %o3
2005100: 90 10 00 18 mov %i0, %o0
2005104: 98 10 20 00 clr %o4
2005108: 7f ff fa 55 call 2003a5c <rtems_filesystem_evaluate_path>
200510c: b0 10 3f ff mov -1, %i0
0, &loc, false );
if ( result != 0 )
2005110: 80 a2 20 00 cmp %o0, 0
2005114: 12 80 00 10 bne 2005154 <readlink+0x78> <== NEVER TAKEN
2005118: c2 07 bf f8 ld [ %fp + -8 ], %g1
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
200511c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2005120: 9f c0 40 00 call %g1
2005124: 90 07 bf ec add %fp, -20, %o0
2005128: 80 a2 20 04 cmp %o0, 4
200512c: 12 80 00 0c bne 200515c <readlink+0x80>
2005130: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
2005134: 92 10 00 19 mov %i1, %o1
2005138: c2 00 60 3c ld [ %g1 + 0x3c ], %g1
200513c: 94 10 00 1a mov %i2, %o2
2005140: 9f c0 40 00 call %g1
2005144: 90 07 bf ec add %fp, -20, %o0
2005148: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
200514c: 7f ff fa d8 call 2003cac <rtems_filesystem_freenode>
2005150: 90 07 bf ec add %fp, -20, %o0
return result;
}
2005154: 81 c7 e0 08 ret
2005158: 81 e8 00 00 restore
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
200515c: 7f ff fa d4 call 2003cac <rtems_filesystem_freenode>
2005160: 90 07 bf ec add %fp, -20, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
2005164: 40 00 2f 5e call 2010edc <__errno>
2005168: 01 00 00 00 nop
200516c: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2005170: c2 22 00 00 st %g1, [ %o0 ]
2005174: 81 c7 e0 08 ret
2005178: 81 e8 00 00 restore
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
200517c: 40 00 2f 58 call 2010edc <__errno>
2005180: b0 10 3f ff mov -1, %i0
2005184: 82 10 20 0e mov 0xe, %g1
2005188: c2 22 00 00 st %g1, [ %o0 ]
200518c: 81 c7 e0 08 ret
2005190: 81 e8 00 00 restore
02004a5c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
2004a5c: 9d e3 bf a0 save %sp, -96, %sp
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
2004a60: 03 00 80 5e sethi %hi(0x2017800), %g1
2004a64: c2 00 63 38 ld [ %g1 + 0x338 ], %g1 ! 2017b38 <rtems_libio_number_iops>
2004a68: 80 a6 00 01 cmp %i0, %g1
2004a6c: 1a 80 00 48 bcc 2004b8c <readv+0x130>
2004a70: 03 00 80 61 sethi %hi(0x2018400), %g1
iop = rtems_libio_iop( fd );
2004a74: f8 00 61 80 ld [ %g1 + 0x180 ], %i4 ! 2018580 <rtems_libio_iops>
2004a78: b1 2e 20 06 sll %i0, 6, %i0
2004a7c: b8 07 00 18 add %i4, %i0, %i4
rtems_libio_check_is_open( iop );
2004a80: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
2004a84: 80 88 61 00 btst 0x100, %g1
2004a88: 02 80 00 41 be 2004b8c <readv+0x130>
2004a8c: 80 88 60 02 btst 2, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
2004a90: 02 80 00 3f be 2004b8c <readv+0x130> <== NEVER TAKEN
2004a94: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
2004a98: 02 80 00 37 be 2004b74 <readv+0x118>
2004a9c: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
2004aa0: 04 80 00 35 ble 2004b74 <readv+0x118>
2004aa4: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2004aa8: 14 80 00 33 bg 2004b74 <readv+0x118> <== NEVER TAKEN
2004aac: b5 2e a0 03 sll %i2, 3, %i2
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
2004ab0: 82 10 20 00 clr %g1
2004ab4: ba 10 20 01 mov 1, %i5
2004ab8: 10 80 00 03 b 2004ac4 <readv+0x68>
2004abc: 84 10 20 00 clr %g2
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
2004ac0: 84 10 00 04 mov %g4, %g2
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
2004ac4: c6 06 40 01 ld [ %i1 + %g1 ], %g3
2004ac8: 80 a0 e0 00 cmp %g3, 0
2004acc: 02 80 00 2a be 2004b74 <readv+0x118>
2004ad0: 88 06 40 01 add %i1, %g1, %g4
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
2004ad4: c6 01 20 04 ld [ %g4 + 4 ], %g3
2004ad8: 88 00 c0 02 add %g3, %g2, %g4
if ( total < old )
2004adc: 80 a1 00 02 cmp %g4, %g2
2004ae0: 06 80 00 25 bl 2004b74 <readv+0x118>
2004ae4: 82 00 60 08 add %g1, 8, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
2004ae8: 80 a0 00 03 cmp %g0, %g3
2004aec: 84 40 3f ff addx %g0, -1, %g2
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2004af0: 80 a0 40 1a cmp %g1, %i2
2004af4: 12 bf ff f3 bne 2004ac0 <readv+0x64>
2004af8: ba 0f 40 02 and %i5, %g2, %i5
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
2004afc: 80 8f 60 ff btst 0xff, %i5
2004b00: 12 80 00 1b bne 2004b6c <readv+0x110>
2004b04: b0 10 20 00 clr %i0
2004b08: ba 10 20 00 clr %i5
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
2004b0c: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
2004b10: b6 06 40 1d add %i1, %i5, %i3
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
2004b14: d2 06 40 1d ld [ %i1 + %i5 ], %o1
2004b18: c2 00 60 08 ld [ %g1 + 8 ], %g1
2004b1c: d4 06 e0 04 ld [ %i3 + 4 ], %o2
2004b20: 9f c0 40 00 call %g1
2004b24: 90 10 00 1c mov %i4, %o0
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
2004b28: 80 a2 20 00 cmp %o0, 0
2004b2c: 26 80 00 10 bl,a 2004b6c <readv+0x110> <== NEVER TAKEN
2004b30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
2004b34: 02 80 00 07 be 2004b50 <readv+0xf4> <== NEVER TAKEN
2004b38: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
2004b3c: c4 1f 20 10 ldd [ %i4 + 0x10 ], %g2
2004b40: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2004b44: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
2004b48: 84 40 80 10 addx %g2, %l0, %g2
2004b4c: c4 3f 20 10 std %g2, [ %i4 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
2004b50: c2 06 e0 04 ld [ %i3 + 4 ], %g1
2004b54: 80 a2 00 01 cmp %o0, %g1
2004b58: 12 80 00 05 bne 2004b6c <readv+0x110> <== NEVER TAKEN
2004b5c: ba 07 60 08 add %i5, 8, %i5
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2004b60: 80 a7 40 1a cmp %i5, %i2
2004b64: 32 bf ff eb bne,a 2004b10 <readv+0xb4>
2004b68: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
2004b6c: 81 c7 e0 08 ret
2004b70: 81 e8 00 00 restore
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
2004b74: 40 00 2e 39 call 2010458 <__errno>
2004b78: b0 10 3f ff mov -1, %i0
2004b7c: 82 10 20 16 mov 0x16, %g1
2004b80: c2 22 00 00 st %g1, [ %o0 ]
2004b84: 81 c7 e0 08 ret
2004b88: 81 e8 00 00 restore
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
2004b8c: 40 00 2e 33 call 2010458 <__errno>
2004b90: b0 10 3f ff mov -1, %i0
2004b94: 82 10 20 09 mov 9, %g1
2004b98: c2 22 00 00 st %g1, [ %o0 ]
2004b9c: 81 c7 e0 08 ret
2004ba0: 81 e8 00 00 restore
0201a2cc <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
201a2cc: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
201a2d0: 3b 00 80 76 sethi %hi(0x201d800), %i5
201a2d4: ba 17 61 50 or %i5, 0x150, %i5 ! 201d950 <rtems_malloc_statistics>
201a2d8: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
201a2dc: 03 00 80 77 sethi %hi(0x201dc00), %g1
201a2e0: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201dc54 <_System_state_Current>
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
201a2e4: 84 00 a0 01 inc %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
201a2e8: 80 a0 60 03 cmp %g1, 3
201a2ec: 02 80 00 2c be 201a39c <realloc+0xd0> <== ALWAYS TAKEN
201a2f0: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
}
/*
* Continue with realloc().
*/
if ( !ptr )
201a2f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201a2f8: 02 80 00 49 be 201a41c <realloc+0x150>
201a2fc: 01 00 00 00 nop
return malloc( size );
if ( !size ) {
201a300: 80 a6 60 00 cmp %i1, 0
201a304: 02 80 00 3b be 201a3f0 <realloc+0x124> <== NEVER TAKEN
201a308: 39 00 80 73 sethi %hi(0x201cc00), %i4
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
201a30c: d0 07 22 70 ld [ %i4 + 0x270 ], %o0 ! 201ce70 <RTEMS_Malloc_Heap>
201a310: 92 10 00 18 mov %i0, %o1
201a314: 40 00 01 da call 201aa7c <_Protected_heap_Get_block_size>
201a318: 94 07 bf fc add %fp, -4, %o2
201a31c: 80 8a 20 ff btst 0xff, %o0
201a320: 02 80 00 39 be 201a404 <realloc+0x138>
201a324: 01 00 00 00 nop
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
201a328: d0 07 22 70 ld [ %i4 + 0x270 ], %o0
201a32c: 92 10 00 18 mov %i0, %o1
201a330: 40 00 01 e1 call 201aab4 <_Protected_heap_Resize_block>
201a334: 94 10 00 19 mov %i1, %o2
201a338: 80 8a 20 ff btst 0xff, %o0
201a33c: 02 80 00 04 be 201a34c <realloc+0x80>
201a340: 01 00 00 00 nop
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
201a344: 81 c7 e0 08 ret
201a348: 81 e8 00 00 restore
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
201a34c: 7f ff a3 d7 call 20032a8 <malloc>
201a350: 90 10 00 19 mov %i1, %o0
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
201a354: c2 07 60 04 ld [ %i5 + 4 ], %g1
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
201a358: b8 10 00 08 mov %o0, %i4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
201a35c: 82 00 7f ff add %g1, -1, %g1
if ( !new_area ) {
201a360: 80 a2 20 00 cmp %o0, 0
201a364: 02 80 00 30 be 201a424 <realloc+0x158>
201a368: c2 27 60 04 st %g1, [ %i5 + 4 ]
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
201a36c: c2 07 bf fc ld [ %fp + -4 ], %g1
201a370: 80 a6 40 01 cmp %i1, %g1
201a374: 18 80 00 16 bgu 201a3cc <realloc+0x100> <== ALWAYS TAKEN
201a378: 94 10 00 19 mov %i1, %o2
201a37c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201a380: 7f ff d8 2f call 201043c <memcpy> <== NOT EXECUTED
201a384: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free( ptr );
201a388: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201a38c: 7f ff a2 e5 call 2002f20 <free> <== NOT EXECUTED
201a390: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
return new_area;
201a394: 81 c7 e0 08 ret <== NOT EXECUTED
201a398: 81 e8 00 00 restore <== NOT EXECUTED
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
201a39c: 03 00 80 76 sethi %hi(0x201d800), %g1
201a3a0: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 201db00 <_Thread_Dispatch_disable_level>
201a3a4: 80 a0 60 00 cmp %g1, 0
201a3a8: 12 80 00 07 bne 201a3c4 <realloc+0xf8> <== NEVER TAKEN
201a3ac: 01 00 00 00 nop
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
201a3b0: 03 00 80 78 sethi %hi(0x201e000), %g1
201a3b4: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 ! 201e048 <_Per_CPU_Information+0x8>
201a3b8: 80 a0 60 00 cmp %g1, 0
201a3bc: 22 bf ff cf be,a 201a2f8 <realloc+0x2c> <== ALWAYS TAKEN
201a3c0: 80 a6 20 00 cmp %i0, 0
return (void *) 0;
201a3c4: 81 c7 e0 08 ret <== NOT EXECUTED
201a3c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
201a3cc: 92 10 00 18 mov %i0, %o1
201a3d0: 94 10 00 01 mov %g1, %o2
201a3d4: 7f ff d8 1a call 201043c <memcpy>
201a3d8: 90 10 00 1c mov %i4, %o0
free( ptr );
201a3dc: 90 10 00 18 mov %i0, %o0
201a3e0: 7f ff a2 d0 call 2002f20 <free>
201a3e4: b0 10 00 1c mov %i4, %i0
return new_area;
201a3e8: 81 c7 e0 08 ret
201a3ec: 81 e8 00 00 restore
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
201a3f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201a3f4: 7f ff a2 cb call 2002f20 <free> <== NOT EXECUTED
201a3f8: b0 10 20 00 clr %i0 <== NOT EXECUTED
return (void *) 0;
201a3fc: 81 c7 e0 08 ret <== NOT EXECUTED
201a400: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
201a404: 7f ff d5 b2 call 200facc <__errno>
201a408: b0 10 20 00 clr %i0
201a40c: 82 10 20 16 mov 0x16, %g1
201a410: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
201a414: 81 c7 e0 08 ret
201a418: 81 e8 00 00 restore
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
201a41c: 7f ff a3 a3 call 20032a8 <malloc>
201a420: 91 e8 00 19 restore %g0, %i1, %o0
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
201a424: 81 c7 e0 08 ret
201a428: 91 e8 20 00 restore %g0, 0, %o0
02003e54 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
2003e54: 9d e3 bf 70 save %sp, -144, %sp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
2003e58: 90 10 00 18 mov %i0, %o0
2003e5c: 7f ff fc 13 call 2002ea8 <rtems_filesystem_dirname>
2003e60: ba 10 00 18 mov %i0, %i5
if ( parentpathlen == 0 )
2003e64: 80 a2 20 00 cmp %o0, 0
2003e68: 12 80 00 29 bne 2003f0c <rmdir+0xb8>
2003e6c: b6 10 00 08 mov %o0, %i3
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
2003e70: b8 07 bf d4 add %fp, -44, %i4
2003e74: 90 10 00 18 mov %i0, %o0
2003e78: 92 07 bf fc add %fp, -4, %o1
2003e7c: 94 10 00 1c mov %i4, %o2
2003e80: 40 00 00 56 call 2003fd8 <rtems_filesystem_get_start_loc>
2003e84: b6 10 20 00 clr %i3
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
2003e88: b4 10 20 00 clr %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2003e8c: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = pathname + parentpathlen;
2003e90: ba 07 40 1b add %i5, %i3, %i5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2003e94: c2 27 bf e8 st %g1, [ %fp + -24 ]
2003e98: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2003e9c: 90 10 00 1d mov %i5, %o0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2003ea0: c2 27 bf ec st %g1, [ %fp + -20 ]
2003ea4: c2 07 bf dc ld [ %fp + -36 ], %g1
2003ea8: c2 27 bf f0 st %g1, [ %fp + -16 ]
2003eac: c2 07 bf e0 ld [ %fp + -32 ], %g1
2003eb0: c2 27 bf f4 st %g1, [ %fp + -12 ]
2003eb4: c2 07 bf e4 ld [ %fp + -28 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2003eb8: 40 00 33 47 call 2010bd4 <strlen>
2003ebc: c2 27 bf f8 st %g1, [ %fp + -8 ]
2003ec0: 92 10 00 08 mov %o0, %o1
2003ec4: 7f ff fc 08 call 2002ee4 <rtems_filesystem_prefix_separators>
2003ec8: 90 10 00 1d mov %i5, %o0
2003ecc: ba 07 40 08 add %i5, %o0, %i5
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2003ed0: 40 00 33 41 call 2010bd4 <strlen>
2003ed4: 90 10 00 1d mov %i5, %o0
2003ed8: 94 10 20 00 clr %o2
2003edc: 92 10 00 08 mov %o0, %o1
2003ee0: 96 07 bf e8 add %fp, -24, %o3
2003ee4: 90 10 00 1d mov %i5, %o0
2003ee8: 7f ff fb c4 call 2002df8 <rtems_filesystem_evaluate_relative_path>
2003eec: 98 10 20 00 clr %o4
0, &loc, false );
if ( result != 0 ) {
2003ef0: 80 a2 20 00 cmp %o0, 0
2003ef4: 02 80 00 17 be 2003f50 <rmdir+0xfc>
2003ef8: 80 8e a0 ff btst 0xff, %i2
if ( free_parentloc )
2003efc: 12 80 00 11 bne 2003f40 <rmdir+0xec>
2003f00: b0 10 3f ff mov -1, %i0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
2003f04: 81 c7 e0 08 ret
2003f08: 81 e8 00 00 restore
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
2003f0c: b8 07 bf d4 add %fp, -44, %i4
2003f10: 90 10 00 18 mov %i0, %o0
2003f14: 92 10 00 1b mov %i3, %o1
2003f18: 94 10 20 02 mov 2, %o2
2003f1c: 96 10 00 1c mov %i4, %o3
2003f20: 98 10 20 00 clr %o4
2003f24: 7f ff fb d2 call 2002e6c <rtems_filesystem_evaluate_path>
2003f28: b0 10 3f ff mov -1, %i0
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
2003f2c: 80 a2 20 00 cmp %o0, 0
2003f30: 12 bf ff f5 bne 2003f04 <rmdir+0xb0> <== NEVER TAKEN
2003f34: b4 10 20 01 mov 1, %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2003f38: 10 bf ff d6 b 2003e90 <rmdir+0x3c>
2003f3c: c2 07 bf d4 ld [ %fp + -44 ], %g1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
2003f40: 7f ff fc 05 call 2002f54 <rtems_filesystem_freenode>
2003f44: 90 10 00 1c mov %i4, %o0
2003f48: 81 c7 e0 08 ret
2003f4c: 81 e8 00 00 restore
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
2003f50: c2 07 bf f4 ld [ %fp + -12 ], %g1
2003f54: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2003f58: 9f c0 40 00 call %g1
2003f5c: 90 07 bf e8 add %fp, -24, %o0
2003f60: 80 a2 20 01 cmp %o0, 1
2003f64: 12 80 00 10 bne 2003fa4 <rmdir+0x150>
2003f68: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
2003f6c: 92 07 bf e8 add %fp, -24, %o1
2003f70: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2003f74: 9f c0 40 00 call %g1
2003f78: 90 10 00 1c mov %i4, %o0
2003f7c: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2003f80: 7f ff fb f5 call 2002f54 <rtems_filesystem_freenode>
2003f84: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
2003f88: 80 8e a0 ff btst 0xff, %i2
2003f8c: 02 80 00 11 be 2003fd0 <rmdir+0x17c>
2003f90: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
2003f94: 7f ff fb f0 call 2002f54 <rtems_filesystem_freenode>
2003f98: 90 10 00 1c mov %i4, %o0
return result;
}
2003f9c: 81 c7 e0 08 ret
2003fa0: 81 e8 00 00 restore
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
2003fa4: 7f ff fb ec call 2002f54 <rtems_filesystem_freenode>
2003fa8: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
2003fac: 80 8e a0 ff btst 0xff, %i2
2003fb0: 02 80 00 04 be 2003fc0 <rmdir+0x16c> <== NEVER TAKEN
2003fb4: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
2003fb8: 7f ff fb e7 call 2002f54 <rtems_filesystem_freenode>
2003fbc: 90 10 00 1c mov %i4, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
2003fc0: 40 00 2f 95 call 200fe14 <__errno>
2003fc4: b0 10 3f ff mov -1, %i0
2003fc8: 82 10 20 14 mov 0x14, %g1
2003fcc: c2 22 00 00 st %g1, [ %o0 ]
2003fd0: 81 c7 e0 08 ret
2003fd4: 81 e8 00 00 restore
02007548 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
2007548: 9d e3 bf 78 save %sp, -136, %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);
200754c: 3b 00 80 67 sethi %hi(0x2019c00), %i5
2007550: 40 00 02 75 call 2007f24 <pthread_mutex_lock>
2007554: 90 17 61 3c or %i5, 0x13c, %o0 ! 2019d3c <aio_request_queue>
if (result != 0) {
2007558: b8 92 20 00 orcc %o0, 0, %i4
200755c: 12 80 00 31 bne 2007620 <rtems_aio_enqueue+0xd8> <== NEVER TAKEN
2007560: 90 10 00 18 mov %i0, %o0
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);
2007564: 40 00 04 a5 call 20087f8 <pthread_self>
2007568: b6 17 61 3c or %i5, 0x13c, %i3
200756c: 92 07 bf fc add %fp, -4, %o1
2007570: 40 00 03 93 call 20083bc <pthread_getschedparam>
2007574: 94 07 bf dc add %fp, -36, %o2
req->caller_thread = pthread_self ();
2007578: 40 00 04 a0 call 20087f8 <pthread_self>
200757c: 01 00 00 00 nop
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007580: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
req->policy = policy;
2007584: c6 07 bf fc ld [ %fp + -4 ], %g3
/* _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;
2007588: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
req->policy = policy;
200758c: c6 26 20 08 st %g3, [ %i0 + 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;
2007590: c6 07 bf dc ld [ %fp + -36 ], %g3
/* _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 ();
2007594: d0 26 20 10 st %o0, [ %i0 + 0x10 ]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007598: 84 20 c0 02 sub %g3, %g2, %g2
200759c: c4 26 20 0c st %g2, [ %i0 + 0xc ]
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
20075a0: c4 06 e0 68 ld [ %i3 + 0x68 ], %g2
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
20075a4: 86 10 20 77 mov 0x77, %g3
req->aiocbp->return_value = 0;
20075a8: c0 20 60 38 clr [ %g1 + 0x38 ]
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
20075ac: c6 20 60 34 st %g3, [ %g1 + 0x34 ]
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
20075b0: 80 a0 a0 00 cmp %g2, 0
20075b4: 12 80 00 06 bne 20075cc <rtems_aio_enqueue+0x84> <== NEVER TAKEN
20075b8: d2 00 40 00 ld [ %g1 ], %o1
20075bc: c4 06 e0 64 ld [ %i3 + 0x64 ], %g2
20075c0: 80 a0 a0 04 cmp %g2, 4
20075c4: 24 80 00 1b ble,a 2007630 <rtems_aio_enqueue+0xe8>
20075c8: 90 06 e0 48 add %i3, 0x48, %o0
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,
20075cc: 94 10 20 00 clr %o2
20075d0: 11 00 80 67 sethi %hi(0x2019c00), %o0
20075d4: 7f ff fe a0 call 2007054 <rtems_aio_search_fd>
20075d8: 90 12 21 84 or %o0, 0x184, %o0 ! 2019d84 <aio_request_queue+0x48>
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
20075dc: b4 92 20 00 orcc %o0, 0, %i2
20075e0: 22 80 00 31 be,a 20076a4 <rtems_aio_enqueue+0x15c>
20075e4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
{
pthread_mutex_lock (&r_chain->mutex);
20075e8: b6 06 a0 1c add %i2, 0x1c, %i3
20075ec: 40 00 02 4e call 2007f24 <pthread_mutex_lock>
20075f0: 90 10 00 1b mov %i3, %o0
rtems_aio_insert_prio (&r_chain->perfd, req);
20075f4: 90 06 a0 08 add %i2, 8, %o0
20075f8: 7f ff ff 89 call 200741c <rtems_aio_insert_prio>
20075fc: 92 10 00 18 mov %i0, %o1
pthread_cond_signal (&r_chain->cond);
2007600: 40 00 01 25 call 2007a94 <pthread_cond_signal>
2007604: 90 06 a0 20 add %i2, 0x20, %o0
pthread_mutex_unlock (&r_chain->mutex);
2007608: 40 00 02 67 call 2007fa4 <pthread_mutex_unlock>
200760c: 90 10 00 1b mov %i3, %o0
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
2007610: 40 00 02 65 call 2007fa4 <pthread_mutex_unlock>
2007614: 90 17 61 3c or %i5, 0x13c, %o0
return 0;
}
2007618: 81 c7 e0 08 ret
200761c: 91 e8 00 1c restore %g0, %i4, %o0
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
2007620: 7f ff f0 25 call 20036b4 <free> <== NOT EXECUTED
2007624: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
2007628: 81 c7 e0 08 ret <== NOT EXECUTED
200762c: 81 e8 00 00 restore <== NOT EXECUTED
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);
2007630: 7f ff fe 89 call 2007054 <rtems_aio_search_fd>
2007634: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2007638: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
200763c: 80 a0 60 01 cmp %g1, 1
2007640: 12 bf ff ea bne 20075e8 <rtems_aio_enqueue+0xa0>
2007644: b4 10 00 08 mov %o0, %i2
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
2007648: 90 02 20 08 add %o0, 8, %o0
200764c: 40 00 09 11 call 2009a90 <_Chain_Insert>
2007650: 92 10 00 18 mov %i0, %o1
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
2007654: 92 10 20 00 clr %o1
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
if (r_chain->new_fd == 1) {
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
2007658: c0 26 a0 18 clr [ %i2 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
200765c: 40 00 01 da call 2007dc4 <pthread_mutex_init>
2007660: 90 06 a0 1c add %i2, 0x1c, %o0
pthread_cond_init (&r_chain->cond, NULL);
2007664: 92 10 20 00 clr %o1
2007668: 40 00 00 db call 20079d4 <pthread_cond_init>
200766c: 90 06 a0 20 add %i2, 0x20, %o0
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
2007670: 90 07 bf f8 add %fp, -8, %o0
2007674: 92 06 e0 08 add %i3, 8, %o1
2007678: 96 10 00 1a mov %i2, %o3
200767c: 15 00 80 1c sethi %hi(0x2007000), %o2
2007680: 40 00 02 ae call 2008138 <pthread_create>
2007684: 94 12 a1 b0 or %o2, 0x1b0, %o2 ! 20071b0 <rtems_aio_handle>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
2007688: 82 92 20 00 orcc %o0, 0, %g1
200768c: 12 80 00 25 bne 2007720 <rtems_aio_enqueue+0x1d8> <== NEVER TAKEN
2007690: 90 10 00 1b mov %i3, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
2007694: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
2007698: 82 00 60 01 inc %g1
200769c: 10 bf ff dd b 2007610 <rtems_aio_enqueue+0xc8>
20076a0: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
20076a4: 11 00 80 67 sethi %hi(0x2019c00), %o0
20076a8: d2 00 40 00 ld [ %g1 ], %o1
20076ac: 90 12 21 90 or %o0, 0x190, %o0
20076b0: 7f ff fe 69 call 2007054 <rtems_aio_search_fd>
20076b4: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
20076b8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
20076bc: b4 10 00 08 mov %o0, %i2
20076c0: 92 10 00 18 mov %i0, %o1
if (r_chain->new_fd == 1) {
20076c4: 80 a0 60 01 cmp %g1, 1
20076c8: 02 80 00 0b be 20076f4 <rtems_aio_enqueue+0x1ac>
20076cc: 90 02 20 08 add %o0, 8, %o0
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
20076d0: 7f ff ff 53 call 200741c <rtems_aio_insert_prio>
20076d4: 01 00 00 00 nop
if (aio_request_queue.idle_threads > 0)
20076d8: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
20076dc: 80 a0 60 00 cmp %g1, 0
20076e0: 04 bf ff cc ble 2007610 <rtems_aio_enqueue+0xc8> <== ALWAYS TAKEN
20076e4: 01 00 00 00 nop
pthread_cond_signal (&aio_request_queue.new_req);
20076e8: 40 00 00 eb call 2007a94 <pthread_cond_signal> <== NOT EXECUTED
20076ec: 90 06 e0 04 add %i3, 4, %o0 <== NOT EXECUTED
20076f0: 30 bf ff c8 b,a 2007610 <rtems_aio_enqueue+0xc8> <== NOT EXECUTED
20076f4: 40 00 08 e7 call 2009a90 <_Chain_Insert>
20076f8: 01 00 00 00 nop
/* 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;
pthread_mutex_init (&r_chain->mutex, NULL);
20076fc: 90 06 a0 1c add %i2, 0x1c, %o0
if (r_chain->new_fd == 1) {
/* 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;
2007700: c0 26 a0 18 clr [ %i2 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
2007704: 40 00 01 b0 call 2007dc4 <pthread_mutex_init>
2007708: 92 10 20 00 clr %o1
pthread_cond_init (&r_chain->cond, NULL);
200770c: 90 06 a0 20 add %i2, 0x20, %o0
2007710: 40 00 00 b1 call 20079d4 <pthread_cond_init>
2007714: 92 10 20 00 clr %o1
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
if (aio_request_queue.idle_threads > 0)
2007718: 10 bf ff f1 b 20076dc <rtems_aio_enqueue+0x194>
200771c: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
2007720: 40 00 02 21 call 2007fa4 <pthread_mutex_unlock> <== NOT EXECUTED
2007724: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED
return result;
2007728: 30 bf ff bc b,a 2007618 <rtems_aio_enqueue+0xd0> <== NOT EXECUTED
020071b0 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
20071b0: 9d e3 bf 78 save %sp, -136, %sp
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
20071b4: 37 00 80 67 sethi %hi(0x2019c00), %i3
20071b8: b8 06 20 1c add %i0, 0x1c, %i4
20071bc: b6 16 e1 3c or %i3, 0x13c, %i3
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
20071c0: b4 10 00 1b mov %i3, %i2
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
20071c4: b2 06 e0 58 add %i3, 0x58, %i1
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
20071c8: a0 06 e0 04 add %i3, 4, %l0
/* 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);
20071cc: 40 00 03 56 call 2007f24 <pthread_mutex_lock>
20071d0: 90 10 00 1c mov %i4, %o0
if (result != 0)
20071d4: 80 a2 20 00 cmp %o0, 0
20071d8: 12 80 00 2b bne 2007284 <rtems_aio_handle+0xd4> <== NEVER TAKEN
20071dc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20071e0: fa 06 20 08 ld [ %i0 + 8 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
20071e4: 82 06 20 0c add %i0, 0xc, %g1
/* 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)) {
20071e8: 80 a7 40 01 cmp %i5, %g1
20071ec: 02 80 00 41 be 20072f0 <rtems_aio_handle+0x140>
20071f0: 01 00 00 00 nop
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);
20071f4: 40 00 05 81 call 20087f8 <pthread_self>
20071f8: 01 00 00 00 nop
20071fc: 92 07 bf fc add %fp, -4, %o1
2007200: 40 00 04 6f call 20083bc <pthread_getschedparam>
2007204: 94 07 bf d8 add %fp, -40, %o2
param.sched_priority = req->priority;
2007208: c2 07 60 0c ld [ %i5 + 0xc ], %g1
pthread_setschedparam (pthread_self(), req->policy, ¶m);
200720c: 40 00 05 7b call 20087f8 <pthread_self>
2007210: c2 27 bf d8 st %g1, [ %fp + -40 ]
2007214: d2 07 60 08 ld [ %i5 + 8 ], %o1
2007218: 40 00 05 7c call 2008808 <pthread_setschedparam>
200721c: 94 07 bf d8 add %fp, -40, %o2
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2007220: 40 00 0a 04 call 2009a30 <_Chain_Extract>
2007224: 90 10 00 1d mov %i5, %o0
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
2007228: 40 00 03 5f call 2007fa4 <pthread_mutex_unlock>
200722c: 90 10 00 1c mov %i4, %o0
switch (req->aiocbp->aio_lio_opcode) {
2007230: e2 07 60 14 ld [ %i5 + 0x14 ], %l1
2007234: c2 04 60 30 ld [ %l1 + 0x30 ], %g1
2007238: 80 a0 60 02 cmp %g1, 2
200723c: 22 80 00 25 be,a 20072d0 <rtems_aio_handle+0x120>
2007240: c4 1c 60 08 ldd [ %l1 + 8 ], %g2
2007244: 80 a0 60 03 cmp %g1, 3
2007248: 02 80 00 1e be 20072c0 <rtems_aio_handle+0x110> <== NEVER TAKEN
200724c: 01 00 00 00 nop
2007250: 80 a0 60 01 cmp %g1, 1
2007254: 22 80 00 0e be,a 200728c <rtems_aio_handle+0xdc> <== ALWAYS TAKEN
2007258: c4 1c 60 08 ldd [ %l1 + 8 ], %g2
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
200725c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
req->aiocbp->error_code = errno;
2007260: 40 00 2b d0 call 20121a0 <__errno> <== NOT EXECUTED
2007264: c2 24 60 38 st %g1, [ %l1 + 0x38 ] <== NOT EXECUTED
2007268: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
/* 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);
200726c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2007270: 40 00 03 2d call 2007f24 <pthread_mutex_lock> <== NOT EXECUTED
2007274: c2 24 60 34 st %g1, [ %l1 + 0x34 ] <== NOT EXECUTED
if (result != 0)
2007278: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200727c: 22 bf ff da be,a 20071e4 <rtems_aio_handle+0x34> <== NOT EXECUTED
2007280: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007284: 81 c7 e0 08 ret
2007288: 91 e8 20 00 restore %g0, 0, %o0
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
200728c: d0 04 40 00 ld [ %l1 ], %o0
2007290: d2 04 60 10 ld [ %l1 + 0x10 ], %o1
2007294: d4 04 60 14 ld [ %l1 + 0x14 ], %o2
2007298: 96 10 00 02 mov %g2, %o3
200729c: 40 00 2e e4 call 2012e2c <pread>
20072a0: 98 10 00 03 mov %g3, %o4
break;
default:
result = -1;
}
if (result == -1) {
20072a4: 80 a2 3f ff cmp %o0, -1
20072a8: 22 bf ff ed be,a 200725c <rtems_aio_handle+0xac> <== NEVER TAKEN
20072ac: e2 07 60 14 ld [ %i5 + 0x14 ], %l1 <== NOT EXECUTED
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
20072b0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
20072b4: d0 20 60 38 st %o0, [ %g1 + 0x38 ]
req->aiocbp->error_code = 0;
20072b8: 10 bf ff c5 b 20071cc <rtems_aio_handle+0x1c>
20072bc: c0 20 60 34 clr [ %g1 + 0x34 ]
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
20072c0: 40 00 1d b9 call 200e9a4 <fsync> <== NOT EXECUTED
20072c4: d0 04 40 00 ld [ %l1 ], %o0 <== NOT EXECUTED
break;
20072c8: 10 bf ff f8 b 20072a8 <rtems_aio_handle+0xf8> <== NOT EXECUTED
20072cc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
20072d0: d0 04 40 00 ld [ %l1 ], %o0
20072d4: d2 04 60 10 ld [ %l1 + 0x10 ], %o1
20072d8: d4 04 60 14 ld [ %l1 + 0x14 ], %o2
20072dc: 96 10 00 02 mov %g2, %o3
20072e0: 40 00 2f 11 call 2012f24 <pwrite>
20072e4: 98 10 00 03 mov %g3, %o4
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
20072e8: 10 bf ff f0 b 20072a8 <rtems_aio_handle+0xf8>
20072ec: 80 a2 3f ff cmp %o0, -1
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
20072f0: 40 00 03 2d call 2007fa4 <pthread_mutex_unlock>
20072f4: 90 10 00 1c mov %i4, %o0
pthread_mutex_lock (&aio_request_queue.mutex);
20072f8: 40 00 03 0b call 2007f24 <pthread_mutex_lock>
20072fc: 90 10 00 1b mov %i3, %o0
if (rtems_chain_is_empty (chain))
2007300: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007304: 80 a7 40 01 cmp %i5, %g1
2007308: 02 80 00 05 be 200731c <rtems_aio_handle+0x16c> <== ALWAYS TAKEN
200730c: 92 07 bf f4 add %fp, -12, %o1
}
}
/* 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);
2007310: 40 00 03 25 call 2007fa4 <pthread_mutex_unlock>
2007314: 90 10 00 1b mov %i3, %o0
2007318: 30 bf ff ad b,a 20071cc <rtems_aio_handle+0x1c>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
200731c: 40 00 01 50 call 200785c <clock_gettime>
2007320: 90 10 20 01 mov 1, %o0
timeout.tv_sec += 3;
2007324: c2 07 bf f4 ld [ %fp + -12 ], %g1
timeout.tv_nsec = 0;
2007328: c0 27 bf f8 clr [ %fp + -8 ]
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
200732c: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007330: ba 06 20 20 add %i0, 0x20, %i5
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007334: c2 27 bf f4 st %g1, [ %fp + -12 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007338: 90 10 00 1d mov %i5, %o0
200733c: 92 10 00 1a mov %i2, %o1
2007340: 40 00 01 f4 call 2007b10 <pthread_cond_timedwait>
2007344: 94 07 bf f4 add %fp, -12, %o2
&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) {
2007348: 80 a2 20 74 cmp %o0, 0x74
200734c: 12 bf ff f1 bne 2007310 <rtems_aio_handle+0x160> <== NEVER TAKEN
2007350: 01 00 00 00 nop
2007354: 40 00 09 b7 call 2009a30 <_Chain_Extract>
2007358: 90 10 00 18 mov %i0, %o0
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
200735c: 40 00 02 47 call 2007c78 <pthread_mutex_destroy>
2007360: 90 10 00 1c mov %i4, %o0
pthread_cond_destroy (&r_chain->cond);
2007364: 40 00 01 66 call 20078fc <pthread_cond_destroy>
2007368: 90 10 00 1d mov %i5, %o0
free (r_chain);
200736c: 7f ff f0 d2 call 20036b4 <free>
2007370: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2007374: f0 06 e0 54 ld [ %i3 + 0x54 ], %i0
/* 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)) {
2007378: 80 a6 00 19 cmp %i0, %i1
200737c: 22 80 00 0e be,a 20073b4 <rtems_aio_handle+0x204>
2007380: c4 06 e0 68 ld [ %i3 + 0x68 ], %g2
}
}
/* 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;
2007384: c4 06 a0 68 ld [ %i2 + 0x68 ], %g2
++aio_request_queue.active_threads;
2007388: c2 06 a0 64 ld [ %i2 + 0x64 ], %g1
}
}
/* 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;
200738c: 84 00 bf ff add %g2, -1, %g2
++aio_request_queue.active_threads;
2007390: 82 00 60 01 inc %g1
2007394: 90 10 00 18 mov %i0, %o0
}
}
/* 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;
2007398: c4 26 a0 68 st %g2, [ %i2 + 0x68 ]
200739c: 40 00 09 a5 call 2009a30 <_Chain_Extract>
20073a0: c2 26 a0 64 st %g1, [ %i2 + 0x64 ]
20073a4: b8 06 20 1c add %i0, 0x1c, %i4
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
20073a8: 7f ff ff 64 call 2007138 <rtems_aio_move_to_work>
20073ac: 90 10 00 18 mov %i0, %o0
20073b0: 30 bf ff d8 b,a 2007310 <rtems_aio_handle+0x160>
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;
20073b4: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
/* 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;
20073b8: 84 00 a0 01 inc %g2
--aio_request_queue.active_threads;
20073bc: 82 00 7f ff add %g1, -1, %g1
clock_gettime (CLOCK_REALTIME, &timeout);
20073c0: 92 07 bf f4 add %fp, -12, %o1
/* 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;
20073c4: c4 26 e0 68 st %g2, [ %i3 + 0x68 ]
--aio_request_queue.active_threads;
20073c8: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
clock_gettime (CLOCK_REALTIME, &timeout);
20073cc: 40 00 01 24 call 200785c <clock_gettime>
20073d0: 90 10 20 01 mov 1, %o0
timeout.tv_sec += 3;
20073d4: c2 07 bf f4 ld [ %fp + -12 ], %g1
timeout.tv_nsec = 0;
20073d8: c0 27 bf f8 clr [ %fp + -8 ]
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
20073dc: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
20073e0: 90 10 00 10 mov %l0, %o0
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
20073e4: c2 27 bf f4 st %g1, [ %fp + -12 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
20073e8: 92 10 00 1b mov %i3, %o1
20073ec: 40 00 01 c9 call 2007b10 <pthread_cond_timedwait>
20073f0: 94 07 bf f4 add %fp, -12, %o2
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
20073f4: 80 a2 20 74 cmp %o0, 0x74
20073f8: 22 80 00 04 be,a 2007408 <rtems_aio_handle+0x258> <== ALWAYS TAKEN
20073fc: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
2007400: 10 bf ff e1 b 2007384 <rtems_aio_handle+0x1d4> <== NOT EXECUTED
2007404: f0 06 e0 54 ld [ %i3 + 0x54 ], %i0 <== NOT EXECUTED
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
pthread_mutex_unlock (&aio_request_queue.mutex);
2007408: 90 10 00 1b mov %i3, %o0
/* 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;
200740c: 82 00 7f ff add %g1, -1, %g1
pthread_mutex_unlock (&aio_request_queue.mutex);
2007410: 40 00 02 e5 call 2007fa4 <pthread_mutex_unlock>
2007414: c2 26 e0 68 st %g1, [ %i3 + 0x68 ]
return NULL;
2007418: 30 bf ff 9b b,a 2007284 <rtems_aio_handle+0xd4>
02006f4c <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
2006f4c: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
2006f50: 3b 00 80 67 sethi %hi(0x2019c00), %i5
2006f54: 40 00 04 5e call 20080cc <pthread_attr_init>
2006f58: 90 17 61 44 or %i5, 0x144, %o0 ! 2019d44 <aio_request_queue+0x8>
if (result != 0)
2006f5c: b0 92 20 00 orcc %o0, 0, %i0
2006f60: 12 80 00 23 bne 2006fec <rtems_aio_init+0xa0> <== NEVER TAKEN
2006f64: 90 17 61 44 or %i5, 0x144, %o0
return result;
result =
2006f68: 40 00 04 65 call 20080fc <pthread_attr_setdetachstate>
2006f6c: 92 10 20 00 clr %o1
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
2006f70: 80 a2 20 00 cmp %o0, 0
2006f74: 12 80 00 20 bne 2006ff4 <rtems_aio_init+0xa8> <== NEVER TAKEN
2006f78: 39 00 80 67 sethi %hi(0x2019c00), %i4
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
2006f7c: 92 10 20 00 clr %o1
2006f80: 40 00 03 91 call 2007dc4 <pthread_mutex_init>
2006f84: 90 17 21 3c or %i4, 0x13c, %o0
if (result != 0)
2006f88: 80 a2 20 00 cmp %o0, 0
2006f8c: 12 80 00 23 bne 2007018 <rtems_aio_init+0xcc> <== NEVER TAKEN
2006f90: 92 10 20 00 clr %o1
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
2006f94: 11 00 80 67 sethi %hi(0x2019c00), %o0
2006f98: 40 00 02 8f call 20079d4 <pthread_cond_init>
2006f9c: 90 12 21 40 or %o0, 0x140, %o0 ! 2019d40 <aio_request_queue+0x4>
if (result != 0) {
2006fa0: b0 92 20 00 orcc %o0, 0, %i0
2006fa4: 12 80 00 26 bne 200703c <rtems_aio_init+0xf0> <== NEVER TAKEN
2006fa8: 01 00 00 00 nop
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2006fac: b8 17 21 3c or %i4, 0x13c, %i4
head->previous = NULL;
tail->previous = head;
2006fb0: 82 07 20 54 add %i4, 0x54, %g1
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2006fb4: 88 07 20 4c add %i4, 0x4c, %g4
head->previous = NULL;
tail->previous = head;
2006fb8: 86 07 20 48 add %i4, 0x48, %g3
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2006fbc: 84 07 20 58 add %i4, 0x58, %g2
head->previous = NULL;
tail->previous = head;
2006fc0: c2 27 20 5c st %g1, [ %i4 + 0x5c ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2006fc4: c8 27 20 48 st %g4, [ %i4 + 0x48 ]
head->previous = NULL;
2006fc8: c0 27 20 4c clr [ %i4 + 0x4c ]
tail->previous = head;
2006fcc: c6 27 20 50 st %g3, [ %i4 + 0x50 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2006fd0: c4 27 20 54 st %g2, [ %i4 + 0x54 ]
head->previous = NULL;
2006fd4: c0 27 20 58 clr [ %i4 + 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;
2006fd8: c0 27 20 64 clr [ %i4 + 0x64 ]
aio_request_queue.idle_threads = 0;
2006fdc: c0 27 20 68 clr [ %i4 + 0x68 ]
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2006fe0: 03 00 00 2c sethi %hi(0xb000), %g1
2006fe4: 82 10 60 0b or %g1, 0xb, %g1 ! b00b <PROM_START+0xb00b>
2006fe8: c2 27 20 60 st %g1, [ %i4 + 0x60 ]
return result;
}
2006fec: 81 c7 e0 08 ret
2006ff0: 81 e8 00 00 restore
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
2006ff4: 40 00 04 2a call 200809c <pthread_attr_destroy> <== NOT EXECUTED
2006ff8: 90 17 61 44 or %i5, 0x144, %o0 <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
2006ffc: 39 00 80 67 sethi %hi(0x2019c00), %i4 <== NOT EXECUTED
2007000: 92 10 20 00 clr %o1 <== NOT EXECUTED
2007004: 40 00 03 70 call 2007dc4 <pthread_mutex_init> <== NOT EXECUTED
2007008: 90 17 21 3c or %i4, 0x13c, %o0 <== NOT EXECUTED
if (result != 0)
200700c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2007010: 02 bf ff e1 be 2006f94 <rtems_aio_init+0x48> <== NOT EXECUTED
2007014: 92 10 20 00 clr %o1 <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
2007018: 40 00 04 21 call 200809c <pthread_attr_destroy> <== NOT EXECUTED
200701c: 90 17 61 44 or %i5, 0x144, %o0 <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
2007020: 92 10 20 00 clr %o1 <== NOT EXECUTED
2007024: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2007028: 40 00 02 6b call 20079d4 <pthread_cond_init> <== NOT EXECUTED
200702c: 90 12 21 40 or %o0, 0x140, %o0 ! 2019d40 <aio_request_queue+0x4><== NOT EXECUTED
if (result != 0) {
2007030: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2007034: 22 bf ff df be,a 2006fb0 <rtems_aio_init+0x64> <== NOT EXECUTED
2007038: b8 17 21 3c or %i4, 0x13c, %i4 <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
200703c: 40 00 03 0f call 2007c78 <pthread_mutex_destroy> <== NOT EXECUTED
2007040: 90 17 21 3c or %i4, 0x13c, %o0 <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
2007044: 40 00 04 16 call 200809c <pthread_attr_destroy> <== NOT EXECUTED
2007048: 90 17 61 44 or %i5, 0x144, %o0 <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200704c: 10 bf ff d9 b 2006fb0 <rtems_aio_init+0x64> <== NOT EXECUTED
2007050: b8 17 21 3c or %i4, 0x13c, %i4 <== NOT EXECUTED
0200741c <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
200741c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007420: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007424: 84 06 20 04 add %i0, 4, %g2
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
2007428: 80 a0 40 02 cmp %g1, %g2
200742c: 02 80 00 15 be 2007480 <rtems_aio_insert_prio+0x64> <== NEVER TAKEN
2007430: 86 10 00 19 mov %i1, %g3
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 &&
2007434: de 06 60 14 ld [ %i1 + 0x14 ], %o7
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007438: c8 00 60 14 ld [ %g1 + 0x14 ], %g4
while (req->aiocbp->aio_reqprio > prio &&
200743c: de 03 e0 18 ld [ %o7 + 0x18 ], %o7
2007440: c8 01 20 18 ld [ %g4 + 0x18 ], %g4
2007444: 80 a1 00 0f cmp %g4, %o7
2007448: 26 80 00 07 bl,a 2007464 <rtems_aio_insert_prio+0x48> <== NEVER TAKEN
200744c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
2007450: 10 80 00 0b b 200747c <rtems_aio_insert_prio+0x60>
2007454: f0 00 60 04 ld [ %g1 + 4 ], %i0
2007458: 22 80 00 09 be,a 200747c <rtems_aio_insert_prio+0x60> <== NOT EXECUTED
200745c: f0 00 60 04 ld [ %g1 + 4 ], %i0 <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007460: c2 00 40 00 ld [ %g1 ], %g1 <== 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;
2007464: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 <== 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 &&
2007468: c8 01 20 18 ld [ %g4 + 0x18 ], %g4 <== NOT EXECUTED
200746c: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED
2007470: 06 bf ff fa bl 2007458 <rtems_aio_insert_prio+0x3c> <== NOT EXECUTED
2007474: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2007478: f0 00 60 04 ld [ %g1 + 4 ], %i0 <== NOT EXECUTED
200747c: b2 10 00 03 mov %g3, %i1
2007480: 40 00 09 84 call 2009a90 <_Chain_Insert>
2007484: 81 e8 00 00 restore
02007138 <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
2007138: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200713c: 05 00 80 67 sethi %hi(0x2019c00), %g2
2007140: 84 10 a1 3c or %g2, 0x13c, %g2 ! 2019d3c <aio_request_queue>
2007144: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
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 &&
2007148: de 06 20 14 ld [ %i0 + 0x14 ], %o7
200714c: c8 00 60 14 ld [ %g1 + 0x14 ], %g4
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
2007150: b2 10 00 18 mov %i0, %i1
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 &&
2007154: 80 a1 00 0f cmp %g4, %o7
2007158: 16 80 00 10 bge 2007198 <rtems_aio_move_to_work+0x60> <== NEVER TAKEN
200715c: 86 10 00 01 mov %g1, %g3
2007160: 84 00 a0 4c add %g2, 0x4c, %g2
2007164: 80 a0 40 02 cmp %g1, %g2
2007168: 32 80 00 08 bne,a 2007188 <rtems_aio_move_to_work+0x50> <== ALWAYS TAKEN
200716c: c6 00 40 00 ld [ %g1 ], %g3
2007170: 10 80 00 0b b 200719c <rtems_aio_move_to_work+0x64> <== NOT EXECUTED
2007174: f0 00 e0 04 ld [ %g3 + 4 ], %i0 <== NOT EXECUTED
2007178: 80 a0 c0 02 cmp %g3, %g2
200717c: 02 80 00 0a be 20071a4 <rtems_aio_move_to_work+0x6c> <== NEVER TAKEN
2007180: 86 10 00 02 mov %g2, %g3
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007184: c6 00 40 00 ld [ %g1 ], %g3
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 &&
2007188: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4
200718c: 80 a1 00 0f cmp %g4, %o7
2007190: 06 bf ff fa bl 2007178 <rtems_aio_move_to_work+0x40>
2007194: 82 10 00 03 mov %g3, %g1
2007198: f0 00 e0 04 ld [ %g3 + 4 ], %i0
200719c: 40 00 0a 3d call 2009a90 <_Chain_Insert>
20071a0: 81 e8 00 00 restore
20071a4: f0 00 e0 04 ld [ %g3 + 4 ], %i0 <== NOT EXECUTED
20071a8: 40 00 0a 3a call 2009a90 <_Chain_Insert> <== NOT EXECUTED
20071ac: 81 e8 00 00 restore <== NOT EXECUTED
02007488 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
2007488: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200748c: fa 06 20 08 ld [ %i0 + 8 ], %i5
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
2007490: b4 10 20 8c mov 0x8c, %i2
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2007494: b0 06 20 0c add %i0, 0xc, %i0
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
2007498: 80 a7 40 18 cmp %i5, %i0
200749c: 02 80 00 0d be 20074d0 <rtems_aio_remove_fd+0x48> <== NEVER TAKEN
20074a0: b6 10 3f ff mov -1, %i3
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
20074a4: 40 00 09 63 call 2009a30 <_Chain_Extract>
20074a8: 90 10 00 1d mov %i5, %o0
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
20074ac: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
20074b0: f8 07 40 00 ld [ %i5 ], %i4
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
20074b4: 90 10 00 1d mov %i5, %o0
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
20074b8: f4 20 60 34 st %i2, [ %g1 + 0x34 ]
req->aiocbp->return_value = -1;
free (req);
20074bc: 7f ff f0 7e call 20036b4 <free>
20074c0: f6 20 60 38 st %i3, [ %g1 + 0x38 ]
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
20074c4: 80 a7 00 18 cmp %i4, %i0
20074c8: 12 bf ff f7 bne 20074a4 <rtems_aio_remove_fd+0x1c>
20074cc: ba 10 00 1c mov %i4, %i5
20074d0: 81 c7 e0 08 ret
20074d4: 81 e8 00 00 restore
020074d8 <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)
{
20074d8: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20074dc: fa 06 00 00 ld [ %i0 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
20074e0: 82 06 20 04 add %i0, 4, %g1
if (rtems_chain_is_empty (chain))
20074e4: 80 a7 40 01 cmp %i5, %g1
20074e8: 12 80 00 06 bne 2007500 <rtems_aio_remove_req+0x28>
20074ec: b0 10 20 02 mov 2, %i0
20074f0: 30 80 00 14 b,a 2007540 <rtems_aio_remove_req+0x68>
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) {
20074f4: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
20074f8: 02 80 00 10 be 2007538 <rtems_aio_remove_req+0x60> <== NOT EXECUTED
20074fc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2007500: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
2007504: 80 a0 80 19 cmp %g2, %i1
2007508: 32 bf ff fb bne,a 20074f4 <rtems_aio_remove_req+0x1c> <== NEVER TAKEN
200750c: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
2007510: 40 00 09 48 call 2009a30 <_Chain_Extract>
2007514: 90 10 00 1d mov %i5, %o0
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
2007518: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200751c: 84 10 20 8c mov 0x8c, %g2
2007520: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
current->aiocbp->return_value = -1;
2007524: 84 10 3f ff mov -1, %g2
free (current);
2007528: 90 10 00 1d mov %i5, %o0
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
200752c: c4 20 60 38 st %g2, [ %g1 + 0x38 ]
free (current);
2007530: 7f ff f0 61 call 20036b4 <free>
2007534: b0 10 20 00 clr %i0
}
return AIO_CANCELED;
2007538: 81 c7 e0 08 ret
200753c: 81 e8 00 00 restore
}
2007540: 81 c7 e0 08 ret
2007544: 81 e8 00 00 restore
0200eef8 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200eef8: 9d e3 bf a0 save %sp, -96, %sp
200eefc: b6 10 20 20 mov 0x20, %i3
200ef00: ba 10 00 18 mov %i0, %i5
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200ef04: b8 10 20 01 mov 1, %i4
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
uint32_t b;
uint32_t local_value = 0;
200ef08: 10 80 00 04 b 200ef18 <rtems_assoc_local_by_remote_bitfield+0x20>
200ef0c: b0 10 20 00 clr %i0
for (b = 1; b; b <<= 1) {
200ef10: 02 80 00 0c be 200ef40 <rtems_assoc_local_by_remote_bitfield+0x48>
200ef14: b9 2f 20 01 sll %i4, 1, %i4
if (b & remote_value)
200ef18: 80 8f 00 19 btst %i4, %i1
200ef1c: 22 bf ff fd be,a 200ef10 <rtems_assoc_local_by_remote_bitfield+0x18>
200ef20: b6 86 ff ff addcc %i3, -1, %i3
local_value |= rtems_assoc_local_by_remote(ap, b);
200ef24: 92 10 00 1c mov %i4, %o1
200ef28: 40 00 00 08 call 200ef48 <rtems_assoc_local_by_remote>
200ef2c: 90 10 00 1d mov %i5, %o0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200ef30: b9 2f 20 01 sll %i4, 1, %i4
200ef34: b6 86 ff ff addcc %i3, -1, %i3
200ef38: 12 bf ff f8 bne 200ef18 <rtems_assoc_local_by_remote_bitfield+0x20><== ALWAYS TAKEN
200ef3c: b0 16 00 08 or %i0, %o0, %i0
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
200ef40: 81 c7 e0 08 ret
200ef44: 81 e8 00 00 restore
0200bd28 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200bd28: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200bd2c: d0 06 00 00 ld [ %i0 ], %o0
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200bd30: ba 10 00 18 mov %i0, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200bd34: 80 a2 20 00 cmp %o0, 0
200bd38: 02 80 00 1b be 200bda4 <rtems_assoc_ptr_by_local+0x7c>
200bd3c: b0 10 20 00 clr %i0
200bd40: 13 00 80 6f sethi %hi(0x201bc00), %o1
200bd44: 40 00 13 09 call 2010968 <strcmp>
200bd48: 92 12 60 f8 or %o1, 0xf8, %o1 ! 201bcf8 <IMFS_memfile_handlers+0x3c>
200bd4c: 80 a2 20 00 cmp %o0, 0
200bd50: 02 80 00 17 be 200bdac <rtems_assoc_ptr_by_local+0x84>
200bd54: 82 10 20 00 clr %g1
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
200bd58: c4 07 60 04 ld [ %i5 + 4 ], %g2
200bd5c: 80 a0 80 19 cmp %g2, %i1
200bd60: 02 80 00 11 be 200bda4 <rtems_assoc_ptr_by_local+0x7c>
200bd64: b0 10 00 1d mov %i5, %i0
200bd68: 86 07 60 0c add %i5, 0xc, %g3
200bd6c: 10 80 00 06 b 200bd84 <rtems_assoc_ptr_by_local+0x5c>
200bd70: 84 20 00 1d neg %i5, %g2
200bd74: c8 07 7f f8 ld [ %i5 + -8 ], %g4
200bd78: 80 a1 00 19 cmp %g4, %i1
200bd7c: 02 80 00 0a be 200bda4 <rtems_assoc_ptr_by_local+0x7c>
200bd80: 01 00 00 00 nop
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
200bd84: 88 06 00 02 add %i0, %g2, %g4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200bd88: c8 00 c0 04 ld [ %g3 + %g4 ], %g4
200bd8c: b0 06 20 0c add %i0, 0xc, %i0
200bd90: 80 a1 20 00 cmp %g4, 0
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
200bd94: ba 06 00 02 add %i0, %g2, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200bd98: 12 bf ff f7 bne 200bd74 <rtems_assoc_ptr_by_local+0x4c>
200bd9c: ba 00 c0 1d add %g3, %i5, %i5
200bda0: b0 10 00 01 mov %g1, %i0
if (ap->local_value == local_value)
return ap;
return default_ap;
}
200bda4: 81 c7 e0 08 ret
200bda8: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200bdac: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200bdb0: 80 a0 60 00 cmp %g1, 0
200bdb4: 02 bf ff fc be 200bda4 <rtems_assoc_ptr_by_local+0x7c> <== NEVER TAKEN
200bdb8: b0 10 00 1d mov %i5, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
200bdbc: 82 10 00 1d mov %i5, %g1
200bdc0: 10 bf ff e6 b 200bd58 <rtems_assoc_ptr_by_local+0x30>
200bdc4: ba 07 60 0c add %i5, 0xc, %i5
0200354c <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
200354c: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
2003550: fa 06 00 00 ld [ %i0 ], %i5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
2003554: b8 10 00 18 mov %i0, %i4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
2003558: 80 a7 60 00 cmp %i5, 0
200355c: 02 80 00 1a be 20035c4 <rtems_assoc_ptr_by_name+0x78>
2003560: b0 10 20 00 clr %i0
2003564: 90 10 00 1d mov %i5, %o0
2003568: 13 00 80 58 sethi %hi(0x2016000), %o1
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
200356c: b4 10 20 00 clr %i2
if (rtems_assoc_is_default(ap))
2003570: 40 00 36 48 call 2010e90 <strcmp>
2003574: 92 12 62 d0 or %o1, 0x2d0, %o1
2003578: 80 a2 20 00 cmp %o0, 0
200357c: 22 80 00 14 be,a 20035cc <rtems_assoc_ptr_by_name+0x80>
2003580: fa 07 20 0c ld [ %i4 + 0xc ], %i5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
2003584: 82 10 00 1c mov %i4, %g1
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
2003588: 10 80 00 06 b 20035a0 <rtems_assoc_ptr_by_name+0x54>
200358c: b6 07 20 0c add %i4, 0xc, %i3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2003590: fa 00 bf f4 ld [ %g2 + -12 ], %i5
2003594: 80 a7 60 00 cmp %i5, 0
2003598: 02 80 00 14 be 20035e8 <rtems_assoc_ptr_by_name+0x9c>
200359c: 01 00 00 00 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
20035a0: b0 10 00 01 mov %g1, %i0
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
20035a4: 90 10 00 1d mov %i5, %o0
20035a8: 40 00 36 3a call 2010e90 <strcmp>
20035ac: 92 10 00 19 mov %i1, %o1
20035b0: 82 06 20 0c add %i0, 0xc, %g1
20035b4: 80 a2 20 00 cmp %o0, 0
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
20035b8: 84 20 40 1c sub %g1, %i4, %g2
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
20035bc: 12 bf ff f5 bne 2003590 <rtems_assoc_ptr_by_name+0x44>
20035c0: 84 00 80 1b add %g2, %i3, %g2
return ap;
return default_ap;
}
20035c4: 81 c7 e0 08 ret
20035c8: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
20035cc: b0 10 00 1c mov %i4, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
20035d0: b4 10 00 1c mov %i4, %i2
for ( ; ap->name; ap++)
20035d4: 80 a7 60 00 cmp %i5, 0
20035d8: 12 bf ff eb bne 2003584 <rtems_assoc_ptr_by_name+0x38> <== ALWAYS TAKEN
20035dc: b8 07 20 0c add %i4, 0xc, %i4
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
20035e0: 81 c7 e0 08 ret <== NOT EXECUTED
20035e4: 81 e8 00 00 restore <== NOT EXECUTED
20035e8: 81 c7 e0 08 ret
20035ec: 91 e8 00 1a restore %g0, %i2, %o0
0200ef7c <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200ef7c: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200ef80: d0 06 00 00 ld [ %i0 ], %o0
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200ef84: ba 10 00 18 mov %i0, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200ef88: 80 a2 20 00 cmp %o0, 0
200ef8c: 02 80 00 1b be 200eff8 <rtems_assoc_ptr_by_remote+0x7c>
200ef90: b0 10 20 00 clr %i0
200ef94: 13 00 80 6f sethi %hi(0x201bc00), %o1
200ef98: 40 00 06 74 call 2010968 <strcmp>
200ef9c: 92 12 60 f8 or %o1, 0xf8, %o1 ! 201bcf8 <IMFS_memfile_handlers+0x3c>
200efa0: 80 a2 20 00 cmp %o0, 0
200efa4: 02 80 00 17 be 200f000 <rtems_assoc_ptr_by_remote+0x84>
200efa8: 82 10 20 00 clr %g1
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
200efac: c4 07 60 08 ld [ %i5 + 8 ], %g2
200efb0: 80 a0 80 19 cmp %g2, %i1
200efb4: 02 80 00 11 be 200eff8 <rtems_assoc_ptr_by_remote+0x7c>
200efb8: b0 10 00 1d mov %i5, %i0
200efbc: 86 07 60 0c add %i5, 0xc, %g3
200efc0: 10 80 00 06 b 200efd8 <rtems_assoc_ptr_by_remote+0x5c>
200efc4: 84 20 00 1d neg %i5, %g2
200efc8: c8 07 7f fc ld [ %i5 + -4 ], %g4
200efcc: 80 a1 00 19 cmp %g4, %i1
200efd0: 02 80 00 0a be 200eff8 <rtems_assoc_ptr_by_remote+0x7c>
200efd4: 01 00 00 00 nop
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
200efd8: 88 06 00 02 add %i0, %g2, %g4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200efdc: c8 00 c0 04 ld [ %g3 + %g4 ], %g4
200efe0: b0 06 20 0c add %i0, 0xc, %i0
200efe4: 80 a1 20 00 cmp %g4, 0
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
200efe8: ba 06 00 02 add %i0, %g2, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200efec: 12 bf ff f7 bne 200efc8 <rtems_assoc_ptr_by_remote+0x4c>
200eff0: ba 00 c0 1d add %g3, %i5, %i5
200eff4: b0 10 00 01 mov %g1, %i0
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
200eff8: 81 c7 e0 08 ret
200effc: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200f000: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200f004: 80 a0 60 00 cmp %g1, 0
200f008: 02 bf ff fc be 200eff8 <rtems_assoc_ptr_by_remote+0x7c> <== NEVER TAKEN
200f00c: b0 10 00 1d mov %i5, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
200f010: 82 10 00 1d mov %i5, %g1
200f014: 10 bf ff e6 b 200efac <rtems_assoc_ptr_by_remote+0x30>
200f018: ba 07 60 0c add %i5, 0xc, %i5
02003690 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
2003690: 9d e3 bf a0 save %sp, -96, %sp
2003694: b6 10 20 20 mov 0x20, %i3
2003698: ba 10 00 18 mov %i0, %i5
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
200369c: b8 10 20 01 mov 1, %i4
const rtems_assoc_t *ap,
uint32_t local_value
)
{
uint32_t b;
uint32_t remote_value = 0;
20036a0: 10 80 00 04 b 20036b0 <rtems_assoc_remote_by_local_bitfield+0x20>
20036a4: b0 10 20 00 clr %i0
for (b = 1; b; b <<= 1)
20036a8: 02 80 00 0c be 20036d8 <rtems_assoc_remote_by_local_bitfield+0x48>
20036ac: b9 2f 20 01 sll %i4, 1, %i4
if (b & local_value)
20036b0: 80 8f 00 19 btst %i4, %i1
20036b4: 22 bf ff fd be,a 20036a8 <rtems_assoc_remote_by_local_bitfield+0x18>
20036b8: b6 86 ff ff addcc %i3, -1, %i3
remote_value |= rtems_assoc_remote_by_local(ap, b);
20036bc: 92 10 00 1c mov %i4, %o1
20036c0: 40 00 00 08 call 20036e0 <rtems_assoc_remote_by_local>
20036c4: 90 10 00 1d mov %i5, %o0
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
20036c8: b9 2f 20 01 sll %i4, 1, %i4
20036cc: b6 86 ff ff addcc %i3, -1, %i3
20036d0: 12 bf ff f8 bne 20036b0 <rtems_assoc_remote_by_local_bitfield+0x20><== ALWAYS TAKEN
20036d4: b0 16 00 08 or %i0, %o0, %i0
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
20036d8: 81 c7 e0 08 ret
20036dc: 81 e8 00 00 restore
0200be2c <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
200be2c: 9d e3 bf a0 save %sp, -96, %sp
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
200be30: 3b 00 80 6a sethi %hi(0x201a800), %i5
200be34: ba 17 62 e8 or %i5, 0x2e8, %i5 ! 201aae8 <bdbuf_cache>
200be38: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
200be3c: 80 a0 60 00 cmp %g1, 0
200be40: 02 80 00 07 be 200be5c <rtems_bdbuf_add_to_modified_list_after_access+0x30><== ALWAYS TAKEN
200be44: 01 00 00 00 nop
200be48: c4 1f 60 38 ldd [ %i5 + 0x38 ], %g2 <== NOT EXECUTED
200be4c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
200be50: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
200be54: 22 80 00 2a be,a 200befc <rtems_bdbuf_add_to_modified_list_after_access+0xd0><== NOT EXECUTED
200be58: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== 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
200be5c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200be60: 80 a0 60 03 cmp %g1, 3
200be64: 02 80 00 18 be 200bec4 <rtems_bdbuf_add_to_modified_list_after_access+0x98>
200be68: 03 00 80 64 sethi %hi(0x2019000), %g1
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
200be6c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200be70: 80 a0 60 05 cmp %g1, 5
200be74: 02 80 00 13 be 200bec0 <rtems_bdbuf_add_to_modified_list_after_access+0x94>
200be78: 82 10 20 07 mov 7, %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200be7c: 11 00 80 6a sethi %hi(0x201a800), %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200be80: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200be84: 90 12 23 38 or %o0, 0x338, %o0
200be88: 7f ff f1 06 call 20082a0 <_Chain_Append>
200be8c: 92 10 00 18 mov %i0, %o1
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
200be90: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200be94: 80 a0 60 00 cmp %g1, 0
200be98: 12 80 00 17 bne 200bef4 <rtems_bdbuf_add_to_modified_list_after_access+0xc8>
200be9c: 31 00 80 6a sethi %hi(0x201a800), %i0
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200bea0: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
200bea4: 80 a0 60 00 cmp %g1, 0
200bea8: 12 80 00 04 bne 200beb8 <rtems_bdbuf_add_to_modified_list_after_access+0x8c>
200beac: 01 00 00 00 nop
200beb0: 81 c7 e0 08 ret
200beb4: 81 e8 00 00 restore
rtems_bdbuf_wake_swapper ();
200beb8: 7f ff ff 3f call 200bbb4 <rtems_bdbuf_wake_swapper>
200bebc: 81 e8 00 00 restore
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
200bec0: 03 00 80 64 sethi %hi(0x2019000), %g1
200bec4: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 2019088 <rtems_bdbuf_configuration+0x10>
200bec8: 11 00 80 6a sethi %hi(0x201a800), %o0
200becc: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200bed0: 82 10 20 07 mov 7, %g1
200bed4: 90 12 23 38 or %o0, 0x338, %o0
200bed8: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200bedc: 7f ff f0 f1 call 20082a0 <_Chain_Append>
200bee0: 92 10 00 18 mov %i0, %o1
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
200bee4: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200bee8: 80 a0 60 00 cmp %g1, 0
200beec: 02 bf ff ed be 200bea0 <rtems_bdbuf_add_to_modified_list_after_access+0x74>
200bef0: 31 00 80 6a sethi %hi(0x201a800), %i0
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200bef4: 7f ff ff bf call 200bdf0 <rtems_bdbuf_wake>
200bef8: 91 ee 23 50 restore %i0, 0x350, %o0
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
200befc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
200bf00: 12 bf ff d7 bne 200be5c <rtems_bdbuf_add_to_modified_list_after_access+0x30><== NOT EXECUTED
200bf04: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
200bf08: 7f ff ff 08 call 200bb28 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200bf0c: 01 00 00 00 nop <== NOT EXECUTED
/*
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
200bf10: 7f ff fe 81 call 200b914 <rtems_bdbuf_lock_sync> <== NOT EXECUTED
200bf14: 01 00 00 00 nop <== NOT EXECUTED
rtems_bdbuf_unlock_sync ();
200bf18: 7f ff ff 10 call 200bb58 <rtems_bdbuf_unlock_sync> <== NOT EXECUTED
200bf1c: 01 00 00 00 nop <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
200bf20: 7f ff fe 6f call 200b8dc <rtems_bdbuf_lock_cache> <== NOT EXECUTED
200bf24: 01 00 00 00 nop <== NOT EXECUTED
200bf28: 30 bf ff cd b,a 200be5c <rtems_bdbuf_add_to_modified_list_after_access+0x30><== NOT EXECUTED
0200bcc8 <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)
{
200bcc8: 9d e3 bf a0 save %sp, -96, %sp
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
200bccc: c2 06 00 00 ld [ %i0 ], %g1
200bcd0: 82 00 60 01 inc %g1
200bcd4: c2 26 00 00 st %g1, [ %i0 ]
* 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 ();
200bcd8: 7f ff ff de call 200bc50 <rtems_bdbuf_disable_preemption>
200bcdc: 01 00 00 00 nop
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
200bce0: 7f ff ff 92 call 200bb28 <rtems_bdbuf_unlock_cache>
200bce4: ba 10 00 08 mov %o0, %i5
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
200bce8: d0 06 20 04 ld [ %i0 + 4 ], %o0
200bcec: 92 10 20 00 clr %o1
200bcf0: 7f ff ee 60 call 2007670 <rtems_semaphore_obtain>
200bcf4: 94 10 20 00 clr %o2
if (sc == RTEMS_TIMEOUT)
200bcf8: 80 a2 20 06 cmp %o0, 6
200bcfc: 02 80 00 0d be 200bd30 <rtems_bdbuf_anonymous_wait+0x68> <== NEVER TAKEN
200bd00: 80 a2 20 0d cmp %o0, 0xd
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
200bd04: 12 80 00 0e bne 200bd3c <rtems_bdbuf_anonymous_wait+0x74> <== NEVER TAKEN
200bd08: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
rtems_bdbuf_lock_cache ();
200bd0c: 7f ff fe f4 call 200b8dc <rtems_bdbuf_lock_cache>
200bd10: 01 00 00 00 nop
rtems_bdbuf_restore_preemption (prev_mode);
200bd14: 7f ff ff de call 200bc8c <rtems_bdbuf_restore_preemption>
200bd18: 90 10 00 1d mov %i5, %o0
--waiters->count;
200bd1c: c2 06 00 00 ld [ %i0 ], %g1
200bd20: 82 00 7f ff add %g1, -1, %g1
200bd24: c2 26 00 00 st %g1, [ %i0 ]
}
200bd28: 81 c7 e0 08 ret
200bd2c: 81 e8 00 00 restore
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
200bd30: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200bd34: 7f ff ef e9 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bd38: 90 12 20 12 or %o0, 0x12, %o0 ! 42000012 <RAM_END+0x3fc00012><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
200bd3c: 7f ff ef e7 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bd40: 90 12 20 10 or %o0, 0x10, %o0 <== NOT EXECUTED
0200bc50 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
200bc50: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200bc54: 90 10 21 00 mov 0x100, %o0
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
200bc58: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200bc5c: 92 10 21 00 mov 0x100, %o1
200bc60: 40 00 13 2b call 201090c <rtems_task_mode>
200bc64: 94 07 bf fc add %fp, -4, %o2
if (sc != RTEMS_SUCCESSFUL)
200bc68: 80 a2 20 00 cmp %o0, 0
200bc6c: 12 80 00 04 bne 200bc7c <rtems_bdbuf_disable_preemption+0x2c><== NEVER TAKEN
200bc70: f0 07 bf fc ld [ %fp + -4 ], %i0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
return prev_mode;
}
200bc74: 81 c7 e0 08 ret
200bc78: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
200bc7c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200bc80: 7f ff f0 16 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bc84: 90 12 20 0f or %o0, 0xf, %o0 ! 4200000f <RAM_END+0x3fc0000f><== NOT EXECUTED
0200c6c4 <rtems_bdbuf_execute_transfer_request.isra.9>:
req->bufnum = transfer_index;
}
static rtems_status_code
rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
200c6c4: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
200c6c8: 80 a6 e0 00 cmp %i3, 0
200c6cc: 12 80 00 6b bne 200c878 <rtems_bdbuf_execute_transfer_request.isra.9+0x1b4>
200c6d0: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200c6d4: d0 06 00 00 ld [ %i0 ], %o0
200c6d8: c2 06 40 00 ld [ %i1 ], %g1
200c6dc: 94 10 00 1a mov %i2, %o2
200c6e0: 13 30 06 10 sethi %hi(0xc0184000), %o1
if (result == 0)
200c6e4: ba 10 20 00 clr %i5
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200c6e8: 92 12 62 01 or %o1, 0x201, %o1
200c6ec: 9f c0 40 00 call %g1
200c6f0: b0 10 20 1b mov 0x1b, %i0
if (result == 0)
200c6f4: 80 a2 20 00 cmp %o0, 0
200c6f8: 02 80 00 56 be 200c850 <rtems_bdbuf_execute_transfer_request.isra.9+0x18c>
200c6fc: 01 00 00 00 nop
sc = req->status;
}
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
200c700: 7f ff fc 77 call 200b8dc <rtems_bdbuf_lock_cache>
200c704: 01 00 00 00 nop
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200c708: c6 06 a0 10 ld [ %i2 + 0x10 ], %g3
200c70c: 80 a0 e0 00 cmp %g3, 0
200c710: 02 80 00 35 be 200c7e4 <rtems_bdbuf_execute_transfer_request.isra.9+0x120><== NEVER TAKEN
200c714: a2 10 20 00 clr %l1
200c718: 27 00 80 6a sethi %hi(0x201a800), %l3
200c71c: b2 10 00 1a mov %i2, %i1
bool cache_locked)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
200c720: a4 10 20 00 clr %l2
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200c724: b8 10 20 00 clr %i4
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c728: a0 10 20 01 mov 1, %l0
200c72c: a6 14 e3 2c or %l3, 0x32c, %l3
200c730: 10 80 00 15 b 200c784 <rtems_bdbuf_execute_transfer_request.isra.9+0xc0>
200c734: a8 10 20 02 mov 2, %l4
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200c738: c2 05 60 30 ld [ %l5 + 0x30 ], %g1
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
200c73c: 80 a6 20 00 cmp %i0, 0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200c740: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200c744: 84 00 bf ff add %g2, -1, %g2
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
200c748: 12 80 00 06 bne 200c760 <rtems_bdbuf_execute_transfer_request.isra.9+0x9c>
200c74c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200c750: c2 05 60 28 ld [ %l5 + 0x28 ], %g1
200c754: 80 a0 60 09 cmp %g1, 9
200c758: 02 80 00 2b be 200c804 <rtems_bdbuf_execute_transfer_request.isra.9+0x140>
200c75c: 01 00 00 00 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c760: e0 25 60 28 st %l0, [ %l5 + 0x28 ]
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200c764: c2 05 60 2c ld [ %l5 + 0x2c ], %g1
200c768: 80 a0 60 00 cmp %g1, 0
200c76c: 02 80 00 0d be 200c7a0 <rtems_bdbuf_execute_transfer_request.isra.9+0xdc>
200c770: 01 00 00 00 nop
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200c774: b8 07 20 01 inc %i4
200c778: 80 a7 00 03 cmp %i4, %g3
200c77c: 1a 80 00 14 bcc 200c7cc <rtems_bdbuf_execute_transfer_request.isra.9+0x108>
200c780: b2 06 60 10 add %i1, 0x10, %i1
{
rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
200c784: ea 06 60 24 ld [ %i1 + 0x24 ], %l5
bool waiters = bd->waiters;
200c788: c2 05 60 2c ld [ %l5 + 0x2c ], %g1
if (waiters)
200c78c: 80 a0 60 00 cmp %g1, 0
200c790: 32 bf ff ea bne,a 200c738 <rtems_bdbuf_execute_transfer_request.isra.9+0x74>
200c794: a4 10 20 01 mov 1, %l2
wake_transfer_waiters = true;
else
wake_buffer_waiters = true;
200c798: 10 bf ff e8 b 200c738 <rtems_bdbuf_execute_transfer_request.isra.9+0x74>
200c79c: a2 10 20 01 mov 1, %l1
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
200c7a0: 7f ff fe 1f call 200c01c <rtems_bdbuf_remove_from_tree>
200c7a4: 90 10 00 15 mov %l5, %o0
200c7a8: 90 10 00 13 mov %l3, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c7ac: c0 25 60 28 clr [ %l5 + 0x28 ]
200c7b0: 40 00 11 98 call 2010e10 <_Chain_Insert>
200c7b4: 92 10 00 15 mov %l5, %o1
200c7b8: c6 06 a0 10 ld [ %i2 + 0x10 ], %g3
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200c7bc: b8 07 20 01 inc %i4
200c7c0: 80 a7 00 03 cmp %i4, %g3
200c7c4: 0a bf ff f0 bcs 200c784 <rtems_bdbuf_execute_transfer_request.isra.9+0xc0><== NEVER TAKEN
200c7c8: b2 06 60 10 add %i1, 0x10, %i1
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
200c7cc: 80 8c a0 ff btst 0xff, %l2
200c7d0: 12 80 00 1c bne 200c840 <rtems_bdbuf_execute_transfer_request.isra.9+0x17c>
200c7d4: 11 00 80 6a sethi %hi(0x201a800), %o0
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
200c7d8: 80 8c 60 ff btst 0xff, %l1
200c7dc: 12 80 00 10 bne 200c81c <rtems_bdbuf_execute_transfer_request.isra.9+0x158>
200c7e0: 11 00 80 6a sethi %hi(0x201a800), %o0
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
if (!cache_locked)
200c7e4: 80 a6 e0 00 cmp %i3, 0
200c7e8: 02 80 00 12 be 200c830 <rtems_bdbuf_execute_transfer_request.isra.9+0x16c>
200c7ec: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
200c7f0: 80 8f 60 ff btst 0xff, %i5
200c7f4: 22 80 00 02 be,a 200c7fc <rtems_bdbuf_execute_transfer_request.isra.9+0x138>
200c7f8: b0 10 20 1b mov 0x1b, %i0
return sc;
else
return RTEMS_IO_ERROR;
}
200c7fc: 81 c7 e0 08 ret
200c800: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c804: e8 25 60 28 st %l4, [ %l5 + 0x28 ]
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200c808: 90 10 00 13 mov %l3, %o0
200c80c: 7f ff ee a5 call 20082a0 <_Chain_Append>
200c810: 92 10 00 15 mov %l5, %o1
200c814: 10 bf ff d8 b 200c774 <rtems_bdbuf_execute_transfer_request.isra.9+0xb0>
200c818: c6 06 a0 10 ld [ %i2 + 0x10 ], %g3
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200c81c: 7f ff fd 75 call 200bdf0 <rtems_bdbuf_wake>
200c820: 90 12 23 60 or %o0, 0x360, %o0
if (!cache_locked)
200c824: 80 a6 e0 00 cmp %i3, 0
200c828: 32 bf ff f3 bne,a 200c7f4 <rtems_bdbuf_execute_transfer_request.isra.9+0x130>
200c82c: 80 8f 60 ff btst 0xff, %i5
rtems_bdbuf_unlock_cache ();
200c830: 7f ff fc be call 200bb28 <rtems_bdbuf_unlock_cache>
200c834: 01 00 00 00 nop
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
200c838: 10 bf ff ef b 200c7f4 <rtems_bdbuf_execute_transfer_request.isra.9+0x130>
200c83c: 80 8f 60 ff btst 0xff, %i5
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
200c840: 7f ff fd 6c call 200bdf0 <rtems_bdbuf_wake>
200c844: 90 12 23 58 or %o0, 0x358, %o0
if (wake_buffer_waiters)
200c848: 10 bf ff e5 b 200c7dc <rtems_bdbuf_execute_transfer_request.isra.9+0x118>
200c84c: 80 8c 60 ff btst 0xff, %l1
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
if (result == 0)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
200c850: 7f ff fc ed call 200bc04 <rtems_bdbuf_wait_for_event>
200c854: 90 10 20 02 mov 2, %o0
sc = req->status;
200c858: f0 06 a0 0c ld [ %i2 + 0xc ], %i0
200c85c: 82 1e 20 0d xor %i0, 0xd, %g1
200c860: 80 a0 00 01 cmp %g0, %g1
200c864: ba 60 3f ff subx %g0, -1, %i5
200c868: 80 a0 00 18 cmp %g0, %i0
200c86c: 82 60 3f ff subx %g0, -1, %g1
200c870: 10 bf ff a4 b 200c700 <rtems_bdbuf_execute_transfer_request.isra.9+0x3c>
200c874: ba 17 40 01 or %i5, %g1, %i5
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
200c878: 7f ff fc ac call 200bb28 <rtems_bdbuf_unlock_cache>
200c87c: 01 00 00 00 nop
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200c880: 10 bf ff 96 b 200c6d8 <rtems_bdbuf_execute_transfer_request.isra.9+0x14>
200c884: d0 06 00 00 ld [ %i0 ], %o0
0200b94c <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
200b94c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
200b950: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED
200b954: 7f ff f0 e1 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200b958: 90 16 40 08 or %i1, %o0, %o0 <== NOT EXECUTED
0200d8dc <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200d8dc: 9d e3 bf 90 save %sp, -112, %sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200d8e0: 03 00 80 6a sethi %hi(0x201a800), %g1
200d8e4: c2 08 63 70 ldub [ %g1 + 0x370 ], %g1 ! 201ab70 <bdbuf_cache+0x88>
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
200d8e8: c0 27 bf f4 clr [ %fp + -12 ]
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
200d8ec: c0 27 bf f8 clr [ %fp + -8 ]
size_t bds_per_group = 0;
200d8f0: c0 27 bf fc clr [ %fp + -4 ]
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200d8f4: b8 10 00 18 mov %i0, %i4
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200d8f8: 80 a0 60 00 cmp %g1, 0
200d8fc: 02 80 00 26 be 200d994 <rtems_bdbuf_get+0xb8> <== NEVER TAKEN
200d900: b0 10 20 16 mov 0x16, %i0
200d904: 90 10 00 1c mov %i4, %o0
200d908: 92 10 00 19 mov %i1, %o1
200d90c: 94 10 00 1a mov %i2, %o2
200d910: 96 07 bf f4 add %fp, -12, %o3
200d914: 98 07 bf f8 add %fp, -8, %o4
200d918: 7f ff f9 85 call 200bf2c <rtems_bdbuf_obtain_disk.part.8>
200d91c: 9a 07 bf fc add %fp, -4, %o5
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
200d920: b0 92 20 00 orcc %o0, 0, %i0
200d924: 12 80 00 1c bne 200d994 <rtems_bdbuf_get+0xb8> <== NEVER TAKEN
200d928: 01 00 00 00 nop
return sc;
rtems_bdbuf_lock_cache ();
200d92c: 7f ff f7 ec call 200b8dc <rtems_bdbuf_lock_cache>
200d930: 01 00 00 00 nop
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
200d934: d4 1f bf f8 ldd [ %fp + -8 ], %o2
200d938: 90 10 00 1c mov %i4, %o0
200d93c: 7f ff fe 5b call 200d2a8 <rtems_bdbuf_get_buffer_for_access>
200d940: 92 10 00 19 mov %i1, %o1
switch (bd->state)
200d944: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
200d948: 80 a0 60 02 cmp %g1, 2
200d94c: 02 80 00 14 be 200d99c <rtems_bdbuf_get+0xc0>
200d950: b8 10 00 08 mov %o0, %i4
200d954: 80 a0 60 07 cmp %g1, 7
200d958: 02 80 00 08 be 200d978 <rtems_bdbuf_get+0x9c>
200d95c: 80 a0 60 01 cmp %g1, 1
200d960: 02 80 00 12 be 200d9a8 <rtems_bdbuf_get+0xcc> <== ALWAYS TAKEN
200d964: 82 10 20 05 mov 5, %g1
* so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
200d968: d0 02 20 28 ld [ %o0 + 0x28 ], %o0 <== NOT EXECUTED
200d96c: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d970: 7f ff f7 f7 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200d974: 92 12 60 1e or %o1, 0x1e, %o1 ! 4200001e <RAM_END+0x3fc0001e><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d978: 82 10 20 04 mov 4, %g1
200d97c: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
200d980: 7f ff f8 6a call 200bb28 <rtems_bdbuf_unlock_cache>
200d984: 01 00 00 00 nop
rtems_bdbuf_release_disk (dd);
200d988: 7f ff f8 80 call 200bb88 <rtems_bdbuf_release_disk>
200d98c: d0 07 bf f4 ld [ %fp + -12 ], %o0
*bd_ptr = bd;
200d990: f8 26 c0 00 st %i4, [ %i3 ]
return RTEMS_SUCCESSFUL;
}
200d994: 81 c7 e0 08 ret
200d998: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d99c: 82 10 20 03 mov 3, %g1
200d9a0: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
200d9a4: 30 bf ff f7 b,a 200d980 <rtems_bdbuf_get+0xa4>
200d9a8: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
200d9ac: 30 bf ff f5 b,a 200d980 <rtems_bdbuf_get+0xa4>
0200d2a8 <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
200d2a8: 9d e3 bf a0 save %sp, -96, %sp
200d2ac: 3b 00 80 6a sethi %hi(0x201a800), %i5
200d2b0: ba 17 62 e8 or %i5, 0x2e8, %i5 ! 201aae8 <bdbuf_cache>
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
200d2b4: a4 07 60 70 add %i5, 0x70, %l2
}
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);
200d2b8: a2 07 60 68 add %i5, 0x68, %l1
200d2bc: a0 07 60 5c add %i5, 0x5c, %l0
200d2c0: b8 07 60 44 add %i5, 0x44, %i4
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
200d2c4: a6 07 60 54 add %i5, 0x54, %l3
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200d2c8: e8 07 60 40 ld [ %i5 + 0x40 ], %l4
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200d2cc: 80 a5 20 00 cmp %l4, 0
200d2d0: 02 80 00 0e be 200d308 <rtems_bdbuf_get_buffer_for_access+0x60>
200d2d4: 90 10 00 18 mov %i0, %o0
200d2d8: c2 05 20 18 ld [ %l4 + 0x18 ], %g1
200d2dc: 80 a6 00 01 cmp %i0, %g1
200d2e0: 02 80 00 23 be 200d36c <rtems_bdbuf_get_buffer_for_access+0xc4>
200d2e4: c4 05 20 1c ld [ %l4 + 0x1c ], %g2
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d2e8: 80 a6 00 01 cmp %i0, %g1
200d2ec: 08 80 00 1a bleu 200d354 <rtems_bdbuf_get_buffer_for_access+0xac>
200d2f0: 01 00 00 00 nop
{
p = p->avl.right;
200d2f4: e8 05 20 0c ld [ %l4 + 0xc ], %l4
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200d2f8: 80 a5 20 00 cmp %l4, 0
200d2fc: 32 bf ff f8 bne,a 200d2dc <rtems_bdbuf_get_buffer_for_access+0x34>
200d300: c2 05 20 18 ld [ %l4 + 0x18 ], %g1
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
200d304: 90 10 00 18 mov %i0, %o0
200d308: 92 10 00 19 mov %i1, %o1
200d30c: 94 10 00 1a mov %i2, %o2
200d310: 7f ff fe df call 200ce8c <rtems_bdbuf_get_buffer_from_lru_list>
200d314: 96 10 00 1b mov %i3, %o3
if (bd == NULL)
200d318: a8 92 20 00 orcc %o0, 0, %l4
200d31c: 22 80 00 60 be,a 200d49c <rtems_bdbuf_get_buffer_for_access+0x1f4>
200d320: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
200d324: 3b 00 80 6a sethi %hi(0x201a800), %i5
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200d328: 39 00 80 2e sethi %hi(0x200b800), %i4
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
200d32c: ba 17 63 58 or %i5, 0x358, %i5
return;
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
200d330: b6 07 7f f8 add %i5, -8, %i3
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200d334: c2 05 20 28 ld [ %l4 + 0x28 ], %g1
200d338: 80 a0 60 0a cmp %g1, 0xa
200d33c: 08 80 00 24 bleu 200d3cc <rtems_bdbuf_get_buffer_for_access+0x124><== ALWAYS TAKEN
200d340: 84 17 20 80 or %i4, 0x80, %g2
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
200d344: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 <== NOT EXECUTED
200d348: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d34c: 7f ff f9 80 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200d350: 92 12 60 05 or %o1, 5, %o1 ! 42000005 <RAM_END+0x3fc00005><== NOT EXECUTED
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d354: 12 80 00 04 bne 200d364 <rtems_bdbuf_get_buffer_for_access+0xbc><== ALWAYS TAKEN
200d358: 80 a6 40 02 cmp %i1, %g2
200d35c: 38 bf ff e7 bgu,a 200d2f8 <rtems_bdbuf_get_buffer_for_access+0x50><== NOT EXECUTED
200d360: e8 05 20 0c ld [ %l4 + 0xc ], %l4 <== NOT EXECUTED
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200d364: 10 bf ff e5 b 200d2f8 <rtems_bdbuf_get_buffer_for_access+0x50>
200d368: e8 05 20 08 ld [ %l4 + 8 ], %l4
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200d36c: 80 a6 40 02 cmp %i1, %g2
200d370: 12 bf ff df bne 200d2ec <rtems_bdbuf_get_buffer_for_access+0x44><== NEVER TAKEN
200d374: 80 a6 00 01 cmp %i0, %g1
200d378: c2 05 20 20 ld [ %l4 + 0x20 ], %g1
200d37c: 80 a6 80 01 cmp %i2, %g1
200d380: 22 80 00 06 be,a 200d398 <rtems_bdbuf_get_buffer_for_access+0xf0>
200d384: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d388: 38 bf ff dc bgu,a 200d2f8 <rtems_bdbuf_get_buffer_for_access+0x50>
200d38c: e8 05 20 0c ld [ %l4 + 0xc ], %l4
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200d390: 10 bf ff da b 200d2f8 <rtems_bdbuf_get_buffer_for_access+0x50>
200d394: e8 05 20 08 ld [ %l4 + 8 ], %l4
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
200d398: c2 00 60 08 ld [ %g1 + 8 ], %g1
200d39c: 80 a0 40 1b cmp %g1, %i3
200d3a0: 02 bf ff e1 be 200d324 <rtems_bdbuf_get_buffer_for_access+0x7c>
200d3a4: 2b 00 80 2e sethi %hi(0x200b800), %l5
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d3a8: ac 10 20 08 mov 8, %l6
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200d3ac: c2 05 20 28 ld [ %l4 + 0x28 ], %g1
200d3b0: 80 a0 60 0a cmp %g1, 0xa
200d3b4: 08 80 00 16 bleu 200d40c <rtems_bdbuf_get_buffer_for_access+0x164><== ALWAYS TAKEN
200d3b8: 84 15 60 54 or %l5, 0x54, %g2
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
200d3bc: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 <== NOT EXECUTED
200d3c0: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d3c4: 7f ff f9 62 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200d3c8: 92 12 60 06 or %o1, 6, %o1 ! 42000006 <RAM_END+0x3fc00006><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200d3cc: 83 28 60 02 sll %g1, 2, %g1
200d3d0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200d3d4: 81 c0 40 00 jmp %g1
200d3d8: 01 00 00 00 nop
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200d3dc: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
200d3e0: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200d3e4: 84 00 bf ff add %g2, -1, %g2
200d3e8: c4 20 60 0c st %g2, [ %g1 + 0xc ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200d3ec: 7f ff eb b8 call 20082cc <_Chain_Extract>
200d3f0: 90 10 00 14 mov %l4, %o0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200d3f4: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
200d3f8: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200d3fc: 84 00 a0 01 inc %g2
200d400: c4 20 60 0c st %g2, [ %g1 + 0xc ]
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
200d404: 81 c7 e0 08 ret
200d408: 91 e8 00 14 restore %g0, %l4, %o0
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200d40c: 83 28 60 02 sll %g1, 2, %g1
200d410: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200d414: 81 c0 40 00 jmp %g1
200d418: 01 00 00 00 nop
200d41c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d420: ec 25 20 28 st %l6, [ %l4 + 0x28 ] <== NOT EXECUTED
200d424: 7f ff eb aa call 20082cc <_Chain_Extract> <== NOT EXECUTED
200d428: 01 00 00 00 nop <== 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 );
200d42c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200d430: 7f ff eb 9c call 20082a0 <_Chain_Append> <== NOT EXECUTED
200d434: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract (&bd->link);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
200d438: 7f ff f9 df call 200bbb4 <rtems_bdbuf_wake_swapper> <== NOT EXECUTED
200d43c: 01 00 00 00 nop <== NOT EXECUTED
200d440: 30 bf ff db b,a 200d3ac <rtems_bdbuf_get_buffer_for_access+0x104><== NOT EXECUTED
}
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
200d444: 90 10 00 14 mov %l4, %o0
200d448: 7f ff fa 40 call 200bd48 <rtems_bdbuf_wait>
200d44c: 92 10 00 11 mov %l1, %o1
200d450: 30 bf ff d7 b,a 200d3ac <rtems_bdbuf_get_buffer_for_access+0x104>
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)
200d454: c2 05 20 2c ld [ %l4 + 0x2c ], %g1
200d458: 80 a0 60 00 cmp %g1, 0
200d45c: 32 80 00 16 bne,a 200d4b4 <rtems_bdbuf_get_buffer_for_access+0x20c><== ALWAYS TAKEN
200d460: 11 00 80 6a sethi %hi(0x201a800), %o0
{
if (bd->group->bds_per_group != bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
200d464: 7f ff fb eb call 200c410 <rtems_bdbuf_remove_from_tree_and_lru_list><== NOT EXECUTED
200d468: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
200d46c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d470: c0 25 20 28 clr [ %l4 + 0x28 ] <== NOT EXECUTED
200d474: 40 00 0e 67 call 2010e10 <_Chain_Insert> <== NOT EXECUTED
200d478: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200d47c: 7f ff fa 5d call 200bdf0 <rtems_bdbuf_wake> <== NOT EXECUTED
200d480: 90 07 20 34 add %i4, 0x34, %o0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200d484: 10 bf ff 92 b 200d2cc <rtems_bdbuf_get_buffer_for_access+0x24><== NOT EXECUTED
200d488: e8 07 60 40 ld [ %i5 + 0x40 ], %l4 <== NOT EXECUTED
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
200d48c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
200d490: 7f ff fa 2e call 200bd48 <rtems_bdbuf_wait> <== NOT EXECUTED
200d494: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
200d498: 30 bf ff c5 b,a 200d3ac <rtems_bdbuf_get_buffer_for_access+0x104><== NOT EXECUTED
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
200d49c: 80 a0 40 13 cmp %g1, %l3
200d4a0: 22 80 00 05 be,a 200d4b4 <rtems_bdbuf_get_buffer_for_access+0x20c>
200d4a4: 11 00 80 6a sethi %hi(0x201a800), %o0
rtems_bdbuf_wake_swapper ();
200d4a8: 7f ff f9 c3 call 200bbb4 <rtems_bdbuf_wake_swapper>
200d4ac: 01 00 00 00 nop
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
200d4b0: 11 00 80 6a sethi %hi(0x201a800), %o0
200d4b4: 7f ff fa 05 call 200bcc8 <rtems_bdbuf_anonymous_wait>
200d4b8: 90 12 23 60 or %o0, 0x360, %o0 ! 201ab60 <bdbuf_cache+0x78>
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200d4bc: 10 bf ff 84 b 200d2cc <rtems_bdbuf_get_buffer_for_access+0x24>
200d4c0: e8 07 60 40 ld [ %i5 + 0x40 ], %l4
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);
200d4c4: 90 10 00 14 mov %l4, %o0
200d4c8: 7f ff fa 20 call 200bd48 <rtems_bdbuf_wait>
200d4cc: 92 10 00 1d mov %i5, %o1
200d4d0: 30 bf ff 99 b,a 200d334 <rtems_bdbuf_get_buffer_for_access+0x8c>
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);
200d4d4: 90 10 00 14 mov %l4, %o0
200d4d8: 7f ff fa 1c call 200bd48 <rtems_bdbuf_wait>
200d4dc: 92 10 00 1b mov %i3, %o1
200d4e0: 30 bf ff 95 b,a 200d334 <rtems_bdbuf_get_buffer_for_access+0x8c>
0200ce8c <rtems_bdbuf_get_buffer_from_lru_list>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
200ce8c: 9d e3 bf 20 save %sp, -224, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200ce90: 21 00 80 6a sethi %hi(0x201a800), %l0
200ce94: a0 14 22 e8 or %l0, 0x2e8, %l0 ! 201aae8 <bdbuf_cache>
200ce98: fa 04 20 44 ld [ %l0 + 0x44 ], %i5
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
200ce9c: b8 04 20 48 add %l0, 0x48, %i4
200cea0: 80 a7 40 1c cmp %i5, %i4
200cea4: 02 80 00 3f be 200cfa0 <rtems_bdbuf_get_buffer_from_lru_list+0x114>
200cea8: a2 10 20 00 clr %l1
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200ceac: aa 04 20 44 add %l0, 0x44, %l5
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200ceb0: ac 04 20 78 add %l0, 0x78, %l6
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
200ceb4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200ceb8: 80 a0 60 00 cmp %g1, 0
200cebc: 32 80 00 36 bne,a 200cf94 <rtems_bdbuf_get_buffer_from_lru_list+0x108>
200cec0: fa 07 40 00 ld [ %i5 ], %i5
{
if (bd->group->bds_per_group == bds_per_group)
200cec4: e6 07 60 30 ld [ %i5 + 0x30 ], %l3
200cec8: d2 04 e0 08 ld [ %l3 + 8 ], %o1
200cecc: 80 a2 40 1b cmp %o1, %i3
200ced0: 02 80 00 36 be 200cfa8 <rtems_bdbuf_get_buffer_from_lru_list+0x11c>
200ced4: 01 00 00 00 nop
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
empty_bd = bd;
}
else if (bd->group->users == 0)
200ced8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1
200cedc: 80 a0 60 00 cmp %g1, 0
200cee0: 32 80 00 2d bne,a 200cf94 <rtems_bdbuf_get_buffer_from_lru_list+0x108>
200cee4: fa 07 40 00 ld [ %i5 ], %i5
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
200cee8: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
for (b = 0, bd = group->bdbuf;
200ceec: 80 a2 60 00 cmp %o1, 0
200cef0: 02 80 00 0d be 200cf24 <rtems_bdbuf_get_buffer_from_lru_list+0x98><== NEVER TAKEN
200cef4: e2 04 e0 10 ld [ %l3 + 0x10 ], %l1
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;
200cef8: 40 00 28 08 call 2016f18 <.udiv>
200cefc: a4 10 20 00 clr %l2
for (b = 0, bd = group->bdbuf;
200cf00: a9 2a 20 06 sll %o0, 6, %l4
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
200cf04: 7f ff fd 43 call 200c410 <rtems_bdbuf_remove_from_tree_and_lru_list>
200cf08: 90 10 00 11 mov %l1, %o0
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
200cf0c: c2 04 e0 08 ld [ %l3 + 8 ], %g1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200cf10: a4 04 a0 01 inc %l2
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;
200cf14: 80 a4 80 01 cmp %l2, %g1
200cf18: 0a bf ff fb bcs 200cf04 <rtems_bdbuf_get_buffer_from_lru_list+0x78>
200cf1c: a2 04 40 14 add %l1, %l4, %l1
200cf20: e2 04 e0 10 ld [ %l3 + 0x10 ], %l1
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;
200cf24: f6 24 e0 08 st %i3, [ %l3 + 8 ]
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200cf28: 80 a6 e0 01 cmp %i3, 1
200cf2c: 08 80 00 16 bleu 200cf84 <rtems_bdbuf_get_buffer_from_lru_list+0xf8>
200cf30: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
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;
200cf34: 92 10 00 1b mov %i3, %o1
200cf38: 40 00 27 f8 call 2016f18 <.udiv>
200cf3c: a4 10 20 01 mov 1, %l2
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200cf40: a9 2a 20 06 sll %o0, 6, %l4
200cf44: a2 04 40 14 add %l1, %l4, %l1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200cf48: c0 24 60 28 clr [ %l1 + 0x28 ]
200cf4c: 92 10 00 11 mov %l1, %o1
200cf50: 40 00 0f b0 call 2010e10 <_Chain_Insert>
200cf54: 90 10 00 15 mov %l5, %o0
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200cf58: c2 04 e0 08 ld [ %l3 + 8 ], %g1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200cf5c: a4 04 a0 01 inc %l2
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;
200cf60: 80 a4 80 01 cmp %l2, %g1
200cf64: 0a bf ff f9 bcs 200cf48 <rtems_bdbuf_get_buffer_from_lru_list+0xbc><== NEVER TAKEN
200cf68: a2 04 40 14 add %l1, %l4, %l1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
200cf6c: 80 a4 a0 01 cmp %l2, 1
200cf70: 28 80 00 05 bleu,a 200cf84 <rtems_bdbuf_get_buffer_from_lru_list+0xf8><== NEVER TAKEN
200cf74: e2 04 e0 10 ld [ %l3 + 0x10 ], %l1 <== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200cf78: 7f ff fb 9e call 200bdf0 <rtems_bdbuf_wake>
200cf7c: 90 10 00 16 mov %l6, %o0
200cf80: e2 04 e0 10 ld [ %l3 + 0x10 ], %l1
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
200cf84: 80 a4 60 00 cmp %l1, 0
200cf88: 32 80 00 0f bne,a 200cfc4 <rtems_bdbuf_get_buffer_from_lru_list+0x138><== ALWAYS TAKEN
200cf8c: c0 24 60 08 clr [ %l1 + 8 ]
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
200cf90: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
200cf94: 80 a7 40 1c cmp %i5, %i4
200cf98: 12 bf ff c7 bne 200ceb4 <rtems_bdbuf_get_buffer_from_lru_list+0x28>
200cf9c: a2 10 20 00 clr %l1
node = rtems_chain_next (node);
}
return NULL;
}
200cfa0: 81 c7 e0 08 ret
200cfa4: 91 e8 00 11 restore %g0, %l1, %o0
*/
if (bd->waiters == 0)
{
if (bd->group->bds_per_group == bds_per_group)
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
200cfa8: 7f ff fd 1a call 200c410 <rtems_bdbuf_remove_from_tree_and_lru_list>
200cfac: 90 10 00 1d mov %i5, %o0
200cfb0: a2 10 00 1d mov %i5, %l1
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
200cfb4: 80 a4 60 00 cmp %l1, 0
200cfb8: 22 bf ff f7 be,a 200cf94 <rtems_bdbuf_get_buffer_from_lru_list+0x108><== NEVER TAKEN
200cfbc: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
200cfc0: c0 24 60 08 clr [ %l1 + 8 ]
bd->avl.right = NULL;
200cfc4: c0 24 60 0c clr [ %l1 + 0xc ]
rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
200cfc8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
200cfcc: f0 3c 60 18 std %i0, [ %l1 + 0x18 ]
bd->block = block;
200cfd0: f4 24 60 20 st %i2, [ %l1 + 0x20 ]
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
200cfd4: c0 24 60 2c clr [ %l1 + 0x2c ]
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;
200cfd8: b6 07 bf 80 add %fp, -128, %i3
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
200cfdc: b8 10 20 01 mov 1, %i4
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;
200cfe0: 84 10 00 1b mov %i3, %g2
bool modified = false;
if (p == NULL)
200cfe4: 80 a0 60 00 cmp %g1, 0
200cfe8: 02 80 00 a9 be 200d28c <rtems_bdbuf_get_buffer_from_lru_list+0x400>
200cfec: 9e 10 3f ff mov -1, %o7
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200cff0: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
200cff4: c2 20 80 00 st %g1, [ %g2 ]
200cff8: 88 00 a0 04 add %g2, 4, %g4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200cffc: 80 a6 00 03 cmp %i0, %g3
200d000: 18 80 00 17 bgu 200d05c <rtems_bdbuf_get_buffer_from_lru_list+0x1d0><== NEVER TAKEN
200d004: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
200d008: 80 a6 00 03 cmp %i0, %g3
200d00c: 32 80 00 09 bne,a 200d030 <rtems_bdbuf_get_buffer_from_lru_list+0x1a4><== NEVER TAKEN
200d010: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED
200d014: 80 a6 40 1d cmp %i1, %i5
200d018: 38 80 00 12 bgu,a 200d060 <rtems_bdbuf_get_buffer_from_lru_list+0x1d4><== NEVER TAKEN
200d01c: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
200d020: 80 a6 40 1d cmp %i1, %i5
200d024: 22 80 00 3f be,a 200d120 <rtems_bdbuf_get_buffer_from_lru_list+0x294><== ALWAYS TAKEN
200d028: c6 00 60 20 ld [ %g1 + 0x20 ], %g3
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
q = p->avl.left;
200d02c: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED
if (q == NULL)
200d030: 80 a0 e0 00 cmp %g3, 0
200d034: 02 80 00 48 be 200d154 <rtems_bdbuf_get_buffer_from_lru_list+0x2c8>
200d038: de 28 60 10 stb %o7, [ %g1 + 0x10 ]
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
200d03c: 82 10 00 03 mov %g3, %g1
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d040: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
200d044: 84 10 00 04 mov %g4, %g2
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
200d048: c2 20 80 00 st %g1, [ %g2 ]
200d04c: 88 00 a0 04 add %g2, 4, %g4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d050: 80 a6 00 03 cmp %i0, %g3
200d054: 08 bf ff ee bleu 200d00c <rtems_bdbuf_get_buffer_from_lru_list+0x180><== ALWAYS TAKEN
200d058: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
{
p->avl.cache = 1;
q = p->avl.right;
200d05c: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
if (q == NULL)
200d060: 80 a0 e0 00 cmp %g3, 0
200d064: 12 bf ff f6 bne 200d03c <rtems_bdbuf_get_buffer_from_lru_list+0x1b0>
200d068: f8 28 60 10 stb %i4, [ %g1 + 0x10 ]
{
q = node;
p->avl.right = q = node;
200d06c: e2 20 60 0c st %l1, [ %g1 + 0xc ]
200d070: 88 10 20 01 mov 1, %g4
}
p = q;
}
q->avl.left = q->avl.right = NULL;
200d074: c0 24 60 0c clr [ %l1 + 0xc ]
200d078: c0 24 60 08 clr [ %l1 + 8 ]
q->avl.bal = 0;
200d07c: c0 2c 60 11 clrb [ %l1 + 0x11 ]
200d080: 89 29 20 18 sll %g4, 0x18, %g4
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
200d084: 10 80 00 12 b 200d0cc <rtems_bdbuf_get_buffer_from_lru_list+0x240>
200d088: b4 10 20 01 mov 1, %i2
200d08c: 86 10 00 01 mov %g1, %g3
200d090: ba 10 20 01 mov 1, %i5
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
200d094: 80 a0 80 1b cmp %g2, %i3
200d098: 28 80 00 1f bleu,a 200d114 <rtems_bdbuf_get_buffer_from_lru_list+0x288>
200d09c: c6 24 20 40 st %g3, [ %l0 + 0x40 ]
{
p = *--buf_prev;
200d0a0: c2 00 bf fc ld [ %g2 + -4 ], %g1
if (p->avl.cache == -1)
200d0a4: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
200d0a8: 89 29 20 18 sll %g4, 0x18, %g4
200d0ac: b9 39 20 18 sra %g4, 0x18, %i4
200d0b0: 80 a7 3f ff cmp %i4, -1
200d0b4: 22 80 00 03 be,a 200d0c0 <rtems_bdbuf_get_buffer_from_lru_list+0x234>
200d0b8: c6 20 60 08 st %g3, [ %g1 + 8 ]
{
p->avl.left = q;
}
else
{
p->avl.right = q;
200d0bc: c6 20 60 0c st %g3, [ %g1 + 0xc ]
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
200d0c0: 80 8f 60 ff btst 0xff, %i5
200d0c4: 02 80 00 14 be 200d114 <rtems_bdbuf_get_buffer_from_lru_list+0x288>
200d0c8: 84 00 bf fc add %g2, -4, %g2
{
if (p->avl.cache == -1)
200d0cc: 89 39 20 18 sra %g4, 0x18, %g4
200d0d0: 80 a1 3f ff cmp %g4, -1
200d0d4: 22 80 00 23 be,a 200d160 <rtems_bdbuf_get_buffer_from_lru_list+0x2d4>
200d0d8: fa 48 60 11 ldsb [ %g1 + 0x11 ], %i5
break;
}
}
else
{
switch (p->avl.bal)
200d0dc: c6 48 60 11 ldsb [ %g1 + 0x11 ], %g3
200d0e0: 80 a0 e0 00 cmp %g3, 0
200d0e4: 22 bf ff ea be,a 200d08c <rtems_bdbuf_get_buffer_from_lru_list+0x200>
200d0e8: f4 28 60 11 stb %i2, [ %g1 + 0x11 ]
200d0ec: 80 a0 e0 01 cmp %g3, 1
200d0f0: 02 80 00 23 be 200d17c <rtems_bdbuf_get_buffer_from_lru_list+0x2f0>
200d0f4: 80 a0 ff ff cmp %g3, -1
200d0f8: 22 80 00 14 be,a 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x2bc><== ALWAYS TAKEN
200d0fc: c0 28 60 11 clrb [ %g1 + 0x11 ]
200d100: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
200d104: 80 a0 80 1b cmp %g2, %i3 <== NOT EXECUTED
200d108: 18 bf ff e6 bgu 200d0a0 <rtems_bdbuf_get_buffer_from_lru_list+0x214><== NOT EXECUTED
200d10c: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
p->avl.right = q;
}
}
else
{
*root = p;
200d110: c6 24 20 40 st %g3, [ %l0 + 0x40 ] <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d114: 82 10 20 01 mov 1, %g1
200d118: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
if (empty_bd != NULL)
{
rtems_bdbuf_setup_empty_buffer (empty_bd, dev, block);
return empty_bd;
200d11c: 30 bf ff a1 b,a 200cfa0 <rtems_bdbuf_get_buffer_from_lru_list+0x114>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d120: 80 a6 80 03 cmp %i2, %g3
200d124: 38 bf ff cf bgu,a 200d060 <rtems_bdbuf_get_buffer_from_lru_list+0x1d4>
200d128: c6 00 60 0c ld [ %g1 + 0xc ], %g3
q = node;
p->avl.right = q = node;
break;
}
}
else if ((p->dev != dev) || (p->block != block))
200d12c: 80 a6 80 03 cmp %i2, %g3
200d130: 32 bf ff c0 bne,a 200d030 <rtems_bdbuf_get_buffer_from_lru_list+0x1a4><== ALWAYS TAKEN
200d134: c6 00 60 08 ld [ %g1 + 8 ], %g3
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
200d138: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d13c: 7f ff ea e7 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d140: 90 12 20 1b or %o0, 0x1b, %o0 ! 4200001b <RAM_END+0x3fc0001b><== NOT EXECUTED
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
200d144: c0 28 60 11 clrb [ %g1 + 0x11 ]
200d148: 86 10 00 01 mov %g1, %g3
modified = false;
200d14c: 10 bf ff d2 b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208>
200d150: ba 10 20 00 clr %i5
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
200d154: e2 20 60 08 st %l1, [ %g1 + 8 ]
200d158: 10 bf ff c7 b 200d074 <rtems_bdbuf_get_buffer_from_lru_list+0x1e8>
200d15c: 88 10 3f ff mov -1, %g4
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
200d160: 80 a7 60 00 cmp %i5, 0
200d164: 12 80 00 21 bne 200d1e8 <rtems_bdbuf_get_buffer_from_lru_list+0x35c>
200d168: 80 a7 60 01 cmp %i5, 1
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
200d16c: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
200d170: 86 10 00 01 mov %g1, %g3
200d174: 10 bf ff c8 b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208>
200d178: ba 10 20 01 mov 1, %i5
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
200d17c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
if (p1->avl.bal == 1) /* simple RR-turn */
200d180: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200d184: 80 a0 e0 01 cmp %g3, 1
200d188: 02 80 00 33 be 200d254 <rtems_bdbuf_get_buffer_from_lru_list+0x3c8><== ALWAYS TAKEN
200d18c: c6 01 20 08 ld [ %g4 + 8 ], %g3
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d190: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5 <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200d194: f8 00 e0 0c ld [ %g3 + 0xc ], %i4 <== 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;
200d198: ba 1f 60 01 xor %i5, 1, %i5 <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200d19c: f8 21 20 08 st %i4, [ %g4 + 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;
200d1a0: 80 a0 00 1d cmp %g0, %i5 <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200d1a4: f8 00 e0 08 ld [ %g3 + 8 ], %i4 <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d1a8: ba 40 3f ff addx %g0, -1, %i5 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
200d1ac: c8 20 e0 0c st %g4, [ %g3 + 0xc ] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d1b0: fa 28 60 11 stb %i5, [ %g1 + 0x11 ] <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200d1b4: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5 <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200d1b8: f8 20 60 0c st %i4, [ %g1 + 0xc ] <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200d1bc: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
200d1c0: 02 80 00 06 be 200d1d8 <rtems_bdbuf_get_buffer_from_lru_list+0x34c><== NOT EXECUTED
200d1c4: c2 20 e0 08 st %g1, [ %g3 + 8 ] <== NOT EXECUTED
200d1c8: c0 29 20 11 clrb [ %g4 + 0x11 ]
p = p2;
}
p->avl.bal = 0;
200d1cc: c0 28 e0 11 clrb [ %g3 + 0x11 ]
modified = false;
200d1d0: 10 bf ff b1 b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208>
200d1d4: ba 10 20 00 clr %i5
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200d1d8: f4 29 20 11 stb %i2, [ %g4 + 0x11 ] <== NOT EXECUTED
p = p2;
}
p->avl.bal = 0;
200d1dc: c0 28 e0 11 clrb [ %g3 + 0x11 ] <== NOT EXECUTED
modified = false;
200d1e0: 10 bf ff ad b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208><== NOT EXECUTED
200d1e4: ba 10 20 00 clr %i5 <== NOT EXECUTED
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
200d1e8: 02 bf ff d7 be 200d144 <rtems_bdbuf_get_buffer_from_lru_list+0x2b8>
200d1ec: 80 a7 7f ff cmp %i5, -1
200d1f0: 32 bf ff c5 bne,a 200d104 <rtems_bdbuf_get_buffer_from_lru_list+0x278><== NEVER TAKEN
200d1f4: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
200d1f8: c8 00 60 08 ld [ %g1 + 8 ], %g4
if (p1->avl.bal == -1) /* simple LL-turn */
200d1fc: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200d200: 80 a0 ff ff cmp %g3, -1
200d204: 02 80 00 1b be 200d270 <rtems_bdbuf_get_buffer_from_lru_list+0x3e4><== NEVER TAKEN
200d208: c6 01 20 0c ld [ %g4 + 0xc ], %g3
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d20c: f8 48 e0 11 ldsb [ %g3 + 0x11 ], %i4
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200d210: f2 00 e0 08 ld [ %g3 + 8 ], %i1
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;
200d214: b8 38 00 1c xnor %g0, %i4, %i4
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200d218: f2 21 20 0c st %i1, [ %g4 + 0xc ]
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d21c: 80 a0 00 1c cmp %g0, %i4
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200d220: f2 00 e0 0c ld [ %g3 + 0xc ], %i1
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d224: b8 60 3f ff subx %g0, -1, %i4
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
200d228: c8 20 e0 08 st %g4, [ %g3 + 8 ]
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d22c: f8 28 60 11 stb %i4, [ %g1 + 0x11 ]
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200d230: f8 48 e0 11 ldsb [ %g3 + 0x11 ], %i4
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200d234: f2 20 60 08 st %i1, [ %g1 + 8 ]
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200d238: 80 a7 20 01 cmp %i4, 1
200d23c: 12 bf ff e3 bne 200d1c8 <rtems_bdbuf_get_buffer_from_lru_list+0x33c><== ALWAYS TAKEN
200d240: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
200d244: fa 29 20 11 stb %i5, [ %g4 + 0x11 ] <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
200d248: c0 28 e0 11 clrb [ %g3 + 0x11 ] <== NOT EXECUTED
modified = false;
200d24c: 10 bf ff 92 b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208><== NOT EXECUTED
200d250: ba 10 20 00 clr %i5 <== NOT EXECUTED
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
200d254: c6 20 60 0c st %g3, [ %g1 + 0xc ]
p1->avl.left = p;
p->avl.bal = 0;
200d258: c0 28 60 11 clrb [ %g1 + 0x11 ]
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
200d25c: c2 21 20 08 st %g1, [ %g4 + 8 ]
p->avl.bal = 0;
200d260: 86 10 00 04 mov %g4, %g3
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
modified = false;
200d264: ba 10 20 00 clr %i5
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
200d268: 10 bf ff 8b b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208>
200d26c: c0 28 e0 11 clrb [ %g3 + 0x11 ]
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
200d270: c6 20 60 08 st %g3, [ %g1 + 8 ] <== NOT EXECUTED
p1->avl.right = p;
p->avl.bal = 0;
200d274: c0 28 60 11 clrb [ %g1 + 0x11 ] <== NOT EXECUTED
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
200d278: c2 21 20 0c st %g1, [ %g4 + 0xc ] <== NOT EXECUTED
p->avl.bal = 0;
200d27c: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
modified = false;
200d280: ba 10 20 00 clr %i5 <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
200d284: 10 bf ff 84 b 200d094 <rtems_bdbuf_get_buffer_from_lru_list+0x208><== NOT EXECUTED
200d288: c0 28 e0 11 clrb [ %g3 + 0x11 ] <== NOT EXECUTED
bool modified = false;
if (p == NULL)
{
*root = node;
200d28c: e2 24 20 40 st %l1, [ %l0 + 0x40 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d290: 82 10 20 01 mov 1, %g1
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
200d294: c0 24 60 08 clr [ %l1 + 8 ]
node->avl.right = NULL;
200d298: c0 24 60 0c clr [ %l1 + 0xc ]
node->avl.bal = 0;
200d29c: c0 2c 60 11 clrb [ %l1 + 0x11 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d2a0: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
200d2a4: 30 bf ff 3f b,a 200cfa0 <rtems_bdbuf_get_buffer_from_lru_list+0x114>
0200d4e4 <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
200d4e4: 9d e3 bf a0 save %sp, -96, %sp
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
200d4e8: 03 00 80 6c sethi %hi(0x201b000), %g1
200d4ec: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 201b3f8 <_Per_CPU_Information+0x8>
200d4f0: 80 a0 60 00 cmp %g1, 0
200d4f4: 12 80 00 16 bne 200d54c <rtems_bdbuf_init+0x68> <== NEVER TAKEN
200d4f8: b0 10 20 12 mov 0x12, %i0
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
200d4fc: 33 00 80 64 sethi %hi(0x2019000), %i1
200d500: b2 16 60 78 or %i1, 0x78, %i1 ! 2019078 <rtems_bdbuf_configuration>
200d504: f8 06 60 24 ld [ %i1 + 0x24 ], %i4
200d508: e0 06 60 20 ld [ %i1 + 0x20 ], %l0
200d50c: 90 10 00 1c mov %i4, %o0
200d510: 92 10 00 10 mov %l0, %o1
200d514: 40 00 27 2d call 20171c8 <.urem>
200d518: b0 10 20 0a mov 0xa, %i0
200d51c: 80 a2 20 00 cmp %o0, 0
200d520: 12 80 00 ed bne 200d8d4 <rtems_bdbuf_init+0x3f0> <== NEVER TAKEN
200d524: 01 00 00 00 nop
/*
* We use a special variable to manage the initialisation incase we have
* completing threads doing this. You may get errors if the another thread
* makes a call and we have not finished initialisation.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
200d528: 7f ff f9 ca call 200bc50 <rtems_bdbuf_disable_preemption>
200d52c: 35 00 80 6a sethi %hi(0x201a800), %i2
if (bdbuf_cache.initialised)
200d530: b6 16 a2 e8 or %i2, 0x2e8, %i3 ! 201aae8 <bdbuf_cache>
200d534: c2 0e e0 88 ldub [ %i3 + 0x88 ], %g1
200d538: 80 a0 60 00 cmp %g1, 0
200d53c: 02 80 00 06 be 200d554 <rtems_bdbuf_init+0x70> <== ALWAYS TAKEN
200d540: ba 10 00 08 mov %o0, %i5
{
rtems_bdbuf_restore_preemption (prev_mode);
200d544: 7f ff f9 d2 call 200bc8c <rtems_bdbuf_restore_preemption> <== NOT EXECUTED
200d548: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
200d54c: 81 c7 e0 08 ret <== NOT EXECUTED
200d550: 81 e8 00 00 restore <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
200d554: 92 10 20 00 clr %o1
200d558: 94 10 20 90 mov 0x90, %o2
200d55c: 40 00 1b 70 call 201431c <memset>
200d560: 90 10 00 1b mov %i3, %o0
bdbuf_cache.initialised = true;
200d564: 82 10 20 01 mov 1, %g1
rtems_bdbuf_restore_preemption (prev_mode);
200d568: 90 10 00 1d mov %i5, %o0
200d56c: 7f ff f9 c8 call 200bc8c <rtems_bdbuf_restore_preemption>
200d570: c2 2e e0 88 stb %g1, [ %i3 + 0x88 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200d574: 82 06 e0 0c add %i3, 0xc, %g1
*/
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;
200d578: 05 3f ff ff sethi %hi(0xfffffc00), %g2
200d57c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200d580: 84 10 a3 ff or %g2, 0x3ff, %g2
200d584: 82 06 e0 48 add %i3, 0x48, %g1
200d588: 86 10 00 02 mov %g2, %g3
200d58c: c2 26 e0 44 st %g1, [ %i3 + 0x44 ]
200d590: c4 3e e0 38 std %g2, [ %i3 + 0x38 ]
200d594: 82 06 e0 54 add %i3, 0x54, %g1
head->previous = NULL;
tail->previous = head;
200d598: 84 06 e0 08 add %i3, 8, %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200d59c: c2 26 e0 50 st %g1, [ %i3 + 0x50 ]
head->previous = NULL;
tail->previous = head;
200d5a0: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200d5a4: 82 06 e0 60 add %i3, 0x60, %g1
head->previous = NULL;
tail->previous = head;
200d5a8: 84 06 e0 44 add %i3, 0x44, %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200d5ac: c2 26 e0 5c st %g1, [ %i3 + 0x5c ]
head->previous = NULL;
tail->previous = head;
200d5b0: c4 26 e0 4c st %g2, [ %i3 + 0x4c ]
200d5b4: 82 06 e0 5c add %i3, 0x5c, %g1
200d5b8: 84 06 e0 50 add %i3, 0x50, %g2
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
200d5bc: 3b 10 91 10 sethi %hi(0x42444000), %i5
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200d5c0: c0 26 e0 0c clr [ %i3 + 0xc ]
200d5c4: c0 26 e0 48 clr [ %i3 + 0x48 ]
200d5c8: c0 26 e0 54 clr [ %i3 + 0x54 ]
tail->previous = head;
200d5cc: c4 26 e0 58 st %g2, [ %i3 + 0x58 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200d5d0: c0 26 e0 60 clr [ %i3 + 0x60 ]
200d5d4: 90 17 63 6c or %i5, 0x36c, %o0
tail->previous = head;
200d5d8: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
200d5dc: 92 10 20 01 mov 1, %o1
200d5e0: 94 10 20 54 mov 0x54, %o2
200d5e4: 96 10 20 00 clr %o3
200d5e8: 7f ff e7 7b call 20073d4 <rtems_semaphore_create>
200d5ec: 98 06 e0 28 add %i3, 0x28, %o4
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
200d5f0: 80 a2 20 00 cmp %o0, 0
200d5f4: 02 80 00 25 be 200d688 <rtems_bdbuf_init+0x1a4> <== ALWAYS TAKEN
200d5f8: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
200d5fc: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0 <== NOT EXECUTED
200d600: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d604: 12 80 00 1e bne 200d67c <rtems_bdbuf_init+0x198> <== NOT EXECUTED
200d608: 01 00 00 00 nop <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
200d60c: 7f ff d9 11 call 2003a50 <free> <== NOT EXECUTED
200d610: d0 06 e0 18 ld [ %i3 + 0x18 ], %o0 <== NOT EXECUTED
free (bdbuf_cache.groups);
200d614: 7f ff d9 0f call 2003a50 <free> <== NOT EXECUTED
200d618: d0 06 e0 84 ld [ %i3 + 0x84 ], %o0 <== NOT EXECUTED
free (bdbuf_cache.bds);
200d61c: 7f ff d9 0d call 2003a50 <free> <== NOT EXECUTED
200d620: d0 06 e0 14 ld [ %i3 + 0x14 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
200d624: 7f ff e7 dc call 2007594 <rtems_semaphore_delete> <== NOT EXECUTED
200d628: d0 06 e0 7c ld [ %i3 + 0x7c ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
200d62c: 7f ff e7 da call 2007594 <rtems_semaphore_delete> <== NOT EXECUTED
200d630: d0 06 e0 6c ld [ %i3 + 0x6c ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
200d634: 7f ff e7 d8 call 2007594 <rtems_semaphore_delete> <== NOT EXECUTED
200d638: d0 06 e0 74 ld [ %i3 + 0x74 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
200d63c: 7f ff e7 d6 call 2007594 <rtems_semaphore_delete> <== NOT EXECUTED
200d640: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
200d644: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1 <== NOT EXECUTED
200d648: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d64c: 12 80 00 05 bne 200d660 <rtems_bdbuf_init+0x17c> <== NOT EXECUTED
200d650: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
200d654: c0 2e e0 88 clrb [ %i3 + 0x88 ] <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
200d658: 81 c7 e0 08 ret <== NOT EXECUTED
200d65c: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
200d660: 7f ff f9 32 call 200bb28 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200d664: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
200d668: 7f ff e7 cb call 2007594 <rtems_semaphore_delete> <== NOT EXECUTED
200d66c: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
200d670: c0 2e e0 88 clrb [ %i3 + 0x88 ] <== NOT EXECUTED
200d674: 81 c7 e0 08 ret <== NOT EXECUTED
200d678: 81 e8 00 00 restore <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
200d67c: 7f ff e8 bc call 200796c <rtems_task_delete> <== NOT EXECUTED
200d680: 01 00 00 00 nop <== NOT EXECUTED
200d684: 30 bf ff e2 b,a 200d60c <rtems_bdbuf_init+0x128> <== NOT EXECUTED
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
goto error;
rtems_bdbuf_lock_cache ();
200d688: 7f ff f8 95 call 200b8dc <rtems_bdbuf_lock_cache>
200d68c: 01 00 00 00 nop
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
200d690: 90 17 63 73 or %i5, 0x373, %o0
200d694: 92 10 20 01 mov 1, %o1
200d698: 94 10 20 54 mov 0x54, %o2
200d69c: 96 10 20 00 clr %o3
200d6a0: 7f ff e7 4d call 20073d4 <rtems_semaphore_create>
200d6a4: 98 06 e0 2c add %i3, 0x2c, %o4
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
200d6a8: 80 a2 20 00 cmp %o0, 0
200d6ac: 12 bf ff d5 bne 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d6b0: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
200d6b4: 90 17 63 61 or %i5, 0x361, %o0
200d6b8: 92 10 20 00 clr %o1
200d6bc: 94 10 20 24 mov 0x24, %o2
200d6c0: 96 10 20 00 clr %o3
200d6c4: 7f ff e7 44 call 20073d4 <rtems_semaphore_create>
200d6c8: 98 06 e0 6c add %i3, 0x6c, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200d6cc: 80 a2 20 00 cmp %o0, 0
200d6d0: 12 bf ff cc bne 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d6d4: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
200d6d8: 90 17 63 74 or %i5, 0x374, %o0
200d6dc: 92 10 20 00 clr %o1
200d6e0: 94 10 20 24 mov 0x24, %o2
200d6e4: 96 10 20 00 clr %o3
200d6e8: 7f ff e7 3b call 20073d4 <rtems_semaphore_create>
200d6ec: 98 06 e0 74 add %i3, 0x74, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200d6f0: 80 a2 20 00 cmp %o0, 0
200d6f4: 12 bf ff c3 bne 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d6f8: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
200d6fc: 90 17 63 62 or %i5, 0x362, %o0
200d700: 92 10 20 00 clr %o1
200d704: 94 10 20 24 mov 0x24, %o2
200d708: 96 10 20 00 clr %o3
200d70c: 7f ff e7 32 call 20073d4 <rtems_semaphore_create>
200d710: 98 06 e0 7c add %i3, 0x7c, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200d714: 80 a2 20 00 cmp %o0, 0
200d718: 32 bf ff ba bne,a 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d71c: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0 <== NOT EXECUTED
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
200d720: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
200d724: 40 00 25 fd call 2016f18 <.udiv>
200d728: 92 10 00 10 mov %l0, %o1
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
200d72c: 92 10 00 10 mov %l0, %o1
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
200d730: ba 10 00 08 mov %o0, %i5
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
200d734: d0 26 e0 1c st %o0, [ %i3 + 0x1c ]
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
200d738: 40 00 25 f8 call 2016f18 <.udiv>
200d73c: 90 10 00 1c mov %i4, %o0
200d740: 82 10 00 08 mov %o0, %g1
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
200d744: 90 10 00 1d mov %i5, %o0
200d748: 92 10 00 01 mov %g1, %o1
200d74c: 40 00 25 f3 call 2016f18 <.udiv>
200d750: c2 26 e0 20 st %g1, [ %i3 + 0x20 ]
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
200d754: 92 10 00 1d mov %i5, %o1
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
200d758: d0 26 e0 80 st %o0, [ %i3 + 0x80 ]
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
200d75c: b8 10 00 08 mov %o0, %i4
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
200d760: 7f ff d8 49 call 2003884 <calloc>
200d764: 90 10 20 40 mov 0x40, %o0
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
200d768: 80 a2 20 00 cmp %o0, 0
200d76c: 02 bf ff a4 be 200d5fc <rtems_bdbuf_init+0x118> <== NEVER TAKEN
200d770: d0 26 e0 14 st %o0, [ %i3 + 0x14 ]
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
200d774: 90 10 20 14 mov 0x14, %o0
200d778: 7f ff d8 43 call 2003884 <calloc>
200d77c: 92 10 00 1c mov %i4, %o1
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
200d780: 80 a2 20 00 cmp %o0, 0
200d784: 02 bf ff 9e be 200d5fc <rtems_bdbuf_init+0x118> <== NEVER TAKEN
200d788: d0 26 e0 84 st %o0, [ %i3 + 0x84 ]
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
cache_aligment,
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
200d78c: 92 10 00 10 mov %l0, %o1
200d790: 40 00 25 a8 call 2016e30 <.umul>
200d794: 90 10 00 1d mov %i5, %o0
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
200d798: 92 10 20 20 mov 0x20, %o1
cache_aligment,
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
200d79c: 94 10 00 08 mov %o0, %o2
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
200d7a0: 11 00 80 6a sethi %hi(0x201a800), %o0
200d7a4: 40 00 09 86 call 200fdbc <rtems_memalign>
200d7a8: 90 12 23 00 or %o0, 0x300, %o0 ! 201ab00 <bdbuf_cache+0x18>
200d7ac: 80 a2 20 00 cmp %o0, 0
200d7b0: 12 bf ff 94 bne 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d7b4: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
200d7b8: e8 06 e0 84 ld [ %i3 + 0x84 ], %l4
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
200d7bc: f0 06 e0 14 ld [ %i3 + 0x14 ], %i0
200d7c0: e6 06 e0 18 ld [ %i3 + 0x18 ], %l3
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200d7c4: 39 3f ff ff sethi %hi(0xfffffc00), %i4
/*
* 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,
200d7c8: a4 10 20 00 clr %l2
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200d7cc: b8 17 23 ff or %i4, 0x3ff, %i4
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
200d7d0: a2 10 00 1b mov %i3, %l1
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200d7d4: ba 10 00 1c mov %i4, %i5
200d7d8: ac 06 e0 44 add %i3, 0x44, %l6
/*
* 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,
200d7dc: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
200d7e0: 92 10 00 18 mov %i0, %o1
200d7e4: 80 a4 80 01 cmp %l2, %g1
200d7e8: 1a 80 00 12 bcc 200d830 <rtems_bdbuf_init+0x34c>
200d7ec: 90 10 00 16 mov %l6, %o0
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
bd->group = group;
200d7f0: e8 26 20 30 st %l4, [ %i0 + 0x30 ]
bd->buffer = buffer;
200d7f4: e6 26 20 24 st %l3, [ %i0 + 0x24 ]
200d7f8: 7f ff ea aa call 20082a0 <_Chain_Append>
200d7fc: f8 3e 20 18 std %i4, [ %i0 + 0x18 ]
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
200d800: ea 04 60 20 ld [ %l1 + 0x20 ], %l5
200d804: 90 10 00 12 mov %l2, %o0
200d808: 92 10 00 15 mov %l5, %o1
200d80c: 40 00 26 6f call 20171c8 <.urem>
200d810: aa 05 7f ff add %l5, -1, %l5
200d814: 80 a2 00 15 cmp %o0, %l5
200d818: 22 80 00 02 be,a 200d820 <rtems_bdbuf_init+0x33c>
200d81c: a8 05 20 14 add %l4, 0x14, %l4
* 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)
200d820: a4 04 a0 01 inc %l2
200d824: b0 06 20 40 add %i0, 0x40, %i0
200d828: 10 bf ff ed b 200d7dc <rtems_bdbuf_init+0x2f8>
200d82c: a6 04 c0 10 add %l3, %l0, %l3
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
200d830: c8 04 60 20 ld [ %l1 + 0x20 ], %g4
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
200d834: c2 04 60 84 ld [ %l1 + 0x84 ], %g1
bd = bdbuf_cache.bds;
200d838: c6 04 60 14 ld [ %l1 + 0x14 ], %g3
b < bdbuf_cache.group_count;
200d83c: f8 04 60 80 ld [ %l1 + 0x80 ], %i4
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
200d840: bb 29 20 06 sll %g4, 6, %i5
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
200d844: 84 10 20 00 clr %g2
200d848: 80 a0 80 1c cmp %g2, %i4
200d84c: 02 80 00 07 be 200d868 <rtems_bdbuf_init+0x384>
200d850: 84 00 a0 01 inc %g2
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
200d854: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
200d858: c8 20 60 08 st %g4, [ %g1 + 8 ]
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
200d85c: 82 00 60 14 add %g1, 0x14, %g1
bd += bdbuf_cache.max_bds_per_group)
200d860: 10 bf ff fa b 200d848 <rtems_bdbuf_init+0x364>
200d864: 86 00 c0 1d add %g3, %i5, %g3
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
200d868: d2 06 60 08 ld [ %i1 + 8 ], %o1
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
200d86c: 82 10 20 01 mov 1, %g1
200d870: c2 2e e0 04 stb %g1, [ %i3 + 4 ]
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
200d874: 80 a2 60 00 cmp %o1, 0
200d878: 22 80 00 02 be,a 200d880 <rtems_bdbuf_init+0x39c> <== NEVER TAKEN
200d87c: 92 10 20 0f mov 0xf, %o1 <== NOT EXECUTED
200d880: 11 10 94 d5 sethi %hi(0x42535400), %o0
200d884: 15 00 00 08 sethi %hi(0x2000), %o2
200d888: 90 12 23 50 or %o0, 0x350, %o0
200d88c: 96 10 24 00 mov 0x400, %o3
200d890: 98 10 20 00 clr %o4
200d894: 7f ff e7 ec call 2007844 <rtems_task_create>
200d898: 9a 16 a2 e8 or %i2, 0x2e8, %o5
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
200d89c: 80 a2 20 00 cmp %o0, 0
200d8a0: 12 bf ff 58 bne 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d8a4: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
200d8a8: 03 00 80 6a sethi %hi(0x201a800), %g1
200d8ac: d0 00 62 e8 ld [ %g1 + 0x2e8 ], %o0 ! 201aae8 <bdbuf_cache>
200d8b0: 94 10 00 1b mov %i3, %o2
200d8b4: 13 00 80 32 sethi %hi(0x200c800), %o1
200d8b8: 7f ff e8 6f call 2007a74 <rtems_task_start>
200d8bc: 92 12 62 50 or %o1, 0x250, %o1 ! 200ca50 <rtems_bdbuf_swapout_task>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
200d8c0: 80 a2 20 00 cmp %o0, 0
200d8c4: 12 bf ff 4f bne 200d600 <rtems_bdbuf_init+0x11c> <== NEVER TAKEN
200d8c8: d0 06 a2 e8 ld [ %i2 + 0x2e8 ], %o0
goto error;
rtems_bdbuf_unlock_cache ();
200d8cc: 7f ff f8 97 call 200bb28 <rtems_bdbuf_unlock_cache>
200d8d0: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
200d8d4: 81 c7 e0 08 ret
200d8d8: 81 e8 00 00 restore
0200b8dc <rtems_bdbuf_lock_cache>:
/**
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
200b8dc: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200b8e0: 03 00 80 6a sethi %hi(0x201a800), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200b8e4: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 201ab10 <bdbuf_cache+0x28>
200b8e8: 92 10 20 00 clr %o1
200b8ec: 7f ff ef 61 call 2007670 <rtems_semaphore_obtain>
200b8f0: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200b8f4: 80 a2 20 00 cmp %o0, 0
200b8f8: 12 80 00 04 bne 200b908 <rtems_bdbuf_lock_cache+0x2c> <== NEVER TAKEN
200b8fc: 11 10 80 00 sethi %hi(0x42000000), %o0
200b900: 81 c7 e0 08 ret
200b904: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200b908: 7f ff f0 f4 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200b90c: 90 12 20 0d or %o0, 0xd, %o0 <== NOT EXECUTED
0200b914 <rtems_bdbuf_lock_sync>:
/**
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
200b914: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
200b918: 03 00 80 6a sethi %hi(0x201a800), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200b91c: d0 00 63 14 ld [ %g1 + 0x314 ], %o0 ! 201ab14 <bdbuf_cache+0x2c>
200b920: 92 10 20 00 clr %o1
200b924: 7f ff ef 53 call 2007670 <rtems_semaphore_obtain>
200b928: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200b92c: 80 a2 20 00 cmp %o0, 0
200b930: 12 80 00 04 bne 200b940 <rtems_bdbuf_lock_sync+0x2c> <== NEVER TAKEN
200b934: 11 10 80 00 sethi %hi(0x42000000), %o0
200b938: 81 c7 e0 08 ret
200b93c: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200b940: 7f ff f0 e6 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200b944: 90 12 20 0b or %o0, 0xb, %o0 <== NOT EXECUTED
0200bf2c <rtems_bdbuf_obtain_disk.part.8>:
return bd;
}
static rtems_status_code
rtems_bdbuf_obtain_disk (dev_t dev,
200bf2c: 9d e3 bf a0 save %sp, -96, %sp
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
200bf30: 90 10 00 18 mov %i0, %o0
200bf34: 92 10 00 19 mov %i1, %o1
200bf38: 7f ff db 8e call 2002d70 <rtems_disk_obtain>
200bf3c: b0 10 20 04 mov 4, %i0
if (dd == NULL)
200bf40: 80 a2 20 00 cmp %o0, 0
200bf44: 02 80 00 34 be 200c014 <rtems_bdbuf_obtain_disk.part.8+0xe8><== NEVER TAKEN
200bf48: b2 10 00 08 mov %o0, %i1
return RTEMS_INVALID_ID;
*dd_ptr = dd;
if (media_block_ptr != NULL)
200bf4c: 80 a7 20 00 cmp %i4, 0
200bf50: 02 80 00 11 be 200bf94 <rtems_bdbuf_obtain_disk.part.8+0x68>
200bf54: d0 26 c0 00 st %o0, [ %i3 ]
rtems_bdbuf_media_block (rtems_blkdev_bnum block,
size_t block_size,
size_t media_block_size)
{
return (rtems_blkdev_bnum)
((((uint64_t) block) * block_size) / media_block_size);
200bf58: d6 02 20 20 ld [ %o0 + 0x20 ], %o3
200bf5c: 94 10 20 00 clr %o2
200bf60: 90 10 20 00 clr %o0
200bf64: 40 00 2d 45 call 2017478 <__muldi3>
200bf68: 92 10 00 1a mov %i2, %o1
200bf6c: d6 06 60 24 ld [ %i1 + 0x24 ], %o3
200bf70: 40 00 2f 4e call 2017ca8 <__udivdi3>
200bf74: 94 10 20 00 clr %o2
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
200bf78: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
200bf7c: 80 a2 40 01 cmp %o1, %g1
200bf80: 1a 80 00 23 bcc 200c00c <rtems_bdbuf_obtain_disk.part.8+0xe0><== NEVER TAKEN
200bf84: 90 10 00 19 mov %i1, %o0
{
rtems_disk_release(dd);
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
200bf88: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200bf8c: 92 02 40 01 add %o1, %g1, %o1
200bf90: d2 27 00 00 st %o1, [ %i4 ]
}
if (bds_per_group_ptr != NULL)
200bf94: 80 a7 60 00 cmp %i5, 0
200bf98: 02 80 00 1f be 200c014 <rtems_bdbuf_obtain_disk.part.8+0xe8>
200bf9c: b0 10 20 00 clr %i0
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
200bfa0: d0 06 60 20 ld [ %i1 + 0x20 ], %o0
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
200bfa4: 03 00 80 64 sethi %hi(0x2019000), %g1
200bfa8: 82 10 60 78 or %g1, 0x78, %g1 ! 2019078 <rtems_bdbuf_configuration>
200bfac: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200bfb0: 80 a2 00 02 cmp %o0, %g2
200bfb4: 38 80 00 16 bgu,a 200c00c <rtems_bdbuf_obtain_disk.part.8+0xe0><== NEVER TAKEN
200bfb8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
200bfbc: d2 00 60 20 ld [ %g1 + 0x20 ], %o1
200bfc0: 40 00 2b d6 call 2016f18 <.udiv>
200bfc4: 90 02 3f ff add %o0, -1, %o0
200bfc8: 90 02 20 01 inc %o0
for (bds_per_size = 1;
200bfcc: 80 a2 20 01 cmp %o0, 1
200bfd0: 08 80 00 06 bleu 200bfe8 <rtems_bdbuf_obtain_disk.part.8+0xbc>
200bfd4: 92 10 20 01 mov 1, %o1
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
200bfd8: 93 2a 60 01 sll %o1, 1, %o1
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
200bfdc: 80 a2 00 09 cmp %o0, %o1
200bfe0: 38 bf ff ff bgu,a 200bfdc <rtems_bdbuf_obtain_disk.part.8+0xb0><== NEVER TAKEN
200bfe4: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
200bfe8: 03 00 80 6a sethi %hi(0x201a800), %g1
200bfec: 40 00 2b cb call 2016f18 <.udiv>
200bff0: d0 00 63 08 ld [ %g1 + 0x308 ], %o0 ! 201ab08 <bdbuf_cache+0x20>
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
200bff4: 80 a2 20 00 cmp %o0, 0
200bff8: 22 80 00 05 be,a 200c00c <rtems_bdbuf_obtain_disk.part.8+0xe0><== NEVER TAKEN
200bffc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
rtems_disk_release (dd);
return RTEMS_INVALID_NUMBER;
}
*bds_per_group_ptr = bds_per_group;
200c000: d0 27 40 00 st %o0, [ %i5 ]
}
return RTEMS_SUCCESSFUL;
}
200c004: 81 c7 e0 08 ret
200c008: 91 e8 20 00 restore %g0, 0, %o0
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
{
rtems_disk_release (dd);
200c00c: 7f ff db 78 call 2002dec <rtems_disk_release> <== NOT EXECUTED
200c010: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
200c014: 81 c7 e0 08 ret
200c018: 81 e8 00 00 restore
0200c4bc <rtems_bdbuf_purge>:
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
200c4bc: 9d e3 bf 10 save %sp, -240, %sp
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200c4c0: 82 07 bf f8 add %fp, -8, %g1
200c4c4: a0 07 bf f4 add %fp, -12, %l0
head->previous = NULL;
200c4c8: c0 27 bf f8 clr [ %fp + -8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200c4cc: c2 27 bf f4 st %g1, [ %fp + -12 ]
head->previous = NULL;
tail->previous = head;
200c4d0: e0 27 bf fc st %l0, [ %fp + -4 ]
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
200c4d4: 7f ff fd 02 call 200b8dc <rtems_bdbuf_lock_cache>
200c4d8: 23 00 80 6a sethi %hi(0x201a800), %l1
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
200c4dc: a2 14 62 e8 or %l1, 0x2e8, %l1 ! 201aae8 <bdbuf_cache>
200c4e0: f6 04 60 40 ld [ %l1 + 0x40 ], %i3
*prev = NULL;
200c4e4: c0 27 bf 74 clr [ %fp + -140 ]
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
200c4e8: ba 10 00 1a mov %i2, %i5
200c4ec: b8 10 00 19 mov %i1, %i4
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200c4f0: 80 a6 e0 00 cmp %i3, 0
200c4f4: 02 80 00 46 be 200c60c <rtems_bdbuf_purge+0x150> <== NEVER TAKEN
200c4f8: b4 07 bf 74 add %fp, -140, %i2
{
if ((*compare) (cur->dev, dev))
{
switch (cur->state)
200c4fc: 33 00 80 2e sethi %hi(0x200b800), %i1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c500: a6 10 20 06 mov 6, %l3
200c504: a4 10 20 0a mov 0xa, %l2
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);
200c508: a2 04 60 70 add %l1, 0x70, %l1
*prev = NULL;
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
200c50c: d0 1e e0 18 ldd [ %i3 + 0x18 ], %o0
200c510: 94 10 00 1c mov %i4, %o2
200c514: 9f c6 00 00 call %i0
200c518: 96 10 00 1d mov %i5, %o3
200c51c: 80 8a 20 ff btst 0xff, %o0
200c520: 22 80 00 0b be,a 200c54c <rtems_bdbuf_purge+0x90> <== NEVER TAKEN
200c524: c2 06 e0 08 ld [ %i3 + 8 ], %g1 <== NOT EXECUTED
{
switch (cur->state)
200c528: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1
200c52c: 80 a0 60 0a cmp %g1, 0xa
200c530: 08 80 00 0e bleu 200c568 <rtems_bdbuf_purge+0xac> <== ALWAYS TAKEN
200c534: 84 16 60 28 or %i1, 0x28, %g2
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
200c538: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200c53c: 7f ff ed e7 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200c540: 90 12 20 01 or %o0, 1, %o0 ! 42000001 <RAM_END+0x3fc00001><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c544: e4 26 e0 28 st %l2, [ %i3 + 0x28 ]
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200c548: c2 06 e0 08 ld [ %i3 + 8 ], %g1
200c54c: 80 a0 60 00 cmp %g1, 0
200c550: 22 80 00 1a be,a 200c5b8 <rtems_bdbuf_purge+0xfc> <== ALWAYS TAKEN
200c554: c2 06 e0 0c ld [ %i3 + 0xc ], %g1
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
*prev = cur;
200c558: f6 26 a0 04 st %i3, [ %i2 + 4 ] <== NOT EXECUTED
200c55c: b6 10 00 01 mov %g1, %i3 <== NOT EXECUTED
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
200c560: 10 bf ff eb b 200c50c <rtems_bdbuf_purge+0x50> <== NOT EXECUTED
200c564: b4 06 a0 04 add %i2, 4, %i2 <== NOT EXECUTED
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
{
switch (cur->state)
200c568: 83 28 60 02 sll %g1, 2, %g1
200c56c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200c570: 81 c0 40 00 jmp %g1
200c574: 01 00 00 00 nop
case RTEMS_BDBUF_STATE_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
break;
case RTEMS_BDBUF_STATE_SYNC:
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
200c578: 7f ff fe 1e call 200bdf0 <rtems_bdbuf_wake>
200c57c: 90 10 00 11 mov %l1, %o0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200c580: c2 06 e0 30 ld [ %i3 + 0x30 ], %g1
200c584: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200c588: 84 00 bf ff add %g2, -1, %g2
200c58c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200c590: 7f ff ef 4f call 20082cc <_Chain_Extract>
200c594: 90 10 00 1b mov %i3, %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200c598: 90 10 00 10 mov %l0, %o0
200c59c: 7f ff ef 41 call 20082a0 <_Chain_Append>
200c5a0: 92 10 00 1b mov %i3, %o1
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200c5a4: c2 06 e0 08 ld [ %i3 + 8 ], %g1
200c5a8: 80 a0 60 00 cmp %g1, 0
200c5ac: 32 bf ff ec bne,a 200c55c <rtems_bdbuf_purge+0xa0> <== NEVER TAKEN
200c5b0: f6 26 a0 04 st %i3, [ %i2 + 4 ] <== NOT EXECUTED
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
200c5b4: c2 06 e0 0c ld [ %i3 + 0xc ], %g1
200c5b8: 80 a0 60 00 cmp %g1, 0
200c5bc: 32 bf ff e8 bne,a 200c55c <rtems_bdbuf_purge+0xa0> <== NEVER TAKEN
200c5c0: f6 26 a0 04 st %i3, [ %i2 + 4 ] <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
200c5c4: c6 06 80 00 ld [ %i2 ], %g3
200c5c8: 80 a0 e0 00 cmp %g3, 0
200c5cc: 22 80 00 11 be,a 200c610 <rtems_bdbuf_purge+0x154> <== ALWAYS TAKEN
200c5d0: 35 00 80 6a sethi %hi(0x201a800), %i2
200c5d4: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 <== NOT EXECUTED
200c5d8: 80 a6 c0 02 cmp %i3, %g2 <== NOT EXECUTED
200c5dc: 22 80 00 09 be,a 200c600 <rtems_bdbuf_purge+0x144> <== NOT EXECUTED
200c5e0: c2 06 bf fc ld [ %i2 + -4 ], %g1 <== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200c5e4: 10 80 00 34 b 200c6b4 <rtems_bdbuf_purge+0x1f8> <== NOT EXECUTED
200c5e8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
200c5ec: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
200c5f0: 12 80 00 30 bne 200c6b0 <rtems_bdbuf_purge+0x1f4> <== NOT EXECUTED
200c5f4: b4 06 bf fc add %i2, -4, %i2 <== NOT EXECUTED
200c5f8: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
200c5fc: c2 06 bf fc ld [ %i2 + -4 ], %g1 <== NOT EXECUTED
200c600: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200c604: 32 bf ff fa bne,a 200c5ec <rtems_bdbuf_purge+0x130> <== NOT EXECUTED
200c608: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200c60c: 35 00 80 6a sethi %hi(0x201a800), %i2 <== NOT EXECUTED
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
wake_buffer_waiters = true;
200c610: b6 10 20 00 clr %i3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c614: b8 10 20 01 mov 1, %i4
200c618: b4 16 a3 2c or %i2, 0x32c, %i2
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200c61c: 7f ff ef 35 call 20082f0 <_Chain_Get>
200c620: 90 10 00 10 mov %l0, %o0
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
200c624: b2 92 20 00 orcc %o0, 0, %i1
200c628: 02 80 00 17 be 200c684 <rtems_bdbuf_purge+0x1c8>
200c62c: 80 8e e0 ff btst 0xff, %i3
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
200c630: c2 06 60 2c ld [ %i1 + 0x2c ], %g1
200c634: 80 a0 60 00 cmp %g1, 0
200c638: 22 80 00 02 be,a 200c640 <rtems_bdbuf_purge+0x184>
200c63c: b6 10 20 01 mov 1, %i3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c640: f8 26 60 28 st %i4, [ %i1 + 0x28 ]
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200c644: c2 06 60 2c ld [ %i1 + 0x2c ], %g1
200c648: 80 a0 60 00 cmp %g1, 0
200c64c: 12 bf ff f4 bne 200c61c <rtems_bdbuf_purge+0x160>
200c650: 01 00 00 00 nop
{
rtems_bdbuf_remove_from_tree (bd);
200c654: 7f ff fe 72 call 200c01c <rtems_bdbuf_remove_from_tree>
200c658: 90 10 00 19 mov %i1, %o0
200c65c: 92 10 00 19 mov %i1, %o1
200c660: 90 10 00 1a mov %i2, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c664: c0 26 60 28 clr [ %i1 + 0x28 ]
200c668: 40 00 11 ea call 2010e10 <_Chain_Insert>
200c66c: 01 00 00 00 nop
200c670: 7f ff ef 20 call 20082f0 <_Chain_Get>
200c674: 90 10 00 10 mov %l0, %o0
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
200c678: b2 92 20 00 orcc %o0, 0, %i1
200c67c: 12 bf ff ed bne 200c630 <rtems_bdbuf_purge+0x174> <== NEVER TAKEN
200c680: 80 8e e0 ff btst 0xff, %i3
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
200c684: 02 80 00 04 be 200c694 <rtems_bdbuf_purge+0x1d8>
200c688: 11 00 80 6a sethi %hi(0x201a800), %o0
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200c68c: 7f ff fd d9 call 200bdf0 <rtems_bdbuf_wake>
200c690: 90 12 23 60 or %o0, 0x360, %o0 ! 201ab60 <bdbuf_cache+0x78>
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, compare, dev);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
200c694: 7f ff fd 25 call 200bb28 <rtems_bdbuf_unlock_cache>
200c698: 01 00 00 00 nop
}
200c69c: 81 c7 e0 08 ret
200c6a0: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c6a4: e6 26 e0 28 st %l3, [ %i3 + 0x28 ]
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200c6a8: 10 bf ff a9 b 200c54c <rtems_bdbuf_purge+0x90>
200c6ac: c2 06 e0 08 ld [ %i3 + 8 ], %g1
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200c6b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200c6b4: 22 bf ff d7 be,a 200c610 <rtems_bdbuf_purge+0x154> <== NOT EXECUTED
200c6b8: 35 00 80 6a sethi %hi(0x201a800), %i2 <== NOT EXECUTED
200c6bc: 10 bf ff 94 b 200c50c <rtems_bdbuf_purge+0x50> <== NOT EXECUTED
200c6c0: b6 10 00 02 mov %g2, %i3 <== NOT EXECUTED
0200b8cc <rtems_bdbuf_purge_compare_major>:
}
static bool
rtems_bdbuf_purge_compare_major (dev_t a, dev_t b)
{
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
200b8cc: 94 1a 00 0a xor %o0, %o2, %o2 <== NOT EXECUTED
}
200b8d0: 80 a0 00 0a cmp %g0, %o2 <== NOT EXECUTED
200b8d4: 81 c3 e0 08 retl <== NOT EXECUTED
200b8d8: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
0200e038 <rtems_bdbuf_purge_major>:
void
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
200e038: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200e03c: 94 10 20 00 clr %o2 <== NOT EXECUTED
200e040: 11 00 80 2e sethi %hi(0x200b800), %o0 <== NOT EXECUTED
200e044: 90 12 20 cc or %o0, 0xcc, %o0 ! 200b8cc <rtems_bdbuf_purge_compare_major><== NOT EXECUTED
200e048: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200e04c: 7f ff f9 1c call 200c4bc <rtems_bdbuf_purge> <== NOT EXECUTED
200e050: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200d9b0 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200d9b0: 9d e3 bf 88 save %sp, -120, %sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200d9b4: 3b 00 80 6a sethi %hi(0x201a800), %i5
200d9b8: ba 17 62 e8 or %i5, 0x2e8, %i5 ! 201aae8 <bdbuf_cache>
200d9bc: c2 0f 60 88 ldub [ %i5 + 0x88 ], %g1
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
200d9c0: c0 27 bf f4 clr [ %fp + -12 ]
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
200d9c4: c0 27 bf f8 clr [ %fp + -8 ]
size_t bds_per_group = 0;
200d9c8: c0 27 bf fc clr [ %fp + -4 ]
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200d9cc: 84 10 00 18 mov %i0, %g2
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200d9d0: 80 a0 60 00 cmp %g1, 0
200d9d4: 02 80 00 9f be 200dc50 <rtems_bdbuf_read+0x2a0> <== NEVER TAKEN
200d9d8: b0 10 20 16 mov 0x16, %i0
200d9dc: 90 10 00 02 mov %g2, %o0
200d9e0: 92 10 00 19 mov %i1, %o1
200d9e4: 94 10 00 1a mov %i2, %o2
200d9e8: 96 07 bf f4 add %fp, -12, %o3
200d9ec: 98 07 bf f8 add %fp, -8, %o4
200d9f0: 7f ff f9 4f call 200bf2c <rtems_bdbuf_obtain_disk.part.8>
200d9f4: 9a 07 bf fc add %fp, -4, %o5
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
200d9f8: b0 92 20 00 orcc %o0, 0, %i0
200d9fc: 12 80 00 95 bne 200dc50 <rtems_bdbuf_read+0x2a0> <== NEVER TAKEN
200da00: 01 00 00 00 nop
/*
* 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) +
200da04: 03 00 80 64 sethi %hi(0x2019000), %g1
200da08: e8 00 60 78 ld [ %g1 + 0x78 ], %l4 ! 2019078 <rtems_bdbuf_configuration>
200da0c: a8 05 20 01 inc %l4
200da10: 83 2d 20 04 sll %l4, 4, %g1
200da14: 82 00 60 20 add %g1, 0x20, %g1
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
200da18: 7f ff f7 b1 call 200b8dc <rtems_bdbuf_lock_cache>
200da1c: 9c 23 80 01 sub %sp, %g1, %sp
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
200da20: e2 07 bf f4 ld [ %fp + -12 ], %l1
/*
* 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) +
200da24: a0 03 a0 60 add %sp, 0x60, %l0
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200da28: e6 04 60 20 ld [ %l1 + 0x20 ], %l3
200da2c: d2 04 60 24 ld [ %l1 + 0x24 ], %o1
200da30: 40 00 25 3a call 2016f18 <.udiv>
200da34: 90 10 00 13 mov %l3, %o0
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
200da38: 03 00 80 2e sethi %hi(0x200b800), %g1
200da3c: 82 10 63 e8 or %g1, 0x3e8, %g1 ! 200bbe8 <rtems_bdbuf_transfer_done>
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
dev_t dev = dd->dev;
200da40: f8 04 40 00 ld [ %l1 ], %i4
200da44: f2 04 60 04 ld [ %l1 + 4 ], %i1
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
200da48: ec 1c 60 18 ldd [ %l1 + 0x18 ], %l6
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
200da4c: f4 07 bf f8 ld [ %fp + -8 ], %i2
200da50: ea 07 bf fc ld [ %fp + -4 ], %l5
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
200da54: c2 24 20 04 st %g1, [ %l0 + 4 ]
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200da58: a4 10 00 08 mov %o0, %l2
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
200da5c: c0 24 00 00 clr [ %l0 ]
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
200da60: 40 00 0c 17 call 2010abc <rtems_task_self>
200da64: e0 24 20 08 st %l0, [ %l0 + 8 ]
req->status = RTEMS_RESOURCE_IN_USE;
200da68: 82 10 20 0c mov 0xc, %g1
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
200da6c: d0 24 20 14 st %o0, [ %l0 + 0x14 ]
req->status = RTEMS_RESOURCE_IN_USE;
200da70: c2 24 20 0c st %g1, [ %l0 + 0xc ]
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
200da74: 92 10 00 19 mov %i1, %o1
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
200da78: c0 24 20 10 clr [ %l0 + 0x10 ]
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
200da7c: 90 10 00 1c mov %i4, %o0
200da80: 94 10 00 1a mov %i2, %o2
200da84: 7f ff fe 09 call 200d2a8 <rtems_bdbuf_get_buffer_for_access>
200da88: 96 10 00 15 mov %l5, %o3
*bd_ptr = bd;
req->bufs [0].user = bd;
200da8c: d0 24 20 24 st %o0, [ %l0 + 0x24 ]
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
200da90: c4 02 20 24 ld [ %o0 + 0x24 ], %g2
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200da94: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
200da98: f4 24 20 18 st %i2, [ %l0 + 0x18 ]
req->bufs [0].length = block_size;
200da9c: e6 24 20 1c st %l3, [ %l0 + 0x1c ]
req->bufs [0].buffer = bd->buffer;
200daa0: c4 24 20 20 st %g2, [ %l0 + 0x20 ]
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200daa4: 80 a0 60 02 cmp %g1, 2
200daa8: 02 80 00 5a be 200dc10 <rtems_bdbuf_read+0x260>
200daac: a2 10 00 08 mov %o0, %l1
200dab0: 80 a0 60 07 cmp %g1, 7
200dab4: 02 80 00 57 be 200dc10 <rtems_bdbuf_read+0x260>
200dab8: 80 a0 60 01 cmp %g1, 1
200dabc: 22 80 00 06 be,a 200dad4 <rtems_bdbuf_read+0x124> <== ALWAYS TAKEN
200dac0: ae 05 c0 16 add %l7, %l6, %l7
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
200dac4: d0 02 20 28 ld [ %o0 + 0x28 ], %o0 <== NOT EXECUTED
200dac8: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200dacc: 7f ff f7 a0 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200dad0: 92 12 60 1d or %o1, 0x1d, %o1 ! 4200001d <RAM_END+0x3fc0001d><== NOT EXECUTED
dev_t dev = dd->dev;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
200dad4: ae 25 c0 1a sub %l7, %i2, %l7
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200dad8: 80 a5 c0 14 cmp %l7, %l4
200dadc: 38 80 00 02 bgu,a 200dae4 <rtems_bdbuf_read+0x134>
200dae0: ae 10 00 14 mov %l4, %l7
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200dae4: 82 10 20 09 mov 9, %g1
200dae8: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
200daec: ac 10 00 10 mov %l0, %l6
break;
}
while (transfer_index < transfer_count)
200daf0: 80 a5 e0 01 cmp %l7, 1
200daf4: 08 80 00 28 bleu 200db94 <rtems_bdbuf_read+0x1e4>
200daf8: a8 10 20 01 mov 1, %l4
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200dafc: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200db00: 80 a0 a0 00 cmp %g2, 0
200db04: 02 80 00 0d be 200db38 <rtems_bdbuf_read+0x188> <== NEVER TAKEN
200db08: b4 06 80 12 add %i2, %l2, %i2
200db0c: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3
200db10: 80 a7 00 03 cmp %i4, %g3
200db14: 02 80 00 34 be 200dbe4 <rtems_bdbuf_read+0x234> <== ALWAYS TAKEN
200db18: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200db1c: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED
200db20: 08 80 00 2b bleu 200dbcc <rtems_bdbuf_read+0x21c> <== NOT EXECUTED
200db24: 01 00 00 00 nop <== NOT EXECUTED
{
p = p->avl.right;
200db28: c4 00 a0 0c ld [ %g2 + 0xc ], %g2 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200db2c: 80 a0 a0 00 cmp %g2, 0
200db30: 32 bf ff f8 bne,a 200db10 <rtems_bdbuf_read+0x160> <== NEVER TAKEN
200db34: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 <== NOT EXECUTED
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
200db38: c2 27 bf ec st %g1, [ %fp + -20 ]
200db3c: 90 10 00 1c mov %i4, %o0
200db40: 92 10 00 19 mov %i1, %o1
200db44: 94 10 00 1a mov %i2, %o2
200db48: 7f ff fc d1 call 200ce8c <rtems_bdbuf_get_buffer_from_lru_list>
200db4c: 96 10 00 15 mov %l5, %o3
if (bd != NULL)
200db50: 80 a2 20 00 cmp %o0, 0
200db54: 02 80 00 10 be 200db94 <rtems_bdbuf_read+0x1e4> <== ALWAYS TAKEN
200db58: c2 07 bf ec ld [ %fp + -20 ], %g1
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200db5c: c4 02 20 30 ld [ %o0 + 0x30 ], %g2 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
200db60: a8 05 20 01 inc %l4 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200db64: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200db68: 80 a5 00 17 cmp %l4, %l7 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200db6c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
200db70: c6 20 a0 0c st %g3, [ %g2 + 0xc ] <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200db74: c2 22 20 28 st %g1, [ %o0 + 0x28 ] <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
200db78: d0 25 a0 34 st %o0, [ %l6 + 0x34 ] <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
200db7c: f4 25 a0 28 st %i2, [ %l6 + 0x28 ] <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
200db80: e6 25 a0 2c st %l3, [ %l6 + 0x2c ] <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
200db84: c4 02 20 24 ld [ %o0 + 0x24 ], %g2 <== NOT EXECUTED
200db88: c4 25 a0 30 st %g2, [ %l6 + 0x30 ] <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200db8c: 12 bf ff dc bne 200dafc <rtems_bdbuf_read+0x14c> <== NOT EXECUTED
200db90: ac 05 a0 10 add %l6, 0x10, %l6 <== NOT EXECUTED
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
200db94: e8 24 20 10 st %l4, [ %l0 + 0x10 ]
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
200db98: 80 a5 20 00 cmp %l4, 0
200db9c: 12 80 00 1f bne 200dc18 <rtems_bdbuf_read+0x268>
200dba0: d2 07 bf f4 ld [ %fp + -12 ], %o1
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
200dba4: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
200dba8: 80 a0 60 02 cmp %g1, 2
200dbac: 02 80 00 2e be 200dc64 <rtems_bdbuf_read+0x2b4>
200dbb0: 80 a0 60 07 cmp %g1, 7
200dbb4: 02 80 00 29 be 200dc58 <rtems_bdbuf_read+0x2a8> <== ALWAYS TAKEN
200dbb8: 82 10 20 04 mov 4, %g1
break;
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
200dbbc: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED
200dbc0: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200dbc4: 7f ff f7 62 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200dbc8: 92 12 60 02 or %o1, 2, %o1 ! 42000002 <RAM_END+0x3fc00002><== NOT EXECUTED
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200dbcc: 12 80 00 04 bne 200dbdc <rtems_bdbuf_read+0x22c> <== NOT EXECUTED
200dbd0: 80 a6 40 04 cmp %i1, %g4 <== NOT EXECUTED
200dbd4: 38 bf ff d6 bgu,a 200db2c <rtems_bdbuf_read+0x17c> <== NOT EXECUTED
200dbd8: c4 00 a0 0c ld [ %g2 + 0xc ], %g2 <== NOT EXECUTED
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200dbdc: 10 bf ff d4 b 200db2c <rtems_bdbuf_read+0x17c> <== NOT EXECUTED
200dbe0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200dbe4: 80 a6 40 04 cmp %i1, %g4
200dbe8: 12 bf ff ce bne 200db20 <rtems_bdbuf_read+0x170> <== NEVER TAKEN
200dbec: 80 a7 00 03 cmp %i4, %g3
200dbf0: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3
200dbf4: 80 a6 80 03 cmp %i2, %g3
200dbf8: 22 bf ff e8 be,a 200db98 <rtems_bdbuf_read+0x1e8> <== NEVER TAKEN
200dbfc: e8 24 20 10 st %l4, [ %l0 + 0x10 ] <== NOT EXECUTED
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200dc00: 38 bf ff cb bgu,a 200db2c <rtems_bdbuf_read+0x17c> <== ALWAYS TAKEN
200dc04: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200dc08: 10 bf ff c9 b 200db2c <rtems_bdbuf_read+0x17c> <== NOT EXECUTED
200dc0c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== NOT EXECUTED
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200dc10: 10 bf ff e2 b 200db98 <rtems_bdbuf_read+0x1e8>
200dc14: e8 04 20 10 ld [ %l0 + 0x10 ], %l4
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
200dc18: 94 10 00 10 mov %l0, %o2
200dc1c: 90 02 60 08 add %o1, 8, %o0
200dc20: 96 10 20 01 mov 1, %o3
200dc24: 7f ff fa a8 call 200c6c4 <rtems_bdbuf_execute_transfer_request.isra.9>
200dc28: 92 02 60 28 add %o1, 0x28, %o1
if (sc == RTEMS_SUCCESSFUL)
200dc2c: 80 a2 20 00 cmp %o0, 0
200dc30: 02 80 00 11 be 200dc74 <rtems_bdbuf_read+0x2c4>
200dc34: 01 00 00 00 nop
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
200dc38: c0 26 c0 00 clr [ %i3 ]
200dc3c: b0 10 00 08 mov %o0, %i0
rtems_bdbuf_unlock_cache ();
200dc40: 7f ff f7 ba call 200bb28 <rtems_bdbuf_unlock_cache>
200dc44: 01 00 00 00 nop
rtems_bdbuf_release_disk (dd);
200dc48: 7f ff f7 d0 call 200bb88 <rtems_bdbuf_release_disk>
200dc4c: d0 07 bf f4 ld [ %fp + -12 ], %o0
return sc;
}
200dc50: 81 c7 e0 08 ret
200dc54: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200dc58: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
200dc5c: 10 bf ff f9 b 200dc40 <rtems_bdbuf_read+0x290>
200dc60: e2 26 c0 00 st %l1, [ %i3 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200dc64: 82 10 20 03 mov 3, %g1
200dc68: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
200dc6c: 10 bf ff f5 b 200dc40 <rtems_bdbuf_read+0x290>
200dc70: e2 26 c0 00 st %l1, [ %i3 ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200dc74: 7f ff e9 96 call 20082cc <_Chain_Extract>
200dc78: 90 10 00 11 mov %l1, %o0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200dc7c: c2 04 60 30 ld [ %l1 + 0x30 ], %g1
200dc80: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200dc84: 84 00 a0 01 inc %g2
200dc88: 10 bf ff c7 b 200dba4 <rtems_bdbuf_read+0x1f4>
200dc8c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
0200dc90 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
200dc90: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200dc94: 3b 00 80 6a sethi %hi(0x201a800), %i5
200dc98: ba 17 62 e8 or %i5, 0x2e8, %i5 ! 201aae8 <bdbuf_cache>
200dc9c: c2 0f 60 88 ldub [ %i5 + 0x88 ], %g1
200dca0: 80 a0 60 00 cmp %g1, 0
200dca4: 02 80 00 15 be 200dcf8 <rtems_bdbuf_release+0x68> <== NEVER TAKEN
200dca8: 84 10 20 16 mov 0x16, %g2
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200dcac: 80 a6 20 00 cmp %i0, 0
200dcb0: 02 80 00 14 be 200dd00 <rtems_bdbuf_release+0x70> <== NEVER TAKEN
200dcb4: 84 10 20 09 mov 9, %g2
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
200dcb8: 7f ff f7 09 call 200b8dc <rtems_bdbuf_lock_cache>
200dcbc: 01 00 00 00 nop
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200dcc0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200dcc4: 80 a0 60 04 cmp %g1, 4
200dcc8: 02 80 00 16 be 200dd20 <rtems_bdbuf_release+0x90>
200dccc: 01 00 00 00 nop
200dcd0: 08 80 00 0e bleu 200dd08 <rtems_bdbuf_release+0x78>
200dcd4: 80 a0 60 03 cmp %g1, 3
200dcd8: 80 a0 60 06 cmp %g1, 6
200dcdc: 18 80 00 0d bgu 200dd10 <rtems_bdbuf_release+0x80> <== NEVER TAKEN
200dce0: 01 00 00 00 nop
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);
200dce4: 7f ff f9 da call 200c44c <rtems_bdbuf_discard_buffer_after_access>
200dce8: 90 10 00 18 mov %i0, %o0
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
200dcec: 7f ff f7 8f call 200bb28 <rtems_bdbuf_unlock_cache>
200dcf0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
200dcf4: 84 10 20 00 clr %g2 ! 0 <PROM_START>
}
200dcf8: 81 c7 e0 08 ret
200dcfc: 91 e8 00 02 restore %g0, %g2, %o0
200dd00: 81 c7 e0 08 ret <== NOT EXECUTED
200dd04: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200dd08: 22 80 00 09 be,a 200dd2c <rtems_bdbuf_release+0x9c> <== ALWAYS TAKEN
200dd0c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
200dd10: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200dd14: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200dd18: 7f ff f7 0d call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200dd1c: 92 12 60 1c or %o1, 0x1c, %o1 ! 4200001c <RAM_END+0x3fc0001c><== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
200dd20: 7f ff f8 43 call 200be2c <rtems_bdbuf_add_to_modified_list_after_access>
200dd24: 90 10 00 18 mov %i0, %o0
break;
200dd28: 30 bf ff f1 b,a 200dcec <rtems_bdbuf_release+0x5c>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200dd2c: 90 07 60 44 add %i5, 0x44, %o0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200dd30: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200dd34: 92 10 00 18 mov %i0, %o1
200dd38: 84 00 bf ff add %g2, -1, %g2
200dd3c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200dd40: 82 10 20 02 mov 2, %g1
200dd44: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200dd48: 7f ff e9 56 call 20082a0 <_Chain_Append>
200dd4c: 01 00 00 00 nop
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)
200dd50: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200dd54: 80 a0 60 00 cmp %g1, 0
200dd58: 02 80 00 05 be 200dd6c <rtems_bdbuf_release+0xdc>
200dd5c: 01 00 00 00 nop
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200dd60: 7f ff f8 24 call 200bdf0 <rtems_bdbuf_wake>
200dd64: 90 07 60 68 add %i5, 0x68, %o0
200dd68: 30 bf ff e1 b,a 200dcec <rtems_bdbuf_release+0x5c>
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200dd6c: 7f ff f8 21 call 200bdf0 <rtems_bdbuf_wake>
200dd70: 90 07 60 78 add %i5, 0x78, %o0
200dd74: 30 bf ff de b,a 200dcec <rtems_bdbuf_release+0x5c>
0200bb88 <rtems_bdbuf_release_disk>:
return RTEMS_SUCCESSFUL;
}
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
200bb88: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
200bb8c: 7f ff dc 98 call 2002dec <rtems_disk_release>
200bb90: 90 10 00 18 mov %i0, %o0
if (sc != RTEMS_SUCCESSFUL)
200bb94: 80 a2 20 00 cmp %o0, 0
200bb98: 12 80 00 04 bne 200bba8 <rtems_bdbuf_release_disk+0x20> <== NEVER TAKEN
200bb9c: 11 10 80 00 sethi %hi(0x42000000), %o0
200bba0: 81 c7 e0 08 ret
200bba4: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
200bba8: 7f ff f0 4c call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bbac: 90 12 20 1f or %o0, 0x1f, %o0 <== NOT EXECUTED
0200dd78 <rtems_bdbuf_release_modified>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
200dd78: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200dd7c: 03 00 80 6a sethi %hi(0x201a800), %g1
200dd80: c2 08 63 70 ldub [ %g1 + 0x370 ], %g1 ! 201ab70 <bdbuf_cache+0x88>
200dd84: 80 a0 60 00 cmp %g1, 0
200dd88: 02 80 00 18 be 200dde8 <rtems_bdbuf_release_modified+0x70><== NEVER TAKEN
200dd8c: 84 10 20 16 mov 0x16, %g2
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200dd90: 80 a6 20 00 cmp %i0, 0
200dd94: 02 80 00 17 be 200ddf0 <rtems_bdbuf_release_modified+0x78><== NEVER TAKEN
200dd98: 84 10 20 09 mov 9, %g2
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
200dd9c: 7f ff f6 d0 call 200b8dc <rtems_bdbuf_lock_cache>
200dda0: 01 00 00 00 nop
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200dda4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200dda8: 80 a0 60 03 cmp %g1, 3
200ddac: 0a 80 00 06 bcs 200ddc4 <rtems_bdbuf_release_modified+0x4c><== NEVER TAKEN
200ddb0: 80 a0 60 05 cmp %g1, 5
200ddb4: 08 80 00 11 bleu 200ddf8 <rtems_bdbuf_release_modified+0x80>
200ddb8: 80 a0 60 06 cmp %g1, 6
200ddbc: 02 80 00 06 be 200ddd4 <rtems_bdbuf_release_modified+0x5c><== ALWAYS TAKEN
200ddc0: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
200ddc4: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200ddc8: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ddcc: 7f ff f6 e0 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200ddd0: 92 12 60 04 or %o1, 4, %o1 ! 42000004 <RAM_END+0x3fc00004><== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
200ddd4: 7f ff f9 9e call 200c44c <rtems_bdbuf_discard_buffer_after_access>
200ddd8: 90 10 00 18 mov %i0, %o0
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
200dddc: 7f ff f7 53 call 200bb28 <rtems_bdbuf_unlock_cache>
200dde0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
200dde4: 84 10 20 00 clr %g2 ! 0 <PROM_START>
}
200dde8: 81 c7 e0 08 ret
200ddec: 91 e8 00 02 restore %g0, %g2, %o0
200ddf0: 81 c7 e0 08 ret <== NOT EXECUTED
200ddf4: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
200ddf8: 7f ff f8 0d call 200be2c <rtems_bdbuf_add_to_modified_list_after_access>
200ddfc: 90 10 00 18 mov %i0, %o0
break;
200de00: 30 bf ff f7 b,a 200dddc <rtems_bdbuf_release_modified+0x64>
0200c01c <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
200c01c: 9d e3 bf 20 save %sp, -224, %sp
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
200c020: 39 00 80 6a sethi %hi(0x201a800), %i4
200c024: b8 17 22 e8 or %i4, 0x2e8, %i4 ! 201aae8 <bdbuf_cache>
200c028: fa 07 20 40 ld [ %i4 + 0x40 ], %i5
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
200c02c: a0 07 bf 80 add %fp, -128, %l0
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
200c030: f6 06 20 18 ld [ %i0 + 0x18 ], %i3
200c034: f4 06 20 1c ld [ %i0 + 0x1c ], %i2
rtems_blkdev_bnum block = node->block;
200c038: f2 06 20 20 ld [ %i0 + 0x20 ], %i1
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
200c03c: 90 10 00 10 mov %l0, %o0
200c040: 92 10 20 00 clr %o1
200c044: 40 00 20 b6 call 201431c <memset>
200c048: 94 10 20 80 mov 0x80, %o2
while (p != NULL)
200c04c: 80 a7 60 00 cmp %i5, 0
200c050: 02 80 00 24 be 200c0e0 <rtems_bdbuf_remove_from_tree+0xc4><== NEVER TAKEN
200c054: 82 10 00 10 mov %l0, %g1
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200c058: c6 07 60 18 ld [ %i5 + 0x18 ], %g3
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200c05c: fa 20 40 00 st %i5, [ %g1 ]
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
200c060: 9e 10 20 01 mov 1, %o7
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
200c064: 9a 10 3f ff mov -1, %o5
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200c068: 84 00 60 04 add %g1, 4, %g2
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200c06c: 80 a6 c0 03 cmp %i3, %g3
200c070: 18 80 00 17 bgu 200c0cc <rtems_bdbuf_remove_from_tree+0xb0><== NEVER TAKEN
200c074: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
200c078: 80 a6 c0 03 cmp %i3, %g3
200c07c: 32 80 00 09 bne,a 200c0a0 <rtems_bdbuf_remove_from_tree+0x84><== NEVER TAKEN
200c080: da 2f 60 10 stb %o5, [ %i5 + 0x10 ] <== NOT EXECUTED
200c084: 80 a6 80 04 cmp %i2, %g4
200c088: 38 80 00 12 bgu,a 200c0d0 <rtems_bdbuf_remove_from_tree+0xb4><== NEVER TAKEN
200c08c: de 2f 60 10 stb %o7, [ %i5 + 0x10 ] <== NOT EXECUTED
200c090: 80 a6 80 04 cmp %i2, %g4
200c094: 22 80 00 17 be,a 200c0f0 <rtems_bdbuf_remove_from_tree+0xd4><== ALWAYS TAKEN
200c098: c6 07 60 20 ld [ %i5 + 0x20 ], %g3
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
200c09c: da 2f 60 10 stb %o5, [ %i5 + 0x10 ] <== NOT EXECUTED
p = p->avl.left;
200c0a0: fa 07 60 08 ld [ %i5 + 8 ], %i5
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
200c0a4: 80 a7 60 00 cmp %i5, 0
200c0a8: 02 80 00 0e be 200c0e0 <rtems_bdbuf_remove_from_tree+0xc4><== NEVER TAKEN
200c0ac: 01 00 00 00 nop
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200c0b0: c6 07 60 18 ld [ %i5 + 0x18 ], %g3
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200c0b4: 82 10 00 02 mov %g2, %g1
200c0b8: fa 20 40 00 st %i5, [ %g1 ]
200c0bc: 84 00 60 04 add %g1, 4, %g2
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200c0c0: 80 a6 c0 03 cmp %i3, %g3
200c0c4: 08 bf ff ee bleu 200c07c <rtems_bdbuf_remove_from_tree+0x60><== ALWAYS TAKEN
200c0c8: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
{
p->avl.cache = 1;
200c0cc: de 2f 60 10 stb %o7, [ %i5 + 0x10 ] <== NOT EXECUTED
p = p->avl.right;
200c0d0: fa 07 60 0c ld [ %i5 + 0xc ], %i5
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
200c0d4: 80 a7 60 00 cmp %i5, 0
200c0d8: 32 bf ff f7 bne,a 200c0b4 <rtems_bdbuf_remove_from_tree+0x98><== ALWAYS TAKEN
200c0dc: c6 07 60 18 ld [ %i5 + 0x18 ], %g3
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200c0e0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200c0e4: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200c0e8: 7f ff fe 19 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200c0ec: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200c0f0: 80 a6 40 03 cmp %i1, %g3
200c0f4: 38 bf ff f7 bgu,a 200c0d0 <rtems_bdbuf_remove_from_tree+0xb4>
200c0f8: de 2f 60 10 stb %o7, [ %i5 + 0x10 ]
{
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
200c0fc: 80 a6 40 03 cmp %i1, %g3
200c100: 32 bf ff e8 bne,a 200c0a0 <rtems_bdbuf_remove_from_tree+0x84>
200c104: da 2f 60 10 stb %o5, [ %i5 + 0x10 ]
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200c108: 9e 10 00 02 mov %g2, %o7
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
200c10c: 80 a0 40 10 cmp %g1, %l0
200c110: 08 80 00 03 bleu 200c11c <rtems_bdbuf_remove_from_tree+0x100>
200c114: b2 10 20 00 clr %i1
{
p = *(buf_prev - 1);
200c118: f2 00 bf f8 ld [ %g2 + -8 ], %i1
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
200c11c: f4 07 60 0c ld [ %i5 + 0xc ], %i2
200c120: 80 a6 a0 00 cmp %i2, 0
200c124: 22 80 00 ae be,a 200c3dc <rtems_bdbuf_remove_from_tree+0x3c0>
200c128: c6 07 60 08 ld [ %i5 + 8 ], %g3
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
200c12c: c6 06 a0 08 ld [ %i2 + 8 ], %g3
200c130: 82 10 00 1a mov %i2, %g1
200c134: 80 a0 e0 00 cmp %g3, 0
200c138: 12 80 00 06 bne 200c150 <rtems_bdbuf_remove_from_tree+0x134>
200c13c: b6 10 3f ff mov -1, %i3
{
r->avl.left = q->avl.left;
200c140: 10 80 00 ac b 200c3f0 <rtems_bdbuf_remove_from_tree+0x3d4>
200c144: c6 07 60 08 ld [ %i5 + 8 ], %g3
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
200c148: 82 10 00 03 mov %g3, %g1
200c14c: 86 10 00 04 mov %g4, %g3
200c150: c8 00 e0 08 ld [ %g3 + 8 ], %g4
{
*buf_prev++ = r = s;
200c154: c2 20 80 00 st %g1, [ %g2 ]
s = r->avl.left;
r->avl.cache = -1;
200c158: f6 28 60 10 stb %i3, [ %g1 + 0x10 ]
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
200c15c: 80 a1 20 00 cmp %g4, 0
200c160: 12 bf ff fa bne 200c148 <rtems_bdbuf_remove_from_tree+0x12c>
200c164: 84 00 a0 04 add %g2, 4, %g2
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
200c168: f0 07 60 08 ld [ %i5 + 8 ], %i0
r->avl.left = s->avl.right;
200c16c: f6 00 e0 0c ld [ %g3 + 0xc ], %i3
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
200c170: c8 0f 60 11 ldub [ %i5 + 0x11 ], %g4
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
200c174: f0 20 e0 08 st %i0, [ %g3 + 8 ]
r->avl.left = s->avl.right;
200c178: f6 20 60 08 st %i3, [ %g1 + 8 ]
s->avl.right = q->avl.right;
200c17c: f4 20 e0 0c st %i2, [ %g3 + 0xc ]
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
200c180: 82 10 20 01 mov 1, %g1
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
200c184: c8 28 e0 11 stb %g4, [ %g3 + 0x11 ]
s->avl.cache = 1;
200c188: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
*t = q = s;
200c18c: c6 23 ff fc st %g3, [ %o7 + -4 ]
}
}
if (p != NULL)
200c190: 80 a6 60 00 cmp %i1, 0
200c194: 22 80 00 07 be,a 200c1b0 <rtems_bdbuf_remove_from_tree+0x194>
200c198: c6 27 20 40 st %g3, [ %i4 + 0x40 ]
{
if (p->avl.cache == -1)
200c19c: c2 4e 60 10 ldsb [ %i1 + 0x10 ], %g1
200c1a0: 80 a0 7f ff cmp %g1, -1
200c1a4: 22 80 00 03 be,a 200c1b0 <rtems_bdbuf_remove_from_tree+0x194>
200c1a8: c6 26 60 08 st %g3, [ %i1 + 8 ]
{
p->avl.left = q;
}
else
{
p->avl.right = q;
200c1ac: c6 26 60 0c st %g3, [ %i1 + 0xc ]
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
200c1b0: 80 a0 80 10 cmp %g2, %l0
200c1b4: 08 80 00 2a bleu 200c25c <rtems_bdbuf_remove_from_tree+0x240>
200c1b8: b4 38 00 10 xnor %g0, %l0, %i2
p->avl.right = q;
}
}
else
{
*root = q;
200c1bc: c2 00 bf fc ld [ %g2 + -4 ], %g1
200c1c0: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
200c1c4: b4 06 80 02 add %i2, %g2, %i2
200c1c8: 89 29 20 18 sll %g4, 0x18, %g4
200c1cc: b4 0e bf fc and %i2, -4, %i2
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
200c1d0: b2 10 3f ff mov -1, %i1
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
200c1d4: 10 80 00 11 b 200c218 <rtems_bdbuf_remove_from_tree+0x1fc>
200c1d8: b4 20 80 1a sub %g2, %i2, %i2
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
200c1dc: 86 10 00 01 mov %g1, %g3
modified = false;
200c1e0: ba 10 20 00 clr %i5
default:
break;
}
}
if (buf_prev > buf_stack)
200c1e4: 80 a0 80 1a cmp %g2, %i2
200c1e8: 22 80 00 1d be,a 200c25c <rtems_bdbuf_remove_from_tree+0x240>
200c1ec: c6 27 20 40 st %g3, [ %i4 + 0x40 ]
{
q = *(buf_prev - 1);
200c1f0: c2 00 bf f8 ld [ %g2 + -8 ], %g1
if (q->avl.cache == -1)
200c1f4: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
200c1f8: 89 29 20 18 sll %g4, 0x18, %g4
200c1fc: b7 39 20 18 sra %g4, 0x18, %i3
200c200: 80 a6 ff ff cmp %i3, -1
200c204: 02 80 00 37 be 200c2e0 <rtems_bdbuf_remove_from_tree+0x2c4>
200c208: 80 8f 60 ff btst 0xff, %i5
{
q->avl.left = p;
}
else
{
q->avl.right = p;
200c20c: c6 20 60 0c st %g3, [ %g1 + 0xc ]
*root = q;
}
modified = true;
while (modified)
200c210: 02 80 00 13 be 200c25c <rtems_bdbuf_remove_from_tree+0x240>
200c214: 84 00 bf fc add %g2, -4, %g2
else
{
break;
}
if (p->avl.cache == -1)
200c218: 89 39 20 18 sra %g4, 0x18, %g4
200c21c: 80 a1 3f ff cmp %g4, -1
200c220: 02 80 00 28 be 200c2c0 <rtems_bdbuf_remove_from_tree+0x2a4>
200c224: c6 48 60 11 ldsb [ %g1 + 0x11 ], %g3
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
200c228: 80 a0 e0 00 cmp %g3, 0
200c22c: 22 bf ff ec be,a 200c1dc <rtems_bdbuf_remove_from_tree+0x1c0>
200c230: f2 28 60 11 stb %i1, [ %g1 + 0x11 ]
200c234: 80 a0 e0 01 cmp %g3, 1
200c238: 02 80 00 33 be 200c304 <rtems_bdbuf_remove_from_tree+0x2e8>
200c23c: 80 a0 ff ff cmp %g3, -1
200c240: 22 80 00 09 be,a 200c264 <rtems_bdbuf_remove_from_tree+0x248><== ALWAYS TAKEN
200c244: c8 00 60 08 ld [ %g1 + 8 ], %g4
200c248: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
200c24c: 80 a0 80 1a cmp %g2, %i2 <== NOT EXECUTED
200c250: 12 bf ff e8 bne 200c1f0 <rtems_bdbuf_remove_from_tree+0x1d4><== NOT EXECUTED
200c254: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
q->avl.right = p;
}
}
else
{
*root = p;
200c258: c6 27 20 40 st %g3, [ %i4 + 0x40 ] <== NOT EXECUTED
200c25c: 81 c7 e0 08 ret
200c260: 81 e8 00 00 restore
break;
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
200c264: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200c268: 80 a0 e0 00 cmp %g3, 0
200c26c: 04 80 00 35 ble 200c340 <rtems_bdbuf_remove_from_tree+0x324><== NEVER TAKEN
200c270: ba 10 20 01 mov 1, %i5
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
200c274: c6 01 20 0c ld [ %g4 + 0xc ], %g3
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
200c278: f0 48 e0 11 ldsb [ %g3 + 0x11 ], %i0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200c27c: f6 00 e0 08 ld [ %g3 + 8 ], %i3
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
200c280: b0 38 00 18 xnor %g0, %i0, %i0
200c284: 80 a0 00 18 cmp %g0, %i0
200c288: b0 60 3f ff subx %g0, -1, %i0
200c28c: f0 28 60 11 stb %i0, [ %g1 + 0x11 ]
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200c290: f0 48 e0 11 ldsb [ %g3 + 0x11 ], %i0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200c294: f6 21 20 0c st %i3, [ %g4 + 0xc ]
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200c298: b0 1e 20 01 xor %i0, 1, %i0
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200c29c: f6 00 e0 0c ld [ %g3 + 0xc ], %i3
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
200c2a0: c8 20 e0 08 st %g4, [ %g3 + 8 ]
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200c2a4: 80 a0 00 18 cmp %g0, %i0
200c2a8: b0 40 3f ff addx %g0, -1, %i0
200c2ac: f0 29 20 11 stb %i0, [ %g4 + 0x11 ]
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200c2b0: f6 20 60 08 st %i3, [ %g1 + 8 ]
p2->avl.right = p;
200c2b4: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
200c2b8: 10 bf ff cb b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8>
200c2bc: c0 28 e0 11 clrb [ %g3 + 0x11 ]
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
200c2c0: 80 a0 e0 00 cmp %g3, 0
200c2c4: 12 80 00 0c bne 200c2f4 <rtems_bdbuf_remove_from_tree+0x2d8>
200c2c8: 80 a0 e0 01 cmp %g3, 1
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
200c2cc: 88 10 20 01 mov 1, %g4
200c2d0: 86 10 00 01 mov %g1, %g3
200c2d4: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
modified = false;
200c2d8: 10 bf ff c3 b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8>
200c2dc: ba 10 20 00 clr %i5
{
q = *(buf_prev - 1);
if (q->avl.cache == -1)
{
q->avl.left = p;
200c2e0: c6 20 60 08 st %g3, [ %g1 + 8 ]
*root = q;
}
modified = true;
while (modified)
200c2e4: 12 bf ff cd bne 200c218 <rtems_bdbuf_remove_from_tree+0x1fc>
200c2e8: 84 00 bf fc add %g2, -4, %g2
200c2ec: 81 c7 e0 08 ret
200c2f0: 81 e8 00 00 restore
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
200c2f4: 02 80 00 08 be 200c314 <rtems_bdbuf_remove_from_tree+0x2f8>
200c2f8: 80 a0 ff ff cmp %g3, -1
200c2fc: 32 bf ff d4 bne,a 200c24c <rtems_bdbuf_remove_from_tree+0x230><== NEVER TAKEN
200c300: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
{
/* rebalance right branch */
switch (p->avl.bal)
{
case +1:
p->avl.bal = 0;
200c304: c0 28 60 11 clrb [ %g1 + 0x11 ]
200c308: 86 10 00 01 mov %g1, %g3
200c30c: 10 bf ff b6 b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8>
200c310: ba 10 20 01 mov 1, %i5
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
200c314: c6 00 60 0c ld [ %g1 + 0xc ], %g3
if (p1->avl.bal >= 0) /* simple RR-turn */
200c318: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5
200c31c: 80 a7 60 00 cmp %i5, 0
200c320: 26 80 00 1b bl,a 200c38c <rtems_bdbuf_remove_from_tree+0x370><== NEVER TAKEN
200c324: c8 00 e0 08 ld [ %g3 + 8 ], %g4 <== NOT EXECUTED
{
p->avl.right = p1->avl.left;
200c328: f6 00 e0 08 ld [ %g3 + 8 ], %i3
p1->avl.left = p;
200c32c: c2 20 e0 08 st %g1, [ %g3 + 8 ]
if (p1->avl.bal == 0)
200c330: 12 80 00 0e bne 200c368 <rtems_bdbuf_remove_from_tree+0x34c>
200c334: f6 20 60 0c st %i3, [ %g1 + 0xc ]
{
p1->avl.bal = -1;
200c338: 10 bf ff ab b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8>
200c33c: c8 28 e0 11 stb %g4, [ %g3 + 0x11 ]
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
200c340: fa 01 20 0c ld [ %g4 + 0xc ], %i5 <== NOT EXECUTED
p1->avl.right = p;
200c344: c2 21 20 0c st %g1, [ %g4 + 0xc ] <== NOT EXECUTED
if (p1->avl.bal == 0)
200c348: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
200c34c: 12 80 00 0b bne 200c378 <rtems_bdbuf_remove_from_tree+0x35c><== NOT EXECUTED
200c350: fa 20 60 08 st %i5, [ %g1 + 8 ] <== NOT EXECUTED
{
p1->avl.bal = 1;
200c354: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200c358: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
200c35c: c2 29 20 11 stb %g1, [ %g4 + 0x11 ] <== NOT EXECUTED
modified = false;
200c360: 10 bf ff a1 b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8><== NOT EXECUTED
200c364: ba 10 20 00 clr %i5 <== NOT EXECUTED
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
200c368: c0 28 60 11 clrb [ %g1 + 0x11 ]
p1->avl.bal = 0;
200c36c: c0 28 e0 11 clrb [ %g3 + 0x11 ]
200c370: 10 bf ff 9d b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8>
200c374: ba 10 20 01 mov 1, %i5
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
200c378: c0 28 60 11 clrb [ %g1 + 0x11 ] <== NOT EXECUTED
p1->avl.bal = 0;
200c37c: c0 29 20 11 clrb [ %g4 + 0x11 ] <== NOT EXECUTED
200c380: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
200c384: 10 bf ff 98 b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8><== NOT EXECUTED
200c388: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
200c38c: ba 10 20 01 mov 1, %i5 <== 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;
200c390: f0 49 20 11 ldsb [ %g4 + 0x11 ], %i0 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200c394: f6 01 20 0c ld [ %g4 + 0xc ], %i3 <== 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;
200c398: b0 1e 20 01 xor %i0, 1, %i0 <== NOT EXECUTED
200c39c: 80 a0 00 18 cmp %g0, %i0 <== NOT EXECUTED
200c3a0: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED
200c3a4: f0 28 60 11 stb %i0, [ %g1 + 0x11 ] <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200c3a8: f0 49 20 11 ldsb [ %g4 + 0x11 ], %i0 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200c3ac: f6 20 e0 08 st %i3, [ %g3 + 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;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200c3b0: b0 38 00 18 xnor %g0, %i0, %i0 <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200c3b4: f6 01 20 08 ld [ %g4 + 8 ], %i3 <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
200c3b8: c6 21 20 0c st %g3, [ %g4 + 0xc ] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200c3bc: 80 a0 00 18 cmp %g0, %i0 <== NOT EXECUTED
200c3c0: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED
200c3c4: f0 28 e0 11 stb %i0, [ %g3 + 0x11 ] <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200c3c8: f6 20 60 0c st %i3, [ %g1 + 0xc ] <== NOT EXECUTED
p2->avl.left = p;
200c3cc: c2 21 20 08 st %g1, [ %g4 + 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;
p = p2;
p2->avl.bal = 0;
200c3d0: c0 29 20 11 clrb [ %g4 + 0x11 ] <== NOT EXECUTED
200c3d4: 10 bf ff 84 b 200c1e4 <rtems_bdbuf_remove_from_tree+0x1c8><== NOT EXECUTED
200c3d8: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
{
r = q->avl.left;
if (r != NULL)
200c3dc: 80 a0 e0 00 cmp %g3, 0
200c3e0: 02 bf ff 6c be 200c190 <rtems_bdbuf_remove_from_tree+0x174>
200c3e4: 84 10 00 01 mov %g1, %g2
{
r->avl.bal = 0;
200c3e8: 10 bf ff 6a b 200c190 <rtems_bdbuf_remove_from_tree+0x174>
200c3ec: c0 28 e0 11 clrb [ %g3 + 0x11 ]
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
200c3f0: c2 0f 60 11 ldub [ %i5 + 0x11 ], %g1
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
200c3f4: c6 26 a0 08 st %g3, [ %i2 + 8 ]
r->avl.bal = q->avl.bal;
200c3f8: c2 2e a0 11 stb %g1, [ %i2 + 0x11 ]
r->avl.cache = 1;
*buf_prev++ = q = r;
200c3fc: f4 20 bf fc st %i2, [ %g2 + -4 ]
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
200c400: 82 10 20 01 mov 1, %g1
*buf_prev++ = q = r;
200c404: 86 10 00 1a mov %i2, %g3
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
200c408: 10 bf ff 62 b 200c190 <rtems_bdbuf_remove_from_tree+0x174>
200c40c: c2 2e a0 10 stb %g1, [ %i2 + 0x10 ]
0200c410 <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
200c410: 9d e3 bf a0 save %sp, -96, %sp
switch (bd->state)
200c414: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200c418: 80 a0 60 00 cmp %g1, 0
200c41c: 02 80 00 0a be 200c444 <rtems_bdbuf_remove_from_tree_and_lru_list+0x34>
200c420: 80 a0 60 02 cmp %g1, 2
200c424: 02 80 00 06 be 200c43c <rtems_bdbuf_remove_from_tree_and_lru_list+0x2c><== ALWAYS TAKEN
200c428: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
200c42c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200c430: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200c434: 7f ff fd 46 call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200c438: 92 12 60 08 or %o1, 8, %o1 ! 42000008 <RAM_END+0x3fc00008><== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
200c43c: 7f ff fe f8 call 200c01c <rtems_bdbuf_remove_from_tree>
200c440: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200c444: 7f ff ef a2 call 20082cc <_Chain_Extract>
200c448: 81 e8 00 00 restore
0200bc8c <rtems_bdbuf_restore_preemption>:
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
200bc8c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200bc90: 13 00 00 3f sethi %hi(0xfc00), %o1
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
200bc94: f0 27 a0 44 st %i0, [ %fp + 0x44 ]
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200bc98: 90 10 00 18 mov %i0, %o0
200bc9c: 94 07 a0 44 add %fp, 0x44, %o2
200bca0: 40 00 13 1b call 201090c <rtems_task_mode>
200bca4: 92 12 63 ff or %o1, 0x3ff, %o1
if (sc != RTEMS_SUCCESSFUL)
200bca8: 80 a2 20 00 cmp %o0, 0
200bcac: 12 80 00 04 bne 200bcbc <rtems_bdbuf_restore_preemption+0x30><== NEVER TAKEN
200bcb0: 11 10 80 00 sethi %hi(0x42000000), %o0
200bcb4: 81 c7 e0 08 ret
200bcb8: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
200bcbc: 7f ff f0 07 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bcc0: 90 12 20 11 or %o0, 0x11, %o0 <== NOT EXECUTED
0200b960 <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
200b960: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200b964: e0 06 40 00 ld [ %i1 ], %l0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200b968: b2 06 60 04 add %i1, 4, %i1
if (!rtems_chain_is_empty (chain))
200b96c: 80 a4 00 19 cmp %l0, %i1
200b970: 02 80 00 36 be 200ba48 <rtems_bdbuf_swapout_modified_processing+0xe8>
200b974: 80 a6 e0 00 cmp %i3, 0
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dev == BDBUF_INVALID_DEV))
200b978: 12 80 00 65 bne 200bb0c <rtems_bdbuf_swapout_modified_processing+0x1ac>
200b97c: a2 10 20 00 clr %l1
* 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 && (*dev == bd->dev))
200b980: a2 0c 60 ff and %l1, 0xff, %l1
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200b984: 25 00 80 6a sethi %hi(0x201a800), %l2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200b988: a8 10 20 09 mov 9, %l4
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200b98c: 80 a4 00 19 cmp %l0, %i1
200b990: 02 80 00 2e be 200ba48 <rtems_bdbuf_swapout_modified_processing+0xe8>
200b994: 80 a4 60 00 cmp %l1, 0
* 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 && (*dev == bd->dev))
200b998: 12 80 00 32 bne 200ba60 <rtems_bdbuf_swapout_modified_processing+0x100>
200b99c: 80 a6 e0 00 cmp %i3, 0
200b9a0: 02 80 00 08 be 200b9c0 <rtems_bdbuf_swapout_modified_processing+0x60>
200b9a4: 82 14 a2 e8 or %l2, 0x2e8, %g1
200b9a8: c4 06 00 00 ld [ %i0 ], %g2
200b9ac: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
200b9b0: 80 a0 80 01 cmp %g2, %g1
200b9b4: 22 80 00 27 be,a 200ba50 <rtems_bdbuf_swapout_modified_processing+0xf0>
200b9b8: c4 06 20 04 ld [ %i0 + 4 ], %g2
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200b9bc: 82 14 a2 e8 or %l2, 0x2e8, %g1
200b9c0: c2 00 60 78 ld [ %g1 + 0x78 ], %g1
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
|| rtems_bdbuf_has_buffer_waiters ())
200b9c4: 80 a0 60 00 cmp %g1, 0
200b9c8: 12 80 00 26 bne 200ba60 <rtems_bdbuf_swapout_modified_processing+0x100>
200b9cc: 01 00 00 00 nop
bd->hold_timer = 0;
if (bd->hold_timer)
200b9d0: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200b9d4: 80 a0 60 00 cmp %g1, 0
200b9d8: 22 80 00 11 be,a 200ba1c <rtems_bdbuf_swapout_modified_processing+0xbc>
200b9dc: c2 06 00 00 ld [ %i0 ], %g1
{
if (update_timers)
200b9e0: 80 a7 20 00 cmp %i4, 0
200b9e4: 02 80 00 09 be 200ba08 <rtems_bdbuf_swapout_modified_processing+0xa8>
200b9e8: 01 00 00 00 nop
{
if (bd->hold_timer > timer_delta)
200b9ec: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200b9f0: 80 a0 40 1d cmp %g1, %i5
200b9f4: 08 80 00 44 bleu 200bb04 <rtems_bdbuf_swapout_modified_processing+0x1a4>
200b9f8: 01 00 00 00 nop
bd->hold_timer -= timer_delta;
200b9fc: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200ba00: 82 20 40 1d sub %g1, %i5, %g1
200ba04: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
else
bd->hold_timer = 0;
}
if (bd->hold_timer)
200ba08: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200ba0c: 80 a0 60 00 cmp %g1, 0
200ba10: 32 80 00 0b bne,a 200ba3c <rtems_bdbuf_swapout_modified_processing+0xdc>
200ba14: e0 04 00 00 ld [ %l0 ], %l0
/*
* This assumes we can set dev_t 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 (*dev == BDBUF_INVALID_DEV)
200ba18: c2 06 00 00 ld [ %i0 ], %g1
200ba1c: 80 a0 7f ff cmp %g1, -1
200ba20: 02 80 00 31 be 200bae4 <rtems_bdbuf_swapout_modified_processing+0x184>
200ba24: c6 06 20 04 ld [ %i0 + 4 ], %g3
*dev = bd->dev;
if (bd->dev == *dev)
200ba28: c4 04 20 18 ld [ %l0 + 0x18 ], %g2
200ba2c: 80 a0 80 01 cmp %g2, %g1
200ba30: 22 80 00 0e be,a 200ba68 <rtems_bdbuf_swapout_modified_processing+0x108><== ALWAYS TAKEN
200ba34: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
node = next_node;
}
else
{
node = node->next;
200ba38: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200ba3c: 80 a4 00 19 cmp %l0, %i1
200ba40: 12 bf ff d6 bne 200b998 <rtems_bdbuf_swapout_modified_processing+0x38>
200ba44: 80 a4 60 00 cmp %l1, 0
200ba48: 81 c7 e0 08 ret
200ba4c: 81 e8 00 00 restore
* 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 && (*dev == bd->dev))
200ba50: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
200ba54: 80 a0 80 01 cmp %g2, %g1
200ba58: 12 bf ff da bne 200b9c0 <rtems_bdbuf_swapout_modified_processing+0x60><== NEVER TAKEN
200ba5c: 82 14 a2 e8 or %l2, 0x2e8, %g1
|| rtems_bdbuf_has_buffer_waiters ())
bd->hold_timer = 0;
200ba60: c0 24 20 34 clr [ %l0 + 0x34 ]
200ba64: 30 bf ff db b,a 200b9d0 <rtems_bdbuf_swapout_modified_processing+0x70>
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
*dev = bd->dev;
if (bd->dev == *dev)
200ba68: 80 a0 40 03 cmp %g1, %g3
200ba6c: 32 bf ff f4 bne,a 200ba3c <rtems_bdbuf_swapout_modified_processing+0xdc><== NEVER TAKEN
200ba70: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200ba74: 90 10 00 10 mov %l0, %o0
{
rtems_chain_node* next_node = node->next;
200ba78: e6 04 00 00 ld [ %l0 ], %l3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ba7c: e8 24 20 28 st %l4, [ %l0 + 0x28 ]
200ba80: 7f ff f2 13 call 20082cc <_Chain_Extract>
200ba84: 01 00 00 00 nop
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract (node);
tnode = tnode->previous;
200ba88: d0 06 a0 08 ld [ %i2 + 8 ], %o0
while (node && !rtems_chain_is_head (transfer, tnode))
200ba8c: 80 a6 80 08 cmp %i2, %o0
200ba90: 02 80 00 0c be 200bac0 <rtems_bdbuf_swapout_modified_processing+0x160>
200ba94: 92 10 00 10 mov %l0, %o1
200ba98: c4 04 20 20 ld [ %l0 + 0x20 ], %g2
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
200ba9c: c2 02 20 20 ld [ %o0 + 0x20 ], %g1
200baa0: 80 a0 80 01 cmp %g2, %g1
200baa4: 18 80 00 0c bgu 200bad4 <rtems_bdbuf_swapout_modified_processing+0x174>
200baa8: 92 10 00 10 mov %l0, %o1
{
rtems_chain_insert (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
200baac: d0 02 20 04 ld [ %o0 + 4 ], %o0
rtems_chain_extract (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
200bab0: 80 a6 80 08 cmp %i2, %o0
200bab4: 32 bf ff fb bne,a 200baa0 <rtems_bdbuf_swapout_modified_processing+0x140>
200bab8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200babc: 92 10 00 10 mov %l0, %o1
200bac0: 90 10 00 1a mov %i2, %o0
200bac4: 40 00 14 d3 call 2010e10 <_Chain_Insert>
200bac8: a0 10 00 13 mov %l3, %l0
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200bacc: 10 bf ff b1 b 200b990 <rtems_bdbuf_swapout_modified_processing+0x30>
200bad0: 80 a4 00 19 cmp %l0, %i1
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
200bad4: 40 00 14 cf call 2010e10 <_Chain_Insert>
200bad8: a0 10 00 13 mov %l3, %l0
200badc: 10 bf ff ad b 200b990 <rtems_bdbuf_swapout_modified_processing+0x30>
200bae0: 80 a4 00 19 cmp %l0, %i1
/*
* This assumes we can set dev_t 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 (*dev == BDBUF_INVALID_DEV)
200bae4: 80 a0 ff ff cmp %g3, -1
200bae8: 32 bf ff d1 bne,a 200ba2c <rtems_bdbuf_swapout_modified_processing+0xcc><== NEVER TAKEN
200baec: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 <== NOT EXECUTED
*dev = bd->dev;
200baf0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
200baf4: c6 04 20 1c ld [ %l0 + 0x1c ], %g3
200baf8: c2 26 00 00 st %g1, [ %i0 ]
200bafc: 10 bf ff cb b 200ba28 <rtems_bdbuf_swapout_modified_processing+0xc8>
200bb00: c6 26 20 04 st %g3, [ %i0 + 4 ]
if (update_timers)
{
if (bd->hold_timer > timer_delta)
bd->hold_timer -= timer_delta;
else
bd->hold_timer = 0;
200bb04: c0 24 20 34 clr [ %l0 + 0x34 ]
200bb08: 30 bf ff c0 b,a 200ba08 <rtems_bdbuf_swapout_modified_processing+0xa8>
* @param update_timers If true update the timers.
* @param timer_delta It update_timers is true update the timers by this
* amount.
*/
static void
rtems_bdbuf_swapout_modified_processing (dev_t* dev,
200bb0c: c4 06 00 00 ld [ %i0 ], %g2
200bb10: c2 06 20 04 ld [ %i0 + 4 ], %g1
200bb14: 82 08 80 01 and %g2, %g1, %g1
200bb18: 82 38 00 01 xnor %g0, %g1, %g1
200bb1c: 80 a0 00 01 cmp %g0, %g1
200bb20: 10 bf ff 98 b 200b980 <rtems_bdbuf_swapout_modified_processing+0x20>
200bb24: a2 60 3f ff subx %g0, -1, %l1
0200ca50 <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
200ca50: 9d e3 bf 68 save %sp, -152, %sp
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
200ca54: 27 00 80 64 sethi %hi(0x2019000), %l3
200ca58: a6 14 e0 78 or %l3, 0x78, %l3 ! 2019078 <rtems_bdbuf_configuration>
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200ca5c: 7f ff fc ce call 200bd94 <rtems_bdbuf_swapout_writereq_alloc>
200ca60: f6 04 e0 0c ld [ %l3 + 0xc ], %i3
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200ca64: 03 00 80 68 sethi %hi(0x201a000), %g1
200ca68: d2 00 60 b8 ld [ %g1 + 0xb8 ], %o1 ! 201a0b8 <Configuration+0xc>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ca6c: 82 07 bf d4 add %fp, -44, %g1
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.dev = BDBUF_INVALID_DEV;
200ca70: 05 3f ff ff sethi %hi(0xfffffc00), %g2
200ca74: c2 27 bf d0 st %g1, [ %fp + -48 ]
200ca78: 84 10 a3 ff or %g2, 0x3ff, %g2
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200ca7c: 83 2e e0 02 sll %i3, 2, %g1
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.dev = BDBUF_INVALID_DEV;
200ca80: 86 10 00 02 mov %g2, %g3
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 ();
200ca84: d0 27 bf ec st %o0, [ %fp + -20 ]
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
200ca88: c4 3f bf e0 std %g2, [ %fp + -32 ]
200ca8c: a2 07 bf d0 add %fp, -48, %l1
head->previous = NULL;
200ca90: c0 27 bf d4 clr [ %fp + -44 ]
tail->previous = head;
200ca94: e2 27 bf d8 st %l1, [ %fp + -40 ]
transfer.syncing = false;
200ca98: c0 2f bf e8 clrb [ %fp + -24 ]
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200ca9c: 91 2e e0 07 sll %i3, 7, %o0
200caa0: 90 22 00 01 sub %o0, %g1, %o0
200caa4: 90 02 00 1b add %o0, %i3, %o0
200caa8: 40 00 29 1c call 2016f18 <.udiv>
200caac: 91 2a 20 03 sll %o0, 3, %o0
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
200cab0: 7f ff fb 8b call 200b8dc <rtems_bdbuf_lock_cache>
200cab4: d0 27 bf cc st %o0, [ %fp + -52 ]
for (w = 0; w < bdbuf_config.swapout_workers; w++)
200cab8: e4 04 e0 14 ld [ %l3 + 0x14 ], %l2
200cabc: 80 a4 a0 00 cmp %l2, 0
200cac0: 02 80 00 34 be 200cb90 <rtems_bdbuf_swapout_task+0x140> <== ALWAYS TAKEN
200cac4: 29 3f ff ff sethi %hi(0xfffffc00), %l4
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200cac8: 31 00 80 6a sethi %hi(0x201a800), %i0 <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200cacc: 35 10 91 1b sethi %hi(0x42446c00), %i2 <== NOT EXECUTED
rtems_chain_append (&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.dev = BDBUF_INVALID_DEV;
200cad0: a8 15 23 ff or %l4, 0x3ff, %l4 <== NOT EXECUTED
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200cad4: 21 00 80 33 sethi %hi(0x200cc00), %l0 <== 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)
200cad8: a4 04 a0 61 add %l2, 0x61, %l2 <== NOT EXECUTED
200cadc: b8 10 20 61 mov 0x61, %i4 <== NOT EXECUTED
200cae0: b0 16 22 f0 or %i0, 0x2f0, %i0 <== NOT EXECUTED
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
200cae4: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200cae8: aa 10 00 14 mov %l4, %l5 <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200caec: b4 16 a3 00 or %i2, 0x300, %i2 <== NOT EXECUTED
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200caf0: a0 14 21 f4 or %l0, 0x1f4, %l0 <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
200caf4: 7f ff dc b9 call 2003dd8 <malloc> <== NOT EXECUTED
200caf8: 90 10 20 38 mov 0x38, %o0 <== NOT EXECUTED
if (!worker)
200cafc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
200cb00: 02 80 00 b6 be 200cdd8 <rtems_bdbuf_swapout_task+0x388> <== NOT EXECUTED
200cb04: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200cb08: 7f ff ed e6 call 20082a0 <_Chain_Append> <== NOT EXECUTED
200cb0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
200cb10: f2 2f 60 0c stb %i1, [ %i5 + 0xc ] <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200cb14: 7f ff fc a0 call 200bd94 <rtems_bdbuf_swapout_writereq_alloc><== NOT EXECUTED
200cb18: 01 00 00 00 nop <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
(bdbuf_config.swapout_priority ?
200cb1c: d2 04 e0 08 ld [ %l3 + 8 ], %o1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200cb20: 82 07 60 10 add %i5, 0x10, %g1 <== NOT EXECUTED
200cb24: 84 07 60 14 add %i5, 0x14, %g2 <== NOT EXECUTED
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200cb28: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED
head->next = tail;
200cb2c: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
head->previous = NULL;
200cb30: c0 27 60 14 clr [ %i5 + 0x14 ] <== NOT EXECUTED
tail->previous = head;
200cb34: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200cb38: e8 3f 60 20 std %l4, [ %i5 + 0x20 ] <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200cb3c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
200cb40: 12 80 00 03 bne 200cb4c <rtems_bdbuf_swapout_task+0xfc> <== NOT EXECUTED
200cb44: 90 17 00 1a or %i4, %i2, %o0 <== NOT EXECUTED
200cb48: 92 10 20 0f mov 0xf, %o1 <== NOT EXECUTED
200cb4c: 15 00 00 08 sethi %hi(0x2000), %o2 <== NOT EXECUTED
200cb50: 96 10 24 00 mov 0x400, %o3 <== NOT EXECUTED
200cb54: 98 10 20 00 clr %o4 <== NOT EXECUTED
200cb58: 7f ff eb 3b call 2007844 <rtems_task_create> <== NOT EXECUTED
200cb5c: 9a 07 60 08 add %i5, 8, %o5 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT),
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
200cb60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cb64: 12 80 00 9a bne 200cdcc <rtems_bdbuf_swapout_task+0x37c> <== NOT EXECUTED
200cb68: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200cb6c: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
200cb70: 7f ff eb c1 call 2007a74 <rtems_task_start> <== NOT EXECUTED
200cb74: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
200cb78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cb7c: 12 80 00 9a bne 200cde4 <rtems_bdbuf_swapout_task+0x394> <== NOT EXECUTED
200cb80: b8 07 20 01 inc %i4 <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
200cb84: 80 a7 00 12 cmp %i4, %l2 <== NOT EXECUTED
200cb88: 12 bf ff db bne 200caf4 <rtems_bdbuf_swapout_task+0xa4> <== NOT EXECUTED
200cb8c: 01 00 00 00 nop <== NOT EXECUTED
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
200cb90: 2d 3f ff ff sethi %hi(0xfffffc00), %l6
200cb94: 39 00 80 6a sethi %hi(0x201a800), %i4
200cb98: ac 15 a3 ff or %l6, 0x3ff, %l6
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
200cb9c: 7f ff fb e3 call 200bb28 <rtems_bdbuf_unlock_cache>
200cba0: b8 17 22 e8 or %i4, 0x2e8, %i4
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
200cba4: ae 10 00 16 mov %l6, %l7
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200cba8: a0 10 00 1c mov %i4, %l0
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200cbac: aa 07 20 08 add %i4, 8, %l5
/*
* 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->dev,
200cbb0: a6 07 20 5c add %i4, 0x5c, %l3
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
200cbb4: a8 07 20 50 add %i4, 0x50, %l4
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200cbb8: c2 0f 20 04 ldub [ %i4 + 4 ], %g1
200cbbc: 80 a0 60 00 cmp %g1, 0
200cbc0: 02 80 00 69 be 200cd64 <rtems_bdbuf_swapout_task+0x314> <== NEVER TAKEN
200cbc4: 01 00 00 00 nop
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
200cbc8: 7f ff fb 45 call 200b8dc <rtems_bdbuf_lock_cache>
200cbcc: 01 00 00 00 nop
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
200cbd0: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200cbd4: b0 10 20 01 mov 1, %i0
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
worker = NULL;
200cbd8: b4 10 20 00 clr %i2
* 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)
200cbdc: 80 a0 60 00 cmp %g1, 0
200cbe0: 02 80 00 38 be 200ccc0 <rtems_bdbuf_swapout_task+0x270>
200cbe4: ba 10 00 11 mov %l1, %i5
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
200cbe8: c4 0f 20 30 ldub [ %i4 + 0x30 ], %g2
/*
* 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)
200cbec: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
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 );
200cbf0: b2 07 60 04 add %i5, 4, %i1
head->next = tail;
head->previous = NULL;
200cbf4: c0 27 60 04 clr [ %i5 + 4 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200cbf8: f2 27 40 00 st %i1, [ %i5 ]
head->previous = NULL;
tail->previous = head;
200cbfc: fa 27 60 08 st %i5, [ %i5 + 8 ]
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
200cc00: ec 3f 60 10 std %l6, [ %i5 + 0x10 ]
/*
* 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)
200cc04: 80 a0 60 00 cmp %g1, 0
200cc08: 02 80 00 04 be 200cc18 <rtems_bdbuf_swapout_task+0x1c8>
200cc0c: c4 2f 60 18 stb %g2, [ %i5 + 0x18 ]
transfer->dev = bdbuf_cache.sync_device;
200cc10: c4 1c 20 38 ldd [ %l0 + 0x38 ], %g2
200cc14: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
/*
* 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->dev,
200cc18: a4 07 60 10 add %i5, 0x10, %l2
200cc1c: 96 10 20 01 mov 1, %o3
200cc20: 98 10 20 00 clr %o4
200cc24: 9a 10 00 1b mov %i3, %o5
200cc28: 90 10 00 12 mov %l2, %o0
200cc2c: 92 10 00 13 mov %l3, %o1
200cc30: 7f ff fb 4c call 200b960 <rtems_bdbuf_swapout_modified_processing>
200cc34: 94 10 00 1d mov %i5, %o2
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
200cc38: d6 0f 20 30 ldub [ %i4 + 0x30 ], %o3
200cc3c: 90 10 00 12 mov %l2, %o0
200cc40: 92 10 00 14 mov %l4, %o1
200cc44: 94 10 00 1d mov %i5, %o2
200cc48: 98 0e 20 01 and %i0, 1, %o4
200cc4c: 7f ff fb 45 call 200b960 <rtems_bdbuf_swapout_modified_processing>
200cc50: 9a 10 00 1b mov %i3, %o5
/*
* We have all the buffers that have been modified for this device so the
* cache can be unlocked because the state of each buffer has been set to
* TRANSFER.
*/
rtems_bdbuf_unlock_cache ();
200cc54: 7f ff fb b5 call 200bb28 <rtems_bdbuf_unlock_cache>
200cc58: 01 00 00 00 nop
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
200cc5c: c2 07 40 00 ld [ %i5 ], %g1
200cc60: 80 a0 40 19 cmp %g1, %i1
200cc64: 02 80 00 3a be 200cd4c <rtems_bdbuf_swapout_task+0x2fc>
200cc68: 80 a6 a0 00 cmp %i2, 0
{
if (worker)
200cc6c: 02 80 00 3a be 200cd54 <rtems_bdbuf_swapout_task+0x304> <== ALWAYS TAKEN
200cc70: 01 00 00 00 nop
{
rtems_status_code sc = rtems_event_send (worker->id,
200cc74: d0 06 a0 08 ld [ %i2 + 8 ], %o0 <== NOT EXECUTED
200cc78: 7f ff e9 3f call 2007174 <rtems_event_send> <== NOT EXECUTED
200cc7c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200cc80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cc84: 12 80 00 4f bne 200cdc0 <rtems_bdbuf_swapout_task+0x370> <== NOT EXECUTED
200cc88: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
}
transfered_buffers = true;
}
if (bdbuf_cache.sync_active && !transfered_buffers)
200cc8c: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
200cc90: 80 a0 60 00 cmp %g1, 0
200cc94: 02 80 00 2a be 200cd3c <rtems_bdbuf_swapout_task+0x2ec>
200cc98: 80 88 a0 ff btst 0xff, %g2
200cc9c: 02 80 00 0f be 200ccd8 <rtems_bdbuf_swapout_task+0x288>
200cca0: b0 10 20 00 clr %i0
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
200cca4: 7f ff fb 0e call 200b8dc <rtems_bdbuf_lock_cache>
200cca8: 01 00 00 00 nop
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
200ccac: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
worker = NULL;
200ccb0: b4 10 20 00 clr %i2
* 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)
200ccb4: 80 a0 60 00 cmp %g1, 0
200ccb8: 12 bf ff cc bne 200cbe8 <rtems_bdbuf_swapout_task+0x198>
200ccbc: ba 10 00 11 mov %l1, %i5
200ccc0: 7f ff ed 8c call 20082f0 <_Chain_Get>
200ccc4: 90 10 00 15 mov %l5, %o0
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
200ccc8: b4 92 20 00 orcc %o0, 0, %i2
200cccc: 32 bf ff c7 bne,a 200cbe8 <rtems_bdbuf_swapout_task+0x198><== NEVER TAKEN
200ccd0: ba 06 a0 10 add %i2, 0x10, %i5 <== NOT EXECUTED
200ccd4: 30 bf ff c5 b,a 200cbe8 <rtems_bdbuf_swapout_task+0x198>
}
if (bdbuf_cache.sync_active && !transfered_buffers)
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
200ccd8: 7f ff fb 01 call 200b8dc <rtems_bdbuf_lock_cache>
200ccdc: 01 00 00 00 nop
sync_requester = bdbuf_cache.sync_requester;
200cce0: fa 04 20 34 ld [ %l0 + 0x34 ], %i5
bdbuf_cache.sync_active = false;
200cce4: c0 2c 20 30 clrb [ %l0 + 0x30 ]
bdbuf_cache.sync_requester = 0;
200cce8: c0 24 20 34 clr [ %l0 + 0x34 ]
rtems_bdbuf_unlock_cache ();
200ccec: 7f ff fb 8f call 200bb28 <rtems_bdbuf_unlock_cache>
200ccf0: 01 00 00 00 nop
if (sync_requester)
200ccf4: 80 a7 60 00 cmp %i5, 0
200ccf8: 02 80 00 06 be 200cd10 <rtems_bdbuf_swapout_task+0x2c0> <== NEVER TAKEN
200ccfc: d4 07 bf cc ld [ %fp + -52 ], %o2
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
200cd00: 90 10 00 1d mov %i5, %o0
200cd04: 7f ff e9 1c call 2007174 <rtems_event_send>
200cd08: 92 10 20 02 mov 2, %o1
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
200cd0c: d4 07 bf cc ld [ %fp + -52 ], %o2
200cd10: 90 10 20 04 mov 4, %o0
200cd14: 92 10 20 00 clr %o1
200cd18: 7f ff e8 b4 call 2006fe8 <rtems_event_receive>
200cd1c: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
200cd20: 80 a2 20 06 cmp %o0, 6
200cd24: 02 bf ff a5 be 200cbb8 <rtems_bdbuf_swapout_task+0x168>
200cd28: 80 a2 20 00 cmp %o0, 0
200cd2c: 02 bf ff a3 be 200cbb8 <rtems_bdbuf_swapout_task+0x168> <== ALWAYS TAKEN
200cd30: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
200cd34: 7f ff eb e9 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200cd38: 90 12 20 18 or %o0, 0x18, %o0 ! 42000018 <RAM_END+0x3fc00018><== NOT EXECUTED
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
200cd3c: 02 bf ff f5 be 200cd10 <rtems_bdbuf_swapout_task+0x2c0>
200cd40: d4 07 bf cc ld [ %fp + -52 ], %o2
200cd44: 10 bf ff d8 b 200cca4 <rtems_bdbuf_swapout_task+0x254>
200cd48: b0 10 20 00 clr %i0
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;
200cd4c: 10 bf ff d0 b 200cc8c <rtems_bdbuf_swapout_task+0x23c>
200cd50: 84 10 20 00 clr %g2
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
200cd54: 7f ff fe cd call 200c888 <rtems_bdbuf_swapout_write>
200cd58: 90 10 00 1d mov %i5, %o0
}
transfered_buffers = true;
200cd5c: 10 bf ff cc b 200cc8c <rtems_bdbuf_swapout_task+0x23c>
200cd60: 84 10 20 01 mov 1, %g2
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
200cd64: 7f ff fa de call 200b8dc <rtems_bdbuf_lock_cache> <== NOT EXECUTED
200cd68: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200cd6c: fa 04 20 08 ld [ %l0 + 8 ], %i5 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
200cd70: a0 04 20 0c add %l0, 0xc, %l0 <== NOT EXECUTED
200cd74: 80 a7 40 10 cmp %i5, %l0 <== NOT EXECUTED
200cd78: 02 80 00 0a be 200cda0 <rtems_bdbuf_swapout_task+0x350> <== NOT EXECUTED
200cd7c: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
200cd80: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
200cd84: c0 2f 60 0c clrb [ %i5 + 0xc ] <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
200cd88: 7f ff e8 fb call 2007174 <rtems_event_send> <== NOT EXECUTED
200cd8c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
200cd90: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
200cd94: 80 a7 40 10 cmp %i5, %l0 <== NOT EXECUTED
200cd98: 32 bf ff fb bne,a 200cd84 <rtems_bdbuf_swapout_task+0x334><== NOT EXECUTED
200cd9c: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
200cda0: 7f ff fb 62 call 200bb28 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200cda4: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
200cda8: 7f ff db 2a call 2003a50 <free> <== NOT EXECUTED
200cdac: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
200cdb0: 7f ff ea ef call 200796c <rtems_task_delete> <== NOT EXECUTED
200cdb4: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
200cdb8: 81 c7 e0 08 ret <== NOT EXECUTED
200cdbc: 81 e8 00 00 restore <== NOT EXECUTED
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200cdc0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200cdc4: 7f ff eb c5 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200cdc8: 90 12 20 14 or %o0, 0x14, %o0 ! 42000014 <RAM_END+0x3fc00014><== NOT EXECUTED
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
200cdcc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200cdd0: 7f ff eb c2 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200cdd4: 90 12 20 16 or %o0, 0x16, %o0 ! 42000016 <RAM_END+0x3fc00016><== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
200cdd8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200cddc: 7f ff eb bf call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200cde0: 90 12 20 15 or %o0, 0x15, %o0 ! 42000015 <RAM_END+0x3fc00015><== NOT EXECUTED
sc = rtems_task_start (worker->id,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
200cde4: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200cde8: 7f ff eb bc call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200cdec: 90 12 20 17 or %o0, 0x17, %o0 ! 42000017 <RAM_END+0x3fc00017><== NOT EXECUTED
0200cdf4 <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)
{
200cdf4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
200cdf8: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 <== NOT EXECUTED
200cdfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ce00: 02 80 00 1c be 200ce70 <rtems_bdbuf_swapout_worker_task+0x7c><== NOT EXECUTED
200ce04: b6 10 00 18 mov %i0, %i3 <== NOT EXECUTED
200ce08: b4 06 20 10 add %i0, 0x10, %i2 <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
rtems_bdbuf_lock_cache ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200ce0c: 39 3f ff ff sethi %hi(0xfffffc00), %i4 <== 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 );
200ce10: 33 00 80 6a sethi %hi(0x201a800), %i1 <== NOT EXECUTED
200ce14: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
200ce18: b0 06 20 14 add %i0, 0x14, %i0 <== NOT EXECUTED
200ce1c: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED
200ce20: b2 16 62 f0 or %i1, 0x2f0, %i1 <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
200ce24: 7f ff fb 78 call 200bc04 <rtems_bdbuf_wait_for_event> <== NOT EXECUTED
200ce28: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
200ce2c: 7f ff fe 97 call 200c888 <rtems_bdbuf_swapout_write> <== NOT EXECUTED
200ce30: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
200ce34: 7f ff fa aa call 200b8dc <rtems_bdbuf_lock_cache> <== NOT EXECUTED
200ce38: 01 00 00 00 nop <== NOT EXECUTED
200ce3c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200ce40: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ce44: f0 26 e0 10 st %i0, [ %i3 + 0x10 ] <== NOT EXECUTED
head->previous = NULL;
200ce48: c0 26 e0 14 clr [ %i3 + 0x14 ] <== NOT EXECUTED
tail->previous = head;
200ce4c: f4 26 e0 18 st %i2, [ %i3 + 0x18 ] <== NOT EXECUTED
200ce50: 7f ff ed 14 call 20082a0 <_Chain_Append> <== NOT EXECUTED
200ce54: f8 3e e0 20 std %i4, [ %i3 + 0x20 ] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
200ce58: 7f ff fb 34 call 200bb28 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200ce5c: 01 00 00 00 nop <== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
200ce60: c2 0e e0 0c ldub [ %i3 + 0xc ], %g1 <== NOT EXECUTED
200ce64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ce68: 12 bf ff ef bne 200ce24 <rtems_bdbuf_swapout_worker_task+0x30><== NOT EXECUTED
200ce6c: 01 00 00 00 nop <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
200ce70: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED
200ce74: 7f ff da f7 call 2003a50 <free> <== NOT EXECUTED
200ce78: b0 10 20 00 clr %i0 <== NOT EXECUTED
free (worker);
200ce7c: 7f ff da f5 call 2003a50 <free> <== NOT EXECUTED
200ce80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
200ce84: 7f ff ea ba call 200796c <rtems_task_delete> <== NOT EXECUTED
200ce88: 81 e8 00 00 restore <== NOT EXECUTED
0200c888 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
200c888: 9d e3 bf a0 save %sp, -96, %sp
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
200c88c: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c890: b6 06 20 04 add %i0, 4, %i3
200c894: 80 a0 40 1b cmp %g1, %i3
200c898: 02 80 00 65 be 200ca2c <rtems_bdbuf_swapout_write+0x1a4> <== NEVER TAKEN
200c89c: 01 00 00 00 nop
/*
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
200c8a0: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0
200c8a4: 7f ff d9 33 call 2002d70 <rtems_disk_obtain>
200c8a8: 27 00 80 68 sethi %hi(0x201a000), %l3
if (dd == NULL)
dd = &null_disk;
200c8ac: a6 14 e2 b0 or %l3, 0x2b0, %l3 ! 201a2b0 <null_disk.7089>
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
200c8b0: 80 a2 20 00 cmp %o0, 0
200c8b4: 02 80 00 65 be 200ca48 <rtems_bdbuf_swapout_write+0x1c0>
200c8b8: ba 10 00 08 mov %o0, %i5
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
200c8bc: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
200c8c0: 35 00 80 64 sethi %hi(0x2019000), %i2
200c8c4: b4 16 a0 78 or %i2, 0x78, %i2 ! 2019078 <rtems_bdbuf_configuration>
200c8c8: d2 06 a0 20 ld [ %i2 + 0x20 ], %o1
200c8cc: 40 00 29 93 call 2016f18 <.udiv>
200c8d0: b8 10 20 00 clr %i4
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200c8d4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200c8d8: 84 10 20 0c mov 0xc, %g2
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
200c8dc: a4 10 00 08 mov %o0, %l2
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
200c8e0: c0 20 60 10 clr [ %g1 + 0x10 ]
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200c8e4: c4 20 60 0c st %g2, [ %g1 + 0xc ]
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
200c8e8: a2 07 60 08 add %i5, 8, %l1
200c8ec: a0 07 60 28 add %i5, 0x28, %l0
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200c8f0: b2 10 20 0c mov 0xc, %i1
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200c8f4: 7f ff ee 7f call 20082f0 <_Chain_Get>
200c8f8: 90 10 00 18 mov %i0, %o0
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
200c8fc: 92 92 20 00 orcc %o0, 0, %o1
200c900: 02 80 00 2e be 200c9b8 <rtems_bdbuf_swapout_write+0x130> <== NEVER TAKEN
200c904: 80 a7 40 13 cmp %i5, %l3
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
200c908: c2 07 60 08 ld [ %i5 + 8 ], %g1
200c90c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200c910: 80 88 60 01 btst 1, %g1
200c914: 02 80 00 36 be 200c9ec <rtems_bdbuf_swapout_write+0x164> <== ALWAYS TAKEN
200c918: d4 06 20 1c ld [ %i0 + 0x1c ], %o2
transfer->write_req->bufnum &&
200c91c: c2 02 a0 10 ld [ %o2 + 0x10 ], %g1 <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
200c920: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200c924: 32 80 00 39 bne,a 200ca08 <rtems_bdbuf_swapout_write+0x180><== NOT EXECUTED
200c928: c4 02 60 20 ld [ %o1 + 0x20 ], %g2 <== NOT EXECUTED
200c92c: f8 02 60 20 ld [ %o1 + 0x20 ], %i4 <== NOT EXECUTED
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
200c930: c8 07 60 20 ld [ %i5 + 0x20 ], %g4
buf->buffer = bd->buffer;
200c934: c6 02 60 24 ld [ %o1 + 0x24 ], %g3
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
200c938: 84 00 60 01 add %g1, 1, %g2
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
200c93c: 83 28 60 04 sll %g1, 4, %g1
transfer->write_req->bufnum++;
200c940: c4 22 a0 10 st %g2, [ %o2 + 0x10 ]
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
200c944: 9e 10 20 00 clr %o7
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
200c948: 84 00 60 18 add %g1, 0x18, %g2
200c94c: 82 02 80 02 add %o2, %g2, %g1
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
200c950: f8 22 80 02 st %i4, [ %o2 + %g2 ]
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
200c954: d2 20 60 0c st %o1, [ %g1 + 0xc ]
buf->block = bd->block;
buf->length = dd->block_size;
200c958: c8 20 60 04 st %g4, [ %g1 + 4 ]
buf->buffer = bd->buffer;
200c95c: c6 20 60 08 st %g3, [ %g1 + 8 ]
/*
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
200c960: c2 06 00 00 ld [ %i0 ], %g1
200c964: 80 a6 c0 01 cmp %i3, %g1
200c968: 02 80 00 08 be 200c988 <rtems_bdbuf_swapout_write+0x100>
200c96c: 92 10 00 10 mov %l0, %o1
200c970: c4 02 a0 10 ld [ %o2 + 0x10 ], %g2
200c974: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200c978: 80 a0 80 01 cmp %g2, %g1
200c97c: 0a 80 00 1f bcs 200c9f8 <rtems_bdbuf_swapout_write+0x170>
200c980: 80 8b e0 ff btst 0xff, %o7
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
200c984: 92 10 00 10 mov %l0, %o1
200c988: 96 10 20 00 clr %o3
200c98c: 7f ff ff 4e call 200c6c4 <rtems_bdbuf_execute_transfer_request.isra.9>
200c990: 90 10 00 11 mov %l1, %o0
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200c994: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200c998: 90 10 00 18 mov %i0, %o0
200c99c: f2 20 60 0c st %i1, [ %g1 + 0xc ]
200c9a0: 7f ff ee 54 call 20082f0 <_Chain_Get>
200c9a4: c0 20 60 10 clr [ %g1 + 0x10 ]
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
200c9a8: 92 92 20 00 orcc %o0, 0, %o1
200c9ac: 32 bf ff d8 bne,a 200c90c <rtems_bdbuf_swapout_write+0x84>
200c9b0: c2 07 60 08 ld [ %i5 + 8 ], %g1
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
}
}
if (dd != &null_disk)
200c9b4: 80 a7 40 13 cmp %i5, %l3
200c9b8: 02 80 00 1d be 200ca2c <rtems_bdbuf_swapout_write+0x1a4> <== NEVER TAKEN
200c9bc: 01 00 00 00 nop
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
200c9c0: c2 0e 20 18 ldub [ %i0 + 0x18 ], %g1
200c9c4: 80 a0 60 00 cmp %g1, 0
200c9c8: 02 80 00 07 be 200c9e4 <rtems_bdbuf_swapout_write+0x15c>
200c9cc: 01 00 00 00 nop
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
200c9d0: d0 07 60 08 ld [ %i5 + 8 ], %o0
200c9d4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
200c9d8: 80 88 60 02 btst 2, %g1
200c9dc: 32 80 00 16 bne,a 200ca34 <rtems_bdbuf_swapout_write+0x1ac><== NEVER TAKEN
200c9e0: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
200c9e4: 7f ff d9 02 call 2002dec <rtems_disk_release>
200c9e8: 91 e8 00 1d restore %g0, %i5, %o0
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
200c9ec: f8 02 60 20 ld [ %o1 + 0x20 ], %i4
200c9f0: 10 bf ff d0 b 200c930 <rtems_bdbuf_swapout_write+0xa8>
200c9f4: c2 02 a0 10 ld [ %o2 + 0x10 ], %g1
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
200c9f8: 02 bf ff bf be 200c8f4 <rtems_bdbuf_swapout_write+0x6c> <== ALWAYS TAKEN
200c9fc: 92 10 00 10 mov %l0, %o1
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
200ca00: 10 bf ff e3 b 200c98c <rtems_bdbuf_swapout_write+0x104> <== NOT EXECUTED
200ca04: 96 10 20 00 clr %o3 <== NOT EXECUTED
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
200ca08: 86 07 00 12 add %i4, %l2, %g3 <== NOT EXECUTED
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
200ca0c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
200ca10: 22 bf ff c8 be,a 200c930 <rtems_bdbuf_swapout_write+0xa8><== NOT EXECUTED
200ca14: b8 10 00 02 mov %g2, %i4 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200ca18: 40 00 10 fe call 2010e10 <_Chain_Insert> <== NOT EXECUTED
200ca1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200ca20: d4 06 20 1c ld [ %i0 + 0x1c ], %o2 <== NOT EXECUTED
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
200ca24: 10 bf ff cf b 200c960 <rtems_bdbuf_swapout_write+0xd8> <== NOT EXECUTED
200ca28: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED
200ca2c: 81 c7 e0 08 ret <== NOT EXECUTED
200ca30: 81 e8 00 00 restore <== NOT EXECUTED
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
200ca34: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200ca38: 9f c0 40 00 call %g1 <== NOT EXECUTED
200ca3c: 94 10 20 00 clr %o2 <== NOT EXECUTED
/* How should the error be handled ? */
}
rtems_disk_release (dd);
200ca40: 7f ff d8 eb call 2002dec <rtems_disk_release> <== NOT EXECUTED
200ca44: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
200ca48: 10 bf ff 9d b 200c8bc <rtems_bdbuf_swapout_write+0x34>
200ca4c: ba 10 00 13 mov %l3, %i5
0200bd94 <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
200bd94: 9d e3 bf a0 save %sp, -96, %sp
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
200bd98: 03 00 80 64 sethi %hi(0x2019000), %g1
200bd9c: d0 00 60 7c ld [ %g1 + 0x7c ], %o0 ! 201907c <rtems_bdbuf_configuration+0x4>
200bda0: 91 2a 20 04 sll %o0, 4, %o0
* @note chrisj The rtems_blkdev_request and the array at the end is a hack.
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
200bda4: 7f ff e0 0d call 2003dd8 <malloc>
200bda8: 90 02 20 18 add %o0, 0x18, %o0
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
200bdac: ba 92 20 00 orcc %o0, 0, %i5
200bdb0: 02 80 00 0c be 200bde0 <rtems_bdbuf_swapout_writereq_alloc+0x4c><== NEVER TAKEN
200bdb4: 82 10 20 01 mov 1, %g1
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
200bdb8: c2 27 40 00 st %g1, [ %i5 ]
write_req->req_done = rtems_bdbuf_transfer_done;
200bdbc: 03 00 80 2e sethi %hi(0x200b800), %g1
200bdc0: 82 10 63 e8 or %g1, 0x3e8, %g1 ! 200bbe8 <rtems_bdbuf_transfer_done>
write_req->done_arg = write_req;
200bdc4: fa 27 60 08 st %i5, [ %i5 + 8 ]
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->req_done = rtems_bdbuf_transfer_done;
200bdc8: c2 27 60 04 st %g1, [ %i5 + 4 ]
write_req->done_arg = write_req;
write_req->io_task = rtems_task_self ();
200bdcc: 40 00 13 3c call 2010abc <rtems_task_self>
200bdd0: b0 10 00 1d mov %i5, %i0
200bdd4: d0 27 60 14 st %o0, [ %i5 + 0x14 ]
return write_req;
}
200bdd8: 81 c7 e0 08 ret
200bddc: 81 e8 00 00 restore
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
200bde0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200bde4: 7f ff ef bd call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bde8: 90 12 20 15 or %o0, 0x15, %o0 ! 42000015 <RAM_END+0x3fc00015><== NOT EXECUTED
0200de04 <rtems_bdbuf_sync>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
200de04: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200de08: 3b 00 80 6a sethi %hi(0x201a800), %i5
200de0c: ba 17 62 e8 or %i5, 0x2e8, %i5 ! 201aae8 <bdbuf_cache>
200de10: c2 0f 60 88 ldub [ %i5 + 0x88 ], %g1
200de14: 80 a0 60 00 cmp %g1, 0
200de18: 02 80 00 19 be 200de7c <rtems_bdbuf_sync+0x78> <== NEVER TAKEN
200de1c: 84 10 20 16 mov 0x16, %g2
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200de20: 80 a6 20 00 cmp %i0, 0
200de24: 02 80 00 18 be 200de84 <rtems_bdbuf_sync+0x80> <== NEVER TAKEN
200de28: 84 10 20 09 mov 9, %g2
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
200de2c: 7f ff f6 ac call 200b8dc <rtems_bdbuf_lock_cache>
200de30: 01 00 00 00 nop
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200de34: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200de38: 80 a0 60 03 cmp %g1, 3
200de3c: 0a 80 00 07 bcs 200de58 <rtems_bdbuf_sync+0x54> <== NEVER TAKEN
200de40: 80 a0 60 05 cmp %g1, 5
200de44: 28 80 00 12 bleu,a 200de8c <rtems_bdbuf_sync+0x88>
200de48: 82 10 20 08 mov 8, %g1
200de4c: 80 a0 60 06 cmp %g1, 6
200de50: 02 80 00 06 be 200de68 <rtems_bdbuf_sync+0x64> <== ALWAYS TAKEN
200de54: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
200de58: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200de5c: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200de60: 7f ff f6 bb call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200de64: 92 12 60 03 or %o1, 3, %o1 ! 42000003 <RAM_END+0x3fc00003><== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_sync_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
200de68: 7f ff f9 79 call 200c44c <rtems_bdbuf_discard_buffer_after_access>
200de6c: 90 10 00 18 mov %i0, %o0
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
200de70: 7f ff f7 2e call 200bb28 <rtems_bdbuf_unlock_cache>
200de74: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
200de78: 84 10 20 00 clr %g2 ! 0 <PROM_START>
}
200de7c: 81 c7 e0 08 ret
200de80: 91 e8 00 02 restore %g0, %g2, %o0
200de84: 81 c7 e0 08 ret <== NOT EXECUTED
200de88: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
200de8c: 90 07 60 5c add %i5, 0x5c, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200de90: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200de94: 7f ff e9 03 call 20082a0 <_Chain_Append>
200de98: 92 10 00 18 mov %i0, %o1
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
200de9c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200dea0: 80 a0 60 00 cmp %g1, 0
200dea4: 12 80 00 28 bne 200df44 <rtems_bdbuf_sync+0x140>
200dea8: 01 00 00 00 nop
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
rtems_bdbuf_wake_swapper ();
200deac: 7f ff f7 42 call 200bbb4 <rtems_bdbuf_wake_swapper>
200deb0: 3b 00 80 6a sethi %hi(0x201a800), %i5
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
200deb4: ba 17 63 58 or %i5, 0x358, %i5 ! 201ab58 <bdbuf_cache+0x70>
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200deb8: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200debc: 80 a0 60 01 cmp %g1, 1
200dec0: 1a 80 00 06 bcc 200ded8 <rtems_bdbuf_sync+0xd4> <== ALWAYS TAKEN
200dec4: 80 a0 60 07 cmp %g1, 7
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
200dec8: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200decc: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ded0: 7f ff f6 9f call 200b94c <rtems_bdbuf_fatal> <== NOT EXECUTED
200ded4: 92 12 60 07 or %o1, 7, %o1 ! 42000007 <RAM_END+0x3fc00007><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200ded8: 08 80 00 07 bleu 200def4 <rtems_bdbuf_sync+0xf0>
200dedc: 80 a0 60 0a cmp %g1, 0xa
200dee0: 18 bf ff fa bgu 200dec8 <rtems_bdbuf_sync+0xc4> <== NEVER TAKEN
200dee4: 90 10 00 18 mov %i0, %o0
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);
200dee8: 7f ff f7 98 call 200bd48 <rtems_bdbuf_wait>
200deec: 92 10 00 1d mov %i5, %o1
200def0: 30 bf ff f2 b,a 200deb8 <rtems_bdbuf_sync+0xb4>
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
200def4: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200def8: 80 a0 60 00 cmp %g1, 0
200defc: 12 bf ff dd bne 200de70 <rtems_bdbuf_sync+0x6c>
200df00: 01 00 00 00 nop
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
200df04: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200df08: 80 a0 60 02 cmp %g1, 2
200df0c: 02 80 00 06 be 200df24 <rtems_bdbuf_sync+0x120>
200df10: 01 00 00 00 nop
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
200df14: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200df18: 80 a0 60 01 cmp %g1, 1
200df1c: 12 bf ff d5 bne 200de70 <rtems_bdbuf_sync+0x6c> <== NEVER TAKEN
200df20: 01 00 00 00 nop
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
200df24: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200df28: 80 a0 60 01 cmp %g1, 1
200df2c: 02 80 00 09 be 200df50 <rtems_bdbuf_sync+0x14c>
200df30: 01 00 00 00 nop
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200df34: 11 00 80 6a sethi %hi(0x201a800), %o0
200df38: 7f ff f7 ae call 200bdf0 <rtems_bdbuf_wake>
200df3c: 90 12 23 60 or %o0, 0x360, %o0 ! 201ab60 <bdbuf_cache+0x78>
200df40: 30 bf ff cc b,a 200de70 <rtems_bdbuf_sync+0x6c>
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200df44: 7f ff f7 ab call 200bdf0 <rtems_bdbuf_wake>
200df48: 90 07 60 68 add %i5, 0x68, %o0
200df4c: 30 bf ff d8 b,a 200deac <rtems_bdbuf_sync+0xa8>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
200df50: 7f ff f8 33 call 200c01c <rtems_bdbuf_remove_from_tree>
200df54: 90 10 00 18 mov %i0, %o0
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200df58: 92 10 00 18 mov %i0, %o1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200df5c: c0 26 20 28 clr [ %i0 + 0x28 ]
200df60: 11 00 80 6a sethi %hi(0x201a800), %o0
200df64: 40 00 0b ab call 2010e10 <_Chain_Insert>
200df68: 90 12 23 2c or %o0, 0x32c, %o0 ! 201ab2c <bdbuf_cache+0x44>
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200df6c: 10 bf ff f3 b 200df38 <rtems_bdbuf_sync+0x134>
200df70: 11 00 80 6a sethi %hi(0x201a800), %o0
0200df74 <rtems_bdbuf_syncdev>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
200df74: 9d e3 bf 98 save %sp, -104, %sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200df78: 37 00 80 6a sethi %hi(0x201a800), %i3
200df7c: b6 16 e2 e8 or %i3, 0x2e8, %i3 ! 201aae8 <bdbuf_cache>
200df80: c2 0e e0 88 ldub [ %i3 + 0x88 ], %g1
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
200df84: c0 27 bf fc clr [ %fp + -4 ]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
200df88: b8 10 00 18 mov %i0, %i4
200df8c: ba 10 00 19 mov %i1, %i5
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200df90: 80 a0 60 00 cmp %g1, 0
200df94: 02 80 00 20 be 200e014 <rtems_bdbuf_syncdev+0xa0> <== NEVER TAKEN
200df98: b0 10 20 16 mov 0x16, %i0
200df9c: 90 10 00 1c mov %i4, %o0
200dfa0: 92 10 00 19 mov %i1, %o1
200dfa4: 94 10 20 00 clr %o2
200dfa8: 96 07 bf fc add %fp, -4, %o3
200dfac: 98 10 20 00 clr %o4
200dfb0: 7f ff f7 df call 200bf2c <rtems_bdbuf_obtain_disk.part.8>
200dfb4: 9a 10 20 00 clr %o5
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dev);
sc = rtems_bdbuf_obtain_disk (dev, 0, &dd, NULL, NULL);
if (sc != RTEMS_SUCCESSFUL)
200dfb8: b0 92 20 00 orcc %o0, 0, %i0
200dfbc: 12 80 00 16 bne 200e014 <rtems_bdbuf_syncdev+0xa0> <== NEVER TAKEN
200dfc0: 01 00 00 00 nop
* Take the sync lock before locking the cache. Once we have the sync lock we
* can lock the cache. If another thread has the sync lock it will cause this
* thread to block until it owns the sync lock then it can own the cache. The
* sync lock can only be obtained with the cache unlocked.
*/
rtems_bdbuf_lock_sync ();
200dfc4: 7f ff f6 54 call 200b914 <rtems_bdbuf_lock_sync>
200dfc8: 01 00 00 00 nop
rtems_bdbuf_lock_cache ();
200dfcc: 7f ff f6 44 call 200b8dc <rtems_bdbuf_lock_cache>
200dfd0: 01 00 00 00 nop
* out task know the id of the requester to wake when done.
*
* The swap out task will negate the sync active flag when no more buffers
* for the device are held on the "modified for sync" queues.
*/
bdbuf_cache.sync_active = true;
200dfd4: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
200dfd8: c2 2e e0 30 stb %g1, [ %i3 + 0x30 ]
bdbuf_cache.sync_requester = rtems_task_self ();
200dfdc: 40 00 0a b8 call 2010abc <rtems_task_self>
200dfe0: 01 00 00 00 nop
200dfe4: d0 26 e0 34 st %o0, [ %i3 + 0x34 ]
bdbuf_cache.sync_device = dev;
200dfe8: f8 3e e0 38 std %i4, [ %i3 + 0x38 ]
rtems_bdbuf_wake_swapper ();
200dfec: 7f ff f6 f2 call 200bbb4 <rtems_bdbuf_wake_swapper>
200dff0: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
200dff4: 7f ff f6 cd call 200bb28 <rtems_bdbuf_unlock_cache>
200dff8: 01 00 00 00 nop
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
200dffc: 7f ff f7 02 call 200bc04 <rtems_bdbuf_wait_for_event>
200e000: 90 10 20 02 mov 2, %o0 ! 2 <PROM_START+0x2>
rtems_bdbuf_unlock_sync ();
200e004: 7f ff f6 d5 call 200bb58 <rtems_bdbuf_unlock_sync>
200e008: 01 00 00 00 nop
rtems_bdbuf_release_disk (dd);
200e00c: 7f ff f6 df call 200bb88 <rtems_bdbuf_release_disk>
200e010: d0 07 bf fc ld [ %fp + -4 ], %o0
return RTEMS_SUCCESSFUL;
}
200e014: 81 c7 e0 08 ret
200e018: 81 e8 00 00 restore
0200bb28 <rtems_bdbuf_unlock_cache>:
/**
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
200bb28: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_unlock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_UNLOCK);
200bb2c: 03 00 80 6a sethi %hi(0x201a800), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200bb30: 7f ff ef 1a call 2007798 <rtems_semaphore_release>
200bb34: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 201ab10 <bdbuf_cache+0x28>
if (sc != RTEMS_SUCCESSFUL)
200bb38: 80 a2 20 00 cmp %o0, 0
200bb3c: 12 80 00 04 bne 200bb4c <rtems_bdbuf_unlock_cache+0x24> <== NEVER TAKEN
200bb40: 11 10 80 00 sethi %hi(0x42000000), %o0
200bb44: 81 c7 e0 08 ret
200bb48: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200bb4c: 7f ff f0 63 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bb50: 90 12 20 0e or %o0, 0xe, %o0 <== NOT EXECUTED
0200bb58 <rtems_bdbuf_unlock_sync>:
/**
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
200bb58: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_unlock (bdbuf_cache.sync_lock,
200bb5c: 03 00 80 6a sethi %hi(0x201a800), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200bb60: 7f ff ef 0e call 2007798 <rtems_semaphore_release>
200bb64: d0 00 63 14 ld [ %g1 + 0x314 ], %o0 ! 201ab14 <bdbuf_cache+0x2c>
if (sc != RTEMS_SUCCESSFUL)
200bb68: 80 a2 20 00 cmp %o0, 0
200bb6c: 12 80 00 04 bne 200bb7c <rtems_bdbuf_unlock_sync+0x24> <== NEVER TAKEN
200bb70: 11 10 80 00 sethi %hi(0x42000000), %o0
200bb74: 81 c7 e0 08 ret
200bb78: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200bb7c: 7f ff f0 57 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bb80: 90 12 20 0c or %o0, 0xc, %o0 <== NOT EXECUTED
0200bc04 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
200bc04: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
200bc08: 92 10 20 00 clr %o1
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
200bc0c: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_event_receive (event,
200bc10: 90 10 00 18 mov %i0, %o0
200bc14: 94 10 20 00 clr %o2
200bc18: 7f ff ec f4 call 2006fe8 <rtems_event_receive>
200bc1c: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
200bc20: 80 a2 20 00 cmp %o0, 0
200bc24: 12 80 00 07 bne 200bc40 <rtems_bdbuf_wait_for_event+0x3c> <== NEVER TAKEN
200bc28: c2 07 bf fc ld [ %fp + -4 ], %g1
200bc2c: 80 a0 40 18 cmp %g1, %i0
200bc30: 12 80 00 05 bne 200bc44 <rtems_bdbuf_wait_for_event+0x40> <== NEVER TAKEN
200bc34: 11 10 80 00 sethi %hi(0x42000000), %o0
200bc38: 81 c7 e0 08 ret
200bc3c: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
200bc40: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200bc44: 7f ff f0 25 call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bc48: 90 12 20 1a or %o0, 0x1a, %o0 ! 4200001a <RAM_END+0x3fc0001a><== NOT EXECUTED
0200bdf0 <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)
{
200bdf0: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200bdf4: c2 06 00 00 ld [ %i0 ], %g1
200bdf8: 80 a0 60 00 cmp %g1, 0
200bdfc: 12 80 00 04 bne 200be0c <rtems_bdbuf_wake+0x1c>
200be00: 01 00 00 00 nop
200be04: 81 c7 e0 08 ret
200be08: 81 e8 00 00 restore
{
sc = rtems_semaphore_flush (waiters->sema);
200be0c: 40 00 12 93 call 2010858 <rtems_semaphore_flush>
200be10: d0 06 20 04 ld [ %i0 + 4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200be14: 80 a2 20 00 cmp %o0, 0
200be18: 02 bf ff fb be 200be04 <rtems_bdbuf_wake+0x14> <== ALWAYS TAKEN
200be1c: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200be20: 7f ff ef ae call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200be24: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
0200bbb4 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
200bbb4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200bbb8: 03 00 80 6a sethi %hi(0x201a800), %g1
200bbbc: d0 00 62 e8 ld [ %g1 + 0x2e8 ], %o0 ! 201aae8 <bdbuf_cache>
200bbc0: 7f ff ed 6d call 2007174 <rtems_event_send>
200bbc4: 92 10 20 04 mov 4, %o1
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200bbc8: 80 a2 20 00 cmp %o0, 0
200bbcc: 12 80 00 04 bne 200bbdc <rtems_bdbuf_wake_swapper+0x28> <== NEVER TAKEN
200bbd0: 11 10 80 00 sethi %hi(0x42000000), %o0
200bbd4: 81 c7 e0 08 ret
200bbd8: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200bbdc: 7f ff f0 3f call 2007cd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200bbe0: 90 12 20 14 or %o0, 0x14, %o0 <== NOT EXECUTED
0200e294 <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)
{
200e294: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200e298: c2 06 80 00 ld [ %i2 ], %g1
int rc;
switch (args->command)
200e29c: d2 06 a0 04 ld [ %i2 + 4 ], %o1
200e2a0: 05 10 01 10 sethi %hi(0x40044000), %g2
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;
200e2a4: c6 00 60 38 ld [ %g1 + 0x38 ], %g3
int rc;
switch (args->command)
200e2a8: 82 10 a2 03 or %g2, 0x203, %g1
200e2ac: 80 a2 40 01 cmp %o1, %g1
200e2b0: 22 80 00 3c be,a 200e3a0 <rtems_blkdev_generic_ioctl+0x10c><== NEVER TAKEN
200e2b4: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 <== NOT EXECUTED
200e2b8: 08 80 00 16 bleu 200e310 <rtems_blkdev_generic_ioctl+0x7c><== NEVER TAKEN
200e2bc: 03 08 00 10 sethi %hi(0x20004000), %g1
200e2c0: 03 20 01 10 sethi %hi(0x80044000), %g1
200e2c4: 82 10 62 04 or %g1, 0x204, %g1 ! 80044204 <RAM_END+0x7dc44204>
200e2c8: 80 a2 40 01 cmp %o1, %g1
200e2cc: 02 80 00 22 be 200e354 <rtems_blkdev_generic_ioctl+0xc0> <== ALWAYS TAKEN
200e2d0: 03 30 06 10 sethi %hi(0xc0184000), %g1
200e2d4: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201><== NOT EXECUTED
200e2d8: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
200e2dc: 02 80 00 1a be 200e344 <rtems_blkdev_generic_ioctl+0xb0> <== NOT EXECUTED
200e2e0: 84 10 a2 05 or %g2, 0x205, %g2 <== NOT EXECUTED
200e2e4: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED
200e2e8: 22 80 00 21 be,a 200e36c <rtems_blkdev_generic_ioctl+0xd8><== NOT EXECUTED
200e2ec: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 <== NOT EXECUTED
*/
args->ioctl_return = (uint32_t) -1;
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
200e2f0: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 <== NOT EXECUTED
200e2f4: d0 00 e0 08 ld [ %g3 + 8 ], %o0 <== NOT EXECUTED
200e2f8: d4 06 a0 08 ld [ %i2 + 8 ], %o2 <== NOT EXECUTED
200e2fc: 9f c0 40 00 call %g1 <== NOT EXECUTED
200e300: b0 10 20 00 clr %i0 <== NOT EXECUTED
200e304: d0 26 a0 0c st %o0, [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e308: 81 c7 e0 08 ret <== NOT EXECUTED
200e30c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
200e310: 82 10 62 06 or %g1, 0x206, %g1 <== NOT EXECUTED
200e314: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
200e318: 02 80 00 1a be 200e380 <rtems_blkdev_generic_ioctl+0xec> <== NOT EXECUTED
200e31c: 84 10 a2 02 or %g2, 0x202, %g2 <== NOT EXECUTED
200e320: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED
200e324: 32 bf ff f4 bne,a 200e2f4 <rtems_blkdev_generic_ioctl+0x60><== NOT EXECUTED
200e328: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 <== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
200e32c: c4 00 e0 24 ld [ %g3 + 0x24 ], %g2 <== NOT EXECUTED
200e330: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
200e334: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
args->ioctl_return = 0;
200e338: c0 26 a0 0c clr [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e33c: 81 c7 e0 08 ret <== NOT EXECUTED
200e340: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
case RTEMS_BLKIO_REQUEST:
/*
* It is not allowed to directly access the driver circumventing
* the cache.
*/
args->ioctl_return = (uint32_t) -1;
200e344: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
200e348: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e34c: 81 c7 e0 08 ret <== NOT EXECUTED
200e350: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
200e354: c2 06 a0 08 ld [ %i2 + 8 ], %g1
200e358: c2 00 40 00 ld [ %g1 ], %g1
200e35c: c2 20 e0 20 st %g1, [ %g3 + 0x20 ]
args->ioctl_return = 0;
200e360: c0 26 a0 0c clr [ %i2 + 0xc ]
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e364: 81 c7 e0 08 ret
200e368: 91 e8 20 00 restore %g0, 0, %o0
dd->block_size = *((uint32_t *) args->buffer);
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
200e36c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
200e370: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
args->ioctl_return = 0;
200e374: c0 26 a0 0c clr [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e378: 81 c7 e0 08 ret <== NOT EXECUTED
200e37c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
200e380: d0 18 c0 00 ldd [ %g3 ], %o0 <== NOT EXECUTED
200e384: 7f ff fe fc call 200df74 <rtems_bdbuf_syncdev> <== NOT EXECUTED
200e388: b0 10 20 00 clr %i0 <== NOT EXECUTED
args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1);
200e38c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
200e390: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED
200e394: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e398: 81 c7 e0 08 ret <== NOT EXECUTED
200e39c: 81 e8 00 00 restore <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->media_block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
200e3a0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
200e3a4: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
args->ioctl_return = 0;
200e3a8: c0 26 a0 0c clr [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200e3ac: 81 c7 e0 08 ret <== NOT EXECUTED
200e3b0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200e054 <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)
{
200e054: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200e058: c2 06 80 00 ld [ %i2 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
200e05c: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3
void * arg)
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200e060: c2 00 60 38 ld [ %g1 + 0x38 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
200e064: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
200e068: e6 00 60 20 ld [ %g1 + 0x20 ], %l3
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);
dev_t dev = dd->dev;
200e06c: f8 18 40 00 ldd [ %g1 ], %i4
args->bytes_moved = 0;
200e070: c0 26 a0 1c clr [ %i2 + 0x1c ]
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200e074: e0 1e a0 08 ldd [ %i2 + 8 ], %l0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200e078: 80 a6 e0 00 cmp %i3, 0
200e07c: 02 80 00 2e be 200e134 <rtems_blkdev_generic_read+0xe0> <== NEVER TAKEN
200e080: b0 10 20 00 clr %i0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200e084: 94 10 20 00 clr %o2
200e088: 96 10 00 13 mov %l3, %o3
200e08c: 90 10 00 10 mov %l0, %o0
200e090: 40 00 25 2c call 2017540 <__divdi3>
200e094: 92 10 00 11 mov %l1, %o1
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200e098: 90 10 00 10 mov %l0, %o0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200e09c: a4 10 00 09 mov %o1, %l2
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200e0a0: 94 10 20 00 clr %o2
200e0a4: 92 10 00 11 mov %l1, %o1
200e0a8: 40 00 26 0c call 20178d8 <__moddi3>
200e0ac: 96 10 00 13 mov %l3, %o3
200e0b0: 10 80 00 18 b 200e110 <rtems_blkdev_generic_read+0xbc>
200e0b4: a0 10 00 09 mov %o1, %l0
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
200e0b8: a2 24 c0 10 sub %l3, %l0, %l1
200e0bc: 80 a4 40 1b cmp %l1, %i3
200e0c0: 08 80 00 03 bleu 200e0cc <rtems_blkdev_generic_read+0x78> <== ALWAYS TAKEN
200e0c4: c2 07 bf fc ld [ %fp + -4 ], %g1
200e0c8: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
200e0cc: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
200e0d0: 94 10 00 11 mov %l1, %o2
200e0d4: 40 00 18 56 call 201422c <memcpy>
200e0d8: 92 02 40 10 add %o1, %l0, %o1
rc = rtems_bdbuf_release(diskbuf);
200e0dc: d0 07 bf fc ld [ %fp + -4 ], %o0
200e0e0: 7f ff fe ec call 200dc90 <rtems_bdbuf_release>
200e0e4: b2 06 40 11 add %i1, %l1, %i1
args->bytes_moved += copy;
200e0e8: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
200e0ec: b0 10 00 08 mov %o0, %i0
args->bytes_moved += copy;
200e0f0: 82 00 40 11 add %g1, %l1, %g1
if (rc != RTEMS_SUCCESSFUL)
200e0f4: 80 a2 20 00 cmp %o0, 0
200e0f8: 12 80 00 0f bne 200e134 <rtems_blkdev_generic_read+0xe0> <== NEVER TAKEN
200e0fc: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200e100: b6 a6 c0 11 subcc %i3, %l1, %i3
200e104: 02 80 00 0c be 200e134 <rtems_blkdev_generic_read+0xe0> <== ALWAYS TAKEN
200e108: a4 04 a0 01 inc %l2
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
200e10c: a0 10 20 00 clr %l0 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
200e110: 94 10 00 12 mov %l2, %o2
200e114: 96 07 bf fc add %fp, -4, %o3
200e118: 90 10 00 1c mov %i4, %o0
200e11c: 7f ff fe 25 call 200d9b0 <rtems_bdbuf_read>
200e120: 92 10 00 1d mov %i5, %o1
200e124: b0 10 00 08 mov %o0, %i0
if (rc != RTEMS_SUCCESSFUL)
200e128: 80 a6 20 00 cmp %i0, 0
200e12c: 02 bf ff e3 be 200e0b8 <rtems_blkdev_generic_read+0x64> <== ALWAYS TAKEN
200e130: 90 10 00 19 mov %i1, %o0
blkofs = 0;
block++;
}
return rc;
}
200e134: 81 c7 e0 08 ret
200e138: 81 e8 00 00 restore
0200e13c <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)
{
200e13c: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200e140: c2 06 80 00 ld [ %i2 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
200e144: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3
void * arg)
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200e148: c2 00 60 38 ld [ %g1 + 0x38 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
200e14c: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
200e150: e6 00 60 20 ld [ %g1 + 0x20 ], %l3
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);
dev_t dev = dd->dev;
200e154: f8 18 40 00 ldd [ %g1 ], %i4
args->bytes_moved = 0;
200e158: c0 26 a0 1c clr [ %i2 + 0x1c ]
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200e15c: e0 1e a0 08 ldd [ %i2 + 8 ], %l0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200e160: 80 a6 e0 00 cmp %i3, 0
200e164: 02 80 00 38 be 200e244 <rtems_blkdev_generic_write+0x108> <== NEVER TAKEN
200e168: 90 10 20 00 clr %o0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200e16c: 94 10 20 00 clr %o2
200e170: 96 10 00 13 mov %l3, %o3
200e174: 90 10 00 10 mov %l0, %o0
200e178: 40 00 24 f2 call 2017540 <__divdi3>
200e17c: 92 10 00 11 mov %l1, %o1
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200e180: 90 10 00 10 mov %l0, %o0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200e184: a4 10 00 09 mov %o1, %l2
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200e188: 94 10 20 00 clr %o2
200e18c: 92 10 00 11 mov %l1, %o1
200e190: 40 00 25 d2 call 20178d8 <__moddi3>
200e194: 96 10 00 13 mov %l3, %o3
200e198: 10 80 00 20 b 200e218 <rtems_blkdev_generic_write+0xdc>
200e19c: a0 10 00 09 mov %o1, %l0
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
200e1a0: 12 80 00 22 bne 200e228 <rtems_blkdev_generic_write+0xec> <== NEVER TAKEN
200e1a4: 92 10 00 1d mov %i5, %o1
rc = rtems_bdbuf_get(dev, block, &diskbuf);
200e1a8: 90 10 00 1c mov %i4, %o0
200e1ac: 94 10 00 12 mov %l2, %o2
200e1b0: 7f ff fd cb call 200d8dc <rtems_bdbuf_get>
200e1b4: 96 07 bf fc add %fp, -4, %o3
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
200e1b8: 80 a2 20 00 cmp %o0, 0
200e1bc: 12 80 00 22 bne 200e244 <rtems_blkdev_generic_write+0x108><== NEVER TAKEN
200e1c0: 92 10 00 19 mov %i1, %o1
break;
copy = block_size - blkofs;
200e1c4: a2 24 c0 10 sub %l3, %l0, %l1
200e1c8: 80 a4 40 1b cmp %l1, %i3
200e1cc: 08 80 00 03 bleu 200e1d8 <rtems_blkdev_generic_write+0x9c><== ALWAYS TAKEN
200e1d0: c2 07 bf fc ld [ %fp + -4 ], %g1
200e1d4: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
200e1d8: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
200e1dc: 94 10 00 11 mov %l1, %o2
200e1e0: 40 00 18 13 call 201422c <memcpy>
200e1e4: 90 02 00 10 add %o0, %l0, %o0
args->bytes_moved += copy;
200e1e8: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
rc = rtems_bdbuf_release_modified(diskbuf);
200e1ec: d0 07 bf fc ld [ %fp + -4 ], %o0
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
200e1f0: 82 00 40 11 add %g1, %l1, %g1
rc = rtems_bdbuf_release_modified(diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
200e1f4: b2 06 40 11 add %i1, %l1, %i1
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
rc = rtems_bdbuf_release_modified(diskbuf);
200e1f8: 7f ff fe e0 call 200dd78 <rtems_bdbuf_release_modified>
200e1fc: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
if (rc != RTEMS_SUCCESSFUL)
200e200: 80 a2 20 00 cmp %o0, 0
200e204: 12 80 00 10 bne 200e244 <rtems_blkdev_generic_write+0x108><== NEVER TAKEN
200e208: b6 a6 c0 11 subcc %i3, %l1, %i3
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200e20c: 02 80 00 0e be 200e244 <rtems_blkdev_generic_write+0x108> <== ALWAYS TAKEN
200e210: a4 04 a0 01 inc %l2
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
200e214: a0 10 20 00 clr %l0 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
200e218: 80 a6 c0 13 cmp %i3, %l3
200e21c: 1a bf ff e1 bcc 200e1a0 <rtems_blkdev_generic_write+0x64> <== ALWAYS TAKEN
200e220: 80 a4 20 00 cmp %l0, 0
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
200e224: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200e228: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
200e22c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
200e230: 7f ff fd e0 call 200d9b0 <rtems_bdbuf_read> <== NOT EXECUTED
200e234: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
200e238: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e23c: 02 bf ff e2 be 200e1c4 <rtems_blkdev_generic_write+0x88> <== NOT EXECUTED
200e240: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
200e244: 81 c7 e0 08 ret
200e248: 91 e8 00 08 restore %g0, %o0, %o0
0200e3b4 <rtems_blkdev_ioctl>:
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200e3b4: 9d e3 bf a0 save %sp, -96, %sp
size_t *arg_size = argp;
int rc = 0;
switch (req)
200e3b8: 03 10 01 10 sethi %hi(0x40044000), %g1
200e3bc: 84 10 62 03 or %g1, 0x203, %g2 ! 40044203 <RAM_END+0x3dc44203>
200e3c0: 80 a6 40 02 cmp %i1, %g2
200e3c4: 22 80 00 1f be,a 200e440 <rtems_blkdev_ioctl+0x8c> <== NEVER TAKEN
200e3c8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED
200e3cc: 38 80 00 0d bgu,a 200e400 <rtems_blkdev_ioctl+0x4c>
200e3d0: 82 10 62 05 or %g1, 0x205, %g1
200e3d4: 82 10 62 02 or %g1, 0x202, %g1
200e3d8: 80 a6 40 01 cmp %i1, %g1
200e3dc: 22 80 00 1d be,a 200e450 <rtems_blkdev_ioctl+0x9c> <== NEVER TAKEN
200e3e0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
200e3e4: 40 00 15 50 call 2013924 <__errno>
200e3e8: 01 00 00 00 nop
rc = -1;
200e3ec: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
200e3f0: 84 10 20 16 mov 0x16, %g2
200e3f4: c4 22 00 00 st %g2, [ %o0 ]
rc = -1;
break;
}
return rc;
}
200e3f8: 81 c7 e0 08 ret
200e3fc: 91 e8 00 01 restore %g0, %g1, %o0
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
200e400: 80 a6 40 01 cmp %i1, %g1
200e404: 02 80 00 0a be 200e42c <rtems_blkdev_ioctl+0x78> <== NEVER TAKEN
200e408: 03 20 01 10 sethi %hi(0x80044000), %g1
200e40c: 82 10 62 04 or %g1, 0x204, %g1 ! 80044204 <RAM_END+0x7dc44204>
200e410: 80 a6 40 01 cmp %i1, %g1
200e414: 12 bf ff f4 bne 200e3e4 <rtems_blkdev_ioctl+0x30> <== NEVER TAKEN
200e418: 82 10 20 00 clr %g1
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
200e41c: c4 06 80 00 ld [ %i2 ], %g2
200e420: c4 26 20 20 st %g2, [ %i0 + 0x20 ]
rc = -1;
break;
}
return rc;
}
200e424: 81 c7 e0 08 ret
200e428: 91 e8 00 01 restore %g0, %g1, %o0
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
200e42c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200e430: 82 10 20 00 clr %g1 <== NOT EXECUTED
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
200e434: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
200e438: 81 c7 e0 08 ret <== NOT EXECUTED
200e43c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200e440: 82 10 20 00 clr %g1 <== NOT EXECUTED
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
200e444: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
200e448: 81 c7 e0 08 ret <== NOT EXECUTED
200e44c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200e450: 82 10 20 00 clr %g1 <== NOT EXECUTED
switch (req)
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
200e454: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
200e458: 81 c7 e0 08 ret <== NOT EXECUTED
200e45c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
020024f0 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
20024f0: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
if ( !name )
20024f4: 80 a6 20 00 cmp %i0, 0
20024f8: 02 80 00 35 be 20025cc <rtems_bsp_cmdline_get_param+0xdc>
20024fc: 80 a6 60 00 cmp %i1, 0
return NULL;
if ( !value )
2002500: 02 80 00 31 be 20025c4 <rtems_bsp_cmdline_get_param+0xd4>
2002504: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( !length )
2002508: 22 80 00 32 be,a 20025d0 <rtems_bsp_cmdline_get_param+0xe0>
200250c: b2 10 20 00 clr %i1
return NULL;
value[0] = '\0';
2002510: c0 2e 40 00 clrb [ %i1 ]
p = rtems_bsp_cmdline_get_param_raw( name );
2002514: 40 00 00 31 call 20025d8 <rtems_bsp_cmdline_get_param_raw>
2002518: 90 10 00 18 mov %i0, %o0
if ( !p )
200251c: 80 a2 20 00 cmp %o0, 0
2002520: 22 80 00 2c be,a 20025d0 <rtems_bsp_cmdline_get_param+0xe0>
2002524: b2 10 20 00 clr %i1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2002528: c6 0a 00 00 ldub [ %o0 ], %g3
200252c: 85 28 e0 18 sll %g3, 0x18, %g2
2002530: 80 a0 a0 00 cmp %g2, 0
2002534: 02 80 00 24 be 20025c4 <rtems_bsp_cmdline_get_param+0xd4> <== NEVER TAKEN
2002538: b4 86 bf ff addcc %i2, -1, %i2
200253c: 02 80 00 22 be 20025c4 <rtems_bsp_cmdline_get_param+0xd4> <== NEVER TAKEN
2002540: 88 10 20 00 clr %g4
2002544: 82 10 20 00 clr %g1
2002548: 10 80 00 12 b 2002590 <rtems_bsp_cmdline_get_param+0xa0>
200254c: b0 10 20 00 clr %i0
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
2002550: 32 80 00 06 bne,a 2002568 <rtems_bsp_cmdline_get_param+0x78>
2002554: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
2002558: 80 a0 a0 20 cmp %g2, 0x20
200255c: 02 80 00 1a be 20025c4 <rtems_bsp_cmdline_get_param+0xd4>
2002560: 01 00 00 00 nop
break;
value[i++] = *p++;
2002564: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
2002568: 82 00 60 01 inc %g1
value[i] = '\0';
200256c: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2002570: c6 0a 20 01 ldub [ %o0 + 1 ], %g3
2002574: 85 28 e0 18 sll %g3, 0x18, %g2
2002578: 80 a0 a0 00 cmp %g2, 0
200257c: 02 80 00 12 be 20025c4 <rtems_bsp_cmdline_get_param+0xd4>
2002580: 88 10 00 01 mov %g1, %g4
2002584: 80 a6 80 01 cmp %i2, %g1
2002588: 08 80 00 0f bleu 20025c4 <rtems_bsp_cmdline_get_param+0xd4>
200258c: 90 02 20 01 inc %o0
if ( *p == '\"' ) {
2002590: 85 38 a0 18 sra %g2, 0x18, %g2
2002594: 80 a0 a0 22 cmp %g2, 0x22
2002598: 12 bf ff ee bne 2002550 <rtems_bsp_cmdline_get_param+0x60>
200259c: 80 8e 20 01 btst 1, %i0
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
20025a0: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
20025a4: 82 00 60 01 inc %g1
value[i] = '\0';
20025a8: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20025ac: c6 0a 20 01 ldub [ %o0 + 1 ], %g3
if ( *p == '\"' ) {
quotes++;
20025b0: b0 06 20 01 inc %i0
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20025b4: 85 28 e0 18 sll %g3, 0x18, %g2
20025b8: 80 a0 a0 00 cmp %g2, 0
20025bc: 12 bf ff f2 bne 2002584 <rtems_bsp_cmdline_get_param+0x94><== ALWAYS TAKEN
20025c0: 88 10 00 01 mov %g1, %g4
return NULL;
copy_string( p, value, length );
return value;
}
20025c4: 81 c7 e0 08 ret
20025c8: 91 e8 00 19 restore %g0, %i1, %o0
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
20025cc: b2 10 20 00 clr %i1
copy_string( p, value, length );
return value;
}
20025d0: 81 c7 e0 08 ret
20025d4: 91 e8 00 19 restore %g0, %i1, %o0
02007184 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
2007184: 9d e3 bf 98 save %sp, -104, %sp
2007188: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200718c: 40 00 01 a0 call 200780c <_Chain_Get>
2007190: 90 10 00 1d mov %i5, %o0
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
2007194: 92 10 20 00 clr %o1
2007198: b8 10 00 08 mov %o0, %i4
200719c: 94 10 00 1a mov %i2, %o2
20071a0: 90 10 00 19 mov %i1, %o0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
20071a4: 80 a7 20 00 cmp %i4, 0
20071a8: 12 80 00 0a bne 20071d0 <rtems_chain_get_with_wait+0x4c>
20071ac: 96 07 bf fc add %fp, -4, %o3
) {
rtems_event_set out;
sc = rtems_event_receive(
20071b0: 7f ff fc f4 call 2006580 <rtems_event_receive>
20071b4: 01 00 00 00 nop
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
20071b8: 80 a2 20 00 cmp %o0, 0
20071bc: 02 bf ff f4 be 200718c <rtems_chain_get_with_wait+0x8> <== NEVER TAKEN
20071c0: b0 10 00 08 mov %o0, %i0
timeout,
&out
);
}
*node_ptr = node;
20071c4: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
20071c8: 81 c7 e0 08 ret
20071cc: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
20071d0: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
20071d4: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
20071d8: 81 c7 e0 08 ret
20071dc: 91 e8 00 08 restore %g0, %o0, %o0
0200306c <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200306c: 9d e3 bf 58 save %sp, -168, %sp
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2003070: 80 a6 60 00 cmp %i1, 0
2003074: 02 80 00 75 be 2003248 <rtems_cpu_usage_report_with_plugin+0x1dc><== NEVER TAKEN
2003078: 03 00 80 82 sethi %hi(0x2020800), %g1
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
200307c: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 2020bc0 <CPU_usage_Uptime_at_last_reset>
2003080: 86 10 63 c0 or %g1, 0x3c0, %g3
2003084: c2 00 e0 04 ld [ %g3 + 4 ], %g1
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &total );
2003088: c0 27 bf d0 clr [ %fp + -48 ]
200308c: c0 27 bf d4 clr [ %fp + -44 ]
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
2003090: c4 27 bf e0 st %g2, [ %fp + -32 ]
2003094: c2 27 bf e4 st %g1, [ %fp + -28 ]
}
}
}
#endif
(*print)(
2003098: 90 10 00 18 mov %i0, %o0
200309c: 13 00 80 75 sethi %hi(0x201d400), %o1
20030a0: 21 00 80 81 sethi %hi(0x2020400), %l0
20030a4: 92 12 63 48 or %o1, 0x348, %o1
20030a8: a0 14 21 4c or %l0, 0x14c, %l0
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
20030ac: 35 00 80 76 sethi %hi(0x201d800), %i2
}
}
}
#endif
(*print)(
20030b0: 9f c6 40 00 call %i1
20030b4: 37 00 80 76 sethi %hi(0x201d800), %i3
#endif
/*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
20030b8: a2 04 20 0c add %l0, 0xc, %l1
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
20030bc: b4 16 a0 c0 or %i2, 0xc0, %i2
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
20030c0: b6 16 e0 d8 or %i3, 0xd8, %i3
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
20030c4: c2 04 00 00 ld [ %l0 ], %g1
20030c8: f8 00 60 04 ld [ %g1 + 4 ], %i4
if ( information ) {
20030cc: 80 a7 20 00 cmp %i4, 0
20030d0: 22 80 00 51 be,a 2003214 <rtems_cpu_usage_report_with_plugin+0x1a8><== NEVER TAKEN
20030d4: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
20030d8: c2 17 20 10 lduh [ %i4 + 0x10 ], %g1
20030dc: 86 90 60 00 orcc %g1, 0, %g3
20030e0: 02 80 00 4c be 2003210 <rtems_cpu_usage_report_with_plugin+0x1a4>
20030e4: ba 10 20 01 mov 1, %i5
the_thread = (Thread_Control *)information->local_table[ i ];
20030e8: 10 80 00 1f b 2003164 <rtems_cpu_usage_report_with_plugin+0xf8>
20030ec: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
20030f0: 40 00 17 78 call 2008ed0 <_TOD_Get_uptime>
20030f4: 90 10 00 13 mov %l3, %o0
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
20030f8: 90 07 bf e0 add %fp, -32, %o0
20030fc: 92 10 00 13 mov %l3, %o1
2003100: 40 00 22 36 call 200b9d8 <_Timespec_Subtract>
2003104: 94 07 bf d0 add %fp, -48, %o2
_Timestamp_Divide( &ran, &total, &ival, &fval );
2003108: 94 07 bf f8 add %fp, -8, %o2
200310c: 96 07 bf fc add %fp, -4, %o3
2003110: 90 10 00 14 mov %l4, %o0
2003114: 40 00 21 98 call 200b774 <_Timespec_Divide>
2003118: 92 07 bf d0 add %fp, -48, %o1
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
200311c: d0 07 bf dc ld [ %fp + -36 ], %o0
2003120: 40 00 5d f9 call 201a904 <.udiv>
2003124: 92 10 23 e8 mov 0x3e8, %o1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
2003128: e4 07 bf d8 ld [ %fp + -40 ], %l2
200312c: d8 1f bf f8 ldd [ %fp + -8 ], %o4
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
2003130: 96 10 00 08 mov %o0, %o3
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
2003134: 92 10 00 1b mov %i3, %o1
2003138: 90 10 00 18 mov %i0, %o0
200313c: 9f c6 40 00 call %i1
2003140: 94 10 00 12 mov %l2, %o2
2003144: c6 17 20 10 lduh [ %i4 + 0x10 ], %g3
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2003148: ba 07 60 01 inc %i5
200314c: 83 28 e0 10 sll %g3, 0x10, %g1
2003150: 83 30 60 10 srl %g1, 0x10, %g1
2003154: 80 a0 40 1d cmp %g1, %i5
2003158: 2a 80 00 2f bcs,a 2003214 <rtems_cpu_usage_report_with_plugin+0x1a8>
200315c: a0 04 20 04 add %l0, 4, %l0
the_thread = (Thread_Control *)information->local_table[ i ];
2003160: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
2003164: 83 2f 60 02 sll %i5, 2, %g1
2003168: e4 00 80 01 ld [ %g2 + %g1 ], %l2
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
200316c: 94 07 bf b8 add %fp, -72, %o2
2003170: 92 10 20 0d mov 0xd, %o1
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
2003174: 80 a4 a0 00 cmp %l2, 0
2003178: 02 bf ff f4 be 2003148 <rtems_cpu_usage_report_with_plugin+0xdc><== NEVER TAKEN
200317c: a6 07 bf c8 add %fp, -56, %l3
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2003180: d0 04 a0 08 ld [ %l2 + 8 ], %o0
2003184: 40 00 12 0e call 20079bc <rtems_object_get_name>
2003188: a8 07 bf d8 add %fp, -40, %l4
(*print)(
200318c: d4 04 a0 08 ld [ %l2 + 8 ], %o2
2003190: 90 10 00 18 mov %i0, %o0
2003194: 92 10 00 1a mov %i2, %o1
2003198: 9f c6 40 00 call %i1
200319c: 96 07 bf b8 add %fp, -72, %o3
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
20031a0: 03 00 80 82 sethi %hi(0x2020800), %g1
20031a4: 82 10 63 60 or %g1, 0x360, %g1 ! 2020b60 <_Per_CPU_Information>
20031a8: c4 00 60 0c ld [ %g1 + 0xc ], %g2
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
20031ac: de 04 a0 84 ld [ %l2 + 0x84 ], %o7
20031b0: c8 04 a0 88 ld [ %l2 + 0x88 ], %g4
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
20031b4: c6 04 a0 08 ld [ %l2 + 8 ], %g3
20031b8: c4 00 a0 08 ld [ %g2 + 8 ], %g2
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
20031bc: de 27 bf d8 st %o7, [ %fp + -40 ]
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
20031c0: 80 a0 c0 02 cmp %g3, %g2
20031c4: 12 bf ff cb bne 20030f0 <rtems_cpu_usage_report_with_plugin+0x84>
20031c8: c8 27 bf dc st %g4, [ %fp + -36 ]
*time_of_context_switch = _Thread_Time_of_last_context_switch;
20031cc: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
20031d0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
20031d4: a6 07 bf c8 add %fp, -56, %l3
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
*time_of_context_switch = _Thread_Time_of_last_context_switch;
20031d8: c4 27 bf e8 st %g2, [ %fp + -24 ]
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
20031dc: 90 10 00 13 mov %l3, %o0
20031e0: 40 00 17 3c call 2008ed0 <_TOD_Get_uptime>
20031e4: c2 27 bf ec st %g1, [ %fp + -20 ]
_Timestamp_Subtract( &last, &uptime, &used );
20031e8: 90 07 bf e8 add %fp, -24, %o0
20031ec: 92 10 00 13 mov %l3, %o1
20031f0: 40 00 21 fa call 200b9d8 <_Timespec_Subtract>
20031f4: 94 07 bf f0 add %fp, -16, %o2
_Timestamp_Add_to( &ran, &used );
20031f8: a8 07 bf d8 add %fp, -40, %l4
20031fc: 92 07 bf f0 add %fp, -16, %o1
2003200: 40 00 21 44 call 200b710 <_Timespec_Add_to>
2003204: 90 10 00 14 mov %l4, %o0
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
2003208: 10 bf ff bd b 20030fc <rtems_cpu_usage_report_with_plugin+0x90>
200320c: 90 07 bf e0 add %fp, -32, %o0
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2003210: a0 04 20 04 add %l0, 4, %l0
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
2003214: 80 a4 00 11 cmp %l0, %l1
2003218: 32 bf ff ac bne,a 20030c8 <rtems_cpu_usage_report_with_plugin+0x5c>
200321c: c2 04 00 00 ld [ %l0 ], %g1
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
2003220: d0 07 bf d4 ld [ %fp + -44 ], %o0
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
2003224: fa 07 bf d0 ld [ %fp + -48 ], %i5
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
2003228: 40 00 5d b7 call 201a904 <.udiv>
200322c: 92 10 23 e8 mov 0x3e8, %o1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
2003230: 13 00 80 76 sethi %hi(0x201d800), %o1
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
2003234: 96 10 00 08 mov %o0, %o3
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
2003238: 94 10 00 1d mov %i5, %o2
200323c: 90 10 00 18 mov %i0, %o0
2003240: 9f c6 40 00 call %i1
2003244: 92 12 60 f0 or %o1, 0xf0, %o1
2003248: 81 c7 e0 08 ret
200324c: 81 e8 00 00 restore
0200f9d8 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
200f9d8: 9d e3 bf a0 save %sp, -96, %sp
if (sc == RTEMS_SUCCESSFUL) {
200f9dc: 80 a6 20 00 cmp %i0, 0
200f9e0: 12 80 00 04 bne 200f9f0 <rtems_deviceio_errno+0x18>
200f9e4: 82 10 20 00 clr %g1
errno = eno;
return -1;
}
}
200f9e8: 81 c7 e0 08 ret
200f9ec: 91 e8 00 01 restore %g0, %g1, %o0
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
200f9f0: 80 a6 20 1c cmp %i0, 0x1c
200f9f4: 18 80 00 06 bgu 200fa0c <rtems_deviceio_errno+0x34> <== NEVER TAKEN
200f9f8: ba 10 20 16 mov 0x16, %i5
eno = status_code_to_errno [sc];
200f9fc: b1 2e 20 02 sll %i0, 2, %i0
200fa00: 03 00 80 70 sethi %hi(0x201c000), %g1
200fa04: 82 10 60 10 or %g1, 0x10, %g1 ! 201c010 <status_code_to_errno>
200fa08: fa 00 40 18 ld [ %g1 + %i0 ], %i5
}
errno = eno;
200fa0c: 40 00 00 30 call 200facc <__errno>
200fa10: 01 00 00 00 nop
return -1;
200fa14: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
200fa18: 10 bf ff f4 b 200f9e8 <rtems_deviceio_errno+0x10>
200fa1c: fa 22 00 00 st %i5, [ %o0 ]
02002aac <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum begin_block,
rtems_blkdev_bnum block_count,
const char *name
)
{
2002aac: 9d e3 bf 90 save %sp, -112, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *physical_disk = NULL;
rtems_disk_device *dd = NULL;
rtems_blkdev_bnum end_block = begin_block + block_count;
sc = disk_lock();
2002ab0: 7f ff ff 43 call 20027bc <disk_lock>
2002ab4: c0 27 bf fc clr [ %fp + -4 ]
if (sc != RTEMS_SUCCESSFUL) {
2002ab8: 80 a2 20 00 cmp %o0, 0
2002abc: 22 80 00 04 be,a 2002acc <rtems_disk_create_log+0x20> <== ALWAYS TAKEN
2002ac0: 90 10 00 1a mov %i2, %o0
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2002ac4: 81 c7 e0 08 ret
2002ac8: 91 e8 00 08 restore %g0, %o0, %o0
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
2002acc: 92 10 00 1b mov %i3, %o1
2002ad0: 7f ff ff 00 call 20026d0 <get_disk_entry>
2002ad4: 94 10 20 01 mov 1, %o2
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
2002ad8: b4 92 20 00 orcc %o0, 0, %i2
2002adc: 02 80 00 06 be 2002af4 <rtems_disk_create_log+0x48>
2002ae0: 01 00 00 00 nop
2002ae4: c2 06 a0 08 ld [ %i2 + 8 ], %g1
2002ae8: 80 a6 80 01 cmp %i2, %g1
2002aec: 02 80 00 07 be 2002b08 <rtems_disk_create_log+0x5c>
2002af0: 82 07 40 1c add %i5, %i4, %g1
disk_unlock();
2002af4: 7f ff ff 41 call 20027f8 <disk_unlock>
2002af8: 01 00 00 00 nop
return RTEMS_INVALID_ID;
2002afc: 90 10 20 04 mov 4, %o0 ! 4 <PROM_START+0x4>
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2002b00: 81 c7 e0 08 ret
2002b04: 91 e8 00 08 restore %g0, %o0, %o0
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
2002b08: 80 a7 00 01 cmp %i4, %g1
2002b0c: 1a 80 00 07 bcc 2002b28 <rtems_disk_create_log+0x7c>
2002b10: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2
2002b14: 80 a7 00 02 cmp %i4, %g2
2002b18: 1a 80 00 04 bcc 2002b28 <rtems_disk_create_log+0x7c> <== NEVER TAKEN
2002b1c: 80 a0 40 02 cmp %g1, %g2
begin_block >= physical_disk->size
|| end_block <= begin_block
|| end_block > physical_disk->size
2002b20: 08 80 00 06 bleu 2002b38 <rtems_disk_create_log+0x8c>
2002b24: d4 07 a0 5c ld [ %fp + 0x5c ], %o2
) {
disk_unlock();
2002b28: 7f ff ff 34 call 20027f8 <disk_unlock>
2002b2c: 01 00 00 00 nop
return RTEMS_INVALID_NUMBER;
2002b30: 10 bf ff e5 b 2002ac4 <rtems_disk_create_log+0x18>
2002b34: 90 10 20 0a mov 0xa, %o0 ! a <PROM_START+0xa>
}
sc = create_disk(dev, name, &dd);
2002b38: 90 10 00 18 mov %i0, %o0
2002b3c: 92 10 00 19 mov %i1, %o1
2002b40: 7f ff ff 3d call 2002834 <create_disk>
2002b44: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2002b48: 80 a2 20 00 cmp %o0, 0
2002b4c: 12 80 00 0e bne 2002b84 <rtems_disk_create_log+0xd8>
2002b50: c2 07 bf fc ld [ %fp + -4 ], %g1
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
2002b54: c4 06 a0 20 ld [ %i2 + 0x20 ], %g2
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
2002b58: c6 06 a0 14 ld [ %i2 + 0x14 ], %g3
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
dd->ioctl = physical_disk->ioctl;
2002b5c: de 06 a0 28 ld [ %i2 + 0x28 ], %o7
dd->driver_data = physical_disk->driver_data;
2002b60: c8 06 a0 2c ld [ %i2 + 0x2c ], %g4
return sc;
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
2002b64: f8 38 60 18 std %i4, [ %g1 + 0x18 ]
dd->block_size = dd->media_block_size = physical_disk->block_size;
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
2002b68: 86 00 e0 01 inc %g3
disk_unlock();
return sc;
}
dd->phys_dev = physical_disk;
2002b6c: f4 20 60 08 st %i2, [ %g1 + 8 ]
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
2002b70: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2002b74: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
dd->ioctl = physical_disk->ioctl;
2002b78: de 20 60 28 st %o7, [ %g1 + 0x28 ]
dd->driver_data = physical_disk->driver_data;
2002b7c: c8 20 60 2c st %g4, [ %g1 + 0x2c ]
++physical_disk->uses;
2002b80: c6 26 a0 14 st %g3, [ %i2 + 0x14 ]
disk_unlock();
2002b84: 7f ff ff 1d call 20027f8 <disk_unlock>
2002b88: d0 27 bf f4 st %o0, [ %fp + -12 ]
return RTEMS_SUCCESSFUL;
2002b8c: 10 bf ff ce b 2002ac4 <rtems_disk_create_log+0x18>
2002b90: d0 07 bf f4 ld [ %fp + -12 ], %o0
020029f4 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
20029f4: 9d e3 bf 98 save %sp, -104, %sp
rtems_disk_device *dd = NULL;
20029f8: c0 27 bf fc clr [ %fp + -4 ]
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
20029fc: a0 10 00 18 mov %i0, %l0
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
2002a00: 80 a7 20 00 cmp %i4, 0
2002a04: 02 80 00 21 be 2002a88 <rtems_disk_create_phys+0x94>
2002a08: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
}
if (block_size == 0) {
2002a0c: 80 a6 a0 00 cmp %i2, 0
2002a10: 02 80 00 1e be 2002a88 <rtems_disk_create_phys+0x94>
2002a14: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
}
sc = disk_lock();
2002a18: 7f ff ff 69 call 20027bc <disk_lock>
2002a1c: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2002a20: b0 92 20 00 orcc %o0, 0, %i0
2002a24: 12 80 00 19 bne 2002a88 <rtems_disk_create_phys+0x94> <== NEVER TAKEN
2002a28: d4 07 a0 5c ld [ %fp + 0x5c ], %o2
return sc;
}
sc = create_disk(dev, name, &dd);
2002a2c: 90 10 00 10 mov %l0, %o0
2002a30: 92 10 00 19 mov %i1, %o1
2002a34: 7f ff ff 80 call 2002834 <create_disk>
2002a38: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2002a3c: b0 92 20 00 orcc %o0, 0, %i0
2002a40: 12 80 00 17 bne 2002a9c <rtems_disk_create_phys+0xa8>
2002a44: c2 07 bf fc ld [ %fp + -4 ], %g1
dd->size = block_count;
dd->block_size = dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
2002a48: 13 08 00 10 sethi %hi(0x20004000), %o1
2002a4c: 90 10 00 01 mov %g1, %o0
disk_unlock();
return sc;
}
dd->phys_dev = dd;
2002a50: c2 20 60 08 st %g1, [ %g1 + 8 ]
dd->start = 0;
2002a54: c0 20 60 18 clr [ %g1 + 0x18 ]
dd->size = block_count;
2002a58: f6 20 60 1c st %i3, [ %g1 + 0x1c ]
dd->block_size = dd->media_block_size = block_size;
2002a5c: f4 20 60 24 st %i2, [ %g1 + 0x24 ]
2002a60: f4 20 60 20 st %i2, [ %g1 + 0x20 ]
dd->ioctl = handler;
dd->driver_data = driver_data;
2002a64: f8 38 60 28 std %i4, [ %g1 + 0x28 ]
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
2002a68: 92 12 62 08 or %o1, 0x208, %o1
2002a6c: 9f c7 00 00 call %i4
2002a70: 94 00 60 0c add %g1, 0xc, %o2
2002a74: 80 a2 20 00 cmp %o0, 0
2002a78: 06 80 00 06 bl 2002a90 <rtems_disk_create_phys+0x9c> <== ALWAYS TAKEN
2002a7c: c2 07 bf fc ld [ %fp + -4 ], %g1
dd->capabilities = 0;
}
disk_unlock();
2002a80: 7f ff ff 5e call 20027f8 <disk_unlock> <== NOT EXECUTED
2002a84: 01 00 00 00 nop <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
2002a88: 81 c7 e0 08 ret
2002a8c: 81 e8 00 00 restore
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
dd->capabilities = 0;
}
disk_unlock();
2002a90: 7f ff ff 5a call 20027f8 <disk_unlock>
2002a94: c0 20 60 0c clr [ %g1 + 0xc ]
2002a98: 30 80 00 03 b,a 2002aa4 <rtems_disk_create_phys+0xb0>
return sc;
}
sc = create_disk(dev, name, &dd);
if (sc != RTEMS_SUCCESSFUL) {
disk_unlock();
2002a9c: 7f ff ff 57 call 20027f8 <disk_unlock>
2002aa0: 01 00 00 00 nop
return sc;
2002aa4: 81 c7 e0 08 ret
2002aa8: 81 e8 00 00 restore
02002b94 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
2002b94: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
2002b98: 7f ff ff 09 call 20027bc <disk_lock>
2002b9c: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2002ba0: b6 92 20 00 orcc %o0, 0, %i3
2002ba4: 02 80 00 04 be 2002bb4 <rtems_disk_delete+0x20> <== ALWAYS TAKEN
2002ba8: 90 10 00 18 mov %i0, %o0
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2002bac: 81 c7 e0 08 ret <== NOT EXECUTED
2002bb0: 91 e8 00 1b restore %g0, %i3, %o0 <== NOT EXECUTED
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
2002bb4: 92 10 00 19 mov %i1, %o1
2002bb8: 7f ff fe c6 call 20026d0 <get_disk_entry>
2002bbc: 94 10 20 01 mov 1, %o2
if (dd == NULL) {
2002bc0: 82 92 20 00 orcc %o0, 0, %g1
2002bc4: 02 80 00 5a be 2002d2c <rtems_disk_delete+0x198> <== NEVER TAKEN
2002bc8: 84 10 20 01 mov 1, %g2
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
2002bcc: f2 00 60 08 ld [ %g1 + 8 ], %i1
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
2002bd0: c4 28 60 30 stb %g2, [ %g1 + 0x30 ]
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
2002bd4: c4 0e 60 30 ldub [ %i1 + 0x30 ], %g2
2002bd8: 80 a0 a0 00 cmp %g2, 0
2002bdc: 22 80 00 43 be,a 2002ce8 <rtems_disk_delete+0x154>
2002be0: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2002be4: 27 00 80 6a sethi %hi(0x201a800), %l3
2002be8: c2 04 e1 d0 ld [ %l3 + 0x1d0 ], %g1 ! 201a9d0 <disktab_size>
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
2002bec: f8 1e 40 00 ldd [ %i1 ], %i4
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2002bf0: 80 a0 60 00 cmp %g1, 0
2002bf4: 02 80 00 34 be 2002cc4 <rtems_disk_delete+0x130> <== NEVER TAKEN
2002bf8: a4 10 20 00 clr %l2
2002bfc: 29 00 80 6a sethi %hi(0x201a800), %l4
2002c00: a4 10 00 1b mov %i3, %l2
2002c04: a0 10 20 00 clr %l0
2002c08: a8 15 21 d4 or %l4, 0x1d4, %l4
2002c0c: a6 14 e1 d0 or %l3, 0x1d0, %l3
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
2002c10: a2 10 20 01 mov 1, %l1
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
2002c14: f4 05 00 00 ld [ %l4 ], %i2
2002c18: 83 2c 20 03 sll %l0, 3, %g1
2002c1c: b4 06 80 01 add %i2, %g1, %i2
for (minor = 0; minor < dtab->size; ++minor) {
2002c20: de 06 a0 04 ld [ %i2 + 4 ], %o7
2002c24: 80 a3 e0 00 cmp %o7, 0
2002c28: 22 80 00 23 be,a 2002cb4 <rtems_disk_delete+0x120>
2002c2c: c2 04 c0 00 ld [ %l3 ], %g1
2002c30: 10 80 00 06 b 2002c48 <rtems_disk_delete+0xb4>
2002c34: b0 10 20 00 clr %i0
2002c38: b0 06 20 01 inc %i0
2002c3c: 80 a6 00 0f cmp %i0, %o7
2002c40: 3a 80 00 1d bcc,a 2002cb4 <rtems_disk_delete+0x120>
2002c44: c2 04 c0 00 ld [ %l3 ], %g1
rtems_disk_device *dd = dtab->minor [minor];
2002c48: c8 06 80 00 ld [ %i2 ], %g4
2002c4c: 83 2e 20 02 sll %i0, 2, %g1
2002c50: d0 01 00 01 ld [ %g4 + %g1 ], %o0
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
2002c54: 80 a2 20 00 cmp %o0, 0
2002c58: 02 bf ff f8 be 2002c38 <rtems_disk_delete+0xa4>
2002c5c: 80 a6 40 08 cmp %i1, %o0
2002c60: 22 bf ff f7 be,a 2002c3c <rtems_disk_delete+0xa8>
2002c64: b0 06 20 01 inc %i0
2002c68: c4 02 20 08 ld [ %o0 + 8 ], %g2
2002c6c: c4 18 80 00 ldd [ %g2 ], %g2
2002c70: 84 1f 00 02 xor %i4, %g2, %g2
2002c74: 86 1f 40 03 xor %i5, %g3, %g3
2002c78: 80 90 80 03 orcc %g2, %g3, %g0
2002c7c: 32 bf ff f0 bne,a 2002c3c <rtems_disk_delete+0xa8> <== NEVER TAKEN
2002c80: b0 06 20 01 inc %i0 <== NOT EXECUTED
if (dd->uses == 0) {
2002c84: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
2002c88: 80 a0 a0 00 cmp %g2, 0
2002c8c: 32 bf ff eb bne,a 2002c38 <rtems_disk_delete+0xa4>
2002c90: e2 2a 20 30 stb %l1, [ %o0 + 0x30 ]
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
2002c94: 7f ff fe b4 call 2002764 <free_disk_device>
2002c98: c0 21 00 01 clr [ %g4 + %g1 ]
2002c9c: de 06 a0 04 ld [ %i2 + 4 ], %o7
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2002ca0: b0 06 20 01 inc %i0
2002ca4: 80 a6 00 0f cmp %i0, %o7
2002ca8: 0a bf ff e8 bcs 2002c48 <rtems_disk_delete+0xb4> <== ALWAYS TAKEN
2002cac: a4 04 a0 01 inc %l2
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2002cb0: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED
2002cb4: a0 04 20 01 inc %l0
2002cb8: 80 a4 00 01 cmp %l0, %g1
2002cbc: 2a bf ff d7 bcs,a 2002c18 <rtems_disk_delete+0x84>
2002cc0: f4 05 00 00 ld [ %l4 ], %i2
}
}
}
}
physical_disk->uses -= deleted_count;
2002cc4: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
2002cc8: a4 20 40 12 sub %g1, %l2, %l2
if (physical_disk->uses == 0) {
2002ccc: 80 a4 a0 00 cmp %l2, 0
2002cd0: 02 80 00 1b be 2002d3c <rtems_disk_delete+0x1a8>
2002cd4: e4 26 60 14 st %l2, [ %i1 + 0x14 ]
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2002cd8: 7f ff fe c8 call 20027f8 <disk_unlock>
2002cdc: b0 10 00 1b mov %i3, %i0
return RTEMS_SUCCESSFUL;
}
2002ce0: 81 c7 e0 08 ret
2002ce4: 81 e8 00 00 restore
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
2002ce8: 80 a0 a0 00 cmp %g2, 0
2002cec: 12 bf ff fb bne 2002cd8 <rtems_disk_delete+0x144> <== NEVER TAKEN
2002cf0: 07 00 80 6a sethi %hi(0x201a800), %g3
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
2002cf4: c4 00 40 00 ld [ %g1 ], %g2
disktab [major].minor [minor] = NULL;
2002cf8: c8 00 e1 d4 ld [ %g3 + 0x1d4 ], %g4
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
2002cfc: c2 00 60 04 ld [ %g1 + 4 ], %g1
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2002d00: c6 06 60 14 ld [ %i1 + 0x14 ], %g3
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2002d04: 85 28 a0 03 sll %g2, 3, %g2
2002d08: c4 01 00 02 ld [ %g4 + %g2 ], %g2
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2002d0c: 86 00 ff ff add %g3, -1, %g3
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2002d10: 83 28 60 02 sll %g1, 2, %g1
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2002d14: c6 26 60 14 st %g3, [ %i1 + 0x14 ]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(disk_to_remove);
2002d18: 7f ff fe 93 call 2002764 <free_disk_device>
2002d1c: c0 20 80 01 clr [ %g2 + %g1 ]
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2002d20: 7f ff fe b6 call 20027f8 <disk_unlock>
2002d24: b0 10 00 1b mov %i3, %i0
2002d28: 30 bf ff ee b,a 2002ce0 <rtems_disk_delete+0x14c>
return sc;
}
dd = get_disk_entry(dev, true);
if (dd == NULL) {
disk_unlock();
2002d2c: 7f ff fe b3 call 20027f8 <disk_unlock> <== NOT EXECUTED
2002d30: b6 10 20 04 mov 4, %i3 <== NOT EXECUTED
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2002d34: 81 c7 e0 08 ret <== NOT EXECUTED
2002d38: 91 e8 00 1b restore %g0, %i3, %o0 <== NOT EXECUTED
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2002d3c: c4 06 40 00 ld [ %i1 ], %g2
disktab [major].minor [minor] = NULL;
2002d40: 03 00 80 6a sethi %hi(0x201a800), %g1
2002d44: c6 00 61 d4 ld [ %g1 + 0x1d4 ], %g3 ! 201a9d4 <disktab>
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2002d48: c2 06 60 04 ld [ %i1 + 4 ], %g1
disktab [major].minor [minor] = NULL;
2002d4c: 85 28 a0 03 sll %g2, 3, %g2
2002d50: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
2002d54: 83 28 60 02 sll %g1, 2, %g1
free_disk_device(physical_disk);
2002d58: 90 10 00 19 mov %i1, %o0
2002d5c: 7f ff fe 82 call 2002764 <free_disk_device>
2002d60: c0 20 80 01 clr [ %g2 + %g1 ]
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2002d64: 7f ff fe a5 call 20027f8 <disk_unlock>
2002d68: b0 10 00 1b mov %i3, %i0
2002d6c: 30 bf ff dd b,a 2002ce0 <rtems_disk_delete+0x14c>
02002ffc <rtems_disk_io_done>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
{
2002ffc: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
2003000: 39 00 80 6a sethi %hi(0x201a800), %i4
2003004: c2 07 21 d0 ld [ %i4 + 0x1d0 ], %g1 ! 201a9d0 <disktab_size>
2003008: 3b 00 80 6a sethi %hi(0x201a800), %i5
200300c: 80 a0 60 00 cmp %g1, 0
2003010: 02 80 00 1f be 200308c <rtems_disk_io_done+0x90> <== NEVER TAKEN
2003014: f6 07 61 d4 ld [ %i5 + 0x1d4 ], %i3
2003018: b2 10 20 00 clr %i1
200301c: b0 17 21 d0 or %i4, 0x1d0, %i0
rtems_disk_device_table *dtab = disktab + major;
2003020: 83 2e 60 03 sll %i1, 3, %g1
2003024: b4 06 c0 01 add %i3, %g1, %i2
for (minor = 0; minor < dtab->size; ++minor) {
2003028: c4 06 a0 04 ld [ %i2 + 4 ], %g2
200302c: 80 a0 a0 00 cmp %g2, 0
2003030: 02 80 00 10 be 2003070 <rtems_disk_io_done+0x74>
2003034: c6 06 c0 01 ld [ %i3 + %g1 ], %g3
2003038: b6 10 20 00 clr %i3
rtems_disk_device *dd = dtab->minor [minor];
200303c: 83 2e e0 02 sll %i3, 2, %g1
2003040: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if (dd != NULL) {
2003044: 90 90 60 00 orcc %g1, 0, %o0
2003048: 02 80 00 06 be 2003060 <rtems_disk_io_done+0x64>
200304c: b6 06 e0 01 inc %i3
free_disk_device(dd);
2003050: 7f ff fd c5 call 2002764 <free_disk_device>
2003054: 01 00 00 00 nop
2003058: c4 06 a0 04 ld [ %i2 + 4 ], %g2
200305c: c6 06 80 00 ld [ %i2 ], %g3
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2003060: 80 a0 80 1b cmp %g2, %i3
2003064: 18 bf ff f7 bgu 2003040 <rtems_disk_io_done+0x44>
2003068: 83 2e e0 02 sll %i3, 2, %g1
200306c: f6 07 61 d4 ld [ %i5 + 0x1d4 ], %i3
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
2003070: 40 00 02 78 call 2003a50 <free>
2003074: 90 10 00 03 mov %g3, %o0
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
2003078: c2 06 00 00 ld [ %i0 ], %g1
200307c: b2 06 60 01 inc %i1
2003080: 80 a0 40 19 cmp %g1, %i1
2003084: 18 bf ff e8 bgu 2003024 <rtems_disk_io_done+0x28>
2003088: 83 2e 60 03 sll %i1, 3, %g1
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
200308c: 40 00 02 71 call 2003a50 <free>
2003090: 90 10 00 1b mov %i3, %o0
rtems_semaphore_delete(diskdevs_mutex);
2003094: 37 00 80 6a sethi %hi(0x201a800), %i3
2003098: d0 06 e1 cc ld [ %i3 + 0x1cc ], %o0 ! 201a9cc <diskdevs_mutex>
200309c: 40 00 11 3e call 2007594 <rtems_semaphore_delete>
20030a0: b0 10 20 00 clr %i0
diskdevs_mutex = RTEMS_ID_NONE;
20030a4: c0 26 e1 cc clr [ %i3 + 0x1cc ]
disktab = NULL;
20030a8: c0 27 61 d4 clr [ %i5 + 0x1d4 ]
disktab_size = 0;
20030ac: c0 27 21 d0 clr [ %i4 + 0x1d0 ]
return RTEMS_SUCCESSFUL;
}
20030b0: 81 c7 e0 08 ret
20030b4: 81 e8 00 00 restore
02002f50 <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
2002f50: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
2002f54: 3b 00 80 6a sethi %hi(0x201a800), %i5
2002f58: c2 07 61 d0 ld [ %i5 + 0x1d0 ], %g1 ! 201a9d0 <disktab_size>
2002f5c: 80 a0 60 00 cmp %g1, 0
2002f60: 12 80 00 19 bne 2002fc4 <rtems_disk_io_initialize+0x74> <== NEVER TAKEN
2002f64: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
2002f68: 90 10 20 08 mov 8, %o0
2002f6c: 92 10 20 08 mov 8, %o1
2002f70: 40 00 02 45 call 2003884 <calloc>
2002f74: 39 00 80 6a sethi %hi(0x201a800), %i4
2002f78: d0 27 21 d4 st %o0, [ %i4 + 0x1d4 ] ! 201a9d4 <disktab>
if (disktab == NULL) {
2002f7c: 80 a2 20 00 cmp %o0, 0
2002f80: 02 80 00 11 be 2002fc4 <rtems_disk_io_initialize+0x74> <== NEVER TAKEN
2002f84: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
2002f88: 03 00 80 6a sethi %hi(0x201a800), %g1
sc = rtems_semaphore_create(
2002f8c: 11 11 11 11 sethi %hi(0x44444400), %o0
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
2002f90: c0 28 61 c8 clrb [ %g1 + 0x1c8 ]
sc = rtems_semaphore_create(
2002f94: 90 12 21 56 or %o0, 0x156, %o0
2002f98: 92 10 20 01 mov 1, %o1
2002f9c: 94 10 20 10 mov 0x10, %o2
2002fa0: 96 10 20 00 clr %o3
2002fa4: 37 00 80 6a sethi %hi(0x201a800), %i3
2002fa8: 40 00 11 0b call 20073d4 <rtems_semaphore_create>
2002fac: 98 16 e1 cc or %i3, 0x1cc, %o4 ! 201a9cc <diskdevs_mutex>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
2002fb0: 80 a2 20 00 cmp %o0, 0
2002fb4: 02 80 00 06 be 2002fcc <rtems_disk_io_initialize+0x7c> <== ALWAYS TAKEN
2002fb8: 01 00 00 00 nop
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
free(disktab);
2002fbc: 40 00 02 a5 call 2003a50 <free> <== NOT EXECUTED
2002fc0: d0 07 21 d4 ld [ %i4 + 0x1d4 ], %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
2002fc4: 81 c7 e0 08 ret <== NOT EXECUTED
2002fc8: 81 e8 00 00 restore <== NOT EXECUTED
free(disktab);
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
2002fcc: 40 00 29 46 call 200d4e4 <rtems_bdbuf_init>
2002fd0: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2002fd4: 80 a2 20 00 cmp %o0, 0
2002fd8: 12 80 00 05 bne 2002fec <rtems_disk_io_initialize+0x9c> <== NEVER TAKEN
2002fdc: 82 10 20 08 mov 8, %g1
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
2002fe0: c2 27 61 d0 st %g1, [ %i5 + 0x1d0 ]
return RTEMS_SUCCESSFUL;
}
2002fe4: 81 c7 e0 08 ret
2002fe8: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
2002fec: d0 06 e1 cc ld [ %i3 + 0x1cc ], %o0 <== NOT EXECUTED
2002ff0: 40 00 11 69 call 2007594 <rtems_semaphore_delete> <== NOT EXECUTED
2002ff4: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
2002ff8: 30 bf ff f1 b,a 2002fbc <rtems_disk_io_initialize+0x6c> <== NOT EXECUTED
02002e40 <rtems_disk_next>:
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
2002e40: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
2002e44: 80 a6 3f ff cmp %i0, -1
2002e48: 02 80 00 39 be 2002f2c <rtems_disk_next+0xec>
2002e4c: 80 a6 7f ff cmp %i1, -1
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
2002e50: ba 06 60 01 add %i1, 1, %i5
2002e54: 80 a7 40 19 cmp %i5, %i1
2002e58: 0a 80 00 2a bcs 2002f00 <rtems_disk_next+0xc0> <== NEVER TAKEN
2002e5c: b8 10 00 18 mov %i0, %i4
} else {
++minor;
}
}
sc = disk_lock();
2002e60: 7f ff fe 57 call 20027bc <disk_lock>
2002e64: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL) {
2002e68: 80 a2 20 00 cmp %o0, 0
2002e6c: 12 80 00 1b bne 2002ed8 <rtems_disk_next+0x98> <== NEVER TAKEN
2002e70: 03 00 80 6a sethi %hi(0x201a800), %g1
return NULL;
}
if (major >= disktab_size) {
2002e74: c8 00 61 d0 ld [ %g1 + 0x1d0 ], %g4 ! 201a9d0 <disktab_size>
2002e78: 80 a7 00 04 cmp %i4, %g4
2002e7c: 1a 80 00 31 bcc 2002f40 <rtems_disk_next+0x100> <== NEVER TAKEN
2002e80: 03 00 80 6a sethi %hi(0x201a800), %g1
disk_unlock();
return NULL;
}
dtab = disktab + major;
2002e84: c6 00 61 d4 ld [ %g1 + 0x1d4 ], %g3 ! 201a9d4 <disktab>
2002e88: b1 2f 20 03 sll %i4, 3, %i0
2002e8c: c2 00 c0 18 ld [ %g3 + %i0 ], %g1
2002e90: b0 00 c0 18 add %g3, %i0, %i0
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
2002e94: 80 a0 60 00 cmp %g1, 0
2002e98: 02 80 00 12 be 2002ee0 <rtems_disk_next+0xa0>
2002e9c: b7 2f 60 02 sll %i5, 2, %i3
2002ea0: c4 06 20 04 ld [ %i0 + 4 ], %g2
2002ea4: 80 a7 40 02 cmp %i5, %g2
2002ea8: 3a 80 00 0f bcc,a 2002ee4 <rtems_disk_next+0xa4>
2002eac: b8 07 20 01 inc %i4
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
2002eb0: c4 00 40 1b ld [ %g1 + %i3 ], %g2
2002eb4: 80 a0 a0 00 cmp %g2, 0
2002eb8: 02 bf ff f7 be 2002e94 <rtems_disk_next+0x54>
2002ebc: ba 07 60 01 inc %i5
++minor;
} else {
++dtab->minor [minor]->uses;
2002ec0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2002ec4: 82 00 60 01 inc %g1
disk_unlock();
2002ec8: 7f ff fe 4c call 20027f8 <disk_unlock>
2002ecc: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
return dtab->minor [minor];
2002ed0: c2 06 00 00 ld [ %i0 ], %g1
2002ed4: f0 00 40 1b ld [ %g1 + %i3 ], %i0
}
}
}
2002ed8: 81 c7 e0 08 ret
2002edc: 81 e8 00 00 restore
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
++major;
2002ee0: b8 07 20 01 inc %i4
if (major >= disktab_size) {
2002ee4: 80 a1 00 1c cmp %g4, %i4
2002ee8: 08 80 00 0d bleu 2002f1c <rtems_disk_next+0xdc>
2002eec: 83 2f 20 03 sll %i4, 3, %g1
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
2002ef0: ba 10 20 00 clr %i5
if (major >= disktab_size) {
disk_unlock();
return NULL;
}
dtab = disktab + major;
2002ef4: b0 00 c0 01 add %g3, %g1, %i0
2002ef8: 10 bf ff e7 b 2002e94 <rtems_disk_next+0x54>
2002efc: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
2002f00: 82 06 20 01 add %i0, 1, %g1 <== NOT EXECUTED
2002f04: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
2002f08: 0a bf ff f4 bcs 2002ed8 <rtems_disk_next+0x98> <== NOT EXECUTED
2002f0c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2002f10: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
2002f14: 10 bf ff d3 b 2002e60 <rtems_disk_next+0x20> <== NOT EXECUTED
2002f18: ba 10 20 00 clr %i5 <== NOT EXECUTED
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
++major;
if (major >= disktab_size) {
disk_unlock();
2002f1c: 7f ff fe 37 call 20027f8 <disk_unlock>
2002f20: b0 10 20 00 clr %i0
return NULL;
2002f24: 81 c7 e0 08 ret
2002f28: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
2002f2c: 32 bf ff ca bne,a 2002e54 <rtems_disk_next+0x14> <== NEVER TAKEN
2002f30: ba 06 60 01 add %i1, 1, %i5 <== NOT EXECUTED
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
2002f34: ba 10 20 00 clr %i5
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
2002f38: 10 bf ff ca b 2002e60 <rtems_disk_next+0x20>
2002f3c: b8 10 20 00 clr %i4
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
disk_unlock();
2002f40: 7f ff fe 2e call 20027f8 <disk_unlock> <== NOT EXECUTED
2002f44: 01 00 00 00 nop <== NOT EXECUTED
return NULL;
2002f48: 81 c7 e0 08 ret <== NOT EXECUTED
2002f4c: 81 e8 00 00 restore <== NOT EXECUTED
02002d70 <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
2002d70: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
2002d74: 7f ff fd e6 call 200250c <sparc_disable_interrupts>
2002d78: b8 10 00 18 mov %i0, %i4
2002d7c: b6 10 00 08 mov %o0, %i3
if (!diskdevs_protected) {
2002d80: 03 00 80 6a sethi %hi(0x201a800), %g1
2002d84: c2 08 61 c8 ldub [ %g1 + 0x1c8 ], %g1 ! 201a9c8 <diskdevs_protected>
2002d88: 80 a0 60 00 cmp %g1, 0
2002d8c: 22 80 00 10 be,a 2002dcc <rtems_disk_obtain+0x5c> <== ALWAYS TAKEN
2002d90: 90 10 00 18 mov %i0, %o0
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
2002d94: 7f ff fd e2 call 200251c <sparc_enable_interrupts> <== NOT EXECUTED
2002d98: b0 10 20 00 clr %i0 <== NOT EXECUTED
sc = disk_lock();
2002d9c: 7f ff fe 88 call 20027bc <disk_lock> <== NOT EXECUTED
2002da0: 01 00 00 00 nop <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
2002da4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2002da8: 12 80 00 07 bne 2002dc4 <rtems_disk_obtain+0x54> <== NOT EXECUTED
2002dac: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
dd = get_disk_entry(dev, false);
2002db0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2002db4: 7f ff fe 47 call 20026d0 <get_disk_entry> <== NOT EXECUTED
2002db8: 94 10 20 00 clr %o2 <== NOT EXECUTED
disk_unlock();
2002dbc: 7f ff fe 8f call 20027f8 <disk_unlock> <== NOT EXECUTED
2002dc0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
}
return dd;
}
2002dc4: 81 c7 e0 08 ret <== NOT EXECUTED
2002dc8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_interrupt_level level;
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
2002dcc: 92 10 00 19 mov %i1, %o1
2002dd0: 7f ff fe 40 call 20026d0 <get_disk_entry>
2002dd4: 94 10 20 00 clr %o2
2002dd8: b0 10 00 08 mov %o0, %i0
rtems_interrupt_enable(level);
2002ddc: 7f ff fd d0 call 200251c <sparc_enable_interrupts>
2002de0: 90 10 00 1b mov %i3, %o0
2002de4: 81 c7 e0 08 ret
2002de8: 81 e8 00 00 restore
0200c2f8 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
200c2f8: 9d e3 bf 98 save %sp, -104, %sp
find_arg fa = {
200c2fc: f0 27 bf f8 st %i0, [ %fp + -8 ]
200c300: c0 27 bf fc clr [ %fp + -4 ]
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
200c304: 82 10 00 18 mov %i0, %g1
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
200c308: 80 a0 60 00 cmp %g1, 0
200c30c: 02 80 00 07 be 200c328 <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
200c310: b0 10 20 00 clr %i0
rtems_filesystem_iterate( find_handler, &fa );
200c314: 92 07 bf f8 add %fp, -8, %o1
200c318: 11 00 80 30 sethi %hi(0x200c000), %o0
200c31c: 7f ff ff c2 call 200c224 <rtems_filesystem_iterate>
200c320: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 200c1f0 <find_handler>
200c324: f0 07 bf fc ld [ %fp + -4 ], %i0
}
return fa.mount_h;
}
200c328: 81 c7 e0 08 ret
200c32c: 81 e8 00 00 restore
020029c4 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
20029c4: 9d e3 bf 88 save %sp, -120, %sp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
20029c8: 3b 00 80 73 sethi %hi(0x201cc00), %i5
20029cc: c2 07 63 9c ld [ %i5 + 0x39c ], %g1 ! 201cf9c <rtems_current_user_env>
20029d0: 84 10 20 12 mov 0x12, %g2
20029d4: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
20029d8: 03 00 80 6b sethi %hi(0x201ac00), %g1
20029dc: c2 00 63 18 ld [ %g1 + 0x318 ], %g1 ! 201af18 <rtems_filesystem_mount_table_size>
20029e0: 80 a0 60 00 cmp %g1, 0
20029e4: 02 80 00 39 be 2002ac8 <rtems_filesystem_initialize+0x104><== NEVER TAKEN
20029e8: 03 00 80 73 sethi %hi(0x201cc00), %g1
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
20029ec: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 ! 201ceb0 <rtems_filesystem_mount_table>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
20029f0: 98 10 20 00 clr %o4
20029f4: d0 00 60 08 ld [ %g1 + 8 ], %o0
20029f8: d2 00 60 0c ld [ %g1 + 0xc ], %o1
20029fc: d4 00 40 00 ld [ %g1 ], %o2
2002a00: 40 00 02 d3 call 200354c <mount>
2002a04: d6 00 60 04 ld [ %g1 + 4 ], %o3
if ( status == -1 )
2002a08: 80 a2 3f ff cmp %o0, -1
2002a0c: 02 80 00 34 be 2002adc <rtems_filesystem_initialize+0x118><== NEVER TAKEN
2002a10: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a14: 39 00 80 6d sethi %hi(0x201b400), %i4
2002a18: 92 10 20 01 mov 1, %o1
2002a1c: 94 10 20 00 clr %o2
2002a20: 96 07 bf ec add %fp, -20, %o3
2002a24: 98 10 20 00 clr %o4
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
2002a28: c0 30 60 30 clrh [ %g1 + 0x30 ]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a2c: 40 00 00 fc call 2002e1c <rtems_filesystem_evaluate_path>
2002a30: 90 17 20 40 or %i4, 0x40, %o0
rtems_filesystem_root = loc;
2002a34: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
2002a38: c4 07 bf ec ld [ %fp + -20 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a3c: 92 10 20 01 mov 1, %o1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002a40: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
2002a44: c4 07 bf f0 ld [ %fp + -16 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a48: 94 10 20 00 clr %o2
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002a4c: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
2002a50: c4 07 bf f4 ld [ %fp + -12 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a54: 96 07 bf ec add %fp, -20, %o3
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002a58: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
2002a5c: c4 07 bf f8 ld [ %fp + -8 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a60: 98 10 20 00 clr %o4
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002a64: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2002a68: c4 07 bf fc ld [ %fp + -4 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002a6c: 90 17 20 40 or %i4, 0x40, %o0
2002a70: 40 00 00 eb call 2002e1c <rtems_filesystem_evaluate_path>
2002a74: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
rtems_filesystem_current = loc;
2002a78: c2 07 63 9c ld [ %i5 + 0x39c ], %g1
2002a7c: c4 07 bf ec ld [ %fp + -20 ], %g2
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
2002a80: 92 10 21 ff mov 0x1ff, %o1
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
2002a84: c4 20 60 04 st %g2, [ %g1 + 4 ]
2002a88: c4 07 bf f0 ld [ %fp + -16 ], %g2
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
2002a8c: 11 00 80 6d sethi %hi(0x201b400), %o0
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
2002a90: c4 20 60 08 st %g2, [ %g1 + 8 ]
2002a94: c4 07 bf f4 ld [ %fp + -12 ], %g2
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
2002a98: 90 12 20 48 or %o0, 0x48, %o0
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
2002a9c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2002aa0: c4 07 bf f8 ld [ %fp + -8 ], %g2
2002aa4: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
2002aa8: c4 07 bf fc ld [ %fp + -4 ], %g2
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
2002aac: 40 00 02 48 call 20033cc <mkdir>
2002ab0: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
if ( status != 0 )
2002ab4: 80 a2 20 00 cmp %o0, 0
2002ab8: 12 80 00 07 bne 2002ad4 <rtems_filesystem_initialize+0x110><== NEVER TAKEN
2002abc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
2002ac0: 81 c7 e0 08 ret
2002ac4: 81 e8 00 00 restore
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
2002ac8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
2002acc: 40 00 11 65 call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002ad0: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <RAM_END+0xa98d0001><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
2002ad4: 40 00 11 63 call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002ad8: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
2002adc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
2002ae0: 40 00 11 60 call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002ae4: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <RAM_END+0xa98d0002><== NOT EXECUTED
0200c224 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
200c224: 9d e3 bf a0 save %sp, -96, %sp
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200c228: 37 00 80 6b sethi %hi(0x201ac00), %i3
200c22c: c2 06 e3 2c ld [ %i3 + 0x32c ], %g1 ! 201af2c <rtems_filesystem_table>
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
200c230: ba 10 00 18 mov %i0, %i5
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200c234: 80 a0 60 00 cmp %g1, 0
200c238: 02 80 00 13 be 200c284 <rtems_filesystem_iterate+0x60> <== NEVER TAKEN
200c23c: b6 16 e3 2c or %i3, 0x32c, %i3
200c240: b8 10 00 1b mov %i3, %i4
200c244: 10 80 00 05 b 200c258 <rtems_filesystem_iterate+0x34>
200c248: b4 06 e0 08 add %i3, 8, %i2
200c24c: b0 8a 20 ff andcc %o0, 0xff, %i0
200c250: 12 80 00 28 bne 200c2f0 <rtems_filesystem_iterate+0xcc>
200c254: 01 00 00 00 nop
stop = (*routine)( table_entry, routine_arg );
200c258: 90 10 00 1c mov %i4, %o0
200c25c: 9f c7 40 00 call %i5
200c260: 92 10 00 19 mov %i1, %o1
rtems_filesystem_table_t entry;
} filesystem_node;
static RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain);
bool rtems_filesystem_iterate(
200c264: 82 27 00 1b sub %i4, %i3, %g1
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200c268: c2 06 80 01 ld [ %i2 + %g1 ], %g1
200c26c: 80 a0 60 00 cmp %g1, 0
200c270: 12 bf ff f7 bne 200c24c <rtems_filesystem_iterate+0x28>
200c274: b8 07 20 08 add %i4, 8, %i4
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
200c278: b0 8a 20 ff andcc %o0, 0xff, %i0
200c27c: 12 80 00 1d bne 200c2f0 <rtems_filesystem_iterate+0xcc>
200c280: 01 00 00 00 nop
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200c284: 39 00 80 76 sethi %hi(0x201d800), %i4
200c288: d0 07 21 3c ld [ %i4 + 0x13c ], %o0 ! 201d93c <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200c28c: 35 00 80 73 sethi %hi(0x201cc00), %i2
200c290: 92 10 20 00 clr %o1
200c294: 7f ff e9 af call 2006950 <rtems_semaphore_obtain>
200c298: 94 10 20 00 clr %o2
200c29c: f6 06 a3 a4 ld [ %i2 + 0x3a4 ], %i3
200c2a0: b4 16 a3 a4 or %i2, 0x3a4, %i2
rtems_libio_lock();
for (
200c2a4: b4 06 a0 04 add %i2, 4, %i2
200c2a8: 80 a6 c0 1a cmp %i3, %i2
200c2ac: 12 80 00 05 bne 200c2c0 <rtems_filesystem_iterate+0x9c>
200c2b0: b0 10 20 00 clr %i0
200c2b4: 30 80 00 0b b,a 200c2e0 <rtems_filesystem_iterate+0xbc>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
200c2b8: 12 80 00 0a bne 200c2e0 <rtems_filesystem_iterate+0xbc> <== NEVER TAKEN
200c2bc: 01 00 00 00 nop
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
200c2c0: 90 06 e0 08 add %i3, 8, %o0
200c2c4: 9f c7 40 00 call %i5
200c2c8: 92 10 00 19 mov %i1, %o1
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
200c2cc: f6 06 c0 00 ld [ %i3 ], %i3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
200c2d0: 80 a6 c0 1a cmp %i3, %i2
200c2d4: 32 bf ff f9 bne,a 200c2b8 <rtems_filesystem_iterate+0x94>
200c2d8: b0 8a 20 ff andcc %o0, 0xff, %i0
200c2dc: b0 0a 20 ff and %o0, 0xff, %i0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200c2e0: 7f ff e9 e6 call 2006a78 <rtems_semaphore_release>
200c2e4: d0 07 21 3c ld [ %i4 + 0x13c ], %o0
}
rtems_libio_unlock();
}
return stop;
}
200c2e8: 81 c7 e0 08 ret
200c2ec: 81 e8 00 00 restore
200c2f0: 81 c7 e0 08 ret
200c2f4: 81 e8 00 00 restore
020034d8 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
20034d8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
20034dc: 3b 00 80 76 sethi %hi(0x201d800), %i5
20034e0: d0 07 61 3c ld [ %i5 + 0x13c ], %o0 ! 201d93c <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
20034e4: 37 00 80 73 sethi %hi(0x201cc00), %i3
20034e8: 92 10 20 00 clr %o1
20034ec: 40 00 0d 19 call 2006950 <rtems_semaphore_obtain>
20034f0: 94 10 20 00 clr %o2
20034f4: f8 06 e3 7c ld [ %i3 + 0x37c ], %i4
20034f8: b4 10 00 18 mov %i0, %i2
20034fc: b6 16 e3 7c or %i3, 0x37c, %i3
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
2003500: b6 06 e0 04 add %i3, 4, %i3
2003504: 80 a7 00 1b cmp %i4, %i3
2003508: 12 80 00 05 bne 200351c <rtems_filesystem_mount_iterate+0x44><== ALWAYS TAKEN
200350c: b0 10 20 00 clr %i0
2003510: 30 80 00 0b b,a 200353c <rtems_filesystem_mount_iterate+0x64><== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
2003514: 12 80 00 0a bne 200353c <rtems_filesystem_mount_iterate+0x64><== NEVER TAKEN
2003518: 01 00 00 00 nop
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
200351c: 90 10 00 1c mov %i4, %o0
2003520: 9f c6 80 00 call %i2
2003524: 92 10 00 19 mov %i1, %o1
}
rtems_libio_unlock();
return stop;
}
2003528: f8 07 00 00 ld [ %i4 ], %i4
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
200352c: 80 a7 00 1b cmp %i4, %i3
2003530: 32 bf ff f9 bne,a 2003514 <rtems_filesystem_mount_iterate+0x3c>
2003534: b0 8a 20 ff andcc %o0, 0xff, %i0
2003538: b0 0a 20 ff and %o0, 0xff, %i0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200353c: 40 00 0d 4f call 2006a78 <rtems_semaphore_release>
2003540: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
2003544: 81 c7 e0 08 ret
2003548: 81 e8 00 00 restore
02002e94 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
2002e94: 9d e3 bf a0 save %sp, -96, %sp
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
2002e98: 80 a6 60 00 cmp %i1, 0
2002e9c: 02 80 00 17 be 2002ef8 <rtems_filesystem_prefix_separators+0x64>
2002ea0: d0 0e 00 00 ldub [ %i0 ], %o0
2002ea4: 91 2a 20 18 sll %o0, 0x18, %o0
2002ea8: ba 10 00 18 mov %i0, %i5
2002eac: 80 a2 20 00 cmp %o0, 0
2002eb0: 12 80 00 0b bne 2002edc <rtems_filesystem_prefix_separators+0x48>
2002eb4: b0 10 20 00 clr %i0
2002eb8: 30 80 00 11 b,a 2002efc <rtems_filesystem_prefix_separators+0x68>
{
pathname++;
pathnamelen--;
stripped++;
2002ebc: b0 06 20 01 inc %i0
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
2002ec0: 80 a6 40 18 cmp %i1, %i0
2002ec4: 02 80 00 0b be 2002ef0 <rtems_filesystem_prefix_separators+0x5c>
2002ec8: ba 07 60 01 inc %i5
2002ecc: 91 2a 20 18 sll %o0, 0x18, %o0
2002ed0: 80 a2 20 00 cmp %o0, 0
2002ed4: 02 80 00 0a be 2002efc <rtems_filesystem_prefix_separators+0x68><== NEVER TAKEN
2002ed8: 01 00 00 00 nop
2002edc: 40 00 04 0e call 2003f14 <rtems_filesystem_is_separator>
2002ee0: 91 3a 20 18 sra %o0, 0x18, %o0
2002ee4: 80 a2 20 00 cmp %o0, 0
2002ee8: 32 bf ff f5 bne,a 2002ebc <rtems_filesystem_prefix_separators+0x28>
2002eec: d0 0f 60 01 ldub [ %i5 + 1 ], %o0
2002ef0: 81 c7 e0 08 ret
2002ef4: 81 e8 00 00 restore
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
2002ef8: b0 10 20 00 clr %i0
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
2002efc: 81 c7 e0 08 ret
2002f00: 81 e8 00 00 restore
0200c3f8 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
200c3f8: 9d e3 bf a0 save %sp, -96, %sp
rtems_chain_node *node = NULL;
if ( type == NULL ) {
200c3fc: 80 a6 20 00 cmp %i0, 0
200c400: 02 80 00 29 be 200c4a4 <rtems_filesystem_unregister+0xac>
200c404: 3b 00 80 76 sethi %hi(0x201d800), %i5
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200c408: d0 07 61 3c ld [ %i5 + 0x13c ], %o0 ! 201d93c <rtems_libio_semaphore>
200c40c: 37 00 80 73 sethi %hi(0x201cc00), %i3
200c410: 92 10 20 00 clr %o1
200c414: 7f ff e9 4f call 2006950 <rtems_semaphore_obtain>
200c418: 94 10 20 00 clr %o2
200c41c: f8 06 e3 a4 ld [ %i3 + 0x3a4 ], %i4
200c420: b6 16 e3 a4 or %i3, 0x3a4, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
200c424: b6 06 e0 04 add %i3, 4, %i3
200c428: 80 a7 00 1b cmp %i4, %i3
200c42c: 32 80 00 08 bne,a 200c44c <rtems_filesystem_unregister+0x54>
200c430: d0 07 20 08 ld [ %i4 + 8 ], %o0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200c434: 10 80 00 14 b 200c484 <rtems_filesystem_unregister+0x8c>
200c438: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
200c43c: 80 a7 00 1b cmp %i4, %i3
200c440: 02 80 00 11 be 200c484 <rtems_filesystem_unregister+0x8c> <== ALWAYS TAKEN
200c444: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
200c448: d0 07 20 08 ld [ %i4 + 8 ], %o0 <== NOT EXECUTED
200c44c: 40 00 11 47 call 2010968 <strcmp>
200c450: 92 10 00 18 mov %i0, %o1
200c454: 80 a2 20 00 cmp %o0, 0
200c458: 32 bf ff f9 bne,a 200c43c <rtems_filesystem_unregister+0x44>
200c45c: f8 07 00 00 ld [ %i4 ], %i4
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200c460: 7f ff eb f6 call 2007438 <_Chain_Extract>
200c464: 90 10 00 1c mov %i4, %o0
rtems_chain_extract( node );
free( fsn );
200c468: 7f ff da ae call 2002f20 <free>
200c46c: 90 10 00 1c mov %i4, %o0
200c470: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
200c474: 7f ff e9 81 call 2006a78 <rtems_semaphore_release>
200c478: b0 10 20 00 clr %i0
200c47c: 81 c7 e0 08 ret
200c480: 81 e8 00 00 restore
200c484: 7f ff e9 7d call 2006a78 <rtems_semaphore_release>
200c488: b0 10 3f ff mov -1, %i0
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
200c48c: 40 00 0d 90 call 200facc <__errno>
200c490: 01 00 00 00 nop
200c494: 82 10 20 02 mov 2, %g1 ! 2 <PROM_START+0x2>
200c498: c2 22 00 00 st %g1, [ %o0 ]
}
200c49c: 81 c7 e0 08 ret
200c4a0: 81 e8 00 00 restore
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
200c4a4: 40 00 0d 8a call 200facc <__errno>
200c4a8: b0 10 3f ff mov -1, %i0
200c4ac: 82 10 20 16 mov 0x16, %g1
200c4b0: c2 22 00 00 st %g1, [ %o0 ]
200c4b4: 81 c7 e0 08 ret
200c4b8: 81 e8 00 00 restore
020034c8 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
20034c8: 9d e3 bf a0 save %sp, -96, %sp
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
20034cc: 40 00 01 1d call 2003940 <malloc>
20034d0: 90 10 20 08 mov 8, %o0
*key = new_key;
new_key->val = NULL;
20034d4: c0 22 00 00 clr [ %o0 ]
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
20034d8: d0 26 00 00 st %o0, [ %i0 ]
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
20034dc: ba 10 00 08 mov %o0, %i5
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
20034e0: 94 10 00 19 mov %i1, %o2
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
new_key->dtor = dtor;
20034e4: f2 27 60 04 st %i1, [ %i5 + 4 ]
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
20034e8: 90 10 20 00 clr %o0
20034ec: 92 10 00 1d mov %i5, %o1
20034f0: 40 00 10 24 call 2007580 <rtems_task_variable_add>
20034f4: b0 10 20 00 clr %i0
if ( status == RTEMS_SUCCESSFUL )
20034f8: 80 a2 20 00 cmp %o0, 0
20034fc: 02 80 00 04 be 200350c <rtems_gxx_key_create+0x44> <== ALWAYS TAKEN
2003500: 90 10 00 1d mov %i5, %o0
return 0;
free( new_key );
2003504: 7f ff ff 89 call 2003328 <free> <== NOT EXECUTED
2003508: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
200350c: 81 c7 e0 08 ret
2003510: 81 e8 00 00 restore
02003520 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
2003520: 9d e3 bf a0 save %sp, -96, %sp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
2003524: 90 10 20 00 clr %o0
2003528: 40 00 10 47 call 2007644 <rtems_task_variable_delete>
200352c: 92 10 00 18 mov %i0, %o1
if ( status == RTEMS_SUCCESSFUL ) {
2003530: 80 a2 20 00 cmp %o0, 0
2003534: 12 80 00 06 bne 200354c <rtems_gxx_key_delete+0x2c> <== NEVER TAKEN
2003538: 80 a6 20 00 cmp %i0, 0
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
200353c: 02 80 00 04 be 200354c <rtems_gxx_key_delete+0x2c> <== NEVER TAKEN
2003540: 01 00 00 00 nop
2003544: 7f ff ff 79 call 2003328 <free>
2003548: d0 06 00 00 ld [ %i0 ], %o0
return 0;
}
key = NULL;
return 0;
}
200354c: 81 c7 e0 08 ret
2003550: 91 e8 20 00 restore %g0, 0, %o0
02003458 <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))
{
2003458: 9d e3 bf 98 save %sp, -104, %sp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
200345c: c2 06 00 00 ld [ %i0 ], %g1
2003460: 80 a0 60 00 cmp %g1, 0
2003464: 02 80 00 04 be 2003474 <rtems_gxx_once+0x1c>
2003468: 92 10 21 00 mov 0x100, %o1
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
200346c: 81 c7 e0 08 ret
2003470: 91 e8 20 00 restore %g0, 0, %o0
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2003474: 94 07 bf fc add %fp, -4, %o2
2003478: 40 00 0f bb call 2007364 <rtems_task_mode>
200347c: 90 10 21 00 mov 0x100, %o0
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
2003480: c2 06 00 00 ld [ %i0 ], %g1
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2003484: d0 07 bf fc ld [ %fp + -4 ], %o0
2003488: 92 10 21 00 mov 0x100, %o1
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
200348c: 80 a0 60 00 cmp %g1, 0
2003490: 12 80 00 0a bne 20034b8 <rtems_gxx_once+0x60> <== NEVER TAKEN
2003494: 94 07 bf fc add %fp, -4, %o2
*(volatile __gthread_once_t *)once = 1;
2003498: 82 10 20 01 mov 1, %g1
200349c: c2 26 00 00 st %g1, [ %i0 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
20034a0: 40 00 0f b1 call 2007364 <rtems_task_mode>
20034a4: b0 10 20 00 clr %i0
if ( o == 0 )
(*func)();
20034a8: 9f c6 40 00 call %i1
20034ac: 01 00 00 00 nop
}
return 0;
}
20034b0: 81 c7 e0 08 ret
20034b4: 81 e8 00 00 restore
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
20034b8: 40 00 0f ab call 2007364 <rtems_task_mode> <== NOT EXECUTED
20034bc: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
20034c0: 81 c7 e0 08 ret <== NOT EXECUTED
20034c4: 81 e8 00 00 restore <== NOT EXECUTED
020035bc <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
20035bc: 9d e3 bf a0 save %sp, -96, %sp
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
20035c0: d4 06 20 04 ld [ %i0 + 4 ], %o2
20035c4: 92 10 00 18 mov %i0, %o1
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
20035c8: ba 10 00 18 mov %i0, %i5
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
20035cc: 90 10 20 00 clr %o0
20035d0: 40 00 0f ec call 2007580 <rtems_task_variable_add>
20035d4: b0 10 3f ff mov -1, %i0
if ( status == RTEMS_SUCCESSFUL ) {
20035d8: 80 a2 20 00 cmp %o0, 0
20035dc: 12 80 00 04 bne 20035ec <rtems_gxx_setspecific+0x30> <== NEVER TAKEN
20035e0: 01 00 00 00 nop
/* now let's set the proper value */
key->val = (void *)ptr;
20035e4: f2 27 40 00 st %i1, [ %i5 ]
return 0;
20035e8: b0 10 20 00 clr %i0
}
return -1;
}
20035ec: 81 c7 e0 08 ret
20035f0: 81 e8 00 00 restore
020076c0 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
20076c0: 9d e3 bf a0 save %sp, -96, %sp
if (
20076c4: 03 00 80 92 sethi %hi(0x2024800), %g1
20076c8: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 2024844 <_System_state_Current>
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
20076cc: b8 10 00 18 mov %i0, %i4
20076d0: ba 10 00 19 mov %i1, %i5
if (
20076d4: 80 a0 60 03 cmp %g1, 3
20076d8: 02 80 00 08 be 20076f8 <rtems_heap_allocate_aligned_with_boundary+0x38><== ALWAYS TAKEN
20076dc: b6 10 00 1a mov %i2, %i3
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
20076e0: 7f ff fb 9f call 200655c <malloc_deferred_frees_process>
20076e4: b2 10 00 1c mov %i4, %i1
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
20076e8: 03 00 80 8c sethi %hi(0x2023000), %g1
20076ec: f0 00 61 94 ld [ %g1 + 0x194 ], %i0 ! 2023194 <RTEMS_Malloc_Heap>
20076f0: 40 00 16 24 call 200cf80 <_Protected_heap_Allocate_aligned_with_boundary>
20076f4: 95 e8 00 1d restore %g0, %i5, %o2
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
20076f8: 7f ff fb 87 call 2006514 <malloc_is_system_state_OK>
20076fc: 01 00 00 00 nop
2007700: 80 8a 20 ff btst 0xff, %o0
2007704: 12 bf ff f7 bne 20076e0 <rtems_heap_allocate_aligned_with_boundary+0x20>
2007708: b0 10 20 00 clr %i0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
200770c: 81 c7 e0 08 ret
2007710: 81 e8 00 00 restore
0200292c <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
200292c: 9d e3 bf 88 save %sp, -120, %sp
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
2002930: 40 00 39 ff call 201112c <strlen>
2002934: 90 10 00 18 mov %i0, %o0
2002938: 94 10 20 00 clr %o2
200293c: 92 10 00 08 mov %o0, %o1
2002940: 96 07 bf ec add %fp, -20, %o3
2002944: 98 10 20 01 mov 1, %o4
2002948: 40 00 01 35 call 2002e1c <rtems_filesystem_evaluate_path>
200294c: 90 10 00 18 mov %i0, %o0
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
2002950: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
2002954: b8 10 00 08 mov %o0, %i4
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
2002958: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
200295c: fa 07 bf ec ld [ %fp + -20 ], %i5
node_type = (*loc.ops->node_type_h)( &loc );
2002960: 9f c0 40 00 call %g1
2002964: 90 07 bf ec add %fp, -20, %o0
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2002968: 80 a2 20 02 cmp %o0, 2
200296c: 02 80 00 07 be 2002988 <rtems_io_lookup_name+0x5c>
2002970: 80 a7 20 00 cmp %i4, 0
rtems_filesystem_freenode( &loc );
2002974: 90 07 bf ec add %fp, -20, %o0
2002978: 40 00 01 63 call 2002f04 <rtems_filesystem_freenode>
200297c: b0 10 20 0d mov 0xd, %i0
return RTEMS_UNSATISFIED;
2002980: 81 c7 e0 08 ret
2002984: 81 e8 00 00 restore
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2002988: 12 bf ff fc bne 2002978 <rtems_io_lookup_name+0x4c> <== NEVER TAKEN
200298c: 90 07 bf ec add %fp, -20, %o0
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
2002990: f0 26 40 00 st %i0, [ %i1 ]
device_info->device_name_length = strlen( name );
2002994: 40 00 39 e6 call 201112c <strlen>
2002998: 90 10 00 18 mov %i0, %o0
200299c: d0 26 60 04 st %o0, [ %i1 + 4 ]
device_info->major = the_jnode->info.device.major;
20029a0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
20029a4: 90 07 bf ec add %fp, -20, %o0
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
20029a8: c2 26 60 08 st %g1, [ %i1 + 8 ]
device_info->minor = the_jnode->info.device.minor;
20029ac: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
20029b0: b0 10 20 00 clr %i0
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
20029b4: 40 00 01 54 call 2002f04 <rtems_filesystem_freenode>
20029b8: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return RTEMS_SUCCESSFUL;
}
20029bc: 81 c7 e0 08 ret
20029c0: 81 e8 00 00 restore
02007e10 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2007e10: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2007e14: 03 00 80 6c sethi %hi(0x201b000), %g1
2007e18: c4 00 63 f8 ld [ %g1 + 0x3f8 ], %g2 ! 201b3f8 <_Per_CPU_Information+0x8>
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2007e1c: 86 10 00 19 mov %i1, %g3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
2007e20: 03 00 80 6e sethi %hi(0x201b800), %g1
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
2007e24: 88 10 20 12 mov 0x12, %g4
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2007e28: 80 a0 a0 00 cmp %g2, 0
2007e2c: 02 80 00 04 be 2007e3c <rtems_io_register_driver+0x2c>
2007e30: de 00 60 34 ld [ %g1 + 0x34 ], %o7
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2007e34: 81 c7 e0 08 ret
2007e38: 91 e8 00 04 restore %g0, %g4, %o0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
2007e3c: 80 a6 a0 00 cmp %i2, 0
2007e40: 02 80 00 40 be 2007f40 <rtems_io_register_driver+0x130>
2007e44: 80 a6 60 00 cmp %i1, 0
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
2007e48: 02 80 00 3e be 2007f40 <rtems_io_register_driver+0x130>
2007e4c: de 26 80 00 st %o7, [ %i2 ]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2007e50: c4 06 40 00 ld [ %i1 ], %g2
2007e54: 80 a0 a0 00 cmp %g2, 0
2007e58: 22 80 00 37 be,a 2007f34 <rtems_io_register_driver+0x124>
2007e5c: c4 06 60 04 ld [ %i1 + 4 ], %g2
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
2007e60: 80 a3 c0 18 cmp %o7, %i0
2007e64: 08 bf ff f4 bleu 2007e34 <rtems_io_register_driver+0x24>
2007e68: 88 10 20 0a mov 0xa, %g4
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007e6c: 05 00 80 6b sethi %hi(0x201ac00), %g2
2007e70: c8 00 a2 b0 ld [ %g2 + 0x2b0 ], %g4 ! 201aeb0 <_Thread_Dispatch_disable_level>
2007e74: 88 01 20 01 inc %g4
2007e78: c8 20 a2 b0 st %g4, [ %g2 + 0x2b0 ]
return _Thread_Dispatch_disable_level;
2007e7c: c4 00 a2 b0 ld [ %g2 + 0x2b0 ], %g2
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
2007e80: 80 a6 20 00 cmp %i0, 0
2007e84: 12 80 00 32 bne 2007f4c <rtems_io_register_driver+0x13c>
2007e88: 1f 00 80 6e sethi %hi(0x201b800), %o7
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
2007e8c: c8 00 60 34 ld [ %g1 + 0x34 ], %g4
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
2007e90: 80 a1 20 00 cmp %g4, 0
2007e94: 02 80 00 45 be 2007fa8 <rtems_io_register_driver+0x198> <== NEVER TAKEN
2007e98: c2 03 e0 38 ld [ %o7 + 0x38 ], %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2007e9c: 10 80 00 06 b 2007eb4 <rtems_io_register_driver+0xa4>
2007ea0: c4 00 40 00 ld [ %g1 ], %g2
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
2007ea4: 80 a6 00 04 cmp %i0, %g4
2007ea8: 02 80 00 35 be 2007f7c <rtems_io_register_driver+0x16c>
2007eac: 82 00 60 18 add %g1, 0x18, %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2007eb0: c4 00 40 00 ld [ %g1 ], %g2
2007eb4: 80 a0 a0 00 cmp %g2, 0
2007eb8: 32 bf ff fb bne,a 2007ea4 <rtems_io_register_driver+0x94>
2007ebc: b0 06 20 01 inc %i0
2007ec0: c4 00 60 04 ld [ %g1 + 4 ], %g2
2007ec4: 80 a0 a0 00 cmp %g2, 0
2007ec8: 32 bf ff f7 bne,a 2007ea4 <rtems_io_register_driver+0x94>
2007ecc: b0 06 20 01 inc %i0
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2007ed0: f0 26 80 00 st %i0, [ %i2 ]
2007ed4: 83 2e 20 03 sll %i0, 3, %g1
if ( m != n )
2007ed8: 80 a1 00 18 cmp %g4, %i0
2007edc: 02 80 00 29 be 2007f80 <rtems_io_register_driver+0x170> <== NEVER TAKEN
2007ee0: 9b 2e 20 05 sll %i0, 5, %o5
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2007ee4: c8 00 c0 00 ld [ %g3 ], %g4
2007ee8: c4 03 e0 38 ld [ %o7 + 0x38 ], %g2
2007eec: 82 23 40 01 sub %o5, %g1, %g1
2007ef0: c8 20 80 01 st %g4, [ %g2 + %g1 ]
2007ef4: c8 00 e0 04 ld [ %g3 + 4 ], %g4
2007ef8: 82 00 80 01 add %g2, %g1, %g1
2007efc: c8 20 60 04 st %g4, [ %g1 + 4 ]
2007f00: c4 00 e0 08 ld [ %g3 + 8 ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2007f04: b2 10 20 00 clr %i1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2007f08: c4 20 60 08 st %g2, [ %g1 + 8 ]
2007f0c: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2007f10: b4 10 20 00 clr %i2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2007f14: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2007f18: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2007f1c: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
2007f20: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
_Thread_Enable_dispatch();
2007f24: 40 00 08 4b call 200a050 <_Thread_Enable_dispatch>
2007f28: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
return rtems_io_initialize( major, 0, NULL );
2007f2c: 40 00 23 a1 call 2010db0 <rtems_io_initialize>
2007f30: 81 e8 00 00 restore
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2007f34: 80 a0 a0 00 cmp %g2, 0
2007f38: 12 bf ff cb bne 2007e64 <rtems_io_register_driver+0x54>
2007f3c: 80 a3 c0 18 cmp %o7, %i0
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
2007f40: 88 10 20 09 mov 9, %g4
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2007f44: 81 c7 e0 08 ret
2007f48: 91 e8 00 04 restore %g0, %g4, %o0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
2007f4c: c8 03 e0 38 ld [ %o7 + 0x38 ], %g4
2007f50: 83 2e 20 03 sll %i0, 3, %g1
2007f54: 9b 2e 20 05 sll %i0, 5, %o5
2007f58: 84 23 40 01 sub %o5, %g1, %g2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2007f5c: d8 01 00 02 ld [ %g4 + %g2 ], %o4
2007f60: 80 a3 20 00 cmp %o4, 0
2007f64: 02 80 00 0b be 2007f90 <rtems_io_register_driver+0x180>
2007f68: 84 01 00 02 add %g4, %g2, %g2
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
2007f6c: 40 00 08 39 call 200a050 <_Thread_Enable_dispatch>
2007f70: 01 00 00 00 nop
return RTEMS_RESOURCE_IN_USE;
2007f74: 10 bf ff b0 b 2007e34 <rtems_io_register_driver+0x24>
2007f78: 88 10 20 0c mov 0xc, %g4 ! c <PROM_START+0xc>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2007f7c: f0 26 80 00 st %i0, [ %i2 ]
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
2007f80: 40 00 08 34 call 200a050 <_Thread_Enable_dispatch>
2007f84: 01 00 00 00 nop
return sc;
2007f88: 10 bf ff ab b 2007e34 <rtems_io_register_driver+0x24>
2007f8c: 88 10 20 05 mov 5, %g4 ! 5 <PROM_START+0x5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2007f90: c4 00 a0 04 ld [ %g2 + 4 ], %g2
2007f94: 80 a0 a0 00 cmp %g2, 0
2007f98: 12 bf ff f5 bne 2007f6c <rtems_io_register_driver+0x15c>
2007f9c: 01 00 00 00 nop
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
2007fa0: 10 bf ff d1 b 2007ee4 <rtems_io_register_driver+0xd4>
2007fa4: f0 26 80 00 st %i0, [ %i2 ]
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2007fa8: 10 bf ff f6 b 2007f80 <rtems_io_register_driver+0x170> <== NOT EXECUTED
2007fac: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
0200959c <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)
{
200959c: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
20095a0: 80 a6 20 00 cmp %i0, 0
20095a4: 02 80 00 20 be 2009624 <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
20095a8: 37 00 80 81 sethi %hi(0x2020400), %i3
20095ac: b6 16 e1 4c or %i3, 0x14c, %i3 ! 202054c <_Objects_Information_table+0x4>
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
20095b0: b4 06 e0 0c add %i3, 0xc, %i2
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
20095b4: c2 06 c0 00 ld [ %i3 ], %g1
20095b8: f8 00 60 04 ld [ %g1 + 4 ], %i4
if ( !information )
20095bc: 80 a7 20 00 cmp %i4, 0
20095c0: 22 80 00 16 be,a 2009618 <rtems_iterate_over_all_threads+0x7c>
20095c4: b6 06 e0 04 add %i3, 4, %i3
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
20095c8: c2 17 20 10 lduh [ %i4 + 0x10 ], %g1
20095cc: 84 90 60 00 orcc %g1, 0, %g2
20095d0: 22 80 00 12 be,a 2009618 <rtems_iterate_over_all_threads+0x7c>
20095d4: b6 06 e0 04 add %i3, 4, %i3
20095d8: ba 10 20 01 mov 1, %i5
the_thread = (Thread_Control *)information->local_table[ i ];
20095dc: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
20095e0: 83 2f 60 02 sll %i5, 2, %g1
20095e4: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if ( !the_thread )
20095e8: 90 90 60 00 orcc %g1, 0, %o0
20095ec: 02 80 00 05 be 2009600 <rtems_iterate_over_all_threads+0x64>
20095f0: ba 07 60 01 inc %i5
continue;
(*routine)(the_thread);
20095f4: 9f c6 00 00 call %i0
20095f8: 01 00 00 00 nop
20095fc: c4 17 20 10 lduh [ %i4 + 0x10 ], %g2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
2009600: 83 28 a0 10 sll %g2, 0x10, %g1
2009604: 83 30 60 10 srl %g1, 0x10, %g1
2009608: 80 a0 40 1d cmp %g1, %i5
200960c: 3a bf ff f5 bcc,a 20095e0 <rtems_iterate_over_all_threads+0x44>
2009610: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
2009614: b6 06 e0 04 add %i3, 4, %i3
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
2009618: 80 a6 c0 1a cmp %i3, %i2
200961c: 32 bf ff e7 bne,a 20095b8 <rtems_iterate_over_all_threads+0x1c>
2009620: c2 06 c0 00 ld [ %i3 ], %g1
2009624: 81 c7 e0 08 ret
2009628: 81 e8 00 00 restore
0200c080 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
200c080: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200c084: 39 00 80 76 sethi %hi(0x201d800), %i4
200c088: d0 07 21 3c ld [ %i4 + 0x13c ], %o0 ! 201d93c <rtems_libio_semaphore>
200c08c: 92 10 20 00 clr %o1
200c090: 7f ff ea 30 call 2006950 <rtems_semaphore_obtain>
200c094: 94 10 20 00 clr %o2
rtems_libio_lock();
if (iop->sem)
200c098: d0 06 20 30 ld [ %i0 + 0x30 ], %o0
200c09c: 80 a2 20 00 cmp %o0, 0
200c0a0: 02 80 00 04 be 200c0b0 <rtems_libio_free+0x30> <== NEVER TAKEN
200c0a4: ba 10 00 18 mov %i0, %i5
rtems_semaphore_delete(iop->sem);
200c0a8: 7f ff e9 f3 call 2006874 <rtems_semaphore_delete>
200c0ac: 01 00 00 00 nop
iop->flags &= ~LIBIO_FLAGS_OPEN;
200c0b0: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
iop->data1 = rtems_libio_iop_freelist;
200c0b4: 03 00 80 76 sethi %hi(0x201d800), %g1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200c0b8: f0 07 21 3c ld [ %i4 + 0x13c ], %i0
200c0bc: c6 00 61 38 ld [ %g1 + 0x138 ], %g3
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200c0c0: 84 08 be ff and %g2, -257, %g2
iop->data1 = rtems_libio_iop_freelist;
200c0c4: c6 27 60 38 st %g3, [ %i5 + 0x38 ]
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200c0c8: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
200c0cc: fa 20 61 38 st %i5, [ %g1 + 0x138 ]
200c0d0: 7f ff ea 6a call 2006a78 <rtems_semaphore_release>
200c0d4: 81 e8 00 00 restore
02003050 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
2003050: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
2003054: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003058: fa 00 62 b8 ld [ %g1 + 0x2b8 ], %i5 ! 201ceb8 <rtems_libio_number_iops>
200305c: 80 a7 60 00 cmp %i5, 0
2003060: 02 80 00 19 be 20030c4 <rtems_libio_init+0x74> <== NEVER TAKEN
2003064: 92 10 20 01 mov 1, %o1
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
2003068: 90 10 00 1d mov %i5, %o0
200306c: 7f ff fe a0 call 2002aec <calloc>
2003070: 92 10 20 40 mov 0x40, %o1
2003074: 03 00 80 76 sethi %hi(0x201d800), %g1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
2003078: 80 a2 20 00 cmp %o0, 0
200307c: 02 80 00 26 be 2003114 <rtems_libio_init+0xc4>
2003080: d0 20 61 34 st %o0, [ %g1 + 0x134 ]
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
2003084: 03 00 80 76 sethi %hi(0x201d800), %g1
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2003088: 80 a7 60 01 cmp %i5, 1
200308c: 08 80 00 0c bleu 20030bc <rtems_libio_init+0x6c> <== NEVER TAKEN
2003090: d0 20 61 38 st %o0, [ %g1 + 0x138 ]
2003094: 82 10 00 08 mov %o0, %g1
2003098: 84 10 20 01 mov 1, %g2
iop->data1 = iop + 1;
200309c: 82 00 60 40 add %g1, 0x40, %g1
20030a0: 84 00 a0 01 inc %g2
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
20030a4: 80 a0 80 1d cmp %g2, %i5
20030a8: 12 bf ff fd bne 200309c <rtems_libio_init+0x4c>
20030ac: c2 20 7f f8 st %g1, [ %g1 + -8 ]
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
20030b0: 84 00 bf ff add %g2, -1, %g2
20030b4: 85 28 a0 06 sll %g2, 6, %g2
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
20030b8: 90 02 00 02 add %o0, %g2, %o0
iop->data1 = iop + 1;
iop->data1 = NULL;
20030bc: c0 22 20 38 clr [ %o0 + 0x38 ]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
20030c0: 92 10 20 01 mov 1, %o1
20030c4: 11 13 10 92 sethi %hi(0x4c424800), %o0
20030c8: 94 10 20 54 mov 0x54, %o2
20030cc: 90 12 21 4f or %o0, 0x14f, %o0
20030d0: 96 10 20 00 clr %o3
20030d4: 19 00 80 76 sethi %hi(0x201d800), %o4
20030d8: 40 00 0d 77 call 20066b4 <rtems_semaphore_create>
20030dc: 98 13 21 3c or %o4, 0x13c, %o4 ! 201d93c <rtems_libio_semaphore>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
20030e0: 80 a2 20 00 cmp %o0, 0
20030e4: 12 80 00 0a bne 200310c <rtems_libio_init+0xbc> <== NEVER TAKEN
20030e8: 03 00 80 73 sethi %hi(0x201cc00), %g1
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
20030ec: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 ! 201cebc <rtems_fs_init_helper>
20030f0: 80 a0 60 00 cmp %g1, 0
20030f4: 02 80 00 04 be 2003104 <rtems_libio_init+0xb4> <== NEVER TAKEN
20030f8: 01 00 00 00 nop
(* rtems_fs_init_helper)();
20030fc: 9f c0 40 00 call %g1
2003100: 01 00 00 00 nop
2003104: 81 c7 e0 08 ret
2003108: 81 e8 00 00 restore
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
200310c: 40 00 0f d5 call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003110: 01 00 00 00 nop <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
2003114: 40 00 0f d3 call 2007060 <rtems_fatal_error_occurred>
2003118: 90 10 20 1a mov 0x1a, %o0 ! 1a <PROM_START+0x1a>
0200c164 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
200c164: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200c168: 3b 00 80 76 sethi %hi(0x201d800), %i5
200c16c: d0 07 61 3c ld [ %i5 + 0x13c ], %o0 ! 201d93c <rtems_libio_semaphore>
200c170: 92 10 20 00 clr %o1
200c174: 7f ff e9 f7 call 2006950 <rtems_semaphore_obtain>
200c178: 94 10 20 00 clr %o2
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200c17c: 03 00 80 73 sethi %hi(0x201cc00), %g1
200c180: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 201ceb8 <rtems_libio_number_iops>
200c184: 05 00 80 76 sethi %hi(0x201d800), %g2
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
200c188: b8 10 20 00 clr %i4
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200c18c: 80 a0 60 00 cmp %g1, 0
200c190: 02 80 00 0f be 200c1cc <rtems_libio_is_file_open+0x68> <== NEVER TAKEN
200c194: c4 00 a1 34 ld [ %g2 + 0x134 ], %g2
200c198: 86 10 20 00 clr %g3
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200c19c: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
200c1a0: 80 89 21 00 btst 0x100, %g4
200c1a4: 02 80 00 06 be 200c1bc <rtems_libio_is_file_open+0x58>
200c1a8: 86 00 e0 01 inc %g3
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
200c1ac: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4
200c1b0: 80 a1 00 18 cmp %g4, %i0
200c1b4: 02 80 00 0b be 200c1e0 <rtems_libio_is_file_open+0x7c>
200c1b8: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200c1bc: 80 a0 c0 01 cmp %g3, %g1
200c1c0: 12 bf ff f7 bne 200c19c <rtems_libio_is_file_open+0x38>
200c1c4: 84 00 a0 40 add %g2, 0x40, %g2
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
200c1c8: b8 10 20 00 clr %i4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200c1cc: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
200c1d0: 7f ff ea 2a call 2006a78 <rtems_semaphore_release>
200c1d4: b0 10 00 1c mov %i4, %i0
}
rtems_libio_unlock();
return result;
}
200c1d8: 81 c7 e0 08 ret
200c1dc: 81 e8 00 00 restore
200c1e0: 7f ff ea 26 call 2006a78 <rtems_semaphore_release>
200c1e4: b8 10 20 01 mov 1, %i4
200c1e8: 81 c7 e0 08 ret
200c1ec: 91 e8 00 1c restore %g0, %i4, %o0
0200c0d8 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
200c0d8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200c0dc: 3b 00 80 76 sethi %hi(0x201d800), %i5
200c0e0: d0 07 61 3c ld [ %i5 + 0x13c ], %o0 ! 201d93c <rtems_libio_semaphore>
200c0e4: 92 10 20 00 clr %o1
200c0e8: 7f ff ea 1a call 2006950 <rtems_semaphore_obtain>
200c0ec: 94 10 20 00 clr %o2
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200c0f0: 03 00 80 73 sethi %hi(0x201cc00), %g1
200c0f4: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 201ceb8 <rtems_libio_number_iops>
200c0f8: 05 00 80 76 sethi %hi(0x201d800), %g2
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
200c0fc: b8 10 20 00 clr %i4
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200c100: 80 a0 60 00 cmp %g1, 0
200c104: 02 80 00 0f be 200c140 <rtems_libio_is_open_files_in_fs+0x68><== NEVER TAKEN
200c108: c4 00 a1 34 ld [ %g2 + 0x134 ], %g2
200c10c: 86 10 20 00 clr %g3
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200c110: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
200c114: 80 89 21 00 btst 0x100, %g4
200c118: 02 80 00 06 be 200c130 <rtems_libio_is_open_files_in_fs+0x58>
200c11c: 86 00 e0 01 inc %g3
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
200c120: c8 00 a0 2c ld [ %g2 + 0x2c ], %g4
200c124: 80 a1 00 18 cmp %g4, %i0
200c128: 02 80 00 0b be 200c154 <rtems_libio_is_open_files_in_fs+0x7c>
200c12c: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200c130: 80 a0 c0 01 cmp %g3, %g1
200c134: 12 bf ff f7 bne 200c110 <rtems_libio_is_open_files_in_fs+0x38>
200c138: 84 00 a0 40 add %g2, 0x40, %g2
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
200c13c: b8 10 20 00 clr %i4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200c140: d0 07 61 3c ld [ %i5 + 0x13c ], %o0
200c144: 7f ff ea 4d call 2006a78 <rtems_semaphore_release>
200c148: b0 10 00 1c mov %i4, %i0
}
rtems_libio_unlock();
return result;
}
200c14c: 81 c7 e0 08 ret
200c150: 81 e8 00 00 restore
200c154: 7f ff ea 49 call 2006a78 <rtems_semaphore_release>
200c158: b8 10 20 01 mov 1, %i4
200c15c: 81 c7 e0 08 ret
200c160: 91 e8 00 1c restore %g0, %i4, %o0
020062bc <rtems_libio_set_private_env>:
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
20062bc: 9d e3 bf 78 save %sp, -136, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
20062c0: 40 00 0d 7f call 20098bc <rtems_task_self>
20062c4: 3b 00 80 84 sethi %hi(0x2021000), %i5
20062c8: b8 10 00 08 mov %o0, %i4
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
20062cc: 92 10 20 01 mov 1, %o1
20062d0: 90 17 61 18 or %i5, 0x118, %o0
20062d4: 94 10 20 00 clr %o2
20062d8: 96 07 bf d8 add %fp, -40, %o3
20062dc: 98 10 20 00 clr %o4
20062e0: 7f ff fa a7 call 2004d7c <rtems_filesystem_evaluate_path>
20062e4: b0 10 20 1a mov 0x1a, %i0
if (rv != 0)
20062e8: 80 a2 20 00 cmp %o0, 0
20062ec: 12 80 00 43 bne 20063f8 <rtems_libio_set_private_env+0x13c><== NEVER TAKEN
20062f0: 90 17 61 18 or %i5, 0x118, %o0
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
20062f4: 92 10 20 01 mov 1, %o1
20062f8: 94 10 20 00 clr %o2
20062fc: 96 07 bf ec add %fp, -20, %o3
2006300: 7f ff fa 9f call 2004d7c <rtems_filesystem_evaluate_path>
2006304: 98 10 20 00 clr %o4
if (rv != 0)
2006308: 80 a2 20 00 cmp %o0, 0
200630c: 12 80 00 38 bne 20063ec <rtems_libio_set_private_env+0x130><== NEVER TAKEN
2006310: 35 00 80 8b sethi %hi(0x2022c00), %i2
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
2006314: fa 06 a2 5c ld [ %i2 + 0x25c ], %i5 ! 2022e5c <rtems_current_user_env>
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
2006318: 37 00 80 8e sethi %hi(0x2023800), %i3
200631c: b6 16 e0 14 or %i3, 0x14, %i3 ! 2023814 <rtems_global_user_env>
2006320: 80 a7 40 1b cmp %i5, %i3
2006324: 02 80 00 06 be 200633c <rtems_libio_set_private_env+0x80>
2006328: 01 00 00 00 nop
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
200632c: c2 07 40 00 ld [ %i5 ], %g1
2006330: 80 a0 40 1c cmp %g1, %i4
2006334: 02 80 00 10 be 2006374 <rtems_libio_set_private_env+0xb8>
2006338: 90 10 00 1d mov %i5, %o0
) {
new_env = malloc(sizeof(rtems_user_env_t));
200633c: 7f ff fc fb call 2005728 <malloc>
2006340: 90 10 20 48 mov 0x48, %o0
if (new_env == NULL)
2006344: ba 92 20 00 orcc %o0, 0, %i5
2006348: 02 80 00 27 be 20063e4 <rtems_libio_set_private_env+0x128>
200634c: 90 10 20 00 clr %o0
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
2006350: 92 16 a2 5c or %i2, 0x25c, %o1
2006354: 15 00 80 18 sethi %hi(0x2006000), %o2
2006358: 40 00 0d 78 call 2009938 <rtems_task_variable_add>
200635c: 94 12 a2 84 or %o2, 0x284, %o2 ! 2006284 <free_user_env>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
2006360: 80 a2 20 00 cmp %o0, 0
2006364: 12 80 00 1e bne 20063dc <rtems_libio_set_private_env+0x120>
2006368: 03 00 80 8b sethi %hi(0x2022c00), %g1
goto error_3;
rtems_current_user_env = new_env;
200636c: fa 20 62 5c st %i5, [ %g1 + 0x25c ] ! 2022e5c <rtems_current_user_env>
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
2006370: 90 10 00 1d mov %i5, %o0
2006374: 92 10 00 1b mov %i3, %o1
2006378: 40 00 32 34 call 2012c48 <memcpy>
200637c: 94 10 20 48 mov 0x48, %o2
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
2006380: c2 07 bf d8 ld [ %fp + -40 ], %g1
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
rtems_current_user_env->task_id = task_id;
2006384: f8 27 40 00 st %i4, [ %i5 ]
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
2006388: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
200638c: c2 07 bf dc ld [ %fp + -36 ], %g1
2006390: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
2006394: c2 07 bf e0 ld [ %fp + -32 ], %g1
2006398: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
200639c: c2 07 bf e4 ld [ %fp + -28 ], %g1
20063a0: c2 27 60 24 st %g1, [ %i5 + 0x24 ]
20063a4: c2 07 bf e8 ld [ %fp + -24 ], %g1
20063a8: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
rtems_filesystem_current = current_loc;
20063ac: c2 07 bf ec ld [ %fp + -20 ], %g1
20063b0: c2 27 60 04 st %g1, [ %i5 + 4 ]
20063b4: c2 07 bf f0 ld [ %fp + -16 ], %g1
20063b8: c2 27 60 08 st %g1, [ %i5 + 8 ]
20063bc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20063c0: c2 27 60 0c st %g1, [ %i5 + 0xc ]
20063c4: c2 07 bf f8 ld [ %fp + -8 ], %g1
20063c8: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
20063cc: c2 07 bf fc ld [ %fp + -4 ], %g1
20063d0: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
return RTEMS_SUCCESSFUL;
20063d4: 81 c7 e0 08 ret
20063d8: 91 e8 20 00 restore %g0, 0, %o0
error_3:
free(new_env);
20063dc: 7f ff fb 03 call 2004fe8 <free>
20063e0: 90 10 00 1d mov %i5, %o0
error_2:
rtems_filesystem_freenode(¤t_loc);
20063e4: 7f ff fa fa call 2004fcc <rtems_filesystem_freenode>
20063e8: 90 07 bf ec add %fp, -20, %o0
error_1:
rtems_filesystem_freenode(&root_loc);
20063ec: 90 07 bf d8 add %fp, -40, %o0
20063f0: 7f ff fa f7 call 2004fcc <rtems_filesystem_freenode>
20063f4: b0 10 20 1a mov 0x1a, %i0
error_0:
return RTEMS_NO_MEMORY;
}
20063f8: 81 c7 e0 08 ret
20063fc: 81 e8 00 00 restore
02006400 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
2006400: 9d e3 bf 98 save %sp, -104, %sp
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
2006404: 40 00 0d 2e call 20098bc <rtems_task_self>
2006408: b6 10 20 00 clr %i3
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
200640c: 80 a6 00 08 cmp %i0, %o0
2006410: 02 80 00 10 be 2006450 <rtems_libio_share_private_env+0x50><== NEVER TAKEN
2006414: ba 10 00 08 mov %o0, %i5
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
2006418: 90 10 00 18 mov %i0, %o0
200641c: 39 00 80 8b sethi %hi(0x2022c00), %i4
2006420: 94 07 bf fc add %fp, -4, %o2
2006424: 40 00 0d 76 call 20099fc <rtems_task_variable_get>
2006428: 92 17 22 5c or %i4, 0x25c, %o1
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
200642c: b6 92 20 00 orcc %o0, 0, %i3
2006430: 12 80 00 09 bne 2006454 <rtems_libio_share_private_env+0x54>
2006434: b0 10 00 1b mov %i3, %i0
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
2006438: d0 07 22 5c ld [ %i4 + 0x25c ], %o0
200643c: c2 02 00 00 ld [ %o0 ], %g1
2006440: 80 a0 40 1d cmp %g1, %i5
2006444: 02 80 00 06 be 200645c <rtems_libio_share_private_env+0x5c>
2006448: c2 07 bf fc ld [ %fp + -4 ], %g1
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
200644c: c2 27 22 5c st %g1, [ %i4 + 0x25c ]
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
2006450: b0 10 00 1b mov %i3, %i0
2006454: 81 c7 e0 08 ret
2006458: 81 e8 00 00 restore
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
200645c: 7f ff ff 8a call 2006284 <free_user_env>
2006460: b0 10 00 1b mov %i3, %i0
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2006464: c2 07 bf fc ld [ %fp + -4 ], %g1
2006468: c2 27 22 5c st %g1, [ %i4 + 0x25c ]
200646c: 81 c7 e0 08 ret
2006470: 81 e8 00 00 restore
0200bf84 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
200bf84: 84 0a 20 06 and %o0, 6, %g2
200bf88: 80 a0 a0 06 cmp %g2, 6
200bf8c: 02 80 00 05 be 200bfa0 <rtems_libio_to_fcntl_flags+0x1c>
200bf90: 82 10 20 02 mov 2, %g1
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
200bf94: 80 8a 20 02 btst 2, %o0
200bf98: 02 80 00 0e be 200bfd0 <rtems_libio_to_fcntl_flags+0x4c> <== NEVER TAKEN
200bf9c: 82 10 20 00 clr %g1
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
200bfa0: 80 8a 20 01 btst 1, %o0
200bfa4: 02 80 00 04 be 200bfb4 <rtems_libio_to_fcntl_flags+0x30>
200bfa8: 80 8a 22 00 btst 0x200, %o0
fcntl_flags |= O_NONBLOCK;
200bfac: 05 00 00 10 sethi %hi(0x4000), %g2
200bfb0: 82 10 40 02 or %g1, %g2, %g1
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
200bfb4: 32 80 00 02 bne,a 200bfbc <rtems_libio_to_fcntl_flags+0x38>
200bfb8: 82 10 60 08 or %g1, 8, %g1
fcntl_flags |= O_APPEND;
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
200bfbc: 80 8a 24 00 btst 0x400, %o0
200bfc0: 32 80 00 02 bne,a 200bfc8 <rtems_libio_to_fcntl_flags+0x44>
200bfc4: 82 10 62 00 or %g1, 0x200, %g1
fcntl_flags |= O_CREAT;
}
return fcntl_flags;
}
200bfc8: 81 c3 e0 08 retl
200bfcc: 90 10 00 01 mov %g1, %o0
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
200bfd0: 82 0a 20 04 and %o0, 4, %g1 <== NOT EXECUTED
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
200bfd4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
200bfd8: 10 bf ff f2 b 200bfa0 <rtems_libio_to_fcntl_flags+0x1c> <== NOT EXECUTED
200bfdc: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED
02006918 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
2006918: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
200691c: 03 00 80 8c sethi %hi(0x2023000), %g1
2006920: d0 00 61 94 ld [ %g1 + 0x194 ], %o0 ! 2023194 <RTEMS_Malloc_Heap>
2006924: 92 10 00 18 mov %i0, %o1
2006928: 40 00 19 c0 call 200d028 <_Protected_heap_Get_block_size>
200692c: 94 07 bf fc add %fp, -4, %o2
2006930: 80 8a 20 ff btst 0xff, %o0
2006934: 02 80 00 08 be 2006954 <rtems_malloc_statistics_at_free+0x3c><== NEVER TAKEN
2006938: c4 07 bf fc ld [ %fp + -4 ], %g2
MSBUMP(lifetime_freed, size);
200693c: 03 00 80 91 sethi %hi(0x2024400), %g1
2006940: 82 10 61 48 or %g1, 0x148, %g1 ! 2024548 <rtems_malloc_statistics>
2006944: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4
2006948: 86 83 40 02 addcc %o5, %g2, %g3
200694c: 84 43 20 00 addx %o4, 0, %g2
2006950: c4 38 60 28 std %g2, [ %g1 + 0x28 ]
2006954: 81 c7 e0 08 ret
2006958: 81 e8 00 00 restore
0200695c <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
200695c: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
2006960: 80 a6 20 00 cmp %i0, 0
2006964: 02 80 00 14 be 20069b4 <rtems_malloc_statistics_at_malloc+0x58><== NEVER TAKEN
2006968: c0 27 bf fc clr [ %fp + -4 ]
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
200696c: 03 00 80 8c sethi %hi(0x2023000), %g1
2006970: d0 00 61 94 ld [ %g1 + 0x194 ], %o0 ! 2023194 <RTEMS_Malloc_Heap>
2006974: 92 10 00 18 mov %i0, %o1
2006978: 40 00 19 ac call 200d028 <_Protected_heap_Get_block_size>
200697c: 94 07 bf fc add %fp, -4, %o2
MSBUMP(lifetime_allocated, actual_size);
2006980: c4 07 bf fc ld [ %fp + -4 ], %g2
2006984: 03 00 80 91 sethi %hi(0x2024400), %g1
2006988: 82 10 61 48 or %g1, 0x148, %g1 ! 2024548 <rtems_malloc_statistics>
200698c: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
2006990: f0 00 60 2c ld [ %g1 + 0x2c ], %i0
if (current_depth > s->max_depth)
2006994: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
2006998: 86 83 40 02 addcc %o5, %g2, %g3
200699c: 84 43 20 00 addx %o4, 0, %g2
20069a0: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
20069a4: 84 20 c0 18 sub %g3, %i0, %g2
if (current_depth > s->max_depth)
20069a8: 80 a0 80 04 cmp %g2, %g4
20069ac: 38 80 00 02 bgu,a 20069b4 <rtems_malloc_statistics_at_malloc+0x58>
20069b0: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
20069b4: 81 c7 e0 08 ret
20069b8: 81 e8 00 00 restore
0200fdbc <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
200fdbc: 9d e3 bf a0 save %sp, -96, %sp
200fdc0: ba 10 00 18 mov %i0, %i5
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
200fdc4: 80 a7 60 00 cmp %i5, 0
200fdc8: 02 80 00 22 be 200fe50 <rtems_memalign+0x94>
200fdcc: b0 10 20 16 mov 0x16, %i0
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200fdd0: 03 00 80 6c sethi %hi(0x201b000), %g1
200fdd4: c2 00 60 04 ld [ %g1 + 4 ], %g1 ! 201b004 <_System_state_Current>
200fdd8: 80 a0 60 03 cmp %g1, 3
200fddc: 02 80 00 18 be 200fe3c <rtems_memalign+0x80> <== ALWAYS TAKEN
200fde0: c0 27 40 00 clr [ %i5 ]
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
200fde4: 7f ff cf ad call 2003c98 <malloc_deferred_frees_process>
200fde8: b0 10 20 0c mov 0xc, %i0
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
200fdec: 03 00 80 68 sethi %hi(0x201a000), %g1
200fdf0: d0 00 61 78 ld [ %g1 + 0x178 ], %o0 ! 201a178 <RTEMS_Malloc_Heap>
200fdf4: 94 10 00 19 mov %i1, %o2
200fdf8: 92 10 00 1a mov %i2, %o1
200fdfc: 7f ff e5 ab call 20094a8 <_Protected_heap_Allocate_aligned_with_boundary>
200fe00: 96 10 20 00 clr %o3
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
200fe04: 80 a2 20 00 cmp %o0, 0
200fe08: 02 80 00 12 be 200fe50 <rtems_memalign+0x94>
200fe0c: b2 10 00 08 mov %o0, %i1
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
200fe10: 03 00 80 6a sethi %hi(0x201a800), %g1
200fe14: c2 00 61 b4 ld [ %g1 + 0x1b4 ], %g1 ! 201a9b4 <rtems_malloc_statistics_helpers>
200fe18: 80 a0 60 00 cmp %g1, 0
200fe1c: 22 80 00 06 be,a 200fe34 <rtems_memalign+0x78>
200fe20: f2 27 40 00 st %i1, [ %i5 ]
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
200fe24: c2 00 60 04 ld [ %g1 + 4 ], %g1
200fe28: 9f c0 40 00 call %g1
200fe2c: 90 10 00 1d mov %i5, %o0
*pointer = return_this;
200fe30: f2 27 40 00 st %i1, [ %i5 ]
return 0;
}
200fe34: 81 c7 e0 08 ret
200fe38: 91 e8 20 00 restore %g0, 0, %o0
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
200fe3c: 7f ff cf 85 call 2003c50 <malloc_is_system_state_OK>
200fe40: 01 00 00 00 nop
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200fe44: 80 8a 20 ff btst 0xff, %o0
200fe48: 12 bf ff e7 bne 200fde4 <rtems_memalign+0x28> <== ALWAYS TAKEN
200fe4c: 01 00 00 00 nop
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
200fe50: 81 c7 e0 08 ret
200fe54: 81 e8 00 00 restore
0200e4d8 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
200e4d8: 9d e3 bf 58 save %sp, -168, %sp
int success = 0;
char *dup_path = strdup(path);
200e4dc: 90 10 00 18 mov %i0, %o0
200e4e0: 40 00 0f 1e call 2012158 <strdup>
200e4e4: b0 10 3f ff mov -1, %i0
if (dup_path != NULL) {
200e4e8: 80 a2 20 00 cmp %o0, 0
200e4ec: 02 80 00 2e be 200e5a4 <rtems_mkdir+0xcc> <== NEVER TAKEN
200e4f0: ba 10 00 08 mov %o0, %i5
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
200e4f4: c2 0a 00 00 ldub [ %o0 ], %g1
200e4f8: 83 28 60 18 sll %g1, 0x18, %g1
200e4fc: 85 38 60 18 sra %g1, 0x18, %g2
200e500: 80 a0 a0 2f cmp %g2, 0x2f
200e504: 02 80 00 58 be 200e664 <rtems_mkdir+0x18c>
200e508: b8 10 00 08 mov %o0, %i4
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
200e50c: 83 38 60 18 sra %g1, 0x18, %g1
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
200e510: b4 10 20 00 clr %i2
200e514: 84 10 20 01 mov 1, %g2
retval = 0;
break;
}
}
if (!last)
*p = '/';
200e518: b0 10 20 2f mov 0x2f, %i0
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
200e51c: 23 00 00 3c sethi %hi(0xf000), %l1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
200e520: 80 a0 60 00 cmp %g1, 0
200e524: 02 80 00 0b be 200e550 <rtems_mkdir+0x78> <== NEVER TAKEN
200e528: 21 00 00 10 sethi %hi(0x4000), %l0
last = 1;
else if (p[0] != '/')
200e52c: 80 a0 60 2f cmp %g1, 0x2f
200e530: 22 80 00 49 be,a 200e654 <rtems_mkdir+0x17c>
200e534: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1
retval = 0;
break;
}
}
if (!last)
*p = '/';
200e538: c2 0f 20 01 ldub [ %i4 + 1 ], %g1
200e53c: 83 28 60 18 sll %g1, 0x18, %g1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
200e540: 83 38 60 18 sra %g1, 0x18, %g1
200e544: 80 a0 60 00 cmp %g1, 0
200e548: 12 bf ff f9 bne 200e52c <rtems_mkdir+0x54>
200e54c: b8 07 20 01 inc %i4
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
200e550: c0 2f 00 00 clrb [ %i4 ]
200e554: b6 10 20 01 mov 1, %i3
if (!last && p[1] == '\0')
last = 1;
if (first) {
200e558: 80 a0 a0 00 cmp %g2, 0
200e55c: 12 80 00 37 bne 200e638 <rtems_mkdir+0x160>
200e560: 01 00 00 00 nop
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
200e564: 80 a6 e0 00 cmp %i3, 0
200e568: 12 80 00 13 bne 200e5b4 <rtems_mkdir+0xdc>
200e56c: 92 10 21 ff mov 0x1ff, %o1
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
200e570: 7f ff d8 af call 200482c <mkdir>
200e574: 90 10 00 1d mov %i5, %o0
200e578: 80 a2 20 00 cmp %o0, 0
200e57c: 06 80 00 16 bl 200e5d4 <rtems_mkdir+0xfc>
200e580: 80 a6 e0 00 cmp %i3, 0
} else {
retval = 0;
break;
}
}
if (!last)
200e584: 22 80 00 0a be,a 200e5ac <rtems_mkdir+0xd4>
200e588: f0 2f 00 00 stb %i0, [ %i4 ]
200e58c: b8 10 20 01 mov 1, %i4
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
200e590: 7f ff d6 c4 call 20040a0 <free>
200e594: 90 10 00 1d mov %i5, %o0
}
return success != 0 ? 0 : -1;
200e598: 80 a7 20 00 cmp %i4, 0
200e59c: 02 80 00 48 be 200e6bc <rtems_mkdir+0x1e4> <== NEVER TAKEN
200e5a0: b0 10 20 00 clr %i0
}
200e5a4: 81 c7 e0 08 ret
200e5a8: 81 e8 00 00 restore
retval = 0;
break;
}
}
if (!last)
*p = '/';
200e5ac: 10 bf ff e3 b 200e538 <rtems_mkdir+0x60>
200e5b0: 84 10 20 00 clr %g2
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
200e5b4: 40 00 00 7d call 200e7a8 <umask>
200e5b8: 90 10 00 1a mov %i2, %o0
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
200e5bc: 92 10 00 19 mov %i1, %o1
200e5c0: 7f ff d8 9b call 200482c <mkdir>
200e5c4: 90 10 00 1d mov %i5, %o0
200e5c8: 80 a2 20 00 cmp %o0, 0
200e5cc: 16 bf ff ee bge 200e584 <rtems_mkdir+0xac>
200e5d0: 80 a6 e0 00 cmp %i3, 0
if (errno == EEXIST || errno == EISDIR) {
200e5d4: 40 00 0b 53 call 2011320 <__errno>
200e5d8: 01 00 00 00 nop
200e5dc: c2 02 00 00 ld [ %o0 ], %g1
200e5e0: 80 a0 60 11 cmp %g1, 0x11
200e5e4: 02 80 00 08 be 200e604 <rtems_mkdir+0x12c>
200e5e8: 90 10 00 1d mov %i5, %o0
200e5ec: 40 00 0b 4d call 2011320 <__errno>
200e5f0: 01 00 00 00 nop
200e5f4: c2 02 00 00 ld [ %o0 ], %g1
200e5f8: 80 a0 60 15 cmp %g1, 0x15
200e5fc: 12 80 00 32 bne 200e6c4 <rtems_mkdir+0x1ec> <== ALWAYS TAKEN
200e600: 90 10 00 1d mov %i5, %o0
if (stat(path, &sb) < 0) {
200e604: 40 00 00 34 call 200e6d4 <stat>
200e608: 92 07 bf b8 add %fp, -72, %o1
200e60c: 80 a2 20 00 cmp %o0, 0
200e610: 06 80 00 2d bl 200e6c4 <rtems_mkdir+0x1ec> <== NEVER TAKEN
200e614: c2 07 bf c4 ld [ %fp + -60 ], %g1
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
200e618: 82 08 40 11 and %g1, %l1, %g1
200e61c: 80 a0 40 10 cmp %g1, %l0
200e620: 12 80 00 15 bne 200e674 <rtems_mkdir+0x19c>
200e624: 80 a6 e0 00 cmp %i3, 0
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
200e628: 22 bf ff e1 be,a 200e5ac <rtems_mkdir+0xd4>
200e62c: f0 2f 00 00 stb %i0, [ %i4 ]
retval = 2;
200e630: 10 bf ff d8 b 200e590 <rtems_mkdir+0xb8>
200e634: b8 10 20 02 mov 2, %i4
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
200e638: 40 00 00 5c call 200e7a8 <umask>
200e63c: 90 10 20 00 clr %o0
200e640: b4 10 00 08 mov %o0, %i2
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
200e644: 40 00 00 59 call 200e7a8 <umask>
200e648: 90 0a 3f 3f and %o0, -193, %o0
first = 0;
}
if (last)
200e64c: 10 bf ff c7 b 200e568 <rtems_mkdir+0x90>
200e650: 80 a6 e0 00 cmp %i3, 0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
200e654: c0 2f 00 00 clrb [ %i4 ]
if (!last && p[1] == '\0')
200e658: 80 a0 00 01 cmp %g0, %g1
200e65c: 10 bf ff bf b 200e558 <rtems_mkdir+0x80>
200e660: b6 60 3f ff subx %g0, -1, %i3
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
200e664: c2 0a 20 01 ldub [ %o0 + 1 ], %g1
200e668: b8 02 20 01 add %o0, 1, %i4
200e66c: 10 bf ff a8 b 200e50c <rtems_mkdir+0x34>
200e670: 83 28 60 18 sll %g1, 0x18, %g1
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
200e674: 02 80 00 0a be 200e69c <rtems_mkdir+0x1c4>
200e678: 01 00 00 00 nop
errno = EEXIST;
200e67c: 40 00 0b 29 call 2011320 <__errno>
200e680: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200e684: 82 10 20 11 mov 0x11, %g1
200e688: c2 22 00 00 st %g1, [ %o0 ]
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
200e68c: 7f ff d6 85 call 20040a0 <free>
200e690: 90 10 00 1d mov %i5, %o0
200e694: 81 c7 e0 08 ret
200e698: 81 e8 00 00 restore
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
200e69c: 40 00 0b 21 call 2011320 <__errno>
200e6a0: 01 00 00 00 nop
200e6a4: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200e6a8: c2 22 00 00 st %g1, [ %o0 ]
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
200e6ac: 40 00 00 3f call 200e7a8 <umask>
200e6b0: 90 10 00 1a mov %i2, %o0
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
200e6b4: 7f ff d6 7b call 20040a0 <free>
200e6b8: 90 10 00 1d mov %i5, %o0
}
return success != 0 ? 0 : -1;
}
200e6bc: 81 c7 e0 08 ret
200e6c0: 91 e8 3f ff restore %g0, -1, %o0
}
}
if (!last)
*p = '/';
}
if (!first && !last)
200e6c4: 80 a6 e0 00 cmp %i3, 0
200e6c8: 02 bf ff f9 be 200e6ac <rtems_mkdir+0x1d4> <== NEVER TAKEN
200e6cc: 01 00 00 00 nop
200e6d0: 30 bf ff f9 b,a 200e6b4 <rtems_mkdir+0x1dc>
020081c8 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
20081c8: 9d e3 bf a0 save %sp, -96, %sp
20081cc: 90 10 00 18 mov %i0, %o0
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
20081d0: 80 a6 a0 00 cmp %i2, 0
20081d4: 02 80 00 21 be 2008258 <rtems_object_get_class_information+0x90>
20081d8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
20081dc: 93 2e 60 10 sll %i1, 0x10, %o1
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
20081e0: b0 10 20 0a mov 0xa, %i0
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
20081e4: 40 00 07 82 call 2009fec <_Objects_Get_information>
20081e8: 93 32 60 10 srl %o1, 0x10, %o1
if ( !obj_info )
20081ec: 80 a2 20 00 cmp %o0, 0
20081f0: 02 80 00 1a be 2008258 <rtems_object_get_class_information+0x90>
20081f4: 01 00 00 00 nop
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
20081f8: c4 02 20 0c ld [ %o0 + 0xc ], %g2
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
20081fc: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2008200: c6 02 20 08 ld [ %o0 + 8 ], %g3
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
2008204: c2 0a 20 12 ldub [ %o0 + 0x12 ], %g1
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
2008208: c4 26 a0 04 st %g2, [ %i2 + 4 ]
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
200820c: c6 26 80 00 st %g3, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
2008210: c2 2e a0 0c stb %g1, [ %i2 + 0xc ]
info->maximum = obj_info->maximum;
2008214: c8 26 a0 08 st %g4, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2008218: 80 a1 20 00 cmp %g4, 0
200821c: 02 80 00 0d be 2008250 <rtems_object_get_class_information+0x88><== NEVER TAKEN
2008220: 84 10 20 00 clr %g2
2008224: de 02 20 1c ld [ %o0 + 0x1c ], %o7
2008228: 86 10 20 01 mov 1, %g3
200822c: 82 10 20 01 mov 1, %g1
if ( !obj_info->local_table[i] )
2008230: 87 28 e0 02 sll %g3, 2, %g3
2008234: c6 03 c0 03 ld [ %o7 + %g3 ], %g3
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2008238: 82 00 60 01 inc %g1
if ( !obj_info->local_table[i] )
unallocated++;
200823c: 80 a0 00 03 cmp %g0, %g3
2008240: 84 60 bf ff subx %g2, -1, %g2
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2008244: 80 a1 00 01 cmp %g4, %g1
2008248: 1a bf ff fa bcc 2008230 <rtems_object_get_class_information+0x68>
200824c: 86 10 00 01 mov %g1, %g3
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
2008250: c4 26 a0 10 st %g2, [ %i2 + 0x10 ]
return RTEMS_SUCCESSFUL;
2008254: b0 10 20 00 clr %i0
}
2008258: 81 c7 e0 08 ret
200825c: 81 e8 00 00 restore
02013dcc <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
2013dcc: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
2013dd0: 80 a6 20 00 cmp %i0, 0
2013dd4: 12 80 00 04 bne 2013de4 <rtems_partition_create+0x18>
2013dd8: 82 10 20 03 mov 3, %g1
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
2013ddc: 81 c7 e0 08 ret
2013de0: 91 e8 00 01 restore %g0, %g1, %o0
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
2013de4: 80 a6 60 00 cmp %i1, 0
2013de8: 02 bf ff fd be 2013ddc <rtems_partition_create+0x10>
2013dec: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
2013df0: 80 a7 60 00 cmp %i5, 0
2013df4: 02 bf ff fa be 2013ddc <rtems_partition_create+0x10> <== NEVER TAKEN
2013df8: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
2013dfc: 02 bf ff f8 be 2013ddc <rtems_partition_create+0x10>
2013e00: 82 10 20 08 mov 8, %g1
2013e04: 80 a6 a0 00 cmp %i2, 0
2013e08: 02 bf ff f5 be 2013ddc <rtems_partition_create+0x10>
2013e0c: 80 a6 80 1b cmp %i2, %i3
2013e10: 0a bf ff f3 bcs 2013ddc <rtems_partition_create+0x10>
2013e14: 80 8e e0 07 btst 7, %i3
2013e18: 12 bf ff f1 bne 2013ddc <rtems_partition_create+0x10>
2013e1c: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
2013e20: 12 bf ff ef bne 2013ddc <rtems_partition_create+0x10>
2013e24: 82 10 20 09 mov 9, %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2013e28: 03 00 80 ee sethi %hi(0x203b800), %g1
2013e2c: c4 00 60 00 ld [ %g1 ], %g2
2013e30: 84 00 a0 01 inc %g2
2013e34: c4 20 60 00 st %g2, [ %g1 ]
return _Thread_Dispatch_disable_level;
2013e38: c2 00 60 00 ld [ %g1 ], %g1
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
2013e3c: 23 00 80 ed sethi %hi(0x203b400), %l1
2013e40: 40 00 13 78 call 2018c20 <_Objects_Allocate>
2013e44: 90 14 62 14 or %l1, 0x214, %o0 ! 203b614 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
2013e48: a0 92 20 00 orcc %o0, 0, %l0
2013e4c: 02 80 00 1a be 2013eb4 <rtems_partition_create+0xe8>
2013e50: 92 10 00 1b mov %i3, %o1
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
2013e54: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
2013e58: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
2013e5c: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
2013e60: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2013e64: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
2013e68: 40 00 5c 6a call 202b010 <.udiv>
2013e6c: 90 10 00 1a mov %i2, %o0
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2013e70: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
2013e74: 94 10 00 08 mov %o0, %o2
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2013e78: 96 10 00 1b mov %i3, %o3
2013e7c: b8 04 20 24 add %l0, 0x24, %i4
2013e80: 40 00 0c fc call 2017270 <_Chain_Initialize>
2013e84: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2013e88: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
2013e8c: a2 14 62 14 or %l1, 0x214, %l1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2013e90: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2013e94: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2013e98: 85 28 a0 02 sll %g2, 2, %g2
2013e9c: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2013ea0: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
2013ea4: 40 00 18 b8 call 201a184 <_Thread_Enable_dispatch>
2013ea8: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
2013eac: 10 bf ff cc b 2013ddc <rtems_partition_create+0x10>
2013eb0: 82 10 20 00 clr %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
2013eb4: 40 00 18 b4 call 201a184 <_Thread_Enable_dispatch>
2013eb8: 01 00 00 00 nop
return RTEMS_TOO_MANY;
2013ebc: 10 bf ff c8 b 2013ddc <rtems_partition_create+0x10>
2013ec0: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5>
02007630 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2007630: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
2007634: 11 00 80 7e sethi %hi(0x201f800), %o0
2007638: 92 10 00 18 mov %i0, %o1
200763c: 90 12 20 44 or %o0, 0x44, %o0
2007640: 40 00 09 82 call 2009c48 <_Objects_Get>
2007644: 94 07 bf fc add %fp, -4, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
2007648: c2 07 bf fc ld [ %fp + -4 ], %g1
200764c: 80 a0 60 00 cmp %g1, 0
2007650: 12 80 00 0d bne 2007684 <rtems_rate_monotonic_period+0x54>
2007654: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2007658: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
200765c: 39 00 80 7f sethi %hi(0x201fc00), %i4
2007660: b8 17 22 f0 or %i4, 0x2f0, %i4 ! 201fef0 <_Per_CPU_Information>
2007664: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2007668: 80 a0 80 01 cmp %g2, %g1
200766c: 02 80 00 08 be 200768c <rtems_rate_monotonic_period+0x5c>
2007670: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
2007674: 40 00 0d 73 call 200ac40 <_Thread_Enable_dispatch>
2007678: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
200767c: 81 c7 e0 08 ret
2007680: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007684: 81 c7 e0 08 ret
2007688: 91 e8 20 04 restore %g0, 4, %o0
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
200768c: 12 80 00 0e bne 20076c4 <rtems_rate_monotonic_period+0x94>
2007690: 01 00 00 00 nop
switch ( the_period->state ) {
2007694: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2007698: 80 a0 60 04 cmp %g1, 4
200769c: 18 80 00 06 bgu 20076b4 <rtems_rate_monotonic_period+0x84><== NEVER TAKEN
20076a0: b0 10 20 00 clr %i0
20076a4: 83 28 60 02 sll %g1, 2, %g1
20076a8: 05 00 80 75 sethi %hi(0x201d400), %g2
20076ac: 84 10 a2 34 or %g2, 0x234, %g2 ! 201d634 <CSWTCH.2>
20076b0: f0 00 80 01 ld [ %g2 + %g1 ], %i0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
20076b4: 40 00 0d 63 call 200ac40 <_Thread_Enable_dispatch>
20076b8: 01 00 00 00 nop
return RTEMS_TIMEOUT;
20076bc: 81 c7 e0 08 ret
20076c0: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
20076c4: 7f ff ed d8 call 2002e24 <sparc_disable_interrupts>
20076c8: 01 00 00 00 nop
20076cc: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
20076d0: f6 07 60 38 ld [ %i5 + 0x38 ], %i3
20076d4: 80 a6 e0 00 cmp %i3, 0
20076d8: 02 80 00 19 be 200773c <rtems_rate_monotonic_period+0x10c>
20076dc: 80 a6 e0 02 cmp %i3, 2
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
20076e0: 02 80 00 2e be 2007798 <rtems_rate_monotonic_period+0x168>
20076e4: 80 a6 e0 04 cmp %i3, 4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
20076e8: 12 bf ff e5 bne 200767c <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
20076ec: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
20076f0: 7f ff ff 92 call 2007538 <_Rate_monotonic_Update_statistics>
20076f4: 90 10 00 1d mov %i5, %o0
_ISR_Enable( level );
20076f8: 7f ff ed cf call 2002e34 <sparc_enable_interrupts>
20076fc: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2007700: 82 10 20 02 mov 2, %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007704: 92 07 60 10 add %i5, 0x10, %o1
2007708: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
200770c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007710: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007714: 11 00 80 7e sethi %hi(0x201f800), %o0
2007718: 40 00 11 6f call 200bcd4 <_Watchdog_Insert>
200771c: 90 12 22 6c or %o0, 0x26c, %o0 ! 201fa6c <_Watchdog_Ticks_chain>
2007720: d0 07 60 40 ld [ %i5 + 0x40 ], %o0
2007724: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
2007728: 03 00 80 7b sethi %hi(0x201ec00), %g1
200772c: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201ec78 <_Scheduler+0x34>
2007730: 9f c0 40 00 call %g1
2007734: b0 10 20 06 mov 6, %i0
2007738: 30 bf ff df b,a 20076b4 <rtems_rate_monotonic_period+0x84>
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
200773c: 7f ff ed be call 2002e34 <sparc_enable_interrupts>
2007740: 01 00 00 00 nop
the_period->next_length = length;
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2007744: 90 10 00 1d mov %i5, %o0
2007748: 7f ff ff 56 call 20074a0 <_Rate_monotonic_Initiate_statistics>
200774c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
the_period->state = RATE_MONOTONIC_ACTIVE;
2007750: 82 10 20 02 mov 2, %g1
2007754: 92 07 60 10 add %i5, 0x10, %o1
2007758: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
200775c: 11 00 80 7e sethi %hi(0x201f800), %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007760: 03 00 80 1e sethi %hi(0x2007800), %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007764: 90 12 22 6c or %o0, 0x26c, %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007768: 82 10 62 ec or %g1, 0x2ec, %g1
the_watchdog->id = id;
200776c: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007770: c2 27 60 2c st %g1, [ %i5 + 0x2c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007774: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2007778: c0 27 60 34 clr [ %i5 + 0x34 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200777c: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007780: 40 00 11 55 call 200bcd4 <_Watchdog_Insert>
2007784: b0 10 20 00 clr %i0
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2007788: 40 00 0d 2e call 200ac40 <_Thread_Enable_dispatch>
200778c: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2007790: 81 c7 e0 08 ret
2007794: 81 e8 00 00 restore
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2007798: 7f ff ff 68 call 2007538 <_Rate_monotonic_Update_statistics>
200779c: 90 10 00 1d mov %i5, %o0
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
20077a0: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
20077a4: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
20077a8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
20077ac: 7f ff ed a2 call 2002e34 <sparc_enable_interrupts>
20077b0: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
20077b4: c2 07 20 0c ld [ %i4 + 0xc ], %g1
20077b8: c4 07 60 08 ld [ %i5 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
20077bc: 90 10 00 01 mov %g1, %o0
20077c0: 13 00 00 10 sethi %hi(0x4000), %o1
20077c4: 40 00 0f 7b call 200b5b0 <_Thread_Set_state>
20077c8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
20077cc: 7f ff ed 96 call 2002e24 <sparc_disable_interrupts>
20077d0: 01 00 00 00 nop
local_state = the_period->state;
20077d4: f4 07 60 38 ld [ %i5 + 0x38 ], %i2
the_period->state = RATE_MONOTONIC_ACTIVE;
20077d8: f6 27 60 38 st %i3, [ %i5 + 0x38 ]
_ISR_Enable( level );
20077dc: 7f ff ed 96 call 2002e34 <sparc_enable_interrupts>
20077e0: 01 00 00 00 nop
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
20077e4: 80 a6 a0 03 cmp %i2, 3
20077e8: 22 80 00 06 be,a 2007800 <rtems_rate_monotonic_period+0x1d0>
20077ec: d0 07 20 0c ld [ %i4 + 0xc ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
20077f0: 40 00 0d 14 call 200ac40 <_Thread_Enable_dispatch>
20077f4: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
20077f8: 81 c7 e0 08 ret
20077fc: 81 e8 00 00 restore
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2007800: 40 00 0c 1b call 200a86c <_Thread_Clear_state>
2007804: 13 00 00 10 sethi %hi(0x4000), %o1
2007808: 30 bf ff fa b,a 20077f0 <rtems_rate_monotonic_period+0x1c0>
0200780c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200780c: 9d e3 bf 38 save %sp, -200, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
2007810: 80 a6 60 00 cmp %i1, 0
2007814: 02 80 00 48 be 2007934 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
2007818: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
200781c: 13 00 80 75 sethi %hi(0x201d400), %o1
2007820: 9f c6 40 00 call %i1
2007824: 92 12 62 48 or %o1, 0x248, %o1 ! 201d648 <CSWTCH.2+0x14>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
2007828: 90 10 00 18 mov %i0, %o0
200782c: 13 00 80 75 sethi %hi(0x201d400), %o1
2007830: 9f c6 40 00 call %i1
2007834: 92 12 62 68 or %o1, 0x268, %o1 ! 201d668 <CSWTCH.2+0x34>
(*print)( context, "--- Wall times are in seconds ---\n" );
2007838: 90 10 00 18 mov %i0, %o0
200783c: 13 00 80 75 sethi %hi(0x201d400), %o1
2007840: 9f c6 40 00 call %i1
2007844: 92 12 62 90 or %o1, 0x290, %o1 ! 201d690 <CSWTCH.2+0x5c>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
2007848: 90 10 00 18 mov %i0, %o0
200784c: 13 00 80 75 sethi %hi(0x201d400), %o1
2007850: 9f c6 40 00 call %i1
2007854: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 201d6b8 <CSWTCH.2+0x84>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
2007858: 90 10 00 18 mov %i0, %o0
200785c: 13 00 80 75 sethi %hi(0x201d400), %o1
2007860: 9f c6 40 00 call %i1
2007864: 92 12 63 08 or %o1, 0x308, %o1 ! 201d708 <CSWTCH.2+0xd4>
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007868: 39 00 80 7e sethi %hi(0x201f800), %i4
200786c: b8 17 20 44 or %i4, 0x44, %i4 ! 201f844 <_Rate_monotonic_Information>
2007870: fa 07 20 08 ld [ %i4 + 8 ], %i5
2007874: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2007878: 80 a7 40 01 cmp %i5, %g1
200787c: 18 80 00 2e bgu 2007934 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
2007880: 35 00 80 75 sethi %hi(0x201d400), %i2
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
2007884: 23 00 80 75 sethi %hi(0x201d400), %l1
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
2007888: 21 00 80 75 sethi %hi(0x201d400), %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
200788c: 37 00 80 72 sethi %hi(0x201c800), %i3
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2007890: b4 16 a3 58 or %i2, 0x358, %i2
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
2007894: a2 14 63 70 or %l1, 0x370, %l1
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
2007898: a0 14 23 90 or %l0, 0x390, %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
200789c: 10 80 00 06 b 20078b4 <rtems_rate_monotonic_report_statistics_with_plugin+0xa8>
20078a0: b6 16 e0 c8 or %i3, 0xc8, %i3
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
20078a4: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20078a8: 80 a0 40 1d cmp %g1, %i5
20078ac: 0a 80 00 22 bcs 2007934 <rtems_rate_monotonic_report_statistics_with_plugin+0x128>
20078b0: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
20078b4: 90 10 00 1d mov %i5, %o0
20078b8: 40 00 1b dc call 200e828 <rtems_rate_monotonic_get_statistics>
20078bc: 92 07 bf a0 add %fp, -96, %o1
if ( status != RTEMS_SUCCESSFUL )
20078c0: 80 a2 20 00 cmp %o0, 0
20078c4: 32 bf ff f8 bne,a 20078a4 <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
20078c8: c2 07 20 0c ld [ %i4 + 0xc ], %g1
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
20078cc: 92 07 bf d8 add %fp, -40, %o1
20078d0: 40 00 1c 05 call 200e8e4 <rtems_rate_monotonic_get_status>
20078d4: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
20078d8: d0 07 bf d8 ld [ %fp + -40 ], %o0
20078dc: 92 10 20 05 mov 5, %o1
20078e0: 40 00 00 b4 call 2007bb0 <rtems_object_get_name>
20078e4: 94 07 bf f8 add %fp, -8, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20078e8: d8 1f bf a0 ldd [ %fp + -96 ], %o4
20078ec: 92 10 00 1a mov %i2, %o1
20078f0: 94 10 00 1d mov %i5, %o2
20078f4: 90 10 00 18 mov %i0, %o0
20078f8: 9f c6 40 00 call %i1
20078fc: 96 07 bf f8 add %fp, -8, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2007900: c2 07 bf a0 ld [ %fp + -96 ], %g1
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
2007904: 94 07 bf f0 add %fp, -16, %o2
2007908: 90 07 bf b8 add %fp, -72, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
200790c: 80 a0 60 00 cmp %g1, 0
2007910: 12 80 00 0b bne 200793c <rtems_rate_monotonic_report_statistics_with_plugin+0x130>
2007914: 92 10 00 1b mov %i3, %o1
(*print)( context, "\n" );
2007918: 9f c6 40 00 call %i1
200791c: 90 10 00 18 mov %i0, %o0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007920: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2007924: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007928: 80 a0 40 1d cmp %g1, %i5
200792c: 1a bf ff e3 bcc 20078b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xac><== ALWAYS TAKEN
2007930: 90 10 00 1d mov %i5, %o0
2007934: 81 c7 e0 08 ret
2007938: 81 e8 00 00 restore
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
200793c: 40 00 0f aa call 200b7e4 <_Timespec_Divide_by_integer>
2007940: 92 10 00 01 mov %g1, %o1
(*print)( context,
2007944: d0 07 bf ac ld [ %fp + -84 ], %o0
2007948: 40 00 4a 3e call 201a240 <.div>
200794c: 92 10 23 e8 mov 0x3e8, %o1
2007950: aa 10 00 08 mov %o0, %l5
2007954: d0 07 bf b4 ld [ %fp + -76 ], %o0
2007958: 40 00 4a 3a call 201a240 <.div>
200795c: 92 10 23 e8 mov 0x3e8, %o1
2007960: c2 07 bf f0 ld [ %fp + -16 ], %g1
2007964: a6 10 00 08 mov %o0, %l3
2007968: d0 07 bf f4 ld [ %fp + -12 ], %o0
200796c: e4 07 bf a8 ld [ %fp + -88 ], %l2
2007970: e8 07 bf b0 ld [ %fp + -80 ], %l4
2007974: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2007978: 40 00 4a 32 call 201a240 <.div>
200797c: 92 10 23 e8 mov 0x3e8, %o1
2007980: 96 10 00 15 mov %l5, %o3
2007984: 98 10 00 14 mov %l4, %o4
2007988: 9a 10 00 13 mov %l3, %o5
200798c: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2007990: 92 10 00 11 mov %l1, %o1
2007994: 94 10 00 12 mov %l2, %o2
2007998: 9f c6 40 00 call %i1
200799c: 90 10 00 18 mov %i0, %o0
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
20079a0: d2 07 bf a0 ld [ %fp + -96 ], %o1
20079a4: 94 07 bf f0 add %fp, -16, %o2
20079a8: 40 00 0f 8f call 200b7e4 <_Timespec_Divide_by_integer>
20079ac: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
20079b0: d0 07 bf c4 ld [ %fp + -60 ], %o0
20079b4: 40 00 4a 23 call 201a240 <.div>
20079b8: 92 10 23 e8 mov 0x3e8, %o1
20079bc: a8 10 00 08 mov %o0, %l4
20079c0: d0 07 bf cc ld [ %fp + -52 ], %o0
20079c4: 40 00 4a 1f call 201a240 <.div>
20079c8: 92 10 23 e8 mov 0x3e8, %o1
20079cc: c2 07 bf f0 ld [ %fp + -16 ], %g1
20079d0: a4 10 00 08 mov %o0, %l2
20079d4: d0 07 bf f4 ld [ %fp + -12 ], %o0
20079d8: ea 07 bf c0 ld [ %fp + -64 ], %l5
20079dc: e6 07 bf c8 ld [ %fp + -56 ], %l3
20079e0: 92 10 23 e8 mov 0x3e8, %o1
20079e4: 40 00 4a 17 call 201a240 <.div>
20079e8: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20079ec: 92 10 00 10 mov %l0, %o1
20079f0: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
20079f4: 94 10 00 15 mov %l5, %o2
20079f8: 90 10 00 18 mov %i0, %o0
20079fc: 96 10 00 14 mov %l4, %o3
2007a00: 98 10 00 13 mov %l3, %o4
2007a04: 9f c6 40 00 call %i1
2007a08: 9a 10 00 12 mov %l2, %o5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007a0c: 10 bf ff a6 b 20078a4 <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
2007a10: c2 07 20 0c ld [ %i4 + 0xc ], %g1
02007a2c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
2007a2c: 9d e3 bf a0 save %sp, -96, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007a30: 03 00 80 7e sethi %hi(0x201f800), %g1
2007a34: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 ! 201f9b0 <_Thread_Dispatch_disable_level>
2007a38: 84 00 a0 01 inc %g2
2007a3c: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ]
return _Thread_Dispatch_disable_level;
2007a40: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007a44: 39 00 80 7e sethi %hi(0x201f800), %i4
2007a48: b8 17 20 44 or %i4, 0x44, %i4 ! 201f844 <_Rate_monotonic_Information>
2007a4c: fa 07 20 08 ld [ %i4 + 8 ], %i5
2007a50: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2007a54: 80 a7 40 01 cmp %i5, %g1
2007a58: 18 80 00 09 bgu 2007a7c <rtems_rate_monotonic_reset_all_statistics+0x50><== NEVER TAKEN
2007a5c: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
2007a60: 40 00 00 09 call 2007a84 <rtems_rate_monotonic_reset_statistics>
2007a64: 90 10 00 1d mov %i5, %o0
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007a68: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2007a6c: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2007a70: 80 a0 40 1d cmp %g1, %i5
2007a74: 1a bf ff fb bcc 2007a60 <rtems_rate_monotonic_reset_all_statistics+0x34>
2007a78: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
2007a7c: 40 00 0c 71 call 200ac40 <_Thread_Enable_dispatch>
2007a80: 81 e8 00 00 restore
0201adf4 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
201adf4: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
201adf8: 92 07 bf fc add %fp, -4, %o1
201adfc: 90 10 00 18 mov %i0, %o0
201ae00: 7f ff fe 29 call 201a6a4 <rtems_rfs_bitmap_load_map>
201ae04: ba 10 00 18 mov %i0, %i5
if (rc > 0)
201ae08: 80 a2 20 00 cmp %o0, 0
201ae0c: 24 80 00 04 ble,a 201ae1c <rtems_rfs_bitmap_create_search+0x28><== ALWAYS TAKEN
201ae10: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
bit++;
map++;
}
return 0;
}
201ae14: 81 c7 e0 08 ret <== NOT EXECUTED
201ae18: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (rc > 0)
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
201ae1c: de 06 20 0c ld [ %i0 + 0xc ], %o7
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
201ae20: c0 26 20 10 clr [ %i0 + 0x10 ]
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201ae24: 82 10 3f ff mov -1, %g1
201ae28: c2 22 40 00 st %g1, [ %o1 ]
while (size)
201ae2c: 80 a3 e0 00 cmp %o7, 0
201ae30: 02 bf ff f9 be 201ae14 <rtems_rfs_bitmap_create_search+0x20><== NEVER TAKEN
201ae34: 90 10 20 00 clr %o0
201ae38: d8 07 bf fc ld [ %fp + -4 ], %o4
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
201ae3c: 96 10 20 00 clr %o3
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201ae40: 90 10 3f ff mov -1, %o0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201ae44: 9a 10 20 01 mov 1, %o5
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
201ae48: 80 a3 e0 1f cmp %o7, 0x1f
201ae4c: 38 80 00 20 bgu,a 201aecc <rtems_rfs_bitmap_create_search+0xd8>
201ae50: c6 03 00 00 ld [ %o4 ], %g3
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
201ae54: c2 03 00 00 ld [ %o4 ], %g1
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201ae58: 86 20 00 0f neg %o7, %g3
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
201ae5c: 88 10 00 0f mov %o7, %g4
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201ae60: 87 32 00 03 srl %o0, %g3, %g3
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
201ae64: 94 10 00 0f mov %o7, %o2
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
201ae68: 86 08 c0 01 and %g3, %g1, %g3
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
201ae6c: 80 a0 e0 00 cmp %g3, 0
201ae70: 02 80 00 0e be 201aea8 <rtems_rfs_bitmap_create_search+0xb4>
201ae74: 80 a2 e0 20 cmp %o3, 0x20
201ae78: 82 10 20 00 clr %g1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201ae7c: 85 2b 40 01 sll %o5, %g1, %g2
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
201ae80: 80 88 80 03 btst %g2, %g3
201ae84: 02 80 00 05 be 201ae98 <rtems_rfs_bitmap_create_search+0xa4>
201ae88: 82 00 60 01 inc %g1
control->free++;
201ae8c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
201ae90: 84 00 a0 01 inc %g2
201ae94: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
201ae98: 80 a1 00 01 cmp %g4, %g1
201ae9c: 14 bf ff f9 bg 201ae80 <rtems_rfs_bitmap_create_search+0x8c>
201aea0: 85 2b 40 01 sll %o5, %g1, %g2
control->free++;
}
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
201aea4: 80 a2 e0 20 cmp %o3, 0x20
201aea8: 02 80 00 0c be 201aed8 <rtems_rfs_bitmap_create_search+0xe4><== NEVER TAKEN
201aeac: 9e 23 c0 0a sub %o7, %o2, %o7
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
201aeb0: 96 02 e0 01 inc %o3
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
201aeb4: 80 a3 e0 00 cmp %o7, 0
201aeb8: 12 bf ff e4 bne 201ae48 <rtems_rfs_bitmap_create_search+0x54>
201aebc: 98 03 20 04 add %o4, 4, %o4
else
bit++;
map++;
}
return 0;
201aec0: 90 10 20 00 clr %o0
}
201aec4: 81 c7 e0 08 ret
201aec8: 91 e8 00 08 restore %g0, %o0, %o0
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
201aecc: 94 10 20 20 mov 0x20, %o2
available = rtems_rfs_bitmap_element_bits ();
201aed0: 10 bf ff e7 b 201ae6c <rtems_rfs_bitmap_create_search+0x78>
201aed4: 88 10 20 20 mov 0x20, %g4
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201aed8: d0 22 60 04 st %o0, [ %o1 + 4 ] <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
201aedc: 96 10 20 00 clr %o3 <== NOT EXECUTED
search_map++;
201aee0: 10 bf ff f5 b 201aeb4 <rtems_rfs_bitmap_create_search+0xc0><== NOT EXECUTED
201aee4: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED
0201a6a4 <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)
{
201a6a4: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (!control->buffer)
201a6a8: c2 06 00 00 ld [ %i0 ], %g1
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
201a6ac: ba 10 00 18 mov %i0, %i5
int rc;
if (!control->buffer)
201a6b0: 80 a0 60 00 cmp %g1, 0
201a6b4: 02 80 00 0f be 201a6f0 <rtems_rfs_bitmap_load_map+0x4c> <== NEVER TAKEN
201a6b8: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
201a6bc: c0 26 40 00 clr [ %i1 ]
rc = rtems_rfs_buffer_handle_request (control->fs,
201a6c0: d4 07 60 08 ld [ %i5 + 8 ], %o2
201a6c4: d0 07 60 04 ld [ %i5 + 4 ], %o0
201a6c8: d2 07 40 00 ld [ %i5 ], %o1
201a6cc: 40 00 07 28 call 201c36c <rtems_rfs_buffer_handle_request>
201a6d0: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
201a6d4: b0 92 20 00 orcc %o0, 0, %i0
201a6d8: 12 80 00 06 bne 201a6f0 <rtems_rfs_bitmap_load_map+0x4c> <== NEVER TAKEN
201a6dc: 01 00 00 00 nop
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201a6e0: c2 07 40 00 ld [ %i5 ], %g1
201a6e4: c2 00 60 08 ld [ %g1 + 8 ], %g1
201a6e8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
201a6ec: c2 26 40 00 st %g1, [ %i1 ]
return 0;
}
201a6f0: 81 c7 e0 08 ret
201a6f4: 81 e8 00 00 restore
0201ad0c <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)
{
201ad0c: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
201ad10: c0 2e 80 00 clrb [ %i2 ]
* of bits from the original seed above then below. That is search from the
* seed up then from the seed down a window number of bits, then repeat the
* process from the window distance from the seed, again above then
* below. Keep moving out until all bits have been searched.
*/
upper_seed = seed;
201ad14: ba 10 00 19 mov %i1, %i5
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
201ad18: 80 a7 60 00 cmp %i5, 0
201ad1c: 06 80 00 1f bl 201ad98 <rtems_rfs_bitmap_map_alloc+0x8c> <== NEVER TAKEN
201ad20: 80 a6 60 00 cmp %i1, 0
201ad24: c2 06 20 0c ld [ %i0 + 0xc ], %g1
201ad28: 80 a7 40 01 cmp %i5, %g1
201ad2c: 1a 80 00 1b bcc 201ad98 <rtems_rfs_bitmap_map_alloc+0x8c> <== NEVER TAKEN
201ad30: 80 a6 60 00 cmp %i1, 0
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
201ad34: fa 26 c0 00 st %i5, [ %i3 ]
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
201ad38: 90 10 00 18 mov %i0, %o0
201ad3c: 92 10 00 1b mov %i3, %o1
201ad40: 94 10 00 1a mov %i2, %o2
201ad44: 7f ff fe 6d call 201a6f8 <rtems_rfs_search_map_for_clear_bit.constprop.1>
201ad48: 96 10 20 01 mov 1, %o3
window, 1);
if ((rc > 0) || *allocated)
201ad4c: 80 a2 20 00 cmp %o0, 0
201ad50: 14 80 00 27 bg 201adec <rtems_rfs_bitmap_map_alloc+0xe0> <== NEVER TAKEN
201ad54: 01 00 00 00 nop
201ad58: c2 0e 80 00 ldub [ %i2 ], %g1
201ad5c: 80 a0 60 00 cmp %g1, 0
201ad60: 12 80 00 23 bne 201adec <rtems_rfs_bitmap_map_alloc+0xe0> <== ALWAYS TAKEN
201ad64: 80 a6 60 00 cmp %i1, 0
break;
}
if (lower_seed >= 0)
201ad68: 36 80 00 15 bge,a 201adbc <rtems_rfs_bitmap_map_alloc+0xb0><== NOT EXECUTED
201ad6c: f2 26 c0 00 st %i1, [ %i3 ] <== 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)
201ad70: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
201ad74: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
201ad78: 38 80 00 02 bgu,a 201ad80 <rtems_rfs_bitmap_map_alloc+0x74><== NOT EXECUTED
201ad7c: ba 07 68 00 add %i5, 0x800, %i5 <== NOT EXECUTED
upper_seed += window;
if (lower_seed >= 0)
201ad80: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201ad84: 06 bf ff e5 bl 201ad18 <rtems_rfs_bitmap_map_alloc+0xc> <== NOT EXECUTED
201ad88: 80 a7 60 00 cmp %i5, 0 <== 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))
201ad8c: 16 bf ff e6 bge 201ad24 <rtems_rfs_bitmap_map_alloc+0x18> <== NOT EXECUTED
201ad90: b2 06 78 00 add %i1, -2048, %i1 <== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
201ad94: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201ad98: 06 80 00 15 bl 201adec <rtems_rfs_bitmap_map_alloc+0xe0> <== NOT EXECUTED
201ad9c: 01 00 00 00 nop <== NOT EXECUTED
201ada0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
201ada4: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
201ada8: 1a 80 00 11 bcc 201adec <rtems_rfs_bitmap_map_alloc+0xe0> <== NOT EXECUTED
201adac: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
201adb0: 38 bf ff e2 bgu,a 201ad38 <rtems_rfs_bitmap_map_alloc+0x2c><== NOT EXECUTED
201adb4: fa 26 c0 00 st %i5, [ %i3 ] <== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
201adb8: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
201adbc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201adc0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201adc4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201adc8: 7f ff fe 4c call 201a6f8 <rtems_rfs_search_map_for_clear_bit.constprop.1><== NOT EXECUTED
201adcc: 96 10 3f ff mov -1, %o3 <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
201add0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201add4: 14 80 00 06 bg 201adec <rtems_rfs_bitmap_map_alloc+0xe0> <== NOT EXECUTED
201add8: 01 00 00 00 nop <== NOT EXECUTED
201addc: c2 0e 80 00 ldub [ %i2 ], %g1 <== NOT EXECUTED
201ade0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ade4: 22 bf ff e4 be,a 201ad74 <rtems_rfs_bitmap_map_alloc+0x68><== NOT EXECUTED
201ade8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
201adec: 81 c7 e0 08 ret
201adf0: 91 e8 20 00 restore %g0, 0, %o0
0201aab4 <rtems_rfs_bitmap_map_clear>:
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
201aab4: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
201aab8: 92 07 bf fc add %fp, -4, %o1
201aabc: 7f ff fe fa call 201a6a4 <rtems_rfs_bitmap_load_map>
201aac0: 90 10 00 18 mov %i0, %o0
if (rc > 0)
201aac4: 80 a2 20 00 cmp %o0, 0
201aac8: 24 80 00 04 ble,a 201aad8 <rtems_rfs_bitmap_map_clear+0x24><== ALWAYS TAKEN
201aacc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
return 0;
}
201aad0: 81 c7 e0 08 ret <== NOT EXECUTED
201aad4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
201aad8: 80 a6 40 01 cmp %i1, %g1
201aadc: 1a bf ff fd bcc 201aad0 <rtems_rfs_bitmap_map_clear+0x1c> <== NEVER TAKEN
201aae0: 90 10 20 16 mov 0x16, %o0
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201aae4: da 07 bf fc ld [ %fp + -4 ], %o5
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
201aae8: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
index = rtems_rfs_bitmap_map_index (bit);
201aaec: 89 3e 60 05 sra %i1, 5, %g4
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201aaf0: 9f 29 20 02 sll %g4, 2, %o7
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201aaf4: d8 03 40 0f ld [ %o5 + %o7 ], %o4
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201aaf8: 82 10 20 01 mov 1, %g1
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
201aafc: 85 3e 60 0a sra %i1, 0xa, %g2
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201ab00: b3 28 40 19 sll %g1, %i1, %i1
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
201ab04: 85 28 a0 02 sll %g2, 2, %g2
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201ab08: b2 13 00 19 or %o4, %i1, %i1
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201ab0c: f2 23 40 0f st %i1, [ %o5 + %o7 ]
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201ab10: da 00 c0 02 ld [ %g3 + %g2 ], %o5
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
201ab14: de 06 00 00 ld [ %i0 ], %o7
control->free++;
201ab18: f2 06 20 10 ld [ %i0 + 0x10 ], %i1
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
201ab1c: 89 28 40 04 sll %g1, %g4, %g4
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201ab20: 88 13 40 04 or %o5, %g4, %g4
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
201ab24: c8 20 c0 02 st %g4, [ %g3 + %g2 ]
rtems_rfs_buffer_mark_dirty (control->buffer);
201ab28: c2 2b c0 00 stb %g1, [ %o7 ]
control->free++;
return 0;
201ab2c: 90 10 20 00 clr %o0
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
201ab30: 82 06 60 01 add %i1, 1, %g1
201ab34: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
return 0;
}
201ab38: 81 c7 e0 08 ret
201ab3c: 91 e8 00 08 restore %g0, %o0, %o0
0201ac44 <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
201ac44: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
201ac48: 92 07 bf fc add %fp, -4, %o1
201ac4c: 90 10 00 18 mov %i0, %o0
201ac50: 7f ff fe 95 call 201a6a4 <rtems_rfs_bitmap_load_map>
201ac54: ba 10 00 18 mov %i0, %i5
if (rc > 0)
201ac58: 80 a2 20 00 cmp %o0, 0
201ac5c: 24 80 00 04 ble,a 201ac6c <rtems_rfs_bitmap_map_clear_all+0x28><== ALWAYS TAKEN
201ac60: da 06 20 0c ld [ %i0 + 0xc ], %o5
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
201ac64: 81 c7 e0 08 ret <== NOT EXECUTED
201ac68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
201ac6c: de 07 bf fc ld [ %fp + -4 ], %o7
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201ac70: 9a 03 7f ff add %o5, -1, %o5
control->free = elements;
for (e = 0; e < elements; e++)
201ac74: 84 10 20 00 clr %g2
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201ac78: 9b 33 60 05 srl %o5, 5, %o5
control->free = elements;
for (e = 0; e < elements; e++)
201ac7c: 82 10 20 00 clr %g1
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201ac80: 86 03 60 01 add %o5, 1, %g3
control->free = elements;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201ac84: 88 10 3f ff mov -1, %g4
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
201ac88: c6 26 20 10 st %g3, [ %i0 + 0x10 ]
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201ac8c: 85 28 a0 02 sll %g2, 2, %g2
201ac90: c8 23 c0 02 st %g4, [ %o7 + %g2 ]
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
201ac94: 82 00 60 01 inc %g1
201ac98: 80 a0 c0 01 cmp %g3, %g1
201ac9c: 18 bf ff fc bgu 201ac8c <rtems_rfs_bitmap_map_clear_all+0x48>
201aca0: 84 10 00 01 mov %g1, %g2
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
201aca4: 86 88 e0 1f andcc %g3, 0x1f, %g3
201aca8: 02 80 00 04 be 201acb8 <rtems_rfs_bitmap_map_clear_all+0x74><== ALWAYS TAKEN
201acac: 98 10 3f ff mov -1, %o4
201acb0: 86 20 00 03 neg %g3 <== NOT EXECUTED
201acb4: 99 33 00 03 srl %o4, %g3, %o4 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
201acb8: 87 33 60 05 srl %o5, 5, %g3
for (e = 0; e < (elements - 1); e++)
201acbc: 80 a0 e0 00 cmp %g3, 0
201acc0: 02 80 00 0b be 201acec <rtems_rfs_bitmap_map_clear_all+0xa8><== ALWAYS TAKEN
201acc4: c8 07 60 14 ld [ %i5 + 0x14 ], %g4
201acc8: 84 10 20 00 clr %g2 <== NOT EXECUTED
201accc: 82 10 20 00 clr %g1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201acd0: 9e 10 3f ff mov -1, %o7 <== NOT EXECUTED
201acd4: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
201acd8: de 21 00 02 st %o7, [ %g4 + %g2 ] <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
201acdc: 82 00 60 01 inc %g1 <== NOT EXECUTED
201ace0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
201ace4: 12 bf ff fc bne 201acd4 <rtems_rfs_bitmap_map_clear_all+0x90><== NOT EXECUTED
201ace8: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
201acec: c2 07 40 00 ld [ %i5 ], %g1
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
201acf0: 87 28 e0 02 sll %g3, 2, %g3
201acf4: d8 21 00 03 st %o4, [ %g4 + %g3 ]
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
201acf8: 90 10 20 00 clr %o0
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
201acfc: 84 10 20 01 mov 1, %g2
201ad00: c4 28 40 00 stb %g2, [ %g1 ]
return 0;
}
201ad04: 81 c7 e0 08 ret
201ad08: 91 e8 00 08 restore %g0, %o0, %o0
0201aa24 <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
201aa24: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
201aa28: 92 07 bf fc add %fp, -4, %o1
201aa2c: 7f ff ff 1e call 201a6a4 <rtems_rfs_bitmap_load_map>
201aa30: 90 10 00 18 mov %i0, %o0
if (rc > 0)
201aa34: 80 a2 20 00 cmp %o0, 0
201aa38: 24 80 00 04 ble,a 201aa48 <rtems_rfs_bitmap_map_set+0x24><== ALWAYS TAKEN
201aa3c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
201aa40: 81 c7 e0 08 ret
201aa44: 91 e8 00 08 restore %g0, %o0, %o0
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
201aa48: 80 a6 40 01 cmp %i1, %g1
201aa4c: 1a bf ff fd bcc 201aa40 <rtems_rfs_bitmap_map_set+0x1c> <== NEVER TAKEN
201aa50: 90 10 20 16 mov 0x16, %o0
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201aa54: c8 07 bf fc ld [ %fp + -4 ], %g4
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
201aa58: 9f 3e 60 05 sra %i1, 5, %o7
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201aa5c: 87 2b e0 02 sll %o7, 2, %g3
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201aa60: c4 01 00 03 ld [ %g4 + %g3 ], %g2
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
201aa64: da 06 20 14 ld [ %i0 + 0x14 ], %o5
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201aa68: 82 10 20 01 mov 1, %g1
201aa6c: 99 28 40 19 sll %g1, %i1, %o4
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201aa70: 84 28 80 0c andn %g2, %o4, %g2
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201aa74: c4 21 00 03 st %g2, [ %g4 + %g3 ]
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
201aa78: 80 a0 a0 00 cmp %g2, 0
201aa7c: 12 bf ff f1 bne 201aa40 <rtems_rfs_bitmap_map_set+0x1c> <== ALWAYS TAKEN
201aa80: 90 10 20 00 clr %o0
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
201aa84: b3 3e 60 0a sra %i1, 0xa, %i1 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
201aa88: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201aa8c: c8 03 40 19 ld [ %o5 + %i1 ], %g4 <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
201aa90: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
201aa94: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
201aa98: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201aa9c: 9e 29 00 0f andn %g4, %o7, %o7 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
201aaa0: de 23 40 19 st %o7, [ %o5 + %i1 ] <== NOT EXECUTED
control->free--;
201aaa4: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
201aaa8: c6 26 20 10 st %g3, [ %i0 + 0x10 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
201aaac: 10 bf ff e5 b 201aa40 <rtems_rfs_bitmap_map_set+0x1c> <== NOT EXECUTED
201aab0: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED
0201aba4 <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
201aba4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
201aba8: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
201abac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201abb0: 7f ff fe bd call 201a6a4 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
201abb4: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
if (rc > 0)
201abb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201abbc: 24 80 00 04 ble,a 201abcc <rtems_rfs_bitmap_map_set_all+0x28><== NOT EXECUTED
201abc0: de 06 20 0c ld [ %i0 + 0xc ], %o7 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
201abc4: 81 c7 e0 08 ret <== NOT EXECUTED
201abc8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
201abcc: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201abd0: 9e 03 ff ff add %o7, -1, %o7 <== NOT EXECUTED
control->free = 0;
201abd4: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201abd8: 9f 33 e0 05 srl %o7, 5, %o7 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
201abdc: 84 10 20 00 clr %g2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201abe0: 86 03 e0 01 add %o7, 1, %g3 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
201abe4: 82 10 20 00 clr %g1 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
201abe8: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
201abec: c0 21 00 02 clr [ %g4 + %g2 ] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
201abf0: 82 00 60 01 inc %g1 <== NOT EXECUTED
201abf4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
201abf8: 18 bf ff fc bgu 201abe8 <rtems_rfs_bitmap_map_set_all+0x44><== NOT EXECUTED
201abfc: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
201ac00: c8 07 60 14 ld [ %i5 + 0x14 ], %g4 <== NOT EXECUTED
201ac04: 87 33 e0 05 srl %o7, 5, %g3 <== NOT EXECUTED
for (e = 0; e < elements; e++)
201ac08: 84 10 20 00 clr %g2 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
201ac0c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
for (e = 0; e < elements; e++)
201ac10: 82 10 20 00 clr %g1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
201ac14: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
201ac18: c0 21 00 02 clr [ %g4 + %g2 ] <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
201ac1c: 82 00 60 01 inc %g1 <== NOT EXECUTED
201ac20: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
201ac24: 18 bf ff fc bgu 201ac14 <rtems_rfs_bitmap_map_set_all+0x70><== NOT EXECUTED
201ac28: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
201ac2c: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
return 0;
201ac30: 90 10 20 00 clr %o0 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
201ac34: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201ac38: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
return 0;
}
201ac3c: 81 c7 e0 08 ret <== NOT EXECUTED
201ac40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0201ab40 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
201ab40: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
201ab44: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
201ab48: 7f ff fe d7 call 201a6a4 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
201ab4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (rc > 0)
201ab50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201ab54: 24 80 00 04 ble,a 201ab64 <rtems_rfs_bitmap_map_test+0x24><== NOT EXECUTED
201ab58: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
201ab5c: 81 c7 e0 08 ret <== NOT EXECUTED
201ab60: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
201ab64: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
201ab68: 1a bf ff fd bcc 201ab5c <rtems_rfs_bitmap_map_test+0x1c> <== NOT EXECUTED
201ab6c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201ab70: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
201ab74: 83 3e 60 05 sra %i1, 5, %g1 <== NOT EXECUTED
*state = rtems_rfs_bitmap_test (map[index], bit);
201ab78: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201ab7c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
201ab80: 90 10 20 00 clr %o0 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201ab84: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201ab88: b3 28 80 19 sll %g2, %i1, %i1 <== NOT EXECUTED
201ab8c: b2 0e 40 01 and %i1, %g1, %i1 <== NOT EXECUTED
201ab90: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
201ab94: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
201ab98: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
201ab9c: 81 c7 e0 08 ret <== NOT EXECUTED
201aba0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0201a9ec <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);
201a9ec: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
201a9f0: 90 20 00 08 neg %o0 <== NOT EXECUTED
return mask;
}
201a9f4: 81 c3 e0 08 retl <== NOT EXECUTED
201a9f8: 91 30 40 08 srl %g1, %o0, %o0 <== NOT EXECUTED
0201a9fc <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
201a9fc: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
rtems_rfs_bitmap_element mask = 0;
if (end > start)
201aa00: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
201aa04: 08 80 00 06 bleu 201aa1c <rtems_rfs_bitmap_mask_section+0x20><== NOT EXECUTED
201aa08: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201aa0c: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED
201aa10: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
201aa14: 91 32 00 09 srl %o0, %o1, %o0 <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
201aa18: 91 2a 00 01 sll %o0, %g1, %o0 <== NOT EXECUTED
return mask;
}
201aa1c: 81 c3 e0 08 retl <== NOT EXECUTED
0201aee8 <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
201aee8: 9d e3 bf a0 save %sp, -96, %sp
size_t elements = rtems_rfs_bitmap_elements (size);
201aeec: 82 06 ff ff add %i3, -1, %g1
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
201aef0: 83 30 60 0a srl %g1, 0xa, %g1
201aef4: 82 00 60 01 inc %g1
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
201aef8: f4 26 00 00 st %i2, [ %i0 ]
control->fs = fs;
201aefc: f2 26 20 04 st %i1, [ %i0 + 4 ]
control->block = block;
201af00: f8 26 20 08 st %i4, [ %i0 + 8 ]
control->size = size;
201af04: f6 26 20 0c st %i3, [ %i0 + 0xc ]
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
201af08: 7f ff ad 04 call 2006318 <malloc>
201af0c: 91 28 60 02 sll %g1, 2, %o0
if (!control->search_bits)
201af10: 80 a2 20 00 cmp %o0, 0
201af14: 02 80 00 04 be 201af24 <rtems_rfs_bitmap_open+0x3c> <== NEVER TAKEN
201af18: d0 26 20 14 st %o0, [ %i0 + 0x14 ]
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
201af1c: 7f ff ff b6 call 201adf4 <rtems_rfs_bitmap_create_search>
201af20: 81 e8 00 00 restore
}
201af24: 81 c7 e0 08 ret <== NOT EXECUTED
201af28: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED
0201b088 <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)
{
201b088: 9d e3 bf a0 save %sp, -96, %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);
201b08c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201b090: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201b094: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201b098: 40 00 04 b5 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201b09c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (rc > 0)
201b0a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201b0a4: 24 80 00 04 ble,a 201b0b4 <rtems_rfs_block_find_indirect+0x2c><== NOT EXECUTED
201b0a8: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
201b0ac: 81 c7 e0 08 ret <== NOT EXECUTED
201b0b0: 91 e8 00 08 restore %g0, %o0, %o0 <== 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);
201b0b4: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED
201b0b8: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 <== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
201b0bc: c8 06 20 04 ld [ %i0 + 4 ], %g4 <== 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);
201b0c0: fa 08 c0 01 ldub [ %g3 + %g1 ], %i5 <== NOT EXECUTED
201b0c4: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED
201b0c8: c2 08 a0 03 ldub [ %g2 + 3 ], %g1 <== NOT EXECUTED
201b0cc: c6 08 a0 01 ldub [ %g2 + 1 ], %g3 <== NOT EXECUTED
201b0d0: c4 08 a0 02 ldub [ %g2 + 2 ], %g2 <== NOT EXECUTED
201b0d4: bb 2f 60 18 sll %i5, 0x18, %i5 <== NOT EXECUTED
201b0d8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
201b0dc: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201b0e0: 82 10 40 1d or %g1, %i5, %g1 <== NOT EXECUTED
201b0e4: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
201b0e8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
201b0ec: 84 38 00 01 xnor %g0, %g1, %g2 <== NOT EXECUTED
201b0f0: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED
201b0f4: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED
201b0f8: 82 08 40 02 and %g1, %g2, %g1 <== 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);
if ((*result + 1) == 0)
201b0fc: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
201b100: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED
201b104: 0a bf ff ea bcs 201b0ac <rtems_rfs_block_find_indirect+0x24><== NOT EXECUTED
201b108: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
201b10c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201b110: 7f ff df d6 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201b114: 13 00 00 04 sethi %hi(0x1000), %o1 <== NOT EXECUTED
201b118: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201b11c: 32 80 00 06 bne,a 201b134 <rtems_rfs_block_find_indirect+0xac><== NOT EXECUTED
201b120: d2 07 00 00 ld [ %i4 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
201b124: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
201b128: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = EIO;
}
return 0;
}
201b12c: 81 c7 e0 08 ret <== NOT EXECUTED
201b130: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
201b134: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201b138: 11 00 80 cf sethi %hi(0x2033c00), %o0 <== NOT EXECUTED
201b13c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201b140: 40 00 21 29 call 20235e4 <printf> <== NOT EXECUTED
201b144: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
201b148: 90 10 20 00 clr %o0 <== NOT EXECUTED
201b14c: 10 bf ff f8 b 201b12c <rtems_rfs_block_find_indirect+0xa4><== NOT EXECUTED
201b150: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
0201b268 <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)
{
201b268: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (pos == 0)
201b26c: 80 96 40 1a orcc %i1, %i2, %g0 <== NOT EXECUTED
201b270: 02 80 00 11 be 201b2b4 <rtems_rfs_block_get_block_size+0x4c><== NOT EXECUTED
201b274: 94 10 20 00 clr %o2 <== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
201b278: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED
201b27c: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
201b280: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
201b284: 40 00 54 0d call 20302b8 <__udivdi3> <== NOT EXECUTED
201b288: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201b28c: 92 02 60 01 inc %o1 <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
201b290: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
if (pos == 0)
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
201b294: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
201b298: 94 10 20 00 clr %o2 <== NOT EXECUTED
201b29c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201b2a0: 40 00 54 db call 203060c <__umoddi3> <== NOT EXECUTED
201b2a4: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
201b2a8: d2 26 e0 04 st %o1, [ %i3 + 4 ] <== NOT EXECUTED
201b2ac: 81 c7 e0 08 ret <== NOT EXECUTED
201b2b0: 81 e8 00 00 restore <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
201b2b4: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
size->offset = 0;
201b2b8: c0 26 e0 04 clr [ %i3 + 4 ] <== NOT EXECUTED
201b2bc: 81 c7 e0 08 ret <== NOT EXECUTED
201b2c0: 81 e8 00 00 restore <== NOT EXECUTED
0201b4ac <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
201b4ac: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
int brc;
if (map->dirty && map->inode)
201b4b0: c2 0e 40 00 ldub [ %i1 ], %g1
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
201b4b4: ba 10 00 18 mov %i0, %i5
int rc = 0;
int brc;
if (map->dirty && map->inode)
201b4b8: 80 a0 60 00 cmp %g1, 0
201b4bc: 02 80 00 0b be 201b4e8 <rtems_rfs_block_map_close+0x3c>
201b4c0: b0 10 20 00 clr %i0
201b4c4: d2 06 60 04 ld [ %i1 + 4 ], %o1
201b4c8: 80 a2 60 00 cmp %o1, 0
201b4cc: 22 80 00 08 be,a 201b4ec <rtems_rfs_block_map_close+0x40><== NEVER TAKEN
201b4d0: 92 06 60 38 add %i1, 0x38, %o1 <== NOT EXECUTED
{
brc = rtems_rfs_inode_load (fs, map->inode);
201b4d4: 7f ff d2 7a call 200febc <rtems_rfs_inode_load>
201b4d8: 90 10 00 1d mov %i5, %o0
if (brc > 0)
201b4dc: b0 92 20 00 orcc %o0, 0, %i0
201b4e0: 04 80 00 11 ble 201b524 <rtems_rfs_block_map_close+0x78> <== ALWAYS TAKEN
201b4e4: 84 10 20 01 mov 1, %g2
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201b4e8: 92 06 60 38 add %i1, 0x38, %o1
map->dirty = false;
}
}
map->inode = NULL;
201b4ec: c0 26 60 04 clr [ %i1 + 4 ]
201b4f0: 40 00 03 24 call 201c180 <rtems_rfs_buffer_handle_release>
201b4f4: 90 10 00 1d mov %i5, %o0
201b4f8: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
201b4fc: c0 2e 60 38 clrb [ %i1 + 0x38 ]
handle->bnum = 0;
201b500: c0 26 60 3c clr [ %i1 + 0x3c ]
handle->buffer = NULL;
201b504: c0 26 60 40 clr [ %i1 + 0x40 ]
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201b508: 40 00 03 1e call 201c180 <rtems_rfs_buffer_handle_release>
201b50c: 92 06 60 44 add %i1, 0x44, %o1
handle->dirty = false;
201b510: c0 2e 60 44 clrb [ %i1 + 0x44 ]
handle->bnum = 0;
201b514: c0 26 60 48 clr [ %i1 + 0x48 ]
handle->buffer = NULL;
201b518: c0 26 60 4c clr [ %i1 + 0x4c ]
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
201b51c: 81 c7 e0 08 ret
201b520: 81 e8 00 00 restore
int brc;
if (map->dirty && map->inode)
{
brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
201b524: 88 10 20 00 clr %g4
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201b528: 98 10 20 01 mov 1, %o4
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
201b52c: c2 06 60 04 ld [ %i1 + 4 ], %g1
return rc;
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
201b530: 86 06 40 02 add %i1, %g2, %g3
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
201b534: da 00 60 0c ld [ %g1 + 0xc ], %o5
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
201b538: c6 00 e0 23 ld [ %g3 + 0x23 ], %g3
201b53c: b0 01 20 06 add %g4, 6, %i0
201b540: b1 2e 20 02 sll %i0, 2, %i0
201b544: b0 03 40 18 add %o5, %i0, %i0
201b548: 9f 30 e0 18 srl %g3, 0x18, %o7
201b54c: de 2e 20 04 stb %o7, [ %i0 + 4 ]
201b550: f0 00 60 0c ld [ %g1 + 0xc ], %i0
201b554: 9f 30 e0 10 srl %g3, 0x10, %o7
201b558: b0 06 00 02 add %i0, %g2, %i0
201b55c: de 2e 20 1c stb %o7, [ %i0 + 0x1c ]
201b560: f0 00 60 0c ld [ %g1 + 0xc ], %i0
201b564: 9f 30 e0 08 srl %g3, 8, %o7
201b568: b0 06 00 02 add %i0, %g2, %i0
201b56c: de 2e 20 1d stb %o7, [ %i0 + 0x1d ]
201b570: f0 00 60 0c ld [ %g1 + 0xc ], %i0
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201b574: 88 01 20 01 inc %g4
201b578: b0 06 00 02 add %i0, %g2, %i0
201b57c: c6 2e 20 1e stb %g3, [ %i0 + 0x1e ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201b580: d8 28 60 10 stb %o4, [ %g1 + 0x10 ]
201b584: 84 00 a0 04 add %g2, 4, %g2
201b588: 80 a1 20 05 cmp %g4, 5
201b58c: 12 bf ff e8 bne 201b52c <rtems_rfs_block_map_close+0x80>
201b590: 82 10 20 01 mov 1, %g1
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
201b594: c6 06 60 04 ld [ %i1 + 4 ], %g3
201b598: c4 06 60 08 ld [ %i1 + 8 ], %g2
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
201b59c: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201b5a0: b1 30 a0 18 srl %g2, 0x18, %i0
201b5a4: f0 29 20 0c stb %i0, [ %g4 + 0xc ]
201b5a8: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201b5ac: b1 30 a0 10 srl %g2, 0x10, %i0
201b5b0: f0 29 20 0d stb %i0, [ %g4 + 0xd ]
201b5b4: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201b5b8: b1 30 a0 08 srl %g2, 8, %i0
201b5bc: f0 29 20 0e stb %i0, [ %g4 + 0xe ]
201b5c0: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201b5c4: 90 10 00 1d mov %i5, %o0
201b5c8: c4 29 20 0f stb %g2, [ %g4 + 0xf ]
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
201b5cc: c8 06 60 04 ld [ %i1 + 4 ], %g4
201b5d0: c4 06 60 0c ld [ %i1 + 0xc ], %g2
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
201b5d4: f0 01 20 0c ld [ %g4 + 0xc ], %i0
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201b5d8: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
201b5dc: 87 30 a0 08 srl %g2, 8, %g3
201b5e0: c6 2e 20 0a stb %g3, [ %i0 + 0xa ]
201b5e4: c6 01 20 0c ld [ %g4 + 0xc ], %g3
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201b5e8: 94 10 20 01 mov 1, %o2
201b5ec: c4 28 e0 0b stb %g2, [ %g3 + 0xb ]
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
201b5f0: c6 06 60 04 ld [ %i1 + 4 ], %g3
201b5f4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
201b5f8: f0 00 e0 0c ld [ %g3 + 0xc ], %i0
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201b5fc: c2 29 20 10 stb %g1, [ %g4 + 0x10 ]
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
201b600: 89 30 a0 18 srl %g2, 0x18, %g4
201b604: c8 2e 20 30 stb %g4, [ %i0 + 0x30 ]
201b608: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201b60c: b1 30 a0 10 srl %g2, 0x10, %i0
201b610: f0 29 20 31 stb %i0, [ %g4 + 0x31 ]
201b614: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201b618: b1 30 a0 08 srl %g2, 8, %i0
201b61c: f0 29 20 32 stb %i0, [ %g4 + 0x32 ]
201b620: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201b624: c4 29 20 33 stb %g2, [ %g4 + 0x33 ]
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
201b628: c4 06 60 04 ld [ %i1 + 4 ], %g2
201b62c: c8 06 60 20 ld [ %i1 + 0x20 ], %g4
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
201b630: f0 00 a0 0c ld [ %g2 + 0xc ], %i0
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201b634: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
201b638: 87 31 20 18 srl %g4, 0x18, %g3
201b63c: c6 2e 20 34 stb %g3, [ %i0 + 0x34 ]
201b640: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
201b644: b1 31 20 10 srl %g4, 0x10, %i0
201b648: f0 28 e0 35 stb %i0, [ %g3 + 0x35 ]
201b64c: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
201b650: b1 31 20 08 srl %g4, 8, %i0
201b654: f0 28 e0 36 stb %i0, [ %g3 + 0x36 ]
201b658: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
201b65c: c8 28 e0 37 stb %g4, [ %g3 + 0x37 ]
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201b660: d2 06 60 04 ld [ %i1 + 4 ], %o1
201b664: 7f ff d2 7a call 201004c <rtems_rfs_inode_unload>
201b668: c2 28 a0 10 stb %g1, [ %g2 + 0x10 ]
if (brc > 0)
rc = brc;
map->dirty = false;
201b66c: c0 2e 40 00 clrb [ %i1 ]
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201b670: 82 38 00 08 xnor %g0, %o0, %g1
201b674: 83 38 60 1f sra %g1, 0x1f, %g1
201b678: 10 bf ff 9c b 201b4e8 <rtems_rfs_block_map_close+0x3c>
201b67c: b0 0a 00 01 and %o0, %g1, %i0
0201b680 <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)
{
201b680: 9d e3 bf 98 save %sp, -104, %sp
int rc = 0;
*block = 0;
201b684: c0 26 c0 00 clr [ %i3 ]
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201b688: e0 06 80 00 ld [ %i2 ], %l0
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
201b68c: ba 10 00 18 mov %i0, %i5
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201b690: 80 a4 20 00 cmp %l0, 0
201b694: 02 80 00 05 be 201b6a8 <rtems_rfs_block_map_find+0x28>
201b698: e2 06 60 08 ld [ %i1 + 8 ], %l1
201b69c: 80 a4 60 00 cmp %l1, 0
201b6a0: 02 80 00 4b be 201b7cc <rtems_rfs_block_map_find+0x14c> <== NEVER TAKEN
201b6a4: b0 10 20 06 mov 6, %i0
201b6a8: 80 a4 00 11 cmp %l0, %l1
201b6ac: 1a 80 00 48 bcc 201b7cc <rtems_rfs_block_map_find+0x14c>
201b6b0: b0 10 20 06 mov 6, %i0
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
201b6b4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
201b6b8: 80 a4 00 01 cmp %l0, %g1
201b6bc: 22 80 00 14 be,a 201b70c <rtems_rfs_block_map_find+0x8c> <== ALWAYS TAKEN
201b6c0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
/*
* Determine the type of access we need to perform. If the number of blocks
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
201b6c4: 80 a4 60 05 cmp %l1, 5 <== NOT EXECUTED
201b6c8: 38 80 00 16 bgu,a 201b720 <rtems_rfs_block_map_find+0xa0><== NEVER TAKEN
201b6cc: e4 07 60 30 ld [ %i5 + 0x30 ], %l2 <== NOT EXECUTED
{
*block = map->blocks[bpos->bno];
201b6d0: a0 04 20 08 add %l0, 8, %l0
201b6d4: a1 2c 20 02 sll %l0, 2, %l0
201b6d8: a0 06 40 10 add %i1, %l0, %l0
201b6dc: c2 04 20 04 ld [ %l0 + 4 ], %g1
201b6e0: c2 26 c0 00 st %g1, [ %i3 ]
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
201b6e4: c6 06 a0 08 ld [ %i2 + 8 ], %g3
201b6e8: c2 06 a0 04 ld [ %i2 + 4 ], %g1
201b6ec: c4 06 80 00 ld [ %i2 ], %g2
201b6f0: c6 26 60 18 st %g3, [ %i1 + 0x18 ]
201b6f4: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
201b6f8: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
map->bpos.block = *block;
201b6fc: c2 06 c0 00 ld [ %i3 ], %g1
201b700: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
}
return rc;
}
201b704: 81 c7 e0 08 ret
201b708: 91 e8 20 00 restore %g0, 0, %o0
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
201b70c: 80 a0 60 00 cmp %g1, 0
201b710: 02 bf ff ee be 201b6c8 <rtems_rfs_block_map_find+0x48> <== ALWAYS TAKEN
201b714: 80 a4 60 05 cmp %l1, 5
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
{
*block = map->blocks[bpos->bno];
201b718: 10 bf ff f3 b 201b6e4 <rtems_rfs_block_map_find+0x64> <== NOT EXECUTED
201b71c: c2 26 c0 00 st %g1, [ %i3 ] <== 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;
201b720: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
201b724: 40 00 50 2d call 202f7d8 <.urem> <== NOT EXECUTED
201b728: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
201b72c: 92 10 00 12 mov %l2, %o1 <== 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;
201b730: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
201b734: 40 00 4f 7d call 202f528 <.udiv> <== NOT EXECUTED
201b738: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
201b73c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
singly = bpos->bno / fs->blocks_per_block;
201b740: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
201b744: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED
201b748: 1a 80 00 23 bcc 201b7d4 <rtems_rfs_block_map_find+0x154> <== NOT EXECUTED
201b74c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
201b750: 40 00 50 22 call 202f7d8 <.urem> <== NOT EXECUTED
201b754: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
201b758: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
201b75c: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED
201b760: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
201b764: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED
201b768: 08 80 00 19 bleu 201b7cc <rtems_rfs_block_map_find+0x14c> <== NOT EXECUTED
201b76c: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
/*
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
201b770: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
201b774: 40 00 4f 6d call 202f528 <.udiv> <== NOT EXECUTED
201b778: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
singly %= fs->blocks_per_block;
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
201b77c: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201b780: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201b784: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201b788: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201b78c: 92 06 60 44 add %i1, 0x44, %o1 <== NOT EXECUTED
201b790: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b794: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
201b798: 7f ff fe 3c call 201b088 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
201b79c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
201b7a0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b7a4: 12 80 00 0a bne 201b7cc <rtems_rfs_block_map_find+0x14c> <== NOT EXECUTED
201b7a8: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
201b7ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b7b0: 92 06 60 38 add %i1, 0x38, %o1 <== NOT EXECUTED
201b7b4: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
201b7b8: 7f ff fe 34 call 201b088 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
201b7bc: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
}
}
}
}
if (rc == 0)
201b7c0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b7c4: 22 bf ff c9 be,a 201b6e8 <rtems_rfs_block_map_find+0x68> <== NOT EXECUTED
201b7c8: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
201b7cc: 81 c7 e0 08 ret
201b7d0: 81 e8 00 00 restore
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
201b7d4: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201b7d8: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201b7dc: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201b7e0: 10 bf ff f3 b 201b7ac <rtems_rfs_block_map_find+0x12c> <== NOT EXECUTED
201b7e4: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
0201b890 <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)
{
201b890: 9d e3 bf 98 save %sp, -104, %sp
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
201b894: 90 10 20 00 clr %o0
201b898: 13 00 00 08 sethi %hi(0x2000), %o1
201b89c: 7f ff dd f3 call 2013068 <rtems_rfs_trace>
201b8a0: ba 10 00 18 mov %i0, %i5
201b8a4: 80 8a 20 ff btst 0xff, %o0
201b8a8: 32 80 00 ce bne,a 201bbe0 <rtems_rfs_block_map_grow+0x350><== NEVER TAKEN
201b8ac: d4 06 60 08 ld [ %i1 + 8 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
201b8b0: c4 06 60 08 ld [ %i1 + 8 ], %g2
201b8b4: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
201b8b8: 84 06 80 02 add %i2, %g2, %g2
201b8bc: 80 a0 80 01 cmp %g2, %g1
201b8c0: 1a 80 00 e1 bcc 201bc44 <rtems_rfs_block_map_grow+0x3b4> <== NEVER TAKEN
201b8c4: b0 10 20 1b mov 0x1b, %i0
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
201b8c8: 80 a6 a0 00 cmp %i2, 0
201b8cc: 02 80 00 de be 201bc44 <rtems_rfs_block_map_grow+0x3b4> <== NEVER TAKEN
201b8d0: b0 10 20 00 clr %i0
201b8d4: d2 06 60 20 ld [ %i1 + 0x20 ], %o1
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
201b8d8: b8 10 20 00 clr %i4
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
201b8dc: a2 10 20 01 mov 1, %l1
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
201b8e0: aa 06 60 44 add %i1, 0x44, %l5
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201b8e4: 10 80 00 11 b 201b928 <rtems_rfs_block_map_grow+0x98>
201b8e8: a8 06 60 38 add %i1, 0x38, %l4
false, &block);
if (rc > 0)
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
map->blocks[map->size.count] = block;
201b8ec: 82 06 20 08 add %i0, 8, %g1
201b8f0: 83 28 60 02 sll %g1, 2, %g1
201b8f4: 82 06 40 01 add %i1, %g1, %g1
201b8f8: d2 20 60 04 st %o1, [ %g1 + 4 ]
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
201b8fc: b0 06 20 01 inc %i0
map->size.offset = 0;
201b900: c0 26 60 0c clr [ %i1 + 0xc ]
if (b == 0)
201b904: 80 a7 20 00 cmp %i4, 0
201b908: 12 80 00 03 bne 201b914 <rtems_rfs_block_map_grow+0x84> <== NEVER TAKEN
201b90c: f0 26 60 08 st %i0, [ %i1 + 8 ]
*new_block = block;
201b910: d2 26 c0 00 st %o1, [ %i3 ]
map->last_data_block = block;
201b914: d2 26 60 20 st %o1, [ %i1 + 0x20 ]
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
201b918: b8 07 20 01 inc %i4
201b91c: 80 a7 00 1a cmp %i4, %i2
201b920: 02 80 00 cb be 201bc4c <rtems_rfs_block_map_grow+0x3bc> <== ALWAYS TAKEN
201b924: e2 2e 40 00 stb %l1, [ %i1 ]
/*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
201b928: 90 10 00 1d mov %i5, %o0
201b92c: 94 10 20 00 clr %o2
201b930: 7f ff d0 14 call 200f980 <rtems_rfs_group_bitmap_alloc>
201b934: 96 07 bf f8 add %fp, -8, %o3
false, &block);
if (rc > 0)
201b938: b0 92 20 00 orcc %o0, 0, %i0
201b93c: 14 80 00 ca bg 201bc64 <rtems_rfs_block_map_grow+0x3d4> <== NEVER TAKEN
201b940: 01 00 00 00 nop
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
201b944: f0 06 60 08 ld [ %i1 + 8 ], %i0
201b948: 80 a6 20 04 cmp %i0, 4
201b94c: 08 bf ff e8 bleu 201b8ec <rtems_rfs_block_map_grow+0x5c> <== ALWAYS TAKEN
201b950: d2 07 bf f8 ld [ %fp + -8 ], %o1
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
201b954: e4 07 60 30 ld [ %i5 + 0x30 ], %l2 <== NOT EXECUTED
201b958: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201b95c: 40 00 4f 9f call 202f7d8 <.urem> <== NOT EXECUTED
201b960: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
201b964: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
* 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;
201b968: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
201b96c: 40 00 4e ef call 202f528 <.udiv> <== NOT EXECUTED
201b970: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (map->size.count < fs->block_map_singly_blocks)
201b974: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
201b978: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
201b97c: 1a 80 00 31 bcc 201ba40 <rtems_rfs_block_map_grow+0x1b0> <== NOT EXECUTED
201b980: ac 10 00 08 mov %o0, %l6 <== 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) ||
201b984: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
201b988: 02 80 00 06 be 201b9a0 <rtems_rfs_block_map_grow+0x110> <== NOT EXECUTED
201b98c: 80 a4 20 05 cmp %l0, 5 <== NOT EXECUTED
201b990: 12 80 00 8a bne 201bbb8 <rtems_rfs_block_map_grow+0x328> <== NOT EXECUTED
201b994: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201b998: 12 80 00 89 bne 201bbbc <rtems_rfs_block_map_grow+0x32c> <== NOT EXECUTED
201b99c: 82 05 a0 08 add %l6, 8, %g1 <== NOT EXECUTED
{
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
201b9a0: b0 1e 20 05 xor %i0, 5, %i0 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201b9a4: 80 a0 00 18 cmp %g0, %i0 <== NOT EXECUTED
201b9a8: 96 05 a0 08 add %l6, 8, %o3 <== NOT EXECUTED
201b9ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201b9b0: 97 2a e0 02 sll %o3, 2, %o3 <== NOT EXECUTED
201b9b4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201b9b8: 96 06 40 0b add %i1, %o3, %o3 <== NOT EXECUTED
201b9bc: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201b9c0: 96 02 e0 04 add %o3, 4, %o3 <== NOT EXECUTED
201b9c4: 7f ff fd 60 call 201af44 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
201b9c8: 98 60 3f ff subx %g0, -1, %o4 <== NOT EXECUTED
201b9cc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
201b9d0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201b9d4: 14 80 00 a1 bg 201bc58 <rtems_rfs_block_map_grow+0x3c8> <== NOT EXECUTED
201b9d8: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
201b9dc: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201b9e0: c4 0f bf f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED
201b9e4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201b9e8: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED
201b9ec: c4 28 40 10 stb %g2, [ %g1 + %l0 ] <== NOT EXECUTED
201b9f0: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201b9f4: c4 17 bf f8 lduh [ %fp + -8 ], %g2 <== NOT EXECUTED
201b9f8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201b9fc: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED
201ba00: c4 28 60 01 stb %g2, [ %g1 + 1 ] <== NOT EXECUTED
201ba04: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201ba08: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
201ba0c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201ba10: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201ba14: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED
201ba18: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
201ba1c: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201ba20: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201ba24: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED
201ba28: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
201ba2c: c2 2c 20 03 stb %g1, [ %l0 + 3 ] <== NOT EXECUTED
201ba30: e2 2e 60 38 stb %l1, [ %i1 + 0x38 ] <== NOT EXECUTED
201ba34: f0 06 60 08 ld [ %i1 + 8 ], %i0 <== NOT EXECUTED
201ba38: 10 bf ff b1 b 201b8fc <rtems_rfs_block_map_grow+0x6c> <== NOT EXECUTED
201ba3c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
201ba40: 40 00 4e ba call 202f528 <.udiv> <== NOT EXECUTED
201ba44: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly %= fs->blocks_per_block;
201ba48: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
201ba4c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
singly %= fs->blocks_per_block;
201ba50: 40 00 4f 62 call 202f7d8 <.urem> <== NOT EXECUTED
201ba54: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
201ba58: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
201ba5c: 12 80 00 38 bne 201bb3c <rtems_rfs_block_map_grow+0x2ac> <== NOT EXECUTED
201ba60: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201ba64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ba68: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201ba6c: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201ba70: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
201ba74: 7f ff fd 34 call 201af44 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
201ba78: 98 10 20 00 clr %o4 <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
201ba7c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201ba80: 14 80 00 75 bg 201bc54 <rtems_rfs_block_map_grow+0x3c4> <== NOT EXECUTED
201ba84: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
/*
* Allocate a new block for a doubly indirect table if singly is 0 as
* it is the first entry of a new singly indirect block.
*/
if ((singly == 0) ||
201ba88: 02 80 00 06 be 201baa0 <rtems_rfs_block_map_grow+0x210> <== NOT EXECUTED
201ba8c: 80 a4 a0 05 cmp %l2, 5 <== NOT EXECUTED
201ba90: 12 80 00 5a bne 201bbf8 <rtems_rfs_block_map_grow+0x368> <== NOT EXECUTED
201ba94: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201ba98: 12 80 00 59 bne 201bbfc <rtems_rfs_block_map_grow+0x36c> <== NOT EXECUTED
201ba9c: 82 04 e0 08 add %l3, 8, %g1 <== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
201baa0: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
201baa4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201baa8: 96 04 e0 08 add %l3, 8, %o3 <== NOT EXECUTED
*/
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
201baac: 82 18 80 01 xor %g2, %g1, %g1 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201bab0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
201bab4: 97 2a e0 02 sll %o3, 2, %o3 <== NOT EXECUTED
201bab8: 98 60 3f ff subx %g0, -1, %o4 <== NOT EXECUTED
201babc: 96 06 40 0b add %i1, %o3, %o3 <== NOT EXECUTED
201bac0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bac4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201bac8: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201bacc: 7f ff fd 1e call 201af44 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
201bad0: 96 02 e0 04 add %o3, 4, %o3 <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
201bad4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201bad8: 14 80 00 54 bg 201bc28 <rtems_rfs_block_map_grow+0x398> <== NOT EXECUTED
201badc: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
201bae0: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201bae4: c4 0f bf fc ldub [ %fp + -4 ], %g2 <== NOT EXECUTED
201bae8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201baec: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED
201baf0: c4 28 40 12 stb %g2, [ %g1 + %l2 ] <== NOT EXECUTED
201baf4: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201baf8: c4 17 bf fc lduh [ %fp + -4 ], %g2 <== NOT EXECUTED
201bafc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201bb00: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
201bb04: c4 28 60 01 stb %g2, [ %g1 + 1 ] <== NOT EXECUTED
201bb08: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201bb0c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
201bb10: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201bb14: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201bb18: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
201bb1c: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
201bb20: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201bb24: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201bb28: a4 00 40 12 add %g1, %l2, %l2 <== NOT EXECUTED
201bb2c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201bb30: c2 2c a0 03 stb %g1, [ %l2 + 3 ] <== NOT EXECUTED
201bb34: 10 bf ff aa b 201b9dc <rtems_rfs_block_map_grow+0x14c> <== NOT EXECUTED
201bb38: e2 2e 60 44 stb %l1, [ %i1 + 0x44 ] <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
201bb3c: a6 04 e0 08 add %l3, 8, %l3 <== NOT EXECUTED
201bb40: a7 2c e0 02 sll %l3, 2, %l3 <== NOT EXECUTED
201bb44: a6 06 40 13 add %i1, %l3, %l3 <== NOT EXECUTED
201bb48: d4 04 e0 04 ld [ %l3 + 4 ], %o2 <== NOT EXECUTED
201bb4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bb50: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
201bb54: 40 00 02 06 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201bb58: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
201bb5c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201bb60: 14 80 00 3d bg 201bc54 <rtems_rfs_block_map_grow+0x3c4> <== NOT EXECUTED
201bb64: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201bb68: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201bb6c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bb70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201bb74: c6 08 80 12 ldub [ %g2 + %l2 ], %g3 <== NOT EXECUTED
201bb78: 82 00 80 12 add %g2, %l2, %g1 <== NOT EXECUTED
201bb7c: d4 08 60 03 ldub [ %g1 + 3 ], %o2 <== NOT EXECUTED
201bb80: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
201bb84: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201bb88: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201bb8c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201bb90: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201bb94: 94 12 80 03 or %o2, %g3, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bb98: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201bb9c: 94 12 80 02 or %o2, %g2, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bba0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201bba4: 94 12 80 01 or %o2, %g1, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bba8: 40 00 01 f1 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201bbac: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED
201bbb0: 10 bf ff 88 b 201b9d0 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
201bbb4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bbb8: 82 05 a0 08 add %l6, 8, %g1 <== NOT EXECUTED
201bbbc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201bbc0: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201bbc4: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201bbc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bbcc: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
201bbd0: 40 00 01 e7 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201bbd4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201bbd8: 10 bf ff 7e b 201b9d0 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
201bbdc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_block_no* new_block)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
201bbe0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201bbe4: 11 00 80 cf sethi %hi(0x2033c00), %o0 <== NOT EXECUTED
201bbe8: 40 00 1e 7f call 20235e4 <printf> <== NOT EXECUTED
201bbec: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 2033fd8 <CSWTCH.1+0x98> <== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
201bbf0: 10 bf ff 31 b 201b8b4 <rtems_rfs_block_map_grow+0x24> <== NOT EXECUTED
201bbf4: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
201bbf8: 82 04 e0 08 add %l3, 8, %g1 <== NOT EXECUTED
201bbfc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201bc00: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201bc04: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201bc08: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bc0c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
201bc10: 40 00 01 d7 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201bc14: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
201bc18: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201bc1c: 24 bf ff b2 ble,a 201bae4 <rtems_rfs_block_map_grow+0x254><== NOT EXECUTED
201bc20: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
201bc24: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
201bc28: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bc2c: 7f ff cf e2 call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201bc30: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
201bc34: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
201bc38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bc3c: 7f ff cf de call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201bc40: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
201bc44: 81 c7 e0 08 ret <== NOT EXECUTED
201bc48: 81 e8 00 00 restore <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
201bc4c: 81 c7 e0 08 ret
201bc50: 91 e8 20 00 restore %g0, 0, %o0
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, block);
201bc54: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
201bc58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bc5c: 7f ff cf d6 call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201bc60: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
201bc64: 81 c7 e0 08 ret <== NOT EXECUTED
201bc68: 81 e8 00 00 restore <== NOT EXECUTED
0201af44 <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)
{
201af44: 9d e3 bf 98 save %sp, -104, %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);
201af48: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
201af4c: 90 10 00 18 mov %i0, %o0 <== 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)
{
201af50: ba 10 00 18 mov %i0, %i5 <== 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);
201af54: 94 10 20 00 clr %o2 <== NOT EXECUTED
201af58: 7f ff d2 8a call 200f980 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
201af5c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
201af60: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201af64: 14 80 00 0c bg 201af94 <rtems_rfs_block_map_indirect_alloc+0x50><== NOT EXECUTED
201af68: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
201af6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201af70: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201af74: 40 00 04 fe call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201af78: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
201af7c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201af80: 04 80 00 07 ble 201af9c <rtems_rfs_block_map_indirect_alloc+0x58><== NOT EXECUTED
201af84: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
201af88: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201af8c: 7f ff d3 0a call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201af90: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
201af94: 81 c7 e0 08 ret <== NOT EXECUTED
201af98: 81 e8 00 00 restore <== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
201af9c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
201afa0: d4 07 60 08 ld [ %i5 + 8 ], %o2 <== NOT EXECUTED
201afa4: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED
201afa8: 40 00 21 3d call 202349c <memset> <== NOT EXECUTED
201afac: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
if (upping)
201afb0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201afb4: 12 80 00 08 bne 201afd4 <rtems_rfs_block_map_indirect_alloc+0x90><== NOT EXECUTED
201afb8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== 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);
201afbc: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201afc0: c4 2e 80 00 stb %g2, [ %i2 ] <== NOT EXECUTED
*block = new_block;
201afc4: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
map->last_map_block = new_block;
201afc8: c2 26 60 1c st %g1, [ %i1 + 0x1c ] <== NOT EXECUTED
return 0;
}
201afcc: 81 c7 e0 08 ret <== NOT EXECUTED
201afd0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
201afd4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201afd8: 7f ff e0 24 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201afdc: 13 00 00 08 sethi %hi(0x2000), %o1 <== NOT EXECUTED
201afe0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201afe4: 32 80 00 24 bne,a 201b074 <rtems_rfs_block_map_indirect_alloc+0x130><== NOT EXECUTED
201afe8: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
201afec: 84 10 00 19 mov %i1, %g2 <== 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)
{
201aff0: 82 10 20 00 clr %g1 <== 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]);
201aff4: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
201aff8: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201affc: c8 08 a0 24 ldub [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201b000: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201b004: c8 28 c0 01 stb %g4, [ %g3 + %g1 ] <== NOT EXECUTED
201b008: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201b00c: c8 10 a0 24 lduh [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201b010: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201b014: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED
201b018: c8 28 e0 01 stb %g4, [ %g3 + 1 ] <== NOT EXECUTED
201b01c: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201b020: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201b024: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201b028: 89 31 20 08 srl %g4, 8, %g4 <== NOT EXECUTED
201b02c: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED
201b030: c8 28 e0 02 stb %g4, [ %g3 + 2 ] <== NOT EXECUTED
201b034: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201b038: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201b03c: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201b040: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED
201b044: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED
201b048: c8 28 e0 03 stb %g4, [ %g3 + 3 ] <== NOT EXECUTED
201b04c: 82 00 60 04 add %g1, 4, %g1 <== 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++)
201b050: 80 a0 60 14 cmp %g1, 0x14 <== NOT EXECUTED
201b054: 12 bf ff e9 bne 201aff8 <rtems_rfs_block_map_indirect_alloc+0xb4><== NOT EXECUTED
201b058: fa 2e 80 00 stb %i5, [ %i2 ] <== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
201b05c: 90 06 60 24 add %i1, 0x24, %o0 <== NOT EXECUTED
201b060: 92 10 20 00 clr %o1 <== NOT EXECUTED
201b064: 40 00 21 0e call 202349c <memset> <== NOT EXECUTED
201b068: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
201b06c: 10 bf ff d4 b 201afbc <rtems_rfs_block_map_indirect_alloc+0x78><== NOT EXECUTED
201b070: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
201b074: 11 00 80 cf sethi %hi(0x2033c00), %o0 <== NOT EXECUTED
201b078: 40 00 21 5b call 20235e4 <printf> <== NOT EXECUTED
201b07c: 90 12 23 50 or %o0, 0x350, %o0 ! 2033f50 <CSWTCH.1+0x10> <== NOT EXECUTED
201b080: 10 bf ff dc b 201aff0 <rtems_rfs_block_map_indirect_alloc+0xac><== NOT EXECUTED
201b084: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED
0201b154 <rtems_rfs_block_map_indirect_shrink.isra.12>:
* @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,
201b154: 9d e3 bf a0 save %sp, -96, %sp <== 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) ||
201b158: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201b15c: 22 80 00 07 be,a 201b178 <rtems_rfs_block_map_indirect_shrink.isra.12+0x24><== NOT EXECUTED
201b160: b6 06 e0 08 add %i3, 8, %i3 <== NOT EXECUTED
201b164: 80 a7 20 05 cmp %i4, 5 <== NOT EXECUTED
201b168: 02 80 00 11 be 201b1ac <rtems_rfs_block_map_indirect_shrink.isra.12+0x58><== NOT EXECUTED
201b16c: 80 a6 e0 00 cmp %i3, 0 <== 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;
201b170: 81 c7 e0 08 ret <== NOT EXECUTED
201b174: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
201b178: b7 2e e0 02 sll %i3, 2, %i3 <== NOT EXECUTED
201b17c: b6 06 40 1b add %i1, %i3, %i3 <== NOT EXECUTED
201b180: f8 06 e0 04 ld [ %i3 + 4 ], %i4 <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
201b184: c0 26 e0 04 clr [ %i3 + 4 ] <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
201b188: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201b18c: 92 10 20 00 clr %o1 <== NOT EXECUTED
201b190: 7f ff d2 89 call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201b194: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
if (rc > 0)
201b198: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201b19c: 24 80 00 02 ble,a 201b1a4 <rtems_rfs_block_map_indirect_shrink.isra.12+0x50><== NOT EXECUTED
201b1a0: f8 26 60 1c st %i4, [ %i1 + 0x1c ] <== NOT EXECUTED
map->last_map_block = block_to_free;
}
return rc;
}
201b1a4: 81 c7 e0 08 ret <== NOT EXECUTED
201b1a8: 81 e8 00 00 restore <== 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) ||
201b1ac: 12 bf ff f1 bne 201b170 <rtems_rfs_block_map_indirect_shrink.isra.12+0x1c><== NOT EXECUTED
201b1b0: 84 10 20 00 clr %g2 <== NOT EXECUTED
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
201b1b4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
201b1b8: f8 06 60 24 ld [ %i1 + 0x24 ], %i4 <== NOT EXECUTED
201b1bc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== 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);
201b1c0: c8 08 40 00 ldub [ %g1 ], %g4 <== NOT EXECUTED
201b1c4: da 08 60 01 ldub [ %g1 + 1 ], %o5 <== NOT EXECUTED
201b1c8: de 08 60 03 ldub [ %g1 + 3 ], %o7 <== NOT EXECUTED
201b1cc: f4 08 60 02 ldub [ %g1 + 2 ], %i2 <== 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,
201b1d0: 86 06 40 02 add %i1, %g2, %g3 <== 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);
201b1d4: 89 29 20 18 sll %g4, 0x18, %g4 <== NOT EXECUTED
201b1d8: 9b 2b 60 10 sll %o5, 0x10, %o5 <== NOT EXECUTED
201b1dc: b5 2e a0 08 sll %i2, 8, %i2 <== NOT EXECUTED
201b1e0: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED
201b1e4: 88 11 00 0f or %g4, %o7, %g4 <== NOT EXECUTED
201b1e8: 88 11 00 1a or %g4, %i2, %g4 <== NOT EXECUTED
201b1ec: c8 20 e0 24 st %g4, [ %g3 + 0x24 ] <== NOT EXECUTED
201b1f0: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201b1f4: 80 a0 a0 14 cmp %g2, 0x14 <== NOT EXECUTED
201b1f8: 12 bf ff f2 bne 201b1c0 <rtems_rfs_block_map_indirect_shrink.isra.12+0x6c><== NOT EXECUTED
201b1fc: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
201b200: 10 bf ff e3 b 201b18c <rtems_rfs_block_map_indirect_shrink.isra.12+0x38><== NOT EXECUTED
201b204: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
0201b31c <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)
{
201b31c: 9d e3 bf a0 save %sp, -96, %sp
* Set the count to 0 so at least find fails, then open the handle and make
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
201b320: c0 2e 80 00 clrb [ %i2 ]
map->inode = NULL;
201b324: c0 26 a0 04 clr [ %i2 + 4 ]
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
201b328: c0 26 a0 08 clr [ %i2 + 8 ]
size->offset = 0;
201b32c: c0 26 a0 0c clr [ %i2 + 0xc ]
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
201b330: c0 26 a0 10 clr [ %i2 + 0x10 ]
bpos->boff = 0;
201b334: c0 26 a0 14 clr [ %i2 + 0x14 ]
bpos->block = 0;
201b338: c0 26 a0 18 clr [ %i2 + 0x18 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201b33c: c0 2e a0 38 clrb [ %i2 + 0x38 ]
handle->bnum = 0;
201b340: c0 26 a0 3c clr [ %i2 + 0x3c ]
handle->buffer = NULL;
201b344: c0 26 a0 40 clr [ %i2 + 0x40 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201b348: c0 2e a0 44 clrb [ %i2 + 0x44 ]
handle->bnum = 0;
201b34c: c0 26 a0 48 clr [ %i2 + 0x48 ]
handle->buffer = NULL;
201b350: c0 26 a0 4c clr [ %i2 + 0x4c ]
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
201b354: 90 10 00 18 mov %i0, %o0
201b358: 92 10 00 19 mov %i1, %o1
201b35c: 7f ff d2 d8 call 200febc <rtems_rfs_inode_load>
201b360: ba 10 00 1a mov %i2, %i5
if (rc > 0)
201b364: b8 92 20 00 orcc %o0, 0, %i4
201b368: 14 80 00 42 bg 201b470 <rtems_rfs_block_map_open+0x154> <== NEVER TAKEN
201b36c: 82 10 20 01 mov 1, %g1
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
201b370: c8 06 60 0c ld [ %i1 + 0xc ], %g4
201b374: f2 26 a0 04 st %i1, [ %i2 + 4 ]
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201b378: 84 10 20 00 clr %g2
201b37c: b8 01 20 1c add %g4, 0x1c, %i4
* @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]);
201b380: 86 07 00 01 add %i4, %g1, %g3
201b384: 96 00 a0 06 add %g2, 6, %o3
201b388: d8 0f 00 01 ldub [ %i4 + %g1 ], %o4
201b38c: de 08 e0 02 ldub [ %g3 + 2 ], %o7
201b390: da 08 e0 01 ldub [ %g3 + 1 ], %o5
201b394: 87 2a e0 02 sll %o3, 2, %g3
201b398: 86 01 00 03 add %g4, %g3, %g3
201b39c: d6 08 e0 04 ldub [ %g3 + 4 ], %o3
201b3a0: 99 2b 20 10 sll %o4, 0x10, %o4
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
201b3a4: 86 07 40 01 add %i5, %g1, %g3
201b3a8: 97 2a e0 18 sll %o3, 0x18, %o3
201b3ac: 9b 2b 60 08 sll %o5, 8, %o5
201b3b0: 9e 13 c0 0b or %o7, %o3, %o7
201b3b4: 9e 13 c0 0c or %o7, %o4, %o7
201b3b8: 9e 13 c0 0d or %o7, %o5, %o7
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
201b3bc: de 20 e0 23 st %o7, [ %g3 + 0x23 ]
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201b3c0: 84 00 a0 01 inc %g2
201b3c4: 80 a0 a0 05 cmp %g2, 5
201b3c8: 12 bf ff ee bne 201b380 <rtems_rfs_block_map_open+0x64>
201b3cc: 82 00 60 04 add %g1, 4, %g1
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
201b3d0: c6 09 20 0f ldub [ %g4 + 0xf ], %g3
201b3d4: c2 09 20 0c ldub [ %g4 + 0xc ], %g1
201b3d8: f8 09 20 0d ldub [ %g4 + 0xd ], %i4
201b3dc: c4 09 20 0e ldub [ %g4 + 0xe ], %g2
201b3e0: b9 2f 20 10 sll %i4, 0x10, %i4
201b3e4: 85 28 a0 08 sll %g2, 8, %g2
201b3e8: 83 28 60 18 sll %g1, 0x18, %g1
201b3ec: 82 10 40 1c or %g1, %i4, %g1
201b3f0: 82 10 40 03 or %g1, %g3, %g1
201b3f4: 82 10 40 02 or %g1, %g2, %g1
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
201b3f8: c2 27 60 08 st %g1, [ %i5 + 8 ]
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
201b3fc: c4 09 20 0b ldub [ %g4 + 0xb ], %g2
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
201b400: c2 09 20 0a ldub [ %g4 + 0xa ], %g1
201b404: 83 28 60 08 sll %g1, 8, %g1
201b408: 82 10 80 01 or %g2, %g1, %g1
201b40c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
201b410: c6 09 20 33 ldub [ %g4 + 0x33 ], %g3
201b414: c2 09 20 30 ldub [ %g4 + 0x30 ], %g1
201b418: f8 09 20 31 ldub [ %g4 + 0x31 ], %i4
201b41c: c4 09 20 32 ldub [ %g4 + 0x32 ], %g2
201b420: b9 2f 20 10 sll %i4, 0x10, %i4
201b424: 85 28 a0 08 sll %g2, 8, %g2
201b428: 83 28 60 18 sll %g1, 0x18, %g1
201b42c: 82 10 40 1c or %g1, %i4, %g1
201b430: 82 10 40 03 or %g1, %g3, %g1
201b434: 82 10 40 02 or %g1, %g2, %g1
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
201b438: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
201b43c: c2 09 20 34 ldub [ %g4 + 0x34 ], %g1
201b440: c6 09 20 37 ldub [ %g4 + 0x37 ], %g3
201b444: c4 09 20 36 ldub [ %g4 + 0x36 ], %g2
201b448: f8 09 20 35 ldub [ %g4 + 0x35 ], %i4
201b44c: 83 28 60 18 sll %g1, 0x18, %g1
201b450: 89 2f 20 10 sll %i4, 0x10, %g4
201b454: 85 28 a0 08 sll %g2, 8, %g2
201b458: 82 10 40 04 or %g1, %g4, %g1
201b45c: 82 10 40 03 or %g1, %g3, %g1
201b460: 82 10 40 02 or %g1, %g2, %g1
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
201b464: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
rc = rtems_rfs_inode_unload (fs, inode, false);
201b468: 7f ff d2 f9 call 201004c <rtems_rfs_inode_unload>
201b46c: 95 e8 20 00 restore %g0, 0, %o2
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201b470: 92 06 a0 38 add %i2, 0x38, %o1 <== NOT EXECUTED
201b474: 40 00 03 43 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201b478: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201b47c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
201b480: c0 2e a0 38 clrb [ %i2 + 0x38 ] <== NOT EXECUTED
handle->bnum = 0;
201b484: c0 26 a0 3c clr [ %i2 + 0x3c ] <== NOT EXECUTED
handle->buffer = NULL;
201b488: c0 26 a0 40 clr [ %i2 + 0x40 ] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201b48c: 92 06 a0 44 add %i2, 0x44, %o1 <== NOT EXECUTED
201b490: 40 00 03 3c call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201b494: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
handle->dirty = false;
201b498: c0 2e a0 44 clrb [ %i2 + 0x44 ] <== NOT EXECUTED
handle->bnum = 0;
201b49c: c0 26 a0 48 clr [ %i2 + 0x48 ] <== NOT EXECUTED
handle->buffer = NULL;
201b4a0: c0 26 a0 4c clr [ %i2 + 0x4c ] <== NOT EXECUTED
return rc;
}
201b4a4: 81 c7 e0 08 ret <== NOT EXECUTED
201b4a8: 81 e8 00 00 restore <== NOT EXECUTED
0201bc6c <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
201bc6c: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
201bc70: 90 10 20 00 clr %o0
201bc74: 13 00 00 10 sethi %hi(0x4000), %o1
201bc78: 7f ff dc fc call 2013068 <rtems_rfs_trace>
201bc7c: ba 10 00 18 mov %i0, %i5
201bc80: 80 8a 20 ff btst 0xff, %o0
201bc84: 32 80 00 a3 bne,a 201bf10 <rtems_rfs_block_map_shrink+0x2a4><== NEVER TAKEN
201bc88: d4 06 60 08 ld [ %i1 + 8 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
201bc8c: e6 06 60 08 ld [ %i1 + 8 ], %l3
201bc90: 80 a4 e0 00 cmp %l3, 0
201bc94: 02 80 00 79 be 201be78 <rtems_rfs_block_map_shrink+0x20c> <== ALWAYS TAKEN
201bc98: 90 10 20 00 clr %o0
201bc9c: 80 a6 80 13 cmp %i2, %l3 <== NOT EXECUTED
201bca0: 38 80 00 02 bgu,a 201bca8 <rtems_rfs_block_map_shrink+0x3c><== NOT EXECUTED
201bca4: b4 10 00 13 mov %l3, %i2 <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
201bca8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201bcac: 02 80 00 a4 be 201bf3c <rtems_rfs_block_map_shrink+0x2d0> <== NOT EXECUTED
201bcb0: a2 06 60 44 add %i1, 0x44, %l1 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bcb4: a0 06 60 38 add %i1, 0x38, %l0 <== 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);
}
201bcb8: ac 06 60 4c add %i1, 0x4c, %l6 <== NOT EXECUTED
201bcbc: aa 06 60 40 add %i1, 0x40, %l5 <== NOT EXECUTED
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
201bcc0: 10 80 00 14 b 201bd10 <rtems_rfs_block_map_shrink+0xa4> <== NOT EXECUTED
201bcc4: b6 10 20 01 mov 1, %i3 <== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
201bcc8: a7 2c e0 02 sll %l3, 2, %l3 <== NOT EXECUTED
201bccc: a6 06 40 13 add %i1, %l3, %l3 <== NOT EXECUTED
201bcd0: f8 04 e0 04 ld [ %l3 + 4 ], %i4 <== NOT EXECUTED
map->blocks[block] = 0;
201bcd4: c0 24 e0 04 clr [ %l3 + 4 ] <== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
201bcd8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bcdc: 92 10 20 00 clr %o1 <== NOT EXECUTED
201bce0: 7f ff cf b5 call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201bce4: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
if (rc > 0)
201bce8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201bcec: 14 80 00 63 bg 201be78 <rtems_rfs_block_map_shrink+0x20c> <== NOT EXECUTED
201bcf0: b4 86 bf ff addcc %i2, -1, %i2 <== NOT EXECUTED
return rc;
map->size.count--;
201bcf4: e6 06 60 08 ld [ %i1 + 8 ], %l3 <== NOT EXECUTED
map->size.offset = 0;
201bcf8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
201bcfc: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED
map->size.offset = 0;
map->last_data_block = block_to_free;
201bd00: f8 26 60 20 st %i4, [ %i1 + 0x20 ] <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
201bd04: e6 26 60 08 st %l3, [ %i1 + 8 ] <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
201bd08: 02 80 00 88 be 201bf28 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
201bd0c: f6 2e 40 00 stb %i3, [ %i1 ] <== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
201bd10: a4 04 ff ff add %l3, -1, %l2 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
201bd14: 80 a4 a0 04 cmp %l2, 4 <== NOT EXECUTED
201bd18: 28 bf ff ec bleu,a 201bcc8 <rtems_rfs_block_map_shrink+0x5c><== NOT EXECUTED
201bd1c: a6 04 e0 07 add %l3, 7, %l3 <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
201bd20: f8 07 60 30 ld [ %i5 + 0x30 ], %i4 <== NOT EXECUTED
201bd24: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
201bd28: 40 00 4e ac call 202f7d8 <.urem> <== NOT EXECUTED
201bd2c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
201bd30: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
201bd34: ae 10 00 08 mov %o0, %l7 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
201bd38: 40 00 4d fc call 202f528 <.udiv> <== NOT EXECUTED
201bd3c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
if (block < fs->block_map_singly_blocks)
201bd40: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
201bd44: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED
201bd48: 0a 80 00 4e bcs 201be80 <rtems_rfs_block_map_shrink+0x214><== NOT EXECUTED
201bd4c: b0 10 00 08 mov %o0, %i0 <== 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)
201bd50: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
201bd54: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED
201bd58: 1a 80 00 75 bcc 201bf2c <rtems_rfs_block_map_shrink+0x2c0><== NOT EXECUTED
201bd5c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
201bd60: 40 00 4d f2 call 202f528 <.udiv> <== NOT EXECUTED
201bd64: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
201bd68: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201bd6c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201bd70: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201bd74: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
201bd78: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
201bd7c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201bd80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201bd84: 40 00 01 7a call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201bd88: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
201bd8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201bd90: 14 80 00 3a bg 201be78 <rtems_rfs_block_map_shrink+0x20c> <== NOT EXECUTED
201bd94: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
201bd98: 40 00 4e 90 call 202f7d8 <.urem> <== NOT EXECUTED
201bd9c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201bda0: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201bda4: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED
201bda8: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
201bdac: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201bdb0: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201bdb4: c6 08 c0 02 ldub [ %g3 + %g2 ], %g3 <== NOT EXECUTED
201bdb8: e4 08 60 03 ldub [ %g1 + 3 ], %l2 <== NOT EXECUTED
201bdbc: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
201bdc0: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201bdc4: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201bdc8: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201bdcc: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201bdd0: a4 14 80 03 or %l2, %g3, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bdd4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201bdd8: a4 14 80 02 or %l2, %g2, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bddc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201bde0: a4 14 80 01 or %l2, %g1, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201bde4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201bde8: 40 00 01 61 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201bdec: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
singly, true);
if (rc > 0)
201bdf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201bdf4: 14 80 00 21 bg 201be78 <rtems_rfs_block_map_shrink+0x20c> <== NOT EXECUTED
201bdf8: 85 2d e0 02 sll %l7, 2, %g2 <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201bdfc: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201be00: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
direct);
if (direct == 0)
201be04: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly, true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201be08: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201be0c: c6 08 c0 02 ldub [ %g3 + %g2 ], %g3 <== NOT EXECUTED
201be10: f8 08 60 03 ldub [ %g1 + 3 ], %i4 <== NOT EXECUTED
201be14: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
201be18: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201be1c: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201be20: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201be24: b8 17 00 03 or %i4, %g3, %i4 <== NOT EXECUTED
201be28: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201be2c: b8 17 00 02 or %i4, %g2, %i4 <== NOT EXECUTED
direct);
if (direct == 0)
201be30: 12 bf ff aa bne 201bcd8 <rtems_rfs_block_map_shrink+0x6c> <== NOT EXECUTED
201be34: b8 17 00 01 or %i4, %g1, %i4 <== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
201be38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201be3c: 92 10 20 00 clr %o1 <== NOT EXECUTED
201be40: 7f ff cf 5d call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201be44: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
if (rc > 0)
201be48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201be4c: 14 80 00 0b bg 201be78 <rtems_rfs_block_map_shrink+0x20c> <== NOT EXECUTED
201be50: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
return rc;
map->last_map_block = singly;
201be54: e4 26 60 1c st %l2, [ %i1 + 0x1c ] <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
201be58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201be5c: 94 10 00 16 mov %l6, %o2 <== NOT EXECUTED
201be60: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
201be64: 7f ff fc bc call 201b154 <rtems_rfs_block_map_indirect_shrink.isra.12><== NOT EXECUTED
201be68: 98 10 00 14 mov %l4, %o4 <== NOT EXECUTED
doubly, doubly_singly);
if (rc)
201be6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201be70: 22 bf ff 9b be,a 201bcdc <rtems_rfs_block_map_shrink+0x70><== NOT EXECUTED
201be74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
return 0;
}
201be78: 81 c7 e0 08 ret
201be7c: 91 e8 00 08 restore %g0, %o0, %o0
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201be80: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201be84: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201be88: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201be8c: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201be90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201be94: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201be98: 40 00 01 35 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201be9c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
201bea0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201bea4: 14 bf ff f5 bg 201be78 <rtems_rfs_block_map_shrink+0x20c> <== NOT EXECUTED
201bea8: 85 2d e0 02 sll %l7, 2, %g2 <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201beac: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201beb0: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
201beb4: 90 10 00 1d mov %i5, %o0 <== 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,
201beb8: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201bebc: e6 08 c0 02 ldub [ %g3 + %g2 ], %l3 <== NOT EXECUTED
201bec0: f8 08 60 01 ldub [ %g1 + 1 ], %i4 <== NOT EXECUTED
201bec4: e4 08 60 02 ldub [ %g1 + 2 ], %l2 <== NOT EXECUTED
201bec8: e8 08 60 03 ldub [ %g1 + 3 ], %l4 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
201becc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201bed0: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201bed4: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201bed8: 7f ff fc 9f call 201b154 <rtems_rfs_block_map_indirect_shrink.isra.12><== NOT EXECUTED
201bedc: 98 10 00 17 mov %l7, %o4 <== NOT EXECUTED
singly, direct);
if (rc)
201bee0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201bee4: 12 bf ff e5 bne 201be78 <rtems_rfs_block_map_shrink+0x20c><== NOT EXECUTED
201bee8: a8 0d 20 ff and %l4, 0xff, %l4 <== 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,
201beec: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED
201bef0: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
201bef4: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED
201bef8: b9 2f 20 10 sll %i4, 0x10, %i4 <== NOT EXECUTED
201befc: a4 0c a0 ff and %l2, 0xff, %l2 <== NOT EXECUTED
201bf00: b8 14 c0 1c or %l3, %i4, %i4 <== NOT EXECUTED
201bf04: a5 2c a0 08 sll %l2, 8, %l2 <== NOT EXECUTED
201bf08: 10 bf ff 74 b 201bcd8 <rtems_rfs_block_map_shrink+0x6c> <== NOT EXECUTED
201bf0c: b8 17 00 12 or %i4, %l2, %i4 <== NOT EXECUTED
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
201bf10: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201bf14: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201bf18: 40 00 1d b3 call 20235e4 <printf> <== NOT EXECUTED
201bf1c: 90 12 20 10 or %o0, 0x10, %o0 ! 2034010 <CSWTCH.1+0xd0> <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
201bf20: 10 bf ff 5c b 201bc90 <rtems_rfs_block_map_shrink+0x24> <== NOT EXECUTED
201bf24: e6 06 60 08 ld [ %i1 + 8 ], %l3 <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
201bf28: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201bf2c: 32 80 00 05 bne,a 201bf40 <rtems_rfs_block_map_shrink+0x2d4><== NOT EXECUTED
201bf30: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
{
map->last_map_block = 0;
201bf34: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED
map->last_data_block = 0;
201bf38: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
201bf3c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
201bf40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201bf44: 12 80 00 0f bne 201bf80 <rtems_rfs_block_map_shrink+0x314><== NOT EXECUTED
201bf48: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201bf4c: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
201bf50: 28 80 00 0f bleu,a 201bf8c <rtems_rfs_block_map_shrink+0x320><== NOT EXECUTED
201bf54: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201bf58: 84 04 ff ff add %l3, -1, %g2 <== NOT EXECUTED
201bf5c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201bf60: 12 bf ff c6 bne 201be78 <rtems_rfs_block_map_shrink+0x20c><== NOT EXECUTED
201bf64: 90 10 20 00 clr %o0 <== NOT EXECUTED
201bf68: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201bf6c: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 <== NOT EXECUTED
201bf70: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201bf74: 38 80 00 07 bgu,a 201bf90 <rtems_rfs_block_map_shrink+0x324><== NOT EXECUTED
201bf78: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
201bf7c: 30 bf ff bf b,a 201be78 <rtems_rfs_block_map_shrink+0x20c><== NOT EXECUTED
201bf80: 12 bf ff f4 bne 201bf50 <rtems_rfs_block_map_shrink+0x2e4><== NOT EXECUTED
201bf84: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
201bf88: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
201bf8c: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
201bf90: c2 26 60 14 st %g1, [ %i1 + 0x14 ] <== NOT EXECUTED
201bf94: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
201bf98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201bf9c: 02 bf ff b7 be 201be78 <rtems_rfs_block_map_shrink+0x20c> <== NOT EXECUTED
201bfa0: 90 10 20 00 clr %o0 <== NOT EXECUTED
201bfa4: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED
201bfa8: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
return 0;
}
201bfac: 81 c7 e0 08 ret <== NOT EXECUTED
201bfb0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02022440 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
2022440: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
2022444: 90 10 20 00 clr %o0
2022448: 7f ff c3 08 call 2013068 <rtems_rfs_trace>
202244c: 92 10 20 40 mov 0x40, %o1
2022450: 80 8a 20 ff btst 0xff, %o0
2022454: 02 80 00 0b be 2022480 <rtems_rfs_buffer_bdbuf_release+0x40><== ALWAYS TAKEN
2022458: 80 a6 60 00 cmp %i1, 0
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
202245c: 17 00 80 c8 sethi %hi(0x2032000), %o3 <== NOT EXECUTED
2022460: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED
2022464: d4 06 20 20 ld [ %i0 + 0x20 ], %o2 <== NOT EXECUTED
2022468: 12 80 00 16 bne 20224c0 <rtems_rfs_buffer_bdbuf_release+0x80><== NOT EXECUTED
202246c: 96 12 e3 30 or %o3, 0x330, %o3 <== NOT EXECUTED
2022470: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
2022474: 40 00 04 5c call 20235e4 <printf> <== NOT EXECUTED
2022478: 90 12 23 48 or %o0, 0x348, %o0 ! 2035748 <status_code_to_errno+0x124><== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
202247c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2022480: 02 80 00 09 be 20224a4 <rtems_rfs_buffer_bdbuf_release+0x64>
2022484: 90 10 00 18 mov %i0, %o0
sc = rtems_bdbuf_release_modified (buffer);
2022488: 7f ff cd 02 call 2015890 <rtems_bdbuf_release_modified>
202248c: 01 00 00 00 nop
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
2022490: 80 a0 00 08 cmp %g0, %o0
2022494: b0 60 20 00 subx %g0, 0, %i0
#endif
rc = EIO;
}
return rc;
}
2022498: b0 0e 20 05 and %i0, 5, %i0
202249c: 81 c7 e0 08 ret
20224a0: 81 e8 00 00 restore
buffer->block, modified ? "(modified)" : "");
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
20224a4: 7f ff cc c1 call 20157a8 <rtems_bdbuf_release>
20224a8: 01 00 00 00 nop
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
20224ac: 80 a0 00 08 cmp %g0, %o0
20224b0: b0 60 20 00 subx %g0, 0, %i0
#endif
rc = EIO;
}
return rc;
}
20224b4: b0 0e 20 05 and %i0, 5, %i0
20224b8: 81 c7 e0 08 ret
20224bc: 81 e8 00 00 restore
{
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
20224c0: 17 00 80 d5 sethi %hi(0x2035400), %o3 <== NOT EXECUTED
20224c4: 10 bf ff eb b 2022470 <rtems_rfs_buffer_bdbuf_release+0x30><== NOT EXECUTED
20224c8: 96 12 e3 38 or %o3, 0x338, %o3 ! 2035738 <status_code_to_errno+0x114><== NOT EXECUTED
0201c9c8 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
201c9c8: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
201c9cc: 90 10 20 00 clr %o0
201c9d0: 92 10 20 10 mov 0x10, %o1
201c9d4: 7f ff d9 a5 call 2013068 <rtems_rfs_trace>
201c9d8: ba 10 00 18 mov %i0, %i5
201c9dc: 80 8a 20 ff btst 0xff, %o0
201c9e0: 12 80 00 1d bne 201ca54 <rtems_rfs_buffer_close+0x8c> <== NEVER TAKEN
201c9e4: 11 00 80 d1 sethi %hi(0x2034400), %o0
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
201c9e8: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201c9ec: 90 10 00 1d mov %i5, %o0
201c9f0: 7f ff ff ad call 201c8a4 <rtems_rfs_buffer_setblksize>
201c9f4: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
201c9f8: b0 92 20 00 orcc %o0, 0, %i0
201c9fc: 04 80 00 07 ble 201ca18 <rtems_rfs_buffer_close+0x50> <== ALWAYS TAKEN
201ca00: 90 10 20 00 clr %o0
201ca04: 7f ff d9 99 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201ca08: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED
201ca0c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ca10: 12 80 00 06 bne 201ca28 <rtems_rfs_buffer_close+0x60> <== NOT EXECUTED
201ca14: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
201ca18: 7f ff a0 6c call 2004bc8 <rtems_disk_release>
201ca1c: d0 07 60 0c ld [ %i5 + 0xc ], %o0
rc, strerror (rc));
}
#endif
return rc;
}
201ca20: 81 c7 e0 08 ret
201ca24: 81 e8 00 00 restore
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
201ca28: 40 00 1e 22 call 20242b0 <strerror> <== NOT EXECUTED
201ca2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201ca30: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201ca34: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201ca38: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201ca3c: 40 00 1a ea call 20235e4 <printf> <== NOT EXECUTED
201ca40: 90 12 20 e0 or %o0, 0xe0, %o0 ! 20344e0 <CSWTCH.1+0x5a0> <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
201ca44: 7f ff a0 61 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
201ca48: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
rc, strerror (rc));
}
#endif
return rc;
}
201ca4c: 81 c7 e0 08 ret <== NOT EXECUTED
201ca50: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: closing\n");
201ca54: 40 00 1b 25 call 20236e8 <puts> <== NOT EXECUTED
201ca58: 90 12 20 b8 or %o0, 0xb8, %o0 <== NOT EXECUTED
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
201ca5c: 10 bf ff e4 b 201c9ec <rtems_rfs_buffer_close+0x24> <== NOT EXECUTED
201ca60: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
0201c180 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
201c180: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
201c184: c2 06 60 08 ld [ %i1 + 8 ], %g1
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
201c188: ba 10 00 18 mov %i0, %i5
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
201c18c: 80 a0 60 00 cmp %g1, 0
201c190: 02 80 00 13 be 201c1dc <rtems_rfs_buffer_handle_release+0x5c>
201c194: b0 10 20 00 clr %i0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
201c198: 90 10 20 00 clr %o0
201c19c: 7f ff db b3 call 2013068 <rtems_rfs_trace>
201c1a0: 92 10 22 00 mov 0x200, %o1
201c1a4: 80 8a 20 ff btst 0xff, %o0
201c1a8: 32 80 00 0f bne,a 201c1e4 <rtems_rfs_buffer_handle_release+0x64><== NEVER TAKEN
201c1ac: c2 0e 40 00 ldub [ %i1 ], %g1 <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
201c1b0: d0 06 60 08 ld [ %i1 + 8 ], %o0
201c1b4: f8 02 20 38 ld [ %o0 + 0x38 ], %i4
201c1b8: 80 a7 20 00 cmp %i4, 0
201c1bc: 04 80 00 05 ble 201c1d0 <rtems_rfs_buffer_handle_release+0x50><== NEVER TAKEN
201c1c0: 01 00 00 00 nop
rtems_rfs_buffer_refs_down (handle);
201c1c4: b8 07 3f ff add %i4, -1, %i4
201c1c8: f8 22 20 38 st %i4, [ %o0 + 0x38 ]
if (rtems_rfs_buffer_refs (handle) == 0)
201c1cc: 80 a7 20 00 cmp %i4, 0
201c1d0: 02 80 00 19 be 201c234 <rtems_rfs_buffer_handle_release+0xb4>
201c1d4: b0 10 20 00 clr %i0
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
201c1d8: c0 26 60 08 clr [ %i1 + 8 ]
}
return rc;
}
201c1dc: 81 c7 e0 08 ret
201c1e0: 81 e8 00 00 restore
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
201c1e4: 15 00 80 c8 sethi %hi(0x2032000), %o2 <== NOT EXECUTED
201c1e8: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED
201c1ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201c1f0: 02 80 00 04 be 201c200 <rtems_rfs_buffer_handle_release+0x80><== NOT EXECUTED
201c1f4: 94 12 a3 30 or %o2, 0x330, %o2 <== NOT EXECUTED
201c1f8: 15 00 80 d0 sethi %hi(0x2034000), %o2 <== NOT EXECUTED
201c1fc: 94 12 a0 d8 or %o2, 0xd8, %o2 ! 20340d8 <CSWTCH.1+0x198> <== 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" : "");
201c200: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
201c204: 19 00 80 c8 sethi %hi(0x2032000), %o4 <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
201c208: d6 00 60 38 ld [ %g1 + 0x38 ], %o3 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
201c20c: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
201c210: 12 80 00 04 bne 201c220 <rtems_rfs_buffer_handle_release+0xa0><== NOT EXECUTED
201c214: 98 13 23 30 or %o4, 0x330, %o4 <== NOT EXECUTED
201c218: 19 00 80 d0 sethi %hi(0x2034000), %o4 <== NOT EXECUTED
201c21c: 98 13 20 e0 or %o4, 0xe0, %o4 ! 20340e0 <CSWTCH.1+0x1a0> <== NOT EXECUTED
201c220: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c224: 40 00 1c f0 call 20235e4 <printf> <== NOT EXECUTED
201c228: 90 12 20 f0 or %o0, 0xf0, %o0 ! 20340f0 <CSWTCH.1+0x1b0> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
201c22c: 10 bf ff e2 b 201c1b4 <rtems_rfs_buffer_handle_release+0x34><== NOT EXECUTED
201c230: d0 06 60 08 ld [ %i1 + 8 ], %o0 <== NOT EXECUTED
201c234: 7f ff bb 61 call 200afb8 <_Chain_Extract>
201c238: 01 00 00 00 nop
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
201c23c: c4 07 60 4c ld [ %i5 + 0x4c ], %g2
if (rtems_rfs_fs_no_local_cache (fs))
201c240: c2 07 40 00 ld [ %i5 ], %g1
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
201c244: 84 00 bf ff add %g2, -1, %g2
if (rtems_rfs_fs_no_local_cache (fs))
201c248: 80 88 60 02 btst 2, %g1
201c24c: 12 80 00 15 bne 201c2a0 <rtems_rfs_buffer_handle_release+0x120>
201c250: c4 27 60 4c st %g2, [ %i5 + 0x4c ]
* 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 +
201c254: c6 07 60 6c ld [ %i5 + 0x6c ], %g3
201c258: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
201c25c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
201c260: 84 00 c0 02 add %g3, %g2, %g2
201c264: 80 a0 80 01 cmp %g2, %g1
201c268: 1a 80 00 1d bcc 201c2dc <rtems_rfs_buffer_handle_release+0x15c><== NEVER TAKEN
201c26c: b0 10 00 1c mov %i4, %i0
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
201c270: c2 0e 40 00 ldub [ %i1 ], %g1
201c274: 80 a0 60 00 cmp %g1, 0
201c278: 02 80 00 11 be 201c2bc <rtems_rfs_buffer_handle_release+0x13c>
201c27c: d2 06 60 08 ld [ %i1 + 8 ], %o1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
201c280: 7f ff bb 43 call 200af8c <_Chain_Append>
201c284: 90 07 60 60 add %i5, 0x60, %o0
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
201c288: c2 07 60 6c ld [ %i5 + 0x6c ], %g1
201c28c: 82 00 60 01 inc %g1
201c290: c2 27 60 6c st %g1, [ %i5 + 0x6c ]
201c294: c0 26 60 08 clr [ %i1 + 8 ]
201c298: 81 c7 e0 08 ret
201c29c: 81 e8 00 00 restore
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
201c2a0: d0 06 60 08 ld [ %i1 + 8 ], %o0
rc = rtems_rfs_buffer_io_release (handle->buffer,
201c2a4: d2 0e 40 00 ldub [ %i1 ], %o1
201c2a8: 40 00 18 66 call 2022440 <rtems_rfs_buffer_bdbuf_release>
201c2ac: c0 22 20 3c clr [ %o0 + 0x3c ]
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
201c2b0: c0 26 60 08 clr [ %i1 + 8 ]
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (handle->buffer,
201c2b4: 81 c7 e0 08 ret
201c2b8: 91 e8 00 08 restore %g0, %o0, %o0
201c2bc: 7f ff bb 34 call 200af8c <_Chain_Append>
201c2c0: 90 07 60 50 add %i5, 0x50, %o0
fs->release_modified_count++;
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
201c2c4: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
201c2c8: 82 00 60 01 inc %g1
201c2cc: c2 27 60 5c st %g1, [ %i5 + 0x5c ]
201c2d0: c0 26 60 08 clr [ %i1 + 8 ]
201c2d4: 81 c7 e0 08 ret
201c2d8: 81 e8 00 00 restore
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
201c2dc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201c2e0: 7f ff db 62 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c2e4: 92 10 22 00 mov 0x200, %o1 <== NOT EXECUTED
201c2e8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c2ec: 32 80 00 19 bne,a 201c350 <rtems_rfs_buffer_handle_release+0x1d0><== NOT EXECUTED
201c2f0: d2 07 60 6c ld [ %i5 + 0x6c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
201c2f4: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
201c2f8: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED
201c2fc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201c300: 08 80 00 0d bleu 201c334 <rtems_rfs_buffer_handle_release+0x1b4><== NOT EXECUTED
201c304: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
201c308: 7f ff bb 35 call 200afdc <_Chain_Get> <== NOT EXECUTED
201c30c: 90 07 60 50 add %i5, 0x50, %o0 <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
201c310: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
modified = false;
201c314: 92 10 20 00 clr %o1 <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
201c318: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
201c31c: c2 27 60 5c st %g1, [ %i5 + 0x5c ] <== NOT EXECUTED
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
modified = true;
}
buffer->user = (void*) 0;
201c320: c0 22 20 3c clr [ %o0 + 0x3c ] <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
201c324: 40 00 18 47 call 2022440 <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
201c328: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED
201c32c: 10 bf ff d1 b 201c270 <rtems_rfs_buffer_handle_release+0xf0><== NOT EXECUTED
201c330: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
201c334: 7f ff bb 2a call 200afdc <_Chain_Get> <== NOT EXECUTED
201c338: 90 07 60 60 add %i5, 0x60, %o0 <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
201c33c: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED
modified = true;
201c340: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
201c344: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
201c348: 10 bf ff f6 b 201c320 <rtems_rfs_buffer_handle_release+0x1a0><== NOT EXECUTED
201c34c: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
201c350: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
201c354: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c358: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
201c35c: 40 00 1c a2 call 20235e4 <printf> <== NOT EXECUTED
201c360: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
201c364: 10 bf ff e5 b 201c2f8 <rtems_rfs_buffer_handle_release+0x178><== NOT EXECUTED
201c368: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
0201c36c <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)
{
201c36c: 9d e3 bf a0 save %sp, -96, %sp
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
201c370: c2 06 60 08 ld [ %i1 + 8 ], %g1
201c374: 80 a0 60 00 cmp %g1, 0
201c378: 02 80 00 18 be 201c3d8 <rtems_rfs_buffer_handle_request+0x6c>
201c37c: ba 10 00 18 mov %i0, %i5
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
201c380: 80 a6 a0 00 cmp %i2, 0
201c384: 02 80 00 07 be 201c3a0 <rtems_rfs_buffer_handle_request+0x34><== NEVER TAKEN
201c388: 90 10 20 00 clr %o0
201c38c: c2 06 60 04 ld [ %i1 + 4 ], %g1
201c390: 80 a0 40 1a cmp %g1, %i2
201c394: 02 80 00 0e be 201c3cc <rtems_rfs_buffer_handle_request+0x60>
201c398: b0 10 20 00 clr %i0
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201c39c: 90 10 20 00 clr %o0
201c3a0: 7f ff db 32 call 2013068 <rtems_rfs_trace>
201c3a4: 92 10 21 00 mov 0x100, %o1
201c3a8: 80 8a 20 ff btst 0xff, %o0
201c3ac: 32 80 00 3e bne,a 201c4a4 <rtems_rfs_buffer_handle_request+0x138><== NEVER TAKEN
201c3b0: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
201c3b4: 90 10 00 1d mov %i5, %o0
201c3b8: 7f ff ff 72 call 201c180 <rtems_rfs_buffer_handle_release>
201c3bc: 92 10 00 19 mov %i1, %o1
if (rc > 0)
201c3c0: b0 92 20 00 orcc %o0, 0, %i0
201c3c4: 24 80 00 04 ble,a 201c3d4 <rtems_rfs_buffer_handle_request+0x68><== ALWAYS TAKEN
201c3c8: c0 2e 40 00 clrb [ %i1 ]
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
201c3cc: 81 c7 e0 08 ret
201c3d0: 81 e8 00 00 restore
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
handle->bnum = 0;
201c3d4: c0 26 60 04 clr [ %i1 + 4 ]
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201c3d8: 90 10 20 00 clr %o0
201c3dc: 7f ff db 23 call 2013068 <rtems_rfs_trace>
201c3e0: 92 10 21 00 mov 0x100, %o1
201c3e4: 80 8a 20 ff btst 0xff, %o0
201c3e8: 32 80 00 5d bne,a 201c55c <rtems_rfs_buffer_handle_request+0x1f0><== NEVER TAKEN
201c3ec: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could
* be shared where different parts of the block have separate functions. An
* example is an inode block and the file system needs to handle 2 inodes in
* the same block at the same time.
*/
if (fs->buffers_count)
201c3f0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
201c3f4: 80 a0 60 00 cmp %g1, 0
201c3f8: 12 80 00 45 bne 201c50c <rtems_rfs_buffer_handle_request+0x1a0>
201c3fc: 90 07 60 40 add %i5, 0x40, %o0
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
201c400: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
201c404: c4 07 40 00 ld [ %i5 ], %g2
201c408: 80 88 a0 02 btst 2, %g2
201c40c: 02 80 00 2b be 201c4b8 <rtems_rfs_buffer_handle_request+0x14c>
201c410: 80 a0 60 00 cmp %g1, 0
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
201c414: 02 80 00 58 be 201c574 <rtems_rfs_buffer_handle_request+0x208><== ALWAYS TAKEN
201c418: 90 10 00 1d mov %i5, %o0
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
201c41c: c4 00 60 38 ld [ %g1 + 0x38 ], %g2
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
201c420: 92 10 00 01 mov %g1, %o1
201c424: 84 00 a0 01 inc %g2
201c428: 90 07 60 40 add %i5, 0x40, %o0
201c42c: 7f ff ba d8 call 200af8c <_Chain_Append>
201c430: c4 20 60 38 st %g2, [ %g1 + 0x38 ]
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
201c434: c4 07 60 4c ld [ %i5 + 0x4c ], %g2
handle->buffer->user = (void*) ((intptr_t) block);
201c438: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
201c43c: 84 00 a0 01 inc %g2
201c440: c4 27 60 4c st %g2, [ %i5 + 0x4c ]
handle->buffer->user = (void*) ((intptr_t) block);
201c444: f4 20 60 3c st %i2, [ %g1 + 0x3c ]
handle->bnum = block;
201c448: f4 26 60 04 st %i2, [ %i1 + 4 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201c44c: 90 10 20 00 clr %o0
201c450: 92 10 21 00 mov 0x100, %o1
201c454: 7f ff db 05 call 2013068 <rtems_rfs_trace>
201c458: b0 10 20 00 clr %i0
201c45c: 80 8a 20 ff btst 0xff, %o0
201c460: 02 bf ff db be 201c3cc <rtems_rfs_buffer_handle_request+0x60><== ALWAYS TAKEN
201c464: 15 00 80 d0 sethi %hi(0x2034000), %o2
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
201c468: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201c46c: 02 80 00 04 be 201c47c <rtems_rfs_buffer_handle_request+0x110><== NOT EXECUTED
201c470: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED
201c474: 15 00 80 cd sethi %hi(0x2033400), %o2 <== NOT EXECUTED
201c478: 94 12 a2 68 or %o2, 0x268, %o2 ! 2033668 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
201c47c: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
handle->buffer->references);
return 0;
201c480: b0 10 20 00 clr %i0 <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
201c484: d6 00 60 20 ld [ %g1 + 0x20 ], %o3 <== NOT EXECUTED
201c488: d8 00 60 38 ld [ %g1 + 0x38 ], %o4 <== NOT EXECUTED
201c48c: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c490: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201c494: 40 00 1c 54 call 20235e4 <printf> <== NOT EXECUTED
201c498: 90 12 22 38 or %o0, 0x238, %o0 <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
201c49c: 81 c7 e0 08 ret <== NOT EXECUTED
201c4a0: 81 e8 00 00 restore <== NOT EXECUTED
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
201c4a4: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c4a8: 40 00 1c 4f call 20235e4 <printf> <== NOT EXECUTED
201c4ac: 90 12 21 68 or %o0, 0x168, %o0 ! 2034168 <CSWTCH.1+0x228> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
201c4b0: 10 bf ff c2 b 201c3b8 <rtems_rfs_buffer_handle_request+0x4c><== NOT EXECUTED
201c4b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
201c4b8: 32 bf ff da bne,a 201c420 <rtems_rfs_buffer_handle_request+0xb4>
201c4bc: c4 00 60 38 ld [ %g1 + 0x38 ], %g2
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
201c4c0: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
201c4c4: 80 a0 60 00 cmp %g1, 0
201c4c8: 12 80 00 4b bne 201c5f4 <rtems_rfs_buffer_handle_request+0x288>
201c4cc: 90 07 60 50 add %i5, 0x50, %o0
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
201c4d0: c2 07 60 6c ld [ %i5 + 0x6c ], %g1
201c4d4: 80 a0 60 00 cmp %g1, 0
201c4d8: 02 80 00 27 be 201c574 <rtems_rfs_buffer_handle_request+0x208>
201c4dc: 90 10 00 1d mov %i5, %o0
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
201c4e0: 90 07 60 60 add %i5, 0x60, %o0
201c4e4: 92 07 60 6c add %i5, 0x6c, %o1
201c4e8: 7f ff fe de call 201c060 <rtems_rfs_scan_chain>
201c4ec: 94 10 00 1a mov %i2, %o2
201c4f0: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
201c4f4: 80 a2 20 00 cmp %o0, 0
201c4f8: 02 80 00 1e be 201c570 <rtems_rfs_buffer_handle_request+0x204>
201c4fc: 82 10 00 08 mov %o0, %g1
rtems_rfs_buffer_mark_dirty (handle);
201c500: 84 10 20 01 mov 1, %g2
201c504: 10 bf ff c6 b 201c41c <rtems_rfs_buffer_handle_request+0xb0>
201c508: c4 2e 40 00 stb %g2, [ %i1 ]
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
201c50c: 92 07 60 4c add %i5, 0x4c, %o1
201c510: 7f ff fe d4 call 201c060 <rtems_rfs_scan_chain>
201c514: 94 10 00 1a mov %i2, %o2
201c518: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
201c51c: 80 a2 20 00 cmp %o0, 0
201c520: 02 bf ff b9 be 201c404 <rtems_rfs_buffer_handle_request+0x98>
201c524: 82 10 20 00 clr %g1
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201c528: 90 10 20 00 clr %o0
201c52c: 7f ff da cf call 2013068 <rtems_rfs_trace>
201c530: 92 10 21 00 mov 0x100, %o1
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
201c534: 80 8a 20 ff btst 0xff, %o0
201c538: 02 bf ff b3 be 201c404 <rtems_rfs_buffer_handle_request+0x98><== ALWAYS TAKEN
201c53c: c2 06 60 08 ld [ %i1 + 8 ], %g1
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
201c540: d2 00 60 38 ld [ %g1 + 0x38 ], %o1 <== NOT EXECUTED
201c544: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c548: 92 02 60 01 inc %o1 <== NOT EXECUTED
201c54c: 40 00 1c 26 call 20235e4 <printf> <== NOT EXECUTED
201c550: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED
201c554: 10 bf ff ac b 201c404 <rtems_rfs_buffer_handle_request+0x98><== NOT EXECUTED
201c558: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
201c55c: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c560: 40 00 1c 21 call 20235e4 <printf> <== NOT EXECUTED
201c564: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 20341a0 <CSWTCH.1+0x260> <== 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)
201c568: 10 bf ff a3 b 201c3f4 <rtems_rfs_buffer_handle_request+0x88><== NOT EXECUTED
201c56c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
201c570: 90 10 00 1d mov %i5, %o0
201c574: 92 10 00 1a mov %i2, %o1
201c578: 94 10 00 1b mov %i3, %o2
201c57c: 40 00 17 9c call 20223ec <rtems_rfs_buffer_bdbuf_request>
201c580: 96 06 60 08 add %i1, 8, %o3
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
201c584: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* 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);
201c588: b0 10 00 08 mov %o0, %i0
201c58c: c0 20 60 04 clr [ %g1 + 4 ]
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
if (rc > 0)
201c590: 80 a2 20 00 cmp %o0, 0
201c594: 04 bf ff a2 ble 201c41c <rtems_rfs_buffer_handle_request+0xb0><== ALWAYS TAKEN
201c598: c0 20 40 00 clr [ %g1 ]
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201c59c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201c5a0: 7f ff da b2 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c5a4: 92 10 21 00 mov 0x100, %o1 <== NOT EXECUTED
201c5a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c5ac: 02 bf ff 88 be 201c3cc <rtems_rfs_buffer_handle_request+0x60><== NOT EXECUTED
201c5b0: 3b 00 80 d0 sethi %hi(0x2034000), %i5 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
201c5b4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201c5b8: 02 80 00 04 be 201c5c8 <rtems_rfs_buffer_handle_request+0x25c><== NOT EXECUTED
201c5bc: ba 17 61 60 or %i5, 0x160, %i5 <== NOT EXECUTED
201c5c0: 3b 00 80 cd sethi %hi(0x2033400), %i5 <== NOT EXECUTED
201c5c4: ba 17 62 68 or %i5, 0x268, %i5 ! 2033668 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
201c5c8: 40 00 1f 3a call 20242b0 <strerror> <== NOT EXECUTED
201c5cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201c5d0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201c5d4: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
201c5d8: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
201c5dc: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c5e0: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201c5e4: 40 00 1c 00 call 20235e4 <printf> <== NOT EXECUTED
201c5e8: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED
201c5ec: 81 c7 e0 08 ret <== NOT EXECUTED
201c5f0: 81 e8 00 00 restore <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
201c5f4: 92 07 60 5c add %i5, 0x5c, %o1
201c5f8: 7f ff fe 9a call 201c060 <rtems_rfs_scan_chain>
201c5fc: 94 10 00 1a mov %i2, %o2
201c600: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
201c604: 80 a2 20 00 cmp %o0, 0
201c608: 12 bf ff 85 bne 201c41c <rtems_rfs_buffer_handle_request+0xb0>
201c60c: 82 10 00 08 mov %o0, %g1
201c610: 10 bf ff b1 b 201c4d4 <rtems_rfs_buffer_handle_request+0x168>
201c614: c2 07 60 6c ld [ %i5 + 0x6c ], %g1
0201c618 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
201c618: 9d e3 bf 58 save %sp, -168, %sp
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201c61c: 90 10 20 00 clr %o0
201c620: 92 10 20 20 mov 0x20, %o1
201c624: 7f ff da 91 call 2013068 <rtems_rfs_trace>
201c628: ba 10 00 18 mov %i0, %i5
201c62c: 80 8a 20 ff btst 0xff, %o0
201c630: 12 80 00 17 bne 201c68c <rtems_rfs_buffer_open+0x74> <== NEVER TAKEN
201c634: 92 10 00 18 mov %i0, %o1
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
201c638: 90 10 00 1d mov %i5, %o0
201c63c: 7f ff ab 77 call 2007418 <stat>
201c640: 92 07 bf b8 add %fp, -72, %o1
201c644: 80 a2 20 00 cmp %o0, 0
201c648: 06 80 00 1b bl 201c6b4 <rtems_rfs_buffer_open+0x9c> <== NEVER TAKEN
201c64c: 90 10 20 00 clr %o0
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
201c650: c4 07 bf c4 ld [ %fp + -60 ], %g2
201c654: 03 00 00 3c sethi %hi(0xf000), %g1
201c658: 84 08 80 01 and %g2, %g1, %g2
201c65c: 03 00 00 18 sethi %hi(0x6000), %g1
201c660: 80 a0 80 01 cmp %g2, %g1
201c664: 02 80 00 25 be 201c6f8 <rtems_rfs_buffer_open+0xe0> <== ALWAYS TAKEN
201c668: 92 10 20 08 mov 8, %o1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
201c66c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201c670: 7f ff da 7e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c674: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201c678: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c67c: 12 80 00 32 bne 201c744 <rtems_rfs_buffer_open+0x12c> <== NOT EXECUTED
201c680: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
201c684: 81 c7 e0 08 ret
201c688: 81 e8 00 00 restore
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
201c68c: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c690: 40 00 1b d5 call 20235e4 <printf> <== NOT EXECUTED
201c694: 90 12 22 78 or %o0, 0x278, %o0 ! 2034278 <CSWTCH.1+0x338> <== NOT EXECUTED
if (stat (name, &st) < 0)
201c698: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c69c: 7f ff ab 5f call 2007418 <stat> <== NOT EXECUTED
201c6a0: 92 07 bf b8 add %fp, -72, %o1 <== NOT EXECUTED
201c6a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201c6a8: 16 bf ff eb bge 201c654 <rtems_rfs_buffer_open+0x3c> <== NOT EXECUTED
201c6ac: c4 07 bf c4 ld [ %fp + -60 ], %g2 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
201c6b0: 90 10 20 00 clr %o0 <== NOT EXECUTED
201c6b4: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
201c6b8: 7f ff da 6c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c6bc: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
201c6c0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c6c4: 02 80 00 2d be 201c778 <rtems_rfs_buffer_open+0x160> <== NOT EXECUTED
201c6c8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
201c6cc: 40 00 18 5e call 2022844 <__errno> <== NOT EXECUTED
201c6d0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
201c6d4: 40 00 1e f7 call 20242b0 <strerror> <== NOT EXECUTED
201c6d8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
201c6dc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201c6e0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201c6e4: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c6e8: 40 00 1b bf call 20235e4 <printf> <== NOT EXECUTED
201c6ec: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 20342a0 <CSWTCH.1+0x360> <== NOT EXECUTED
201c6f0: 81 c7 e0 08 ret <== NOT EXECUTED
201c6f4: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
201c6f8: 7f ff a1 15 call 2004b4c <rtems_disk_obtain>
201c6fc: d0 1f bf d0 ldd [ %fp + -48 ], %o0
201c700: d0 26 60 0c st %o0, [ %i1 + 0xc ]
if (!fs->disk)
201c704: 80 a2 20 00 cmp %o0, 0
201c708: 02 80 00 14 be 201c758 <rtems_rfs_buffer_open+0x140> <== NEVER TAKEN
201c70c: 90 10 20 00 clr %o0
}
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201c710: 92 10 20 20 mov 0x20, %o1
201c714: 7f ff da 55 call 2013068 <rtems_rfs_trace>
201c718: b0 10 20 00 clr %i0
201c71c: 80 8a 20 ff btst 0xff, %o0
201c720: 02 bf ff d9 be 201c684 <rtems_rfs_buffer_open+0x6c> <== ALWAYS TAKEN
201c724: 11 00 80 d0 sethi %hi(0x2034000), %o0
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
201c728: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
201c72c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
201c730: d4 00 60 24 ld [ %g1 + 0x24 ], %o2 <== NOT EXECUTED
201c734: 40 00 1b ac call 20235e4 <printf> <== NOT EXECUTED
201c738: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
201c73c: 81 c7 e0 08 ret <== NOT EXECUTED
201c740: 81 e8 00 00 restore <== NOT EXECUTED
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
201c744: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c748: 40 00 1b a7 call 20235e4 <printf> <== NOT EXECUTED
201c74c: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 20342d0 <CSWTCH.1+0x390> <== NOT EXECUTED
201c750: 81 c7 e0 08 ret <== NOT EXECUTED
201c754: 81 e8 00 00 restore <== NOT EXECUTED
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
if (!fs->disk)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
201c758: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
201c75c: 7f ff da 43 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c760: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201c764: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c768: 02 bf ff c7 be 201c684 <rtems_rfs_buffer_open+0x6c> <== NOT EXECUTED
201c76c: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
201c770: 40 00 1b de call 20236e8 <puts> <== NOT EXECUTED
201c774: 90 12 23 08 or %o0, 0x308, %o0 ! 2034308 <CSWTCH.1+0x3c8> <== NOT EXECUTED
201c778: 81 c7 e0 08 ret <== NOT EXECUTED
201c77c: 81 e8 00 00 restore <== NOT EXECUTED
0201c8a4 <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
201c8a4: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201c8a8: 90 10 20 00 clr %o0
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
201c8ac: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201c8b0: 7f ff d9 ee call 2013068 <rtems_rfs_trace>
201c8b4: 92 10 24 00 mov 0x400, %o1
201c8b8: 80 8a 20 ff btst 0xff, %o0
201c8bc: 12 80 00 21 bne 201c940 <rtems_rfs_buffer_setblksize+0x9c><== NEVER TAKEN
201c8c0: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
201c8c4: 7f ff ff d6 call 201c81c <rtems_rfs_buffers_release>
201c8c8: 90 10 00 18 mov %i0, %o0
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201c8cc: ba 92 20 00 orcc %o0, 0, %i5
201c8d0: 04 80 00 07 ble 201c8ec <rtems_rfs_buffer_setblksize+0x48><== ALWAYS TAKEN
201c8d4: 90 10 20 00 clr %o0
201c8d8: 7f ff d9 e4 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c8dc: 92 10 24 00 mov 0x400, %o1 <== NOT EXECUTED
201c8e0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c8e4: 12 80 00 20 bne 201c964 <rtems_rfs_buffer_setblksize+0xc0><== NOT EXECUTED
201c8e8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
201c8ec: 7f ff ff a5 call 201c780 <rtems_rfs_buffer_sync>
201c8f0: 90 10 00 18 mov %i0, %o0
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201c8f4: ba 92 20 00 orcc %o0, 0, %i5
201c8f8: 04 80 00 07 ble 201c914 <rtems_rfs_buffer_setblksize+0x70><== ALWAYS TAKEN
201c8fc: 90 10 20 00 clr %o0
201c900: 7f ff d9 da call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c904: 92 10 24 00 mov 0x400, %o1 <== NOT EXECUTED
201c908: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c90c: 12 80 00 1e bne 201c984 <rtems_rfs_buffer_setblksize+0xe0><== NOT EXECUTED
201c910: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
201c914: d0 06 20 0c ld [ %i0 + 0xc ], %o0
201c918: 13 20 01 10 sethi %hi(0x80044000), %o1
201c91c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
201c920: 92 12 62 04 or %o1, 0x204, %o1
201c924: 9f c0 40 00 call %g1
201c928: 94 07 a0 48 add %fp, 0x48, %o2
if (rc < 0)
201c92c: b0 92 20 00 orcc %o0, 0, %i0
201c930: 06 80 00 08 bl 201c950 <rtems_rfs_buffer_setblksize+0xac> <== NEVER TAKEN
201c934: 01 00 00 00 nop
rc = errno;
#endif
return rc;
}
201c938: 81 c7 e0 08 ret
201c93c: 81 e8 00 00 restore
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
201c940: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201c944: 40 00 1b 28 call 20235e4 <printf> <== NOT EXECUTED
201c948: 90 12 20 08 or %o0, 8, %o0 ! 2034408 <CSWTCH.1+0x4c8> <== NOT EXECUTED
201c94c: 30 bf ff de b,a 201c8c4 <rtems_rfs_buffer_setblksize+0x20><== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
rc = errno;
201c950: 40 00 17 bd call 2022844 <__errno> <== NOT EXECUTED
201c954: 01 00 00 00 nop <== NOT EXECUTED
201c958: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
#endif
return rc;
}
201c95c: 81 c7 e0 08 ret <== NOT EXECUTED
201c960: 81 e8 00 00 restore <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
201c964: 40 00 1e 53 call 20242b0 <strerror> <== NOT EXECUTED
201c968: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c96c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201c970: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201c974: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201c978: 40 00 1b 1b call 20235e4 <printf> <== NOT EXECUTED
201c97c: 90 12 20 38 or %o0, 0x38, %o0 ! 2034438 <CSWTCH.1+0x4f8> <== NOT EXECUTED
201c980: 30 bf ff db b,a 201c8ec <rtems_rfs_buffer_setblksize+0x48><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
201c984: 40 00 1e 4b call 20242b0 <strerror> <== NOT EXECUTED
201c988: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c98c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201c990: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201c994: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201c998: 40 00 1b 13 call 20235e4 <printf> <== NOT EXECUTED
201c99c: 90 12 20 78 or %o0, 0x78, %o0 ! 2034478 <CSWTCH.1+0x538> <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
201c9a0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED
201c9a4: 13 20 01 10 sethi %hi(0x80044000), %o1 <== NOT EXECUTED
201c9a8: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
201c9ac: 92 12 62 04 or %o1, 0x204, %o1 <== NOT EXECUTED
201c9b0: 9f c0 40 00 call %g1 <== NOT EXECUTED
201c9b4: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED
if (rc < 0)
201c9b8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201c9bc: 16 bf ff e8 bge 201c95c <rtems_rfs_buffer_setblksize+0xb8><== NOT EXECUTED
201c9c0: 01 00 00 00 nop <== NOT EXECUTED
201c9c4: 30 bf ff e3 b,a 201c950 <rtems_rfs_buffer_setblksize+0xac><== NOT EXECUTED
0201c780 <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
201c780: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201c784: 90 10 20 00 clr %o0
201c788: 92 10 20 20 mov 0x20, %o1
201c78c: 7f ff da 37 call 2013068 <rtems_rfs_trace>
201c790: ba 10 00 18 mov %i0, %i5
201c794: 80 8a 20 ff btst 0xff, %o0
201c798: 12 80 00 1d bne 201c80c <rtems_rfs_buffer_sync+0x8c> <== NEVER TAKEN
201c79c: 11 00 80 d0 sethi %hi(0x2034000), %o0
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201c7a0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
201c7a4: b0 10 20 00 clr %i0
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201c7a8: 7f ff e4 b9 call 2015a8c <rtems_bdbuf_syncdev>
201c7ac: d0 18 40 00 ldd [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
201c7b0: b8 92 20 00 orcc %o0, 0, %i4
201c7b4: 12 80 00 06 bne 201c7cc <rtems_rfs_buffer_sync+0x4c> <== NEVER TAKEN
201c7b8: 90 10 20 00 clr %o0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
201c7bc: 7f ff a1 03 call 2004bc8 <rtems_disk_release>
201c7c0: d0 07 60 0c ld [ %i5 + 0xc ], %o0
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
201c7c4: 81 c7 e0 08 ret
201c7c8: 81 e8 00 00 restore
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201c7cc: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED
201c7d0: 7f ff da 26 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201c7d4: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201c7d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201c7dc: 02 bf ff f8 be 201c7bc <rtems_rfs_buffer_sync+0x3c> <== NOT EXECUTED
201c7e0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
201c7e4: 7f ff ea f7 call 20173c0 <rtems_status_text> <== NOT EXECUTED
201c7e8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201c7ec: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201c7f0: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c7f4: 40 00 1b 7c call 20235e4 <printf> <== NOT EXECUTED
201c7f8: 90 12 23 88 or %o0, 0x388, %o0 ! 2034388 <CSWTCH.1+0x448> <== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
201c7fc: 7f ff a0 f3 call 2004bc8 <rtems_disk_release> <== NOT EXECUTED
201c800: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
201c804: 81 c7 e0 08 ret <== NOT EXECUTED
201c808: 81 e8 00 00 restore <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: syncing\n");
201c80c: 40 00 1b b7 call 20236e8 <puts> <== NOT EXECUTED
201c810: 90 12 23 68 or %o0, 0x368, %o0 <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201c814: 10 bf ff e4 b 201c7a4 <rtems_rfs_buffer_sync+0x24> <== NOT EXECUTED
201c818: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
0201c81c <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
201c81c: 9d e3 bf a0 save %sp, -96, %sp
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
201c820: 90 10 20 00 clr %o0
201c824: 92 10 20 40 mov 0x40, %o1
201c828: 7f ff da 10 call 2013068 <rtems_rfs_trace>
201c82c: ba 10 00 18 mov %i0, %i5
201c830: 80 8a 20 ff btst 0xff, %o0
201c834: 32 80 00 15 bne,a 201c888 <rtems_rfs_buffers_release+0x6c><== NEVER TAKEN
201c838: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
201c83c: 92 07 60 5c add %i5, 0x5c, %o1
201c840: 94 10 20 00 clr %o2
201c844: 7f ff fd e0 call 201bfc4 <rtems_rfs_release_chain>
201c848: 90 07 60 50 add %i5, 0x50, %o0
201c84c: 82 38 00 08 xnor %g0, %o0, %g1
201c850: 83 38 60 1f sra %g1, 0x1f, %g1
201c854: b0 10 00 08 mov %o0, %i0
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
201c858: 92 07 60 6c add %i5, 0x6c, %o1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
201c85c: b0 0e 00 01 and %i0, %g1, %i0
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
201c860: 90 07 60 60 add %i5, 0x60, %o0
201c864: 7f ff fd d8 call 201bfc4 <rtems_rfs_release_chain>
201c868: 94 10 20 01 mov 1, %o2
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
201c86c: 80 a6 20 00 cmp %i0, 0
201c870: 12 80 00 04 bne 201c880 <rtems_rfs_buffers_release+0x64> <== NEVER TAKEN
201c874: 80 a2 20 00 cmp %o0, 0
201c878: 34 80 00 02 bg,a 201c880 <rtems_rfs_buffers_release+0x64><== NEVER TAKEN
201c87c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rrc = rc;
return rrc;
}
201c880: 81 c7 e0 08 ret
201c884: 81 e8 00 00 restore
{
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
201c888: d4 06 20 5c ld [ %i0 + 0x5c ], %o2 <== NOT EXECUTED
201c88c: d6 06 20 6c ld [ %i0 + 0x6c ], %o3 <== NOT EXECUTED
201c890: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c894: 40 00 1b 54 call 20235e4 <printf> <== NOT EXECUTED
201c898: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 20343b8 <CSWTCH.1+0x478> <== 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,
201c89c: 10 bf ff e9 b 201c840 <rtems_rfs_buffers_release+0x24> <== NOT EXECUTED
201c8a0: 92 07 60 5c add %i5, 0x5c, %o1 <== NOT EXECUTED
0201cfb0 <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)
{
201cfb0: 9d e3 bf 30 save %sp, -208, %sp
rtems_rfs_block_map map;
rtems_rfs_block_pos bpos;
rtems_rfs_buffer_handle buffer;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201cfb4: 90 10 20 00 clr %o0
201cfb8: 13 08 00 00 sethi %hi(0x20000000), %o1
201cfbc: 7f ff d8 2b call 2013068 <rtems_rfs_trace>
201cfc0: ba 10 00 18 mov %i0, %i5
201cfc4: 80 8a 20 ff btst 0xff, %o0
201cfc8: 32 80 00 84 bne,a 201d1d8 <rtems_rfs_dir_add_entry+0x228><== NEVER TAKEN
201cfcc: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
201cfd0: 90 10 00 1d mov %i5, %o0
201cfd4: 92 10 00 19 mov %i1, %o1
201cfd8: 7f ff f8 d1 call 201b31c <rtems_rfs_block_map_open>
201cfdc: 94 07 bf 94 add %fp, -108, %o2
if (rc > 0)
201cfe0: b0 92 20 00 orcc %o0, 0, %i0
201cfe4: 14 80 00 7b bg 201d1d0 <rtems_rfs_dir_add_entry+0x220> <== NEVER TAKEN
201cfe8: 21 00 00 3f sethi %hi(0xfc00), %l0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201cfec: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201cff0: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201cff4: c0 27 bf f8 clr [ %fp + -8 ]
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
201cff8: c0 27 bf e4 clr [ %fp + -28 ]
bpos->boff = 0;
201cffc: c0 27 bf e8 clr [ %fp + -24 ]
bpos->block = 0;
201d000: c0 27 bf ec clr [ %fp + -20 ]
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d004: a0 14 23 ff or %l0, 0x3ff, %l0
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
201d008: a4 06 e0 0a add %i3, 0xa, %l2
/*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
201d00c: 90 10 00 1d mov %i5, %o0
201d010: 92 07 bf 94 add %fp, -108, %o1
201d014: 94 07 bf e4 add %fp, -28, %o2
201d018: 7f ff f9 9a call 201b680 <rtems_rfs_block_map_find>
201d01c: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
201d020: b0 92 20 00 orcc %o0, 0, %i0
201d024: 04 80 00 b1 ble 201d2e8 <rtems_rfs_dir_add_entry+0x338>
201d028: 80 a6 20 06 cmp %i0, 6
{
if (rc != ENXIO)
201d02c: 12 80 00 c2 bne 201d334 <rtems_rfs_dir_add_entry+0x384> <== NEVER TAKEN
201d030: 90 10 00 1d mov %i5, %o0
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
201d034: 92 07 bf 94 add %fp, -108, %o1
201d038: 94 10 20 01 mov 1, %o2
201d03c: 7f ff fa 15 call 201b890 <rtems_rfs_block_map_grow>
201d040: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
201d044: b0 92 20 00 orcc %o0, 0, %i0
201d048: 14 80 00 cc bg 201d378 <rtems_rfs_dir_add_entry+0x3c8> <== NEVER TAKEN
201d04c: a2 10 20 00 clr %l1
}
read = false;
}
bpos.bno++;
201d050: c2 07 bf e4 ld [ %fp + -28 ], %g1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
201d054: d4 07 bf fc ld [ %fp + -4 ], %o2
}
read = false;
}
bpos.bno++;
201d058: 82 00 60 01 inc %g1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
201d05c: a2 0c 60 ff and %l1, 0xff, %l1
}
read = false;
}
bpos.bno++;
201d060: c2 27 bf e4 st %g1, [ %fp + -28 ]
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
201d064: 90 10 00 1d mov %i5, %o0
201d068: 92 07 bf f0 add %fp, -16, %o1
201d06c: 7f ff fc c0 call 201c36c <rtems_rfs_buffer_handle_request>
201d070: 96 10 00 11 mov %l1, %o3
if (rc > 0)
201d074: b0 92 20 00 orcc %o0, 0, %i0
201d078: 14 80 00 9e bg 201d2f0 <rtems_rfs_dir_add_entry+0x340> <== NEVER TAKEN
201d07c: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
201d080: 80 a4 60 00 cmp %l1, 0
201d084: 02 80 00 68 be 201d224 <rtems_rfs_dir_add_entry+0x274>
201d088: e2 00 60 24 ld [ %g1 + 0x24 ], %l1
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201d08c: da 07 60 08 ld [ %i5 + 8 ], %o5
201d090: 9e 83 7f f6 addcc %o5, -10, %o7
201d094: 02 bf ff df be 201d010 <rtems_rfs_dir_add_entry+0x60> <== NEVER TAKEN
201d098: 90 10 00 1d mov %i5, %o0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d09c: c2 0c 60 09 ldub [ %l1 + 9 ], %g1
201d0a0: e8 0c 60 08 ldub [ %l1 + 8 ], %l4
eino = rtems_rfs_dir_entry_ino (entry);
201d0a4: c4 0c 40 00 ldub [ %l1 ], %g2
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d0a8: a9 2d 20 08 sll %l4, 8, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201d0ac: c8 0c 60 01 ldub [ %l1 + 1 ], %g4
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d0b0: a8 15 00 01 or %l4, %g1, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201d0b4: c6 0c 60 02 ldub [ %l1 + 2 ], %g3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d0b8: 80 a5 00 10 cmp %l4, %l0
201d0bc: 02 80 00 60 be 201d23c <rtems_rfs_dir_add_entry+0x28c>
201d0c0: c2 0c 60 03 ldub [ %l1 + 3 ], %g1
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201d0c4: a6 09 20 ff and %g4, 0xff, %l3
201d0c8: 86 08 e0 ff and %g3, 0xff, %g3
201d0cc: a7 2c e0 10 sll %l3, 0x10, %l3
201d0d0: 87 28 e0 08 sll %g3, 8, %g3
201d0d4: 82 08 60 ff and %g1, 0xff, %g1
201d0d8: a6 14 c0 03 or %l3, %g3, %l3
201d0dc: 85 28 a0 18 sll %g2, 0x18, %g2
201d0e0: a6 14 c0 01 or %l3, %g1, %l3
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
201d0e4: b0 10 20 00 clr %i0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201d0e8: 10 80 00 20 b 201d168 <rtems_rfs_dir_add_entry+0x1b8>
201d0ec: a6 14 c0 02 or %l3, %g2, %l3
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201d0f0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201d0f4: 80 a5 00 01 cmp %l4, %g1
201d0f8: 1a 80 00 1f bcc 201d174 <rtems_rfs_dir_add_entry+0x1c4> <== NEVER TAKEN
201d0fc: 80 a4 e0 00 cmp %l3, 0
201d100: 02 80 00 1e be 201d178 <rtems_rfs_dir_add_entry+0x1c8> <== NEVER TAKEN
201d104: 90 10 20 00 clr %o0
201d108: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201d10c: 80 a0 40 13 cmp %g1, %l3
201d110: 0a 80 00 1a bcs 201d178 <rtems_rfs_dir_add_entry+0x1c8> <== NEVER TAKEN
201d114: 01 00 00 00 nop
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
offset += elength;
201d118: b0 06 00 14 add %i0, %l4, %i0
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201d11c: 80 a6 00 0f cmp %i0, %o7
201d120: 1a bf ff bb bcc 201d00c <rtems_rfs_dir_add_entry+0x5c> <== NEVER TAKEN
201d124: 98 10 00 18 mov %i0, %o4
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d128: e8 0c 60 08 ldub [ %l1 + 8 ], %l4
201d12c: c8 0c 60 09 ldub [ %l1 + 9 ], %g4
eino = rtems_rfs_dir_entry_ino (entry);
201d130: e6 0c 40 00 ldub [ %l1 ], %l3
201d134: c6 0c 60 01 ldub [ %l1 + 1 ], %g3
201d138: c4 0c 60 03 ldub [ %l1 + 3 ], %g2
201d13c: c2 0c 60 02 ldub [ %l1 + 2 ], %g1
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d140: a9 2d 20 08 sll %l4, 8, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201d144: a7 2c e0 18 sll %l3, 0x18, %l3
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d148: a8 15 00 04 or %l4, %g4, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201d14c: 87 28 e0 10 sll %g3, 0x10, %g3
201d150: 83 28 60 08 sll %g1, 8, %g1
201d154: a6 14 c0 03 or %l3, %g3, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d158: 80 a5 00 10 cmp %l4, %l0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201d15c: a6 14 c0 02 or %l3, %g2, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d160: 02 80 00 38 be 201d240 <rtems_rfs_dir_add_entry+0x290>
201d164: a6 14 c0 01 or %l3, %g1, %l3
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201d168: 80 a5 20 0a cmp %l4, 0xa
201d16c: 14 bf ff e1 bg 201d0f0 <rtems_rfs_dir_add_entry+0x140> <== ALWAYS TAKEN
201d170: a2 04 40 14 add %l1, %l4, %l1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201d174: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d178: 7f ff d7 bc call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d17c: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201d180: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d184: 02 80 00 0a be 201d1ac <rtems_rfs_dir_add_entry+0x1fc> <== NOT EXECUTED
201d188: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
201d18c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201d190: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d194: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201d198: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED
201d19c: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
201d1a0: 40 00 19 11 call 20235e4 <printf> <== NOT EXECUTED
201d1a4: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201d1a8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201d1ac: 7f ff fb f5 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201d1b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201d1b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201d1b8: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201d1bc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201d1c0: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201d1c4: 92 07 bf 94 add %fp, -108, %o1 <== NOT EXECUTED
201d1c8: 7f ff f8 b9 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201d1cc: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
return EIO;
201d1d0: 81 c7 e0 08 ret <== NOT EXECUTED
201d1d4: 81 e8 00 00 restore <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
201d1d8: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201d1dc: 40 00 19 02 call 20235e4 <printf> <== NOT EXECUTED
201d1e0: 90 12 23 f0 or %o0, 0x3f0, %o0 ! 20347f0 <CSWTCH.1+0x8b0> <== NOT EXECUTED
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
201d1e4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201d1e8: 02 80 00 09 be 201d20c <rtems_rfs_dir_add_entry+0x25c> <== NOT EXECUTED
201d1ec: 82 10 20 00 clr %g1 <== NOT EXECUTED
201d1f0: b0 10 20 00 clr %i0 <== NOT EXECUTED
printf ("%c", name[c]);
201d1f4: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 <== NOT EXECUTED
201d1f8: 40 00 19 0e call 2023630 <putchar> <== NOT EXECUTED
201d1fc: b0 06 20 01 inc %i0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
201d200: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED
201d204: 12 bf ff fc bne 201d1f4 <rtems_rfs_dir_add_entry+0x244> <== NOT EXECUTED
201d208: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
201d20c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201d210: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d214: 40 00 18 f4 call 20235e4 <printf> <== NOT EXECUTED
201d218: 90 12 20 20 or %o0, 0x20, %o0 ! 2034820 <CSWTCH.1+0x8e0> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
201d21c: 10 bf ff 6e b 201cfd4 <rtems_rfs_dir_add_entry+0x24> <== NOT EXECUTED
201d220: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
201d224: d4 07 60 08 ld [ %i5 + 8 ], %o2
201d228: 90 10 00 11 mov %l1, %o0
201d22c: 40 00 18 9c call 202349c <memset>
201d230: 92 10 20 ff mov 0xff, %o1
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201d234: 10 bf ff 97 b 201d090 <rtems_rfs_dir_add_entry+0xe0>
201d238: da 07 60 08 ld [ %i5 + 8 ], %o5
201d23c: 98 10 20 00 clr %o4
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
201d240: 9a 23 40 0c sub %o5, %o4, %o5
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
201d244: 80 a4 80 0d cmp %l2, %o5
201d248: 3a bf ff 72 bcc,a 201d010 <rtems_rfs_dir_add_entry+0x60> <== NEVER TAKEN
201d24c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
201d250: 92 10 00 1b mov %i3, %o1
201d254: 40 00 14 ab call 2022500 <rtems_rfs_dir_hash>
201d258: 90 10 00 1a mov %i2, %o0
rtems_rfs_dir_set_entry_hash (entry, hash);
201d25c: 83 32 20 08 srl %o0, 8, %g1
201d260: c2 2c 60 06 stb %g1, [ %l1 + 6 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
201d264: 83 37 20 10 srl %i4, 0x10, %g1
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
201d268: 85 32 20 10 srl %o0, 0x10, %g2
rtems_rfs_dir_set_entry_ino (entry, ino);
201d26c: c2 2c 60 01 stb %g1, [ %l1 + 1 ]
201d270: 83 37 20 08 srl %i4, 8, %g1
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
201d274: 87 32 20 18 srl %o0, 0x18, %g3
201d278: c4 2c 60 05 stb %g2, [ %l1 + 5 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
201d27c: c2 2c 60 02 stb %g1, [ %l1 + 2 ]
201d280: 85 37 20 18 srl %i4, 0x18, %g2
rtems_rfs_dir_set_entry_length (entry,
201d284: 83 34 a0 08 srl %l2, 8, %g1
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
201d288: 94 10 00 1b mov %i3, %o2
201d28c: 92 10 00 1a mov %i2, %o1
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
201d290: c6 2c 60 04 stb %g3, [ %l1 + 4 ]
201d294: d0 2c 60 07 stb %o0, [ %l1 + 7 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
201d298: c4 2c 40 00 stb %g2, [ %l1 ]
rtems_rfs_dir_set_entry_length (entry,
201d29c: c2 2c 60 08 stb %g1, [ %l1 + 8 ]
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
201d2a0: f8 2c 60 03 stb %i4, [ %l1 + 3 ]
rtems_rfs_dir_set_entry_length (entry,
201d2a4: e4 2c 60 09 stb %l2, [ %l1 + 9 ]
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
201d2a8: 40 00 17 f1 call 202326c <memcpy>
201d2ac: 90 04 60 0a add %l1, 0xa, %o0
rtems_rfs_buffer_mark_dirty (&buffer);
201d2b0: 82 10 20 01 mov 1, %g1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201d2b4: 92 07 bf f0 add %fp, -16, %o1
201d2b8: 90 10 00 1d mov %i5, %o0
201d2bc: 7f ff fb b1 call 201c180 <rtems_rfs_buffer_handle_release>
201d2c0: c2 2f bf f0 stb %g1, [ %fp + -16 ]
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201d2c4: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
201d2c8: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201d2cc: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201d2d0: c0 27 bf f8 clr [ %fp + -8 ]
201d2d4: 92 07 bf 94 add %fp, -108, %o1
201d2d8: 7f ff f8 75 call 201b4ac <rtems_rfs_block_map_close>
201d2dc: b0 10 20 00 clr %i0
return 0;
201d2e0: 81 c7 e0 08 ret
201d2e4: 81 e8 00 00 restore
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
201d2e8: 10 bf ff 5a b 201d050 <rtems_rfs_dir_add_entry+0xa0>
201d2ec: a2 10 20 01 mov 1, %l1
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201d2f0: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d2f4: 7f ff d7 5d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d2f8: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201d2fc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d300: 32 80 00 2f bne,a 201d3bc <rtems_rfs_dir_add_entry+0x40c><== NOT EXECUTED
201d304: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201d308: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201d30c: 7f ff fb 9d call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201d310: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201d314: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201d318: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201d31c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201d320: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201d324: 7f ff f8 62 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201d328: 92 07 bf 94 add %fp, -108, %o1 <== NOT EXECUTED
return rc;
}
201d32c: 81 c7 e0 08 ret <== NOT EXECUTED
201d330: 81 e8 00 00 restore <== NOT EXECUTED
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
if (rc > 0)
{
if (rc != ENXIO)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201d334: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d338: 7f ff d7 4c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d33c: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201d340: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d344: 22 bf ff f2 be,a 201d30c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201d348: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
201d34c: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201d350: 40 00 1b d8 call 20242b0 <strerror> <== NOT EXECUTED
201d354: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d358: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201d35c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201d360: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201d364: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d368: 40 00 18 9f call 20235e4 <printf> <== NOT EXECUTED
201d36c: 90 12 20 30 or %o0, 0x30, %o0 ! 2034830 <CSWTCH.1+0x8f0> <== 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);
201d370: 10 bf ff e7 b 201d30c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201d374: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201d378: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d37c: 7f ff d7 3b call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d380: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201d384: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d388: 22 bf ff e1 be,a 201d30c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201d38c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
201d390: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201d394: 40 00 1b c7 call 20242b0 <strerror> <== NOT EXECUTED
201d398: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d39c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201d3a0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201d3a4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201d3a8: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d3ac: 40 00 18 8e call 20235e4 <printf> <== NOT EXECUTED
201d3b0: 90 12 20 78 or %o0, 0x78, %o0 ! 2034878 <CSWTCH.1+0x938> <== NOT EXECUTED
201d3b4: 10 bf ff d6 b 201d30c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201d3b8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
201d3bc: 40 00 1b bd call 20242b0 <strerror> <== NOT EXECUTED
201d3c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d3c4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201d3c8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201d3cc: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201d3d0: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d3d4: 40 00 18 84 call 20235e4 <printf> <== NOT EXECUTED
201d3d8: 90 12 20 c0 or %o0, 0xc0, %o0 ! 20348c0 <CSWTCH.1+0x980> <== NOT EXECUTED
201d3dc: 10 bf ff cc b 201d30c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201d3e0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0201d3e4 <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)
{
201d3e4: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201d3e8: 90 10 20 00 clr %o0
201d3ec: 13 10 00 00 sethi %hi(0x40000000), %o1
201d3f0: 7f ff d7 1e call 2013068 <rtems_rfs_trace>
201d3f4: ba 10 00 18 mov %i0, %i5
201d3f8: 80 8a 20 ff btst 0xff, %o0
201d3fc: 12 80 00 0a bne 201d424 <rtems_rfs_dir_del_entry+0x40> <== NEVER TAKEN
201d400: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
201d404: 90 10 00 1d mov %i5, %o0
201d408: 7f ff f7 c5 call 201b31c <rtems_rfs_block_map_open>
201d40c: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
201d410: b0 92 20 00 orcc %o0, 0, %i0
201d414: 04 80 00 11 ble 201d458 <rtems_rfs_dir_del_entry+0x74> <== ALWAYS TAKEN
201d418: 90 10 00 1d mov %i5, %o0
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201d41c: 81 c7 e0 08 ret <== NOT EXECUTED
201d420: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
201d424: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201d428: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201d42c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201d430: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d434: 40 00 18 6c call 20235e4 <printf> <== NOT EXECUTED
201d438: 90 12 21 50 or %o0, 0x150, %o0 ! 2034950 <CSWTCH.1+0xa10> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
201d43c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d440: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201d444: 7f ff f7 b6 call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
201d448: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201d44c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d450: 14 bf ff f3 bg 201d41c <rtems_rfs_dir_del_entry+0x38> <== NOT EXECUTED
201d454: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
201d458: 92 07 bf a0 add %fp, -96, %o1
201d45c: 94 10 20 00 clr %o2
201d460: 96 10 00 1b mov %i3, %o3
201d464: 7f ff f8 e1 call 201b7e8 <rtems_rfs_block_map_seek>
201d468: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
201d46c: b0 92 20 00 orcc %o0, 0, %i0
201d470: 04 80 00 09 ble 201d494 <rtems_rfs_dir_del_entry+0xb0> <== ALWAYS TAKEN
201d474: 80 a6 20 06 cmp %i0, 6
{
if (rc == ENXIO)
201d478: 22 80 00 02 be,a 201d480 <rtems_rfs_dir_del_entry+0x9c> <== NOT EXECUTED
201d47c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
201d480: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d484: 7f ff f8 0a call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201d488: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
201d48c: 81 c7 e0 08 ret <== NOT EXECUTED
201d490: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
201d494: 80 a0 00 1b cmp %g0, %i3
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d498: 27 00 00 3f sethi %hi(0xfc00), %l3
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201d49c: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201d4a0: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201d4a4: c0 27 bf f8 clr [ %fp + -8 ]
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
201d4a8: a4 60 3f ff subx %g0, -1, %l2
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d4ac: a6 14 e3 ff or %l3, 0x3ff, %l3
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
201d4b0: d4 07 bf fc ld [ %fp + -4 ], %o2
201d4b4: 90 10 00 1d mov %i5, %o0
201d4b8: 92 07 bf f0 add %fp, -16, %o1
201d4bc: 7f ff fb ac call 201c36c <rtems_rfs_buffer_handle_request>
201d4c0: 96 10 20 01 mov 1, %o3
if (rc > 0)
201d4c4: b0 92 20 00 orcc %o0, 0, %i0
201d4c8: 14 80 00 d3 bg 201d814 <rtems_rfs_dir_del_entry+0x430> <== NEVER TAKEN
201d4cc: 82 10 20 00 clr %g1
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
201d4d0: ea 07 60 08 ld [ %i5 + 8 ], %l5
201d4d4: 80 a4 a0 00 cmp %l2, 0
201d4d8: 12 80 00 07 bne 201d4f4 <rtems_rfs_dir_del_entry+0x110> <== NEVER TAKEN
201d4dc: b8 10 20 00 clr %i4
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
201d4e0: 90 10 00 1b mov %i3, %o0
201d4e4: 40 00 48 bd call 202f7d8 <.urem>
201d4e8: 92 10 00 15 mov %l5, %o1
201d4ec: b8 10 00 08 mov %o0, %i4
201d4f0: 82 10 00 08 mov %o0, %g1
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
201d4f4: c4 07 bf f8 ld [ %fp + -8 ], %g2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201d4f8: 9e 05 7f f6 add %l5, -10, %o7
201d4fc: 80 a0 40 0f cmp %g1, %o7
201d500: 1a 80 00 4d bcc 201d634 <rtems_rfs_dir_del_entry+0x250> <== NEVER TAKEN
201d504: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
201d508: a8 00 80 01 add %g2, %g1, %l4
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d50c: c6 0d 20 09 ldub [ %l4 + 9 ], %g3
201d510: e0 0d 20 08 ldub [ %l4 + 8 ], %l0
eino = rtems_rfs_dir_entry_ino (entry);
201d514: c2 08 80 01 ldub [ %g2 + %g1 ], %g1
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d518: a1 2c 20 08 sll %l0, 8, %l0
eino = rtems_rfs_dir_entry_ino (entry);
201d51c: c8 0d 20 02 ldub [ %l4 + 2 ], %g4
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d520: a0 14 00 03 or %l0, %g3, %l0
eino = rtems_rfs_dir_entry_ino (entry);
201d524: c4 0d 20 03 ldub [ %l4 + 3 ], %g2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d528: 80 a4 00 13 cmp %l0, %l3
201d52c: 02 80 00 42 be 201d634 <rtems_rfs_dir_del_entry+0x250> <== NEVER TAKEN
201d530: c6 0d 20 01 ldub [ %l4 + 1 ], %g3
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201d534: a2 09 20 ff and %g4, 0xff, %l1
201d538: 86 08 e0 ff and %g3, 0xff, %g3
201d53c: a3 2c 60 08 sll %l1, 8, %l1
201d540: 87 28 e0 10 sll %g3, 0x10, %g3
201d544: 84 08 a0 ff and %g2, 0xff, %g2
201d548: a2 14 40 03 or %l1, %g3, %l1
201d54c: 83 28 60 18 sll %g1, 0x18, %g1
201d550: a2 14 40 02 or %l1, %g2, %l1
201d554: 10 80 00 23 b 201d5e0 <rtems_rfs_dir_del_entry+0x1fc>
201d558: a2 14 40 01 or %l1, %g1, %l1
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201d55c: 80 a4 00 01 cmp %l0, %g1
201d560: 1a 80 00 23 bcc 201d5ec <rtems_rfs_dir_del_entry+0x208> <== NEVER TAKEN
201d564: 80 a4 60 00 cmp %l1, 0
201d568: 02 80 00 22 be 201d5f0 <rtems_rfs_dir_del_entry+0x20c> <== NEVER TAKEN
201d56c: 90 10 20 00 clr %o0
201d570: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201d574: 80 a0 40 11 cmp %g1, %l1
201d578: 0a 80 00 1e bcs 201d5f0 <rtems_rfs_dir_del_entry+0x20c> <== NEVER TAKEN
201d57c: 80 a6 80 11 cmp %i2, %l1
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
201d580: 02 80 00 45 be 201d694 <rtems_rfs_dir_del_entry+0x2b0> <== ALWAYS TAKEN
201d584: 80 a4 a0 00 cmp %l2, 0
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
201d588: 02 80 00 1f be 201d604 <rtems_rfs_dir_del_entry+0x220> <== NOT EXECUTED
201d58c: a8 05 00 10 add %l4, %l0, %l4 <== NOT EXECUTED
rc = EIO;
break;
}
entry += elength;
eoffset += elength;
201d590: b8 07 00 10 add %i4, %l0, %i4 <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201d594: 80 a7 00 0f cmp %i4, %o7 <== NOT EXECUTED
201d598: 1a 80 00 28 bcc 201d638 <rtems_rfs_dir_del_entry+0x254> <== NOT EXECUTED
201d59c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d5a0: e0 0d 20 08 ldub [ %l4 + 8 ], %l0 <== NOT EXECUTED
201d5a4: c8 0d 20 09 ldub [ %l4 + 9 ], %g4 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201d5a8: e2 0d 00 00 ldub [ %l4 ], %l1 <== NOT EXECUTED
201d5ac: c6 0d 20 01 ldub [ %l4 + 1 ], %g3 <== NOT EXECUTED
201d5b0: c4 0d 20 03 ldub [ %l4 + 3 ], %g2 <== NOT EXECUTED
201d5b4: c2 0d 20 02 ldub [ %l4 + 2 ], %g1 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d5b8: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201d5bc: a3 2c 60 18 sll %l1, 0x18, %l1 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201d5c0: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201d5c4: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201d5c8: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201d5cc: a2 14 40 03 or %l1, %g3, %l1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d5d0: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201d5d4: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201d5d8: 02 80 00 17 be 201d634 <rtems_rfs_dir_del_entry+0x250> <== NOT EXECUTED
201d5dc: a2 14 40 01 or %l1, %g1, %l1 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201d5e0: 80 a4 20 0a cmp %l0, 0xa
201d5e4: 34 bf ff de bg,a 201d55c <rtems_rfs_dir_del_entry+0x178> <== ALWAYS TAKEN
201d5e8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201d5ec: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d5f0: 7f ff d6 9e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d5f4: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
201d5f8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d5fc: 32 80 00 1d bne,a 201d670 <rtems_rfs_dir_del_entry+0x28c><== NOT EXECUTED
201d600: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
201d604: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201d608: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201d60c: 7f ff fa dd call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201d610: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201d614: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201d618: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201d61c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201d620: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201d624: 7f ff f7 a2 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201d628: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
}
201d62c: 81 c7 e0 08 ret <== NOT EXECUTED
201d630: 81 e8 00 00 restore <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
201d634: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201d638: 12 bf ff f5 bne 201d60c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
201d63c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201d640: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d644: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201d648: 7f ff f8 85 call 201b85c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
201d64c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
201d650: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
201d654: 02 80 00 6e be 201d80c <rtems_rfs_dir_del_entry+0x428> <== NOT EXECUTED
201d658: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
201d65c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d660: 02 bf ff 95 be 201d4b4 <rtems_rfs_dir_del_entry+0xd0> <== NOT EXECUTED
201d664: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201d668: 10 bf ff e9 b 201d60c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
201d66c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201d670: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED
201d674: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201d678: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d67c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
201d680: 9a 10 00 1c mov %i4, %o5 <== NOT EXECUTED
201d684: 40 00 17 d8 call 20235e4 <printf> <== NOT EXECUTED
201d688: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
201d68c: 10 bf ff df b 201d608 <rtems_rfs_dir_del_entry+0x224> <== NOT EXECUTED
201d690: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
memmove (entry, entry + elength, remaining);
201d694: 92 05 00 10 add %l4, %l0, %o1
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
201d698: b6 04 00 1c add %l0, %i4, %i3
memmove (entry, entry + elength, remaining);
201d69c: 90 10 00 14 mov %l4, %o0
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
201d6a0: b6 25 40 1b sub %l5, %i3, %i3
memmove (entry, entry + elength, remaining);
201d6a4: 40 00 17 2e call 202335c <memmove>
201d6a8: 94 10 00 1b mov %i3, %o2
memset (entry + remaining, 0xff, elength);
201d6ac: 92 10 20 ff mov 0xff, %o1
201d6b0: 94 10 00 10 mov %l0, %o2
201d6b4: 40 00 17 7a call 202349c <memset>
201d6b8: 90 05 00 1b add %l4, %i3, %o0
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
201d6bc: c2 0d 20 09 ldub [ %l4 + 9 ], %g1
201d6c0: f6 0d 20 08 ldub [ %l4 + 8 ], %i3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201d6c4: 90 10 20 00 clr %o0
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
201d6c8: b7 2e e0 08 sll %i3, 8, %i3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201d6cc: 13 10 00 00 sethi %hi(0x40000000), %o1
201d6d0: 7f ff d6 66 call 2013068 <rtems_rfs_trace>
201d6d4: b6 16 c0 01 or %i3, %g1, %i3
201d6d8: 80 8a 20 ff btst 0xff, %o0
201d6dc: 02 80 00 17 be 201d738 <rtems_rfs_dir_del_entry+0x354> <== ALWAYS TAKEN
201d6e0: 03 3f ff c0 sethi %hi(0xffff0000), %g1
printf ("rtems-rfs: dir-del-entry: "
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
201d6e4: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201d6e8: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED
201d6ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d6f0: 12 80 00 06 bne 201d708 <rtems_rfs_dir_del_entry+0x324> <== NOT EXECUTED
201d6f4: c4 07 bf a8 ld [ %fp + -88 ], %g2 <== NOT EXECUTED
201d6f8: 1b 00 80 cc sethi %hi(0x2033000), %o5 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
201d6fc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201d700: 02 80 00 07 be 201d71c <rtems_rfs_dir_del_entry+0x338> <== NOT EXECUTED
201d704: 9a 13 61 38 or %o5, 0x138, %o5 <== NOT EXECUTED
201d708: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201d70c: 1b 00 80 cc sethi %hi(0x2033000), %o5 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
201d710: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201d714: 02 80 00 51 be 201d858 <rtems_rfs_dir_del_entry+0x474> <== NOT EXECUTED
201d718: 9a 13 61 40 or %o5, 0x140, %o5 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201d71c: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d720: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201d724: 90 12 22 28 or %o0, 0x228, %o0 <== NOT EXECUTED
201d728: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
201d72c: 40 00 17 ae call 20235e4 <printf> <== NOT EXECUTED
201d730: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
201d734: 03 3f ff c0 sethi %hi(0xffff0000), %g1 <== NOT EXECUTED
201d738: b6 38 40 1b xnor %g1, %i3, %i3
201d73c: 80 a6 e0 00 cmp %i3, 0
201d740: 12 80 00 1f bne 201d7bc <rtems_rfs_dir_del_entry+0x3d8>
201d744: 80 a7 20 00 cmp %i4, 0
201d748: 12 80 00 1d bne 201d7bc <rtems_rfs_dir_del_entry+0x3d8> <== ALWAYS TAKEN
201d74c: c2 07 bf b0 ld [ %fp + -80 ], %g1
(eoffset == 0) && rtems_rfs_block_map_last (&map))
201d750: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d754: 12 80 00 28 bne 201d7f4 <rtems_rfs_dir_del_entry+0x410> <== NOT EXECUTED
201d758: c4 07 bf a8 ld [ %fp + -88 ], %g2 <== NOT EXECUTED
201d75c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201d760: 12 80 00 26 bne 201d7f8 <rtems_rfs_dir_del_entry+0x414> <== NOT EXECUTED
201d764: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
201d768: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d76c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201d770: 7f ff f9 3f call 201bc6c <rtems_rfs_block_map_shrink> <== NOT EXECUTED
201d774: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
if (rc > 0)
201d778: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
201d77c: 04 80 00 10 ble 201d7bc <rtems_rfs_dir_del_entry+0x3d8> <== NOT EXECUTED
201d780: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201d784: 7f ff d6 39 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d788: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
201d78c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d790: 02 80 00 0c be 201d7c0 <rtems_rfs_dir_del_entry+0x3dc> <== NOT EXECUTED
201d794: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
201d798: f6 06 60 08 ld [ %i1 + 8 ], %i3 <== NOT EXECUTED
201d79c: 40 00 1a c5 call 20242b0 <strerror> <== NOT EXECUTED
201d7a0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201d7a4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201d7a8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201d7ac: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
201d7b0: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d7b4: 40 00 17 8c call 20235e4 <printf> <== NOT EXECUTED
201d7b8: 90 12 22 88 or %o0, 0x288, %o0 ! 2034a88 <CSWTCH.1+0xb48> <== 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);
201d7bc: 82 10 20 01 mov 1, %g1
201d7c0: 92 07 bf f0 add %fp, -16, %o1
201d7c4: 90 10 00 1d mov %i5, %o0
201d7c8: 7f ff fa 6e call 201c180 <rtems_rfs_buffer_handle_release>
201d7cc: c2 2f bf f0 stb %g1, [ %fp + -16 ]
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201d7d0: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
201d7d4: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201d7d8: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201d7dc: c0 27 bf f8 clr [ %fp + -8 ]
201d7e0: 92 07 bf a0 add %fp, -96, %o1
201d7e4: 7f ff f7 32 call 201b4ac <rtems_rfs_block_map_close>
201d7e8: b0 10 20 00 clr %i0
return 0;
201d7ec: 81 c7 e0 08 ret
201d7f0: 81 e8 00 00 restore
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
201d7f4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
201d7f8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201d7fc: 12 bf ff f1 bne 201d7c0 <rtems_rfs_dir_del_entry+0x3dc> <== NOT EXECUTED
201d800: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
201d804: 10 bf ff da b 201d76c <rtems_rfs_dir_del_entry+0x388> <== NOT EXECUTED
201d808: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
201d80c: 10 bf ff 7f b 201d608 <rtems_rfs_dir_del_entry+0x224> <== NOT EXECUTED
201d810: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201d814: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d818: 7f ff d6 14 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d81c: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
201d820: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d824: 22 bf ff 7a be,a 201d60c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
201d828: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
201d82c: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201d830: 40 00 1a a0 call 20242b0 <strerror> <== NOT EXECUTED
201d834: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d838: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201d83c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201d840: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201d844: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d848: 40 00 17 67 call 20235e4 <printf> <== NOT EXECUTED
201d84c: 90 12 21 90 or %o0, 0x190, %o0 ! 2034990 <CSWTCH.1+0xa50> <== 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);
201d850: 10 bf ff 6f b 201d60c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
201d854: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201d858: 1b 00 80 cc sethi %hi(0x2033000), %o5 <== NOT EXECUTED
201d85c: 10 bf ff b0 b 201d71c <rtems_rfs_dir_del_entry+0x338> <== NOT EXECUTED
201d860: 9a 13 61 38 or %o5, 0x138, %o5 ! 2033138 <ramdisk_ops+0xa74><== NOT EXECUTED
0201dc0c <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
201dc0c: 9d e3 bf 40 save %sp, -192, %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))
201dc10: 90 10 20 00 clr %o0 <== NOT EXECUTED
201dc14: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
201dc18: 7f ff d5 14 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201dc1c: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
201dc20: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201dc24: 12 80 00 0a bne 201dc4c <rtems_rfs_dir_empty+0x40> <== NOT EXECUTED
201dc28: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
201dc2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dc30: 7f ff f5 bb call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
201dc34: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201dc38: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dc3c: 04 80 00 0f ble 201dc78 <rtems_rfs_dir_empty+0x6c> <== NOT EXECUTED
201dc40: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201dc44: 81 c7 e0 08 ret <== NOT EXECUTED
201dc48: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
201dc4c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201dc50: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201dc54: 40 00 16 64 call 20235e4 <printf> <== NOT EXECUTED
201dc58: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 2034bb8 <CSWTCH.1+0xc78> <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
201dc5c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dc60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201dc64: 7f ff f5 ae call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
201dc68: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201dc6c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dc70: 14 bf ff f5 bg 201dc44 <rtems_rfs_dir_empty+0x38> <== NOT EXECUTED
201dc74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
201dc78: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201dc7c: 94 10 20 00 clr %o2 <== NOT EXECUTED
201dc80: 96 10 20 00 clr %o3 <== NOT EXECUTED
201dc84: 7f ff f6 d9 call 201b7e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
201dc88: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
201dc8c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dc90: 14 80 00 7f bg 201de8c <rtems_rfs_dir_empty+0x280> <== NOT EXECUTED
201dc94: 39 00 00 3f sethi %hi(0xfc00), %i4 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
201dc98: 37 00 80 d2 sethi %hi(0x2034800), %i3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201dc9c: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201dca0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201dca4: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201dca8: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
201dcac: b6 16 e3 d8 or %i3, 0x3d8, %i3 <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
201dcb0: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
201dcb4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dcb8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201dcbc: 7f ff f9 ac call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201dcc0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
201dcc4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dcc8: 14 80 00 4e bg 201de00 <rtems_rfs_dir_empty+0x1f4> <== NOT EXECUTED
201dccc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201dcd0: da 07 60 08 ld [ %i5 + 8 ], %o5 <== NOT EXECUTED
201dcd4: 9a 83 7f f6 addcc %o5, -10, %o5 <== NOT EXECUTED
201dcd8: 02 80 00 5a be 201de40 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
201dcdc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201dce0: c4 08 60 09 ldub [ %g1 + 9 ], %g2 <== NOT EXECUTED
201dce4: e2 08 60 08 ldub [ %g1 + 8 ], %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201dce8: c6 08 40 00 ldub [ %g1 ], %g3 <== 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);
201dcec: a3 2c 60 08 sll %l1, 8, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201dcf0: c8 08 60 01 ldub [ %g1 + 1 ], %g4 <== 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);
201dcf4: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201dcf8: f4 08 60 02 ldub [ %g1 + 2 ], %i2 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201dcfc: 80 a4 40 1c cmp %l1, %i4 <== NOT EXECUTED
201dd00: 02 80 00 50 be 201de40 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
201dd04: c4 08 60 03 ldub [ %g1 + 3 ], %g2 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201dd08: a0 0e a0 ff and %i2, 0xff, %l0 <== NOT EXECUTED
201dd0c: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
201dd10: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED
201dd14: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
201dd18: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED
201dd1c: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
201dd20: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201dd24: a0 14 00 02 or %l0, %g2, %l0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
201dd28: b4 10 20 00 clr %i2 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201dd2c: 10 80 00 20 b 201ddac <rtems_rfs_dir_empty+0x1a0> <== NOT EXECUTED
201dd30: a0 14 00 03 or %l0, %g3, %l0 <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
201dd34: 12 80 00 31 bne 201ddf8 <rtems_rfs_dir_empty+0x1ec> <== NOT EXECUTED
201dd38: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
201dd3c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
201dd40: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
201dd44: 12 80 00 2d bne 201ddf8 <rtems_rfs_dir_empty+0x1ec> <== NOT EXECUTED
201dd48: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
201dd4c: c4 08 60 0b ldub [ %g1 + 0xb ], %g2 <== NOT EXECUTED
201dd50: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
201dd54: 12 80 00 29 bne 201ddf8 <rtems_rfs_dir_empty+0x1ec> <== NOT EXECUTED
201dd58: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
empty = false;
break;
}
entry += elength;
offset += elength;
201dd5c: b4 06 80 11 add %i2, %l1, %i2 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201dd60: 80 a6 80 0d cmp %i2, %o5 <== NOT EXECUTED
201dd64: 1a 80 00 37 bcc 201de40 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
201dd68: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201dd6c: e2 08 60 08 ldub [ %g1 + 8 ], %l1 <== NOT EXECUTED
201dd70: de 08 60 09 ldub [ %g1 + 9 ], %o7 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201dd74: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED
201dd78: c8 08 60 01 ldub [ %g1 + 1 ], %g4 <== NOT EXECUTED
201dd7c: c6 08 60 03 ldub [ %g1 + 3 ], %g3 <== NOT EXECUTED
201dd80: c4 08 60 02 ldub [ %g1 + 2 ], %g2 <== 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);
201dd84: a3 2c 60 08 sll %l1, 8, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201dd88: a1 2c 20 18 sll %l0, 0x18, %l0 <== 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);
201dd8c: a2 14 40 0f or %l1, %o7, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201dd90: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
201dd94: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
201dd98: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201dd9c: 80 a4 40 1c cmp %l1, %i4 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201dda0: a0 14 00 03 or %l0, %g3, %l0 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201dda4: 02 80 00 27 be 201de40 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
201dda8: a0 14 00 02 or %l0, %g2, %l0 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201ddac: 80 a4 60 0a cmp %l1, 0xa <== NOT EXECUTED
201ddb0: 04 80 00 1f ble 201de2c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
201ddb4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
201ddb8: c4 07 60 18 ld [ %i5 + 0x18 ], %g2 <== NOT EXECUTED
201ddbc: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED
201ddc0: 1a 80 00 1b bcc 201de2c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
201ddc4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
201ddc8: 02 80 00 19 be 201de2c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
201ddcc: 01 00 00 00 nop <== NOT EXECUTED
201ddd0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
201ddd4: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED
201ddd8: 0a 80 00 15 bcs 201de2c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
201dddc: 80 a4 60 0b cmp %l1, 0xb <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
201dde0: 12 bf ff d5 bne 201dd34 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
201dde4: 80 a4 60 0c cmp %l1, 0xc <== NOT EXECUTED
201dde8: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
201ddec: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
201ddf0: 02 bf ff db be 201dd5c <rtems_rfs_dir_empty+0x150> <== NOT EXECUTED
201ddf4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
201ddf8: 22 80 00 02 be,a 201de00 <rtems_rfs_dir_empty+0x1f4> <== NOT EXECUTED
201ddfc: b0 10 20 5a mov 0x5a, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201de00: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201de04: 7f ff f8 df call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201de08: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201de0c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201de10: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201de14: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201de18: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201de1c: 7f ff f5 a4 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201de20: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
}
201de24: 81 c7 e0 08 ret <== NOT EXECUTED
201de28: 81 e8 00 00 restore <== 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))
201de2c: 7f ff d4 8f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201de30: 92 10 20 00 clr %o1 <== NOT EXECUTED
201de34: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201de38: 32 80 00 0e bne,a 201de70 <rtems_rfs_dir_empty+0x264> <== NOT EXECUTED
201de3c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201de40: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201de44: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201de48: 7f ff f6 85 call 201b85c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
201de4c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc > 0)
201de50: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201de54: 04 bf ff 98 ble 201dcb4 <rtems_rfs_dir_empty+0xa8> <== NOT EXECUTED
201de58: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
if (rc == ENXIO)
201de5c: 82 1e 20 06 xor %i0, 6, %g1 <== NOT EXECUTED
201de60: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
201de64: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED
201de68: 10 bf ff e6 b 201de00 <rtems_rfs_dir_empty+0x1f4> <== NOT EXECUTED
201de6c: b0 0e 00 01 and %i0, %g1, %i0 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
201de70: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201de74: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
201de78: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
201de7c: 40 00 15 da call 20235e4 <printf> <== NOT EXECUTED
201de80: 98 10 00 1a mov %i2, %o4 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201de84: 10 bf ff f0 b 201de44 <rtems_rfs_dir_empty+0x238> <== NOT EXECUTED
201de88: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
201de8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201de90: 7f ff f5 87 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201de94: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
201de98: 81 c7 e0 08 ret <== NOT EXECUTED
201de9c: 81 e8 00 00 restore <== NOT EXECUTED
02022500 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
2022500: 9d e3 bf a0 save %sp, -96, %sp
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
2022504: 09 37 f7 c5 sethi %hi(0xdfdf1400), %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2022508: 82 10 00 18 mov %i0, %g1
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
202250c: 88 11 22 9f or %g4, 0x29f, %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2022510: 80 a6 60 0c cmp %i1, 0xc
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
2022514: 88 06 40 04 add %i1, %g4, %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2022518: 84 10 00 04 mov %g4, %g2
202251c: 08 80 00 4b bleu 2022648 <rtems_rfs_dir_hash+0x148>
2022520: 86 10 00 04 mov %g4, %g3
{
a += k[0];
2022524: da 08 40 00 ldub [ %g1 ], %o5
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
2022528: f0 08 60 04 ldub [ %g1 + 4 ], %i0
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
202252c: f6 08 60 01 ldub [ %g1 + 1 ], %i3
a += ((uint32_t)k[2])<<16;
2022530: f8 08 60 02 ldub [ %g1 + 2 ], %i4
a += ((uint32_t)k[3])<<24;
2022534: fa 08 60 03 ldub [ %g1 + 3 ], %i5
b += k[4];
b += ((uint32_t)k[5])<<8;
2022538: de 08 60 05 ldub [ %g1 + 5 ], %o7
b += ((uint32_t)k[6])<<16;
202253c: d0 08 60 06 ldub [ %g1 + 6 ], %o0
b += ((uint32_t)k[7])<<24;
c += k[8];
2022540: f4 08 60 08 ldub [ %g1 + 8 ], %i2
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
2022544: d6 08 60 0b ldub [ %g1 + 0xb ], %o3
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
2022548: d4 08 60 07 ldub [ %g1 + 7 ], %o2
c += k[8];
c += ((uint32_t)k[9])<<8;
202254c: d2 08 60 09 ldub [ %g1 + 9 ], %o1
c += ((uint32_t)k[10])<<16;
2022550: d8 08 60 0a ldub [ %g1 + 0xa ], %o4
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
2022554: 86 03 40 03 add %o5, %g3, %g3
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
2022558: 84 06 00 02 add %i0, %g2, %g2
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
202255c: 88 06 80 04 add %i2, %g4, %g4
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2022560: b7 2e e0 08 sll %i3, 8, %i3
a += ((uint32_t)k[2])<<16;
2022564: b9 2f 20 10 sll %i4, 0x10, %i4
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2022568: 9a 00 c0 1b add %g3, %i3, %o5
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
202256c: bb 2f 60 18 sll %i5, 0x18, %i5
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
2022570: 87 2a 20 10 sll %o0, 0x10, %g3
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
2022574: 9a 03 40 1c add %o5, %i4, %o5
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
2022578: 9f 2b e0 08 sll %o7, 8, %o7
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
202257c: 9a 03 40 1d add %o5, %i5, %o5
b += k[4];
b += ((uint32_t)k[5])<<8;
2022580: 9e 00 80 0f add %g2, %o7, %o7
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
2022584: 85 2a e0 18 sll %o3, 0x18, %g2
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
2022588: 9e 03 c0 03 add %o7, %g3, %o7
b += ((uint32_t)k[7])<<24;
202258c: 95 2a a0 18 sll %o2, 0x18, %o2
c += k[8];
c += ((uint32_t)k[9])<<8;
2022590: 87 2a 60 08 sll %o1, 8, %g3
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
2022594: 9e 03 c0 0a add %o7, %o2, %o7
c += k[8];
c += ((uint32_t)k[9])<<8;
2022598: 86 01 00 03 add %g4, %g3, %g3
c += ((uint32_t)k[10])<<16;
202259c: 99 2b 20 10 sll %o4, 0x10, %o4
20225a0: 86 00 c0 0c add %g3, %o4, %g3
c += ((uint32_t)k[11])<<24;
20225a4: 86 00 c0 02 add %g3, %g2, %g3
mix(a,b,c);
20225a8: 88 00 c0 0f add %g3, %o7, %g4
20225ac: 84 23 40 03 sub %o5, %g3, %g2
20225b0: 9b 28 e0 04 sll %g3, 4, %o5
20225b4: 87 30 e0 1c srl %g3, 0x1c, %g3
20225b8: 86 13 40 03 or %o5, %g3, %g3
20225bc: 84 18 80 03 xor %g2, %g3, %g2
20225c0: 86 00 80 04 add %g2, %g4, %g3
20225c4: 9b 28 a0 06 sll %g2, 6, %o5
20225c8: 9e 23 c0 02 sub %o7, %g2, %o7
20225cc: 85 30 a0 1a srl %g2, 0x1a, %g2
20225d0: 84 13 40 02 or %o5, %g2, %g2
20225d4: 9e 18 80 0f xor %g2, %o7, %o7
20225d8: 84 03 c0 03 add %o7, %g3, %g2
20225dc: 9b 2b e0 08 sll %o7, 8, %o5
20225e0: 88 21 00 0f sub %g4, %o7, %g4
20225e4: 9f 33 e0 18 srl %o7, 0x18, %o7
20225e8: 9e 13 40 0f or %o5, %o7, %o7
20225ec: 88 1b c0 04 xor %o7, %g4, %g4
20225f0: 9e 01 00 02 add %g4, %g2, %o7
20225f4: 9b 29 20 10 sll %g4, 0x10, %o5
20225f8: 86 20 c0 04 sub %g3, %g4, %g3
20225fc: 89 31 20 10 srl %g4, 0x10, %g4
2022600: 88 13 40 04 or %o5, %g4, %g4
2022604: 86 19 00 03 xor %g4, %g3, %g3
2022608: 9b 28 e0 13 sll %g3, 0x13, %o5
202260c: 89 30 e0 0d srl %g3, 0xd, %g4
2022610: 88 13 40 04 or %o5, %g4, %g4
2022614: 84 20 80 03 sub %g2, %g3, %g2
length -= 12;
2022618: b2 06 7f f4 add %i1, -12, %i1
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
202261c: 84 19 00 02 xor %g4, %g2, %g2
2022620: 86 00 c0 0f add %g3, %o7, %g3
2022624: 9b 28 a0 04 sll %g2, 4, %o5
2022628: 9e 23 c0 02 sub %o7, %g2, %o7
202262c: 89 30 a0 1c srl %g2, 0x1c, %g4
length -= 12;
k += 12;
2022630: 82 00 60 0c add %g1, 0xc, %g1
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
2022634: 88 13 40 04 or %o5, %g4, %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2022638: 80 a6 60 0c cmp %i1, 0xc
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
202263c: 84 00 80 03 add %g2, %g3, %g2
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2022640: 18 bf ff b9 bgu 2022524 <rtems_rfs_dir_hash+0x24> <== NEVER TAKEN
2022644: 88 19 00 0f xor %g4, %o7, %g4
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
2022648: b3 2e 60 02 sll %i1, 2, %i1
202264c: 3b 00 80 89 sethi %hi(0x2022400), %i5
2022650: ba 17 60 cc or %i5, 0xcc, %i5 ! 20224cc <rtems_rfs_buffer_bdbuf_release+0x8c>
2022654: fa 07 40 19 ld [ %i5 + %i1 ], %i5
2022658: 81 c7 40 00 jmp %i5
202265c: 01 00 00 00 nop
{
case 12: c+=((uint32_t)k[11])<<24;
2022660: fa 08 60 0b ldub [ %g1 + 0xb ], %i5
2022664: bb 2f 60 18 sll %i5, 0x18, %i5
2022668: 88 01 00 1d add %g4, %i5, %g4
case 11: c+=((uint32_t)k[10])<<16;
202266c: fa 08 60 0a ldub [ %g1 + 0xa ], %i5
2022670: bb 2f 60 10 sll %i5, 0x10, %i5
2022674: 88 01 00 1d add %g4, %i5, %g4
case 10: c+=((uint32_t)k[9])<<8;
2022678: fa 08 60 09 ldub [ %g1 + 9 ], %i5
202267c: bb 2f 60 08 sll %i5, 8, %i5
2022680: 88 01 00 1d add %g4, %i5, %g4
case 9 : c+=k[8];
2022684: fa 08 60 08 ldub [ %g1 + 8 ], %i5
2022688: 88 01 00 1d add %g4, %i5, %g4
case 8 : b+=((uint32_t)k[7])<<24;
202268c: fa 08 60 07 ldub [ %g1 + 7 ], %i5
2022690: bb 2f 60 18 sll %i5, 0x18, %i5
2022694: 84 00 80 1d add %g2, %i5, %g2
case 7 : b+=((uint32_t)k[6])<<16;
2022698: fa 08 60 06 ldub [ %g1 + 6 ], %i5
202269c: bb 2f 60 10 sll %i5, 0x10, %i5
20226a0: 84 00 80 1d add %g2, %i5, %g2
case 6 : b+=((uint32_t)k[5])<<8;
20226a4: fa 08 60 05 ldub [ %g1 + 5 ], %i5
20226a8: bb 2f 60 08 sll %i5, 8, %i5
20226ac: 84 00 80 1d add %g2, %i5, %g2
case 5 : b+=k[4];
20226b0: fa 08 60 04 ldub [ %g1 + 4 ], %i5
20226b4: 84 00 80 1d add %g2, %i5, %g2
case 4 : a+=((uint32_t)k[3])<<24;
20226b8: fa 08 60 03 ldub [ %g1 + 3 ], %i5
20226bc: bb 2f 60 18 sll %i5, 0x18, %i5
20226c0: 86 00 c0 1d add %g3, %i5, %g3
case 3 : a+=((uint32_t)k[2])<<16;
20226c4: fa 08 60 02 ldub [ %g1 + 2 ], %i5
20226c8: bb 2f 60 10 sll %i5, 0x10, %i5
20226cc: 86 00 c0 1d add %g3, %i5, %g3
case 2 : a+=((uint32_t)k[1])<<8;
20226d0: fa 08 60 01 ldub [ %g1 + 1 ], %i5
20226d4: bb 2f 60 08 sll %i5, 8, %i5
20226d8: 86 00 c0 1d add %g3, %i5, %g3
case 1 : a+=k[0];
20226dc: c2 08 40 00 ldub [ %g1 ], %g1
break;
case 0 : return c;
}
}
final(a,b,c);
20226e0: bb 30 a0 12 srl %g2, 0x12, %i5
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 1 : a+=k[0];
20226e4: 86 00 c0 01 add %g3, %g1, %g3
break;
case 0 : return c;
}
}
final(a,b,c);
20226e8: 83 28 a0 0e sll %g2, 0xe, %g1
20226ec: 82 17 40 01 or %i5, %g1, %g1
20226f0: 88 19 00 02 xor %g4, %g2, %g4
20226f4: 88 21 00 01 sub %g4, %g1, %g4
20226f8: bb 29 20 0b sll %g4, 0xb, %i5
20226fc: 83 31 20 15 srl %g4, 0x15, %g1
2022700: 82 17 40 01 or %i5, %g1, %g1
2022704: 86 19 00 03 xor %g4, %g3, %g3
2022708: 86 20 c0 01 sub %g3, %g1, %g3
202270c: bb 28 e0 19 sll %g3, 0x19, %i5
2022710: 83 30 e0 07 srl %g3, 7, %g1
2022714: 82 17 40 01 or %i5, %g1, %g1
2022718: 84 18 c0 02 xor %g3, %g2, %g2
202271c: 84 20 80 01 sub %g2, %g1, %g2
2022720: bb 28 a0 10 sll %g2, 0x10, %i5
2022724: 83 30 a0 10 srl %g2, 0x10, %g1
2022728: 82 17 40 01 or %i5, %g1, %g1
202272c: 88 18 80 04 xor %g2, %g4, %g4
2022730: 88 21 00 01 sub %g4, %g1, %g4
2022734: bb 29 20 04 sll %g4, 4, %i5
2022738: 83 31 20 1c srl %g4, 0x1c, %g1
202273c: 82 17 40 01 or %i5, %g1, %g1
2022740: 86 19 00 03 xor %g4, %g3, %g3
2022744: 86 20 c0 01 sub %g3, %g1, %g3
2022748: 83 28 e0 0e sll %g3, 0xe, %g1
202274c: 84 18 c0 02 xor %g3, %g2, %g2
2022750: 87 30 e0 12 srl %g3, 0x12, %g3
2022754: 86 10 40 03 or %g1, %g3, %g3
2022758: 84 20 80 03 sub %g2, %g3, %g2
202275c: 88 18 80 04 xor %g2, %g4, %g4
2022760: 83 28 a0 18 sll %g2, 0x18, %g1
2022764: 85 30 a0 08 srl %g2, 8, %g2
2022768: 84 10 40 02 or %g1, %g2, %g2
202276c: 88 21 00 02 sub %g4, %g2, %g4
return c;
}
2022770: 81 c7 e0 08 ret
2022774: 91 e8 00 04 restore %g0, %g4, %o0
0201ca64 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
201ca64: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201ca68: 90 10 20 00 clr %o0
201ca6c: 13 01 00 00 sethi %hi(0x4000000), %o1
201ca70: 7f ff d9 7e call 2013068 <rtems_rfs_trace>
201ca74: aa 10 00 1d mov %i5, %l5
201ca78: 80 8a 20 ff btst 0xff, %o0
201ca7c: 12 80 00 12 bne 201cac4 <rtems_rfs_dir_lookup_ino+0x60> <== NEVER TAKEN
201ca80: 92 10 00 19 mov %i1, %o1
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
201ca84: c0 27 00 00 clr [ %i4 ]
*offset = 0;
201ca88: c0 25 40 00 clr [ %l5 ]
rc = rtems_rfs_block_map_open (fs, inode, &map);
201ca8c: 90 10 00 18 mov %i0, %o0
201ca90: 7f ff fa 23 call 201b31c <rtems_rfs_block_map_open>
201ca94: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
201ca98: a6 92 20 00 orcc %o0, 0, %l3
201ca9c: 24 80 00 26 ble,a 201cb34 <rtems_rfs_dir_lookup_ino+0xd0><== ALWAYS TAKEN
201caa0: 92 10 00 1b mov %i3, %o1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201caa4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201caa8: 7f ff d9 70 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201caac: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201cab0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201cab4: 32 80 00 43 bne,a 201cbc0 <rtems_rfs_dir_lookup_ino+0x15c><== NOT EXECUTED
201cab8: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201cabc: 81 c7 e0 08 ret <== NOT EXECUTED
201cac0: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
201cac4: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201cac8: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cacc: 40 00 1a c6 call 20235e4 <printf> <== NOT EXECUTED
201cad0: 90 12 21 20 or %o0, 0x120, %o0 ! 2034520 <CSWTCH.1+0x5e0> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
201cad4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201cad8: 04 80 00 0a ble 201cb00 <rtems_rfs_dir_lookup_ino+0x9c> <== NOT EXECUTED
201cadc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201cae0: ba 10 20 00 clr %i5 <== NOT EXECUTED
printf ("%c", name[c]);
201cae4: d0 4e 80 1d ldsb [ %i2 + %i5 ], %o0 <== NOT EXECUTED
201cae8: 40 00 1a d2 call 2023630 <putchar> <== NOT EXECUTED
201caec: ba 07 60 01 inc %i5 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
201caf0: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED
201caf4: 32 bf ff fd bne,a 201cae8 <rtems_rfs_dir_lookup_ino+0x84><== NOT EXECUTED
201caf8: d0 4e 80 1d ldsb [ %i2 + %i5 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
201cafc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201cb00: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cb04: 40 00 1a b8 call 20235e4 <printf> <== NOT EXECUTED
201cb08: 90 12 21 58 or %o0, 0x158, %o0 ! 2034558 <CSWTCH.1+0x618> <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
201cb0c: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
*offset = 0;
201cb10: c0 25 40 00 clr [ %l5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
201cb14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201cb18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201cb1c: 7f ff fa 00 call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
201cb20: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201cb24: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED
201cb28: 14 bf ff e0 bg 201caa8 <rtems_rfs_dir_lookup_ino+0x44> <== NOT EXECUTED
201cb2c: 90 10 20 00 clr %o0 <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
201cb30: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201cb34: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201cb38: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201cb3c: c0 27 bf f8 clr [ %fp + -8 ]
201cb40: 40 00 16 70 call 2022500 <rtems_rfs_dir_hash>
201cb44: 90 10 00 1a mov %i2, %o0
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
201cb48: 92 07 bf a0 add %fp, -96, %o1
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
201cb4c: a4 10 00 08 mov %o0, %l2
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
201cb50: 94 10 20 00 clr %o2
201cb54: 90 10 00 18 mov %i0, %o0
201cb58: 96 10 20 00 clr %o3
201cb5c: 7f ff fb 23 call 201b7e8 <rtems_rfs_block_map_seek>
201cb60: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
201cb64: a6 92 20 00 orcc %o0, 0, %l3
201cb68: 04 80 00 21 ble 201cbec <rtems_rfs_dir_lookup_ino+0x188>
201cb6c: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201cb70: 7f ff d9 3e call 2013068 <rtems_rfs_trace>
201cb74: 13 01 00 00 sethi %hi(0x4000000), %o1
201cb78: 80 8a 20 ff btst 0xff, %o0
201cb7c: 12 80 00 cd bne 201ceb0 <rtems_rfs_dir_lookup_ino+0x44c> <== NEVER TAKEN
201cb80: 01 00 00 00 nop
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
201cb84: 80 a4 e0 06 cmp %l3, 6
201cb88: 22 80 00 02 be,a 201cb90 <rtems_rfs_dir_lookup_ino+0x12c><== ALWAYS TAKEN
201cb8c: a6 10 20 02 mov 2, %l3
*/
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);
201cb90: 92 07 bf f0 add %fp, -16, %o1
201cb94: 7f ff fd 7b call 201c180 <rtems_rfs_buffer_handle_release>
201cb98: 90 10 00 18 mov %i0, %o0
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
201cb9c: 90 10 00 18 mov %i0, %o0
handle->dirty = false;
201cba0: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201cba4: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201cba8: c0 27 bf f8 clr [ %fp + -8 ]
201cbac: 92 07 bf a0 add %fp, -96, %o1
201cbb0: 7f ff fa 3f call 201b4ac <rtems_rfs_block_map_close>
201cbb4: b0 10 00 13 mov %l3, %i0
return rc;
}
201cbb8: 81 c7 e0 08 ret
201cbbc: 81 e8 00 00 restore
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
201cbc0: 40 00 1d bc call 20242b0 <strerror> <== NOT EXECUTED
201cbc4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
201cbc8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201cbcc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201cbd0: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
201cbd4: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201cbd8: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
201cbdc: 40 00 1a 82 call 20235e4 <printf> <== NOT EXECUTED
201cbe0: 90 12 21 68 or %o0, 0x168, %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201cbe4: 81 c7 e0 08 ret <== NOT EXECUTED
201cbe8: 81 e8 00 00 restore <== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
201cbec: 2f 00 80 d1 sethi %hi(0x2034400), %l7
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201cbf0: 23 00 00 3f sethi %hi(0xfc00), %l1
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201cbf4: 2d 00 80 d1 sethi %hi(0x2034400), %l6
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
201cbf8: ae 15 e1 e8 or %l7, 0x1e8, %l7
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201cbfc: a2 14 63 ff or %l1, 0x3ff, %l1
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201cc00: ac 15 a2 b8 or %l6, 0x2b8, %l6
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201cc04: 80 a4 e0 00 cmp %l3, 0
201cc08: 12 80 00 7f bne 201ce04 <rtems_rfs_dir_lookup_ino+0x3a0> <== NEVER TAKEN
201cc0c: c2 07 bf fc ld [ %fp + -4 ], %g1
201cc10: 80 a0 60 00 cmp %g1, 0
201cc14: 02 80 00 d5 be 201cf68 <rtems_rfs_dir_lookup_ino+0x504> <== NEVER TAKEN
201cc18: 90 10 20 00 clr %o0
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201cc1c: 7f ff d9 13 call 2013068 <rtems_rfs_trace>
201cc20: 13 01 00 00 sethi %hi(0x4000000), %o1
201cc24: 80 8a 20 ff btst 0xff, %o0
201cc28: 32 80 00 89 bne,a 201ce4c <rtems_rfs_dir_lookup_ino+0x3e8><== NEVER TAKEN
201cc2c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
201cc30: d4 07 bf fc ld [ %fp + -4 ], %o2
201cc34: 90 10 00 18 mov %i0, %o0
201cc38: 92 07 bf f0 add %fp, -16, %o1
201cc3c: 7f ff fd cc call 201c36c <rtems_rfs_buffer_handle_request>
201cc40: 96 10 20 01 mov 1, %o3
if (rc > 0)
201cc44: a8 92 20 00 orcc %o0, 0, %l4
201cc48: 14 80 00 b5 bg 201cf1c <rtems_rfs_dir_lookup_ino+0x4b8> <== NEVER TAKEN
201cc4c: c2 07 bf f8 ld [ %fp + -8 ], %g1
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201cc50: d8 06 20 08 ld [ %i0 + 8 ], %o4
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
201cc54: c0 27 bf b4 clr [ %fp + -76 ]
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201cc58: 80 a3 20 0a cmp %o4, 0xa
201cc5c: 12 80 00 0a bne 201cc84 <rtems_rfs_dir_lookup_ino+0x220> <== ALWAYS TAKEN
201cc60: fa 00 60 24 ld [ %g1 + 0x24 ], %i5
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
201cc64: 10 80 00 4a b 201cd8c <rtems_rfs_dir_lookup_ino+0x328> <== NOT EXECUTED
201cc68: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201cc6c: 84 03 3f f6 add %o4, -10, %g2
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
201cc70: 82 04 00 01 add %l0, %g1, %g1
201cc74: c2 27 bf b4 st %g1, [ %fp + -76 ]
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201cc78: 80 a0 80 01 cmp %g2, %g1
201cc7c: 08 80 00 43 bleu 201cd88 <rtems_rfs_dir_lookup_ino+0x324> <== NEVER TAKEN
201cc80: ba 07 40 10 add %i5, %l0, %i5
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
201cc84: c2 0f 40 00 ldub [ %i5 ], %g1
201cc88: d2 0f 60 01 ldub [ %i5 + 1 ], %o1
201cc8c: d4 0f 60 03 ldub [ %i5 + 3 ], %o2
201cc90: c6 0f 60 02 ldub [ %i5 + 2 ], %g3
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
201cc94: e0 0f 60 08 ldub [ %i5 + 8 ], %l0
201cc98: c4 0f 60 09 ldub [ %i5 + 9 ], %g2
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
201cc9c: d6 0f 60 04 ldub [ %i5 + 4 ], %o3
201cca0: da 0f 60 05 ldub [ %i5 + 5 ], %o5
201cca4: c8 0f 60 06 ldub [ %i5 + 6 ], %g4
201cca8: de 0f 60 07 ldub [ %i5 + 7 ], %o7
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
201ccac: 83 28 60 18 sll %g1, 0x18, %g1
201ccb0: 93 2a 60 10 sll %o1, 0x10, %o1
201ccb4: 87 28 e0 08 sll %g3, 8, %g3
201ccb8: 82 10 40 09 or %g1, %o1, %g1
201ccbc: 82 10 40 0a or %g1, %o2, %g1
201ccc0: 82 10 40 03 or %g1, %g3, %g1
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
201ccc4: a1 2c 20 08 sll %l0, 8, %l0
201ccc8: a0 14 00 02 or %l0, %g2, %l0
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201cccc: 80 a4 00 11 cmp %l0, %l1
201ccd0: 02 80 00 2e be 201cd88 <rtems_rfs_dir_lookup_ino+0x324>
201ccd4: c2 27 00 00 st %g1, [ %i4 ]
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
201ccd8: 80 a4 20 0a cmp %l0, 0xa
201ccdc: 04 80 00 30 ble 201cd9c <rtems_rfs_dir_lookup_ino+0x338>
201cce0: 90 10 20 00 clr %o0
201cce4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
201cce8: 80 a4 00 02 cmp %l0, %g2
201ccec: 1a 80 00 2c bcc 201cd9c <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
201ccf0: 80 a0 60 00 cmp %g1, 0
201ccf4: 02 80 00 2a be 201cd9c <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
201ccf8: 01 00 00 00 nop
201ccfc: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
201cd00: 80 a0 40 02 cmp %g1, %g2
201cd04: 18 80 00 26 bgu 201cd9c <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
201cd08: 82 09 20 ff and %g4, 0xff, %g1
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
201cd0c: 97 2a e0 18 sll %o3, 0x18, %o3
201cd10: 9a 0b 60 ff and %o5, 0xff, %o5
201cd14: 9e 0b e0 ff and %o7, 0xff, %o7
201cd18: 9b 2b 60 10 sll %o5, 0x10, %o5
201cd1c: 83 28 60 08 sll %g1, 8, %g1
201cd20: 96 12 c0 0d or %o3, %o5, %o3
201cd24: 88 12 c0 0f or %o3, %o7, %g4
201cd28: 88 11 00 01 or %g4, %g1, %g4
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
201cd2c: 80 a1 00 12 cmp %g4, %l2
201cd30: 12 bf ff cf bne 201cc6c <rtems_rfs_dir_lookup_ino+0x208>
201cd34: c2 07 bf b4 ld [ %fp + -76 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
201cd38: 90 10 20 00 clr %o0
201cd3c: 7f ff d8 cb call 2013068 <rtems_rfs_trace>
201cd40: 13 02 00 00 sethi %hi(0x8000000), %o1
201cd44: 80 8a 20 ff btst 0xff, %o0
201cd48: 32 80 00 31 bne,a 201ce0c <rtems_rfs_dir_lookup_ino+0x3a8><== NEVER TAKEN
201cd4c: c6 0f 60 01 ldub [ %i5 + 1 ], %g3 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
201cd50: 90 07 60 0a add %i5, 0xa, %o0
201cd54: 92 10 00 1a mov %i2, %o1
201cd58: 40 00 19 17 call 20231b4 <memcmp>
201cd5c: 94 10 00 1b mov %i3, %o2
201cd60: 80 a2 20 00 cmp %o0, 0
201cd64: 02 80 00 5c be 201ced4 <rtems_rfs_dir_lookup_ino+0x470> <== ALWAYS TAKEN
201cd68: c2 07 bf b4 ld [ %fp + -76 ], %g1
201cd6c: d8 06 20 08 ld [ %i0 + 8 ], %o4 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
201cd70: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED
201cd74: c2 27 bf b4 st %g1, [ %fp + -76 ] <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201cd78: 84 03 3f f6 add %o4, -10, %g2 <== NOT EXECUTED
201cd7c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201cd80: 18 bf ff c1 bgu 201cc84 <rtems_rfs_dir_lookup_ino+0x220> <== NOT EXECUTED
201cd84: ba 07 40 10 add %i5, %l0, %i5 <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
201cd88: 80 a5 20 00 cmp %l4, 0
201cd8c: 02 80 00 14 be 201cddc <rtems_rfs_dir_lookup_ino+0x378> <== ALWAYS TAKEN
201cd90: 90 10 00 18 mov %i0, %o0
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201cd94: 10 bf ff 7f b 201cb90 <rtems_rfs_dir_lookup_ino+0x12c>
201cd98: a6 10 00 14 mov %l4, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201cd9c: 7f ff d8 b3 call 2013068 <rtems_rfs_trace>
201cda0: 13 01 00 00 sethi %hi(0x4000000), %o1
201cda4: 80 8a 20 ff btst 0xff, %o0
201cda8: 12 80 00 04 bne 201cdb8 <rtems_rfs_dir_lookup_ino+0x354> <== NEVER TAKEN
201cdac: a8 10 20 05 mov 5, %l4
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201cdb0: 10 bf ff 78 b 201cb90 <rtems_rfs_dir_lookup_ino+0x12c>
201cdb4: a6 10 00 14 mov %l4, %l3
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
201cdb8: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201cdbc: d6 07 00 00 ld [ %i4 ], %o3 <== NOT EXECUTED
201cdc0: d8 07 bf b4 ld [ %fp + -76 ], %o4 <== NOT EXECUTED
201cdc4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201cdc8: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cdcc: 40 00 1a 06 call 20235e4 <printf> <== NOT EXECUTED
201cdd0: 90 12 22 68 or %o0, 0x268, %o0 ! 2034668 <CSWTCH.1+0x728> <== NOT EXECUTED
201cdd4: 10 bf ff 6f b 201cb90 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
201cdd8: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201cddc: 92 07 bf a0 add %fp, -96, %o1
201cde0: 7f ff fa 9f call 201b85c <rtems_rfs_block_map_next_block>
201cde4: 94 07 bf fc add %fp, -4, %o2
if ((rc > 0) && (rc != ENXIO))
201cde8: 80 a2 20 06 cmp %o0, 6
201cdec: 12 80 00 1d bne 201ce60 <rtems_rfs_dir_lookup_ino+0x3fc> <== NEVER TAKEN
201cdf0: a6 10 00 08 mov %o0, %l3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
201cdf4: 80 a4 e0 06 cmp %l3, 6
201cdf8: 12 bf ff 84 bne 201cc08 <rtems_rfs_dir_lookup_ino+0x1a4> <== NEVER TAKEN
201cdfc: 80 a4 e0 00 cmp %l3, 0
rc = ENOENT;
201ce00: a6 10 20 02 mov 2, %l3
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201ce04: 10 bf ff e4 b 201cd94 <rtems_rfs_dir_lookup_ino+0x330>
201ce08: a8 10 00 13 mov %l3, %l4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201ce0c: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED
201ce10: da 0f 40 00 ldub [ %i5 ], %o5 <== NOT EXECUTED
201ce14: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201ce18: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201ce1c: d4 1f bf b0 ldd [ %fp + -80 ], %o2 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201ce20: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201ce24: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201ce28: 9b 2b 60 18 sll %o5, 0x18, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201ce2c: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201ce30: 9a 13 40 03 or %o5, %g3, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201ce34: 98 10 00 10 mov %l0, %o4 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201ce38: 9a 13 40 02 or %o5, %g2, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201ce3c: 40 00 19 ea call 20235e4 <printf> <== NOT EXECUTED
201ce40: 9a 13 40 01 or %o5, %g1, %o5 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
201ce44: 10 bf ff c4 b 201cd54 <rtems_rfs_dir_lookup_ino+0x2f0> <== NOT EXECUTED
201ce48: 90 07 60 0a add %i5, 0xa, %o0 <== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
201ce4c: d4 07 bf b0 ld [ %fp + -80 ], %o2 <== NOT EXECUTED
201ce50: 40 00 19 e5 call 20235e4 <printf> <== NOT EXECUTED
201ce54: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
201ce58: 10 bf ff 77 b 201cc34 <rtems_rfs_dir_lookup_ino+0x1d0> <== NOT EXECUTED
201ce5c: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if ((rc > 0) && (rc != ENXIO))
201ce60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201ce64: 04 bf ff e5 ble 201cdf8 <rtems_rfs_dir_lookup_ino+0x394> <== NOT EXECUTED
201ce68: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201ce6c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201ce70: 7f ff d8 7e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201ce74: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201ce78: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ce7c: 22 bf ff 63 be,a 201cc08 <rtems_rfs_dir_lookup_ino+0x1a4><== NOT EXECUTED
201ce80: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
201ce84: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
201ce88: 40 00 1d 0a call 20242b0 <strerror> <== NOT EXECUTED
201ce8c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
201ce90: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201ce94: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201ce98: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
201ce9c: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cea0: 40 00 19 d1 call 20235e4 <printf> <== NOT EXECUTED
201cea4: 90 12 23 60 or %o0, 0x360, %o0 ! 2034760 <CSWTCH.1+0x820> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201cea8: 10 bf ff 58 b 201cc08 <rtems_rfs_dir_lookup_ino+0x1a4> <== NOT EXECUTED
201ceac: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
201ceb0: 40 00 1d 00 call 20242b0 <strerror> <== NOT EXECUTED
201ceb4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
201ceb8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
201cebc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201cec0: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cec4: 40 00 19 c8 call 20235e4 <printf> <== NOT EXECUTED
201cec8: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 20345a8 <CSWTCH.1+0x668> <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
201cecc: 10 bf ff 2f b 201cb88 <rtems_rfs_dir_lookup_ino+0x124> <== NOT EXECUTED
201ced0: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
201ced4: 90 10 00 18 mov %i0, %o0
201ced8: 7f ff f8 dc call 201b248 <rtems_rfs_block_get_pos>
201cedc: 92 07 bf b0 add %fp, -80, %o1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
201cee0: 90 10 20 00 clr %o0
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
201cee4: d2 25 40 00 st %o1, [ %l5 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
201cee8: 7f ff d8 60 call 2013068 <rtems_rfs_trace>
201ceec: 13 04 00 00 sethi %hi(0x10000000), %o1
201cef0: 80 8a 20 ff btst 0xff, %o0
201cef4: 22 bf ff 28 be,a 201cb94 <rtems_rfs_dir_lookup_ino+0x130><== ALWAYS TAKEN
201cef8: 92 07 bf f0 add %fp, -16, %o1
printf ("rtems-rfs: dir-lookup-ino: "
201cefc: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201cf00: d4 07 00 00 ld [ %i4 ], %o2 <== NOT EXECUTED
201cf04: d6 05 40 00 ld [ %l5 ], %o3 <== NOT EXECUTED
201cf08: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cf0c: 40 00 19 b6 call 20235e4 <printf> <== NOT EXECUTED
201cf10: 90 12 23 18 or %o0, 0x318, %o0 ! 2034718 <CSWTCH.1+0x7d8> <== 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);
201cf14: 10 bf ff 20 b 201cb94 <rtems_rfs_dir_lookup_ino+0x130> <== NOT EXECUTED
201cf18: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201cf1c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201cf20: 7f ff d8 52 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201cf24: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201cf28: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201cf2c: 22 bf ff 19 be,a 201cb90 <rtems_rfs_dir_lookup_ino+0x12c><== NOT EXECUTED
201cf30: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
201cf34: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201cf38: fa 07 bf fc ld [ %fp + -4 ], %i5 <== NOT EXECUTED
201cf3c: 40 00 1c dd call 20242b0 <strerror> <== NOT EXECUTED
201cf40: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
201cf44: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201cf48: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
201cf4c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
201cf50: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
201cf54: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED
201cf58: 40 00 19 a3 call 20235e4 <printf> <== NOT EXECUTED
201cf5c: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED
201cf60: 10 bf ff 0c b 201cb90 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
201cf64: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201cf68: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201cf6c: 7f ff d8 3f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201cf70: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
201cf74: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201cf78: 22 bf ff 07 be,a 201cb94 <rtems_rfs_dir_lookup_ino+0x130><== NOT EXECUTED
201cf7c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
201cf80: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
201cf84: 40 00 1c cb call 20242b0 <strerror> <== NOT EXECUTED
201cf88: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
201cf8c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201cf90: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201cf94: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED
201cf98: 11 00 80 d1 sethi %hi(0x2034400), %o0 <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
201cf9c: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
201cfa0: 40 00 19 91 call 20235e4 <printf> <== NOT EXECUTED
201cfa4: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED
201cfa8: 10 bf fe fb b 201cb94 <rtems_rfs_dir_lookup_ino+0x130> <== NOT EXECUTED
201cfac: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0201d864 <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)
{
201d864: 9d e3 bf 40 save %sp, -192, %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))
201d868: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d86c: 7f ff d5 ff call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201d870: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
201d874: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d878: 32 80 00 27 bne,a 201d914 <rtems_rfs_dir_read+0xb0> <== NOT EXECUTED
201d87c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
201d880: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
201d884: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d888: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201d88c: 7f ff f6 a4 call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
201d890: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201d894: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
201d898: 24 80 00 04 ble,a 201d8a8 <rtems_rfs_dir_read+0x44> <== NOT EXECUTED
201d89c: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201d8a0: 81 c7 e0 08 ret <== NOT EXECUTED
201d8a4: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
201d8a8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
201d8ac: a2 10 00 10 mov %l0, %l1 <== NOT EXECUTED
201d8b0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201d8b4: a0 10 20 00 clr %l0 <== NOT EXECUTED
201d8b8: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
201d8bc: 40 00 49 8b call 202fee8 <__moddi3> <== NOT EXECUTED
201d8c0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
201d8c4: 86 a4 40 09 subcc %l1, %o1, %g3 <== NOT EXECUTED
201d8c8: 84 64 00 08 subx %l0, %o0, %g2 <== NOT EXECUTED
201d8cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201d8d0: 04 80 00 18 ble 201d930 <rtems_rfs_dir_read+0xcc> <== NOT EXECUTED
201d8d4: 01 00 00 00 nop <== NOT EXECUTED
(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);
201d8d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d8dc: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201d8e0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201d8e4: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201d8e8: 7f ff f7 c0 call 201b7e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
201d8ec: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
201d8f0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
201d8f4: 04 80 00 25 ble 201d988 <rtems_rfs_dir_read+0x124> <== NOT EXECUTED
201d8f8: 80 a4 20 06 cmp %l0, 6 <== NOT EXECUTED
{
if (rc == ENXIO)
201d8fc: 02 80 00 1f be 201d978 <rtems_rfs_dir_read+0x114> <== NOT EXECUTED
201d900: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
201d904: 7f ff f6 ea call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201d908: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201d90c: 81 c7 e0 08 ret <== NOT EXECUTED
201d910: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
201d914: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201d918: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201d91c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201d920: 40 00 17 31 call 20235e4 <printf> <== NOT EXECUTED
201d924: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
201d928: 10 bf ff d7 b 201d884 <rtems_rfs_dir_read+0x20> <== NOT EXECUTED
201d92c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
201d930: 12 80 00 06 bne 201d948 <rtems_rfs_dir_read+0xe4> <== NOT EXECUTED
201d934: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
201d938: 80 a0 e0 0a cmp %g3, 0xa <== NOT EXECUTED
201d93c: 38 bf ff e8 bgu,a 201d8dc <rtems_rfs_dir_read+0x78> <== NOT EXECUTED
201d940: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
201d944: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
201d948: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201d94c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201d950: 40 00 48 80 call 202fb50 <__divdi3> <== NOT EXECUTED
201d954: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
201d958: 96 82 60 01 addcc %o1, 1, %o3 <== NOT EXECUTED
201d95c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201d960: 94 42 20 00 addx %o0, 0, %o2 <== NOT EXECUTED
201d964: 40 00 48 49 call 202fa88 <__muldi3> <== NOT EXECUTED
201d968: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
201d96c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
201d970: 10 bf ff da b 201d8d8 <rtems_rfs_dir_read+0x74> <== NOT EXECUTED
201d974: b6 10 00 09 mov %o1, %i3 <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
201d978: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
201d97c: 7f ff f6 cc call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201d980: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201d984: 30 bf ff e2 b,a 201d90c <rtems_rfs_dir_read+0xa8> <== NOT EXECUTED
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
201d988: 25 00 00 3f sethi %hi(0xfc00), %l2 <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
201d98c: 29 00 80 d2 sethi %hi(0x2034800), %l4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201d990: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201d994: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201d998: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
201d99c: a4 14 a3 ff or %l2, 0x3ff, %l2 <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
201d9a0: a8 15 23 80 or %l4, 0x380, %l4 <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
201d9a4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
201d9a8: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201d9ac: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201d9b0: 7f ff fa 6f call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201d9b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (rc > 0)
201d9b8: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
201d9bc: 14 80 00 38 bg 201da9c <rtems_rfs_dir_read+0x238> <== NOT EXECUTED
201d9c0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
201d9c4: ec 07 bf b4 ld [ %fp + -76 ], %l6 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
201d9c8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
201d9cc: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
201d9d0: aa 00 40 16 add %g1, %l6, %l5 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201d9d4: e6 08 40 16 ldub [ %g1 + %l6 ], %l3 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
201d9d8: e2 0d 60 08 ldub [ %l5 + 8 ], %l1 <== NOT EXECUTED
201d9dc: c8 0d 60 09 ldub [ %l5 + 9 ], %g4 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201d9e0: c6 0d 60 01 ldub [ %l5 + 1 ], %g3 <== NOT EXECUTED
201d9e4: c4 0d 60 03 ldub [ %l5 + 3 ], %g2 <== NOT EXECUTED
201d9e8: c2 0d 60 02 ldub [ %l5 + 2 ], %g1 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
201d9ec: a3 2c 60 08 sll %l1, 8, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201d9f0: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
201d9f4: a2 14 40 04 or %l1, %g4, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201d9f8: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201d9fc: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201da00: a6 14 c0 03 or %l3, %g3, %l3 <== NOT EXECUTED
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
201da04: 13 20 00 00 sethi %hi(0x80000000), %o1 <== 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);
201da08: a6 14 c0 02 or %l3, %g2, %l3 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
201da0c: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED
201da10: 12 80 00 2d bne 201dac4 <rtems_rfs_dir_read+0x260> <== NOT EXECUTED
201da14: a6 14 c0 01 or %l3, %g1, %l3 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
201da18: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED
201da1c: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
201da20: ac 20 80 16 sub %g2, %l6, %l6 <== NOT EXECUTED
201da24: ac 00 40 16 add %g1, %l6, %l6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
201da28: 7f ff d5 90 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201da2c: ec 27 40 00 st %l6, [ %i5 ] <== NOT EXECUTED
201da30: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201da34: 12 80 00 0d bne 201da68 <rtems_rfs_dir_read+0x204> <== NOT EXECUTED
201da38: 90 10 00 18 mov %i0, %o0 <== 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);
201da3c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201da40: 7f ff f7 87 call 201b85c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
201da44: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
201da48: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
201da4c: 02 80 00 13 be 201da98 <rtems_rfs_dir_read+0x234> <== NOT EXECUTED
201da50: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
201da54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201da58: 02 bf ff d4 be 201d9a8 <rtems_rfs_dir_read+0x144> <== NOT EXECUTED
201da5c: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201da60: 10 80 00 10 b 201daa0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
201da64: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
201da68: d6 07 40 00 ld [ %i5 ], %o3 <== NOT EXECUTED
201da6c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201da70: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
201da74: 40 00 16 dc call 20235e4 <printf> <== NOT EXECUTED
201da78: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201da7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201da80: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201da84: 7f ff f7 76 call 201b85c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
201da88: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
201da8c: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
201da90: 12 bf ff f1 bne 201da54 <rtems_rfs_dir_read+0x1f0> <== NOT EXECUTED
201da94: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
rc = ENOENT;
201da98: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED
201da9c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201daa0: 7f ff f9 b8 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201daa4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201daa8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
201daac: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201dab0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201dab4: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201dab8: 7f ff f6 7d call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201dabc: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
201dac0: 30 bf ff 78 b,a 201d8a0 <rtems_rfs_dir_read+0x3c> <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201dac4: 80 a4 60 0a cmp %l1, 0xa <== NOT EXECUTED
201dac8: 04 80 00 0d ble 201dafc <rtems_rfs_dir_read+0x298> <== NOT EXECUTED
201dacc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201dad0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
201dad4: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
201dad8: 1a 80 00 0a bcc 201db00 <rtems_rfs_dir_read+0x29c> <== NOT EXECUTED
201dadc: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
201dae0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201dae4: 02 80 00 07 be 201db00 <rtems_rfs_dir_read+0x29c> <== NOT EXECUTED
201dae8: 01 00 00 00 nop <== NOT EXECUTED
201daec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
201daf0: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED
201daf4: 3a 80 00 11 bcc,a 201db38 <rtems_rfs_dir_read+0x2d4> <== NOT EXECUTED
201daf8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
201dafc: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
201db00: 7f ff d5 5a call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201db04: a0 10 20 05 mov 5, %l0 <== NOT EXECUTED
201db08: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201db0c: 22 bf ff e5 be,a 201daa0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
201db10: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
201db14: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201db18: d8 07 bf b4 ld [ %fp + -76 ], %o4 <== NOT EXECUTED
201db1c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
201db20: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201db24: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
201db28: 40 00 16 af call 20235e4 <printf> <== NOT EXECUTED
201db2c: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201db30: 10 bf ff dc b 201daa0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
201db34: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
201db38: 92 10 20 00 clr %o1 <== NOT EXECUTED
201db3c: 40 00 16 58 call 202349c <memset> <== NOT EXECUTED
201db40: 94 10 21 18 mov 0x118, %o2 <== NOT EXECUTED
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
201db44: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
201db48: 84 10 21 18 mov 0x118, %g2 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
201db4c: f4 3f 20 08 std %i2, [ %i4 + 8 ] <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
201db50: c4 37 20 10 sth %g2, [ %i4 + 0x10 ] <== NOT EXECUTED
*length += elength;
201db54: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED
201db58: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
201db5c: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED
201db60: 84 20 80 16 sub %g2, %l6, %g2 <== NOT EXECUTED
201db64: 84 20 80 11 sub %g2, %l1, %g2 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
201db68: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
201db6c: 14 80 00 04 bg 201db7c <rtems_rfs_dir_read+0x318> <== NOT EXECUTED
201db70: a2 04 7f f6 add %l1, -10, %l1 <== NOT EXECUTED
*length += remaining;
201db74: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
201db78: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
201db7c: 80 a4 60 ff cmp %l1, 0xff <== NOT EXECUTED
201db80: 34 80 00 02 bg,a 201db88 <rtems_rfs_dir_read+0x324> <== NOT EXECUTED
201db84: a2 10 20 ff mov 0xff, %l1 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
201db88: 92 05 60 0a add %l5, 0xa, %o1 <== NOT EXECUTED
201db8c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
201db90: ba 07 20 14 add %i4, 0x14, %i5 <== NOT EXECUTED
201db94: 40 00 15 b6 call 202326c <memcpy> <== NOT EXECUTED
201db98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
201db9c: c8 0d 40 00 ldub [ %l5 ], %g4 <== NOT EXECUTED
201dba0: c6 0d 60 01 ldub [ %l5 + 1 ], %g3 <== NOT EXECUTED
201dba4: c4 0d 60 03 ldub [ %l5 + 3 ], %g2 <== NOT EXECUTED
201dba8: c2 0d 60 02 ldub [ %l5 + 2 ], %g1 <== NOT EXECUTED
201dbac: 89 29 20 18 sll %g4, 0x18, %g4 <== NOT EXECUTED
201dbb0: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201dbb4: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201dbb8: 86 11 00 03 or %g4, %g3, %g3 <== NOT EXECUTED
201dbbc: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
201dbc0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
dirent->d_namlen = elength;
201dbc4: e2 37 20 12 sth %l1, [ %i4 + 0x12 ] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
201dbc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
201dbcc: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
201dbd0: 7f ff d5 26 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201dbd4: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
201dbd8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201dbdc: 22 bf ff b1 be,a 201daa0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
201dbe0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
201dbe4: c4 1f 20 08 ldd [ %i4 + 8 ], %g2 <== NOT EXECUTED
201dbe8: d6 07 00 00 ld [ %i4 ], %o3 <== NOT EXECUTED
201dbec: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
201dbf0: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
201dbf4: 11 00 80 d2 sethi %hi(0x2034800), %o0 <== NOT EXECUTED
201dbf8: 98 10 00 1d mov %i5, %o4 <== NOT EXECUTED
201dbfc: 40 00 16 7a call 20235e4 <printf> <== NOT EXECUTED
201dc00: 90 12 23 48 or %o0, 0x348, %o0 <== NOT EXECUTED
201dc04: 10 bf ff a7 b 201daa0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
201dc08: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0201e1e4 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
201e1e4: 9d e3 bf a0 save %sp, -96, %sp
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
201e1e8: 90 10 20 10 mov 0x10, %o0
201e1ec: 92 10 20 00 clr %o1
201e1f0: 7f ff d3 9e call 2013068 <rtems_rfs_trace>
201e1f4: ba 10 00 18 mov %i0, %i5
201e1f8: 80 8a 20 ff btst 0xff, %o0
201e1fc: 32 80 00 87 bne,a 201e418 <rtems_rfs_file_close+0x234> <== NEVER TAKEN
201e200: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
if (handle->shared->references > 0)
201e204: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
201e208: c2 02 60 08 ld [ %o1 + 8 ], %g1
201e20c: 80 a0 60 00 cmp %g1, 0
201e210: 04 80 00 04 ble 201e220 <rtems_rfs_file_close+0x3c> <== NEVER TAKEN
201e214: 82 00 7f ff add %g1, -1, %g1
handle->shared->references--;
201e218: c2 22 60 08 st %g1, [ %o1 + 8 ]
if (handle->shared->references == 0)
201e21c: 80 a0 60 00 cmp %g1, 0
201e220: 12 80 00 74 bne 201e3f0 <rtems_rfs_file_close+0x20c> <== NEVER TAKEN
201e224: 90 10 00 1d mov %i5, %o0
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
201e228: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
201e22c: 80 a0 60 00 cmp %g1, 0
201e230: 22 80 00 a7 be,a 201e4cc <rtems_rfs_file_close+0x2e8> <== ALWAYS TAKEN
201e234: 92 02 60 0c add %o1, 0xc, %o1
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
201e238: c4 02 60 8c ld [ %o1 + 0x8c ], %g2
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201e23c: 86 10 20 01 mov 1, %g3
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
201e240: 89 30 a0 18 srl %g2, 0x18, %g4
201e244: c8 28 60 10 stb %g4, [ %g1 + 0x10 ]
201e248: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
201e24c: 89 30 a0 10 srl %g2, 0x10, %g4
201e250: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
201e254: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
201e258: 89 30 a0 08 srl %g2, 8, %g4
201e25c: c8 28 60 12 stb %g4, [ %g1 + 0x12 ]
201e260: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
201e264: c4 28 60 13 stb %g2, [ %g1 + 0x13 ]
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
201e268: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201e26c: c6 2a 60 1c stb %g3, [ %o1 + 0x1c ]
201e270: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
201e274: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
201e278: b9 30 60 18 srl %g1, 0x18, %i4
201e27c: f8 29 20 14 stb %i4, [ %g4 + 0x14 ]
201e280: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
201e284: b9 30 60 10 srl %g1, 0x10, %i4
201e288: f8 29 20 15 stb %i4, [ %g4 + 0x15 ]
201e28c: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
201e290: b9 30 60 08 srl %g1, 8, %i4
201e294: f8 29 20 16 stb %i4, [ %g4 + 0x16 ]
201e298: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
201e29c: c2 29 20 17 stb %g1, [ %g4 + 0x17 ]
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
201e2a0: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201e2a4: c6 28 a0 1c stb %g3, [ %g2 + 0x1c ]
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
201e2a8: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
201e2ac: c4 00 60 94 ld [ %g1 + 0x94 ], %g2
201e2b0: b9 30 a0 18 srl %g2, 0x18, %i4
201e2b4: f8 29 20 18 stb %i4, [ %g4 + 0x18 ]
201e2b8: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
201e2bc: b9 30 a0 10 srl %g2, 0x10, %i4
201e2c0: f8 29 20 19 stb %i4, [ %g4 + 0x19 ]
201e2c4: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
201e2c8: b9 30 a0 08 srl %g2, 8, %i4
201e2cc: f8 29 20 1a stb %i4, [ %g4 + 0x1a ]
201e2d0: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
201e2d4: c4 29 20 1b stb %g2, [ %g4 + 0x1b ]
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
201e2d8: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201e2dc: c6 28 60 1c stb %g3, [ %g1 + 0x1c ]
201e2e0: c4 02 60 3c ld [ %o1 + 0x3c ], %g2
201e2e4: c2 02 60 84 ld [ %o1 + 0x84 ], %g1
201e2e8: 80 a0 40 02 cmp %g1, %g2
201e2ec: 02 80 00 72 be 201e4b4 <rtems_rfs_file_close+0x2d0> <== ALWAYS TAKEN
201e2f0: c4 02 60 88 ld [ %o1 + 0x88 ], %g2
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
201e2f4: c2 22 60 3c st %g1, [ %o1 + 0x3c ] <== NOT EXECUTED
201e2f8: c4 22 60 40 st %g2, [ %o1 + 0x40 ] <== NOT EXECUTED
map->dirty = true;
201e2fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201e300: b0 10 20 00 clr %i0 <== NOT EXECUTED
201e304: c2 2a 60 34 stb %g1, [ %o1 + 0x34 ] <== NOT EXECUTED
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
201e308: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e30c: 7f ff f4 68 call 201b4ac <rtems_rfs_block_map_close>
201e310: 92 02 60 34 add %o1, 0x34, %o1
if (rc > 0)
201e314: b8 92 20 00 orcc %o0, 0, %i4
201e318: 04 80 00 0a ble 201e340 <rtems_rfs_file_close+0x15c> <== ALWAYS TAKEN
201e31c: 90 10 20 10 mov 0x10, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
201e320: 7f ff d3 52 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201e324: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e328: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201e32c: 32 80 00 57 bne,a 201e488 <rtems_rfs_file_close+0x2a4> <== NOT EXECUTED
201e330: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
201e334: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201e338: 22 80 00 02 be,a 201e340 <rtems_rfs_file_close+0x15c> <== NOT EXECUTED
201e33c: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
201e340: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
201e344: 90 10 00 1d mov %i5, %o0
201e348: 7f ff c7 80 call 2010148 <rtems_rfs_inode_close>
201e34c: 92 02 60 0c add %o1, 0xc, %o1
if (rc > 0)
201e350: b8 92 20 00 orcc %o0, 0, %i4
201e354: 04 80 00 0a ble 201e37c <rtems_rfs_file_close+0x198> <== ALWAYS TAKEN
201e358: 90 10 20 10 mov 0x10, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
201e35c: 7f ff d3 43 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201e360: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e364: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201e368: 32 80 00 3d bne,a 201e45c <rtems_rfs_file_close+0x278> <== NOT EXECUTED
201e36c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
201e370: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201e374: 22 80 00 2f be,a 201e430 <rtems_rfs_file_close+0x24c> <== NOT EXECUTED
201e378: d0 06 60 1c ld [ %i1 + 0x1c ], %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
201e37c: 7f ff b3 0f call 200afb8 <_Chain_Extract>
201e380: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
201e384: 7f ff 9e 15 call 2005bd8 <free>
201e388: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201e38c: 90 10 00 1d mov %i5, %o0
201e390: 7f ff f7 7c call 201c180 <rtems_rfs_buffer_handle_release>
201e394: 92 06 60 04 add %i1, 4, %o1
handle->dirty = false;
201e398: c0 2e 60 04 clrb [ %i1 + 4 ]
handle->bnum = 0;
201e39c: c0 26 60 08 clr [ %i1 + 8 ]
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
201e3a0: 80 a6 20 00 cmp %i0, 0
201e3a4: 04 80 00 19 ble 201e408 <rtems_rfs_file_close+0x224> <== ALWAYS TAKEN
201e3a8: c0 26 60 0c clr [ %i1 + 0xc ]
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
201e3ac: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED
201e3b0: 7f ff d3 2e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201e3b4: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e3b8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201e3bc: 02 80 00 13 be 201e408 <rtems_rfs_file_close+0x224> <== NOT EXECUTED
201e3c0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
201e3c4: 40 00 17 bb call 20242b0 <strerror> <== NOT EXECUTED
201e3c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201e3cc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201e3d0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201e3d4: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e3d8: 40 00 14 83 call 20235e4 <printf> <== NOT EXECUTED
201e3dc: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 2034db0 <CSWTCH.1+0xe70> <== NOT EXECUTED
}
free (handle);
201e3e0: 7f ff 9d fe call 2005bd8 <free> <== NOT EXECUTED
201e3e4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return rrc;
}
201e3e8: 81 c7 e0 08 ret <== NOT EXECUTED
201e3ec: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201e3f0: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED
201e3f4: 7f ff f7 63 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201e3f8: b0 10 20 00 clr %i0 <== NOT EXECUTED
handle->dirty = false;
201e3fc: c0 2e 60 04 clrb [ %i1 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
201e400: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
201e404: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
201e408: 7f ff 9d f4 call 2005bd8 <free>
201e40c: 90 10 00 19 mov %i1, %o0
return rrc;
}
201e410: 81 c7 e0 08 ret
201e414: 81 e8 00 00 restore
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
201e418: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e41c: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 <== NOT EXECUTED
201e420: 40 00 14 71 call 20235e4 <printf> <== NOT EXECUTED
201e424: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
201e428: 10 bf ff 78 b 201e208 <rtems_rfs_file_close+0x24> <== NOT EXECUTED
201e42c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
201e430: 7f ff b2 e2 call 200afb8 <_Chain_Extract> <== NOT EXECUTED
201e434: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
if (rrc == 0)
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
201e438: 7f ff 9d e8 call 2005bd8 <free> <== NOT EXECUTED
201e43c: d0 06 60 1c ld [ %i1 + 0x1c ], %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201e440: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e444: 7f ff f7 4f call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201e448: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED
handle->dirty = false;
201e44c: c0 2e 60 04 clrb [ %i1 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
201e450: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
201e454: 10 bf ff d6 b 201e3ac <rtems_rfs_file_close+0x1c8> <== NOT EXECUTED
201e458: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
201e45c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201e460: 40 00 17 94 call 20242b0 <strerror> <== NOT EXECUTED
201e464: f6 00 60 14 ld [ %g1 + 0x14 ], %i3 <== NOT EXECUTED
201e468: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201e46c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201e470: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
201e474: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e478: 40 00 14 5b call 20235e4 <printf> <== NOT EXECUTED
201e47c: 90 12 21 70 or %o0, 0x170, %o0 ! 2034d70 <CSWTCH.1+0xe30> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
201e480: 10 bf ff bd b 201e374 <rtems_rfs_file_close+0x190> <== NOT EXECUTED
201e484: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
201e488: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201e48c: 40 00 17 89 call 20242b0 <strerror> <== NOT EXECUTED
201e490: f6 00 60 14 ld [ %g1 + 0x14 ], %i3 <== NOT EXECUTED
201e494: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201e498: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201e49c: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
201e4a0: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e4a4: 40 00 14 50 call 20235e4 <printf> <== NOT EXECUTED
201e4a8: 90 12 21 30 or %o0, 0x130, %o0 ! 2034d30 <CSWTCH.1+0xdf0> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
201e4ac: 10 bf ff a3 b 201e338 <rtems_rfs_file_close+0x154> <== NOT EXECUTED
201e4b0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
201e4b4: c6 02 60 40 ld [ %o1 + 0x40 ], %g3
201e4b8: 80 a0 80 03 cmp %g2, %g3
201e4bc: 12 bf ff 8e bne 201e2f4 <rtems_rfs_file_close+0x110> <== NEVER TAKEN
201e4c0: b0 10 20 00 clr %i0
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
201e4c4: 10 bf ff 92 b 201e30c <rtems_rfs_file_close+0x128>
201e4c8: 90 10 00 1d mov %i5, %o0
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
201e4cc: 7f ff c6 7c call 200febc <rtems_rfs_inode_load>
201e4d0: 90 10 00 1d mov %i5, %o0
if (rrc == 0)
201e4d4: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
201e4d8: 80 a2 20 00 cmp %o0, 0
201e4dc: 12 bf ff 8b bne 201e308 <rtems_rfs_file_close+0x124> <== NEVER TAKEN
201e4e0: b0 10 00 08 mov %o0, %i0
201e4e4: 10 bf ff 55 b 201e238 <rtems_rfs_file_close+0x54>
201e4e8: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
0201ee00 <rtems_rfs_file_get_shared>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
201ee00: c2 02 20 70 ld [ %o0 + 0x70 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
201ee04: 84 02 20 74 add %o0, 0x74, %g2
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
201ee08: 80 a0 40 02 cmp %g1, %g2
201ee0c: 02 80 00 10 be 201ee4c <rtems_rfs_file_get_shared+0x4c> <== ALWAYS TAKEN
201ee10: 90 10 20 00 clr %o0
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
201ee14: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 <== NOT EXECUTED
201ee18: 80 a0 c0 09 cmp %g3, %o1 <== NOT EXECUTED
201ee1c: 12 80 00 06 bne 201ee34 <rtems_rfs_file_get_shared+0x34> <== NOT EXECUTED
201ee20: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
201ee24: 30 80 00 0a b,a 201ee4c <rtems_rfs_file_get_shared+0x4c> <== NOT EXECUTED
201ee28: 80 a0 c0 09 cmp %g3, %o1 <== NOT EXECUTED
201ee2c: 02 80 00 08 be 201ee4c <rtems_rfs_file_get_shared+0x4c> <== NOT EXECUTED
201ee30: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
201ee34: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
201ee38: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201ee3c: 32 bf ff fb bne,a 201ee28 <rtems_rfs_file_get_shared+0x28><== NOT EXECUTED
201ee40: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 <== NOT EXECUTED
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
201ee44: 81 c3 e0 08 retl <== NOT EXECUTED
201ee48: 90 10 20 00 clr %o0 <== NOT EXECUTED
201ee4c: 81 c3 e0 08 retl
0201e720 <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
201e720: 9d e3 bf a0 save %sp, -96, %sp
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e724: 90 10 20 20 mov 0x20, %o0
201e728: 92 10 20 00 clr %o1
201e72c: 7f ff d2 4f call 2013068 <rtems_rfs_trace>
201e730: ba 10 00 18 mov %i0, %i5
201e734: 80 8a 20 ff btst 0xff, %o0
201e738: 22 80 00 0b be,a 201e764 <rtems_rfs_file_io_end+0x44> <== ALWAYS TAKEN
201e73c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
201e740: 13 00 80 c6 sethi %hi(0x2031800), %o1 <== NOT EXECUTED
201e744: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201e748: 12 80 00 66 bne 201e8e0 <rtems_rfs_file_io_end+0x1c0> <== NOT EXECUTED
201e74c: 92 12 63 48 or %o1, 0x348, %o1 <== NOT EXECUTED
201e750: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e754: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
201e758: 40 00 13 a3 call 20235e4 <printf> <== NOT EXECUTED
201e75c: 90 12 22 90 or %o0, 0x290, %o0 <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
201e760: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
201e764: 80 a0 60 00 cmp %g1, 0
201e768: 02 80 00 a0 be 201e9e8 <rtems_rfs_file_io_end+0x2c8> <== NEVER TAKEN
201e76c: 80 a6 a0 00 cmp %i2, 0
{
if (!read)
201e770: 02 80 00 18 be 201e7d0 <rtems_rfs_file_io_end+0xb0>
201e774: 82 10 20 01 mov 1, %g1
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
201e778: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
201e77c: 92 07 60 04 add %i5, 4, %o1
201e780: 7f ff f6 80 call 201c180 <rtems_rfs_buffer_handle_release>
201e784: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_file_buffer (handle));
if (rc > 0)
201e788: b0 92 20 00 orcc %o0, 0, %i0
201e78c: 24 80 00 1a ble,a 201e7f4 <rtems_rfs_file_io_end+0xd4> <== ALWAYS TAKEN
201e790: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
{
printf (
201e794: 3b 00 80 c6 sethi %hi(0x2031800), %i5 <== NOT EXECUTED
201e798: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201e79c: 12 80 00 54 bne 201e8ec <rtems_rfs_file_io_end+0x1cc> <== NOT EXECUTED
201e7a0: ba 17 63 48 or %i5, 0x348, %i5 <== NOT EXECUTED
201e7a4: 40 00 16 c3 call 20242b0 <strerror> <== NOT EXECUTED
201e7a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201e7ac: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201e7b0: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
201e7b4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
201e7b8: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e7bc: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201e7c0: 40 00 13 89 call 20235e4 <printf> <== NOT EXECUTED
201e7c4: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
201e7c8: 81 c7 e0 08 ret <== NOT EXECUTED
201e7cc: 81 e8 00 00 restore <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
if (!read)
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
201e7d0: c2 2f 60 04 stb %g1, [ %i5 + 4 ]
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
201e7d4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
201e7d8: 92 07 60 04 add %i5, 4, %o1
201e7dc: 7f ff f6 69 call 201c180 <rtems_rfs_buffer_handle_release>
201e7e0: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_file_buffer (handle));
if (rc > 0)
201e7e4: b0 92 20 00 orcc %o0, 0, %i0
201e7e8: 34 bf ff ec bg,a 201e798 <rtems_rfs_file_io_end+0x78> <== NEVER TAKEN
201e7ec: 3b 00 80 c6 sethi %hi(0x2031800), %i5 <== NOT EXECUTED
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
201e7f0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 ! 203181c <_rodata_start+0x10c>
* 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;
201e7f4: c6 07 60 14 ld [ %i5 + 0x14 ], %g3
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
201e7f8: c4 00 60 98 ld [ %g1 + 0x98 ], %g2
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
201e7fc: b2 06 40 03 add %i1, %g3, %i1
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
201e800: c4 00 a0 08 ld [ %g2 + 8 ], %g2
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
201e804: 80 a6 40 02 cmp %i1, %g2
201e808: 0a 80 00 07 bcs 201e824 <rtems_rfs_file_io_end+0x104> <== ALWAYS TAKEN
201e80c: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
201e810: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201e814: b2 26 40 02 sub %i1, %g2, %i1 <== NOT EXECUTED
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
201e818: 86 00 e0 01 inc %g3 <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201e81c: f2 27 60 14 st %i1, [ %i5 + 0x14 ] <== NOT EXECUTED
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
201e820: c6 27 60 10 st %g3, [ %i5 + 0x10 ] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
201e824: 80 a6 a0 00 cmp %i2, 0
201e828: 12 80 00 0e bne 201e860 <rtems_rfs_file_io_end+0x140>
201e82c: b2 10 20 00 clr %i1
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
201e830: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
}
length = false;
mtime = false;
if (!read &&
201e834: 80 a0 a0 00 cmp %g2, 0
201e838: 02 80 00 5e be 201e9b0 <rtems_rfs_file_io_end+0x290> <== ALWAYS TAKEN
201e83c: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
201e840: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
201e844: 12 80 00 5c bne 201e9b4 <rtems_rfs_file_io_end+0x294> <== NOT EXECUTED
201e848: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
201e84c: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
201e850: c4 20 60 40 st %g2, [ %g1 + 0x40 ] <== 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;
201e854: b2 10 20 01 mov 1, %i1
map->dirty = true;
201e858: 84 10 20 01 mov 1, %g2
201e85c: c4 28 60 34 stb %g2, [ %g1 + 0x34 ]
}
atime = rtems_rfs_file_update_atime (handle);
201e860: c2 07 40 00 ld [ %i5 ], %g1
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
201e864: b8 10 20 00 clr %i4
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
201e868: b6 08 60 01 and %g1, 1, %i3
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
201e86c: 80 88 60 02 btst 2, %g1
201e870: 12 80 00 03 bne 201e87c <rtems_rfs_file_io_end+0x15c> <== NEVER TAKEN
201e874: b6 1e e0 01 xor %i3, 1, %i3
201e878: b8 10 00 19 mov %i1, %i4
length = rtems_rfs_file_update_length (handle) && length;
201e87c: 82 08 60 04 and %g1, 4, %g1
201e880: 80 a0 00 01 cmp %g0, %g1
201e884: 82 40 3f ff addx %g0, -1, %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e888: 90 10 20 20 mov 0x20, %o0
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
201e88c: b2 0e 40 01 and %i1, %g1, %i1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e890: 92 10 20 00 clr %o1
201e894: 7f ff d1 f5 call 2013068 <rtems_rfs_trace>
201e898: b6 0e e0 ff and %i3, 0xff, %i3
201e89c: 80 8a 20 ff btst 0xff, %o0
201e8a0: 12 80 00 2b bne 201e94c <rtems_rfs_file_io_end+0x22c> <== NEVER TAKEN
201e8a4: b2 0e 60 ff and %i1, 0xff, %i1
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
201e8a8: 80 a6 e0 00 cmp %i3, 0
201e8ac: 12 80 00 1d bne 201e920 <rtems_rfs_file_io_end+0x200> <== ALWAYS TAKEN
201e8b0: 80 8f 20 ff btst 0xff, %i4
201e8b4: 12 80 00 1b bne 201e920 <rtems_rfs_file_io_end+0x200> <== NOT EXECUTED
201e8b8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
201e8bc: 02 80 00 17 be 201e918 <rtems_rfs_file_io_end+0x1f8>
201e8c0: 01 00 00 00 nop
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
201e8c4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
201e8c8: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
201e8cc: c4 00 60 40 ld [ %g1 + 0x40 ], %g2
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
201e8d0: c6 20 60 84 st %g3, [ %g1 + 0x84 ]
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
201e8d4: c4 20 60 88 st %g2, [ %g1 + 0x88 ]
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
201e8d8: 81 c7 e0 08 ret
201e8dc: 81 e8 00 00 restore
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
201e8e0: 13 00 80 cd sethi %hi(0x2033400), %o1 <== NOT EXECUTED
201e8e4: 10 bf ff 9b b 201e750 <rtems_rfs_file_io_end+0x30> <== NOT EXECUTED
201e8e8: 92 12 62 68 or %o1, 0x268, %o1 ! 2033668 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
if (rc > 0)
{
printf (
201e8ec: 40 00 16 71 call 20242b0 <strerror> <== NOT EXECUTED
201e8f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201e8f4: 3b 00 80 cd sethi %hi(0x2033400), %i5 <== NOT EXECUTED
201e8f8: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
201e8fc: ba 17 62 68 or %i5, 0x268, %i5 <== NOT EXECUTED
201e900: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e904: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201e908: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
201e90c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201e910: 40 00 13 35 call 20235e4 <printf> <== NOT EXECUTED
201e914: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
201e918: 81 c7 e0 08 ret
201e91c: 81 e8 00 00 restore
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
{
time_t now = time (NULL);
201e920: 40 00 20 96 call 2026b78 <time>
201e924: 90 10 20 00 clr %o0
if (read && atime)
201e928: 80 a6 a0 00 cmp %i2, 0
201e92c: 02 80 00 1c be 201e99c <rtems_rfs_file_io_end+0x27c>
201e930: 80 8f 20 ff btst 0xff, %i4
201e934: 80 a6 e0 00 cmp %i3, 0
201e938: 02 bf ff e1 be 201e8bc <rtems_rfs_file_io_end+0x19c> <== NEVER TAKEN
201e93c: 80 a6 60 00 cmp %i1, 0
handle->shared->atime = now;
201e940: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
201e944: 10 bf ff de b 201e8bc <rtems_rfs_file_io_end+0x19c>
201e948: d0 20 60 8c st %o0, [ %g1 + 0x8c ]
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
201e94c: 80 a0 00 1b cmp %g0, %i3 <== NOT EXECUTED
201e950: 82 0f 20 ff and %i4, 0xff, %g1 <== NOT EXECUTED
201e954: 96 40 3f ff addx %g0, -1, %o3 <== NOT EXECUTED
201e958: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 <== NOT EXECUTED
201e95c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
201e960: d4 07 60 14 ld [ %i5 + 0x14 ], %o2 <== NOT EXECUTED
201e964: 98 40 3f ff addx %g0, -1, %o4 <== NOT EXECUTED
201e968: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
201e96c: 96 0a ff ec and %o3, -20, %o3 <== NOT EXECUTED
201e970: 9a 40 3f ff addx %g0, -1, %o5 <== NOT EXECUTED
201e974: 98 0b 3f e0 and %o4, -32, %o4 <== NOT EXECUTED
201e978: 9a 0b 7f e1 and %o5, -31, %o5 <== NOT EXECUTED
201e97c: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e980: 96 02 e0 41 add %o3, 0x41, %o3 <== NOT EXECUTED
201e984: 98 03 20 4d add %o4, 0x4d, %o4 <== NOT EXECUTED
201e988: 9a 03 60 4c add %o5, 0x4c, %o5 <== NOT EXECUTED
201e98c: 40 00 13 16 call 20235e4 <printf> <== NOT EXECUTED
201e990: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
201e994: 10 bf ff c6 b 201e8ac <rtems_rfs_file_io_end+0x18c> <== NOT EXECUTED
201e998: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
201e99c: 02 bf ff c8 be 201e8bc <rtems_rfs_file_io_end+0x19c>
201e9a0: 80 a6 60 00 cmp %i1, 0
handle->shared->mtime = now;
201e9a4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
201e9a8: 10 bf ff c5 b 201e8bc <rtems_rfs_file_io_end+0x19c>
201e9ac: d0 20 60 90 st %o0, [ %g1 + 0x90 ]
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
201e9b0: 80 a0 80 03 cmp %g2, %g3
201e9b4: 3a bf ff a7 bcc,a 201e850 <rtems_rfs_file_io_end+0x130> <== NEVER TAKEN
201e9b8: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
201e9bc: 86 00 ff ff add %g3, -1, %g3
201e9c0: 80 a0 80 03 cmp %g2, %g3
201e9c4: 12 bf ff a7 bne 201e860 <rtems_rfs_file_io_end+0x140> <== NEVER TAKEN
201e9c8: b2 10 20 00 clr %i1
201e9cc: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
201e9d0: c6 00 60 40 ld [ %g1 + 0x40 ], %g3
201e9d4: 80 a0 80 03 cmp %g2, %g3
201e9d8: 28 bf ff a3 bleu,a 201e864 <rtems_rfs_file_io_end+0x144>
201e9dc: c2 07 40 00 ld [ %i5 ], %g1
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
201e9e0: 10 bf ff 9d b 201e854 <rtems_rfs_file_io_end+0x134>
201e9e4: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
201e9e8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
201e9ec: c6 07 60 14 ld [ %i5 + 0x14 ], %g3 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
201e9f0: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
201e9f4: b2 06 40 03 add %i1, %g3, %i1 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
201e9f8: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
201e9fc: f2 27 60 14 st %i1, [ %i5 + 0x14 ] <== NOT EXECUTED
if (handle->bpos.boff >=
201ea00: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED
201ea04: 0a bf ff 88 bcs 201e824 <rtems_rfs_file_io_end+0x104> <== NOT EXECUTED
201ea08: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
201ea0c: 10 bf ff 82 b 201e814 <rtems_rfs_file_io_end+0xf4> <== NOT EXECUTED
201ea10: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 <== NOT EXECUTED
0201ea14 <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
201ea14: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED
201ea18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ea1c: 02 80 00 07 be 201ea38 <rtems_rfs_file_io_release+0x24> <== NOT EXECUTED
201ea20: 92 02 20 04 add %o0, 4, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
201ea24: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED
201ea28: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
201ea2c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
201ea30: 7f ff f5 d4 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201ea34: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
201ea38: 81 c3 e0 08 retl <== NOT EXECUTED
201ea3c: 90 10 20 00 clr %o0 <== NOT EXECUTED
0201e4ec <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
201e4ec: 9d e3 bf 98 save %sp, -104, %sp
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e4f0: 90 10 20 20 mov 0x20, %o0
201e4f4: 92 10 20 00 clr %o1
201e4f8: 7f ff d2 dc call 2013068 <rtems_rfs_trace>
201e4fc: ba 10 00 18 mov %i0, %i5
201e500: 80 8a 20 ff btst 0xff, %o0
201e504: 22 80 00 0c be,a 201e534 <rtems_rfs_file_io_start+0x48> <== ALWAYS TAKEN
201e508: c2 07 60 0c ld [ %i5 + 0xc ], %g1
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
201e50c: 13 00 80 c6 sethi %hi(0x2031800), %o1 <== NOT EXECUTED
201e510: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201e514: 12 80 00 2d bne 201e5c8 <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
201e518: 92 12 63 48 or %o1, 0x348, %o1 <== NOT EXECUTED
201e51c: d4 07 60 10 ld [ %i5 + 0x10 ], %o2 <== NOT EXECUTED
201e520: d6 07 60 14 ld [ %i5 + 0x14 ], %o3 <== NOT EXECUTED
201e524: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e528: 40 00 14 2f call 20235e4 <printf> <== NOT EXECUTED
201e52c: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 2034dd8 <CSWTCH.1+0xe98> <== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
201e530: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
201e534: 80 a0 60 00 cmp %g1, 0
201e538: 22 80 00 2d be,a 201e5ec <rtems_rfs_file_io_start+0x100> <== ALWAYS TAKEN
201e53c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
block, request_read);
if (rc > 0)
return rc;
}
if (read
201e540: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201e544: 02 80 00 0d be 201e578 <rtems_rfs_file_io_start+0x8c>
201e548: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
201e54c: c4 00 60 44 ld [ %g1 + 0x44 ], %g2
201e550: 80 a0 a0 00 cmp %g2, 0
201e554: 12 80 00 20 bne 201e5d4 <rtems_rfs_file_io_start+0xe8> <== NEVER TAKEN
201e558: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
201e55c: 80 a0 e0 00 cmp %g3, 0
201e560: 12 80 00 1e bne 201e5d8 <rtems_rfs_file_io_start+0xec> <== ALWAYS TAKEN
201e564: 86 00 ff ff add %g3, -1, %g3
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
201e568: f4 00 60 40 ld [ %g1 + 0x40 ], %i2 <== NOT EXECUTED
201e56c: 80 a6 a0 00 cmp %i2, 0
201e570: 32 80 00 05 bne,a 201e584 <rtems_rfs_file_io_start+0x98> <== ALWAYS TAKEN
201e574: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201e578: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
201e57c: f4 00 60 08 ld [ %g1 + 8 ], %i2
*available = size - rtems_rfs_file_block_offset (handle);
201e580: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e584: 90 10 20 20 mov 0x20, %o0
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
201e588: 82 26 80 01 sub %i2, %g1, %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e58c: 92 10 20 00 clr %o1
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
201e590: c2 26 40 00 st %g1, [ %i1 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e594: 7f ff d2 b5 call 2013068 <rtems_rfs_trace>
201e598: b0 10 20 00 clr %i0
201e59c: 80 8a 20 ff btst 0xff, %o0
201e5a0: 32 80 00 04 bne,a 201e5b0 <rtems_rfs_file_io_start+0xc4> <== NEVER TAKEN
201e5a4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
201e5a8: 81 c7 e0 08 ret
201e5ac: 81 e8 00 00 restore
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
201e5b0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201e5b4: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e5b8: 40 00 14 0b call 20235e4 <printf> <== NOT EXECUTED
201e5bc: 90 12 22 60 or %o0, 0x260, %o0 ! 2034e60 <CSWTCH.1+0xf20> <== NOT EXECUTED
*available, size);
return 0;
}
201e5c0: 81 c7 e0 08 ret <== NOT EXECUTED
201e5c4: 81 e8 00 00 restore <== NOT EXECUTED
bool read)
{
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
201e5c8: 13 00 80 cd sethi %hi(0x2033400), %o1 <== NOT EXECUTED
201e5cc: 10 bf ff d4 b 201e51c <rtems_rfs_file_io_start+0x30> <== NOT EXECUTED
201e5d0: 92 12 62 68 or %o1, 0x268, %o1 ! 2033668 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
201e5d4: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
201e5d8: 80 a0 80 03 cmp %g2, %g3
201e5dc: 32 bf ff e8 bne,a 201e57c <rtems_rfs_file_io_start+0x90> <== NEVER TAKEN
201e5e0: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 <== NOT EXECUTED
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
201e5e4: 10 bf ff e2 b 201e56c <rtems_rfs_file_io_start+0x80>
201e5e8: f4 00 60 40 ld [ %g1 + 0x40 ], %i2
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
201e5ec: 94 07 60 10 add %i5, 0x10, %o2
201e5f0: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
201e5f4: 96 07 bf fc add %fp, -4, %o3
201e5f8: 7f ff f4 22 call 201b680 <rtems_rfs_block_map_find>
201e5fc: 92 02 60 34 add %o1, 0x34, %o1
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
201e600: b0 92 20 00 orcc %o0, 0, %i0
201e604: 04 80 00 09 ble 201e628 <rtems_rfs_file_io_start+0x13c> <== ALWAYS TAKEN
201e608: 80 a6 a0 00 cmp %i2, 0
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
201e60c: 02 80 00 2f be 201e6c8 <rtems_rfs_file_io_start+0x1dc> <== NOT EXECUTED
201e610: 80 a6 20 06 cmp %i0, 6 <== NOT EXECUTED
201e614: 12 80 00 2b bne 201e6c0 <rtems_rfs_file_io_start+0x1d4> <== NOT EXECUTED
201e618: 01 00 00 00 nop <== NOT EXECUTED
{
*available = 0;
201e61c: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
return 0;
201e620: 81 c7 e0 08 ret <== NOT EXECUTED
201e624: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
201e628: 12 80 00 0c bne 201e658 <rtems_rfs_file_io_start+0x16c>
201e62c: b0 10 00 1a mov %i2, %i0
201e630: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
201e634: 80 a0 60 00 cmp %g1, 0
201e638: 12 80 00 08 bne 201e658 <rtems_rfs_file_io_start+0x16c> <== NEVER TAKEN
201e63c: b0 10 20 01 mov 1, %i0
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
201e640: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
201e644: c4 06 40 00 ld [ %i1 ], %g2
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
201e648: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
201e64c: c2 00 60 08 ld [ %g1 + 8 ], %g1
201e650: 80 a0 80 01 cmp %g2, %g1
201e654: b0 40 20 00 addx %g0, 0, %i0
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e658: 90 10 20 20 mov 0x20, %o0
201e65c: 92 10 20 00 clr %o1
201e660: 7f ff d2 82 call 2013068 <rtems_rfs_trace>
201e664: b0 0e 20 ff and %i0, 0xff, %i0
201e668: 80 8a 20 ff btst 0xff, %o0
201e66c: 22 80 00 0d be,a 201e6a0 <rtems_rfs_file_io_start+0x1b4> <== ALWAYS TAKEN
201e670: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
201e674: 15 00 80 cc sethi %hi(0x2033000), %o2 <== NOT EXECUTED
201e678: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
201e67c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201e680: 02 80 00 04 be 201e690 <rtems_rfs_file_io_start+0x1a4> <== NOT EXECUTED
201e684: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED
201e688: 15 00 80 cc sethi %hi(0x2033000), %o2 <== NOT EXECUTED
201e68c: 94 12 a1 38 or %o2, 0x138, %o2 ! 2033138 <ramdisk_ops+0xa74><== NOT EXECUTED
201e690: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e694: 40 00 13 d4 call 20235e4 <printf> <== NOT EXECUTED
201e698: 90 12 22 28 or %o0, 0x228, %o0 ! 2034e28 <CSWTCH.1+0xee8> <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
201e69c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
201e6a0: d4 07 bf fc ld [ %fp + -4 ], %o2
201e6a4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
201e6a8: 96 10 00 18 mov %i0, %o3
201e6ac: 7f ff f7 30 call 201c36c <rtems_rfs_buffer_handle_request>
201e6b0: 92 07 60 04 add %i5, 4, %o1
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
201e6b4: b0 92 20 00 orcc %o0, 0, %i0
201e6b8: 04 bf ff a3 ble 201e544 <rtems_rfs_file_io_start+0x58> <== ALWAYS TAKEN
201e6bc: 80 a6 a0 00 cmp %i2, 0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
201e6c0: 81 c7 e0 08 ret <== NOT EXECUTED
201e6c4: 81 e8 00 00 restore <== NOT EXECUTED
{
*available = 0;
return 0;
}
if (rc != ENXIO)
201e6c8: 12 bf ff b8 bne 201e5a8 <rtems_rfs_file_io_start+0xbc> <== NOT EXECUTED
201e6cc: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201e6d0: 7f ff d2 66 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201e6d4: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e6d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201e6dc: 12 80 00 0d bne 201e710 <rtems_rfs_file_io_start+0x224> <== NOT EXECUTED
201e6e0: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
201e6e4: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
201e6e8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201e6ec: d0 02 60 98 ld [ %o1 + 0x98 ], %o0 <== NOT EXECUTED
201e6f0: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
201e6f4: 7f ff f4 67 call 201b890 <rtems_rfs_block_map_grow> <== NOT EXECUTED
201e6f8: 92 02 60 34 add %o1, 0x34, %o1 <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
201e6fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201e700: 14 bf ff f0 bg 201e6c0 <rtems_rfs_file_io_start+0x1d4> <== NOT EXECUTED
201e704: 01 00 00 00 nop <== NOT EXECUTED
return rc;
request_read = false;
201e708: 10 bf ff d4 b 201e658 <rtems_rfs_file_io_start+0x16c> <== NOT EXECUTED
201e70c: b0 10 20 00 clr %i0 ! 0 <PROM_START> <== NOT EXECUTED
if (rc != ENXIO)
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
201e710: 40 00 13 f6 call 20236e8 <puts> <== NOT EXECUTED
201e714: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
201e718: 10 bf ff f4 b 201e6e8 <rtems_rfs_file_io_start+0x1fc> <== NOT EXECUTED
201e71c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
0201dea0 <rtems_rfs_file_open>:
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
201dea0: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
201dea4: 90 10 20 08 mov 8, %o0
201dea8: 92 10 20 00 clr %o1
201deac: 7f ff d4 6f call 2013068 <rtems_rfs_trace>
201deb0: ba 10 00 18 mov %i0, %i5
201deb4: 80 8a 20 ff btst 0xff, %o0
201deb8: 12 80 00 2b bne 201df64 <rtems_rfs_file_open+0xc4> <== NEVER TAKEN
201debc: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
201dec0: c0 26 c0 00 clr [ %i3 ]
/*
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
201dec4: 90 10 20 20 mov 0x20, %o0
201dec8: 7f ff a1 14 call 2006318 <malloc>
201decc: b0 10 20 0c mov 0xc, %i0
if (!handle)
201ded0: 80 a2 20 00 cmp %o0, 0
201ded4: 02 80 00 58 be 201e034 <rtems_rfs_file_open+0x194> <== NEVER TAKEN
201ded8: a0 10 00 08 mov %o0, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
201dedc: f8 07 60 70 ld [ %i5 + 0x70 ], %i4
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
201dee0: c0 22 00 00 clr [ %o0 ]
201dee4: c0 22 20 04 clr [ %o0 + 4 ]
201dee8: c0 22 20 10 clr [ %o0 + 0x10 ]
201deec: c0 22 20 14 clr [ %o0 + 0x14 ]
201def0: c0 22 20 18 clr [ %o0 + 0x18 ]
201def4: c0 22 20 1c clr [ %o0 + 0x1c ]
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
201def8: c0 22 20 08 clr [ %o0 + 8 ]
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
201defc: 84 07 60 74 add %i5, 0x74, %g2
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
201df00: 80 a7 00 02 cmp %i4, %g2
201df04: 12 80 00 06 bne 201df1c <rtems_rfs_file_open+0x7c> <== NEVER TAKEN
201df08: c0 22 20 0c clr [ %o0 + 0xc ]
201df0c: 30 80 00 24 b,a 201df9c <rtems_rfs_file_open+0xfc>
201df10: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED
201df14: 02 80 00 22 be 201df9c <rtems_rfs_file_open+0xfc> <== NOT EXECUTED
201df18: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
201df1c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 <== NOT EXECUTED
201df20: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
201df24: 32 bf ff fb bne,a 201df10 <rtems_rfs_file_open+0x70> <== NOT EXECUTED
201df28: f8 07 00 00 ld [ %i4 ], %i4 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
201df2c: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
201df30: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
201df34: 82 00 60 01 inc %g1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
201df38: 92 10 20 00 clr %o1 <== NOT EXECUTED
201df3c: 7f ff d4 4b call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201df40: c2 27 20 08 st %g1, [ %i4 + 8 ] <== NOT EXECUTED
201df44: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201df48: 12 80 00 0c bne 201df78 <rtems_rfs_file_open+0xd8> <== NOT EXECUTED
201df4c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
201df50: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
handle->shared = shared;
201df54: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
*file = handle;
201df58: e0 26 c0 00 st %l0, [ %i3 ]
return 0;
}
201df5c: 81 c7 e0 08 ret
201df60: 91 e8 20 00 restore %g0, 0, %o0
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
201df64: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201df68: 40 00 15 9f call 20235e4 <printf> <== NOT EXECUTED
201df6c: 90 12 20 20 or %o0, 0x20, %o0 ! 2034c20 <CSWTCH.1+0xce0> <== NOT EXECUTED
*file = NULL;
201df70: 10 bf ff d5 b 201dec4 <rtems_rfs_file_open+0x24> <== NOT EXECUTED
201df74: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
201df78: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
handle->flags = flags;
handle->shared = shared;
*file = handle;
return 0;
201df7c: b0 10 20 00 clr %i0 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
201df80: 40 00 15 99 call 20235e4 <printf> <== NOT EXECUTED
201df84: 90 12 20 40 or %o0, 0x40, %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
201df88: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
handle->shared = shared;
201df8c: f8 24 20 1c st %i4, [ %l0 + 0x1c ] <== NOT EXECUTED
201df90: e0 26 c0 00 st %l0, [ %i3 ] <== NOT EXECUTED
201df94: 81 c7 e0 08 ret <== NOT EXECUTED
201df98: 81 e8 00 00 restore <== NOT EXECUTED
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
201df9c: 7f ff a0 df call 2006318 <malloc>
201dfa0: 90 10 20 9c mov 0x9c, %o0
if (!shared)
201dfa4: b8 92 20 00 orcc %o0, 0, %i4
201dfa8: 02 80 00 3d be 201e09c <rtems_rfs_file_open+0x1fc> <== NEVER TAKEN
201dfac: 92 10 20 00 clr %o1
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
201dfb0: 40 00 15 3b call 202349c <memset>
201dfb4: 94 10 20 9c mov 0x9c, %o2
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
201dfb8: a2 07 20 0c add %i4, 0xc, %l1
201dfbc: 90 10 00 1d mov %i5, %o0
201dfc0: 92 10 00 19 mov %i1, %o1
201dfc4: 94 10 00 11 mov %l1, %o2
201dfc8: 7f ff c7 e9 call 200ff6c <rtems_rfs_inode_open>
201dfcc: 96 10 20 01 mov 1, %o3
if (rc > 0)
201dfd0: b0 92 20 00 orcc %o0, 0, %i0
201dfd4: 04 80 00 1a ble 201e03c <rtems_rfs_file_open+0x19c> <== ALWAYS TAKEN
201dfd8: 90 10 20 08 mov 8, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
201dfdc: 7f ff d4 23 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201dfe0: 92 10 20 00 clr %o1 <== NOT EXECUTED
201dfe4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201dfe8: 02 80 00 09 be 201e00c <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
201dfec: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
201dff0: 40 00 18 b0 call 20242b0 <strerror> <== NOT EXECUTED
201dff4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201dff8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201dffc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201e000: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e004: 40 00 15 78 call 20235e4 <printf> <== NOT EXECUTED
201e008: 90 12 20 68 or %o0, 0x68, %o0 ! 2034c68 <CSWTCH.1+0xd28> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
free (shared);
201e00c: 7f ff 9e f3 call 2005bd8 <free> <== NOT EXECUTED
201e010: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201e014: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e018: 7f ff f8 5a call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201e01c: 92 04 20 04 add %l0, 4, %o1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
201e020: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
201e024: c0 2c 20 04 clrb [ %l0 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
201e028: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
201e02c: 7f ff 9e eb call 2005bd8 <free> <== NOT EXECUTED
201e030: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
return rc;
201e034: 81 c7 e0 08 ret <== NOT EXECUTED
201e038: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
201e03c: 90 10 00 1d mov %i5, %o0
201e040: 92 10 00 11 mov %l1, %o1
201e044: 7f ff f4 b6 call 201b31c <rtems_rfs_block_map_open>
201e048: 94 07 20 34 add %i4, 0x34, %o2
if (rc > 0)
201e04c: b0 92 20 00 orcc %o0, 0, %i0
201e050: 24 80 00 1e ble,a 201e0c8 <rtems_rfs_file_open+0x228> <== ALWAYS TAKEN
201e054: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
201e058: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
201e05c: 7f ff d4 03 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201e060: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e064: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201e068: 22 80 00 0a be,a 201e090 <rtems_rfs_file_open+0x1f0> <== NOT EXECUTED
201e06c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
201e070: 40 00 18 90 call 20242b0 <strerror> <== NOT EXECUTED
201e074: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201e078: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201e07c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201e080: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e084: 40 00 15 58 call 20235e4 <printf> <== NOT EXECUTED
201e088: 90 12 20 a0 or %o0, 0xa0, %o0 ! 2034ca0 <CSWTCH.1+0xd60> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
201e08c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201e090: 7f ff c8 2e call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201e094: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e098: 30 bf ff dd b,a 201e00c <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201e09c: 92 04 20 04 add %l0, 4, %o1 <== NOT EXECUTED
201e0a0: 7f ff f8 38 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201e0a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
if (!shared)
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
201e0a8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
201e0ac: c0 2c 20 04 clrb [ %l0 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
201e0b0: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
201e0b4: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
201e0b8: 7f ff 9e c8 call 2005bd8 <free> <== NOT EXECUTED
201e0bc: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
return ENOMEM;
201e0c0: 81 c7 e0 08 ret <== NOT EXECUTED
201e0c4: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
201e0c8: 84 10 20 01 mov 1, %g2
201e0cc: c4 27 20 08 st %g2, [ %i4 + 8 ]
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
201e0d0: f0 08 60 0c ldub [ %g1 + 0xc ], %i0
201e0d4: c8 08 60 0d ldub [ %g1 + 0xd ], %g4
201e0d8: c6 08 60 0f ldub [ %g1 + 0xf ], %g3
201e0dc: c4 08 60 0e ldub [ %g1 + 0xe ], %g2
201e0e0: b1 2e 20 18 sll %i0, 0x18, %i0
201e0e4: 89 29 20 10 sll %g4, 0x10, %g4
201e0e8: 85 28 a0 08 sll %g2, 8, %g2
201e0ec: 88 16 00 04 or %i0, %g4, %g4
201e0f0: 86 11 00 03 or %g4, %g3, %g3
201e0f4: 84 10 c0 02 or %g3, %g2, %g2
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
201e0f8: c4 27 20 84 st %g2, [ %i4 + 0x84 ]
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
201e0fc: c6 08 60 0b ldub [ %g1 + 0xb ], %g3
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
201e100: c4 08 60 0a ldub [ %g1 + 0xa ], %g2
201e104: 90 07 60 70 add %i5, 0x70, %o0
201e108: 85 28 a0 08 sll %g2, 8, %g2
201e10c: 84 10 c0 02 or %g3, %g2, %g2
201e110: c4 27 20 88 st %g2, [ %i4 + 0x88 ]
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
201e114: f0 08 60 10 ldub [ %g1 + 0x10 ], %i0
201e118: c8 08 60 11 ldub [ %g1 + 0x11 ], %g4
201e11c: c6 08 60 13 ldub [ %g1 + 0x13 ], %g3
201e120: c4 08 60 12 ldub [ %g1 + 0x12 ], %g2
201e124: b1 2e 20 18 sll %i0, 0x18, %i0
201e128: 89 29 20 10 sll %g4, 0x10, %g4
201e12c: 85 28 a0 08 sll %g2, 8, %g2
201e130: 88 16 00 04 or %i0, %g4, %g4
201e134: 86 11 00 03 or %g4, %g3, %g3
201e138: 84 10 c0 02 or %g3, %g2, %g2
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
201e13c: c4 27 20 8c st %g2, [ %i4 + 0x8c ]
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
201e140: f0 08 60 14 ldub [ %g1 + 0x14 ], %i0
201e144: c8 08 60 15 ldub [ %g1 + 0x15 ], %g4
201e148: c6 08 60 17 ldub [ %g1 + 0x17 ], %g3
201e14c: c4 08 60 16 ldub [ %g1 + 0x16 ], %g2
201e150: b1 2e 20 18 sll %i0, 0x18, %i0
201e154: 89 29 20 10 sll %g4, 0x10, %g4
201e158: 85 28 a0 08 sll %g2, 8, %g2
201e15c: 88 16 00 04 or %i0, %g4, %g4
201e160: 86 11 00 03 or %g4, %g3, %g3
201e164: 84 10 c0 02 or %g3, %g2, %g2
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
201e168: c4 27 20 90 st %g2, [ %i4 + 0x90 ]
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
201e16c: c8 08 60 18 ldub [ %g1 + 0x18 ], %g4
201e170: c6 08 60 19 ldub [ %g1 + 0x19 ], %g3
201e174: c4 08 60 1b ldub [ %g1 + 0x1b ], %g2
201e178: c2 08 60 1a ldub [ %g1 + 0x1a ], %g1
201e17c: 89 29 20 18 sll %g4, 0x18, %g4
201e180: 87 28 e0 10 sll %g3, 0x10, %g3
201e184: 83 28 60 08 sll %g1, 8, %g1
201e188: 86 11 00 03 or %g4, %g3, %g3
201e18c: 84 10 c0 02 or %g3, %g2, %g2
201e190: 82 10 80 01 or %g2, %g1, %g1
201e194: 92 10 00 1c mov %i4, %o1
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
201e198: c2 27 20 94 st %g1, [ %i4 + 0x94 ]
201e19c: 7f ff b3 7c call 200af8c <_Chain_Append>
201e1a0: fa 27 20 98 st %i5, [ %i4 + 0x98 ]
shared->fs = fs;
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
201e1a4: 92 10 00 11 mov %l1, %o1
201e1a8: 94 10 20 00 clr %o2
201e1ac: 7f ff c7 a8 call 201004c <rtems_rfs_inode_unload>
201e1b0: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
201e1b4: 90 10 20 08 mov 8, %o0
201e1b8: 7f ff d3 ac call 2013068 <rtems_rfs_trace>
201e1bc: 92 10 20 00 clr %o1
201e1c0: 80 8a 20 ff btst 0xff, %o0
201e1c4: 22 bf ff 64 be,a 201df54 <rtems_rfs_file_open+0xb4> <== ALWAYS TAKEN
201e1c8: f4 24 00 00 st %i2, [ %l0 ]
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
201e1cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201e1d0: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201e1d4: 40 00 15 04 call 20235e4 <printf> <== NOT EXECUTED
201e1d8: 90 12 20 d8 or %o0, 0xd8, %o0 ! 2034cd8 <CSWTCH.1+0xd98> <== NOT EXECUTED
}
handle->flags = flags;
201e1dc: 10 bf ff 5e b 201df54 <rtems_rfs_file_open+0xb4> <== NOT EXECUTED
201e1e0: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
0201ea40 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
201ea40: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201ea44: 90 10 20 20 mov 0x20, %o0
201ea48: 7f ff d1 88 call 2013068 <rtems_rfs_trace>
201ea4c: 92 10 20 00 clr %o1
201ea50: 80 8a 20 ff btst 0xff, %o0
201ea54: 32 80 00 1c bne,a 201eac4 <rtems_rfs_file_seek+0x84> <== NEVER TAKEN
201ea58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
201ea5c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
201ea60: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
201ea64: 7f ff f2 18 call 201b2c4 <rtems_rfs_block_get_size>
201ea68: 92 02 60 84 add %o1, 0x84, %o1
201ea6c: 80 a2 00 19 cmp %o0, %i1
201ea70: 38 80 00 0b bgu,a 201ea9c <rtems_rfs_file_seek+0x5c> <== NEVER TAKEN
201ea74: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
201ea78: 02 80 00 06 be 201ea90 <rtems_rfs_file_seek+0x50> <== ALWAYS TAKEN
201ea7c: 80 a2 40 1a cmp %o1, %i2
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
*new_pos = pos;
201ea80: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
201ea84: f4 26 e0 04 st %i2, [ %i3 + 4 ]
return 0;
}
201ea88: 81 c7 e0 08 ret
201ea8c: 91 e8 20 00 restore %g0, 0, %o0
* 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),
201ea90: 28 bf ff fd bleu,a 201ea84 <rtems_rfs_file_seek+0x44> <== ALWAYS TAKEN
201ea94: f2 26 c0 00 st %i1, [ %i3 ]
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
201ea98: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
201ea9c: 96 06 20 10 add %i0, 0x10, %o3 <== NOT EXECUTED
201eaa0: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
201eaa4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201eaa8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201eaac: 7f ff f1 d7 call 201b208 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
201eab0: b0 10 20 00 clr %i0 <== NOT EXECUTED
*new_pos = pos;
201eab4: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
201eab8: f4 26 e0 04 st %i2, [ %i3 + 4 ] <== NOT EXECUTED
return 0;
}
201eabc: 81 c7 e0 08 ret <== NOT EXECUTED
201eac0: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
201eac4: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201eac8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201eacc: 40 00 12 c6 call 20235e4 <printf> <== NOT EXECUTED
201ead0: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
201ead4: 10 bf ff e3 b 201ea60 <rtems_rfs_file_seek+0x20> <== NOT EXECUTED
201ead8: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
0201eadc <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
201eadc: 9d e3 bf 90 save %sp, -112, %sp
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
201eae0: e0 06 20 1c ld [ %i0 + 0x1c ], %l0
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201eae4: 90 10 20 20 mov 0x20, %o0
201eae8: 92 10 20 00 clr %o1
201eaec: 7f ff d1 5f call 2013068 <rtems_rfs_trace>
201eaf0: a6 10 00 1a mov %i2, %l3
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
201eaf4: b6 10 00 18 mov %i0, %i3
201eaf8: a4 10 00 19 mov %i1, %l2
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
201eafc: 80 8a 20 ff btst 0xff, %o0
201eb00: 12 80 00 7a bne 201ece8 <rtems_rfs_file_set_size+0x20c> <== NEVER TAKEN
201eb04: b4 04 20 34 add %l0, 0x34, %i2
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
201eb08: 80 94 80 13 orcc %l2, %l3, %g0
201eb0c: 32 80 00 0b bne,a 201eb38 <rtems_rfs_file_set_size+0x5c>
201eb10: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
201eb14: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
201eb18: 92 10 00 1a mov %i2, %o1
201eb1c: 7f ff f5 26 call 201bfb4 <rtems_rfs_block_map_free_all>
201eb20: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
if (rc > 0)
201eb24: b0 92 20 00 orcc %o0, 0, %i0
201eb28: 24 80 00 63 ble,a 201ecb4 <rtems_rfs_file_set_size+0x1d8><== ALWAYS TAKEN
201eb2c: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
return 0;
}
201eb30: 81 c7 e0 08 ret <== NOT EXECUTED
201eb34: 81 e8 00 00 restore <== NOT EXECUTED
201eb38: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
201eb3c: 7f ff f1 e2 call 201b2c4 <rtems_rfs_block_get_size>
201eb40: 92 02 60 84 add %o1, 0x84, %o1
size = rtems_rfs_file_size (handle);
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
201eb44: 80 a4 80 08 cmp %l2, %o0
201eb48: 02 80 00 58 be 201eca8 <rtems_rfs_file_set_size+0x1cc> <== ALWAYS TAKEN
201eb4c: 80 a4 c0 09 cmp %l3, %o1
{
if (size < new_size)
201eb50: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED
201eb54: 08 80 00 6c bleu 201ed04 <rtems_rfs_file_set_size+0x228> <== ALWAYS TAKEN
201eb58: 01 00 00 00 nop
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201eb5c: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
201eb60: ba a4 c0 09 subcc %l3, %o1, %i5
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201eb64: c2 04 60 98 ld [ %l1 + 0x98 ], %g1
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
201eb68: b8 64 80 08 subx %l2, %o0, %i4
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201eb6c: b2 10 00 11 mov %l1, %i1
read_block = false;
while (count)
201eb70: 80 97 00 1d orcc %i4, %i5, %g0
201eb74: 02 80 00 50 be 201ecb4 <rtems_rfs_file_set_size+0x1d8> <== NEVER TAKEN
201eb78: e4 00 60 08 ld [ %g1 + 8 ], %l2
201eb7c: a8 10 20 00 clr %l4
map->dirty = true;
201eb80: a6 10 20 01 mov 1, %l3
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
201eb84: 10 80 00 27 b 201ec20 <rtems_rfs_file_set_size+0x144>
201eb88: a2 06 e0 04 add %i3, 4, %l1
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
201eb8c: 80 a0 80 1d cmp %g2, %i5
201eb90: 28 80 00 44 bleu,a 201eca0 <rtems_rfs_file_set_size+0x1c4><== NEVER TAKEN
201eb94: c0 24 20 40 clr [ %l0 + 0x40 ] <== NOT EXECUTED
{
length = count + bpos.boff;
201eb98: a4 00 40 1d add %g1, %i5, %l2
201eb9c: e6 2c 20 34 stb %l3, [ %l0 + 0x34 ]
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
201eba0: e4 24 20 40 st %l2, [ %l0 + 0x40 ]
read_block = true;
201eba4: a8 10 20 01 mov 1, %l4
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
201eba8: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
201ebac: d4 07 bf fc ld [ %fp + -4 ], %o2
201ebb0: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
201ebb4: 92 10 00 11 mov %l1, %o1
201ebb8: 7f ff f5 ed call 201c36c <rtems_rfs_buffer_handle_request>
201ebbc: 96 0d 20 01 and %l4, 1, %o3
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
201ebc0: b0 92 20 00 orcc %o0, 0, %i0
201ebc4: 14 bf ff db bg 201eb30 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
201ebc8: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
201ebcc: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
memset (dst + bpos.boff, 0, length - bpos.boff);
201ebd0: d0 00 a0 24 ld [ %g2 + 0x24 ], %o0
201ebd4: 94 24 80 01 sub %l2, %g1, %o2
201ebd8: 92 10 20 00 clr %o1
201ebdc: 40 00 12 30 call 202349c <memset>
201ebe0: 90 02 00 01 add %o0, %g1, %o0
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
201ebe4: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
201ebe8: e6 2e e0 04 stb %l3, [ %i3 + 4 ]
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
201ebec: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
201ebf0: 7f ff f5 64 call 201c180 <rtems_rfs_buffer_handle_release>
201ebf4: 92 10 00 11 mov %l1, %o1
rtems_rfs_file_buffer (handle));
if (rc > 0)
201ebf8: b0 92 20 00 orcc %o0, 0, %i0
201ebfc: 14 bf ff cd bg 201eb30 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
201ec00: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
count -= length - bpos.boff;
201ec04: 82 24 80 01 sub %l2, %g1, %g1
201ec08: ba a7 40 01 subcc %i5, %g1, %i5
201ec0c: b8 67 20 00 subx %i4, 0, %i4
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
201ec10: 80 97 00 1d orcc %i4, %i5, %g0
201ec14: 22 80 00 28 be,a 201ecb4 <rtems_rfs_file_set_size+0x1d8> <== ALWAYS TAKEN
201ec18: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
201ec1c: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
201ec20: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
201ec24: c4 04 20 3c ld [ %l0 + 0x3c ], %g2
201ec28: c2 27 bf f4 st %g1, [ %fp + -12 ]
201ec2c: c4 27 bf f0 st %g2, [ %fp + -16 ]
201ec30: 80 a0 60 00 cmp %g1, 0
201ec34: 02 80 00 04 be 201ec44 <rtems_rfs_file_set_size+0x168>
201ec38: c0 27 bf f8 clr [ %fp + -8 ]
201ec3c: 84 00 bf ff add %g2, -1, %g2
201ec40: c4 27 bf f0 st %g2, [ %fp + -16 ]
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
201ec44: d0 06 60 98 ld [ %i1 + 0x98 ], %o0
201ec48: 92 10 00 1a mov %i2, %o1
201ec4c: 94 07 bf f0 add %fp, -16, %o2
201ec50: 7f ff f2 8c call 201b680 <rtems_rfs_block_map_find>
201ec54: 96 07 bf fc add %fp, -4, %o3
map, &bpos, &block);
if (rc > 0)
201ec58: b0 92 20 00 orcc %o0, 0, %i0
201ec5c: 04 80 00 0c ble 201ec8c <rtems_rfs_file_set_size+0x1b0>
201ec60: 80 a6 20 06 cmp %i0, 6
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
201ec64: 12 bf ff b3 bne 201eb30 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
201ec68: 92 10 00 1a mov %i2, %o1
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
201ec6c: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
201ec70: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
201ec74: 94 10 20 01 mov 1, %o2
201ec78: 7f ff f3 06 call 201b890 <rtems_rfs_block_map_grow>
201ec7c: 96 07 bf fc add %fp, -4, %o3
map, 1, &block);
if (rc > 0)
201ec80: b0 92 20 00 orcc %o0, 0, %i0
201ec84: 14 80 00 17 bg 201ece0 <rtems_rfs_file_set_size+0x204> <== NEVER TAKEN
201ec88: 01 00 00 00 nop
return rc;
}
if (count < (length - bpos.boff))
201ec8c: c2 07 bf f4 ld [ %fp + -12 ], %g1
201ec90: 80 a7 20 00 cmp %i4, 0
201ec94: 02 bf ff be be 201eb8c <rtems_rfs_file_set_size+0xb0> <== ALWAYS TAKEN
201ec98: 84 24 80 01 sub %l2, %g1, %g2
201ec9c: c0 24 20 40 clr [ %l0 + 0x40 ] <== NOT EXECUTED
map->dirty = true;
201eca0: 10 bf ff c2 b 201eba8 <rtems_rfs_file_set_size+0xcc> <== NOT EXECUTED
201eca4: e6 2c 20 34 stb %l3, [ %l0 + 0x34 ] <== NOT EXECUTED
size = rtems_rfs_file_size (handle);
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
201eca8: 12 bf ff ab bne 201eb54 <rtems_rfs_file_set_size+0x78>
201ecac: 80 a4 80 08 cmp %l2, %o0
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
201ecb0: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
201ecb4: f8 04 20 3c ld [ %l0 + 0x3c ], %i4
201ecb8: d2 04 20 40 ld [ %l0 + 0x40 ], %o1
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
201ecbc: c2 06 c0 00 ld [ %i3 ], %g1
rtems_rfs_file_bpos (handle));
}
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
201ecc0: f8 24 60 84 st %i4, [ %l1 + 0x84 ]
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
201ecc4: d2 24 60 88 st %o1, [ %l1 + 0x88 ]
if (rtems_rfs_file_update_mtime (handle))
201ecc8: 80 88 60 02 btst 2, %g1
201eccc: 12 bf ff 99 bne 201eb30 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
201ecd0: b0 10 20 00 clr %i0
handle->shared->mtime = time (NULL);
201ecd4: 40 00 1f a9 call 2026b78 <time>
201ecd8: 90 10 20 00 clr %o0
201ecdc: d0 24 60 90 st %o0, [ %l1 + 0x90 ]
return 0;
}
201ece0: 81 c7 e0 08 ret
201ece4: 81 e8 00 00 restore
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
201ece8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201ecec: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
201ecf0: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201ecf4: 40 00 12 3c call 20235e4 <printf> <== NOT EXECUTED
201ecf8: 90 12 23 58 or %o0, 0x358, %o0 ! 2034f58 <CSWTCH.1+0x1018><== NOT EXECUTED
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
201ecfc: 10 bf ff 84 b 201eb0c <rtems_rfs_file_set_size+0x30> <== NOT EXECUTED
201ed00: 80 94 80 13 orcc %l2, %l3, %g0 <== NOT EXECUTED
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
{
if (size < new_size)
201ed04: 32 80 00 06 bne,a 201ed1c <rtems_rfs_file_set_size+0x240><== NEVER TAKEN
201ed08: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
201ed0c: 80 a4 c0 09 cmp %l3, %o1
201ed10: 38 bf ff 94 bgu,a 201eb60 <rtems_rfs_file_set_size+0x84> <== ALWAYS TAKEN
201ed14: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
201ed18: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
201ed1c: f8 04 20 3c ld [ %l0 + 0x3c ], %i4 <== NOT EXECUTED
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
201ed20: e2 06 60 98 ld [ %i1 + 0x98 ], %l1 <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
201ed24: 92 84 ff ff addcc %l3, -1, %o1 <== NOT EXECUTED
201ed28: f4 04 60 08 ld [ %l1 + 8 ], %i2 <== NOT EXECUTED
201ed2c: 90 44 bf ff addx %l2, -1, %o0 <== NOT EXECUTED
201ed30: 94 10 20 00 clr %o2 <== NOT EXECUTED
201ed34: 40 00 45 61 call 20302b8 <__udivdi3> <== NOT EXECUTED
201ed38: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
201ed3c: 94 38 00 09 xnor %g0, %o1, %o2 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
201ed40: 94 82 80 1c addcc %o2, %i4, %o2 <== NOT EXECUTED
201ed44: 12 80 00 22 bne 201edcc <rtems_rfs_file_set_size+0x2f0> <== NOT EXECUTED
201ed48: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
201ed4c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
201ed50: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
201ed54: 94 10 20 00 clr %o2 <== NOT EXECUTED
201ed58: 40 00 46 2d call 203060c <__umoddi3> <== NOT EXECUTED
201ed5c: 96 10 00 1a mov %i2, %o3 <== 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;
201ed60: d2 24 20 40 st %o1, [ %l0 + 0x40 ] <== 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),
201ed64: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1 <== NOT EXECUTED
map->dirty = true;
201ed68: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201ed6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ed70: 02 80 00 0e be 201eda8 <rtems_rfs_file_set_size+0x2cc> <== NOT EXECUTED
201ed74: c4 2c 20 34 stb %g2, [ %l0 + 0x34 ] <== NOT EXECUTED
201ed78: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201ed7c: 12 80 00 0c bne 201edac <rtems_rfs_file_set_size+0x2d0> <== NOT EXECUTED
201ed80: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
201ed84: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
201ed88: d2 26 e0 14 st %o1, [ %i3 + 0x14 ] <== NOT EXECUTED
201ed8c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201ed90: 02 80 00 0d be 201edc4 <rtems_rfs_file_set_size+0x2e8> <== NOT EXECUTED
201ed94: c0 26 e0 18 clr [ %i3 + 0x18 ] <== NOT EXECUTED
201ed98: 82 07 3f ff add %i4, -1, %g1 <== NOT EXECUTED
201ed9c: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
201eda0: 10 bf ff c7 b 201ecbc <rtems_rfs_file_set_size+0x1e0> <== NOT EXECUTED
201eda4: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] <== 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),
201eda8: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
201edac: 3a bf ff f7 bcc,a 201ed88 <rtems_rfs_file_set_size+0x2ac><== NOT EXECUTED
201edb0: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
201edb4: 84 07 3f ff add %i4, -1, %g2 <== NOT EXECUTED
201edb8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201edbc: 22 80 00 0c be,a 201edec <rtems_rfs_file_set_size+0x310> <== NOT EXECUTED
201edc0: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
201edc4: 10 bf ff be b 201ecbc <rtems_rfs_file_set_size+0x1e0> <== NOT EXECUTED
201edc8: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
201edcc: 7f ff f3 a8 call 201bc6c <rtems_rfs_block_map_shrink> <== NOT EXECUTED
201edd0: 92 06 60 34 add %i1, 0x34, %o1 <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
201edd4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201edd8: 14 bf ff c2 bg 201ece0 <rtems_rfs_file_set_size+0x204> <== NOT EXECUTED
201eddc: 01 00 00 00 nop <== NOT EXECUTED
201ede0: f8 04 20 3c ld [ %l0 + 0x3c ], %i4 <== NOT EXECUTED
201ede4: 10 bf ff da b 201ed4c <rtems_rfs_file_set_size+0x270> <== NOT EXECUTED
201ede8: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
201edec: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
201edf0: 2a bf ff e6 bcs,a 201ed88 <rtems_rfs_file_set_size+0x2ac><== NOT EXECUTED
201edf4: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
201edf8: 10 bf ff b1 b 201ecbc <rtems_rfs_file_set_size+0x1e0> <== NOT EXECUTED
201edfc: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
0200e758 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
200e758: 9d e3 be c8 save %sp, -312, %sp
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
200e75c: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
200e760: 80 a0 60 00 cmp %g1, 0
200e764: 32 80 00 8b bne,a 200e990 <rtems_rfs_format+0x238> <== NEVER TAKEN
200e768: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
printf ("rtems-rfs: format: %s\n", name);
memset (&fs, 0, sizeof (rtems_rfs_file_system));
200e76c: 92 10 20 00 clr %o1
200e770: 94 10 20 80 mov 0x80, %o2
200e774: 40 00 53 4a call 202349c <memset>
200e778: 90 07 bf 2c add %fp, -212, %o0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e77c: 82 07 bf 70 add %fp, -144, %g1
200e780: c2 27 bf 6c st %g1, [ %fp + -148 ]
head->previous = NULL;
tail->previous = head;
200e784: 82 07 bf 6c add %fp, -148, %g1
200e788: c2 27 bf 74 st %g1, [ %fp + -140 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e78c: 82 07 bf 80 add %fp, -128, %g1
200e790: c2 27 bf 7c st %g1, [ %fp + -132 ]
head->previous = NULL;
tail->previous = head;
200e794: 82 07 bf 7c add %fp, -132, %g1
200e798: c2 27 bf 84 st %g1, [ %fp + -124 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e79c: 82 07 bf 90 add %fp, -112, %g1
200e7a0: c2 27 bf 8c st %g1, [ %fp + -116 ]
head->previous = NULL;
tail->previous = head;
200e7a4: 82 07 bf 8c add %fp, -116, %g1
200e7a8: c2 27 bf 94 st %g1, [ %fp + -108 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e7ac: 82 07 bf a0 add %fp, -96, %g1
200e7b0: c2 27 bf 9c st %g1, [ %fp + -100 ]
head->previous = NULL;
tail->previous = head;
200e7b4: 82 07 bf 9c add %fp, -100, %g1
200e7b8: c2 27 bf a4 st %g1, [ %fp + -92 ]
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
200e7bc: 82 10 20 05 mov 5, %g1
200e7c0: c2 27 bf 68 st %g1, [ %fp + -152 ]
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
200e7c4: 82 10 20 02 mov 2, %g1
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
200e7c8: 90 10 00 18 mov %i0, %o0
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
200e7cc: c2 27 bf 2c st %g1, [ %fp + -212 ]
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
200e7d0: 40 00 37 92 call 201c618 <rtems_rfs_buffer_open>
200e7d4: 92 07 bf 2c add %fp, -212, %o1
if (rc > 0)
200e7d8: ba 92 20 00 orcc %o0, 0, %i5
200e7dc: 14 80 03 5e bg 200f554 <rtems_rfs_format+0xdfc> <== NEVER TAKEN
200e7e0: c2 07 bf 38 ld [ %fp + -200 ], %g1
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
200e7e4: f8 00 60 24 ld [ %g1 + 0x24 ], %i4
200e7e8: 80 a7 20 00 cmp %i4, 0
200e7ec: 02 80 03 6c be 200f59c <rtems_rfs_format+0xe44> <== NEVER TAKEN
200e7f0: 92 10 20 00 clr %o1
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
200e7f4: fa 06 40 00 ld [ %i1 ], %i5
if (!fs->block_size)
200e7f8: 80 a7 60 00 cmp %i5, 0
200e7fc: 02 80 00 d8 be 200eb5c <rtems_rfs_format+0x404> <== NEVER TAKEN
200e800: fa 27 bf 34 st %i5, [ %fp + -204 ]
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
200e804: 90 10 00 1d mov %i5, %o0
200e808: 40 00 83 f4 call 202f7d8 <.urem>
200e80c: 92 10 00 1c mov %i4, %o1
200e810: 80 a2 20 00 cmp %o0, 0
200e814: 32 80 00 f7 bne,a 200ebf0 <rtems_rfs_format+0x498> <== NEVER TAKEN
200e818: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
200e81c: c2 06 60 04 ld [ %i1 + 4 ], %g1
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
200e820: bb 2f 60 03 sll %i5, 3, %i5
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
if (!fs->group_blocks)
200e824: 80 a0 60 00 cmp %g1, 0
200e828: 12 80 00 52 bne 200e970 <rtems_rfs_format+0x218> <== NEVER TAKEN
200e82c: c2 27 bf 50 st %g1, [ %fp + -176 ]
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
200e830: fa 27 bf 50 st %i5, [ %fp + -176 ]
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
200e834: 40 00 41 91 call 201ee78 <rtems_rfs_fs_media_size>
200e838: 90 07 bf 2c add %fp, -212, %o0
200e83c: fa 07 bf 34 ld [ %fp + -204 ], %i5
200e840: 94 10 20 00 clr %o2
200e844: 40 00 86 9d call 20302b8 <__udivdi3>
200e848: 96 10 00 1d mov %i5, %o3
200e84c: d2 27 bf 30 st %o1, [ %fp + -208 ]
200e850: b8 10 00 09 mov %o1, %i4
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200e854: b5 2f 60 03 sll %i5, 3, %i2
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200e858: 80 a2 60 00 cmp %o1, 0
200e85c: 02 80 00 06 be 200e874 <rtems_rfs_format+0x11c> <== NEVER TAKEN
200e860: a0 10 20 01 mov 1, %l0
return 1;
return ((dividend - 1) / divisor) + 1;
200e864: 90 02 7f ff add %o1, -1, %o0
200e868: 40 00 83 30 call 202f528 <.udiv>
200e86c: 92 10 00 1a mov %i2, %o1
200e870: a0 02 20 01 add %o0, 1, %l0
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
200e874: f6 06 60 08 ld [ %i1 + 8 ], %i3
if (!fs->group_inodes)
200e878: 80 a6 e0 00 cmp %i3, 0
200e87c: 02 80 01 43 be 200ed88 <rtems_rfs_format+0x630> <== ALWAYS TAKEN
200e880: e0 27 bf 4c st %l0, [ %fp + -180 ]
200e884: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200e888: 40 00 83 28 call 202f528 <.udiv> <== NOT EXECUTED
200e88c: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
200e890: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
200e894: d0 27 bf 58 st %o0, [ %fp + -168 ] <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200e898: 90 06 ff ff add %i3, -1, %o0 <== NOT EXECUTED
200e89c: 40 00 83 23 call 202f528 <.udiv>
200e8a0: 92 10 00 1c mov %i4, %o1
200e8a4: 90 02 20 01 inc %o0
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
200e8a8: 40 00 82 e6 call 202f440 <.umul>
200e8ac: 92 10 00 1c mov %i4, %o1
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
200e8b0: 80 a6 80 08 cmp %i2, %o0
200e8b4: 1a 80 00 03 bcc 200e8c0 <rtems_rfs_format+0x168> <== ALWAYS TAKEN
200e8b8: d0 27 bf 54 st %o0, [ %fp + -172 ]
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
200e8bc: f4 27 bf 54 st %i2, [ %fp + -172 ] <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
200e8c0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
if (!fs->max_name_length)
200e8c4: 80 a0 60 00 cmp %g1, 0
200e8c8: 12 80 00 04 bne 200e8d8 <rtems_rfs_format+0x180> <== NEVER TAKEN
200e8cc: c2 27 bf 44 st %g1, [ %fp + -188 ]
{
fs->max_name_length = 512;
200e8d0: 82 10 22 00 mov 0x200, %g1
200e8d4: c2 27 bf 44 st %g1, [ %fp + -188 ]
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
200e8d8: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
200e8dc: 80 a0 60 00 cmp %g1, 0
200e8e0: 12 80 00 cb bne 200ec0c <rtems_rfs_format+0x4b4> <== NEVER TAKEN
200e8e4: 01 00 00 00 nop
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
200e8e8: 92 10 00 1d mov %i5, %o1
200e8ec: 40 00 37 ee call 201c8a4 <rtems_rfs_buffer_setblksize>
200e8f0: 90 07 bf 2c add %fp, -212, %o0
if (rc > 0)
200e8f4: ba 92 20 00 orcc %o0, 0, %i5
200e8f8: 14 80 02 81 bg 200f2fc <rtems_rfs_format+0xba4> <== NEVER TAKEN
200e8fc: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200e900: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200e904: c0 27 bf f0 clr [ %fp + -16 ]
handle->buffer = NULL;
200e908: c0 27 bf f4 clr [ %fp + -12 ]
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
200e90c: 90 07 bf 2c add %fp, -212, %o0
200e910: 94 10 20 00 clr %o2
200e914: 40 00 36 96 call 201c36c <rtems_rfs_buffer_handle_request>
200e918: 96 10 20 00 clr %o3
if (rc > 0)
200e91c: ba 92 20 00 orcc %o0, 0, %i5
200e920: 04 80 00 21 ble 200e9a4 <rtems_rfs_format+0x24c> <== ALWAYS TAKEN
200e924: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200e928: 40 00 36 16 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200e92c: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
200e930: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200e934: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200e938: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200e93c: 40 00 56 5d call 20242b0 <strerror> <== NOT EXECUTED
200e940: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200e944: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200e948: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200e94c: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200e950: 40 00 53 25 call 20235e4 <printf> <== NOT EXECUTED
200e954: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 20329d8 <ramdisk_ops+0x314><== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200e958: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
return -1;
200e95c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200e960: 40 00 53 62 call 20236e8 <puts> <== NOT EXECUTED
200e964: 90 12 22 50 or %o0, 0x250, %o0 <== NOT EXECUTED
return -1;
200e968: 81 c7 e0 08 ret <== NOT EXECUTED
200e96c: 81 e8 00 00 restore <== NOT EXECUTED
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
200e970: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
200e974: 08 bf ff b0 bleu 200e834 <rtems_rfs_format+0xdc> <== NOT EXECUTED
200e978: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
200e97c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
{
printf ("group block count is higher than bits in block\n");
200e980: 40 00 53 5a call 20236e8 <puts> <== NOT EXECUTED
200e984: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED
200e988: 81 c7 e0 08 ret <== NOT EXECUTED
200e98c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
200e990: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
200e994: 40 00 53 14 call 20235e4 <printf> <== NOT EXECUTED
200e998: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20326e0 <ramdisk_ops+0x1c><== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
200e99c: 10 bf ff 75 b 200e770 <rtems_rfs_format+0x18> <== NOT EXECUTED
200e9a0: 92 10 20 00 clr %o1 <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
200e9a4: c2 07 bf f4 ld [ %fp + -12 ], %g1
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
200e9a8: d4 07 bf 34 ld [ %fp + -204 ], %o2
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
200e9ac: fa 00 60 24 ld [ %g1 + 0x24 ], %i5
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
200e9b0: 92 10 20 ff mov 0xff, %o1
200e9b4: 40 00 52 ba call 202349c <memset>
200e9b8: 90 10 00 1d mov %i5, %o0
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
200e9bc: 84 10 20 28 mov 0x28, %g2
200e9c0: c4 2f 40 00 stb %g2, [ %i5 ]
200e9c4: 84 10 20 09 mov 9, %g2
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
200e9c8: c0 2f 60 04 clrb [ %i5 + 4 ]
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
200e9cc: c4 2f 60 01 stb %g2, [ %i5 + 1 ]
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
200e9d0: c0 2f 60 05 clrb [ %i5 + 5 ]
200e9d4: c0 2f 60 06 clrb [ %i5 + 6 ]
200e9d8: c0 2f 60 07 clrb [ %i5 + 7 ]
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
200e9dc: 82 10 20 01 mov 1, %g1
200e9e0: 84 10 20 20 mov 0x20, %g2
200e9e4: c2 2f 60 03 stb %g1, [ %i5 + 3 ]
200e9e8: c4 2f 60 02 stb %g2, [ %i5 + 2 ]
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200e9ec: c6 0f bf 34 ldub [ %fp + -204 ], %g3
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200e9f0: c4 07 bf 30 ld [ %fp + -208 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200e9f4: c6 2f 60 08 stb %g3, [ %i5 + 8 ]
200e9f8: c6 17 bf 34 lduh [ %fp + -204 ], %g3
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200e9fc: c4 2f 60 0f stb %g2, [ %i5 + 0xf ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200ea00: c6 2f 60 09 stb %g3, [ %i5 + 9 ]
200ea04: c8 07 bf 34 ld [ %fp + -204 ], %g4
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200ea08: 87 30 a0 18 srl %g2, 0x18, %g3
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200ea0c: 89 31 20 08 srl %g4, 8, %g4
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200ea10: c6 2f 60 0c stb %g3, [ %i5 + 0xc ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200ea14: c8 2f 60 0a stb %g4, [ %i5 + 0xa ]
200ea18: c6 07 bf 34 ld [ %fp + -204 ], %g3
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
200ea1c: 90 07 bf 2c add %fp, -212, %o0
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200ea20: c6 2f 60 0b stb %g3, [ %i5 + 0xb ]
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200ea24: 87 30 a0 10 srl %g2, 0x10, %g3
200ea28: 85 30 a0 08 srl %g2, 8, %g2
200ea2c: c6 2f 60 0d stb %g3, [ %i5 + 0xd ]
200ea30: c4 2f 60 0e stb %g2, [ %i5 + 0xe ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
200ea34: c4 0f bf 40 ldub [ %fp + -192 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
200ea38: 92 07 bf ec add %fp, -20, %o1
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
200ea3c: c4 2f 60 10 stb %g2, [ %i5 + 0x10 ]
200ea40: c4 17 bf 40 lduh [ %fp + -192 ], %g2
200ea44: c4 2f 60 11 stb %g2, [ %i5 + 0x11 ]
200ea48: c4 07 bf 40 ld [ %fp + -192 ], %g2
200ea4c: 85 30 a0 08 srl %g2, 8, %g2
200ea50: c4 2f 60 12 stb %g2, [ %i5 + 0x12 ]
200ea54: c4 07 bf 40 ld [ %fp + -192 ], %g2
200ea58: c4 2f 60 13 stb %g2, [ %i5 + 0x13 ]
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
200ea5c: c4 0f bf 44 ldub [ %fp + -188 ], %g2
200ea60: c4 2f 60 14 stb %g2, [ %i5 + 0x14 ]
200ea64: c4 17 bf 44 lduh [ %fp + -188 ], %g2
200ea68: c4 2f 60 15 stb %g2, [ %i5 + 0x15 ]
200ea6c: c4 07 bf 44 ld [ %fp + -188 ], %g2
200ea70: 85 30 a0 08 srl %g2, 8, %g2
200ea74: c4 2f 60 16 stb %g2, [ %i5 + 0x16 ]
200ea78: c4 07 bf 44 ld [ %fp + -188 ], %g2
200ea7c: c4 2f 60 17 stb %g2, [ %i5 + 0x17 ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
200ea80: c4 0f bf 4c ldub [ %fp + -180 ], %g2
200ea84: c4 2f 60 18 stb %g2, [ %i5 + 0x18 ]
200ea88: c4 17 bf 4c lduh [ %fp + -180 ], %g2
200ea8c: c4 2f 60 19 stb %g2, [ %i5 + 0x19 ]
200ea90: c4 07 bf 4c ld [ %fp + -180 ], %g2
200ea94: 85 30 a0 08 srl %g2, 8, %g2
200ea98: c4 2f 60 1a stb %g2, [ %i5 + 0x1a ]
200ea9c: c4 07 bf 4c ld [ %fp + -180 ], %g2
200eaa0: c4 2f 60 1b stb %g2, [ %i5 + 0x1b ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
200eaa4: c4 0f bf 50 ldub [ %fp + -176 ], %g2
200eaa8: c4 2f 60 1c stb %g2, [ %i5 + 0x1c ]
200eaac: c4 17 bf 50 lduh [ %fp + -176 ], %g2
200eab0: c4 2f 60 1d stb %g2, [ %i5 + 0x1d ]
200eab4: c4 07 bf 50 ld [ %fp + -176 ], %g2
200eab8: 85 30 a0 08 srl %g2, 8, %g2
200eabc: c4 2f 60 1e stb %g2, [ %i5 + 0x1e ]
200eac0: c4 07 bf 50 ld [ %fp + -176 ], %g2
200eac4: c4 2f 60 1f stb %g2, [ %i5 + 0x1f ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
200eac8: c4 0f bf 54 ldub [ %fp + -172 ], %g2
200eacc: c4 2f 60 20 stb %g2, [ %i5 + 0x20 ]
200ead0: c4 17 bf 54 lduh [ %fp + -172 ], %g2
200ead4: c4 2f 60 21 stb %g2, [ %i5 + 0x21 ]
200ead8: c4 07 bf 54 ld [ %fp + -172 ], %g2
200eadc: 85 30 a0 08 srl %g2, 8, %g2
200eae0: c4 2f 60 22 stb %g2, [ %i5 + 0x22 ]
200eae4: c4 07 bf 54 ld [ %fp + -172 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
200eae8: c0 2f 60 24 clrb [ %i5 + 0x24 ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
200eaec: c4 2f 60 23 stb %g2, [ %i5 + 0x23 ]
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
200eaf0: c0 2f 60 25 clrb [ %i5 + 0x25 ]
200eaf4: c0 2f 60 26 clrb [ %i5 + 0x26 ]
200eaf8: 84 10 20 38 mov 0x38, %g2
200eafc: c4 2f 60 27 stb %g2, [ %i5 + 0x27 ]
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
200eb00: 40 00 35 a0 call 201c180 <rtems_rfs_buffer_handle_release>
200eb04: c2 2f bf ec stb %g1, [ %fp + -20 ]
if (rc > 0)
200eb08: ba 92 20 00 orcc %o0, 0, %i5
200eb0c: 04 80 00 f0 ble 200eecc <rtems_rfs_format+0x774> <== ALWAYS TAKEN
200eb10: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200eb14: 40 00 35 9b call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200eb18: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
200eb1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200eb20: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200eb24: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200eb28: 40 00 55 e2 call 20242b0 <strerror> <== NOT EXECUTED
200eb2c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200eb30: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200eb34: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200eb38: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200eb3c: 40 00 52 aa call 20235e4 <printf> <== NOT EXECUTED
200eb40: 90 12 22 10 or %o0, 0x210, %o0 ! 2032a10 <ramdisk_ops+0x34c><== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200eb44: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
return -1;
200eb48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200eb4c: 40 00 52 e7 call 20236e8 <puts> <== NOT EXECUTED
200eb50: 90 12 22 50 or %o0, 0x250, %o0 <== NOT EXECUTED
return -1;
200eb54: 81 c7 e0 08 ret <== NOT EXECUTED
200eb58: 81 e8 00 00 restore <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
200eb5c: 40 00 40 c7 call 201ee78 <rtems_rfs_fs_media_size> <== NOT EXECUTED
200eb60: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
if (total_size >= GIGS (1))
200eb64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200eb68: 22 80 00 a3 be,a 200edf4 <rtems_rfs_format+0x69c> <== NOT EXECUTED
200eb6c: 03 00 03 ff sethi %hi(0xffc00), %g1 <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200eb70: 84 10 20 00 clr %g2 <== NOT EXECUTED
200eb74: 07 00 04 00 sethi %hi(0x100000), %g3 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
200eb78: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200eb7c: 92 82 40 03 addcc %o1, %g3, %o1 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
200eb80: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200eb84: 90 42 00 02 addx %o0, %g2, %o0 <== NOT EXECUTED
200eb88: 85 32 60 14 srl %o1, 0x14, %g2 <== NOT EXECUTED
200eb8c: 89 2a 20 0c sll %o0, 0xc, %g4 <== NOT EXECUTED
200eb90: 10 80 00 04 b 200eba0 <rtems_rfs_format+0x448> <== NOT EXECUTED
200eb94: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
200eb98: 02 80 00 06 be 200ebb0 <rtems_rfs_format+0x458> <== NOT EXECUTED
200eb9c: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
200eba0: bb 28 c0 01 sll %g3, %g1, %i5 <== NOT EXECUTED
200eba4: 80 8f 40 02 btst %i5, %g2 <== NOT EXECUTED
200eba8: 02 bf ff fc be 200eb98 <rtems_rfs_format+0x440> <== NOT EXECUTED
200ebac: 82 80 7f ff addcc %g1, -1, %g1 <== NOT EXECUTED
break;
fs->block_size = 1 << b;
200ebb0: fa 27 bf 34 st %i5, [ %fp + -204 ] <== NOT EXECUTED
}
if (fs->block_size < 512)
200ebb4: 80 a7 61 ff cmp %i5, 0x1ff <== NOT EXECUTED
200ebb8: 18 80 01 c7 bgu 200f2d4 <rtems_rfs_format+0xb7c> <== NOT EXECUTED
200ebbc: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED
fs->block_size = 512;
200ebc0: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
200ebc4: ba 10 22 00 mov 0x200, %i5 <== NOT EXECUTED
200ebc8: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED
200ebcc: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
200ebd0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
break;
fs->block_size = 1 << b;
}
if (fs->block_size < 512)
fs->block_size = 512;
200ebd4: c2 27 bf 34 st %g1, [ %fp + -204 ] <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
200ebd8: 40 00 83 00 call 202f7d8 <.urem> <== NOT EXECUTED
200ebdc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200ebe0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200ebe4: 22 bf ff 0f be,a 200e820 <rtems_rfs_format+0xc8> <== NOT EXECUTED
200ebe8: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
200ebec: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200ebf0: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
200ebf4: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200ebf8: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED
200ebfc: 40 00 52 7a call 20235e4 <printf> <== NOT EXECUTED
200ec00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200ec04: 81 c7 e0 08 ret <== NOT EXECUTED
200ec08: 81 e8 00 00 restore <== NOT EXECUTED
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
200ec0c: 40 00 40 9b call 201ee78 <rtems_rfs_fs_media_size> <== NOT EXECUTED
200ec10: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
200ec14: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
200ec18: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200ec1c: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
200ec20: 40 00 52 71 call 20235e4 <printf> <== NOT EXECUTED
200ec24: 90 12 23 c0 or %o0, 0x3c0, %o0 ! 20327c0 <ramdisk_ops+0xfc><== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
200ec28: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
200ec2c: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
200ec30: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
200ec34: 40 00 52 6c call 20235e4 <printf> <== NOT EXECUTED
200ec38: 90 12 23 e8 or %o0, 0x3e8, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
rtems_rfs_fs_media_block_size (&fs));
200ec3c: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
200ec40: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ec44: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
200ec48: 40 00 52 67 call 20235e4 <printf> <== NOT EXECUTED
200ec4c: 90 12 20 10 or %o0, 0x10, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
200ec50: 40 00 40 81 call 201ee54 <rtems_rfs_fs_size> <== NOT EXECUTED
200ec54: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
200ec58: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
200ec5c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200ec60: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ec64: 40 00 52 60 call 20235e4 <printf> <== NOT EXECUTED
200ec68: 90 12 20 40 or %o0, 0x40, %o0 ! 2032840 <ramdisk_ops+0x17c><== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
200ec6c: d2 07 bf 30 ld [ %fp + -208 ], %o1 <== NOT EXECUTED
200ec70: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ec74: 40 00 52 5c call 20235e4 <printf> <== NOT EXECUTED
200ec78: 90 12 20 60 or %o0, 0x60, %o0 ! 2032860 <ramdisk_ops+0x19c><== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
200ec7c: d2 07 bf 34 ld [ %fp + -204 ], %o1 <== NOT EXECUTED
200ec80: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ec84: 40 00 52 58 call 20235e4 <printf> <== NOT EXECUTED
200ec88: 90 12 20 88 or %o0, 0x88, %o0 ! 2032888 <ramdisk_ops+0x1c4><== 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));
200ec8c: d2 07 bf 34 ld [ %fp + -204 ], %o1 <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
200ec90: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ec94: 93 2a 60 03 sll %o1, 3, %o1 <== NOT EXECUTED
200ec98: 40 00 52 53 call 20235e4 <printf> <== NOT EXECUTED
200ec9c: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
200eca0: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
200eca4: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200eca8: 40 00 52 4f call 20235e4 <printf> <== NOT EXECUTED
200ecac: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20328d8 <ramdisk_ops+0x214><== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200ecb0: d2 07 bf 4c ld [ %fp + -180 ], %o1 <== NOT EXECUTED
fs.group_inodes * fs.group_count,
200ecb4: f8 07 bf 54 ld [ %fp + -172 ], %i4 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200ecb8: 40 00 81 e2 call 202f440 <.umul> <== NOT EXECUTED
200ecbc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
200ecc0: 83 2f 20 03 sll %i4, 3, %g1 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200ecc4: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
200ecc8: b9 2f 20 06 sll %i4, 6, %i4 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
200eccc: f4 07 bf 34 ld [ %fp + -204 ], %i2 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ecd0: a0 a7 00 01 subcc %i4, %g1, %l0 <== NOT EXECUTED
200ecd4: 12 80 00 4e bne 200ee0c <rtems_rfs_format+0x6b4> <== NOT EXECUTED
200ecd8: 90 10 27 d0 mov 0x7d0, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ecdc: f6 07 bf 30 ld [ %fp + -208 ], %i3 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200ece0: b9 2e a0 03 sll %i2, 3, %i4 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ece4: b6 06 ff ff add %i3, -1, %i3 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200ece8: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ecec: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
200ecf0: 08 80 00 03 bleu 200ecfc <rtems_rfs_format+0x5a4> <== NOT EXECUTED
200ecf4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
200ecf8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
200ecfc: 40 00 82 0d call 202f530 <.div> <== NOT EXECUTED
200ed00: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200ed04: 40 00 82 0b call 202f530 <.div> <== NOT EXECUTED
200ed08: 92 10 20 0a mov 0xa, %o1 ! a <PROM_START+0xa> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ed0c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200ed10: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ed14: 12 80 00 50 bne 200ee54 <rtems_rfs_format+0x6fc> <== NOT EXECUTED
200ed18: 90 10 27 d0 mov 0x7d0, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ed1c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
200ed20: 38 80 00 02 bgu,a 200ed28 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
200ed24: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
200ed28: 40 00 82 02 call 202f530 <.div> <== NOT EXECUTED
200ed2c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200ed30: 40 00 82 ac call 202f7e0 <.rem> <== NOT EXECUTED
200ed34: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
200ed38: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
200ed3c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200ed40: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200ed44: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ed48: 40 00 52 27 call 20235e4 <printf> <== NOT EXECUTED
200ed4c: 90 12 21 00 or %o0, 0x100, %o0 ! 2032900 <ramdisk_ops+0x23c><== 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);
200ed50: d2 07 bf 4c ld [ %fp + -180 ], %o1 <== NOT EXECUTED
200ed54: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ed58: 40 00 52 23 call 20235e4 <printf> <== NOT EXECUTED
200ed5c: 90 12 21 30 or %o0, 0x130, %o0 ! 2032930 <ramdisk_ops+0x26c><== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
200ed60: d2 07 bf 50 ld [ %fp + -176 ], %o1 <== NOT EXECUTED
200ed64: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ed68: 40 00 52 1f call 20235e4 <printf> <== NOT EXECUTED
200ed6c: 90 12 21 50 or %o0, 0x150, %o0 ! 2032950 <ramdisk_ops+0x28c><== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
200ed70: d2 07 bf 54 ld [ %fp + -172 ], %o1 <== NOT EXECUTED
200ed74: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200ed78: 40 00 52 1b call 20235e4 <printf> <== NOT EXECUTED
200ed7c: 90 12 21 78 or %o0, 0x178, %o0 ! 2032978 <ramdisk_ops+0x2b4><== NOT EXECUTED
200ed80: 10 bf fe da b 200e8e8 <rtems_rfs_format+0x190> <== NOT EXECUTED
200ed84: fa 07 bf 34 ld [ %fp + -204 ], %i5 <== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
200ed88: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200ed8c: 80 a0 60 00 cmp %g1, 0
200ed90: 02 80 00 03 be 200ed9c <rtems_rfs_format+0x644> <== ALWAYS TAKEN
200ed94: 90 10 20 01 mov 1, %o0
200ed98: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
200ed9c: 40 00 81 a9 call 202f440 <.umul>
200eda0: 92 07 3f ff add %i4, -1, %o1
200eda4: 92 10 20 64 mov 0x64, %o1
200eda8: 40 00 81 e0 call 202f528 <.udiv>
200edac: b6 10 20 01 mov 1, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200edb0: 80 a2 20 00 cmp %o0, 0
200edb4: 32 80 00 35 bne,a 200ee88 <rtems_rfs_format+0x730> <== ALWAYS TAKEN
200edb8: 92 10 00 10 mov %l0, %o1
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200edbc: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
200edc0: 40 00 81 da call 202f528 <.udiv> <== NOT EXECUTED
200edc4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200edc8: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
200edcc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200edd0: 40 00 81 9c call 202f440 <.umul> <== NOT EXECUTED
200edd4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
200edd8: f8 27 bf 58 st %i4, [ %fp + -168 ] <== NOT EXECUTED
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200eddc: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ede0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
200ede4: 02 bf fe b1 be 200e8a8 <rtems_rfs_format+0x150> <== NOT EXECUTED
200ede8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
200edec: 10 bf fe ac b 200e89c <rtems_rfs_format+0x144> <== NOT EXECUTED
200edf0: 90 06 ff ff add %i3, -1, %o0 <== NOT EXECUTED
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
200edf4: 82 10 63 ff or %g1, 0x3ff, %g1 <== NOT EXECUTED
200edf8: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
200edfc: 08 bf ff 6e bleu 200ebb4 <rtems_rfs_format+0x45c> <== NOT EXECUTED
200ee00: fa 07 bf 34 ld [ %fp + -204 ], %i5 <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200ee04: 10 bf ff 5c b 200eb74 <rtems_rfs_format+0x41c> <== NOT EXECUTED
200ee08: 84 10 20 00 clr %g2 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200ee0c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200ee10: 40 00 81 c6 call 202f528 <.udiv> <== NOT EXECUTED
200ee14: 90 04 3f ff add %l0, -1, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ee18: f6 07 bf 30 ld [ %fp + -208 ], %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ee1c: 90 02 20 02 add %o0, 2, %o0 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200ee20: b9 2e a0 03 sll %i2, 3, %i4 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ee24: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
200ee28: 85 2a 20 07 sll %o0, 7, %g2 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ee2c: b6 06 ff ff add %i3, -1, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ee30: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200ee34: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ee38: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
200ee3c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ee40: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
200ee44: 08 bf ff ae bleu 200ecfc <rtems_rfs_format+0x5a4> <== NOT EXECUTED
200ee48: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
200ee4c: 10 bf ff ac b 200ecfc <rtems_rfs_format+0x5a4> <== NOT EXECUTED
200ee50: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200ee54: 90 04 3f ff add %l0, -1, %o0 <== NOT EXECUTED
200ee58: 40 00 81 b4 call 202f528 <.udiv> <== NOT EXECUTED
200ee5c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ee60: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ee64: 90 02 20 02 add %o0, 2, %o0 <== NOT EXECUTED
200ee68: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
200ee6c: 85 2a 20 07 sll %o0, 7, %g2 <== NOT EXECUTED
200ee70: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
200ee74: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200ee78: 08 bf ff ac bleu 200ed28 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
200ee7c: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
200ee80: 10 bf ff aa b 200ed28 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
200ee84: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200ee88: 40 00 81 a8 call 202f528 <.udiv>
200ee8c: 90 02 3f ff add %o0, -1, %o0
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200ee90: 92 10 20 38 mov 0x38, %o1
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200ee94: b6 02 20 01 add %o0, 1, %i3
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200ee98: 40 00 81 a4 call 202f528 <.udiv>
200ee9c: 90 10 00 1d mov %i5, %o0
200eea0: b8 10 00 08 mov %o0, %i4
200eea4: 90 10 00 1b mov %i3, %o0
200eea8: 40 00 81 66 call 202f440 <.umul>
200eeac: 92 10 00 1c mov %i4, %o1
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
200eeb0: f8 27 bf 58 st %i4, [ %fp + -168 ]
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200eeb4: b6 10 00 08 mov %o0, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200eeb8: 80 a6 e0 00 cmp %i3, 0
200eebc: 02 bf fe 7b be 200e8a8 <rtems_rfs_format+0x150> <== NEVER TAKEN
200eec0: 90 10 20 01 mov 1, %o0
return 1;
return ((dividend - 1) / divisor) + 1;
200eec4: 10 bf fe 76 b 200e89c <rtems_rfs_format+0x144>
200eec8: 90 06 ff ff add %i3, -1, %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200eecc: 90 07 bf 2c add %fp, -212, %o0
200eed0: 40 00 34 ac call 201c180 <rtems_rfs_buffer_handle_release>
200eed4: 92 07 bf ec add %fp, -20, %o1
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
200eed8: c2 07 bf 4c ld [ %fp + -180 ], %g1
handle->dirty = false;
200eedc: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200eee0: c0 27 bf f0 clr [ %fp + -16 ]
200eee4: 80 a0 60 00 cmp %g1, 0
200eee8: 04 80 00 96 ble 200f140 <rtems_rfs_format+0x9e8> <== NEVER TAKEN
200eeec: c0 27 bf f4 clr [ %fp + -12 ]
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200eef0: c2 07 bf 30 ld [ %fp + -208 ], %g1
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
200eef4: e2 0e 60 14 ldub [ %i1 + 0x14 ], %l1
200eef8: e4 0e 60 15 ldub [ %i1 + 0x15 ], %l2
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200eefc: 80 a0 60 00 cmp %g1, 0
200ef00: 02 80 01 c9 be 200f624 <rtems_rfs_format+0xecc> <== NEVER TAKEN
200ef04: fa 07 bf 50 ld [ %fp + -176 ], %i5
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
200ef08: 29 00 80 ca sethi %hi(0x2032800), %l4
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
200ef0c: 27 00 80 ca sethi %hi(0x2032800), %l3
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
200ef10: 2d 00 80 ca sethi %hi(0x2032800), %l6
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200ef14: b8 10 20 01 mov 1, %i4
200ef18: b4 10 20 00 clr %i2
200ef1c: b6 10 20 00 clr %i3
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
200ef20: a8 15 22 c0 or %l4, 0x2c0, %l4
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
200ef24: a6 14 e2 f8 or %l3, 0x2f8, %l3
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
200ef28: aa 10 20 01 mov 1, %l5
if (verbose)
printf (", inodes");
200ef2c: ac 15 a3 e8 or %l6, 0x3e8, %l6
/*
* Be nice to strange sizes of disks. These are embedded systems after all
* and nice numbers do not always work out. Let the last block pick up the
* remainder of the blocks.
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
200ef30: 84 07 40 1c add %i5, %i4, %g2
200ef34: 80 a0 40 02 cmp %g1, %g2
200ef38: 2a 80 00 02 bcs,a 200ef40 <rtems_rfs_format+0x7e8> <== ALWAYS TAKEN
200ef3c: ba 20 40 1c sub %g1, %i4, %i5
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
200ef40: a4 8c a0 ff andcc %l2, 0xff, %l2
200ef44: 12 80 00 3b bne 200f030 <rtems_rfs_format+0x8d8> <== NEVER TAKEN
200ef48: 90 10 00 14 mov %l4, %o0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200ef4c: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200ef50: c0 27 bf f0 clr [ %fp + -16 ]
handle->buffer = NULL;
200ef54: c0 27 bf f4 clr [ %fp + -12 ]
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
200ef58: 90 07 bf d4 add %fp, -44, %o0
200ef5c: 92 07 bf 2c add %fp, -212, %o1
200ef60: 94 07 bf ec add %fp, -20, %o2
200ef64: 96 10 00 1d mov %i5, %o3
200ef68: 40 00 2f e0 call 201aee8 <rtems_rfs_bitmap_open>
200ef6c: 98 10 00 1c mov %i4, %o4
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
200ef70: a0 92 20 00 orcc %o0, 0, %l0
200ef74: 04 80 00 12 ble 200efbc <rtems_rfs_format+0x864> <== ALWAYS TAKEN
200ef78: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200ef7c: 40 00 34 81 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200ef80: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
200ef84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
200ef88: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200ef8c: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200ef90: 40 00 54 c8 call 20242b0 <strerror> <== NOT EXECUTED
200ef94: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200ef98: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200ef9c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200efa0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200efa4: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200efa8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
200efac: 40 00 51 8e call 20235e4 <printf> <== NOT EXECUTED
200efb0: 90 12 23 08 or %o0, 0x308, %o0 <== NOT EXECUTED
200efb4: 81 c7 e0 08 ret <== NOT EXECUTED
200efb8: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
200efbc: c2 07 bf f4 ld [ %fp + -12 ], %g1
200efc0: d4 07 bf 34 ld [ %fp + -204 ], %o2
200efc4: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
200efc8: 40 00 51 35 call 202349c <memset>
200efcc: 92 10 20 ff mov 0xff, %o1
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
200efd0: 40 00 2f 1d call 201ac44 <rtems_rfs_bitmap_map_clear_all>
200efd4: 90 07 bf d4 add %fp, -44, %o0
if (rc > 0)
200efd8: a0 92 20 00 orcc %o0, 0, %l0
200efdc: 04 80 00 20 ble 200f05c <rtems_rfs_format+0x904> <== ALWAYS TAKEN
200efe0: 92 10 20 00 clr %o1
{
rtems_rfs_bitmap_close (&bitmap);
200efe4: 40 00 2f d2 call 201af2c <rtems_rfs_bitmap_close> <== NOT EXECUTED
200efe8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200efec: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200eff0: 40 00 34 64 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200eff4: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
200eff8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
200effc: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f000: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f004: 40 00 54 ab call 20242b0 <strerror> <== NOT EXECUTED
200f008: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f00c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f010: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200f014: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200f018: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200f01c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
if (rc > 0)
{
rtems_rfs_bitmap_close (&bitmap);
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
200f020: 40 00 51 71 call 20235e4 <printf> <== NOT EXECUTED
200f024: 90 12 23 50 or %o0, 0x350, %o0 <== NOT EXECUTED
200f028: 81 c7 e0 08 ret <== NOT EXECUTED
200f02c: 81 e8 00 00 restore <== NOT EXECUTED
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
200f030: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f034: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200f038: 40 00 51 6b call 20235e4 <printf> <== NOT EXECUTED
200f03c: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
200f040: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200f044: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f048: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f04c: 40 00 51 66 call 20235e4 <printf> <== NOT EXECUTED
200f050: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
200f054: 10 bf ff c2 b 200ef5c <rtems_rfs_format+0x804> <== NOT EXECUTED
200f058: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
200f05c: 40 00 2e 72 call 201aa24 <rtems_rfs_bitmap_map_set>
200f060: 90 07 bf d4 add %fp, -44, %o0
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
200f064: 92 10 20 01 mov 1, %o1
200f068: 40 00 2e 6f call 201aa24 <rtems_rfs_bitmap_map_set>
200f06c: 90 07 bf d4 add %fp, -44, %o0
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
200f070: d0 07 bf 54 ld [ %fp + -172 ], %o0
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200f074: 80 a2 20 00 cmp %o0, 0
200f078: 12 80 00 2b bne 200f124 <rtems_rfs_format+0x9cc> <== ALWAYS TAKEN
200f07c: d2 07 bf 58 ld [ %fp + -168 ], %o1
return 1;
200f080: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
200f084: ae 10 20 00 clr %l7 <== NOT EXECUTED
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
200f088: 92 05 e0 02 add %l7, 2, %o1
200f08c: 40 00 2e 66 call 201aa24 <rtems_rfs_bitmap_map_set>
200f090: 90 07 bf d4 add %fp, -44, %o0
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
200f094: ae 05 e0 01 inc %l7
200f098: 80 a4 00 17 cmp %l0, %l7
200f09c: 14 bf ff fc bg 200f08c <rtems_rfs_format+0x934>
200f0a0: 92 05 e0 02 add %l7, 2, %o1
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
200f0a4: 40 00 2f a2 call 201af2c <rtems_rfs_bitmap_close>
200f0a8: 90 07 bf d4 add %fp, -44, %o0
if (rc > 0)
200f0ac: ae 92 20 00 orcc %o0, 0, %l7
200f0b0: 14 80 00 44 bg 200f1c0 <rtems_rfs_format+0xa68> <== NEVER TAKEN
200f0b4: 80 a4 a0 00 cmp %l2, 0
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
200f0b8: 12 80 00 70 bne 200f278 <rtems_rfs_format+0xb20> <== NEVER TAKEN
200f0bc: ea 2f bf ec stb %l5, [ %fp + -20 ]
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
200f0c0: 96 10 00 1d mov %i5, %o3
200f0c4: 90 07 bf d4 add %fp, -44, %o0
200f0c8: 92 07 bf 2c add %fp, -212, %o1
200f0cc: 94 07 bf ec add %fp, -20, %o2
200f0d0: 40 00 2f 86 call 201aee8 <rtems_rfs_bitmap_open>
200f0d4: 98 06 a0 02 add %i2, 2, %o4
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
200f0d8: ba 92 20 00 orcc %o0, 0, %i5
200f0dc: 04 80 00 4a ble 200f204 <rtems_rfs_format+0xaac> <== ALWAYS TAKEN
200f0e0: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f0e4: 40 00 34 27 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f0e8: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
200f0ec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200f0f0: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f0f4: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f0f8: 40 00 54 6e call 20242b0 <strerror> <== NOT EXECUTED
200f0fc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f100: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f104: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200f108: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
200f10c: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200f110: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
200f114: 40 00 51 34 call 20235e4 <printf> <== NOT EXECUTED
200f118: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED
200f11c: 81 c7 e0 08 ret <== NOT EXECUTED
200f120: 81 e8 00 00 restore <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200f124: 40 00 81 01 call 202f528 <.udiv>
200f128: 90 02 3f ff add %o0, -1, %o0
200f12c: a0 02 20 01 add %o0, 1, %l0
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
200f130: 80 a4 20 00 cmp %l0, 0
200f134: 14 bf ff d5 bg 200f088 <rtems_rfs_format+0x930> <== ALWAYS TAKEN
200f138: ae 10 20 00 clr %l7
200f13c: 30 bf ff da b,a 200f0a4 <rtems_rfs_format+0x94c> <== NOT EXECUTED
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
200f140: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
200f144: 80 a0 60 00 cmp %g1, 0
200f148: 12 80 00 6a bne 200f2f0 <rtems_rfs_format+0xb98> <== NEVER TAKEN
200f14c: 01 00 00 00 nop
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
200f150: 40 00 36 1e call 201c9c8 <rtems_rfs_buffer_close>
200f154: 90 07 bf 2c add %fp, -212, %o0
if (rc > 0)
200f158: ba 92 20 00 orcc %o0, 0, %i5
200f15c: 14 80 01 07 bg 200f578 <rtems_rfs_format+0xe20> <== NEVER TAKEN
200f160: 92 10 20 00 clr %o1
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
200f164: 90 10 00 18 mov %i0, %o0
200f168: 94 10 20 04 mov 4, %o2
200f16c: 40 00 3f 4d call 201eea0 <rtems_rfs_fs_open>
200f170: 96 07 bf f8 add %fp, -8, %o3
if (rc < 0)
200f174: 80 a2 20 00 cmp %o0, 0
200f178: 06 80 01 3a bl 200f660 <rtems_rfs_format+0xf08> <== NEVER TAKEN
200f17c: 92 10 20 01 mov 1, %o1
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
200f180: d0 07 bf f8 ld [ %fp + -8 ], %o0
200f184: 40 00 03 3f call 200fe80 <rtems_rfs_inode_alloc>
200f188: 94 07 bf fc add %fp, -4, %o2
if (rc > 0)
200f18c: ba 92 20 00 orcc %o0, 0, %i5
200f190: 14 80 00 3e bg 200f288 <rtems_rfs_format+0xb30> <== NEVER TAKEN
200f194: d2 07 bf fc ld [ %fp + -4 ], %o1
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
200f198: 80 a2 60 01 cmp %o1, 1
200f19c: 02 80 00 61 be 200f320 <rtems_rfs_format+0xbc8> <== ALWAYS TAKEN
200f1a0: 11 00 80 cb sethi %hi(0x2032c00), %o0
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
200f1a4: 40 00 51 10 call 20235e4 <printf> <== NOT EXECUTED
200f1a8: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 2032dc0 <ramdisk_ops+0x6fc><== NOT EXECUTED
rtems_rfs_fs_close (fs);
200f1ac: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
200f1b0: 40 00 41 70 call 201f770 <rtems_rfs_fs_close> <== NOT EXECUTED
200f1b4: b0 10 20 00 clr %i0 <== NOT EXECUTED
200f1b8: 81 c7 e0 08 ret <== NOT EXECUTED
200f1bc: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f1c0: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200f1c4: 40 00 33 ef call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f1c8: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
200f1cc: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
handle->dirty = false;
200f1d0: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f1d4: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f1d8: 40 00 54 36 call 20242b0 <strerror> <== NOT EXECUTED
200f1dc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f1e0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f1e4: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200f1e8: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED
200f1ec: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200f1f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
200f1f4: 40 00 50 fc call 20235e4 <printf> <== NOT EXECUTED
200f1f8: 90 12 23 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED
200f1fc: 81 c7 e0 08 ret <== NOT EXECUTED
200f200: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
200f204: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f208: d4 07 bf 34 ld [ %fp + -204 ], %o2
200f20c: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
200f210: 40 00 50 a3 call 202349c <memset>
200f214: 92 10 20 00 clr %o1
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
200f218: 40 00 2e 8b call 201ac44 <rtems_rfs_bitmap_map_clear_all>
200f21c: 90 07 bf d4 add %fp, -44, %o0
200f220: ba 10 00 08 mov %o0, %i5
if (rc > 0)
200f224: 80 a7 60 00 cmp %i5, 0
200f228: 04 80 00 54 ble 200f378 <rtems_rfs_format+0xc20> <== ALWAYS TAKEN
200f22c: 90 07 bf d4 add %fp, -44, %o0
{
rtems_rfs_bitmap_close (&bitmap);
200f230: 40 00 2f 3f call 201af2c <rtems_rfs_bitmap_close> <== NOT EXECUTED
200f234: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f238: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200f23c: 40 00 33 d1 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f240: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
200f244: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200f248: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f24c: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f250: 40 00 54 18 call 20242b0 <strerror> <== NOT EXECUTED
200f254: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f258: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f25c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200f260: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
200f264: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f268: 40 00 50 df call 20235e4 <printf> <== NOT EXECUTED
200f26c: 90 12 20 40 or %o0, 0x40, %o0 ! 2032c40 <ramdisk_ops+0x57c><== NOT EXECUTED
200f270: 81 c7 e0 08 ret <== NOT EXECUTED
200f274: 81 e8 00 00 restore <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
200f278: 40 00 50 db call 20235e4 <printf> <== NOT EXECUTED
200f27c: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
200f280: 10 bf ff 91 b 200f0c4 <rtems_rfs_format+0x96c> <== NOT EXECUTED
200f284: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
200f288: 40 00 54 0a call 20242b0 <strerror> <== NOT EXECUTED
200f28c: 01 00 00 00 nop <== NOT EXECUTED
200f290: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f294: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f298: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f29c: 40 00 50 d2 call 20235e4 <printf> <== NOT EXECUTED
200f2a0: 90 12 21 88 or %o0, 0x188, %o0 ! 2032d88 <ramdisk_ops+0x6c4><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
200f2a4: 40 00 41 33 call 201f770 <rtems_rfs_fs_close> <== NOT EXECUTED
200f2a8: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
200f2ac: 40 00 54 01 call 20242b0 <strerror> <== NOT EXECUTED
200f2b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200f2b4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f2b8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
rc, strerror (rc));
return -1;
200f2bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
200f2c0: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f2c4: 40 00 50 c8 call 20235e4 <printf> <== NOT EXECUTED
200f2c8: 90 12 23 00 or %o0, 0x300, %o0 ! 2032f00 <ramdisk_ops+0x83c><== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
200f2cc: 81 c7 e0 08 ret <== NOT EXECUTED
200f2d0: 81 e8 00 00 restore <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
200f2d4: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
200f2d8: 08 80 00 ef bleu 200f694 <rtems_rfs_format+0xf3c> <== NOT EXECUTED
200f2dc: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED
fs->block_size = (4 * 1024);
200f2e0: c2 27 bf 34 st %g1, [ %fp + -204 ] <== NOT EXECUTED
200f2e4: f8 00 a0 24 ld [ %g2 + 0x24 ], %i4 <== NOT EXECUTED
200f2e8: 10 bf fd 47 b 200e804 <rtems_rfs_format+0xac> <== NOT EXECUTED
200f2ec: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
printf ("\n");
200f2f0: 40 00 50 d0 call 2023630 <putchar> <== NOT EXECUTED
200f2f4: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
200f2f8: 30 bf ff 96 b,a 200f150 <rtems_rfs_format+0x9f8> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
if (rc > 0)
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
200f2fc: 40 00 53 ed call 20242b0 <strerror> <== NOT EXECUTED
200f300: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f304: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f308: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f30c: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
200f310: 40 00 50 b5 call 20235e4 <printf> <== NOT EXECUTED
200f314: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 20329a0 <ramdisk_ops+0x2dc><== NOT EXECUTED
rc, strerror (rc));
return -1;
200f318: 81 c7 e0 08 ret <== NOT EXECUTED
200f31c: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
200f320: d0 07 bf f8 ld [ %fp + -8 ], %o0
200f324: 92 10 20 01 mov 1, %o1
200f328: 94 07 bf ac add %fp, -84, %o2
200f32c: 40 00 03 10 call 200ff6c <rtems_rfs_inode_open>
200f330: 96 10 20 01 mov 1, %o3
if (rc > 0)
200f334: ba 92 20 00 orcc %o0, 0, %i5
200f338: 24 80 00 50 ble,a 200f478 <rtems_rfs_format+0xd20> <== ALWAYS TAKEN
200f33c: 90 07 bf ac add %fp, -84, %o0
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
200f340: 40 00 53 dc call 20242b0 <strerror> <== NOT EXECUTED
200f344: 01 00 00 00 nop <== NOT EXECUTED
200f348: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f34c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f350: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f354: 40 00 50 a4 call 20235e4 <printf> <== NOT EXECUTED
200f358: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 2032df8 <ramdisk_ops+0x734><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
200f35c: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
200f360: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
200f364: 40 00 02 14 call 200fbb4 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
200f368: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
rtems_rfs_fs_close (fs);
200f36c: 40 00 41 01 call 201f770 <rtems_rfs_fs_close> <== NOT EXECUTED
200f370: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
200f374: 30 bf ff ce b,a 200f2ac <rtems_rfs_format+0xb54> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
200f378: 40 00 2e ed call 201af2c <rtems_rfs_bitmap_close>
200f37c: 01 00 00 00 nop
if (rc > 0)
200f380: ba 92 20 00 orcc %o0, 0, %i5
200f384: 14 80 00 2c bg 200f434 <rtems_rfs_format+0xcdc> <== NEVER TAKEN
200f388: 80 8c 60 ff btst 0xff, %l1
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
200f38c: 02 80 00 8a be 200f5b4 <rtems_rfs_format+0xe5c> <== ALWAYS TAKEN
200f390: ea 2f bf ec stb %l5, [ %fp + -20 ]
{
for (b = 0; b < blocks; b++)
200f394: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
200f398: 04 80 00 87 ble 200f5b4 <rtems_rfs_format+0xe5c> <== NOT EXECUTED
200f39c: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
200f3a0: 10 80 00 0a b 200f3c8 <rtems_rfs_format+0xc70> <== NOT EXECUTED
200f3a4: a0 07 00 10 add %i4, %l0, %l0 <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
200f3a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
200f3ac: d4 07 bf 34 ld [ %fp + -204 ], %o2 <== NOT EXECUTED
200f3b0: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED
200f3b4: 40 00 50 3a call 202349c <memset> <== NOT EXECUTED
200f3b8: b8 07 20 01 inc %i4 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
200f3bc: 80 a7 00 10 cmp %i4, %l0 <== NOT EXECUTED
200f3c0: 02 80 00 7d be 200f5b4 <rtems_rfs_format+0xe5c> <== NOT EXECUTED
200f3c4: ea 2f bf ec stb %l5, [ %fp + -20 ] <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
200f3c8: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200f3cc: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200f3d0: 96 10 20 00 clr %o3 <== NOT EXECUTED
200f3d4: 40 00 33 e6 call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
200f3d8: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
200f3dc: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
200f3e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f3e4: 04 bf ff f1 ble 200f3a8 <rtems_rfs_format+0xc50> <== NOT EXECUTED
200f3e8: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f3ec: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200f3f0: 40 00 33 64 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f3f4: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
200f3f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200f3fc: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f400: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f404: 40 00 53 ab call 20242b0 <strerror> <== NOT EXECUTED
200f408: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f40c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f410: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
200f414: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200f418: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f41c: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
200f420: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED
200f424: 40 00 50 70 call 20235e4 <printf> <== NOT EXECUTED
200f428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f42c: 81 c7 e0 08 ret <== NOT EXECUTED
200f430: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f434: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200f438: 40 00 33 52 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f43c: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
200f440: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200f444: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f448: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f44c: 40 00 53 99 call 20242b0 <strerror> <== NOT EXECUTED
200f450: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f454: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f458: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200f45c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
200f460: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200f464: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
200f468: 40 00 50 5f call 20235e4 <printf> <== NOT EXECUTED
200f46c: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED
200f470: 81 c7 e0 08 ret <== NOT EXECUTED
200f474: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
200f478: 92 10 20 00 clr %o1
200f47c: 96 10 20 00 clr %o3
200f480: 15 00 00 10 sethi %hi(0x4000), %o2
200f484: 98 10 20 00 clr %o4
200f488: 40 00 03 b5 call 201035c <rtems_rfs_inode_initialise>
200f48c: 94 12 a1 c9 or %o2, 0x1c9, %o2
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
200f490: ba 92 20 00 orcc %o0, 0, %i5
200f494: 24 80 00 0a ble,a 200f4bc <rtems_rfs_format+0xd64> <== ALWAYS TAKEN
200f498: d0 07 bf f8 ld [ %fp + -8 ], %o0
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
200f49c: 40 00 53 85 call 20242b0 <strerror> <== NOT EXECUTED
200f4a0: 01 00 00 00 nop <== NOT EXECUTED
200f4a4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f4a8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f4ac: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f4b0: 40 00 50 4d call 20235e4 <printf> <== NOT EXECUTED
200f4b4: 90 12 22 28 or %o0, 0x228, %o0 ! 2032e28 <ramdisk_ops+0x764><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
200f4b8: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
200f4bc: d8 07 bf fc ld [ %fp + -4 ], %o4
200f4c0: 92 07 bf ac add %fp, -84, %o1
200f4c4: 96 10 20 01 mov 1, %o3
200f4c8: 15 00 80 c6 sethi %hi(0x2031800), %o2
200f4cc: 40 00 36 b9 call 201cfb0 <rtems_rfs_dir_add_entry>
200f4d0: 94 12 a2 a0 or %o2, 0x2a0, %o2 ! 2031aa0 <_rodata_start+0x390>
if (rc > 0)
200f4d4: ba 92 20 00 orcc %o0, 0, %i5
200f4d8: 24 80 00 0a ble,a 200f500 <rtems_rfs_format+0xda8> <== ALWAYS TAKEN
200f4dc: d0 07 bf f8 ld [ %fp + -8 ], %o0
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
200f4e0: 40 00 53 74 call 20242b0 <strerror> <== NOT EXECUTED
200f4e4: 01 00 00 00 nop <== NOT EXECUTED
200f4e8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f4ec: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f4f0: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f4f4: 40 00 50 3c call 20235e4 <printf> <== NOT EXECUTED
200f4f8: 90 12 22 60 or %o0, 0x260, %o0 ! 2032e60 <ramdisk_ops+0x79c><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
200f4fc: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
200f500: 40 00 03 12 call 2010148 <rtems_rfs_inode_close>
200f504: 92 07 bf ac add %fp, -84, %o1
if (rc > 0)
200f508: ba 92 20 00 orcc %o0, 0, %i5
200f50c: 04 80 00 09 ble 200f530 <rtems_rfs_format+0xdd8> <== ALWAYS TAKEN
200f510: 01 00 00 00 nop
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
200f514: 40 00 53 67 call 20242b0 <strerror> <== NOT EXECUTED
200f518: 01 00 00 00 nop <== NOT EXECUTED
200f51c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f520: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f524: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f528: 40 00 50 2f call 20235e4 <printf> <== NOT EXECUTED
200f52c: 90 12 22 98 or %o0, 0x298, %o0 ! 2032e98 <ramdisk_ops+0x7d4><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
200f530: 40 00 40 90 call 201f770 <rtems_rfs_fs_close>
200f534: d0 07 bf f8 ld [ %fp + -8 ], %o0
if (rc < 0)
200f538: ba 92 20 00 orcc %o0, 0, %i5
200f53c: 06 80 00 3c bl 200f62c <rtems_rfs_format+0xed4> <== NEVER TAKEN
200f540: 80 a7 60 00 cmp %i5, 0
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
200f544: 12 bf ff 5a bne 200f2ac <rtems_rfs_format+0xb54> <== NEVER TAKEN
200f548: b0 10 20 00 clr %i0
rc, strerror (rc));
return -1;
}
return 0;
}
200f54c: 81 c7 e0 08 ret
200f550: 81 e8 00 00 restore
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
200f554: 40 00 53 57 call 20242b0 <strerror> <== NOT EXECUTED
200f558: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f55c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f560: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f564: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
200f568: 40 00 50 1f call 20235e4 <printf> <== NOT EXECUTED
200f56c: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 20326f8 <ramdisk_ops+0x34><== NOT EXECUTED
rc, strerror (rc));
return -1;
200f570: 81 c7 e0 08 ret <== NOT EXECUTED
200f574: 81 e8 00 00 restore <== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
200f578: 40 00 53 4e call 20242b0 <strerror> <== NOT EXECUTED
200f57c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f580: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f584: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f588: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f58c: 40 00 50 16 call 20235e4 <printf> <== NOT EXECUTED
200f590: 90 12 21 20 or %o0, 0x120, %o0 ! 2032d20 <ramdisk_ops+0x65c><== NOT EXECUTED
rc, strerror (rc));
return -1;
200f594: 81 c7 e0 08 ret <== NOT EXECUTED
200f598: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
200f59c: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
200f5a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
200f5a4: 40 00 50 10 call 20235e4 <printf> <== NOT EXECUTED
200f5a8: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
200f5ac: 81 c7 e0 08 ret <== NOT EXECUTED
200f5b0: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f5b4: 90 07 bf 2c add %fp, -212, %o0
200f5b8: 40 00 32 f2 call 201c180 <rtems_rfs_buffer_handle_release>
200f5bc: 92 07 bf ec add %fp, -20, %o1
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
200f5c0: c2 07 bf 4c ld [ %fp + -180 ], %g1
handle->dirty = false;
200f5c4: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200f5c8: c0 27 bf f0 clr [ %fp + -16 ]
200f5cc: b6 06 e0 01 inc %i3
200f5d0: 80 a0 40 1b cmp %g1, %i3
200f5d4: 04 bf fe db ble 200f140 <rtems_rfs_format+0x9e8> <== ALWAYS TAKEN
200f5d8: c0 27 bf f4 clr [ %fp + -12 ]
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
200f5dc: fa 07 bf 50 ld [ %fp + -176 ], %i5 <== NOT EXECUTED
200f5e0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f5e4: 40 00 7f 97 call 202f440 <.umul> <== NOT EXECUTED
200f5e8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
200f5ec: c2 07 bf 30 ld [ %fp + -208 ], %g1 <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
200f5f0: b8 02 20 01 add %o0, 1, %i4 <== NOT EXECUTED
200f5f4: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
200f5f8: e2 0e 60 14 ldub [ %i1 + 0x14 ], %l1 <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200f5fc: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
200f600: 08 bf fe 4c bleu 200ef30 <rtems_rfs_format+0x7d8> <== NOT EXECUTED
200f604: e4 0e 60 15 ldub [ %i1 + 0x15 ], %l2 <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
200f608: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f60c: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200f610: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
200f614: 40 00 4f f4 call 20235e4 <printf> <== NOT EXECUTED
200f618: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED
200f61c: 81 c7 e0 08 ret <== NOT EXECUTED
200f620: 81 e8 00 00 restore <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200f624: 10 bf ff f9 b 200f608 <rtems_rfs_format+0xeb0> <== NOT EXECUTED
200f628: b6 10 20 00 clr %i3 <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
200f62c: 40 00 4c 86 call 2022844 <__errno> <== NOT EXECUTED
200f630: b0 10 20 00 clr %i0 <== NOT EXECUTED
200f634: 40 00 4c 84 call 2022844 <__errno> <== NOT EXECUTED
200f638: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
200f63c: 40 00 53 1d call 20242b0 <strerror> <== NOT EXECUTED
200f640: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
200f644: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f648: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f64c: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f650: 40 00 4f e5 call 20235e4 <printf> <== NOT EXECUTED
200f654: 90 12 22 c8 or %o0, 0x2c8, %o0 ! 2032ec8 <ramdisk_ops+0x804><== NOT EXECUTED
200f658: 81 c7 e0 08 ret <== NOT EXECUTED
200f65c: 81 e8 00 00 restore <== NOT EXECUTED
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
200f660: 40 00 4c 79 call 2022844 <__errno> <== NOT EXECUTED
200f664: b0 10 20 00 clr %i0 <== NOT EXECUTED
200f668: 40 00 4c 77 call 2022844 <__errno> <== NOT EXECUTED
200f66c: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
200f670: 40 00 53 10 call 20242b0 <strerror> <== NOT EXECUTED
200f674: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
200f678: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f67c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f680: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f684: 40 00 4f d8 call 20235e4 <printf> <== NOT EXECUTED
200f688: 90 12 21 50 or %o0, 0x150, %o0 ! 2032d50 <ramdisk_ops+0x68c><== NOT EXECUTED
200f68c: 81 c7 e0 08 ret <== NOT EXECUTED
200f690: 81 e8 00 00 restore <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
200f694: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
200f698: 10 bf fc 5b b 200e804 <rtems_rfs_format+0xac> <== NOT EXECUTED
200f69c: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED
0201f770 <rtems_rfs_fs_close>:
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
201f770: 9d e3 bf a0 save %sp, -96, %sp
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
201f774: 90 10 20 00 clr %o0
201f778: 92 10 20 02 mov 2, %o1
201f77c: 7f ff ce 3b call 2013068 <rtems_rfs_trace>
201f780: ba 10 00 18 mov %i0, %i5
201f784: 80 8a 20 ff btst 0xff, %o0
201f788: 12 80 00 18 bne 201f7e8 <rtems_rfs_fs_close+0x78> <== NEVER TAKEN
201f78c: 11 00 80 d4 sethi %hi(0x2035000), %o0
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
201f790: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
201f794: 80 a0 60 00 cmp %g1, 0
201f798: 04 80 00 0d ble 201f7cc <rtems_rfs_fs_close+0x5c> <== NEVER TAKEN
201f79c: 01 00 00 00 nop
201f7a0: b6 10 20 00 clr %i3 ! 0 <PROM_START>
201f7a4: b8 10 20 00 clr %i4
rtems_rfs_group_close (fs, &fs->groups[group]);
201f7a8: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
201f7ac: 90 10 00 1d mov %i5, %o0
201f7b0: 7f ff c0 49 call 200f8d4 <rtems_rfs_group_close>
201f7b4: 92 02 40 1b add %o1, %i3, %o1
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
201f7b8: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
201f7bc: b8 07 20 01 inc %i4
201f7c0: 80 a0 40 1c cmp %g1, %i4
201f7c4: 14 bf ff f9 bg 201f7a8 <rtems_rfs_fs_close+0x38> <== NEVER TAKEN
201f7c8: b6 06 e0 50 add %i3, 0x50, %i3
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
201f7cc: 7f ff f4 7f call 201c9c8 <rtems_rfs_buffer_close>
201f7d0: 90 10 00 1d mov %i5, %o0
free (fs);
return 0;
}
201f7d4: b0 10 20 00 clr %i0
for (group = 0; group < fs->group_count; group++)
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
free (fs);
201f7d8: 7f ff 99 00 call 2005bd8 <free>
201f7dc: 90 10 00 1d mov %i5, %o0
return 0;
}
201f7e0: 81 c7 e0 08 ret
201f7e4: 81 e8 00 00 restore
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
201f7e8: 40 00 0f c0 call 20236e8 <puts> <== NOT EXECUTED
201f7ec: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED
for (group = 0; group < fs->group_count; group++)
201f7f0: 10 bf ff e9 b 201f794 <rtems_rfs_fs_close+0x24> <== NOT EXECUTED
201f7f4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 <== NOT EXECUTED
0201eea0 <rtems_rfs_fs_open>:
int
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
rtems_rfs_file_system** fs)
{
201eea0: 9d e3 bf 68 save %sp, -152, %sp
size_t group_base;
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201eea4: 90 10 20 00 clr %o0
201eea8: 7f ff d0 70 call 2013068 <rtems_rfs_trace>
201eeac: 92 10 20 01 mov 1, %o1
201eeb0: 80 8a 20 ff btst 0xff, %o0
201eeb4: 12 80 00 7c bne 201f0a4 <rtems_rfs_fs_open+0x204> <== NEVER TAKEN
201eeb8: 92 10 00 18 mov %i0, %o1
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
201eebc: 7f ff 9d 17 call 2006318 <malloc>
201eec0: 90 10 20 80 mov 0x80, %o0
if (!*fs)
201eec4: 80 a2 20 00 cmp %o0, 0
201eec8: 02 80 01 6e be 201f480 <rtems_rfs_fs_open+0x5e0> <== NEVER TAKEN
201eecc: d0 26 c0 00 st %o0, [ %i3 ]
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
201eed0: 92 10 20 00 clr %o1
201eed4: 40 00 11 72 call 202349c <memset>
201eed8: 94 10 20 80 mov 0x80, %o2
(*fs)->user = user;
201eedc: c2 06 c0 00 ld [ %i3 ], %g1
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
201eee0: 90 10 00 18 mov %i0, %o0
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
201eee4: f2 20 60 7c st %i1, [ %g1 + 0x7c ]
rtems_chain_initialize_empty (&(*fs)->buffers);
201eee8: c2 06 c0 00 ld [ %i3 ], %g1
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
201eeec: c0 20 60 44 clr [ %g1 + 0x44 ]
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 );
201eef0: 86 00 60 40 add %g1, 0x40, %g3
201eef4: 84 00 60 44 add %g1, 0x44, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
201eef8: c6 20 60 48 st %g3, [ %g1 + 0x48 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
201eefc: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
rtems_chain_initialize_empty (&(*fs)->release);
201ef00: c2 06 c0 00 ld [ %i3 ], %g1
head->previous = NULL;
201ef04: c0 20 60 54 clr [ %g1 + 0x54 ]
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 );
201ef08: 86 00 60 50 add %g1, 0x50, %g3
201ef0c: 84 00 60 54 add %g1, 0x54, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
201ef10: c6 20 60 58 st %g3, [ %g1 + 0x58 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
201ef14: c4 20 60 50 st %g2, [ %g1 + 0x50 ]
rtems_chain_initialize_empty (&(*fs)->release_modified);
201ef18: c2 06 c0 00 ld [ %i3 ], %g1
head->previous = NULL;
201ef1c: c0 20 60 64 clr [ %g1 + 0x64 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
201ef20: 86 00 60 60 add %g1, 0x60, %g3
201ef24: 84 00 60 64 add %g1, 0x64, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
201ef28: c6 20 60 68 st %g3, [ %g1 + 0x68 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
201ef2c: c4 20 60 60 st %g2, [ %g1 + 0x60 ]
rtems_chain_initialize_empty (&(*fs)->file_shares);
201ef30: c2 06 c0 00 ld [ %i3 ], %g1
head->previous = NULL;
201ef34: c0 20 60 74 clr [ %g1 + 0x74 ]
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 );
201ef38: 86 00 60 70 add %g1, 0x70, %g3
201ef3c: 84 00 60 74 add %g1, 0x74, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
201ef40: c6 20 60 78 st %g3, [ %g1 + 0x78 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
201ef44: c4 20 60 70 st %g2, [ %g1 + 0x70 ]
(*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
201ef48: d2 06 c0 00 ld [ %i3 ], %o1
201ef4c: 82 10 20 05 mov 5, %g1
(*fs)->buffers_count = 0;
201ef50: c0 22 60 4c clr [ %o1 + 0x4c ]
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;
201ef54: c2 22 60 3c st %g1, [ %o1 + 0x3c ]
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
201ef58: c0 22 60 5c clr [ %o1 + 0x5c ]
(*fs)->release_modified_count = 0;
201ef5c: c0 22 60 6c clr [ %o1 + 0x6c ]
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
201ef60: 7f ff f5 ae call 201c618 <rtems_rfs_buffer_open>
201ef64: f4 22 40 00 st %i2, [ %o1 ]
if (rc > 0)
201ef68: ba 92 20 00 orcc %o0, 0, %i5
201ef6c: 14 80 00 aa bg 201f214 <rtems_rfs_fs_open+0x374> <== NEVER TAKEN
201ef70: 94 10 20 00 clr %o2
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
201ef74: f0 06 c0 00 ld [ %i3 ], %i0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201ef78: c0 2f bf f4 clrb [ %fp + -12 ]
handle->bnum = 0;
201ef7c: c0 27 bf f8 clr [ %fp + -8 ]
handle->buffer = NULL;
201ef80: c0 27 bf fc clr [ %fp + -4 ]
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
201ef84: 90 10 00 18 mov %i0, %o0
201ef88: 92 07 bf f4 add %fp, -12, %o1
201ef8c: 7f ff f4 f8 call 201c36c <rtems_rfs_buffer_handle_request>
201ef90: 96 10 20 01 mov 1, %o3
if (rc > 0)
201ef94: b8 92 20 00 orcc %o0, 0, %i4
201ef98: 04 80 00 16 ble 201eff0 <rtems_rfs_fs_open+0x150> <== ALWAYS TAKEN
201ef9c: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201efa0: 7f ff d0 32 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201efa4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201efa8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201efac: 12 80 00 49 bne 201f0d0 <rtems_rfs_fs_open+0x230> <== NOT EXECUTED
201efb0: 01 00 00 00 nop <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
201efb4: 7f ff f6 85 call 201c9c8 <rtems_rfs_buffer_close> <== NOT EXECUTED
201efb8: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free (*fs);
201efbc: 7f ff 9b 07 call 2005bd8 <free> <== NOT EXECUTED
201efc0: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201efc4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201efc8: 7f ff d0 28 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201efcc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201efd0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201efd4: 12 80 00 2c bne 201f084 <rtems_rfs_fs_open+0x1e4> <== NOT EXECUTED
201efd8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
rc, strerror (rc));
errno = rc;
201efdc: 40 00 0e 1a call 2022844 <__errno> <== NOT EXECUTED
201efe0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
201efe4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
return -1;
201efe8: 81 c7 e0 08 ret <== NOT EXECUTED
201efec: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
201eff0: c2 07 bf fc ld [ %fp + -4 ], %g1
201eff4: fa 00 60 24 ld [ %g1 + 0x24 ], %i5
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
201eff8: c2 0f 60 02 ldub [ %i5 + 2 ], %g1
201effc: c4 0f 40 00 ldub [ %i5 ], %g2
201f000: c8 0f 60 01 ldub [ %i5 + 1 ], %g4
201f004: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
201f008: 83 28 60 08 sll %g1, 8, %g1
201f00c: 85 28 a0 18 sll %g2, 0x18, %g2
201f010: 89 29 20 10 sll %g4, 0x10, %g4
201f014: 84 10 80 04 or %g2, %g4, %g2
201f018: 84 10 80 03 or %g2, %g3, %g2
201f01c: 84 10 80 01 or %g2, %g1, %g2
201f020: 03 0a 02 48 sethi %hi(0x28092000), %g1
201f024: 82 10 60 01 or %g1, 1, %g1 ! 28092001 <RAM_END+0x25c92001>
201f028: 80 a0 80 01 cmp %g2, %g1
201f02c: 22 80 00 31 be,a 201f0f0 <rtems_rfs_fs_open+0x250> <== ALWAYS TAKEN
201f030: c6 0f 60 0d ldub [ %i5 + 0xd ], %g3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f034: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f038: 7f ff d0 0c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f03c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f040: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f044: 32 80 00 1c bne,a 201f0b4 <rtems_rfs_fs_open+0x214> <== NOT EXECUTED
201f048: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201f04c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f050: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
201f054: 7f ff f4 4b call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201f058: b8 10 20 05 mov 5, %i4 <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
201f05c: 7f ff f6 5b call 201c9c8 <rtems_rfs_buffer_close> <== NOT EXECUTED
201f060: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free (*fs);
201f064: 7f ff 9a dd call 2005bd8 <free> <== NOT EXECUTED
201f068: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f06c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f070: 7f ff cf fe call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f074: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f078: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f07c: 02 bf ff d8 be 201efdc <rtems_rfs_fs_open+0x13c> <== NOT EXECUTED
201f080: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
201f084: 40 00 14 8b call 20242b0 <strerror> <== NOT EXECUTED
201f088: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201f08c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201f090: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f094: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f098: 40 00 11 53 call 20235e4 <printf> <== NOT EXECUTED
201f09c: 90 12 22 00 or %o0, 0x200, %o0 ! 2035200 <CSWTCH.1+0x12c0><== NOT EXECUTED
201f0a0: 30 bf ff cf b,a 201efdc <rtems_rfs_fs_open+0x13c> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
201f0a4: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201f0a8: 40 00 11 4f call 20235e4 <printf> <== NOT EXECUTED
201f0ac: 90 12 23 80 or %o0, 0x380, %o0 ! 2034f80 <CSWTCH.1+0x1040><== NOT EXECUTED
201f0b0: 30 bf ff 83 b,a 201eebc <rtems_rfs_fs_open+0x1c> <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
201f0b4: 40 00 11 8d call 20236e8 <puts> <== NOT EXECUTED
201f0b8: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
201f0bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f0c0: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
201f0c4: 7f ff f4 2f call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201f0c8: b8 10 20 05 mov 5, %i4 <== NOT EXECUTED
201f0cc: 30 bf ff e4 b,a 201f05c <rtems_rfs_fs_open+0x1bc> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
201f0d0: 40 00 14 78 call 20242b0 <strerror> <== NOT EXECUTED
201f0d4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201f0d8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201f0dc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f0e0: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201f0e4: 40 00 11 40 call 20235e4 <printf> <== NOT EXECUTED
201f0e8: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 2034ff8 <CSWTCH.1+0x10b8><== NOT EXECUTED
201f0ec: 30 bf ff b2 b,a 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
201f0f0: c2 0f 60 0e ldub [ %i5 + 0xe ], %g1
201f0f4: c4 0f 60 0f ldub [ %i5 + 0xf ], %g2
201f0f8: d6 0f 60 0c ldub [ %i5 + 0xc ], %o3
201f0fc: 87 28 e0 10 sll %g3, 0x10, %g3
201f100: 83 28 60 08 sll %g1, 8, %g1
201f104: 97 2a e0 18 sll %o3, 0x18, %o3
201f108: 96 12 c0 03 or %o3, %g3, %o3
201f10c: 96 12 c0 02 or %o3, %g2, %o3
201f110: 96 12 c0 01 or %o3, %g1, %o3
201f114: d6 26 20 04 st %o3, [ %i0 + 4 ]
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
201f118: c6 0f 60 09 ldub [ %i5 + 9 ], %g3
201f11c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
201f120: c4 0f 60 0b ldub [ %i5 + 0xb ], %g2
201f124: f4 0f 60 08 ldub [ %i5 + 8 ], %i2
201f128: 87 28 e0 10 sll %g3, 0x10, %g3
201f12c: 83 28 60 08 sll %g1, 8, %g1
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
201f130: f2 06 20 0c ld [ %i0 + 0xc ], %i1
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;
201f134: 94 10 20 00 clr %o2
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
201f138: b5 2e a0 18 sll %i2, 0x18, %i2
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;
201f13c: 90 10 20 00 clr %o0
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
201f140: b4 16 80 03 or %i2, %g3, %i2
201f144: b4 16 80 02 or %i2, %g2, %i2
201f148: b4 16 80 01 or %i2, %g1, %i2
201f14c: f4 26 20 08 st %i2, [ %i0 + 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;
201f150: 40 00 42 4e call 202fa88 <__muldi3>
201f154: 92 10 00 1a mov %i2, %o1
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
201f158: d6 06 60 1c ld [ %i1 + 0x1c ], %o3
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
201f15c: a0 10 00 09 mov %o1, %l0
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
201f160: d2 06 60 24 ld [ %i1 + 0x24 ], %o1
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
201f164: b8 10 00 08 mov %o0, %i4
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;
201f168: 94 10 20 00 clr %o2
201f16c: 40 00 42 47 call 202fa88 <__muldi3>
201f170: 90 10 20 00 clr %o0
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
201f174: 80 a7 00 08 cmp %i4, %o0
201f178: 38 80 00 3e bgu,a 201f270 <rtems_rfs_fs_open+0x3d0> <== NEVER TAKEN
201f17c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f180: 02 80 00 39 be 201f264 <rtems_rfs_fs_open+0x3c4> <== ALWAYS TAKEN
201f184: 80 a4 00 09 cmp %l0, %o1
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
201f188: c2 0f 60 24 ldub [ %i5 + 0x24 ], %g1 <== NOT EXECUTED
201f18c: c8 0f 60 25 ldub [ %i5 + 0x25 ], %g4
201f190: c6 0f 60 27 ldub [ %i5 + 0x27 ], %g3
201f194: c4 0f 60 26 ldub [ %i5 + 0x26 ], %g2
201f198: 83 28 60 18 sll %g1, 0x18, %g1
201f19c: 89 29 20 10 sll %g4, 0x10, %g4
201f1a0: 85 28 a0 08 sll %g2, 8, %g2
201f1a4: 82 10 40 04 or %g1, %g4, %g1
201f1a8: 82 10 40 03 or %g1, %g3, %g1
201f1ac: 82 10 40 02 or %g1, %g2, %g1
201f1b0: 80 a0 60 38 cmp %g1, 0x38
201f1b4: 22 80 00 39 be,a 201f298 <rtems_rfs_fs_open+0x3f8> <== ALWAYS TAKEN
201f1b8: c6 0f 60 13 ldub [ %i5 + 0x13 ], %g3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f1bc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f1c0: 7f ff cf aa call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f1c4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f1c8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f1cc: 22 bf ff a1 be,a 201f050 <rtems_rfs_fs_open+0x1b0> <== NOT EXECUTED
201f1d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
201f1d4: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
201f1d8: c2 0f 60 06 ldub [ %i5 + 6 ], %g1 <== NOT EXECUTED
201f1dc: d2 0f 60 04 ldub [ %i5 + 4 ], %o1 <== NOT EXECUTED
201f1e0: c4 0f 60 07 ldub [ %i5 + 7 ], %g2 <== NOT EXECUTED
201f1e4: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201f1e8: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201f1ec: 93 2a 60 18 sll %o1, 0x18, %o1 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
201f1f0: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
201f1f4: 92 12 40 03 or %o1, %g3, %o1 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
201f1f8: 94 10 20 00 clr %o2 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
201f1fc: 92 12 40 02 or %o1, %g2, %o1 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
201f200: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED
201f204: 40 00 10 f8 call 20235e4 <printf> <== NOT EXECUTED
201f208: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
201f20c: 10 bf ff 91 b 201f050 <rtems_rfs_fs_open+0x1b0> <== NOT EXECUTED
201f210: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
if (rc > 0)
{
free (*fs);
201f214: 7f ff 9a 71 call 2005bd8 <free> <== NOT EXECUTED
201f218: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f21c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f220: 7f ff cf 92 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f224: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f228: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f22c: 02 80 00 09 be 201f250 <rtems_rfs_fs_open+0x3b0> <== NOT EXECUTED
201f230: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
201f234: 40 00 14 1f call 20242b0 <strerror> <== NOT EXECUTED
201f238: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201f23c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201f240: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f244: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
201f248: 40 00 10 e7 call 20235e4 <printf> <== NOT EXECUTED
201f24c: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 2034fc8 <CSWTCH.1+0x1088><== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
201f250: 40 00 0d 7d call 2022844 <__errno> <== NOT EXECUTED
201f254: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201f258: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
return -1;
201f25c: 81 c7 e0 08 ret <== NOT EXECUTED
201f260: 81 e8 00 00 restore <== NOT EXECUTED
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
201f264: 28 bf ff ca bleu,a 201f18c <rtems_rfs_fs_open+0x2ec> <== ALWAYS TAKEN
201f268: c2 0f 60 24 ldub [ %i5 + 0x24 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f26c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f270: 7f ff cf 7e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f274: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f278: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f27c: 22 bf ff 75 be,a 201f050 <rtems_rfs_fs_open+0x1b0> <== NOT EXECUTED
201f280: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
201f284: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f288: 40 00 11 18 call 20236e8 <puts> <== NOT EXECUTED
201f28c: 90 12 20 70 or %o0, 0x70, %o0 ! 2035070 <CSWTCH.1+0x1130> <== NOT EXECUTED
201f290: 10 bf ff 70 b 201f050 <rtems_rfs_fs_open+0x1b0> <== NOT EXECUTED
201f294: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
201f298: c2 0f 60 10 ldub [ %i5 + 0x10 ], %g1
201f29c: c8 0f 60 11 ldub [ %i5 + 0x11 ], %g4
201f2a0: c4 0f 60 12 ldub [ %i5 + 0x12 ], %g2
201f2a4: 89 29 20 10 sll %g4, 0x10, %g4
201f2a8: 85 28 a0 08 sll %g2, 8, %g2
201f2ac: 83 28 60 18 sll %g1, 0x18, %g1
201f2b0: 82 10 40 04 or %g1, %g4, %g1
201f2b4: 82 10 40 03 or %g1, %g3, %g1
201f2b8: 82 10 40 02 or %g1, %g2, %g1
201f2bc: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
201f2c0: c6 0f 60 17 ldub [ %i5 + 0x17 ], %g3
201f2c4: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1
201f2c8: c8 0f 60 15 ldub [ %i5 + 0x15 ], %g4
201f2cc: c4 0f 60 16 ldub [ %i5 + 0x16 ], %g2
201f2d0: 89 29 20 10 sll %g4, 0x10, %g4
201f2d4: 85 28 a0 08 sll %g2, 8, %g2
201f2d8: 83 28 60 18 sll %g1, 0x18, %g1
201f2dc: 82 10 40 04 or %g1, %g4, %g1
201f2e0: 82 10 40 03 or %g1, %g3, %g1
201f2e4: 82 10 40 02 or %g1, %g2, %g1
201f2e8: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
201f2ec: c6 0f 60 19 ldub [ %i5 + 0x19 ], %g3
201f2f0: c2 0f 60 1a ldub [ %i5 + 0x1a ], %g1
201f2f4: c4 0f 60 1b ldub [ %i5 + 0x1b ], %g2
201f2f8: f2 0f 60 18 ldub [ %i5 + 0x18 ], %i1
201f2fc: 87 28 e0 10 sll %g3, 0x10, %g3
201f300: 83 28 60 08 sll %g1, 8, %g1
201f304: b3 2e 60 18 sll %i1, 0x18, %i1
201f308: b2 16 40 03 or %i1, %g3, %i1
201f30c: b2 16 40 02 or %i1, %g2, %i1
201f310: b2 16 40 01 or %i1, %g1, %i1
201f314: f2 26 20 20 st %i1, [ %i0 + 0x20 ]
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
201f318: c4 0f 60 1f ldub [ %i5 + 0x1f ], %g2
201f31c: f8 0f 60 1c ldub [ %i5 + 0x1c ], %i4
201f320: c6 0f 60 1d ldub [ %i5 + 0x1d ], %g3
201f324: c2 0f 60 1e ldub [ %i5 + 0x1e ], %g1
201f328: 87 28 e0 10 sll %g3, 0x10, %g3
201f32c: 83 28 60 08 sll %g1, 8, %g1
201f330: b9 2f 20 18 sll %i4, 0x18, %i4
201f334: b8 17 00 03 or %i4, %g3, %i4
201f338: b8 17 00 02 or %i4, %g2, %i4
201f33c: b8 17 00 01 or %i4, %g1, %i4
201f340: f8 26 20 24 st %i4, [ %i0 + 0x24 ]
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
201f344: c4 0f 60 21 ldub [ %i5 + 0x21 ], %g2
201f348: de 0f 60 20 ldub [ %i5 + 0x20 ], %o7
201f34c: c6 0f 60 22 ldub [ %i5 + 0x22 ], %g3
201f350: c8 0f 60 23 ldub [ %i5 + 0x23 ], %g4
201f354: 85 28 a0 10 sll %g2, 0x10, %g2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
201f358: 83 36 a0 02 srl %i2, 2, %g1
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
201f35c: bb 2b e0 18 sll %o7, 0x18, %i5
201f360: 87 28 e0 08 sll %g3, 8, %g3
201f364: ba 17 40 02 or %i5, %g2, %i5
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;
201f368: 85 28 60 02 sll %g1, 2, %g2
201f36c: 84 00 80 01 add %g2, %g1, %g2
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
201f370: ba 17 40 04 or %i5, %g4, %i5
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
201f374: 92 10 00 01 mov %g1, %o1
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
201f378: ba 17 40 03 or %i5, %g3, %i5
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
201f37c: c4 26 20 34 st %g2, [ %i0 + 0x34 ]
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;
201f380: 90 10 00 01 mov %g1, %o0
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
201f384: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
201f388: 40 00 40 2e call 202f440 <.umul>
201f38c: fa 26 20 28 st %i5, [ %i0 + 0x28 ]
201f390: 83 2a 20 02 sll %o0, 2, %g1
201f394: 82 00 40 08 add %g1, %o0, %g1
fs->inodes = fs->group_count * fs->group_inodes;
201f398: 92 10 00 19 mov %i1, %o1
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
201f39c: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
201f3a0: 40 00 40 28 call 202f440 <.umul>
201f3a4: 90 10 00 1d mov %i5, %o0
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
201f3a8: 92 10 20 38 mov 0x38, %o1
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
201f3ac: d0 26 20 10 st %o0, [ %i0 + 0x10 ]
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
201f3b0: 40 00 40 5e call 202f528 <.udiv>
201f3b4: 90 10 00 1a mov %i2, %o0
201f3b8: d0 26 20 2c st %o0, [ %i0 + 0x2c ]
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
201f3bc: b5 2e a0 03 sll %i2, 3, %i2
201f3c0: 92 07 bf f4 add %fp, -12, %o1
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
201f3c4: 80 a7 00 1a cmp %i4, %i2
201f3c8: 08 80 00 10 bleu 201f408 <rtems_rfs_fs_open+0x568> <== ALWAYS TAKEN
201f3cc: 90 10 00 18 mov %i0, %o0
201f3d0: 7f ff f3 6c call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201f3d4: b8 10 20 05 mov 5, %i4 <== NOT EXECUTED
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f3d8: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f3dc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
201f3e0: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
201f3e4: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201f3e8: 7f ff cf 20 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f3ec: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
201f3f0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f3f4: 02 bf fe f0 be 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
201f3f8: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
201f3fc: 40 00 10 bb call 20236e8 <puts> <== NOT EXECUTED
201f400: 90 12 20 f8 or %o0, 0xf8, %o0 ! 20350f8 <CSWTCH.1+0x11b8> <== NOT EXECUTED
201f404: 30 bf fe ec b,a 201efb4 <rtems_rfs_fs_open+0x114> <== 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);
201f408: 7f ff f3 5e call 201c180 <rtems_rfs_buffer_handle_release>
201f40c: 01 00 00 00 nop
rtems_rfs_buffer_handle_close (fs, &handle);
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
201f410: d2 06 20 08 ld [ %i0 + 8 ], %o1
handle->dirty = false;
201f414: c0 2f bf f4 clrb [ %fp + -12 ]
handle->bnum = 0;
201f418: c0 27 bf f8 clr [ %fp + -8 ]
handle->buffer = NULL;
201f41c: c0 27 bf fc clr [ %fp + -4 ]
201f420: 7f ff f5 21 call 201c8a4 <rtems_rfs_buffer_setblksize>
201f424: 90 10 00 18 mov %i0, %o0
if (rc > 0)
201f428: b8 92 20 00 orcc %o0, 0, %i4
201f42c: 04 80 00 23 ble 201f4b8 <rtems_rfs_fs_open+0x618> <== ALWAYS TAKEN
201f430: 92 07 bf f4 add %fp, -12, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201f434: 7f ff f3 53 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201f438: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f43c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f440: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
201f444: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
201f448: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201f44c: 7f ff cf 07 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f450: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
201f454: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f458: 02 bf fe d7 be 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
201f45c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
201f460: 40 00 13 94 call 20242b0 <strerror> <== NOT EXECUTED
201f464: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201f468: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201f46c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f470: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f474: 40 00 10 5c call 20235e4 <printf> <== NOT EXECUTED
201f478: 90 12 21 40 or %o0, 0x140, %o0 ! 2035140 <CSWTCH.1+0x1200><== NOT EXECUTED
201f47c: 30 bf fe ce b,a 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f480: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f484: 7f ff ce f9 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f488: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f48c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f490: 02 80 00 04 be 201f4a0 <rtems_rfs_fs_open+0x600> <== NOT EXECUTED
201f494: 11 00 80 d3 sethi %hi(0x2034c00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
201f498: 40 00 10 94 call 20236e8 <puts> <== NOT EXECUTED
201f49c: 90 12 23 98 or %o0, 0x398, %o0 ! 2034f98 <CSWTCH.1+0x1058><== NOT EXECUTED
errno = ENOMEM;
201f4a0: 40 00 0c e9 call 2022844 <__errno> <== NOT EXECUTED
201f4a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201f4a8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
201f4ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
201f4b0: 81 c7 e0 08 ret <== NOT EXECUTED
201f4b4: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
201f4b8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
201f4bc: 92 10 20 50 mov 0x50, %o1
201f4c0: 7f ff 98 68 call 2005660 <calloc>
201f4c4: 90 10 00 1d mov %i5, %o0
201f4c8: d0 26 20 1c st %o0, [ %i0 + 0x1c ]
if (!fs->groups)
201f4cc: 80 a2 20 00 cmp %o0, 0
201f4d0: 02 80 00 98 be 201f730 <rtems_rfs_fs_open+0x890> <== NEVER TAKEN
201f4d4: b4 10 00 08 mov %o0, %i2
/*
* 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++)
201f4d8: 80 a7 60 00 cmp %i5, 0
201f4dc: 04 80 00 38 ble 201f5bc <rtems_rfs_fs_open+0x71c> <== NEVER TAKEN
201f4e0: ba 10 20 00 clr %i5
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");
201f4e4: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
/*
* 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++)
201f4e8: 10 80 00 08 b 201f508 <rtems_rfs_fs_open+0x668>
201f4ec: b2 10 20 00 clr %i1
201f4f0: b2 06 60 01 inc %i1
201f4f4: 80 a6 40 01 cmp %i1, %g1
201f4f8: 16 80 00 31 bge 201f5bc <rtems_rfs_fs_open+0x71c> <== ALWAYS TAKEN
201f4fc: ba 07 60 50 add %i5, 0x50, %i5
201f500: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 <== NOT EXECUTED
201f504: f4 06 20 1c ld [ %i0 + 0x1c ], %i2 <== NOT EXECUTED
{
rc = rtems_rfs_group_open (fs,
rtems_rfs_fs_block (fs, group, 0),
201f508: 92 10 00 1c mov %i4, %o1
201f50c: 40 00 3f cd call 202f440 <.umul>
201f510: 90 10 00 19 mov %i1, %o0
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
201f514: d6 06 20 28 ld [ %i0 + 0x28 ], %o3
rtems_rfs_fs_block (fs, group, 0),
201f518: 92 02 20 01 add %o0, 1, %o1
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
201f51c: 94 10 00 1c mov %i4, %o2
201f520: 98 06 80 1d add %i2, %i5, %o4
201f524: 7f ff c0 5f call 200f6a0 <rtems_rfs_group_open>
201f528: 90 10 00 18 mov %i0, %o0
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
201f52c: b8 92 20 00 orcc %o0, 0, %i4
201f530: 24 bf ff f0 ble,a 201f4f0 <rtems_rfs_fs_open+0x650> <== ALWAYS TAKEN
201f534: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
{
int g;
for (g = 0; g < group; g++)
201f538: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201f53c: 22 80 00 0d be,a 201f570 <rtems_rfs_fs_open+0x6d0> <== NOT EXECUTED
201f540: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
201f544: b4 10 20 00 clr %i2 <== NOT EXECUTED
201f548: ba 10 20 00 clr %i5 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
201f54c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
201f550: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f554: 7f ff c0 e0 call 200f8d4 <rtems_rfs_group_close> <== NOT EXECUTED
201f558: 92 02 40 1a add %o1, %i2, %o1 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
201f55c: ba 07 60 01 inc %i5 <== NOT EXECUTED
201f560: 80 a7 40 19 cmp %i5, %i1 <== NOT EXECUTED
201f564: 12 bf ff fa bne 201f54c <rtems_rfs_fs_open+0x6ac> <== NOT EXECUTED
201f568: b4 06 a0 50 add %i2, 0x50, %i2 <== 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);
201f56c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
201f570: 7f ff f3 04 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201f574: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f578: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f57c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
201f580: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
201f584: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201f588: 7f ff ce b8 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f58c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
201f590: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f594: 02 bf fe 88 be 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
201f598: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
201f59c: 40 00 13 45 call 20242b0 <strerror> <== NOT EXECUTED
201f5a0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201f5a4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201f5a8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f5ac: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f5b0: 40 00 10 0d call 20235e4 <printf> <== NOT EXECUTED
201f5b4: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 20351c0 <CSWTCH.1+0x1280><== NOT EXECUTED
201f5b8: 30 bf fe 7f b,a 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
201f5bc: d0 06 c0 00 ld [ %i3 ], %o0
201f5c0: 92 10 20 01 mov 1, %o1
201f5c4: 94 07 bf cc add %fp, -52, %o2
201f5c8: 7f ff c2 69 call 200ff6c <rtems_rfs_inode_open>
201f5cc: 96 10 20 01 mov 1, %o3
if (rc > 0)
201f5d0: ba 92 20 00 orcc %o0, 0, %i5
201f5d4: 14 80 00 45 bg 201f6e8 <rtems_rfs_fs_open+0x848> <== NEVER TAKEN
201f5d8: 01 00 00 00 nop
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
201f5dc: d0 06 c0 00 ld [ %i3 ], %o0
201f5e0: c2 02 00 00 ld [ %o0 ], %g1
201f5e4: 80 88 60 04 btst 4, %g1
201f5e8: 12 80 00 10 bne 201f628 <rtems_rfs_fs_open+0x788>
201f5ec: c2 07 bf d8 ld [ %fp + -40 ], %g1
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
201f5f0: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
201f5f4: c6 08 60 02 ldub [ %g1 + 2 ], %g3
201f5f8: 83 28 e0 08 sll %g3, 8, %g1
201f5fc: 82 10 80 01 or %g2, %g1, %g1
201f600: 05 00 00 3f sethi %hi(0xfc00), %g2
201f604: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
201f608: 80 a0 40 02 cmp %g1, %g2
201f60c: 02 80 00 23 be 201f698 <rtems_rfs_fs_open+0x7f8> <== NEVER TAKEN
201f610: 05 00 00 3c sethi %hi(0xf000), %g2
201f614: 82 08 40 02 and %g1, %g2, %g1
201f618: 05 00 00 10 sethi %hi(0x4000), %g2
201f61c: 80 a0 40 02 cmp %g1, %g2
201f620: 12 80 00 1e bne 201f698 <rtems_rfs_fs_open+0x7f8> <== NEVER TAKEN
201f624: 01 00 00 00 nop
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
201f628: 7f ff c2 c8 call 2010148 <rtems_rfs_inode_close>
201f62c: 92 07 bf cc add %fp, -52, %o1
if (rc > 0)
201f630: ba 92 20 00 orcc %o0, 0, %i5
201f634: 14 80 00 07 bg 201f650 <rtems_rfs_fs_open+0x7b0> <== NEVER TAKEN
201f638: 01 00 00 00 nop
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
201f63c: 40 00 0c 82 call 2022844 <__errno>
201f640: b0 10 20 00 clr %i0 ! 0 <PROM_START>
201f644: c0 22 00 00 clr [ %o0 ]
return 0;
}
201f648: 81 c7 e0 08 ret
201f64c: 81 e8 00 00 restore
}
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
201f650: 7f ff f4 de call 201c9c8 <rtems_rfs_buffer_close> <== NOT EXECUTED
201f654: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free (*fs);
201f658: 7f ff 99 60 call 2005bd8 <free> <== NOT EXECUTED
201f65c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f660: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f664: 7f ff ce 81 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f668: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f66c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f670: 02 bf fe f8 be 201f250 <rtems_rfs_fs_open+0x3b0> <== NOT EXECUTED
201f674: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
201f678: 40 00 13 0e call 20242b0 <strerror> <== NOT EXECUTED
201f67c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201f680: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201f684: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f688: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f68c: 40 00 0f d6 call 20235e4 <printf> <== NOT EXECUTED
201f690: 90 12 22 90 or %o0, 0x290, %o0 ! 2035290 <CSWTCH.1+0x1350><== NOT EXECUTED
201f694: 30 bf fe ef b,a 201f250 <rtems_rfs_fs_open+0x3b0> <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
{
rtems_rfs_inode_close (*fs, &inode);
201f698: 7f ff c2 ac call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201f69c: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
201f6a0: 7f ff f4 ca call 201c9c8 <rtems_rfs_buffer_close> <== NOT EXECUTED
201f6a4: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free (*fs);
201f6a8: 7f ff 99 4c call 2005bd8 <free> <== NOT EXECUTED
201f6ac: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f6b0: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f6b4: 7f ff ce 6d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f6b8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f6bc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f6c0: 02 80 00 04 be 201f6d0 <rtems_rfs_fs_open+0x830> <== NOT EXECUTED
201f6c4: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
201f6c8: 40 00 10 08 call 20236e8 <puts> <== NOT EXECUTED
201f6cc: 90 12 22 60 or %o0, 0x260, %o0 ! 2035260 <CSWTCH.1+0x1320><== NOT EXECUTED
errno = EIO;
201f6d0: 40 00 0c 5d call 2022844 <__errno> <== NOT EXECUTED
201f6d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201f6d8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201f6dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
201f6e0: 81 c7 e0 08 ret <== NOT EXECUTED
201f6e4: 81 e8 00 00 restore <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
201f6e8: 7f ff f4 b8 call 201c9c8 <rtems_rfs_buffer_close> <== NOT EXECUTED
201f6ec: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free (*fs);
201f6f0: 7f ff 99 3a call 2005bd8 <free> <== NOT EXECUTED
201f6f4: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f6f8: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f6fc: 7f ff ce 5b call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f700: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
201f704: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f708: 02 bf fe d2 be 201f250 <rtems_rfs_fs_open+0x3b0> <== NOT EXECUTED
201f70c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
201f710: 40 00 12 e8 call 20242b0 <strerror> <== NOT EXECUTED
201f714: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201f718: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201f71c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f720: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f724: 40 00 0f b0 call 20235e4 <printf> <== NOT EXECUTED
201f728: 90 12 22 30 or %o0, 0x230, %o0 ! 2035230 <CSWTCH.1+0x12f0><== NOT EXECUTED
201f72c: 30 bf fe c9 b,a 201f250 <rtems_rfs_fs_open+0x3b0> <== 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);
201f730: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
201f734: 7f ff f2 93 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201f738: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
201f73c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f740: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
201f744: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
201f748: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
handle->buffer = NULL;
201f74c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
201f750: 7f ff ce 46 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201f754: b8 10 20 0c mov 0xc, %i4 <== NOT EXECUTED
201f758: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f75c: 02 bf fe 16 be 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
201f760: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
201f764: 40 00 0f e1 call 20236e8 <puts> <== NOT EXECUTED
201f768: 90 12 21 88 or %o0, 0x188, %o0 ! 2035188 <CSWTCH.1+0x1248><== NOT EXECUTED
201f76c: 30 bf fe 12 b,a 201efb4 <rtems_rfs_fs_open+0x114> <== NOT EXECUTED
0201ee54 <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
201ee54: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
201ee58: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED
201ee5c: d6 06 20 04 ld [ %i0 + 4 ], %o3 <== NOT EXECUTED
201ee60: 94 10 20 00 clr %o2 <== NOT EXECUTED
201ee64: 40 00 43 09 call 202fa88 <__muldi3> <== NOT EXECUTED
201ee68: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
201ee6c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
201ee70: 81 c7 e0 08 ret <== NOT EXECUTED
201ee74: 93 e8 00 09 restore %g0, %o1, %o1 <== NOT EXECUTED
0200f980 <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)
{
200f980: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
200f984: 80 a6 a0 00 cmp %i2, 0
200f988: 02 80 00 62 be 200fb10 <rtems_rfs_group_bitmap_alloc+0x190>
200f98c: ba 10 00 18 mov %i0, %i5
{
size = fs->group_inodes;
200f990: e8 06 20 28 ld [ %i0 + 0x28 ], %l4
goal -= RTEMS_RFS_ROOT_INO;
200f994: b2 06 7f ff add %i1, -1, %i1
}
else
size = fs->group_blocks;
group_start = goal / size;
200f998: 90 10 00 19 mov %i1, %o0
200f99c: 40 00 7e e3 call 202f528 <.udiv>
200f9a0: 92 10 00 14 mov %l4, %o1
bit = (rtems_rfs_bitmap_bit) (goal % size);
200f9a4: 92 10 00 14 mov %l4, %o1
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
200f9a8: a4 10 00 08 mov %o0, %l2
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
direction = 1;
200f9ac: a0 10 20 01 mov 1, %l0
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
200f9b0: 90 10 00 19 mov %i1, %o0
200f9b4: 40 00 7f 89 call 202f7d8 <.urem>
200f9b8: b8 10 00 12 mov %l2, %i4
offset = 0;
updown = true;
200f9bc: a2 10 20 01 mov 1, %l1
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
200f9c0: d0 27 bf f8 st %o0, [ %fp + -8 ]
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
200f9c4: c0 2f bf ff clrb [ %fp + -1 ]
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
200f9c8: b2 10 20 00 clr %i1
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
200f9cc: 80 a7 20 00 cmp %i4, 0
200f9d0: 06 80 00 30 bl 200fa90 <rtems_rfs_group_bitmap_alloc+0x110><== NEVER TAKEN
200f9d4: 80 8c 60 ff btst 0xff, %l1
200f9d8: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200f9dc: 80 a0 40 1c cmp %g1, %i4
200f9e0: 04 80 00 2c ble 200fa90 <rtems_rfs_group_bitmap_alloc+0x110><== NEVER TAKEN
200f9e4: 80 8c 60 ff btst 0xff, %l1
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
200f9e8: e6 07 60 1c ld [ %i5 + 0x1c ], %l3
200f9ec: ad 2f 20 04 sll %i4, 4, %l6
200f9f0: ab 2f 20 06 sll %i4, 6, %l5
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
200f9f4: 80 a6 a0 00 cmp %i2, 0
bitmap = &fs->groups[group].inode_bitmap;
200f9f8: 82 05 80 15 add %l6, %l5, %g1
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
200f9fc: 02 80 00 43 be 200fb08 <rtems_rfs_group_bitmap_alloc+0x188>
200fa00: a6 04 c0 01 add %l3, %g1, %l3
bitmap = &fs->groups[group].inode_bitmap;
200fa04: a6 04 e0 2c add %l3, 0x2c, %l3
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
200fa08: d2 07 bf f8 ld [ %fp + -8 ], %o1
200fa0c: 90 10 00 13 mov %l3, %o0
200fa10: 94 07 bf ff add %fp, -1, %o2
200fa14: 40 00 2c be call 201ad0c <rtems_rfs_bitmap_map_alloc>
200fa18: 96 07 bf f8 add %fp, -8, %o3
if (rc > 0)
200fa1c: b0 92 20 00 orcc %o0, 0, %i0
200fa20: 14 80 00 5c bg 200fb90 <rtems_rfs_group_bitmap_alloc+0x210><== NEVER TAKEN
200fa24: 01 00 00 00 nop
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
200fa28: c2 07 40 00 ld [ %i5 ], %g1
200fa2c: 80 88 60 01 btst 1, %g1
200fa30: 22 80 00 3a be,a 200fb18 <rtems_rfs_group_bitmap_alloc+0x198><== ALWAYS TAKEN
200fa34: d2 04 c0 00 ld [ %l3 ], %o1
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
200fa38: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
200fa3c: 80 a0 60 00 cmp %g1, 0
200fa40: 12 80 00 3a bne 200fb28 <rtems_rfs_group_bitmap_alloc+0x1a8><== ALWAYS TAKEN
200fa44: 80 8c 60 ff btst 0xff, %l1
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
200fa48: 02 80 00 06 be 200fa60 <rtems_rfs_group_bitmap_alloc+0xe0><== NOT EXECUTED
200fa4c: b2 06 60 01 inc %i1 <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
200fa50: a0 1c 20 01 xor %l0, 1, %l0 <== NOT EXECUTED
200fa54: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED
200fa58: a0 40 3f ff addx %g0, -1, %l0 <== NOT EXECUTED
200fa5c: a0 14 20 01 or %l0, 1, %l0 <== NOT EXECUTED
/*
* 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);
200fa60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200fa64: 40 00 7e 77 call 202f440 <.umul> <== NOT EXECUTED
200fa68: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (offset)
bit = direction > 0 ? 0 : size - 1;
200fa6c: 82 10 20 00 clr %g1 <== NOT EXECUTED
200fa70: 80 a4 20 01 cmp %l0, 1 <== NOT EXECUTED
200fa74: 12 80 00 17 bne 200fad0 <rtems_rfs_group_bitmap_alloc+0x150><== NOT EXECUTED
200fa78: b8 02 00 12 add %o0, %l2, %i4 <== NOT EXECUTED
200fa7c: c2 27 bf f8 st %g1, [ %fp + -8 ] <== 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))
200fa80: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
200fa84: 36 bf ff d6 bge,a 200f9dc <rtems_rfs_group_bitmap_alloc+0x5c><== NOT EXECUTED
200fa88: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 <== NOT EXECUTED
{
if (!updown)
200fa8c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
200fa90: 02 80 00 13 be 200fadc <rtems_rfs_group_bitmap_alloc+0x15c><== NOT EXECUTED
200fa94: a0 1c 20 01 xor %l0, 1, %l0 <== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
200fa98: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
200fa9c: c0 2f bf ff clrb [ %fp + -1 ] <== NOT EXECUTED
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
200faa0: a0 40 3f ff addx %g0, -1, %l0 <== NOT EXECUTED
/*
* 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);
200faa4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
200faa8: a0 14 20 01 or %l0, 1, %l0 <== NOT EXECUTED
/*
* 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);
200faac: 40 00 7e 65 call 202f440 <.umul> <== NOT EXECUTED
200fab0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if (offset)
200fab4: a2 10 20 00 clr %l1 <== NOT EXECUTED
200fab8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
200fabc: 02 bf ff c4 be 200f9cc <rtems_rfs_group_bitmap_alloc+0x4c><== NOT EXECUTED
200fac0: b8 02 00 12 add %o0, %l2, %i4 <== NOT EXECUTED
bit = direction > 0 ? 0 : size - 1;
200fac4: 80 a4 20 01 cmp %l0, 1 <== NOT EXECUTED
200fac8: 02 bf ff ed be 200fa7c <rtems_rfs_group_bitmap_alloc+0xfc><== NOT EXECUTED
200facc: 82 10 20 00 clr %g1 <== NOT EXECUTED
200fad0: 82 05 3f ff add %l4, -1, %g1 <== NOT EXECUTED
200fad4: 10 bf ff eb b 200fa80 <rtems_rfs_group_bitmap_alloc+0x100><== NOT EXECUTED
200fad8: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
offset++;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
200fadc: 90 10 20 00 clr %o0 <== NOT EXECUTED
200fae0: 13 00 00 80 sethi %hi(0x20000), %o1 <== NOT EXECUTED
200fae4: 40 00 0d 61 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
200fae8: b0 10 20 1c mov 0x1c, %i0 <== NOT EXECUTED
200faec: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
200faf0: 02 80 00 04 be 200fb00 <rtems_rfs_group_bitmap_alloc+0x180><== NOT EXECUTED
200faf4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
200faf8: 40 00 4e fc call 20236e8 <puts> <== NOT EXECUTED
200fafc: 90 12 20 a0 or %o0, 0xa0, %o0 ! 20330a0 <ramdisk_ops+0x9dc><== NOT EXECUTED
return ENOSPC;
}
200fb00: 81 c7 e0 08 ret
200fb04: 81 e8 00 00 restore
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
200fb08: 10 bf ff c0 b 200fa08 <rtems_rfs_group_bitmap_alloc+0x88>
200fb0c: a6 04 e0 08 add %l3, 8, %l3
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
200fb10: 10 bf ff a2 b 200f998 <rtems_rfs_group_bitmap_alloc+0x18>
200fb14: e8 06 20 24 ld [ %i0 + 0x24 ], %l4
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fb18: 40 00 31 9a call 201c180 <rtems_rfs_buffer_handle_release>
200fb1c: 90 10 00 1d mov %i5, %o0
if (allocated)
200fb20: 10 bf ff c7 b 200fa3c <rtems_rfs_group_bitmap_alloc+0xbc>
200fb24: c2 0f bf ff ldub [ %fp + -1 ], %g1
{
if (inode)
200fb28: 80 a6 a0 00 cmp %i2, 0
200fb2c: 32 80 00 1b bne,a 200fb98 <rtems_rfs_group_bitmap_alloc+0x218>
200fb30: d2 07 60 28 ld [ %i5 + 0x28 ], %o1
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
200fb34: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200fb38: aa 05 80 15 add %l6, %l5, %l5
200fb3c: c4 07 bf f8 ld [ %fp + -8 ], %g2
200fb40: c2 00 40 15 ld [ %g1 + %l5 ], %g1
200fb44: 82 00 80 01 add %g2, %g1, %g1
200fb48: c2 26 c0 00 st %g1, [ %i3 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
200fb4c: 90 10 20 00 clr %o0
200fb50: 13 00 00 80 sethi %hi(0x20000), %o1
200fb54: 40 00 0d 45 call 2013068 <rtems_rfs_trace>
200fb58: b0 10 20 00 clr %i0
200fb5c: 80 8a 20 ff btst 0xff, %o0
200fb60: 02 bf ff e8 be 200fb00 <rtems_rfs_group_bitmap_alloc+0x180><== ALWAYS TAKEN
200fb64: 13 00 80 cc sethi %hi(0x2033000), %o1
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
200fb68: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
200fb6c: 02 80 00 04 be 200fb7c <rtems_rfs_group_bitmap_alloc+0x1fc><== NOT EXECUTED
200fb70: 92 12 60 60 or %o1, 0x60, %o1 <== NOT EXECUTED
200fb74: 13 00 80 cc sethi %hi(0x2033000), %o1 <== NOT EXECUTED
200fb78: 92 12 60 58 or %o1, 0x58, %o1 ! 2033058 <ramdisk_ops+0x994><== NOT EXECUTED
200fb7c: d4 06 c0 00 ld [ %i3 ], %o2 <== NOT EXECUTED
200fb80: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
200fb84: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
200fb88: 40 00 4e 97 call 20235e4 <printf> <== NOT EXECUTED
200fb8c: 90 12 20 68 or %o0, 0x68, %o0 <== NOT EXECUTED
200fb90: 81 c7 e0 08 ret <== NOT EXECUTED
200fb94: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
{
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
200fb98: fa 07 bf f8 ld [ %fp + -8 ], %i5
200fb9c: 90 10 00 1c mov %i4, %o0
200fba0: 40 00 7e 28 call 202f440 <.umul>
200fba4: ba 07 60 01 inc %i5
200fba8: ba 07 40 08 add %i5, %o0, %i5
200fbac: 10 bf ff e8 b 200fb4c <rtems_rfs_group_bitmap_alloc+0x1cc>
200fbb0: fa 26 c0 00 st %i5, [ %i3 ]
0200fbb4 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
200fbb4: 9d e3 bf a0 save %sp, -96, %sp
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
200fbb8: 90 10 20 00 clr %o0
200fbbc: 13 00 00 80 sethi %hi(0x20000), %o1
200fbc0: 40 00 0d 2a call 2013068 <rtems_rfs_trace>
200fbc4: ba 10 00 18 mov %i0, %i5
200fbc8: 80 8a 20 ff btst 0xff, %o0
200fbcc: 02 80 00 0a be 200fbf4 <rtems_rfs_group_bitmap_free+0x40> <== ALWAYS TAKEN
200fbd0: 80 a6 60 00 cmp %i1, 0
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
200fbd4: 13 00 80 cc sethi %hi(0x2033000), %o1 <== NOT EXECUTED
200fbd8: 12 80 00 38 bne 200fcb8 <rtems_rfs_group_bitmap_free+0x104><== NOT EXECUTED
200fbdc: 92 12 60 60 or %o1, 0x60, %o1 ! 2033060 <ramdisk_ops+0x99c><== NOT EXECUTED
200fbe0: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
200fbe4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
200fbe8: 40 00 4e 7f call 20235e4 <printf> <== NOT EXECUTED
200fbec: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
200fbf0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
200fbf4: 22 80 00 1a be,a 200fc5c <rtems_rfs_group_bitmap_free+0xa8><== NEVER TAKEN
200fbf8: f0 07 60 24 ld [ %i5 + 0x24 ], %i0 <== NOT EXECUTED
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
200fbfc: f0 07 60 28 ld [ %i5 + 0x28 ], %i0
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
{
no -= RTEMS_RFS_ROOT_INO;
200fc00: b4 06 bf ff add %i2, -1, %i2
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
200fc04: 92 10 00 18 mov %i0, %o1
200fc08: 40 00 7e f4 call 202f7d8 <.urem>
200fc0c: 90 10 00 1a mov %i2, %o0
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
200fc10: 92 10 00 18 mov %i0, %o1
bit = (rtems_rfs_bitmap_bit) (no % size);
200fc14: b2 10 00 08 mov %o0, %i1
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
200fc18: 40 00 7e 44 call 202f528 <.udiv>
200fc1c: 90 10 00 1a mov %i2, %o0
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
200fc20: f4 07 60 1c ld [ %i5 + 0x1c ], %i2
200fc24: 83 2a 20 04 sll %o0, 4, %g1
200fc28: 91 2a 20 06 sll %o0, 6, %o0
200fc2c: 90 00 40 08 add %g1, %o0, %o0
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
200fc30: 92 10 00 19 mov %i1, %o1
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
200fc34: b4 06 80 08 add %i2, %o0, %i2
200fc38: b4 06 a0 2c add %i2, 0x2c, %i2
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
200fc3c: 40 00 2b 9e call 201aab4 <rtems_rfs_bitmap_map_clear>
200fc40: 90 10 00 1a mov %i2, %o0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fc44: d2 06 80 00 ld [ %i2 ], %o1
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
200fc48: b0 10 00 08 mov %o0, %i0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fc4c: 40 00 31 4d call 201c180 <rtems_rfs_buffer_handle_release>
200fc50: 90 10 00 1d mov %i5, %o0
return rc;
}
200fc54: 81 c7 e0 08 ret
200fc58: 81 e8 00 00 restore
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
200fc5c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
200fc60: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200fc64: 40 00 7e dd call 202f7d8 <.urem> <== NOT EXECUTED
200fc68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
200fc6c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
200fc70: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
200fc74: 40 00 7e 2d call 202f528 <.udiv> <== NOT EXECUTED
200fc78: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
200fc7c: f4 07 60 1c ld [ %i5 + 0x1c ], %i2 <== NOT EXECUTED
200fc80: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
200fc84: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
200fc88: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
200fc8c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
200fc90: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
200fc94: b4 06 a0 08 add %i2, 8, %i2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
200fc98: 40 00 2b 87 call 201aab4 <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
200fc9c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fca0: d2 06 80 00 ld [ %i2 ], %o1 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
200fca4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fca8: 40 00 31 36 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200fcac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
}
200fcb0: 81 c7 e0 08 ret <== NOT EXECUTED
200fcb4: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
200fcb8: 13 00 80 cc sethi %hi(0x2033000), %o1 <== NOT EXECUTED
200fcbc: 10 bf ff c9 b 200fbe0 <rtems_rfs_group_bitmap_free+0x2c> <== NOT EXECUTED
200fcc0: 92 12 60 58 or %o1, 0x58, %o1 ! 2033058 <ramdisk_ops+0x994><== NOT EXECUTED
0200fcc4 <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)
{
200fcc4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
200fcc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
200fccc: 13 00 00 80 sethi %hi(0x20000), %o1 <== NOT EXECUTED
200fcd0: 40 00 0c e6 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
200fcd4: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
200fcd8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
200fcdc: 02 80 00 0a be 200fd04 <rtems_rfs_group_bitmap_test+0x40> <== NOT EXECUTED
200fce0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
200fce4: 13 00 80 cc sethi %hi(0x2033000), %o1 <== NOT EXECUTED
200fce8: 12 80 00 2d bne 200fd9c <rtems_rfs_group_bitmap_test+0xd8><== NOT EXECUTED
200fcec: 92 12 60 60 or %o1, 0x60, %o1 ! 2033060 <ramdisk_ops+0x99c><== NOT EXECUTED
200fcf0: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
200fcf4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
200fcf8: 40 00 4e 3b call 20235e4 <printf> <== NOT EXECUTED
200fcfc: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
200fd00: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
200fd04: 22 80 00 0b be,a 200fd30 <rtems_rfs_group_bitmap_test+0x6c><== NOT EXECUTED
200fd08: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
200fd0c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
200fd10: 04 80 00 06 ble 200fd28 <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
200fd14: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
200fd18: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
200fd1c: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
200fd20: 28 80 00 22 bleu,a 200fda8 <rtems_rfs_group_bitmap_test+0xe4><== NOT EXECUTED
200fd24: f0 07 60 28 ld [ %i5 + 0x28 ], %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
}
200fd28: 81 c7 e0 08 ret <== NOT EXECUTED
200fd2c: 81 e8 00 00 restore <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
200fd30: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
200fd34: 1a bf ff fd bcc 200fd28 <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
200fd38: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
200fd3c: f0 07 60 24 ld [ %i5 + 0x24 ], %i0 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
200fd40: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
200fd44: 40 00 7e a5 call 202f7d8 <.urem> <== NOT EXECUTED
200fd48: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
200fd4c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
200fd50: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
200fd54: 40 00 7d f5 call 202f528 <.udiv> <== NOT EXECUTED
200fd58: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
200fd5c: f4 07 60 1c ld [ %i5 + 0x1c ], %i2 <== NOT EXECUTED
200fd60: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
200fd64: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
200fd68: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
200fd6c: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
200fd70: b4 06 a0 08 add %i2, 8, %i2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
200fd74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200fd78: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
200fd7c: 40 00 2b 71 call 201ab40 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
200fd80: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fd84: d2 06 80 00 ld [ %i2 ], %o1 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
200fd88: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
200fd8c: 40 00 30 fd call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200fd90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
}
200fd94: 81 c7 e0 08 ret <== NOT EXECUTED
200fd98: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
200fd9c: 13 00 80 cc sethi %hi(0x2033000), %o1 <== NOT EXECUTED
200fda0: 10 bf ff d4 b 200fcf0 <rtems_rfs_group_bitmap_test+0x2c> <== NOT EXECUTED
200fda4: 92 12 60 58 or %o1, 0x58, %o1 ! 2033058 <ramdisk_ops+0x994><== NOT EXECUTED
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
200fda8: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
200fdac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200fdb0: 40 00 7e 8a call 202f7d8 <.urem> <== NOT EXECUTED
200fdb4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
200fdb8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
200fdbc: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
200fdc0: 40 00 7d da call 202f528 <.udiv> <== NOT EXECUTED
200fdc4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
200fdc8: f4 07 60 1c ld [ %i5 + 0x1c ], %i2 <== NOT EXECUTED
200fdcc: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
200fdd0: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
200fdd4: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
200fdd8: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
200fddc: 10 bf ff e6 b 200fd74 <rtems_rfs_group_bitmap_test+0xb0> <== NOT EXECUTED
200fde0: b4 06 a0 2c add %i2, 0x2c, %i2 <== NOT EXECUTED
0200f8d4 <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
200f8d4: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
200f8d8: 90 10 20 00 clr %o0
200f8dc: 13 00 00 40 sethi %hi(0x10000), %o1
200f8e0: 40 00 0d e2 call 2013068 <rtems_rfs_trace>
200f8e4: ba 10 00 18 mov %i0, %i5
200f8e8: 80 8a 20 ff btst 0xff, %o0
200f8ec: 32 80 00 17 bne,a 200f948 <rtems_rfs_group_close+0x74> <== NEVER TAKEN
200f8f0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
/*
* We need to close as much as possible and also return any error if one
* occurs but this may result in one even more important error being lost but
* we cannot OR the errors together so this is a reasonable compromise.
*/
rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
200f8f4: 40 00 2d 8e call 201af2c <rtems_rfs_bitmap_close>
200f8f8: 90 06 60 2c add %i1, 0x2c, %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f8fc: 92 06 60 44 add %i1, 0x44, %o1
200f900: b8 10 00 08 mov %o0, %i4
200f904: 40 00 32 1f call 201c180 <rtems_rfs_buffer_handle_release>
200f908: 90 10 00 1d mov %i5, %o0
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
200f90c: 90 06 60 08 add %i1, 8, %o0
handle->dirty = false;
200f910: c0 2e 60 44 clrb [ %i1 + 0x44 ]
handle->bnum = 0;
200f914: c0 26 60 48 clr [ %i1 + 0x48 ]
200f918: 40 00 2d 85 call 201af2c <rtems_rfs_bitmap_close>
200f91c: c0 26 60 4c clr [ %i1 + 0x4c ]
if (rc > 0)
200f920: b0 92 20 00 orcc %o0, 0, %i0
200f924: 04 80 00 0d ble 200f958 <rtems_rfs_group_close+0x84> <== ALWAYS TAKEN
200f928: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f92c: 40 00 32 15 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f930: 92 06 60 20 add %i1, 0x20, %o1 <== NOT EXECUTED
handle->dirty = false;
200f934: c0 2e 60 20 clrb [ %i1 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
200f938: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED
handle->buffer = NULL;
200f93c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
200f940: 81 c7 e0 08 ret <== NOT EXECUTED
200f944: 81 e8 00 00 restore <== NOT EXECUTED
{
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
200f948: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
200f94c: 40 00 4f 26 call 20235e4 <printf> <== NOT EXECUTED
200f950: 90 12 20 30 or %o0, 0x30, %o0 ! 2033030 <ramdisk_ops+0x96c><== NOT EXECUTED
200f954: 30 bf ff e8 b,a 200f8f4 <rtems_rfs_group_close+0x20> <== NOT EXECUTED
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
if (rc > 0)
200f958: b0 38 00 1c xnor %g0, %i4, %i0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f95c: 92 06 60 20 add %i1, 0x20, %o1
200f960: 40 00 32 08 call 201c180 <rtems_rfs_buffer_handle_release>
200f964: b1 3e 20 1f sra %i0, 0x1f, %i0
200f968: b0 0f 00 18 and %i4, %i0, %i0
handle->dirty = false;
200f96c: c0 2e 60 20 clrb [ %i1 + 0x20 ]
handle->bnum = 0;
200f970: c0 26 60 24 clr [ %i1 + 0x24 ]
handle->buffer = NULL;
200f974: c0 26 60 28 clr [ %i1 + 0x28 ]
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
200f978: 81 c7 e0 08 ret
200f97c: 81 e8 00 00 restore
0200f6a0 <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)
{
200f6a0: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
200f6a4: c2 06 20 04 ld [ %i0 + 4 ], %g1
200f6a8: 80 a0 40 19 cmp %g1, %i1
200f6ac: 08 80 00 3b bleu 200f798 <rtems_rfs_group_open+0xf8> <== NEVER TAKEN
200f6b0: ba 10 00 18 mov %i0, %i5
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
200f6b4: 84 06 80 19 add %i2, %i1, %g2
200f6b8: 80 a0 40 02 cmp %g1, %g2
200f6bc: 28 80 00 02 bleu,a 200f6c4 <rtems_rfs_group_open+0x24> <== ALWAYS TAKEN
200f6c0: b4 20 40 19 sub %g1, %i1, %i2
size = rtems_rfs_fs_blocks (fs) - base;
200f6c4: 80 a6 80 1b cmp %i2, %i3
200f6c8: 18 80 00 25 bgu 200f75c <rtems_rfs_group_open+0xbc> <== ALWAYS TAKEN
200f6cc: a2 10 00 1a mov %i2, %l1
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
200f6d0: 90 10 20 00 clr %o0 <== NOT EXECUTED
200f6d4: 40 00 0e 65 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
200f6d8: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
200f6dc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
200f6e0: 12 80 00 27 bne 200f77c <rtems_rfs_group_open+0xdc> <== NOT EXECUTED
200f6e4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
200f6e8: f2 27 00 00 st %i1, [ %i4 ] <== NOT EXECUTED
group->size = size;
200f6ec: f4 27 20 04 st %i2, [ %i4 + 4 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200f6f0: c0 2f 20 20 clrb [ %i4 + 0x20 ]
handle->bnum = 0;
200f6f4: c0 27 20 24 clr [ %i4 + 0x24 ]
handle->buffer = NULL;
200f6f8: c0 27 20 28 clr [ %i4 + 0x28 ]
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
200f6fc: a0 07 20 08 add %i4, 8, %l0
200f700: b6 07 20 20 add %i4, 0x20, %i3
200f704: 90 10 00 10 mov %l0, %o0
200f708: 92 10 00 1d mov %i5, %o1
200f70c: 94 10 00 1b mov %i3, %o2
200f710: 96 10 00 1a mov %i2, %o3
200f714: 40 00 2d f5 call 201aee8 <rtems_rfs_bitmap_open>
200f718: 98 10 00 19 mov %i1, %o4
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
200f71c: b0 92 20 00 orcc %o0, 0, %i0
200f720: 04 80 00 37 ble 200f7fc <rtems_rfs_group_open+0x15c> <== ALWAYS TAKEN
200f724: 92 10 00 1b mov %i3, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f728: 40 00 32 96 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f72c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
200f730: 90 10 20 00 clr %o0 <== NOT EXECUTED
200f734: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
handle->dirty = false;
200f738: c0 2f 20 20 clrb [ %i4 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
200f73c: c0 27 20 24 clr [ %i4 + 0x24 ] <== NOT EXECUTED
200f740: 40 00 0e 4a call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
200f744: c0 27 20 28 clr [ %i4 + 0x28 ] <== NOT EXECUTED
200f748: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
200f74c: 12 80 00 23 bne 200f7d8 <rtems_rfs_group_open+0x138> <== NOT EXECUTED
200f750: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
200f754: 81 c7 e0 08 ret <== NOT EXECUTED
200f758: 81 e8 00 00 restore <== NOT EXECUTED
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
200f75c: 90 10 20 00 clr %o0
200f760: 13 00 00 20 sethi %hi(0x8000), %o1
200f764: 40 00 0e 41 call 2013068 <rtems_rfs_trace>
200f768: a2 10 00 1b mov %i3, %l1
200f76c: 80 8a 20 ff btst 0xff, %o0
200f770: 22 bf ff df be,a 200f6ec <rtems_rfs_group_open+0x4c> <== ALWAYS TAKEN
200f774: f2 27 00 00 st %i1, [ %i4 ]
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
200f778: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f77c: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f780: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
200f784: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
200f788: 40 00 4f 97 call 20235e4 <printf> <== NOT EXECUTED
200f78c: 90 12 23 78 or %o0, 0x378, %o0 <== NOT EXECUTED
base, size, inodes);
group->base = base;
200f790: 10 bf ff d7 b 200f6ec <rtems_rfs_group_open+0x4c> <== NOT EXECUTED
200f794: f2 27 00 00 st %i1, [ %i4 ] <== NOT EXECUTED
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
200f798: 90 10 20 00 clr %o0 <== NOT EXECUTED
200f79c: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
200f7a0: 40 00 0e 32 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
200f7a4: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
200f7a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
200f7ac: 02 80 00 48 be 200f8cc <rtems_rfs_group_open+0x22c> <== NOT EXECUTED
200f7b0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
200f7b4: 40 00 52 bf call 20242b0 <strerror> <== NOT EXECUTED
200f7b8: 90 10 20 05 mov 5, %o0 ! 5 <PROM_START+0x5> <== NOT EXECUTED
200f7bc: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
200f7c0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f7c4: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f7c8: 40 00 4f 87 call 20235e4 <printf> <== NOT EXECUTED
200f7cc: 90 12 23 38 or %o0, 0x338, %o0 ! 2032f38 <ramdisk_ops+0x874><== NOT EXECUTED
200f7d0: 81 c7 e0 08 ret <== NOT EXECUTED
200f7d4: 81 e8 00 00 restore <== NOT EXECUTED
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
200f7d8: 40 00 52 b6 call 20242b0 <strerror> <== NOT EXECUTED
200f7dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200f7e0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200f7e4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f7e8: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f7ec: 40 00 4f 7e call 20235e4 <printf> <== NOT EXECUTED
200f7f0: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 2032fb0 <ramdisk_ops+0x8ec><== NOT EXECUTED
200f7f4: 81 c7 e0 08 ret <== NOT EXECUTED
200f7f8: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
200f7fc: d8 07 00 00 ld [ %i4 ], %o4
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200f800: c0 2f 20 44 clrb [ %i4 + 0x44 ]
handle->bnum = 0;
200f804: c0 27 20 48 clr [ %i4 + 0x48 ]
handle->buffer = NULL;
200f808: c0 27 20 4c clr [ %i4 + 0x4c ]
200f80c: b4 07 20 44 add %i4, 0x44, %i2
200f810: 90 07 20 2c add %i4, 0x2c, %o0
200f814: 92 10 00 1d mov %i5, %o1
200f818: 94 10 00 1a mov %i2, %o2
200f81c: 96 10 00 11 mov %l1, %o3
200f820: 40 00 2d b2 call 201aee8 <rtems_rfs_bitmap_open>
200f824: 98 03 20 01 inc %o4
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
200f828: b0 92 20 00 orcc %o0, 0, %i0
200f82c: 04 80 00 1e ble 200f8a4 <rtems_rfs_group_open+0x204> <== ALWAYS TAKEN
200f830: 92 10 00 1a mov %i2, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f834: 40 00 32 53 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f838: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
200f83c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
200f840: c0 2f 20 44 clrb [ %i4 + 0x44 ] <== NOT EXECUTED
handle->bnum = 0;
200f844: c0 27 20 48 clr [ %i4 + 0x48 ] <== NOT EXECUTED
200f848: 40 00 2d b9 call 201af2c <rtems_rfs_bitmap_close> <== NOT EXECUTED
200f84c: c0 27 20 4c clr [ %i4 + 0x4c ] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f850: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200f854: 40 00 32 4b call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f858: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
200f85c: 90 10 20 00 clr %o0 <== NOT EXECUTED
200f860: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
handle->dirty = false;
200f864: c0 2f 20 20 clrb [ %i4 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
200f868: c0 27 20 24 clr [ %i4 + 0x24 ] <== NOT EXECUTED
200f86c: 40 00 0d ff call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
200f870: c0 27 20 28 clr [ %i4 + 0x28 ] <== NOT EXECUTED
200f874: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
200f878: 02 80 00 15 be 200f8cc <rtems_rfs_group_open+0x22c> <== NOT EXECUTED
200f87c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
200f880: 40 00 52 8c call 20242b0 <strerror> <== NOT EXECUTED
200f884: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200f888: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200f88c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f890: 11 00 80 cb sethi %hi(0x2032c00), %o0 <== NOT EXECUTED
200f894: 40 00 4f 54 call 20235e4 <printf> <== NOT EXECUTED
200f898: 90 12 23 f0 or %o0, 0x3f0, %o0 ! 2032ff0 <ramdisk_ops+0x92c><== NOT EXECUTED
200f89c: 81 c7 e0 08 ret <== NOT EXECUTED
200f8a0: 81 e8 00 00 restore <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
200f8a4: c2 07 40 00 ld [ %i5 ], %g1
200f8a8: 80 88 60 01 btst 1, %g1
200f8ac: 12 bf ff aa bne 200f754 <rtems_rfs_group_open+0xb4> <== NEVER TAKEN
200f8b0: b0 10 20 00 clr %i0
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
200f8b4: d2 07 20 08 ld [ %i4 + 8 ], %o1
200f8b8: 40 00 32 32 call 201c180 <rtems_rfs_buffer_handle_release>
200f8bc: 90 10 00 1d mov %i5, %o0
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
200f8c0: d2 07 20 2c ld [ %i4 + 0x2c ], %o1
200f8c4: 40 00 32 2f call 201c180 <rtems_rfs_buffer_handle_release>
200f8c8: 90 10 00 1d mov %i5, %o0
}
return 0;
}
200f8cc: 81 c7 e0 08 ret
200f8d0: 81 e8 00 00 restore
0200fde4 <rtems_rfs_group_usage>:
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
200fde4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int g;
*blocks = 0;
200fde8: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
*inodes = 0;
200fdec: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
200fdf0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
200fdf4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200fdf8: 04 80 00 14 ble 200fe48 <rtems_rfs_group_usage+0x64> <== NOT EXECUTED
200fdfc: 84 10 20 00 clr %g2 <== NOT EXECUTED
200fe00: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
200fe04: de 00 60 14 ld [ %g1 + 0x14 ], %o7 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
200fe08: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
200fe0c: c6 06 40 00 ld [ %i1 ], %g3 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
200fe10: 84 00 a0 01 inc %g2 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
200fe14: 86 03 c0 03 add %o7, %g3, %g3 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
200fe18: 86 20 c0 04 sub %g3, %g4, %g3 <== NOT EXECUTED
200fe1c: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
200fe20: de 00 60 38 ld [ %g1 + 0x38 ], %o7 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
200fe24: c8 00 60 3c ld [ %g1 + 0x3c ], %g4 <== NOT EXECUTED
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
200fe28: c6 06 80 00 ld [ %i2 ], %g3 <== NOT EXECUTED
200fe2c: 86 03 c0 03 add %o7, %g3, %g3 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
200fe30: 86 20 c0 04 sub %g3, %g4, %g3 <== NOT EXECUTED
200fe34: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
200fe38: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 <== NOT EXECUTED
200fe3c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
200fe40: 14 bf ff f1 bg 200fe04 <rtems_rfs_group_usage+0x20> <== NOT EXECUTED
200fe44: 82 00 60 50 add %g1, 0x50, %g1 <== NOT EXECUTED
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
200fe48: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED
200fe4c: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
200fe50: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
200fe54: 38 80 00 02 bgu,a 200fe5c <rtems_rfs_group_usage+0x78> <== NOT EXECUTED
200fe58: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
200fe5c: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
200fe60: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
200fe64: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
200fe68: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
200fe6c: 38 80 00 02 bgu,a 200fe74 <rtems_rfs_group_usage+0x90> <== NOT EXECUTED
200fe70: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
200fe74: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
200fe78: 81 c7 e0 08 ret <== NOT EXECUTED
200fe7c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02010148 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
2010148: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
201014c: 90 10 20 00 clr %o0
2010150: 40 00 0b c6 call 2013068 <rtems_rfs_trace>
2010154: 13 00 02 00 sethi %hi(0x80000), %o1
2010158: 80 8a 20 ff btst 0xff, %o0
201015c: 32 80 00 16 bne,a 20101b4 <rtems_rfs_inode_close+0x6c> <== NEVER TAKEN
2010160: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
2010164: 90 10 00 18 mov %i0, %o0
2010168: 92 10 00 19 mov %i1, %o1
201016c: 7f ff ff b8 call 201004c <rtems_rfs_inode_unload>
2010170: 94 10 20 01 mov 1, %o2
if ((rc == 0) && (handle->loads > 0))
2010174: b0 92 20 00 orcc %o0, 0, %i0
2010178: 32 80 00 0d bne,a 20101ac <rtems_rfs_inode_close+0x64> <== NEVER TAKEN
201017c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
2010180: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
2010184: 80 a0 60 00 cmp %g1, 0
2010188: 04 80 00 08 ble 20101a8 <rtems_rfs_inode_close+0x60> <== ALWAYS TAKEN
201018c: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
2010190: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
2010194: 40 00 0b b5 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010198: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201019c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20101a0: 32 80 00 0a bne,a 20101c8 <rtems_rfs_inode_close+0x80> <== NOT EXECUTED
20101a4: d2 06 60 24 ld [ %i1 + 0x24 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
20101a8: c0 26 60 08 clr [ %i1 + 8 ]
return rc;
}
20101ac: 81 c7 e0 08 ret
20101b0: 81 e8 00 00 restore
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
20101b4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20101b8: 40 00 4d 0b call 20235e4 <printf> <== NOT EXECUTED
20101bc: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 20331e0 <ramdisk_ops+0xb1c><== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
20101c0: 10 bf ff ea b 2010168 <rtems_rfs_inode_close+0x20> <== NOT EXECUTED
20101c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
20101c8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20101cc: 40 00 4d 06 call 20235e4 <printf> <== NOT EXECUTED
20101d0: 90 12 22 08 or %o0, 0x208, %o0 ! 2033208 <ramdisk_ops+0xb44><== NOT EXECUTED
handle->loads);
rc = EIO;
}
handle->ino = 0;
20101d4: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
return rc;
}
20101d8: 81 c7 e0 08 ret <== NOT EXECUTED
20101dc: 81 e8 00 00 restore <== NOT EXECUTED
020104bc <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
20104bc: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
20104c0: 90 10 20 00 clr %o0
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
20104c4: e4 07 a0 64 ld [ %fp + 0x64 ], %l2
20104c8: e2 17 a0 5e lduh [ %fp + 0x5e ], %l1
20104cc: e0 17 a0 62 lduh [ %fp + 0x62 ], %l0
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
20104d0: 13 00 10 00 sethi %hi(0x400000), %o1
20104d4: 40 00 0a e5 call 2013068 <rtems_rfs_trace>
20104d8: 27 00 00 3c sethi %hi(0xf000), %l3
20104dc: 80 8a 20 ff btst 0xff, %o0
20104e0: 02 80 00 2f be 201059c <rtems_rfs_inode_create+0xe0> <== ALWAYS TAKEN
20104e4: a6 0f 00 13 and %i4, %l3, %l3
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
20104e8: 03 00 00 10 sethi %hi(0x4000), %g1 <== NOT EXECUTED
type = "dir";
20104ec: 29 00 80 cc sethi %hi(0x2033000), %l4 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
20104f0: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
20104f4: 02 80 00 16 be 201054c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
20104f8: a8 15 22 68 or %l4, 0x268, %l4 <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
20104fc: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
type = "char";
2010500: 29 00 80 cc sethi %hi(0x2033000), %l4 <== NOT EXECUTED
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
2010504: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2010508: 02 80 00 11 be 201054c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
201050c: a8 15 22 70 or %l4, 0x270, %l4 <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
2010510: 03 00 00 18 sethi %hi(0x6000), %g1 <== NOT EXECUTED
type = "block";
2010514: 29 00 80 cc sethi %hi(0x2033000), %l4 <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
2010518: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
201051c: 02 80 00 0c be 201054c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2010520: a8 15 20 60 or %l4, 0x60, %l4 <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
2010524: 03 00 00 20 sethi %hi(0x8000), %g1 <== NOT EXECUTED
type = "file";
2010528: 29 00 80 cc sethi %hi(0x2033000), %l4 <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
201052c: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2010530: 02 80 00 07 be 201054c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2010534: a8 15 22 78 or %l4, 0x278, %l4 <== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
2010538: 03 00 00 28 sethi %hi(0xa000), %g1 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
201053c: 29 00 80 cc sethi %hi(0x2033000), %l4 <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
2010540: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2010544: 02 80 00 3e be 201063c <rtems_rfs_inode_create+0x180> <== NOT EXECUTED
2010548: a8 15 22 80 or %l4, 0x280, %l4 <== NOT EXECUTED
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
201054c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2010550: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010554: 40 00 4c 24 call 20235e4 <printf> <== NOT EXECUTED
2010558: 90 12 22 90 or %o0, 0x290, %o0 ! 2033290 <ramdisk_ops+0xbcc><== NOT EXECUTED
for (c = 0; c < length; c++)
201055c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2010560: 02 80 00 09 be 2010584 <rtems_rfs_inode_create+0xc8> <== NOT EXECUTED
2010564: 82 10 20 00 clr %g1 <== NOT EXECUTED
2010568: aa 10 20 00 clr %l5 <== NOT EXECUTED
printf ("%c", name[c]);
201056c: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 <== NOT EXECUTED
2010570: 40 00 4c 30 call 2023630 <putchar> <== NOT EXECUTED
2010574: aa 05 60 01 inc %l5 <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
2010578: 80 a5 40 1b cmp %l5, %i3 <== NOT EXECUTED
201057c: 12 bf ff fc bne 201056c <rtems_rfs_inode_create+0xb0> <== NOT EXECUTED
2010580: 82 10 00 15 mov %l5, %g1 <== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
2010584: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010588: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
201058c: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED
2010590: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2010594: 40 00 4c 14 call 20235e4 <printf> <== NOT EXECUTED
2010598: 96 0f 23 ff and %i4, 0x3ff, %o3 <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
201059c: 03 00 00 18 sethi %hi(0x6000), %g1
20105a0: 80 a4 c0 01 cmp %l3, %g1
20105a4: 02 80 00 15 be 20105f8 <rtems_rfs_inode_create+0x13c> <== NEVER TAKEN
20105a8: 90 10 00 18 mov %i0, %o0
20105ac: 04 80 00 0c ble 20105dc <rtems_rfs_inode_create+0x120>
20105b0: 03 00 00 08 sethi %hi(0x2000), %g1
20105b4: 03 00 00 20 sethi %hi(0x8000), %g1
20105b8: 80 a4 c0 01 cmp %l3, %g1
20105bc: 02 80 00 0f be 20105f8 <rtems_rfs_inode_create+0x13c>
20105c0: 03 00 00 28 sethi %hi(0xa000), %g1
20105c4: 80 a4 c0 01 cmp %l3, %g1
20105c8: 02 80 00 0d be 20105fc <rtems_rfs_inode_create+0x140> <== ALWAYS TAKEN
20105cc: 92 10 00 19 mov %i1, %o1
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
20105d0: a8 10 20 16 mov 0x16, %l4 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
20105d4: 81 c7 e0 08 ret
20105d8: 91 e8 00 14 restore %g0, %l4, %o0
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
20105dc: 80 a4 c0 01 cmp %l3, %g1
20105e0: 02 80 00 05 be 20105f4 <rtems_rfs_inode_create+0x138> <== NEVER TAKEN
20105e4: 03 00 00 10 sethi %hi(0x4000), %g1
20105e8: 80 a4 c0 01 cmp %l3, %g1
20105ec: 12 bf ff fa bne 20105d4 <rtems_rfs_inode_create+0x118> <== NEVER TAKEN
20105f0: a8 10 20 16 mov 0x16, %l4
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
20105f4: 90 10 00 18 mov %i0, %o0
20105f8: 92 10 00 19 mov %i1, %o1
20105fc: 7f ff fe 21 call 200fe80 <rtems_rfs_inode_alloc>
2010600: 94 10 00 12 mov %l2, %o2
if (rc > 0)
2010604: a8 92 20 00 orcc %o0, 0, %l4
2010608: 14 bf ff f3 bg 20105d4 <rtems_rfs_inode_create+0x118> <== NEVER TAKEN
201060c: 90 10 00 18 mov %i0, %o0
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
2010610: d2 04 80 00 ld [ %l2 ], %o1
2010614: 94 07 bf d8 add %fp, -40, %o2
2010618: 7f ff fe 55 call 200ff6c <rtems_rfs_inode_open>
201061c: 96 10 20 01 mov 1, %o3
if (rc > 0)
2010620: a8 92 20 00 orcc %o0, 0, %l4
2010624: 04 80 00 09 ble 2010648 <rtems_rfs_inode_create+0x18c> <== ALWAYS TAKEN
2010628: 90 07 bf d8 add %fp, -40, %o0
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_free (fs, *ino);
201062c: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
2010630: 7f ff fe 1e call 200fea8 <rtems_rfs_inode_free> <== NOT EXECUTED
2010634: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
2010638: 30 bf ff e7 b,a 20105d4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
201063c: 29 00 80 cc sethi %hi(0x2033000), %l4 <== NOT EXECUTED
2010640: 10 bf ff c3 b 201054c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2010644: a8 15 22 88 or %l4, 0x288, %l4 ! 2033288 <ramdisk_ops+0xbc4><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
2010648: 92 10 00 1d mov %i5, %o1
201064c: 94 10 00 1c mov %i4, %o2
2010650: 96 10 00 11 mov %l1, %o3
2010654: 7f ff ff 42 call 201035c <rtems_rfs_inode_initialise>
2010658: 98 10 00 10 mov %l0, %o4
if (rc > 0)
201065c: a8 92 20 00 orcc %o0, 0, %l4
2010660: 14 80 00 13 bg 20106ac <rtems_rfs_inode_create+0x1f0> <== NEVER TAKEN
2010664: 03 00 00 10 sethi %hi(0x4000), %g1
/*
* Only handle the specifics of a directory. Let caller handle the others.
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
2010668: 80 a4 c0 01 cmp %l3, %g1
201066c: 22 80 00 43 be,a 2010778 <rtems_rfs_inode_create+0x2bc>
2010670: d8 04 80 00 ld [ %l2 ], %o4
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
2010674: 90 10 00 18 mov %i0, %o0
2010678: 92 10 00 19 mov %i1, %o1
201067c: 94 07 bf b0 add %fp, -80, %o2
2010680: 7f ff fe 3b call 200ff6c <rtems_rfs_inode_open>
2010684: 96 10 20 01 mov 1, %o3
if (rc > 0)
2010688: a8 92 20 00 orcc %o0, 0, %l4
201068c: 04 80 00 0f ble 20106c8 <rtems_rfs_inode_create+0x20c> <== ALWAYS TAKEN
2010690: 92 07 bf d8 add %fp, -40, %o1
{
rtems_rfs_inode_delete (fs, &inode);
2010694: 7f ff fe d3 call 20101e0 <rtems_rfs_inode_delete> <== NOT EXECUTED
2010698: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
201069c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20106a0: 7f ff fe aa call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20106a4: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
20106a8: 30 bf ff cb b,a 20105d4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
20106ac: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
20106b0: 7f ff fe a6 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20106b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
20106b8: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
20106bc: 7f ff fd fb call 200fea8 <rtems_rfs_inode_free> <== NOT EXECUTED
20106c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
20106c4: 30 bf ff c4 b,a 20105d4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
20106c8: d8 04 80 00 ld [ %l2 ], %o4
20106cc: 90 10 00 18 mov %i0, %o0
20106d0: 92 07 bf b0 add %fp, -80, %o1
20106d4: 94 10 00 1a mov %i2, %o2
20106d8: 40 00 32 36 call 201cfb0 <rtems_rfs_dir_add_entry>
20106dc: 96 10 00 1b mov %i3, %o3
if (rc > 0)
20106e0: a8 92 20 00 orcc %o0, 0, %l4
20106e4: 14 80 00 3b bg 20107d0 <rtems_rfs_inode_create+0x314> <== NEVER TAKEN
20106e8: 03 00 00 10 sethi %hi(0x4000), %g1
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
20106ec: 80 a4 c0 01 cmp %l3, %g1
20106f0: 12 80 00 15 bne 2010744 <rtems_rfs_inode_create+0x288>
20106f4: 92 07 bf b0 add %fp, -80, %o1
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
20106f8: c2 07 bf bc ld [ %fp + -68 ], %g1
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
20106fc: 09 3f ff c0 sethi %hi(0xffff0000), %g4
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
2010700: c6 08 40 00 ldub [ %g1 ], %g3
2010704: c4 08 60 01 ldub [ %g1 + 1 ], %g2
2010708: 87 28 e0 08 sll %g3, 8, %g3
201070c: 84 10 c0 02 or %g3, %g2, %g2
if (links == 0xffff)
2010710: 87 28 a0 10 sll %g2, 0x10, %g3
2010714: 87 30 e0 10 srl %g3, 0x10, %g3
links = 0;
2010718: 86 39 00 03 xnor %g4, %g3, %g3
201071c: 80 a0 00 03 cmp %g0, %g3
2010720: 86 60 20 00 subx %g0, 0, %g3
2010724: 84 08 80 03 and %g2, %g3, %g2
/*
* 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,
2010728: 84 00 a0 01 inc %g2
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
201072c: 87 30 a0 08 srl %g2, 8, %g3
2010730: c6 28 40 00 stb %g3, [ %g1 ]
2010734: c2 07 bf bc ld [ %fp + -68 ], %g1
2010738: c4 28 60 01 stb %g2, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201073c: 82 10 20 01 mov 1, %g1
2010740: c2 2f bf c0 stb %g1, [ %fp + -64 ]
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
2010744: 7f ff fe 81 call 2010148 <rtems_rfs_inode_close>
2010748: 90 10 00 18 mov %i0, %o0
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
201074c: 92 07 bf d8 add %fp, -40, %o1
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
2010750: a8 10 00 08 mov %o0, %l4
if (rc > 0)
2010754: 80 a5 20 00 cmp %l4, 0
2010758: 04 80 00 28 ble 20107f8 <rtems_rfs_inode_create+0x33c> <== ALWAYS TAKEN
201075c: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_delete (fs, &inode);
2010760: 7f ff fe a0 call 20101e0 <rtems_rfs_inode_delete> <== NOT EXECUTED
2010764: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
2010768: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201076c: 7f ff fe 77 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2010770: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
2010774: 30 bf ff 98 b,a 20105d4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
2010778: 90 10 00 18 mov %i0, %o0
201077c: 92 07 bf d8 add %fp, -40, %o1
2010780: 96 10 20 01 mov 1, %o3
2010784: 15 00 80 c6 sethi %hi(0x2031800), %o2
2010788: 40 00 32 0a call 201cfb0 <rtems_rfs_dir_add_entry>
201078c: 94 12 a2 a0 or %o2, 0x2a0, %o2 ! 2031aa0 <_rodata_start+0x390>
if (rc == 0)
2010790: a8 92 20 00 orcc %o0, 0, %l4
2010794: 12 80 00 0b bne 20107c0 <rtems_rfs_inode_create+0x304> <== NEVER TAKEN
2010798: 80 a5 20 00 cmp %l4, 0
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
201079c: 90 10 00 18 mov %i0, %o0
20107a0: 92 07 bf d8 add %fp, -40, %o1
20107a4: 96 10 20 02 mov 2, %o3
20107a8: 15 00 80 c6 sethi %hi(0x2031800), %o2
20107ac: 98 10 00 19 mov %i1, %o4
20107b0: 40 00 32 00 call 201cfb0 <rtems_rfs_dir_add_entry>
20107b4: 94 12 a1 28 or %o2, 0x128, %o2
20107b8: a8 10 00 08 mov %o0, %l4
if (rc > 0)
20107bc: 80 a5 20 00 cmp %l4, 0
20107c0: 04 bf ff ae ble 2010678 <rtems_rfs_inode_create+0x1bc> <== ALWAYS TAKEN
20107c4: 90 10 00 18 mov %i0, %o0
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
20107c8: 10 bf ff b3 b 2010694 <rtems_rfs_inode_create+0x1d8> <== NOT EXECUTED
20107cc: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
20107d0: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
20107d4: 7f ff fe 83 call 20101e0 <rtems_rfs_inode_delete> <== NOT EXECUTED
20107d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20107dc: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
20107e0: 7f ff fe 5a call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20107e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
20107e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20107ec: 7f ff fe 57 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20107f0: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
return rc;
20107f4: 30 bf ff 78 b,a 20105d4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
20107f8: 7f ff fe 54 call 2010148 <rtems_rfs_inode_close>
20107fc: 01 00 00 00 nop
if (rc > 0)
2010800: a8 92 20 00 orcc %o0, 0, %l4
2010804: 34 bf ff 8b bg,a 2010630 <rtems_rfs_inode_create+0x174> <== NEVER TAKEN
2010808: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
201080c: 10 bf ff 72 b 20105d4 <rtems_rfs_inode_create+0x118>
2010810: a8 10 20 00 clr %l4
020101e0 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
20101e0: 9d e3 bf 50 save %sp, -176, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
20101e4: 90 10 20 00 clr %o0
20101e8: 13 00 20 00 sethi %hi(0x800000), %o1
20101ec: 40 00 0b 9f call 2013068 <rtems_rfs_trace>
20101f0: ba 10 00 18 mov %i0, %i5
20101f4: 80 8a 20 ff btst 0xff, %o0
20101f8: 02 80 00 0d be 201022c <rtems_rfs_inode_delete+0x4c> <== ALWAYS TAKEN
20101fc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
2010200: 15 00 80 cc sethi %hi(0x2033000), %o2 <== NOT EXECUTED
2010204: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2010208: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201020c: 02 80 00 04 be 201021c <rtems_rfs_inode_delete+0x3c> <== NOT EXECUTED
2010210: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED
2010214: 15 00 80 cc sethi %hi(0x2033000), %o2 <== NOT EXECUTED
2010218: 94 12 a1 38 or %o2, 0x138, %o2 ! 2033138 <ramdisk_ops+0xa74><== NOT EXECUTED
201021c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010220: 40 00 4c f1 call 20235e4 <printf> <== NOT EXECUTED
2010224: 90 12 22 38 or %o0, 0x238, %o0 ! 2033238 <ramdisk_ops+0xb74><== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
2010228: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201022c: 80 a0 60 00 cmp %g1, 0
2010230: 02 80 00 08 be 2010250 <rtems_rfs_inode_delete+0x70> <== NEVER TAKEN
2010234: b0 10 20 00 clr %i0
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
2010238: d2 06 60 08 ld [ %i1 + 8 ], %o1
201023c: 7f ff ff 1b call 200fea8 <rtems_rfs_inode_free>
2010240: 90 10 00 1d mov %i5, %o0
if (rc > 0)
2010244: b0 92 20 00 orcc %o0, 0, %i0
2010248: 04 80 00 04 ble 2010258 <rtems_rfs_inode_delete+0x78> <== ALWAYS TAKEN
201024c: 90 10 00 1d mov %i5, %o0
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
2010250: 81 c7 e0 08 ret <== NOT EXECUTED
2010254: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
2010258: 92 10 00 19 mov %i1, %o1
201025c: 40 00 2c 30 call 201b31c <rtems_rfs_block_map_open>
2010260: 94 07 bf b0 add %fp, -80, %o2
if (rc == 0)
2010264: b0 92 20 00 orcc %o0, 0, %i0
2010268: 12 bf ff fa bne 2010250 <rtems_rfs_inode_delete+0x70> <== NEVER TAKEN
201026c: 92 07 bf b0 add %fp, -80, %o1
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
2010270: 40 00 2f 51 call 201bfb4 <rtems_rfs_block_map_free_all>
2010274: 90 10 00 1d mov %i5, %o0
rc = rtems_rfs_block_map_close (fs, &map);
2010278: 92 07 bf b0 add %fp, -80, %o1
201027c: 40 00 2c 8c call 201b4ac <rtems_rfs_block_map_close>
2010280: 90 10 00 1d mov %i5, %o0
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
2010284: d0 06 60 0c ld [ %i1 + 0xc ], %o0
2010288: 94 10 20 38 mov 0x38, %o2
201028c: 40 00 4c 84 call 202349c <memset>
2010290: 92 10 20 ff mov 0xff, %o1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2010294: 82 10 20 01 mov 1, %g1
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
2010298: 90 10 00 1d mov %i5, %o0
201029c: 92 06 60 10 add %i1, 0x10, %o1
20102a0: 40 00 2f b8 call 201c180 <rtems_rfs_buffer_handle_release>
20102a4: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
handle->loads = 0;
20102a8: c0 26 60 24 clr [ %i1 + 0x24 ]
handle->node = NULL;
20102ac: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
return rc;
}
20102b0: 81 c7 e0 08 ret
20102b4: 91 e8 00 08 restore %g0, %o0, %o0
0200febc <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
200febc: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
200fec0: 90 10 20 00 clr %o0
200fec4: 40 00 0c 69 call 2013068 <rtems_rfs_trace>
200fec8: 13 00 04 00 sethi %hi(0x100000), %o1
200fecc: 80 8a 20 ff btst 0xff, %o0
200fed0: 02 80 00 0e be 200ff08 <rtems_rfs_inode_load+0x4c> <== ALWAYS TAKEN
200fed4: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
200fed8: 17 00 80 cc sethi %hi(0x2033000), %o3 <== NOT EXECUTED
200fedc: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
200fee0: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 <== NOT EXECUTED
200fee4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200fee8: 02 80 00 04 be 200fef8 <rtems_rfs_inode_load+0x3c> <== NOT EXECUTED
200feec: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED
200fef0: 17 00 80 cc sethi %hi(0x2033000), %o3 <== NOT EXECUTED
200fef4: 96 12 e1 38 or %o3, 0x138, %o3 ! 2033138 <ramdisk_ops+0xa74><== NOT EXECUTED
200fef8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
200fefc: 40 00 4d ba call 20235e4 <printf> <== NOT EXECUTED
200ff00: 90 12 21 48 or %o0, 0x148, %o0 ! 2033148 <ramdisk_ops+0xa84><== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
200ff04: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
200ff08: 80 a0 60 00 cmp %g1, 0
200ff0c: 22 80 00 08 be,a 200ff2c <rtems_rfs_inode_load+0x70>
200ff10: d4 06 60 1c ld [ %i1 + 0x1c ], %o2
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
200ff14: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return 0;
200ff18: b0 10 20 00 clr %i0
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
200ff1c: 82 00 60 01 inc %g1
200ff20: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
return 0;
}
200ff24: 81 c7 e0 08 ret
200ff28: 81 e8 00 00 restore
if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
200ff2c: 90 10 00 18 mov %i0, %o0
200ff30: 92 06 60 10 add %i1, 0x10, %o1
200ff34: 40 00 31 0e call 201c36c <rtems_rfs_buffer_handle_request>
200ff38: 96 10 20 01 mov 1, %o3
handle->block, true);
if (rc > 0)
200ff3c: b0 92 20 00 orcc %o0, 0, %i0
200ff40: 14 bf ff f9 bg 200ff24 <rtems_rfs_inode_load+0x68> <== NEVER TAKEN
200ff44: 01 00 00 00 nop
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
200ff48: c4 06 60 18 ld [ %i1 + 0x18 ], %g2
handle->node += handle->offset;
200ff4c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
200ff50: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2
200ff54: 87 28 60 03 sll %g1, 3, %g3
200ff58: 83 28 60 06 sll %g1, 6, %g1
200ff5c: 82 20 40 03 sub %g1, %g3, %g1
200ff60: 82 00 80 01 add %g2, %g1, %g1
200ff64: 10 bf ff ec b 200ff14 <rtems_rfs_inode_load+0x58>
200ff68: c2 26 60 0c st %g1, [ %i1 + 0xc ]
0200ff6c <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)
{
200ff6c: 9d e3 bf a0 save %sp, -96, %sp
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
200ff70: 90 10 20 00 clr %o0
200ff74: 40 00 0c 3d call 2013068 <rtems_rfs_trace>
200ff78: 13 00 01 00 sethi %hi(0x40000), %o1
200ff7c: 80 8a 20 ff btst 0xff, %o0
200ff80: 32 80 00 2e bne,a 2010038 <rtems_rfs_inode_open+0xcc> <== NEVER TAKEN
200ff84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
200ff88: 80 a6 60 00 cmp %i1, 0
200ff8c: 12 80 00 04 bne 200ff9c <rtems_rfs_inode_open+0x30> <== ALWAYS TAKEN
200ff90: 82 10 20 16 mov 0x16, %g1
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
200ff94: 81 c7 e0 08 ret <== NOT EXECUTED
200ff98: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
200ff9c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
200ffa0: ba 06 7f ff add %i1, -1, %i5
200ffa4: 80 a7 40 02 cmp %i5, %g2
200ffa8: 18 bf ff fb bgu 200ff94 <rtems_rfs_inode_open+0x28> <== NEVER TAKEN
200ffac: 01 00 00 00 nop
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
200ffb0: f8 06 20 28 ld [ %i0 + 0x28 ], %i4
gino = gino % fs->group_inodes;
200ffb4: 90 10 00 1d mov %i5, %o0
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
200ffb8: f2 26 a0 08 st %i1, [ %i2 + 8 ]
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
200ffbc: 92 10 00 1c mov %i4, %o1
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
200ffc0: c0 26 a0 0c clr [ %i2 + 0xc ]
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
200ffc4: 40 00 7e 05 call 202f7d8 <.urem>
200ffc8: c0 26 a0 24 clr [ %i2 + 0x24 ]
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
200ffcc: f2 06 20 2c ld [ %i0 + 0x2c ], %i1
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
200ffd0: a0 10 00 08 mov %o0, %l0
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
200ffd4: 40 00 7e 01 call 202f7d8 <.urem>
200ffd8: 92 10 00 19 mov %i1, %o1
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
200ffdc: 92 10 00 1c mov %i4, %o1
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
200ffe0: d0 26 a0 20 st %o0, [ %i2 + 0x20 ]
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
200ffe4: 40 00 7d 51 call 202f528 <.udiv>
200ffe8: 90 10 00 1d mov %i5, %o0
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
200ffec: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200fff0: 85 2a 20 04 sll %o0, 4, %g2
200fff4: 91 2a 20 06 sll %o0, 6, %o0
200fff8: 90 00 80 08 add %g2, %o0, %o0
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
200fffc: fa 00 40 08 ld [ %g1 + %o0 ], %i5
2010000: 92 10 00 19 mov %i1, %o1
2010004: 90 10 00 10 mov %l0, %o0
2010008: 40 00 7d 48 call 202f528 <.udiv>
201000c: ba 07 60 02 add %i5, 2, %i5
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2010010: c0 2e a0 10 clrb [ %i2 + 0x10 ]
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
2010014: ba 07 40 08 add %i5, %o0, %i5
handle->bnum = 0;
2010018: c0 26 a0 14 clr [ %i2 + 0x14 ]
201001c: fa 26 a0 1c st %i5, [ %i2 + 0x1c ]
handle->buffer = NULL;
2010020: c0 26 a0 18 clr [ %i2 + 0x18 ]
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
2010024: 80 a6 e0 00 cmp %i3, 0
2010028: 02 bf ff db be 200ff94 <rtems_rfs_inode_open+0x28> <== NEVER TAKEN
201002c: 82 10 20 00 clr %g1
rc = rtems_rfs_inode_load (fs, handle);
2010030: 7f ff ff a3 call 200febc <rtems_rfs_inode_load>
2010034: 93 e8 00 1a restore %g0, %i2, %o1
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
2010038: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
201003c: 40 00 4d 6a call 20235e4 <printf> <== NOT EXECUTED
2010040: 90 12 21 80 or %o0, 0x180, %o0 ! 2033180 <ramdisk_ops+0xabc><== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
2010044: 10 bf ff d2 b 200ff8c <rtems_rfs_inode_open+0x20> <== NOT EXECUTED
2010048: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
020102b8 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
20102b8: 9d e3 bf a0 save %sp, -96, %sp
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
20102bc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
20102c0: ba 10 00 18 mov %i0, %i5
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
20102c4: 80 a0 60 00 cmp %g1, 0
20102c8: 02 80 00 23 be 2010354 <rtems_rfs_inode_time_stamp_now+0x9c><== NEVER TAKEN
20102cc: b0 10 20 06 mov 6, %i0
return ENXIO;
now = time (NULL);
20102d0: 40 00 5a 2a call 2026b78 <time>
20102d4: 90 10 20 00 clr %o0
if (atime)
20102d8: 80 a6 60 00 cmp %i1, 0
20102dc: 02 80 00 0f be 2010318 <rtems_rfs_inode_time_stamp_now+0x60><== NEVER TAKEN
20102e0: 80 a6 a0 00 cmp %i2, 0
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
20102e4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20102e8: 85 32 20 18 srl %o0, 0x18, %g2
20102ec: c4 28 60 10 stb %g2, [ %g1 + 0x10 ]
20102f0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20102f4: 85 32 20 10 srl %o0, 0x10, %g2
20102f8: c4 28 60 11 stb %g2, [ %g1 + 0x11 ]
20102fc: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010300: 85 32 20 08 srl %o0, 8, %g2
2010304: c4 28 60 12 stb %g2, [ %g1 + 0x12 ]
2010308: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201030c: d0 28 60 13 stb %o0, [ %g1 + 0x13 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2010310: 82 10 20 01 mov 1, %g1
2010314: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
2010318: 02 80 00 0f be 2010354 <rtems_rfs_inode_time_stamp_now+0x9c><== NEVER TAKEN
201031c: b0 10 20 00 clr %i0
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2010320: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010324: 85 32 20 18 srl %o0, 0x18, %g2
2010328: c4 28 60 14 stb %g2, [ %g1 + 0x14 ]
201032c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010330: 85 32 20 10 srl %o0, 0x10, %g2
2010334: c4 28 60 15 stb %g2, [ %g1 + 0x15 ]
2010338: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201033c: 85 32 20 08 srl %o0, 8, %g2
2010340: c4 28 60 16 stb %g2, [ %g1 + 0x16 ]
2010344: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010348: d0 28 60 17 stb %o0, [ %g1 + 0x17 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201034c: 82 10 20 01 mov 1, %g1
2010350: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
2010354: 81 c7 e0 08 ret
2010358: 81 e8 00 00 restore
0201004c <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
201004c: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
2010050: 90 10 20 00 clr %o0
2010054: 13 00 08 00 sethi %hi(0x200000), %o1
2010058: 40 00 0c 04 call 2013068 <rtems_rfs_trace>
201005c: ba 10 00 18 mov %i0, %i5
2010060: 80 8a 20 ff btst 0xff, %o0
2010064: 02 80 00 0e be 201009c <rtems_rfs_inode_unload+0x50> <== ALWAYS TAKEN
2010068: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
201006c: 17 00 80 cc sethi %hi(0x2033000), %o3 <== NOT EXECUTED
2010070: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2010074: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 <== NOT EXECUTED
2010078: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201007c: 02 80 00 04 be 201008c <rtems_rfs_inode_unload+0x40> <== NOT EXECUTED
2010080: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED
2010084: 17 00 80 cc sethi %hi(0x2033000), %o3 <== NOT EXECUTED
2010088: 96 12 e1 38 or %o3, 0x138, %o3 ! 2033138 <ramdisk_ops+0xa74><== NOT EXECUTED
201008c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010090: 40 00 4d 55 call 20235e4 <printf> <== NOT EXECUTED
2010094: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 20331a8 <ramdisk_ops+0xae4><== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
2010098: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201009c: 80 a0 60 00 cmp %g1, 0
20100a0: 02 80 00 06 be 20100b8 <rtems_rfs_inode_unload+0x6c>
20100a4: b0 10 20 00 clr %i0
{
if (handle->loads == 0)
20100a8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
20100ac: 80 a0 60 00 cmp %g1, 0
20100b0: 12 80 00 04 bne 20100c0 <rtems_rfs_inode_unload+0x74> <== ALWAYS TAKEN
20100b4: b0 10 20 05 mov 5, %i0
handle->node = NULL;
}
}
return rc;
}
20100b8: 81 c7 e0 08 ret
20100bc: 81 e8 00 00 restore
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
20100c0: 82 00 7f ff add %g1, -1, %g1
20100c4: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
if (handle->loads == 0)
20100c8: 80 a0 60 00 cmp %g1, 0
20100cc: 12 bf ff fb bne 20100b8 <rtems_rfs_inode_unload+0x6c>
20100d0: b0 10 20 00 clr %i0
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
20100d4: c2 0e 60 10 ldub [ %i1 + 0x10 ], %g1
20100d8: 80 a0 60 00 cmp %g1, 0
20100dc: 02 80 00 06 be 20100f4 <rtems_rfs_inode_unload+0xa8>
20100e0: 90 10 00 1d mov %i5, %o0
20100e4: 80 a6 a0 00 cmp %i2, 0
20100e8: 12 80 00 08 bne 2010108 <rtems_rfs_inode_unload+0xbc> <== ALWAYS TAKEN
20100ec: 01 00 00 00 nop
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
20100f0: 90 10 00 1d mov %i5, %o0
20100f4: 40 00 30 23 call 201c180 <rtems_rfs_buffer_handle_release>
20100f8: 92 06 60 10 add %i1, 0x10, %o1
handle->node = NULL;
20100fc: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
return rc;
}
2010100: 81 c7 e0 08 ret
2010104: 91 e8 00 08 restore %g0, %o0, %o0
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
2010108: 40 00 5a 9c call 2026b78 <time>
201010c: 90 10 20 00 clr %o0
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
2010110: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2010114: 85 32 20 18 srl %o0, 0x18, %g2
2010118: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
201011c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2010120: 85 32 20 10 srl %o0, 0x10, %g2
2010124: c4 28 60 19 stb %g2, [ %g1 + 0x19 ]
2010128: c2 06 60 0c ld [ %i1 + 0xc ], %g1
201012c: 85 32 20 08 srl %o0, 8, %g2
2010130: c4 28 60 1a stb %g2, [ %g1 + 0x1a ]
2010134: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2010138: d0 28 60 1b stb %o0, [ %g1 + 0x1b ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201013c: 82 10 20 01 mov 1, %g1
2010140: 10 bf ff ec b 20100f0 <rtems_rfs_inode_unload+0xa4>
2010144: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
0201f7f8 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
201f7f8: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle target_inode;
uint16_t links;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
201f7fc: 90 10 20 00 clr %o0
201f800: 7f ff ce 1a call 2013068 <rtems_rfs_trace>
201f804: 13 00 40 00 sethi %hi(0x1000000), %o1
201f808: 80 8a 20 ff btst 0xff, %o0
201f80c: 12 80 00 50 bne 201f94c <rtems_rfs_link+0x154> <== NEVER TAKEN
201f810: 92 10 00 1b mov %i3, %o1
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
201f814: 90 10 00 18 mov %i0, %o0
201f818: 92 10 00 1c mov %i4, %o1
201f81c: 94 07 bf d8 add %fp, -40, %o2
201f820: 7f ff c1 d3 call 200ff6c <rtems_rfs_inode_open>
201f824: 96 10 20 01 mov 1, %o3
if (rc)
201f828: a0 92 20 00 orcc %o0, 0, %l0
201f82c: 12 80 00 3d bne 201f920 <rtems_rfs_link+0x128> <== NEVER TAKEN
201f830: 80 a7 60 00 cmp %i5, 0
/*
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
201f834: 12 80 00 0b bne 201f860 <rtems_rfs_link+0x68> <== NEVER TAKEN
201f838: 90 10 00 18 mov %i0, %o0
201f83c: c2 07 bf e4 ld [ %fp + -28 ], %g1
201f840: c4 08 60 02 ldub [ %g1 + 2 ], %g2
201f844: 03 00 00 3c sethi %hi(0xf000), %g1
201f848: 85 28 a0 08 sll %g2, 8, %g2
201f84c: 84 08 80 01 and %g2, %g1, %g2
201f850: 03 00 00 10 sethi %hi(0x4000), %g1
201f854: 80 a0 80 01 cmp %g2, %g1
201f858: 02 80 00 4f be 201f994 <rtems_rfs_link+0x19c> <== NEVER TAKEN
201f85c: 92 07 bf d8 add %fp, -40, %o1
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
201f860: 92 10 00 1b mov %i3, %o1
201f864: 94 07 bf b0 add %fp, -80, %o2
201f868: 7f ff c1 c1 call 200ff6c <rtems_rfs_inode_open>
201f86c: 96 10 20 01 mov 1, %o3
201f870: a0 10 00 08 mov %o0, %l0
if (rc)
201f874: 80 a4 20 00 cmp %l0, 0
201f878: 12 80 00 30 bne 201f938 <rtems_rfs_link+0x140> <== NEVER TAKEN
201f87c: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
201f880: 92 07 bf b0 add %fp, -80, %o1
201f884: 94 10 00 19 mov %i1, %o2
201f888: 96 10 00 1a mov %i2, %o3
201f88c: 7f ff f5 c9 call 201cfb0 <rtems_rfs_dir_add_entry>
201f890: 98 10 00 1c mov %i4, %o4
if (rc > 0)
201f894: a0 92 20 00 orcc %o0, 0, %l0
201f898: 14 80 00 24 bg 201f928 <rtems_rfs_link+0x130> <== NEVER TAKEN
201f89c: c2 07 bf e4 ld [ %fp + -28 ], %g1
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
201f8a0: 3b 3f ff c0 sethi %hi(0xffff0000), %i5
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
201f8a4: c6 08 60 01 ldub [ %g1 + 1 ], %g3
201f8a8: c8 08 40 00 ldub [ %g1 ], %g4
if (links == 0xffff)
201f8ac: 84 10 20 01 mov 1, %g2
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
201f8b0: 89 29 20 08 sll %g4, 8, %g4
201f8b4: 88 11 00 03 or %g4, %g3, %g4
if (links == 0xffff)
201f8b8: b9 29 20 10 sll %g4, 0x10, %i4
201f8bc: 80 a7 00 1d cmp %i4, %i5
201f8c0: 02 80 00 05 be 201f8d4 <rtems_rfs_link+0xdc> <== NEVER TAKEN
201f8c4: 86 10 20 00 clr %g3
201f8c8: 84 01 20 01 add %g4, 1, %g2
201f8cc: 87 28 a0 10 sll %g2, 0x10, %g3
201f8d0: 87 30 e0 18 srl %g3, 0x18, %g3
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
201f8d4: c6 28 40 00 stb %g3, [ %g1 ]
201f8d8: c2 07 bf e4 ld [ %fp + -28 ], %g1
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
201f8dc: 92 10 20 01 mov 1, %o1
201f8e0: c4 28 60 01 stb %g2, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201f8e4: 82 10 20 01 mov 1, %g1
201f8e8: 90 07 bf b0 add %fp, -80, %o0
201f8ec: c2 2f bf e8 stb %g1, [ %fp + -24 ]
201f8f0: 7f ff c2 72 call 20102b8 <rtems_rfs_inode_time_stamp_now>
201f8f4: 94 10 20 01 mov 1, %o2
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
201f8f8: 92 07 bf b0 add %fp, -80, %o1
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
201f8fc: a0 10 00 08 mov %o0, %l0
if (rc > 0)
201f900: 80 a4 20 00 cmp %l0, 0
201f904: 04 80 00 28 ble 201f9a4 <rtems_rfs_link+0x1ac> <== ALWAYS TAKEN
201f908: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &parent_inode);
201f90c: 7f ff c2 0f call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201f910: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
201f914: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f918: 7f ff c2 0c call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201f91c: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
201f920: 81 c7 e0 08 ret
201f924: 91 e8 00 10 restore %g0, %l0, %o0
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
201f928: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f92c: 7f ff c2 07 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201f930: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
201f934: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f938: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
201f93c: 7f ff c2 03 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201f940: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
201f944: 81 c7 e0 08 ret <== NOT EXECUTED
201f948: 81 e8 00 00 restore <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
201f94c: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f950: 40 00 0f 25 call 20235e4 <printf> <== NOT EXECUTED
201f954: 90 12 22 d8 or %o0, 0x2d8, %o0 ! 20352d8 <CSWTCH.1+0x1398><== NOT EXECUTED
for (c = 0; c < length; c++)
201f958: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201f95c: 04 80 00 08 ble 201f97c <rtems_rfs_link+0x184> <== NOT EXECUTED
201f960: a0 10 20 00 clr %l0 <== NOT EXECUTED
printf ("%c", name[c]);
201f964: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
201f968: 40 00 0f 32 call 2023630 <putchar> <== NOT EXECUTED
201f96c: a0 04 20 01 inc %l0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
for (c = 0; c < length; c++)
201f970: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED
201f974: 32 bf ff fd bne,a 201f968 <rtems_rfs_link+0x170> <== NOT EXECUTED
201f978: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
201f97c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201f980: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201f984: 40 00 0f 18 call 20235e4 <printf> <== NOT EXECUTED
201f988: 90 12 23 00 or %o0, 0x300, %o0 ! 2035300 <CSWTCH.1+0x13c0><== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
201f98c: 10 bf ff a3 b 201f818 <rtems_rfs_link+0x20> <== NOT EXECUTED
201f990: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
{
rtems_rfs_inode_close (fs, &target_inode);
201f994: 7f ff c1 ed call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201f998: a0 10 20 86 mov 0x86, %l0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
201f99c: 81 c7 e0 08 ret <== NOT EXECUTED
201f9a0: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
201f9a4: 7f ff c1 e9 call 2010148 <rtems_rfs_inode_close>
201f9a8: 01 00 00 00 nop
if (rc > 0)
{
rtems_rfs_inode_close (fs, &target_inode);
201f9ac: 92 07 bf d8 add %fp, -40, %o1
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
201f9b0: a0 10 00 08 mov %o0, %l0
if (rc > 0)
201f9b4: 80 a4 20 00 cmp %l0, 0
201f9b8: 14 bf ff e1 bg 201f93c <rtems_rfs_link+0x144> <== NEVER TAKEN
201f9bc: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
201f9c0: 7f ff c1 e2 call 2010148 <rtems_rfs_inode_close>
201f9c4: 01 00 00 00 nop
return rc;
201f9c8: 10 bf ff d6 b 201f920 <rtems_rfs_link+0x128>
201f9cc: a0 10 00 08 mov %o0, %l0
0202026c <rtems_rfs_mutex_create>:
RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
202026c: 9d e3 bf a0 save %sp, -96, %sp
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
2020270: 92 10 20 01 mov 1, %o1
2020274: 98 10 00 18 mov %i0, %o4
2020278: 11 14 91 94 sethi %hi(0x52465000), %o0
202027c: 94 10 20 24 mov 0x24, %o2
2020280: 90 12 23 6d or %o0, 0x36d, %o0
2020284: 96 10 20 00 clr %o3
2020288: 7f ff a7 9d call 200a0fc <rtems_semaphore_create>
202028c: b0 10 20 00 clr %i0
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
2020290: 80 a2 20 00 cmp %o0, 0
2020294: 02 80 00 0f be 20202d0 <rtems_rfs_mutex_create+0x64> <== ALWAYS TAKEN
2020298: ba 10 00 08 mov %o0, %i5
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202029c: 90 10 20 00 clr %o0 <== NOT EXECUTED
20202a0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20202a4: 7f ff cb 71 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20202a8: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
20202ac: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20202b0: 02 80 00 08 be 20202d0 <rtems_rfs_mutex_create+0x64> <== NOT EXECUTED
20202b4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
20202b8: 7f ff dc 42 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20202bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20202c0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20202c4: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
20202c8: 40 00 0c c7 call 20235e4 <printf> <== NOT EXECUTED
20202cc: 90 12 21 30 or %o0, 0x130, %o0 ! 2035530 <CSWTCH.1+0x15f0><== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
20202d0: 81 c7 e0 08 ret
20202d4: 81 e8 00 00 restore
020202d8 <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
20202d8: 9d e3 bf a0 save %sp, -96, %sp
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
20202dc: d0 06 00 00 ld [ %i0 ], %o0
20202e0: 7f ff a7 f7 call 200a2bc <rtems_semaphore_delete>
20202e4: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
20202e8: ba 92 20 00 orcc %o0, 0, %i5
20202ec: 02 80 00 0e be 2020324 <rtems_rfs_mutex_destroy+0x4c> <== ALWAYS TAKEN
20202f0: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20202f4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20202f8: 7f ff cb 5c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20202fc: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2020300: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020304: 02 80 00 08 be 2020324 <rtems_rfs_mutex_destroy+0x4c> <== NOT EXECUTED
2020308: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
202030c: 7f ff dc 2d call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020310: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020314: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020318: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
202031c: 40 00 0c b2 call 20235e4 <printf> <== NOT EXECUTED
2020320: 90 12 21 58 or %o0, 0x158, %o0 ! 2035558 <CSWTCH.1+0x1618><== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
2020324: 81 c7 e0 08 ret
2020328: 81 e8 00 00 restore
0201bfc4 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
201bfc4: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201bfc8: 90 10 20 00 clr %o0
201bfcc: 92 10 20 80 mov 0x80, %o1
201bfd0: 7f ff dc 26 call 2013068 <rtems_rfs_trace>
201bfd4: ba 10 00 18 mov %i0, %i5
201bfd8: 80 8a 20 ff btst 0xff, %o0
201bfdc: 32 80 00 1c bne,a 201c04c <rtems_rfs_release_chain+0x88> <== NEVER TAKEN
201bfe0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201bfe4: b0 10 20 00 clr %i0
201bfe8: b8 07 60 04 add %i5, 4, %i4
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201bfec: c2 07 40 00 ld [ %i5 ], %g1
201bff0: 80 a0 40 1c cmp %g1, %i4
201bff4: 02 80 00 14 be 201c044 <rtems_rfs_release_chain+0x80>
201bff8: 90 10 00 1d mov %i5, %o0
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
201bffc: 7f ff bb f8 call 200afdc <_Chain_Get>
201c000: 01 00 00 00 nop
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201c004: c2 06 40 00 ld [ %i1 ], %g1
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201c008: 92 10 00 1a mov %i2, %o1
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201c00c: 82 00 7f ff add %g1, -1, %g1
201c010: c2 26 40 00 st %g1, [ %i1 ]
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201c014: 40 00 19 0b call 2022440 <rtems_rfs_buffer_bdbuf_release>
201c018: c0 22 20 3c clr [ %o0 + 0x3c ]
if ((rc > 0) && (rrc == 0))
201c01c: 80 a2 20 00 cmp %o0, 0
201c020: 04 bf ff f4 ble 201bff0 <rtems_rfs_release_chain+0x2c> <== ALWAYS TAKEN
201c024: c2 07 40 00 ld [ %i5 ], %g1
201c028: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201c02c: 12 bf ff f1 bne 201bff0 <rtems_rfs_release_chain+0x2c> <== NOT EXECUTED
201c030: 01 00 00 00 nop <== NOT EXECUTED
201c034: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201c038: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
201c03c: 12 bf ff f0 bne 201bffc <rtems_rfs_release_chain+0x38> <== NOT EXECUTED
201c040: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
201c044: 81 c7 e0 08 ret
201c048: 81 e8 00 00 restore
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
201c04c: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c050: 40 00 1d 65 call 20235e4 <printf> <== NOT EXECUTED
201c054: 90 12 20 50 or %o0, 0x50, %o0 ! 2034050 <CSWTCH.1+0x110> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201c058: 10 bf ff e4 b 201bfe8 <rtems_rfs_release_chain+0x24> <== NOT EXECUTED
201c05c: b0 10 20 00 clr %i0 <== NOT EXECUTED
02011d98 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
2011d98: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011d9c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2011da0: f8 06 00 00 ld [ %i0 ], %i4
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011da4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011da8: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011dac: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2011db0: 94 10 20 00 clr %o2
2011db4: 7f ff e1 79 call 200a398 <rtems_semaphore_obtain>
2011db8: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2011dbc: b6 92 20 00 orcc %o0, 0, %i3
2011dc0: 12 80 00 17 bne 2011e1c <rtems_rfs_rtems_chown+0x84> <== NEVER TAKEN
2011dc4: 90 10 20 00 clr %o0
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2011dc8: 92 10 00 1c mov %i4, %o1
2011dcc: 90 10 00 1d mov %i5, %o0
2011dd0: 94 07 bf d8 add %fp, -40, %o2
2011dd4: 7f ff f8 66 call 200ff6c <rtems_rfs_inode_open>
2011dd8: 96 10 20 01 mov 1, %o3
if (rc > 0)
2011ddc: b8 92 20 00 orcc %o0, 0, %i4
2011de0: 04 80 00 22 ble 2011e68 <rtems_rfs_rtems_chown+0xd0> <== ALWAYS TAKEN
2011de4: 01 00 00 00 nop
* 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);
2011de8: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011dec: 40 00 2a 8c call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2011df0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011df4: 7f ff e1 b3 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011df8: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011dfc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011e00: 12 80 00 48 bne 2011f20 <rtems_rfs_rtems_chown+0x188> <== NOT EXECUTED
2011e04: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
2011e08: 40 00 42 8f call 2022844 <__errno> <== NOT EXECUTED
2011e0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011e10: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011e14: 81 c7 e0 08 ret <== NOT EXECUTED
2011e18: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011e1c: 40 00 04 93 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011e20: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011e24: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011e28: 02 bf ff e9 be 2011dcc <rtems_rfs_rtems_chown+0x34> <== NOT EXECUTED
2011e2c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011e30: 40 00 15 64 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011e34: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2011e38: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011e3c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011e40: 40 00 45 e9 call 20235e4 <printf> <== NOT EXECUTED
2011e44: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2011e48: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2011e4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011e50: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2011e54: 7f ff f8 46 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
2011e58: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
2011e5c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2011e60: 34 bf ff e3 bg,a 2011dec <rtems_rfs_rtems_chown+0x54> <== NOT EXECUTED
2011e64: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
2011e68: 40 00 16 2c call 2017718 <geteuid>
2011e6c: 01 00 00 00 nop
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
2011e70: c2 07 bf e4 ld [ %fp + -28 ], %g1
2011e74: 91 2a 20 10 sll %o0, 0x10, %o0
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2011e78: c4 08 60 06 ldub [ %g1 + 6 ], %g2
2011e7c: c6 08 60 07 ldub [ %g1 + 7 ], %g3
2011e80: 85 28 a0 08 sll %g2, 8, %g2
2011e84: 84 10 80 03 or %g2, %g3, %g2
2011e88: 85 28 a0 10 sll %g2, 0x10, %g2
2011e8c: 80 a0 80 08 cmp %g2, %o0
2011e90: 02 80 00 05 be 2011ea4 <rtems_rfs_rtems_chown+0x10c> <== ALWAYS TAKEN
2011e94: 89 32 20 10 srl %o0, 0x10, %g4
2011e98: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
2011e9c: 12 80 00 3e bne 2011f94 <rtems_rfs_rtems_chown+0x1fc> <== NOT EXECUTED
2011ea0: 92 07 bf d8 add %fp, -40, %o1 <== 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);
2011ea4: b5 2e a0 10 sll %i2, 0x10, %i2
2011ea8: b4 16 80 19 or %i2, %i1, %i2
2011eac: 85 36 a0 18 srl %i2, 0x18, %g2
2011eb0: c4 28 60 04 stb %g2, [ %g1 + 4 ]
2011eb4: c2 07 bf e4 ld [ %fp + -28 ], %g1
2011eb8: 85 36 a0 10 srl %i2, 0x10, %g2
2011ebc: c4 28 60 05 stb %g2, [ %g1 + 5 ]
2011ec0: c2 07 bf e4 ld [ %fp + -28 ], %g1
2011ec4: b5 36 a0 08 srl %i2, 8, %i2
2011ec8: f4 28 60 06 stb %i2, [ %g1 + 6 ]
2011ecc: c2 07 bf e4 ld [ %fp + -28 ], %g1
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
2011ed0: 90 10 00 1d mov %i5, %o0
2011ed4: f2 28 60 07 stb %i1, [ %g1 + 7 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011ed8: 82 10 20 01 mov 1, %g1
2011edc: 92 07 bf d8 add %fp, -40, %o1
2011ee0: 7f ff f8 9a call 2010148 <rtems_rfs_inode_close>
2011ee4: c2 2f bf e8 stb %g1, [ %fp + -24 ]
if (rc)
2011ee8: b8 92 20 00 orcc %o0, 0, %i4
2011eec: 32 bf ff c0 bne,a 2011dec <rtems_rfs_rtems_chown+0x54> <== NEVER TAKEN
2011ef0: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== 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);
2011ef4: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2011ef8: 40 00 2a 49 call 201c81c <rtems_rfs_buffers_release>
2011efc: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011f00: d0 07 00 00 ld [ %i4 ], %o0
2011f04: 7f ff e1 6f call 200a4c0 <rtems_semaphore_release>
2011f08: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2011f0c: ba 92 20 00 orcc %o0, 0, %i5
2011f10: 12 80 00 14 bne 2011f60 <rtems_rfs_rtems_chown+0x1c8> <== NEVER TAKEN
2011f14: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011f18: 81 c7 e0 08 ret
2011f1c: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011f20: 40 00 04 52 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011f24: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011f28: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011f2c: 02 bf ff b7 be 2011e08 <rtems_rfs_rtems_chown+0x70> <== NOT EXECUTED
2011f30: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011f34: 40 00 15 23 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011f38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011f3c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011f40: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011f44: 40 00 45 a8 call 20235e4 <printf> <== NOT EXECUTED
2011f48: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
2011f4c: 40 00 42 3e call 2022844 <__errno> <== NOT EXECUTED
2011f50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011f54: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011f58: 81 c7 e0 08 ret <== NOT EXECUTED
2011f5c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011f60: 40 00 04 42 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011f64: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011f68: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011f6c: 02 80 00 18 be 2011fcc <rtems_rfs_rtems_chown+0x234> <== NOT EXECUTED
2011f70: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011f74: 40 00 15 13 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011f78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011f7c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011f80: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011f84: 40 00 45 98 call 20235e4 <printf> <== NOT EXECUTED
2011f88: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011f8c: 81 c7 e0 08 ret <== NOT EXECUTED
2011f90: 81 e8 00 00 restore <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
2011f94: 7f ff f8 6d call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2011f98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011f9c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011fa0: 40 00 2a 1f call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2011fa4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011fa8: 7f ff e1 46 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011fac: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011fb0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011fb4: 12 80 00 08 bne 2011fd4 <rtems_rfs_rtems_chown+0x23c> <== NOT EXECUTED
2011fb8: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: not able", EPERM);
2011fbc: 40 00 42 22 call 2022844 <__errno> <== NOT EXECUTED
2011fc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011fc4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2011fc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2011fcc: 81 c7 e0 08 ret <== NOT EXECUTED
2011fd0: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011fd4: 40 00 04 25 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011fd8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011fdc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011fe0: 02 bf ff f7 be 2011fbc <rtems_rfs_rtems_chown+0x224> <== NOT EXECUTED
2011fe4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011fe8: 40 00 14 f6 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011fec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011ff0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011ff4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011ff8: 40 00 45 7b call 20235e4 <printf> <== NOT EXECUTED
2011ffc: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012000: 30 bf ff ef b,a 2011fbc <rtems_rfs_rtems_chown+0x224> <== NOT EXECUTED
02020430 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
2020430: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
2020434: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2020438: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
202043c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
2020440: f0 27 bf f4 st %i0, [ %fp + -12 ] <== NOT EXECUTED
args.flags = 0;
2020444: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
2020448: 40 00 07 07 call 2022064 <rtems_io_close> <== NOT EXECUTED
202044c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
return rtems_deviceio_errno (status);
2020450: 40 00 04 62 call 20215d8 <rtems_deviceio_errno> <== NOT EXECUTED
2020454: 01 00 00 00 nop <== NOT EXECUTED
}
2020458: 81 c7 e0 08 ret <== NOT EXECUTED
202045c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02020338 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
{
return 0;
}
2020338: 81 c3 e0 08 retl <== NOT EXECUTED
202033c: 90 10 20 00 clr %o0 <== NOT EXECUTED
02020340 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
2020340: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2020344: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2020348: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
args.iop = iop;
args.command = command;
202034c: f0 3f bf f0 std %i0, [ %fp + -16 ] <== NOT EXECUTED
args.buffer = buffer;
2020350: f4 27 bf f8 st %i2, [ %fp + -8 ] <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
2020354: 40 00 07 5d call 20220c8 <rtems_io_control> <== NOT EXECUTED
2020358: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
if (status)
202035c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2020360: 12 80 00 04 bne 2020370 <rtems_rfs_rtems_device_ioctl+0x30><== NOT EXECUTED
2020364: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
}
2020368: 81 c7 e0 08 ret <== NOT EXECUTED
202036c: 81 e8 00 00 restore <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2020370: 40 00 04 9a call 20215d8 <rtems_deviceio_errno> <== NOT EXECUTED
2020374: 01 00 00 00 nop <== NOT EXECUTED
return args.ioctl_return;
}
2020378: 81 c7 e0 08 ret <== NOT EXECUTED
202037c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0202032c <rtems_rfs_rtems_device_lseek>:
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
return offset;
}
202032c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2020330: 81 c3 e0 08 retl <== NOT EXECUTED
2020334: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
02020460 <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
2020460: 9d e3 bf 68 save %sp, -152, %sp <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2020464: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
2020468: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
const char *pathname,
uint32_t flag,
uint32_t mode)
{
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
202046c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020470: 92 10 20 00 clr %o1 <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_filesystem_default_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2020474: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2020478: 94 10 20 00 clr %o2 <== NOT EXECUTED
202047c: 7f ff a7 c7 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2020480: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020484: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2020488: 12 80 00 27 bne 2020524 <rtems_rfs_rtems_device_open+0xc4><== NOT EXECUTED
202048c: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2020490: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2020494: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020498: 94 07 bf cc add %fp, -52, %o2 <== NOT EXECUTED
202049c: 7f ff be b4 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
20204a0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
20204a4: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20204a8: 04 80 00 2c ble 2020558 <rtems_rfs_rtems_device_open+0xf8><== NOT EXECUTED
20204ac: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20204b0: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20204b4: 7f ff f0 da call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20204b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20204bc: 7f ff a8 01 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20204c0: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20204c4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20204c8: 12 80 00 07 bne 20204e4 <rtems_rfs_rtems_device_open+0x84><== NOT EXECUTED
20204cc: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
20204d0: 40 00 08 dd call 2022844 <__errno> <== NOT EXECUTED
20204d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20204d8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20204dc: 81 c7 e0 08 ret <== NOT EXECUTED
20204e0: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20204e4: 7f ff ca e1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20204e8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20204ec: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20204f0: 02 bf ff f8 be 20204d0 <rtems_rfs_rtems_device_open+0x70> <== NOT EXECUTED
20204f4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20204f8: 7f ff db b2 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20204fc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020500: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020504: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020508: 40 00 0c 37 call 20235e4 <printf> <== NOT EXECUTED
202050c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020510: 40 00 08 cd call 2022844 <__errno> <== NOT EXECUTED
2020514: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020518: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
202051c: 81 c7 e0 08 ret <== NOT EXECUTED
2020520: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020524: 7f ff ca d1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020528: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
202052c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020530: 22 bf ff d9 be,a 2020494 <rtems_rfs_rtems_device_open+0x34><== NOT EXECUTED
2020534: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2020538: 7f ff db a2 call 20173c0 <rtems_status_text> <== NOT EXECUTED
202053c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2020540: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020544: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020548: 40 00 0c 27 call 20235e4 <printf> <== NOT EXECUTED
202054c: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2020550: 10 bf ff d1 b 2020494 <rtems_rfs_rtems_device_open+0x34> <== NOT EXECUTED
2020554: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
2020558: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
202055c: e0 08 60 1c ldub [ %g1 + 0x1c ], %l0 <== NOT EXECUTED
2020560: f2 08 60 1d ldub [ %g1 + 0x1d ], %i1 <== NOT EXECUTED
2020564: f8 08 60 1e ldub [ %g1 + 0x1e ], %i4 <== NOT EXECUTED
2020568: f4 08 60 1f ldub [ %g1 + 0x1f ], %i2 <== NOT EXECUTED
202056c: e8 08 60 20 ldub [ %g1 + 0x20 ], %l4 <== NOT EXECUTED
2020570: e6 08 60 21 ldub [ %g1 + 0x21 ], %l3 <== NOT EXECUTED
2020574: e2 08 60 22 ldub [ %g1 + 0x22 ], %l1 <== NOT EXECUTED
2020578: e4 08 60 23 ldub [ %g1 + 0x23 ], %l2 <== NOT EXECUTED
202057c: 7f ff be f3 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2020580: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
if (rc > 0)
2020584: aa 92 20 00 orcc %o0, 0, %l5 <== NOT EXECUTED
2020588: 24 80 00 0f ble,a 20205c4 <rtems_rfs_rtems_device_open+0x164><== NOT EXECUTED
202058c: ea 07 60 7c ld [ %i5 + 0x7c ], %l5 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020590: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020594: 7f ff f0 a2 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020598: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
202059c: 7f ff a7 c9 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20205a0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20205a4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20205a8: 12 80 00 2d bne 202065c <rtems_rfs_rtems_device_open+0x1fc><== NOT EXECUTED
20205ac: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
20205b0: 40 00 08 a5 call 2022844 <__errno> <== NOT EXECUTED
20205b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20205b8: ea 22 00 00 st %l5, [ %o0 ] <== NOT EXECUTED
20205bc: 81 c7 e0 08 ret <== NOT EXECUTED
20205c0: 81 e8 00 00 restore <== NOT EXECUTED
20205c4: 7f ff f0 96 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20205c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20205cc: 7f ff a7 bd call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20205d0: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20205d4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20205d8: 12 80 00 2d bne 202068c <rtems_rfs_rtems_device_open+0x22c><== NOT EXECUTED
20205dc: 90 10 20 00 clr %o0 <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
20205e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
20205e4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
20205e8: a4 0c a0 ff and %l2, 0xff, %l2 <== NOT EXECUTED
20205ec: 84 0c 60 ff and %l1, 0xff, %g2 <== NOT EXECUTED
20205f0: a9 2d 20 18 sll %l4, 0x18, %l4 <== NOT EXECUTED
20205f4: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
20205f8: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED
20205fc: a7 2c e0 10 sll %l3, 0x10, %l3 <== NOT EXECUTED
2020600: a8 15 00 13 or %l4, %l3, %l4 <== NOT EXECUTED
2020604: a2 15 00 12 or %l4, %l2, %l1 <== NOT EXECUTED
2020608: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
202060c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
2020610: e2 26 20 38 st %l1, [ %i0 + 0x38 ] <== NOT EXECUTED
args.iop = iop;
2020614: f0 27 bf f4 st %i0, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
2020618: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
202061c: a1 2c 20 18 sll %l0, 0x18, %l0 <== NOT EXECUTED
2020620: b4 0e a0 ff and %i2, 0xff, %i2 <== NOT EXECUTED
args.mode = mode;
2020624: f6 27 bf fc st %i3, [ %fp + -4 ] <== NOT EXECUTED
2020628: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED
202062c: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
2020630: b3 2e 60 10 sll %i1, 0x10, %i1 <== NOT EXECUTED
2020634: b9 2f 20 08 sll %i4, 8, %i4 <== NOT EXECUTED
2020638: 90 14 00 19 or %l0, %i1, %o0 <== NOT EXECUTED
202063c: 90 12 00 1a or %o0, %i2, %o0 <== NOT EXECUTED
2020640: 90 12 00 1c or %o0, %i4, %o0 <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
2020644: 40 00 06 ba call 202212c <rtems_io_open> <== NOT EXECUTED
2020648: d0 26 20 34 st %o0, [ %i0 + 0x34 ] <== NOT EXECUTED
return rtems_deviceio_errno (status);
202064c: 40 00 03 e3 call 20215d8 <rtems_deviceio_errno> <== NOT EXECUTED
2020650: 01 00 00 00 nop <== NOT EXECUTED
}
2020654: 81 c7 e0 08 ret <== NOT EXECUTED
2020658: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202065c: 7f ff ca 83 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020660: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020664: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020668: 02 bf ff d2 be 20205b0 <rtems_rfs_rtems_device_open+0x150><== NOT EXECUTED
202066c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020670: 7f ff db 54 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020674: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020678: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
202067c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020680: 40 00 0b d9 call 20235e4 <printf> <== NOT EXECUTED
2020684: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020688: 30 bf ff ca b,a 20205b0 <rtems_rfs_rtems_device_open+0x150><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202068c: 7f ff ca 77 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020690: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020694: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020698: 22 bf ff d3 be,a 20205e4 <rtems_rfs_rtems_device_open+0x184><== NOT EXECUTED
202069c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20206a0: 7f ff db 48 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20206a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20206a8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20206ac: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20206b0: 40 00 0b cd call 20235e4 <printf> <== NOT EXECUTED
20206b4: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
20206b8: 10 bf ff cb b 20205e4 <rtems_rfs_rtems_device_open+0x184> <== NOT EXECUTED
20206bc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
020203d8 <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)
{
20203d8: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
20203dc: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
20203e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
20203e4: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
20203e8: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
args.iop = iop;
20203ec: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
20203f0: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = buffer;
20203f4: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
args.count = count;
20203f8: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
20203fc: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
args.bytes_moved = 0;
2020400: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
2020404: 40 00 07 63 call 2022190 <rtems_io_read> <== NOT EXECUTED
2020408: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
if (status)
202040c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2020410: 12 80 00 04 bne 2020420 <rtems_rfs_rtems_device_read+0x48><== NOT EXECUTED
2020414: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
2020418: 81 c7 e0 08 ret <== NOT EXECUTED
202041c: 81 e8 00 00 restore <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2020420: 40 00 04 6e call 20215d8 <rtems_deviceio_errno> <== NOT EXECUTED
2020424: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
2020428: 81 c7 e0 08 ret <== NOT EXECUTED
202042c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02020380 <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
2020380: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
2020384: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
2020388: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
202038c: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2020390: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
args.iop = iop;
2020394: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
2020398: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = (void *) buffer;
202039c: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
args.count = count;
20203a0: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
20203a4: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
args.bytes_moved = 0;
20203a8: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
20203ac: 40 00 07 92 call 20221f4 <rtems_io_write> <== NOT EXECUTED
20203b0: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
if (status)
20203b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20203b8: 12 80 00 04 bne 20203c8 <rtems_rfs_rtems_device_write+0x48><== NOT EXECUTED
20203bc: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
20203c0: 81 c7 e0 08 ret <== NOT EXECUTED
20203c4: 81 e8 00 00 restore <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
20203c8: 40 00 04 84 call 20215d8 <rtems_deviceio_errno> <== NOT EXECUTED
20203cc: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
20203d0: 81 c7 e0 08 ret <== NOT EXECUTED
20203d4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020206c8 <rtems_rfs_rtems_dir_lseek>:
*/
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
20206c8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
switch (whence)
20206cc: 80 a6 e0 01 cmp %i3, 1 <== NOT EXECUTED
20206d0: 28 80 00 09 bleu,a 20206f4 <rtems_rfs_rtems_dir_lseek+0x2c><== NOT EXECUTED
20206d4: b0 10 20 00 clr %i0 <== NOT EXECUTED
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
20206d8: 40 00 08 5b call 2022844 <__errno> <== NOT EXECUTED
20206dc: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
20206e0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20206e4: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
20206e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20206ec: 81 c7 e0 08 ret <== NOT EXECUTED
20206f0: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
break;
}
return 0;
}
20206f4: 81 c7 e0 08 ret <== NOT EXECUTED
20206f8: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
02020a84 <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
2020a84: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2020a88: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
2020a8c: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2020a90: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020a94: 92 10 20 00 clr %o1
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_dir_rmnod
};
2020a98: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2020a9c: 94 10 20 00 clr %o2
2020aa0: 7f ff a6 3e call 200a398 <rtems_semaphore_obtain>
2020aa4: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020aa8: b6 92 20 00 orcc %o0, 0, %i3
2020aac: 12 80 00 2d bne 2020b60 <rtems_rfs_rtems_dir_open+0xdc> <== NEVER TAKEN
2020ab0: 90 10 20 00 clr %o0
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2020ab4: 92 10 00 1c mov %i4, %o1
2020ab8: 90 10 00 1d mov %i5, %o0
2020abc: 94 07 bf d8 add %fp, -40, %o2
2020ac0: 7f ff bd 2b call 200ff6c <rtems_rfs_inode_open>
2020ac4: 96 10 20 01 mov 1, %o3
if (rc)
2020ac8: b8 92 20 00 orcc %o0, 0, %i4
2020acc: 32 80 00 39 bne,a 2020bb0 <rtems_rfs_rtems_dir_open+0x12c><== NEVER TAKEN
2020ad0: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
2020ad4: c2 07 bf e4 ld [ %fp + -28 ], %g1
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2020ad8: c4 08 60 02 ldub [ %g1 + 2 ], %g2
2020adc: 03 00 00 3c sethi %hi(0xf000), %g1
2020ae0: 85 28 a0 08 sll %g2, 8, %g2
2020ae4: 84 08 80 01 and %g2, %g1, %g2
2020ae8: 03 00 00 10 sethi %hi(0x4000), %g1
2020aec: 80 a0 80 01 cmp %g2, %g1
2020af0: 12 80 00 48 bne 2020c10 <rtems_rfs_rtems_dir_open+0x18c> <== NEVER TAKEN
2020af4: 92 07 bf d8 add %fp, -40, %o1
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
2020af8: c0 26 20 10 clr [ %i0 + 0x10 ]
2020afc: c0 26 20 14 clr [ %i0 + 0x14 ]
rtems_rfs_inode_close (fs, &inode);
2020b00: 7f ff bd 92 call 2010148 <rtems_rfs_inode_close>
2020b04: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020b08: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2020b0c: 7f ff ef 44 call 201c81c <rtems_rfs_buffers_release>
2020b10: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020b14: d0 07 00 00 ld [ %i4 ], %o0
2020b18: 7f ff a6 6a call 200a4c0 <rtems_semaphore_release>
2020b1c: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2020b20: ba 92 20 00 orcc %o0, 0, %i5
2020b24: 02 80 00 0d be 2020b58 <rtems_rfs_rtems_dir_open+0xd4> <== ALWAYS TAKEN
2020b28: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020b2c: 7f ff c9 4f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020b30: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020b34: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020b38: 02 80 00 44 be 2020c48 <rtems_rfs_rtems_dir_open+0x1c4> <== NOT EXECUTED
2020b3c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020b40: 7f ff da 20 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020b44: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020b48: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020b4c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020b50: 40 00 0a a5 call 20235e4 <printf> <== NOT EXECUTED
2020b54: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
2020b58: 81 c7 e0 08 ret
2020b5c: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020b60: 7f ff c9 42 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020b64: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020b68: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020b6c: 02 bf ff d3 be 2020ab8 <rtems_rfs_rtems_dir_open+0x34> <== NOT EXECUTED
2020b70: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2020b74: 7f ff da 13 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020b78: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2020b7c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020b80: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020b84: 40 00 0a 98 call 20235e4 <printf> <== NOT EXECUTED
2020b88: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2020b8c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2020b90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020b94: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2020b98: 7f ff bc f5 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
2020b9c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2020ba0: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2020ba4: 02 bf ff cd be 2020ad8 <rtems_rfs_rtems_dir_open+0x54> <== NOT EXECUTED
2020ba8: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020bac: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020bb0: 7f ff ef 1b call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020bb4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020bb8: 7f ff a6 42 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2020bbc: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020bc0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2020bc4: 12 80 00 07 bne 2020be0 <rtems_rfs_rtems_dir_open+0x15c> <== NOT EXECUTED
2020bc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
2020bcc: 40 00 07 1e call 2022844 <__errno> <== NOT EXECUTED
2020bd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020bd4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2020bd8: 81 c7 e0 08 ret <== NOT EXECUTED
2020bdc: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020be0: 7f ff c9 22 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020be4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020be8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020bec: 02 bf ff f8 be 2020bcc <rtems_rfs_rtems_dir_open+0x148> <== NOT EXECUTED
2020bf0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020bf4: 7f ff d9 f3 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020bf8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020bfc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020c00: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020c04: 40 00 0a 78 call 20235e4 <printf> <== NOT EXECUTED
2020c08: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020c0c: 30 bf ff f0 b,a 2020bcc <rtems_rfs_rtems_dir_open+0x148> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
2020c10: 7f ff bd 4e call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2020c14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020c18: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020c1c: 7f ff ef 00 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020c20: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020c24: 7f ff a6 27 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2020c28: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020c2c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2020c30: 12 80 00 08 bne 2020c50 <rtems_rfs_rtems_dir_open+0x1cc> <== NOT EXECUTED
2020c34: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
2020c38: 40 00 07 03 call 2022844 <__errno> <== NOT EXECUTED
2020c3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020c40: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2020c44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2020c48: 81 c7 e0 08 ret <== NOT EXECUTED
2020c4c: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020c50: 7f ff c9 06 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020c54: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020c58: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020c5c: 02 bf ff f7 be 2020c38 <rtems_rfs_rtems_dir_open+0x1b4> <== NOT EXECUTED
2020c60: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020c64: 7f ff d9 d7 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020c68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020c6c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020c70: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020c74: 40 00 0a 5c call 20235e4 <printf> <== NOT EXECUTED
2020c78: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020c7c: 30 bf ff ef b,a 2020c38 <rtems_rfs_rtems_dir_open+0x1b4> <== NOT EXECUTED
0202086c <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
202086c: 9d e3 bf 70 save %sp, -144, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2020870: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
2020874: f6 06 20 1c ld [ %i0 + 0x1c ], %i3 <== 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);
2020878: f8 00 60 34 ld [ %g1 + 0x34 ], %i4 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
202087c: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_dir_rmnod
};
2020880: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020884: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020888: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
202088c: 7f ff a6 c3 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2020890: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020894: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2020898: 12 80 00 40 bne 2020998 <rtems_rfs_rtems_dir_read+0x12c> <== NOT EXECUTED
202089c: 90 10 20 00 clr %o0 <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20208a0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20208a4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20208a8: 94 07 bf d4 add %fp, -44, %o2 <== NOT EXECUTED
20208ac: 7f ff bd b0 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
20208b0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
20208b4: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
20208b8: 32 80 00 4c bne,a 20209e8 <rtems_rfs_rtems_dir_read+0x17c><== NOT EXECUTED
20208bc: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
20208c0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
20208c4: 92 10 21 18 mov 0x118, %o1 <== NOT EXECUTED
20208c8: 40 00 3b 18 call 202f528 <.udiv> <== NOT EXECUTED
20208cc: b0 10 20 00 clr %i0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
20208d0: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
20208d4: 02 80 00 1a be 202093c <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
20208d8: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
20208dc: d4 1f 60 10 ldd [ %i5 + 0x10 ], %o2 <== 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,
20208e0: b6 10 20 00 clr %i3 <== NOT EXECUTED
20208e4: 10 80 00 0d b 2020918 <rtems_rfs_rtems_dir_read+0xac> <== NOT EXECUTED
20208e8: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (rc == ENOENT)
{
rc = 0;
break;
}
if (rc > 0)
20208ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20208f0: 14 80 00 4a bg 2020a18 <rtems_rfs_rtems_dir_read+0x1ac> <== NOT EXECUTED
20208f4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
20208f8: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
20208fc: b6 06 e0 01 inc %i3 <== NOT EXECUTED
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
2020900: 96 80 c0 0a addcc %g3, %o2, %o3 <== NOT EXECUTED
2020904: 94 40 a0 00 addx %g2, 0, %o2 <== NOT EXECUTED
2020908: d4 3f 60 10 std %o2, [ %i5 + 0x10 ] <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
202090c: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
2020910: 02 80 00 0a be 2020938 <rtems_rfs_rtems_dir_read+0xcc> <== NOT EXECUTED
2020914: b0 06 21 18 add %i0, 0x118, %i0 <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
2020918: 98 06 40 18 add %i1, %i0, %o4 <== NOT EXECUTED
202091c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2020920: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
2020924: 7f ff f3 d0 call 201d864 <rtems_rfs_dir_read> <== NOT EXECUTED
2020928: 9a 07 bf fc add %fp, -4, %o5 <== NOT EXECUTED
if (rc == ENOENT)
202092c: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED
2020930: 12 bf ff ef bne 20208ec <rtems_rfs_rtems_dir_read+0x80> <== NOT EXECUTED
2020934: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2020938: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
202093c: 7f ff be 03 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2020940: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020944: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020948: 7f ff ef b5 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
202094c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020950: 7f ff a6 dc call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2020954: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020958: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
202095c: 02 80 00 0d be 2020990 <rtems_rfs_rtems_dir_read+0x124> <== NOT EXECUTED
2020960: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020964: 7f ff c9 c1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020968: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
202096c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020970: 02 80 00 28 be 2020a10 <rtems_rfs_rtems_dir_read+0x1a4> <== NOT EXECUTED
2020974: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020978: 7f ff da 92 call 20173c0 <rtems_status_text> <== NOT EXECUTED
202097c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020980: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020984: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020988: 40 00 0b 17 call 20235e4 <printf> <== NOT EXECUTED
202098c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
2020990: 81 c7 e0 08 ret <== NOT EXECUTED
2020994: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020998: 7f ff c9 b4 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
202099c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20209a0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20209a4: 02 bf ff c0 be 20208a4 <rtems_rfs_rtems_dir_read+0x38> <== NOT EXECUTED
20209a8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20209ac: 7f ff da 85 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20209b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20209b4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20209b8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20209bc: 40 00 0b 0a call 20235e4 <printf> <== NOT EXECUTED
20209c0: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20209c4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20209c8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20209cc: 94 07 bf d4 add %fp, -44, %o2 <== NOT EXECUTED
20209d0: 7f ff bd 67 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
20209d4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
20209d8: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
20209dc: 02 bf ff ba be 20208c4 <rtems_rfs_rtems_dir_read+0x58> <== NOT EXECUTED
20209e0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20209e4: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20209e8: 7f ff ef 8d call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20209ec: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20209f0: 7f ff a6 b4 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20209f4: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20209f8: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20209fc: 12 80 00 16 bne 2020a54 <rtems_rfs_rtems_dir_read+0x1e8> <== NOT EXECUTED
2020a00: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
2020a04: 40 00 07 90 call 2022844 <__errno> <== NOT EXECUTED
2020a08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020a0c: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2020a10: 81 c7 e0 08 ret <== NOT EXECUTED
2020a14: 81 e8 00 00 restore <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
2020a18: 40 00 07 8b call 2022844 <__errno> <== NOT EXECUTED
2020a1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2020a20: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
2020a24: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2020a28: 7f ff bd c8 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2020a2c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020a30: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020a34: 7f ff ef 7a call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020a38: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020a3c: 7f ff a6 a1 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2020a40: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020a44: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2020a48: 02 bf ff d2 be 2020990 <rtems_rfs_rtems_dir_read+0x124> <== NOT EXECUTED
2020a4c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2020a50: 30 bf ff c5 b,a 2020964 <rtems_rfs_rtems_dir_read+0xf8> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020a54: 7f ff c9 85 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020a58: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020a5c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020a60: 02 bf ff e9 be 2020a04 <rtems_rfs_rtems_dir_read+0x198> <== NOT EXECUTED
2020a64: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020a68: 7f ff da 56 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020a6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020a70: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020a74: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020a78: 40 00 0a db call 20235e4 <printf> <== NOT EXECUTED
2020a7c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020a80: 30 bf ff e1 b,a 2020a04 <rtems_rfs_rtems_dir_read+0x198> <== NOT EXECUTED
020206fc <rtems_rfs_rtems_dir_rmnod>:
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
20206fc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2020700: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2020704: f8 06 40 00 ld [ %i1 ], %i4 <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2020708: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
202070c: f4 06 00 00 ld [ %i0 ], %i2 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
2020710: 80 a7 20 01 cmp %i4, 1 <== NOT EXECUTED
2020714: 02 80 00 50 be 2020854 <rtems_rfs_rtems_dir_rmnod+0x158> <== NOT EXECUTED
2020718: f6 06 60 04 ld [ %i1 + 4 ], %i3 <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_dir_rmnod
};
202071c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020720: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020724: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
2020728: 7f ff a7 1c call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
202072c: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020730: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED
2020734: 12 80 00 22 bne 20207bc <rtems_rfs_rtems_dir_rmnod+0xc0> <== NOT EXECUTED
2020738: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
202073c: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2020740: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020744: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2020748: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
202074c: 7f ff fc a1 call 201f9d0 <rtems_rfs_unlink> <== NOT EXECUTED
2020750: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
if (rc)
2020754: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2020758: 22 80 00 0f be,a 2020794 <rtems_rfs_rtems_dir_rmnod+0x98><== NOT EXECUTED
202075c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== 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);
2020760: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020764: 7f ff f0 2e call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020768: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
202076c: 7f ff a7 55 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2020770: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020774: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2020778: 12 80 00 2b bne 2020824 <rtems_rfs_rtems_dir_rmnod+0x128> <== NOT EXECUTED
202077c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
2020780: 40 00 08 31 call 2022844 <__errno> <== NOT EXECUTED
2020784: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020788: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
202078c: 81 c7 e0 08 ret <== NOT EXECUTED
2020790: 81 e8 00 00 restore <== NOT EXECUTED
2020794: 7f ff f0 22 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020798: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
202079c: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
20207a0: 7f ff a7 48 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20207a4: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20207a8: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20207ac: 12 80 00 11 bne 20207f0 <rtems_rfs_rtems_dir_rmnod+0xf4> <== NOT EXECUTED
20207b0: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
20207b4: 81 c7 e0 08 ret <== NOT EXECUTED
20207b8: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20207bc: 7f ff ca 2b call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20207c0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20207c4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20207c8: 22 bf ff de be,a 2020740 <rtems_rfs_rtems_dir_rmnod+0x44><== NOT EXECUTED
20207cc: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20207d0: 7f ff da fc call 20173c0 <rtems_status_text> <== NOT EXECUTED
20207d4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20207d8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20207dc: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20207e0: 40 00 0b 81 call 20235e4 <printf> <== NOT EXECUTED
20207e4: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
20207e8: 10 bf ff d6 b 2020740 <rtems_rfs_rtems_dir_rmnod+0x44> <== NOT EXECUTED
20207ec: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20207f0: 7f ff ca 1e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20207f4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20207f8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20207fc: 02 80 00 1a be 2020864 <rtems_rfs_rtems_dir_rmnod+0x168> <== NOT EXECUTED
2020800: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020804: 7f ff da ef call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020808: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
202080c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020810: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020814: 40 00 0b 74 call 20235e4 <printf> <== NOT EXECUTED
2020818: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
202081c: 81 c7 e0 08 ret <== NOT EXECUTED
2020820: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020824: 7f ff ca 11 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020828: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
202082c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020830: 02 bf ff d4 be 2020780 <rtems_rfs_rtems_dir_rmnod+0x84> <== NOT EXECUTED
2020834: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020838: 7f ff da e2 call 20173c0 <rtems_status_text> <== NOT EXECUTED
202083c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020840: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020844: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020848: 40 00 0b 67 call 20235e4 <printf> <== NOT EXECUTED
202084c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020850: 30 bf ff cc b,a 2020780 <rtems_rfs_rtems_dir_rmnod+0x84> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
2020854: 40 00 07 fc call 2022844 <__errno> <== NOT EXECUTED
2020858: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202085c: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED
2020860: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2020864: 81 c7 e0 08 ret <== NOT EXECUTED
2020868: 81 e8 00 00 restore <== NOT EXECUTED
02012004 <rtems_rfs_rtems_eval_for_make>:
*/
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
2012004: 9d e3 bf 68 save %sp, -152, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012008: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
201200c: c2 06 40 00 ld [ %i1 ], %g1
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012010: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012014: c2 27 bf f4 st %g1, [ %fp + -12 ]
rtems_rfs_ino node_ino;
uint32_t doff = 0;
2012018: c0 27 bf fc clr [ %fp + -4 ]
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
201201c: 40 00 48 ad call 20242d0 <strlen>
2012020: 90 10 00 18 mov %i0, %o0
2012024: 90 06 00 08 add %i0, %o0, %o0
2012028: d0 26 80 00 st %o0, [ %i2 ]
while (*name != path)
201202c: 80 a6 00 08 cmp %i0, %o0
2012030: 02 80 00 0b be 201205c <rtems_rfs_rtems_eval_for_make+0x58>
2012034: 82 02 3f ff add %o0, -1, %g1
{
(*name)--;
2012038: c2 26 80 00 st %g1, [ %i2 ]
if (rtems_filesystem_is_separator (**name))
201203c: 7f ff d5 41 call 2007540 <rtems_filesystem_is_separator>
2012040: d0 4a 3f ff ldsb [ %o0 + -1 ], %o0
2012044: 80 a2 20 00 cmp %o0, 0
2012048: 22 bf ff f9 be,a 201202c <rtems_rfs_rtems_eval_for_make+0x28>
201204c: d0 06 80 00 ld [ %i2 ], %o0
{
(*name)++;
2012050: c2 06 80 00 ld [ %i2 ], %g1
2012054: 82 00 60 01 inc %g1
2012058: c2 26 80 00 st %g1, [ %i2 ]
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
201205c: 40 00 48 9d call 20242d0 <strlen>
2012060: 90 10 00 18 mov %i0, %o0
2012064: 92 10 00 08 mov %o0, %o1
2012068: 7f ff ce 5f call 20059e4 <rtems_filesystem_prefix_separators>
201206c: 90 10 00 18 mov %i0, %o0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2012070: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
path += stripped;
2012074: a2 06 00 08 add %i0, %o0, %l1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012078: d0 00 40 00 ld [ %g1 ], %o0
201207c: 92 10 20 00 clr %o1
2012080: 7f ff e0 c6 call 200a398 <rtems_semaphore_obtain>
2012084: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2012088: b8 92 20 00 orcc %o0, 0, %i4
201208c: 12 80 00 b8 bne 201236c <rtems_rfs_rtems_eval_for_make+0x368><== NEVER TAKEN
2012090: 90 10 20 00 clr %o0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
2012094: 21 00 80 c6 sethi %hi(0x2031800), %l0
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
2012098: 31 00 00 3c sethi %hi(0xf000), %i0
201209c: 37 00 00 10 sethi %hi(0x4000), %i3
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
20120a0: a0 14 21 28 or %l0, 0x128, %l0
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20120a4: d2 07 bf f4 ld [ %fp + -12 ], %o1
20120a8: 90 10 00 1d mov %i5, %o0
20120ac: 94 07 bf cc add %fp, -52, %o2
20120b0: 7f ff f7 af call 200ff6c <rtems_rfs_inode_open>
20120b4: 96 10 20 01 mov 1, %o3
if (rc > 0)
20120b8: b8 92 20 00 orcc %o0, 0, %i4
20120bc: 14 80 00 6b bg 2012268 <rtems_rfs_rtems_eval_for_make+0x264><== NEVER TAKEN
20120c0: c2 07 bf d8 ld [ %fp + -40 ], %g1
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
20120c4: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
20120c8: c6 08 60 02 ldub [ %g1 + 2 ], %g3
20120cc: 83 28 e0 08 sll %g3, 8, %g1
20120d0: 82 10 80 01 or %g2, %g1, %g1
20120d4: 82 08 40 18 and %g1, %i0, %g1
20120d8: 80 a0 40 1b cmp %g1, %i3
20120dc: 02 80 00 70 be 201229c <rtems_rfs_rtems_eval_for_make+0x298>
20120e0: 90 07 bf cc add %fp, -52, %o0
}
/*
* Is this the end of the pathname we where given ?
*/
if (path == *name)
20120e4: c2 06 80 00 ld [ %i2 ], %g1
20120e8: 80 a0 40 11 cmp %g1, %l1
20120ec: 02 80 00 3f be 20121e8 <rtems_rfs_rtems_eval_for_make+0x1e4>
20120f0: c2 07 bf d8 ld [ %fp + -40 ], %g1
20120f4: b8 10 00 11 mov %l1, %i4
20120f8: 10 80 00 0c b 2012128 <rtems_rfs_rtems_eval_for_make+0x124>
20120fc: a4 10 20 00 clr %l2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
2012100: 80 a0 60 00 cmp %g1, 0
2012104: 02 80 00 0e be 201213c <rtems_rfs_rtems_eval_for_make+0x138><== NEVER TAKEN
2012108: 01 00 00 00 nop
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
201210c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2012110: 82 00 7f ff add %g1, -1, %g1
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
(*path != '\0') &&
2012114: 80 a4 80 01 cmp %l2, %g1
2012118: 1a 80 00 09 bcc 201213c <rtems_rfs_rtems_eval_for_make+0x138><== NEVER TAKEN
201211c: 01 00 00 00 nop
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
{
node_len++;
2012120: a4 04 a0 01 inc %l2
path++;
2012124: b8 07 20 01 inc %i4
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
2012128: 7f ff d5 06 call 2007540 <rtems_filesystem_is_separator>
201212c: d0 4f 00 00 ldsb [ %i4 ], %o0
2012130: 80 a2 20 00 cmp %o0, 0
2012134: 22 bf ff f3 be,a 2012100 <rtems_rfs_rtems_eval_for_make+0xfc>
2012138: c2 4f 00 00 ldsb [ %i4 ], %g1
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
201213c: 40 00 48 65 call 20242d0 <strlen>
2012140: 90 10 00 1c mov %i4, %o0
2012144: 92 10 00 08 mov %o0, %o1
2012148: 7f ff ce 27 call 20059e4 <rtems_filesystem_prefix_separators>
201214c: 90 10 00 1c mov %i4, %o0
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2012150: c2 4c 40 00 ldsb [ %l1 ], %g1
2012154: 80 a0 60 2e cmp %g1, 0x2e
2012158: 02 80 00 1b be 20121c4 <rtems_rfs_rtems_eval_for_make+0x1c0><== NEVER TAKEN
201215c: b8 07 00 08 add %i4, %o0, %i4
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
2012160: c2 4f 00 00 ldsb [ %i4 ], %g1
2012164: 80 a0 60 2e cmp %g1, 0x2e
2012168: 12 80 00 07 bne 2012184 <rtems_rfs_rtems_eval_for_make+0x180><== ALWAYS TAKEN
201216c: 90 10 00 1d mov %i5, %o0
2012170: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1 <== NOT EXECUTED
2012174: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED
2012178: 22 80 00 6b be,a 2012324 <rtems_rfs_rtems_eval_for_make+0x320><== NOT EXECUTED
201217c: d0 4f 20 02 ldsb [ %i4 + 2 ], %o0 <== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2012180: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012184: 92 07 bf cc add %fp, -52, %o1
2012188: 94 10 00 11 mov %l1, %o2
201218c: 96 10 00 12 mov %l2, %o3
2012190: 98 07 bf f4 add %fp, -12, %o4
2012194: 40 00 2a 34 call 201ca64 <rtems_rfs_dir_lookup_ino>
2012198: 9a 07 bf fc add %fp, -4, %o5
node, node_len - stripped, &ino, &doff);
if (rc > 0)
201219c: a2 92 20 00 orcc %o0, 0, %l1
20121a0: 14 80 00 af bg 201245c <rtems_rfs_rtems_eval_for_make+0x458>
20121a4: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%" PRId32 "\n",
node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
20121a8: 7f ff f7 e8 call 2010148 <rtems_rfs_inode_close>
20121ac: 92 07 bf cc add %fp, -52, %o1
if (rc > 0)
20121b0: a2 92 20 00 orcc %o0, 0, %l1
20121b4: 34 80 00 ae bg,a 201246c <rtems_rfs_rtems_eval_for_make+0x468><== NEVER TAKEN
20121b8: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
path += stripped;
20121bc: 10 bf ff ba b 20120a4 <rtems_rfs_rtems_eval_for_make+0xa0>
20121c0: a2 10 00 1c mov %i4, %l1
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
20121c4: d0 4c 60 01 ldsb [ %l1 + 1 ], %o0 <== NOT EXECUTED
20121c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20121cc: 12 80 00 75 bne 20123a0 <rtems_rfs_rtems_eval_for_make+0x39c><== NOT EXECUTED
20121d0: 01 00 00 00 nop <== NOT EXECUTED
{
if (*path)
20121d4: c2 4f 00 00 ldsb [ %i4 ], %g1 <== NOT EXECUTED
20121d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20121dc: 12 80 00 7a bne 20123c4 <rtems_rfs_rtems_eval_for_make+0x3c0><== NOT EXECUTED
20121e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
20121e4: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
20121e8: c4 08 60 02 ldub [ %g1 + 2 ], %g2
20121ec: 03 00 00 3c sethi %hi(0xf000), %g1
20121f0: 85 28 a0 08 sll %g2, 8, %g2
20121f4: 84 08 80 01 and %g2, %g1, %g2
20121f8: 03 00 00 10 sethi %hi(0x4000), %g1
20121fc: 80 a0 80 01 cmp %g2, %g1
2012200: 12 80 00 ae bne 20124b8 <rtems_rfs_rtems_eval_for_make+0x4b4>
2012204: 90 07 bf cc add %fp, -52, %o0
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
2012208: 40 00 03 23 call 2012e94 <rtems_rfs_rtems_eval_perms>
201220c: 92 10 20 03 mov 3, %o1
2012210: 80 8a 20 ff btst 0xff, %o0
2012214: 02 80 00 28 be 20122b4 <rtems_rfs_rtems_eval_for_make+0x2b0><== NEVER TAKEN
2012218: 92 07 bf cc add %fp, -52, %o1
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
201221c: f8 06 80 00 ld [ %i2 ], %i4
2012220: 40 00 48 2c call 20242d0 <strlen>
2012224: 90 10 00 1c mov %i4, %o0
2012228: 92 07 bf cc add %fp, -52, %o1
201222c: 96 10 00 08 mov %o0, %o3
2012230: 94 10 00 1c mov %i4, %o2
2012234: 90 10 00 1d mov %i5, %o0
2012238: 98 07 bf f8 add %fp, -8, %o4
201223c: 40 00 2a 0a call 201ca64 <rtems_rfs_dir_lookup_ino>
2012240: 9a 07 bf fc add %fp, -4, %o5
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
2012244: 92 07 bf cc add %fp, -52, %o1
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
2012248: 80 a2 20 00 cmp %o0, 0
201224c: 02 80 00 fe be 2012644 <rtems_rfs_rtems_eval_for_make+0x640>
2012250: b8 10 00 08 mov %o0, %i4
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
}
if (rc != ENOENT)
2012254: 80 a2 20 02 cmp %o0, 2
2012258: 02 80 00 60 be 20123d8 <rtems_rfs_rtems_eval_for_make+0x3d4>
201225c: c2 07 bf f4 ld [ %fp + -12 ], %g1
{
rtems_rfs_inode_close (fs, &inode);
2012260: 7f ff f7 ba call 2010148 <rtems_rfs_inode_close>
2012264: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012268: f6 07 60 7c ld [ %i5 + 0x7c ], %i3
rtems_rfs_buffers_release (fs);
201226c: 40 00 29 6c call 201c81c <rtems_rfs_buffers_release>
2012270: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012274: 7f ff e0 93 call 200a4c0 <rtems_semaphore_release>
2012278: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
201227c: ba 92 20 00 orcc %o0, 0, %i5
2012280: 12 80 00 1d bne 20122f4 <rtems_rfs_rtems_eval_for_make+0x2f0><== NEVER TAKEN
2012284: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
2012288: 40 00 41 6f call 2022844 <__errno>
201228c: b0 10 3f ff mov -1, %i0
2012290: f8 22 00 00 st %i4, [ %o0 ]
2012294: 81 c7 e0 08 ret
2012298: 81 e8 00 00 restore
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
201229c: 40 00 02 fe call 2012e94 <rtems_rfs_rtems_eval_perms>
20122a0: 92 10 20 01 mov 1, %o1
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
20122a4: 80 8a 20 ff btst 0xff, %o0
20122a8: 32 bf ff 90 bne,a 20120e8 <rtems_rfs_rtems_eval_for_make+0xe4><== ALWAYS TAKEN
20122ac: c2 06 80 00 ld [ %i2 ], %g1
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
{
rtems_rfs_inode_close (fs, &inode);
20122b0: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
20122b4: 7f ff f7 a5 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20122b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20122bc: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20122c0: 40 00 29 57 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20122c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20122c8: 7f ff e0 7e call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20122cc: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20122d0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20122d4: 12 80 00 a2 bne 201255c <rtems_rfs_rtems_eval_for_make+0x558><== NOT EXECUTED
20122d8: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
20122dc: 40 00 41 5a call 2022844 <__errno> <== NOT EXECUTED
20122e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20122e4: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
20122e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20122ec: 81 c7 e0 08 ret <== NOT EXECUTED
20122f0: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20122f4: 40 00 03 5d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20122f8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20122fc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012300: 02 bf ff e2 be 2012288 <rtems_rfs_rtems_eval_for_make+0x284><== NOT EXECUTED
2012304: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012308: 40 00 14 2e call 20173c0 <rtems_status_text> <== NOT EXECUTED
201230c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012310: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012314: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012318: 40 00 44 b3 call 20235e4 <printf> <== NOT EXECUTED
201231c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012320: 30 bf ff da b,a 2012288 <rtems_rfs_rtems_eval_for_make+0x284><== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
2012324: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012328: 12 80 00 5d bne 201249c <rtems_rfs_rtems_eval_for_make+0x498><== NOT EXECUTED
201232c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2012330: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2012334: 02 80 00 96 be 201258c <rtems_rfs_rtems_eval_for_make+0x588><== NOT EXECUTED
2012338: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
/*
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
201233c: c4 08 60 03 ldub [ %g1 + 3 ], %g2 <== NOT EXECUTED
2012340: c6 08 60 02 ldub [ %g1 + 2 ], %g3 <== NOT EXECUTED
2012344: 83 28 e0 08 sll %g3, 8, %g1 <== NOT EXECUTED
2012348: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
201234c: 82 08 40 18 and %g1, %i0, %g1 <== NOT EXECUTED
2012350: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
2012354: 12 80 00 ab bne 2012600 <rtems_rfs_rtems_eval_for_make+0x5fc><== NOT EXECUTED
2012358: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
201235c: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
2012360: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
2012364: 10 bf ff 8b b 2012190 <rtems_rfs_rtems_eval_for_make+0x18c><== NOT EXECUTED
2012368: 96 10 20 02 mov 2, %o3 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201236c: 40 00 03 3f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012370: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012374: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012378: 22 bf ff 48 be,a 2012098 <rtems_rfs_rtems_eval_for_make+0x94><== NOT EXECUTED
201237c: 21 00 80 c6 sethi %hi(0x2031800), %l0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012380: 40 00 14 10 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012384: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2012388: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201238c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012390: 40 00 44 95 call 20235e4 <printf> <== NOT EXECUTED
2012394: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
2012398: 10 bf ff 40 b 2012098 <rtems_rfs_rtems_eval_for_make+0x94><== NOT EXECUTED
201239c: 21 00 80 c6 sethi %hi(0x2031800), %l0 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
20123a0: 7f ff d4 68 call 2007540 <rtems_filesystem_is_separator> <== NOT EXECUTED
20123a4: 01 00 00 00 nop <== NOT EXECUTED
20123a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20123ac: 02 bf ff 6e be 2012164 <rtems_rfs_rtems_eval_for_make+0x160><== NOT EXECUTED
20123b0: c2 4f 00 00 ldsb [ %i4 ], %g1 <== NOT EXECUTED
{
if (*path)
20123b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20123b8: 02 bf ff 8c be 20121e8 <rtems_rfs_rtems_eval_for_make+0x1e4><== NOT EXECUTED
20123bc: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
20123c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20123c4: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
20123c8: 7f ff f7 60 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20123cc: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20123d0: 10 bf ff 36 b 20120a8 <rtems_rfs_rtems_eval_for_make+0xa4><== NOT EXECUTED
20123d4: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20123d8: 90 10 00 19 mov %i1, %o0
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
20123dc: c2 26 40 00 st %g1, [ %i1 ]
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
20123e0: c2 07 bf fc ld [ %fp + -4 ], %g1
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20123e4: 40 00 02 e2 call 2012f6c <rtems_rfs_rtems_set_handlers>
20123e8: c2 26 60 04 st %g1, [ %i1 + 4 ]
20123ec: 90 0a 20 ff and %o0, 0xff, %o0
20123f0: 80 a0 00 08 cmp %g0, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
20123f4: 92 07 bf cc add %fp, -52, %o1
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20123f8: b0 40 3f ff addx %g0, -1, %i0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
20123fc: 7f ff f7 53 call 2010148 <rtems_rfs_inode_close>
2012400: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012404: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2012408: 40 00 29 05 call 201c81c <rtems_rfs_buffers_release>
201240c: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012410: d0 07 00 00 ld [ %i4 ], %o0
2012414: 7f ff e0 2b call 200a4c0 <rtems_semaphore_release>
2012418: b0 0e 20 05 and %i0, 5, %i0
if (sc != RTEMS_SUCCESSFUL)
201241c: ba 92 20 00 orcc %o0, 0, %i5
2012420: 02 bf ff 9d be 2012294 <rtems_rfs_rtems_eval_for_make+0x290><== ALWAYS TAKEN
2012424: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012428: 40 00 03 10 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201242c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012430: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012434: 02 80 00 92 be 201267c <rtems_rfs_rtems_eval_for_make+0x678><== NOT EXECUTED
2012438: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
201243c: 40 00 13 e1 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012440: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012444: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012448: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
201244c: 40 00 44 66 call 20235e4 <printf> <== NOT EXECUTED
2012450: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
2012454: 81 c7 e0 08 ret <== NOT EXECUTED
2012458: 81 e8 00 00 restore <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
201245c: 92 07 bf cc add %fp, -52, %o1
2012460: 7f ff f7 3a call 2010148 <rtems_rfs_inode_close>
2012464: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012468: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
201246c: 40 00 28 ec call 201c81c <rtems_rfs_buffers_release>
2012470: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012474: 7f ff e0 13 call 200a4c0 <rtems_semaphore_release>
2012478: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
201247c: ba 92 20 00 orcc %o0, 0, %i5
2012480: 12 80 00 1f bne 20124fc <rtems_rfs_rtems_eval_for_make+0x4f8><== NEVER TAKEN
2012484: 90 10 20 00 clr %o0
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
2012488: 40 00 40 ef call 2022844 <__errno>
201248c: b0 10 3f ff mov -1, %i0
2012490: e2 22 00 00 st %l1, [ %o0 ]
2012494: 81 c7 e0 08 ret
2012498: 81 e8 00 00 restore
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
201249c: 7f ff d4 29 call 2007540 <rtems_filesystem_is_separator> <== NOT EXECUTED
20124a0: 01 00 00 00 nop <== NOT EXECUTED
20124a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20124a8: 22 bf ff 37 be,a 2012184 <rtems_rfs_rtems_eval_for_make+0x180><== NOT EXECUTED
20124ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
20124b0: 10 bf ff a0 b 2012330 <rtems_rfs_rtems_eval_for_make+0x32c><== NOT EXECUTED
20124b4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
20124b8: 92 07 bf cc add %fp, -52, %o1
20124bc: 7f ff f7 23 call 2010148 <rtems_rfs_inode_close>
20124c0: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20124c4: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
20124c8: 40 00 28 d5 call 201c81c <rtems_rfs_buffers_release>
20124cc: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20124d0: 7f ff df fc call 200a4c0 <rtems_semaphore_release>
20124d4: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20124d8: ba 92 20 00 orcc %o0, 0, %i5
20124dc: 12 80 00 14 bne 201252c <rtems_rfs_rtems_eval_for_make+0x528><== NEVER TAKEN
20124e0: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
20124e4: 40 00 40 d8 call 2022844 <__errno>
20124e8: b0 10 3f ff mov -1, %i0
20124ec: 82 10 20 14 mov 0x14, %g1
20124f0: c2 22 00 00 st %g1, [ %o0 ]
20124f4: 81 c7 e0 08 ret
20124f8: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20124fc: 40 00 02 db call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012500: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012504: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012508: 02 bf ff e0 be 2012488 <rtems_rfs_rtems_eval_for_make+0x484><== NOT EXECUTED
201250c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012510: 40 00 13 ac call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012514: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012518: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201251c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012520: 40 00 44 31 call 20235e4 <printf> <== NOT EXECUTED
2012524: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012528: 30 bf ff d8 b,a 2012488 <rtems_rfs_rtems_eval_for_make+0x484><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201252c: 40 00 02 cf call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012530: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012534: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012538: 02 bf ff eb be 20124e4 <rtems_rfs_rtems_eval_for_make+0x4e0><== NOT EXECUTED
201253c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012540: 40 00 13 a0 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012544: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012548: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201254c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012550: 40 00 44 25 call 20235e4 <printf> <== NOT EXECUTED
2012554: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012558: 30 bf ff e3 b,a 20124e4 <rtems_rfs_rtems_eval_for_make+0x4e0><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201255c: 40 00 02 c3 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012560: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012564: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012568: 02 bf ff 5d be 20122dc <rtems_rfs_rtems_eval_for_make+0x2d8><== NOT EXECUTED
201256c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012570: 40 00 13 94 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012574: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012578: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201257c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012580: 40 00 44 19 call 20235e4 <printf> <== NOT EXECUTED
2012584: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012588: 30 bf ff 55 b,a 20122dc <rtems_rfs_rtems_eval_for_make+0x2d8><== NOT EXECUTED
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
201258c: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
2012590: 7f ff f6 ee call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2012594: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012598: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
201259c: 40 00 28 a0 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20125a0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20125a4: 7f ff df c7 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20125a8: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20125ac: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20125b0: 12 80 00 35 bne 2012684 <rtems_rfs_rtems_eval_for_make+0x680><== NOT EXECUTED
20125b4: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20125b8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20125bc: 90 07 20 02 add %i4, 2, %o0 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20125c0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20125c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20125c8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED
20125cc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20125d0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20125d4: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED
20125d8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
20125dc: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
20125e0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED
20125e4: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20125e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20125ec: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20125f0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20125f4: c4 26 60 10 st %g2, [ %i1 + 0x10 ] <== NOT EXECUTED
20125f8: 81 c7 e0 08 ret <== NOT EXECUTED
20125fc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
2012600: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
2012604: 7f ff f6 d1 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2012608: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201260c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012610: 40 00 28 83 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2012614: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012618: 7f ff df aa call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201261c: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012620: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012624: 12 80 00 25 bne 20126b8 <rtems_rfs_rtems_eval_for_make+0x6b4><== NOT EXECUTED
2012628: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
201262c: 40 00 40 86 call 2022844 <__errno> <== NOT EXECUTED
2012630: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012634: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2012638: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201263c: 81 c7 e0 08 ret <== NOT EXECUTED
2012640: 81 e8 00 00 restore <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
2012644: 7f ff f6 c1 call 2010148 <rtems_rfs_inode_close>
2012648: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201264c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2012650: 40 00 28 73 call 201c81c <rtems_rfs_buffers_release>
2012654: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012658: 7f ff df 9a call 200a4c0 <rtems_semaphore_release>
201265c: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2012660: ba 92 20 00 orcc %o0, 0, %i5
2012664: 12 80 00 21 bne 20126e8 <rtems_rfs_rtems_eval_for_make+0x6e4><== NEVER TAKEN
2012668: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
201266c: 40 00 40 76 call 2022844 <__errno>
2012670: b0 10 3f ff mov -1, %i0
2012674: 82 10 20 11 mov 0x11, %g1
2012678: c2 22 00 00 st %g1, [ %o0 ]
201267c: 81 c7 e0 08 ret
2012680: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012684: 40 00 02 79 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012688: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201268c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012690: 22 bf ff cb be,a 20125bc <rtems_rfs_rtems_eval_for_make+0x5b8><== NOT EXECUTED
2012694: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012698: 40 00 13 4a call 20173c0 <rtems_status_text> <== NOT EXECUTED
201269c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20126a0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20126a4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20126a8: 40 00 43 cf call 20235e4 <printf> <== NOT EXECUTED
20126ac: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20126b0: 10 bf ff c3 b 20125bc <rtems_rfs_rtems_eval_for_make+0x5b8><== NOT EXECUTED
20126b4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20126b8: 40 00 02 6c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20126bc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20126c0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20126c4: 02 bf ff da be 201262c <rtems_rfs_rtems_eval_for_make+0x628><== NOT EXECUTED
20126c8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20126cc: 40 00 13 3d call 20173c0 <rtems_status_text> <== NOT EXECUTED
20126d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20126d4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20126d8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20126dc: 40 00 43 c2 call 20235e4 <printf> <== NOT EXECUTED
20126e0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20126e4: 30 bf ff d2 b,a 201262c <rtems_rfs_rtems_eval_for_make+0x628><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20126e8: 40 00 02 60 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20126ec: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20126f0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20126f4: 02 bf ff de be 201266c <rtems_rfs_rtems_eval_for_make+0x668><== NOT EXECUTED
20126f8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20126fc: 40 00 13 31 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012700: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012704: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012708: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
201270c: 40 00 43 b6 call 20235e4 <printf> <== NOT EXECUTED
2012710: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012714: 30 bf ff d6 b,a 201266c <rtems_rfs_rtems_eval_for_make+0x668><== NOT EXECUTED
02012718 <rtems_rfs_rtems_eval_path>:
static int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
2012718: 9d e3 bf 70 save %sp, -144, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
201271c: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012720: c2 06 c0 00 ld [ %i3 ], %g1
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012724: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2012728: 92 10 00 19 mov %i1, %o1
int flags,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
201272c: c2 27 bf f8 st %g1, [ %fp + -8 ]
uint32_t doff = 0;
2012730: c0 27 bf fc clr [ %fp + -4 ]
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2012734: 7f ff cc ac call 20059e4 <rtems_filesystem_prefix_separators>
2012738: 90 10 00 18 mov %i0, %o0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
201273c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2012740: b8 10 00 08 mov %o0, %i4
path += stripped;
2012744: a4 06 00 08 add %i0, %o0, %l2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012748: d0 00 40 00 ld [ %g1 ], %o0
pathlen -= stripped;
201274c: b8 26 40 1c sub %i1, %i4, %i4
2012750: 92 10 20 00 clr %o1
2012754: 7f ff df 11 call 200a398 <rtems_semaphore_obtain>
2012758: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
201275c: b2 92 20 00 orcc %o0, 0, %i1
2012760: 12 80 00 81 bne 2012964 <rtems_rfs_rtems_eval_path+0x24c> <== NEVER TAKEN
2012764: 90 10 20 00 clr %o0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
2012768: 23 00 80 c6 sethi %hi(0x2031800), %l1
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
201276c: 21 00 00 3c sethi %hi(0xf000), %l0
2012770: 31 00 00 10 sethi %hi(0x4000), %i0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
2012774: a2 14 61 28 or %l1, 0x128, %l1
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012778: d2 07 bf f8 ld [ %fp + -8 ], %o1
201277c: 90 10 00 1d mov %i5, %o0
2012780: 94 07 bf d0 add %fp, -48, %o2
2012784: 7f ff f5 fa call 200ff6c <rtems_rfs_inode_open>
2012788: 96 10 20 01 mov 1, %o3
if (rc > 0)
201278c: b2 92 20 00 orcc %o0, 0, %i1
2012790: 34 80 00 b6 bg,a 2012a68 <rtems_rfs_rtems_eval_path+0x350><== NEVER TAKEN
2012794: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if ((*path == '\0') || (pathlen == 0))
2012798: d0 0c 80 00 ldub [ %l2 ], %o0
201279c: 91 2a 20 18 sll %o0, 0x18, %o0
20127a0: 80 a2 20 00 cmp %o0, 0
20127a4: 02 80 00 4d be 20128d8 <rtems_rfs_rtems_eval_path+0x1c0>
20127a8: 80 a7 20 00 cmp %i4, 0
20127ac: 02 80 00 4b be 20128d8 <rtems_rfs_rtems_eval_path+0x1c0> <== NEVER TAKEN
20127b0: c2 07 bf dc ld [ %fp + -36 ], %g1
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
20127b4: c4 08 60 03 ldub [ %g1 + 3 ], %g2
20127b8: c6 08 60 02 ldub [ %g1 + 2 ], %g3
20127bc: 83 28 e0 08 sll %g3, 8, %g1
20127c0: 82 10 80 01 or %g2, %g1, %g1
20127c4: 82 08 40 10 and %g1, %l0, %g1
20127c8: 80 a0 40 18 cmp %g1, %i0
20127cc: 22 80 00 33 be,a 2012898 <rtems_rfs_rtems_eval_path+0x180>
20127d0: 90 07 bf d0 add %fp, -48, %o0
20127d4: b2 10 00 12 mov %l2, %i1
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
20127d8: 10 80 00 11 b 201281c <rtems_rfs_rtems_eval_path+0x104>
20127dc: a6 10 20 00 clr %l3
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
(*path != '\0') && pathlen &&
20127e0: 80 a0 a0 00 cmp %g2, 0
20127e4: 02 80 00 13 be 2012830 <rtems_rfs_rtems_eval_path+0x118> <== NEVER TAKEN
20127e8: 82 04 e0 01 add %l3, 1, %g1
20127ec: 80 a7 20 00 cmp %i4, 0
20127f0: 02 80 00 11 be 2012834 <rtems_rfs_rtems_eval_path+0x11c> <== NEVER TAKEN
20127f4: 92 10 00 1c mov %i4, %o1
20127f8: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
20127fc: 80 a0 40 02 cmp %g1, %g2
2012800: 1a 80 00 0d bcc 2012834 <rtems_rfs_rtems_eval_path+0x11c> <== NEVER TAKEN
2012804: 01 00 00 00 nop
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
2012808: d0 0e 60 01 ldub [ %i1 + 1 ], %o0
201280c: b8 07 3f ff add %i4, -1, %i4
2012810: b2 06 60 01 inc %i1
2012814: a6 10 00 01 mov %g1, %l3
2012818: 91 2a 20 18 sll %o0, 0x18, %o0
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
201281c: 7f ff d3 49 call 2007540 <rtems_filesystem_is_separator>
2012820: 91 3a 20 18 sra %o0, 0x18, %o0
2012824: 80 a2 20 00 cmp %o0, 0
2012828: 22 bf ff ee be,a 20127e0 <rtems_rfs_rtems_eval_path+0xc8>
201282c: c4 4e 40 00 ldsb [ %i1 ], %g2
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2012830: 92 10 00 1c mov %i4, %o1
2012834: 7f ff cc 6c call 20059e4 <rtems_filesystem_prefix_separators>
2012838: 90 10 00 19 mov %i1, %o0
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
201283c: c2 4c 80 00 ldsb [ %l2 ], %g1
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
2012840: b2 06 40 08 add %i1, %o0, %i1
pathlen -= stripped;
2012844: b8 27 00 08 sub %i4, %o0, %i4
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2012848: 80 a0 60 2e cmp %g1, 0x2e
201284c: 02 80 00 1b be 20128b8 <rtems_rfs_rtems_eval_path+0x1a0>
2012850: a8 02 00 13 add %o0, %l3, %l4
/*
* Look up the node name in this directory. If found drop through, close
* the current inode and let the loop open the inode so the mode can be
* read and handlers set.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2012854: 90 10 00 1d mov %i5, %o0
2012858: 92 07 bf d0 add %fp, -48, %o1
201285c: 94 10 00 12 mov %l2, %o2
2012860: 96 10 00 13 mov %l3, %o3
2012864: 98 07 bf f8 add %fp, -8, %o4
2012868: 40 00 28 7f call 201ca64 <rtems_rfs_dir_lookup_ino>
201286c: 9a 07 bf fc add %fp, -4, %o5
node, node_len - stripped, &ino, &doff);
if (rc > 0)
2012870: a4 92 20 00 orcc %o0, 0, %l2
2012874: 14 80 00 66 bg 2012a0c <rtems_rfs_rtems_eval_path+0x2f4>
2012878: 90 10 00 1d mov %i5, %o0
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
201287c: 7f ff f6 33 call 2010148 <rtems_rfs_inode_close>
2012880: 92 07 bf d0 add %fp, -48, %o1
if (rc > 0)
2012884: a4 92 20 00 orcc %o0, 0, %l2
2012888: 14 80 00 62 bg 2012a10 <rtems_rfs_rtems_eval_path+0x2f8> <== NEVER TAKEN
201288c: 92 07 bf d0 add %fp, -48, %o1
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
2012890: 10 bf ff ba b 2012778 <rtems_rfs_rtems_eval_path+0x60>
2012894: a4 10 00 19 mov %i1, %l2
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
2012898: 40 00 01 7f call 2012e94 <rtems_rfs_rtems_eval_perms>
201289c: 92 10 20 01 mov 1, %o1
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
20128a0: 80 8a 20 ff btst 0xff, %o0
20128a4: 02 80 00 b3 be 2012b70 <rtems_rfs_rtems_eval_path+0x458> <== NEVER TAKEN
20128a8: 92 07 bf d0 add %fp, -48, %o1
20128ac: d0 0c 80 00 ldub [ %l2 ], %o0
20128b0: 10 bf ff c9 b 20127d4 <rtems_rfs_rtems_eval_path+0xbc>
20128b4: 91 2a 20 18 sll %o0, 0x18, %o0
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
20128b8: d0 4c a0 01 ldsb [ %l2 + 1 ], %o0
20128bc: 80 a2 20 00 cmp %o0, 0
20128c0: 12 80 00 36 bne 2012998 <rtems_rfs_rtems_eval_path+0x280>
20128c4: 01 00 00 00 nop
{
if (*path)
20128c8: c2 4e 40 00 ldsb [ %i1 ], %g1
20128cc: 80 a0 60 00 cmp %g1, 0
20128d0: 32 80 00 4a bne,a 20129f8 <rtems_rfs_rtems_eval_path+0x2e0><== NEVER TAKEN
20128d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
20128d8: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20128dc: 92 07 bf d0 add %fp, -48, %o1
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
20128e0: c2 26 c0 00 st %g1, [ %i3 ]
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
20128e4: c2 07 bf fc ld [ %fp + -4 ], %g1
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20128e8: 90 10 00 1b mov %i3, %o0
20128ec: 40 00 01 a0 call 2012f6c <rtems_rfs_rtems_set_handlers>
20128f0: c2 26 e0 04 st %g1, [ %i3 + 4 ]
20128f4: 90 0a 20 ff and %o0, 0xff, %o0
20128f8: 80 a0 00 08 cmp %g0, %o0
rtems_rfs_inode_close (fs, &inode);
20128fc: 92 07 bf d0 add %fp, -48, %o1
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
2012900: b0 40 3f ff addx %g0, -1, %i0
rtems_rfs_inode_close (fs, &inode);
2012904: 7f ff f6 11 call 2010148 <rtems_rfs_inode_close>
2012908: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201290c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2012910: 40 00 27 c3 call 201c81c <rtems_rfs_buffers_release>
2012914: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012918: d0 07 00 00 ld [ %i4 ], %o0
201291c: 7f ff de e9 call 200a4c0 <rtems_semaphore_release>
2012920: b0 0e 20 05 and %i0, 5, %i0
if (sc != RTEMS_SUCCESSFUL)
2012924: ba 92 20 00 orcc %o0, 0, %i5
2012928: 02 80 00 0d be 201295c <rtems_rfs_rtems_eval_path+0x244> <== ALWAYS TAKEN
201292c: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012930: 40 00 01 ce call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012934: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012938: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201293c: 02 80 00 9b be 2012ba8 <rtems_rfs_rtems_eval_path+0x490> <== NOT EXECUTED
2012940: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012944: 40 00 12 9f call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012948: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201294c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012950: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012954: 40 00 43 24 call 20235e4 <printf> <== NOT EXECUTED
2012958: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
201295c: 81 c7 e0 08 ret
2012960: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012964: 40 00 01 c1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012968: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201296c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012970: 22 bf ff 7f be,a 201276c <rtems_rfs_rtems_eval_path+0x54><== NOT EXECUTED
2012974: 23 00 80 c6 sethi %hi(0x2031800), %l1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012978: 40 00 12 92 call 20173c0 <rtems_status_text> <== NOT EXECUTED
201297c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2012980: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012984: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012988: 40 00 43 17 call 20235e4 <printf> <== NOT EXECUTED
201298c: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
2012990: 10 bf ff 77 b 201276c <rtems_rfs_rtems_eval_path+0x54> <== NOT EXECUTED
2012994: 23 00 80 c6 sethi %hi(0x2031800), %l1 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2012998: 7f ff d2 ea call 2007540 <rtems_filesystem_is_separator>
201299c: 01 00 00 00 nop
20129a0: 80 a2 20 00 cmp %o0, 0
20129a4: 32 bf ff ca bne,a 20128cc <rtems_rfs_rtems_eval_path+0x1b4><== NEVER TAKEN
20129a8: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
20129ac: c2 4c 80 00 ldsb [ %l2 ], %g1
20129b0: 80 a0 60 2e cmp %g1, 0x2e
20129b4: 12 bf ff a9 bne 2012858 <rtems_rfs_rtems_eval_path+0x140> <== NEVER TAKEN
20129b8: 90 10 00 1d mov %i5, %o0
20129bc: c2 4c a0 01 ldsb [ %l2 + 1 ], %g1
20129c0: 80 a0 60 2e cmp %g1, 0x2e
20129c4: 12 bf ff a6 bne 201285c <rtems_rfs_rtems_eval_path+0x144> <== NEVER TAKEN
20129c8: 92 07 bf d0 add %fp, -48, %o1
20129cc: d0 4c a0 02 ldsb [ %l2 + 2 ], %o0
20129d0: 80 a2 20 00 cmp %o0, 0
20129d4: 12 80 00 1e bne 2012a4c <rtems_rfs_rtems_eval_path+0x334> <== NEVER TAKEN
20129d8: c2 07 bf f8 ld [ %fp + -8 ], %g1
{
/*
* If we are at root inode of the file system we have a crossmount path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
20129dc: 80 a0 60 01 cmp %g1, 1
20129e0: 02 80 00 46 be 2012af8 <rtems_rfs_rtems_eval_path+0x3e0>
20129e4: 90 10 00 1d mov %i5, %o0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
20129e8: 92 07 bf d0 add %fp, -48, %o1
20129ec: 94 10 00 11 mov %l1, %o2
20129f0: 10 bf ff 9d b 2012864 <rtems_rfs_rtems_eval_path+0x14c>
20129f4: 96 10 20 02 mov 2, %o3
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
20129f8: 92 07 bf d0 add %fp, -48, %o1 <== NOT EXECUTED
20129fc: 7f ff f5 d3 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2012a00: a4 10 00 19 mov %i1, %l2 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012a04: 10 bf ff 5e b 201277c <rtems_rfs_rtems_eval_path+0x64> <== NOT EXECUTED
2012a08: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
2012a0c: 92 07 bf d0 add %fp, -48, %o1
2012a10: 7f ff f5 ce call 2010148 <rtems_rfs_inode_close>
2012a14: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012a18: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2012a1c: 40 00 27 80 call 201c81c <rtems_rfs_buffers_release>
2012a20: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012a24: 7f ff de a7 call 200a4c0 <rtems_semaphore_release>
2012a28: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2012a2c: ba 92 20 00 orcc %o0, 0, %i5
2012a30: 12 80 00 1a bne 2012a98 <rtems_rfs_rtems_eval_path+0x380> <== NEVER TAKEN
2012a34: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
2012a38: 40 00 3f 83 call 2022844 <__errno>
2012a3c: b0 10 3f ff mov -1, %i0
2012a40: e4 22 00 00 st %l2, [ %o0 ]
2012a44: 81 c7 e0 08 ret
2012a48: 81 e8 00 00 restore
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
2012a4c: 7f ff d2 bd call 2007540 <rtems_filesystem_is_separator> <== NOT EXECUTED
2012a50: 01 00 00 00 nop <== NOT EXECUTED
2012a54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012a58: 02 bf ff 80 be 2012858 <rtems_rfs_rtems_eval_path+0x140> <== NOT EXECUTED
2012a5c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
/*
* If we are at root inode of the file system we have a crossmount path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2012a60: 10 bf ff df b 20129dc <rtems_rfs_rtems_eval_path+0x2c4> <== NOT EXECUTED
2012a64: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2012a68: 40 00 27 6d call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2012a6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012a70: 7f ff de 94 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2012a74: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012a78: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012a7c: 12 80 00 13 bne 2012ac8 <rtems_rfs_rtems_eval_path+0x3b0> <== NOT EXECUTED
2012a80: 90 10 20 00 clr %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: opening inode", rc);
2012a84: 40 00 3f 70 call 2022844 <__errno> <== NOT EXECUTED
2012a88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012a8c: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED
2012a90: 81 c7 e0 08 ret <== NOT EXECUTED
2012a94: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012a98: 40 00 01 74 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012a9c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012aa0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012aa4: 02 bf ff e5 be 2012a38 <rtems_rfs_rtems_eval_path+0x320> <== NOT EXECUTED
2012aa8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012aac: 40 00 12 45 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012ab0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012ab4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012ab8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012abc: 40 00 42 ca call 20235e4 <printf> <== NOT EXECUTED
2012ac0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012ac4: 30 bf ff dd b,a 2012a38 <rtems_rfs_rtems_eval_path+0x320><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012ac8: 40 00 01 68 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012acc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012ad0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012ad4: 02 bf ff ec be 2012a84 <rtems_rfs_rtems_eval_path+0x36c> <== NOT EXECUTED
2012ad8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012adc: 40 00 12 39 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012ae0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012ae4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012ae8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012aec: 40 00 42 be call 20235e4 <printf> <== NOT EXECUTED
2012af0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012af4: 30 bf ff e4 b,a 2012a84 <rtems_rfs_rtems_eval_path+0x36c><== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
2012af8: 92 07 bf d0 add %fp, -48, %o1
2012afc: 7f ff f5 93 call 2010148 <rtems_rfs_inode_close>
2012b00: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012b04: f0 07 60 7c ld [ %i5 + 0x7c ], %i0
rtems_rfs_buffers_release (fs);
2012b08: 40 00 27 45 call 201c81c <rtems_rfs_buffers_release>
2012b0c: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012b10: 7f ff de 6c call 200a4c0 <rtems_semaphore_release>
2012b14: d0 06 00 00 ld [ %i0 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2012b18: ba 92 20 00 orcc %o0, 0, %i5
2012b1c: 12 80 00 25 bne 2012bb0 <rtems_rfs_rtems_eval_path+0x498> <== NEVER TAKEN
2012b20: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012b24: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2012b28: 90 26 40 14 sub %i1, %l4, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012b2c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2012b30: 92 07 00 14 add %i4, %l4, %o1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012b34: c2 26 c0 00 st %g1, [ %i3 ]
2012b38: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2012b3c: 94 10 00 1a mov %i2, %o2
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012b40: c2 26 e0 04 st %g1, [ %i3 + 4 ]
2012b44: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2012b48: 96 10 00 1b mov %i3, %o3
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012b4c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
2012b50: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2012b54: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2012b58: c2 00 40 00 ld [ %g1 ], %g1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012b5c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2012b60: 9f c0 40 00 call %g1
2012b64: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
2012b68: 81 c7 e0 08 ret
2012b6c: 91 e8 00 08 restore %g0, %o0, %o0
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
2012b70: 7f ff f5 76 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2012b74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012b78: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012b7c: 40 00 27 28 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2012b80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012b84: 7f ff de 4f call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2012b88: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012b8c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012b90: 12 80 00 15 bne 2012be4 <rtems_rfs_rtems_eval_path+0x4cc> <== NOT EXECUTED
2012b94: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
2012b98: 40 00 3f 2b call 2022844 <__errno> <== NOT EXECUTED
2012b9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012ba0: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
2012ba4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012ba8: 81 c7 e0 08 ret <== NOT EXECUTED
2012bac: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012bb0: 40 00 01 2e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012bb4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012bb8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012bbc: 22 bf ff db be,a 2012b28 <rtems_rfs_rtems_eval_path+0x410><== NOT EXECUTED
2012bc0: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012bc4: 40 00 11 ff call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012bc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012bcc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012bd0: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012bd4: 40 00 42 84 call 20235e4 <printf> <== NOT EXECUTED
2012bd8: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2012bdc: 10 bf ff d3 b 2012b28 <rtems_rfs_rtems_eval_path+0x410> <== NOT EXECUTED
2012be0: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012be4: 40 00 01 21 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012be8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012bec: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012bf0: 02 bf ff ea be 2012b98 <rtems_rfs_rtems_eval_path+0x480> <== NOT EXECUTED
2012bf4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012bf8: 40 00 11 f2 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012bfc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012c00: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012c04: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012c08: 40 00 42 77 call 20235e4 <printf> <== NOT EXECUTED
2012c0c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012c10: 30 bf ff e2 b,a 2012b98 <rtems_rfs_rtems_eval_path+0x480><== NOT EXECUTED
02012e94 <rtems_rfs_rtems_eval_perms>:
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
2012e94: 9d e3 bf a0 save %sp, -96, %sp
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
2012e98: c2 06 20 0c ld [ %i0 + 0xc ], %g1
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2012e9c: c6 08 60 06 ldub [ %g1 + 6 ], %g3
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2012ea0: c4 08 60 05 ldub [ %g1 + 5 ], %g2
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2012ea4: f6 08 60 07 ldub [ %g1 + 7 ], %i3
* @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;
2012ea8: f8 08 60 04 ldub [ %g1 + 4 ], %i4
* @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);
2012eac: fa 08 60 02 ldub [ %g1 + 2 ], %i5
2012eb0: c2 08 60 03 ldub [ %g1 + 3 ], %g1
* @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;
2012eb4: 85 28 a0 10 sll %g2, 0x10, %g2
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2012eb8: 87 28 e0 08 sll %g3, 8, %g3
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2012ebc: b9 2f 20 18 sll %i4, 0x18, %i4
* @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;
2012ec0: b6 10 c0 1b or %g3, %i3, %i3
* @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;
2012ec4: b8 17 00 02 or %i4, %g2, %i4
* @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);
2012ec8: bb 2f 60 08 sll %i5, 8, %i5
uid = rtems_rfs_inode_get_uid (inode);
gid = rtems_rfs_inode_get_gid (inode);
mode = rtems_rfs_inode_get_mode (inode);
#if defined (RTEMS_POSIX_API)
st_uid = geteuid ();
2012ecc: 40 00 12 13 call 2017718 <geteuid>
2012ed0: ba 17 40 01 or %i5, %g1, %i5
st_gid = getegid ();
2012ed4: 40 00 12 0d call 2017708 <getegid>
2012ed8: b4 10 00 08 mov %o0, %i2
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
2012edc: b5 2e a0 10 sll %i2, 0x10, %i2
2012ee0: b5 36 a0 10 srl %i2, 0x10, %i2
2012ee4: 80 a0 00 1a cmp %g0, %i2
2012ee8: b7 2e e0 10 sll %i3, 0x10, %i3
2012eec: 84 60 3f ff subx %g0, -1, %g2
2012ef0: b7 36 e0 10 srl %i3, 0x10, %i3
2012ef4: 80 a6 80 1b cmp %i2, %i3
2012ef8: 02 80 00 1a be 2012f60 <rtems_rfs_rtems_eval_perms+0xcc> <== ALWAYS TAKEN
2012efc: b9 37 20 10 srl %i4, 0x10, %i4
2012f00: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
2012f04: 12 80 00 17 bne 2012f60 <rtems_rfs_rtems_eval_perms+0xcc> <== NOT EXECUTED
2012f08: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
2012f0c: 91 2a 20 10 sll %o0, 0x10, %o0
2012f10: 91 32 20 10 srl %o0, 0x10, %o0
2012f14: 80 a2 00 1c cmp %o0, %i4
2012f18: 22 80 00 0b be,a 2012f44 <rtems_rfs_rtems_eval_perms+0xb0><== ALWAYS TAKEN
2012f1c: b3 2e 60 03 sll %i1, 3, %i1
2012f20: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
2012f24: 32 80 00 08 bne,a 2012f44 <rtems_rfs_rtems_eval_perms+0xb0><== NOT EXECUTED
2012f28: b3 2e 60 03 sll %i1, 3, %i1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
2012f2c: ba 0f 61 ff and %i5, 0x1ff, %i5 <== NOT EXECUTED
2012f30: 82 0f 40 01 and %i5, %g1, %g1 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
2012f34: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
2012f38: b0 40 20 00 addx %g0, 0, %i0 <== NOT EXECUTED
2012f3c: 81 c7 e0 08 ret <== NOT EXECUTED
2012f40: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
2012f44: ba 0f 61 ff and %i5, 0x1ff, %i5
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
flags_to_test |= flags << 3;
2012f48: 82 10 40 19 or %g1, %i1, %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
2012f4c: 82 0f 40 01 and %i5, %g1, %g1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
2012f50: 80 a0 00 01 cmp %g0, %g1
2012f54: b0 40 20 00 addx %g0, 0, %i0
2012f58: 81 c7 e0 08 ret
2012f5c: 81 e8 00 00 restore
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
2012f60: 83 2e 60 06 sll %i1, 6, %g1
2012f64: 10 bf ff ea b 2012f0c <rtems_rfs_rtems_eval_perms+0x78>
2012f68: 82 10 40 19 or %g1, %i1, %g1
02012c14 <rtems_rfs_rtems_fchmod>:
}
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
2012c14: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012c18: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012c1c: f8 06 00 00 ld [ %i0 ], %i4 <== NOT EXECUTED
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012c20: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012c24: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2012c28: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2012c2c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2012c30: 7f ff dd da call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2012c34: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012c38: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2012c3c: 12 80 00 3b bne 2012d28 <rtems_rfs_rtems_fchmod+0x114> <== NOT EXECUTED
2012c40: 90 10 20 00 clr %o0 <== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012c44: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2012c48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012c4c: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2012c50: 7f ff f4 c7 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
2012c54: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2012c58: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2012c5c: 32 80 00 27 bne,a 2012cf8 <rtems_rfs_rtems_fchmod+0xe4> <== NOT EXECUTED
2012c60: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
}
imode = rtems_rfs_inode_get_mode (&inode);
2012c64: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
2012c68: f6 08 60 02 ldub [ %g1 + 2 ], %i3 <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
2012c6c: 40 00 12 ab call 2017718 <geteuid> <== NOT EXECUTED
2012c70: f8 08 60 03 ldub [ %g1 + 3 ], %i4 <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
2012c74: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
2012c78: 91 2a 20 10 sll %o0, 0x10, %o0 <== 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;
2012c7c: c4 08 60 06 ldub [ %g1 + 6 ], %g2 <== NOT EXECUTED
2012c80: c6 08 60 07 ldub [ %g1 + 7 ], %g3 <== NOT EXECUTED
2012c84: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2012c88: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
2012c8c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
2012c90: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2012c94: 02 80 00 05 be 2012ca8 <rtems_rfs_rtems_fchmod+0x94> <== NOT EXECUTED
2012c98: 89 32 20 10 srl %o0, 0x10, %g4 <== NOT EXECUTED
2012c9c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
2012ca0: 12 80 00 54 bne 2012df0 <rtems_rfs_rtems_fchmod+0x1dc> <== NOT EXECUTED
2012ca4: 92 07 bf d8 add %fp, -40, %o1 <== 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);
2012ca8: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED
2012cac: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
2012cb0: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2012cb4: b2 0e 6f ff and %i1, 0xfff, %i1 <== NOT EXECUTED
2012cb8: b8 16 c0 1c or %i3, %i4, %i4 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2012cbc: b8 0f 30 00 and %i4, -4096, %i4 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2012cc0: b2 17 00 19 or %i4, %i1, %i1 <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
2012cc4: 85 36 60 08 srl %i1, 8, %g2 <== NOT EXECUTED
2012cc8: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
2012ccc: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
2012cd0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012cd4: f2 28 60 03 stb %i1, [ %g1 + 3 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2012cd8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2012cdc: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2012ce0: 7f ff f5 1a call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2012ce4: c2 2f bf e8 stb %g1, [ %fp + -24 ] <== NOT EXECUTED
if (rc > 0)
2012ce8: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2012cec: 24 80 00 2c ble,a 2012d9c <rtems_rfs_rtems_fchmod+0x188> <== NOT EXECUTED
2012cf0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== 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);
2012cf4: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012cf8: 40 00 26 c9 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2012cfc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012d00: 7f ff dd f0 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2012d04: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012d08: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012d0c: 12 80 00 14 bne 2012d5c <rtems_rfs_rtems_fchmod+0x148> <== NOT EXECUTED
2012d10: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
2012d14: 40 00 3e cc call 2022844 <__errno> <== NOT EXECUTED
2012d18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012d1c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012d20: 81 c7 e0 08 ret <== NOT EXECUTED
2012d24: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012d28: 40 00 00 d0 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012d2c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012d30: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012d34: 22 bf ff c5 be,a 2012c48 <rtems_rfs_rtems_fchmod+0x34> <== NOT EXECUTED
2012d38: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012d3c: 40 00 11 a1 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012d40: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2012d44: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012d48: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012d4c: 40 00 42 26 call 20235e4 <printf> <== NOT EXECUTED
2012d50: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012d54: 10 bf ff bd b 2012c48 <rtems_rfs_rtems_fchmod+0x34> <== NOT EXECUTED
2012d58: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012d5c: 40 00 00 c3 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012d60: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012d64: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012d68: 02 bf ff eb be 2012d14 <rtems_rfs_rtems_fchmod+0x100> <== NOT EXECUTED
2012d6c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012d70: 40 00 11 94 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012d74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012d78: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012d7c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012d80: 40 00 42 19 call 20235e4 <printf> <== NOT EXECUTED
2012d84: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
2012d88: 40 00 3e af call 2022844 <__errno> <== NOT EXECUTED
2012d8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012d90: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012d94: 81 c7 e0 08 ret <== NOT EXECUTED
2012d98: 81 e8 00 00 restore <== NOT EXECUTED
2012d9c: 40 00 26 a0 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2012da0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012da4: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2012da8: 7f ff dd c6 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2012dac: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012db0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012db4: 02 bf ff db be 2012d20 <rtems_rfs_rtems_fchmod+0x10c> <== NOT EXECUTED
2012db8: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012dbc: 40 00 00 ab call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012dc0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012dc4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012dc8: 02 80 00 18 be 2012e28 <rtems_rfs_rtems_fchmod+0x214> <== NOT EXECUTED
2012dcc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012dd0: 40 00 11 7c call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012dd4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012dd8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012ddc: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012de0: 40 00 42 01 call 20235e4 <printf> <== NOT EXECUTED
2012de4: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2012de8: 81 c7 e0 08 ret <== NOT EXECUTED
2012dec: 81 e8 00 00 restore <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
2012df0: 7f ff f4 d6 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2012df4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012df8: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012dfc: 40 00 26 88 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2012e00: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012e04: 7f ff dd af call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2012e08: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012e0c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012e10: 12 80 00 08 bne 2012e30 <rtems_rfs_rtems_fchmod+0x21c> <== NOT EXECUTED
2012e14: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
2012e18: 40 00 3e 8b call 2022844 <__errno> <== NOT EXECUTED
2012e1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012e20: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2012e24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012e28: 81 c7 e0 08 ret <== NOT EXECUTED
2012e2c: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012e30: 40 00 00 8e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2012e34: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012e38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012e3c: 02 bf ff f7 be 2012e18 <rtems_rfs_rtems_fchmod+0x204> <== NOT EXECUTED
2012e40: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012e44: 40 00 11 5f call 20173c0 <rtems_status_text> <== NOT EXECUTED
2012e48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012e4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012e50: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2012e54: 40 00 41 e4 call 20235e4 <printf> <== NOT EXECUTED
2012e58: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2012e5c: 30 bf ff ef b,a 2012e18 <rtems_rfs_rtems_fchmod+0x204> <== NOT EXECUTED
02012e60 <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
2012e60: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
2012e64: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
2012e68: b0 10 20 00 clr %i0 <== NOT EXECUTED
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
2012e6c: 40 00 26 45 call 201c780 <rtems_rfs_buffer_sync> <== NOT EXECUTED
2012e70: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 <== NOT EXECUTED
if (rc)
2012e74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012e78: 02 80 00 05 be 2012e8c <rtems_rfs_rtems_fdatasync+0x2c> <== NOT EXECUTED
2012e7c: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
2012e80: 40 00 3e 71 call 2022844 <__errno> <== NOT EXECUTED
2012e84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012e88: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
return 0;
}
2012e8c: 81 c7 e0 08 ret <== NOT EXECUTED
2012e90: 81 e8 00 00 restore <== NOT EXECUTED
02020f70 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
2020f70: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2020f74: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020f78: 92 10 20 00 clr %o1
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
2020f7c: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
2020f80: 94 10 20 00 clr %o2
2020f84: fa 00 60 98 ld [ %g1 + 0x98 ], %i5
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2020f88: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2020f8c: 7f ff a5 03 call 200a398 <rtems_semaphore_obtain>
2020f90: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020f94: b0 92 20 00 orcc %o0, 0, %i0
2020f98: 12 80 00 21 bne 202101c <rtems_rfs_rtems_file_close+0xac> <== NEVER TAKEN
2020f9c: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
2020fa0: 90 10 00 1d mov %i5, %o0
2020fa4: 7f ff f4 90 call 201e1e4 <rtems_rfs_file_close>
2020fa8: 92 10 00 1c mov %i4, %o1
if (rc > 0)
2020fac: b0 92 20 00 orcc %o0, 0, %i0
2020fb0: 24 80 00 07 ble,a 2020fcc <rtems_rfs_rtems_file_close+0x5c><== ALWAYS TAKEN
2020fb4: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
2020fb8: 40 00 06 23 call 2022844 <__errno> <== NOT EXECUTED
2020fbc: 01 00 00 00 nop <== NOT EXECUTED
2020fc0: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
2020fc4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2020fc8: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2020fcc: 7f ff ee 14 call 201c81c <rtems_rfs_buffers_release>
2020fd0: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020fd4: 7f ff a5 3b call 200a4c0 <rtems_semaphore_release>
2020fd8: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020fdc: ba 92 20 00 orcc %o0, 0, %i5
2020fe0: 02 80 00 0d be 2021014 <rtems_rfs_rtems_file_close+0xa4> <== ALWAYS TAKEN
2020fe4: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020fe8: 7f ff c8 20 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020fec: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020ff0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020ff4: 02 80 00 08 be 2021014 <rtems_rfs_rtems_file_close+0xa4> <== NOT EXECUTED
2020ff8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020ffc: 7f ff d8 f1 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2021000: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021004: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2021008: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
202100c: 40 00 09 76 call 20235e4 <printf> <== NOT EXECUTED
2021010: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
2021014: 81 c7 e0 08 ret
2021018: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202101c: 7f ff c8 13 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2021020: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2021024: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021028: 22 bf ff df be,a 2020fa4 <rtems_rfs_rtems_file_close+0x34><== NOT EXECUTED
202102c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2021030: 7f ff d8 e4 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2021034: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021038: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
202103c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2021040: 40 00 09 69 call 20235e4 <printf> <== NOT EXECUTED
2021044: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== 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);
2021048: 10 bf ff d7 b 2020fa4 <rtems_rfs_rtems_file_close+0x34> <== NOT EXECUTED
202104c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
02020e60 <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
2020e60: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2020e64: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020e68: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
2020e6c: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
2020e70: 94 10 20 00 clr %o2
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2020e74: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
2020e78: ba 10 00 1a mov %i2, %i5
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2020e7c: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
2020e80: b8 10 00 19 mov %i1, %i4
2020e84: 7f ff a5 45 call 200a398 <rtems_semaphore_obtain>
2020e88: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020e8c: b4 92 20 00 orcc %o0, 0, %i2
2020e90: 12 80 00 1d bne 2020f04 <rtems_rfs_rtems_file_ftruncate+0xa4><== NEVER TAKEN
2020e94: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
2020e98: 92 10 00 1c mov %i4, %o1
2020e9c: 90 10 00 1b mov %i3, %o0
2020ea0: 7f ff f7 0f call 201eadc <rtems_rfs_file_set_size>
2020ea4: 94 10 00 1d mov %i5, %o2
if (rc)
2020ea8: b8 92 20 00 orcc %o0, 0, %i4
2020eac: 22 80 00 07 be,a 2020ec8 <rtems_rfs_rtems_file_ftruncate+0x68><== ALWAYS TAKEN
2020eb0: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
2020eb4: 40 00 06 64 call 2022844 <__errno> <== NOT EXECUTED
2020eb8: 01 00 00 00 nop <== NOT EXECUTED
2020ebc: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2020ec0: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
2020ec4: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
2020ec8: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2020ecc: 7f ff e8 fe call 201b2c4 <rtems_rfs_block_get_size>
2020ed0: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2020ed4: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
2020ed8: d0 3e 20 08 std %o0, [ %i0 + 8 ]
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2020edc: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2020ee0: 7f ff ee 4f call 201c81c <rtems_rfs_buffers_release>
2020ee4: f6 02 20 7c ld [ %o0 + 0x7c ], %i3
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020ee8: 7f ff a5 76 call 200a4c0 <rtems_semaphore_release>
2020eec: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020ef0: b6 92 20 00 orcc %o0, 0, %i3
2020ef4: 12 80 00 11 bne 2020f38 <rtems_rfs_rtems_file_ftruncate+0xd8><== NEVER TAKEN
2020ef8: 90 10 20 00 clr %o0
return rc;
}
2020efc: 81 c7 e0 08 ret
2020f00: 91 e8 00 1c restore %g0, %i4, %o0
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020f04: 7f ff c8 59 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020f08: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020f0c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020f10: 22 bf ff e3 be,a 2020e9c <rtems_rfs_rtems_file_ftruncate+0x3c><== NOT EXECUTED
2020f14: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2020f18: 7f ff d9 2a call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020f1c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2020f20: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020f24: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020f28: 40 00 09 af call 20235e4 <printf> <== NOT EXECUTED
2020f2c: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
2020f30: 10 bf ff db b 2020e9c <rtems_rfs_rtems_file_ftruncate+0x3c><== NOT EXECUTED
2020f34: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020f38: 7f ff c8 4c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020f3c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020f40: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020f44: 02 bf ff ee be 2020efc <rtems_rfs_rtems_file_ftruncate+0x9c><== NOT EXECUTED
2020f48: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020f4c: 7f ff d9 1d call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020f50: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rc;
}
2020f54: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
2020f58: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020f5c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020f60: 40 00 09 a1 call 20235e4 <printf> <== NOT EXECUTED
2020f64: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2020f68: 81 c7 e0 08 ret <== NOT EXECUTED
2020f6c: 81 e8 00 00 restore <== NOT EXECUTED
02020c80 <rtems_rfs_rtems_file_ioctl>:
static int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
return 0;
}
2020c80: 81 c3 e0 08 retl <== NOT EXECUTED
2020c84: 90 10 20 00 clr %o0 <== NOT EXECUTED
020212d8 <rtems_rfs_rtems_file_lseek>:
*/
static rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
20212d8: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
20212dc: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20212e0: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
20212e4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20212e8: 94 10 20 00 clr %o2
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
20212ec: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
20212f0: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
20212f4: 7f ff a4 29 call 200a398 <rtems_semaphore_obtain>
20212f8: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20212fc: b8 92 20 00 orcc %o0, 0, %i4
2021300: 12 80 00 26 bne 2021398 <rtems_rfs_rtems_file_lseek+0xc0> <== NEVER TAKEN
2021304: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2021308: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
rc = rtems_rfs_file_seek (file, pos, &pos);
202130c: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2021310: c4 3f bf f8 std %g2, [ %fp + -8 ]
rc = rtems_rfs_file_seek (file, pos, &pos);
2021314: 92 10 00 02 mov %g2, %o1
2021318: 94 10 00 03 mov %g3, %o2
202131c: 7f ff f5 c9 call 201ea40 <rtems_rfs_file_seek>
2021320: 96 07 bf f8 add %fp, -8, %o3
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2021324: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
2021328: b8 10 00 08 mov %o0, %i4
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
202132c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
2021330: 80 a7 20 00 cmp %i4, 0
2021334: 02 80 00 0f be 2021370 <rtems_rfs_rtems_file_lseek+0x98> <== ALWAYS TAKEN
2021338: fa 02 20 7c ld [ %o0 + 0x7c ], %i5
202133c: 7f ff ed 38 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2021340: 01 00 00 00 nop <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2021344: 7f ff a4 5f call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2021348: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
202134c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2021350: 12 80 00 2d bne 2021404 <rtems_rfs_rtems_file_lseek+0x12c><== NOT EXECUTED
2021354: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
2021358: 40 00 05 3b call 2022844 <__errno> <== NOT EXECUTED
202135c: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
2021360: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2021364: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
2021368: 81 c7 e0 08 ret <== NOT EXECUTED
202136c: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
2021370: 7f ff ed 2b call 201c81c <rtems_rfs_buffers_release>
2021374: 01 00 00 00 nop
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2021378: 7f ff a4 52 call 200a4c0 <rtems_semaphore_release>
202137c: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2021380: ba 92 20 00 orcc %o0, 0, %i5
2021384: 12 80 00 12 bne 20213cc <rtems_rfs_rtems_file_lseek+0xf4> <== NEVER TAKEN
2021388: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
202138c: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0
}
2021390: 81 c7 e0 08 ret
2021394: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2021398: 7f ff c7 34 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
202139c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20213a0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20213a4: 22 bf ff da be,a 202130c <rtems_rfs_rtems_file_lseek+0x34><== NOT EXECUTED
20213a8: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20213ac: 7f ff d8 05 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20213b0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20213b4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20213b8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20213bc: 40 00 08 8a call 20235e4 <printf> <== NOT EXECUTED
20213c0: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
20213c4: 10 bf ff d2 b 202130c <rtems_rfs_rtems_file_lseek+0x34> <== NOT EXECUTED
20213c8: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20213cc: 7f ff c7 27 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20213d0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20213d4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20213d8: 22 bf ff ee be,a 2021390 <rtems_rfs_rtems_file_lseek+0xb8><== NOT EXECUTED
20213dc: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20213e0: 7f ff d7 f8 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20213e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20213e8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20213ec: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20213f0: 40 00 08 7d call 20235e4 <printf> <== NOT EXECUTED
20213f4: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20213f8: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
20213fc: 81 c7 e0 08 ret <== NOT EXECUTED
2021400: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2021404: 7f ff c7 19 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2021408: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
202140c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021410: 02 bf ff d2 be 2021358 <rtems_rfs_rtems_file_lseek+0x80> <== NOT EXECUTED
2021414: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2021418: 7f ff d7 ea call 20173c0 <rtems_status_text> <== NOT EXECUTED
202141c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021420: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2021424: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2021428: 40 00 08 6f call 20235e4 <printf> <== NOT EXECUTED
202142c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2021430: 30 bf ff ca b,a 2021358 <rtems_rfs_rtems_file_lseek+0x80><== NOT EXECUTED
02021434 <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
2021434: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2021438: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
202143c: 92 10 20 00 clr %o1
2021440: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
2021444: 94 10 20 00 clr %o2
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2021448: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
202144c: b8 10 00 18 mov %i0, %i4
2021450: 7f ff a3 d2 call 200a398 <rtems_semaphore_obtain>
2021454: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2021458: b6 92 20 00 orcc %o0, 0, %i3
202145c: 12 80 00 27 bne 20214f8 <rtems_rfs_rtems_file_open+0xc4> <== NEVER TAKEN
2021460: 90 10 20 00 clr %o0
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
2021464: d2 07 20 1c ld [ %i4 + 0x1c ], %o1
2021468: 90 10 00 1d mov %i5, %o0
202146c: 94 10 20 00 clr %o2
2021470: 7f ff f2 8c call 201dea0 <rtems_rfs_file_open>
2021474: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
2021478: b6 92 20 00 orcc %o0, 0, %i3
202147c: 04 80 00 33 ble 2021548 <rtems_rfs_rtems_file_open+0x114> <== ALWAYS TAKEN
2021480: c2 07 bf fc ld [ %fp + -4 ], %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2021484: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2021488: 7f ff ec e5 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
202148c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2021490: 7f ff a4 0c call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2021494: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2021498: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
202149c: 12 80 00 07 bne 20214b8 <rtems_rfs_rtems_file_open+0x84> <== NOT EXECUTED
20214a0: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
20214a4: 40 00 04 e8 call 2022844 <__errno> <== NOT EXECUTED
20214a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20214ac: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
20214b0: 81 c7 e0 08 ret
20214b4: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20214b8: 7f ff c6 ec call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20214bc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20214c0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20214c4: 02 bf ff f8 be 20214a4 <rtems_rfs_rtems_file_open+0x70> <== NOT EXECUTED
20214c8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20214cc: 7f ff d7 bd call 20173c0 <rtems_status_text> <== NOT EXECUTED
20214d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20214d4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20214d8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20214dc: 40 00 08 42 call 20235e4 <printf> <== NOT EXECUTED
20214e0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20214e4: 40 00 04 d8 call 2022844 <__errno> <== NOT EXECUTED
20214e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20214ec: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
20214f0: 81 c7 e0 08 ret <== NOT EXECUTED
20214f4: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20214f8: 7f ff c6 dc call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20214fc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2021500: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021504: 22 bf ff d9 be,a 2021468 <rtems_rfs_rtems_file_open+0x34><== NOT EXECUTED
2021508: d2 07 20 1c ld [ %i4 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
202150c: 7f ff d7 ad call 20173c0 <rtems_status_text> <== NOT EXECUTED
2021510: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2021514: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2021518: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
202151c: 40 00 08 32 call 20235e4 <printf> <== NOT EXECUTED
2021520: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
2021524: d2 07 20 1c ld [ %i4 + 0x1c ], %o1 <== NOT EXECUTED
2021528: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
202152c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2021530: 7f ff f2 5c call 201dea0 <rtems_rfs_file_open> <== NOT EXECUTED
2021534: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
2021538: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
202153c: 34 bf ff d3 bg,a 2021488 <rtems_rfs_rtems_file_open+0x54><== NOT EXECUTED
2021540: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
2021544: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
rtems_rfs_rtems_set_iop_file_handle (iop, file);
rtems_rfs_rtems_unlock (fs);
return 0;
2021548: b0 10 20 00 clr %i0
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
202154c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
2021550: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2021554: 7f ff e7 5c call 201b2c4 <rtems_rfs_block_get_size>
2021558: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_set_iop_file_handle (iop, file);
202155c: c2 07 bf fc ld [ %fp + -4 ], %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2021560: f6 07 60 7c ld [ %i5 + 0x7c ], %i3
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
2021564: d0 3f 20 08 std %o0, [ %i4 + 8 ]
rtems_rfs_rtems_set_iop_file_handle (iop, file);
2021568: c2 27 20 20 st %g1, [ %i4 + 0x20 ]
rtems_rfs_buffers_release (fs);
202156c: 7f ff ec ac call 201c81c <rtems_rfs_buffers_release>
2021570: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2021574: 7f ff a3 d3 call 200a4c0 <rtems_semaphore_release>
2021578: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
202157c: ba 92 20 00 orcc %o0, 0, %i5
2021580: 02 bf ff cc be 20214b0 <rtems_rfs_rtems_file_open+0x7c> <== ALWAYS TAKEN
2021584: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2021588: 7f ff c6 b8 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
202158c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2021590: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021594: 02 80 00 08 be 20215b4 <rtems_rfs_rtems_file_open+0x180> <== NOT EXECUTED
2021598: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
202159c: 7f ff d7 89 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20215a0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20215a4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20215a8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20215ac: 40 00 08 0e call 20235e4 <printf> <== NOT EXECUTED
20215b0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
20215b4: 81 c7 e0 08 ret <== NOT EXECUTED
20215b8: 81 e8 00 00 restore <== NOT EXECUTED
02020c88 <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
2020c88: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2020c8c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2020c90: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
2020c94: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2020c98: 94 10 20 00 clr %o2
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2020c9c: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
2020ca0: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
2020ca4: 7f ff a5 bd call 200a398 <rtems_semaphore_obtain>
2020ca8: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020cac: b8 92 20 00 orcc %o0, 0, %i4
2020cb0: 12 80 00 5b bne 2020e1c <rtems_rfs_rtems_file_read+0x194> <== NEVER TAKEN
2020cb4: 90 10 20 00 clr %o0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2020cb8: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2020cbc: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
2020cc0: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2020cc4: f0 06 20 14 ld [ %i0 + 0x14 ], %i0
2020cc8: 7f ff e9 7f call 201b2c4 <rtems_rfs_block_get_size>
2020ccc: 92 02 60 84 add %o1, 0x84, %o1
if (pos < rtems_rfs_file_size (file))
2020cd0: 80 a2 00 1c cmp %o0, %i4
2020cd4: 08 80 00 43 bleu 2020de0 <rtems_rfs_rtems_file_read+0x158><== ALWAYS TAKEN
2020cd8: 01 00 00 00 nop
{
while (count)
2020cdc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2020ce0: 12 80 00 16 bne 2020d38 <rtems_rfs_rtems_file_read+0xb0> <== ALWAYS TAKEN
2020ce4: b0 10 20 00 clr %i0
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2020ce8: 10 80 00 29 b 2020d8c <rtems_rfs_rtems_file_read+0x104> <== NOT EXECUTED
2020cec: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
2020cf0: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2020cf4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2020cf8: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1
2020cfc: 90 10 00 19 mov %i1, %o0
2020d00: 92 02 40 01 add %o1, %g1, %o1
2020d04: 40 00 09 5a call 202326c <memcpy>
2020d08: 94 10 00 1c mov %i4, %o2
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
2020d0c: 90 10 00 1d mov %i5, %o0
2020d10: 92 10 00 1c mov %i4, %o1
2020d14: 94 10 20 01 mov 1, %o2
2020d18: 7f ff f6 82 call 201e720 <rtems_rfs_file_io_end>
2020d1c: b2 06 40 1c add %i1, %i4, %i1
if (rc > 0)
2020d20: 80 a2 20 00 cmp %o0, 0
2020d24: 14 80 00 16 bg 2020d7c <rtems_rfs_rtems_file_read+0xf4> <== NEVER TAKEN
2020d28: b6 10 00 08 mov %o0, %i3
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
2020d2c: 80 a6 a0 00 cmp %i2, 0
2020d30: 02 80 00 16 be 2020d88 <rtems_rfs_rtems_file_read+0x100> <== ALWAYS TAKEN
2020d34: b0 07 00 18 add %i4, %i0, %i0
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
2020d38: 92 07 bf fc add %fp, -4, %o1
2020d3c: 94 10 20 01 mov 1, %o2
2020d40: 7f ff f5 eb call 201e4ec <rtems_rfs_file_io_start>
2020d44: 90 10 00 1d mov %i5, %o0
if (rc > 0)
2020d48: b8 92 20 00 orcc %o0, 0, %i4
2020d4c: 14 80 00 41 bg 2020e50 <rtems_rfs_rtems_file_read+0x1c8> <== NEVER TAKEN
2020d50: 01 00 00 00 nop
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
2020d54: f8 07 bf fc ld [ %fp + -4 ], %i4
2020d58: 80 a7 20 00 cmp %i4, 0
2020d5c: 02 80 00 0b be 2020d88 <rtems_rfs_rtems_file_read+0x100> <== NEVER TAKEN
2020d60: 80 a7 00 1a cmp %i4, %i2
break;
if (size > count)
2020d64: 28 bf ff e3 bleu,a 2020cf0 <rtems_rfs_rtems_file_read+0x68><== ALWAYS TAKEN
2020d68: b4 26 80 1c sub %i2, %i4, %i2
size = count;
2020d6c: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
2020d70: f4 27 bf fc st %i2, [ %fp + -4 ] <== NOT EXECUTED
2020d74: 10 bf ff df b 2020cf0 <rtems_rfs_rtems_file_read+0x68> <== NOT EXECUTED
2020d78: b4 10 20 00 clr %i2 <== NOT EXECUTED
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
2020d7c: 40 00 06 b2 call 2022844 <__errno> <== NOT EXECUTED
2020d80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020d84: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2020d88: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2020d8c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2020d90: 7f ff ee a3 call 201c81c <rtems_rfs_buffers_release>
2020d94: fa 02 20 7c ld [ %o0 + 0x7c ], %i5
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020d98: 7f ff a5 ca call 200a4c0 <rtems_semaphore_release>
2020d9c: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2020da0: ba 92 20 00 orcc %o0, 0, %i5
2020da4: 02 80 00 0d be 2020dd8 <rtems_rfs_rtems_file_read+0x150> <== ALWAYS TAKEN
2020da8: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020dac: 7f ff c8 af call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020db0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020db4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020db8: 02 80 00 08 be 2020dd8 <rtems_rfs_rtems_file_read+0x150> <== NOT EXECUTED
2020dbc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2020dc0: 7f ff d9 80 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020dc4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020dc8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020dcc: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020dd0: 40 00 0a 05 call 20235e4 <printf> <== NOT EXECUTED
2020dd4: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
return read;
}
2020dd8: 81 c7 e0 08 ret
2020ddc: 81 e8 00 00 restore
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2020de0: 12 80 00 04 bne 2020df0 <rtems_rfs_rtems_file_read+0x168> <== NEVER TAKEN
2020de4: 80 a2 40 18 cmp %o1, %i0
2020de8: 18 bf ff be bgu 2020ce0 <rtems_rfs_rtems_file_read+0x58> <== ALWAYS TAKEN
2020dec: 80 a6 a0 00 cmp %i2, 0
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2020df0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
size_t count)
{
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
rtems_rfs_pos pos;
uint8_t* data = buffer;
ssize_t read = 0;
2020df4: b0 10 20 00 clr %i0 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2020df8: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
2020dfc: 7f ff ee 88 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2020e00: fa 02 20 7c ld [ %o0 + 0x7c ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2020e04: 7f ff a5 af call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2020e08: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2020e0c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2020e10: 02 bf ff f2 be 2020dd8 <rtems_rfs_rtems_file_read+0x150> <== NOT EXECUTED
2020e14: 90 10 20 00 clr %o0 <== NOT EXECUTED
2020e18: 30 bf ff e5 b,a 2020dac <rtems_rfs_rtems_file_read+0x124><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2020e1c: 7f ff c8 93 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2020e20: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2020e24: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020e28: 22 bf ff a5 be,a 2020cbc <rtems_rfs_rtems_file_read+0x34><== NOT EXECUTED
2020e2c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2020e30: 7f ff d9 64 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2020e34: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2020e38: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2020e3c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2020e40: 40 00 09 e9 call 20235e4 <printf> <== NOT EXECUTED
2020e44: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2020e48: 10 bf ff 9d b 2020cbc <rtems_rfs_rtems_file_read+0x34> <== NOT EXECUTED
2020e4c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
2020e50: 40 00 06 7d call 2022844 <__errno> <== NOT EXECUTED
2020e54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020e58: 10 bf ff cc b 2020d88 <rtems_rfs_rtems_file_read+0x100> <== NOT EXECUTED
2020e5c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
02021050 <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
2021050: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2021054: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2021058: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
202105c: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
2021060: 94 10 20 00 clr %o2
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2021064: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
2021068: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
202106c: 7f ff a4 cb call 200a398 <rtems_semaphore_obtain>
2021070: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2021074: ba 92 20 00 orcc %o0, 0, %i5
2021078: 12 80 00 60 bne 20211f8 <rtems_rfs_rtems_file_write+0x1a8><== NEVER TAKEN
202107c: 90 10 20 00 clr %o0
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
2021080: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2021084: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
2021088: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
202108c: 7f ff e8 8e call 201b2c4 <rtems_rfs_block_get_size>
2021090: 92 02 60 84 add %o1, 0x84, %o1
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
2021094: 80 a2 00 1c cmp %o0, %i4
2021098: 38 80 00 0e bgu,a 20210d0 <rtems_rfs_rtems_file_write+0x80><== NEVER TAKEN
202109c: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
20210a0: 80 a2 00 1c cmp %o0, %i4
20210a4: 02 80 00 48 be 20211c4 <rtems_rfs_rtems_file_write+0x174> <== ALWAYS TAKEN
20210a8: 80 a2 40 1d cmp %o1, %i5
{
rc = rtems_rfs_file_set_size (file, pos + 1);
20210ac: 86 87 60 01 addcc %i5, 1, %g3 <== NOT EXECUTED
20210b0: 84 47 20 00 addx %i4, 0, %g2 <== NOT EXECUTED
20210b4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20210b8: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
20210bc: 7f ff f6 88 call 201eadc <rtems_rfs_file_set_size> <== NOT EXECUTED
20210c0: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
if (rc)
20210c4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
20210c8: 12 80 00 67 bne 2021264 <rtems_rfs_rtems_file_write+0x214><== NOT EXECUTED
20210cc: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
}
rtems_rfs_file_set_bpos (file, pos);
20210d0: 94 10 00 1d mov %i5, %o2
20210d4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
20210d8: 92 10 00 1c mov %i4, %o1
20210dc: 7f ff e8 4b call 201b208 <rtems_rfs_block_get_bpos>
20210e0: 96 06 e0 10 add %i3, 0x10, %o3
while (count)
20210e4: 80 a6 a0 00 cmp %i2, 0
20210e8: 12 80 00 07 bne 2021104 <rtems_rfs_rtems_file_write+0xb4> <== ALWAYS TAKEN
20210ec: ba 10 20 00 clr %i5
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
20210f0: 10 80 00 26 b 2021188 <rtems_rfs_rtems_file_write+0x138> <== NOT EXECUTED
20210f4: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
20210f8: b4 a6 80 1c subcc %i2, %i4, %i2
20210fc: 02 80 00 22 be 2021184 <rtems_rfs_rtems_file_write+0x134> <== ALWAYS TAKEN
2021100: ba 07 40 1c add %i5, %i4, %i5
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
2021104: 92 07 bf fc add %fp, -4, %o1
rtems_rfs_file_set_bpos (file, pos);
while (count)
{
size_t size = count;
2021108: f4 27 bf fc st %i2, [ %fp + -4 ]
rc = rtems_rfs_file_io_start (file, &size, false);
202110c: 94 10 20 00 clr %o2
2021110: 7f ff f4 f7 call 201e4ec <rtems_rfs_file_io_start>
2021114: 90 10 00 1b mov %i3, %o0
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
2021118: 92 10 00 19 mov %i1, %o1
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
202111c: 80 a2 20 00 cmp %o0, 0
2021120: 12 80 00 5e bne 2021298 <rtems_rfs_rtems_file_write+0x248><== NEVER TAKEN
2021124: b8 10 00 08 mov %o0, %i4
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
2021128: d4 07 bf fc ld [ %fp + -4 ], %o2
202112c: 80 a2 80 1a cmp %o2, %i2
2021130: 28 80 00 05 bleu,a 2021144 <rtems_rfs_rtems_file_write+0xf4><== NEVER TAKEN
2021134: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 <== NOT EXECUTED
size = count;
2021138: f4 27 bf fc st %i2, [ %fp + -4 ]
202113c: 94 10 00 1a mov %i2, %o2
memcpy (rtems_rfs_file_data (file), data, size);
2021140: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
2021144: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1
2021148: d0 00 a0 24 ld [ %g2 + 0x24 ], %o0
202114c: 40 00 08 48 call 202326c <memcpy>
2021150: 90 02 00 01 add %o0, %g1, %o0
data += size;
2021154: f8 07 bf fc ld [ %fp + -4 ], %i4
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
2021158: 90 10 00 1b mov %i3, %o0
202115c: 92 10 00 1c mov %i4, %o1
2021160: 94 10 20 00 clr %o2
2021164: 7f ff f5 6f call 201e720 <rtems_rfs_file_io_end>
2021168: b2 06 40 1c add %i1, %i4, %i1
if (rc)
202116c: 80 a2 20 00 cmp %o0, 0
2021170: 02 bf ff e2 be 20210f8 <rtems_rfs_rtems_file_write+0xa8> <== ALWAYS TAKEN
2021174: a0 10 00 08 mov %o0, %l0
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
2021178: 40 00 05 b3 call 2022844 <__errno> <== NOT EXECUTED
202117c: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
2021180: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
break;
}
}
iop->size = rtems_rfs_file_size (file);
2021184: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
2021188: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
202118c: 7f ff e8 4e call 201b2c4 <rtems_rfs_block_get_size>
2021190: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2021194: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
2021198: d0 3e 20 08 std %o0, [ %i0 + 8 ]
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
202119c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
20211a0: 7f ff ed 9f call 201c81c <rtems_rfs_buffers_release>
20211a4: f8 02 20 7c ld [ %o0 + 0x7c ], %i4
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20211a8: 7f ff a4 c6 call 200a4c0 <rtems_semaphore_release>
20211ac: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20211b0: b8 92 20 00 orcc %o0, 0, %i4
20211b4: 12 80 00 1e bne 202122c <rtems_rfs_rtems_file_write+0x1dc><== NEVER TAKEN
20211b8: 90 10 20 00 clr %o0
return write;
}
20211bc: 81 c7 e0 08 ret
20211c0: 91 e8 00 1d restore %g0, %i5, %o0
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
20211c4: 38 bf ff c3 bgu,a 20210d0 <rtems_rfs_rtems_file_write+0x80>
20211c8: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
{
rc = rtems_rfs_file_set_size (file, pos + 1);
20211cc: 86 87 60 01 addcc %i5, 1, %g3
20211d0: 84 47 20 00 addx %i4, 0, %g2
20211d4: 90 10 00 1b mov %i3, %o0
20211d8: 92 10 00 02 mov %g2, %o1
20211dc: 7f ff f6 40 call 201eadc <rtems_rfs_file_set_size>
20211e0: 94 10 00 03 mov %g3, %o2
if (rc)
20211e4: a0 92 20 00 orcc %o0, 0, %l0
20211e8: 02 bf ff ba be 20210d0 <rtems_rfs_rtems_file_write+0x80> <== ALWAYS TAKEN
20211ec: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20211f0: 10 80 00 1e b 2021268 <rtems_rfs_rtems_file_write+0x218> <== NOT EXECUTED
20211f4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20211f8: 7f ff c7 9c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20211fc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2021200: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021204: 22 bf ff a0 be,a 2021084 <rtems_rfs_rtems_file_write+0x34><== NOT EXECUTED
2021208: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
202120c: 7f ff d8 6d call 20173c0 <rtems_status_text> <== NOT EXECUTED
2021210: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021214: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2021218: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
202121c: 40 00 08 f2 call 20235e4 <printf> <== NOT EXECUTED
2021220: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
2021224: 10 bf ff 98 b 2021084 <rtems_rfs_rtems_file_write+0x34> <== NOT EXECUTED
2021228: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202122c: 7f ff c7 8f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2021230: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2021234: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021238: 02 bf ff e1 be 20211bc <rtems_rfs_rtems_file_write+0x16c> <== NOT EXECUTED
202123c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2021240: 7f ff d8 60 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2021244: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
2021248: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED
202124c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2021250: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2021254: 40 00 08 e4 call 20235e4 <printf> <== NOT EXECUTED
2021258: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
202125c: 81 c7 e0 08 ret <== NOT EXECUTED
2021260: 81 e8 00 00 restore <== NOT EXECUTED
if (pos >= rtems_rfs_file_size (file))
{
rc = rtems_rfs_file_set_size (file, pos + 1);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2021264: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
2021268: 7f ff ed 6d call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
202126c: fa 02 20 7c ld [ %o0 + 0x7c ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2021270: 7f ff a4 94 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2021274: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2021278: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
202127c: 12 80 00 0b bne 20212a8 <rtems_rfs_rtems_file_write+0x258><== NOT EXECUTED
2021280: 90 10 20 00 clr %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
2021284: 40 00 05 70 call 2022844 <__errno> <== NOT EXECUTED
2021288: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
202128c: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
2021290: 81 c7 e0 08 ret <== NOT EXECUTED
2021294: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
2021298: 40 00 05 6b call 2022844 <__errno> <== NOT EXECUTED
202129c: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
20212a0: 10 bf ff b9 b 2021184 <rtems_rfs_rtems_file_write+0x134> <== NOT EXECUTED
20212a4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20212a8: 7f ff c7 70 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20212ac: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20212b0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20212b4: 02 bf ff f4 be 2021284 <rtems_rfs_rtems_file_write+0x234> <== NOT EXECUTED
20212b8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20212bc: 7f ff d8 41 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20212c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20212c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20212c8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20212cc: 40 00 08 c6 call 20235e4 <printf> <== NOT EXECUTED
20212d0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20212d4: 30 bf ff ec b,a 2021284 <rtems_rfs_rtems_file_write+0x234><== NOT EXECUTED
02011398 <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
2011398: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
201139c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20113a0: f8 06 00 00 ld [ %i0 ], %i4
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20113a4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20113a8: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
20113ac: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
20113b0: 94 10 20 00 clr %o2
20113b4: 7f ff e3 f9 call 200a398 <rtems_semaphore_obtain>
20113b8: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20113bc: b6 92 20 00 orcc %o0, 0, %i3
20113c0: 12 80 00 8b bne 20115ec <rtems_rfs_rtems_fstat+0x254> <== NEVER TAKEN
20113c4: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20113c8: 92 10 00 1c mov %i4, %o1
20113cc: 90 10 00 1d mov %i5, %o0
20113d0: 94 07 bf d8 add %fp, -40, %o2
20113d4: 7f ff fa e6 call 200ff6c <rtems_rfs_inode_open>
20113d8: 96 10 20 01 mov 1, %o3
if (rc)
20113dc: b8 92 20 00 orcc %o0, 0, %i4
20113e0: 12 80 00 61 bne 2011564 <rtems_rfs_rtems_fstat+0x1cc> <== NEVER TAKEN
20113e4: c2 07 bf e4 ld [ %fp + -28 ], %g1
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
20113e8: 07 00 00 18 sethi %hi(0x6000), %g3
20113ec: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
20113f0: d0 08 60 02 ldub [ %g1 + 2 ], %o0
20113f4: 91 2a 20 08 sll %o0, 8, %o0
20113f8: 90 10 80 08 or %g2, %o0, %o0
20113fc: 05 00 00 3c sethi %hi(0xf000), %g2
2011400: 84 0a 00 02 and %o0, %g2, %g2
2011404: 80 a0 80 03 cmp %g2, %g3
2011408: 12 80 00 64 bne 2011598 <rtems_rfs_rtems_fstat+0x200> <== ALWAYS TAKEN
201140c: 07 00 00 08 sethi %hi(0x2000), %g3
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
2011410: da 08 60 21 ldub [ %g1 + 0x21 ], %o5 <== NOT EXECUTED
2011414: c6 08 60 20 ldub [ %g1 + 0x20 ], %g3 <== NOT EXECUTED
2011418: de 08 60 23 ldub [ %g1 + 0x23 ], %o7 <== NOT EXECUTED
201141c: f6 08 60 22 ldub [ %g1 + 0x22 ], %i3 <== NOT EXECUTED
2011420: f8 08 60 1c ldub [ %g1 + 0x1c ], %i4 <== NOT EXECUTED
2011424: f0 08 60 1d ldub [ %g1 + 0x1d ], %i0 <== NOT EXECUTED
2011428: c8 08 60 1f ldub [ %g1 + 0x1f ], %g4 <== NOT EXECUTED
201142c: c4 08 60 1e ldub [ %g1 + 0x1e ], %g2 <== NOT EXECUTED
2011430: 83 2b 60 10 sll %o5, 0x10, %g1 <== NOT EXECUTED
2011434: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
2011438: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
201143c: 86 10 c0 01 or %g3, %g1, %g3 <== NOT EXECUTED
2011440: b9 2f 20 18 sll %i4, 0x18, %i4 <== NOT EXECUTED
2011444: 86 10 c0 0f or %g3, %o7, %g3 <== NOT EXECUTED
2011448: 83 2e 20 10 sll %i0, 0x10, %g1 <== NOT EXECUTED
201144c: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED
2011450: 82 17 00 01 or %i4, %g1, %g1 <== NOT EXECUTED
2011454: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2011458: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
{
buf->st_rdev =
201145c: c6 26 60 1c st %g3, [ %i1 + 0x1c ] <== NOT EXECUTED
2011460: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
2011464: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
2011468: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
201146c: c4 18 40 00 ldd [ %g1 ], %g2
buf->st_ino = rtems_rfs_inode_ino (&inode);
2011470: c2 07 bf e0 ld [ %fp + -32 ], %g1
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
2011474: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
2011478: 40 00 06 fa call 2013060 <rtems_rfs_rtems_mode>
201147c: c2 26 60 08 st %g1, [ %i1 + 8 ]
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
2011480: c2 07 bf e4 ld [ %fp + -28 ], %g1
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);
2011484: d0 26 60 0c st %o0, [ %i1 + 0xc ]
*/
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);
2011488: c6 08 60 01 ldub [ %g1 + 1 ], %g3
201148c: c4 08 40 00 ldub [ %g1 ], %g2
if (links == 0xffff)
links = 0;
2011490: 09 3f ff c0 sethi %hi(0xffff0000), %g4
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
2011494: 85 28 a0 08 sll %g2, 8, %g2
2011498: 84 10 80 03 or %g2, %g3, %g2
if (links == 0xffff)
201149c: 87 28 a0 10 sll %g2, 0x10, %g3
20114a0: 87 30 e0 10 srl %g3, 0x10, %g3
links = 0;
20114a4: 86 39 00 03 xnor %g4, %g3, %g3
20114a8: 80 a0 00 03 cmp %g0, %g3
20114ac: 86 60 20 00 subx %g0, 0, %g3
20114b0: 84 08 80 03 and %g2, %g3, %g2
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
20114b4: c4 36 60 10 sth %g2, [ %i1 + 0x10 ]
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
20114b8: c4 08 60 06 ldub [ %g1 + 6 ], %g2
20114bc: c6 08 60 07 ldub [ %g1 + 7 ], %g3
20114c0: 85 28 a0 08 sll %g2, 8, %g2
20114c4: 84 10 80 03 or %g2, %g3, %g2
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
20114c8: c4 36 60 12 sth %g2, [ %i1 + 0x12 ]
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
20114cc: c4 08 60 04 ldub [ %g1 + 4 ], %g2
20114d0: c2 08 60 05 ldub [ %g1 + 5 ], %g1
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
20114d4: d2 07 bf e0 ld [ %fp + -32 ], %o1
20114d8: 85 28 a0 18 sll %g2, 0x18, %g2
20114dc: 83 28 60 10 sll %g1, 0x10, %g1
20114e0: 82 10 80 01 or %g2, %g1, %g1
20114e4: 83 30 60 10 srl %g1, 0x10, %g1
20114e8: 90 10 00 1d mov %i5, %o0
20114ec: 40 00 36 45 call 201ee00 <rtems_rfs_file_get_shared>
20114f0: c2 36 60 14 sth %g1, [ %i1 + 0x14 ]
if (shared)
20114f4: 92 92 20 00 orcc %o0, 0, %o1
20114f8: 02 80 00 6c be 20116a8 <rtems_rfs_rtems_fstat+0x310> <== ALWAYS TAKEN
20114fc: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
2011500: c2 02 60 84 ld [ %o1 + 0x84 ], %g1 <== NOT EXECUTED
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
2011504: f8 02 60 8c ld [ %o1 + 0x8c ], %i4 <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
2011508: c8 02 60 90 ld [ %o1 + 0x90 ], %g4 <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
201150c: c6 02 60 94 ld [ %o1 + 0x94 ], %g3 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
2011510: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
2011514: c2 26 60 44 st %g1, [ %i1 + 0x44 ] <== NOT EXECUTED
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
2011518: f8 26 60 28 st %i4, [ %i1 + 0x28 ] <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
201151c: 03 00 00 3c sethi %hi(0xf000), %g1 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
2011520: c8 26 60 30 st %g4, [ %i1 + 0x30 ] <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
2011524: 84 08 80 01 and %g2, %g1, %g2 <== NOT EXECUTED
2011528: 03 00 00 28 sethi %hi(0xa000), %g1 <== NOT EXECUTED
201152c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2011530: 12 80 00 3c bne 2011620 <rtems_rfs_rtems_fstat+0x288> <== NOT EXECUTED
2011534: c6 26 60 38 st %g3, [ %i1 + 0x38 ] <== NOT EXECUTED
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
2011538: c2 12 60 8a lduh [ %o1 + 0x8a ], %g1 <== NOT EXECUTED
201153c: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
2011540: c2 26 60 24 st %g1, [ %i1 + 0x24 ] <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
2011544: c2 07 60 08 ld [ %i5 + 8 ], %g1
rc = rtems_rfs_inode_close (fs, &inode);
2011548: 90 10 00 1d mov %i5, %o0
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
201154c: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
rc = rtems_rfs_inode_close (fs, &inode);
2011550: 7f ff fa fe call 2010148 <rtems_rfs_inode_close>
2011554: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
2011558: b8 92 20 00 orcc %o0, 0, %i4
201155c: 24 80 00 3e ble,a 2011654 <rtems_rfs_rtems_fstat+0x2bc> <== ALWAYS TAKEN
2011560: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* 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);
2011564: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011568: 40 00 2c ad call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
201156c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011570: 7f ff e3 d4 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011574: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011578: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
201157c: 12 80 00 0c bne 20115ac <rtems_rfs_rtems_fstat+0x214> <== NOT EXECUTED
2011580: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
2011584: 40 00 44 b0 call 2022844 <__errno> <== NOT EXECUTED
2011588: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201158c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011590: 81 c7 e0 08 ret
2011594: 81 e8 00 00 restore
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
2011598: 80 a0 80 03 cmp %g2, %g3
201159c: 32 bf ff b4 bne,a 201146c <rtems_rfs_rtems_fstat+0xd4> <== ALWAYS TAKEN
20115a0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
20115a4: 10 bf ff 9c b 2011414 <rtems_rfs_rtems_fstat+0x7c> <== NOT EXECUTED
20115a8: da 08 60 21 ldub [ %g1 + 0x21 ], %o5 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20115ac: 40 00 06 af call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20115b0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20115b4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20115b8: 02 bf ff f3 be 2011584 <rtems_rfs_rtems_fstat+0x1ec> <== NOT EXECUTED
20115bc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20115c0: 40 00 17 80 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20115c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20115c8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20115cc: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20115d0: 40 00 48 05 call 20235e4 <printf> <== NOT EXECUTED
20115d4: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
20115d8: 40 00 44 9b call 2022844 <__errno> <== NOT EXECUTED
20115dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20115e0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20115e4: 81 c7 e0 08 ret <== NOT EXECUTED
20115e8: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20115ec: 40 00 06 9f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20115f0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20115f4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20115f8: 22 bf ff 75 be,a 20113cc <rtems_rfs_rtems_fstat+0x34> <== NOT EXECUTED
20115fc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011600: 40 00 17 70 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011604: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2011608: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201160c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011610: 40 00 47 f5 call 20235e4 <printf> <== NOT EXECUTED
2011614: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2011618: 10 bf ff 6d b 20113cc <rtems_rfs_rtems_fstat+0x34> <== NOT EXECUTED
201161c: 92 10 00 1c mov %i4, %o1 <== 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);
2011620: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011624: 40 00 27 28 call 201b2c4 <rtems_rfs_block_get_size> <== NOT EXECUTED
2011628: 92 02 60 84 add %o1, 0x84, %o1 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
201162c: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
2011630: d0 3e 60 20 std %o0, [ %i1 + 0x20 ] <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
2011634: c2 26 60 40 st %g1, [ %i1 + 0x40 ] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
2011638: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201163c: 7f ff fa c3 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2011640: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
if (rc > 0)
2011644: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2011648: 34 bf ff c8 bg,a 2011568 <rtems_rfs_rtems_fstat+0x1d0> <== NOT EXECUTED
201164c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== 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);
2011650: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011654: 40 00 2c 72 call 201c81c <rtems_rfs_buffers_release>
2011658: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201165c: d0 07 00 00 ld [ %i4 ], %o0
2011660: 7f ff e3 98 call 200a4c0 <rtems_semaphore_release>
2011664: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2011668: ba 92 20 00 orcc %o0, 0, %i5
201166c: 02 bf ff c9 be 2011590 <rtems_rfs_rtems_fstat+0x1f8> <== ALWAYS TAKEN
2011670: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011674: 40 00 06 7d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011678: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201167c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011680: 02 80 00 08 be 20116a0 <rtems_rfs_rtems_fstat+0x308> <== NOT EXECUTED
2011684: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011688: 40 00 17 4e call 20173c0 <rtems_status_text> <== NOT EXECUTED
201168c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011690: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011694: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011698: 40 00 47 d3 call 20235e4 <printf> <== NOT EXECUTED
201169c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
20116a0: 81 c7 e0 08 ret <== NOT EXECUTED
20116a4: 81 e8 00 00 restore <== NOT EXECUTED
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
20116a8: c6 06 60 0c ld [ %i1 + 0xc ], %g3
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
20116ac: f8 08 60 13 ldub [ %g1 + 0x13 ], %i4
20116b0: c4 08 60 10 ldub [ %g1 + 0x10 ], %g2
20116b4: f6 08 60 11 ldub [ %g1 + 0x11 ], %i3
20116b8: c8 08 60 12 ldub [ %g1 + 0x12 ], %g4
20116bc: b7 2e e0 10 sll %i3, 0x10, %i3
20116c0: 89 29 20 08 sll %g4, 8, %g4
20116c4: 85 28 a0 18 sll %g2, 0x18, %g2
20116c8: 84 10 80 1b or %g2, %i3, %g2
20116cc: 84 10 80 1c or %g2, %i4, %g2
20116d0: 84 10 80 04 or %g2, %g4, %g2
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
20116d4: c4 26 60 28 st %g2, [ %i1 + 0x28 ]
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
20116d8: f8 08 60 17 ldub [ %g1 + 0x17 ], %i4
20116dc: c4 08 60 14 ldub [ %g1 + 0x14 ], %g2
20116e0: f6 08 60 15 ldub [ %g1 + 0x15 ], %i3
20116e4: c8 08 60 16 ldub [ %g1 + 0x16 ], %g4
20116e8: b7 2e e0 10 sll %i3, 0x10, %i3
20116ec: 89 29 20 08 sll %g4, 8, %g4
20116f0: 85 28 a0 18 sll %g2, 0x18, %g2
20116f4: 84 10 80 1b or %g2, %i3, %g2
20116f8: 84 10 80 1c or %g2, %i4, %g2
20116fc: 84 10 80 04 or %g2, %g4, %g2
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
2011700: c4 26 60 30 st %g2, [ %i1 + 0x30 ]
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
2011704: f8 08 60 1b ldub [ %g1 + 0x1b ], %i4
2011708: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2
201170c: f6 08 60 19 ldub [ %g1 + 0x19 ], %i3
2011710: c8 08 60 1a ldub [ %g1 + 0x1a ], %g4
2011714: b7 2e e0 10 sll %i3, 0x10, %i3
2011718: 89 29 20 08 sll %g4, 8, %g4
201171c: 85 28 a0 18 sll %g2, 0x18, %g2
2011720: 84 10 80 1b or %g2, %i3, %g2
2011724: 84 10 80 1c or %g2, %i4, %g2
2011728: 84 10 80 04 or %g2, %g4, %g2
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
201172c: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
2011730: c4 08 60 0c ldub [ %g1 + 0xc ], %g2
2011734: f6 08 60 0d ldub [ %g1 + 0xd ], %i3
2011738: f8 08 60 0f ldub [ %g1 + 0xf ], %i4
201173c: c8 08 60 0e ldub [ %g1 + 0xe ], %g4
2011740: 85 28 a0 18 sll %g2, 0x18, %g2
2011744: b7 2e e0 10 sll %i3, 0x10, %i3
2011748: 89 29 20 08 sll %g4, 8, %g4
201174c: 84 10 80 1b or %g2, %i3, %g2
2011750: 84 10 80 1c or %g2, %i4, %g2
2011754: 84 10 80 04 or %g2, %g4, %g2
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
2011758: c4 26 60 44 st %g2, [ %i1 + 0x44 ]
if (S_ISLNK (buf->st_mode))
201175c: 05 00 00 3c sethi %hi(0xf000), %g2
2011760: 86 08 c0 02 and %g3, %g2, %g3
2011764: 05 00 00 28 sethi %hi(0xa000), %g2
2011768: 80 a0 c0 02 cmp %g3, %g2
201176c: 12 80 00 09 bne 2011790 <rtems_rfs_rtems_fstat+0x3f8>
2011770: 90 10 00 1d mov %i5, %o0
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
2011774: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
2011778: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
201177c: c0 26 60 20 clr [ %i1 + 0x20 ]
2011780: 83 28 e0 08 sll %g3, 8, %g1
2011784: 82 10 80 01 or %g2, %g1, %g1
2011788: 10 bf ff 6f b 2011544 <rtems_rfs_rtems_fstat+0x1ac>
201178c: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
2011790: 7f ff fc 21 call 2010814 <rtems_rfs_inode_get_size>
2011794: 92 07 bf d8 add %fp, -40, %o1
2011798: 10 bf ff 6b b 2011544 <rtems_rfs_rtems_fstat+0x1ac>
201179c: d0 3e 60 20 std %o0, [ %i1 + 0x20 ]
02011c28 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
2011c28: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
2011c2c: 7f ff d1 bb call 2006318 <malloc>
2011c30: 90 10 20 04 mov 4, %o0
if (!rtems)
2011c34: ba 92 20 00 orcc %o0, 0, %i5
2011c38: 02 80 00 52 be 2011d80 <rtems_rfs_rtems_initialise+0x158> <== NEVER TAKEN
2011c3c: 01 00 00 00 nop
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
rc = rtems_rfs_mutex_create (&rtems->access);
2011c40: 40 00 39 8b call 202026c <rtems_rfs_mutex_create>
2011c44: c0 27 40 00 clr [ %i5 ]
if (rc > 0)
2011c48: b8 92 20 00 orcc %o0, 0, %i4
2011c4c: 24 80 00 09 ble,a 2011c70 <rtems_rfs_rtems_initialise+0x48><== ALWAYS TAKEN
2011c50: d0 07 40 00 ld [ %i5 ], %o0
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
if (rc)
{
free (rtems);
2011c54: 7f ff cf e1 call 2005bd8 <free> <== NOT EXECUTED
2011c58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
2011c5c: 40 00 42 fa call 2022844 <__errno> <== NOT EXECUTED
2011c60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011c64: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011c68: 81 c7 e0 08 ret <== NOT EXECUTED
2011c6c: 81 e8 00 00 restore <== 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);
2011c70: 92 10 20 00 clr %o1
2011c74: 7f ff e1 c9 call 200a398 <rtems_semaphore_obtain>
2011c78: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2011c7c: b8 92 20 00 orcc %o0, 0, %i4
2011c80: 12 80 00 1c bne 2011cf0 <rtems_rfs_rtems_initialise+0xc8> <== NEVER TAKEN
2011c84: 94 10 20 00 clr %o2
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
2011c88: d0 06 20 70 ld [ %i0 + 0x70 ], %o0
2011c8c: 92 10 00 1d mov %i5, %o1
2011c90: 40 00 34 84 call 201eea0 <rtems_rfs_fs_open>
2011c94: 96 07 bf fc add %fp, -4, %o3
if (rc)
2011c98: b8 92 20 00 orcc %o0, 0, %i4
2011c9c: 12 bf ff ee bne 2011c54 <rtems_rfs_rtems_initialise+0x2c> <== NEVER TAKEN
2011ca0: d0 07 bf fc ld [ %fp + -4 ], %o0
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
2011ca4: 82 10 20 01 mov 1, %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011ca8: fa 02 20 7c ld [ %o0 + 0x7c ], %i5
2011cac: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
2011cb0: 03 00 80 d5 sethi %hi(0x2035400), %g1
2011cb4: 82 10 61 b4 or %g1, 0x1b4, %g1 ! 20355b4 <rtems_rfs_rtems_dir_handlers>
2011cb8: c2 26 20 24 st %g1, [ %i0 + 0x24 ]
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
2011cbc: 03 00 80 cc sethi %hi(0x2033000), %g1
2011cc0: 82 10 63 30 or %g1, 0x330, %g1 ! 2033330 <rtems_rfs_ops>
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
2011cc4: d0 26 20 34 st %o0, [ %i0 + 0x34 ]
rtems_rfs_buffers_release (fs);
2011cc8: 40 00 2a d5 call 201c81c <rtems_rfs_buffers_release>
2011ccc: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011cd0: d0 07 40 00 ld [ %i5 ], %o0
2011cd4: 7f ff e1 fb call 200a4c0 <rtems_semaphore_release>
2011cd8: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2011cdc: ba 92 20 00 orcc %o0, 0, %i5
2011ce0: 12 80 00 14 bne 2011d30 <rtems_rfs_rtems_initialise+0x108><== NEVER TAKEN
2011ce4: 90 10 20 00 clr %o0
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011ce8: 81 c7 e0 08 ret
2011cec: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011cf0: 90 10 20 00 clr %o0 <== NOT EXECUTED
2011cf4: 40 00 04 dd call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011cf8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011cfc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011d00: 12 80 00 19 bne 2011d64 <rtems_rfs_rtems_initialise+0x13c><== NOT EXECUTED
2011d04: 01 00 00 00 nop <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
2011d08: 40 00 39 74 call 20202d8 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
2011d0c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
free (rtems);
2011d10: 7f ff cf b2 call 2005bd8 <free> <== NOT EXECUTED
2011d14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
2011d18: 40 00 42 cb call 2022844 <__errno> <== NOT EXECUTED
2011d1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011d20: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2011d24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2011d28: 81 c7 e0 08 ret <== NOT EXECUTED
2011d2c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011d30: 40 00 04 ce call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011d34: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011d38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011d3c: 02 80 00 15 be 2011d90 <rtems_rfs_rtems_initialise+0x168> <== NOT EXECUTED
2011d40: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011d44: 40 00 15 9f call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011d48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011d4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011d50: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011d54: 40 00 46 24 call 20235e4 <printf> <== NOT EXECUTED
2011d58: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011d5c: 81 c7 e0 08 ret <== NOT EXECUTED
2011d60: 81 e8 00 00 restore <== NOT EXECUTED
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011d64: 40 00 15 97 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011d68: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2011d6c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011d70: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011d74: 40 00 46 1c call 20235e4 <printf> <== NOT EXECUTED
2011d78: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
2011d7c: 30 bf ff e3 b,a 2011d08 <rtems_rfs_rtems_initialise+0xe0><== NOT EXECUTED
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
2011d80: 40 00 42 b1 call 2022844 <__errno> <== NOT EXECUTED
2011d84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011d88: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2011d8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2011d90: 81 c7 e0 08 ret <== NOT EXECUTED
2011d94: 81 e8 00 00 restore <== NOT EXECUTED
02010a98 <rtems_rfs_rtems_link>:
*/
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
2010a98: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
2010a9c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2010aa0: f6 06 40 00 ld [ %i1 ], %i3
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
2010aa4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
2010aa8: f8 06 00 00 ld [ %i0 ], %i4
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2010aac: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2010ab0: 92 10 20 00 clr %o1
2010ab4: d0 00 40 00 ld [ %g1 ], %o0
2010ab8: 7f ff e6 38 call 200a398 <rtems_semaphore_obtain>
2010abc: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2010ac0: b2 92 20 00 orcc %o0, 0, %i1
2010ac4: 12 80 00 25 bne 2010b58 <rtems_rfs_rtems_link+0xc0> <== NEVER TAKEN
2010ac8: 90 10 20 00 clr %o0
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
2010acc: 40 00 4e 01 call 20242d0 <strlen>
2010ad0: 90 10 00 1a mov %i2, %o0
2010ad4: 98 10 00 1c mov %i4, %o4
2010ad8: 94 10 00 08 mov %o0, %o2
2010adc: 92 10 00 1a mov %i2, %o1
2010ae0: 90 10 00 1d mov %i5, %o0
2010ae4: 96 10 00 1b mov %i3, %o3
2010ae8: 40 00 3b 44 call 201f7f8 <rtems_rfs_link>
2010aec: 9a 10 20 00 clr %o5
if (rc)
2010af0: b8 92 20 00 orcc %o0, 0, %i4
2010af4: 22 80 00 0f be,a 2010b30 <rtems_rfs_rtems_link+0x98> <== ALWAYS TAKEN
2010af8: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* 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);
2010afc: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2010b00: 40 00 2f 47 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2010b04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010b08: 7f ff e6 6e call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2010b0c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2010b10: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2010b14: 12 80 00 2a bne 2010bbc <rtems_rfs_rtems_link+0x124> <== NOT EXECUTED
2010b18: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("link: linking", rc);
2010b1c: 40 00 47 4a call 2022844 <__errno> <== NOT EXECUTED
2010b20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2010b24: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2010b28: 81 c7 e0 08 ret <== NOT EXECUTED
2010b2c: 81 e8 00 00 restore <== NOT EXECUTED
2010b30: 40 00 2f 3b call 201c81c <rtems_rfs_buffers_release>
2010b34: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010b38: d0 07 00 00 ld [ %i4 ], %o0
2010b3c: 7f ff e6 61 call 200a4c0 <rtems_semaphore_release>
2010b40: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2010b44: ba 92 20 00 orcc %o0, 0, %i5
2010b48: 12 80 00 10 bne 2010b88 <rtems_rfs_rtems_link+0xf0> <== NEVER TAKEN
2010b4c: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2010b50: 81 c7 e0 08 ret
2010b54: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010b58: 40 00 09 44 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010b5c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010b60: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010b64: 02 bf ff da be 2010acc <rtems_rfs_rtems_link+0x34> <== NOT EXECUTED
2010b68: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2010b6c: 40 00 1a 15 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010b70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2010b74: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010b78: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010b7c: 40 00 4a 9a call 20235e4 <printf> <== NOT EXECUTED
2010b80: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
2010b84: 30 bf ff d2 b,a 2010acc <rtems_rfs_rtems_link+0x34> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010b88: 40 00 09 38 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010b8c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010b90: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010b94: 02 80 00 08 be 2010bb4 <rtems_rfs_rtems_link+0x11c> <== NOT EXECUTED
2010b98: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010b9c: 40 00 1a 09 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010ba0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010ba4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010ba8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010bac: 40 00 4a 8e call 20235e4 <printf> <== NOT EXECUTED
2010bb0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010bb4: 81 c7 e0 08 ret <== NOT EXECUTED
2010bb8: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010bbc: 40 00 09 2b call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010bc0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010bc4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010bc8: 02 bf ff d5 be 2010b1c <rtems_rfs_rtems_link+0x84> <== NOT EXECUTED
2010bcc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010bd0: 40 00 19 fc call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010bd4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010bd8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010bdc: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010be0: 40 00 4a 81 call 20235e4 <printf> <== NOT EXECUTED
2010be4: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010be8: 30 bf ff cd b,a 2010b1c <rtems_rfs_rtems_link+0x84> <== NOT EXECUTED
02011964 <rtems_rfs_rtems_mknod>:
static int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
2011964: 9d e3 bf 60 save %sp, -160, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011968: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (pathloc);
201196c: e2 07 00 00 ld [ %i4 ], %l1
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
2011970: 40 00 17 6a call 2017718 <geteuid>
2011974: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
gid = getegid ();
2011978: 40 00 17 64 call 2017708 <getegid>
201197c: a0 10 00 08 mov %o0, %l0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011980: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
gid = getegid ();
2011984: b8 10 00 08 mov %o0, %i4
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011988: d0 00 40 00 ld [ %g1 ], %o0
201198c: 92 10 20 00 clr %o1
2011990: 7f ff e2 82 call 200a398 <rtems_semaphore_obtain>
2011994: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2011998: a4 92 20 00 orcc %o0, 0, %l2
201199c: 32 80 00 27 bne,a 2011a38 <rtems_rfs_rtems_mknod+0xd4> <== NEVER TAKEN
20119a0: 90 10 20 00 clr %o0 <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
20119a4: 40 00 4a 4b call 20242d0 <strlen>
20119a8: 90 10 00 18 mov %i0, %o0
20119ac: a4 10 00 08 mov %o0, %l2
20119b0: 40 00 05 a9 call 2013054 <rtems_rfs_rtems_imode>
20119b4: 90 10 00 19 mov %i1, %o0
20119b8: 82 07 bf fc add %fp, -4, %g1
20119bc: b9 2f 20 10 sll %i4, 0x10, %i4
20119c0: b9 37 20 10 srl %i4, 0x10, %i4
20119c4: 99 2a 20 10 sll %o0, 0x10, %o4
20119c8: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
20119cc: 92 10 00 11 mov %l1, %o1
20119d0: a1 2c 20 10 sll %l0, 0x10, %l0
20119d4: 90 10 00 1d mov %i5, %o0
20119d8: a1 34 20 10 srl %l0, 0x10, %l0
20119dc: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
20119e0: e0 23 a0 5c st %l0, [ %sp + 0x5c ]
20119e4: 94 10 00 18 mov %i0, %o2
20119e8: 96 10 00 12 mov %l2, %o3
20119ec: 99 33 20 10 srl %o4, 0x10, %o4
20119f0: 7f ff fa b3 call 20104bc <rtems_rfs_inode_create>
20119f4: 9a 10 20 01 mov 1, %o5
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
20119f8: b8 92 20 00 orcc %o0, 0, %i4
20119fc: 04 80 00 2b ble 2011aa8 <rtems_rfs_rtems_mknod+0x144> <== ALWAYS TAKEN
2011a00: d2 07 bf fc ld [ %fp + -4 ], %o1
* 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);
2011a04: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011a08: 40 00 2b 85 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2011a0c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011a10: 7f ff e2 ac call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011a14: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011a18: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011a1c: 12 80 00 13 bne 2011a68 <rtems_rfs_rtems_mknod+0x104> <== NOT EXECUTED
2011a20: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
2011a24: 40 00 43 88 call 2022844 <__errno> <== NOT EXECUTED
2011a28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011a2c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011a30: 81 c7 e0 08 ret
2011a34: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011a38: 40 00 05 8c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011a3c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011a40: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011a44: 02 bf ff d8 be 20119a4 <rtems_rfs_rtems_mknod+0x40> <== NOT EXECUTED
2011a48: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011a4c: 40 00 16 5d call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011a50: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2011a54: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011a58: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011a5c: 40 00 46 e2 call 20235e4 <printf> <== NOT EXECUTED
2011a60: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
2011a64: 30 bf ff d0 b,a 20119a4 <rtems_rfs_rtems_mknod+0x40> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011a68: 40 00 05 80 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011a6c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011a70: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011a74: 02 bf ff ec be 2011a24 <rtems_rfs_rtems_mknod+0xc0> <== NOT EXECUTED
2011a78: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011a7c: 40 00 16 51 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011a80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011a84: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011a88: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011a8c: 40 00 46 d6 call 20235e4 <printf> <== NOT EXECUTED
2011a90: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2011a94: 40 00 43 6c call 2022844 <__errno> <== NOT EXECUTED
2011a98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011a9c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011aa0: 81 c7 e0 08 ret <== NOT EXECUTED
2011aa4: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2011aa8: 90 10 00 1d mov %i5, %o0
2011aac: 94 07 bf d4 add %fp, -44, %o2
2011ab0: 7f ff f9 2f call 200ff6c <rtems_rfs_inode_open>
2011ab4: 96 10 20 01 mov 1, %o3
if (rc > 0)
2011ab8: b8 92 20 00 orcc %o0, 0, %i4
2011abc: 34 bf ff d3 bg,a 2011a08 <rtems_rfs_rtems_mknod+0xa4> <== NEVER TAKEN
2011ac0: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
}
if (S_ISDIR(mode) || S_ISREG(mode))
2011ac4: 03 00 00 3c sethi %hi(0xf000), %g1
2011ac8: b2 0e 40 01 and %i1, %g1, %i1
2011acc: 03 00 00 20 sethi %hi(0x8000), %g1
2011ad0: 80 a6 40 01 cmp %i1, %g1
2011ad4: 02 80 00 19 be 2011b38 <rtems_rfs_rtems_mknod+0x1d4>
2011ad8: 03 00 00 10 sethi %hi(0x4000), %g1
2011adc: 80 a6 40 01 cmp %i1, %g1
2011ae0: 02 80 00 16 be 2011b38 <rtems_rfs_rtems_mknod+0x1d4> <== ALWAYS TAKEN
2011ae4: 03 00 00 18 sethi %hi(0x6000), %g1
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
2011ae8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2011aec: 12 80 00 2f bne 2011ba8 <rtems_rfs_rtems_mknod+0x244> <== NOT EXECUTED
2011af0: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2011af4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
2011af8: b9 36 a0 08 srl %i2, 8, %i4 <== NOT EXECUTED
2011afc: b1 36 a0 18 srl %i2, 0x18, %i0 <== NOT EXECUTED
2011b00: b3 36 a0 10 srl %i2, 0x10, %i1 <== NOT EXECUTED
2011b04: 89 36 e0 18 srl %i3, 0x18, %g4 <== NOT EXECUTED
2011b08: 87 36 e0 10 srl %i3, 0x10, %g3 <== NOT EXECUTED
2011b0c: 85 36 e0 08 srl %i3, 8, %g2 <== NOT EXECUTED
2011b10: f8 28 60 1e stb %i4, [ %g1 + 0x1e ] <== NOT EXECUTED
2011b14: f0 28 60 1c stb %i0, [ %g1 + 0x1c ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011b18: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2011b1c: f2 28 60 1d stb %i1, [ %g1 + 0x1d ] <== NOT EXECUTED
2011b20: f4 28 60 1f stb %i2, [ %g1 + 0x1f ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011b24: f8 2f bf e4 stb %i4, [ %fp + -28 ] <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2011b28: c8 28 60 20 stb %g4, [ %g1 + 0x20 ] <== NOT EXECUTED
2011b2c: c6 28 60 21 stb %g3, [ %g1 + 0x21 ] <== NOT EXECUTED
2011b30: c4 28 60 22 stb %g2, [ %g1 + 0x22 ] <== NOT EXECUTED
2011b34: f6 28 60 23 stb %i3, [ %g1 + 0x23 ] <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
2011b38: 90 10 00 1d mov %i5, %o0
2011b3c: 7f ff f9 83 call 2010148 <rtems_rfs_inode_close>
2011b40: 92 07 bf d4 add %fp, -44, %o1
if (rc > 0)
2011b44: b8 92 20 00 orcc %o0, 0, %i4
2011b48: 34 bf ff b0 bg,a 2011a08 <rtems_rfs_rtems_mknod+0xa4> <== NEVER TAKEN
2011b4c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== 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);
2011b50: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2011b54: 40 00 2b 32 call 201c81c <rtems_rfs_buffers_release>
2011b58: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011b5c: d0 07 00 00 ld [ %i4 ], %o0
2011b60: 7f ff e2 58 call 200a4c0 <rtems_semaphore_release>
2011b64: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2011b68: ba 92 20 00 orcc %o0, 0, %i5
2011b6c: 02 bf ff b1 be 2011a30 <rtems_rfs_rtems_mknod+0xcc> <== ALWAYS TAKEN
2011b70: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011b74: 40 00 05 3d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011b78: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011b7c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011b80: 02 80 00 1c be 2011bf0 <rtems_rfs_rtems_mknod+0x28c> <== NOT EXECUTED
2011b84: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011b88: 40 00 16 0e call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011b8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011b90: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011b94: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011b98: 40 00 46 93 call 20235e4 <printf> <== NOT EXECUTED
2011b9c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011ba0: 81 c7 e0 08 ret <== NOT EXECUTED
2011ba4: 81 e8 00 00 restore <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
2011ba8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2011bac: 02 bf ff d3 be 2011af8 <rtems_rfs_rtems_mknod+0x194> <== NOT EXECUTED
2011bb0: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
else
{
rtems_rfs_inode_close (fs, &inode);
2011bb4: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
2011bb8: 7f ff f9 64 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2011bbc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011bc0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011bc4: 40 00 2b 16 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2011bc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011bcc: 7f ff e2 3d call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011bd0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011bd4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011bd8: 12 80 00 08 bne 2011bf8 <rtems_rfs_rtems_mknod+0x294> <== NOT EXECUTED
2011bdc: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
2011be0: 40 00 43 19 call 2022844 <__errno> <== NOT EXECUTED
2011be4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011be8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2011bec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2011bf0: 81 c7 e0 08 ret <== NOT EXECUTED
2011bf4: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011bf8: 40 00 05 1c call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011bfc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011c00: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011c04: 02 bf ff f7 be 2011be0 <rtems_rfs_rtems_mknod+0x27c> <== NOT EXECUTED
2011c08: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011c0c: 40 00 15 ed call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011c10: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011c14: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011c18: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011c1c: 40 00 46 72 call 20235e4 <printf> <== NOT EXECUTED
2011c20: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2011c24: 30 bf ff ef b,a 2011be0 <rtems_rfs_rtems_mknod+0x27c> <== NOT EXECUTED
020117a0 <rtems_rfs_rtems_node_type>:
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
20117a0: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20117a4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20117a8: f8 06 00 00 ld [ %i0 ], %i4
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20117ac: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20117b0: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
20117b4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
20117b8: 94 10 20 00 clr %o2
20117bc: 7f ff e2 f7 call 200a398 <rtems_semaphore_obtain>
20117c0: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20117c4: b0 92 20 00 orcc %o0, 0, %i0
20117c8: 12 80 00 38 bne 20118a8 <rtems_rfs_rtems_node_type+0x108> <== NEVER TAKEN
20117cc: 90 10 20 00 clr %o0
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20117d0: 92 10 00 1c mov %i4, %o1
20117d4: 90 10 00 1d mov %i5, %o0
20117d8: 94 07 bf d8 add %fp, -40, %o2
20117dc: 7f ff f9 e4 call 200ff6c <rtems_rfs_inode_open>
20117e0: 96 10 20 01 mov 1, %o3
if (rc > 0)
20117e4: b8 92 20 00 orcc %o0, 0, %i4
20117e8: 04 80 00 0f ble 2011824 <rtems_rfs_rtems_node_type+0x84> <== ALWAYS TAKEN
20117ec: c2 07 bf e4 ld [ %fp + -28 ], %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20117f0: f0 07 60 7c ld [ %i5 + 0x7c ], %i0 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20117f4: 40 00 2c 0a call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20117f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20117fc: 7f ff e3 31 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011800: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011804: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011808: 12 80 00 35 bne 20118dc <rtems_rfs_rtems_node_type+0x13c> <== NOT EXECUTED
201180c: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
2011810: 40 00 44 0d call 2022844 <__errno> <== NOT EXECUTED
2011814: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011818: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
201181c: 81 c7 e0 08 ret <== NOT EXECUTED
2011820: 81 e8 00 00 restore <== 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.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
2011824: 05 00 00 3c sethi %hi(0xf000), %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2011828: c2 08 60 02 ldub [ %g1 + 2 ], %g1
201182c: 83 28 60 08 sll %g1, 8, %g1
2011830: 82 08 40 02 and %g1, %g2, %g1
2011834: 05 00 00 10 sethi %hi(0x4000), %g2
2011838: 80 a0 40 02 cmp %g1, %g2
201183c: 02 80 00 0b be 2011868 <rtems_rfs_rtems_node_type+0xc8>
2011840: b0 10 20 01 mov 1, %i0
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
2011844: 05 00 00 28 sethi %hi(0xa000), %g2
2011848: 80 a0 40 02 cmp %g1, %g2
201184c: 02 80 00 07 be 2011868 <rtems_rfs_rtems_node_type+0xc8>
2011850: b0 10 20 04 mov 4, %i0
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
2011854: 05 00 00 08 sethi %hi(0x2000), %g2
2011858: 80 a0 40 02 cmp %g1, %g2
201185c: 12 80 00 30 bne 201191c <rtems_rfs_rtems_node_type+0x17c> <== ALWAYS TAKEN
2011860: 05 00 00 18 sethi %hi(0x6000), %g2
type = RTEMS_FILESYSTEM_DEVICE;
2011864: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
else
type = RTEMS_FILESYSTEM_MEMORY_FILE;
rc = rtems_rfs_inode_close (fs, &inode);
2011868: 90 10 00 1d mov %i5, %o0
201186c: 7f ff fa 37 call 2010148 <rtems_rfs_inode_close>
2011870: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
2011874: b8 92 20 00 orcc %o0, 0, %i4
2011878: 34 bf ff df bg,a 20117f4 <rtems_rfs_rtems_node_type+0x54><== NEVER TAKEN
201187c: f0 07 60 7c ld [ %i5 + 0x7c ], %i0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011880: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2011884: 40 00 2b e6 call 201c81c <rtems_rfs_buffers_release>
2011888: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201188c: 7f ff e3 0d call 200a4c0 <rtems_semaphore_release>
2011890: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2011894: ba 92 20 00 orcc %o0, 0, %i5
2011898: 12 80 00 26 bne 2011930 <rtems_rfs_rtems_node_type+0x190> <== NEVER TAKEN
201189c: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return type;
}
20118a0: 81 c7 e0 08 ret
20118a4: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20118a8: 40 00 05 f0 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20118ac: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20118b0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20118b4: 22 bf ff c8 be,a 20117d4 <rtems_rfs_rtems_node_type+0x34><== NOT EXECUTED
20118b8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20118bc: 40 00 16 c1 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20118c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20118c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20118c8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20118cc: 40 00 47 46 call 20235e4 <printf> <== NOT EXECUTED
20118d0: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20118d4: 10 bf ff c0 b 20117d4 <rtems_rfs_rtems_node_type+0x34> <== NOT EXECUTED
20118d8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20118dc: 40 00 05 e3 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20118e0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20118e4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20118e8: 02 bf ff ca be 2011810 <rtems_rfs_rtems_node_type+0x70> <== NOT EXECUTED
20118ec: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20118f0: 40 00 16 b4 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20118f4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20118f8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20118fc: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011900: 40 00 47 39 call 20235e4 <printf> <== NOT EXECUTED
2011904: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
2011908: 40 00 43 cf call 2022844 <__errno> <== NOT EXECUTED
201190c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011910: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011914: 81 c7 e0 08 ret <== NOT EXECUTED
2011918: 81 e8 00 00 restore <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
201191c: 80 a0 40 02 cmp %g1, %g2
2011920: 12 bf ff d2 bne 2011868 <rtems_rfs_rtems_node_type+0xc8> <== ALWAYS TAKEN
2011924: b0 10 20 05 mov 5, %i0
type = RTEMS_FILESYSTEM_DEVICE;
2011928: 10 bf ff d0 b 2011868 <rtems_rfs_rtems_node_type+0xc8> <== NOT EXECUTED
201192c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011930: 40 00 05 ce call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011934: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011938: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201193c: 02 80 00 08 be 201195c <rtems_rfs_rtems_node_type+0x1bc> <== NOT EXECUTED
2011940: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011944: 40 00 16 9f call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011948: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201194c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011950: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011954: 40 00 47 24 call 20235e4 <printf> <== NOT EXECUTED
2011958: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
201195c: 81 c7 e0 08 ret <== NOT EXECUTED
2011960: 81 e8 00 00 restore <== NOT EXECUTED
02010d3c <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
2010d3c: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2010d40: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2010d44: f8 06 00 00 ld [ %i0 ], %i4
static ssize_t
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2010d48: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2010d4c: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2010d50: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2010d54: 94 10 20 00 clr %o2
2010d58: 7f ff e5 90 call 200a398 <rtems_semaphore_obtain>
2010d5c: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2010d60: b6 92 20 00 orcc %o0, 0, %i3
2010d64: 12 80 00 22 bne 2010dec <rtems_rfs_rtems_readlink+0xb0> <== NEVER TAKEN
2010d68: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
2010d6c: 92 10 00 1c mov %i4, %o1
2010d70: 90 10 00 1d mov %i5, %o0
2010d74: 94 10 00 19 mov %i1, %o2
2010d78: 96 10 00 1a mov %i2, %o3
2010d7c: 40 00 3c c5 call 2020090 <rtems_rfs_symlink_read>
2010d80: 98 07 bf fc add %fp, -4, %o4
if (rc)
2010d84: b8 92 20 00 orcc %o0, 0, %i4
2010d88: 22 80 00 0f be,a 2010dc4 <rtems_rfs_rtems_readlink+0x88>
2010d8c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* 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);
2010d90: f6 07 60 7c ld [ %i5 + 0x7c ], %i3
rtems_rfs_buffers_release (fs);
2010d94: 40 00 2e a2 call 201c81c <rtems_rfs_buffers_release>
2010d98: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010d9c: 7f ff e5 c9 call 200a4c0 <rtems_semaphore_release>
2010da0: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2010da4: ba 92 20 00 orcc %o0, 0, %i5
2010da8: 12 80 00 2c bne 2010e58 <rtems_rfs_rtems_readlink+0x11c> <== NEVER TAKEN
2010dac: 90 10 20 00 clr %o0
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("readlink: reading link", rc);
2010db0: 40 00 46 a5 call 2022844 <__errno>
2010db4: b0 10 3f ff mov -1, %i0
2010db8: f8 22 00 00 st %i4, [ %o0 ]
2010dbc: 81 c7 e0 08 ret
2010dc0: 81 e8 00 00 restore
2010dc4: 40 00 2e 96 call 201c81c <rtems_rfs_buffers_release>
2010dc8: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010dcc: 7f ff e5 bd call 200a4c0 <rtems_semaphore_release>
2010dd0: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2010dd4: ba 92 20 00 orcc %o0, 0, %i5
2010dd8: 12 80 00 12 bne 2010e20 <rtems_rfs_rtems_readlink+0xe4> <== NEVER TAKEN
2010ddc: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
2010de0: f0 07 bf fc ld [ %fp + -4 ], %i0
}
2010de4: 81 c7 e0 08 ret
2010de8: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010dec: 40 00 08 9f call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010df0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010df4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010df8: 22 bf ff de be,a 2010d70 <rtems_rfs_rtems_readlink+0x34> <== NOT EXECUTED
2010dfc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2010e00: 40 00 19 70 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010e04: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2010e08: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010e0c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010e10: 40 00 49 f5 call 20235e4 <printf> <== NOT EXECUTED
2010e14: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
2010e18: 10 bf ff d6 b 2010d70 <rtems_rfs_rtems_readlink+0x34> <== NOT EXECUTED
2010e1c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010e20: 40 00 08 92 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010e24: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010e28: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010e2c: 22 bf ff e4 be,a 2010dbc <rtems_rfs_rtems_readlink+0x80> <== NOT EXECUTED
2010e30: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010e34: 40 00 19 63 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010e38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010e3c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010e40: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010e44: 40 00 49 e8 call 20235e4 <printf> <== NOT EXECUTED
2010e48: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010e4c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
2010e50: 81 c7 e0 08 ret <== NOT EXECUTED
2010e54: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010e58: 40 00 08 84 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010e5c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010e60: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010e64: 02 bf ff d3 be 2010db0 <rtems_rfs_rtems_readlink+0x74> <== NOT EXECUTED
2010e68: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010e6c: 40 00 19 55 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010e70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010e74: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010e78: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010e7c: 40 00 49 da call 20235e4 <printf> <== NOT EXECUTED
2010e80: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010e84: 30 bf ff cb b,a 2010db0 <rtems_rfs_rtems_readlink+0x74> <== NOT EXECUTED
02011008 <rtems_rfs_rtems_rename>:
static int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
2011008: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
201100c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== 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);
2011010: f8 06 00 00 ld [ %i0 ], %i4 <== NOT EXECUTED
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
2011014: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
2011018: f0 06 80 00 ld [ %i2 ], %i0 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
201101c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
2011020: f4 06 40 00 ld [ %i1 ], %i2 <== 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);
2011024: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
2011028: f2 06 60 04 ld [ %i1 + 4 ], %i1 <== NOT EXECUTED
201102c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2011030: 7f ff e4 da call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2011034: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011038: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
201103c: 12 80 00 3a bne 2011124 <rtems_rfs_rtems_rename+0x11c> <== NOT EXECUTED
2011040: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, strlen (new_name), new_parent, ino, true);
2011044: 40 00 4c a3 call 20242d0 <strlen> <== NOT EXECUTED
2011048: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201104c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2011050: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2011054: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2011058: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201105c: 98 10 00 1a mov %i2, %o4 <== NOT EXECUTED
2011060: 40 00 39 e6 call 201f7f8 <rtems_rfs_link> <== NOT EXECUTED
2011064: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
if (rc)
2011068: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
201106c: 02 80 00 0f be 20110a8 <rtems_rfs_rtems_rename+0xa0> <== NOT EXECUTED
2011070: 92 10 00 1c mov %i4, %o1 <== 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);
2011074: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011078: 40 00 2d e9 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
201107c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011080: 7f ff e5 10 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011084: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011088: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
201108c: 12 80 00 32 bne 2011154 <rtems_rfs_rtems_rename+0x14c> <== NOT EXECUTED
2011090: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: linking", rc);
2011094: 40 00 45 ec call 2022844 <__errno> <== NOT EXECUTED
2011098: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201109c: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
20110a0: 81 c7 e0 08 ret <== NOT EXECUTED
20110a4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
20110a8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20110ac: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20110b0: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
20110b4: 40 00 3a 47 call 201f9d0 <rtems_rfs_unlink> <== NOT EXECUTED
20110b8: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
20110bc: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20110c0: 22 80 00 0f be,a 20110fc <rtems_rfs_rtems_rename+0xf4> <== NOT EXECUTED
20110c4: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== 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);
20110c8: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20110cc: 40 00 2d d4 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20110d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20110d4: 7f ff e4 fb call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20110d8: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20110dc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20110e0: 12 80 00 29 bne 2011184 <rtems_rfs_rtems_rename+0x17c> <== NOT EXECUTED
20110e4: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: unlinking", rc);
20110e8: 40 00 45 d7 call 2022844 <__errno> <== NOT EXECUTED
20110ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20110f0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20110f4: 81 c7 e0 08 ret <== NOT EXECUTED
20110f8: 81 e8 00 00 restore <== NOT EXECUTED
20110fc: 40 00 2d c8 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2011100: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011104: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2011108: 7f ff e4 ee call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
201110c: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011110: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011114: 12 80 00 28 bne 20111b4 <rtems_rfs_rtems_rename+0x1ac> <== NOT EXECUTED
2011118: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
201111c: 81 c7 e0 08 ret <== NOT EXECUTED
2011120: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011124: 40 00 07 d1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011128: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201112c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011130: 02 bf ff c5 be 2011044 <rtems_rfs_rtems_rename+0x3c> <== NOT EXECUTED
2011134: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011138: 40 00 18 a2 call 20173c0 <rtems_status_text> <== NOT EXECUTED
201113c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2011140: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011144: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011148: 40 00 49 27 call 20235e4 <printf> <== NOT EXECUTED
201114c: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
2011150: 30 bf ff bd b,a 2011044 <rtems_rfs_rtems_rename+0x3c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011154: 40 00 07 c5 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011158: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201115c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011160: 02 bf ff cd be 2011094 <rtems_rfs_rtems_rename+0x8c> <== NOT EXECUTED
2011164: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011168: 40 00 18 96 call 20173c0 <rtems_status_text> <== NOT EXECUTED
201116c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011170: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011174: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011178: 40 00 49 1b call 20235e4 <printf> <== NOT EXECUTED
201117c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2011180: 30 bf ff c5 b,a 2011094 <rtems_rfs_rtems_rename+0x8c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011184: 40 00 07 b9 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011188: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201118c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011190: 02 bf ff d6 be 20110e8 <rtems_rfs_rtems_rename+0xe0> <== NOT EXECUTED
2011194: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011198: 40 00 18 8a call 20173c0 <rtems_status_text> <== NOT EXECUTED
201119c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20111a0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20111a4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20111a8: 40 00 49 0f call 20235e4 <printf> <== NOT EXECUTED
20111ac: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20111b0: 30 bf ff ce b,a 20110e8 <rtems_rfs_rtems_rename+0xe0> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20111b4: 40 00 07 ad call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20111b8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20111bc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20111c0: 02 80 00 08 be 20111e0 <rtems_rfs_rtems_rename+0x1d8> <== NOT EXECUTED
20111c4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20111c8: 40 00 18 7e call 20173c0 <rtems_status_text> <== NOT EXECUTED
20111cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20111d0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20111d4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20111d8: 40 00 49 03 call 20235e4 <printf> <== NOT EXECUTED
20111dc: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20111e0: 81 c7 e0 08 ret <== NOT EXECUTED
20111e4: 81 e8 00 00 restore <== NOT EXECUTED
02010bec <rtems_rfs_rtems_rmnod>:
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
2010bec: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2010bf0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2010bf4: f6 06 40 00 ld [ %i1 ], %i3 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2010bf8: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
2010bfc: f8 06 60 04 ld [ %i1 + 4 ], %i4 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2010c00: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
2010c04: f4 06 00 00 ld [ %i0 ], %i2 <== 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);
2010c08: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
2010c0c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2010c10: 7f ff e5 e2 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2010c14: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2010c18: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED
2010c1c: 12 80 00 22 bne 2010ca4 <rtems_rfs_rtems_rmnod+0xb8> <== NOT EXECUTED
2010c20: 90 10 20 00 clr %o0 <== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2010c24: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
2010c28: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010c2c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2010c30: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
2010c34: 40 00 3b 67 call 201f9d0 <rtems_rfs_unlink> <== NOT EXECUTED
2010c38: 98 10 20 00 clr %o4 <== NOT EXECUTED
if (rc)
2010c3c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2010c40: 22 80 00 0f be,a 2010c7c <rtems_rfs_rtems_rmnod+0x90> <== NOT EXECUTED
2010c44: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== 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);
2010c48: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2010c4c: 40 00 2e f4 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2010c50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010c54: 7f ff e6 1b call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2010c58: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2010c5c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2010c60: 12 80 00 2b bne 2010d0c <rtems_rfs_rtems_rmnod+0x120> <== NOT EXECUTED
2010c64: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
2010c68: 40 00 46 f7 call 2022844 <__errno> <== NOT EXECUTED
2010c6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2010c70: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2010c74: 81 c7 e0 08 ret <== NOT EXECUTED
2010c78: 81 e8 00 00 restore <== NOT EXECUTED
2010c7c: 40 00 2e e8 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2010c80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010c84: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2010c88: 7f ff e6 0e call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2010c8c: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2010c90: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2010c94: 12 80 00 11 bne 2010cd8 <rtems_rfs_rtems_rmnod+0xec> <== NOT EXECUTED
2010c98: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2010c9c: 81 c7 e0 08 ret <== NOT EXECUTED
2010ca0: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010ca4: 40 00 08 f1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010ca8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010cac: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010cb0: 22 bf ff de be,a 2010c28 <rtems_rfs_rtems_rmnod+0x3c> <== NOT EXECUTED
2010cb4: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2010cb8: 40 00 19 c2 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010cbc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2010cc0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010cc4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010cc8: 40 00 4a 47 call 20235e4 <printf> <== NOT EXECUTED
2010ccc: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2010cd0: 10 bf ff d6 b 2010c28 <rtems_rfs_rtems_rmnod+0x3c> <== NOT EXECUTED
2010cd4: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010cd8: 40 00 08 e4 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010cdc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010ce0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010ce4: 02 80 00 08 be 2010d04 <rtems_rfs_rtems_rmnod+0x118> <== NOT EXECUTED
2010ce8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010cec: 40 00 19 b5 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010cf0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010cf4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010cf8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010cfc: 40 00 4a 3a call 20235e4 <printf> <== NOT EXECUTED
2010d00: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2010d04: 81 c7 e0 08 ret <== NOT EXECUTED
2010d08: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010d0c: 40 00 08 d7 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010d10: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010d14: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010d18: 02 bf ff d4 be 2010c68 <rtems_rfs_rtems_rmnod+0x7c> <== NOT EXECUTED
2010d1c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010d20: 40 00 19 a8 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010d24: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010d28: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010d2c: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010d30: 40 00 4a 2d call 20235e4 <printf> <== NOT EXECUTED
2010d34: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010d38: 30 bf ff cc b,a 2010c68 <rtems_rfs_rtems_rmnod+0x7c> <== NOT EXECUTED
02012f6c <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
2012f6c: 9d e3 bf a0 save %sp, -96, %sp
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
2012f70: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2012f74: c4 08 60 02 ldub [ %g1 + 2 ], %g2
2012f78: d2 08 60 03 ldub [ %g1 + 3 ], %o1
2012f7c: 83 28 a0 08 sll %g2, 8, %g1
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
2012f80: 92 0a 60 ff and %o1, 0xff, %o1
2012f84: 05 00 00 10 sethi %hi(0x4000), %g2
2012f88: 92 12 40 01 or %o1, %g1, %o1
2012f8c: 03 00 00 3c sethi %hi(0xf000), %g1
2012f90: 82 0a 40 01 and %o1, %g1, %g1
2012f94: 80 a0 40 02 cmp %g1, %g2
2012f98: 02 80 00 1c be 2013008 <rtems_rfs_rtems_set_handlers+0x9c>
2012f9c: c0 26 20 08 clr [ %i0 + 8 ]
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
2012fa0: 05 00 00 18 sethi %hi(0x6000), %g2
2012fa4: 80 a0 40 02 cmp %g1, %g2
2012fa8: 02 80 00 11 be 2012fec <rtems_rfs_rtems_set_handlers+0x80><== NEVER TAKEN
2012fac: 05 00 00 08 sethi %hi(0x2000), %g2
2012fb0: 80 a0 40 02 cmp %g1, %g2
2012fb4: 02 80 00 0e be 2012fec <rtems_rfs_rtems_set_handlers+0x80><== NEVER TAKEN
2012fb8: 05 00 00 28 sethi %hi(0xa000), %g2
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
2012fbc: 80 a0 40 02 cmp %g1, %g2
2012fc0: 02 80 00 20 be 2013040 <rtems_rfs_rtems_set_handlers+0xd4>
2012fc4: 05 00 00 20 sethi %hi(0x8000), %g2
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
2012fc8: 80 a0 40 02 cmp %g1, %g2
2012fcc: 02 80 00 16 be 2013024 <rtems_rfs_rtems_set_handlers+0xb8><== ALWAYS TAKEN
2012fd0: 11 00 80 cc sethi %hi(0x2033000), %o0
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
2012fd4: 40 00 41 84 call 20235e4 <printf> <== NOT EXECUTED
2012fd8: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 20333b0 <rtems_rfs_rtems_link_handlers+0x38><== NOT EXECUTED
return false;
2012fdc: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
return true;
}
2012fe0: b0 08 60 01 and %g1, 1, %i0
2012fe4: 81 c7 e0 08 ret
2012fe8: 81 e8 00 00 restore
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2012fec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
2012ff0: 05 00 80 d5 sethi %hi(0x2035400), %g2 <== NOT EXECUTED
2012ff4: 84 10 a1 7c or %g2, 0x17c, %g2 ! 203557c <rtems_rfs_rtems_device_handlers><== NOT EXECUTED
2012ff8: c4 26 20 08 st %g2, [ %i0 + 8 ] <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2012ffc: b0 08 60 01 and %g1, 1, %i0 <== NOT EXECUTED
2013000: 81 c7 e0 08 ret <== NOT EXECUTED
2013004: 81 e8 00 00 restore <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2013008: 82 10 20 01 mov 1, %g1
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
201300c: 05 00 80 d5 sethi %hi(0x2035400), %g2
2013010: 84 10 a1 b4 or %g2, 0x1b4, %g2 ! 20355b4 <rtems_rfs_rtems_dir_handlers>
2013014: c4 26 20 08 st %g2, [ %i0 + 8 ]
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2013018: b0 08 60 01 and %g1, 1, %i0
201301c: 81 c7 e0 08 ret
2013020: 81 e8 00 00 restore
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2013024: 82 10 20 01 mov 1, %g1
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
2013028: 05 00 80 d5 sethi %hi(0x2035400), %g2
201302c: 84 10 a1 ec or %g2, 0x1ec, %g2 ! 20355ec <rtems_rfs_rtems_file_handlers>
2013030: c4 26 20 08 st %g2, [ %i0 + 8 ]
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2013034: b0 08 60 01 and %g1, 1, %i0
2013038: 81 c7 e0 08 ret
201303c: 81 e8 00 00 restore
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
2013040: 05 00 80 cc sethi %hi(0x2033000), %g2
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2013044: 82 10 20 01 mov 1, %g1
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
2013048: 84 10 a3 78 or %g2, 0x378, %g2
201304c: 10 bf ff e5 b 2012fe0 <rtems_rfs_rtems_set_handlers+0x74>
2013050: c4 26 20 08 st %g2, [ %i0 + 8 ]
02010874 <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
2010874: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2010878: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
201087c: 92 07 bf f8 add %fp, -8, %o1 <== NOT EXECUTED
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2010880: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
2010884: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
2010888: 7f ff fd 57 call 200fde4 <rtems_rfs_group_usage> <== NOT EXECUTED
201088c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
2010890: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2010894: d8 07 60 04 ld [ %i5 + 4 ], %o4 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
2010898: da 07 60 08 ld [ %i5 + 8 ], %o5 <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
201089c: de 00 60 24 ld [ %g1 + 0x24 ], %o7 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
20108a0: c8 00 60 1c ld [ %g1 + 0x1c ], %g4 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
20108a4: c6 07 40 00 ld [ %i5 ], %g3 <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
20108a8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
20108ac: c4 07 60 18 ld [ %i5 + 0x18 ], %g2 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
20108b0: fa 07 bf f8 ld [ %fp + -8 ], %i5 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
20108b4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
20108b8: 98 23 00 1d sub %o4, %i5, %o4 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
20108bc: fa 07 bf fc ld [ %fp + -4 ], %i5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
20108c0: da 26 40 00 st %o5, [ %i1 ] <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
20108c4: ba 20 40 1d sub %g1, %i5, %i5 <== NOT EXECUTED
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
20108c8: de 26 60 04 st %o7, [ %i1 + 4 ] <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
20108cc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
20108d0: c8 26 60 0c st %g4, [ %i1 + 0xc ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
20108d4: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED
20108d8: d8 26 60 14 st %o4, [ %i1 + 0x14 ] <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
20108dc: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
20108e0: d8 26 60 1c st %o4, [ %i1 + 0x1c ] <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
20108e4: fa 26 60 24 st %i5, [ %i1 + 0x24 ] <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
20108e8: fa 26 60 28 st %i5, [ %i1 + 0x28 ] <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
20108ec: 03 0a 02 48 sethi %hi(0x28092000), %g1 <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
20108f0: c6 26 60 30 st %g3, [ %i1 + 0x30 ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
20108f4: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
20108f8: c4 26 60 34 st %g2, [ %i1 + 0x34 ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
20108fc: c2 26 60 2c st %g1, [ %i1 + 0x2c ] <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
2010900: 81 c7 e0 08 ret <== NOT EXECUTED
2010904: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02010e88 <rtems_rfs_rtems_symlink>:
static int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
2010e88: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
2010e8c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2010e90: f8 06 00 00 ld [ %i0 ], %i4
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
2010e94: 40 00 1a 21 call 2017718 <geteuid>
2010e98: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
gid = getegid ();
2010e9c: 40 00 1a 1b call 2017708 <getegid>
2010ea0: b0 10 00 08 mov %o0, %i0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2010ea4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
gid = getegid ();
2010ea8: b6 10 00 08 mov %o0, %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2010eac: d0 00 40 00 ld [ %g1 ], %o0
2010eb0: 92 10 20 00 clr %o1
2010eb4: 7f ff e5 39 call 200a398 <rtems_semaphore_obtain>
2010eb8: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2010ebc: a0 92 20 00 orcc %o0, 0, %l0
2010ec0: 32 80 00 2d bne,a 2010f74 <rtems_rfs_rtems_symlink+0xec> <== NEVER TAKEN
2010ec4: 90 10 20 00 clr %o0 <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
2010ec8: 40 00 4d 02 call 20242d0 <strlen>
2010ecc: 90 10 00 1a mov %i2, %o0
2010ed0: a0 10 00 08 mov %o0, %l0
link_name, strlen (link_name),
2010ed4: 40 00 4c ff call 20242d0 <strlen>
2010ed8: 90 10 00 19 mov %i1, %o0
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
2010edc: b1 2e 20 10 sll %i0, 0x10, %i0
link_name, strlen (link_name),
2010ee0: 98 10 00 08 mov %o0, %o4
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
2010ee4: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
2010ee8: b7 2e e0 10 sll %i3, 0x10, %i3
2010eec: 90 10 00 1d mov %i5, %o0
2010ef0: b7 36 e0 10 srl %i3, 0x10, %i3
2010ef4: 92 10 00 1a mov %i2, %o1
2010ef8: f6 23 a0 5c st %i3, [ %sp + 0x5c ]
2010efc: 94 10 00 10 mov %l0, %o2
2010f00: 96 10 00 19 mov %i1, %o3
2010f04: 40 00 3b bf call 201fe00 <rtems_rfs_symlink>
2010f08: 9b 36 20 10 srl %i0, 0x10, %o5
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
2010f0c: b8 92 20 00 orcc %o0, 0, %i4
2010f10: 22 80 00 0f be,a 2010f4c <rtems_rfs_rtems_symlink+0xc4> <== ALWAYS TAKEN
2010f14: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* 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);
2010f18: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2010f1c: 40 00 2e 40 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
2010f20: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010f24: 7f ff e5 67 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2010f28: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2010f2c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2010f30: 12 80 00 2a bne 2010fd8 <rtems_rfs_rtems_symlink+0x150> <== NOT EXECUTED
2010f34: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
2010f38: 40 00 46 43 call 2022844 <__errno> <== NOT EXECUTED
2010f3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2010f40: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2010f44: 81 c7 e0 08 ret <== NOT EXECUTED
2010f48: 81 e8 00 00 restore <== NOT EXECUTED
2010f4c: 40 00 2e 34 call 201c81c <rtems_rfs_buffers_release>
2010f50: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2010f54: d0 07 00 00 ld [ %i4 ], %o0
2010f58: 7f ff e5 5a call 200a4c0 <rtems_semaphore_release>
2010f5c: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2010f60: ba 92 20 00 orcc %o0, 0, %i5
2010f64: 12 80 00 10 bne 2010fa4 <rtems_rfs_rtems_symlink+0x11c> <== NEVER TAKEN
2010f68: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2010f6c: 81 c7 e0 08 ret
2010f70: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010f74: 40 00 08 3d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010f78: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010f7c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010f80: 02 bf ff d2 be 2010ec8 <rtems_rfs_rtems_symlink+0x40> <== NOT EXECUTED
2010f84: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2010f88: 40 00 19 0e call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010f8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2010f90: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010f94: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010f98: 40 00 49 93 call 20235e4 <printf> <== NOT EXECUTED
2010f9c: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
2010fa0: 30 bf ff ca b,a 2010ec8 <rtems_rfs_rtems_symlink+0x40> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010fa4: 40 00 08 31 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010fa8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010fac: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010fb0: 02 80 00 08 be 2010fd0 <rtems_rfs_rtems_symlink+0x148> <== NOT EXECUTED
2010fb4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010fb8: 40 00 19 02 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010fbc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010fc0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010fc4: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010fc8: 40 00 49 87 call 20235e4 <printf> <== NOT EXECUTED
2010fcc: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010fd0: 81 c7 e0 08 ret <== NOT EXECUTED
2010fd4: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010fd8: 40 00 08 24 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010fdc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010fe0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010fe4: 02 bf ff d5 be 2010f38 <rtems_rfs_rtems_symlink+0xb0> <== NOT EXECUTED
2010fe8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010fec: 40 00 18 f5 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010ff0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010ff4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010ff8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010ffc: 40 00 49 7a call 20235e4 <printf> <== NOT EXECUTED
2011000: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2011004: 30 bf ff cd b,a 2010f38 <rtems_rfs_rtems_symlink+0xb0> <== NOT EXECUTED
02010948 <rtems_rfs_rtems_unlink>:
*/
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
2010948: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
201094c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
2010950: f6 06 40 00 ld [ %i1 ], %i3
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
2010954: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (loc);
2010958: f8 06 60 04 ld [ %i1 + 4 ], %i4
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
201095c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2010960: f4 06 00 00 ld [ %i0 ], %i2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2010964: d0 00 40 00 ld [ %g1 ], %o0
2010968: 92 10 20 00 clr %o1
201096c: 7f ff e6 8b call 200a398 <rtems_semaphore_obtain>
2010970: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2010974: b2 92 20 00 orcc %o0, 0, %i1
2010978: 12 80 00 22 bne 2010a00 <rtems_rfs_rtems_unlink+0xb8> <== NEVER TAKEN
201097c: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2010980: 96 10 00 1c mov %i4, %o3
2010984: 90 10 00 1d mov %i5, %o0
2010988: 92 10 00 1a mov %i2, %o1
201098c: 94 10 00 1b mov %i3, %o2
2010990: 40 00 3c 10 call 201f9d0 <rtems_rfs_unlink>
2010994: 98 10 20 00 clr %o4
if (rc)
2010998: b8 92 20 00 orcc %o0, 0, %i4
201099c: 22 80 00 0f be,a 20109d8 <rtems_rfs_rtems_unlink+0x90> <== ALWAYS TAKEN
20109a0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* 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);
20109a4: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20109a8: 40 00 2f 9d call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
20109ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20109b0: 7f ff e6 c4 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20109b4: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20109b8: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20109bc: 12 80 00 2b bne 2010a68 <rtems_rfs_rtems_unlink+0x120> <== NOT EXECUTED
20109c0: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
20109c4: 40 00 47 a0 call 2022844 <__errno> <== NOT EXECUTED
20109c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20109cc: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20109d0: 81 c7 e0 08 ret <== NOT EXECUTED
20109d4: 81 e8 00 00 restore <== NOT EXECUTED
20109d8: 40 00 2f 91 call 201c81c <rtems_rfs_buffers_release>
20109dc: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20109e0: d0 07 00 00 ld [ %i4 ], %o0
20109e4: 7f ff e6 b7 call 200a4c0 <rtems_semaphore_release>
20109e8: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
20109ec: ba 92 20 00 orcc %o0, 0, %i5
20109f0: 12 80 00 11 bne 2010a34 <rtems_rfs_rtems_unlink+0xec> <== NEVER TAKEN
20109f4: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
20109f8: 81 c7 e0 08 ret
20109fc: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010a00: 40 00 09 9a call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010a04: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010a08: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010a0c: 22 bf ff de be,a 2010984 <rtems_rfs_rtems_unlink+0x3c> <== NOT EXECUTED
2010a10: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2010a14: 40 00 1a 6b call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010a18: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2010a1c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010a20: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010a24: 40 00 4a f0 call 20235e4 <printf> <== NOT EXECUTED
2010a28: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2010a2c: 10 bf ff d6 b 2010984 <rtems_rfs_rtems_unlink+0x3c> <== NOT EXECUTED
2010a30: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010a34: 40 00 09 8d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010a38: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010a3c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010a40: 02 80 00 08 be 2010a60 <rtems_rfs_rtems_unlink+0x118> <== NOT EXECUTED
2010a44: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010a48: 40 00 1a 5e call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010a4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010a50: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010a54: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010a58: 40 00 4a e3 call 20235e4 <printf> <== NOT EXECUTED
2010a5c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2010a60: 81 c7 e0 08 ret <== NOT EXECUTED
2010a64: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2010a68: 40 00 09 80 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2010a6c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2010a70: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010a74: 02 bf ff d4 be 20109c4 <rtems_rfs_rtems_unlink+0x7c> <== NOT EXECUTED
2010a78: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2010a7c: 40 00 1a 51 call 20173c0 <rtems_status_text> <== NOT EXECUTED
2010a80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010a84: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2010a88: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2010a8c: 40 00 4a d6 call 20235e4 <printf> <== NOT EXECUTED
2010a90: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
2010a94: 30 bf ff cc b,a 20109c4 <rtems_rfs_rtems_unlink+0x7c> <== NOT EXECUTED
020111e8 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
20111e8: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20111ec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20111f0: f8 06 00 00 ld [ %i0 ], %i4 <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20111f4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20111f8: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
20111fc: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2011200: 94 10 20 00 clr %o2 <== NOT EXECUTED
2011204: 7f ff e4 65 call 200a398 <rtems_semaphore_obtain> <== NOT EXECUTED
2011208: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
201120c: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2011210: 12 80 00 48 bne 2011330 <rtems_rfs_rtems_utime+0x148> <== NOT EXECUTED
2011214: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2011218: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201121c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011220: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2011224: 7f ff fb 52 call 200ff6c <rtems_rfs_inode_open> <== NOT EXECUTED
2011228: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
201122c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2011230: 32 80 00 1a bne,a 2011298 <rtems_rfs_rtems_utime+0xb0> <== NOT EXECUTED
2011234: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== 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);
2011238: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
201123c: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED
2011240: 87 36 60 10 srl %i1, 0x10, %g3 <== NOT EXECUTED
2011244: c4 28 60 10 stb %g2, [ %g1 + 0x10 ] <== NOT EXECUTED
2011248: 85 36 60 08 srl %i1, 8, %g2 <== NOT EXECUTED
201124c: c6 28 60 11 stb %g3, [ %g1 + 0x11 ] <== NOT EXECUTED
2011250: c4 28 60 12 stb %g2, [ %g1 + 0x12 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011254: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2011258: 85 36 a0 18 srl %i2, 0x18, %g2 <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201125c: c6 2f bf e8 stb %g3, [ %fp + -24 ] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2011260: c4 28 60 14 stb %g2, [ %g1 + 0x14 ] <== NOT EXECUTED
2011264: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED
2011268: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
201126c: f2 28 60 13 stb %i1, [ %g1 + 0x13 ] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2011270: c6 28 60 15 stb %g3, [ %g1 + 0x15 ] <== NOT EXECUTED
2011274: c4 28 60 16 stb %g2, [ %g1 + 0x16 ] <== NOT EXECUTED
2011278: f4 28 60 17 stb %i2, [ %g1 + 0x17 ] <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
201127c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011280: 7f ff fb b2 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2011284: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
if (rc)
2011288: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
201128c: 22 80 00 1f be,a 2011308 <rtems_rfs_rtems_utime+0x120> <== NOT EXECUTED
2011290: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== 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);
2011294: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011298: 40 00 2d 61 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
201129c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20112a0: 7f ff e4 88 call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
20112a4: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20112a8: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20112ac: 12 80 00 07 bne 20112c8 <rtems_rfs_rtems_utime+0xe0> <== NOT EXECUTED
20112b0: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
20112b4: 40 00 45 64 call 2022844 <__errno> <== NOT EXECUTED
20112b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20112bc: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20112c0: 81 c7 e0 08 ret <== NOT EXECUTED
20112c4: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20112c8: 40 00 07 68 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
20112cc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20112d0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20112d4: 02 bf ff f8 be 20112b4 <rtems_rfs_rtems_utime+0xcc> <== NOT EXECUTED
20112d8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20112dc: 40 00 18 39 call 20173c0 <rtems_status_text> <== NOT EXECUTED
20112e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20112e4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20112e8: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20112ec: 40 00 48 be call 20235e4 <printf> <== NOT EXECUTED
20112f0: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
20112f4: 40 00 45 54 call 2022844 <__errno> <== NOT EXECUTED
20112f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20112fc: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011300: 81 c7 e0 08 ret <== NOT EXECUTED
2011304: 81 e8 00 00 restore <== NOT EXECUTED
2011308: 40 00 2d 45 call 201c81c <rtems_rfs_buffers_release> <== NOT EXECUTED
201130c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011310: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2011314: 7f ff e4 6b call 200a4c0 <rtems_semaphore_release> <== NOT EXECUTED
2011318: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
201131c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011320: 12 80 00 11 bne 2011364 <rtems_rfs_rtems_utime+0x17c> <== NOT EXECUTED
2011324: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011328: 81 c7 e0 08 ret <== NOT EXECUTED
201132c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011330: 40 00 07 4e call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011334: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011338: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201133c: 22 bf ff b8 be,a 201121c <rtems_rfs_rtems_utime+0x34> <== NOT EXECUTED
2011340: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011344: 40 00 18 1f call 20173c0 <rtems_status_text> <== NOT EXECUTED
2011348: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201134c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011350: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011354: 40 00 48 a4 call 20235e4 <printf> <== NOT EXECUTED
2011358: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 20332e0 <ramdisk_ops+0xc1c><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
201135c: 10 bf ff b0 b 201121c <rtems_rfs_rtems_utime+0x34> <== NOT EXECUTED
2011360: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011364: 40 00 07 41 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
2011368: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201136c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011370: 02 80 00 08 be 2011390 <rtems_rfs_rtems_utime+0x1a8> <== NOT EXECUTED
2011374: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011378: 40 00 18 12 call 20173c0 <rtems_status_text> <== NOT EXECUTED
201137c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011380: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011384: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
2011388: 40 00 48 97 call 20235e4 <printf> <== NOT EXECUTED
201138c: 90 12 23 08 or %o0, 0x308, %o0 ! 2033308 <ramdisk_ops+0xc44><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011390: 81 c7 e0 08 ret <== NOT EXECUTED
2011394: 81 e8 00 00 restore <== NOT EXECUTED
0200e72c <rtems_rfs_rup_quotient>:
* Return a rounded up integer quotient given a dividend and divisor. That is:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
200e72c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
200e730: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED
if (dividend == 0)
200e734: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e738: 02 80 00 06 be 200e750 <rtems_rfs_rup_quotient+0x24> <== NOT EXECUTED
200e73c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
200e740: 90 00 7f ff add %g1, -1, %o0 <== NOT EXECUTED
200e744: 40 00 83 79 call 202f528 <.udiv> <== NOT EXECUTED
200e748: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e74c: b0 02 20 01 add %o0, 1, %i0 <== NOT EXECUTED
}
200e750: 81 c7 e0 08 ret <== NOT EXECUTED
200e754: 81 e8 00 00 restore <== NOT EXECUTED
0201c060 <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
201c060: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201c064: 90 10 20 00 clr %o0
201c068: 92 10 20 80 mov 0x80, %o1
201c06c: 7f ff db ff call 2013068 <rtems_rfs_trace>
201c070: fa 06 20 08 ld [ %i0 + 8 ], %i5
201c074: 80 8a 20 ff btst 0xff, %o0
201c078: 32 80 00 38 bne,a 201c158 <rtems_rfs_scan_chain+0xf8> <== NEVER TAKEN
201c07c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
201c080: 80 a7 40 18 cmp %i5, %i0
201c084: 02 80 00 2c be 201c134 <rtems_rfs_scan_chain+0xd4> <== NEVER TAKEN
201c088: 39 00 80 d0 sethi %hi(0x2034000), %i4
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
201c08c: 10 80 00 09 b 201c0b0 <rtems_rfs_scan_chain+0x50>
201c090: b8 17 20 a8 or %i4, 0xa8, %i4 ! 20340a8 <CSWTCH.1+0x168>
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
201c094: 80 a0 40 1a cmp %g1, %i2
201c098: 02 80 00 14 be 201c0e8 <rtems_rfs_scan_chain+0x88>
201c09c: 90 10 20 00 clr %o0
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
201c0a0: fa 07 60 04 ld [ %i5 + 4 ], %i5
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
201c0a4: 80 a7 40 18 cmp %i5, %i0
201c0a8: 02 80 00 24 be 201c138 <rtems_rfs_scan_chain+0xd8>
201c0ac: 90 10 20 00 clr %o0
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201c0b0: 90 10 20 00 clr %o0
201c0b4: 7f ff db ed call 2013068 <rtems_rfs_trace>
201c0b8: 92 10 20 80 mov 0x80, %o1
201c0bc: 80 8a 20 ff btst 0xff, %o0
201c0c0: 22 bf ff f5 be,a 201c094 <rtems_rfs_scan_chain+0x34> <== ALWAYS TAKEN
201c0c4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
201c0c8: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
201c0cc: 40 00 1d 46 call 20235e4 <printf> <== NOT EXECUTED
201c0d0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
201c0d4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
201c0d8: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
201c0dc: 32 bf ff f2 bne,a 201c0a4 <rtems_rfs_scan_chain+0x44> <== NOT EXECUTED
201c0e0: fa 07 60 04 ld [ %i5 + 4 ], %i5 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201c0e4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201c0e8: 7f ff db e0 call 2013068 <rtems_rfs_trace>
201c0ec: 92 10 20 80 mov 0x80, %o1
201c0f0: 80 8a 20 ff btst 0xff, %o0
201c0f4: 22 80 00 07 be,a 201c110 <rtems_rfs_scan_chain+0xb0> <== ALWAYS TAKEN
201c0f8: c2 06 40 00 ld [ %i1 ], %g1
printf (": found block=%" PRIuPTR "\n",
201c0fc: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
201c100: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c104: 40 00 1d 38 call 20235e4 <printf> <== NOT EXECUTED
201c108: 90 12 20 b0 or %o0, 0xb0, %o0 ! 20340b0 <CSWTCH.1+0x170> <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
201c10c: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
201c110: 90 10 00 1d mov %i5, %o0
201c114: 82 00 7f ff add %g1, -1, %g1
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
201c118: b0 10 00 1d mov %i5, %i0
201c11c: 7f ff bb a7 call 200afb8 <_Chain_Extract>
201c120: c2 26 40 00 st %g1, [ %i1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
201c124: c0 27 60 04 clr [ %i5 + 4 ]
201c128: c0 27 40 00 clr [ %i5 ]
201c12c: 81 c7 e0 08 ret
201c130: 81 e8 00 00 restore
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201c134: 90 10 20 00 clr %o0 <== NOT EXECUTED
201c138: 92 10 20 80 mov 0x80, %o1
201c13c: 7f ff db cb call 2013068 <rtems_rfs_trace>
201c140: b0 10 20 00 clr %i0
201c144: 80 8a 20 ff btst 0xff, %o0
201c148: 12 80 00 0a bne 201c170 <rtems_rfs_scan_chain+0x110> <== NEVER TAKEN
201c14c: 11 00 80 d0 sethi %hi(0x2034000), %o0
printf (": not found\n");
return NULL;
}
201c150: 81 c7 e0 08 ret
201c154: 81 e8 00 00 restore
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
201c158: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201c15c: 11 00 80 d0 sethi %hi(0x2034000), %o0 <== NOT EXECUTED
201c160: 40 00 1d 21 call 20235e4 <printf> <== NOT EXECUTED
201c164: 90 12 20 78 or %o0, 0x78, %o0 ! 2034078 <CSWTCH.1+0x138> <== NOT EXECUTED
while (!rtems_chain_is_head (chain, node))
201c168: 10 bf ff c7 b 201c084 <rtems_rfs_scan_chain+0x24> <== NOT EXECUTED
201c16c: 80 a7 40 18 cmp %i5, %i0 <== NOT EXECUTED
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": not found\n");
201c170: 40 00 1d 5e call 20236e8 <puts> <== NOT EXECUTED
201c174: 90 12 20 c8 or %o0, 0xc8, %o0 <== NOT EXECUTED
return NULL;
}
201c178: 81 c7 e0 08 ret <== NOT EXECUTED
201c17c: 81 e8 00 00 restore <== NOT EXECUTED
0201a6f8 <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,
201a6f8: 9d e3 bf 88 save %sp, -120, %sp
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
201a6fc: 90 10 00 18 mov %i0, %o0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201a700: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
201a704: c0 2e 80 00 clrb [ %i2 ]
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
201a708: 7f ff ff e7 call 201a6a4 <rtems_rfs_bitmap_load_map>
201a70c: 92 07 bf fc add %fp, -4, %o1
if (rc > 0)
201a710: b0 92 20 00 orcc %o0, 0, %i0
201a714: 24 80 00 04 ble,a 201a724 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2c><== ALWAYS TAKEN
201a718: f0 06 40 00 ld [ %i1 ], %i0
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
201a71c: 81 c7 e0 08 ret <== NOT EXECUTED
201a720: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
201a724: a1 2e e0 0b sll %i3, 0xb, %l0
if (end_bit < 0)
201a728: a0 84 00 18 addcc %l0, %i0, %l0
201a72c: 2c 80 00 06 bneg,a 201a744 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x4c><== NEVER TAKEN
201a730: a0 10 20 00 clr %l0 <== NOT EXECUTED
end_bit = 0;
else if (end_bit >= control->size)
201a734: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201a738: 80 a4 00 01 cmp %l0, %g1
201a73c: 3a 80 00 02 bcc,a 201a744 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x4c><== ALWAYS TAKEN
201a740: a0 00 7f ff add %g1, -1, %l0
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
map_bits = &map[map_index];
201a744: e6 07 bf fc ld [ %fp + -4 ], %l3
if (end_bit < 0)
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
201a748: a5 3e 20 05 sra %i0, 5, %l2
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
201a74c: e8 07 60 14 ld [ %i5 + 0x14 ], %l4
map_bits = &map[map_index];
201a750: 83 2c a0 02 sll %l2, 2, %g1
201a754: a6 04 c0 01 add %l3, %g1, %l3
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201a758: 82 10 20 1f mov 0x1f, %g1
201a75c: c2 27 bf f4 st %g1, [ %fp + -12 ]
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
201a760: 85 3e 20 0a sra %i0, 0xa, %g2
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
201a764: b8 0e 20 1f and %i0, 0x1f, %i4
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
201a768: 85 28 a0 02 sll %g2, 2, %g2
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
201a76c: 92 0c a0 1f and %l2, 0x1f, %o1
search_bits = &control->search_bits[search_index];
201a770: a8 05 00 02 add %l4, %g2, %l4
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201a774: 80 a6 e0 00 cmp %i3, 0
201a778: 04 80 00 03 ble 201a784 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x8c><== NEVER TAKEN
201a77c: ab 2e e0 02 sll %i3, 2, %l5
201a780: c0 27 bf f4 clr [ %fp + -12 ]
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201a784: ad 36 e0 1f srl %i3, 0x1f, %l6
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
201a788: 83 3e e0 1f sra %i3, 0x1f, %g1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201a78c: 84 0d a0 ff and %l6, 0xff, %g2
|| ((direction > 0) && (test_bit >= end_bit)))
201a790: 82 20 40 1b sub %g1, %i3, %g1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201a794: af 2e e0 05 sll %i3, 5, %l7
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
201a798: 83 30 60 1f srl %g1, 0x1f, %g1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201a79c: a2 10 20 01 mov 1, %l1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201a7a0: c4 27 bf ec st %g2, [ %fp + -20 ]
|| ((direction > 0) && (test_bit >= end_bit)))
201a7a4: c2 27 bf f0 st %g1, [ %fp + -16 ]
/*
* If any bit is clear find that bit and then search the map element. If
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
201a7a8: c8 05 00 00 ld [ %l4 ], %g4
201a7ac: 80 a1 20 00 cmp %g4, 0
201a7b0: 02 80 00 4f be 201a8ec <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1f4><== NEVER TAKEN
201a7b4: 80 a6 e0 00 cmp %i3, 0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201a7b8: c2 07 bf f4 ld [ %fp + -12 ], %g1
201a7bc: 86 06 c0 12 add %i3, %l2, %g3
201a7c0: 87 28 e0 05 sll %g3, 5, %g3
201a7c4: 86 00 c0 01 add %g3, %g1, %g3
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
201a7c8: 80 a2 60 1f cmp %o1, 0x1f
201a7cc: 18 80 00 54 bgu 201a91c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x224><== NEVER TAKEN
201a7d0: 9f 2c 40 09 sll %l1, %o1, %o7
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
201a7d4: 80 8b c0 04 btst %o7, %g4
201a7d8: 22 80 00 15 be,a 201a82c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x134><== NEVER TAKEN
201a7dc: a6 04 c0 15 add %l3, %l5, %l3 <== NOT EXECUTED
* 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))
201a7e0: c4 04 c0 00 ld [ %l3 ], %g2
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201a7e4: 83 2c 40 1c sll %l1, %i4, %g1
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
201a7e8: 80 88 40 02 btst %g1, %g2
201a7ec: 12 80 00 55 bne 201a940 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x248>
201a7f0: 80 a4 00 18 cmp %l0, %i0
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
201a7f4: 12 80 00 0a bne 201a81c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x124><== ALWAYS TAKEN
201a7f8: b8 06 c0 1c add %i3, %i4, %i4
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201a7fc: 10 80 00 0c b 201a82c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x134><== NOT EXECUTED
201a800: a6 04 c0 15 add %l3, %l5, %l3 <== NOT EXECUTED
* 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))
201a804: 80 88 40 02 btst %g1, %g2
201a808: 12 80 00 4e bne 201a940 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x248>
201a80c: b0 06 c0 18 add %i3, %i0, %i0
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
201a810: 80 a6 00 10 cmp %i0, %l0
201a814: 02 80 00 05 be 201a828 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x130><== NEVER TAKEN
201a818: b8 06 c0 1c add %i3, %i4, %i4
{
/*
* Find the clear bit in the map. Update the search map and map if
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
201a81c: 80 a7 20 1f cmp %i4, 0x1f
201a820: 28 bf ff f9 bleu,a 201a804 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x10c><== ALWAYS TAKEN
201a824: 83 2c 40 1c sll %l1, %i4, %g1
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201a828: a6 04 c0 15 add %l3, %l5, %l3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201a82c: a4 06 c0 12 add %i3, %l2, %l2 <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201a830: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201a834: 04 80 00 03 ble 201a840 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x148><== NOT EXECUTED
201a838: b8 10 20 1f mov 0x1f, %i4 <== NOT EXECUTED
201a83c: b8 10 20 00 clr %i4 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
201a840: b0 10 00 03 mov %g3, %i0 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201a844: 92 06 c0 09 add %i3, %o1, %o1 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201a848: 84 10 00 16 mov %l6, %g2 <== NOT EXECUTED
201a84c: 80 a4 00 03 cmp %l0, %g3 <== NOT EXECUTED
201a850: 16 80 00 03 bge 201a85c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x164><== NOT EXECUTED
201a854: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a858: 82 10 20 00 clr %g1 <== NOT EXECUTED
201a85c: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201a860: 12 80 00 58 bne 201a9c0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2c8><== NOT EXECUTED
201a864: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
201a868: 86 00 c0 17 add %g3, %l7, %g3 <== NOT EXECUTED
|| ((direction > 0) && (test_bit >= end_bit)))
201a86c: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201a870: 04 80 00 03 ble 201a87c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x184><== NOT EXECUTED
201a874: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a878: 82 10 20 00 clr %g1 <== NOT EXECUTED
201a87c: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201a880: 02 bf ff d3 be 201a7cc <rtems_rfs_search_map_for_clear_bit.constprop.1+0xd4><== NOT EXECUTED
201a884: 80 a2 60 1f cmp %o1, 0x1f <== NOT EXECUTED
201a888: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
201a88c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201a890: 02 bf ff cf be 201a7cc <rtems_rfs_search_map_for_clear_bit.constprop.1+0xd4><== NOT EXECUTED
201a894: 80 a2 60 1f cmp %o1, 0x1f <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
201a898: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
201a89c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201a8a0: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
201a8a4: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201a8a8: 02 80 00 06 be 201a8c0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c8><== NOT EXECUTED
201a8ac: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201a8b0: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201a8b4: 32 bf ff be bne,a 201a7ac <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb4><== NOT EXECUTED
201a8b8: c8 05 00 00 ld [ %l4 ], %g4 <== NOT EXECUTED
201a8bc: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201a8c0: 16 80 00 03 bge 201a8cc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1d4><== NOT EXECUTED
201a8c4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a8c8: 82 10 20 00 clr %g1 <== NOT EXECUTED
201a8cc: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201a8d0: 02 80 00 05 be 201a8e4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ec><== NOT EXECUTED
201a8d4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
201a8d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201a8dc: 32 bf ff b4 bne,a 201a7ac <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb4><== NOT EXECUTED
201a8e0: c8 05 00 00 ld [ %l4 ], %g4 <== NOT EXECUTED
return 0;
}
201a8e4: 81 c7 e0 08 ret <== NOT EXECUTED
201a8e8: 91 e8 20 00 restore %g0, 0, %o0 <== 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);
if (direction > 0)
201a8ec: 04 80 00 2f ble 201a9a8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2b0><== NOT EXECUTED
201a8f0: b0 0e 3f e0 and %i0, -32, %i0 <== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
201a8f4: 84 10 20 20 mov 0x20, %g2 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
201a8f8: b8 10 20 00 clr %i4 <== NOT EXECUTED
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
201a8fc: 92 20 80 09 sub %g2, %o1, %o1 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
201a900: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
201a904: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
201a908: 40 00 52 ce call 202f440 <.umul> <== NOT EXECUTED
201a90c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201a910: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
map_index += direction * bits_skipped;
201a914: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
201a918: a6 04 c0 01 add %l3, %g1, %l3 <== NOT EXECUTED
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201a91c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201a920: 04 80 00 19 ble 201a984 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x28c><== NOT EXECUTED
201a924: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
201a928: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201a92c: 04 80 00 03 ble 201a938 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x240><== NOT EXECUTED
201a930: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a934: 82 10 20 00 clr %g1 <== NOT EXECUTED
201a938: 10 bf ff da b 201a8a0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1a8><== NOT EXECUTED
201a93c: 84 10 20 00 clr %g2 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201a940: 82 28 80 01 andn %g2, %g1, %g1
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
201a944: 80 a0 60 00 cmp %g1, 0
201a948: 12 80 00 05 bne 201a95c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x264><== ALWAYS TAKEN
201a94c: c2 24 c0 00 st %g1, [ %l3 ]
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201a950: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
201a954: 9e 28 40 0f andn %g1, %o7, %o7 <== NOT EXECUTED
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
201a958: de 25 00 00 st %o7, [ %l4 ] <== NOT EXECUTED
1 << search_offset);
control->free--;
201a95c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
201a960: c4 07 40 00 ld [ %i5 ], %g2
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
201a964: 82 00 7f ff add %g1, -1, %g1
201a968: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
*bit = test_bit;
201a96c: f0 26 40 00 st %i0, [ %i1 ]
*found = true;
201a970: 82 10 20 01 mov 1, %g1
201a974: c2 2e 80 00 stb %g1, [ %i2 ]
rtems_rfs_buffer_mark_dirty (control->buffer);
201a978: c2 28 80 00 stb %g1, [ %g2 ]
return 0;
201a97c: 81 c7 e0 08 ret
201a980: 91 e8 20 00 restore %g0, 0, %o0
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201a984: 84 10 00 16 mov %l6, %g2 <== NOT EXECUTED
201a988: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201a98c: 14 80 00 04 bg 201a99c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2a4><== NOT EXECUTED
201a990: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a994: 10 bf ff c4 b 201a8a4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ac><== NOT EXECUTED
201a998: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
201a99c: 82 10 20 00 clr %g1 <== NOT EXECUTED
201a9a0: 10 bf ff c1 b 201a8a4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ac><== NOT EXECUTED
201a9a4: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
201a9a8: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
201a9ac: b8 10 20 1f mov 0x1f, %i4 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
201a9b0: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
201a9b4: 92 02 60 01 inc %o1 <== NOT EXECUTED
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
201a9b8: 10 bf ff d4 b 201a908 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x210><== NOT EXECUTED
201a9bc: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201a9c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201a9c4: 22 bf ff aa be,a 201a86c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x174><== NOT EXECUTED
201a9c8: 86 00 c0 17 add %g3, %l7, %g3 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
201a9cc: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
201a9d0: 80 a4 00 03 cmp %l0, %g3 <== NOT EXECUTED
201a9d4: 04 80 00 03 ble 201a9e0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2e8><== NOT EXECUTED
201a9d8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201a9dc: 82 10 20 00 clr %g1 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201a9e0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201a9e4: 10 bf ff b0 b 201a8a4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ac><== NOT EXECUTED
201a9e8: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
0201fe00 <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
201fe00: 9d e3 bf 00 save %sp, -256, %sp
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
201fe04: 90 10 20 02 mov 2, %o0
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
201fe08: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
201fe0c: e2 17 a0 5e lduh [ %fp + 0x5e ], %l1
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
201fe10: 7f ff cc 96 call 2013068 <rtems_rfs_trace>
201fe14: 92 10 20 00 clr %o1
201fe18: 80 8a 20 ff btst 0xff, %o0
201fe1c: 32 80 00 08 bne,a 201fe3c <rtems_rfs_symlink+0x3c> <== NEVER TAKEN
201fe20: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
201fe24: c2 06 20 08 ld [ %i0 + 8 ], %g1
201fe28: 80 a7 00 01 cmp %i4, %g1
201fe2c: 0a 80 00 21 bcs 201feb0 <rtems_rfs_symlink+0xb0> <== ALWAYS TAKEN
201fe30: b4 10 20 5b mov 0x5b, %i2
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
201fe34: 81 c7 e0 08 ret
201fe38: 91 e8 00 1a restore %g0, %i2, %o0
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
201fe3c: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fe40: 40 00 0d e9 call 20235e4 <printf> <== NOT EXECUTED
201fe44: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20354d8 <CSWTCH.1+0x1598> <== NOT EXECUTED
for (c = 0; c < length; c++)
201fe48: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201fe4c: 04 80 00 0a ble 201fe74 <rtems_rfs_symlink+0x74> <== NOT EXECUTED
201fe50: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fe54: a4 10 20 00 clr %l2 <== NOT EXECUTED
printf ("%c", name[c]);
201fe58: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
201fe5c: 40 00 0d f5 call 2023630 <putchar> <== NOT EXECUTED
201fe60: a4 04 a0 01 inc %l2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
201fe64: 80 a4 80 1a cmp %l2, %i2 <== NOT EXECUTED
201fe68: 32 bf ff fd bne,a 201fe5c <rtems_rfs_symlink+0x5c> <== NOT EXECUTED
201fe6c: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
201fe70: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fe74: 40 00 0d dc call 20235e4 <printf> <== NOT EXECUTED
201fe78: 90 12 21 00 or %o0, 0x100, %o0 ! 2035500 <CSWTCH.1+0x15c0><== NOT EXECUTED
for (c = 0; c < link_length; c++)
201fe7c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201fe80: 04 bf ff e9 ble 201fe24 <rtems_rfs_symlink+0x24> <== NOT EXECUTED
201fe84: b4 10 20 00 clr %i2 <== NOT EXECUTED
printf ("%c", link[c]);
201fe88: d0 4e c0 1a ldsb [ %i3 + %i2 ], %o0 <== NOT EXECUTED
201fe8c: 40 00 0d e9 call 2023630 <putchar> <== NOT EXECUTED
201fe90: b4 06 a0 01 inc %i2 <== NOT EXECUTED
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
for (c = 0; c < link_length; c++)
201fe94: 80 a6 80 1c cmp %i2, %i4 <== NOT EXECUTED
201fe98: 32 bf ff fd bne,a 201fe8c <rtems_rfs_symlink+0x8c> <== NOT EXECUTED
201fe9c: d0 4e c0 1a ldsb [ %i3 + %i2 ], %o0 <== NOT EXECUTED
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
201fea0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
201fea4: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
201fea8: 1a bf ff e3 bcc 201fe34 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
201feac: b4 10 20 5b mov 0x5b, %i2 <== NOT EXECUTED
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
201feb0: 40 00 11 08 call 20242d0 <strlen>
201feb4: 90 10 00 19 mov %i1, %o0
201feb8: 82 07 bf f8 add %fp, -8, %g1
201febc: 96 10 00 08 mov %o0, %o3
201fec0: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
201fec4: e2 23 a0 60 st %l1, [ %sp + 0x60 ]
201fec8: 90 10 00 18 mov %i0, %o0
201fecc: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
201fed0: 92 10 00 10 mov %l0, %o1
201fed4: 94 10 00 19 mov %i1, %o2
201fed8: 9a 10 20 01 mov 1, %o5
201fedc: 19 00 00 28 sethi %hi(0xa000), %o4
201fee0: 7f ff c1 77 call 20104bc <rtems_rfs_inode_create>
201fee4: 98 13 21 ff or %o4, 0x1ff, %o4 ! a1ff <PROM_START+0xa1ff>
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
201fee8: b4 92 20 00 orcc %o0, 0, %i2
201feec: 14 bf ff d2 bg 201fe34 <rtems_rfs_symlink+0x34> <== NEVER TAKEN
201fef0: d2 07 bf f8 ld [ %fp + -8 ], %o1
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
201fef4: 90 10 00 18 mov %i0, %o0
201fef8: 94 07 bf c4 add %fp, -60, %o2
201fefc: 7f ff c0 1c call 200ff6c <rtems_rfs_inode_open>
201ff00: 96 10 20 01 mov 1, %o3
if (rc > 0)
201ff04: b4 92 20 00 orcc %o0, 0, %i2
201ff08: 14 bf ff cb bg 201fe34 <rtems_rfs_symlink+0x34> <== NEVER TAKEN
201ff0c: 80 a7 20 13 cmp %i4, 0x13
/*
* If the link length is less than the length of data union in the inode
* place the link into the data area else allocate a block and write the link
* to that.
*/
if (link_length < RTEMS_RFS_INODE_DATA_NAME_SIZE)
201ff10: 38 80 00 20 bgu,a 201ff90 <rtems_rfs_symlink+0x190> <== NEVER TAKEN
201ff14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
201ff18: d0 07 bf d0 ld [ %fp + -48 ], %o0
201ff1c: 92 10 20 00 clr %o1
201ff20: 94 10 20 14 mov 0x14, %o2
201ff24: 40 00 0d 5e call 202349c <memset>
201ff28: 90 02 20 1c add %o0, 0x1c, %o0
memcpy (inode.node->data.name, link, link_length);
201ff2c: d0 07 bf d0 ld [ %fp + -48 ], %o0
201ff30: 92 10 00 1b mov %i3, %o1
201ff34: 90 02 20 1c add %o0, 0x1c, %o0
201ff38: 40 00 0c cd call 202326c <memcpy>
201ff3c: 94 10 00 1c mov %i4, %o2
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
201ff40: c2 07 bf d0 ld [ %fp + -48 ], %g1
201ff44: c0 28 60 0c clrb [ %g1 + 0xc ]
201ff48: c2 07 bf d0 ld [ %fp + -48 ], %g1
201ff4c: c0 28 60 0d clrb [ %g1 + 0xd ]
201ff50: c2 07 bf d0 ld [ %fp + -48 ], %g1
201ff54: c0 28 60 0e clrb [ %g1 + 0xe ]
201ff58: c2 07 bf d0 ld [ %fp + -48 ], %g1
201ff5c: c0 28 60 0f clrb [ %g1 + 0xf ]
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
201ff60: c2 07 bf d0 ld [ %fp + -48 ], %g1
201ff64: 85 37 20 08 srl %i4, 8, %g2
201ff68: c4 28 60 0a stb %g2, [ %g1 + 0xa ]
201ff6c: c2 07 bf d0 ld [ %fp + -48 ], %g1
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
201ff70: 90 10 00 18 mov %i0, %o0
201ff74: f8 28 60 0b stb %i4, [ %g1 + 0xb ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201ff78: 82 10 20 01 mov 1, %g1
201ff7c: 92 07 bf c4 add %fp, -60, %o1
201ff80: 7f ff c0 72 call 2010148 <rtems_rfs_inode_close>
201ff84: c2 2f bf d4 stb %g1, [ %fp + -44 ]
return rc;
201ff88: 10 bf ff ab b 201fe34 <rtems_rfs_symlink+0x34>
201ff8c: b4 10 00 08 mov %o0, %i2
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
201ff90: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
201ff94: 7f ff ec e2 call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
201ff98: 94 07 bf 74 add %fp, -140, %o2 <== NOT EXECUTED
201ff9c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
if (rc > 0)
201ffa0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201ffa4: 04 80 00 05 ble 201ffb8 <rtems_rfs_symlink+0x1b8> <== NOT EXECUTED
201ffa8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
201ffac: 7f ff c0 67 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201ffb0: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
201ffb4: 30 bf ff a0 b,a 201fe34 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
201ffb8: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
201ffbc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201ffc0: 7f ff ee 34 call 201b890 <rtems_rfs_block_map_grow> <== NOT EXECUTED
201ffc4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
201ffc8: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
201ffcc: 04 80 00 08 ble 201ffec <rtems_rfs_symlink+0x1ec> <== NOT EXECUTED
201ffd0: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
201ffd4: 7f ff ed 36 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
201ffd8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
201ffdc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201ffe0: 7f ff c0 5a call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201ffe4: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
201ffe8: 30 bf ff 93 b,a 201fe34 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
201ffec: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201fff0: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
201fff4: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
handle->buffer = NULL;
201fff8: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
201fffc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2020000: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2020004: 7f ff f0 da call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2020008: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
202000c: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2020010: 04 80 00 07 ble 202002c <rtems_rfs_symlink+0x22c> <== NOT EXECUTED
2020014: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
2020018: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
202001c: 7f ff ed 24 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
2020020: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
2020024: 10 bf ff e2 b 201ffac <rtems_rfs_symlink+0x1ac> <== NOT EXECUTED
2020028: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
202002c: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
2020030: f4 00 60 24 ld [ %g1 + 0x24 ], %i2 <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
2020034: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
2020038: 40 00 0d 19 call 202349c <memset> <== NOT EXECUTED
202003c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
memcpy (data, link, link_length);
2020040: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2020044: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2020048: 40 00 0c 89 call 202326c <memcpy> <== NOT EXECUTED
202004c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020050: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2020054: 7f ff f0 4b call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2020058: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
202005c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
2020060: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
2020064: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
handle->buffer = NULL;
2020068: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
202006c: 7f ff ed 10 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
2020070: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
if (rc > 0)
2020074: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2020078: 04 bf ff bb ble 201ff64 <rtems_rfs_symlink+0x164> <== NOT EXECUTED
202007c: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
2020080: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2020084: 7f ff c0 31 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2020088: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
202008c: 30 bf ff 6a b,a 201fe34 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
02020090 <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)
{
2020090: 9d e3 bf 18 save %sp, -232, %sp
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
2020094: 90 10 20 04 mov 4, %o0
2020098: 92 10 20 00 clr %o1
202009c: 7f ff cb f3 call 2013068 <rtems_rfs_trace>
20200a0: ba 10 00 18 mov %i0, %i5
20200a4: 80 8a 20 ff btst 0xff, %o0
20200a8: 12 80 00 34 bne 2020178 <rtems_rfs_symlink_read+0xe8> <== NEVER TAKEN
20200ac: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
20200b0: 90 10 00 1d mov %i5, %o0
20200b4: 92 10 00 19 mov %i1, %o1
20200b8: 94 07 bf c8 add %fp, -56, %o2
20200bc: 7f ff bf ac call 200ff6c <rtems_rfs_inode_open>
20200c0: 96 10 20 01 mov 1, %o3
if (rc)
20200c4: b0 92 20 00 orcc %o0, 0, %i0
20200c8: 12 80 00 0e bne 2020100 <rtems_rfs_symlink_read+0x70> <== NEVER TAKEN
20200cc: d2 07 bf d4 ld [ %fp + -44 ], %o1
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
20200d0: 03 00 00 3c sethi %hi(0xf000), %g1
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
20200d4: c4 0a 60 02 ldub [ %o1 + 2 ], %g2
20200d8: 85 28 a0 08 sll %g2, 8, %g2
20200dc: 84 08 80 01 and %g2, %g1, %g2
20200e0: 03 00 00 28 sethi %hi(0xa000), %g1
20200e4: 80 a0 80 01 cmp %g2, %g1
20200e8: 22 80 00 08 be,a 2020108 <rtems_rfs_symlink_read+0x78> <== ALWAYS TAKEN
20200ec: d4 0a 60 0a ldub [ %o1 + 0xa ], %o2
*length = rtems_rfs_inode_get_block_offset (&inode);
if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
20200f0: 90 10 00 1d mov %i5, %o0
20200f4: 92 07 bf c8 add %fp, -56, %o1
20200f8: 7f ff c0 14 call 2010148 <rtems_rfs_inode_close>
20200fc: b0 10 20 16 mov 0x16, %i0
return EINVAL;
2020100: 81 c7 e0 08 ret
2020104: 81 e8 00 00 restore
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
2020108: c2 0a 60 0b ldub [ %o1 + 0xb ], %g1
* @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);
202010c: 95 2a a0 08 sll %o2, 8, %o2
2020110: 94 10 40 0a or %g1, %o2, %o2
if (size < *length)
2020114: 80 a2 80 1b cmp %o2, %i3
2020118: 18 bf ff f6 bgu 20200f0 <rtems_rfs_symlink_read+0x60>
202011c: d4 27 00 00 st %o2, [ %i4 ]
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
2020120: c8 0a 60 0c ldub [ %o1 + 0xc ], %g4
2020124: c4 0a 60 0d ldub [ %o1 + 0xd ], %g2
2020128: c6 0a 60 0f ldub [ %o1 + 0xf ], %g3
202012c: c2 0a 60 0e ldub [ %o1 + 0xe ], %g1
2020130: 89 29 20 18 sll %g4, 0x18, %g4
2020134: 85 28 a0 10 sll %g2, 0x10, %g2
2020138: 83 28 60 08 sll %g1, 8, %g1
202013c: 84 11 00 02 or %g4, %g2, %g2
2020140: 84 10 80 03 or %g2, %g3, %g2
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
2020144: 80 90 80 01 orcc %g2, %g1, %g0
2020148: 12 80 00 11 bne 202018c <rtems_rfs_symlink_read+0xfc> <== NEVER TAKEN
202014c: 90 10 00 1d mov %i5, %o0
{
memcpy (path, inode.node->data.name, *length);
2020150: 90 10 00 1a mov %i2, %o0
2020154: 40 00 0c 46 call 202326c <memcpy>
2020158: 92 02 60 1c add %o1, 0x1c, %o1
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
202015c: c2 07 00 00 ld [ %i4 ], %g1
rc = rtems_rfs_inode_close (fs, &inode);
2020160: 90 10 00 1d mov %i5, %o0
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
2020164: c0 2e 80 01 clrb [ %i2 + %g1 ]
rc = rtems_rfs_inode_close (fs, &inode);
2020168: 7f ff bf f8 call 2010148 <rtems_rfs_inode_close>
202016c: 92 07 bf c8 add %fp, -56, %o1
return rc;
}
2020170: 81 c7 e0 08 ret
2020174: 91 e8 00 08 restore %g0, %o0, %o0
{
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
2020178: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
202017c: 40 00 0d 1a call 20235e4 <printf> <== NOT EXECUTED
2020180: 90 12 21 08 or %o0, 0x108, %o0 ! 2035508 <CSWTCH.1+0x15c8><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
2020184: 10 bf ff cc b 20200b4 <rtems_rfs_symlink_read+0x24> <== NOT EXECUTED
2020188: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
202018c: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
2020190: 7f ff ec 63 call 201b31c <rtems_rfs_block_map_open> <== NOT EXECUTED
2020194: 94 07 bf 78 add %fp, -136, %o2 <== NOT EXECUTED
2020198: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
if (rc > 0)
202019c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
20201a0: 04 80 00 06 ble 20201b8 <rtems_rfs_symlink_read+0x128> <== NOT EXECUTED
20201a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
20201a8: 7f ff bf e8 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
20201ac: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
return rc;
20201b0: 81 c7 e0 08 ret <== NOT EXECUTED
20201b4: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
20201b8: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
20201bc: 94 10 20 00 clr %o2 <== NOT EXECUTED
20201c0: 96 10 20 00 clr %o3 <== NOT EXECUTED
20201c4: 7f ff ed 89 call 201b7e8 <rtems_rfs_block_map_seek> <== NOT EXECUTED
20201c8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
20201cc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20201d0: 04 80 00 07 ble 20201ec <rtems_rfs_symlink_read+0x15c> <== NOT EXECUTED
20201d4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
20201d8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20201dc: 7f ff ec b4 call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
20201e0: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20201e4: 10 bf ff f1 b 20201a8 <rtems_rfs_symlink_read+0x118> <== NOT EXECUTED
20201e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20201ec: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
20201f0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
20201f4: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
20201f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20201fc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2020200: 7f ff f0 5b call 201c36c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2020204: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
2020208: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
202020c: 14 bf ff f4 bg 20201dc <rtems_rfs_symlink_read+0x14c> <== NOT EXECUTED
2020210: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
2020214: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2020218: d4 07 00 00 ld [ %i4 ], %o2 <== NOT EXECUTED
202021c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
2020220: 40 00 0c 13 call 202326c <memcpy> <== NOT EXECUTED
2020224: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020228: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
202022c: 7f ff ef d5 call 201c180 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2020230: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
2020234: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
2020238: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
202023c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2020240: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2020244: 7f ff ec 9a call 201b4ac <rtems_rfs_block_map_close> <== NOT EXECUTED
2020248: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
if (rc > 0)
202024c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2020250: 24 bf ff c4 ble,a 2020160 <rtems_rfs_symlink_read+0xd0> <== NOT EXECUTED
2020254: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
2020258: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
202025c: 7f ff bf bb call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
2020260: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
return rc;
2020264: 81 c7 e0 08 ret <== NOT EXECUTED
2020268: 81 e8 00 00 restore <== NOT EXECUTED
020130ac <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
20130ac: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
20130b0: 03 00 80 db sethi %hi(0x2036c00), %g1 <== NOT EXECUTED
20130b4: c4 18 63 60 ldd [ %g1 + 0x360 ], %g2 ! 2036f60 <rtems_rfs_trace_flags><== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
20130b8: 98 28 80 18 andn %g2, %i0, %o4 <== NOT EXECUTED
20130bc: 9a 28 c0 19 andn %g3, %i1, %o5 <== NOT EXECUTED
return state;
}
20130c0: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
20130c4: d8 38 63 60 std %o4, [ %g1 + 0x360 ] <== NOT EXECUTED
return state;
}
20130c8: 81 c7 e0 08 ret <== NOT EXECUTED
20130cc: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
02013088 <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
2013088: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
201308c: 03 00 80 db sethi %hi(0x2036c00), %g1 <== NOT EXECUTED
2013090: c4 18 63 60 ldd [ %g1 + 0x360 ], %g2 ! 2036f60 <rtems_rfs_trace_flags><== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
2013094: 98 16 00 02 or %i0, %g2, %o4 <== NOT EXECUTED
2013098: 9a 16 40 03 or %i1, %g3, %o5 <== NOT EXECUTED
return state;
}
201309c: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
20130a0: d8 38 63 60 std %o4, [ %g1 + 0x360 ] <== NOT EXECUTED
return state;
}
20130a4: 81 c7 e0 08 ret <== NOT EXECUTED
20130a8: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
020130d0 <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
20130d0: 9d e3 be f8 save %sp, -264, %sp <== NOT EXECUTED
const char* table[] =
20130d4: 13 00 80 cd sethi %hi(0x2033400), %o1 <== NOT EXECUTED
20130d8: ba 07 bf 68 add %fp, -152, %i5 <== NOT EXECUTED
20130dc: 92 12 62 98 or %o1, 0x298, %o1 <== NOT EXECUTED
20130e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20130e4: 40 00 40 62 call 202326c <memcpy> <== NOT EXECUTED
20130e8: 94 10 20 98 mov 0x98, %o2 <== NOT EXECUTED
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
20130ec: a0 10 00 19 mov %i1, %l0 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20130f0: 80 a6 20 01 cmp %i0, 1 <== NOT EXECUTED
20130f4: 04 80 00 49 ble 2013218 <rtems_rfs_trace_shell_command+0x148><== NOT EXECUTED
20130f8: 82 10 20 00 clr %g1 <== NOT EXECUTED
{
if (argv[arg][0] == '-')
20130fc: ec 06 60 04 ld [ %i1 + 4 ], %l6 <== NOT EXECUTED
2013100: c2 4d 80 00 ldsb [ %l6 ], %g1 <== NOT EXECUTED
2013104: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
2013108: 02 80 00 6c be 20132b8 <rtems_rfs_trace_shell_command+0x1e8><== NOT EXECUTED
201310c: 23 00 80 db sethi %hi(0x2036c00), %l1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
2013110: 25 00 80 cd sethi %hi(0x2033400), %l2 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
return 1;
2013114: f4 1c 63 60 ldd [ %l1 + 0x360 ], %i2 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
2013118: 27 00 80 cd sethi %hi(0x2033400), %l3 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
201311c: 29 00 80 cd sethi %hi(0x2033400), %l4 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
2013120: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
2013124: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
2013128: c0 27 bf 60 clr [ %fp + -160 ] <== NOT EXECUTED
201312c: c0 27 bf 64 clr [ %fp + -156 ] <== NOT EXECUTED
"file-open",
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
2013130: c0 27 bf 58 clr [ %fp + -168 ] <== NOT EXECUTED
2013134: c0 27 bf 5c clr [ %fp + -164 ] <== NOT EXECUTED
2013138: a2 14 63 60 or %l1, 0x360, %l1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
201313c: a4 14 a0 48 or %l2, 0x48, %l2 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
2013140: a6 14 e0 50 or %l3, 0x50, %l3 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
2013144: a8 15 20 58 or %l4, 0x58, %l4 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1 << t;
else
clear_value = 1 << t;
2013148: 10 80 00 12 b 2013190 <rtems_rfs_trace_shell_command+0xc0><== NOT EXECUTED
201314c: ae 10 20 01 mov 1, %l7 <== NOT EXECUTED
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
2013150: b2 10 20 00 clr %i1 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
2013154: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
2013158: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
201315c: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
2013160: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2013164: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
2013168: b8 07 20 01 inc %i4 <== NOT EXECUTED
201316c: 80 a7 00 18 cmp %i4, %i0 <== NOT EXECUTED
2013170: 02 80 00 29 be 2013214 <rtems_rfs_trace_shell_command+0x144><== NOT EXECUTED
2013174: f4 3c 40 00 std %i2, [ %l1 ] <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
2013178: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
201317c: ec 04 00 01 ld [ %l0 + %g1 ], %l6 <== NOT EXECUTED
2013180: c2 4d 80 00 ldsb [ %l6 ], %g1 <== NOT EXECUTED
2013184: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
2013188: 22 80 00 4d be,a 20132bc <rtems_rfs_trace_shell_command+0x1ec><== NOT EXECUTED
201318c: c2 4d a0 01 ldsb [ %l6 + 1 ], %g1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
2013190: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2013194: 40 00 42 5e call 2023b0c <strcmp> <== NOT EXECUTED
2013198: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
201319c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20131a0: 22 80 00 02 be,a 20131a8 <rtems_rfs_trace_shell_command+0xd8><== NOT EXECUTED
20131a4: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
20131a8: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
20131ac: 40 00 42 58 call 2023b0c <strcmp> <== NOT EXECUTED
20131b0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
20131b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20131b8: 02 bf ff e6 be 2013150 <rtems_rfs_trace_shell_command+0x80><== NOT EXECUTED
20131bc: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
20131c0: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
20131c4: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20131c8: 40 00 42 51 call 2023b0c <strcmp> <== NOT EXECUTED
20131cc: aa 10 20 00 clr %l5 <== NOT EXECUTED
20131d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20131d4: 12 80 00 16 bne 201322c <rtems_rfs_trace_shell_command+0x15c><== NOT EXECUTED
20131d8: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
{
if (set)
20131dc: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
20131e0: 02 80 00 26 be 2013278 <rtems_rfs_trace_shell_command+0x1a8><== NOT EXECUTED
20131e4: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
20131e8: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20131ec: b8 07 20 01 inc %i4 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
20131f0: b4 38 a0 00 xnor %g2, 0, %i2 <== NOT EXECUTED
20131f4: b6 38 e0 00 xnor %g3, 0, %i3 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
20131f8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
20131fc: f4 3c 40 00 std %i2, [ %l1 ] <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
2013200: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
2013204: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
2013208: 80 a7 00 18 cmp %i4, %i0 <== NOT EXECUTED
201320c: 12 bf ff db bne 2013178 <rtems_rfs_trace_shell_command+0xa8><== NOT EXECUTED
2013210: c4 3f bf 58 std %g2, [ %fp + -168 ] <== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
2013214: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
2013218: 81 c7 e0 08 ret <== NOT EXECUTED
201321c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2013220: 80 a5 60 26 cmp %l5, 0x26 <== NOT EXECUTED
2013224: 02 80 00 0e be 201325c <rtems_rfs_trace_shell_command+0x18c><== NOT EXECUTED
2013228: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
{
if (strcmp (argv[arg], table[t]) == 0)
201322c: d2 07 40 01 ld [ %i5 + %g1 ], %o1 <== NOT EXECUTED
2013230: 40 00 42 37 call 2023b0c <strcmp> <== NOT EXECUTED
2013234: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2013238: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201323c: 32 bf ff f9 bne,a 2013220 <rtems_rfs_trace_shell_command+0x150><== NOT EXECUTED
2013240: aa 05 60 01 inc %l5 <== NOT EXECUTED
{
if (set)
2013244: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
2013248: 02 80 00 12 be 2013290 <rtems_rfs_trace_shell_command+0x1c0><== NOT EXECUTED
201324c: ab 2d c0 15 sll %l7, %l5, %l5 <== NOT EXECUTED
set_value = 1 << t;
2013250: ea 27 bf 5c st %l5, [ %fp + -164 ] <== NOT EXECUTED
2013254: ab 3d 60 1f sra %l5, 0x1f, %l5 <== NOT EXECUTED
2013258: ea 27 bf 58 st %l5, [ %fp + -168 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
201325c: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
2013260: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
2013264: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
2013268: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
201326c: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2013270: 10 bf ff be b 2013168 <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
2013274: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
2013278: b4 10 20 00 clr %i2 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
201327c: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
2013280: b6 10 20 00 clr %i3 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
2013284: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
2013288: 10 bf ff b8 b 2013168 <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
201328c: c4 3f bf 60 std %g2, [ %fp + -160 ] <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1 << t;
else
clear_value = 1 << t;
2013290: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
2013294: ea 27 bf 64 st %l5, [ %fp + -156 ] <== NOT EXECUTED
2013298: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
201329c: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
20132a0: ab 3d 60 1f sra %l5, 0x1f, %l5 <== NOT EXECUTED
20132a4: ea 27 bf 60 st %l5, [ %fp + -160 ] <== NOT EXECUTED
20132a8: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
20132ac: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
20132b0: 10 bf ff ae b 2013168 <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
20132b4: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
20132b8: c2 4d a0 01 ldsb [ %l6 + 1 ], %g1 <== NOT EXECUTED
20132bc: 80 a0 60 68 cmp %g1, 0x68 <== NOT EXECUTED
20132c0: 02 80 00 0a be 20132e8 <rtems_rfs_trace_shell_command+0x218><== NOT EXECUTED
20132c4: 80 a0 60 6c cmp %g1, 0x6c <== NOT EXECUTED
20132c8: 22 80 00 0f be,a 2013304 <rtems_rfs_trace_shell_command+0x234><== NOT EXECUTED
20132cc: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
20132d0: 11 00 80 cd sethi %hi(0x2033400), %o0 <== NOT EXECUTED
20132d4: 40 00 41 05 call 20236e8 <puts> <== NOT EXECUTED
20132d8: 90 12 20 30 or %o0, 0x30, %o0 ! 2033430 <rtems_rfs_rtems_link_handlers+0xb8><== NOT EXECUTED
return 1;
20132dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
20132e0: 81 c7 e0 08 ret <== NOT EXECUTED
20132e4: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
20132e8: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
20132ec: 11 00 80 cc sethi %hi(0x2033000), %o0 <== NOT EXECUTED
20132f0: 40 00 40 bd call 20235e4 <printf> <== NOT EXECUTED
20132f4: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 20333d8 <rtems_rfs_rtems_link_handlers+0x60><== NOT EXECUTED
return 0;
20132f8: 82 10 20 00 clr %g1 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
20132fc: 81 c7 e0 08 ret <== NOT EXECUTED
2013300: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
2013304: 11 00 80 cd sethi %hi(0x2033400), %o0 <== NOT EXECUTED
2013308: 39 00 80 cd sethi %hi(0x2033400), %i4 <== NOT EXECUTED
201330c: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED
2013310: 40 00 40 b5 call 20235e4 <printf> <== NOT EXECUTED
2013314: b4 10 00 1e mov %fp, %i2 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
2013318: b8 17 20 28 or %i4, 0x28, %i4 <== NOT EXECUTED
201331c: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
2013320: 40 00 40 b1 call 20235e4 <printf> <== NOT EXECUTED
2013324: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2013328: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
201332c: 80 a7 40 1a cmp %i5, %i2 <== NOT EXECUTED
2013330: 32 bf ff fc bne,a 2013320 <rtems_rfs_trace_shell_command+0x250><== NOT EXECUTED
2013334: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
2013338: 10 bf ff b8 b 2013218 <rtems_rfs_trace_shell_command+0x148><== NOT EXECUTED
201333c: 82 10 20 00 clr %g1 <== NOT EXECUTED
0201f9d0 <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)
{
201f9d0: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201f9d4: 90 10 20 00 clr %o0
201f9d8: 13 00 80 00 sethi %hi(0x2000000), %o1
201f9dc: 7f ff cd a3 call 2013068 <rtems_rfs_trace>
201f9e0: ba 10 00 18 mov %i0, %i5
201f9e4: 80 8a 20 ff btst 0xff, %o0
201f9e8: 12 80 00 5d bne 201fb5c <rtems_rfs_unlink+0x18c> <== NEVER TAKEN
201f9ec: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
201f9f0: 90 10 00 1d mov %i5, %o0
201f9f4: 92 10 00 1a mov %i2, %o1
201f9f8: 94 07 bf d8 add %fp, -40, %o2
201f9fc: 7f ff c1 5c call 200ff6c <rtems_rfs_inode_open>
201fa00: 96 10 20 01 mov 1, %o3
if (rc)
201fa04: b0 92 20 00 orcc %o0, 0, %i0
201fa08: 12 80 00 19 bne 201fa6c <rtems_rfs_unlink+0x9c> <== NEVER TAKEN
201fa0c: c2 07 bf e4 ld [ %fp + -28 ], %g1
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
201fa10: 05 00 00 3c sethi %hi(0xf000), %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
201fa14: c2 08 60 02 ldub [ %g1 + 2 ], %g1
201fa18: 83 28 60 08 sll %g1, 8, %g1
201fa1c: 82 08 40 02 and %g1, %g2, %g1
201fa20: 05 00 00 10 sethi %hi(0x4000), %g2
201fa24: 82 18 40 02 xor %g1, %g2, %g1
if (dir)
201fa28: 80 a0 00 01 cmp %g0, %g1
201fa2c: a0 60 3f ff subx %g0, -1, %l0
201fa30: 80 a4 20 00 cmp %l0, 0
201fa34: 02 80 00 26 be 201facc <rtems_rfs_unlink+0xfc> <== ALWAYS TAKEN
201fa38: 80 a7 20 00 cmp %i4, 0
{
switch (dir_mode)
201fa3c: 12 80 00 22 bne 201fac4 <rtems_rfs_unlink+0xf4> <== NOT EXECUTED
201fa40: 80 a7 20 01 cmp %i4, 1 <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fa44: 90 10 20 00 clr %o0 <== NOT EXECUTED
201fa48: 7f ff cd 88 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fa4c: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fa50: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fa54: 12 80 00 6c bne 201fc04 <rtems_rfs_unlink+0x234> <== NOT EXECUTED
201fa58: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
201fa5c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201fa60: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
201fa64: 7f ff c1 b9 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201fa68: b0 10 20 15 mov 0x15, %i0 <== NOT EXECUTED
return EISDIR;
201fa6c: 81 c7 e0 08 ret
201fa70: 81 e8 00 00 restore
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
201fa74: 90 10 00 1d mov %i5, %o0
201fa78: 7f ff c1 b4 call 2010148 <rtems_rfs_inode_close>
201fa7c: 92 07 bf d8 add %fp, -40, %o1
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fa80: b0 92 20 00 orcc %o0, 0, %i0
201fa84: 04 bf ff fa ble 201fa6c <rtems_rfs_unlink+0x9c> <== ALWAYS TAKEN
201fa88: 90 10 20 00 clr %o0
201fa8c: 7f ff cd 77 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fa90: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fa94: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fa98: 02 80 00 46 be 201fbb0 <rtems_rfs_unlink+0x1e0> <== NOT EXECUTED
201fa9c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
201faa0: 40 00 12 04 call 20242b0 <strerror> <== NOT EXECUTED
201faa4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201faa8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201faac: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fab0: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fab4: 40 00 0e cc call 20235e4 <printf> <== NOT EXECUTED
201fab8: 90 12 20 a0 or %o0, 0xa0, %o0 ! 20354a0 <CSWTCH.1+0x1560> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
201fabc: 81 c7 e0 08 ret <== NOT EXECUTED
201fac0: 81 e8 00 00 restore <== NOT EXECUTED
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
if (dir)
{
switch (dir_mode)
201fac4: 02 80 00 3d be 201fbb8 <rtems_rfs_unlink+0x1e8> <== NOT EXECUTED
201fac8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
201facc: 90 10 00 1d mov %i5, %o0
201fad0: 92 10 00 19 mov %i1, %o1
201fad4: 94 07 bf b0 add %fp, -80, %o2
201fad8: 7f ff c1 25 call 200ff6c <rtems_rfs_inode_open>
201fadc: 96 10 20 01 mov 1, %o3
if (rc)
201fae0: b0 92 20 00 orcc %o0, 0, %i0
201fae4: 12 80 00 24 bne 201fb74 <rtems_rfs_unlink+0x1a4> <== NEVER TAKEN
201fae8: 90 10 20 00 clr %o0
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
201faec: 90 10 00 1d mov %i5, %o0
201faf0: 92 07 bf b0 add %fp, -80, %o1
201faf4: 94 10 00 1a mov %i2, %o2
201faf8: 7f ff f6 3b call 201d3e4 <rtems_rfs_dir_del_entry>
201fafc: 96 10 00 1b mov %i3, %o3
if (rc > 0)
201fb00: b0 92 20 00 orcc %o0, 0, %i0
201fb04: 04 80 00 44 ble 201fc14 <rtems_rfs_unlink+0x244> <== ALWAYS TAKEN
201fb08: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fb0c: 7f ff cd 57 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fb10: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fb14: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fb18: 22 80 00 0a be,a 201fb40 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
201fb1c: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
201fb20: 40 00 11 e4 call 20242b0 <strerror> <== NOT EXECUTED
201fb24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fb28: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201fb2c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fb30: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201fb34: 40 00 0e ac call 20235e4 <printf> <== NOT EXECUTED
201fb38: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 20353a8 <CSWTCH.1+0x1468><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
201fb3c: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
201fb40: 7f ff c1 82 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201fb44: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
201fb48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201fb4c: 7f ff c1 7f call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201fb50: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
201fb54: 81 c7 e0 08 ret <== NOT EXECUTED
201fb58: 81 e8 00 00 restore <== NOT EXECUTED
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
201fb5c: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201fb60: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201fb64: 40 00 0e a0 call 20235e4 <printf> <== NOT EXECUTED
201fb68: 90 12 23 08 or %o0, 0x308, %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
201fb6c: 10 bf ff a2 b 201f9f4 <rtems_rfs_unlink+0x24> <== NOT EXECUTED
201fb70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fb74: 7f ff cd 3d call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fb78: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fb7c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fb80: 22 80 00 0a be,a 201fba8 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
201fb84: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
201fb88: 40 00 11 ca call 20242b0 <strerror> <== NOT EXECUTED
201fb8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fb90: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201fb94: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fb98: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201fb9c: 40 00 0e 92 call 20235e4 <printf> <== NOT EXECUTED
201fba0: 90 12 23 78 or %o0, 0x378, %o0 ! 2035378 <CSWTCH.1+0x1438><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
201fba4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201fba8: 7f ff c1 68 call 2010148 <rtems_rfs_inode_close> <== NOT EXECUTED
201fbac: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
201fbb0: 81 c7 e0 08 ret <== NOT EXECUTED
201fbb4: 81 e8 00 00 restore <== 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);
201fbb8: 7f ff f8 15 call 201dc0c <rtems_rfs_dir_empty> <== NOT EXECUTED
201fbbc: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
if (rc > 0)
201fbc0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201fbc4: 04 bf ff c2 ble 201facc <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
201fbc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fbcc: 7f ff cd 27 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fbd0: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fbd4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fbd8: 22 bf ff f4 be,a 201fba8 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
201fbdc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
201fbe0: 40 00 11 b4 call 20242b0 <strerror> <== NOT EXECUTED
201fbe4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fbe8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201fbec: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fbf0: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201fbf4: 40 00 0e 7c call 20235e4 <printf> <== NOT EXECUTED
201fbf8: 90 12 23 58 or %o0, 0x358, %o0 ! 2035358 <CSWTCH.1+0x1418><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
201fbfc: 10 bf ff eb b 201fba8 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
201fc00: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
switch (dir_mode)
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
201fc04: 40 00 0e b9 call 20236e8 <puts> <== NOT EXECUTED
201fc08: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
201fc0c: 10 bf ff 95 b 201fa60 <rtems_rfs_unlink+0x90> <== NOT EXECUTED
201fc10: 90 10 00 1d mov %i5, %o0 <== 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);
201fc14: c2 07 bf e4 ld [ %fp + -28 ], %g1
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
201fc18: 05 3f ff c0 sethi %hi(0xffff0000), %g2
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
201fc1c: f8 08 40 00 ldub [ %g1 ], %i4
201fc20: c2 08 60 01 ldub [ %g1 + 1 ], %g1
201fc24: b9 2f 20 08 sll %i4, 8, %i4
201fc28: b8 17 00 01 or %i4, %g1, %i4
if (links == 0xffff)
201fc2c: 83 2f 20 10 sll %i4, 0x10, %g1
201fc30: 83 30 60 10 srl %g1, 0x10, %g1
links = 0;
201fc34: 82 38 80 01 xnor %g2, %g1, %g1
201fc38: 80 a0 00 01 cmp %g0, %g1
201fc3c: 82 60 20 00 subx %g0, 0, %g1
201fc40: b8 0f 00 01 and %i4, %g1, %i4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fc44: 13 00 80 00 sethi %hi(0x2000000), %o1
201fc48: 7f ff cd 08 call 2013068 <rtems_rfs_trace>
201fc4c: b7 2f 20 10 sll %i4, 0x10, %i3
201fc50: 80 8a 20 ff btst 0xff, %o0
201fc54: 12 80 00 22 bne 201fcdc <rtems_rfs_unlink+0x30c> <== NEVER TAKEN
201fc58: 92 10 00 1a mov %i2, %o1
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
201fc5c: b7 36 e0 10 srl %i3, 0x10, %i3
201fc60: 80 a6 e0 01 cmp %i3, 1
201fc64: 08 80 00 38 bleu 201fd44 <rtems_rfs_unlink+0x374>
201fc68: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
links--;
201fc6c: b8 07 3f ff add %i4, -1, %i4
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
201fc70: 85 37 20 08 srl %i4, 8, %g2
201fc74: c4 28 40 00 stb %g2, [ %g1 ]
201fc78: c2 07 bf e4 ld [ %fp + -28 ], %g1
201fc7c: f8 28 60 01 stb %i4, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201fc80: 82 10 20 01 mov 1, %g1
201fc84: c2 2f bf e8 stb %g1, [ %fp + -24 ]
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
201fc88: 90 07 bf b0 add %fp, -80, %o0
201fc8c: 92 10 20 01 mov 1, %o1
201fc90: 7f ff c1 8a call 20102b8 <rtems_rfs_inode_time_stamp_now>
201fc94: 94 10 20 01 mov 1, %o2
if (rc > 0)
201fc98: b0 92 20 00 orcc %o0, 0, %i0
201fc9c: 04 80 00 16 ble 201fcf4 <rtems_rfs_unlink+0x324> <== ALWAYS TAKEN
201fca0: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fca4: 7f ff cc f1 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fca8: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fcac: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fcb0: 22 bf ff a4 be,a 201fb40 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
201fcb4: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
201fcb8: 40 00 11 7e call 20242b0 <strerror> <== NOT EXECUTED
201fcbc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fcc0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201fcc4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fcc8: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fccc: 40 00 0e 46 call 20235e4 <printf> <== NOT EXECUTED
201fcd0: 90 12 20 30 or %o0, 0x30, %o0 ! 2035430 <CSWTCH.1+0x14f0> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
201fcd4: 10 bf ff 9b b 201fb40 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
201fcd8: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
201fcdc: 11 00 80 d4 sethi %hi(0x2035000), %o0 <== NOT EXECUTED
201fce0: 95 36 e0 10 srl %i3, 0x10, %o2 <== NOT EXECUTED
201fce4: 40 00 0e 40 call 20235e4 <printf> <== NOT EXECUTED
201fce8: 90 12 23 d8 or %o0, 0x3d8, %o0 <== NOT EXECUTED
if (links > 1)
201fcec: 10 bf ff dd b 201fc60 <rtems_rfs_unlink+0x290> <== NOT EXECUTED
201fcf0: b7 36 e0 10 srl %i3, 0x10, %i3 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
201fcf4: 90 10 00 1d mov %i5, %o0
201fcf8: 7f ff c1 14 call 2010148 <rtems_rfs_inode_close>
201fcfc: 92 07 bf b0 add %fp, -80, %o1
if (rc > 0)
201fd00: b0 92 20 00 orcc %o0, 0, %i0
201fd04: 04 bf ff 5c ble 201fa74 <rtems_rfs_unlink+0xa4> <== ALWAYS TAKEN
201fd08: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fd0c: 7f ff cc d7 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fd10: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fd14: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fd18: 22 bf ff a4 be,a 201fba8 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
201fd1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
201fd20: 40 00 11 64 call 20242b0 <strerror> <== NOT EXECUTED
201fd24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fd28: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201fd2c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fd30: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fd34: 40 00 0e 2c call 20235e4 <printf> <== NOT EXECUTED
201fd38: 90 12 20 68 or %o0, 0x68, %o0 ! 2035468 <CSWTCH.1+0x1528> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
201fd3c: 10 bf ff 9b b 201fba8 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
201fd40: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
201fd44: 90 10 00 1d mov %i5, %o0
201fd48: 7f ff c1 26 call 20101e0 <rtems_rfs_inode_delete>
201fd4c: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
201fd50: b0 92 20 00 orcc %o0, 0, %i0
201fd54: 04 80 00 10 ble 201fd94 <rtems_rfs_unlink+0x3c4> <== ALWAYS TAKEN
201fd58: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
201fd5c: 7f ff cc c3 call 2013068 <rtems_rfs_trace> <== NOT EXECUTED
201fd60: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
201fd64: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fd68: 22 bf ff 76 be,a 201fb40 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
201fd6c: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
201fd70: 40 00 11 50 call 20242b0 <strerror> <== NOT EXECUTED
201fd74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fd78: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201fd7c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201fd80: 11 00 80 d5 sethi %hi(0x2035400), %o0 <== NOT EXECUTED
201fd84: 40 00 0e 18 call 20235e4 <printf> <== NOT EXECUTED
201fd88: 90 12 20 00 mov %o0, %o0 ! 2035400 <CSWTCH.1+0x14c0> <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
201fd8c: 10 bf ff 6d b 201fb40 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
201fd90: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
201fd94: 80 a4 20 00 cmp %l0, 0
201fd98: 02 bf ff bd be 201fc8c <rtems_rfs_unlink+0x2bc> <== ALWAYS TAKEN
201fd9c: 90 07 bf b0 add %fp, -80, %o0
{
links = rtems_rfs_inode_get_links (&parent_inode);
201fda0: c4 07 bf bc ld [ %fp + -68 ], %g2 <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
201fda4: 39 00 00 3f sethi %hi(0xfc00), %i4 <== 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);
201fda8: c2 08 a0 01 ldub [ %g2 + 1 ], %g1 <== NOT EXECUTED
201fdac: c6 08 80 00 ldub [ %g2 ], %g3 <== NOT EXECUTED
if (links == 0xffff)
201fdb0: b8 17 23 ff or %i4, 0x3ff, %i4 <== 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);
201fdb4: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
201fdb8: 86 10 c0 01 or %g3, %g1, %g3 <== NOT EXECUTED
if (links == 0xffff)
201fdbc: 89 28 e0 10 sll %g3, 0x10, %g4 <== NOT EXECUTED
201fdc0: 89 31 20 10 srl %g4, 0x10, %g4 <== NOT EXECUTED
201fdc4: 80 a1 00 1c cmp %g4, %i4 <== NOT EXECUTED
201fdc8: 02 80 00 0c be 201fdf8 <rtems_rfs_unlink+0x428> <== NOT EXECUTED
201fdcc: 82 10 00 03 mov %g3, %g1 <== NOT EXECUTED
if (links > 1)
201fdd0: 80 a1 20 01 cmp %g4, 1 <== NOT EXECUTED
201fdd4: 38 80 00 02 bgu,a 201fddc <rtems_rfs_unlink+0x40c> <== NOT EXECUTED
201fdd8: 82 00 ff ff add %g3, -1, %g1 <== 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);
201fddc: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
201fde0: c6 28 80 00 stb %g3, [ %g2 ] <== NOT EXECUTED
201fde4: c4 07 bf bc ld [ %fp + -68 ], %g2 <== NOT EXECUTED
201fde8: c2 28 a0 01 stb %g1, [ %g2 + 1 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201fdec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201fdf0: 10 bf ff a6 b 201fc88 <rtems_rfs_unlink+0x2b8> <== NOT EXECUTED
201fdf4: c2 2f bf c0 stb %g1, [ %fp + -64 ] <== NOT EXECUTED
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
201fdf8: 10 bf ff f9 b 201fddc <rtems_rfs_unlink+0x40c> <== NOT EXECUTED
201fdfc: 82 10 20 00 clr %g1 <== NOT EXECUTED
020153f8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
20153f8: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
20153fc: 80 a6 60 00 cmp %i1, 0
2015400: 12 80 00 04 bne 2015410 <rtems_signal_send+0x18>
2015404: 82 10 20 0a mov 0xa, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2015408: 81 c7 e0 08 ret
201540c: 91 e8 00 01 restore %g0, %g1, %o0
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2015410: 90 10 00 18 mov %i0, %o0
2015414: 40 00 13 69 call 201a1b8 <_Thread_Get>
2015418: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
201541c: c2 07 bf fc ld [ %fp + -4 ], %g1
2015420: 80 a0 60 00 cmp %g1, 0
2015424: 12 80 00 20 bne 20154a4 <rtems_signal_send+0xac>
2015428: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
201542c: fa 02 21 58 ld [ %o0 + 0x158 ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2015430: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2015434: 80 a0 60 00 cmp %g1, 0
2015438: 02 80 00 1e be 20154b0 <rtems_signal_send+0xb8>
201543c: 01 00 00 00 nop
if ( asr->is_enabled ) {
2015440: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
2015444: 80 a0 60 00 cmp %g1, 0
2015448: 02 80 00 1e be 20154c0 <rtems_signal_send+0xc8>
201544c: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2015450: 7f ff e6 9f call 200eecc <sparc_disable_interrupts>
2015454: 01 00 00 00 nop
*signal_set |= signals;
2015458: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
201545c: b2 10 40 19 or %g1, %i1, %i1
2015460: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
2015464: 7f ff e6 9e call 200eedc <sparc_enable_interrupts>
2015468: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201546c: 03 00 80 ef sethi %hi(0x203bc00), %g1
2015470: 82 10 61 40 or %g1, 0x140, %g1 ! 203bd40 <_Per_CPU_Information>
2015474: c4 00 60 08 ld [ %g1 + 8 ], %g2
2015478: 80 a0 a0 00 cmp %g2, 0
201547c: 02 80 00 06 be 2015494 <rtems_signal_send+0x9c>
2015480: 01 00 00 00 nop
2015484: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2015488: 80 a7 00 02 cmp %i4, %g2
201548c: 02 80 00 15 be 20154e0 <rtems_signal_send+0xe8> <== ALWAYS TAKEN
2015490: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2015494: 40 00 13 3c call 201a184 <_Thread_Enable_dispatch>
2015498: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
201549c: 10 bf ff db b 2015408 <rtems_signal_send+0x10>
20154a0: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
20154a4: 82 10 20 04 mov 4, %g1
}
20154a8: 81 c7 e0 08 ret
20154ac: 91 e8 00 01 restore %g0, %g1, %o0
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
20154b0: 40 00 13 35 call 201a184 <_Thread_Enable_dispatch>
20154b4: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
20154b8: 10 bf ff d4 b 2015408 <rtems_signal_send+0x10>
20154bc: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
20154c0: 7f ff e6 83 call 200eecc <sparc_disable_interrupts>
20154c4: 01 00 00 00 nop
*signal_set |= signals;
20154c8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
20154cc: b2 10 40 19 or %g1, %i1, %i1
20154d0: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
20154d4: 7f ff e6 82 call 200eedc <sparc_enable_interrupts>
20154d8: 01 00 00 00 nop
20154dc: 30 bf ff ee b,a 2015494 <rtems_signal_send+0x9c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
20154e0: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
20154e4: 30 bf ff ec b,a 2015494 <rtems_signal_send+0x9c>
02002a3c <rtems_stack_checker_begin_extension>:
Thread_Control *the_thread
)
{
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
2002a3c: c2 02 20 08 ld [ %o0 + 8 ], %g1
2002a40: 80 a0 60 00 cmp %g1, 0
2002a44: 02 80 00 0c be 2002a74 <rtems_stack_checker_begin_extension+0x38><== NEVER TAKEN
2002a48: 05 00 80 67 sethi %hi(0x2019c00), %g2
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
2002a4c: c2 02 20 bc ld [ %o0 + 0xbc ], %g1
2002a50: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3
2002a54: 84 10 a0 84 or %g2, 0x84, %g2
2002a58: c6 20 60 08 st %g3, [ %g1 + 8 ]
2002a5c: c6 00 a0 04 ld [ %g2 + 4 ], %g3
2002a60: c6 20 60 0c st %g3, [ %g1 + 0xc ]
2002a64: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2002a68: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
2002a6c: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
2002a70: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
2002a74: 81 c3 e0 08 retl
02002a0c <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
2002a0c: 9d e3 bf a0 save %sp, -96, %sp
Stack_check_Initialize();
2002a10: 7f ff ff d9 call 2002974 <Stack_check_Initialize>
2002a14: 01 00 00 00 nop
if (the_thread)
2002a18: 80 a6 60 00 cmp %i1, 0
2002a1c: 02 80 00 06 be 2002a34 <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
2002a20: 01 00 00 00 nop
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
2002a24: d0 06 60 bc ld [ %i1 + 0xbc ], %o0
2002a28: d4 06 60 b8 ld [ %i1 + 0xb8 ], %o2
2002a2c: 40 00 40 89 call 2012c50 <memset>
2002a30: 92 10 20 a5 mov 0xa5, %o1
return true;
}
2002a34: 81 c7 e0 08 ret
2002a38: 91 e8 20 01 restore %g0, 1, %o0
02002b90 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
2002b90: 9d e3 bf a0 save %sp, -96, %sp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
2002b94: 39 00 80 69 sethi %hi(0x201a400), %i4
2002b98: b8 17 20 10 or %i4, 0x10, %i4 ! 201a410 <_Per_CPU_Information>
2002b9c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
2002ba0: d0 00 60 bc ld [ %g1 + 0xbc ], %o0
2002ba4: 80 a7 80 08 cmp %fp, %o0
2002ba8: 0a 80 00 06 bcs 2002bc0 <rtems_stack_checker_is_blown+0x30><== NEVER TAKEN
2002bac: ba 10 20 00 clr %i5
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
2002bb0: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1
2002bb4: 82 02 00 01 add %o0, %g1, %g1
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
2002bb8: 80 a0 40 1e cmp %g1, %fp
2002bbc: ba 60 3f ff subx %g0, -1, %i5
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
2002bc0: 03 00 80 66 sethi %hi(0x2019800), %g1
2002bc4: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 20199ec <Stack_check_Initialized>
2002bc8: 80 a0 60 00 cmp %g1, 0
2002bcc: 02 80 00 09 be 2002bf0 <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
2002bd0: 92 10 20 01 mov 1, %o1
pattern_ok = (!memcmp(
2002bd4: 90 02 20 08 add %o0, 8, %o0
2002bd8: 94 10 20 10 mov 0x10, %o2
2002bdc: 13 00 80 67 sethi %hi(0x2019c00), %o1
2002be0: 40 00 3f b2 call 2012aa8 <memcmp>
2002be4: 92 12 60 84 or %o1, 0x84, %o1 ! 2019c84 <Stack_check_Pattern>
2002be8: 80 a0 00 08 cmp %g0, %o0
2002bec: 92 60 3f ff subx %g0, -1, %o1
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
2002bf0: 80 8f 60 ff btst 0xff, %i5
2002bf4: 22 80 00 07 be,a 2002c10 <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
2002bf8: 92 0a 60 ff and %o1, 0xff, %o1 <== NOT EXECUTED
2002bfc: 92 8a 60 ff andcc %o1, 0xff, %o1
2002c00: 02 80 00 04 be 2002c10 <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
2002c04: b0 10 20 00 clr %i0
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
2002c08: 81 c7 e0 08 ret
2002c0c: 81 e8 00 00 restore
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
2002c10: 7f ff ff 9b call 2002a7c <Stack_check_report_blown_task> <== NOT EXECUTED
2002c14: d0 07 20 0c ld [ %i4 + 0xc ], %o0 <== NOT EXECUTED
02002c1c <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2002c1c: 9d e3 bf a0 save %sp, -96, %sp
if ( !print )
2002c20: 80 a6 60 00 cmp %i1, 0
2002c24: 02 80 00 14 be 2002c74 <rtems_stack_checker_report_usage_with_plugin+0x58><== NEVER TAKEN
2002c28: 39 00 80 66 sethi %hi(0x2019800), %i4
return;
print_context = context;
print_handler = print;
2002c2c: 3b 00 80 66 sethi %hi(0x2019800), %i5
)
{
if ( !print )
return;
print_context = context;
2002c30: f0 27 21 f4 st %i0, [ %i4 + 0x1f4 ]
print_handler = print;
2002c34: f2 27 61 f0 st %i1, [ %i5 + 0x1f0 ]
(*print)( context, "Stack usage by thread\n");
2002c38: 90 10 00 18 mov %i0, %o0
2002c3c: 13 00 80 61 sethi %hi(0x2018400), %o1
2002c40: 9f c6 40 00 call %i1
2002c44: 92 12 60 68 or %o1, 0x68, %o1 ! 2018468 <rtems_filesystem_table+0x534>
(*print)( context,
2002c48: 90 10 00 18 mov %i0, %o0
2002c4c: 13 00 80 61 sethi %hi(0x2018400), %o1
2002c50: 9f c6 40 00 call %i1
2002c54: 92 12 60 80 or %o1, 0x80, %o1 ! 2018480 <rtems_filesystem_table+0x54c>
" 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 );
2002c58: 11 00 80 09 sethi %hi(0x2002400), %o0
2002c5c: 40 00 1e 2c call 200a50c <rtems_iterate_over_all_threads>
2002c60: 90 12 23 d4 or %o0, 0x3d4, %o0 ! 20027d4 <Stack_check_Dump_threads_usage>
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
2002c64: 7f ff fe dc call 20027d4 <Stack_check_Dump_threads_usage>
2002c68: 90 10 3f ff mov -1, %o0
#endif
print_context = NULL;
2002c6c: c0 27 21 f4 clr [ %i4 + 0x1f4 ]
print_handler = NULL;
2002c70: c0 27 61 f0 clr [ %i5 + 0x1f0 ]
2002c74: 81 c7 e0 08 ret
2002c78: 81 e8 00 00 restore
02002b24 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
2002b24: 9d e3 bf a0 save %sp, -96, %sp
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
2002b28: c2 06 20 bc ld [ %i0 + 0xbc ], %g1
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002b2c: 13 00 80 67 sethi %hi(0x2019c00), %o1
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
2002b30: 90 00 60 08 add %g1, 8, %o0
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002b34: 94 10 20 10 mov 0x10, %o2
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
2002b38: 80 a7 80 01 cmp %fp, %g1
2002b3c: 0a 80 00 07 bcs 2002b58 <rtems_stack_checker_switch_extension+0x34><== NEVER TAKEN
2002b40: 92 12 60 84 or %o1, 0x84, %o1
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
2002b44: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2
2002b48: 82 00 40 02 add %g1, %g2, %g1
2002b4c: 80 a7 80 01 cmp %fp, %g1
2002b50: 08 80 00 09 bleu 2002b74 <rtems_stack_checker_switch_extension+0x50><== ALWAYS TAKEN
2002b54: 01 00 00 00 nop
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002b58: 40 00 3f d4 call 2012aa8 <memcmp> <== NOT EXECUTED
2002b5c: 01 00 00 00 nop <== NOT EXECUTED
2002b60: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
2002b64: 92 60 3f ff subx %g0, -1, %o1 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
2002b68: 90 10 00 18 mov %i0, %o0
2002b6c: 7f ff ff c4 call 2002a7c <Stack_check_report_blown_task>
2002b70: 92 0a 60 01 and %o1, 1, %o1
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002b74: 40 00 3f cd call 2012aa8 <memcmp>
2002b78: 01 00 00 00 nop
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
2002b7c: 80 a2 20 00 cmp %o0, 0
2002b80: 12 bf ff fa bne 2002b68 <rtems_stack_checker_switch_extension+0x44>
2002b84: 92 10 20 00 clr %o1
2002b88: 81 c7 e0 08 ret
2002b8c: 81 e8 00 00 restore
0200c960 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
200c960: 9d e3 bf 98 save %sp, -104, %sp
200c964: ba 10 00 18 mov %i0, %i5
long result;
char *end;
if ( !n )
200c968: 80 a6 60 00 cmp %i1, 0
200c96c: 02 80 00 1f be 200c9e8 <rtems_string_to_int+0x88>
200c970: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200c974: 40 00 0d af call 2010030 <__errno>
200c978: 01 00 00 00 nop
200c97c: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtol( s, &end, base );
200c980: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200c984: c0 26 40 00 clr [ %i1 ]
result = strtol( s, &end, base );
200c988: 90 10 00 1d mov %i5, %o0
200c98c: 40 00 19 a7 call 2013028 <strtol>
200c990: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200c994: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
200c998: 80 a6 a0 00 cmp %i2, 0
200c99c: 02 80 00 03 be 200c9a8 <rtems_string_to_int+0x48>
200c9a0: b6 10 00 08 mov %o0, %i3
*endptr = end;
200c9a4: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200c9a8: 80 a7 40 01 cmp %i5, %g1
200c9ac: 02 80 00 0f be 200c9e8 <rtems_string_to_int+0x88>
200c9b0: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200c9b4: 40 00 0d 9f call 2010030 <__errno>
200c9b8: 01 00 00 00 nop
200c9bc: c2 02 00 00 ld [ %o0 ], %g1
200c9c0: 80 a0 60 22 cmp %g1, 0x22
200c9c4: 02 80 00 05 be 200c9d8 <rtems_string_to_int+0x78>
200c9c8: 03 20 00 00 sethi %hi(0x80000000), %g1
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200c9cc: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
200c9d0: 81 c7 e0 08 ret
200c9d4: 91 e8 20 00 restore %g0, 0, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200c9d8: 82 38 40 1b xnor %g1, %i3, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200c9dc: 80 a0 60 00 cmp %g1, 0
200c9e0: 12 80 00 04 bne 200c9f0 <rtems_string_to_int+0x90>
200c9e4: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200c9e8: 81 c7 e0 08 ret
200c9ec: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200c9f0: 80 a6 e0 00 cmp %i3, 0
200c9f4: 02 bf ff fd be 200c9e8 <rtems_string_to_int+0x88> <== NEVER TAKEN
200c9f8: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200c9fc: 80 a6 c0 01 cmp %i3, %g1
200ca00: 32 bf ff f4 bne,a 200c9d0 <rtems_string_to_int+0x70> <== NEVER TAKEN
200ca04: f6 26 40 00 st %i3, [ %i1 ] <== NOT EXECUTED
200ca08: 30 bf ff f8 b,a 200c9e8 <rtems_string_to_int+0x88>
0200cae4 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
200cae4: 9d e3 bf 98 save %sp, -104, %sp
200cae8: ba 10 00 18 mov %i0, %i5
long result;
char *end;
if ( !n )
200caec: 80 a6 60 00 cmp %i1, 0
200caf0: 02 80 00 1f be 200cb6c <rtems_string_to_long+0x88>
200caf4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200caf8: 40 00 0d 4e call 2010030 <__errno>
200cafc: 01 00 00 00 nop
200cb00: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtol( s, &end, base );
200cb04: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200cb08: c0 26 40 00 clr [ %i1 ]
result = strtol( s, &end, base );
200cb0c: 90 10 00 1d mov %i5, %o0
200cb10: 40 00 19 46 call 2013028 <strtol>
200cb14: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200cb18: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
200cb1c: 80 a6 a0 00 cmp %i2, 0
200cb20: 02 80 00 03 be 200cb2c <rtems_string_to_long+0x48>
200cb24: b6 10 00 08 mov %o0, %i3
*endptr = end;
200cb28: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200cb2c: 80 a7 40 01 cmp %i5, %g1
200cb30: 02 80 00 0f be 200cb6c <rtems_string_to_long+0x88>
200cb34: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cb38: 40 00 0d 3e call 2010030 <__errno>
200cb3c: 01 00 00 00 nop
200cb40: c2 02 00 00 ld [ %o0 ], %g1
200cb44: 80 a0 60 22 cmp %g1, 0x22
200cb48: 02 80 00 05 be 200cb5c <rtems_string_to_long+0x78>
200cb4c: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
200cb50: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
200cb54: 81 c7 e0 08 ret
200cb58: 91 e8 20 00 restore %g0, 0, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200cb5c: 82 38 40 1b xnor %g1, %i3, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cb60: 80 a0 60 00 cmp %g1, 0
200cb64: 12 80 00 04 bne 200cb74 <rtems_string_to_long+0x90>
200cb68: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
200cb6c: 81 c7 e0 08 ret
200cb70: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cb74: 80 a6 e0 00 cmp %i3, 0
200cb78: 02 bf ff fd be 200cb6c <rtems_string_to_long+0x88> <== NEVER TAKEN
200cb7c: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200cb80: 80 a6 c0 01 cmp %i3, %g1
200cb84: 32 bf ff f4 bne,a 200cb54 <rtems_string_to_long+0x70> <== NEVER TAKEN
200cb88: f6 26 40 00 st %i3, [ %i1 ] <== NOT EXECUTED
200cb8c: 30 bf ff f8 b,a 200cb6c <rtems_string_to_long+0x88>
0200ca0c <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
200ca0c: 9d e3 bf 98 save %sp, -104, %sp
long long result;
char *end;
if ( !n )
200ca10: 80 a6 60 00 cmp %i1, 0
200ca14: 02 80 00 1c be 200ca84 <rtems_string_to_long_long+0x78>
200ca18: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
errno = 0;
200ca1c: 40 00 0d 85 call 2010030 <__errno>
200ca20: 01 00 00 00 nop
200ca24: c0 22 00 00 clr [ %o0 ]
*n = 0;
200ca28: c0 26 40 00 clr [ %i1 ]
200ca2c: c0 26 60 04 clr [ %i1 + 4 ]
result = strtoll( s, &end, base );
200ca30: 90 10 00 18 mov %i0, %o0
200ca34: 92 07 bf fc add %fp, -4, %o1
200ca38: 40 00 19 85 call 201304c <strtoll>
200ca3c: 94 10 00 1b mov %i3, %o2
if ( endptr )
*endptr = end;
200ca40: c4 07 bf fc ld [ %fp + -4 ], %g2
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
200ca44: b8 10 00 08 mov %o0, %i4
if ( endptr )
200ca48: 80 a6 a0 00 cmp %i2, 0
200ca4c: 02 80 00 03 be 200ca58 <rtems_string_to_long_long+0x4c>
200ca50: ba 10 00 09 mov %o1, %i5
*endptr = end;
200ca54: c4 26 80 00 st %g2, [ %i2 ]
if ( end == s )
200ca58: 80 a6 00 02 cmp %i0, %g2
200ca5c: 02 80 00 0a be 200ca84 <rtems_string_to_long_long+0x78>
200ca60: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200ca64: 40 00 0d 73 call 2010030 <__errno>
200ca68: 01 00 00 00 nop
200ca6c: c2 02 00 00 ld [ %o0 ], %g1
200ca70: 80 a0 60 22 cmp %g1, 0x22
200ca74: 02 80 00 06 be 200ca8c <rtems_string_to_long_long+0x80>
200ca78: 05 1f ff ff sethi %hi(0x7ffffc00), %g2
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
200ca7c: f8 3e 40 00 std %i4, [ %i1 ]
return RTEMS_SUCCESSFUL;
200ca80: 82 10 20 00 clr %g1
}
200ca84: 81 c7 e0 08 ret
200ca88: 91 e8 00 01 restore %g0, %g1, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
200ca8c: 07 3f ff ff sethi %hi(0xfffffc00), %g3
200ca90: 84 10 a3 ff or %g2, 0x3ff, %g2
200ca94: 86 10 e3 ff or %g3, 0x3ff, %g3
200ca98: 84 1f 00 02 xor %i4, %g2, %g2
200ca9c: 86 1f 40 03 xor %i5, %g3, %g3
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200caa0: 80 90 80 03 orcc %g2, %g3, %g0
200caa4: 12 80 00 04 bne 200cab4 <rtems_string_to_long_long+0xa8>
200caa8: 80 97 00 1d orcc %i4, %i5, %g0
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
200caac: 10 bf ff f6 b 200ca84 <rtems_string_to_long_long+0x78>
200cab0: 82 10 20 0a mov 0xa, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cab4: 02 bf ff f4 be 200ca84 <rtems_string_to_long_long+0x78> <== NEVER TAKEN
200cab8: 82 10 20 0a mov 0xa, %g1
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
200cabc: 03 20 00 00 sethi %hi(0x80000000), %g1
200cac0: 80 a7 00 01 cmp %i4, %g1
200cac4: 32 bf ff ef bne,a 200ca80 <rtems_string_to_long_long+0x74><== NEVER TAKEN
200cac8: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
200cacc: 80 a7 60 00 cmp %i5, 0
200cad0: 22 bf ff ed be,a 200ca84 <rtems_string_to_long_long+0x78><== ALWAYS TAKEN
200cad4: 82 10 20 0a mov 0xa, %g1
return RTEMS_INVALID_NUMBER;
*n = result;
200cad8: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
200cadc: 10 bf ff ea b 200ca84 <rtems_string_to_long_long+0x78> <== NOT EXECUTED
200cae0: 82 10 20 00 clr %g1 <== NOT EXECUTED
0200cba0 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
200cba0: 9d e3 bf 98 save %sp, -104, %sp
200cba4: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200cba8: 80 a6 60 00 cmp %i1, 0
200cbac: 02 80 00 22 be 200cc34 <rtems_string_to_unsigned_char+0x94>
200cbb0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cbb4: 40 00 0d 1f call 2010030 <__errno>
200cbb8: 01 00 00 00 nop
200cbbc: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200cbc0: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200cbc4: c0 2e 40 00 clrb [ %i1 ]
result = strtoul( s, &end, base );
200cbc8: 90 10 00 1d mov %i5, %o0
200cbcc: 40 00 1a 70 call 201358c <strtoul>
200cbd0: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200cbd4: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200cbd8: 80 a6 a0 00 cmp %i2, 0
200cbdc: 02 80 00 03 be 200cbe8 <rtems_string_to_unsigned_char+0x48>
200cbe0: b6 10 00 08 mov %o0, %i3
*endptr = end;
200cbe4: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200cbe8: 80 a7 40 01 cmp %i5, %g1
200cbec: 02 80 00 12 be 200cc34 <rtems_string_to_unsigned_char+0x94>
200cbf0: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cbf4: 40 00 0d 0f call 2010030 <__errno>
200cbf8: 01 00 00 00 nop
200cbfc: c2 02 00 00 ld [ %o0 ], %g1
200cc00: 80 a0 60 22 cmp %g1, 0x22
200cc04: 02 80 00 0e be 200cc3c <rtems_string_to_unsigned_char+0x9c>
200cc08: 82 06 ff ff add %i3, -1, %g1
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
200cc0c: 80 a6 e0 ff cmp %i3, 0xff
200cc10: 18 80 00 05 bgu 200cc24 <rtems_string_to_unsigned_char+0x84>
200cc14: 01 00 00 00 nop
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200cc18: f6 2e 40 00 stb %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200cc1c: 81 c7 e0 08 ret
200cc20: 91 e8 20 00 restore %g0, 0, %o0
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
200cc24: 40 00 0d 03 call 2010030 <__errno>
200cc28: b0 10 20 0a mov 0xa, %i0
200cc2c: 82 10 20 22 mov 0x22, %g1
200cc30: c2 22 00 00 st %g1, [ %o0 ]
return RTEMS_INVALID_NUMBER;
200cc34: 81 c7 e0 08 ret
200cc38: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cc3c: 80 a0 7f fd cmp %g1, -3
200cc40: 08 bf ff f3 bleu 200cc0c <rtems_string_to_unsigned_char+0x6c><== NEVER TAKEN
200cc44: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200cc48: 81 c7 e0 08 ret
200cc4c: 81 e8 00 00 restore
0200cc50 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
200cc50: 9d e3 bf 98 save %sp, -104, %sp
200cc54: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200cc58: 80 a6 60 00 cmp %i1, 0
200cc5c: 02 80 00 1e be 200ccd4 <rtems_string_to_unsigned_int+0x84>
200cc60: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cc64: 40 00 0c f3 call 2010030 <__errno>
200cc68: 01 00 00 00 nop
200cc6c: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200cc70: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200cc74: c0 26 40 00 clr [ %i1 ]
result = strtoul( s, &end, base );
200cc78: 90 10 00 1d mov %i5, %o0
200cc7c: 40 00 1a 44 call 201358c <strtoul>
200cc80: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200cc84: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200cc88: 80 a6 a0 00 cmp %i2, 0
200cc8c: 02 80 00 03 be 200cc98 <rtems_string_to_unsigned_int+0x48>
200cc90: b6 10 00 08 mov %o0, %i3
*endptr = end;
200cc94: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200cc98: 80 a7 40 01 cmp %i5, %g1
200cc9c: 02 80 00 0e be 200ccd4 <rtems_string_to_unsigned_int+0x84>
200cca0: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cca4: 40 00 0c e3 call 2010030 <__errno>
200cca8: 01 00 00 00 nop
200ccac: c2 02 00 00 ld [ %o0 ], %g1
200ccb0: 80 a0 60 22 cmp %g1, 0x22
200ccb4: 02 80 00 05 be 200ccc8 <rtems_string_to_unsigned_int+0x78>
200ccb8: 82 06 ff ff add %i3, -1, %g1
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200ccbc: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200ccc0: 81 c7 e0 08 ret
200ccc4: 91 e8 20 00 restore %g0, 0, %o0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200ccc8: 80 a0 7f fd cmp %g1, -3
200cccc: 08 bf ff fc bleu 200ccbc <rtems_string_to_unsigned_int+0x6c><== NEVER TAKEN
200ccd0: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200ccd4: 81 c7 e0 08 ret
200ccd8: 81 e8 00 00 restore
0200cd7c <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
200cd7c: 9d e3 bf 98 save %sp, -104, %sp
200cd80: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200cd84: 80 a6 60 00 cmp %i1, 0
200cd88: 02 80 00 1e be 200ce00 <rtems_string_to_unsigned_long+0x84>
200cd8c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cd90: 40 00 0c a8 call 2010030 <__errno>
200cd94: 01 00 00 00 nop
200cd98: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200cd9c: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200cda0: c0 26 40 00 clr [ %i1 ]
result = strtoul( s, &end, base );
200cda4: 90 10 00 1d mov %i5, %o0
200cda8: 40 00 19 f9 call 201358c <strtoul>
200cdac: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200cdb0: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200cdb4: 80 a6 a0 00 cmp %i2, 0
200cdb8: 02 80 00 03 be 200cdc4 <rtems_string_to_unsigned_long+0x48>
200cdbc: b6 10 00 08 mov %o0, %i3
*endptr = end;
200cdc0: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200cdc4: 80 a7 40 01 cmp %i5, %g1
200cdc8: 02 80 00 0e be 200ce00 <rtems_string_to_unsigned_long+0x84>
200cdcc: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cdd0: 40 00 0c 98 call 2010030 <__errno>
200cdd4: 01 00 00 00 nop
200cdd8: c2 02 00 00 ld [ %o0 ], %g1
200cddc: 80 a0 60 22 cmp %g1, 0x22
200cde0: 02 80 00 05 be 200cdf4 <rtems_string_to_unsigned_long+0x78>
200cde4: 82 06 ff ff add %i3, -1, %g1
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200cde8: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200cdec: 81 c7 e0 08 ret
200cdf0: 91 e8 20 00 restore %g0, 0, %o0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cdf4: 80 a0 7f fd cmp %g1, -3
200cdf8: 08 bf ff fc bleu 200cde8 <rtems_string_to_unsigned_long+0x6c><== NEVER TAKEN
200cdfc: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
200ce00: 81 c7 e0 08 ret
200ce04: 81 e8 00 00 restore
0200ccdc <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
200ccdc: 9d e3 bf 98 save %sp, -104, %sp
unsigned long long result;
char *end;
if ( !n )
200cce0: 80 a6 60 00 cmp %i1, 0
200cce4: 02 80 00 1c be 200cd54 <rtems_string_to_unsigned_long_long+0x78>
200cce8: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
errno = 0;
200ccec: 40 00 0c d1 call 2010030 <__errno>
200ccf0: 01 00 00 00 nop
200ccf4: c0 22 00 00 clr [ %o0 ]
*n = 0;
200ccf8: c0 26 40 00 clr [ %i1 ]
200ccfc: c0 26 60 04 clr [ %i1 + 4 ]
result = strtoull( s, &end, base );
200cd00: 90 10 00 18 mov %i0, %o0
200cd04: 92 07 bf fc add %fp, -4, %o1
200cd08: 40 00 1a 2a call 20135b0 <strtoull>
200cd0c: 94 10 00 1b mov %i3, %o2
if ( endptr )
*endptr = end;
200cd10: c4 07 bf fc ld [ %fp + -4 ], %g2
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
200cd14: b8 10 00 08 mov %o0, %i4
if ( endptr )
200cd18: 80 a6 a0 00 cmp %i2, 0
200cd1c: 02 80 00 03 be 200cd28 <rtems_string_to_unsigned_long_long+0x4c>
200cd20: ba 10 00 09 mov %o1, %i5
*endptr = end;
200cd24: c4 26 80 00 st %g2, [ %i2 ]
if ( end == s )
200cd28: 80 a6 00 02 cmp %i0, %g2
200cd2c: 02 80 00 0a be 200cd54 <rtems_string_to_unsigned_long_long+0x78>
200cd30: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cd34: 40 00 0c bf call 2010030 <__errno>
200cd38: 01 00 00 00 nop
200cd3c: c2 02 00 00 ld [ %o0 ], %g1
200cd40: 80 a0 60 22 cmp %g1, 0x22
200cd44: 02 80 00 06 be 200cd5c <rtems_string_to_unsigned_long_long+0x80>
200cd48: 86 87 7f ff addcc %i5, -1, %g3
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200cd4c: f8 3e 40 00 std %i4, [ %i1 ]
return RTEMS_SUCCESSFUL;
200cd50: 82 10 20 00 clr %g1
}
200cd54: 81 c7 e0 08 ret
200cd58: 91 e8 00 01 restore %g0, %g1, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
200cd5c: 84 47 3f ff addx %i4, -1, %g2
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200cd60: 80 a0 bf ff cmp %g2, -1
200cd64: 12 bf ff fa bne 200cd4c <rtems_string_to_unsigned_long_long+0x70><== NEVER TAKEN
200cd68: 80 a0 ff fd cmp %g3, -3
200cd6c: 18 bf ff fa bgu 200cd54 <rtems_string_to_unsigned_long_long+0x78><== ALWAYS TAKEN
200cd70: 82 10 20 0a mov 0xa, %g1
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200cd74: 10 bf ff f7 b 200cd50 <rtems_string_to_unsigned_long_long+0x74><== NOT EXECUTED
200cd78: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
02002690 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
2002690: 9d e3 be 10 save %sp, -496, %sp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
2002694: 40 00 47 e0 call 2014614 <strlen>
2002698: 90 10 00 18 mov %i0, %o0
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
200269c: ba 10 00 18 mov %i0, %i5
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
20026a0: 92 10 00 08 mov %o0, %o1
20026a4: 94 10 20 00 clr %o2
20026a8: 90 10 00 18 mov %i0, %o0
20026ac: 96 07 bf d4 add %fp, -44, %o3
20026b0: 40 00 02 ea call 2003258 <rtems_filesystem_evaluate_path>
20026b4: 98 10 20 00 clr %o4
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
20026b8: b0 92 20 00 orcc %o0, 0, %i0
20026bc: 12 80 00 75 bne 2002890 <rtems_tarfs_load+0x200>
20026c0: c2 07 bf e0 ld [ %fp + -32 ], %g1
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
20026c4: 05 00 80 80 sethi %hi(0x2020000), %g2
20026c8: 84 10 a1 d8 or %g2, 0x1d8, %g2 ! 20201d8 <IMFS_ops>
20026cc: 80 a0 40 02 cmp %g1, %g2
20026d0: 02 80 00 06 be 20026e8 <rtems_tarfs_load+0x58>
20026d4: 05 00 80 82 sethi %hi(0x2020800), %g2
20026d8: 84 10 a2 94 or %g2, 0x294, %g2 ! 2020a94 <fifoIMFS_ops>
20026dc: 80 a0 40 02 cmp %g1, %g2
20026e0: 12 80 00 6a bne 2002888 <rtems_tarfs_load+0x1f8> <== ALWAYS TAKEN
20026e4: 01 00 00 00 nop
20026e8: a6 10 20 00 clr %l3 ! 0 <PROM_START>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
20026ec: 21 00 80 80 sethi %hi(0x2020000), %l0
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
20026f0: b8 04 e2 00 add %l3, 0x200, %i4
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
20026f4: a0 14 22 20 or %l0, 0x220, %l0
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
20026f8: 25 00 00 20 sethi %hi(0x8000), %l2
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
20026fc: 80 a7 00 1a cmp %i4, %i2
2002700: 18 80 00 29 bgu 20027a4 <rtems_tarfs_load+0x114> <== NEVER TAKEN
2002704: a2 10 20 2f mov 0x2f, %l1
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
2002708: a6 06 40 13 add %i1, %l3, %l3
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
200270c: 92 10 00 10 mov %l0, %o1
2002710: 90 04 e1 01 add %l3, 0x101, %o0
2002714: 40 00 47 f1 call 20146d8 <strncmp>
2002718: 94 10 20 05 mov 5, %o2
200271c: 80 a2 20 00 cmp %o0, 0
2002720: 12 80 00 21 bne 20027a4 <rtems_tarfs_load+0x114>
2002724: 94 10 20 63 mov 0x63, %o2
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
2002728: 92 10 00 13 mov %l3, %o1
200272c: 40 00 48 40 call 201482c <strncpy>
2002730: 90 07 bf 70 add %fp, -144, %o0
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
2002734: 92 10 20 08 mov 8, %o1
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
2002738: c0 2f bf d3 clrb [ %fp + -45 ]
linkflag = hdr_ptr[156];
200273c: ea 0c e0 9c ldub [ %l3 + 0x9c ], %l5
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
2002740: 40 00 21 d3 call 200ae8c <_rtems_octal2ulong>
2002744: 90 04 e0 64 add %l3, 0x64, %o0
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
2002748: 92 10 20 0c mov 0xc, %o1
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
200274c: a8 10 00 08 mov %o0, %l4
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
2002750: 40 00 21 cf call 200ae8c <_rtems_octal2ulong>
2002754: 90 04 e0 7c add %l3, 0x7c, %o0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
2002758: 92 10 20 08 mov 8, %o1
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
200275c: b6 10 00 08 mov %o0, %i3
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
2002760: 40 00 21 cb call 200ae8c <_rtems_octal2ulong>
2002764: 90 04 e0 94 add %l3, 0x94, %o0
2002768: ac 10 00 08 mov %o0, %l6
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
200276c: 40 00 23 1a call 200b3d4 <_rtems_tar_header_checksum>
2002770: 90 10 00 13 mov %l3, %o0
2002774: 80 a2 00 16 cmp %o0, %l6
2002778: 12 80 00 0b bne 20027a4 <rtems_tarfs_load+0x114> <== NEVER TAKEN
200277c: aa 0d 60 ff and %l5, 0xff, %l5
* 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) {
2002780: 80 a5 60 35 cmp %l5, 0x35
2002784: 02 80 00 20 be 2002804 <rtems_tarfs_load+0x174>
2002788: 80 a5 60 30 cmp %l5, 0x30
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
200278c: 02 80 00 08 be 20027ac <rtems_tarfs_load+0x11c>
2002790: a6 10 00 1c mov %i4, %l3
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
2002794: b8 04 e2 00 add %l3, 0x200, %i4
2002798: 80 a7 00 1a cmp %i4, %i2
200279c: 08 bf ff dc bleu 200270c <rtems_tarfs_load+0x7c> <== ALWAYS TAKEN
20027a0: a6 06 40 13 add %i1, %l3, %l3
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
20027a4: 81 c7 e0 08 ret
20027a8: 81 e8 00 00 restore
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
20027ac: c2 07 bf d4 ld [ %fp + -44 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
20027b0: 90 07 bf 70 add %fp, -144, %o0
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
20027b4: c2 27 bf e8 st %g1, [ %fp + -24 ]
20027b8: c2 07 bf d8 ld [ %fp + -40 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
20027bc: 92 07 bf e8 add %fp, -24, %o1
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
20027c0: c2 27 bf ec st %g1, [ %fp + -20 ]
20027c4: c2 07 bf dc ld [ %fp + -36 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
20027c8: 94 07 bf fc add %fp, -4, %o2
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
20027cc: c2 27 bf f0 st %g1, [ %fp + -16 ]
20027d0: c2 07 bf e0 ld [ %fp + -32 ], %g1
20027d4: c2 27 bf f4 st %g1, [ %fp + -12 ]
20027d8: c2 07 bf e4 ld [ %fp + -28 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
20027dc: 40 00 25 ab call 200be88 <IMFS_evaluate_for_make>
20027e0: c2 27 bf f8 st %g1, [ %fp + -8 ]
20027e4: 80 a2 20 00 cmp %o0, 0
20027e8: 02 80 00 1d be 200285c <rtems_tarfs_load+0x1cc> <== ALWAYS TAKEN
20027ec: d4 07 bf fc ld [ %fp + -4 ], %o2
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
20027f0: b6 06 e1 ff add %i3, 0x1ff, %i3
offset += 512 * nblocks;
20027f4: b6 0e fe 00 and %i3, -512, %i3
20027f8: b8 06 c0 1c add %i3, %i4, %i4
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
20027fc: 10 bf ff e6 b 2002794 <rtems_tarfs_load+0x104>
2002800: a6 10 00 1c mov %i4, %l3
* - 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);
2002804: 92 10 00 1d mov %i5, %o1
2002808: 40 00 45 bf call 2013f04 <strcpy>
200280c: 90 07 be 70 add %fp, -400, %o0
if (full_filename[strlen(full_filename)-1] != '/')
2002810: 40 00 47 81 call 2014614 <strlen>
2002814: 90 07 be 70 add %fp, -400, %o0
2002818: 82 07 80 08 add %fp, %o0, %g1
200281c: c2 48 7e 6f ldsb [ %g1 + -401 ], %g1
2002820: 80 a0 60 2f cmp %g1, 0x2f
2002824: 02 80 00 05 be 2002838 <rtems_tarfs_load+0x1a8> <== ALWAYS TAKEN
2002828: 82 07 be 70 add %fp, -400, %g1
strcat(full_filename, "/");
200282c: e2 28 40 08 stb %l1, [ %g1 + %o0 ] <== NOT EXECUTED
2002830: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
2002834: c0 2a 20 01 clrb [ %o0 + 1 ] <== NOT EXECUTED
strcat(full_filename, filename);
2002838: 92 07 bf 70 add %fp, -144, %o1
200283c: 40 00 45 5e call 2013db4 <strcat>
2002840: 90 07 be 70 add %fp, -400, %o0
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
2002844: 90 07 be 70 add %fp, -400, %o0
2002848: 92 10 21 ff mov 0x1ff, %o1
200284c: 40 00 04 dd call 2003bc0 <mkdir>
2002850: a6 10 00 1c mov %i4, %l3
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
2002854: 10 bf ff d1 b 2002798 <rtems_tarfs_load+0x108>
2002858: b8 04 e2 00 add %l3, 0x200, %i4
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
200285c: 96 0d 21 ff and %l4, 0x1ff, %o3
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
2002860: 90 07 bf e8 add %fp, -24, %o0
2002864: 92 10 20 06 mov 6, %o1
2002868: 96 12 c0 12 or %o3, %l2, %o3
200286c: 40 00 23 5f call 200b5e8 <IMFS_create_node>
2002870: 98 10 20 00 clr %o4
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
2002874: 82 06 40 1c add %i1, %i4, %g1
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
2002878: c0 22 20 50 clr [ %o0 + 0x50 ]
200287c: f6 22 20 54 st %i3, [ %o0 + 0x54 ]
node->info.linearfile.direct = &tar_image[offset];
2002880: 10 bf ff dc b 20027f0 <rtems_tarfs_load+0x160>
2002884: c2 22 20 58 st %g1, [ %o0 + 0x58 ]
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
2002888: 81 c7 e0 08 ret
200288c: 91 e8 3f ff restore %g0, -1, %o0
0,
&root_loc,
0
);
if (status != 0)
return -1;
2002890: 81 c7 e0 08 ret
2002894: 91 e8 3f ff restore %g0, -1, %o0
0200f4a0 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200f4a0: 9d e3 bf a0 save %sp, -96, %sp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
200f4a4: 80 a6 a0 00 cmp %i2, 0
200f4a8: 02 80 00 3b be 200f594 <rtems_task_mode+0xf4>
200f4ac: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200f4b0: 21 00 80 78 sethi %hi(0x201e000), %l0
200f4b4: a0 14 20 40 or %l0, 0x40, %l0 ! 201e040 <_Per_CPU_Information>
200f4b8: fa 04 20 0c ld [ %l0 + 0xc ], %i5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f4bc: c4 0f 60 74 ldub [ %i5 + 0x74 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f4c0: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f4c4: 80 a0 00 02 cmp %g0, %g2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200f4c8: f8 07 61 58 ld [ %i5 + 0x158 ], %i4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f4cc: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f4d0: 80 a0 60 00 cmp %g1, 0
200f4d4: 12 80 00 40 bne 200f5d4 <rtems_task_mode+0x134>
200f4d8: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f4dc: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
200f4e0: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f4e4: 7f ff ed 11 call 200a928 <_CPU_ISR_Get_level>
200f4e8: a2 60 3f ff subx %g0, -1, %l1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f4ec: a3 2c 60 0a sll %l1, 0xa, %l1
200f4f0: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
200f4f4: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f4f8: 80 8e 61 00 btst 0x100, %i1
200f4fc: 02 80 00 06 be 200f514 <rtems_task_mode+0x74>
200f500: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f504: 82 0e 21 00 and %i0, 0x100, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
200f508: 80 a0 00 01 cmp %g0, %g1
200f50c: 82 60 3f ff subx %g0, -1, %g1
200f510: c2 2f 60 74 stb %g1, [ %i5 + 0x74 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200f514: 80 8e 62 00 btst 0x200, %i1
200f518: 12 80 00 21 bne 200f59c <rtems_task_mode+0xfc>
200f51c: 80 8e 22 00 btst 0x200, %i0
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f520: 80 8e 60 0f btst 0xf, %i1
200f524: 12 80 00 27 bne 200f5c0 <rtems_task_mode+0x120>
200f528: 01 00 00 00 nop
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f52c: 80 8e 64 00 btst 0x400, %i1
200f530: 02 80 00 14 be 200f580 <rtems_task_mode+0xe0>
200f534: 86 10 20 00 clr %g3
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f538: c4 0f 20 08 ldub [ %i4 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
200f53c: b0 0e 24 00 and %i0, 0x400, %i0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
200f540: 80 a0 00 18 cmp %g0, %i0
200f544: 82 60 3f ff subx %g0, -1, %g1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f548: 80 a0 80 01 cmp %g2, %g1
200f54c: 22 80 00 0e be,a 200f584 <rtems_task_mode+0xe4>
200f550: 03 00 80 77 sethi %hi(0x201dc00), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200f554: 7f ff cb 24 call 20021e4 <sparc_disable_interrupts>
200f558: c2 2f 20 08 stb %g1, [ %i4 + 8 ]
_signals = information->signals_pending;
200f55c: c4 07 20 18 ld [ %i4 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
200f560: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
information->signals_posted = _signals;
200f564: c4 27 20 14 st %g2, [ %i4 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200f568: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200f56c: 7f ff cb 22 call 20021f4 <sparc_enable_interrupts>
200f570: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200f574: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
200f578: 80 a0 00 01 cmp %g0, %g1
200f57c: 86 40 20 00 addx %g0, 0, %g3
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
200f580: 03 00 80 77 sethi %hi(0x201dc00), %g1
200f584: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 ! 201dc54 <_System_state_Current>
200f588: 80 a0 a0 03 cmp %g2, 3
200f58c: 02 80 00 1f be 200f608 <rtems_task_mode+0x168>
200f590: 82 10 20 00 clr %g1
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
200f594: 81 c7 e0 08 ret
200f598: 91 e8 00 01 restore %g0, %g1, %o0
*/
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
200f59c: 22 bf ff e1 be,a 200f520 <rtems_task_mode+0x80>
200f5a0: c0 27 60 7c clr [ %i5 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f5a4: 03 00 80 76 sethi %hi(0x201d800), %g1
200f5a8: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 201da64 <_Thread_Ticks_per_timeslice>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f5ac: 80 8e 60 0f btst 0xf, %i1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f5b0: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
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;
200f5b4: 82 10 20 01 mov 1, %g1
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f5b8: 02 bf ff dd be 200f52c <rtems_task_mode+0x8c>
200f5bc: c2 27 60 7c st %g1, [ %i5 + 0x7c ]
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
200f5c0: 90 0e 20 0f and %i0, 0xf, %o0
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200f5c4: 7f ff cb 0c call 20021f4 <sparc_enable_interrupts>
200f5c8: 91 2a 20 08 sll %o0, 8, %o0
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f5cc: 10 bf ff d9 b 200f530 <rtems_task_mode+0x90>
200f5d0: 80 8e 64 00 btst 0x400, %i1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f5d4: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
200f5d8: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f5dc: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f5e0: 7f ff ec d2 call 200a928 <_CPU_ISR_Get_level>
200f5e4: a2 60 3f ff subx %g0, -1, %l1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f5e8: a3 2c 60 0a sll %l1, 0xa, %l1
200f5ec: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
200f5f0: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f5f4: 80 8e 61 00 btst 0x100, %i1
200f5f8: 02 bf ff c7 be 200f514 <rtems_task_mode+0x74>
200f5fc: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f600: 10 bf ff c2 b 200f508 <rtems_task_mode+0x68>
200f604: 82 0e 21 00 and %i0, 0x100, %g1
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
200f608: 80 88 e0 ff btst 0xff, %g3
200f60c: 12 80 00 0a bne 200f634 <rtems_task_mode+0x194>
200f610: c4 04 20 0c ld [ %l0 + 0xc ], %g2
200f614: c6 04 20 10 ld [ %l0 + 0x10 ], %g3
200f618: 80 a0 80 03 cmp %g2, %g3
200f61c: 02 bf ff de be 200f594 <rtems_task_mode+0xf4>
200f620: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
200f624: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2
200f628: 80 a0 a0 00 cmp %g2, 0
200f62c: 02 bf ff da be 200f594 <rtems_task_mode+0xf4> <== NEVER TAKEN
200f630: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
200f634: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
200f638: c2 2c 20 18 stb %g1, [ %l0 + 0x18 ]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
200f63c: 7f ff e7 0e call 2009274 <_Thread_Dispatch>
200f640: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
200f644: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
200f648: 81 c7 e0 08 ret
200f64c: 91 e8 00 01 restore %g0, %g1, %o0
0200b1f4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200b1f4: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200b1f8: 80 a6 60 00 cmp %i1, 0
200b1fc: 02 80 00 07 be 200b218 <rtems_task_set_priority+0x24>
200b200: 90 10 00 18 mov %i0, %o0
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
200b204: 03 00 80 6a sethi %hi(0x201a800), %g1
200b208: c2 08 61 bc ldub [ %g1 + 0x1bc ], %g1 ! 201a9bc <rtems_maximum_priority>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
200b20c: 80 a6 40 01 cmp %i1, %g1
200b210: 18 80 00 1c bgu 200b280 <rtems_task_set_priority+0x8c>
200b214: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200b218: 80 a6 a0 00 cmp %i2, 0
200b21c: 02 80 00 19 be 200b280 <rtems_task_set_priority+0x8c>
200b220: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200b224: 40 00 0a 1f call 200daa0 <_Thread_Get>
200b228: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200b22c: c2 07 bf fc ld [ %fp + -4 ], %g1
200b230: 80 a0 60 00 cmp %g1, 0
200b234: 12 80 00 13 bne 200b280 <rtems_task_set_priority+0x8c>
200b238: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200b23c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200b240: 80 a6 60 00 cmp %i1, 0
200b244: 02 80 00 0d be 200b278 <rtems_task_set_priority+0x84>
200b248: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200b24c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200b250: 80 a0 60 00 cmp %g1, 0
200b254: 02 80 00 06 be 200b26c <rtems_task_set_priority+0x78>
200b258: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
200b25c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200b260: 80 a6 40 01 cmp %i1, %g1
200b264: 1a 80 00 05 bcc 200b278 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
200b268: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
200b26c: 92 10 00 19 mov %i1, %o1
200b270: 40 00 08 bf call 200d56c <_Thread_Change_priority>
200b274: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200b278: 40 00 09 fd call 200da6c <_Thread_Enable_dispatch>
200b27c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
200b280: 81 c7 e0 08 ret
200b284: 81 e8 00 00 restore
02007644 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
2007644: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
2007648: 80 a6 60 00 cmp %i1, 0
200764c: 02 80 00 1e be 20076c4 <rtems_task_variable_delete+0x80>
2007650: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
2007654: 90 10 00 18 mov %i0, %o0
2007658: 40 00 09 a2 call 2009ce0 <_Thread_Get>
200765c: 92 07 bf fc add %fp, -4, %o1
switch (location) {
2007660: c2 07 bf fc ld [ %fp + -4 ], %g1
2007664: 80 a0 60 00 cmp %g1, 0
2007668: 12 80 00 19 bne 20076cc <rtems_task_variable_delete+0x88>
200766c: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
2007670: c2 02 21 64 ld [ %o0 + 0x164 ], %g1
while (tvp) {
2007674: 80 a0 60 00 cmp %g1, 0
2007678: 02 80 00 10 be 20076b8 <rtems_task_variable_delete+0x74>
200767c: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2007680: c4 00 60 04 ld [ %g1 + 4 ], %g2
2007684: 80 a0 80 19 cmp %g2, %i1
2007688: 32 80 00 09 bne,a 20076ac <rtems_task_variable_delete+0x68>
200768c: d2 00 40 00 ld [ %g1 ], %o1
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2007690: 10 80 00 18 b 20076f0 <rtems_task_variable_delete+0xac>
2007694: c4 00 40 00 ld [ %g1 ], %g2
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
2007698: 80 a0 80 19 cmp %g2, %i1
200769c: 22 80 00 0e be,a 20076d4 <rtems_task_variable_delete+0x90>
20076a0: c4 02 40 00 ld [ %o1 ], %g2
20076a4: 82 10 00 09 mov %o1, %g1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
20076a8: d2 00 40 00 ld [ %g1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
20076ac: 80 a2 60 00 cmp %o1, 0
20076b0: 32 bf ff fa bne,a 2007698 <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
20076b4: c4 02 60 04 ld [ %o1 + 4 ], %g2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
20076b8: 40 00 09 7d call 2009cac <_Thread_Enable_dispatch>
20076bc: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
20076c0: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20076c4: 81 c7 e0 08 ret
20076c8: 91 e8 00 01 restore %g0, %g1, %o0
20076cc: 81 c7 e0 08 ret
20076d0: 91 e8 00 01 restore %g0, %g1, %o0
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
20076d4: c4 20 40 00 st %g2, [ %g1 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
20076d8: 40 00 00 2d call 200778c <_RTEMS_Tasks_Invoke_task_variable_dtor>
20076dc: 01 00 00 00 nop
_Thread_Enable_dispatch();
20076e0: 40 00 09 73 call 2009cac <_Thread_Enable_dispatch>
20076e4: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20076e8: 10 bf ff f7 b 20076c4 <rtems_task_variable_delete+0x80>
20076ec: 82 10 20 00 clr %g1 ! 0 <PROM_START>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
20076f0: 92 10 00 01 mov %g1, %o1
20076f4: 10 bf ff f9 b 20076d8 <rtems_task_variable_delete+0x94>
20076f8: c4 22 21 64 st %g2, [ %o0 + 0x164 ]
020076fc <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
20076fc: 9d e3 bf 98 save %sp, -104, %sp
2007700: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
2007704: 80 a6 60 00 cmp %i1, 0
2007708: 02 80 00 1b be 2007774 <rtems_task_variable_get+0x78>
200770c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !result )
2007710: 80 a6 a0 00 cmp %i2, 0
2007714: 02 80 00 1c be 2007784 <rtems_task_variable_get+0x88>
2007718: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
200771c: 40 00 09 71 call 2009ce0 <_Thread_Get>
2007720: 92 07 bf fc add %fp, -4, %o1
switch (location) {
2007724: c2 07 bf fc ld [ %fp + -4 ], %g1
2007728: 80 a0 60 00 cmp %g1, 0
200772c: 12 80 00 12 bne 2007774 <rtems_task_variable_get+0x78>
2007730: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
2007734: c2 02 21 64 ld [ %o0 + 0x164 ], %g1
while (tvp) {
2007738: 80 a0 60 00 cmp %g1, 0
200773c: 32 80 00 07 bne,a 2007758 <rtems_task_variable_get+0x5c>
2007740: c4 00 60 04 ld [ %g1 + 4 ], %g2
2007744: 30 80 00 0e b,a 200777c <rtems_task_variable_get+0x80>
2007748: 80 a0 60 00 cmp %g1, 0
200774c: 02 80 00 0c be 200777c <rtems_task_variable_get+0x80> <== NEVER TAKEN
2007750: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2007754: c4 00 60 04 ld [ %g1 + 4 ], %g2
2007758: 80 a0 80 19 cmp %g2, %i1
200775c: 32 bf ff fb bne,a 2007748 <rtems_task_variable_get+0x4c>
2007760: c2 00 40 00 ld [ %g1 ], %g1
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
2007764: c2 00 60 0c ld [ %g1 + 0xc ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
2007768: b0 10 20 00 clr %i0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
200776c: 40 00 09 50 call 2009cac <_Thread_Enable_dispatch>
2007770: c2 26 80 00 st %g1, [ %i2 ]
return RTEMS_SUCCESSFUL;
2007774: 81 c7 e0 08 ret
2007778: 81 e8 00 00 restore
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
200777c: 40 00 09 4c call 2009cac <_Thread_Enable_dispatch>
2007780: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
2007784: 81 c7 e0 08 ret
2007788: 81 e8 00 00 restore
02005840 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
2005840: 82 10 00 08 mov %o0, %g1
int baud_index;
switch (termios_baud) {
2005844: 80 a0 60 09 cmp %g1, 9
2005848: 02 80 00 2d be 20058fc <rtems_termios_baud_to_index+0xbc>
200584c: 90 10 20 09 mov 9, %o0
2005850: 80 a0 60 09 cmp %g1, 9
2005854: 04 80 00 1a ble 20058bc <rtems_termios_baud_to_index+0x7c>
2005858: 80 a0 60 04 cmp %g1, 4
200585c: 80 a0 60 0e cmp %g1, 0xe
2005860: 02 80 00 27 be 20058fc <rtems_termios_baud_to_index+0xbc>
2005864: 90 10 20 0e mov 0xe, %o0
2005868: 80 a0 60 0e cmp %g1, 0xe
200586c: 04 80 00 26 ble 2005904 <rtems_termios_baud_to_index+0xc4>
2005870: 80 a0 60 0b cmp %g1, 0xb
2005874: 05 00 00 04 sethi %hi(0x1000), %g2
2005878: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <PROM_START+0x1002>
200587c: 80 a0 40 03 cmp %g1, %g3
2005880: 02 80 00 1f be 20058fc <rtems_termios_baud_to_index+0xbc>
2005884: 90 10 20 11 mov 0x11, %o0
2005888: 80 a0 40 03 cmp %g1, %g3
200588c: 04 80 00 38 ble 200596c <rtems_termios_baud_to_index+0x12c>
2005890: 80 a0 60 0f cmp %g1, 0xf
2005894: 86 10 a0 03 or %g2, 3, %g3
2005898: 80 a0 40 03 cmp %g1, %g3
200589c: 02 80 00 18 be 20058fc <rtems_termios_baud_to_index+0xbc>
20058a0: 90 10 20 12 mov 0x12, %o0
20058a4: 84 10 a0 04 or %g2, 4, %g2
20058a8: 80 a0 40 02 cmp %g1, %g2
20058ac: 02 80 00 14 be 20058fc <rtems_termios_baud_to_index+0xbc> <== ALWAYS TAKEN
20058b0: 90 10 20 13 mov 0x13, %o0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
20058b4: 81 c3 e0 08 retl
20058b8: 90 10 3f ff mov -1, %o0
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
20058bc: 02 80 00 10 be 20058fc <rtems_termios_baud_to_index+0xbc>
20058c0: 90 10 20 04 mov 4, %o0
20058c4: 80 a0 60 04 cmp %g1, 4
20058c8: 14 80 00 1c bg 2005938 <rtems_termios_baud_to_index+0xf8>
20058cc: 80 a0 60 06 cmp %g1, 6
20058d0: 80 a0 60 01 cmp %g1, 1
20058d4: 02 80 00 0a be 20058fc <rtems_termios_baud_to_index+0xbc>
20058d8: 90 10 20 01 mov 1, %o0
20058dc: 80 a0 60 01 cmp %g1, 1
20058e0: 04 80 00 2b ble 200598c <rtems_termios_baud_to_index+0x14c>
20058e4: 80 a0 60 02 cmp %g1, 2
20058e8: 02 80 00 05 be 20058fc <rtems_termios_baud_to_index+0xbc>
20058ec: 90 10 20 02 mov 2, %o0
20058f0: 80 a0 60 03 cmp %g1, 3
20058f4: 12 bf ff f0 bne 20058b4 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
20058f8: 90 10 20 03 mov 3, %o0
20058fc: 81 c3 e0 08 retl
2005900: 01 00 00 00 nop
2005904: 02 bf ff fe be 20058fc <rtems_termios_baud_to_index+0xbc>
2005908: 90 10 20 0b mov 0xb, %o0 ! b <PROM_START+0xb>
200590c: 80 a0 60 0b cmp %g1, 0xb
2005910: 06 bf ff fb bl 20058fc <rtems_termios_baud_to_index+0xbc>
2005914: 90 10 20 0a mov 0xa, %o0
2005918: 80 a0 60 0c cmp %g1, 0xc
200591c: 02 bf ff f8 be 20058fc <rtems_termios_baud_to_index+0xbc>
2005920: 90 10 20 0c mov 0xc, %o0
2005924: 80 a0 60 0d cmp %g1, 0xd
2005928: 12 bf ff e3 bne 20058b4 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
200592c: 90 10 20 0d mov 0xd, %o0
2005930: 81 c3 e0 08 retl
2005934: 01 00 00 00 nop
2005938: 02 bf ff f1 be 20058fc <rtems_termios_baud_to_index+0xbc>
200593c: 90 10 20 06 mov 6, %o0 ! 6 <PROM_START+0x6>
2005940: 80 a0 60 06 cmp %g1, 6
2005944: 06 bf ff ee bl 20058fc <rtems_termios_baud_to_index+0xbc>
2005948: 90 10 20 05 mov 5, %o0
200594c: 80 a0 60 07 cmp %g1, 7
2005950: 02 bf ff eb be 20058fc <rtems_termios_baud_to_index+0xbc>
2005954: 90 10 20 07 mov 7, %o0
2005958: 80 a0 60 08 cmp %g1, 8
200595c: 12 bf ff d6 bne 20058b4 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
2005960: 90 10 20 08 mov 8, %o0
2005964: 81 c3 e0 08 retl
2005968: 01 00 00 00 nop
200596c: 02 bf ff e4 be 20058fc <rtems_termios_baud_to_index+0xbc>
2005970: 90 10 20 0f mov 0xf, %o0 ! f <PROM_START+0xf>
2005974: 84 10 a0 01 or %g2, 1, %g2
2005978: 80 a0 40 02 cmp %g1, %g2
200597c: 12 bf ff ce bne 20058b4 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
2005980: 90 10 20 10 mov 0x10, %o0
2005984: 81 c3 e0 08 retl
2005988: 01 00 00 00 nop
200598c: 80 a0 60 00 cmp %g1, 0
2005990: 12 bf ff c9 bne 20058b4 <rtems_termios_baud_to_index+0x74>
2005994: 90 10 20 00 clr %o0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
2005998: 81 c3 e0 08 retl
0200442c <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
200442c: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
2004430: 39 00 80 76 sethi %hi(0x201d800), %i4
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004434: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain(
2004438: d0 07 21 80 ld [ %i4 + 0x180 ], %o0
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
200443c: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
rtems_status_code sc;
sc = rtems_semaphore_obtain(
2004440: 92 10 20 00 clr %o1
2004444: 40 00 09 43 call 2006950 <rtems_semaphore_obtain>
2004448: 94 10 20 00 clr %o2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200444c: 80 a2 20 00 cmp %o0, 0
2004450: 12 80 00 6f bne 200460c <rtems_termios_close+0x1e0> <== NEVER TAKEN
2004454: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
2004458: c2 07 60 08 ld [ %i5 + 8 ], %g1
200445c: 82 00 7f ff add %g1, -1, %g1
2004460: 80 a0 60 00 cmp %g1, 0
2004464: 12 80 00 39 bne 2004548 <rtems_termios_close+0x11c>
2004468: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
200446c: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2004470: 03 00 80 75 sethi %hi(0x201d400), %g1
2004474: 85 28 a0 05 sll %g2, 5, %g2
2004478: 82 10 62 b0 or %g1, 0x2b0, %g1
200447c: 82 00 40 02 add %g1, %g2, %g1
2004480: c2 00 60 04 ld [ %g1 + 4 ], %g1
2004484: 80 a0 60 00 cmp %g1, 0
2004488: 22 80 00 45 be,a 200459c <rtems_termios_close+0x170>
200448c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2004490: 9f c0 40 00 call %g1
2004494: 90 10 00 1d mov %i5, %o0
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004498: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
200449c: 80 a0 60 02 cmp %g1, 2
20044a0: 22 80 00 50 be,a 20045e0 <rtems_termios_close+0x1b4> <== NEVER TAKEN
20044a4: d0 07 60 c4 ld [ %i5 + 0xc4 ], %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
20044a8: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
20044ac: 80 a0 60 00 cmp %g1, 0
20044b0: 22 80 00 07 be,a 20044cc <rtems_termios_close+0xa0> <== ALWAYS TAKEN
20044b4: c2 07 40 00 ld [ %i5 ], %g1
(*tty->device.lastClose)(tty->major, tty->minor, arg);
20044b8: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
20044bc: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 <== NOT EXECUTED
20044c0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20044c4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->forw == NULL) {
20044c8: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
20044cc: 80 a0 60 00 cmp %g1, 0
20044d0: 02 80 00 2c be 2004580 <rtems_termios_close+0x154>
20044d4: c4 07 60 04 ld [ %i5 + 4 ], %g2
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
20044d8: c4 20 60 04 st %g2, [ %g1 + 4 ]
20044dc: c4 07 60 04 ld [ %i5 + 4 ], %g2
}
if (tty->back == NULL) {
20044e0: 80 a0 a0 00 cmp %g2, 0
20044e4: 22 80 00 22 be,a 200456c <rtems_termios_close+0x140> <== ALWAYS TAKEN
20044e8: 05 00 80 76 sethi %hi(0x201d800), %g2
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
20044ec: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
20044f0: 40 00 08 e1 call 2006874 <rtems_semaphore_delete>
20044f4: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
rtems_semaphore_delete (tty->osem);
20044f8: 40 00 08 df call 2006874 <rtems_semaphore_delete>
20044fc: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
2004500: 40 00 08 dd call 2006874 <rtems_semaphore_delete>
2004504: d0 07 60 8c ld [ %i5 + 0x8c ], %o0
if ((tty->device.pollRead == NULL) ||
2004508: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
200450c: 80 a0 60 00 cmp %g1, 0
2004510: 02 80 00 13 be 200455c <rtems_termios_close+0x130>
2004514: 01 00 00 00 nop
2004518: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
200451c: 80 a0 60 02 cmp %g1, 2
2004520: 02 80 00 0f be 200455c <rtems_termios_close+0x130>
2004524: 01 00 00 00 nop
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
2004528: 7f ff fa 7e call 2002f20 <free>
200452c: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
free (tty->rawOutBuf.theBuf);
2004530: 7f ff fa 7c call 2002f20 <free>
2004534: d0 07 60 7c ld [ %i5 + 0x7c ], %o0
free (tty->cbuf);
2004538: 7f ff fa 7a call 2002f20 <free>
200453c: d0 07 60 1c ld [ %i5 + 0x1c ], %o0
free (tty);
2004540: 7f ff fa 78 call 2002f20 <free>
2004544: 90 10 00 1d mov %i5, %o0
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004548: d0 07 21 80 ld [ %i4 + 0x180 ], %o0
200454c: 40 00 09 4b call 2006a78 <rtems_semaphore_release>
2004550: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2004554: 81 c7 e0 08 ret
2004558: 81 e8 00 00 restore
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
200455c: 40 00 08 c6 call 2006874 <rtems_semaphore_delete>
2004560: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2004564: 30 bf ff f1 b,a 2004528 <rtems_termios_close+0xfc>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
2004568: 05 00 80 76 sethi %hi(0x201d800), %g2
if ( rtems_termios_ttyHead != NULL ) {
200456c: 80 a0 60 00 cmp %g1, 0
2004570: 02 bf ff e0 be 20044f0 <rtems_termios_close+0xc4>
2004574: c2 20 a1 88 st %g1, [ %g2 + 0x188 ]
rtems_termios_ttyHead->back = NULL;
2004578: 10 bf ff de b 20044f0 <rtems_termios_close+0xc4>
200457c: c0 20 60 04 clr [ %g1 + 4 ]
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
2004580: 07 00 80 76 sethi %hi(0x201d800), %g3
if ( rtems_termios_ttyTail != NULL ) {
2004584: 80 a0 a0 00 cmp %g2, 0
2004588: 02 bf ff f8 be 2004568 <rtems_termios_close+0x13c> <== ALWAYS TAKEN
200458c: c4 20 e1 84 st %g2, [ %g3 + 0x184 ]
rtems_termios_ttyTail->forw = NULL;
2004590: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED
2004594: 10 bf ff d6 b 20044ec <rtems_termios_close+0xc0> <== NOT EXECUTED
2004598: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200459c: 92 10 20 00 clr %o1
20045a0: 40 00 08 ec call 2006950 <rtems_semaphore_obtain>
20045a4: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL) {
20045a8: 80 a2 20 00 cmp %o0, 0
20045ac: 12 80 00 18 bne 200460c <rtems_termios_close+0x1e0> <== NEVER TAKEN
20045b0: 01 00 00 00 nop
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
20045b4: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
20045b8: 80 a0 60 00 cmp %g1, 0
20045bc: 12 80 00 16 bne 2004614 <rtems_termios_close+0x1e8>
20045c0: 01 00 00 00 nop
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
20045c4: 40 00 09 2d call 2006a78 <rtems_semaphore_release>
20045c8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20045cc: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
20045d0: 80 a0 60 02 cmp %g1, 2
20045d4: 32 bf ff b6 bne,a 20044ac <rtems_termios_close+0x80>
20045d8: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
20045dc: d0 07 60 c4 ld [ %i5 + 0xc4 ], %o0
20045e0: 40 00 07 9d call 2006454 <rtems_event_send>
20045e4: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
20045e8: 80 a2 20 00 cmp %o0, 0
20045ec: 12 80 00 08 bne 200460c <rtems_termios_close+0x1e0> <== NEVER TAKEN
20045f0: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
20045f4: d0 07 60 c8 ld [ %i5 + 0xc8 ], %o0
20045f8: 40 00 07 97 call 2006454 <rtems_event_send>
20045fc: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
2004600: 80 a2 20 00 cmp %o0, 0
2004604: 22 bf ff aa be,a 20044ac <rtems_termios_close+0x80> <== ALWAYS TAKEN
2004608: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
rtems_fatal_error_occurred (sc);
200460c: 40 00 0a 95 call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
2004610: 01 00 00 00 nop <== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2004614: 7f ff fe 5d call 2003f88 <drainOutput.part.0>
2004618: 90 10 00 1d mov %i5, %o0
200461c: 30 bf ff ea b,a 20045c4 <rtems_termios_close+0x198>
02005cf4 <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)
{
2005cf4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2005cf8: c4 06 20 90 ld [ %i0 + 0x90 ], %g2
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005cfc: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2005d00: 84 00 80 19 add %g2, %i1, %g2
2005d04: c4 26 20 90 st %g2, [ %i0 + 0x90 ]
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005d08: 80 a0 60 02 cmp %g1, 2
2005d0c: 02 80 00 10 be 2005d4c <rtems_termios_dequeue_characters+0x58>
2005d10: 90 10 00 18 mov %i0, %o0
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
2005d14: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2005d18: 80 a0 60 05 cmp %g1, 5
2005d1c: 02 80 00 04 be 2005d2c <rtems_termios_dequeue_characters+0x38>
2005d20: 03 00 80 75 sethi %hi(0x201d400), %g1
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
2005d24: 7f ff ff 58 call 2005a84 <rtems_termios_refill_transmitter>
2005d28: 81 e8 00 00 restore
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2005d2c: c2 00 63 64 ld [ %g1 + 0x364 ], %g1
2005d30: 80 a0 60 00 cmp %g1, 0
2005d34: 02 80 00 04 be 2005d44 <rtems_termios_dequeue_characters+0x50><== NEVER TAKEN
2005d38: 01 00 00 00 nop
rtems_termios_linesw[tty->t_line].l_start(tty);
2005d3c: 9f c0 40 00 call %g1
2005d40: 01 00 00 00 nop
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
2005d44: 81 c7 e0 08 ret
2005d48: 91 e8 20 00 restore %g0, 0, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
2005d4c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
2005d50: 40 00 01 c1 call 2006454 <rtems_event_send>
2005d54: 92 10 20 02 mov 2, %o1
if (sc != RTEMS_SUCCESSFUL)
2005d58: 80 a2 20 00 cmp %o0, 0
2005d5c: 02 bf ff fa be 2005d44 <rtems_termios_dequeue_characters+0x50><== ALWAYS TAKEN
2005d60: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
2005d64: 40 00 04 bf call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
020056ec <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)
{
20056ec: 9d e3 bf a0 save %sp, -96, %sp
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
20056f0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
20056f4: 39 00 80 75 sethi %hi(0x201d400), %i4
20056f8: 83 28 60 05 sll %g1, 5, %g1
20056fc: b8 17 22 b0 or %i4, 0x2b0, %i4
2005700: 82 07 00 01 add %i4, %g1, %g1
2005704: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2005708: 80 a0 60 00 cmp %g1, 0
200570c: 02 80 00 27 be 20057a8 <rtems_termios_enqueue_raw_characters+0xbc>
2005710: ba 10 00 18 mov %i0, %i5
while (len--) {
2005714: 80 a6 a0 00 cmp %i2, 0
2005718: 22 80 00 10 be,a 2005758 <rtems_termios_enqueue_raw_characters+0x6c><== NEVER TAKEN
200571c: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1 <== NOT EXECUTED
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
2005720: b4 06 bf ff add %i2, -1, %i2
2005724: 10 80 00 06 b 200573c <rtems_termios_enqueue_raw_characters+0x50>
2005728: b6 10 20 00 clr %i3
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
200572c: b6 06 e0 01 inc %i3
2005730: 83 28 60 05 sll %g1, 5, %g1
2005734: 82 07 00 01 add %i4, %g1, %g1
2005738: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
200573c: d0 4e 40 1b ldsb [ %i1 + %i3 ], %o0
2005740: 9f c0 40 00 call %g1
2005744: 92 10 00 1d mov %i5, %o1
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
2005748: 80 a6 c0 1a cmp %i3, %i2
200574c: 32 bf ff f8 bne,a 200572c <rtems_termios_enqueue_raw_characters+0x40>
2005750: c2 07 60 cc ld [ %i5 + 0xcc ], %g1
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2005754: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1
2005758: 80 a0 60 00 cmp %g1, 0
200575c: 12 80 00 0b bne 2005788 <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
2005760: b0 10 20 00 clr %i0
2005764: c2 07 60 dc ld [ %i5 + 0xdc ], %g1
2005768: 80 a0 60 00 cmp %g1, 0
200576c: 02 80 00 0d be 20057a0 <rtems_termios_enqueue_raw_characters+0xb4>
2005770: 01 00 00 00 nop
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2005774: d2 07 60 e0 ld [ %i5 + 0xe0 ], %o1
2005778: 9f c0 40 00 call %g1
200577c: 90 07 60 30 add %i5, 0x30, %o0
tty->tty_rcvwakeup = 1;
2005780: 82 10 20 01 mov 1, %g1
2005784: c2 27 60 e4 st %g1, [ %i5 + 0xe4 ]
2005788: 81 c7 e0 08 ret
200578c: 81 e8 00 00 restore
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2005790: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
}
}
}
}
tty->rawInBufDropped += dropped;
2005794: 82 00 40 18 add %g1, %i0, %g1
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2005798: 40 00 04 b8 call 2006a78 <rtems_semaphore_release>
200579c: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
return dropped;
}
20057a0: 81 c7 e0 08 ret
20057a4: 81 e8 00 00 restore
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
20057a8: b4 06 40 1a add %i1, %i2, %i2
20057ac: a0 10 20 00 clr %l0
20057b0: b0 10 20 00 clr %i0
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
20057b4: a4 07 60 30 add %i5, 0x30, %l2
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
20057b8: a6 07 60 4a add %i5, 0x4a, %l3
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
20057bc: 80 a6 40 1a cmp %i1, %i2
20057c0: 22 bf ff f4 be,a 2005790 <rtems_termios_enqueue_raw_characters+0xa4>
20057c4: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
20057c8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
}
return 0;
}
while (len--) {
c = *buf++;
20057cc: f8 0e 40 00 ldub [ %i1 ], %i4
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
20057d0: 80 88 62 00 btst 0x200, %g1
20057d4: 02 80 00 0b be 2005800 <rtems_termios_enqueue_raw_characters+0x114>
20057d8: b2 06 60 01 inc %i1
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
20057dc: c4 0f 60 4a ldub [ %i5 + 0x4a ], %g2
20057e0: 83 2f 20 18 sll %i4, 0x18, %g1
20057e4: 83 38 60 18 sra %g1, 0x18, %g1
20057e8: 80 a0 40 02 cmp %g1, %g2
20057ec: 02 80 00 54 be 200593c <rtems_termios_enqueue_raw_characters+0x250>
20057f0: c4 0f 60 49 ldub [ %i5 + 0x49 ], %g2
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
20057f4: 80 a0 40 02 cmp %g1, %g2
20057f8: 02 80 00 59 be 200595c <rtems_termios_enqueue_raw_characters+0x270><== NEVER TAKEN
20057fc: 01 00 00 00 nop
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
2005800: 80 8c 20 ff btst 0xff, %l0
2005804: 02 80 00 15 be 2005858 <rtems_termios_enqueue_raw_characters+0x16c><== ALWAYS TAKEN
2005808: 01 00 00 00 nop
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
200580c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005810: 82 08 60 30 and %g1, 0x30, %g1
2005814: 80 a0 60 20 cmp %g1, 0x20
2005818: 12 bf ff ea bne 20057c0 <rtems_termios_enqueue_raw_characters+0xd4><== ALWAYS TAKEN
200581c: 80 a6 40 1a cmp %i1, %i2
/* disable interrupts */
rtems_interrupt_disable(level);
2005820: 7f ff f2 71 call 20021e4 <sparc_disable_interrupts> <== NOT EXECUTED
2005824: 01 00 00 00 nop <== NOT EXECUTED
2005828: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
200582c: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2005830: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
2005834: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
2005838: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
200583c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005840: 12 80 00 4f bne 200597c <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
2005844: 01 00 00 00 nop <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2005848: 7f ff f2 6b call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
200584c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2005850: 10 bf ff dc b 20057c0 <rtems_termios_enqueue_raw_characters+0xd4><== NOT EXECUTED
2005854: 80 a6 40 1a cmp %i1, %i2 <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
2005858: d0 07 60 60 ld [ %i5 + 0x60 ], %o0
200585c: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
2005860: 40 00 4c c1 call 2018b64 <.urem>
2005864: 90 02 20 01 inc %o0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
2005868: 7f ff f2 5f call 20021e4 <sparc_disable_interrupts>
200586c: b6 10 00 08 mov %o0, %i3
2005870: a2 10 00 08 mov %o0, %l1
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2005874: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
2005878: d0 07 60 64 ld [ %i5 + 0x64 ], %o0
% tty->rawInBuf.Size) > tty->highwater) &&
200587c: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2005880: 90 22 00 01 sub %o0, %g1, %o0
% tty->rawInBuf.Size) > tty->highwater) &&
2005884: 40 00 4c b8 call 2018b64 <.urem>
2005888: 90 02 00 1b add %o0, %i3, %o0
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
200588c: c2 07 60 c0 ld [ %i5 + 0xc0 ], %g1
2005890: 80 a2 00 01 cmp %o0, %g1
2005894: 08 80 00 13 bleu 20058e0 <rtems_termios_enqueue_raw_characters+0x1f4><== ALWAYS TAKEN
2005898: 01 00 00 00 nop
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
200589c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
20058a0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
20058a4: 12 80 00 0f bne 20058e0 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
20058a8: 01 00 00 00 nop <== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
20058ac: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
20058b0: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
20058b4: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
20058b8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
20058bc: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED
20058c0: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
20058c4: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
20058c8: 02 80 00 35 be 200599c <rtems_termios_enqueue_raw_characters+0x2b0><== NOT EXECUTED
20058cc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
20058d0: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED
20058d4: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED
20058d8: 02 80 00 40 be 20059d8 <rtems_termios_enqueue_raw_characters+0x2ec><== NOT EXECUTED
20058dc: 01 00 00 00 nop <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
20058e0: 7f ff f2 45 call 20021f4 <sparc_enable_interrupts>
20058e4: 90 10 00 11 mov %l1, %o0
if (newTail == tty->rawInBuf.Head) {
20058e8: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
20058ec: 80 a0 40 1b cmp %g1, %i3
20058f0: 22 bf ff b3 be,a 20057bc <rtems_termios_enqueue_raw_characters+0xd0><== NEVER TAKEN
20058f4: b0 06 20 01 inc %i0 <== NOT EXECUTED
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
20058f8: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
20058fc: f8 28 40 1b stb %i4, [ %g1 + %i3 ]
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2005900: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
2005904: f6 27 60 60 st %i3, [ %i5 + 0x60 ]
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2005908: 80 a0 60 00 cmp %g1, 0
200590c: 12 bf ff ad bne 20057c0 <rtems_termios_enqueue_raw_characters+0xd4><== NEVER TAKEN
2005910: 80 a6 40 1a cmp %i1, %i2
2005914: c2 07 60 dc ld [ %i5 + 0xdc ], %g1
2005918: 80 a0 60 00 cmp %g1, 0
200591c: 02 bf ff a9 be 20057c0 <rtems_termios_enqueue_raw_characters+0xd4><== ALWAYS TAKEN
2005920: 80 a6 40 1a cmp %i1, %i2
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2005924: d2 07 60 e0 ld [ %i5 + 0xe0 ], %o1 <== NOT EXECUTED
2005928: 9f c0 40 00 call %g1 <== NOT EXECUTED
200592c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2005930: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2005934: 10 bf ff a2 b 20057bc <rtems_termios_enqueue_raw_characters+0xd0><== NOT EXECUTED
2005938: c2 27 60 e4 st %g1, [ %i5 + 0xe4 ] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
200593c: 80 a0 40 02 cmp %g1, %g2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2005940: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
2005944: 22 80 00 0b be,a 2005970 <rtems_termios_enqueue_raw_characters+0x284><== NEVER TAKEN
2005948: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
200594c: 82 10 60 10 or %g1, 0x10, %g1
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
2005950: a0 10 20 01 mov 1, %l0
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
2005954: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
2005958: 30 bf ff ad b,a 200580c <rtems_termios_enqueue_raw_characters+0x120>
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
200595c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
2005960: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
2005964: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED
2005968: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
200596c: 30 bf ff a8 b,a 200580c <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
2005970: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2005974: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
2005978: 30 bf ff a5 b,a 200580c <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
200597c: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
2005980: d2 07 60 7c ld [ %i5 + 0x7c ], %o1 <== NOT EXECUTED
2005984: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2005988: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
200598c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2005990: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005994: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2005998: 30 bf ff ac b,a 2005848 <rtems_termios_enqueue_raw_characters+0x15c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
200599c: 12 80 00 06 bne 20059b4 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
20059a0: 01 00 00 00 nop <== NOT EXECUTED
20059a4: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
20059a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20059ac: 12 bf ff cd bne 20058e0 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
20059b0: 01 00 00 00 nop <== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
20059b4: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
20059b8: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
20059bc: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
20059c0: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
20059c4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
20059c8: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
20059cc: 9f c0 40 00 call %g1 <== NOT EXECUTED
20059d0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20059d4: 30 bf ff c3 b,a 20058e0 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
20059d8: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
20059dc: c2 07 60 ac ld [ %i5 + 0xac ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
20059e0: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED
20059e4: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
20059e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20059ec: 02 bf ff bd be 20058e0 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
20059f0: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
20059f4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20059f8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
20059fc: 30 bf ff b9 b,a 20058e0 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
02004640 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
2004640: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004644: c2 06 00 00 ld [ %i0 ], %g1
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
2004648: f6 06 20 08 ld [ %i0 + 8 ], %i3
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
200464c: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004650: 92 10 20 00 clr %o1
2004654: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
2004658: 94 10 20 00 clr %o2
200465c: 40 00 08 bd call 2006950 <rtems_semaphore_obtain>
2004660: c0 26 20 0c clr [ %i0 + 0xc ]
if (sc != RTEMS_SUCCESSFUL) {
2004664: b8 92 20 00 orcc %o0, 0, %i4
2004668: 32 80 00 1a bne,a 20046d0 <rtems_termios_ioctl+0x90> <== NEVER TAKEN
200466c: f8 26 20 0c st %i4, [ %i0 + 0xc ] <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004670: c2 06 20 04 ld [ %i0 + 4 ], %g1
2004674: 80 a0 60 04 cmp %g1, 4
2004678: 22 80 00 10 be,a 20046b8 <rtems_termios_ioctl+0x78>
200467c: c2 06 c0 00 ld [ %i3 ], %g1
2004680: 18 80 00 16 bgu 20046d8 <rtems_termios_ioctl+0x98>
2004684: 05 10 01 19 sethi %hi(0x40046400), %g2
2004688: 80 a0 60 02 cmp %g1, 2
200468c: 22 80 00 2a be,a 2004734 <rtems_termios_ioctl+0xf4>
2004690: d2 06 20 08 ld [ %i0 + 8 ], %o1
2004694: 08 80 00 99 bleu 20048f8 <rtems_termios_ioctl+0x2b8>
2004698: 80 a0 60 01 cmp %g1, 1
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
200469c: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
20046a0: 80 a0 60 00 cmp %g1, 0
20046a4: 02 80 00 08 be 20046c4 <rtems_termios_ioctl+0x84> <== ALWAYS TAKEN
20046a8: 01 00 00 00 nop
20046ac: 7f ff fe 37 call 2003f88 <drainOutput.part.0> <== NOT EXECUTED
20046b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20046b4: 30 80 00 04 b,a 20046c4 <rtems_termios_ioctl+0x84> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
20046b8: c2 27 60 dc st %g1, [ %i5 + 0xdc ]
20046bc: c2 06 e0 04 ld [ %i3 + 4 ], %g1
20046c0: c2 27 60 e0 st %g1, [ %i5 + 0xe0 ]
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
20046c4: 40 00 08 ed call 2006a78 <rtems_semaphore_release>
20046c8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
args->ioctl_return = sc;
20046cc: f8 26 20 0c st %i4, [ %i0 + 0xc ]
return sc;
}
20046d0: 81 c7 e0 08 ret
20046d4: 91 e8 00 1c restore %g0, %i4, %o0
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
20046d8: 84 10 a2 7f or %g2, 0x27f, %g2
20046dc: 80 a0 40 02 cmp %g1, %g2
20046e0: 02 80 00 7a be 20048c8 <rtems_termios_ioctl+0x288> <== NEVER TAKEN
20046e4: 01 00 00 00 nop
20046e8: 18 80 00 8b bgu 2004914 <rtems_termios_ioctl+0x2d4>
20046ec: 05 10 01 1d sethi %hi(0x40047400), %g2
20046f0: 80 a0 60 05 cmp %g1, 5
20046f4: 22 80 00 ac be,a 20049a4 <rtems_termios_ioctl+0x364>
20046f8: c2 06 c0 00 ld [ %i3 ], %g1
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
20046fc: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2004700: 03 00 80 75 sethi %hi(0x201d400), %g1
2004704: 85 28 a0 05 sll %g2, 5, %g2
2004708: 82 10 62 b0 or %g1, 0x2b0, %g1
200470c: 82 00 40 02 add %g1, %g2, %g1
2004710: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2004714: 80 a0 60 00 cmp %g1, 0
2004718: 02 bf ff eb be 20046c4 <rtems_termios_ioctl+0x84> <== NEVER TAKEN
200471c: b8 10 20 0a mov 0xa, %i4
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
2004720: 90 10 00 1d mov %i5, %o0
2004724: 9f c0 40 00 call %g1
2004728: 92 10 00 18 mov %i0, %o1
200472c: 10 bf ff e6 b 20046c4 <rtems_termios_ioctl+0x84>
2004730: b8 10 00 08 mov %o0, %i4
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
2004734: b6 07 60 30 add %i5, 0x30, %i3
2004738: 94 10 20 24 mov 0x24, %o2
200473c: 40 00 2f 40 call 201043c <memcpy>
2004740: 90 10 00 1b mov %i3, %o0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2004744: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004748: 80 88 62 00 btst 0x200, %g1
200474c: 02 80 00 19 be 20047b0 <rtems_termios_ioctl+0x170>
2004750: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
2004754: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2004758: 80 88 64 00 btst 0x400, %g1
200475c: 12 80 00 15 bne 20047b0 <rtems_termios_ioctl+0x170>
2004760: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
2004764: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004768: 82 08 7d ef and %g1, -529, %g1
200476c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
2004770: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004774: 80 88 60 20 btst 0x20, %g1
2004778: 02 80 00 0e be 20047b0 <rtems_termios_ioctl+0x170> <== ALWAYS TAKEN
200477c: 01 00 00 00 nop
/* disable interrupts */
rtems_interrupt_disable(level);
2004780: 7f ff f6 99 call 20021e4 <sparc_disable_interrupts> <== NOT EXECUTED
2004784: 01 00 00 00 nop <== NOT EXECUTED
2004788: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
200478c: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2004790: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
2004794: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
2004798: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
200479c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20047a0: 12 80 00 a4 bne 2004a30 <rtems_termios_ioctl+0x3f0> <== NOT EXECUTED
20047a4: 01 00 00 00 nop <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
20047a8: 7f ff f6 93 call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
20047ac: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
20047b0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20047b4: 80 88 64 00 btst 0x400, %g1
20047b8: 02 80 00 0c be 20047e8 <rtems_termios_ioctl+0x1a8>
20047bc: 03 00 00 04 sethi %hi(0x1000), %g1
20047c0: c4 07 60 30 ld [ %i5 + 0x30 ], %g2
20047c4: 80 88 80 01 btst %g2, %g1
20047c8: 12 80 00 08 bne 20047e8 <rtems_termios_ioctl+0x1a8> <== NEVER TAKEN
20047cc: 01 00 00 00 nop
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
20047d0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20047d4: 82 08 7b ff and %g1, -1025, %g1
20047d8: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
20047dc: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20047e0: 82 08 7f fd and %g1, -3, %g1
20047e4: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
20047e8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20047ec: 80 88 61 00 btst 0x100, %g1
20047f0: 02 80 00 16 be 2004848 <rtems_termios_ioctl+0x208> <== ALWAYS TAKEN
20047f4: c4 07 60 38 ld [ %i5 + 0x38 ], %g2
20047f8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20047fc: 06 80 00 82 bl 2004a04 <rtems_termios_ioctl+0x3c4> <== NOT EXECUTED
2004800: 01 00 00 00 nop <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
2004804: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004808: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
200480c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
2004810: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004814: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2004818: 02 80 00 09 be 200483c <rtems_termios_ioctl+0x1fc> <== NOT EXECUTED
200481c: 01 00 00 00 nop <== NOT EXECUTED
2004820: c2 07 60 b0 ld [ %i5 + 0xb0 ], %g1 <== NOT EXECUTED
2004824: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004828: 02 80 00 05 be 200483c <rtems_termios_ioctl+0x1fc> <== NOT EXECUTED
200482c: 01 00 00 00 nop <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2004830: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004834: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2004838: c4 07 60 38 ld [ %i5 + 0x38 ], %g2 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
200483c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004840: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
2004844: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
2004848: 80 a0 a0 00 cmp %g2, 0
200484c: 06 80 00 6e bl 2004a04 <rtems_termios_ioctl+0x3c4> <== NEVER TAKEN
2004850: 01 00 00 00 nop
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
2004854: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2004858: 05 00 00 04 sethi %hi(0x1000), %g2
200485c: 80 88 40 02 btst %g1, %g2
2004860: 02 80 00 06 be 2004878 <rtems_termios_ioctl+0x238>
2004864: 80 88 64 00 btst 0x400, %g1
tty->flow_ctrl |= FL_MDXOF;
2004868: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2
200486c: 84 10 a4 00 or %g2, 0x400, %g2
2004870: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ]
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
2004874: 80 88 64 00 btst 0x400, %g1
2004878: 22 80 00 06 be,a 2004890 <rtems_termios_ioctl+0x250>
200487c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
tty->flow_ctrl |= FL_MDXON;
2004880: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004884: 82 10 62 00 or %g1, 0x200, %g1
2004888: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
200488c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
2004890: 80 88 60 02 btst 2, %g1
2004894: 02 80 00 48 be 20049b4 <rtems_termios_ioctl+0x374>
2004898: 01 00 00 00 nop
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
200489c: c0 27 60 6c clr [ %i5 + 0x6c ]
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
20048a0: c0 27 60 70 clr [ %i5 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
20048a4: c0 27 60 74 clr [ %i5 + 0x74 ]
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
20048a8: c2 07 60 a8 ld [ %i5 + 0xa8 ], %g1
20048ac: 80 a0 60 00 cmp %g1, 0
20048b0: 02 bf ff 85 be 20046c4 <rtems_termios_ioctl+0x84> <== NEVER TAKEN
20048b4: 01 00 00 00 nop
(*tty->device.setAttributes)(tty->minor, &tty->termios);
20048b8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
20048bc: 9f c0 40 00 call %g1
20048c0: 92 10 00 1b mov %i3, %o1
20048c4: 30 bf ff 80 b,a 20046c4 <rtems_termios_ioctl+0x84>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
20048c8: c4 07 60 60 ld [ %i5 + 0x60 ], %g2 <== NOT EXECUTED
20048cc: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
if ( rawnc < 0 )
20048d0: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED
20048d4: 0c 80 00 49 bneg 20049f8 <rtems_termios_ioctl+0x3b8> <== NOT EXECUTED
20048d8: 01 00 00 00 nop <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
20048dc: c8 07 60 20 ld [ %i5 + 0x20 ], %g4 <== NOT EXECUTED
20048e0: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 <== NOT EXECUTED
20048e4: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED
20048e8: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED
20048ec: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
}
break;
20048f0: 10 bf ff 75 b 20046c4 <rtems_termios_ioctl+0x84> <== NOT EXECUTED
20048f4: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
20048f8: 32 bf ff 82 bne,a 2004700 <rtems_termios_ioctl+0xc0> <== NEVER TAKEN
20048fc: c4 07 60 cc ld [ %i5 + 0xcc ], %g2 <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
2004900: d0 06 20 08 ld [ %i0 + 8 ], %o0
2004904: 92 07 60 30 add %i5, 0x30, %o1
2004908: 40 00 2e cd call 201043c <memcpy>
200490c: 94 10 20 24 mov 0x24, %o2
break;
2004910: 30 bf ff 6d b,a 20046c4 <rtems_termios_ioctl+0x84>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004914: 84 10 a0 1a or %g2, 0x1a, %g2
2004918: 80 a0 40 02 cmp %g1, %g2
200491c: 02 80 00 1e be 2004994 <rtems_termios_ioctl+0x354>
2004920: 05 20 01 1d sethi %hi(0x80047400), %g2
2004924: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <RAM_END+0x7dc4741b>
2004928: 80 a0 40 02 cmp %g1, %g2
200492c: 32 bf ff 75 bne,a 2004700 <rtems_termios_ioctl+0xc0> <== NEVER TAKEN
2004930: c4 07 60 cc ld [ %i5 + 0xcc ], %g2 <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2004934: c2 07 60 cc ld [ %i5 + 0xcc ], %g1
2004938: 37 00 80 75 sethi %hi(0x201d400), %i3
200493c: 83 28 60 05 sll %g1, 5, %g1
2004940: b6 16 e2 b0 or %i3, 0x2b0, %i3
2004944: 82 06 c0 01 add %i3, %g1, %g1
2004948: c2 00 60 04 ld [ %g1 + 4 ], %g1
200494c: 80 a0 60 00 cmp %g1, 0
2004950: 22 80 00 06 be,a 2004968 <rtems_termios_ioctl+0x328>
2004954: c2 06 20 08 ld [ %i0 + 8 ], %g1
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2004958: 9f c0 40 00 call %g1
200495c: 90 10 00 1d mov %i5, %o0
2004960: b8 10 00 08 mov %o0, %i4
}
tty->t_line=*(int*)(args->buffer);
2004964: c2 06 20 08 ld [ %i0 + 8 ], %g1
2004968: c4 00 40 00 ld [ %g1 ], %g2
tty->t_sc = NULL; /* ensure that no more valid data */
200496c: c0 27 60 d0 clr [ %i5 + 0xd0 ]
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
2004970: 83 28 a0 05 sll %g2, 5, %g1
2004974: c2 06 c0 01 ld [ %i3 + %g1 ], %g1
2004978: 80 a0 60 00 cmp %g1, 0
200497c: 02 bf ff 52 be 20046c4 <rtems_termios_ioctl+0x84>
2004980: c4 27 60 cc st %g2, [ %i5 + 0xcc ]
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
2004984: 9f c0 40 00 call %g1
2004988: 90 10 00 1d mov %i5, %o0
200498c: 10 bf ff 4e b 20046c4 <rtems_termios_ioctl+0x84>
2004990: b8 10 00 08 mov %o0, %i4
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
2004994: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2004998: c2 06 20 08 ld [ %i0 + 8 ], %g1
break;
200499c: 10 bf ff 4a b 20046c4 <rtems_termios_ioctl+0x84>
20049a0: c4 20 40 00 st %g2, [ %g1 ]
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
20049a4: c2 27 60 d4 st %g1, [ %i5 + 0xd4 ]
20049a8: c2 06 e0 04 ld [ %i3 + 4 ], %g1
break;
20049ac: 10 bf ff 46 b 20046c4 <rtems_termios_ioctl+0x84>
20049b0: c2 27 60 d8 st %g1, [ %i5 + 0xd8 ]
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
20049b4: 40 00 06 1a call 200621c <rtems_clock_get_ticks_per_second>
20049b8: f4 0f 60 46 ldub [ %i5 + 0x46 ], %i2
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] *
20049bc: 40 00 4f 84 call 20187cc <.umul>
20049c0: 92 10 00 1a mov %i2, %o1
rtems_clock_get_ticks_per_second() / 10;
20049c4: 40 00 4f bc call 20188b4 <.udiv>
20049c8: 92 10 20 0a mov 0xa, %o1
if (tty->termios.c_cc[VTIME]) {
20049cc: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
20049d0: d0 27 60 54 st %o0, [ %i5 + 0x54 ]
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
20049d4: 80 a0 60 00 cmp %g1, 0
20049d8: 02 80 00 10 be 2004a18 <rtems_termios_ioctl+0x3d8>
20049dc: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
20049e0: c0 27 60 6c clr [ %i5 + 0x6c ]
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
20049e4: 80 a0 60 00 cmp %g1, 0
20049e8: 12 bf ff af bne 20048a4 <rtems_termios_ioctl+0x264>
20049ec: d0 27 60 70 st %o0, [ %i5 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
20049f0: 10 bf ff ae b 20048a8 <rtems_termios_ioctl+0x268>
20049f4: d0 27 60 74 st %o0, [ %i5 + 0x74 ]
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
20049f8: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 <== NOT EXECUTED
20049fc: 10 bf ff b8 b 20048dc <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
2004a00: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
2004a04: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004a08: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED
2004a0c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
2004a10: 10 bf ff 92 b 2004858 <rtems_termios_ioctl+0x218> <== NOT EXECUTED
2004a14: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
2004a18: 80 a0 60 00 cmp %g1, 0
2004a1c: 32 bf ff a1 bne,a 20048a0 <rtems_termios_ioctl+0x260> <== NEVER TAKEN
2004a20: c0 27 60 6c clr [ %i5 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
2004a24: 82 10 20 01 mov 1, %g1
2004a28: 10 bf ff a0 b 20048a8 <rtems_termios_ioctl+0x268>
2004a2c: c2 27 60 6c st %g1, [ %i5 + 0x6c ]
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2004a30: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
2004a34: d2 07 60 7c ld [ %i5 + 0x7c ], %o1 <== NOT EXECUTED
2004a38: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2004a3c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2004a40: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2004a44: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004a48: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2004a4c: 30 bf ff 57 b,a 20047a8 <rtems_termios_ioctl+0x168> <== NOT EXECUTED
02004004 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
2004004: 9d e3 bf a0 save %sp, -96, %sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
2004008: 39 00 80 76 sethi %hi(0x201d800), %i4
200400c: d0 07 21 80 ld [ %i4 + 0x180 ], %o0 ! 201d980 <rtems_termios_ttyMutex>
2004010: 92 10 20 00 clr %o1
2004014: 40 00 0a 4f call 2006950 <rtems_semaphore_obtain>
2004018: 94 10 20 00 clr %o2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200401c: ba 92 20 00 orcc %o0, 0, %i5
2004020: 12 80 00 27 bne 20040bc <rtems_termios_open+0xb8> <== NEVER TAKEN
2004024: 25 00 80 76 sethi %hi(0x201d800), %l2
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004028: e2 04 a1 88 ld [ %l2 + 0x188 ], %l1 ! 201d988 <rtems_termios_ttyHead>
200402c: 80 a4 60 00 cmp %l1, 0
2004030: 02 80 00 34 be 2004100 <rtems_termios_open+0xfc>
2004034: a0 10 00 11 mov %l1, %l0
if ((tty->major == major) && (tty->minor == minor))
2004038: 10 80 00 06 b 2004050 <rtems_termios_open+0x4c>
200403c: c2 04 20 0c ld [ %l0 + 0xc ], %g1
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004040: 80 a4 20 00 cmp %l0, 0
2004044: 02 80 00 30 be 2004104 <rtems_termios_open+0x100> <== ALWAYS TAKEN
2004048: 90 10 20 01 mov 1, %o0
if ((tty->major == major) && (tty->minor == minor))
200404c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
2004050: 80 a0 40 18 cmp %g1, %i0
2004054: 32 bf ff fb bne,a 2004040 <rtems_termios_open+0x3c>
2004058: e0 04 00 00 ld [ %l0 ], %l0
200405c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2004060: 80 a0 40 19 cmp %g1, %i1
2004064: 32 bf ff f7 bne,a 2004040 <rtems_termios_open+0x3c> <== NEVER TAKEN
2004068: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
200406c: c4 06 80 00 ld [ %i2 ], %g2
if (!tty->refcount++) {
2004070: c2 04 20 08 ld [ %l0 + 8 ], %g1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
2004074: e0 20 a0 38 st %l0, [ %g2 + 0x38 ]
if (!tty->refcount++) {
2004078: 84 00 60 01 add %g1, 1, %g2
200407c: 80 a0 60 00 cmp %g1, 0
2004080: 12 80 00 0d bne 20040b4 <rtems_termios_open+0xb0>
2004084: c4 24 20 08 st %g2, [ %l0 + 8 ]
if (tty->device.firstOpen)
2004088: c2 04 20 98 ld [ %l0 + 0x98 ], %g1
200408c: 80 a0 60 00 cmp %g1, 0
2004090: 02 80 00 05 be 20040a4 <rtems_termios_open+0xa0>
2004094: 90 10 00 18 mov %i0, %o0
(*tty->device.firstOpen)(major, minor, arg);
2004098: 92 10 00 19 mov %i1, %o1
200409c: 9f c0 40 00 call %g1
20040a0: 94 10 00 1a mov %i2, %o2
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20040a4: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20040a8: 80 a0 60 02 cmp %g1, 2
20040ac: 22 80 00 06 be,a 20040c4 <rtems_termios_open+0xc0>
20040b0: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
20040b4: 40 00 0a 71 call 2006a78 <rtems_semaphore_release>
20040b8: d0 07 21 80 ld [ %i4 + 0x180 ], %o0
return RTEMS_SUCCESSFUL;
}
20040bc: 81 c7 e0 08 ret
20040c0: 91 e8 00 1d restore %g0, %i5, %o0
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
20040c4: 94 10 00 10 mov %l0, %o2
20040c8: 13 00 80 16 sethi %hi(0x2005800), %o1
20040cc: 40 00 0b 3a call 2006db4 <rtems_task_start>
20040d0: 92 12 62 00 or %o1, 0x200, %o1 ! 2005a00 <rtems_termios_rxdaemon>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
20040d4: 80 a2 20 00 cmp %o0, 0
20040d8: 12 80 00 ba bne 20043c0 <rtems_termios_open+0x3bc> <== NEVER TAKEN
20040dc: 94 10 00 10 mov %l0, %o2
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
20040e0: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0
20040e4: 13 00 80 17 sethi %hi(0x2005c00), %o1
20040e8: 40 00 0b 33 call 2006db4 <rtems_task_start>
20040ec: 92 12 60 84 or %o1, 0x84, %o1 ! 2005c84 <rtems_termios_txdaemon>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
20040f0: 80 a2 20 00 cmp %o0, 0
20040f4: 02 bf ff f0 be 20040b4 <rtems_termios_open+0xb0> <== ALWAYS TAKEN
20040f8: 01 00 00 00 nop
20040fc: 30 80 00 b1 b,a 20043c0 <rtems_termios_open+0x3bc> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004100: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
2004104: 7f ff fa 7a call 2002aec <calloc>
2004108: 92 10 20 e8 mov 0xe8, %o1
if (tty == NULL) {
200410c: a0 92 20 00 orcc %o0, 0, %l0
2004110: 02 80 00 9d be 2004384 <rtems_termios_open+0x380>
2004114: 03 00 80 73 sethi %hi(0x201cc00), %g1
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
2004118: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201cf8c <rtems_termios_raw_input_size>
200411c: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
2004120: d0 04 20 64 ld [ %l0 + 0x64 ], %o0
2004124: 7f ff fc 61 call 20032a8 <malloc>
2004128: 01 00 00 00 nop
200412c: d0 24 20 58 st %o0, [ %l0 + 0x58 ]
if (tty->rawInBuf.theBuf == NULL) {
2004130: 80 a2 20 00 cmp %o0, 0
2004134: 02 80 00 92 be 200437c <rtems_termios_open+0x378>
2004138: a6 10 00 08 mov %o0, %l3
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
200413c: 03 00 80 73 sethi %hi(0x201cc00), %g1
2004140: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 ! 201cf90 <rtems_termios_raw_output_size>
2004144: c2 24 20 88 st %g1, [ %l0 + 0x88 ]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
2004148: d0 04 20 88 ld [ %l0 + 0x88 ], %o0
200414c: 7f ff fc 57 call 20032a8 <malloc>
2004150: 01 00 00 00 nop
2004154: d0 24 20 7c st %o0, [ %l0 + 0x7c ]
if (tty->rawOutBuf.theBuf == NULL) {
2004158: 80 a2 20 00 cmp %o0, 0
200415c: 02 80 00 86 be 2004374 <rtems_termios_open+0x370>
2004160: a8 10 00 08 mov %o0, %l4
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
2004164: 03 00 80 73 sethi %hi(0x201cc00), %g1
2004168: 7f ff fc 50 call 20032a8 <malloc>
200416c: d0 00 63 94 ld [ %g1 + 0x394 ], %o0 ! 201cf94 <rtems_termios_cbufsize>
if (tty->cbuf == NULL) {
2004170: 80 a2 20 00 cmp %o0, 0
2004174: 02 80 00 7e be 200436c <rtems_termios_open+0x368> <== NEVER TAKEN
2004178: d0 24 20 1c st %o0, [ %l0 + 0x1c ]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
200417c: c0 24 20 d4 clr [ %l0 + 0xd4 ]
tty->tty_snd.sw_arg = NULL;
2004180: c0 24 20 d8 clr [ %l0 + 0xd8 ]
tty->tty_rcv.sw_pfn = NULL;
2004184: c0 24 20 dc clr [ %l0 + 0xdc ]
tty->tty_rcv.sw_arg = NULL;
2004188: c0 24 20 e0 clr [ %l0 + 0xe0 ]
tty->tty_rcvwakeup = 0;
200418c: c0 24 20 e4 clr [ %l0 + 0xe4 ]
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2004190: e2 24 00 00 st %l1, [ %l0 ]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
2004194: 80 a4 60 00 cmp %l1, 0
2004198: 02 80 00 03 be 20041a4 <rtems_termios_open+0x1a0>
200419c: c0 24 20 04 clr [ %l0 + 4 ]
rtems_termios_ttyHead->back = tty;
20041a0: e0 24 60 04 st %l0, [ %l1 + 4 ]
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
20041a4: 03 00 80 76 sethi %hi(0x201d800), %g1
20041a8: c4 00 61 84 ld [ %g1 + 0x184 ], %g2 ! 201d984 <rtems_termios_ttyTail>
20041ac: 80 a0 a0 00 cmp %g2, 0
20041b0: 02 80 00 9d be 2004424 <rtems_termios_open+0x420>
20041b4: e0 24 a1 88 st %l0, [ %l2 + 0x188 ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
20041b8: 23 00 80 73 sethi %hi(0x201cc00), %l1
20041bc: d0 4c 63 98 ldsb [ %l1 + 0x398 ], %o0 ! 201cf98 <c.6484>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
20041c0: 03 15 14 9a sethi %hi(0x54526800), %g1
20041c4: 82 10 61 00 or %g1, 0x100, %g1 ! 54526900 <RAM_END+0x52126900>
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
20041c8: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
tty->major = major;
20041cc: f0 24 20 0c st %i0, [ %l0 + 0xc ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
20041d0: 92 10 20 01 mov 1, %o1
20041d4: 94 10 20 54 mov 0x54, %o2
20041d8: 90 12 00 01 or %o0, %g1, %o0
20041dc: 96 10 20 00 clr %o3
20041e0: 40 00 09 35 call 20066b4 <rtems_semaphore_create>
20041e4: 98 04 20 14 add %l0, 0x14, %o4
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
20041e8: 80 a2 20 00 cmp %o0, 0
20041ec: 12 80 00 75 bne 20043c0 <rtems_termios_open+0x3bc>
20041f0: 03 15 14 9b sethi %hi(0x54526c00), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
20041f4: d0 4c 63 98 ldsb [ %l1 + 0x398 ], %o0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
20041f8: 82 10 63 00 or %g1, 0x300, %g1
20041fc: 92 10 20 01 mov 1, %o1
2004200: 94 10 20 54 mov 0x54, %o2
2004204: 90 12 00 01 or %o0, %g1, %o0
2004208: 96 10 20 00 clr %o3
200420c: 40 00 09 2a call 20066b4 <rtems_semaphore_create>
2004210: 98 04 20 18 add %l0, 0x18, %o4
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
2004214: 80 a2 20 00 cmp %o0, 0
2004218: 12 80 00 6a bne 20043c0 <rtems_termios_open+0x3bc>
200421c: 03 15 14 9e sethi %hi(0x54527800), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
2004220: d0 4c 63 98 ldsb [ %l1 + 0x398 ], %o0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
2004224: 92 10 20 00 clr %o1
2004228: 90 12 00 01 or %o0, %g1, %o0
200422c: 94 10 20 20 mov 0x20, %o2
2004230: 96 10 20 00 clr %o3
2004234: 40 00 09 20 call 20066b4 <rtems_semaphore_create>
2004238: 98 04 20 8c add %l0, 0x8c, %o4
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
200423c: 80 a2 20 00 cmp %o0, 0
2004240: 12 80 00 60 bne 20043c0 <rtems_termios_open+0x3bc>
2004244: 92 10 00 1b mov %i3, %o1
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
2004248: c0 24 20 94 clr [ %l0 + 0x94 ]
/*
* Set callbacks
*/
tty->device = *callbacks;
200424c: 90 04 20 98 add %l0, 0x98, %o0
2004250: 40 00 30 7b call 201043c <memcpy>
2004254: 94 10 20 20 mov 0x20, %o2
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004258: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
200425c: 80 a0 60 02 cmp %g1, 2
2004260: 02 80 00 5a be 20043c8 <rtems_termios_open+0x3c4>
2004264: d0 4c 63 98 ldsb [ %l1 + 0x398 ], %o0
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
2004268: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200426c: 80 a0 60 00 cmp %g1, 0
2004270: 02 80 00 49 be 2004394 <rtems_termios_open+0x390>
2004274: d0 4c 63 98 ldsb [ %l1 + 0x398 ], %o0
2004278: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
200427c: 80 a0 60 02 cmp %g1, 2
2004280: 02 80 00 46 be 2004398 <rtems_termios_open+0x394>
2004284: 03 15 14 9c sethi %hi(0x54527000), %g1
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
2004288: c0 24 20 b8 clr [ %l0 + 0xb8 ]
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
200428c: c8 04 20 64 ld [ %l0 + 0x64 ], %g4
tty->highwater = tty->rawInBuf.Size * 3/4;
2004290: c4 04 20 64 ld [ %l0 + 0x64 ], %g2
/*
* Bump name characer
*/
if (c++ == 'z')
2004294: c2 0c 63 98 ldub [ %l1 + 0x398 ], %g1
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
2004298: b7 28 a0 01 sll %g2, 1, %i3
200429c: 84 06 c0 02 add %i3, %g2, %g2
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
20042a0: 37 00 00 09 sethi %hi(0x2400), %i3
20042a4: b6 16 e1 02 or %i3, 0x102, %i3 ! 2502 <PROM_START+0x2502>
20042a8: f6 24 20 30 st %i3, [ %l0 + 0x30 ]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
20042ac: 37 00 00 06 sethi %hi(0x1800), %i3
20042b0: b6 16 e0 05 or %i3, 5, %i3 ! 1805 <PROM_START+0x1805>
20042b4: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
20042b8: b6 10 28 bd mov 0x8bd, %i3
20042bc: f6 24 20 38 st %i3, [ %l0 + 0x38 ]
tty->termios.c_lflag =
20042c0: 37 00 00 20 sethi %hi(0x8000), %i3
20042c4: b6 16 e2 3b or %i3, 0x23b, %i3 ! 823b <PROM_START+0x823b>
20042c8: f6 24 20 3c st %i3, [ %l0 + 0x3c ]
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
20042cc: b6 10 20 03 mov 3, %i3
20042d0: f6 2c 20 41 stb %i3, [ %l0 + 0x41 ]
tty->termios.c_cc[VQUIT] = '\034';
20042d4: b6 10 20 1c mov 0x1c, %i3
20042d8: f6 2c 20 42 stb %i3, [ %l0 + 0x42 ]
tty->termios.c_cc[VERASE] = '\177';
20042dc: b6 10 20 7f mov 0x7f, %i3
20042e0: f6 2c 20 43 stb %i3, [ %l0 + 0x43 ]
tty->termios.c_cc[VKILL] = '\025';
20042e4: b6 10 20 15 mov 0x15, %i3
20042e8: f6 2c 20 44 stb %i3, [ %l0 + 0x44 ]
tty->termios.c_cc[VEOF] = '\004';
20042ec: b6 10 20 04 mov 4, %i3
20042f0: f6 2c 20 45 stb %i3, [ %l0 + 0x45 ]
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
20042f4: b6 10 20 11 mov 0x11, %i3
20042f8: f6 2c 20 49 stb %i3, [ %l0 + 0x49 ]
tty->termios.c_cc[VSTOP] = '\023';
20042fc: b6 10 20 13 mov 0x13, %i3
2004300: f6 2c 20 4a stb %i3, [ %l0 + 0x4a ]
tty->termios.c_cc[VSUSP] = '\032';
2004304: b6 10 20 1a mov 0x1a, %i3
2004308: f6 2c 20 4b stb %i3, [ %l0 + 0x4b ]
tty->termios.c_cc[VREPRINT] = '\022';
200430c: b6 10 20 12 mov 0x12, %i3
2004310: f6 2c 20 4d stb %i3, [ %l0 + 0x4d ]
tty->termios.c_cc[VDISCARD] = '\017';
2004314: b6 10 20 0f mov 0xf, %i3
2004318: f6 2c 20 4e stb %i3, [ %l0 + 0x4e ]
tty->termios.c_cc[VWERASE] = '\027';
200431c: b6 10 20 17 mov 0x17, %i3
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
2004320: 86 00 60 01 add %g1, 1, %g3
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
2004324: 89 31 20 01 srl %g4, 1, %g4
tty->highwater = tty->rawInBuf.Size * 3/4;
2004328: 85 30 a0 02 srl %g2, 2, %g2
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
200432c: f6 2c 20 4f stb %i3, [ %l0 + 0x4f ]
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
2004330: c0 2c 20 4c clrb [ %l0 + 0x4c ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
2004334: b6 10 20 16 mov 0x16, %i3
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
2004338: c0 2c 20 51 clrb [ %l0 + 0x51 ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
200433c: f6 2c 20 50 stb %i3, [ %l0 + 0x50 ]
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
2004340: c8 24 20 bc st %g4, [ %l0 + 0xbc ]
tty->highwater = tty->rawInBuf.Size * 3/4;
2004344: c4 24 20 c0 st %g2, [ %l0 + 0xc0 ]
/*
* Bump name characer
*/
if (c++ == 'z')
2004348: 83 28 60 18 sll %g1, 0x18, %g1
200434c: 83 38 60 18 sra %g1, 0x18, %g1
2004350: 80 a0 60 7a cmp %g1, 0x7a
2004354: 12 bf ff 46 bne 200406c <rtems_termios_open+0x68>
2004358: c6 2c 63 98 stb %g3, [ %l1 + 0x398 ]
c = 'a';
200435c: 84 10 20 61 mov 0x61, %g2
2004360: 03 00 80 73 sethi %hi(0x201cc00), %g1
2004364: 10 bf ff 42 b 200406c <rtems_termios_open+0x68>
2004368: c4 28 63 98 stb %g2, [ %g1 + 0x398 ] ! 201cf98 <c.6484>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
200436c: 7f ff fa ed call 2002f20 <free> <== NOT EXECUTED
2004370: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
2004374: 7f ff fa eb call 2002f20 <free>
2004378: 90 10 00 13 mov %l3, %o0
free(tty);
200437c: 7f ff fa e9 call 2002f20 <free>
2004380: 90 10 00 10 mov %l0, %o0
rtems_semaphore_release (rtems_termios_ttyMutex);
2004384: d0 07 21 80 ld [ %i4 + 0x180 ], %o0
2004388: 40 00 09 bc call 2006a78 <rtems_semaphore_release>
200438c: ba 10 20 1a mov 0x1a, %i5
return RTEMS_NO_MEMORY;
2004390: 30 bf ff 4b b,a 20040bc <rtems_termios_open+0xb8>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
2004394: 03 15 14 9c sethi %hi(0x54527000), %g1
2004398: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <RAM_END+0x52127200>
200439c: 92 10 20 00 clr %o1
20043a0: 94 10 20 24 mov 0x24, %o2
20043a4: 90 12 00 01 or %o0, %g1, %o0
20043a8: 96 10 20 00 clr %o3
20043ac: 40 00 08 c2 call 20066b4 <rtems_semaphore_create>
20043b0: 98 04 20 68 add %l0, 0x68, %o4
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
20043b4: 80 a2 20 00 cmp %o0, 0
20043b8: 02 bf ff b4 be 2004288 <rtems_termios_open+0x284> <== ALWAYS TAKEN
20043bc: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
20043c0: 40 00 0b 28 call 2007060 <rtems_fatal_error_occurred>
20043c4: 01 00 00 00 nop
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
20043c8: 03 15 1e 15 sethi %hi(0x54785400), %g1
20043cc: 92 10 20 0a mov 0xa, %o1
20043d0: 90 12 00 01 or %o0, %g1, %o0
20043d4: 94 10 24 00 mov 0x400, %o2
20043d8: 96 10 25 00 mov 0x500, %o3
20043dc: 98 10 20 00 clr %o4
20043e0: 40 00 09 d1 call 2006b24 <rtems_task_create>
20043e4: 9a 04 20 c8 add %l0, 0xc8, %o5
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
20043e8: 80 a2 20 00 cmp %o0, 0
20043ec: 12 bf ff f5 bne 20043c0 <rtems_termios_open+0x3bc> <== NEVER TAKEN
20043f0: 03 14 9e 15 sethi %hi(0x52785400), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
20043f4: d0 4c 63 98 ldsb [ %l1 + 0x398 ], %o0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
20043f8: 92 10 20 09 mov 9, %o1
20043fc: 90 12 00 01 or %o0, %g1, %o0
2004400: 94 10 24 00 mov 0x400, %o2
2004404: 96 10 25 00 mov 0x500, %o3
2004408: 98 10 20 00 clr %o4
200440c: 40 00 09 c6 call 2006b24 <rtems_task_create>
2004410: 9a 04 20 c4 add %l0, 0xc4, %o5
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
2004414: 80 a2 20 00 cmp %o0, 0
2004418: 22 bf ff 95 be,a 200426c <rtems_termios_open+0x268> <== ALWAYS TAKEN
200441c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
2004420: 30 bf ff e8 b,a 20043c0 <rtems_termios_open+0x3bc> <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
2004424: 10 bf ff 65 b 20041b8 <rtems_termios_open+0x1b4>
2004428: e0 20 61 84 st %l0, [ %g1 + 0x184 ]
02004a50 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
2004a50: 9d e3 bf a0 save %sp, -96, %sp
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
2004a54: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1
2004a58: 80 a0 60 00 cmp %g1, 0
2004a5c: 22 80 00 44 be,a 2004b6c <rtems_termios_puts+0x11c>
2004a60: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
2004a64: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0
while (len) {
2004a68: 80 a6 60 00 cmp %i1, 0
2004a6c: 02 80 00 35 be 2004b40 <rtems_termios_puts+0xf0> <== NEVER TAKEN
2004a70: b6 10 20 02 mov 2, %i3
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
2004a74: a2 10 20 01 mov 1, %l1
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
2004a78: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1
2004a7c: 40 00 50 3a call 2018b64 <.urem>
2004a80: 90 04 20 01 add %l0, 1, %o0
rtems_interrupt_disable (level);
2004a84: 7f ff f5 d8 call 20021e4 <sparc_disable_interrupts>
2004a88: a0 10 00 08 mov %o0, %l0
2004a8c: ba 10 00 08 mov %o0, %i5
while (newHead == tty->rawOutBuf.Tail) {
2004a90: f8 06 a0 84 ld [ %i2 + 0x84 ], %i4
2004a94: 80 a7 00 10 cmp %i4, %l0
2004a98: 32 80 00 14 bne,a 2004ae8 <rtems_termios_puts+0x98>
2004a9c: c6 0e 00 00 ldub [ %i0 ], %g3
tty->rawOutBufState = rob_wait;
2004aa0: f6 26 a0 94 st %i3, [ %i2 + 0x94 ]
rtems_interrupt_enable (level);
2004aa4: 7f ff f5 d4 call 20021f4 <sparc_enable_interrupts>
2004aa8: 90 10 00 1d mov %i5, %o0
sc = rtems_semaphore_obtain(
2004aac: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0
2004ab0: 92 10 20 00 clr %o1
2004ab4: 40 00 07 a7 call 2006950 <rtems_semaphore_obtain>
2004ab8: 94 10 20 00 clr %o2
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004abc: 80 a2 20 00 cmp %o0, 0
2004ac0: 12 80 00 31 bne 2004b84 <rtems_termios_puts+0x134> <== NEVER TAKEN
2004ac4: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2004ac8: 7f ff f5 c7 call 20021e4 <sparc_disable_interrupts>
2004acc: 01 00 00 00 nop
2004ad0: ba 10 00 08 mov %o0, %i5
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
2004ad4: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1
2004ad8: 80 a0 40 1c cmp %g1, %i4
2004adc: 22 bf ff f2 be,a 2004aa4 <rtems_termios_puts+0x54> <== NEVER TAKEN
2004ae0: f6 26 a0 94 st %i3, [ %i2 + 0x94 ] <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
2004ae4: c6 0e 00 00 ldub [ %i0 ], %g3
2004ae8: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1
2004aec: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2
2004af0: b0 06 20 01 inc %i0
2004af4: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
2004af8: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
2004afc: e0 26 a0 80 st %l0, [ %i2 + 0x80 ]
if (tty->rawOutBufState == rob_idle) {
2004b00: 80 a0 60 00 cmp %g1, 0
2004b04: 12 80 00 0a bne 2004b2c <rtems_termios_puts+0xdc>
2004b08: 01 00 00 00 nop
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2004b0c: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1
2004b10: 80 88 60 10 btst 0x10, %g1
2004b14: 02 80 00 0d be 2004b48 <rtems_termios_puts+0xf8> <== ALWAYS TAKEN
2004b18: 01 00 00 00 nop
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
2004b1c: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
2004b20: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
2004b24: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
2004b28: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED
}
rtems_interrupt_enable (level);
2004b2c: 7f ff f5 b2 call 20021f4 <sparc_enable_interrupts>
2004b30: 90 10 00 1d mov %i5, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
2004b34: b2 86 7f ff addcc %i1, -1, %i1
2004b38: 12 bf ff d0 bne 2004a78 <rtems_termios_puts+0x28>
2004b3c: 01 00 00 00 nop
2004b40: 81 c7 e0 08 ret
2004b44: 81 e8 00 00 restore
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2004b48: c4 06 a0 84 ld [ %i2 + 0x84 ], %g2
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
2004b4c: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1
2004b50: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
2004b54: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
2004b58: 92 02 40 02 add %o1, %g2, %o1
2004b5c: 9f c0 40 00 call %g1
2004b60: 94 10 20 01 mov 1, %o2
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
2004b64: 10 bf ff f2 b 2004b2c <rtems_termios_puts+0xdc>
2004b68: e2 26 a0 94 st %l1, [ %i2 + 0x94 ]
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
2004b6c: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
2004b70: 92 10 00 18 mov %i0, %o1
2004b74: 9f c0 40 00 call %g1
2004b78: 94 10 00 19 mov %i1, %o2
return;
2004b7c: 81 c7 e0 08 ret
2004b80: 81 e8 00 00 restore
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2004b84: 40 00 09 37 call 2007060 <rtems_fatal_error_occurred> <== NOT EXECUTED
020052e0 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
20052e0: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20052e4: c2 06 00 00 ld [ %i0 ], %g1
uint32_t count = args->count;
20052e8: f4 06 20 14 ld [ %i0 + 0x14 ], %i2
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20052ec: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
uint32_t count = args->count;
char *buffer = args->buffer;
20052f0: e4 06 20 10 ld [ %i0 + 0x10 ], %l2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20052f4: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
20052f8: 92 10 20 00 clr %o1
20052fc: 40 00 05 95 call 2006950 <rtems_semaphore_obtain>
2005300: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2005304: a0 92 20 00 orcc %o0, 0, %l0
2005308: 12 80 00 10 bne 2005348 <rtems_termios_read+0x68> <== NEVER TAKEN
200530c: 03 00 80 75 sethi %hi(0x201d400), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
2005310: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005314: 85 28 a0 05 sll %g2, 5, %g2
2005318: 82 10 62 b0 or %g1, 0x2b0, %g1
200531c: 82 00 40 02 add %g1, %g2, %g1
2005320: c2 00 60 08 ld [ %g1 + 8 ], %g1
2005324: 80 a0 60 00 cmp %g1, 0
2005328: 02 80 00 0a be 2005350 <rtems_termios_read+0x70>
200532c: 90 10 00 1d mov %i5, %o0
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
2005330: 9f c0 40 00 call %g1
2005334: 92 10 00 18 mov %i0, %o1
2005338: a0 10 00 08 mov %o0, %l0
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
200533c: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
2005340: 40 00 05 ce call 2006a78 <rtems_semaphore_release>
2005344: c0 27 60 e4 clr [ %i5 + 0xe4 ]
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
2005348: 81 c7 e0 08 ret
200534c: 91 e8 00 10 restore %g0, %l0, %o0
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
2005350: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
2005354: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2005358: 80 a0 80 01 cmp %g2, %g1
200535c: 22 80 00 20 be,a 20053dc <rtems_termios_read+0xfc> <== ALWAYS TAKEN
2005360: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2005364: 80 a6 a0 00 cmp %i2, 0
2005368: 22 80 00 15 be,a 20053bc <rtems_termios_read+0xdc> <== NEVER TAKEN
200536c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
2005370: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
2005374: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2005378: 80 a0 40 02 cmp %g1, %g2
200537c: 36 80 00 10 bge,a 20053bc <rtems_termios_read+0xdc> <== NEVER TAKEN
2005380: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
2005384: 10 80 00 06 b 200539c <rtems_termios_read+0xbc>
2005388: a4 24 80 01 sub %l2, %g1, %l2
200538c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2005390: 80 a0 80 01 cmp %g2, %g1
2005394: 24 80 00 0a ble,a 20053bc <rtems_termios_read+0xdc>
2005398: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
*buffer++ = tty->cbuf[tty->cindex++];
200539c: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
20053a0: b4 86 bf ff addcc %i2, -1, %i2
*buffer++ = tty->cbuf[tty->cindex++];
20053a4: c4 08 80 01 ldub [ %g2 + %g1 ], %g2
20053a8: c4 2c 80 01 stb %g2, [ %l2 + %g1 ]
20053ac: 82 00 60 01 inc %g1
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
20053b0: 12 bf ff f7 bne 200538c <rtems_termios_read+0xac>
20053b4: c2 27 60 24 st %g1, [ %i5 + 0x24 ]
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
20053b8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
20053bc: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
20053c0: b4 20 40 1a sub %g1, %i2, %i2
20053c4: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
tty->tty_rcvwakeup = 0;
20053c8: c0 27 60 e4 clr [ %i5 + 0xe4 ]
rtems_semaphore_release (tty->isem);
20053cc: 40 00 05 ab call 2006a78 <rtems_semaphore_release>
20053d0: b0 10 00 10 mov %l0, %i0
return sc;
}
20053d4: 81 c7 e0 08 ret
20053d8: 81 e8 00 00 restore
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
20053dc: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
20053e0: c0 27 60 20 clr [ %i5 + 0x20 ]
20053e4: c0 27 60 24 clr [ %i5 + 0x24 ]
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
20053e8: 80 a0 60 00 cmp %g1, 0
20053ec: 02 80 00 06 be 2005404 <rtems_termios_read+0x124>
20053f0: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
20053f4: c4 07 60 b4 ld [ %i5 + 0xb4 ], %g2
20053f8: 80 a0 a0 00 cmp %g2, 0
20053fc: 22 80 00 73 be,a 20055c8 <rtems_termios_read+0x2e8>
2005400: c4 07 60 3c ld [ %i5 + 0x3c ], %g2
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
2005404: f8 07 60 74 ld [ %i5 + 0x74 ], %i4
rtems_status_code sc;
int wait = (int)1;
2005408: b6 10 20 01 mov 1, %i3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
200540c: 23 00 80 73 sethi %hi(0x201cc00), %l1
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
2005410: a6 07 60 49 add %i5, 0x49, %l3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005414: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
2005418: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
200541c: 80 a0 80 01 cmp %g2, %g1
2005420: 02 80 00 51 be 2005564 <rtems_termios_read+0x284>
2005424: c4 04 63 94 ld [ %l1 + 0x394 ], %g2
2005428: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
(tty->ccount < (CBUFSIZE-1))) {
200542c: 84 00 bf ff add %g2, -1, %g2
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005430: 80 a0 80 01 cmp %g2, %g1
2005434: 14 80 00 14 bg 2005484 <rtems_termios_read+0x1a4> <== ALWAYS TAKEN
2005438: b2 14 63 94 or %l1, 0x394, %i1
}
/*
* Wait for characters
*/
if ( wait ) {
200543c: 10 80 00 4b b 2005568 <rtems_termios_read+0x288> <== NOT EXECUTED
2005440: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
2005444: 7f ff ff 62 call 20051cc <siproc>
2005448: 01 00 00 00 nop
wait = 0;
200544c: 80 a0 00 08 cmp %g0, %o0
2005450: 82 40 3f ff addx %g0, -1, %g1
2005454: b6 0e c0 01 and %i3, %g1, %i3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005458: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
200545c: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2005460: 80 a0 80 01 cmp %g2, %g1
2005464: 02 80 00 40 be 2005564 <rtems_termios_read+0x284>
2005468: f8 07 60 70 ld [ %i5 + 0x70 ], %i4
(tty->ccount < (CBUFSIZE-1))) {
200546c: c2 06 40 00 ld [ %i1 ], %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005470: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
(tty->ccount < (CBUFSIZE-1))) {
2005474: 82 00 7f ff add %g1, -1, %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005478: 80 a0 80 01 cmp %g2, %g1
200547c: 16 80 00 3b bge 2005568 <rtems_termios_read+0x288> <== NEVER TAKEN
2005480: 80 a6 e0 00 cmp %i3, 0
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
2005484: d0 07 60 5c ld [ %i5 + 0x5c ], %o0
2005488: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
200548c: 40 00 4d b6 call 2018b64 <.urem>
2005490: 90 02 20 01 inc %o0
c = tty->rawInBuf.theBuf[newHead];
2005494: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
2005498: f8 08 40 08 ldub [ %g1 + %o0 ], %i4
tty->rawInBuf.Head = newHead;
200549c: d0 27 60 5c st %o0, [ %i5 + 0x5c ]
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
20054a0: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
20054a4: c4 07 60 64 ld [ %i5 + 0x64 ], %g2
% tty->rawInBuf.Size)
20054a8: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
20054ac: 82 00 80 01 add %g2, %g1, %g1
% tty->rawInBuf.Size)
20054b0: 40 00 4d ad call 2018b64 <.urem>
20054b4: 90 20 40 08 sub %g1, %o0, %o0
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
20054b8: c2 07 60 bc ld [ %i5 + 0xbc ], %g1
20054bc: 80 a2 00 01 cmp %o0, %g1
20054c0: 3a 80 00 18 bcc,a 2005520 <rtems_termios_read+0x240> <== NEVER TAKEN
20054c4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
20054c8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20054cc: 82 08 7f fe and %g1, -2, %g1
20054d0: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
20054d4: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20054d8: 82 08 62 02 and %g1, 0x202, %g1
20054dc: 80 a0 62 02 cmp %g1, 0x202
20054e0: 22 80 00 2c be,a 2005590 <rtems_termios_read+0x2b0> <== NEVER TAKEN
20054e4: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
20054e8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20054ec: 80 88 61 00 btst 0x100, %g1
20054f0: 22 80 00 0c be,a 2005520 <rtems_termios_read+0x240> <== ALWAYS TAKEN
20054f4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
tty->flow_ctrl &= ~FL_IRTSOFF;
20054f8: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
20054fc: c2 07 60 b0 ld [ %i5 + 0xb0 ], %g1 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
2005500: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED
2005504: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2005508: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200550c: 22 80 00 05 be,a 2005520 <rtems_termios_read+0x240> <== NOT EXECUTED
2005510: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2005514: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005518: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
200551c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
if (siproc (c, tty))
2005520: 90 0f 20 ff and %i4, 0xff, %o0
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2005524: 80 88 60 02 btst 2, %g1
2005528: 12 bf ff c7 bne 2005444 <rtems_termios_read+0x164> <== ALWAYS TAKEN
200552c: 92 10 00 1d mov %i5, %o1
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
2005530: 7f ff ff 27 call 20051cc <siproc> <== NOT EXECUTED
2005534: 01 00 00 00 nop <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
2005538: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1 <== NOT EXECUTED
200553c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED
2005540: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2005544: 06 bf ff c5 bl 2005458 <rtems_termios_read+0x178> <== NOT EXECUTED
2005548: 01 00 00 00 nop <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
200554c: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
2005550: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
2005554: b6 10 20 00 clr %i3 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005558: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200555c: 12 bf ff c4 bne 200546c <rtems_termios_read+0x18c> <== NOT EXECUTED
2005560: f8 07 60 70 ld [ %i5 + 0x70 ], %i4 <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
2005564: 80 a6 e0 00 cmp %i3, 0
2005568: 02 bf ff 80 be 2005368 <rtems_termios_read+0x88>
200556c: 80 a6 a0 00 cmp %i2, 0
sc = rtems_semaphore_obtain(
2005570: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2005574: d2 07 60 6c ld [ %i5 + 0x6c ], %o1
2005578: 40 00 04 f6 call 2006950 <rtems_semaphore_obtain>
200557c: 94 10 00 1c mov %i4, %o2
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
2005580: 80 a2 20 00 cmp %o0, 0
2005584: 02 bf ff a4 be 2005414 <rtems_termios_read+0x134> <== ALWAYS TAKEN
2005588: 80 a6 a0 00 cmp %i2, 0
200558c: 30 bf ff 77 b,a 2005368 <rtems_termios_read+0x88> <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
2005590: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005594: 22 80 00 07 be,a 20055b0 <rtems_termios_read+0x2d0> <== NOT EXECUTED
2005598: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
200559c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
20055a0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20055a4: 02 bf ff d1 be 20054e8 <rtems_termios_read+0x208> <== NOT EXECUTED
20055a8: 01 00 00 00 nop <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
20055ac: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
20055b0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
20055b4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
20055b8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20055bc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
20055c0: 10 bf ff d8 b 2005520 <rtems_termios_read+0x240> <== NOT EXECUTED
20055c4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20055c8: 80 88 a0 02 btst 2, %g2
20055cc: 02 80 00 0e be 2005604 <rtems_termios_read+0x324>
20055d0: 01 00 00 00 nop
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
20055d4: 9f c0 40 00 call %g1
20055d8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if (n < 0) {
20055dc: 80 a2 20 00 cmp %o0, 0
20055e0: 06 80 00 3a bl 20056c8 <rtems_termios_read+0x3e8>
20055e4: 90 0a 20 ff and %o0, 0xff, %o0
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
20055e8: 7f ff fe f9 call 20051cc <siproc>
20055ec: 92 10 00 1d mov %i5, %o1
20055f0: 80 a2 20 00 cmp %o0, 0
20055f4: 12 bf ff 5d bne 2005368 <rtems_termios_read+0x88>
20055f8: 80 a6 a0 00 cmp %i2, 0
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20055fc: 10 bf ff f6 b 20055d4 <rtems_termios_read+0x2f4>
2005600: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
2005604: 40 00 03 0e call 200623c <rtems_clock_get_ticks_since_boot>
2005608: 01 00 00 00 nop
200560c: b8 10 00 08 mov %o0, %i4
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2005610: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
2005614: 9f c0 40 00 call %g1
2005618: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if (n < 0) {
200561c: 80 a2 20 00 cmp %o0, 0
2005620: 06 80 00 10 bl 2005660 <rtems_termios_read+0x380>
2005624: 90 0a 20 ff and %o0, 0xff, %o0
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
2005628: 7f ff fe e9 call 20051cc <siproc>
200562c: 92 10 00 1d mov %i5, %o1
if (tty->ccount >= tty->termios.c_cc[VMIN])
2005630: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
2005634: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2005638: 80 a0 80 01 cmp %g2, %g1
200563c: 16 bf ff 4a bge 2005364 <rtems_termios_read+0x84>
2005640: 80 a0 60 00 cmp %g1, 0
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2005644: 22 bf ff f4 be,a 2005614 <rtems_termios_read+0x334> <== NEVER TAKEN
2005648: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 <== NOT EXECUTED
200564c: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
2005650: 80 a0 60 00 cmp %g1, 0
2005654: 22 bf ff f0 be,a 2005614 <rtems_termios_read+0x334> <== NEVER TAKEN
2005658: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 <== NOT EXECUTED
200565c: 30 bf ff ea b,a 2005604 <rtems_termios_read+0x324>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
2005660: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
2005664: 80 a0 60 00 cmp %g1, 0
2005668: 02 80 00 0d be 200569c <rtems_termios_read+0x3bc> <== NEVER TAKEN
200566c: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
if (tty->termios.c_cc[VTIME] && tty->ccount) {
2005670: 80 a0 60 00 cmp %g1, 0
2005674: 02 80 00 06 be 200568c <rtems_termios_read+0x3ac> <== NEVER TAKEN
2005678: 01 00 00 00 nop
200567c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2005680: 80 a0 60 00 cmp %g1, 0
2005684: 12 80 00 09 bne 20056a8 <rtems_termios_read+0x3c8>
2005688: 01 00 00 00 nop
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
200568c: 40 00 05 e5 call 2006e20 <rtems_task_wake_after>
2005690: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2005694: 10 bf ff e0 b 2005614 <rtems_termios_read+0x334>
2005698: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
200569c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20056a0: 02 bf ff 32 be 2005368 <rtems_termios_read+0x88> <== NOT EXECUTED
20056a4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
20056a8: 40 00 02 e5 call 200623c <rtems_clock_get_ticks_since_boot>
20056ac: 01 00 00 00 nop
if ((now - then) > tty->vtimeTicks) {
20056b0: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
20056b4: 90 22 00 1c sub %o0, %i4, %o0
20056b8: 80 a2 00 01 cmp %o0, %g1
20056bc: 08 bf ff f4 bleu 200568c <rtems_termios_read+0x3ac>
20056c0: 80 a6 a0 00 cmp %i2, 0
20056c4: 30 bf ff 29 b,a 2005368 <rtems_termios_read+0x88>
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
20056c8: 40 00 05 d6 call 2006e20 <rtems_task_wake_after>
20056cc: 90 10 20 01 mov 1, %o0
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20056d0: 10 bf ff c1 b 20055d4 <rtems_termios_read+0x2f4>
20056d4: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
02005a84 <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
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
2005a84: 9d e3 bf a0 save %sp, -96, %sp
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
2005a88: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
2005a8c: 82 08 64 03 and %g1, 0x403, %g1
2005a90: 80 a0 64 01 cmp %g1, 0x401
2005a94: 02 80 00 44 be 2005ba4 <rtems_termios_refill_transmitter+0x120><== NEVER TAKEN
2005a98: ba 10 00 18 mov %i0, %i5
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
2005a9c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
2005aa0: 82 08 60 03 and %g1, 3, %g1
2005aa4: 80 a0 60 02 cmp %g1, 2
2005aa8: 22 80 00 50 be,a 2005be8 <rtems_termios_refill_transmitter+0x164><== NEVER TAKEN
2005aac: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2005ab0: c4 06 20 80 ld [ %i0 + 0x80 ], %g2
2005ab4: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2005ab8: 80 a0 80 01 cmp %g2, %g1
2005abc: 22 80 00 30 be,a 2005b7c <rtems_termios_refill_transmitter+0xf8>
2005ac0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
2005ac4: 7f ff f1 c8 call 20021e4 <sparc_disable_interrupts>
2005ac8: 01 00 00 00 nop
len = tty->t_dqlen;
2005acc: f8 06 20 90 ld [ %i0 + 0x90 ], %i4
tty->t_dqlen = 0;
2005ad0: c0 26 20 90 clr [ %i0 + 0x90 ]
rtems_interrupt_enable(level);
2005ad4: 7f ff f1 c8 call 20021f4 <sparc_enable_interrupts>
2005ad8: 01 00 00 00 nop
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
2005adc: d0 06 20 84 ld [ %i0 + 0x84 ], %o0
2005ae0: d2 06 20 88 ld [ %i0 + 0x88 ], %o1
2005ae4: 40 00 4c 20 call 2018b64 <.urem>
2005ae8: 90 07 00 08 add %i4, %o0, %o0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
2005aec: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
2005af0: d0 27 60 84 st %o0, [ %i5 + 0x84 ]
if (tty->rawOutBufState == rob_wait) {
2005af4: 80 a0 60 02 cmp %g1, 2
2005af8: 02 80 00 55 be 2005c4c <rtems_termios_refill_transmitter+0x1c8>
2005afc: b8 10 00 08 mov %o0, %i4
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
2005b00: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2005b04: 80 a0 40 1c cmp %g1, %i4
2005b08: 22 80 00 48 be,a 2005c28 <rtems_termios_refill_transmitter+0x1a4>
2005b0c: c2 07 60 d4 ld [ %i5 + 0xd4 ], %g1
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2005b10: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005b14: 82 08 62 10 and %g1, 0x210, %g1
2005b18: 80 a0 62 10 cmp %g1, 0x210
2005b1c: 02 80 00 4f be 2005c58 <rtems_termios_refill_transmitter+0x1d4><== NEVER TAKEN
2005b20: 01 00 00 00 nop
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2005b24: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2005b28: 80 a7 00 01 cmp %i4, %g1
2005b2c: 18 80 00 1b bgu 2005b98 <rtems_termios_refill_transmitter+0x114>
2005b30: 01 00 00 00 nop
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
2005b34: f0 07 60 80 ld [ %i5 + 0x80 ], %i0
2005b38: b0 26 00 1c sub %i0, %i4, %i0
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
2005b3c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005b40: 80 88 66 00 btst 0x600, %g1
2005b44: 02 80 00 04 be 2005b54 <rtems_termios_refill_transmitter+0xd0>
2005b48: 94 10 00 18 mov %i0, %o2
2005b4c: 94 10 20 01 mov 1, %o2
nToSend = 1;
2005b50: b0 10 20 01 mov 1, %i0
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
2005b54: d2 07 60 7c ld [ %i5 + 0x7c ], %o1
2005b58: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1
2005b5c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
2005b60: 84 10 20 01 mov 1, %g2
(*tty->device.write)(
2005b64: 92 02 40 1c add %o1, %i4, %o1
2005b68: 9f c0 40 00 call %g1
2005b6c: c4 27 60 94 st %g2, [ %i5 + 0x94 ]
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2005b70: f8 27 60 84 st %i4, [ %i5 + 0x84 ]
}
return nToSend;
}
2005b74: 81 c7 e0 08 ret
2005b78: 81 e8 00 00 restore
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
2005b7c: 80 a0 60 02 cmp %g1, 2
2005b80: 12 bf ff fd bne 2005b74 <rtems_termios_refill_transmitter+0xf0><== ALWAYS TAKEN
2005b84: b0 10 20 00 clr %i0
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2005b88: 40 00 03 bc call 2006a78 <rtems_semaphore_release> <== NOT EXECUTED
2005b8c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
2005b90: 81 c7 e0 08 ret <== NOT EXECUTED
2005b94: 81 e8 00 00 restore <== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
2005b98: f0 07 60 88 ld [ %i5 + 0x88 ], %i0
2005b9c: 10 bf ff e8 b 2005b3c <rtems_termios_refill_transmitter+0xb8>
2005ba0: b0 26 00 1c sub %i0, %i4, %i0
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
2005ba4: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
2005ba8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2005bac: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED
2005bb0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005bb4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
rtems_interrupt_disable(level);
2005bb8: 7f ff f1 8b call 20021e4 <sparc_disable_interrupts> <== NOT EXECUTED
2005bbc: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2005bc0: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2005bc4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2005bc8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2005bcc: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2005bd0: c4 27 60 90 st %g2, [ %i5 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005bd4: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2005bd8: 7f ff f1 87 call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
2005bdc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2005be0: 81 c7 e0 08 ret <== NOT EXECUTED
2005be4: 81 e8 00 00 restore <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
2005be8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2005bec: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED
2005bf0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005bf4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
rtems_interrupt_disable(level);
2005bf8: 7f ff f1 7b call 20021e4 <sparc_disable_interrupts> <== NOT EXECUTED
2005bfc: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2005c00: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005c04: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2005c08: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005c0c: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2005c10: c4 27 60 90 st %g2, [ %i5 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005c14: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2005c18: 7f ff f1 77 call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
2005c1c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2005c20: 81 c7 e0 08 ret <== NOT EXECUTED
2005c24: 81 e8 00 00 restore <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2005c28: c0 27 60 94 clr [ %i5 + 0x94 ]
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2005c2c: 80 a0 60 00 cmp %g1, 0
2005c30: 02 bf ff d0 be 2005b70 <rtems_termios_refill_transmitter+0xec><== ALWAYS TAKEN
2005c34: b0 10 20 00 clr %i0
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2005c38: d2 07 60 d8 ld [ %i5 + 0xd8 ], %o1 <== NOT EXECUTED
2005c3c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005c40: 90 07 60 30 add %i5, 0x30, %o0 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2005c44: f8 27 60 84 st %i4, [ %i5 + 0x84 ] <== NOT EXECUTED
2005c48: 30 bf ff f6 b,a 2005c20 <rtems_termios_refill_transmitter+0x19c><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2005c4c: 40 00 03 8b call 2006a78 <rtems_semaphore_release>
2005c50: d0 06 20 8c ld [ %i0 + 0x8c ], %o0
2005c54: 30 bf ff ab b,a 2005b00 <rtems_termios_refill_transmitter+0x7c>
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
2005c58: 7f ff f1 63 call 20021e4 <sparc_disable_interrupts> <== NOT EXECUTED
2005c5c: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
2005c60: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2005c64: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
2005c68: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2005c6c: c4 27 60 94 st %g2, [ %i5 + 0x94 ] <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
2005c70: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
2005c74: 7f ff f1 60 call 20021f4 <sparc_enable_interrupts> <== NOT EXECUTED
2005c78: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2005c7c: f8 27 60 84 st %i4, [ %i5 + 0x84 ] <== NOT EXECUTED
2005c80: 30 bf ff e8 b,a 2005c20 <rtems_termios_refill_transmitter+0x19c><== NOT EXECUTED
02005a00 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
2005a00: 9d e3 bf 98 save %sp, -104, %sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2005a04: 10 80 00 08 b 2005a24 <rtems_termios_rxdaemon+0x24>
2005a08: 96 07 bf f8 add %fp, -8, %o3
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
2005a0c: 9f c0 40 00 call %g1
2005a10: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
if (c != EOF) {
2005a14: 80 a2 3f ff cmp %o0, -1
2005a18: 32 80 00 15 bne,a 2005a6c <rtems_termios_rxdaemon+0x6c>
2005a1c: d0 2f bf ff stb %o0, [ %fp + -1 ]
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2005a20: 96 07 bf f8 add %fp, -8, %o3
2005a24: 92 10 20 02 mov 2, %o1
2005a28: 94 10 20 00 clr %o2
2005a2c: 40 00 02 27 call 20062c8 <rtems_event_receive>
2005a30: 90 10 20 03 mov 3, %o0
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
2005a34: c2 07 bf f8 ld [ %fp + -8 ], %g1
2005a38: 80 88 60 01 btst 1, %g1
2005a3c: 22 bf ff f4 be,a 2005a0c <rtems_termios_rxdaemon+0xc> <== ALWAYS TAKEN
2005a40: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1
tty->rxTaskId = 0;
2005a44: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2005a48: 40 00 04 81 call 2006c4c <rtems_task_delete> <== NOT EXECUTED
2005a4c: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
2005a50: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
2005a54: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005a58: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
if (c != EOF) {
2005a5c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2005a60: 22 bf ff f1 be,a 2005a24 <rtems_termios_rxdaemon+0x24> <== NOT EXECUTED
2005a64: 96 07 bf f8 add %fp, -8, %o3 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
2005a68: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
2005a6c: 92 07 bf ff add %fp, -1, %o1
2005a70: 90 10 00 18 mov %i0, %o0
2005a74: 7f ff ff 1e call 20056ec <rtems_termios_enqueue_raw_characters>
2005a78: 94 10 20 01 mov 1, %o2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2005a7c: 10 bf ff ea b 2005a24 <rtems_termios_rxdaemon+0x24>
2005a80: 96 07 bf f8 add %fp, -8, %o3
02005c84 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
2005c84: 9d e3 bf 98 save %sp, -104, %sp
2005c88: 3b 00 80 75 sethi %hi(0x201d400), %i5
2005c8c: 10 80 00 0c b 2005cbc <rtems_termios_txdaemon+0x38>
2005c90: ba 17 62 b0 or %i5, 0x2b0, %i5 ! 201d6b0 <rtems_termios_linesw>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2005c94: 83 28 60 05 sll %g1, 5, %g1
2005c98: 82 07 40 01 add %i5, %g1, %g1
2005c9c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2005ca0: 80 a0 60 00 cmp %g1, 0
2005ca4: 02 80 00 04 be 2005cb4 <rtems_termios_txdaemon+0x30> <== ALWAYS TAKEN
2005ca8: 90 10 00 18 mov %i0, %o0
rtems_termios_linesw[tty->t_line].l_start(tty);
2005cac: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005cb0: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
2005cb4: 7f ff ff 74 call 2005a84 <rtems_termios_refill_transmitter>
2005cb8: 90 10 00 18 mov %i0, %o0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2005cbc: 92 10 20 02 mov 2, %o1
2005cc0: 94 10 20 00 clr %o2
2005cc4: 96 07 bf fc add %fp, -4, %o3
2005cc8: 40 00 01 80 call 20062c8 <rtems_event_receive>
2005ccc: 90 10 20 03 mov 3, %o0
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
2005cd0: c2 07 bf fc ld [ %fp + -4 ], %g1
2005cd4: 80 88 60 01 btst 1, %g1
2005cd8: 22 bf ff ef be,a 2005c94 <rtems_termios_txdaemon+0x10> <== ALWAYS TAKEN
2005cdc: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
tty->txTaskId = 0;
2005ce0: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2005ce4: 40 00 03 da call 2006c4c <rtems_task_delete> <== NOT EXECUTED
2005ce8: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2005cec: 10 bf ff ea b 2005c94 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
2005cf0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
02005214 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2005214: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005218: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200521c: 92 10 20 00 clr %o1
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005220: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2005224: 94 10 20 00 clr %o2
2005228: 40 00 05 ca call 2006950 <rtems_semaphore_obtain>
200522c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2005230: b8 92 20 00 orcc %o0, 0, %i4
2005234: 12 80 00 0f bne 2005270 <rtems_termios_write+0x5c> <== NEVER TAKEN
2005238: 03 00 80 75 sethi %hi(0x201d400), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
200523c: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005240: 85 28 a0 05 sll %g2, 5, %g2
2005244: 82 10 62 b0 or %g1, 0x2b0, %g1
2005248: 82 00 40 02 add %g1, %g2, %g1
200524c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2005250: 80 a0 60 00 cmp %g1, 0
2005254: 02 80 00 09 be 2005278 <rtems_termios_write+0x64>
2005258: 90 10 00 1d mov %i5, %o0
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
200525c: 9f c0 40 00 call %g1
2005260: 92 10 00 18 mov %i0, %o1
2005264: b8 10 00 08 mov %o0, %i4
rtems_semaphore_release (tty->osem);
2005268: 40 00 06 04 call 2006a78 <rtems_semaphore_release>
200526c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
2005270: 81 c7 e0 08 ret
2005274: 91 e8 00 1c restore %g0, %i4, %o0
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
2005278: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
200527c: 80 88 60 01 btst 1, %g1
2005280: 22 80 00 14 be,a 20052d0 <rtems_termios_write+0xbc> <== NEVER TAKEN
2005284: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
2005288: f4 1e 20 10 ldd [ %i0 + 0x10 ], %i2
while (count--)
200528c: 80 a6 e0 00 cmp %i3, 0
2005290: 02 80 00 0a be 20052b8 <rtems_termios_write+0xa4> <== NEVER TAKEN
2005294: 82 10 20 00 clr %g1
oproc (*buffer++, tty);
2005298: d0 0e 80 00 ldub [ %i2 ], %o0
200529c: 92 10 00 1d mov %i5, %o1
20052a0: 7f ff fe 3c call 2004b90 <oproc>
20052a4: 90 0a 20 ff and %o0, 0xff, %o0
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
20052a8: b6 86 ff ff addcc %i3, -1, %i3
20052ac: 12 bf ff fb bne 2005298 <rtems_termios_write+0x84>
20052b0: b4 06 a0 01 inc %i2
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
20052b4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
}
rtems_semaphore_release (tty->osem);
20052b8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
20052bc: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
}
rtems_semaphore_release (tty->osem);
20052c0: 40 00 05 ee call 2006a78 <rtems_semaphore_release>
20052c4: b0 10 00 1c mov %i4, %i0
return sc;
}
20052c8: 81 c7 e0 08 ret
20052cc: 81 e8 00 00 restore
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
20052d0: 7f ff fd e0 call 2004a50 <rtems_termios_puts> <== NOT EXECUTED
20052d4: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
args->bytes_moved = args->count;
20052d8: 10 bf ff f8 b 20052b8 <rtems_termios_write+0xa4> <== NOT EXECUTED
20052dc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
02015e58 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
2015e58: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2015e5c: 11 00 80 f0 sethi %hi(0x203c000), %o0
2015e60: 92 10 00 18 mov %i0, %o1
2015e64: 90 12 21 84 or %o0, 0x184, %o0
2015e68: 40 00 0c c9 call 201918c <_Objects_Get>
2015e6c: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2015e70: c2 07 bf fc ld [ %fp + -4 ], %g1
2015e74: 80 a0 60 00 cmp %g1, 0
2015e78: 12 80 00 0c bne 2015ea8 <rtems_timer_cancel+0x50>
2015e7c: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2015e80: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2015e84: 80 a0 60 04 cmp %g1, 4
2015e88: 02 80 00 04 be 2015e98 <rtems_timer_cancel+0x40> <== NEVER TAKEN
2015e8c: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2015e90: 40 00 15 9b call 201b4fc <_Watchdog_Remove>
2015e94: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2015e98: 40 00 10 bb call 201a184 <_Thread_Enable_dispatch>
2015e9c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2015ea0: 81 c7 e0 08 ret
2015ea4: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2015ea8: 81 c7 e0 08 ret
2015eac: 91 e8 20 04 restore %g0, 4, %o0
02016380 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2016380: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
2016384: 03 00 80 f0 sethi %hi(0x203c000), %g1
2016388: fa 00 61 c4 ld [ %g1 + 0x1c4 ], %i5 ! 203c1c4 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
201638c: b8 10 00 18 mov %i0, %i4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
2016390: 80 a7 60 00 cmp %i5, 0
2016394: 02 80 00 32 be 201645c <rtems_timer_server_fire_when+0xdc>
2016398: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
201639c: 03 00 80 ee sethi %hi(0x203b800), %g1
20163a0: c2 08 60 10 ldub [ %g1 + 0x10 ], %g1 ! 203b810 <_TOD_Is_set>
20163a4: 80 a0 60 00 cmp %g1, 0
20163a8: 02 80 00 2d be 201645c <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
20163ac: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
20163b0: 80 a6 a0 00 cmp %i2, 0
20163b4: 02 80 00 2a be 201645c <rtems_timer_server_fire_when+0xdc>
20163b8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
20163bc: 90 10 00 19 mov %i1, %o0
20163c0: 7f ff f3 b9 call 20132a4 <_TOD_Validate>
20163c4: b0 10 20 14 mov 0x14, %i0
20163c8: 80 8a 20 ff btst 0xff, %o0
20163cc: 02 80 00 24 be 201645c <rtems_timer_server_fire_when+0xdc>
20163d0: 01 00 00 00 nop
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
20163d4: 7f ff f3 80 call 20131d4 <_TOD_To_seconds>
20163d8: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
20163dc: 21 00 80 ee sethi %hi(0x203b800), %l0
20163e0: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ! 203b88c <_TOD_Now>
20163e4: 80 a2 00 01 cmp %o0, %g1
20163e8: 08 80 00 1d bleu 201645c <rtems_timer_server_fire_when+0xdc>
20163ec: b2 10 00 08 mov %o0, %i1
20163f0: 92 10 00 1c mov %i4, %o1
20163f4: 11 00 80 f0 sethi %hi(0x203c000), %o0
20163f8: 94 07 bf fc add %fp, -4, %o2
20163fc: 40 00 0b 64 call 201918c <_Objects_Get>
2016400: 90 12 21 84 or %o0, 0x184, %o0
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2016404: c2 07 bf fc ld [ %fp + -4 ], %g1
2016408: 80 a0 60 00 cmp %g1, 0
201640c: 12 80 00 16 bne 2016464 <rtems_timer_server_fire_when+0xe4>
2016410: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2016414: 40 00 14 3a call 201b4fc <_Watchdog_Remove>
2016418: 90 02 20 10 add %o0, 0x10, %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
201641c: c4 04 20 8c ld [ %l0 + 0x8c ], %g2
(*timer_server->schedule_operation)( timer_server, the_timer );
2016420: c2 07 60 04 ld [ %i5 + 4 ], %g1
2016424: 92 10 00 18 mov %i0, %o1
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
2016428: b2 26 40 02 sub %i1, %g2, %i1
(*timer_server->schedule_operation)( timer_server, the_timer );
201642c: 90 10 00 1d mov %i5, %o0
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
2016430: 84 10 20 03 mov 3, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2016434: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
2016438: c4 26 20 38 st %g2, [ %i0 + 0x38 ]
the_watchdog->id = id;
201643c: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
the_watchdog->user_data = user_data;
2016440: f6 26 20 34 st %i3, [ %i0 + 0x34 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
2016444: f2 26 20 1c st %i1, [ %i0 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2016448: c0 26 20 18 clr [ %i0 + 0x18 ]
(*timer_server->schedule_operation)( timer_server, the_timer );
201644c: 9f c0 40 00 call %g1
2016450: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2016454: 40 00 0f 4c call 201a184 <_Thread_Enable_dispatch>
2016458: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
201645c: 81 c7 e0 08 ret
2016460: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016464: 81 c7 e0 08 ret
2016468: 91 e8 20 04 restore %g0, 4, %o0
02002b58 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
2002b58: 9d e3 bf a0 save %sp, -96, %sp
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
2002b5c: 03 08 00 00 sethi %hi(0x20000000), %g1
2002b60: 80 8e 00 01 btst %i0, %g1
2002b64: 02 80 00 11 be 2002ba8 <rtems_verror+0x50>
2002b68: b8 10 00 18 mov %i0, %i4
if (rtems_panic_in_progress++)
2002b6c: 05 00 80 76 sethi %hi(0x201d800), %g2
2002b70: c6 00 a1 30 ld [ %g2 + 0x130 ], %g3 ! 201d930 <rtems_panic_in_progress>
2002b74: 82 00 e0 01 add %g3, 1, %g1
2002b78: 80 a0 e0 00 cmp %g3, 0
2002b7c: 02 80 00 08 be 2002b9c <rtems_verror+0x44> <== ALWAYS TAKEN
2002b80: c2 20 a1 30 st %g1, [ %g2 + 0x130 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2002b84: 03 00 80 76 sethi %hi(0x201d800), %g1 <== NOT EXECUTED
2002b88: c6 00 63 00 ld [ %g1 + 0x300 ], %g3 ! 201db00 <_Thread_Dispatch_disable_level><== NOT EXECUTED
2002b8c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
2002b90: c6 20 63 00 st %g3, [ %g1 + 0x300 ] <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
2002b94: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 <== NOT EXECUTED
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
2002b98: c2 00 a1 30 ld [ %g2 + 0x130 ], %g1 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2002b9c: 80 a0 60 02 cmp %g1, 2
2002ba0: 14 80 00 2f bg 2002c5c <rtems_verror+0x104> <== NEVER TAKEN
2002ba4: b0 10 20 00 clr %i0
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002ba8: 3b 00 80 74 sethi %hi(0x201d000), %i5
2002bac: c2 07 61 60 ld [ %i5 + 0x160 ], %g1 ! 201d160 <_impure_ptr>
status = error_flag & ~RTEMS_ERROR_MASK;
2002bb0: 21 1c 00 00 sethi %hi(0x70000000), %l0
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002bb4: d0 00 60 08 ld [ %g1 + 8 ], %o0
2002bb8: 40 00 34 d5 call 200ff0c <fflush>
2002bbc: b6 10 20 00 clr %i3
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2002bc0: 03 10 00 00 sethi %hi(0x40000000), %g1
2002bc4: 80 8f 00 01 btst %i4, %g1
2002bc8: 12 80 00 33 bne 2002c94 <rtems_verror+0x13c>
2002bcc: a0 2f 00 10 andn %i4, %l0, %l0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2002bd0: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
2002bd4: 92 10 00 19 mov %i1, %o1
2002bd8: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2002bdc: 40 00 48 d9 call 2014f40 <vfprintf>
2002be0: 94 10 00 1a mov %i2, %o2
if (status)
2002be4: 80 a4 20 00 cmp %l0, 0
2002be8: 12 80 00 1f bne 2002c64 <rtems_verror+0x10c>
2002bec: b0 10 00 08 mov %o0, %i0
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
2002bf0: 80 a6 e0 00 cmp %i3, 0
2002bf4: 02 80 00 12 be 2002c3c <rtems_verror+0xe4>
2002bf8: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
if ((local_errno > 0) && *strerror(local_errno))
2002bfc: 80 a6 e0 00 cmp %i3, 0
2002c00: 04 80 00 09 ble 2002c24 <rtems_verror+0xcc>
2002c04: 13 00 80 6d sethi %hi(0x201b400), %o1
2002c08: 40 00 39 41 call 201110c <strerror>
2002c0c: 90 10 00 1b mov %i3, %o0
2002c10: c2 4a 00 00 ldsb [ %o0 ], %g1
2002c14: 80 a0 60 00 cmp %g1, 0
2002c18: 12 80 00 23 bne 2002ca4 <rtems_verror+0x14c> <== ALWAYS TAKEN
2002c1c: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
2002c20: 13 00 80 6d sethi %hi(0x201b400), %o1 <== NOT EXECUTED
2002c24: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2002c28: 92 12 60 70 or %o1, 0x70, %o1
2002c2c: 40 00 35 b1 call 20102f0 <fprintf>
2002c30: 94 10 00 1b mov %i3, %o2
2002c34: b0 06 00 08 add %i0, %o0, %i0
}
chars_written += fprintf(stderr, "\n");
2002c38: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
2002c3c: 13 00 80 6c sethi %hi(0x201b000), %o1
2002c40: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2002c44: 40 00 35 ab call 20102f0 <fprintf>
2002c48: 92 12 62 f8 or %o1, 0x2f8, %o1
(void) fflush(stderr);
2002c4c: c2 07 61 60 ld [ %i5 + 0x160 ], %g1
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
2002c50: b0 02 00 18 add %o0, %i0, %i0
(void) fflush(stderr);
2002c54: 40 00 34 ae call 200ff0c <fflush>
2002c58: d0 00 60 0c ld [ %g1 + 0xc ], %o0
return chars_written;
}
2002c5c: 81 c7 e0 08 ret
2002c60: 81 e8 00 00 restore
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002c64: 03 00 80 74 sethi %hi(0x201d000), %g1
2002c68: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 201d160 <_impure_ptr>
2002c6c: 90 10 00 10 mov %l0, %o0
2002c70: 7f ff ff b4 call 2002b40 <rtems_status_text>
2002c74: f8 00 60 0c ld [ %g1 + 0xc ], %i4
2002c78: 13 00 80 6d sethi %hi(0x201b400), %o1
2002c7c: 94 10 00 08 mov %o0, %o2
2002c80: 92 12 60 50 or %o1, 0x50, %o1
2002c84: 40 00 35 9b call 20102f0 <fprintf>
2002c88: 90 10 00 1c mov %i4, %o0
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
2002c8c: 10 bf ff d9 b 2002bf0 <rtems_verror+0x98>
2002c90: b0 06 00 08 add %i0, %o0, %i0
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
2002c94: 40 00 33 8e call 200facc <__errno>
2002c98: 01 00 00 00 nop
2002c9c: 10 bf ff cd b 2002bd0 <rtems_verror+0x78>
2002ca0: f6 02 00 00 ld [ %o0 ], %i3
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
2002ca4: 90 10 00 1b mov %i3, %o0
2002ca8: 40 00 39 19 call 201110c <strerror>
2002cac: f8 00 60 0c ld [ %g1 + 0xc ], %i4
2002cb0: 13 00 80 6d sethi %hi(0x201b400), %o1
2002cb4: 94 10 00 08 mov %o0, %o2
2002cb8: 92 12 60 60 or %o1, 0x60, %o1
2002cbc: 40 00 35 8d call 20102f0 <fprintf>
2002cc0: 90 10 00 1c mov %i4, %o0
2002cc4: 10 bf ff dd b 2002c38 <rtems_verror+0xe0>
2002cc8: b0 06 00 08 add %i0, %o0, %i0
020031c0 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
20031c0: 9d e3 bf a0 save %sp, -96, %sp
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
20031c4: 35 1f ff ff sethi %hi(0x7ffffc00), %i2
int sign = 0;
20031c8: b6 10 20 00 clr %i3
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
20031cc: b4 16 a3 ff or %i2, 0x3ff, %i2
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
20031d0: b8 10 20 00 clr %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20031d4: 23 00 80 60 sethi %hi(0x2018000), %l1
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
20031d8: 21 00 80 60 sethi %hi(0x2018000), %l0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20031dc: c2 06 20 04 ld [ %i0 + 4 ], %g1
20031e0: 82 00 7f ff add %g1, -1, %g1
20031e4: 80 a0 60 00 cmp %g1, 0
20031e8: 06 80 00 24 bl 2003278 <scanInt+0xb8> <== NEVER TAKEN
20031ec: c2 26 20 04 st %g1, [ %i0 + 4 ]
20031f0: c2 06 00 00 ld [ %i0 ], %g1
20031f4: fa 08 40 00 ldub [ %g1 ], %i5
20031f8: 82 00 60 01 inc %g1
if (c == ':')
20031fc: 80 a7 60 3a cmp %i5, 0x3a
2003200: 02 80 00 25 be 2003294 <scanInt+0xd4>
2003204: c2 26 00 00 st %g1, [ %i0 ]
break;
if (sign == 0) {
2003208: 80 a6 e0 00 cmp %i3, 0
200320c: 12 80 00 06 bne 2003224 <scanInt+0x64>
2003210: c2 04 20 54 ld [ %l0 + 0x54 ], %g1
if (c == '-') {
2003214: 80 a7 60 2d cmp %i5, 0x2d
2003218: 02 80 00 32 be 20032e0 <scanInt+0x120>
200321c: b6 10 20 01 mov 1, %i3
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
2003220: c2 04 20 54 ld [ %l0 + 0x54 ], %g1
2003224: 82 00 40 1d add %g1, %i5, %g1
2003228: c2 08 60 01 ldub [ %g1 + 1 ], %g1
200322c: 80 88 60 04 btst 4, %g1
2003230: 02 80 00 2f be 20032ec <scanInt+0x12c>
2003234: 90 10 00 1a mov %i2, %o0
return 0;
d = c - '0';
if ((i > (limit / 10))
2003238: 40 00 45 3f call 2014734 <.udiv>
200323c: 92 10 20 0a mov 0xa, %o1
2003240: 80 a7 00 08 cmp %i4, %o0
2003244: 18 80 00 2a bgu 20032ec <scanInt+0x12c>
2003248: 01 00 00 00 nop
|| ((i == (limit / 10)) && (d > (limit % 10))))
200324c: 02 80 00 1c be 20032bc <scanInt+0xfc>
2003250: ba 07 7f d0 add %i5, -48, %i5
return 0;
i = i * 10 + d;
2003254: 83 2f 20 01 sll %i4, 1, %g1
2003258: b9 2f 20 03 sll %i4, 3, %i4
200325c: b8 00 40 1c add %g1, %i4, %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2003260: c2 06 20 04 ld [ %i0 + 4 ], %g1
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
2003264: b8 07 40 1c add %i5, %i4, %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2003268: 82 00 7f ff add %g1, -1, %g1
200326c: 80 a0 60 00 cmp %g1, 0
2003270: 16 bf ff e0 bge 20031f0 <scanInt+0x30> <== ALWAYS TAKEN
2003274: c2 26 20 04 st %g1, [ %i0 + 4 ]
2003278: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED
200327c: 40 00 3a 50 call 2011bbc <__srget_r> <== NOT EXECUTED
2003280: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2003284: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
if (c == ':')
2003288: 80 a7 60 3a cmp %i5, 0x3a <== NOT EXECUTED
200328c: 12 bf ff e0 bne 200320c <scanInt+0x4c> <== NOT EXECUTED
2003290: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
2003294: 80 a6 e0 00 cmp %i3, 0
2003298: 02 80 00 07 be 20032b4 <scanInt+0xf4> <== NEVER TAKEN
200329c: b0 10 20 00 clr %i0
return 0;
*val = i * sign;
20032a0: 90 10 00 1b mov %i3, %o0
20032a4: 92 10 00 1c mov %i4, %o1
20032a8: 40 00 44 e9 call 201464c <.umul>
20032ac: b0 10 20 01 mov 1, %i0
20032b0: d0 26 40 00 st %o0, [ %i1 ]
return 1;
20032b4: 81 c7 e0 08 ret
20032b8: 81 e8 00 00 restore
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
20032bc: 90 10 00 1a mov %i2, %o0
20032c0: 40 00 45 c9 call 20149e4 <.urem>
20032c4: 92 10 20 0a mov 0xa, %o1
20032c8: 80 a7 40 08 cmp %i5, %o0
20032cc: 08 bf ff e3 bleu 2003258 <scanInt+0x98> <== NEVER TAKEN
20032d0: 83 2f 20 01 sll %i4, 1, %g1
return 0;
20032d4: b0 10 20 00 clr %i0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
20032d8: 81 c7 e0 08 ret
20032dc: 81 e8 00 00 restore
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
20032e0: b4 06 a0 01 inc %i2
continue;
20032e4: 10 bf ff be b 20031dc <scanInt+0x1c>
20032e8: b6 10 3f ff mov -1, %i3
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
20032ec: 81 c7 e0 08 ret
20032f0: 91 e8 20 00 restore %g0, 0, %o0
020032f4 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
20032f4: 9d e3 bf a0 save %sp, -96, %sp
int c;
*name = *bufp;
20032f8: c2 06 80 00 ld [ %i2 ], %g1
for (;;) {
c = getc(fp);
20032fc: 3b 00 80 60 sethi %hi(0x2018000), %i5
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
int c;
*name = *bufp;
2003300: 10 80 00 19 b 2003364 <scanString+0x70>
2003304: c2 26 40 00 st %g1, [ %i1 ]
for (;;) {
c = getc(fp);
2003308: c2 06 00 00 ld [ %i0 ], %g1
200330c: d0 08 40 00 ldub [ %g1 ], %o0
2003310: 82 00 60 01 inc %g1
if (c == ':') {
2003314: 80 a2 20 3a cmp %o0, 0x3a
2003318: 02 80 00 1e be 2003390 <scanString+0x9c>
200331c: c2 26 00 00 st %g1, [ %i0 ]
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
2003320: 80 a2 20 0a cmp %o0, 0xa
2003324: 02 80 00 28 be 20033c4 <scanString+0xd0>
2003328: 80 a2 3f ff cmp %o0, -1
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
200332c: 02 80 00 2b be 20033d8 <scanString+0xe4>
2003330: 01 00 00 00 nop
return 0;
if (*nleft < 2)
2003334: c2 06 c0 00 ld [ %i3 ], %g1
2003338: 80 a0 60 01 cmp %g1, 1
200333c: 08 80 00 29 bleu 20033e0 <scanString+0xec>
2003340: 01 00 00 00 nop
return 0;
**bufp = c;
2003344: c2 06 80 00 ld [ %i2 ], %g1
2003348: d0 28 40 00 stb %o0, [ %g1 ]
++(*bufp);
200334c: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
2003350: c2 06 c0 00 ld [ %i3 ], %g1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
2003354: 84 00 a0 01 inc %g2
2003358: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
200335c: 82 00 7f ff add %g1, -1, %g1
2003360: c2 26 c0 00 st %g1, [ %i3 ]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
2003364: c2 06 20 04 ld [ %i0 + 4 ], %g1
2003368: 82 00 7f ff add %g1, -1, %g1
200336c: 80 a0 60 00 cmp %g1, 0
2003370: 16 bf ff e6 bge 2003308 <scanString+0x14>
2003374: c2 26 20 04 st %g1, [ %i0 + 4 ]
2003378: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
200337c: 40 00 3a 10 call 2011bbc <__srget_r>
2003380: 92 10 00 18 mov %i0, %o1
if (c == ':') {
2003384: 80 a2 20 3a cmp %o0, 0x3a
2003388: 12 bf ff e7 bne 2003324 <scanString+0x30> <== ALWAYS TAKEN
200338c: 80 a2 20 0a cmp %o0, 0xa
if (nlFlag)
2003390: 80 a7 20 00 cmp %i4, 0
2003394: 12 80 00 0f bne 20033d0 <scanString+0xdc>
2003398: b0 10 20 00 clr %i0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
200339c: c2 06 80 00 ld [ %i2 ], %g1
20033a0: c0 28 40 00 clrb [ %g1 ]
++(*bufp);
20033a4: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
20033a8: c2 06 c0 00 ld [ %i3 ], %g1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
20033ac: 84 00 a0 01 inc %g2
20033b0: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
20033b4: 82 00 7f ff add %g1, -1, %g1
20033b8: c2 26 c0 00 st %g1, [ %i3 ]
return 1;
20033bc: 81 c7 e0 08 ret
20033c0: 91 e8 20 01 restore %g0, 1, %o0
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
20033c4: 80 a7 20 00 cmp %i4, 0
20033c8: 12 bf ff f5 bne 200339c <scanString+0xa8>
20033cc: b0 10 20 00 clr %i0
20033d0: 81 c7 e0 08 ret
20033d4: 81 e8 00 00 restore
return 0;
break;
}
if (c == EOF)
return 0;
20033d8: 81 c7 e0 08 ret
20033dc: 91 e8 20 00 restore %g0, 0, %o0
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
20033e0: 81 c7 e0 08 ret
20033e4: 91 e8 20 00 restore %g0, 0, %o0
020033e8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
20033e8: 9d e3 bf 98 save %sp, -104, %sp
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
20033ec: 98 10 20 00 clr %o4
20033f0: 90 10 00 18 mov %i0, %o0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
20033f4: ba 10 00 18 mov %i0, %i5
20033f8: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
20033fc: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2003400: 92 10 00 19 mov %i1, %o1
2003404: 94 07 a0 4c add %fp, 0x4c, %o2
2003408: 96 07 a0 50 add %fp, 0x50, %o3
200340c: 7f ff ff ba call 20032f4 <scanString>
2003410: b0 10 20 00 clr %i0
2003414: 80 a2 20 00 cmp %o0, 0
2003418: 12 80 00 04 bne 2003428 <scangr+0x40>
200341c: 90 10 00 1d mov %i5, %o0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
2003420: 81 c7 e0 08 ret
2003424: 81 e8 00 00 restore
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
2003428: 92 06 60 04 add %i1, 4, %o1
200342c: 94 07 a0 4c add %fp, 0x4c, %o2
2003430: 96 07 a0 50 add %fp, 0x50, %o3
2003434: 7f ff ff b0 call 20032f4 <scanString>
2003438: 98 10 20 00 clr %o4
200343c: 80 a2 20 00 cmp %o0, 0
2003440: 02 bf ff f8 be 2003420 <scangr+0x38> <== NEVER TAKEN
2003444: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &grgid)
2003448: 7f ff ff 5e call 20031c0 <scanInt>
200344c: 92 07 bf f8 add %fp, -8, %o1
2003450: 80 a2 20 00 cmp %o0, 0
2003454: 02 bf ff f3 be 2003420 <scangr+0x38> <== NEVER TAKEN
2003458: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
200345c: 92 07 bf fc add %fp, -4, %o1
2003460: 94 07 a0 4c add %fp, 0x4c, %o2
2003464: 96 07 a0 50 add %fp, 0x50, %o3
2003468: 7f ff ff a3 call 20032f4 <scanString>
200346c: 98 10 20 01 mov 1, %o4
2003470: 80 a2 20 00 cmp %o0, 0
2003474: 02 bf ff eb be 2003420 <scangr+0x38> <== NEVER TAKEN
2003478: c2 07 bf f8 ld [ %fp + -8 ], %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
200347c: fa 07 bf fc ld [ %fp + -4 ], %i5
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
2003480: c2 36 60 08 sth %g1, [ %i1 + 8 ]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003484: c6 0f 40 00 ldub [ %i5 ], %g3
2003488: 83 28 e0 18 sll %g3, 0x18, %g1
200348c: 80 a0 60 00 cmp %g1, 0
2003490: 02 80 00 10 be 20034d0 <scangr+0xe8> <== NEVER TAKEN
2003494: 88 10 20 17 mov 0x17, %g4
2003498: 84 10 00 1d mov %i5, %g2
200349c: 88 10 20 01 mov 1, %g4
if(*cp == ',')
memcount++;
20034a0: 84 00 a0 01 inc %g2
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20034a4: c6 08 80 00 ldub [ %g2 ], %g3
if(*cp == ',')
20034a8: 83 38 60 18 sra %g1, 0x18, %g1
memcount++;
20034ac: 82 18 60 2c xor %g1, 0x2c, %g1
20034b0: 80 a0 00 01 cmp %g0, %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20034b4: 83 28 e0 18 sll %g3, 0x18, %g1
if(*cp == ',')
memcount++;
20034b8: 88 61 3f ff subx %g4, -1, %g4
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20034bc: 80 a0 60 00 cmp %g1, 0
20034c0: 32 bf ff f9 bne,a 20034a4 <scangr+0xbc>
20034c4: 84 00 a0 01 inc %g2
20034c8: 89 29 20 02 sll %g4, 2, %g4
20034cc: 88 01 20 13 add %g4, 0x13, %g4
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
20034d0: c2 07 a0 50 ld [ %fp + 0x50 ], %g1
20034d4: 80 a0 40 04 cmp %g1, %g4
20034d8: 0a bf ff d2 bcs 2003420 <scangr+0x38> <== NEVER TAKEN
20034dc: b0 10 20 00 clr %i0
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
20034e0: c2 07 a0 4c ld [ %fp + 0x4c ], %g1
20034e4: 82 00 60 0f add %g1, 0xf, %g1
20034e8: 82 08 7f f0 and %g1, -16, %g1
20034ec: c2 26 60 0c st %g1, [ %i1 + 0xc ]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
20034f0: fa 20 40 00 st %i5, [ %g1 ]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20034f4: c2 07 bf fc ld [ %fp + -4 ], %g1
20034f8: c4 08 40 00 ldub [ %g1 ], %g2
20034fc: 85 28 a0 18 sll %g2, 0x18, %g2
2003500: 80 a0 a0 00 cmp %g2, 0
2003504: 02 80 00 15 be 2003558 <scangr+0x170> <== NEVER TAKEN
2003508: 86 10 20 04 mov 4, %g3
}
/*
* Extract a single group record from the database
*/
static int scangr(
200350c: 82 00 60 01 inc %g1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003510: 10 80 00 08 b 2003530 <scangr+0x148>
2003514: 86 10 20 01 mov 1, %g3
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
2003518: 82 00 60 01 inc %g1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
200351c: c4 08 7f ff ldub [ %g1 + -1 ], %g2
2003520: 85 28 a0 18 sll %g2, 0x18, %g2
2003524: 80 a0 a0 00 cmp %g2, 0
2003528: 22 80 00 0c be,a 2003558 <scangr+0x170>
200352c: 87 28 e0 02 sll %g3, 2, %g3
if(*cp == ',') {
2003530: 85 38 a0 18 sra %g2, 0x18, %g2
2003534: 80 a0 a0 2c cmp %g2, 0x2c
2003538: 32 bf ff f9 bne,a 200351c <scangr+0x134>
200353c: 82 00 60 01 inc %g1
*cp = '\0';
2003540: c0 28 7f ff clrb [ %g1 + -1 ]
grp->gr_mem[memcount++] = cp + 1;
2003544: c8 06 60 0c ld [ %i1 + 0xc ], %g4
2003548: 85 28 e0 02 sll %g3, 2, %g2
200354c: 86 00 e0 01 inc %g3
2003550: 10 bf ff f2 b 2003518 <scangr+0x130>
2003554: c2 21 00 02 st %g1, [ %g4 + %g2 ]
}
}
grp->gr_mem[memcount] = NULL;
2003558: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200355c: c0 20 40 03 clr [ %g1 + %g3 ]
return 1;
}
2003560: 81 c7 e0 08 ret
2003564: 91 e8 20 01 restore %g0, 1, %o0
02003568 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
2003568: 9d e3 bf 98 save %sp, -104, %sp
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
200356c: 98 10 20 00 clr %o4
2003570: 90 10 00 18 mov %i0, %o0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
2003574: ba 10 00 18 mov %i0, %i5
2003578: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200357c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003580: 92 10 00 19 mov %i1, %o1
2003584: 94 07 a0 4c add %fp, 0x4c, %o2
2003588: 96 07 a0 50 add %fp, 0x50, %o3
200358c: 7f ff ff 5a call 20032f4 <scanString>
2003590: b0 10 20 00 clr %i0
2003594: 80 a2 20 00 cmp %o0, 0
2003598: 12 80 00 04 bne 20035a8 <scanpw+0x40>
200359c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
20035a0: 81 c7 e0 08 ret
20035a4: 81 e8 00 00 restore
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
20035a8: 92 06 60 04 add %i1, 4, %o1
20035ac: 94 07 a0 4c add %fp, 0x4c, %o2
20035b0: 96 07 a0 50 add %fp, 0x50, %o3
20035b4: 7f ff ff 50 call 20032f4 <scanString>
20035b8: 98 10 20 00 clr %o4
20035bc: 80 a2 20 00 cmp %o0, 0
20035c0: 02 bf ff f8 be 20035a0 <scanpw+0x38> <== NEVER TAKEN
20035c4: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &pwuid)
20035c8: 7f ff fe fe call 20031c0 <scanInt>
20035cc: 92 07 bf f8 add %fp, -8, %o1
20035d0: 80 a2 20 00 cmp %o0, 0
20035d4: 02 bf ff f3 be 20035a0 <scanpw+0x38>
20035d8: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &pwgid)
20035dc: 7f ff fe f9 call 20031c0 <scanInt>
20035e0: 92 07 bf fc add %fp, -4, %o1
20035e4: 80 a2 20 00 cmp %o0, 0
20035e8: 02 bf ff ee be 20035a0 <scanpw+0x38>
20035ec: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
20035f0: 92 06 60 0c add %i1, 0xc, %o1
20035f4: 94 07 a0 4c add %fp, 0x4c, %o2
20035f8: 96 07 a0 50 add %fp, 0x50, %o3
20035fc: 7f ff ff 3e call 20032f4 <scanString>
2003600: 98 10 20 00 clr %o4
2003604: 80 a2 20 00 cmp %o0, 0
2003608: 02 bf ff e6 be 20035a0 <scanpw+0x38> <== NEVER TAKEN
200360c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
2003610: 92 06 60 10 add %i1, 0x10, %o1
2003614: 94 07 a0 4c add %fp, 0x4c, %o2
2003618: 96 07 a0 50 add %fp, 0x50, %o3
200361c: 7f ff ff 36 call 20032f4 <scanString>
2003620: 98 10 20 00 clr %o4
2003624: 80 a2 20 00 cmp %o0, 0
2003628: 02 bf ff de be 20035a0 <scanpw+0x38> <== NEVER TAKEN
200362c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
2003630: 92 06 60 14 add %i1, 0x14, %o1
2003634: 94 07 a0 4c add %fp, 0x4c, %o2
2003638: 96 07 a0 50 add %fp, 0x50, %o3
200363c: 7f ff ff 2e call 20032f4 <scanString>
2003640: 98 10 20 00 clr %o4
2003644: 80 a2 20 00 cmp %o0, 0
2003648: 02 bf ff d6 be 20035a0 <scanpw+0x38> <== NEVER TAKEN
200364c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
2003650: 92 06 60 18 add %i1, 0x18, %o1
2003654: 94 07 a0 4c add %fp, 0x4c, %o2
2003658: 96 07 a0 50 add %fp, 0x50, %o3
200365c: 7f ff ff 26 call 20032f4 <scanString>
2003660: 98 10 20 01 mov 1, %o4
2003664: 80 a2 20 00 cmp %o0, 0
2003668: 02 bf ff ce be 20035a0 <scanpw+0x38>
200366c: c2 07 bf f8 ld [ %fp + -8 ], %g1
return 0;
pwd->pw_uid = pwuid;
2003670: c2 36 60 08 sth %g1, [ %i1 + 8 ]
pwd->pw_gid = pwgid;
2003674: c2 07 bf fc ld [ %fp + -4 ], %g1
2003678: c2 36 60 0a sth %g1, [ %i1 + 0xa ]
return 1;
}
200367c: 81 c7 e0 08 ret
2003680: 91 e8 20 01 restore %g0, 1, %o0
02006da8 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
2006da8: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2006dac: 80 a6 20 04 cmp %i0, 4
2006db0: 08 80 00 08 bleu 2006dd0 <sched_get_priority_max+0x28>
2006db4: 82 10 20 01 mov 1, %g1
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2006db8: 40 00 25 6b call 2010364 <__errno>
2006dbc: b0 10 3f ff mov -1, %i0
2006dc0: 82 10 20 16 mov 0x16, %g1
2006dc4: c2 22 00 00 st %g1, [ %o0 ]
2006dc8: 81 c7 e0 08 ret
2006dcc: 81 e8 00 00 restore
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
2006dd0: b1 28 40 18 sll %g1, %i0, %i0
2006dd4: 80 8e 20 17 btst 0x17, %i0
2006dd8: 02 bf ff f8 be 2006db8 <sched_get_priority_max+0x10> <== NEVER TAKEN
2006ddc: 03 00 80 76 sethi %hi(0x201d800), %g1
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
2006de0: f0 08 60 0c ldub [ %g1 + 0xc ], %i0 ! 201d80c <rtems_maximum_priority>
}
2006de4: 81 c7 e0 08 ret
2006de8: 91 ee 3f ff restore %i0, -1, %o0
02006dec <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
2006dec: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2006df0: 80 a6 20 04 cmp %i0, 4
2006df4: 08 80 00 09 bleu 2006e18 <sched_get_priority_min+0x2c>
2006df8: 84 10 20 01 mov 1, %g2
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2006dfc: 40 00 25 5a call 2010364 <__errno>
2006e00: 01 00 00 00 nop
2006e04: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
2006e08: 84 10 20 16 mov 0x16, %g2
2006e0c: c4 22 00 00 st %g2, [ %o0 ]
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
2006e10: 81 c7 e0 08 ret
2006e14: 91 e8 00 01 restore %g0, %g1, %o0
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
2006e18: b1 28 80 18 sll %g2, %i0, %i0
2006e1c: 80 8e 20 17 btst 0x17, %i0
2006e20: 02 bf ff f7 be 2006dfc <sched_get_priority_min+0x10> <== NEVER TAKEN
2006e24: 82 10 20 01 mov 1, %g1
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
2006e28: 81 c7 e0 08 ret
2006e2c: 91 e8 00 01 restore %g0, %g1, %o0
02006e30 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
2006e30: 9d e3 bf a0 save %sp, -96, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2006e34: 80 a6 20 00 cmp %i0, 0
2006e38: 12 80 00 0a bne 2006e60 <sched_rr_get_interval+0x30> <== ALWAYS TAKEN
2006e3c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
2006e40: 02 80 00 13 be 2006e8c <sched_rr_get_interval+0x5c>
2006e44: 03 00 80 79 sethi %hi(0x201e400), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
2006e48: d0 00 60 64 ld [ %g1 + 0x64 ], %o0 ! 201e464 <_Thread_Ticks_per_timeslice>
2006e4c: 92 10 00 19 mov %i1, %o1
2006e50: 40 00 0f 73 call 200ac1c <_Timespec_From_ticks>
2006e54: b0 10 20 00 clr %i0
return 0;
}
2006e58: 81 c7 e0 08 ret
2006e5c: 81 e8 00 00 restore
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2006e60: 7f ff f1 38 call 2003340 <getpid>
2006e64: 01 00 00 00 nop
2006e68: 80 a2 00 18 cmp %o0, %i0
2006e6c: 02 bf ff f5 be 2006e40 <sched_rr_get_interval+0x10>
2006e70: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
2006e74: 40 00 25 3c call 2010364 <__errno>
2006e78: b0 10 3f ff mov -1, %i0
2006e7c: 82 10 20 03 mov 3, %g1
2006e80: c2 22 00 00 st %g1, [ %o0 ]
2006e84: 81 c7 e0 08 ret
2006e88: 81 e8 00 00 restore
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
2006e8c: 40 00 25 36 call 2010364 <__errno>
2006e90: b0 10 3f ff mov -1, %i0
2006e94: 82 10 20 16 mov 0x16, %g1
2006e98: c2 22 00 00 st %g1, [ %o0 ]
2006e9c: 81 c7 e0 08 ret
2006ea0: 81 e8 00 00 restore
020097ec <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
20097ec: 9d e3 bf 90 save %sp, -112, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20097f0: 03 00 80 8d sethi %hi(0x2023400), %g1
20097f4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 2023690 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
20097f8: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
20097fc: 84 00 a0 01 inc %g2
2009800: c4 20 62 90 st %g2, [ %g1 + 0x290 ]
return _Thread_Dispatch_disable_level;
2009804: c2 00 62 90 ld [ %g1 + 0x290 ], %g1
2009808: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200980c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2009810: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
2009814: b8 8e 62 00 andcc %i1, 0x200, %i4
2009818: 12 80 00 25 bne 20098ac <sem_open+0xc0>
200981c: ba 10 20 00 clr %i5
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
2009820: 90 10 00 18 mov %i0, %o0
2009824: 40 00 1c 16 call 201087c <_POSIX_Semaphore_Name_to_id>
2009828: 92 07 bf f4 add %fp, -12, %o1
* 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 ) {
200982c: b6 92 20 00 orcc %o0, 0, %i3
2009830: 22 80 00 0e be,a 2009868 <sem_open+0x7c>
2009834: b2 0e 6a 00 and %i1, 0xa00, %i1
/*
* 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) ) ) {
2009838: 80 a6 e0 02 cmp %i3, 2
200983c: 12 80 00 04 bne 200984c <sem_open+0x60> <== NEVER TAKEN
2009840: 80 a7 20 00 cmp %i4, 0
2009844: 12 80 00 1e bne 20098bc <sem_open+0xd0>
2009848: 94 10 00 1d mov %i5, %o2
_Thread_Enable_dispatch();
200984c: 40 00 0c c4 call 200cb5c <_Thread_Enable_dispatch>
2009850: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
2009854: 40 00 28 da call 2013bbc <__errno>
2009858: 01 00 00 00 nop
200985c: f6 22 00 00 st %i3, [ %o0 ]
2009860: 81 c7 e0 08 ret
2009864: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
2009868: 80 a6 6a 00 cmp %i1, 0xa00
200986c: 02 80 00 20 be 20098ec <sem_open+0x100>
2009870: d2 07 bf f4 ld [ %fp + -12 ], %o1
2009874: 94 07 bf fc add %fp, -4, %o2
2009878: 11 00 80 8e sethi %hi(0x2023800), %o0
200987c: 40 00 08 c7 call 200bb98 <_Objects_Get>
2009880: 90 12 21 50 or %o0, 0x150, %o0 ! 2023950 <_POSIX_Semaphore_Information>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
2009884: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
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( &the_semaphore_id, &location );
2009888: d0 27 bf f8 st %o0, [ %fp + -8 ]
the_semaphore->open_count += 1;
200988c: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
2009890: 40 00 0c b3 call 200cb5c <_Thread_Enable_dispatch>
2009894: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
_Thread_Enable_dispatch();
2009898: 40 00 0c b1 call 200cb5c <_Thread_Enable_dispatch>
200989c: 01 00 00 00 nop
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
20098a0: f0 07 bf f8 ld [ %fp + -8 ], %i0
}
20098a4: 81 c7 e0 08 ret
20098a8: 91 ee 20 08 restore %i0, 8, %o0
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
20098ac: 82 07 a0 54 add %fp, 0x54, %g1
20098b0: fa 07 a0 50 ld [ %fp + 0x50 ], %i5
20098b4: 10 bf ff db b 2009820 <sem_open+0x34>
20098b8: c2 27 bf f0 st %g1, [ %fp + -16 ]
/*
* 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(
20098bc: 92 10 20 00 clr %o1
20098c0: 96 07 bf f8 add %fp, -8, %o3
20098c4: 40 00 1b 92 call 201070c <_POSIX_Semaphore_Create_support>
20098c8: 90 10 00 18 mov %i0, %o0
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
20098cc: 40 00 0c a4 call 200cb5c <_Thread_Enable_dispatch>
20098d0: ba 10 00 08 mov %o0, %i5
if ( status == -1 )
20098d4: 80 a7 7f ff cmp %i5, -1
20098d8: 02 bf ff e2 be 2009860 <sem_open+0x74>
20098dc: b0 10 3f ff mov -1, %i0
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
20098e0: f0 07 bf f8 ld [ %fp + -8 ], %i0
20098e4: 81 c7 e0 08 ret
20098e8: 91 ee 20 08 restore %i0, 8, %o0
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
20098ec: 40 00 0c 9c call 200cb5c <_Thread_Enable_dispatch>
20098f0: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
20098f4: 40 00 28 b2 call 2013bbc <__errno>
20098f8: 01 00 00 00 nop
20098fc: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
2009900: c2 22 00 00 st %g1, [ %o0 ]
2009904: 81 c7 e0 08 ret
2009908: 81 e8 00 00 restore
02009968 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
2009968: 9d e3 bf 98 save %sp, -104, %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 );
200996c: 90 10 00 19 mov %i1, %o0
2009970: 40 00 18 fd call 200fd64 <_POSIX_Absolute_timeout_to_ticks>
2009974: 92 07 bf fc add %fp, -4, %o1
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
2009978: d4 07 bf fc ld [ %fp + -4 ], %o2
* 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 )
200997c: 80 a2 20 03 cmp %o0, 3
2009980: 02 80 00 06 be 2009998 <sem_timedwait+0x30> <== ALWAYS TAKEN
2009984: 90 10 00 18 mov %i0, %o0
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
2009988: 40 00 1b df call 2010904 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
200998c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2009990: 81 c7 e0 08 ret <== NOT EXECUTED
2009994: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
2009998: 40 00 1b db call 2010904 <_POSIX_Semaphore_Wait_support>
200999c: 92 10 20 01 mov 1, %o1
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
20099a0: 81 c7 e0 08 ret
20099a4: 91 e8 00 08 restore %g0, %o0, %o0
02006c74 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
2006c74: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
if ( oact )
2006c78: 80 a6 a0 00 cmp %i2, 0
2006c7c: 02 80 00 0d be 2006cb0 <sigaction+0x3c>
2006c80: 87 2e 20 02 sll %i0, 2, %g3
*oact = _POSIX_signals_Vectors[ sig ];
2006c84: 05 00 80 6b sethi %hi(0x201ac00), %g2
2006c88: 83 2e 20 04 sll %i0, 4, %g1
2006c8c: 84 10 a0 00 mov %g2, %g2
2006c90: 82 20 40 03 sub %g1, %g3, %g1
2006c94: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2006c98: 82 00 80 01 add %g2, %g1, %g1
2006c9c: c6 26 80 00 st %g3, [ %i2 ]
2006ca0: c4 00 60 04 ld [ %g1 + 4 ], %g2
2006ca4: c4 26 a0 04 st %g2, [ %i2 + 4 ]
2006ca8: c2 00 60 08 ld [ %g1 + 8 ], %g1
2006cac: c2 26 a0 08 st %g1, [ %i2 + 8 ]
if ( !sig )
2006cb0: 80 a6 20 00 cmp %i0, 0
2006cb4: 02 80 00 33 be 2006d80 <sigaction+0x10c>
2006cb8: 01 00 00 00 nop
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
2006cbc: 82 06 3f ff add %i0, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2006cc0: 80 a0 60 1f cmp %g1, 0x1f
2006cc4: 18 80 00 2f bgu 2006d80 <sigaction+0x10c>
2006cc8: 80 a6 20 09 cmp %i0, 9
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
2006ccc: 02 80 00 2d be 2006d80 <sigaction+0x10c>
2006cd0: 80 a6 60 00 cmp %i1, 0
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
2006cd4: 02 80 00 1a be 2006d3c <sigaction+0xc8> <== NEVER TAKEN
2006cd8: 82 10 20 00 clr %g1
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
2006cdc: 7f ff ee 2c call 200258c <sparc_disable_interrupts>
2006ce0: 01 00 00 00 nop
2006ce4: b4 10 00 08 mov %o0, %i2
if ( act->sa_handler == SIG_DFL ) {
2006ce8: c2 06 60 08 ld [ %i1 + 8 ], %g1
2006cec: 80 a0 60 00 cmp %g1, 0
2006cf0: 02 80 00 15 be 2006d44 <sigaction+0xd0>
2006cf4: 83 2e 20 02 sll %i0, 2, %g1
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
2006cf8: 40 00 19 ee call 200d4b0 <_POSIX_signals_Clear_process_signals>
2006cfc: 90 10 00 18 mov %i0, %o0
_POSIX_signals_Vectors[ sig ] = *act;
2006d00: c4 06 40 00 ld [ %i1 ], %g2
2006d04: 87 2e 20 02 sll %i0, 2, %g3
2006d08: 03 00 80 6b sethi %hi(0x201ac00), %g1
2006d0c: b1 2e 20 04 sll %i0, 4, %i0
2006d10: 82 10 60 00 mov %g1, %g1
2006d14: b0 26 00 03 sub %i0, %g3, %i0
2006d18: c4 20 40 18 st %g2, [ %g1 + %i0 ]
2006d1c: c4 06 60 04 ld [ %i1 + 4 ], %g2
2006d20: b0 00 40 18 add %g1, %i0, %i0
2006d24: c4 26 20 04 st %g2, [ %i0 + 4 ]
2006d28: c2 06 60 08 ld [ %i1 + 8 ], %g1
2006d2c: c2 26 20 08 st %g1, [ %i0 + 8 ]
}
_ISR_Enable( level );
2006d30: 7f ff ee 1b call 200259c <sparc_enable_interrupts>
2006d34: 90 10 00 1a mov %i2, %o0
* 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;
2006d38: 82 10 20 00 clr %g1
}
2006d3c: 81 c7 e0 08 ret
2006d40: 91 e8 00 01 restore %g0, %g1, %o0
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
2006d44: b1 2e 20 04 sll %i0, 4, %i0
2006d48: b0 26 00 01 sub %i0, %g1, %i0
2006d4c: 03 00 80 64 sethi %hi(0x2019000), %g1
2006d50: 82 10 60 9c or %g1, 0x9c, %g1 ! 201909c <_POSIX_signals_Default_vectors>
2006d54: c8 00 40 18 ld [ %g1 + %i0 ], %g4
2006d58: 82 00 40 18 add %g1, %i0, %g1
2006d5c: c6 00 60 04 ld [ %g1 + 4 ], %g3
2006d60: c4 00 60 08 ld [ %g1 + 8 ], %g2
2006d64: 03 00 80 6b sethi %hi(0x201ac00), %g1
2006d68: 82 10 60 00 mov %g1, %g1 ! 201ac00 <_POSIX_signals_Vectors>
2006d6c: c8 20 40 18 st %g4, [ %g1 + %i0 ]
2006d70: b0 00 40 18 add %g1, %i0, %i0
2006d74: c6 26 20 04 st %g3, [ %i0 + 4 ]
2006d78: 10 bf ff ee b 2006d30 <sigaction+0xbc>
2006d7c: c4 26 20 08 st %g2, [ %i0 + 8 ]
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
2006d80: 40 00 26 a4 call 2010810 <__errno>
2006d84: 01 00 00 00 nop
2006d88: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
2006d8c: 82 10 3f ff mov -1, %g1
2006d90: 10 bf ff eb b 2006d3c <sigaction+0xc8>
2006d94: c4 22 00 00 st %g2, [ %o0 ]
02007208 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
2007208: 9d e3 bf 90 save %sp, -112, %sp
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
200720c: ba 96 20 00 orcc %i0, 0, %i5
2007210: 02 80 00 84 be 2007420 <sigtimedwait+0x218>
2007214: 80 a6 a0 00 cmp %i2, 0
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
2007218: 02 80 00 5c be 2007388 <sigtimedwait+0x180>
200721c: 80 a6 60 00 cmp %i1, 0
if ( !_Timespec_Is_valid( timeout ) )
2007220: 40 00 0f 9c call 200b090 <_Timespec_Is_valid>
2007224: 90 10 00 1a mov %i2, %o0
2007228: 80 8a 20 ff btst 0xff, %o0
200722c: 02 80 00 7d be 2007420 <sigtimedwait+0x218>
2007230: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
2007234: 40 00 0f bc call 200b124 <_Timespec_To_ticks>
2007238: 90 10 00 1a mov %i2, %o0
if ( !interval )
200723c: a0 92 20 00 orcc %o0, 0, %l0
2007240: 02 80 00 78 be 2007420 <sigtimedwait+0x218> <== NEVER TAKEN
2007244: 80 a6 60 00 cmp %i1, 0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
2007248: 02 80 00 53 be 2007394 <sigtimedwait+0x18c> <== NEVER TAKEN
200724c: 39 00 80 6d sethi %hi(0x201b400), %i4
the_thread = _Thread_Executing;
2007250: 39 00 80 6d sethi %hi(0x201b400), %i4
2007254: b8 17 20 00 mov %i4, %i4 ! 201b400 <_Per_CPU_Information>
2007258: f0 07 20 0c ld [ %i4 + 0xc ], %i0
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
200725c: 7f ff ed a7 call 20028f8 <sparc_disable_interrupts>
2007260: f4 06 21 5c ld [ %i0 + 0x15c ], %i2
2007264: b6 10 00 08 mov %o0, %i3
if ( *set & api->signals_pending ) {
2007268: c2 07 40 00 ld [ %i5 ], %g1
200726c: c4 06 a0 d4 ld [ %i2 + 0xd4 ], %g2
2007270: 80 88 40 02 btst %g1, %g2
2007274: 12 80 00 53 bne 20073c0 <sigtimedwait+0x1b8>
2007278: 01 00 00 00 nop
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
200727c: 05 00 80 6d sethi %hi(0x201b400), %g2
2007280: c4 00 a2 54 ld [ %g2 + 0x254 ], %g2 ! 201b654 <_POSIX_signals_Pending>
2007284: 80 88 40 02 btst %g1, %g2
2007288: 12 80 00 2f bne 2007344 <sigtimedwait+0x13c>
200728c: 03 00 80 6b sethi %hi(0x201ac00), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007290: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 201aec0 <_Thread_Dispatch_disable_level>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
2007294: 86 10 3f ff mov -1, %g3
2007298: c6 26 40 00 st %g3, [ %i1 ]
200729c: 84 00 a0 01 inc %g2
20072a0: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ]
return _Thread_Dispatch_disable_level;
20072a4: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
20072a8: 82 10 20 04 mov 4, %g1
20072ac: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_thread->Wait.option = *set;
20072b0: c2 07 40 00 ld [ %i5 ], %g1
the_thread->Wait.return_argument = the_info;
20072b4: f2 26 20 28 st %i1, [ %i0 + 0x28 ]
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
20072b8: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
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;
20072bc: b6 10 20 01 mov 1, %i3
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
20072c0: 23 00 80 6d sethi %hi(0x201b400), %l1
20072c4: a2 14 61 ec or %l1, 0x1ec, %l1 ! 201b5ec <_POSIX_signals_Wait_queue>
20072c8: e2 26 20 44 st %l1, [ %i0 + 0x44 ]
20072cc: f6 24 60 30 st %i3, [ %l1 + 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 );
20072d0: 7f ff ed 8e call 2002908 <sparc_enable_interrupts>
20072d4: 01 00 00 00 nop
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
20072d8: 90 10 00 11 mov %l1, %o0
20072dc: 92 10 00 10 mov %l0, %o1
20072e0: 15 00 80 2b sethi %hi(0x200ac00), %o2
20072e4: 40 00 0d cd call 200aa18 <_Thread_queue_Enqueue_with_handler>
20072e8: 94 12 a1 f8 or %o2, 0x1f8, %o2 ! 200adf8 <_Thread_queue_Timeout>
_Thread_Enable_dispatch();
20072ec: 40 00 0c 80 call 200a4ec <_Thread_Enable_dispatch>
20072f0: 01 00 00 00 nop
/*
* 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 );
20072f4: d2 06 40 00 ld [ %i1 ], %o1
20072f8: 90 10 00 1a mov %i2, %o0
20072fc: 94 10 00 19 mov %i1, %o2
2007300: 96 10 20 00 clr %o3
2007304: 40 00 1a aa call 200ddac <_POSIX_signals_Clear_signals>
2007308: 98 10 20 00 clr %o4
/* 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)
200730c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2007310: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2007314: 80 a0 60 04 cmp %g1, 4
2007318: 12 80 00 3b bne 2007404 <sigtimedwait+0x1fc>
200731c: 01 00 00 00 nop
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
2007320: f0 06 40 00 ld [ %i1 ], %i0
2007324: c2 07 40 00 ld [ %i5 ], %g1
2007328: 84 06 3f ff add %i0, -1, %g2
200732c: b7 2e c0 02 sll %i3, %g2, %i3
2007330: 80 8e c0 01 btst %i3, %g1
2007334: 02 80 00 34 be 2007404 <sigtimedwait+0x1fc>
2007338: 01 00 00 00 nop
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
200733c: 81 c7 e0 08 ret
2007340: 81 e8 00 00 restore
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
2007344: 7f ff ff 99 call 20071a8 <_POSIX_signals_Get_lowest>
2007348: 90 10 00 02 mov %g2, %o0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
200734c: 94 10 00 19 mov %i1, %o2
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
2007350: b0 10 00 08 mov %o0, %i0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
2007354: 96 10 20 01 mov 1, %o3
2007358: 90 10 00 1a mov %i2, %o0
200735c: 92 10 00 18 mov %i0, %o1
2007360: 40 00 1a 93 call 200ddac <_POSIX_signals_Clear_signals>
2007364: 98 10 20 00 clr %o4
_ISR_Enable( level );
2007368: 7f ff ed 68 call 2002908 <sparc_enable_interrupts>
200736c: 90 10 00 1b mov %i3, %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2007370: 82 10 20 01 mov 1, %g1
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;
2007374: f0 26 40 00 st %i0, [ %i1 ]
the_info->si_code = SI_USER;
2007378: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
200737c: c0 26 60 08 clr [ %i1 + 8 ]
return signo;
2007380: 81 c7 e0 08 ret
2007384: 81 e8 00 00 restore
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
2007388: 12 bf ff b2 bne 2007250 <sigtimedwait+0x48>
200738c: a0 10 20 00 clr %l0
the_thread = _Thread_Executing;
2007390: 39 00 80 6d sethi %hi(0x201b400), %i4
2007394: b8 17 20 00 mov %i4, %i4 ! 201b400 <_Per_CPU_Information>
2007398: f0 07 20 0c ld [ %i4 + 0xc ], %i0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
200739c: b2 07 bf f4 add %fp, -12, %i1
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
20073a0: 7f ff ed 56 call 20028f8 <sparc_disable_interrupts>
20073a4: f4 06 21 5c ld [ %i0 + 0x15c ], %i2
20073a8: b6 10 00 08 mov %o0, %i3
if ( *set & api->signals_pending ) {
20073ac: c2 07 40 00 ld [ %i5 ], %g1
20073b0: c4 06 a0 d4 ld [ %i2 + 0xd4 ], %g2
20073b4: 80 88 40 02 btst %g1, %g2
20073b8: 22 bf ff b2 be,a 2007280 <sigtimedwait+0x78>
20073bc: 05 00 80 6d sethi %hi(0x201b400), %g2
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
20073c0: 7f ff ff 7a call 20071a8 <_POSIX_signals_Get_lowest>
20073c4: 90 10 00 02 mov %g2, %o0
_POSIX_signals_Clear_signals(
20073c8: 94 10 00 19 mov %i1, %o2
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
20073cc: 92 10 00 08 mov %o0, %o1
20073d0: d0 26 40 00 st %o0, [ %i1 ]
_POSIX_signals_Clear_signals(
20073d4: 96 10 20 00 clr %o3
20073d8: 90 10 00 1a mov %i2, %o0
20073dc: 40 00 1a 74 call 200ddac <_POSIX_signals_Clear_signals>
20073e0: 98 10 20 00 clr %o4
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
20073e4: 7f ff ed 49 call 2002908 <sparc_enable_interrupts>
20073e8: 90 10 00 1b mov %i3, %o0
the_info->si_code = SI_USER;
20073ec: 82 10 20 01 mov 1, %g1
the_info->si_value.sival_int = 0;
20073f0: c0 26 60 08 clr [ %i1 + 8 ]
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
20073f4: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
return the_info->si_signo;
20073f8: f0 06 40 00 ld [ %i1 ], %i0
20073fc: 81 c7 e0 08 ret
2007400: 81 e8 00 00 restore
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
2007404: 40 00 26 e4 call 2010f94 <__errno>
2007408: b0 10 3f ff mov -1, %i0
200740c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2007410: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2007414: c2 22 00 00 st %g1, [ %o0 ]
return -1;
}
return the_info->si_signo;
}
2007418: 81 c7 e0 08 ret
200741c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
2007420: 40 00 26 dd call 2010f94 <__errno>
2007424: b0 10 3f ff mov -1, %i0
2007428: 82 10 20 16 mov 0x16, %g1
200742c: c2 22 00 00 st %g1, [ %o0 ]
2007430: 81 c7 e0 08 ret
2007434: 81 e8 00 00 restore
02009078 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
2009078: 9d e3 bf a0 save %sp, -96, %sp
int status;
status = sigtimedwait( set, NULL, NULL );
200907c: 92 10 20 00 clr %o1
2009080: 90 10 00 18 mov %i0, %o0
2009084: 7f ff ff 6d call 2008e38 <sigtimedwait>
2009088: 94 10 20 00 clr %o2
if ( status != -1 ) {
200908c: 80 a2 3f ff cmp %o0, -1
2009090: 02 80 00 07 be 20090ac <sigwait+0x34>
2009094: 80 a6 60 00 cmp %i1, 0
if ( sig )
2009098: 02 80 00 03 be 20090a4 <sigwait+0x2c> <== NEVER TAKEN
200909c: b0 10 20 00 clr %i0
*sig = status;
20090a0: d0 26 40 00 st %o0, [ %i1 ]
20090a4: 81 c7 e0 08 ret
20090a8: 81 e8 00 00 restore
return 0;
}
return errno;
20090ac: 40 00 26 07 call 20128c8 <__errno>
20090b0: 01 00 00 00 nop
20090b4: f0 02 00 00 ld [ %o0 ], %i0
}
20090b8: 81 c7 e0 08 ret
20090bc: 81 e8 00 00 restore
020051cc <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
20051cc: 9d e3 bf a0 save %sp, -96, %sp
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
20051d0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
20051d4: 80 88 6e 78 btst 0xe78, %g1
20051d8: 32 80 00 04 bne,a 20051e8 <siproc+0x1c> <== ALWAYS TAKEN
20051dc: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
20051e0: 7f ff ff 82 call 2004fe8 <iproc> <== NOT EXECUTED
20051e4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20051e8: 94 10 20 00 clr %o2
20051ec: 40 00 05 d9 call 2006950 <rtems_semaphore_obtain>
20051f0: 92 10 20 00 clr %o1
i = iproc (c, tty);
20051f4: 90 10 00 18 mov %i0, %o0
20051f8: 7f ff ff 7c call 2004fe8 <iproc>
20051fc: 92 10 00 19 mov %i1, %o1
2005200: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release (tty->osem);
2005204: 40 00 06 1d call 2006a78 <rtems_semaphore_release>
2005208: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
}
else {
i = iproc (c, tty);
}
return i;
}
200520c: 81 c7 e0 08 ret
2005210: 81 e8 00 00 restore
020062fc <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
20062fc: 9d e3 bf 88 save %sp, -120, %sp
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
2006300: 40 00 37 c6 call 2014218 <strlen>
2006304: 90 10 00 18 mov %i0, %o0
2006308: 94 10 20 00 clr %o2
200630c: 92 10 00 08 mov %o0, %o1
2006310: 96 07 bf ec add %fp, -20, %o3
2006314: 90 10 00 18 mov %i0, %o0
2006318: 98 10 20 01 mov 1, %o4
200631c: 7f ff fa ac call 2004dcc <rtems_filesystem_evaluate_path>
2006320: b0 10 3f ff mov -1, %i0
2006324: 80 a2 20 00 cmp %o0, 0
2006328: 12 80 00 0e bne 2006360 <statvfs+0x64> <== NEVER TAKEN
200632c: fa 07 bf fc ld [ %fp + -4 ], %i5
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
2006330: 92 10 20 00 clr %o1
2006334: 94 10 20 38 mov 0x38, %o2
2006338: 40 00 33 39 call 201301c <memset>
200633c: 90 10 00 19 mov %i1, %o0
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
2006340: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2006344: 92 10 00 19 mov %i1, %o1
2006348: c2 00 60 44 ld [ %g1 + 0x44 ], %g1
200634c: 9f c0 40 00 call %g1
2006350: 90 07 60 1c add %i5, 0x1c, %o0
2006354: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2006358: 7f ff fa d7 call 2004eb4 <rtems_filesystem_freenode>
200635c: 90 07 bf ec add %fp, -20, %o0
return result;
}
2006360: 81 c7 e0 08 ret
2006364: 81 e8 00 00 restore
02004da8 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
2004da8: 9d e3 bf a0 save %sp, -96, %sp
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
2004dac: c2 06 21 54 ld [ %i0 + 0x154 ], %g1
if ( this_reent ) {
2004db0: 80 a0 60 00 cmp %g1, 0
2004db4: 02 80 00 0c be 2004de4 <sync_per_thread+0x3c> <== NEVER TAKEN
2004db8: 3b 00 80 63 sethi %hi(0x2018c00), %i5
current_reent = _Thread_Executing->libc_reent;
2004dbc: ba 17 62 a0 or %i5, 0x2a0, %i5 ! 2018ea0 <_Per_CPU_Information>
2004dc0: c4 07 60 0c ld [ %i5 + 0xc ], %g2
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
2004dc4: 13 00 80 13 sethi %hi(0x2004c00), %o1
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
current_reent = _Thread_Executing->libc_reent;
2004dc8: f8 00 a1 54 ld [ %g2 + 0x154 ], %i4
_Thread_Executing->libc_reent = this_reent;
2004dcc: c2 20 a1 54 st %g1, [ %g2 + 0x154 ]
_fwalk (t->libc_reent, sync_wrapper);
2004dd0: d0 06 21 54 ld [ %i0 + 0x154 ], %o0
2004dd4: 40 00 31 e5 call 2011568 <_fwalk>
2004dd8: 92 12 61 ec or %o1, 0x1ec, %o1
_Thread_Executing->libc_reent = current_reent;
2004ddc: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2004de0: f8 20 61 54 st %i4, [ %g1 + 0x154 ]
2004de4: 81 c7 e0 08 ret
2004de8: 81 e8 00 00 restore
02005f78 <sysconf>:
*/
long sysconf(
int name
)
{
2005f78: 9d e3 bf a0 save %sp, -96, %sp
if ( name == _SC_CLK_TCK )
2005f7c: 80 a6 20 02 cmp %i0, 2
2005f80: 02 80 00 10 be 2005fc0 <sysconf+0x48>
2005f84: 03 00 80 5d sethi %hi(0x2017400), %g1
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
2005f88: 80 a6 20 04 cmp %i0, 4
2005f8c: 02 80 00 0b be 2005fb8 <sysconf+0x40>
2005f90: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
2005f94: 80 a6 20 33 cmp %i0, 0x33
2005f98: 02 80 00 08 be 2005fb8 <sysconf+0x40>
2005f9c: 82 10 24 00 mov 0x400, %g1
return 1024;
if ( name == _SC_PAGESIZE )
2005fa0: 80 a6 20 08 cmp %i0, 8
2005fa4: 02 80 00 05 be 2005fb8 <sysconf+0x40>
2005fa8: 03 00 00 04 sethi %hi(0x1000), %g1
return PAGE_SIZE;
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
2005fac: 80 a6 22 03 cmp %i0, 0x203
2005fb0: 12 80 00 0c bne 2005fe0 <sysconf+0x68> <== ALWAYS TAKEN
2005fb4: 82 10 20 00 clr %g1
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
2005fb8: 81 c7 e0 08 ret
2005fbc: 91 e8 00 01 restore %g0, %g1, %o0
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
2005fc0: 03 00 80 5c sethi %hi(0x2017000), %g1
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
2005fc4: d2 00 63 38 ld [ %g1 + 0x338 ], %o1 ! 2017338 <Configuration+0xc>
2005fc8: 11 00 03 d0 sethi %hi(0xf4000), %o0
2005fcc: 40 00 36 0c call 20137fc <.udiv>
2005fd0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
2005fd4: 82 10 00 08 mov %o0, %g1
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
2005fd8: 81 c7 e0 08 ret
2005fdc: 91 e8 00 01 restore %g0, %g1, %o0
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
2005fe0: 40 00 26 c0 call 200fae0 <__errno>
2005fe4: 01 00 00 00 nop
2005fe8: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
2005fec: 82 10 3f ff mov -1, %g1
2005ff0: 10 bf ff f2 b 2005fb8 <sysconf+0x40>
2005ff4: c4 22 00 00 st %g2, [ %o0 ]
0200d364 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
200d364: 9d e3 bf a0 save %sp, -96, %sp
switch (opt) {
200d368: 80 a6 60 00 cmp %i1, 0
200d36c: 02 80 00 10 be 200d3ac <tcsetattr+0x48>
200d370: 80 a6 60 01 cmp %i1, 1
200d374: 22 80 00 08 be,a 200d394 <tcsetattr+0x30>
200d378: 90 10 00 18 mov %i0, %o0
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
200d37c: 40 00 10 6e call 2011534 <__errno>
200d380: 01 00 00 00 nop
200d384: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
200d388: c2 22 00 00 st %g1, [ %o0 ]
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
200d38c: 81 c7 e0 08 ret
200d390: 91 e8 3f ff restore %g0, -1, %o0
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
200d394: 92 10 20 03 mov 3, %o1
200d398: 7f ff fe f8 call 200cf78 <ioctl>
200d39c: 94 10 20 00 clr %o2
200d3a0: 80 a2 20 00 cmp %o0, 0
200d3a4: 06 bf ff fa bl 200d38c <tcsetattr+0x28> <== NEVER TAKEN
200d3a8: 01 00 00 00 nop
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
200d3ac: 7f ff fe f3 call 200cf78 <ioctl>
200d3b0: 93 e8 20 02 restore %g0, 2, %o1
0200632c <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
200632c: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
2006330: 80 a6 20 01 cmp %i0, 1
2006334: 12 80 00 3e bne 200642c <timer_create+0x100>
2006338: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
200633c: 02 80 00 3c be 200642c <timer_create+0x100>
2006340: 80 a6 60 00 cmp %i1, 0
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
2006344: 02 80 00 0e be 200637c <timer_create+0x50>
2006348: 03 00 80 79 sethi %hi(0x201e400), %g1
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
200634c: c2 06 40 00 ld [ %i1 ], %g1
2006350: 82 00 7f ff add %g1, -1, %g1
2006354: 80 a0 60 01 cmp %g1, 1
2006358: 18 80 00 35 bgu 200642c <timer_create+0x100> <== NEVER TAKEN
200635c: 01 00 00 00 nop
( 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 )
2006360: c2 06 60 04 ld [ %i1 + 4 ], %g1
2006364: 80 a0 60 00 cmp %g1, 0
2006368: 02 80 00 31 be 200642c <timer_create+0x100> <== NEVER TAKEN
200636c: 82 00 7f ff add %g1, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
2006370: 80 a0 60 1f cmp %g1, 0x1f
2006374: 18 80 00 2e bgu 200642c <timer_create+0x100> <== NEVER TAKEN
2006378: 03 00 80 79 sethi %hi(0x201e400), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200637c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 201e570 <_Thread_Dispatch_disable_level>
2006380: 84 00 a0 01 inc %g2
2006384: c4 20 61 70 st %g2, [ %g1 + 0x170 ]
return _Thread_Dispatch_disable_level;
2006388: c2 00 61 70 ld [ %g1 + 0x170 ], %g1
* 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 );
200638c: 3b 00 80 7a sethi %hi(0x201e800), %i5
2006390: 40 00 08 58 call 20084f0 <_Objects_Allocate>
2006394: 90 17 60 70 or %i5, 0x70, %o0 ! 201e870 <_POSIX_Timer_Information>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
2006398: 80 a2 20 00 cmp %o0, 0
200639c: 02 80 00 2a be 2006444 <timer_create+0x118>
20063a0: 82 10 20 02 mov 2, %g1
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
20063a4: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ]
ptimer->thread_id = _Thread_Executing->Object.id;
20063a8: 03 00 80 7a sethi %hi(0x201e800), %g1
20063ac: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 ! 201eabc <_Per_CPU_Information+0xc>
if ( evp != NULL ) {
20063b0: 80 a6 60 00 cmp %i1, 0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
20063b4: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( evp != NULL ) {
20063b8: 02 80 00 08 be 20063d8 <timer_create+0xac>
20063bc: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
ptimer->inf.sigev_notify = evp->sigev_notify;
20063c0: c6 06 40 00 ld [ %i1 ], %g3
ptimer->inf.sigev_signo = evp->sigev_signo;
20063c4: c4 06 60 04 ld [ %i1 + 4 ], %g2
ptimer->inf.sigev_value = evp->sigev_value;
20063c8: c2 06 60 08 ld [ %i1 + 8 ], %g1
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
if ( evp != NULL ) {
ptimer->inf.sigev_notify = evp->sigev_notify;
20063cc: c6 22 20 40 st %g3, [ %o0 + 0x40 ]
ptimer->inf.sigev_signo = evp->sigev_signo;
20063d0: c4 22 20 44 st %g2, [ %o0 + 0x44 ]
ptimer->inf.sigev_value = evp->sigev_value;
20063d4: c2 22 20 48 st %g1, [ %o0 + 0x48 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20063d8: c4 12 20 0a lduh [ %o0 + 0xa ], %g2
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
20063dc: ba 17 60 70 or %i5, 0x70, %i5
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20063e0: c6 07 60 1c ld [ %i5 + 0x1c ], %g3
ptimer->inf.sigev_notify = evp->sigev_notify;
ptimer->inf.sigev_signo = evp->sigev_signo;
ptimer->inf.sigev_value = evp->sigev_value;
}
ptimer->overrun = 0;
20063e4: c0 22 20 68 clr [ %o0 + 0x68 ]
ptimer->timer_data.it_value.tv_sec = 0;
20063e8: c0 22 20 5c clr [ %o0 + 0x5c ]
ptimer->timer_data.it_value.tv_nsec = 0;
20063ec: c0 22 20 60 clr [ %o0 + 0x60 ]
ptimer->timer_data.it_interval.tv_sec = 0;
20063f0: c0 22 20 54 clr [ %o0 + 0x54 ]
ptimer->timer_data.it_interval.tv_nsec = 0;
20063f4: c0 22 20 58 clr [ %o0 + 0x58 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20063f8: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
20063fc: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
2006400: c0 22 20 30 clr [ %o0 + 0x30 ]
the_watchdog->user_data = user_data;
2006404: c0 22 20 34 clr [ %o0 + 0x34 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2006408: c2 02 20 08 ld [ %o0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200640c: 85 28 a0 02 sll %g2, 2, %g2
2006410: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2006414: c0 22 20 0c clr [ %o0 + 0xc ]
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
2006418: c2 26 80 00 st %g1, [ %i2 ]
_Thread_Enable_dispatch();
200641c: 40 00 0d 52 call 2009964 <_Thread_Enable_dispatch>
2006420: b0 10 20 00 clr %i0
return 0;
}
2006424: 81 c7 e0 08 ret
2006428: 81 e8 00 00 restore
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
200642c: 40 00 27 d8 call 201038c <__errno>
2006430: b0 10 3f ff mov -1, %i0
2006434: 82 10 20 16 mov 0x16, %g1
2006438: c2 22 00 00 st %g1, [ %o0 ]
200643c: 81 c7 e0 08 ret
2006440: 81 e8 00 00 restore
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
2006444: 40 00 0d 48 call 2009964 <_Thread_Enable_dispatch>
2006448: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EAGAIN );
200644c: 40 00 27 d0 call 201038c <__errno>
2006450: 01 00 00 00 nop
2006454: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
2006458: c2 22 00 00 st %g1, [ %o0 ]
200645c: 81 c7 e0 08 ret
2006460: 81 e8 00 00 restore
02006464 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
2006464: 9d e3 bf 80 save %sp, -128, %sp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
2006468: 80 a6 a0 00 cmp %i2, 0
200646c: 02 80 00 88 be 200668c <timer_settime+0x228> <== NEVER TAKEN
2006470: 01 00 00 00 nop
/*
* 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) ) ) {
2006474: 40 00 10 37 call 200a550 <_Timespec_Is_valid>
2006478: 90 06 a0 08 add %i2, 8, %o0
200647c: 80 8a 20 ff btst 0xff, %o0
2006480: 02 80 00 83 be 200668c <timer_settime+0x228>
2006484: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
2006488: 40 00 10 32 call 200a550 <_Timespec_Is_valid>
200648c: 90 10 00 1a mov %i2, %o0
2006490: 80 8a 20 ff btst 0xff, %o0
2006494: 02 80 00 7e be 200668c <timer_settime+0x228> <== NEVER TAKEN
2006498: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
200649c: 12 80 00 7a bne 2006684 <timer_settime+0x220>
20064a0: 80 a6 60 04 cmp %i1, 4
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
20064a4: c8 06 80 00 ld [ %i2 ], %g4
20064a8: c6 06 a0 04 ld [ %i2 + 4 ], %g3
20064ac: c4 06 a0 08 ld [ %i2 + 8 ], %g2
20064b0: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
20064b4: c8 27 bf e4 st %g4, [ %fp + -28 ]
20064b8: c6 27 bf e8 st %g3, [ %fp + -24 ]
20064bc: c4 27 bf ec st %g2, [ %fp + -20 ]
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
20064c0: 80 a6 60 04 cmp %i1, 4
20064c4: 02 80 00 3b be 20065b0 <timer_settime+0x14c>
20064c8: c2 27 bf f0 st %g1, [ %fp + -16 ]
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
20064cc: 92 10 00 18 mov %i0, %o1
20064d0: 11 00 80 7a sethi %hi(0x201e800), %o0
20064d4: 94 07 bf fc add %fp, -4, %o2
20064d8: 40 00 09 51 call 2008a1c <_Objects_Get>
20064dc: 90 12 20 70 or %o0, 0x70, %o0
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
20064e0: c2 07 bf fc ld [ %fp + -4 ], %g1
20064e4: 80 a0 60 00 cmp %g1, 0
20064e8: 12 80 00 46 bne 2006600 <timer_settime+0x19c> <== NEVER TAKEN
20064ec: ba 10 00 08 mov %o0, %i5
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 ) {
20064f0: c2 07 bf ec ld [ %fp + -20 ], %g1
20064f4: 80 a0 60 00 cmp %g1, 0
20064f8: 12 80 00 05 bne 200650c <timer_settime+0xa8>
20064fc: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006500: 80 a0 60 00 cmp %g1, 0
2006504: 02 80 00 45 be 2006618 <timer_settime+0x1b4>
2006508: 01 00 00 00 nop
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
200650c: 40 00 10 36 call 200a5e4 <_Timespec_To_ticks>
2006510: 90 10 00 1a mov %i2, %o0
2006514: d0 27 60 64 st %o0, [ %i5 + 0x64 ]
initial_period = _Timespec_To_ticks( &normalize.it_value );
2006518: 40 00 10 33 call 200a5e4 <_Timespec_To_ticks>
200651c: 90 07 bf ec add %fp, -20, %o0
activated = _POSIX_Timer_Insert_helper(
2006520: d4 07 60 08 ld [ %i5 + 8 ], %o2
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
2006524: 92 10 00 08 mov %o0, %o1
activated = _POSIX_Timer_Insert_helper(
2006528: 98 10 00 1d mov %i5, %o4
200652c: 90 07 60 10 add %i5, 0x10, %o0
2006530: 17 00 80 19 sethi %hi(0x2006400), %o3
2006534: 40 00 1b d7 call 200d490 <_POSIX_Timer_Insert_helper>
2006538: 96 12 e2 a4 or %o3, 0x2a4, %o3 ! 20066a4 <_POSIX_Timer_TSR>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
200653c: 80 8a 20 ff btst 0xff, %o0
2006540: 02 80 00 18 be 20065a0 <timer_settime+0x13c>
2006544: 80 a6 e0 00 cmp %i3, 0
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
2006548: 02 80 00 0b be 2006574 <timer_settime+0x110>
200654c: c2 07 bf e4 ld [ %fp + -28 ], %g1
*ovalue = ptimer->timer_data;
2006550: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
2006554: c2 26 c0 00 st %g1, [ %i3 ]
2006558: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
200655c: c2 26 e0 04 st %g1, [ %i3 + 4 ]
2006560: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
2006564: c2 26 e0 08 st %g1, [ %i3 + 8 ]
2006568: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
200656c: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
ptimer->timer_data = normalize;
2006570: c2 07 bf e4 ld [ %fp + -28 ], %g1
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
2006574: 90 07 60 6c add %i5, 0x6c, %o0
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
2006578: c2 27 60 54 st %g1, [ %i5 + 0x54 ]
200657c: c2 07 bf e8 ld [ %fp + -24 ], %g1
2006580: c2 27 60 58 st %g1, [ %i5 + 0x58 ]
2006584: c2 07 bf ec ld [ %fp + -20 ], %g1
2006588: c2 27 60 5c st %g1, [ %i5 + 0x5c ]
200658c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006590: c2 27 60 60 st %g1, [ %i5 + 0x60 ]
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
2006594: 82 10 20 03 mov 3, %g1
_TOD_Get( &ptimer->time );
2006598: 40 00 06 4c call 2007ec8 <_TOD_Get>
200659c: c2 2f 60 3c stb %g1, [ %i5 + 0x3c ]
_Thread_Enable_dispatch();
20065a0: 40 00 0c f1 call 2009964 <_Thread_Enable_dispatch>
20065a4: b0 10 20 00 clr %i0
return 0;
20065a8: 81 c7 e0 08 ret
20065ac: 81 e8 00 00 restore
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
20065b0: 40 00 06 46 call 2007ec8 <_TOD_Get>
20065b4: 90 07 bf f4 add %fp, -12, %o0
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
20065b8: 90 07 bf f4 add %fp, -12, %o0
20065bc: 40 00 0f d3 call 200a508 <_Timespec_Greater_than>
20065c0: 92 07 bf ec add %fp, -20, %o1
20065c4: 80 8a 20 ff btst 0xff, %o0
20065c8: 12 80 00 31 bne 200668c <timer_settime+0x228>
20065cc: 92 07 bf ec add %fp, -20, %o1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
20065d0: 90 07 bf f4 add %fp, -12, %o0
20065d4: 40 00 0f f0 call 200a594 <_Timespec_Subtract>
20065d8: 94 10 00 09 mov %o1, %o2
20065dc: 92 10 00 18 mov %i0, %o1
20065e0: 11 00 80 7a sethi %hi(0x201e800), %o0
20065e4: 94 07 bf fc add %fp, -4, %o2
20065e8: 40 00 09 0d call 2008a1c <_Objects_Get>
20065ec: 90 12 20 70 or %o0, 0x70, %o0
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
20065f0: c2 07 bf fc ld [ %fp + -4 ], %g1
20065f4: 80 a0 60 00 cmp %g1, 0
20065f8: 02 bf ff be be 20064f0 <timer_settime+0x8c>
20065fc: ba 10 00 08 mov %o0, %i5
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
2006600: 40 00 27 63 call 201038c <__errno>
2006604: b0 10 3f ff mov -1, %i0
2006608: 82 10 20 16 mov 0x16, %g1
200660c: c2 22 00 00 st %g1, [ %o0 ]
}
2006610: 81 c7 e0 08 ret
2006614: 81 e8 00 00 restore
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 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
2006618: 40 00 11 38 call 200aaf8 <_Watchdog_Remove>
200661c: 90 02 20 10 add %o0, 0x10, %o0
/* The old data of the timer are returned */
if ( ovalue )
2006620: 80 a6 e0 00 cmp %i3, 0
2006624: 02 80 00 0b be 2006650 <timer_settime+0x1ec>
2006628: c2 07 bf e4 ld [ %fp + -28 ], %g1
*ovalue = ptimer->timer_data;
200662c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
2006630: c2 26 c0 00 st %g1, [ %i3 ]
2006634: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
2006638: c2 26 e0 04 st %g1, [ %i3 + 4 ]
200663c: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
2006640: c2 26 e0 08 st %g1, [ %i3 + 8 ]
2006644: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2006648: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
/* The new data are set */
ptimer->timer_data = normalize;
200664c: c2 07 bf e4 ld [ %fp + -28 ], %g1
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
/* Returns with success */
_Thread_Enable_dispatch();
return 0;
2006650: b0 10 20 00 clr %i0
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
2006654: c2 27 60 54 st %g1, [ %i5 + 0x54 ]
2006658: c2 07 bf e8 ld [ %fp + -24 ], %g1
200665c: c2 27 60 58 st %g1, [ %i5 + 0x58 ]
2006660: c2 07 bf ec ld [ %fp + -20 ], %g1
2006664: c2 27 60 5c st %g1, [ %i5 + 0x5c ]
2006668: c2 07 bf f0 ld [ %fp + -16 ], %g1
200666c: c2 27 60 60 st %g1, [ %i5 + 0x60 ]
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
2006670: 82 10 20 04 mov 4, %g1
/* Returns with success */
_Thread_Enable_dispatch();
2006674: 40 00 0c bc call 2009964 <_Thread_Enable_dispatch>
2006678: c2 2f 60 3c stb %g1, [ %i5 + 0x3c ]
return 0;
200667c: 81 c7 e0 08 ret
2006680: 81 e8 00 00 restore
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
2006684: 22 bf ff 89 be,a 20064a8 <timer_settime+0x44>
2006688: c8 06 80 00 ld [ %i2 ], %g4
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
rtems_set_errno_and_return_minus_one( EINVAL );
200668c: 40 00 27 40 call 201038c <__errno>
2006690: b0 10 3f ff mov -1, %i0
2006694: 82 10 20 16 mov 0x16, %g1
2006698: c2 22 00 00 st %g1, [ %o0 ]
200669c: 81 c7 e0 08 ret
20066a0: 81 e8 00 00 restore
02006300 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
2006300: 9d e3 bf 98 save %sp, -104, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
2006304: 3b 00 80 66 sethi %hi(0x2019800), %i5
2006308: ba 17 61 48 or %i5, 0x148, %i5 ! 2019948 <_POSIX_signals_Ualarm_timer>
200630c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2006310: 80 a0 60 00 cmp %g1, 0
2006314: 02 80 00 24 be 20063a4 <ualarm+0xa4>
2006318: b8 10 00 18 mov %i0, %i4
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
200631c: 40 00 10 e8 call 200a6bc <_Watchdog_Remove>
2006320: 90 10 00 1d mov %i5, %o0
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
2006324: 90 02 3f fe add %o0, -2, %o0
2006328: 80 a2 20 01 cmp %o0, 1
200632c: 08 80 00 26 bleu 20063c4 <ualarm+0xc4> <== ALWAYS TAKEN
2006330: b0 10 20 00 clr %i0
/*
* 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 ) {
2006334: 80 a7 20 00 cmp %i4, 0
2006338: 02 80 00 19 be 200639c <ualarm+0x9c>
200633c: 37 00 03 d0 sethi %hi(0xf4000), %i3
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2006340: 90 10 00 1c mov %i4, %o0
2006344: 40 00 3a 67 call 2014ce0 <.udiv>
2006348: 92 16 e2 40 or %i3, 0x240, %o1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
200634c: 92 16 e2 40 or %i3, 0x240, %o1
* 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;
2006350: d0 27 bf f8 st %o0, [ %fp + -8 ]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2006354: 40 00 3b 0f call 2014f90 <.urem>
2006358: 90 10 00 1c mov %i4, %o0
200635c: 87 2a 20 07 sll %o0, 7, %g3
2006360: 82 10 00 08 mov %o0, %g1
2006364: 85 2a 20 02 sll %o0, 2, %g2
2006368: 84 20 c0 02 sub %g3, %g2, %g2
200636c: 82 00 80 01 add %g2, %g1, %g1
2006370: 83 28 60 03 sll %g1, 3, %g1
ticks = _Timespec_To_ticks( &tp );
2006374: 90 07 bf f8 add %fp, -8, %o0
2006378: 40 00 0f 5d call 200a0ec <_Timespec_To_ticks>
200637c: c2 27 bf fc st %g1, [ %fp + -4 ]
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
2006380: 40 00 0f 5b call 200a0ec <_Timespec_To_ticks>
2006384: 90 07 bf f8 add %fp, -8, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006388: 92 10 00 1d mov %i5, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200638c: d0 27 60 0c st %o0, [ %i5 + 0xc ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006390: 11 00 80 64 sethi %hi(0x2019000), %o0
2006394: 40 00 10 68 call 200a534 <_Watchdog_Insert>
2006398: 90 12 20 ec or %o0, 0xec, %o0 ! 20190ec <_Watchdog_Ticks_chain>
}
return remaining;
}
200639c: 81 c7 e0 08 ret
20063a0: 81 e8 00 00 restore
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20063a4: 03 00 80 18 sethi %hi(0x2006000), %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20063a8: c0 27 60 08 clr [ %i5 + 8 ]
the_watchdog->routine = routine;
20063ac: 82 10 62 d4 or %g1, 0x2d4, %g1
the_watchdog->id = id;
20063b0: c0 27 60 20 clr [ %i5 + 0x20 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20063b4: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20063b8: c0 27 60 24 clr [ %i5 + 0x24 ]
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
20063bc: 10 bf ff de b 2006334 <ualarm+0x34>
20063c0: b0 10 20 00 clr %i0
* 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);
20063c4: c4 07 60 0c ld [ %i5 + 0xc ], %g2
20063c8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
20063cc: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20063d0: 92 07 bf f8 add %fp, -8, %o1
* 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);
20063d4: 90 02 00 02 add %o0, %g2, %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20063d8: 40 00 0f 1c call 200a048 <_Timespec_From_ticks>
20063dc: 90 22 00 01 sub %o0, %g1, %o0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20063e0: c2 07 bf f8 ld [ %fp + -8 ], %g1
remaining += tp.tv_nsec / 1000;
20063e4: d0 07 bf fc ld [ %fp + -4 ], %o0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20063e8: 85 28 60 03 sll %g1, 3, %g2
20063ec: 87 28 60 08 sll %g1, 8, %g3
20063f0: 84 20 c0 02 sub %g3, %g2, %g2
remaining += tp.tv_nsec / 1000;
20063f4: 92 10 23 e8 mov 0x3e8, %o1
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20063f8: b1 28 a0 06 sll %g2, 6, %i0
20063fc: b0 26 00 02 sub %i0, %g2, %i0
remaining += tp.tv_nsec / 1000;
2006400: 40 00 3a 3a call 2014ce8 <.div>
2006404: b0 06 00 01 add %i0, %g1, %i0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2006408: b1 2e 20 06 sll %i0, 6, %i0
remaining += tp.tv_nsec / 1000;
200640c: 10 bf ff ca b 2006334 <ualarm+0x34>
2006410: b0 02 00 18 add %o0, %i0, %i0
020069b4 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
20069b4: 9d e3 bf 70 save %sp, -144, %sp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
20069b8: 90 10 00 18 mov %i0, %o0
20069bc: 7f ff f3 f3 call 2003988 <rtems_filesystem_dirname>
20069c0: ba 10 00 18 mov %i0, %i5
if ( parentpathlen == 0 )
20069c4: 80 a2 20 00 cmp %o0, 0
20069c8: 12 80 00 29 bne 2006a6c <unlink+0xb8>
20069cc: b6 10 00 08 mov %o0, %i3
rtems_filesystem_get_start_loc( path, &i, &parentloc );
20069d0: b8 07 bf d4 add %fp, -44, %i4
20069d4: 90 10 00 18 mov %i0, %o0
20069d8: 92 07 bf fc add %fp, -4, %o1
20069dc: 94 10 00 1c mov %i4, %o2
20069e0: 7f ff f8 2d call 2004a94 <rtems_filesystem_get_start_loc>
20069e4: b6 10 20 00 clr %i3
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
20069e8: b4 10 20 00 clr %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20069ec: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = path + parentpathlen;
20069f0: ba 07 40 1b add %i5, %i3, %i5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20069f4: c2 27 bf e8 st %g1, [ %fp + -24 ]
20069f8: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
20069fc: 90 10 00 1d mov %i5, %o0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2006a00: c2 27 bf ec st %g1, [ %fp + -20 ]
2006a04: c2 07 bf dc ld [ %fp + -36 ], %g1
2006a08: c2 27 bf f0 st %g1, [ %fp + -16 ]
2006a0c: c2 07 bf e0 ld [ %fp + -32 ], %g1
2006a10: c2 27 bf f4 st %g1, [ %fp + -12 ]
2006a14: c2 07 bf e4 ld [ %fp + -28 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2006a18: 40 00 37 33 call 20146e4 <strlen>
2006a1c: c2 27 bf f8 st %g1, [ %fp + -8 ]
2006a20: 92 10 00 08 mov %o0, %o1
2006a24: 7f ff f3 e8 call 20039c4 <rtems_filesystem_prefix_separators>
2006a28: 90 10 00 1d mov %i5, %o0
2006a2c: ba 07 40 08 add %i5, %o0, %i5
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2006a30: 40 00 37 2d call 20146e4 <strlen>
2006a34: 90 10 00 1d mov %i5, %o0
2006a38: 94 10 20 00 clr %o2
2006a3c: 92 10 00 08 mov %o0, %o1
2006a40: 96 07 bf e8 add %fp, -24, %o3
2006a44: 90 10 00 1d mov %i5, %o0
2006a48: 7f ff f3 a4 call 20038d8 <rtems_filesystem_evaluate_relative_path>
2006a4c: 98 10 20 00 clr %o4
0, &loc, false );
if ( result != 0 ) {
2006a50: 80 a2 20 00 cmp %o0, 0
2006a54: 02 80 00 17 be 2006ab0 <unlink+0xfc>
2006a58: 80 8e a0 ff btst 0xff, %i2
if ( free_parentloc )
2006a5c: 12 80 00 11 bne 2006aa0 <unlink+0xec>
2006a60: b0 10 3f ff mov -1, %i0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
2006a64: 81 c7 e0 08 ret
2006a68: 81 e8 00 00 restore
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
2006a6c: b8 07 bf d4 add %fp, -44, %i4
2006a70: 90 10 00 18 mov %i0, %o0
2006a74: 92 10 00 1b mov %i3, %o1
2006a78: 94 10 20 02 mov 2, %o2
2006a7c: 96 10 00 1c mov %i4, %o3
2006a80: 98 10 20 00 clr %o4
2006a84: 7f ff f3 b2 call 200394c <rtems_filesystem_evaluate_path>
2006a88: b0 10 3f ff mov -1, %i0
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
2006a8c: 80 a2 20 00 cmp %o0, 0
2006a90: 12 bf ff f5 bne 2006a64 <unlink+0xb0> <== NEVER TAKEN
2006a94: b4 10 20 01 mov 1, %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2006a98: 10 bf ff d6 b 20069f0 <unlink+0x3c>
2006a9c: c2 07 bf d4 ld [ %fp + -44 ], %g1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
2006aa0: 7f ff f3 e5 call 2003a34 <rtems_filesystem_freenode>
2006aa4: 90 10 00 1c mov %i4, %o0
2006aa8: 81 c7 e0 08 ret
2006aac: 81 e8 00 00 restore
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
2006ab0: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006ab4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2006ab8: 9f c0 40 00 call %g1
2006abc: 90 07 bf e8 add %fp, -24, %o0
2006ac0: 80 a2 20 01 cmp %o0, 1
2006ac4: 02 80 00 10 be 2006b04 <unlink+0x150>
2006ac8: c2 07 bf f4 ld [ %fp + -12 ], %g1
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
2006acc: 92 07 bf e8 add %fp, -24, %o1
2006ad0: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2006ad4: 9f c0 40 00 call %g1
2006ad8: 90 10 00 1c mov %i4, %o0
2006adc: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2006ae0: 7f ff f3 d5 call 2003a34 <rtems_filesystem_freenode>
2006ae4: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
2006ae8: 80 8e a0 ff btst 0xff, %i2
2006aec: 02 80 00 11 be 2006b30 <unlink+0x17c>
2006af0: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
2006af4: 7f ff f3 d0 call 2003a34 <rtems_filesystem_freenode>
2006af8: 90 10 00 1c mov %i4, %o0
return result;
}
2006afc: 81 c7 e0 08 ret
2006b00: 81 e8 00 00 restore
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
2006b04: 7f ff f3 cc call 2003a34 <rtems_filesystem_freenode>
2006b08: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
2006b0c: 80 8e a0 ff btst 0xff, %i2
2006b10: 02 80 00 04 be 2006b20 <unlink+0x16c>
2006b14: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
2006b18: 7f ff f3 c7 call 2003a34 <rtems_filesystem_freenode>
2006b1c: 90 10 00 1c mov %i4, %o0
rtems_set_errno_and_return_minus_one( EISDIR );
2006b20: 40 00 33 81 call 2013924 <__errno>
2006b24: b0 10 3f ff mov -1, %i0
2006b28: 82 10 20 15 mov 0x15, %g1
2006b2c: c2 22 00 00 st %g1, [ %o0 ]
2006b30: 81 c7 e0 08 ret
2006b34: 81 e8 00 00 restore
020095c0 <unmount>:
*/
int unmount(
const char *path
)
{
20095c0: 9d e3 bf 88 save %sp, -120, %sp
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
20095c4: 40 00 58 92 call 201f80c <strlen>
20095c8: 90 10 00 18 mov %i0, %o0
20095cc: 94 10 20 00 clr %o2
20095d0: 92 10 00 08 mov %o0, %o1
20095d4: 96 07 bf ec add %fp, -20, %o3
20095d8: 90 10 00 18 mov %i0, %o0
20095dc: 7f ff f0 e4 call 200596c <rtems_filesystem_evaluate_path>
20095e0: 98 10 20 01 mov 1, %o4
20095e4: 80 a2 20 00 cmp %o0, 0
20095e8: 12 80 00 53 bne 2009734 <unmount+0x174>
20095ec: fa 07 bf fc ld [ %fp + -4 ], %i5
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
20095f0: c2 07 bf ec ld [ %fp + -20 ], %g1
20095f4: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
20095f8: 80 a0 80 01 cmp %g2, %g1
20095fc: 12 80 00 3c bne 20096ec <unmount+0x12c>
2009600: 90 07 bf ec add %fp, -20, %o0
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
2009604: 7f ff f1 6e call 2005bbc <rtems_filesystem_freenode>
2009608: 01 00 00 00 nop
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
200960c: 03 00 80 bc sethi %hi(0x202f000), %g1
2009610: c2 00 61 7c ld [ %g1 + 0x17c ], %g1 ! 202f17c <rtems_current_user_env>
2009614: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2009618: 80 a0 40 1d cmp %g1, %i5
200961c: 02 80 00 40 be 200971c <unmount+0x15c>
2009620: 11 00 80 25 sethi %hi(0x2009400), %o0
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
2009624: d2 07 60 2c ld [ %i5 + 0x2c ], %o1
2009628: 7f ff f3 c8 call 2006548 <rtems_filesystem_mount_iterate>
200962c: 90 12 21 ac or %o0, 0x1ac, %o0
2009630: 80 8a 20 ff btst 0xff, %o0
2009634: 12 80 00 3a bne 200971c <unmount+0x15c>
2009638: 01 00 00 00 nop
* Run the file descriptor table to determine if there are any file
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
200963c: 7f ff f2 49 call 2005f60 <rtems_libio_is_open_files_in_fs>
2009640: 90 10 00 1d mov %i5, %o0
2009644: 80 a2 20 01 cmp %o0, 1
2009648: 02 80 00 35 be 200971c <unmount+0x15c>
200964c: 01 00 00 00 nop
* Allow the file system being unmounted on to do its cleanup.
* If it fails it will set the errno to the approprate value
* and the fileystem will not be modified.
*/
if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 )
2009650: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2009654: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2009658: 9f c0 40 00 call %g1
200965c: 90 10 00 1d mov %i5, %o0
2009660: 80 a2 20 00 cmp %o0, 0
2009664: 12 80 00 2a bne 200970c <unmount+0x14c> <== NEVER TAKEN
2009668: 01 00 00 00 nop
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
200966c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2009670: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
2009674: 9f c0 40 00 call %g1
2009678: 90 10 00 1d mov %i5, %o0
200967c: 80 a2 20 00 cmp %o0, 0
2009680: 02 80 00 0c be 20096b0 <unmount+0xf0> <== ALWAYS TAKEN
2009684: 39 00 80 bf sethi %hi(0x202fc00), %i4
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
2009688: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
200968c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2009690: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED
2009694: 9f c0 40 00 call %g1 <== NOT EXECUTED
2009698: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200969c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20096a0: 12 80 00 1d bne 2009714 <unmount+0x154> <== NOT EXECUTED
20096a4: 01 00 00 00 nop <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
20096a8: 81 c7 e0 08 ret <== NOT EXECUTED
20096ac: 81 e8 00 00 restore <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
20096b0: d0 07 20 14 ld [ %i4 + 0x14 ], %o0
20096b4: 92 10 20 00 clr %o1
20096b8: 40 00 03 38 call 200a398 <rtems_semaphore_obtain>
20096bc: 94 10 20 00 clr %o2
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
20096c0: 40 00 06 3e call 200afb8 <_Chain_Extract>
20096c4: 90 10 00 1d mov %i5, %o0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
20096c8: d0 07 20 14 ld [ %i4 + 0x14 ], %o0
20096cc: 40 00 03 7d call 200a4c0 <rtems_semaphore_release>
20096d0: b0 10 20 00 clr %i0
/*
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
20096d4: 7f ff f1 3a call 2005bbc <rtems_filesystem_freenode>
20096d8: 90 07 60 08 add %i5, 8, %o0
free( mt_entry );
20096dc: 7f ff f1 3f call 2005bd8 <free>
20096e0: 90 10 00 1d mov %i5, %o0
return 0;
20096e4: 81 c7 e0 08 ret
20096e8: 81 e8 00 00 restore
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
20096ec: 7f ff f1 34 call 2005bbc <rtems_filesystem_freenode>
20096f0: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EACCES );
20096f4: 40 00 51 fc call 201dee4 <__errno>
20096f8: 01 00 00 00 nop
20096fc: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
2009700: c2 22 00 00 st %g1, [ %o0 ]
2009704: 81 c7 e0 08 ret
2009708: 81 e8 00 00 restore
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
200970c: 81 c7 e0 08 ret <== NOT EXECUTED
2009710: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
2009714: 40 00 05 14 call 200ab64 <rtems_fatal_error_occurred> <== NOT EXECUTED
2009718: 90 10 20 00 clr %o0 <== NOT EXECUTED
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
200971c: 40 00 51 f2 call 201dee4 <__errno>
2009720: b0 10 3f ff mov -1, %i0
2009724: 82 10 20 10 mov 0x10, %g1
2009728: c2 22 00 00 st %g1, [ %o0 ]
200972c: 81 c7 e0 08 ret
2009730: 81 e8 00 00 restore
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
2009734: 81 c7 e0 08 ret
2009738: 91 e8 3f ff restore %g0, -1, %o0
02005dac <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
2005dac: 9d e3 bf 88 save %sp, -120, %sp
for (; *fmt != '\0'; fmt++) {
2005db0: c2 0e 00 00 ldub [ %i0 ], %g1
2005db4: 83 28 60 18 sll %g1, 0x18, %g1
2005db8: 80 a0 60 00 cmp %g1, 0
2005dbc: 02 80 00 7d be 2005fb0 <vprintk+0x204> <== NEVER TAKEN
2005dc0: 29 00 80 73 sethi %hi(0x201cc00), %l4
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
2005dc4: a2 07 bf e8 add %fp, -24, %l1
2005dc8: a6 07 bf e7 add %fp, -25, %l3
2005dcc: 2d 00 80 6e sethi %hi(0x201b800), %l6
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
2005dd0: 2f 00 80 6c sethi %hi(0x201b000), %l7
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
2005dd4: 91 38 60 18 sra %g1, 0x18, %o0
2005dd8: 80 a2 20 25 cmp %o0, 0x25
2005ddc: 12 80 00 8d bne 2006010 <vprintk+0x264>
2005de0: c2 05 23 78 ld [ %l4 + 0x378 ], %g1
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
2005de4: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2005de8: 85 28 60 18 sll %g1, 0x18, %g2
2005dec: 87 38 a0 18 sra %g2, 0x18, %g3
2005df0: 80 a0 e0 30 cmp %g3, 0x30
2005df4: 22 80 00 96 be,a 200604c <vprintk+0x2a0>
2005df8: c2 0e 20 02 ldub [ %i0 + 2 ], %g1
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
2005dfc: b0 06 20 01 inc %i0
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
2005e00: aa 10 20 20 mov 0x20, %l5
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
2005e04: 87 38 a0 18 sra %g2, 0x18, %g3
2005e08: 80 a0 e0 2d cmp %g3, 0x2d
2005e0c: 02 80 00 8b be 2006038 <vprintk+0x28c>
2005e10: a4 10 20 00 clr %l2
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2005e14: 82 00 7f d0 add %g1, -48, %g1
2005e18: 82 08 60 ff and %g1, 0xff, %g1
2005e1c: 80 a0 60 09 cmp %g1, 9
2005e20: 18 80 00 0f bgu 2005e5c <vprintk+0xb0>
2005e24: ba 10 20 00 clr %i5
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
2005e28: b0 06 20 01 inc %i0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2005e2c: c2 0e 00 00 ldub [ %i0 ], %g1
width *= 10;
2005e30: 87 2f 60 01 sll %i5, 1, %g3
width += ((unsigned) *fmt - '0');
2005e34: 85 38 a0 18 sra %g2, 0x18, %g2
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
2005e38: bb 2f 60 03 sll %i5, 3, %i5
2005e3c: ba 00 c0 1d add %g3, %i5, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2005e40: 86 00 7f d0 add %g1, -48, %g3
width *= 10;
width += ((unsigned) *fmt - '0');
2005e44: ba 07 40 02 add %i5, %g2, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2005e48: 86 08 e0 ff and %g3, 0xff, %g3
width *= 10;
width += ((unsigned) *fmt - '0');
2005e4c: ba 07 7f d0 add %i5, -48, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2005e50: 80 a0 e0 09 cmp %g3, 9
2005e54: 08 bf ff f5 bleu 2005e28 <vprintk+0x7c>
2005e58: 85 28 60 18 sll %g1, 0x18, %g2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
2005e5c: 83 38 a0 18 sra %g2, 0x18, %g1
2005e60: 80 a0 60 6c cmp %g1, 0x6c
2005e64: 02 80 00 7e be 200605c <vprintk+0x2b0>
2005e68: 80 a0 60 63 cmp %g1, 0x63
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
2005e6c: 22 80 00 83 be,a 2006078 <vprintk+0x2cc>
2005e70: d0 06 40 00 ld [ %i1 ], %o0
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
2005e74: 80 a0 60 73 cmp %g1, 0x73
2005e78: 02 80 00 8b be 20060a4 <vprintk+0x2f8>
2005e7c: 80 a0 60 4f cmp %g1, 0x4f
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
2005e80: 22 80 00 6c be,a 2006030 <vprintk+0x284>
2005e84: 82 10 20 00 clr %g1
2005e88: 80 a0 60 6f cmp %g1, 0x6f
2005e8c: 22 80 00 69 be,a 2006030 <vprintk+0x284>
2005e90: 82 10 20 00 clr %g1
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
2005e94: 80 a0 60 49 cmp %g1, 0x49
2005e98: 22 80 00 06 be,a 2005eb0 <vprintk+0x104>
2005e9c: 82 10 20 01 mov 1, %g1
2005ea0: 80 a0 60 69 cmp %g1, 0x69
2005ea4: 12 80 00 45 bne 2005fb8 <vprintk+0x20c>
2005ea8: 80 a0 60 44 cmp %g1, 0x44
c == 'd' || c == 'D' ) {
base = 10; sign = true;
2005eac: 82 10 20 01 mov 1, %g1
2005eb0: a0 10 20 0a mov 0xa, %l0
} else {
BSP_output_char(c);
continue;
}
printNum(
2005eb4: f4 06 40 00 ld [ %i1 ], %i2
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
2005eb8: 80 88 60 ff btst 0xff, %g1
2005ebc: 02 80 00 05 be 2005ed0 <vprintk+0x124>
2005ec0: b2 06 60 04 add %i1, 4, %i1
2005ec4: 80 a6 a0 00 cmp %i2, 0
2005ec8: 06 80 00 bf bl 20061c4 <vprintk+0x418>
2005ecc: c2 05 23 78 ld [ %l4 + 0x378 ], %g1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2005ed0: 90 10 00 1a mov %i2, %o0
2005ed4: 92 10 00 10 mov %l0, %o1
2005ed8: 40 00 4a 77 call 20188b4 <.udiv>
2005edc: a4 10 00 10 mov %l0, %l2
2005ee0: b8 92 20 00 orcc %o0, 0, %i4
2005ee4: 12 80 00 06 bne 2005efc <vprintk+0x150>
2005ee8: b6 10 20 00 clr %i3
2005eec: 10 80 00 c4 b 20061fc <vprintk+0x450>
2005ef0: b8 10 00 1a mov %i2, %i4
2005ef4: b4 10 00 1c mov %i4, %i2
2005ef8: b8 10 00 08 mov %o0, %i4
toPrint[count++] = (char) (unsigned_num - (n * base));
2005efc: 92 10 00 1c mov %i4, %o1
2005f00: 40 00 4a 33 call 20187cc <.umul>
2005f04: 90 10 00 12 mov %l2, %o0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2005f08: 92 10 00 10 mov %l0, %o1
toPrint[count++] = (char) (unsigned_num - (n * base));
2005f0c: b4 26 80 08 sub %i2, %o0, %i2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2005f10: 90 10 00 1c mov %i4, %o0
2005f14: 40 00 4a 68 call 20188b4 <.udiv>
2005f18: f4 2c 40 1b stb %i2, [ %l1 + %i3 ]
2005f1c: 80 a2 20 00 cmp %o0, 0
2005f20: 12 bf ff f5 bne 2005ef4 <vprintk+0x148>
2005f24: b6 06 e0 01 inc %i3
2005f28: b4 06 e0 01 add %i3, 1, %i2
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
2005f2c: b6 07 80 1b add %fp, %i3, %i3
for (n=maxwidth ; n > count; n-- )
2005f30: 80 a7 40 1a cmp %i5, %i2
2005f34: 08 80 00 0b bleu 2005f60 <vprintk+0x1b4>
2005f38: f8 2e ff e8 stb %i4, [ %i3 + -24 ]
2005f3c: b8 15 23 78 or %l4, 0x378, %i4
BSP_output_char(lead);
2005f40: aa 0d 60 30 and %l5, 0x30, %l5
2005f44: c2 07 00 00 ld [ %i4 ], %g1
2005f48: 9f c0 40 00 call %g1
2005f4c: 90 10 00 15 mov %l5, %o0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
2005f50: ba 07 7f ff add %i5, -1, %i5
2005f54: 80 a7 40 1a cmp %i5, %i2
2005f58: 38 bf ff fc bgu,a 2005f48 <vprintk+0x19c>
2005f5c: c2 07 00 00 ld [ %i4 ], %g1
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2005f60: 80 a6 a0 00 cmp %i2, 0
2005f64: 22 80 00 0f be,a 2005fa0 <vprintk+0x1f4> <== NEVER TAKEN
2005f68: c2 0e 20 01 ldub [ %i0 + 1 ], %g1 <== NOT EXECUTED
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2005f6c: ba 06 bf ff add %i2, -1, %i5
2005f70: b8 15 23 78 or %l4, 0x378, %i4
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
2005f74: ba 04 40 1d add %l1, %i5, %i5
2005f78: b6 15 a1 d0 or %l6, 0x1d0, %i3
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2005f7c: c4 4f 40 00 ldsb [ %i5 ], %g2
2005f80: c2 07 00 00 ld [ %i4 ], %g1
2005f84: d0 4e c0 02 ldsb [ %i3 + %g2 ], %o0
2005f88: 9f c0 40 00 call %g1
2005f8c: ba 07 7f ff add %i5, -1, %i5
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2005f90: 80 a7 40 13 cmp %i5, %l3
2005f94: 32 bf ff fb bne,a 2005f80 <vprintk+0x1d4>
2005f98: c4 4f 40 00 ldsb [ %i5 ], %g2
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2005f9c: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2005fa0: 83 28 60 18 sll %g1, 0x18, %g1
2005fa4: 80 a0 60 00 cmp %g1, 0
2005fa8: 12 bf ff 8b bne 2005dd4 <vprintk+0x28>
2005fac: b0 06 20 01 inc %i0
2005fb0: 81 c7 e0 08 ret
2005fb4: 81 e8 00 00 restore
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
2005fb8: 22 bf ff be be,a 2005eb0 <vprintk+0x104>
2005fbc: 82 10 20 01 mov 1, %g1
2005fc0: 80 a0 60 64 cmp %g1, 0x64
2005fc4: 22 bf ff bb be,a 2005eb0 <vprintk+0x104>
2005fc8: 82 10 20 01 mov 1, %g1
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
2005fcc: 80 a0 60 55 cmp %g1, 0x55
2005fd0: 22 80 00 8d be,a 2006204 <vprintk+0x458>
2005fd4: 82 10 20 00 clr %g1
2005fd8: 80 a0 60 75 cmp %g1, 0x75
2005fdc: 02 80 00 8a be 2006204 <vprintk+0x458>
2005fe0: 82 10 20 00 clr %g1
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
2005fe4: 91 38 a0 18 sra %g2, 0x18, %o0
2005fe8: 80 a2 20 58 cmp %o0, 0x58
2005fec: 02 80 00 88 be 200620c <vprintk+0x460>
2005ff0: 01 00 00 00 nop
2005ff4: 80 a2 20 78 cmp %o0, 0x78
2005ff8: 02 bf ff af be 2005eb4 <vprintk+0x108>
2005ffc: a0 10 20 10 mov 0x10, %l0
base = 16; sign = false;
} else if ( c == 'p' ) {
2006000: 80 a2 20 70 cmp %o0, 0x70
2006004: 02 bf ff ac be 2005eb4 <vprintk+0x108>
2006008: 01 00 00 00 nop
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
200600c: c2 05 23 78 ld [ %l4 + 0x378 ], %g1
2006010: 9f c0 40 00 call %g1
2006014: 01 00 00 00 nop
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2006018: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
200601c: 83 28 60 18 sll %g1, 0x18, %g1
2006020: 80 a0 60 00 cmp %g1, 0
2006024: 12 bf ff 6c bne 2005dd4 <vprintk+0x28>
2006028: b0 06 20 01 inc %i0
200602c: 30 80 00 64 b,a 20061bc <vprintk+0x410>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
2006030: 10 bf ff a1 b 2005eb4 <vprintk+0x108>
2006034: a0 10 20 08 mov 8, %l0
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
2006038: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
200603c: a4 10 20 01 mov 1, %l2
fmt++;
2006040: b0 06 20 01 inc %i0
2006044: 10 bf ff 74 b 2005e14 <vprintk+0x68>
2006048: 85 28 60 18 sll %g1, 0x18, %g2
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
200604c: aa 10 20 30 mov 0x30, %l5
fmt++;
2006050: b0 06 20 02 add %i0, 2, %i0
2006054: 10 bf ff 6c b 2005e04 <vprintk+0x58>
2006058: 85 28 60 18 sll %g1, 0x18, %g2
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
200605c: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2006060: 85 28 60 18 sll %g1, 0x18, %g2
}
if ( c == 'c' ) {
2006064: 83 38 a0 18 sra %g2, 0x18, %g1
2006068: 80 a0 60 63 cmp %g1, 0x63
200606c: 12 bf ff 82 bne 2005e74 <vprintk+0xc8> <== ALWAYS TAKEN
2006070: b0 06 20 01 inc %i0
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
2006074: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
BSP_output_char(chr);
2006078: c2 05 23 78 ld [ %l4 + 0x378 ], %g1
200607c: 91 2a 20 18 sll %o0, 0x18, %o0
2006080: 9f c0 40 00 call %g1
2006084: 91 3a 20 18 sra %o0, 0x18, %o0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2006088: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
200608c: b2 06 60 04 add %i1, 4, %i1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2006090: 83 28 60 18 sll %g1, 0x18, %g1
2006094: 80 a0 60 00 cmp %g1, 0
2006098: 12 bf ff 4f bne 2005dd4 <vprintk+0x28> <== ALWAYS TAKEN
200609c: b0 06 20 01 inc %i0
20060a0: 30 80 00 47 b,a 20061bc <vprintk+0x410> <== NOT EXECUTED
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
20060a4: f6 06 40 00 ld [ %i1 ], %i3
if ( str == NULL ) {
20060a8: 80 a6 e0 00 cmp %i3, 0
20060ac: 02 80 00 5a be 2006214 <vprintk+0x468>
20060b0: b2 06 60 04 add %i1, 4, %i1
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
20060b4: c2 4e c0 00 ldsb [ %i3 ], %g1
20060b8: 80 a0 60 00 cmp %g1, 0
20060bc: 02 80 00 08 be 20060dc <vprintk+0x330>
20060c0: b4 10 20 00 clr %i2
20060c4: 82 10 00 1b mov %i3, %g1
20060c8: 82 00 60 01 inc %g1
20060cc: c4 48 40 00 ldsb [ %g1 ], %g2
20060d0: 80 a0 a0 00 cmp %g2, 0
20060d4: 12 bf ff fd bne 20060c8 <vprintk+0x31c>
20060d8: b4 06 a0 01 inc %i2
;
/* leading spaces */
if ( !minus )
20060dc: a4 8c a0 ff andcc %l2, 0xff, %l2
20060e0: 12 80 00 0f bne 200611c <vprintk+0x370>
20060e4: 80 a7 60 00 cmp %i5, 0
for ( i=len ; i<width ; i++ )
20060e8: 80 a7 40 1a cmp %i5, %i2
20060ec: 08 80 00 0c bleu 200611c <vprintk+0x370>
20060f0: 80 a7 60 00 cmp %i5, 0
20060f4: a0 10 00 1a mov %i2, %l0
20060f8: b8 15 23 78 or %l4, 0x378, %i4
BSP_output_char(' ');
20060fc: c2 07 00 00 ld [ %i4 ], %g1
2006100: 9f c0 40 00 call %g1
2006104: 90 10 20 20 mov 0x20, %o0
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
2006108: a0 04 20 01 inc %l0
200610c: 80 a7 40 10 cmp %i5, %l0
2006110: 38 bf ff fc bgu,a 2006100 <vprintk+0x354>
2006114: c2 07 00 00 ld [ %i4 ], %g1
BSP_output_char(' ');
/* no width option */
if (width == 0) {
2006118: 80 a7 60 00 cmp %i5, 0
200611c: 32 80 00 07 bne,a 2006138 <vprintk+0x38c>
2006120: d0 4e c0 00 ldsb [ %i3 ], %o0
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2006124: 80 a6 a0 00 cmp %i2, 0
2006128: 02 80 00 13 be 2006174 <vprintk+0x3c8>
200612c: 80 a4 a0 00 cmp %l2, 0
2006130: ba 10 00 1a mov %i2, %i5
2006134: d0 4e c0 00 ldsb [ %i3 ], %o0
2006138: 80 a2 20 00 cmp %o0, 0
200613c: 02 80 00 0d be 2006170 <vprintk+0x3c4> <== NEVER TAKEN
2006140: c2 05 23 78 ld [ %l4 + 0x378 ], %g1
BSP_output_char(*str);
2006144: 9f c0 40 00 call %g1
2006148: b8 15 23 78 or %l4, 0x378, %i4
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
200614c: 10 80 00 05 b 2006160 <vprintk+0x3b4>
2006150: b6 06 e0 01 inc %i3
BSP_output_char(*str);
2006154: c2 07 00 00 ld [ %i4 ], %g1
2006158: 9f c0 40 00 call %g1
200615c: 01 00 00 00 nop
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2006160: d0 4e c0 00 ldsb [ %i3 ], %o0
2006164: 80 a2 20 00 cmp %o0, 0
2006168: 12 bf ff fb bne 2006154 <vprintk+0x3a8>
200616c: b6 06 e0 01 inc %i3
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
2006170: 80 a4 a0 00 cmp %l2, 0
2006174: 22 bf ff 8b be,a 2005fa0 <vprintk+0x1f4>
2006178: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
for ( i=len ; i<width ; i++ )
200617c: 80 a6 80 1d cmp %i2, %i5
2006180: 3a bf ff 88 bcc,a 2005fa0 <vprintk+0x1f4>
2006184: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2006188: b8 15 23 78 or %l4, 0x378, %i4
BSP_output_char(' ');
200618c: c2 07 00 00 ld [ %i4 ], %g1
2006190: 9f c0 40 00 call %g1
2006194: 90 10 20 20 mov 0x20, %o0
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
2006198: b4 06 a0 01 inc %i2
200619c: 80 a6 80 1d cmp %i2, %i5
20061a0: 2a bf ff fc bcs,a 2006190 <vprintk+0x3e4>
20061a4: c2 07 00 00 ld [ %i4 ], %g1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
20061a8: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
20061ac: 83 28 60 18 sll %g1, 0x18, %g1
20061b0: 80 a0 60 00 cmp %g1, 0
20061b4: 12 bf ff 08 bne 2005dd4 <vprintk+0x28> <== ALWAYS TAKEN
20061b8: b0 06 20 01 inc %i0
20061bc: 81 c7 e0 08 ret
20061c0: 81 e8 00 00 restore
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
20061c4: 9f c0 40 00 call %g1
20061c8: 90 10 20 2d mov 0x2d, %o0
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
20061cc: 80 a0 00 1d cmp %g0, %i5
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
20061d0: b4 20 00 1a neg %i2
if (maxwidth) maxwidth--;
20061d4: ba 67 60 00 subx %i5, 0, %i5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20061d8: 90 10 00 1a mov %i2, %o0
20061dc: 92 10 00 10 mov %l0, %o1
20061e0: 40 00 49 b5 call 20188b4 <.udiv>
20061e4: a4 10 00 10 mov %l0, %l2
20061e8: b8 92 20 00 orcc %o0, 0, %i4
20061ec: 12 bf ff 44 bne 2005efc <vprintk+0x150> <== ALWAYS TAKEN
20061f0: b6 10 20 00 clr %i3
20061f4: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
20061f8: b6 10 20 00 clr %i3 <== NOT EXECUTED
while ((n = unsigned_num / base) > 0) {
20061fc: 10 bf ff 4c b 2005f2c <vprintk+0x180>
2006200: b4 10 20 01 mov 1, %i2
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
2006204: 10 bf ff 2c b 2005eb4 <vprintk+0x108>
2006208: a0 10 20 0a mov 0xa, %l0
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
200620c: 10 bf ff 2a b 2005eb4 <vprintk+0x108>
2006210: a0 10 20 10 mov 0x10, %l0
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
2006214: 10 bf ff a8 b 20060b4 <vprintk+0x308>
2006218: b6 15 e3 a8 or %l7, 0x3a8, %i3
0201a42c <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
201a42c: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201a430: 03 00 80 73 sethi %hi(0x201cc00), %g1
201a434: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 201ceb8 <rtems_libio_number_iops>
201a438: 80 a6 00 01 cmp %i0, %g1
201a43c: 1a 80 00 1e bcc 201a4b4 <write+0x88>
201a440: 03 00 80 76 sethi %hi(0x201d800), %g1
iop = rtems_libio_iop( fd );
201a444: fa 00 61 34 ld [ %g1 + 0x134 ], %i5 ! 201d934 <rtems_libio_iops>
201a448: b1 2e 20 06 sll %i0, 6, %i0
201a44c: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
201a450: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201a454: 80 88 61 00 btst 0x100, %g1
201a458: 02 80 00 17 be 201a4b4 <write+0x88>
201a45c: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201a460: 02 80 00 1b be 201a4cc <write+0xa0> <== NEVER TAKEN
201a464: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201a468: 02 80 00 11 be 201a4ac <write+0x80>
201a46c: b0 10 20 00 clr %i0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
201a470: 80 88 60 04 btst 4, %g1
201a474: 02 80 00 10 be 201a4b4 <write+0x88>
201a478: 90 10 00 1d mov %i5, %o0
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
201a47c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
201a480: c2 00 60 0c ld [ %g1 + 0xc ], %g1
201a484: 92 10 00 19 mov %i1, %o1
201a488: 9f c0 40 00 call %g1
201a48c: 94 10 00 1a mov %i2, %o2
if ( rc > 0 )
201a490: b0 92 20 00 orcc %o0, 0, %i0
201a494: 04 80 00 06 ble 201a4ac <write+0x80>
201a498: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
201a49c: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201a4a0: 86 83 40 18 addcc %o5, %i0, %g3
201a4a4: 84 43 00 02 addx %o4, %g2, %g2
201a4a8: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
return rc;
}
201a4ac: 81 c7 e0 08 ret
201a4b0: 81 e8 00 00 restore
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
201a4b4: 7f ff d5 86 call 200facc <__errno>
201a4b8: b0 10 3f ff mov -1, %i0
201a4bc: 82 10 20 09 mov 9, %g1
201a4c0: c2 22 00 00 st %g1, [ %o0 ]
201a4c4: 81 c7 e0 08 ret
201a4c8: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
201a4cc: 7f ff d5 80 call 200facc <__errno> <== NOT EXECUTED
201a4d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201a4d4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201a4d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201a4dc: 81 c7 e0 08 ret <== NOT EXECUTED
201a4e0: 81 e8 00 00 restore <== NOT EXECUTED
02006fec <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
2006fec: 9d e3 bf a0 save %sp, -96, %sp
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
2006ff0: 03 00 80 5e sethi %hi(0x2017800), %g1
2006ff4: c2 00 63 38 ld [ %g1 + 0x338 ], %g1 ! 2017b38 <rtems_libio_number_iops>
2006ff8: 80 a6 00 01 cmp %i0, %g1
2006ffc: 1a 80 00 50 bcc 200713c <writev+0x150>
2007000: 03 00 80 61 sethi %hi(0x2018400), %g1
iop = rtems_libio_iop( fd );
2007004: f6 00 61 80 ld [ %g1 + 0x180 ], %i3 ! 2018580 <rtems_libio_iops>
2007008: b1 2e 20 06 sll %i0, 6, %i0
200700c: b6 06 c0 18 add %i3, %i0, %i3
rtems_libio_check_is_open( iop );
2007010: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
2007014: 80 88 61 00 btst 0x100, %g1
2007018: 02 80 00 49 be 200713c <writev+0x150>
200701c: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2007020: 02 80 00 47 be 200713c <writev+0x150> <== NEVER TAKEN
2007024: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
2007028: 02 80 00 3f be 2007124 <writev+0x138>
200702c: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
2007030: 04 80 00 3d ble 2007124 <writev+0x138>
2007034: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2007038: 14 80 00 3b bg 2007124 <writev+0x138> <== NEVER TAKEN
200703c: b5 2e a0 03 sll %i2, 3, %i2
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
2007040: 82 10 20 00 clr %g1
2007044: ba 10 20 01 mov 1, %i5
2007048: 84 10 20 00 clr %g2
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
200704c: c6 06 40 01 ld [ %i1 + %g1 ], %g3
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
2007050: b8 06 40 01 add %i1, %g1, %i4
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
2007054: 80 a0 e0 00 cmp %g3, 0
2007058: 02 80 00 33 be 2007124 <writev+0x138>
200705c: 88 10 20 01 mov 1, %g4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
2007060: c6 07 20 04 ld [ %i4 + 4 ], %g3
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
2007064: 82 00 60 08 add %g1, 8, %g1
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
2007068: 80 a0 00 03 cmp %g0, %g3
200706c: b8 40 3f ff addx %g0, -1, %i4
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
2007070: 86 80 c0 02 addcc %g3, %g2, %g3
2007074: 0c 80 00 2c bneg 2007124 <writev+0x138>
2007078: ba 0f 40 1c and %i5, %i4, %i5
200707c: 80 a0 80 03 cmp %g2, %g3
2007080: 24 80 00 02 ble,a 2007088 <writev+0x9c>
2007084: 88 10 20 00 clr %g4
2007088: 80 89 20 ff btst 0xff, %g4
200708c: 12 80 00 26 bne 2007124 <writev+0x138>
2007090: 80 a0 40 1a cmp %g1, %i2
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
2007094: 12 bf ff ee bne 200704c <writev+0x60>
2007098: 84 10 00 03 mov %g3, %g2
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
200709c: 80 8f 60 ff btst 0xff, %i5
20070a0: 12 80 00 1f bne 200711c <writev+0x130>
20070a4: b0 10 20 00 clr %i0
20070a8: 10 80 00 05 b 20070bc <writev+0xd0>
20070ac: ba 10 20 00 clr %i5
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
20070b0: 80 a7 40 1a cmp %i5, %i2
20070b4: 02 80 00 26 be 200714c <writev+0x160>
20070b8: 01 00 00 00 nop
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
20070bc: b8 06 40 1d add %i1, %i5, %i4
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
20070c0: d4 07 20 04 ld [ %i4 + 4 ], %o2
20070c4: 80 a2 a0 00 cmp %o2, 0
20070c8: 22 bf ff fa be,a 20070b0 <writev+0xc4> <== NEVER TAKEN
20070cc: ba 07 60 08 add %i5, 8, %i5 <== NOT EXECUTED
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
20070d0: c2 06 e0 24 ld [ %i3 + 0x24 ], %g1
20070d4: d2 06 40 1d ld [ %i1 + %i5 ], %o1
20070d8: c2 00 60 0c ld [ %g1 + 0xc ], %g1
20070dc: 9f c0 40 00 call %g1
20070e0: 90 10 00 1b mov %i3, %o0
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
20070e4: 80 a2 20 00 cmp %o0, 0
20070e8: 06 80 00 1b bl 2007154 <writev+0x168> <== NEVER TAKEN
20070ec: 01 00 00 00 nop
return -1;
if ( bytes > 0 ) {
20070f0: 02 80 00 07 be 200710c <writev+0x120> <== NEVER TAKEN
20070f4: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
20070f8: c4 1e e0 10 ldd [ %i3 + 0x10 ], %g2
20070fc: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2007100: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
2007104: 84 40 80 10 addx %g2, %l0, %g2
2007108: c4 3e e0 10 std %g2, [ %i3 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
200710c: c2 07 20 04 ld [ %i4 + 4 ], %g1
2007110: 80 a2 00 01 cmp %o0, %g1
2007114: 02 bf ff e7 be 20070b0 <writev+0xc4> <== ALWAYS TAKEN
2007118: ba 07 60 08 add %i5, 8, %i5
break;
}
return total;
}
200711c: 81 c7 e0 08 ret
2007120: 81 e8 00 00 restore
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
2007124: 40 00 24 cd call 2010458 <__errno>
2007128: b0 10 3f ff mov -1, %i0
200712c: 82 10 20 16 mov 0x16, %g1
2007130: c2 22 00 00 st %g1, [ %o0 ]
2007134: 81 c7 e0 08 ret
2007138: 81 e8 00 00 restore
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
200713c: 40 00 24 c7 call 2010458 <__errno>
2007140: b0 10 3f ff mov -1, %i0
2007144: 82 10 20 09 mov 9, %g1
2007148: c2 22 00 00 st %g1, [ %o0 ]
200714c: 81 c7 e0 08 ret
2007150: 81 e8 00 00 restore
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
2007154: 81 c7 e0 08 ret <== NOT EXECUTED
2007158: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED