RTEMS 4.10Annotated Report
Thu May 27 17:32:48 2010
0200a03c <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 ) {
200a03c: 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;
200a040: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
switch( node->type ) {
200a044: c2 00 60 4c ld [ %g1 + 0x4c ], %g1
200a048: 80 a0 60 07 cmp %g1, 7
200a04c: 18 80 00 0a bgu 200a074 <IMFS_Set_handlers+0x38> <== NEVER TAKEN
200a050: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
200a054: 83 28 60 02 sll %g1, 2, %g1
200a058: 07 00 80 28 sethi %hi(0x200a000), %g3
200a05c: 86 10 e0 1c or %g3, 0x1c, %g3 ! 200a01c <miniIMFS_initialize+0x24>
200a060: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
200a064: 81 c0 40 00 jmp %g1
200a068: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200a06c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200a070: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
200a074: 81 c3 e0 08 retl
200a078: 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;
200a07c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200a080: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
200a084: 81 c3 e0 08 retl
200a088: 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;
200a08c: 03 00 80 67 sethi %hi(0x2019c00), %g1
200a090: 82 10 63 c8 or %g1, 0x3c8, %g1 ! 2019fc8 <IMFS_link_handlers>
200a094: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
200a098: 81 c3 e0 08 retl
200a09c: 90 10 20 00 clr %o0
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
200a0a0: 03 00 80 67 sethi %hi(0x2019c00), %g1
200a0a4: 82 10 62 bc or %g1, 0x2bc, %g1 ! 2019ebc <IMFS_fifo_handlers>
200a0a8: c2 22 20 08 st %g1, [ %o0 + 8 ]
break;
}
return 0;
}
200a0ac: 81 c3 e0 08 retl
200a0b0: 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;
200a0b4: 03 00 80 67 sethi %hi(0x2019c00), %g1
200a0b8: 82 10 63 90 or %g1, 0x390, %g1 ! 2019f90 <IMFS_device_handlers>
200a0bc: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
200a0c0: 81 c3 e0 08 retl
200a0c4: 90 10 20 00 clr %o0
0200d80c <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
200d80c: 9d e3 bf 98 save %sp, -104, %sp
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
200d810: 90 10 20 01 mov 1, %o0
200d814: 7f ff f6 4a call 200b13c <calloc>
200d818: 92 10 20 68 mov 0x68, %o1
if ( !node )
200d81c: a0 92 20 00 orcc %o0, 0, %l0
200d820: 02 80 00 12 be 200d868 <IMFS_allocate_node+0x5c> <== NEVER TAKEN
200d824: 82 10 20 01 mov 1, %g1
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
200d828: 92 10 00 19 mov %i1, %o1
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
200d82c: c2 34 20 34 sth %g1, [ %l0 + 0x34 ]
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
200d830: 94 10 20 20 mov 0x20, %o2
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
200d834: f0 24 20 4c st %i0, [ %l0 + 0x4c ]
strncpy( node->name, name, IMFS_NAME_MAX );
200d838: 40 00 08 2e call 200f8f0 <strncpy>
200d83c: 90 04 20 0c add %l0, 0xc, %o0
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200d840: 90 07 bf f8 add %fp, -8, %o0
strncpy( node->name, name, IMFS_NAME_MAX );
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
200d844: f4 24 20 30 st %i2, [ %l0 + 0x30 ]
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
#else
node->st_uid = 0;
200d848: c0 34 20 3c clrh [ %l0 + 0x3c ]
node->st_gid = 0;
200d84c: c0 34 20 3e clrh [ %l0 + 0x3e ]
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200d850: 7f ff f6 f2 call 200b418 <gettimeofday>
200d854: 92 10 20 00 clr %o1
node->stat_atime = (time_t) tv.tv_sec;
200d858: c2 07 bf f8 ld [ %fp + -8 ], %g1
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
200d85c: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
200d860: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
node->stat_mtime = (time_t) tv.tv_sec;
200d864: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
node->stat_ctime = (time_t) tv.tv_sec;
return node;
}
200d868: 81 c7 e0 08 ret
200d86c: 91 e8 00 10 restore %g0, %l0, %o0
0200d8b0 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
200d8b0: 9d e3 bf a0 save %sp, -96, %sp
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
200d8b4: 80 a6 20 00 cmp %i0, 0
200d8b8: 12 80 00 04 bne 200d8c8 <IMFS_create_node+0x18> <== ALWAYS TAKEN
200d8bc: a0 10 20 00 clr %l0
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
200d8c0: 81 c7 e0 08 ret <== NOT EXECUTED
200d8c4: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
200d8c8: 03 00 80 6b sethi %hi(0x201ac00), %g1
200d8cc: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
200d8d0: 92 10 00 1a mov %i2, %o1
200d8d4: d4 00 60 2c ld [ %g1 + 0x2c ], %o2
200d8d8: 90 10 00 19 mov %i1, %o0
200d8dc: 7f ff ff cc call 200d80c <IMFS_allocate_node>
200d8e0: 94 2e c0 0a andn %i3, %o2, %o2
if ( !node )
200d8e4: a0 92 20 00 orcc %o0, 0, %l0
200d8e8: 02 bf ff f6 be 200d8c0 <IMFS_create_node+0x10> <== NEVER TAKEN
200d8ec: 80 a6 60 07 cmp %i1, 7
return NULL;
/*
* Set the type specific information
*/
switch (type) {
200d8f0: 28 80 00 0a bleu,a 200d918 <IMFS_create_node+0x68> <== ALWAYS TAKEN
200d8f4: b3 2e 60 02 sll %i1, 2, %i1
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
default:
assert(0);
200d8f8: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED
200d8fc: 15 00 80 68 sethi %hi(0x201a000), %o2 <== NOT EXECUTED
200d900: 17 00 80 68 sethi %hi(0x201a000), %o3 <== NOT EXECUTED
200d904: 90 12 21 a0 or %o0, 0x1a0, %o0 <== NOT EXECUTED
200d908: 94 12 a1 f8 or %o2, 0x1f8, %o2 <== NOT EXECUTED
200d90c: 96 12 e1 f0 or %o3, 0x1f0, %o3 <== NOT EXECUTED
200d910: 7f ff f5 f9 call 200b0f4 <__assert_func> <== NOT EXECUTED
200d914: 92 10 20 5c mov 0x5c, %o1 <== NOT EXECUTED
return NULL;
/*
* Set the type specific information
*/
switch (type) {
200d918: 03 00 80 35 sethi %hi(0x200d400), %g1
200d91c: 82 10 63 ec or %g1, 0x3ec, %g1 ! 200d7ec <fifo_open+0x410>
200d920: c2 00 40 19 ld [ %g1 + %i1 ], %g1
200d924: 81 c0 40 00 jmp %g1
200d928: 01 00 00 00 nop
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
200d92c: c2 07 00 00 ld [ %i4 ], %g1
200d930: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
200d934: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
200d938: d0 06 00 00 ld [ %i0 ], %o0
fs_info = parent_loc->mt_entry->fs_info;
200d93c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2
node->Parent = parent;
200d940: d0 24 20 08 st %o0, [ %l0 + 8 ]
node->st_ino = ++fs_info->ino_count;
200d944: c2 00 a0 04 ld [ %g2 + 4 ], %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200d948: 90 02 20 50 add %o0, 0x50, %o0
200d94c: 82 00 60 01 inc %g1
200d950: c2 20 a0 04 st %g1, [ %g2 + 4 ]
200d954: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
200d958: 92 10 00 10 mov %l0, %o1
200d95c: 7f ff e4 2b call 2006a08 <_Chain_Append>
200d960: b0 10 00 10 mov %l0, %i0
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
200d964: 81 c7 e0 08 ret
200d968: 81 e8 00 00 restore
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
200d96c: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED
200d970: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED
node->info.linearfile.direct = 0;
200d974: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
200d978: c0 24 20 50 clr [ %l0 + 0x50 ]
200d97c: c0 24 20 54 clr [ %l0 + 0x54 ]
node->info.file.indirect = 0;
200d980: c0 24 20 58 clr [ %l0 + 0x58 ]
node->info.file.doubly_indirect = 0;
200d984: c0 24 20 5c clr [ %l0 + 0x5c ]
node->info.file.triply_indirect = 0;
break;
200d988: 10 bf ff eb b 200d934 <IMFS_create_node+0x84>
200d98c: c0 24 20 60 clr [ %l0 + 0x60 ]
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
200d990: 10 bf ff e9 b 200d934 <IMFS_create_node+0x84>
200d994: c0 24 20 50 clr [ %l0 + 0x50 ]
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
200d998: c4 07 20 04 ld [ %i4 + 4 ], %g2
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
200d99c: c2 07 00 00 ld [ %i4 ], %g1
node->info.device.minor = info->device.minor;
200d9a0: c4 24 20 54 st %g2, [ %l0 + 0x54 ]
break;
200d9a4: 10 bf ff e4 b 200d934 <IMFS_create_node+0x84>
200d9a8: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200d9ac: 82 04 20 54 add %l0, 0x54, %g1
the_chain->permanent_null = NULL;
200d9b0: c0 24 20 54 clr [ %l0 + 0x54 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200d9b4: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200d9b8: 82 04 20 50 add %l0, 0x50, %g1
200d9bc: 10 bf ff de b 200d934 <IMFS_create_node+0x84>
200d9c0: c2 24 20 58 st %g1, [ %l0 + 0x58 ]
0200d870 <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
200d870: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
200d874: 90 10 20 01 mov 1, %o0
200d878: 13 00 80 68 sethi %hi(0x201a000), %o1
200d87c: 15 00 00 10 sethi %hi(0x4000), %o2
200d880: 92 12 61 98 or %o1, 0x198, %o1
200d884: 7f ff ff e2 call 200d80c <IMFS_allocate_node>
200d888: 94 12 a1 ed or %o2, 0x1ed, %o2
if ( !node )
200d88c: 80 a2 20 00 cmp %o0, 0
200d890: 02 80 00 06 be 200d8a8 <IMFS_create_root_node+0x38> <== NEVER TAKEN
200d894: 82 02 20 54 add %o0, 0x54, %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
200d898: c0 22 20 54 clr [ %o0 + 0x54 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200d89c: c2 22 20 50 st %g1, [ %o0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200d8a0: 82 02 20 50 add %o0, 0x50, %g1
200d8a4: c2 22 20 58 st %g1, [ %o0 + 0x58 ]
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
return node;
}
200d8a8: 81 c7 e0 08 ret
200d8ac: 91 e8 00 08 restore %g0, %o0, %o0
02004c9c <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
2004c9c: 9d e3 bf a0 save %sp, -96, %sp
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2004ca0: 80 a6 20 00 cmp %i0, 0
2004ca4: 02 80 00 2b be 2004d50 <IMFS_dump_directory+0xb4> <== NEVER TAKEN
2004ca8: 80 a6 60 00 cmp %i1, 0
assert( level >= 0 );
2004cac: 06 80 00 38 bl 2004d8c <IMFS_dump_directory+0xf0> <== NEVER TAKEN
2004cb0: 11 00 80 93 sethi %hi(0x2024c00), %o0
assert( the_directory->type == IMFS_DIRECTORY );
2004cb4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
2004cb8: 80 a0 60 01 cmp %g1, 1
2004cbc: 12 80 00 2d bne 2004d70 <IMFS_dump_directory+0xd4> <== NEVER TAKEN
2004cc0: a8 06 20 54 add %i0, 0x54, %l4
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
2004cc4: e6 06 20 50 ld [ %i0 + 0x50 ], %l3
2004cc8: 80 a4 c0 14 cmp %l3, %l4
2004ccc: 02 80 00 1b be 2004d38 <IMFS_dump_directory+0x9c>
2004cd0: 25 00 80 9a sethi %hi(0x2026800), %l2
2004cd4: 23 00 80 93 sethi %hi(0x2024c00), %l1
2004cd8: a4 14 a2 f0 or %l2, 0x2f0, %l2
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2004cdc: a2 14 62 58 or %l1, 0x258, %l1
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2004ce0: aa 06 60 01 add %i1, 1, %l5
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
2004ce4: a0 10 20 00 clr %l0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2004ce8: c2 04 80 00 ld [ %l2 ], %g1
2004cec: 90 10 00 11 mov %l1, %o0
2004cf0: d6 00 60 08 ld [ %g1 + 8 ], %o3
2004cf4: 92 10 20 01 mov 1, %o1
2004cf8: 40 00 43 4f call 2015a34 <fwrite>
2004cfc: 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++ )
2004d00: a0 04 20 01 inc %l0
2004d04: 80 a6 40 10 cmp %i1, %l0
2004d08: 36 bf ff f9 bge,a 2004cec <IMFS_dump_directory+0x50>
2004d0c: c2 04 80 00 ld [ %l2 ], %g1
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2004d10: 7f ff ff 7d call 2004b04 <IMFS_print_jnode>
2004d14: 90 10 00 13 mov %l3, %o0
if ( the_jnode->type == IMFS_DIRECTORY )
2004d18: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1
2004d1c: 80 a0 60 01 cmp %g1, 1
2004d20: 22 80 00 08 be,a 2004d40 <IMFS_dump_directory+0xa4>
2004d24: 90 10 00 13 mov %l3, %o0
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2004d28: e6 04 c0 00 ld [ %l3 ], %l3
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
2004d2c: 80 a4 c0 14 cmp %l3, %l4
2004d30: 12 bf ff ee bne 2004ce8 <IMFS_dump_directory+0x4c>
2004d34: a0 10 20 00 clr %l0
2004d38: 81 c7 e0 08 ret
2004d3c: 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 );
2004d40: 7f ff ff d7 call 2004c9c <IMFS_dump_directory>
2004d44: 92 10 00 15 mov %l5, %o1
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2004d48: 10 bf ff f9 b 2004d2c <IMFS_dump_directory+0x90>
2004d4c: e6 04 c0 00 ld [ %l3 ], %l3
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2004d50: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED
2004d54: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED
2004d58: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED
2004d5c: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED
2004d60: 94 12 a3 20 or %o2, 0x320, %o2 <== NOT EXECUTED
2004d64: 96 12 e2 10 or %o3, 0x210, %o3 <== NOT EXECUTED
2004d68: 40 00 02 37 call 2005644 <__assert_func> <== NOT EXECUTED
2004d6c: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
2004d70: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED
2004d74: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED
2004d78: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED
2004d7c: 94 12 a3 20 or %o2, 0x320, %o2 <== NOT EXECUTED
2004d80: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED
2004d84: 40 00 02 30 call 2005644 <__assert_func> <== NOT EXECUTED
2004d88: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
2004d8c: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED
2004d90: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED
2004d94: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED
2004d98: 94 12 a3 20 or %o2, 0x320, %o2 <== NOT EXECUTED
2004d9c: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED
2004da0: 40 00 02 29 call 2005644 <__assert_func> <== NOT EXECUTED
2004da4: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED
0200a258 <IMFS_eval_path>:
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200a258: 9d e3 bf 78 save %sp, -136, %sp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200a25c: e0 06 c0 00 ld [ %i3 ], %l0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200a260: 2b 00 80 6b sethi %hi(0x201ac00), %l5
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200a264: a2 10 00 18 mov %i0, %l1
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200a268: aa 15 60 80 or %l5, 0x80, %l5
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200a26c: a4 10 20 00 clr %l2
200a270: a6 07 bf d8 add %fp, -40, %l3
200a274: a8 07 bf fc add %fp, -4, %l4
* 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 );
200a278: 90 04 40 12 add %l1, %l2, %o0
200a27c: 92 10 00 19 mov %i1, %o1
200a280: 94 10 00 13 mov %l3, %o2
200a284: 40 00 02 72 call 200ac4c <IMFS_get_token>
200a288: 96 10 00 14 mov %l4, %o3
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
200a28c: c2 06 c0 00 ld [ %i3 ], %g1
* 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 );
200a290: ac 10 00 08 mov %o0, %l6
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
200a294: 80 a0 60 00 cmp %g1, 0
200a298: 02 80 00 5b be 200a404 <IMFS_eval_path+0x1ac> <== NEVER TAKEN
200a29c: c6 07 bf fc ld [ %fp + -4 ], %g3
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
200a2a0: b2 26 40 03 sub %i1, %g3, %i1
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
200a2a4: 80 a2 20 00 cmp %o0, 0
200a2a8: 12 80 00 11 bne 200a2ec <IMFS_eval_path+0x94>
200a2ac: a4 04 80 03 add %l2, %g3, %l2
* 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 ) {
200a2b0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200a2b4: 80 a0 a0 01 cmp %g2, 1
200a2b8: 22 80 00 62 be,a 200a440 <IMFS_eval_path+0x1e8>
200a2bc: c8 00 60 5c ld [ %g1 + 0x5c ], %g4
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
200a2c0: 7f ff ff 5f call 200a03c <IMFS_Set_handlers>
200a2c4: 90 10 00 1b mov %i3, %o0
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
200a2c8: c2 06 c0 00 ld [ %i3 ], %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200a2cc: b5 2e a0 06 sll %i2, 6, %i2
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
200a2d0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
200a2d4: 82 0e 80 01 and %i2, %g1, %g1
200a2d8: 80 a6 80 01 cmp %i2, %g1
200a2dc: 12 80 00 44 bne 200a3ec <IMFS_eval_path+0x194>
200a2e0: b0 10 00 08 mov %o0, %i0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200a2e4: 81 c7 e0 08 ret
200a2e8: 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 )
200a2ec: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
200a2f0: 80 a0 a0 01 cmp %g2, 1
200a2f4: 02 80 00 3a be 200a3dc <IMFS_eval_path+0x184>
200a2f8: a0 10 00 01 mov %g1, %l0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200a2fc: 80 a5 a0 03 cmp %l6, 3
200a300: 02 80 00 0a be 200a328 <IMFS_eval_path+0xd0>
200a304: 80 a5 a0 04 cmp %l6, 4
200a308: 02 80 00 2f be 200a3c4 <IMFS_eval_path+0x16c>
200a30c: 80 a5 a0 02 cmp %l6, 2
200a310: 02 80 00 1a be 200a378 <IMFS_eval_path+0x120>
200a314: 80 a5 a0 04 cmp %l6, 4
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
200a318: 12 bf ff d9 bne 200a27c <IMFS_eval_path+0x24> <== ALWAYS TAKEN
200a31c: 90 04 40 12 add %l1, %l2, %o0
* 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 ) {
200a320: 10 bf ff e5 b 200a2b4 <IMFS_eval_path+0x5c> <== NOT EXECUTED
200a324: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
200a328: c2 00 60 4c ld [ %g1 + 0x4c ], %g1
200a32c: 80 a0 60 03 cmp %g1, 3
200a330: 02 80 00 3b be 200a41c <IMFS_eval_path+0x1c4>
200a334: 80 a0 60 04 cmp %g1, 4
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
200a338: 02 80 00 66 be 200a4d0 <IMFS_eval_path+0x278>
200a33c: 90 10 00 1b mov %i3, %o0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200a340: 80 a0 60 01 cmp %g1, 1
200a344: 12 80 00 55 bne 200a498 <IMFS_eval_path+0x240>
200a348: 01 00 00 00 nop
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
200a34c: c8 04 20 5c ld [ %l0 + 0x5c ], %g4
200a350: 80 a1 20 00 cmp %g4, 0
200a354: 12 80 00 57 bne 200a4b0 <IMFS_eval_path+0x258>
200a358: 90 10 00 10 mov %l0, %o0
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
200a35c: 40 00 02 0b call 200ab88 <IMFS_find_match_in_dir>
200a360: 92 10 00 13 mov %l3, %o1
if ( !node )
200a364: a0 92 20 00 orcc %o0, 0, %l0
200a368: 02 80 00 27 be 200a404 <IMFS_eval_path+0x1ac>
200a36c: 01 00 00 00 nop
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
break;
200a370: 10 bf ff c2 b 200a278 <IMFS_eval_path+0x20>
200a374: e0 26 c0 00 st %l0, [ %i3 ]
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200a378: c4 05 40 00 ld [ %l5 ], %g2
200a37c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
200a380: 80 a0 40 02 cmp %g1, %g2
200a384: 02 bf ff be be 200a27c <IMFS_eval_path+0x24>
200a388: 90 04 40 12 add %l1, %l2, %o0
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
200a38c: c8 06 e0 10 ld [ %i3 + 0x10 ], %g4
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
200a390: c4 01 20 1c ld [ %g4 + 0x1c ], %g2
200a394: 80 a0 40 02 cmp %g1, %g2
200a398: 22 80 00 56 be,a 200a4f0 <IMFS_eval_path+0x298>
200a39c: c4 01 20 14 ld [ %g4 + 0x14 ], %g2
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
200a3a0: e0 00 60 08 ld [ %g1 + 8 ], %l0
200a3a4: 80 a4 20 00 cmp %l0, 0
200a3a8: 32 bf ff b5 bne,a 200a27c <IMFS_eval_path+0x24>
200a3ac: e0 26 c0 00 st %l0, [ %i3 ]
rtems_set_errno_and_return_minus_one( ENOENT );
200a3b0: 40 00 11 63 call 200e93c <__errno>
200a3b4: b0 10 3f ff mov -1, %i0
200a3b8: ec 22 00 00 st %l6, [ %o0 ]
200a3bc: 81 c7 e0 08 ret
200a3c0: 81 e8 00 00 restore
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200a3c4: 40 00 11 5e call 200e93c <__errno>
200a3c8: b0 10 3f ff mov -1, %i0
200a3cc: 82 10 20 5b mov 0x5b, %g1
200a3d0: c2 22 00 00 st %g1, [ %o0 ]
200a3d4: 81 c7 e0 08 ret
200a3d8: 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 )
200a3dc: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
200a3e0: 80 88 a0 40 btst 0x40, %g2
200a3e4: 12 bf ff c7 bne 200a300 <IMFS_eval_path+0xa8>
200a3e8: 80 a5 a0 03 cmp %l6, 3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
200a3ec: 40 00 11 54 call 200e93c <__errno>
200a3f0: b0 10 3f ff mov -1, %i0
200a3f4: 82 10 20 0d mov 0xd, %g1
200a3f8: c2 22 00 00 st %g1, [ %o0 ]
200a3fc: 81 c7 e0 08 ret
200a400: 81 e8 00 00 restore
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
200a404: 40 00 11 4e call 200e93c <__errno>
200a408: b0 10 3f ff mov -1, %i0
200a40c: 82 10 20 02 mov 2, %g1
200a410: c2 22 00 00 st %g1, [ %o0 ]
200a414: 81 c7 e0 08 ret
200a418: 81 e8 00 00 restore
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
200a41c: 90 10 00 1b mov %i3, %o0
200a420: 7f ff ff 31 call 200a0e4 <IMFS_evaluate_hard_link>
200a424: 92 10 20 00 clr %o1
node = pathloc->node_access;
200a428: e0 06 c0 00 ld [ %i3 ], %l0
if ( !node )
200a42c: 80 a4 20 00 cmp %l0, 0
200a430: 02 80 00 1a be 200a498 <IMFS_eval_path+0x240> <== NEVER TAKEN
200a434: 01 00 00 00 nop
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
200a438: 10 bf ff c2 b 200a340 <IMFS_eval_path+0xe8>
200a43c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
*
* 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 ) {
200a440: 80 a1 20 00 cmp %g4, 0
200a444: 02 bf ff 9f be 200a2c0 <IMFS_eval_path+0x68>
200a448: 01 00 00 00 nop
newloc = node->info.directory.mt_fs->mt_fs_root;
200a44c: c4 01 20 28 ld [ %g4 + 0x28 ], %g2
*pathloc = newloc;
200a450: d6 01 20 2c ld [ %g4 + 0x2c ], %o3
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a454: d8 01 20 24 ld [ %g4 + 0x24 ], %o4
200a458: da 01 20 20 ld [ %g4 + 0x20 ], %o5
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200a45c: c2 00 80 00 ld [ %g2 ], %g1
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a460: c8 01 20 1c ld [ %g4 + 0x1c ], %g4
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200a464: 92 06 40 03 add %i1, %g3, %o1
200a468: 86 24 80 03 sub %l2, %g3, %g3
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a46c: d6 26 e0 10 st %o3, [ %i3 + 0x10 ]
200a470: d8 26 e0 08 st %o4, [ %i3 + 8 ]
200a474: da 26 e0 04 st %o5, [ %i3 + 4 ]
200a478: c8 26 c0 00 st %g4, [ %i3 ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200a47c: 90 04 40 03 add %l1, %g3, %o0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a480: c4 26 e0 0c st %g2, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200a484: 94 10 00 1a mov %i2, %o2
200a488: 9f c0 40 00 call %g1
200a48c: 96 10 00 1b mov %i3, %o3
200a490: 81 c7 e0 08 ret
200a494: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200a498: 40 00 11 29 call 200e93c <__errno>
200a49c: b0 10 3f ff mov -1, %i0
200a4a0: 82 10 20 14 mov 0x14, %g1
200a4a4: c2 22 00 00 st %g1, [ %o0 ]
200a4a8: 81 c7 e0 08 ret
200a4ac: 81 e8 00 00 restore
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a4b0: c4 01 20 28 ld [ %g4 + 0x28 ], %g2
*pathloc = newloc;
200a4b4: d6 01 20 2c ld [ %g4 + 0x2c ], %o3
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a4b8: d8 01 20 24 ld [ %g4 + 0x24 ], %o4
200a4bc: da 01 20 20 ld [ %g4 + 0x20 ], %o5
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200a4c0: c2 00 80 00 ld [ %g2 ], %g1
200a4c4: c6 07 bf fc ld [ %fp + -4 ], %g3
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a4c8: 10 bf ff e7 b 200a464 <IMFS_eval_path+0x20c>
200a4cc: c8 01 20 1c ld [ %g4 + 0x1c ], %g4
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
200a4d0: 7f ff ff 20 call 200a150 <IMFS_evaluate_sym_link>
200a4d4: 92 10 20 00 clr %o1
node = pathloc->node_access;
200a4d8: e0 06 c0 00 ld [ %i3 ], %l0
if ( result == -1 )
200a4dc: 80 a2 3f ff cmp %o0, -1
200a4e0: 02 bf ff 81 be 200a2e4 <IMFS_eval_path+0x8c> <== NEVER TAKEN
200a4e4: b0 10 00 08 mov %o0, %i0
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
200a4e8: 10 bf ff 96 b 200a340 <IMFS_eval_path+0xe8>
200a4ec: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
200a4f0: d6 01 20 18 ld [ %g4 + 0x18 ], %o3
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
200a4f4: d8 01 20 10 ld [ %g4 + 0x10 ], %o4
200a4f8: da 01 20 0c ld [ %g4 + 0xc ], %o5
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200a4fc: c2 00 80 00 ld [ %g2 ], %g1
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
200a500: 10 bf ff d9 b 200a464 <IMFS_eval_path+0x20c>
200a504: c8 01 20 08 ld [ %g4 + 8 ], %g4
0200a5e0 <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 */
)
{
200a5e0: 9d e3 bf 78 save %sp, -136, %sp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200a5e4: e0 06 40 00 ld [ %i1 ], %l0
/*
* Get the path length.
*/
pathlen = strlen( path );
200a5e8: 90 10 00 18 mov %i0, %o0
200a5ec: 40 00 14 8c call 200f81c <strlen>
200a5f0: 2d 00 80 6b sethi %hi(0x201ac00), %l6
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
200a5f4: a2 10 00 18 mov %i0, %l1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
200a5f8: a6 10 20 00 clr %l3
200a5fc: a8 07 bf d8 add %fp, -40, %l4
200a600: aa 07 bf fc add %fp, -4, %l5
200a604: a4 10 00 08 mov %o0, %l2
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200a608: ac 15 a0 80 or %l6, 0x80, %l6
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
200a60c: 92 10 00 12 mov %l2, %o1
200a610: 90 04 40 13 add %l1, %l3, %o0
200a614: 94 10 00 14 mov %l4, %o2
200a618: 40 00 01 8d call 200ac4c <IMFS_get_token>
200a61c: 96 10 00 15 mov %l5, %o3
pathlen -= len;
200a620: c6 07 bf fc ld [ %fp + -4 ], %g3
i += len;
if ( !pathloc->node_access )
200a624: c2 06 40 00 ld [ %i1 ], %g1
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
200a628: ae 10 00 08 mov %o0, %l7
pathlen -= len;
i += len;
if ( !pathloc->node_access )
200a62c: 80 a0 60 00 cmp %g1, 0
200a630: 02 80 00 70 be 200a7f0 <IMFS_evaluate_for_make+0x210> <== NEVER TAKEN
200a634: a4 24 80 03 sub %l2, %g3, %l2
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
200a638: 80 a2 20 00 cmp %o0, 0
200a63c: 32 80 00 08 bne,a 200a65c <IMFS_evaluate_for_make+0x7c>
200a640: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200a644: 40 00 10 be call 200e93c <__errno>
200a648: b0 10 3f ff mov -1, %i0
200a64c: 82 10 20 11 mov 0x11, %g1
200a650: c2 22 00 00 st %g1, [ %o0 ]
200a654: 81 c7 e0 08 ret
200a658: 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 )
200a65c: 80 a0 a0 01 cmp %g2, 1
200a660: 02 80 00 46 be 200a778 <IMFS_evaluate_for_make+0x198>
200a664: a0 10 00 01 mov %g1, %l0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200a668: 80 a5 e0 02 cmp %l7, 2
200a66c: 02 80 00 30 be 200a72c <IMFS_evaluate_for_make+0x14c>
200a670: a6 04 c0 03 add %l3, %g3, %l3
200a674: 80 a5 e0 02 cmp %l7, 2
200a678: 08 80 00 0d bleu 200a6ac <IMFS_evaluate_for_make+0xcc>
200a67c: 80 a5 e0 00 cmp %l7, 0
200a680: 80 a5 e0 03 cmp %l7, 3
200a684: 02 80 00 12 be 200a6cc <IMFS_evaluate_for_make+0xec>
200a688: 80 a5 e0 04 cmp %l7, 4
200a68c: 12 bf ff e1 bne 200a610 <IMFS_evaluate_for_make+0x30> <== NEVER TAKEN
200a690: 92 10 00 12 mov %l2, %o1
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200a694: 40 00 10 aa call 200e93c <__errno>
200a698: b0 10 3f ff mov -1, %i0
200a69c: 82 10 20 5b mov 0x5b, %g1
200a6a0: c2 22 00 00 st %g1, [ %o0 ]
200a6a4: 81 c7 e0 08 ret
200a6a8: 81 e8 00 00 restore
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200a6ac: 12 bf ff d9 bne 200a610 <IMFS_evaluate_for_make+0x30> <== ALWAYS TAKEN
200a6b0: 92 10 00 12 mov %l2, %o1
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200a6b4: 40 00 10 a2 call 200e93c <__errno> <== NOT EXECUTED
200a6b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a6bc: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED
200a6c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a6c4: 81 c7 e0 08 ret <== NOT EXECUTED
200a6c8: 81 e8 00 00 restore <== NOT EXECUTED
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
200a6cc: c2 00 60 4c ld [ %g1 + 0x4c ], %g1
200a6d0: 80 a0 60 03 cmp %g1, 3
200a6d4: 02 80 00 78 be 200a8b4 <IMFS_evaluate_for_make+0x2d4>
200a6d8: 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 ) {
200a6dc: 02 80 00 77 be 200a8b8 <IMFS_evaluate_for_make+0x2d8>
200a6e0: 90 10 00 19 mov %i1, %o0
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
200a6e4: 80 a4 20 00 cmp %l0, 0
200a6e8: 02 80 00 5a be 200a850 <IMFS_evaluate_for_make+0x270> <== NEVER TAKEN
200a6ec: 01 00 00 00 nop
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200a6f0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200a6f4: 80 a0 60 01 cmp %g1, 1
200a6f8: 12 80 00 56 bne 200a850 <IMFS_evaluate_for_make+0x270>
200a6fc: 01 00 00 00 nop
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
200a700: c6 04 20 5c ld [ %l0 + 0x5c ], %g3
200a704: 80 a0 e0 00 cmp %g3, 0
200a708: 12 80 00 58 bne 200a868 <IMFS_evaluate_for_make+0x288>
200a70c: 90 10 00 10 mov %l0, %o0
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
200a710: 40 00 01 1e call 200ab88 <IMFS_find_match_in_dir>
200a714: 92 10 00 14 mov %l4, %o1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
200a718: a0 92 20 00 orcc %o0, 0, %l0
200a71c: 02 80 00 21 be 200a7a0 <IMFS_evaluate_for_make+0x1c0>
200a720: c2 07 bf fc ld [ %fp + -4 ], %g1
done = true;
else
pathloc->node_access = node;
200a724: 10 bf ff ba b 200a60c <IMFS_evaluate_for_make+0x2c>
200a728: e0 26 40 00 st %l0, [ %i1 ]
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200a72c: c4 05 80 00 ld [ %l6 ], %g2
200a730: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
200a734: 80 a0 40 02 cmp %g1, %g2
200a738: 02 bf ff b6 be 200a610 <IMFS_evaluate_for_make+0x30>
200a73c: 92 10 00 12 mov %l2, %o1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
200a740: c8 06 60 10 ld [ %i1 + 0x10 ], %g4
200a744: c4 01 20 1c ld [ %g4 + 0x1c ], %g2
200a748: 80 a0 40 02 cmp %g1, %g2
200a74c: 22 80 00 62 be,a 200a8d4 <IMFS_evaluate_for_make+0x2f4>
200a750: c4 01 20 14 ld [ %g4 + 0x14 ], %g2
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
200a754: e0 00 60 08 ld [ %g1 + 8 ], %l0
200a758: 80 a4 20 00 cmp %l0, 0
200a75c: 32 bf ff ad bne,a 200a610 <IMFS_evaluate_for_make+0x30>
200a760: e0 26 40 00 st %l0, [ %i1 ]
rtems_set_errno_and_return_minus_one( ENOENT );
200a764: 40 00 10 76 call 200e93c <__errno>
200a768: b0 10 3f ff mov -1, %i0
200a76c: ee 22 00 00 st %l7, [ %o0 ]
200a770: 81 c7 e0 08 ret
200a774: 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 )
200a778: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
200a77c: 80 88 a0 40 btst 0x40, %g2
200a780: 12 bf ff bb bne 200a66c <IMFS_evaluate_for_make+0x8c>
200a784: 80 a5 e0 02 cmp %l7, 2
/*
* 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 );
200a788: 40 00 10 6d call 200e93c <__errno>
200a78c: b0 10 3f ff mov -1, %i0
200a790: 82 10 20 0d mov 0xd, %g1
200a794: c2 22 00 00 st %g1, [ %o0 ]
200a798: 81 c7 e0 08 ret
200a79c: 81 e8 00 00 restore
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
200a7a0: 82 24 c0 01 sub %l3, %g1, %g1
200a7a4: 82 04 40 01 add %l1, %g1, %g1
200a7a8: 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++) {
200a7ac: c2 4c 40 13 ldsb [ %l1 + %l3 ], %g1
200a7b0: 80 a0 60 00 cmp %g1, 0
200a7b4: 02 80 00 19 be 200a818 <IMFS_evaluate_for_make+0x238>
200a7b8: 80 a0 60 2f cmp %g1, 0x2f
if ( !IMFS_is_separator( path[ i ] ) )
200a7bc: 12 80 00 13 bne 200a808 <IMFS_evaluate_for_make+0x228>
200a7c0: 80 a0 60 5c cmp %g1, 0x5c
rtems_set_errno_and_return_minus_one( ENOENT );
200a7c4: a2 04 40 13 add %l1, %l3, %l1
/*
* 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++) {
200a7c8: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1
200a7cc: 80 a0 60 00 cmp %g1, 0
200a7d0: 02 80 00 12 be 200a818 <IMFS_evaluate_for_make+0x238>
200a7d4: a2 04 60 01 inc %l1
if ( !IMFS_is_separator( path[ i ] ) )
200a7d8: 80 a0 60 5c cmp %g1, 0x5c
200a7dc: 22 bf ff fc be,a 200a7cc <IMFS_evaluate_for_make+0x1ec>
200a7e0: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1
200a7e4: 80 a0 60 2f cmp %g1, 0x2f
200a7e8: 22 bf ff f9 be,a 200a7cc <IMFS_evaluate_for_make+0x1ec>
200a7ec: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1
rtems_set_errno_and_return_minus_one( ENOENT );
200a7f0: 40 00 10 53 call 200e93c <__errno>
200a7f4: b0 10 3f ff mov -1, %i0
200a7f8: 82 10 20 02 mov 2, %g1
200a7fc: c2 22 00 00 st %g1, [ %o0 ]
200a800: 81 c7 e0 08 ret
200a804: 81 e8 00 00 restore
* 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 ( !IMFS_is_separator( path[ i ] ) )
200a808: 12 bf ff fa bne 200a7f0 <IMFS_evaluate_for_make+0x210> <== NEVER TAKEN
200a80c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOENT );
200a810: 10 bf ff ee b 200a7c8 <IMFS_evaluate_for_make+0x1e8>
200a814: a2 04 40 13 add %l1, %l3, %l1
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
200a818: 7f ff fe 09 call 200a03c <IMFS_Set_handlers>
200a81c: 90 10 00 19 mov %i1, %o0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
200a820: c2 06 40 00 ld [ %i1 ], %g1
if ( node->type != IMFS_DIRECTORY )
200a824: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200a828: 80 a0 a0 01 cmp %g2, 1
200a82c: 12 80 00 09 bne 200a850 <IMFS_evaluate_for_make+0x270> <== NEVER TAKEN
200a830: b0 10 00 08 mov %o0, %i0
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200a834: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
200a838: 82 08 60 c0 and %g1, 0xc0, %g1
200a83c: 80 a0 60 c0 cmp %g1, 0xc0
200a840: 12 bf ff d2 bne 200a788 <IMFS_evaluate_for_make+0x1a8>
200a844: 01 00 00 00 nop
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200a848: 81 c7 e0 08 ret
200a84c: 81 e8 00 00 restore
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200a850: 40 00 10 3b call 200e93c <__errno>
200a854: b0 10 3f ff mov -1, %i0
200a858: 82 10 20 14 mov 0x14, %g1
200a85c: c2 22 00 00 st %g1, [ %o0 ]
200a860: 81 c7 e0 08 ret
200a864: 81 e8 00 00 restore
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a868: c4 00 e0 28 ld [ %g3 + 0x28 ], %g2
*pathloc = newloc;
200a86c: d8 00 e0 2c ld [ %g3 + 0x2c ], %o4
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a870: da 00 e0 24 ld [ %g3 + 0x24 ], %o5
200a874: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a878: d0 07 bf fc ld [ %fp + -4 ], %o0
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a87c: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a880: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200a884: 90 24 c0 08 sub %l3, %o0, %o0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a888: d8 26 60 10 st %o4, [ %i1 + 0x10 ]
200a88c: da 26 60 08 st %o5, [ %i1 + 8 ]
200a890: c8 26 60 04 st %g4, [ %i1 + 4 ]
200a894: c6 26 40 00 st %g3, [ %i1 ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a898: 90 04 40 08 add %l1, %o0, %o0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a89c: c4 26 60 0c st %g2, [ %i1 + 0xc ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a8a0: 92 10 00 19 mov %i1, %o1
200a8a4: 9f c0 40 00 call %g1
200a8a8: 94 10 00 1a mov %i2, %o2
200a8ac: 81 c7 e0 08 ret
200a8b0: 91 e8 00 08 restore %g0, %o0, %o0
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
200a8b4: 90 10 00 19 mov %i1, %o0
200a8b8: 7f ff ff 14 call 200a508 <IMFS_evaluate_link>
200a8bc: 92 10 20 00 clr %o1
if ( result == -1 )
200a8c0: 80 a2 3f ff cmp %o0, -1
200a8c4: 02 bf ff 64 be 200a654 <IMFS_evaluate_for_make+0x74> <== NEVER TAKEN
200a8c8: b0 10 00 08 mov %o0, %i0
200a8cc: 10 bf ff 86 b 200a6e4 <IMFS_evaluate_for_make+0x104>
200a8d0: e0 06 40 00 ld [ %i1 ], %l0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
200a8d4: d6 01 20 18 ld [ %g4 + 0x18 ], %o3
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
200a8d8: d8 01 20 10 ld [ %g4 + 0x10 ], %o4
200a8dc: da 01 20 0c ld [ %g4 + 0xc ], %o5
200a8e0: c8 01 20 08 ld [ %g4 + 8 ], %g4
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a8e4: 86 24 c0 03 sub %l3, %g3, %g3
200a8e8: c2 00 a0 04 ld [ %g2 + 4 ], %g1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
200a8ec: d6 26 60 10 st %o3, [ %i1 + 0x10 ]
200a8f0: d8 26 60 08 st %o4, [ %i1 + 8 ]
200a8f4: da 26 60 04 st %o5, [ %i1 + 4 ]
200a8f8: c8 26 40 00 st %g4, [ %i1 ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a8fc: 10 bf ff e8 b 200a89c <IMFS_evaluate_for_make+0x2bc>
200a900: 90 04 40 03 add %l1, %g3, %o0
0200a0e4 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200a0e4: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *jnode = node->node_access;
200a0e8: c2 06 00 00 ld [ %i0 ], %g1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
200a0ec: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200a0f0: 80 a0 a0 03 cmp %g2, 3
200a0f4: 12 80 00 14 bne 200a144 <IMFS_evaluate_hard_link+0x60> <== NEVER TAKEN
200a0f8: 90 10 00 18 mov %i0, %o0
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
200a0fc: c2 00 60 50 ld [ %g1 + 0x50 ], %g1
IMFS_Set_handlers( node );
200a100: 7f ff ff cf call 200a03c <IMFS_Set_handlers>
200a104: c2 26 00 00 st %g1, [ %i0 ]
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
200a108: c2 06 00 00 ld [ %i0 ], %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200a10c: b3 2e 60 06 sll %i1, 6, %i1
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
200a110: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
200a114: 82 0e 40 01 and %i1, %g1, %g1
200a118: 80 a6 40 01 cmp %i1, %g1
200a11c: 02 80 00 08 be 200a13c <IMFS_evaluate_hard_link+0x58> <== ALWAYS TAKEN
200a120: 01 00 00 00 nop
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
200a124: 40 00 12 06 call 200e93c <__errno> <== NOT EXECUTED
200a128: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200a12c: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
200a130: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a134: 81 c7 e0 08 ret <== NOT EXECUTED
200a138: 81 e8 00 00 restore <== NOT EXECUTED
return result;
}
200a13c: 81 c7 e0 08 ret
200a140: 91 e8 20 00 restore %g0, 0, %o0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
200a144: 7f ff f1 5d call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200a148: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
0200a508 <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200a508: 9d e3 bf a0 save %sp, -96, %sp
200a50c: 21 00 80 6b sethi %hi(0x201ac00), %l0
200a510: a2 10 00 18 mov %i0, %l1
200a514: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
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 ) ) );
200a518: 10 80 00 07 b 200a534 <IMFS_evaluate_link+0x2c>
200a51c: a6 14 20 80 or %l0, 0x80, %l3
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
200a520: 02 80 00 21 be 200a5a4 <IMFS_evaluate_link+0x9c>
200a524: 84 00 bf fd add %g2, -3, %g2
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
200a528: 80 a0 a0 01 cmp %g2, 1
200a52c: 18 80 00 1b bgu 200a598 <IMFS_evaluate_link+0x90> <== ALWAYS TAKEN
200a530: 90 10 20 00 clr %o0
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
200a534: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
200a538: e4 04 40 00 ld [ %l1 ], %l2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
200a53c: 84 00 a0 01 inc %g2
200a540: c4 30 60 30 sth %g2, [ %g1 + 0x30 ]
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
200a544: 85 28 a0 10 sll %g2, 0x10, %g2
200a548: 85 30 a0 10 srl %g2, 0x10, %g2
200a54c: 80 a0 a0 05 cmp %g2, 5
200a550: 18 80 00 1d bgu 200a5c4 <IMFS_evaluate_link+0xbc>
200a554: 01 00 00 00 nop
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
200a558: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2
200a55c: 80 a0 a0 03 cmp %g2, 3
200a560: 12 bf ff f0 bne 200a520 <IMFS_evaluate_link+0x18>
200a564: 80 a0 a0 04 cmp %g2, 4
result = IMFS_evaluate_hard_link( node, flags );
200a568: 90 10 00 11 mov %l1, %o0
200a56c: 7f ff fe de call 200a0e4 <IMFS_evaluate_hard_link>
200a570: 92 10 00 19 mov %i1, %o1
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 ) ) );
200a574: 80 a2 20 00 cmp %o0, 0
200a578: 12 80 00 08 bne 200a598 <IMFS_evaluate_link+0x90> <== NEVER TAKEN
200a57c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
200a580: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2
200a584: 84 00 bf fd add %g2, -3, %g2
200a588: 80 a0 a0 01 cmp %g2, 1
200a58c: 08 bf ff ea bleu 200a534 <IMFS_evaluate_link+0x2c> <== ALWAYS TAKEN
200a590: c2 04 c0 00 ld [ %l3 ], %g1
200a594: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
200a598: c0 30 60 30 clrh [ %g1 + 0x30 ]
return result;
}
200a59c: 81 c7 e0 08 ret
200a5a0: 91 e8 00 08 restore %g0, %o0, %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 );
200a5a4: 90 10 00 11 mov %l1, %o0
200a5a8: 7f ff fe ea call 200a150 <IMFS_evaluate_sym_link>
200a5ac: 92 10 00 19 mov %i1, %o1
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
200a5b0: 80 a2 20 00 cmp %o0, 0
200a5b4: 22 bf ff f4 be,a 200a584 <IMFS_evaluate_link+0x7c>
200a5b8: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2
200a5bc: 10 bf ff f7 b 200a598 <IMFS_evaluate_link+0x90>
200a5c0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200a5c4: 40 00 10 de call 200e93c <__errno>
200a5c8: c0 30 60 30 clrh [ %g1 + 0x30 ]
200a5cc: 82 10 20 5c mov 0x5c, %g1
200a5d0: c2 22 00 00 st %g1, [ %o0 ]
200a5d4: 90 10 3f ff mov -1, %o0
*/
rtems_filesystem_link_counts = 0;
return result;
}
200a5d8: 81 c7 e0 08 ret
200a5dc: 91 e8 00 08 restore %g0, %o0, %o0
0200a0c8 <IMFS_evaluate_permission>:
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200a0c8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
200a0cc: 93 2a 60 06 sll %o1, 6, %o1 <== NOT EXECUTED
200a0d0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
200a0d4: 82 2a 40 01 andn %o1, %g1, %g1 <== NOT EXECUTED
return 1;
return 0;
}
200a0d8: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
200a0dc: 81 c3 e0 08 retl <== NOT EXECUTED
200a0e0: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
0200a150 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200a150: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *jnode = node->node_access;
200a154: c2 06 00 00 ld [ %i0 ], %g1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
200a158: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200a15c: 80 a0 a0 04 cmp %g2, 4
200a160: 12 80 00 3b bne 200a24c <IMFS_evaluate_sym_link+0xfc> <== NEVER TAKEN
200a164: 01 00 00 00 nop
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
200a168: c4 00 60 08 ld [ %g1 + 8 ], %g2
200a16c: 80 a0 a0 00 cmp %g2, 0
200a170: 02 80 00 35 be 200a244 <IMFS_evaluate_sym_link+0xf4> <== NEVER TAKEN
200a174: 01 00 00 00 nop
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
200a178: c4 26 00 00 st %g2, [ %i0 ]
rtems_filesystem_get_sym_start_loc(
200a17c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2
200a180: c6 48 80 00 ldsb [ %g2 ], %g3
200a184: 80 a0 e0 5c cmp %g3, 0x5c
200a188: 12 80 00 28 bne 200a228 <IMFS_evaluate_sym_link+0xd8> <== ALWAYS TAKEN
200a18c: 80 a0 e0 2f cmp %g3, 0x2f
200a190: 05 00 80 6b sethi %hi(0x201ac00), %g2 <== NOT EXECUTED
200a194: c4 00 a0 80 ld [ %g2 + 0x80 ], %g2 ! 201ac80 <rtems_current_user_env>
200a198: a0 10 20 01 mov 1, %l0
200a19c: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3
200a1a0: c6 26 00 00 st %g3, [ %i0 ]
200a1a4: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3
200a1a8: c6 26 20 04 st %g3, [ %i0 + 4 ]
200a1ac: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3
200a1b0: c6 26 20 08 st %g3, [ %i0 + 8 ]
200a1b4: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3
200a1b8: c6 26 20 0c st %g3, [ %i0 + 0xc ]
200a1bc: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2
200a1c0: c4 26 20 10 st %g2, [ %i0 + 0x10 ]
200a1c4: c4 00 60 50 ld [ %g1 + 0x50 ], %g2
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
&jnode->info.sym_link.name[i],
strlen( &jnode->info.sym_link.name[i] ),
200a1c8: a0 00 80 10 add %g2, %l0, %l0
200a1cc: 40 00 15 94 call 200f81c <strlen>
200a1d0: 90 10 00 10 mov %l0, %o0
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
200a1d4: 94 10 00 19 mov %i1, %o2
&jnode->info.sym_link.name[i],
strlen( &jnode->info.sym_link.name[i] ),
200a1d8: 92 10 00 08 mov %o0, %o1
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
200a1dc: 96 10 00 18 mov %i0, %o3
200a1e0: 40 00 00 1e call 200a258 <IMFS_eval_path>
200a1e4: 90 10 00 10 mov %l0, %o0
200a1e8: a0 10 00 08 mov %o0, %l0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
200a1ec: 7f ff ff 94 call 200a03c <IMFS_Set_handlers>
200a1f0: 90 10 00 18 mov %i0, %o0
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
200a1f4: c2 06 00 00 ld [ %i0 ], %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200a1f8: b3 2e 60 06 sll %i1, 6, %i1
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
200a1fc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
200a200: 82 0e 40 01 and %i1, %g1, %g1
200a204: 80 a6 40 01 cmp %i1, %g1
200a208: 02 80 00 06 be 200a220 <IMFS_evaluate_sym_link+0xd0> <== ALWAYS TAKEN
200a20c: 01 00 00 00 nop
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
200a210: 40 00 11 cb call 200e93c <__errno> <== NOT EXECUTED
200a214: a0 10 3f ff mov -1, %l0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200a218: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
200a21c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return result;
}
200a220: 81 c7 e0 08 ret
200a224: 91 e8 00 10 restore %g0, %l0, %o0
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
200a228: 22 bf ff db be,a 200a194 <IMFS_evaluate_sym_link+0x44>
200a22c: 05 00 80 6b sethi %hi(0x201ac00), %g2
200a230: 80 a0 e0 00 cmp %g3, 0
200a234: 12 bf ff e5 bne 200a1c8 <IMFS_evaluate_sym_link+0x78> <== ALWAYS TAKEN
200a238: a0 10 20 00 clr %l0
200a23c: 10 bf ff d6 b 200a194 <IMFS_evaluate_sym_link+0x44> <== NOT EXECUTED
200a240: 05 00 80 6b sethi %hi(0x201ac00), %g2 <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
200a244: 7f ff f1 1d call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200a248: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
200a24c: 7f ff f1 1b call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200a250: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
0200aac4 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
200aac4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
200aac8: e2 06 20 3c ld [ %i0 + 0x3c ], %l1 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
200aacc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
200aad0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
200aad4: 40 00 09 f1 call 200d298 <pipe_release> <== NOT EXECUTED
200aad8: 90 04 60 50 add %l1, 0x50, %o0 <== NOT EXECUTED
if (! err) {
200aadc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200aae0: 02 80 00 06 be 200aaf8 <IMFS_fifo_close+0x34> <== NOT EXECUTED
200aae4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
free(jnode);
}
IMFS_FIFO_RETURN(err);
200aae8: 06 80 00 14 bl 200ab38 <IMFS_fifo_close+0x74> <== NOT EXECUTED
200aaec: 01 00 00 00 nop <== NOT EXECUTED
}
200aaf0: 81 c7 e0 08 ret <== NOT EXECUTED
200aaf4: 81 e8 00 00 restore <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
200aaf8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
200aafc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
200ab00: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
200ab04: 40 00 02 7e call 200b4fc <rtems_libio_is_file_open> <== NOT EXECUTED
200ab08: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED
200ab0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200ab10: 12 80 00 08 bne 200ab30 <IMFS_fifo_close+0x6c> <== NOT EXECUTED
200ab14: 01 00 00 00 nop <== NOT EXECUTED
200ab18: c2 14 60 34 lduh [ %l1 + 0x34 ], %g1 <== NOT EXECUTED
200ab1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ab20: 12 80 00 04 bne 200ab30 <IMFS_fifo_close+0x6c> <== NOT EXECUTED
200ab24: 01 00 00 00 nop <== NOT EXECUTED
free(jnode);
200ab28: 40 00 01 ca call 200b250 <free> <== NOT EXECUTED
200ab2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200ab30: 81 c7 e0 08 ret <== NOT EXECUTED
200ab34: 81 e8 00 00 restore <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
200ab38: 40 00 0f 81 call 200e93c <__errno> <== NOT EXECUTED
200ab3c: b0 20 00 18 neg %i0 <== NOT EXECUTED
200ab40: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
}
200ab44: 81 c7 e0 08 ret <== NOT EXECUTED
200ab48: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0200a960 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
200a960: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int err;
if (command == FIONBIO) {
200a964: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED
200a968: 82 10 62 7e or %g1, 0x27e, %g1 ! 8004667e <RAM_END+0x7dc4667e><== NOT EXECUTED
200a96c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200a970: 02 80 00 0c be 200a9a0 <IMFS_fifo_ioctl+0x40> <== NOT EXECUTED
200a974: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
200a978: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
200a97c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200a980: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED
200a984: 40 00 09 3f call 200ce80 <pipe_ioctl> <== NOT EXECUTED
200a988: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
200a98c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200a990: 06 80 00 13 bl 200a9dc <IMFS_fifo_ioctl+0x7c> <== NOT EXECUTED
200a994: b2 20 00 18 neg %i0, %i1 <== NOT EXECUTED
}
200a998: 81 c7 e0 08 ret <== NOT EXECUTED
200a99c: 81 e8 00 00 restore <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
200a9a0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
200a9a4: 02 80 00 0e be 200a9dc <IMFS_fifo_ioctl+0x7c> <== NOT EXECUTED
200a9a8: b2 10 20 0e mov 0xe, %i1 <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
200a9ac: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
200a9b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200a9b4: 02 80 00 06 be 200a9cc <IMFS_fifo_ioctl+0x6c> <== NOT EXECUTED
200a9b8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
200a9bc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
200a9c0: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED
200a9c4: 81 c7 e0 08 ret <== NOT EXECUTED
200a9c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200a9cc: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED
200a9d0: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED
200a9d4: 81 c7 e0 08 ret <== NOT EXECUTED
200a9d8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
200a9dc: 40 00 0f d8 call 200e93c <__errno> <== NOT EXECUTED
200a9e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a9e4: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED
}
200a9e8: 81 c7 e0 08 ret <== NOT EXECUTED
200a9ec: 81 e8 00 00 restore <== NOT EXECUTED
0200a904 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
200a904: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
200a908: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
200a90c: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
200a910: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED
200a914: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
200a918: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200a91c: 40 00 09 3b call 200ce08 <pipe_lseek> <== NOT EXECUTED
200a920: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
200a924: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED
200a928: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
200a92c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200a930: 06 80 00 05 bl 200a944 <IMFS_fifo_lseek+0x40> <== NOT EXECUTED
200a934: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED
}
200a938: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED
200a93c: 81 c7 e0 08 ret <== NOT EXECUTED
200a940: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
200a944: 40 00 0f fe call 200e93c <__errno> <== NOT EXECUTED
200a948: a0 20 00 10 neg %l0 <== NOT EXECUTED
200a94c: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
200a950: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
200a954: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
200a958: 10 bf ff f8 b 200a938 <IMFS_fifo_lseek+0x34> <== NOT EXECUTED
200a95c: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
0200ab4c <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200ab4c: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
200ab50: d0 06 20 3c ld [ %i0 + 0x3c ], %o0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200ab54: 92 10 00 18 mov %i0, %o1
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
200ab58: 40 00 0a 21 call 200d3dc <fifo_open>
200ab5c: 90 02 20 50 add %o0, 0x50, %o0
IMFS_FIFO_RETURN(err);
200ab60: b0 92 20 00 orcc %o0, 0, %i0
200ab64: 06 80 00 04 bl 200ab74 <IMFS_fifo_open+0x28> <== ALWAYS TAKEN
200ab68: 01 00 00 00 nop
}
200ab6c: 81 c7 e0 08 ret <== NOT EXECUTED
200ab70: 81 e8 00 00 restore <== NOT EXECUTED
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
IMFS_FIFO_RETURN(err);
200ab74: 40 00 0f 72 call 200e93c <__errno>
200ab78: b0 20 00 18 neg %i0
200ab7c: f0 22 00 00 st %i0, [ %o0 ]
}
200ab80: 81 c7 e0 08 ret
200ab84: 91 e8 3f ff restore %g0, -1, %o0
0200aa5c <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200aa5c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
200aa60: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200aa64: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
200aa68: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED
200aa6c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200aa70: 40 00 09 9b call 200d0dc <pipe_read> <== NOT EXECUTED
200aa74: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (err > 0)
200aa78: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200aa7c: 04 80 00 08 ble 200aa9c <IMFS_fifo_read+0x40> <== NOT EXECUTED
200aa80: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
IMFS_update_atime(jnode);
200aa84: 40 00 02 65 call 200b418 <gettimeofday> <== NOT EXECUTED
200aa88: 92 10 20 00 clr %o1 <== NOT EXECUTED
200aa8c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
200aa90: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
200aa94: 81 c7 e0 08 ret <== NOT EXECUTED
200aa98: 81 e8 00 00 restore <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
200aa9c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200aaa0: 12 80 00 04 bne 200aab0 <IMFS_fifo_read+0x54> <== NOT EXECUTED
200aaa4: 01 00 00 00 nop <== NOT EXECUTED
}
200aaa8: 81 c7 e0 08 ret <== NOT EXECUTED
200aaac: 81 e8 00 00 restore <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
200aab0: 40 00 0f a3 call 200e93c <__errno> <== NOT EXECUTED
200aab4: b0 20 00 18 neg %i0 <== NOT EXECUTED
200aab8: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
}
200aabc: 81 c7 e0 08 ret <== NOT EXECUTED
200aac0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0200a9f0 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
200a9f0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
200a9f4: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
200a9f8: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
200a9fc: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED
200aa00: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200aa04: 40 00 09 38 call 200cee4 <pipe_write> <== NOT EXECUTED
200aa08: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (err > 0) {
200aa0c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200aa10: 04 80 00 09 ble 200aa34 <IMFS_fifo_write+0x44> <== NOT EXECUTED
200aa14: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
200aa18: 40 00 02 80 call 200b418 <gettimeofday> <== NOT EXECUTED
200aa1c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200aa20: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
200aa24: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED
200aa28: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED
200aa2c: 81 c7 e0 08 ret <== NOT EXECUTED
200aa30: 81 e8 00 00 restore <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
200aa34: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200aa38: 12 80 00 04 bne 200aa48 <IMFS_fifo_write+0x58> <== NOT EXECUTED
200aa3c: 01 00 00 00 nop <== NOT EXECUTED
}
200aa40: 81 c7 e0 08 ret <== NOT EXECUTED
200aa44: 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);
200aa48: 40 00 0f bd call 200e93c <__errno> <== NOT EXECUTED
200aa4c: b0 20 00 18 neg %i0 <== NOT EXECUTED
200aa50: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
}
200aa54: 81 c7 e0 08 ret <== NOT EXECUTED
200aa58: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0200ab88 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
200ab88: 9d e3 bf a0 save %sp, -96, %sp
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
200ab8c: 80 a6 20 00 cmp %i0, 0
200ab90: 02 80 00 26 be 200ac28 <IMFS_find_match_in_dir+0xa0> <== NEVER TAKEN
200ab94: 80 a6 60 00 cmp %i1, 0
if ( !name )
200ab98: 02 80 00 11 be 200abdc <IMFS_find_match_in_dir+0x54> <== NEVER TAKEN
200ab9c: 90 10 00 19 mov %i1, %o0
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
200aba0: 13 00 80 67 sethi %hi(0x2019c00), %o1
200aba4: 40 00 12 cd call 200f6d8 <strcmp>
200aba8: 92 12 63 58 or %o1, 0x358, %o1 ! 2019f58 <dotname>
200abac: 80 a2 20 00 cmp %o0, 0
200abb0: 02 80 00 09 be 200abd4 <IMFS_find_match_in_dir+0x4c> <== NEVER TAKEN
200abb4: 90 10 00 19 mov %i1, %o0
return directory;
if ( !strcmp( name, dotdotname ) )
200abb8: 13 00 80 67 sethi %hi(0x2019c00), %o1
200abbc: 40 00 12 c7 call 200f6d8 <strcmp>
200abc0: 92 12 63 60 or %o1, 0x360, %o1 ! 2019f60 <dotdotname>
200abc4: 80 a2 20 00 cmp %o0, 0
200abc8: 32 80 00 07 bne,a 200abe4 <IMFS_find_match_in_dir+0x5c> <== ALWAYS TAKEN
200abcc: e0 06 20 50 ld [ %i0 + 0x50 ], %l0
return directory->Parent;
200abd0: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
200abd4: 81 c7 e0 08 ret <== NOT EXECUTED
200abd8: 81 e8 00 00 restore <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
200abdc: 81 c7 e0 08 ret
200abe0: 91 e8 20 00 restore %g0, 0, %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200abe4: b0 06 20 54 add %i0, 0x54, %i0
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
200abe8: 80 a4 00 18 cmp %l0, %i0
200abec: 12 80 00 07 bne 200ac08 <IMFS_find_match_in_dir+0x80>
200abf0: 90 10 00 19 mov %i1, %o0
200abf4: 81 c7 e0 08 ret
200abf8: 91 e8 20 00 restore %g0, 0, %o0
200abfc: 80 a4 00 18 cmp %l0, %i0
200ac00: 02 bf ff f7 be 200abdc <IMFS_find_match_in_dir+0x54>
200ac04: 90 10 00 19 mov %i1, %o0
!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 ) )
200ac08: 40 00 12 b4 call 200f6d8 <strcmp>
200ac0c: 92 04 20 0c add %l0, 0xc, %o1
200ac10: 80 a2 20 00 cmp %o0, 0
200ac14: 32 bf ff fa bne,a 200abfc <IMFS_find_match_in_dir+0x74>
200ac18: e0 04 00 00 ld [ %l0 ], %l0
200ac1c: b0 10 00 10 mov %l0, %i0
200ac20: 81 c7 e0 08 ret
200ac24: 81 e8 00 00 restore
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
200ac28: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200ac2c: 15 00 80 67 sethi %hi(0x2019c00), %o2 <== NOT EXECUTED
200ac30: 17 00 80 67 sethi %hi(0x2019c00), %o3 <== NOT EXECUTED
200ac34: 90 12 22 f8 or %o0, 0x2f8, %o0 <== NOT EXECUTED
200ac38: 94 12 a3 68 or %o2, 0x368, %o2 <== NOT EXECUTED
200ac3c: 96 12 e3 48 or %o3, 0x348, %o3 <== NOT EXECUTED
200ac40: 40 00 01 2d call 200b0f4 <__assert_func> <== NOT EXECUTED
200ac44: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED
02010504 <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
)
{
2010504: 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;
loc = temp_mt_entry->mt_fs_root;
2010508: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
201050c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
2010510: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
2010514: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
/*
* 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;
2010518: e4 06 20 1c ld [ %i0 + 0x1c ], %l2
loc = temp_mt_entry->mt_fs_root;
201051c: c8 27 bf f0 st %g4, [ %fp + -16 ]
2010520: c6 27 bf f4 st %g3, [ %fp + -12 ]
2010524: c4 27 bf f8 st %g2, [ %fp + -8 ]
2010528: 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;
201052c: c0 26 20 1c clr [ %i0 + 0x1c ]
2010530: a0 07 bf ec add %fp, -20, %l0
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
2010534: e4 27 bf ec st %l2, [ %fp + -20 ]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
2010538: e2 04 a0 08 ld [ %l2 + 8 ], %l1
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
201053c: 7f ff fd 1d call 200f9b0 <IMFS_Set_handlers>
2010540: 90 10 00 10 mov %l0, %o0
if ( jnode->type != IMFS_DIRECTORY ) {
2010544: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1
2010548: 80 a0 60 01 cmp %g1, 1
201054c: 12 80 00 17 bne 20105a8 <IMFS_fsunmount+0xa4>
2010550: 84 04 a0 54 add %l2, 0x54, %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2010554: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1
2010558: 80 a0 40 02 cmp %g1, %g2
201055c: 22 80 00 14 be,a 20105ac <IMFS_fsunmount+0xa8>
2010560: 90 10 20 00 clr %o0
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
2010564: 80 a4 a0 00 cmp %l2, 0
2010568: 02 80 00 0e be 20105a0 <IMFS_fsunmount+0x9c>
201056c: 01 00 00 00 nop
if ( jnode->type == IMFS_DIRECTORY ) {
2010570: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1
2010574: 80 a0 60 01 cmp %g1, 1
2010578: 32 bf ff f0 bne,a 2010538 <IMFS_fsunmount+0x34> <== NEVER TAKEN
201057c: e4 27 bf ec st %l2, [ %fp + -20 ] <== NOT EXECUTED
2010580: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1
2010584: 84 04 a0 54 add %l2, 0x54, %g2
2010588: 80 a0 40 02 cmp %g1, %g2
201058c: 22 bf ff eb be,a 2010538 <IMFS_fsunmount+0x34>
2010590: e4 27 bf ec st %l2, [ %fp + -20 ]
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
2010594: a4 90 60 00 orcc %g1, 0, %l2
2010598: 32 bf ff e8 bne,a 2010538 <IMFS_fsunmount+0x34> <== ALWAYS TAKEN
201059c: e4 27 bf ec st %l2, [ %fp + -20 ]
return 0;
}
20105a0: 81 c7 e0 08 ret
20105a4: 91 e8 20 00 restore %g0, 0, %o0
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
20105a8: 90 10 20 00 clr %o0
20105ac: 7f ff cc a9 call 2003850 <IMFS_unlink>
20105b0: 92 10 00 10 mov %l0, %o1
if (result != 0)
20105b4: 80 a2 20 00 cmp %o0, 0
20105b8: 02 bf ff eb be 2010564 <IMFS_fsunmount+0x60> <== ALWAYS TAKEN
20105bc: a4 10 00 11 mov %l1, %l2
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
20105c0: 81 c7 e0 08 ret <== NOT EXECUTED
20105c4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0200ac4c <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
200ac4c: 9d e3 bf a0 save %sp, -96, %sp
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
200ac50: c2 0e 00 00 ldub [ %i0 ], %g1
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
200ac54: 87 28 60 18 sll %g1, 0x18, %g3
200ac58: 85 38 e0 18 sra %g3, 0x18, %g2
200ac5c: 80 a0 a0 2f cmp %g2, 0x2f
200ac60: 02 80 00 33 be 200ad2c <IMFS_get_token+0xe0>
200ac64: 80 a0 a0 5c cmp %g2, 0x5c
200ac68: 02 80 00 31 be 200ad2c <IMFS_get_token+0xe0>
200ac6c: 80 a0 00 02 cmp %g0, %g2
200ac70: 84 40 20 00 addx %g0, 0, %g2
200ac74: 80 a6 60 00 cmp %i1, 0
200ac78: 04 80 00 2f ble 200ad34 <IMFS_get_token+0xe8>
200ac7c: 86 08 a0 ff and %g2, 0xff, %g3
200ac80: 86 88 a0 ff andcc %g2, 0xff, %g3
200ac84: 02 80 00 2d be 200ad38 <IMFS_get_token+0xec> <== NEVER TAKEN
200ac88: 80 a0 e0 00 cmp %g3, 0
token[i] = c;
200ac8c: c2 2e 80 00 stb %g1, [ %i2 ]
200ac90: 82 10 20 00 clr %g1
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
200ac94: 82 00 60 01 inc %g1
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
200ac98: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2
200ac9c: 80 a0 a0 5c cmp %g2, 0x5c
200aca0: 02 80 00 0d be 200acd4 <IMFS_get_token+0x88>
200aca4: c6 0e 00 01 ldub [ %i0 + %g1 ], %g3
200aca8: 80 a0 a0 2f cmp %g2, 0x2f
200acac: 02 80 00 0a be 200acd4 <IMFS_get_token+0x88>
200acb0: 80 a6 40 01 cmp %i1, %g1
200acb4: 04 80 00 08 ble 200acd4 <IMFS_get_token+0x88>
200acb8: 80 a0 a0 00 cmp %g2, 0
200acbc: 02 80 00 06 be 200acd4 <IMFS_get_token+0x88> <== NEVER TAKEN
200acc0: 80 a0 60 20 cmp %g1, 0x20
token[i] = c;
if ( i == IMFS_NAME_MAX )
200acc4: 12 bf ff f4 bne 200ac94 <IMFS_get_token+0x48>
200acc8: c6 2e 80 01 stb %g3, [ %i2 + %g1 ]
200accc: 81 c7 e0 08 ret
200acd0: 91 e8 20 04 restore %g0, 4, %o0
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
200acd4: 84 06 80 01 add %i2, %g1, %g2
200acd8: c4 48 bf ff ldsb [ %g2 + -1 ], %g2
200acdc: 80 a0 a0 00 cmp %g2, 0
200ace0: 32 80 00 02 bne,a 200ace8 <IMFS_get_token+0x9c> <== ALWAYS TAKEN
200ace4: c0 2e 80 01 clrb [ %i2 + %g1 ]
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200ace8: c2 26 c0 00 st %g1, [ %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 )
200acec: 90 10 00 1a mov %i2, %o0
200acf0: 13 00 80 67 sethi %hi(0x2019c00), %o1
200acf4: b0 10 20 02 mov 2, %i0
200acf8: 40 00 12 78 call 200f6d8 <strcmp>
200acfc: 92 12 63 88 or %o1, 0x388, %o1
200ad00: 80 a2 20 00 cmp %o0, 0
200ad04: 02 80 00 12 be 200ad4c <IMFS_get_token+0x100>
200ad08: 90 10 00 1a mov %i2, %o0
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
200ad0c: 13 00 80 67 sethi %hi(0x2019c00), %o1
200ad10: 40 00 12 72 call 200f6d8 <strcmp>
200ad14: 92 12 63 80 or %o1, 0x380, %o1 ! 2019f80 <__FUNCTION__.5431+0x18>
200ad18: 80 a0 00 08 cmp %g0, %o0
200ad1c: b0 60 20 00 subx %g0, 0, %i0
200ad20: b0 0e 20 02 and %i0, 2, %i0
type = IMFS_CURRENT_DIR;
}
return type;
}
200ad24: 81 c7 e0 08 ret
200ad28: 91 ee 20 01 restore %i0, 1, %o0
200ad2c: 80 a0 00 03 cmp %g0, %g3
200ad30: 86 40 20 00 addx %g0, 0, %g3
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
200ad34: 80 a0 e0 00 cmp %g3, 0
200ad38: 12 80 00 07 bne 200ad54 <IMFS_get_token+0x108>
200ad3c: c2 2e 80 00 stb %g1, [ %i2 ]
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
200ad40: b0 10 20 00 clr %i0
200ad44: 82 10 20 00 clr %g1
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200ad48: c2 26 c0 00 st %g1, [ %i3 ]
200ad4c: 81 c7 e0 08 ret
200ad50: 81 e8 00 00 restore
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
200ad54: 80 a6 60 00 cmp %i1, 0
200ad58: b0 10 20 01 mov 1, %i0
200ad5c: 12 bf ff fb bne 200ad48 <IMFS_get_token+0xfc>
200ad60: 82 10 20 01 mov 1, %g1
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
200ad64: 10 bf ff f8 b 200ad44 <IMFS_get_token+0xf8>
200ad68: b0 10 20 00 clr %i0
0200ad6c <IMFS_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
200ad6c: 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,
200ad70: 03 00 80 6a sethi %hi(0x201a800), %g1
200ad74: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 ! 201aac8 <imfs_rq_memfile_bytes_per_block>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
200ad78: 80 a0 60 10 cmp %g1, 0x10
200ad7c: 02 80 00 0a be 200ada4 <IMFS_initialize_support+0x38> <== NEVER TAKEN
200ad80: 86 10 20 00 clr %g3
200ad84: 84 10 20 20 mov 0x20, %g2
200ad88: 80 a0 40 02 cmp %g1, %g2
200ad8c: 02 80 00 06 be 200ada4 <IMFS_initialize_support+0x38>
200ad90: 86 00 e0 01 inc %g3
200ad94: 80 a0 e0 05 cmp %g3, 5
200ad98: 12 bf ff fc bne 200ad88 <IMFS_initialize_support+0x1c> <== ALWAYS TAKEN
200ad9c: 85 28 a0 01 sll %g2, 1, %g2
200ada0: 82 10 20 80 mov 0x80, %g1 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
200ada4: 05 00 80 6c sethi %hi(0x201b000), %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();
200ada8: 40 00 0a b2 call 200d870 <IMFS_create_root_node>
200adac: c2 20 a2 c0 st %g1, [ %g2 + 0x2c0 ] ! 201b2c0 <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;
200adb0: 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();
200adb4: d0 26 20 1c st %o0, [ %i0 + 0x1c ]
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
200adb8: f2 26 20 28 st %i1, [ %i0 + 0x28 ]
* 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();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
200adbc: f6 26 20 24 st %i3, [ %i0 + 0x24 ]
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
200adc0: 13 00 80 68 sethi %hi(0x201a000), %o1
200adc4: 90 06 20 38 add %i0, 0x38, %o0
200adc8: 40 00 11 19 call 200f22c <memcpy>
200adcc: 92 12 61 68 or %o1, 0x168, %o1
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
200add0: 90 10 20 01 mov 1, %o0
200add4: 40 00 00 da call 200b13c <calloc>
200add8: 92 10 20 10 mov 0x10, %o1
if ( !fs_info ) {
200addc: 80 a2 20 00 cmp %o0, 0
200ade0: 02 80 00 11 be 200ae24 <IMFS_initialize_support+0xb8> <== NEVER TAKEN
200ade4: 05 00 80 6c sethi %hi(0x201b000), %g2
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
200ade8: c8 06 20 1c ld [ %i0 + 0x1c ], %g4
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
200adec: c2 00 a2 c4 ld [ %g2 + 0x2c4 ], %g1
fs_info->ino_count = 1;
200adf0: 86 10 20 01 mov 1, %g3
200adf4: c6 22 20 04 st %g3, [ %o0 + 4 ]
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
200adf8: c6 21 20 38 st %g3, [ %g4 + 0x38 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
200adfc: 86 00 60 01 add %g1, 1, %g3
200ae00: c6 20 a2 c4 st %g3, [ %g2 + 0x2c4 ]
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;
200ae04: d0 26 20 34 st %o0, [ %i0 + 0x34 ]
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
200ae08: f6 22 20 0c st %i3, [ %o0 + 0xc ]
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
200ae0c: f4 22 20 08 st %i2, [ %o0 + 8 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
200ae10: c2 22 00 00 st %g1, [ %o0 ]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
200ae14: 40 00 07 ff call 200ce10 <rtems_pipe_initialize>
200ae18: b0 10 20 00 clr %i0
return 0;
}
200ae1c: 81 c7 e0 08 ret
200ae20: 81 e8 00 00 restore
/*
* 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);
200ae24: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 <== NOT EXECUTED
200ae28: 40 00 01 0a call 200b250 <free> <== NOT EXECUTED
200ae2c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
200ae30: 40 00 0e c3 call 200e93c <__errno> <== NOT EXECUTED
200ae34: 01 00 00 00 nop <== NOT EXECUTED
200ae38: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
200ae3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200ae40: 81 c7 e0 08 ret <== NOT EXECUTED
200ae44: 81 e8 00 00 restore <== NOT EXECUTED
020034c0 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
20034c0: 9d e3 bf 50 save %sp, -176, %sp
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
20034c4: c2 06 00 00 ld [ %i0 ], %g1
20034c8: c2 27 bf d8 st %g1, [ %fp + -40 ]
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
20034cc: c2 10 60 34 lduh [ %g1 + 0x34 ], %g1
20034d0: 80 a0 60 07 cmp %g1, 7
20034d4: 18 80 00 1f bgu 2003550 <IMFS_link+0x90>
20034d8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
20034dc: 40 00 47 a3 call 2015368 <strlen>
20034e0: 90 10 00 1a mov %i2, %o0
20034e4: a0 07 bf b0 add %fp, -80, %l0
20034e8: 92 10 00 08 mov %o0, %o1
20034ec: 96 07 bf fc add %fp, -4, %o3
20034f0: 94 10 00 10 mov %l0, %o2
20034f4: 40 00 34 66 call 201068c <IMFS_get_token>
20034f8: 90 10 00 1a mov %i2, %o0
* 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.
*/
new_node = IMFS_create_node(
20034fc: 90 10 00 19 mov %i1, %o0
2003500: 94 10 00 10 mov %l0, %o2
2003504: 92 10 20 03 mov 3, %o1
2003508: 17 00 00 28 sethi %hi(0xa000), %o3
200350c: 98 07 bf d8 add %fp, -40, %o4
2003510: 40 00 30 db call 200f87c <IMFS_create_node>
2003514: 96 12 e1 ff or %o3, 0x1ff, %o3
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
2003518: 80 a2 20 00 cmp %o0, 0
200351c: 02 80 00 13 be 2003568 <IMFS_link+0xa8> <== NEVER TAKEN
2003520: c2 07 bf d8 ld [ %fp + -40 ], %g1
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
2003524: 90 07 bf f4 add %fp, -12, %o0
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
2003528: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2
IMFS_update_ctime( info.hard_link.link_node );
200352c: 92 10 20 00 clr %o1
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
2003530: 84 00 a0 01 inc %g2
IMFS_update_ctime( info.hard_link.link_node );
2003534: 40 00 02 c3 call 2004040 <gettimeofday>
2003538: c4 30 60 34 sth %g2, [ %g1 + 0x34 ]
200353c: c4 07 bf f4 ld [ %fp + -12 ], %g2
2003540: c2 07 bf d8 ld [ %fp + -40 ], %g1
2003544: c4 20 60 48 st %g2, [ %g1 + 0x48 ]
return 0;
}
2003548: 81 c7 e0 08 ret
200354c: 91 e8 20 00 restore %g0, 0, %o0
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
2003550: 40 00 43 e7 call 20144ec <__errno>
2003554: b0 10 3f ff mov -1, %i0
2003558: 82 10 20 1f mov 0x1f, %g1
200355c: c2 22 00 00 st %g1, [ %o0 ]
2003560: 81 c7 e0 08 ret
2003564: 81 e8 00 00 restore
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
2003568: 40 00 43 e1 call 20144ec <__errno> <== NOT EXECUTED
200356c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003570: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2003574: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003578: 81 c7 e0 08 ret <== NOT EXECUTED
200357c: 81 e8 00 00 restore <== NOT EXECUTED
02012dfc <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
2012dfc: 9d e3 bf a0 save %sp, -96, %sp
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
2012e00: 80 a6 20 00 cmp %i0, 0
2012e04: 02 80 00 18 be 2012e64 <IMFS_memfile_addblock+0x68> <== NEVER TAKEN
2012e08: 11 00 80 80 sethi %hi(0x2020000), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012e0c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
2012e10: 80 a0 60 05 cmp %g1, 5
2012e14: 12 80 00 1b bne 2012e80 <IMFS_memfile_addblock+0x84> <== NEVER TAKEN
2012e18: 90 10 00 18 mov %i0, %o0
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
2012e1c: 92 10 00 19 mov %i1, %o1
2012e20: 7f ff fe 64 call 20127b0 <IMFS_memfile_get_block_pointer>
2012e24: 94 10 20 01 mov 1, %o2
if ( *block_entry_ptr )
2012e28: c2 02 00 00 ld [ %o0 ], %g1
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
2012e2c: a0 10 00 08 mov %o0, %l0
if ( *block_entry_ptr )
2012e30: 80 a0 60 00 cmp %g1, 0
2012e34: 02 80 00 04 be 2012e44 <IMFS_memfile_addblock+0x48>
2012e38: b0 10 20 00 clr %i0
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
2012e3c: 81 c7 e0 08 ret
2012e40: 81 e8 00 00 restore
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
2012e44: 7f ff fe 4e call 201277c <memfile_alloc_block>
2012e48: b0 10 20 01 mov 1, %i0
if ( !memory )
2012e4c: 80 a2 20 00 cmp %o0, 0
2012e50: 02 bf ff fb be 2012e3c <IMFS_memfile_addblock+0x40> <== NEVER TAKEN
2012e54: 01 00 00 00 nop
return 1;
*block_entry_ptr = memory;
2012e58: d0 24 00 00 st %o0, [ %l0 ]
return 0;
}
2012e5c: 81 c7 e0 08 ret
2012e60: 91 e8 20 00 restore %g0, 0, %o0
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
2012e64: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012e68: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012e6c: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012e70: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED
2012e74: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
2012e78: 7f ff f6 b5 call 201094c <__assert_func> <== NOT EXECUTED
2012e7c: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012e80: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2012e84: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012e88: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012e8c: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012e90: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED
2012e94: 96 12 e3 80 or %o3, 0x380, %o3 <== NOT EXECUTED
2012e98: 7f ff f6 ad call 201094c <__assert_func> <== NOT EXECUTED
2012e9c: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED
02012ea4 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
2012ea4: 9d e3 bf a0 save %sp, -96, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2012ea8: 80 a6 20 00 cmp %i0, 0
2012eac: 02 80 00 5b be 2013018 <IMFS_memfile_extend+0x174> <== NEVER TAKEN
2012eb0: 11 00 80 80 sethi %hi(0x2020000), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012eb4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
2012eb8: 80 a0 60 05 cmp %g1, 5
2012ebc: 12 80 00 50 bne 2012ffc <IMFS_memfile_extend+0x158> <== NEVER TAKEN
2012ec0: 03 00 80 85 sethi %hi(0x2021400), %g1
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
2012ec4: e2 00 60 d8 ld [ %g1 + 0xd8 ], %l1 ! 20214d8 <imfs_memfile_bytes_per_block>
2012ec8: a1 34 60 02 srl %l1, 2, %l0
2012ecc: 92 10 00 10 mov %l0, %o1
2012ed0: 40 00 2a 25 call 201d764 <.umul>
2012ed4: 90 04 20 01 add %l0, 1, %o0
2012ed8: 92 10 00 10 mov %l0, %o1
2012edc: 40 00 2a 22 call 201d764 <.umul>
2012ee0: 90 02 20 01 inc %o0
2012ee4: 92 10 00 11 mov %l1, %o1
2012ee8: 40 00 2a 1f call 201d764 <.umul>
2012eec: 90 02 3f ff add %o0, -1, %o0
2012ef0: 82 10 20 00 clr %g1
2012ef4: 80 a0 40 19 cmp %g1, %i1
2012ef8: 04 80 00 37 ble 2012fd4 <IMFS_memfile_extend+0x130> <== ALWAYS TAKEN
2012efc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
2012f00: e4 1e 20 50 ldd [ %i0 + 0x50 ], %l2 <== NOT EXECUTED
2012f04: 80 a6 40 12 cmp %i1, %l2
2012f08: 04 80 00 29 ble 2012fac <IMFS_memfile_extend+0x108> <== ALWAYS TAKEN
2012f0c: a9 3c 60 1f sra %l1, 0x1f, %l4
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
2012f10: 96 10 00 11 mov %l1, %o3
2012f14: 94 10 00 14 mov %l4, %o2
2012f18: 90 10 00 19 mov %i1, %o0
2012f1c: 40 00 2b d7 call 201de78 <__divdi3>
2012f20: 92 10 00 1a mov %i2, %o1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
2012f24: 90 10 00 12 mov %l2, %o0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
2012f28: a0 10 00 09 mov %o1, %l0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
2012f2c: 94 10 00 14 mov %l4, %o2
2012f30: 92 10 00 13 mov %l3, %o1
2012f34: 40 00 2b d1 call 201de78 <__divdi3>
2012f38: 96 10 00 11 mov %l1, %o3
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
2012f3c: 80 a4 00 09 cmp %l0, %o1
2012f40: 0a 80 00 21 bcs 2012fc4 <IMFS_memfile_extend+0x120> <== NEVER TAKEN
2012f44: a4 10 00 09 mov %o1, %l2
2012f48: 10 80 00 05 b 2012f5c <IMFS_memfile_extend+0xb8>
2012f4c: a2 10 00 09 mov %o1, %l1
2012f50: 80 a4 00 11 cmp %l0, %l1
2012f54: 2a 80 00 1d bcs,a 2012fc8 <IMFS_memfile_extend+0x124>
2012f58: f4 26 20 54 st %i2, [ %i0 + 0x54 ]
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
2012f5c: 90 10 00 18 mov %i0, %o0
2012f60: 7f ff ff a7 call 2012dfc <IMFS_memfile_addblock>
2012f64: 92 10 00 11 mov %l1, %o1
2012f68: 80 a2 20 00 cmp %o0, 0
2012f6c: 22 bf ff f9 be,a 2012f50 <IMFS_memfile_extend+0xac> <== ALWAYS TAKEN
2012f70: a2 04 60 01 inc %l1
for ( ; block>=old_blocks ; block-- ) {
2012f74: 10 80 00 06 b 2012f8c <IMFS_memfile_extend+0xe8> <== NOT EXECUTED
2012f78: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
2012f7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2012f80: 7f ff fe dc call 2012af0 <IMFS_memfile_remove_block> <== NOT EXECUTED
2012f84: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED
* 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-- ) {
2012f88: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED
2012f8c: 08 bf ff fc bleu 2012f7c <IMFS_memfile_extend+0xd8> <== NOT EXECUTED
2012f90: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
2012f94: 40 00 05 56 call 20144ec <__errno> <== NOT EXECUTED
2012f98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012f9c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
2012fa0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012fa4: 81 c7 e0 08 ret <== NOT EXECUTED
2012fa8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
2012fac: 12 80 00 04 bne 2012fbc <IMFS_memfile_extend+0x118> <== NEVER TAKEN
2012fb0: 80 a6 80 13 cmp %i2, %l3
2012fb4: 18 bf ff d7 bgu 2012f10 <IMFS_memfile_extend+0x6c>
2012fb8: a9 3c 60 1f sra %l1, 0x1f, %l4
2012fbc: 81 c7 e0 08 ret
2012fc0: 91 e8 20 00 restore %g0, 0, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
2012fc4: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED
2012fc8: f2 26 20 50 st %i1, [ %i0 + 0x50 ]
return 0;
}
2012fcc: 81 c7 e0 08 ret
2012fd0: 91 e8 20 00 restore %g0, 0, %o0
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
2012fd4: 12 80 00 04 bne 2012fe4 <IMFS_memfile_extend+0x140> <== NEVER TAKEN
2012fd8: 80 a2 00 1a cmp %o0, %i2
2012fdc: 38 bf ff ca bgu,a 2012f04 <IMFS_memfile_extend+0x60> <== ALWAYS TAKEN
2012fe0: e4 1e 20 50 ldd [ %i0 + 0x50 ], %l2
rtems_set_errno_and_return_minus_one( EINVAL );
2012fe4: 40 00 05 42 call 20144ec <__errno> <== NOT EXECUTED
2012fe8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012fec: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2012ff0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012ff4: 81 c7 e0 08 ret <== NOT EXECUTED
2012ff8: 81 e8 00 00 restore <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012ffc: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2013000: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2013004: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013008: 94 12 a0 e8 or %o2, 0xe8, %o2 <== NOT EXECUTED
201300c: 96 12 e3 80 or %o3, 0x380, %o3 <== NOT EXECUTED
2013010: 7f ff f6 4f call 201094c <__assert_func> <== NOT EXECUTED
2013014: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2013018: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
201301c: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2013020: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013024: 94 12 a0 e8 or %o2, 0xe8, %o2 <== NOT EXECUTED
2013028: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
201302c: 7f ff f6 48 call 201094c <__assert_func> <== NOT EXECUTED
2013030: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED
020127b0 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
20127b0: 9d e3 bf a0 save %sp, -96, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
20127b4: 80 a6 20 00 cmp %i0, 0
20127b8: 02 80 00 91 be 20129fc <IMFS_memfile_get_block_pointer+0x24c><== NEVER TAKEN
20127bc: 11 00 80 80 sethi %hi(0x2020000), %o0
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
20127c0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
20127c4: 80 a0 60 05 cmp %g1, 5
20127c8: 12 80 00 94 bne 2012a18 <IMFS_memfile_get_block_pointer+0x268><== NEVER TAKEN
20127cc: 03 00 80 85 sethi %hi(0x2021400), %g1
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
20127d0: e0 00 60 d8 ld [ %g1 + 0xd8 ], %l0 ! 20214d8 <imfs_memfile_bytes_per_block>
20127d4: a1 34 20 02 srl %l0, 2, %l0
20127d8: 82 04 3f ff add %l0, -1, %g1
20127dc: 80 a6 40 01 cmp %i1, %g1
20127e0: 08 80 00 20 bleu 2012860 <IMFS_memfile_get_block_pointer+0xb0><== ALWAYS TAKEN
20127e4: 80 a6 a0 00 cmp %i2, 0
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
20127e8: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED
20127ec: 40 00 2b de call 201d764 <.umul> <== NOT EXECUTED
20127f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20127f4: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED
20127f8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
20127fc: 18 80 00 21 bgu 2012880 <IMFS_memfile_get_block_pointer+0xd0><== NOT EXECUTED
2012800: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
2012804: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
2012808: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201280c: 40 00 2c bc call 201dafc <.urem> <== NOT EXECUTED
2012810: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
2012814: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
2012818: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
201281c: 40 00 2c 0c call 201d84c <.udiv> <== NOT EXECUTED
2012820: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
2012824: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
2012828: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
201282c: 02 80 00 42 be 2012934 <IMFS_memfile_get_block_pointer+0x184><== NOT EXECUTED
2012830: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
if ( !p ) {
2012834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012838: 02 80 00 5e be 20129b0 <IMFS_memfile_get_block_pointer+0x200><== NOT EXECUTED
201283c: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
2012840: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED
2012844: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED
if ( !p1 ) {
2012848: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201284c: 02 80 00 52 be 2012994 <IMFS_memfile_get_block_pointer+0x1e4><== NOT EXECUTED
2012850: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
}
return (block_p *)&p1[ singly ];
2012854: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED
2012858: 81 c7 e0 08 ret <== NOT EXECUTED
201285c: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
2012860: 02 80 00 40 be 2012960 <IMFS_memfile_get_block_pointer+0x1b0>
2012864: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
if ( !p ) {
2012868: 80 a2 20 00 cmp %o0, 0
201286c: 02 80 00 43 be 2012978 <IMFS_memfile_get_block_pointer+0x1c8>
2012870: 01 00 00 00 nop
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
2012874: b3 2e 60 02 sll %i1, 2, %i1
2012878: 81 c7 e0 08 ret
201287c: 91 ea 00 19 restore %o0, %i1, %o0
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
2012880: 90 02 20 01 inc %o0 <== NOT EXECUTED
2012884: 40 00 2b b8 call 201d764 <.umul> <== NOT EXECUTED
2012888: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201288c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED
2012890: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED
2012894: 18 80 00 31 bgu 2012958 <IMFS_memfile_get_block_pointer+0x1a8><== NOT EXECUTED
2012898: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
201289c: a2 26 40 11 sub %i1, %l1, %l1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
20128a0: 40 00 2c 97 call 201dafc <.urem> <== NOT EXECUTED
20128a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
20128a8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
20128ac: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
20128b0: 40 00 2b e7 call 201d84c <.udiv> <== NOT EXECUTED
20128b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
20128b8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20128bc: 40 00 2b e4 call 201d84c <.udiv> <== NOT EXECUTED
20128c0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
20128c4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
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;
20128c8: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
20128cc: 40 00 2c 8c call 201dafc <.urem> <== NOT EXECUTED
20128d0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
20128d4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
20128d8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
20128dc: 02 80 00 3c be 20129cc <IMFS_memfile_get_block_pointer+0x21c><== NOT EXECUTED
20128e0: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED
if ( !p ) {
20128e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20128e8: 02 80 00 53 be 2012a34 <IMFS_memfile_get_block_pointer+0x284><== NOT EXECUTED
20128ec: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
20128f0: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED
20128f4: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED
if ( !p1 ) {
20128f8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20128fc: 02 80 00 55 be 2012a50 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
2012900: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
2012904: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED
2012908: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED
if ( !p2 ) {
201290c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012910: 12 bf ff d9 bne 2012874 <IMFS_memfile_get_block_pointer+0xc4><== NOT EXECUTED
2012914: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED
p2 = memfile_alloc_block();
2012918: 7f ff ff 99 call 201277c <memfile_alloc_block> <== NOT EXECUTED
201291c: 01 00 00 00 nop <== NOT EXECUTED
if ( !p2 )
2012920: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012924: 22 80 00 13 be,a 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
2012928: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
201292c: 10 bf ff d2 b 2012874 <IMFS_memfile_get_block_pointer+0xc4><== NOT EXECUTED
2012930: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
2012934: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012938: 02 80 00 0e be 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
201293c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
2012940: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED
2012944: c2 00 40 10 ld [ %g1 + %l0 ], %g1 <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
2012948: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
if ( !p )
201294c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012950: 12 80 00 08 bne 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
2012954: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
2012958: 81 c7 e0 08 ret <== NOT EXECUTED
201295c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
2012960: b3 2e 60 02 sll %i1, 2, %i1
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
2012964: 80 a2 20 00 cmp %o0, 0
2012968: 02 bf ff fc be 2012958 <IMFS_memfile_get_block_pointer+0x1a8><== NEVER TAKEN
201296c: b0 02 00 19 add %o0, %i1, %i0
/*
* This means the requested block number is out of range.
*/
return 0;
}
2012970: 81 c7 e0 08 ret
2012974: 81 e8 00 00 restore
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
2012978: 7f ff ff 81 call 201277c <memfile_alloc_block>
201297c: 01 00 00 00 nop
if ( !p )
2012980: 80 a2 20 00 cmp %o0, 0
2012984: 22 bf ff fb be,a 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
2012988: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
info->indirect = p;
201298c: 10 bf ff ba b 2012874 <IMFS_memfile_get_block_pointer+0xc4>
2012990: d0 26 20 58 st %o0, [ %i0 + 0x58 ]
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
2012994: 7f ff ff 7a call 201277c <memfile_alloc_block> <== NOT EXECUTED
2012998: 01 00 00 00 nop <== NOT EXECUTED
if ( !p1 )
201299c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20129a0: 22 bf ff f4 be,a 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
20129a4: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
20129a8: 10 bf ff ab b 2012854 <IMFS_memfile_get_block_pointer+0xa4><== NOT EXECUTED
20129ac: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
20129b0: 7f ff ff 73 call 201277c <memfile_alloc_block> <== NOT EXECUTED
20129b4: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
20129b8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
20129bc: 22 bf ff ed be,a 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
20129c0: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
20129c4: 10 bf ff 9f b 2012840 <IMFS_memfile_get_block_pointer+0x90><== NOT EXECUTED
20129c8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
20129cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20129d0: 02 bf ff e8 be 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
20129d4: b0 10 20 00 clr %i0 <== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
20129d8: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED
20129dc: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED
if ( !p1 )
20129e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20129e4: 02 bf ff e3 be 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
20129e8: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
20129ec: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED
20129f0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
20129f4: 81 c7 e0 08 ret <== NOT EXECUTED
20129f8: 91 ee 00 19 restore %i0, %i1, %o0 <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
20129fc: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012a00: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012a04: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012a08: 94 12 a0 28 or %o2, 0x28, %o2 <== NOT EXECUTED
2012a0c: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
2012a10: 7f ff f7 cf call 201094c <__assert_func> <== NOT EXECUTED
2012a14: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012a18: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012a1c: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012a20: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012a24: 94 12 a0 28 or %o2, 0x28, %o2 <== NOT EXECUTED
2012a28: 96 12 e3 80 or %o3, 0x380, %o3 <== NOT EXECUTED
2012a2c: 7f ff f7 c8 call 201094c <__assert_func> <== NOT EXECUTED
2012a30: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
2012a34: 7f ff ff 52 call 201277c <memfile_alloc_block> <== NOT EXECUTED
2012a38: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
2012a3c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2012a40: 22 bf ff cc be,a 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
2012a44: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
info->triply_indirect = p;
2012a48: 10 bf ff aa b 20128f0 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
2012a4c: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
2012a50: 7f ff ff 4b call 201277c <memfile_alloc_block> <== NOT EXECUTED
2012a54: 01 00 00 00 nop <== NOT EXECUTED
if ( !p1 )
2012a58: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
2012a5c: 22 bf ff c5 be,a 2012970 <IMFS_memfile_get_block_pointer+0x1c0><== NOT EXECUTED
2012a60: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
2012a64: 10 bf ff a8 b 2012904 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
2012a68: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED
02013504 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
2013504: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2013508: a0 96 20 00 orcc %i0, 0, %l0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
201350c: a4 10 00 19 mov %i1, %l2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2013510: 02 80 00 b5 be 20137e4 <IMFS_memfile_read+0x2e0> <== NEVER TAKEN
2013514: a6 10 00 1a mov %i2, %l3
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
2013518: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
201351c: 84 00 7f fb add %g1, -5, %g2
2013520: 80 a0 a0 01 cmp %g2, 1
2013524: 18 80 00 a8 bgu 20137c4 <IMFS_memfile_read+0x2c0> <== NEVER TAKEN
2013528: 80 a6 e0 00 cmp %i3, 0
/*
* Error checks on arguments
*/
assert( dest );
201352c: 02 80 00 96 be 2013784 <IMFS_memfile_read+0x280> <== NEVER TAKEN
2013530: 80 a7 20 00 cmp %i4, 0
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
2013534: 02 80 00 86 be 201374c <IMFS_memfile_read+0x248> <== NEVER TAKEN
2013538: 80 a0 60 06 cmp %g1, 6
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
201353c: 02 80 00 5f be 20136b8 <IMFS_memfile_read+0x1b4> <== NEVER TAKEN
2013540: 86 10 20 00 clr %g3
* 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 )
2013544: c4 04 20 50 ld [ %l0 + 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;
2013548: 82 10 00 1a mov %i2, %g1
if ( last_byte > the_jnode->info.file.size )
201354c: 80 a0 c0 02 cmp %g3, %g2
2013550: c8 04 20 54 ld [ %l0 + 0x54 ], %g4
2013554: 04 80 00 52 ble 201369c <IMFS_memfile_read+0x198> <== ALWAYS TAKEN
2013558: 9a 07 00 1a add %i4, %i2, %o5
my_length = the_jnode->info.file.size - start;
201355c: 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;
2013560: 29 00 80 85 sethi %hi(0x2021400), %l4 <== NOT EXECUTED
2013564: e2 05 20 d8 ld [ %l4 + 0xd8 ], %l1 ! 20214d8 <imfs_memfile_bytes_per_block><== NOT EXECUTED
2013568: 90 10 00 12 mov %l2, %o0
201356c: ab 3c 60 1f sra %l1, 0x1f, %l5
2013570: 96 10 00 11 mov %l1, %o3
2013574: 94 10 00 15 mov %l5, %o2
2013578: 40 00 2b 27 call 201e214 <__moddi3>
201357c: 92 10 00 13 mov %l3, %o1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
2013580: 90 10 00 12 mov %l2, %o0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
2013584: ac 10 00 09 mov %o1, %l6
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
2013588: 94 10 00 15 mov %l5, %o2
201358c: 92 10 00 13 mov %l3, %o1
2013590: 40 00 2a 3a call 201de78 <__divdi3>
2013594: 96 10 00 11 mov %l1, %o3
if ( start_offset ) {
2013598: 80 a5 a0 00 cmp %l6, 0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
201359c: a4 10 00 09 mov %o1, %l2
if ( start_offset ) {
20135a0: aa 10 00 1b mov %i3, %l5
20135a4: 02 80 00 14 be 20135f4 <IMFS_memfile_read+0xf0>
20135a8: 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 );
20135ac: 90 10 00 10 mov %l0, %o0
20135b0: 7f ff fc 80 call 20127b0 <IMFS_memfile_get_block_pointer>
20135b4: 94 10 20 00 clr %o2
assert( block_ptr );
20135b8: 80 a2 20 00 cmp %o0, 0
20135bc: 02 80 00 92 be 2013804 <IMFS_memfile_read+0x300> <== NEVER TAKEN
20135c0: a2 24 40 16 sub %l1, %l6, %l1
*/
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;
20135c4: 80 a7 00 11 cmp %i4, %l1
20135c8: 18 80 00 4f bgu 2013704 <IMFS_memfile_read+0x200>
20135cc: b0 10 00 1c mov %i4, %i0
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
20135d0: d2 02 00 00 ld [ %o0 ], %o1
20135d4: 94 10 00 18 mov %i0, %o2
20135d8: 90 10 00 1b mov %i3, %o0
20135dc: 40 00 06 00 call 2014ddc <memcpy>
20135e0: 92 02 40 16 add %o1, %l6, %o1
dest += to_copy;
block++;
my_length -= to_copy;
20135e4: e2 05 20 d8 ld [ %l4 + 0xd8 ], %l1
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
20135e8: aa 06 c0 18 add %i3, %i0, %l5
block++;
20135ec: a4 04 a0 01 inc %l2
my_length -= to_copy;
20135f0: 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 ) {
20135f4: 80 a7 00 11 cmp %i4, %l1
20135f8: 0a 80 00 15 bcs 201364c <IMFS_memfile_read+0x148>
20135fc: 80 a7 20 00 cmp %i4, 0
2013600: a8 15 20 d8 or %l4, 0xd8, %l4
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
2013604: 90 10 00 10 mov %l0, %o0
2013608: 92 10 00 12 mov %l2, %o1
201360c: 7f ff fc 69 call 20127b0 <IMFS_memfile_get_block_pointer>
2013610: 94 10 20 00 clr %o2
assert( block_ptr );
2013614: 80 a2 20 00 cmp %o0, 0
2013618: 02 80 00 53 be 2013764 <IMFS_memfile_read+0x260> <== NEVER TAKEN
201361c: 94 10 00 11 mov %l1, %o2
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
2013620: d2 02 00 00 ld [ %o0 ], %o1
2013624: 40 00 05 ee call 2014ddc <memcpy>
2013628: 90 10 00 15 mov %l5, %o0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
201362c: c2 05 00 00 ld [ %l4 ], %g1
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
2013630: b8 27 00 11 sub %i4, %l1, %i4
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
2013634: aa 05 40 11 add %l5, %l1, %l5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
2013638: 80 a0 40 1c cmp %g1, %i4
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
201363c: a4 04 a0 01 inc %l2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
2013640: 08 bf ff f1 bleu 2013604 <IMFS_memfile_read+0x100>
2013644: b0 06 00 11 add %i0, %l1, %i0
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
2013648: 80 a7 20 00 cmp %i4, 0
201364c: 02 80 00 0e be 2013684 <IMFS_memfile_read+0x180>
2013650: 90 07 bf f8 add %fp, -8, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
2013654: 92 10 00 12 mov %l2, %o1
2013658: 90 10 00 10 mov %l0, %o0
201365c: 7f ff fc 55 call 20127b0 <IMFS_memfile_get_block_pointer>
2013660: 94 10 20 00 clr %o2
assert( block_ptr );
2013664: 80 a2 20 00 cmp %o0, 0
2013668: 02 80 00 4f be 20137a4 <IMFS_memfile_read+0x2a0> <== NEVER TAKEN
201366c: b0 06 00 1c add %i0, %i4, %i0
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
2013670: d2 02 00 00 ld [ %o0 ], %o1
2013674: 90 10 00 15 mov %l5, %o0
2013678: 40 00 05 d9 call 2014ddc <memcpy>
201367c: 94 10 00 1c mov %i4, %o2
copied += my_length;
}
IMFS_update_atime( the_jnode );
2013680: 90 07 bf f8 add %fp, -8, %o0
2013684: 7f ff c2 6f call 2004040 <gettimeofday>
2013688: 92 10 20 00 clr %o1
201368c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2013690: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
return copied;
}
2013694: 81 c7 e0 08 ret
2013698: 81 e8 00 00 restore
* 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 )
201369c: 12 bf ff b2 bne 2013564 <IMFS_memfile_read+0x60> <== NEVER TAKEN
20136a0: 29 00 80 85 sethi %hi(0x2021400), %l4
20136a4: 80 a3 40 04 cmp %o5, %g4
20136a8: 08 bf ff b0 bleu 2013568 <IMFS_memfile_read+0x64>
20136ac: e2 05 20 d8 ld [ %l4 + 0xd8 ], %l1
my_length = the_jnode->info.file.size - start;
20136b0: 10 bf ff ae b 2013568 <IMFS_memfile_read+0x64>
20136b4: b8 21 00 01 sub %g4, %g1, %i4
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))
20136b8: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED
20136bc: 82 10 20 00 clr %g1 <== NOT EXECUTED
20136c0: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED
20136c4: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED
20136c8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20136cc: 04 80 00 10 ble 201370c <IMFS_memfile_read+0x208> <== NOT EXECUTED
20136d0: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
20136d4: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
20136d8: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED
20136dc: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
20136e0: 40 00 05 bf call 2014ddc <memcpy> <== NOT EXECUTED
20136e4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
IMFS_update_atime( the_jnode );
20136e8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
20136ec: 7f ff c2 55 call 2004040 <gettimeofday> <== NOT EXECUTED
20136f0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20136f4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
20136f8: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
return my_length;
20136fc: 81 c7 e0 08 ret <== NOT EXECUTED
2013700: 81 e8 00 00 restore <== NOT EXECUTED
*/
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;
2013704: 10 bf ff b3 b 20135d0 <IMFS_memfile_read+0xcc>
2013708: b0 10 00 11 mov %l1, %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))
201370c: 12 80 00 04 bne 201371c <IMFS_memfile_read+0x218> <== NOT EXECUTED
2013710: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED
2013714: 38 bf ff f1 bgu,a 20136d8 <IMFS_memfile_read+0x1d4> <== NOT EXECUTED
2013718: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
201371c: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED
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))
2013720: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
2013724: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2013728: 40 00 05 ad call 2014ddc <memcpy> <== NOT EXECUTED
201372c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
IMFS_update_atime( the_jnode );
2013730: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
2013734: 7f ff c2 43 call 2004040 <gettimeofday> <== NOT EXECUTED
2013738: 92 10 20 00 clr %o1 <== NOT EXECUTED
201373c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2013740: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
return my_length;
2013744: 81 c7 e0 08 ret <== NOT EXECUTED
2013748: 81 e8 00 00 restore <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
201374c: 40 00 03 68 call 20144ec <__errno> <== NOT EXECUTED
2013750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013754: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2013758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201375c: 81 c7 e0 08 ret <== NOT EXECUTED
2013760: 81 e8 00 00 restore <== NOT EXECUTED
*/
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 );
assert( block_ptr );
2013764: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2013768: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
201376c: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2013770: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013774: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
2013778: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
201377c: 7f ff f4 74 call 201094c <__assert_func> <== NOT EXECUTED
2013780: 92 10 22 a7 mov 0x2a7, %o1 <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
2013784: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2013788: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
201378c: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED
2013790: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013794: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
2013798: 96 12 e0 20 or %o3, 0x20, %o3 <== NOT EXECUTED
201379c: 7f ff f4 6c call 201094c <__assert_func> <== NOT EXECUTED
20137a0: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
20137a4: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
20137a8: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
20137ac: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
20137b0: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
20137b4: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
20137b8: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
20137bc: 7f ff f4 64 call 201094c <__assert_func> <== NOT EXECUTED
20137c0: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
20137c4: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
20137c8: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
20137cc: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
20137d0: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
20137d4: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
20137d8: 96 12 e3 d0 or %o3, 0x3d0, %o3 <== NOT EXECUTED
20137dc: 7f ff f4 5c call 201094c <__assert_func> <== NOT EXECUTED
20137e0: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
20137e4: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
20137e8: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
20137ec: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
20137f0: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
20137f4: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
20137f8: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
20137fc: 7f ff f4 54 call 201094c <__assert_func> <== NOT EXECUTED
2013800: 92 10 22 4c mov 0x24c, %o1 <== NOT EXECUTED
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 );
assert( block_ptr );
2013804: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2013808: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
201380c: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2013810: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013814: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
2013818: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
201381c: 7f ff f4 4c call 201094c <__assert_func> <== NOT EXECUTED
2013820: 92 10 22 96 mov 0x296, %o1 <== NOT EXECUTED
02012b4c <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
2012b4c: 9d e3 bf a0 save %sp, -96, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2012b50: 80 a6 20 00 cmp %i0, 0
2012b54: 02 80 00 62 be 2012cdc <IMFS_memfile_remove+0x190> <== NEVER TAKEN
2012b58: 11 00 80 80 sethi %hi(0x2020000), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012b5c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
2012b60: 80 a0 60 05 cmp %g1, 5
2012b64: 12 80 00 65 bne 2012cf8 <IMFS_memfile_remove+0x1ac> <== NEVER TAKEN
2012b68: 23 00 80 85 sethi %hi(0x2021400), %l1
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
2012b6c: 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;
2012b70: e6 04 60 d8 ld [ %l1 + 0xd8 ], %l3
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
2012b74: 80 a0 60 00 cmp %g1, 0
2012b78: 02 80 00 05 be 2012b8c <IMFS_memfile_remove+0x40>
2012b7c: a7 34 e0 02 srl %l3, 2, %l3
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
2012b80: 90 06 20 58 add %i0, 0x58, %o0
2012b84: 7f ff ff ba call 2012a6c <memfile_free_blocks_in_table>
2012b88: 92 10 00 13 mov %l3, %o1
}
if ( info->doubly_indirect ) {
2012b8c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2012b90: 80 a0 60 00 cmp %g1, 0
2012b94: 02 80 00 1b be 2012c00 <IMFS_memfile_remove+0xb4> <== ALWAYS TAKEN
2012b98: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
2012b9c: 85 30 a0 02 srl %g2, 2, %g2 <== NOT EXECUTED
2012ba0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2012ba4: 02 80 00 14 be 2012bf4 <IMFS_memfile_remove+0xa8> <== NOT EXECUTED
2012ba8: 90 10 20 00 clr %o0 <== NOT EXECUTED
2012bac: 25 00 80 85 sethi %hi(0x2021400), %l2 <== NOT EXECUTED
2012bb0: a4 14 a0 d8 or %l2, 0xd8, %l2 ! 20214d8 <imfs_memfile_bytes_per_block><== NOT EXECUTED
2012bb4: 10 80 00 03 b 2012bc0 <IMFS_memfile_remove+0x74> <== NOT EXECUTED
2012bb8: a0 10 20 00 clr %l0 <== NOT EXECUTED
2012bbc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
2012bc0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
2012bc4: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED
2012bc8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2012bcc: 02 80 00 04 be 2012bdc <IMFS_memfile_remove+0x90> <== NOT EXECUTED
2012bd0: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
memfile_free_blocks_in_table(
2012bd4: 7f ff ff a6 call 2012a6c <memfile_free_blocks_in_table> <== NOT EXECUTED
2012bd8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
2012bdc: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
2012be0: a0 04 20 01 inc %l0 <== NOT EXECUTED
2012be4: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
2012be8: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
2012bec: 18 bf ff f4 bgu 2012bbc <IMFS_memfile_remove+0x70> <== NOT EXECUTED
2012bf0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
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 );
2012bf4: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED
2012bf8: 7f ff ff 9d call 2012a6c <memfile_free_blocks_in_table> <== NOT EXECUTED
2012bfc: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
2012c00: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
2012c04: 80 a2 20 00 cmp %o0, 0
2012c08: 02 80 00 33 be 2012cd4 <IMFS_memfile_remove+0x188> <== ALWAYS TAKEN
2012c0c: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
2012c10: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
2012c14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012c18: 22 80 00 2d be,a 2012ccc <IMFS_memfile_remove+0x180> <== NOT EXECUTED
2012c1c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
2012c20: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
2012c24: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2012c28: 22 80 00 29 be,a 2012ccc <IMFS_memfile_remove+0x180> <== NOT EXECUTED
2012c2c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
2012c30: 25 00 80 85 sethi %hi(0x2021400), %l2 <== NOT EXECUTED
2012c34: aa 10 20 00 clr %l5 <== NOT EXECUTED
2012c38: a4 14 a0 d8 or %l2, 0xd8, %l2 <== NOT EXECUTED
2012c3c: a8 10 20 00 clr %l4 <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
2012c40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012c44: 02 80 00 13 be 2012c90 <IMFS_memfile_remove+0x144> <== NOT EXECUTED
2012c48: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED
2012c4c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2012c50: a0 10 20 00 clr %l0 <== NOT EXECUTED
if ( p[j] ) {
2012c54: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
2012c58: c2 04 40 08 ld [ %l1 + %o0 ], %g1 <== NOT EXECUTED
2012c5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012c60: 02 80 00 04 be 2012c70 <IMFS_memfile_remove+0x124> <== NOT EXECUTED
2012c64: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
2012c68: 7f ff ff 81 call 2012a6c <memfile_free_blocks_in_table> <== NOT EXECUTED
2012c6c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
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++ ) {
2012c70: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
2012c74: a0 04 20 01 inc %l0 <== NOT EXECUTED
2012c78: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
2012c7c: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
2012c80: 18 bf ff f5 bgu 2012c54 <IMFS_memfile_remove+0x108> <== NOT EXECUTED
2012c84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2012c88: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
2012c8c: 90 02 00 15 add %o0, %l5, %o0 <== NOT EXECUTED
2012c90: 7f ff ff 77 call 2012a6c <memfile_free_blocks_in_table> <== NOT EXECUTED
2012c94: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
2012c98: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
2012c9c: a8 05 20 01 inc %l4 <== NOT EXECUTED
2012ca0: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
2012ca4: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED
2012ca8: 08 80 00 09 bleu 2012ccc <IMFS_memfile_remove+0x180> <== NOT EXECUTED
2012cac: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
2012cb0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
2012cb4: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
2012cb8: e2 02 00 15 ld [ %o0 + %l5 ], %l1 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
2012cbc: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2012cc0: 12 bf ff e1 bne 2012c44 <IMFS_memfile_remove+0xf8> <== NOT EXECUTED
2012cc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
2012cc8: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
2012ccc: 7f ff ff 68 call 2012a6c <memfile_free_blocks_in_table> <== NOT EXECUTED
2012cd0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
2012cd4: 81 c7 e0 08 ret
2012cd8: 91 e8 20 00 restore %g0, 0, %o0
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2012cdc: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012ce0: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012ce4: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012ce8: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED
2012cec: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
2012cf0: 7f ff f7 17 call 201094c <__assert_func> <== NOT EXECUTED
2012cf4: 92 10 21 ee mov 0x1ee, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2012cf8: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012cfc: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012d00: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012d04: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED
2012d08: 96 12 e3 80 or %o3, 0x380, %o3 <== NOT EXECUTED
2012d0c: 7f ff f7 10 call 201094c <__assert_func> <== NOT EXECUTED
2012d10: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED
02012af0 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
2012af0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
2012af4: 94 10 20 00 clr %o2 <== NOT EXECUTED
2012af8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2012afc: 7f ff ff 2d call 20127b0 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
2012b00: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
assert( block_ptr );
2012b04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012b08: 02 80 00 08 be 2012b28 <IMFS_memfile_remove_block+0x38> <== NOT EXECUTED
2012b0c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
2012b10: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
*block_ptr = 0;
2012b14: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED
memfile_free_block( ptr );
2012b18: 7f ff ff 10 call 2012758 <memfile_free_block> <== NOT EXECUTED
2012b1c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
}
return 1;
}
2012b20: 81 c7 e0 08 ret <== NOT EXECUTED
2012b24: 81 e8 00 00 restore <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
2012b28: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2012b2c: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012b30: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012b34: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012b38: 94 12 a0 b0 or %o2, 0xb0, %o2 <== NOT EXECUTED
2012b3c: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
2012b40: 7f ff f7 83 call 201094c <__assert_func> <== NOT EXECUTED
2012b44: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED
02013160 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
2013160: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
2013164: a0 96 20 00 orcc %i0, 0, %l0
2013168: 02 80 00 8e be 20133a0 <IMFS_memfile_write+0x240> <== NEVER TAKEN
201316c: 11 00 80 80 sethi %hi(0x2020000), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2013170: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
2013174: 80 a0 60 05 cmp %g1, 5
2013178: 12 80 00 83 bne 2013384 <IMFS_memfile_write+0x224> <== NEVER TAKEN
201317c: 80 a6 e0 00 cmp %i3, 0
/*
* Error check arguments
*/
assert( source );
2013180: 02 80 00 9f be 20133fc <IMFS_memfile_write+0x29c> <== NEVER TAKEN
2013184: 80 a7 20 00 cmp %i4, 0
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
2013188: 02 80 00 71 be 201334c <IMFS_memfile_write+0x1ec> <== NEVER TAKEN
201318c: 01 00 00 00 nop
* 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 + length;
if ( last_byte > the_jnode->info.file.size ) {
2013190: c2 04 20 50 ld [ %l0 + 0x50 ], %g1
2013194: 80 a0 60 00 cmp %g1, 0
2013198: 06 80 00 57 bl 20132f4 <IMFS_memfile_write+0x194> <== NEVER TAKEN
201319c: 94 07 00 1a add %i4, %i2, %o2
20131a0: 80 a0 60 00 cmp %g1, 0
20131a4: 22 80 00 51 be,a 20132e8 <IMFS_memfile_write+0x188> <== ALWAYS TAKEN
20131a8: c2 04 20 54 ld [ %l0 + 0x54 ], %g1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
20131ac: 25 00 80 85 sethi %hi(0x2021400), %l2 <== NOT EXECUTED
20131b0: e2 04 a0 d8 ld [ %l2 + 0xd8 ], %l1 ! 20214d8 <imfs_memfile_bytes_per_block>
20131b4: 90 10 00 19 mov %i1, %o0
20131b8: a7 3c 60 1f sra %l1, 0x1f, %l3
20131bc: 96 10 00 11 mov %l1, %o3
20131c0: 94 10 00 13 mov %l3, %o2
20131c4: 40 00 2c 14 call 201e214 <__moddi3>
20131c8: 92 10 00 1a mov %i2, %o1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
20131cc: 94 10 00 13 mov %l3, %o2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
20131d0: a8 10 00 09 mov %o1, %l4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
20131d4: 90 10 00 19 mov %i1, %o0
20131d8: 92 10 00 1a mov %i2, %o1
20131dc: 40 00 2b 27 call 201de78 <__divdi3>
20131e0: 96 10 00 11 mov %l1, %o3
if ( start_offset ) {
20131e4: b0 10 20 00 clr %i0
20131e8: 80 a5 20 00 cmp %l4, 0
20131ec: 12 80 00 2d bne 20132a0 <IMFS_memfile_write+0x140>
20131f0: a6 10 00 09 mov %o1, %l3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
20131f4: 80 a7 00 11 cmp %i4, %l1
20131f8: 0a 80 00 15 bcs 201324c <IMFS_memfile_write+0xec>
20131fc: 80 a7 20 00 cmp %i4, 0
2013200: a4 14 a0 d8 or %l2, 0xd8, %l2
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
2013204: 90 10 00 10 mov %l0, %o0
2013208: 92 10 00 13 mov %l3, %o1
201320c: 7f ff fd 69 call 20127b0 <IMFS_memfile_get_block_pointer>
2013210: 94 10 20 00 clr %o2
assert( block_ptr );
2013214: 80 a2 20 00 cmp %o0, 0
2013218: 02 80 00 53 be 2013364 <IMFS_memfile_write+0x204> <== NEVER TAKEN
201321c: 92 10 00 1b mov %i3, %o1
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 );
2013220: d0 02 00 00 ld [ %o0 ], %o0
2013224: 40 00 06 ee call 2014ddc <memcpy>
2013228: 94 10 00 11 mov %l1, %o2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
201322c: c2 04 80 00 ld [ %l2 ], %g1
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;
block++;
my_length -= to_copy;
2013230: b8 27 00 11 sub %i4, %l1, %i4
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;
2013234: b6 06 c0 11 add %i3, %l1, %i3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
2013238: 80 a0 40 1c cmp %g1, %i4
#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;
block++;
201323c: a6 04 e0 01 inc %l3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
2013240: 08 bf ff f1 bleu 2013204 <IMFS_memfile_write+0xa4>
2013244: b0 06 00 11 add %i0, %l1, %i0
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
2013248: 80 a7 20 00 cmp %i4, 0
201324c: 02 80 00 0e be 2013284 <IMFS_memfile_write+0x124>
2013250: 90 07 bf f8 add %fp, -8, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
2013254: 92 10 00 13 mov %l3, %o1
2013258: 90 10 00 10 mov %l0, %o0
201325c: 7f ff fd 55 call 20127b0 <IMFS_memfile_get_block_pointer>
2013260: 94 10 20 00 clr %o2
assert( block_ptr );
2013264: 80 a2 20 00 cmp %o0, 0
2013268: 02 80 00 5d be 20133dc <IMFS_memfile_write+0x27c> <== NEVER TAKEN
201326c: b0 06 00 1c add %i0, %i4, %i0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
2013270: d0 02 00 00 ld [ %o0 ], %o0
2013274: 92 10 00 1b mov %i3, %o1
2013278: 40 00 06 d9 call 2014ddc <memcpy>
201327c: 94 10 00 1c mov %i4, %o2
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
2013280: 90 07 bf f8 add %fp, -8, %o0
2013284: 7f ff c3 6f call 2004040 <gettimeofday>
2013288: 92 10 20 00 clr %o1
201328c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2013290: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
2013294: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
return copied;
}
2013298: 81 c7 e0 08 ret
201329c: 81 e8 00 00 restore
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 );
20132a0: 90 10 00 10 mov %l0, %o0
20132a4: 7f ff fd 43 call 20127b0 <IMFS_memfile_get_block_pointer>
20132a8: 94 10 20 00 clr %o2
assert( block_ptr );
20132ac: 80 a2 20 00 cmp %o0, 0
20132b0: 02 80 00 43 be 20133bc <IMFS_memfile_write+0x25c> <== NEVER TAKEN
20132b4: b0 24 40 14 sub %l1, %l4, %i0
*/
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;
20132b8: 80 a6 00 1c cmp %i0, %i4
20132bc: 18 80 00 1a bgu 2013324 <IMFS_memfile_write+0x1c4>
20132c0: d0 02 00 00 ld [ %o0 ], %o0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
20132c4: 92 10 00 1b mov %i3, %o1
20132c8: 90 02 00 14 add %o0, %l4, %o0
20132cc: 94 10 00 18 mov %i0, %o2
20132d0: 40 00 06 c3 call 2014ddc <memcpy>
20132d4: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
20132d8: a6 04 e0 01 inc %l3
my_length -= to_copy;
copied += to_copy;
20132dc: e2 04 a0 d8 ld [ %l2 + 0xd8 ], %l1
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
20132e0: 10 bf ff c5 b 20131f4 <IMFS_memfile_write+0x94>
20132e4: b8 27 00 18 sub %i4, %i0, %i4
* 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 + length;
if ( last_byte > the_jnode->info.file.size ) {
20132e8: 80 a0 40 0a cmp %g1, %o2
20132ec: 1a bf ff b1 bcc 20131b0 <IMFS_memfile_write+0x50> <== NEVER TAKEN
20132f0: 25 00 80 85 sethi %hi(0x2021400), %l2
status = IMFS_memfile_extend( the_jnode, last_byte );
20132f4: 90 10 00 10 mov %l0, %o0
20132f8: 7f ff fe eb call 2012ea4 <IMFS_memfile_extend>
20132fc: 92 10 20 00 clr %o1
if ( status )
2013300: 80 a2 20 00 cmp %o0, 0
2013304: 02 bf ff ab be 20131b0 <IMFS_memfile_write+0x50> <== ALWAYS TAKEN
2013308: 25 00 80 85 sethi %hi(0x2021400), %l2
rtems_set_errno_and_return_minus_one( ENOSPC );
201330c: 40 00 04 78 call 20144ec <__errno> <== NOT EXECUTED
2013310: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013314: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
2013318: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201331c: 81 c7 e0 08 ret <== NOT EXECUTED
2013320: 81 e8 00 00 restore <== NOT EXECUTED
*/
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;
2013324: b0 10 00 1c mov %i4, %i0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
2013328: 92 10 00 1b mov %i3, %o1
201332c: 90 02 00 14 add %o0, %l4, %o0
2013330: 94 10 00 18 mov %i0, %o2
2013334: 40 00 06 aa call 2014ddc <memcpy>
2013338: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
201333c: a6 04 e0 01 inc %l3
my_length -= to_copy;
copied += to_copy;
2013340: e2 04 a0 d8 ld [ %l2 + 0xd8 ], %l1
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
2013344: 10 bf ff ac b 20131f4 <IMFS_memfile_write+0x94>
2013348: b8 27 00 18 sub %i4, %i0, %i4
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
201334c: 40 00 04 68 call 20144ec <__errno> <== NOT EXECUTED
2013350: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013354: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2013358: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201335c: 81 c7 e0 08 ret <== NOT EXECUTED
2013360: 81 e8 00 00 restore <== NOT EXECUTED
*/
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 );
assert( block_ptr );
2013364: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2013368: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
201336c: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2013370: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013374: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
2013378: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
201337c: 7f ff f5 74 call 201094c <__assert_func> <== NOT EXECUTED
2013380: 92 10 23 30 mov 0x330, %o1 <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
2013384: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2013388: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
201338c: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013390: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
2013394: 96 12 e3 80 or %o3, 0x380, %o3 <== NOT EXECUTED
2013398: 7f ff f5 6d call 201094c <__assert_func> <== NOT EXECUTED
201339c: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
20133a0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
20133a4: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
20133a8: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
20133ac: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
20133b0: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED
20133b4: 7f ff f5 66 call 201094c <__assert_func> <== NOT EXECUTED
20133b8: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED
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 );
assert( block_ptr );
20133bc: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
20133c0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
20133c4: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
20133c8: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
20133cc: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
20133d0: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
20133d4: 7f ff f5 5e call 201094c <__assert_func> <== NOT EXECUTED
20133d8: 92 10 23 1c mov 0x31c, %o1 <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
20133dc: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
20133e0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
20133e4: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
20133e8: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
20133ec: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
20133f0: 96 12 e3 b8 or %o3, 0x3b8, %o3 <== NOT EXECUTED
20133f4: 7f ff f5 56 call 201094c <__assert_func> <== NOT EXECUTED
20133f8: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
20133fc: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2013400: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2013404: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2013408: 94 12 a0 48 or %o2, 0x48, %o2 <== NOT EXECUTED
201340c: 96 12 e3 c8 or %o3, 0x3c8, %o3 <== NOT EXECUTED
2013410: 7f ff f5 4f call 201094c <__assert_func> <== NOT EXECUTED
2013414: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED
0200ae48 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200ae48: 9d e3 bf 58 save %sp, -168, %sp
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
200ae4c: 40 00 12 74 call 200f81c <strlen>
200ae50: 90 10 00 18 mov %i0, %o0
200ae54: a0 07 bf b8 add %fp, -72, %l0
200ae58: 92 10 00 08 mov %o0, %o1
200ae5c: 96 07 bf fc add %fp, -4, %o3
200ae60: 90 10 00 18 mov %i0, %o0
200ae64: 7f ff ff 7a call 200ac4c <IMFS_get_token>
200ae68: 94 10 00 10 mov %l0, %o2
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
200ae6c: 03 00 00 3c sethi %hi(0xf000), %g1
200ae70: 05 00 00 10 sethi %hi(0x4000), %g2
200ae74: 82 0e 40 01 and %i1, %g1, %g1
200ae78: 80 a0 40 02 cmp %g1, %g2
200ae7c: 02 80 00 23 be 200af08 <IMFS_mknod+0xc0>
200ae80: 05 00 00 20 sethi %hi(0x8000), %g2
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
200ae84: 80 a0 40 02 cmp %g1, %g2
200ae88: 02 80 00 08 be 200aea8 <IMFS_mknod+0x60>
200ae8c: 92 10 20 05 mov 5, %o1
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
200ae90: 05 00 00 08 sethi %hi(0x2000), %g2
200ae94: 80 a0 40 02 cmp %g1, %g2
200ae98: 12 80 00 0f bne 200aed4 <IMFS_mknod+0x8c>
200ae9c: 05 00 00 18 sethi %hi(0x6000), %g2
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
200aea0: f4 3f bf e0 std %i2, [ %fp + -32 ]
200aea4: 92 10 20 02 mov 2, %o1
* 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.
*/
new_node = IMFS_create_node(
200aea8: 90 10 00 1c mov %i4, %o0
200aeac: 94 10 00 10 mov %l0, %o2
200aeb0: 96 10 00 19 mov %i1, %o3
200aeb4: 98 07 bf e0 add %fp, -32, %o4
200aeb8: 40 00 0a 7e call 200d8b0 <IMFS_create_node>
200aebc: b0 10 20 00 clr %i0
new_name,
mode,
&info
);
if ( !new_node )
200aec0: 80 a2 20 00 cmp %o0, 0
200aec4: 02 80 00 1b be 200af30 <IMFS_mknod+0xe8> <== NEVER TAKEN
200aec8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
200aecc: 81 c7 e0 08 ret
200aed0: 81 e8 00 00 restore
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
200aed4: 80 a0 40 02 cmp %g1, %g2
200aed8: 22 bf ff f3 be,a 200aea4 <IMFS_mknod+0x5c>
200aedc: f4 3f bf e0 std %i2, [ %fp + -32 ]
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
200aee0: 05 00 00 04 sethi %hi(0x1000), %g2
200aee4: 80 a0 40 02 cmp %g1, %g2
200aee8: 02 bf ff f0 be 200aea8 <IMFS_mknod+0x60> <== ALWAYS TAKEN
200aeec: 92 10 20 07 mov 7, %o1
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
200aef0: 40 00 0e 93 call 200e93c <__errno> <== NOT EXECUTED
200aef4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200aef8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200aefc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200af00: 81 c7 e0 08 ret <== NOT EXECUTED
200af04: 81 e8 00 00 restore <== NOT EXECUTED
200af08: 92 10 20 01 mov 1, %o1
* 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.
*/
new_node = IMFS_create_node(
200af0c: 90 10 00 1c mov %i4, %o0
200af10: 94 10 00 10 mov %l0, %o2
200af14: 96 10 00 19 mov %i1, %o3
200af18: 98 07 bf e0 add %fp, -32, %o4
200af1c: 40 00 0a 65 call 200d8b0 <IMFS_create_node>
200af20: b0 10 20 00 clr %i0
new_name,
mode,
&info
);
if ( !new_node )
200af24: 80 a2 20 00 cmp %o0, 0
200af28: 12 80 00 06 bne 200af40 <IMFS_mknod+0xf8> <== ALWAYS TAKEN
200af2c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
200af30: 40 00 0e 83 call 200e93c <__errno> <== NOT EXECUTED
200af34: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200af38: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200af3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
}
200af40: 81 c7 e0 08 ret
200af44: 81 e8 00 00 restore
02003680 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2003680: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2003684: c2 06 20 08 ld [ %i0 + 8 ], %g1
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2003688: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200368c: 80 a0 a0 01 cmp %g2, 1
2003690: 12 80 00 05 bne 20036a4 <IMFS_mount+0x24> <== NEVER TAKEN
2003694: 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;
2003698: f0 20 60 5c st %i0, [ %g1 + 0x5c ]
return 0;
}
200369c: 81 c7 e0 08 ret
20036a0: 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 );
20036a4: 40 00 43 92 call 20144ec <__errno> <== NOT EXECUTED
20036a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20036ac: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
20036b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20036b4: 81 c7 e0 08 ret <== NOT EXECUTED
20036b8: 81 e8 00 00 restore <== NOT EXECUTED
02004b04 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
2004b04: 9d e3 bf a0 save %sp, -96, %sp
assert( the_jnode );
2004b08: 80 a6 20 00 cmp %i0, 0
2004b0c: 02 80 00 5b be 2004c78 <IMFS_print_jnode+0x174> <== NEVER TAKEN
2004b10: 21 00 80 9a sethi %hi(0x2026800), %l0
fprintf(stdout, "%s", the_jnode->name );
2004b14: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 ! 2026af0 <_impure_ptr>
2004b18: 90 06 20 0c add %i0, 0xc, %o0
2004b1c: 40 00 40 a7 call 2014db8 <fputs>
2004b20: d2 00 60 08 ld [ %g1 + 8 ], %o1
switch( the_jnode->type ) {
2004b24: d4 06 20 4c ld [ %i0 + 0x4c ], %o2
2004b28: 80 a2 a0 07 cmp %o2, 7
2004b2c: 08 80 00 0f bleu 2004b68 <IMFS_print_jnode+0x64> <== ALWAYS TAKEN
2004b30: 83 2a a0 02 sll %o2, 2, %g1
fprintf(stdout, " FIFO not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
2004b34: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED
2004b38: 13 00 80 93 sethi %hi(0x2024c00), %o1 <== NOT EXECUTED
2004b3c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2004b40: 40 00 40 40 call 2014c40 <fprintf> <== NOT EXECUTED
2004b44: 92 12 61 f8 or %o1, 0x1f8, %o1 <== NOT EXECUTED
assert(0);
2004b48: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
assert(0);
2004b4c: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED
2004b50: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED
2004b54: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED
2004b58: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED
2004b5c: 94 12 a3 38 or %o2, 0x338, %o2 <== NOT EXECUTED
2004b60: 40 00 02 b9 call 2005644 <__assert_func> <== NOT EXECUTED
2004b64: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED
)
{
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
2004b68: 05 00 80 12 sethi %hi(0x2004800), %g2
2004b6c: 84 10 a2 a8 or %g2, 0x2a8, %g2 ! 2004aa8 <sparc_enable_interrupts+0x10>
2004b70: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2004b74: 81 c0 40 00 jmp %g1
2004b78: 01 00 00 00 nop
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
2004b7c: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED
2004b80: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2004b84: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2004b88: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED
2004b8c: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED
2004b90: 40 00 43 a9 call 2015a34 <fwrite> <== NOT EXECUTED
2004b94: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 2024de0 <rtems_filesystem_mount_table_size+0x15d0><== NOT EXECUTED
assert(0);
2004b98: 10 bf ff ed b 2004b4c <IMFS_print_jnode+0x48> <== NOT EXECUTED
2004b9c: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED
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)",
2004ba0: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED
2004ba4: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED
2004ba8: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED
2004bac: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2004bb0: 13 00 80 93 sethi %hi(0x2024c00), %o1 <== NOT EXECUTED
2004bb4: 40 00 40 23 call 2014c40 <fprintf> <== NOT EXECUTED
2004bb8: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 2024da0 <rtems_filesystem_mount_table_size+0x1590><== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2004bbc: 31 00 80 93 sethi %hi(0x2024c00), %i0 <== NOT EXECUTED
2004bc0: 40 00 47 a7 call 2016a5c <puts> <== NOT EXECUTED
2004bc4: 91 ee 22 08 restore %i0, 0x208, %o0 <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
2004bc8: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1
2004bcc: d4 06 20 54 ld [ %i0 + 0x54 ], %o2
2004bd0: d0 00 60 08 ld [ %g1 + 8 ], %o0
2004bd4: 13 00 80 93 sethi %hi(0x2024c00), %o1
2004bd8: 40 00 40 1a call 2014c40 <fprintf>
2004bdc: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 2024db0 <rtems_filesystem_mount_table_size+0x15a0>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2004be0: 31 00 80 93 sethi %hi(0x2024c00), %i0
2004be4: 40 00 47 9e call 2016a5c <puts>
2004be8: 91 ee 22 08 restore %i0, 0x208, %o0
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2004bec: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED
2004bf0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2004bf4: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2004bf8: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED
2004bfc: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED
2004c00: 40 00 43 8d call 2015a34 <fwrite> <== NOT EXECUTED
2004c04: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 2024dc0 <rtems_filesystem_mount_table_size+0x15b0><== NOT EXECUTED
assert(0);
2004c08: 10 bf ff d1 b 2004b4c <IMFS_print_jnode+0x48> <== NOT EXECUTED
2004c0c: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
2004c10: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED
2004c14: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2004c18: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2004c1c: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED
2004c20: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED
2004c24: 40 00 43 84 call 2015a34 <fwrite> <== NOT EXECUTED
2004c28: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 2024dc0 <rtems_filesystem_mount_table_size+0x15b0><== NOT EXECUTED
assert(0);
2004c2c: 10 bf ff c8 b 2004b4c <IMFS_print_jnode+0x48> <== NOT EXECUTED
2004c30: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
2004c34: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1
2004c38: d6 06 20 54 ld [ %i0 + 0x54 ], %o3
2004c3c: d4 06 20 50 ld [ %i0 + 0x50 ], %o2
2004c40: d0 00 60 08 ld [ %g1 + 8 ], %o0
2004c44: 13 00 80 93 sethi %hi(0x2024c00), %o1
2004c48: 40 00 3f fe call 2014c40 <fprintf>
2004c4c: 92 12 61 88 or %o1, 0x188, %o1 ! 2024d88 <rtems_filesystem_mount_table_size+0x1578>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2004c50: 31 00 80 93 sethi %hi(0x2024c00), %i0
2004c54: 40 00 47 82 call 2016a5c <puts>
2004c58: 91 ee 22 08 restore %i0, 0x208, %o0
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
2004c5c: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1
2004c60: 90 10 20 2f mov 0x2f, %o0
2004c64: d2 00 60 08 ld [ %g1 + 8 ], %o1
2004c68: 40 00 40 10 call 2014ca8 <fputc>
2004c6c: 31 00 80 93 sethi %hi(0x2024c00), %i0
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2004c70: 40 00 47 7b call 2016a5c <puts>
2004c74: 91 ee 22 08 restore %i0, 0x208, %o0
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
2004c78: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED
2004c7c: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED
2004c80: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED
2004c84: 90 12 21 28 or %o0, 0x128, %o0 <== NOT EXECUTED
2004c88: 94 12 a3 38 or %o2, 0x338, %o2 <== NOT EXECUTED
2004c8c: 96 12 e1 78 or %o3, 0x178, %o3 <== NOT EXECUTED
2004c90: 40 00 02 6d call 2005644 <__assert_func> <== NOT EXECUTED
2004c94: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
020036c8 <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
20036c8: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
int i;
node = loc->node_access;
20036cc: c2 06 00 00 ld [ %i0 ], %g1
if ( node->type != IMFS_SYM_LINK )
20036d0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
20036d4: 80 a0 a0 04 cmp %g2, 4
20036d8: 12 80 00 19 bne 200373c <IMFS_readlink+0x74> <== NEVER TAKEN
20036dc: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20036e0: 02 80 00 15 be 2003734 <IMFS_readlink+0x6c> <== NEVER TAKEN
20036e4: 86 10 20 00 clr %g3
20036e8: c4 00 60 50 ld [ %g1 + 0x50 ], %g2
20036ec: c8 48 80 00 ldsb [ %g2 ], %g4
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
20036f0: b0 10 20 00 clr %i0
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20036f4: 80 a1 20 00 cmp %g4, 0
20036f8: 12 80 00 08 bne 2003718 <IMFS_readlink+0x50> <== ALWAYS TAKEN
20036fc: c4 08 80 00 ldub [ %g2 ], %g2
2003700: 30 80 00 13 b,a 200374c <IMFS_readlink+0x84> <== NOT EXECUTED
2003704: c4 00 60 50 ld [ %g1 + 0x50 ], %g2
2003708: c8 48 80 18 ldsb [ %g2 + %i0 ], %g4
200370c: 80 a1 20 00 cmp %g4, 0
2003710: 02 80 00 07 be 200372c <IMFS_readlink+0x64>
2003714: c4 08 80 18 ldub [ %g2 + %i0 ], %g2
buf[i] = node->info.sym_link.name[i];
2003718: c4 2e 40 03 stb %g2, [ %i1 + %g3 ]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
200371c: b0 06 20 01 inc %i0
2003720: 80 a6 80 18 cmp %i2, %i0
2003724: 18 bf ff f8 bgu 2003704 <IMFS_readlink+0x3c>
2003728: 86 10 00 18 mov %i0, %g3
buf[i] = node->info.sym_link.name[i];
return i;
}
200372c: 81 c7 e0 08 ret
2003730: 81 e8 00 00 restore
2003734: 81 c7 e0 08 ret <== NOT EXECUTED
2003738: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
200373c: 40 00 43 6c call 20144ec <__errno> <== NOT EXECUTED
2003740: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003744: 82 10 20 16 mov 0x16, %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
02003754 <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 */
)
{
2003754: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
2003758: e0 06 40 00 ld [ %i1 ], %l0
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
200375c: 92 10 00 1b mov %i3, %o1
2003760: 90 04 20 0c add %l0, 0xc, %o0
2003764: 40 00 47 36 call 201543c <strncpy>
2003768: 94 10 20 20 mov 0x20, %o2
if ( the_jnode->Parent != NULL )
200376c: c2 04 20 08 ld [ %l0 + 8 ], %g1
2003770: 80 a0 60 00 cmp %g1, 0
2003774: 22 80 00 05 be,a 2003788 <IMFS_rename+0x34> <== NEVER TAKEN
2003778: 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 );
200377c: 40 00 14 8b call 20089a8 <_Chain_Extract>
2003780: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
2003784: 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 );
2003788: 92 10 00 10 mov %l0, %o1
200378c: 90 00 60 50 add %g1, 0x50, %o0
2003790: 40 00 14 7a call 2008978 <_Chain_Append>
2003794: c2 24 20 08 st %g1, [ %l0 + 8 ]
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
2003798: 90 07 bf f8 add %fp, -8, %o0
200379c: 40 00 02 29 call 2004040 <gettimeofday>
20037a0: 92 10 20 00 clr %o1
20037a4: c2 07 bf f8 ld [ %fp + -8 ], %g1
20037a8: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
return 0;
}
20037ac: 81 c7 e0 08 ret
20037b0: 91 e8 20 00 restore %g0, 0, %o0
0200af54 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200af54: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200af58: e0 06 40 00 ld [ %i1 ], %l0
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
200af5c: c2 04 20 08 ld [ %l0 + 8 ], %g1
200af60: 80 a0 60 00 cmp %g1, 0
200af64: 22 80 00 06 be,a 200af7c <IMFS_rmnod+0x28> <== NEVER TAKEN
200af68: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200af6c: 40 00 04 24 call 200bffc <_Chain_Extract>
200af70: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
200af74: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200af78: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1
IMFS_update_ctime( the_jnode );
200af7c: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200af80: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
200af84: 90 07 bf f8 add %fp, -8, %o0
200af88: 40 00 01 24 call 200b418 <gettimeofday>
200af8c: c2 34 20 34 sth %g1, [ %l0 + 0x34 ]
200af90: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
200af94: 90 10 00 10 mov %l0, %o0
200af98: 40 00 01 59 call 200b4fc <rtems_libio_is_file_open>
200af9c: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
200afa0: 80 a2 20 00 cmp %o0, 0
200afa4: 12 80 00 12 bne 200afec <IMFS_rmnod+0x98> <== NEVER TAKEN
200afa8: 01 00 00 00 nop
200afac: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1
200afb0: 80 a0 60 00 cmp %g1, 0
200afb4: 12 80 00 0e bne 200afec <IMFS_rmnod+0x98> <== NEVER TAKEN
200afb8: 03 00 80 6b sethi %hi(0x201ac00), %g1
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
200afbc: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
200afc0: c4 06 40 00 ld [ %i1 ], %g2
200afc4: c6 00 60 04 ld [ %g1 + 4 ], %g3
200afc8: 80 a0 c0 02 cmp %g3, %g2
200afcc: 22 80 00 02 be,a 200afd4 <IMFS_rmnod+0x80> <== NEVER TAKEN
200afd0: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
200afd4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200afd8: 80 a0 60 04 cmp %g1, 4
200afdc: 22 80 00 06 be,a 200aff4 <IMFS_rmnod+0xa0>
200afe0: d0 04 20 50 ld [ %l0 + 0x50 ], %o0
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
200afe4: 40 00 00 9b call 200b250 <free>
200afe8: 90 10 00 10 mov %l0, %o0
}
return 0;
}
200afec: 81 c7 e0 08 ret
200aff0: 91 e8 20 00 restore %g0, 0, %o0
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
200aff4: 80 a2 20 00 cmp %o0, 0
200aff8: 02 bf ff fb be 200afe4 <IMFS_rmnod+0x90> <== NEVER TAKEN
200affc: 01 00 00 00 nop
free( (void*) the_jnode->info.sym_link.name );
200b000: 40 00 00 94 call 200b250 <free>
200b004: 01 00 00 00 nop
200b008: 30 bf ff f7 b,a 200afe4 <IMFS_rmnod+0x90>
0200b02c <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
200b02c: 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;
200b030: c2 06 00 00 ld [ %i0 ], %g1
switch ( the_jnode->type ) {
200b034: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200b038: 80 a0 a0 07 cmp %g2, 7
200b03c: 08 80 00 08 bleu 200b05c <IMFS_stat+0x30> <== ALWAYS TAKEN
200b040: 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 );
200b044: 40 00 0e 3e call 200e93c <__errno> <== NOT EXECUTED
200b048: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b04c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200b050: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b054: 81 c7 e0 08 ret <== NOT EXECUTED
200b058: 81 e8 00 00 restore <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
200b05c: 07 00 80 2c sethi %hi(0x200b000), %g3
200b060: 86 10 e0 0c or %g3, 0xc, %g3 ! 200b00c <IMFS_rmnod+0xb8>
200b064: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
200b068: 81 c0 80 00 jmp %g2
200b06c: 01 00 00 00 nop
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
200b070: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
200b074: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED
*/
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;
200b078: c6 00 60 30 ld [ %g1 + 0x30 ], %g3
buf->st_nlink = the_jnode->st_nlink;
200b07c: c8 10 60 34 lduh [ %g1 + 0x34 ], %g4
*/
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;
200b080: c6 26 60 0c st %g3, [ %i1 + 0xc ]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200b084: c6 00 60 38 ld [ %g1 + 0x38 ], %g3
* 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 );
200b088: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200b08c: c6 26 60 08 st %g3, [ %i1 + 8 ]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
200b090: c6 00 60 40 ld [ %g1 + 0x40 ], %g3
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;
200b094: c8 36 60 10 sth %g4, [ %i1 + 0x10 ]
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
200b098: c6 26 60 28 st %g3, [ %i1 + 0x28 ]
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;
200b09c: c8 10 60 3c lduh [ %g1 + 0x3c ], %g4
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
200b0a0: c6 00 60 44 ld [ %g1 + 0x44 ], %g3
* 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 );
200b0a4: 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;
200b0a8: c8 36 60 12 sth %g4, [ %i1 + 0x12 ]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
200b0ac: c6 26 60 30 st %g3, [ %i1 + 0x30 ]
* 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 );
200b0b0: c4 00 80 00 ld [ %g2 ], %g2
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
200b0b4: c6 00 60 48 ld [ %g1 + 0x48 ], %g3
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;
200b0b8: c2 10 60 3e lduh [ %g1 + 0x3e ], %g1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
200b0bc: c6 26 60 38 st %g3, [ %i1 + 0x38 ]
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;
200b0c0: c2 36 60 14 sth %g1, [ %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 =
200b0c4: c4 26 60 04 st %g2, [ %i1 + 4 ]
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
200b0c8: 03 00 00 3f sethi %hi(0xfc00), %g1
200b0cc: 82 10 63 fe or %g1, 0x3fe, %g1 ! fffe <PROM_START+0xfffe>
200b0d0: c2 26 40 00 st %g1, [ %i1 ]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
200b0d4: 81 c7 e0 08 ret
200b0d8: 91 e8 20 00 restore %g0, 0, %o0
200b0dc: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
200b0e0: 10 bf ff e6 b 200b078 <IMFS_stat+0x4c>
200b0e4: c4 3e 60 18 std %g2, [ %i1 + 0x18 ]
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
200b0e8: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2
break;
200b0ec: 10 bf ff e3 b 200b078 <IMFS_stat+0x4c>
200b0f0: c4 3e 60 20 std %g2, [ %i1 + 0x20 ]
020037b4 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
20037b4: 9d e3 bf 58 save %sp, -168, %sp
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
20037b8: 40 00 46 ec call 2015368 <strlen>
20037bc: 90 10 00 1a mov %i2, %o0
20037c0: 96 07 bf fc add %fp, -4, %o3
20037c4: 92 10 00 08 mov %o0, %o1
20037c8: a0 07 bf b8 add %fp, -72, %l0
20037cc: 90 10 00 1a mov %i2, %o0
20037d0: 40 00 33 af call 201068c <IMFS_get_token>
20037d4: 94 10 00 10 mov %l0, %o2
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
20037d8: 40 00 46 cf call 2015314 <strdup>
20037dc: 90 10 00 19 mov %i1, %o0
if (info.sym_link.name == NULL) {
20037e0: 80 a2 20 00 cmp %o0, 0
20037e4: 02 80 00 15 be 2003838 <IMFS_symlink+0x84> <== NEVER TAKEN
20037e8: d0 27 bf e0 st %o0, [ %fp + -32 ]
* 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.
*/
new_node = IMFS_create_node(
20037ec: 90 10 00 18 mov %i0, %o0
20037f0: 94 10 00 10 mov %l0, %o2
20037f4: 92 10 20 04 mov 4, %o1
20037f8: 17 00 00 28 sethi %hi(0xa000), %o3
20037fc: 98 07 bf e0 add %fp, -32, %o4
2003800: 96 12 e1 ff or %o3, 0x1ff, %o3
2003804: 40 00 30 1e call 200f87c <IMFS_create_node>
2003808: b0 10 20 00 clr %i0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
200380c: 80 a2 20 00 cmp %o0, 0
2003810: 12 80 00 08 bne 2003830 <IMFS_symlink+0x7c> <== ALWAYS TAKEN
2003814: d0 07 bf e0 ld [ %fp + -32 ], %o0
free(info.sym_link.name);
2003818: 40 00 01 df call 2003f94 <free> <== NOT EXECUTED
200381c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
2003820: 40 00 43 33 call 20144ec <__errno> <== NOT EXECUTED
2003824: 01 00 00 00 nop <== NOT EXECUTED
2003828: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
200382c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2003830: 81 c7 e0 08 ret
2003834: 81 e8 00 00 restore
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
if (info.sym_link.name == NULL) {
rtems_set_errno_and_return_minus_one(ENOMEM);
2003838: 40 00 43 2d call 20144ec <__errno> <== NOT EXECUTED
200383c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003840: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2003844: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003848: 81 c7 e0 08 ret <== NOT EXECUTED
200384c: 81 e8 00 00 restore <== NOT EXECUTED
02003850 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
2003850: 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;
2003854: e0 06 40 00 ld [ %i1 ], %l0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
2003858: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200385c: 80 a0 60 03 cmp %g1, 3
2003860: 02 80 00 09 be 2003884 <IMFS_unlink+0x34>
2003864: a2 10 00 18 mov %i0, %l1
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
2003868: c2 06 60 08 ld [ %i1 + 8 ], %g1
200386c: 90 10 00 11 mov %l1, %o0
2003870: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2003874: 9f c0 40 00 call %g1
2003878: 92 10 00 19 mov %i1, %o1
return result;
}
200387c: 81 c7 e0 08 ret
2003880: 91 e8 00 08 restore %g0, %o0, %o0
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
2003884: c2 04 20 50 ld [ %l0 + 0x50 ], %g1
2003888: 80 a0 60 00 cmp %g1, 0
200388c: 02 80 00 25 be 2003920 <IMFS_unlink+0xd0> <== NEVER TAKEN
2003890: a4 07 bf e4 add %fp, -28, %l2
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
2003894: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2003898: da 06 60 04 ld [ %i1 + 4 ], %o5
200389c: c8 06 60 08 ld [ %i1 + 8 ], %g4
20038a0: c6 06 60 0c ld [ %i1 + 0xc ], %g3
20038a4: c4 27 bf f4 st %g2, [ %fp + -12 ]
the_link.node_access = node->info.hard_link.link_node;
20038a8: 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;
20038ac: da 27 bf e8 st %o5, [ %fp + -24 ]
20038b0: c8 27 bf ec st %g4, [ %fp + -20 ]
20038b4: c6 27 bf f0 st %g3, [ %fp + -16 ]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
20038b8: 40 00 30 3e call 200f9b0 <IMFS_Set_handlers>
20038bc: 90 10 00 12 mov %l2, %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)
20038c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1
20038c4: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2
20038c8: 80 a0 a0 01 cmp %g2, 1
20038cc: 02 80 00 0a be 20038f4 <IMFS_unlink+0xa4>
20038d0: 86 00 bf ff add %g2, -1, %g3
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
20038d4: 90 07 bf f8 add %fp, -8, %o0
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
20038d8: c6 30 60 34 sth %g3, [ %g1 + 0x34 ]
IMFS_update_ctime( node->info.hard_link.link_node );
20038dc: 40 00 01 d9 call 2004040 <gettimeofday>
20038e0: 92 10 20 00 clr %o1
20038e4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1
20038e8: c4 07 bf f8 ld [ %fp + -8 ], %g2
20038ec: 10 bf ff df b 2003868 <IMFS_unlink+0x18>
20038f0: c4 20 60 48 st %g2, [ %g1 + 0x48 ]
* 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 );
20038f4: c2 07 bf ec ld [ %fp + -20 ], %g1
20038f8: 90 10 00 18 mov %i0, %o0
20038fc: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2003900: 92 10 00 12 mov %l2, %o1
2003904: 9f c0 40 00 call %g1
2003908: b0 10 3f ff mov -1, %i0
if ( result != 0 )
200390c: 80 a2 20 00 cmp %o0, 0
2003910: 22 bf ff d7 be,a 200386c <IMFS_unlink+0x1c>
2003914: c2 06 60 08 ld [ %i1 + 8 ], %g1
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
2003918: 81 c7 e0 08 ret
200391c: 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 );
2003920: 40 00 42 f3 call 20144ec <__errno> <== NOT EXECUTED
2003924: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003928: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200392c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003930: 81 c7 e0 08 ret <== NOT EXECUTED
2003934: 81 e8 00 00 restore <== NOT EXECUTED
02003938 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2003938: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
200393c: c2 06 20 08 ld [ %i0 + 8 ], %g1
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2003940: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
2003944: 80 a0 a0 01 cmp %g2, 1
2003948: 12 80 00 09 bne 200396c <IMFS_unmount+0x34> <== NEVER TAKEN
200394c: 01 00 00 00 nop
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
2003950: c4 00 60 5c ld [ %g1 + 0x5c ], %g2
2003954: 80 a0 a0 00 cmp %g2, 0
2003958: 02 80 00 0b be 2003984 <IMFS_unmount+0x4c> <== NEVER TAKEN
200395c: 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;
2003960: c0 20 60 5c clr [ %g1 + 0x5c ]
return 0;
}
2003964: 81 c7 e0 08 ret
2003968: 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 );
200396c: 40 00 42 e0 call 20144ec <__errno> <== NOT EXECUTED
2003970: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003974: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2003978: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200397c: 81 c7 e0 08 ret <== NOT EXECUTED
2003980: 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 */
2003984: 40 00 42 da call 20144ec <__errno> <== NOT EXECUTED
2003988: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200398c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003990: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003994: 81 c7 e0 08 ret <== NOT EXECUTED
2003998: 81 e8 00 00 restore <== NOT EXECUTED
02002938 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
2002938: 9d e3 bf a0 save %sp, -96, %sp
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
200293c: 03 00 80 6c sethi %hi(0x201b000), %g1
2002940: c2 00 61 a8 ld [ %g1 + 0x1a8 ], %g1 ! 201b1a8 <rtems_malloc_statistics_helpers>
2002944: 80 a0 60 00 cmp %g1, 0
2002948: 02 80 00 05 be 200295c <RTEMS_Malloc_Initialize+0x24> <== ALWAYS TAKEN
200294c: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->initialize)();
2002950: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2002954: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002958: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
200295c: 40 00 23 9a call 200b7c4 <malloc_deferred_frees_initialize>
2002960: 01 00 00 00 nop
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
2002964: 03 00 80 6c sethi %hi(0x201b000), %g1
2002968: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 201b1ac <rtems_malloc_sbrk_helpers>
200296c: 80 a0 60 00 cmp %g1, 0
2002970: 02 80 00 08 be 2002990 <RTEMS_Malloc_Initialize+0x58> <== ALWAYS TAKEN
2002974: 90 10 00 18 mov %i0, %o0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2002978: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
200297c: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2002980: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002984: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2002988: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200298c: b2 26 40 08 sub %i1, %o0, %i1 <== NOT EXECUTED
* 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 (
2002990: 23 00 80 6c sethi %hi(0x201b000), %l1
2002994: c2 0c 61 a5 ldub [ %l1 + 0x1a5 ], %g1 ! 201b1a5 <rtems_unified_work_area>
2002998: 80 a0 60 00 cmp %g1, 0
200299c: 12 80 00 10 bne 20029dc <RTEMS_Malloc_Initialize+0xa4>
20029a0: 21 00 80 6a sethi %hi(0x201a800), %l0
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
20029a4: 03 00 80 6a sethi %hi(0x201a800), %g1
20029a8: c2 08 63 a0 ldub [ %g1 + 0x3a0 ], %g1 ! 201aba0 <Configuration+0x28>
20029ac: 80 a0 60 00 cmp %g1, 0
20029b0: 12 80 00 13 bne 20029fc <RTEMS_Malloc_Initialize+0xc4>
20029b4: 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 );
20029b8: 21 00 80 6a sethi %hi(0x201a800), %l0
20029bc: d0 04 22 d0 ld [ %l0 + 0x2d0 ], %o0 ! 201aad0 <RTEMS_Malloc_Heap>
20029c0: 92 10 00 18 mov %i0, %o1
20029c4: 94 10 00 19 mov %i1, %o2
20029c8: 40 00 11 59 call 2006f2c <_Heap_Initialize>
20029cc: 96 10 20 08 mov 8, %o3
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
20029d0: 80 a2 20 00 cmp %o0, 0
20029d4: 02 80 00 13 be 2002a20 <RTEMS_Malloc_Initialize+0xe8> <== NEVER TAKEN
20029d8: 01 00 00 00 nop
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
20029dc: d0 04 22 d0 ld [ %l0 + 0x2d0 ], %o0
20029e0: 21 00 80 6d sethi %hi(0x201b400), %l0
20029e4: 40 00 14 92 call 2007c2c <_Protected_heap_Get_size>
20029e8: e2 04 20 50 ld [ %l0 + 0x50 ], %l1 ! 201b450 <rtems_malloc_statistics>
20029ec: 90 02 00 11 add %o0, %l1, %o0
20029f0: d0 24 20 50 st %o0, [ %l0 + 0x50 ]
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
20029f4: 81 c7 e0 08 ret
20029f8: 81 e8 00 00 restore
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
20029fc: 92 10 20 00 clr %o1
2002a00: 40 00 32 4a call 200f328 <memset>
2002a04: 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 ) {
2002a08: c2 0c 61 a5 ldub [ %l1 + 0x1a5 ], %g1
2002a0c: 80 a0 60 00 cmp %g1, 0
2002a10: 22 bf ff eb be,a 20029bc <RTEMS_Malloc_Initialize+0x84> <== ALWAYS TAKEN
2002a14: 21 00 80 6a sethi %hi(0x201a800), %l0
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
2002a18: 10 bf ff f2 b 20029e0 <RTEMS_Malloc_Initialize+0xa8> <== NOT EXECUTED
2002a1c: d0 04 22 d0 ld [ %l0 + 0x2d0 ], %o0 ! 201aad0 <RTEMS_Malloc_Heap><== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
2002a20: 40 00 0f 26 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002a24: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED
020021f8 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
20021f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
20021fc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2002200: 02 80 00 3b be 20022ec <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
2002204: 27 00 80 6c sethi %hi(0x201b000), %l3 <== NOT EXECUTED
return;
if ( !print_handler )
2002208: e8 04 e3 f0 ld [ %l3 + 0x3f0 ], %l4 ! 201b3f0 <print_handler><== NOT EXECUTED
200220c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
2002210: 02 80 00 37 be 20022ec <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
2002214: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
2002218: 02 80 00 3e be 2002310 <Stack_check_Dump_threads_usage+0x118><== NOT EXECUTED
200221c: a4 06 20 c0 add %i0, 0xc0, %l2 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
2002220: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2002224: e2 04 80 00 ld [ %l2 ], %l1 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
2002228: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
200222c: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
2002230: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
2002234: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
2002238: 7f ff ff d8 call 2002198 <Stack_check_find_high_water_mark><== NOT EXECUTED
200223c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
if ( high_water_mark )
2002240: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
2002244: a0 05 40 11 add %l5, %l1, %l0 <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
2002248: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
200224c: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
2002250: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2002254: 02 80 00 44 be 2002364 <Stack_check_Dump_threads_usage+0x16c><== NOT EXECUTED
2002258: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED
(*print_handler)(
200225c: ee 06 20 08 ld [ %i0 + 8 ], %l7 <== NOT EXECUTED
2002260: 2b 00 80 6c sethi %hi(0x201b000), %l5 <== NOT EXECUTED
2002264: fa 05 63 ec ld [ %l5 + 0x3ec ], %i5 ! 201b3ec <print_context><== NOT EXECUTED
2002268: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
200226c: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
2002270: 40 00 0f 96 call 20060c8 <rtems_object_get_name> <== NOT EXECUTED
2002274: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
2002278: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
200227c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2002280: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED
2002284: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2002288: 9f c5 00 00 call %l4 <== NOT EXECUTED
200228c: 92 12 60 e0 or %o1, 0xe0, %o1 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
2002290: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED
2002294: c2 04 e3 f0 ld [ %l3 + 0x3f0 ], %g1 <== NOT EXECUTED
2002298: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED
200229c: d0 05 63 ec ld [ %l5 + 0x3ec ], %o0 <== NOT EXECUTED
20022a0: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED
20022a4: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED
20022a8: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED
20022ac: 9a 10 00 11 mov %l1, %o5 <== NOT EXECUTED
20022b0: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
20022b4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20022b8: 92 12 61 00 or %o1, 0x100, %o1 ! 2019d00 <rtems_filesystem_mount_table_size+0x380><== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20022bc: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
20022c0: c4 00 63 e8 ld [ %g1 + 0x3e8 ], %g2 ! 201b3e8 <Stack_check_Initialized><== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
20022c4: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20022c8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20022cc: 02 80 00 0a be 20022f4 <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
20022d0: 05 00 80 6c sethi %hi(0x201b000), %g2 <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
20022d4: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 <== NOT EXECUTED
20022d8: d0 00 a3 ec ld [ %g2 + 0x3ec ], %o0 <== NOT EXECUTED
20022dc: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
20022e0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
20022e4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20022e8: 92 12 61 30 or %o1, 0x130, %o1 <== NOT EXECUTED
20022ec: 81 c7 e0 08 ret <== NOT EXECUTED
20022f0: 81 e8 00 00 restore <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
20022f4: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 <== NOT EXECUTED
20022f8: d0 00 a3 ec ld [ %g2 + 0x3ec ], %o0 <== NOT EXECUTED
20022fc: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
2002300: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002304: 92 12 61 20 or %o1, 0x120, %o1 ! 2019d20 <rtems_filesystem_mount_table_size+0x3a0><== NOT EXECUTED
2002308: 81 c7 e0 08 ret <== NOT EXECUTED
200230c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
2002310: 25 00 80 6d sethi %hi(0x201b400), %l2 <== NOT EXECUTED
2002314: a4 14 a2 8c or %l2, 0x28c, %l2 ! 201b68c <Stack_check_Interrupt_stack><== NOT EXECUTED
2002318: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED
200231c: ac 10 20 00 clr %l6 <== NOT EXECUTED
2002320: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002324: 02 bf ff f2 be 20022ec <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
2002328: b0 10 20 00 clr %i0 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
200232c: ea 04 a0 04 ld [ %l2 + 4 ], %l5 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2002330: e2 04 80 00 ld [ %l2 ], %l1 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
2002334: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2002338: a2 04 7f f0 add %l1, -16, %l1 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
200233c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
2002340: 7f ff ff 96 call 2002198 <Stack_check_find_high_water_mark><== NOT EXECUTED
2002344: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
if ( high_water_mark )
2002348: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
200234c: a0 05 40 11 add %l5, %l1, %l0 <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
2002350: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
2002354: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
2002358: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200235c: 12 bf ff c0 bne 200225c <Stack_check_Dump_threads_usage+0x64><== NOT EXECUTED
2002360: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
2002364: 2b 00 80 6c sethi %hi(0x201b000), %l5 <== NOT EXECUTED
2002368: d0 05 63 ec ld [ %l5 + 0x3ec ], %o0 ! 201b3ec <print_context><== NOT EXECUTED
200236c: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
2002370: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
2002374: 9f c5 00 00 call %l4 <== NOT EXECUTED
2002378: 92 12 60 f0 or %o1, 0xf0, %o1 <== NOT EXECUTED
}
(*print_handler)(
200237c: 10 bf ff c6 b 2002294 <Stack_check_Dump_threads_usage+0x9c><== NOT EXECUTED
2002380: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED
02002598 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
2002598: 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)
200259c: 21 00 80 6c sethi %hi(0x201b000), %l0
20025a0: c2 04 23 e8 ld [ %l0 + 0x3e8 ], %g1 ! 201b3e8 <Stack_check_Initialized>
20025a4: 80 a0 60 00 cmp %g1, 0
20025a8: 12 80 00 20 bne 2002628 <Stack_check_Initialize+0x90>
20025ac: 1b 00 80 6d sethi %hi(0x201b400), %o5
20025b0: 09 00 80 67 sethi %hi(0x2019c00), %g4
20025b4: 9a 13 62 7c or %o5, 0x27c, %o5
20025b8: 88 11 22 88 or %g4, 0x288, %g4
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
20025bc: 84 08 60 03 and %g1, 3, %g2
20025c0: 85 28 a0 02 sll %g2, 2, %g2
20025c4: c6 01 00 02 ld [ %g4 + %g2 ], %g3
20025c8: 85 28 60 02 sll %g1, 2, %g2
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
20025cc: 82 00 60 01 inc %g1
20025d0: 80 a0 60 04 cmp %g1, 4
20025d4: 12 bf ff fa bne 20025bc <Stack_check_Initialize+0x24>
20025d8: c6 23 40 02 st %g3, [ %o5 + %g2 ]
/*
* 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) {
20025dc: 03 00 80 6e sethi %hi(0x201b800), %g1
20025e0: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201b870 <_CPU_Interrupt_stack_low>
20025e4: 80 a0 60 00 cmp %g1, 0
20025e8: 02 80 00 0e be 2002620 <Stack_check_Initialize+0x88> <== NEVER TAKEN
20025ec: 05 00 80 6d sethi %hi(0x201b400), %g2
20025f0: c6 00 a3 bc ld [ %g2 + 0x3bc ], %g3 ! 201b7bc <_CPU_Interrupt_stack_high>
20025f4: 80 a0 e0 00 cmp %g3, 0
20025f8: 02 80 00 0a be 2002620 <Stack_check_Initialize+0x88> <== NEVER TAKEN
20025fc: 86 20 c0 01 sub %g3, %g1, %g3
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002600: 05 00 80 6d sethi %hi(0x201b400), %g2
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
2002604: c6 20 a2 8c st %g3, [ %g2 + 0x28c ] ! 201b68c <Stack_check_Interrupt_stack>
* 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;
2002608: 84 10 a2 8c or %g2, 0x28c, %g2
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
200260c: 90 10 00 01 mov %g1, %o0
2002610: 94 10 00 03 mov %g3, %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;
2002614: c2 20 a0 04 st %g1, [ %g2 + 4 ]
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2002618: 40 00 33 d3 call 200f564 <memset>
200261c: 92 10 20 a5 mov 0xa5, %o1
}
#endif
Stack_check_Initialized = 1;
2002620: 82 10 20 01 mov 1, %g1
2002624: c2 24 23 e8 st %g1, [ %l0 + 0x3e8 ]
2002628: 81 c7 e0 08 ret
200262c: 81 e8 00 00 restore
02002198 <Stack_check_find_high_water_mark>:
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
2002198: 82 02 20 10 add %o0, 0x10, %g1 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
200219c: 86 0a 7f fc and %o1, -4, %g3 <== NOT EXECUTED
20021a0: 86 00 40 03 add %g1, %g3, %g3 <== NOT EXECUTED
20021a4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
20021a8: 1a 80 00 10 bcc 20021e8 <Stack_check_find_high_water_mark+0x50><== NOT EXECUTED
20021ac: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 <== NOT EXECUTED
if (*base != U32_PATTERN)
20021b0: c8 02 20 10 ld [ %o0 + 0x10 ], %g4 <== NOT EXECUTED
20021b4: 84 10 a1 a5 or %g2, 0x1a5, %g2 <== NOT EXECUTED
20021b8: 80 a1 00 02 cmp %g4, %g2 <== NOT EXECUTED
20021bc: 22 80 00 08 be,a 20021dc <Stack_check_find_high_water_mark+0x44><== NOT EXECUTED
20021c0: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED
return (void *) base;
20021c4: 81 c3 e0 08 retl <== NOT EXECUTED
20021c8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
20021cc: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED
20021d0: 12 80 00 08 bne 20021f0 <Stack_check_find_high_water_mark+0x58><== NOT EXECUTED
20021d4: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
20021d8: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED
20021dc: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
20021e0: 38 bf ff fb bgu,a 20021cc <Stack_check_find_high_water_mark+0x34><== NOT EXECUTED
20021e4: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
20021e8: 81 c3 e0 08 retl <== NOT EXECUTED
20021ec: 90 10 20 00 clr %o0 <== NOT EXECUTED
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
20021f0: 81 c3 e0 08 retl <== NOT EXECUTED
020023f8 <Stack_check_report_blown_task>:
*
* NOTE: The system is in a questionable state... we may not get
* the following message out.
*/
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
20023f8: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
20023fc: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
* the following message out.
*/
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_area(stack);
2002400: e0 06 20 c4 ld [ %i0 + 0xc4 ], %l0 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
2002404: 40 00 05 2f call 20038c0 <printk> <== NOT EXECUTED
2002408: 90 12 21 a0 or %o0, 0x1a0, %o0 <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
200240c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2002410: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002414: 40 00 05 2b call 20038c0 <printk> <== NOT EXECUTED
2002418: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 2019db0 <rtems_filesystem_mount_table_size+0x430><== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
200241c: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED
2002420: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002424: 40 00 05 27 call 20038c0 <printk> <== NOT EXECUTED
2002428: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 2019dd0 <rtems_filesystem_mount_table_size+0x450><== NOT EXECUTED
printk(
200242c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED
2002430: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002434: 40 00 05 23 call 20038c0 <printk> <== NOT EXECUTED
2002438: 90 12 21 e8 or %o0, 0x1e8, %o0 ! 2019de8 <rtems_filesystem_mount_table_size+0x468><== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
200243c: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED
2002440: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
2002444: 40 00 0f 21 call 20060c8 <rtems_object_get_name> <== NOT EXECUTED
2002448: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED
200244c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2002450: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002454: 40 00 05 1b call 20038c0 <printk> <== NOT EXECUTED
2002458: 90 12 22 00 or %o0, 0x200, %o0 ! 2019e00 <rtems_filesystem_mount_table_size+0x480><== NOT EXECUTED
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
200245c: d2 06 20 c0 ld [ %i0 + 0xc0 ], %o1 <== NOT EXECUTED
2002460: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED
2002464: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2002468: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED
200246c: 40 00 05 15 call 20038c0 <printk> <== NOT EXECUTED
2002470: 90 12 22 18 or %o0, 0x218, %o0 <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
2002474: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
2002478: 02 80 00 04 be 2002488 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
200247c: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
2002480: 40 00 11 4c call 20069b0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002484: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
2002488: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200248c: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED
2002490: 90 12 22 50 or %o0, 0x250, %o0 <== NOT EXECUTED
2002494: 40 00 05 0b call 20038c0 <printk> <== NOT EXECUTED
2002498: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED
200249c: 30 bf ff f9 b,a 2002480 <Stack_check_report_blown_task+0x88><== NOT EXECUTED
02006878 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2006878: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
200687c: 23 00 80 6e sethi %hi(0x201b800), %l1
2006880: e0 04 60 54 ld [ %l1 + 0x54 ], %l0 ! 201b854 <_API_extensions_List>
2006884: a2 14 60 54 or %l1, 0x54, %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2006888: a2 04 60 04 add %l1, 4, %l1
200688c: 80 a4 00 11 cmp %l0, %l1
2006890: 02 80 00 09 be 20068b4 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
2006894: 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)();
2006898: c2 04 20 08 ld [ %l0 + 8 ], %g1
200689c: 9f c0 40 00 call %g1
20068a0: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
20068a4: e0 04 00 00 ld [ %l0 ], %l0
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
20068a8: 80 a4 00 11 cmp %l0, %l1
20068ac: 32 bf ff fc bne,a 200689c <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
20068b0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED
20068b4: 81 c7 e0 08 ret
20068b8: 81 e8 00 00 restore
020068bc <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
20068bc: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
20068c0: 23 00 80 6e sethi %hi(0x201b800), %l1
20068c4: e0 04 60 54 ld [ %l1 + 0x54 ], %l0 ! 201b854 <_API_extensions_List>
20068c8: a2 14 60 54 or %l1, 0x54, %l1
20068cc: a2 04 60 04 add %l1, 4, %l1
20068d0: 80 a4 00 11 cmp %l0, %l1
20068d4: 02 80 00 0a be 20068fc <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
20068d8: 25 00 80 6d sethi %hi(0x201b400), %l2
20068dc: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_Thread_Executing>
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
20068e0: c2 04 20 0c ld [ %l0 + 0xc ], %g1
20068e4: 9f c0 40 00 call %g1
20068e8: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
20068ec: e0 04 00 00 ld [ %l0 ], %l0
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
20068f0: 80 a4 00 11 cmp %l0, %l1
20068f4: 32 bf ff fc bne,a 20068e4 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN
20068f8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
20068fc: 81 c7 e0 08 ret
2006900: 81 e8 00 00 restore
02017270 <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
2017270: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
2017274: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
2017278: a0 10 00 18 mov %i0, %l0
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
201727c: 80 a0 40 1a cmp %g1, %i2
2017280: 0a 80 00 17 bcs 20172dc <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
2017284: b0 10 20 01 mov 1, %i0
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
2017288: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
201728c: 80 a0 60 00 cmp %g1, 0
2017290: 02 80 00 0a be 20172b8 <_CORE_message_queue_Broadcast+0x48>
2017294: a4 10 20 00 clr %l2
*count = 0;
2017298: c0 27 40 00 clr [ %i5 ]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
201729c: 81 c7 e0 08 ret
20172a0: 91 e8 20 00 restore %g0, 0, %o0
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
20172a4: d0 04 60 2c ld [ %l1 + 0x2c ], %o0
20172a8: 40 00 25 0e call 20206e0 <memcpy>
20172ac: a4 04 a0 01 inc %l2
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
20172b0: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
20172b4: f4 20 40 00 st %i2, [ %g1 ]
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
20172b8: 40 00 0a 88 call 2019cd8 <_Thread_queue_Dequeue>
20172bc: 90 10 00 10 mov %l0, %o0
20172c0: 92 10 00 19 mov %i1, %o1
20172c4: a2 10 00 08 mov %o0, %l1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
20172c8: 80 a2 20 00 cmp %o0, 0
20172cc: 12 bf ff f6 bne 20172a4 <_CORE_message_queue_Broadcast+0x34>
20172d0: 94 10 00 1a mov %i2, %o2
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
20172d4: e4 27 40 00 st %l2, [ %i5 ]
20172d8: b0 10 20 00 clr %i0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
20172dc: 81 c7 e0 08 ret
20172e0: 81 e8 00 00 restore
02010c38 <_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
)
{
2010c38: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
2010c3c: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
2010c40: 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;
2010c44: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
2010c48: 80 8e e0 03 btst 3, %i3
2010c4c: 02 80 00 09 be 2010c70 <_CORE_message_queue_Initialize+0x38>
2010c50: a2 10 00 1b mov %i3, %l1
allocated_message_size += sizeof(uint32_t);
2010c54: a2 06 e0 04 add %i3, 4, %l1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
2010c58: a2 0c 7f fc and %l1, -4, %l1
}
if (allocated_message_size < maximum_message_size)
2010c5c: 80 a6 c0 11 cmp %i3, %l1
2010c60: 08 80 00 05 bleu 2010c74 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN
2010c64: a0 04 60 10 add %l1, 0x10, %l0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2010c68: 81 c7 e0 08 ret
2010c6c: 91 e8 20 00 restore %g0, 0, %o0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
2010c70: a0 04 60 10 add %l1, 0x10, %l0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
2010c74: 92 10 00 1a mov %i2, %o1
2010c78: 40 00 4d 33 call 2024144 <.umul>
2010c7c: 90 10 00 10 mov %l0, %o0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
2010c80: 80 a2 00 11 cmp %o0, %l1
2010c84: 0a bf ff f9 bcs 2010c68 <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN
2010c88: 01 00 00 00 nop
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
2010c8c: 40 00 0c 63 call 2013e18 <_Workspace_Allocate>
2010c90: 01 00 00 00 nop
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
2010c94: 80 a2 20 00 cmp %o0, 0
2010c98: 02 bf ff f4 be 2010c68 <_CORE_message_queue_Initialize+0x30>
2010c9c: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
2010ca0: 92 10 00 08 mov %o0, %o1
2010ca4: 94 10 00 1a mov %i2, %o2
2010ca8: 90 06 20 60 add %i0, 0x60, %o0
2010cac: 40 00 15 8b call 20162d8 <_Chain_Initialize>
2010cb0: 96 10 00 10 mov %l0, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2010cb4: c2 06 40 00 ld [ %i1 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2010cb8: c0 26 20 54 clr [ %i0 + 0x54 ]
2010cbc: 82 18 60 01 xor %g1, 1, %g1
2010cc0: 80 a0 00 01 cmp %g0, %g1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2010cc4: 82 06 20 54 add %i0, 0x54, %g1
2010cc8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2010ccc: 82 06 20 50 add %i0, 0x50, %g1
2010cd0: 90 10 00 18 mov %i0, %o0
2010cd4: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
2010cd8: 92 60 3f ff subx %g0, -1, %o1
2010cdc: 94 10 20 80 mov 0x80, %o2
2010ce0: 96 10 20 06 mov 6, %o3
2010ce4: 40 00 09 07 call 2013100 <_Thread_queue_Initialize>
2010ce8: b0 10 20 01 mov 1, %i0
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
2010cec: 81 c7 e0 08 ret
2010cf0: 81 e8 00 00 restore
02006bb0 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
2006bb0: 9d e3 bf a0 save %sp, -96, %sp
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
2006bb4: 21 00 80 6d sethi %hi(0x201b400), %l0
2006bb8: c2 04 22 10 ld [ %l0 + 0x210 ], %g1 ! 201b610 <_Thread_Dispatch_disable_level>
2006bbc: 80 a0 60 00 cmp %g1, 0
2006bc0: 02 80 00 05 be 2006bd4 <_CORE_mutex_Seize+0x24>
2006bc4: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2006bc8: 80 8e a0 ff btst 0xff, %i2
2006bcc: 12 80 00 1a bne 2006c34 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN
2006bd0: 03 00 80 6d sethi %hi(0x201b400), %g1
2006bd4: 90 10 00 18 mov %i0, %o0
2006bd8: 40 00 15 34 call 200c0a8 <_CORE_mutex_Seize_interrupt_trylock>
2006bdc: 92 07 a0 54 add %fp, 0x54, %o1
2006be0: 80 a2 20 00 cmp %o0, 0
2006be4: 02 80 00 12 be 2006c2c <_CORE_mutex_Seize+0x7c>
2006be8: 80 8e a0 ff btst 0xff, %i2
2006bec: 02 80 00 1a be 2006c54 <_CORE_mutex_Seize+0xa4>
2006bf0: 01 00 00 00 nop
2006bf4: c4 04 22 10 ld [ %l0 + 0x210 ], %g2
2006bf8: 03 00 80 6d sethi %hi(0x201b400), %g1
2006bfc: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing>
2006c00: f2 20 60 20 st %i1, [ %g1 + 0x20 ]
2006c04: f0 20 60 44 st %i0, [ %g1 + 0x44 ]
2006c08: 82 00 a0 01 add %g2, 1, %g1
2006c0c: c2 24 22 10 st %g1, [ %l0 + 0x210 ]
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;
2006c10: 82 10 20 01 mov 1, %g1
2006c14: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
2006c18: 7f ff ed a9 call 20022bc <sparc_enable_interrupts>
2006c1c: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
2006c20: 90 10 00 18 mov %i0, %o0
2006c24: 7f ff ff c0 call 2006b24 <_CORE_mutex_Seize_interrupt_blocking>
2006c28: 92 10 00 1b mov %i3, %o1
2006c2c: 81 c7 e0 08 ret
2006c30: 81 e8 00 00 restore
2006c34: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
2006c38: 80 a0 60 01 cmp %g1, 1
2006c3c: 28 bf ff e7 bleu,a 2006bd8 <_CORE_mutex_Seize+0x28>
2006c40: 90 10 00 18 mov %i0, %o0
2006c44: 90 10 20 00 clr %o0
2006c48: 92 10 20 00 clr %o1
2006c4c: 40 00 01 a6 call 20072e4 <_Internal_error_Occurred>
2006c50: 94 10 20 13 mov 0x13, %o2
2006c54: 7f ff ed 9a call 20022bc <sparc_enable_interrupts>
2006c58: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
2006c5c: 03 00 80 6d sethi %hi(0x201b400), %g1
2006c60: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing>
2006c64: 84 10 20 01 mov 1, %g2
2006c68: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
2006c6c: 81 c7 e0 08 ret
2006c70: 81 e8 00 00 restore
0200c0a8 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
200c0a8: 9d e3 bf a0 save %sp, -96, %sp
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
200c0ac: 03 00 80 6d sethi %hi(0x201b400), %g1
200c0b0: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
200c0b4: c0 20 60 34 clr [ %g1 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
200c0b8: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
200c0bc: 80 a0 a0 00 cmp %g2, 0
200c0c0: 22 80 00 13 be,a 200c10c <_CORE_mutex_Seize_interrupt_trylock+0x64>
200c0c4: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
the_mutex->lock = CORE_MUTEX_LOCKED;
200c0c8: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200c0cc: c6 00 60 08 ld [ %g1 + 8 ], %g3
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
200c0d0: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200c0d4: c6 26 20 60 st %g3, [ %i0 + 0x60 ]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
200c0d8: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
200c0dc: 86 10 20 01 mov 1, %g3
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200c0e0: 80 a0 a0 02 cmp %g2, 2
200c0e4: 02 80 00 0f be 200c120 <_CORE_mutex_Seize_interrupt_trylock+0x78>
200c0e8: c6 26 20 54 st %g3, [ %i0 + 0x54 ]
200c0ec: 80 a0 a0 03 cmp %g2, 3
200c0f0: 22 80 00 1f be,a 200c16c <_CORE_mutex_Seize_interrupt_trylock+0xc4>
200c0f4: da 00 60 1c ld [ %g1 + 0x1c ], %o5
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
200c0f8: d0 06 40 00 ld [ %i1 ], %o0
200c0fc: 7f ff d8 70 call 20022bc <sparc_enable_interrupts>
200c100: b0 10 20 00 clr %i0
200c104: 81 c7 e0 08 ret
200c108: 81 e8 00 00 restore
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
200c10c: 80 a0 40 02 cmp %g1, %g2
200c110: 22 80 00 0c be,a 200c140 <_CORE_mutex_Seize_interrupt_trylock+0x98>
200c114: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
200c118: 81 c7 e0 08 ret
200c11c: 91 e8 20 01 restore %g0, 1, %o0
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200c120: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
200c124: 84 00 a0 01 inc %g2
200c128: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
200c12c: d0 06 40 00 ld [ %i1 ], %o0
200c130: 7f ff d8 63 call 20022bc <sparc_enable_interrupts>
200c134: b0 10 20 00 clr %i0
200c138: 81 c7 e0 08 ret
200c13c: 81 e8 00 00 restore
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200c140: 80 a0 a0 00 cmp %g2, 0
200c144: 12 80 00 2b bne 200c1f0 <_CORE_mutex_Seize_interrupt_trylock+0x148>
200c148: 80 a0 a0 01 cmp %g2, 1
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
200c14c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
200c150: 82 00 60 01 inc %g1
200c154: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( *level_p );
200c158: d0 06 40 00 ld [ %i1 ], %o0
200c15c: 7f ff d8 58 call 20022bc <sparc_enable_interrupts>
200c160: b0 10 20 00 clr %i0
200c164: 81 c7 e0 08 ret
200c168: 81 e8 00 00 restore
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
200c16c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200c170: 88 03 60 01 add %o5, 1, %g4
200c174: c8 20 60 1c st %g4, [ %g1 + 0x1c ]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
200c178: c8 06 20 4c ld [ %i0 + 0x4c ], %g4
current = executing->current_priority;
if ( current == ceiling ) {
200c17c: 80 a1 00 02 cmp %g4, %g2
200c180: 02 80 00 24 be 200c210 <_CORE_mutex_Seize_interrupt_trylock+0x168>
200c184: 01 00 00 00 nop
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
200c188: 1a 80 00 11 bcc 200c1cc <_CORE_mutex_Seize_interrupt_trylock+0x124>
200c18c: 84 10 20 06 mov 6, %g2 ! 6 <PROM_START+0x6>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200c190: 03 00 80 6d sethi %hi(0x201b400), %g1
200c194: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level>
200c198: 84 00 a0 01 inc %g2
200c19c: c4 20 62 10 st %g2, [ %g1 + 0x210 ]
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
200c1a0: 7f ff d8 47 call 20022bc <sparc_enable_interrupts>
200c1a4: d0 06 40 00 ld [ %i1 ], %o0
_Thread_Change_priority(
200c1a8: d2 06 20 4c ld [ %i0 + 0x4c ], %o1
200c1ac: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
200c1b0: 94 10 20 00 clr %o2
200c1b4: 7f ff ee b7 call 2007c90 <_Thread_Change_priority>
200c1b8: b0 10 20 00 clr %i0
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
200c1bc: 7f ff f0 53 call 2008308 <_Thread_Enable_dispatch>
200c1c0: 01 00 00 00 nop
200c1c4: 81 c7 e0 08 ret
200c1c8: 81 e8 00 00 restore
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
200c1cc: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200c1d0: c6 26 20 50 st %g3, [ %i0 + 0x50 ]
the_mutex->nest_count = 0; /* undo locking above */
200c1d4: c0 26 20 54 clr [ %i0 + 0x54 ]
executing->resource_count--; /* undo locking above */
200c1d8: da 20 60 1c st %o5, [ %g1 + 0x1c ]
_ISR_Enable( *level_p );
200c1dc: d0 06 40 00 ld [ %i1 ], %o0
200c1e0: 7f ff d8 37 call 20022bc <sparc_enable_interrupts>
200c1e4: b0 10 20 00 clr %i0
200c1e8: 81 c7 e0 08 ret
200c1ec: 81 e8 00 00 restore
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200c1f0: 12 bf ff ca bne 200c118 <_CORE_mutex_Seize_interrupt_trylock+0x70><== ALWAYS TAKEN
200c1f4: 84 10 20 02 mov 2, %g2
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
200c1f8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED
_ISR_Enable( *level_p );
200c1fc: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
200c200: 7f ff d8 2f call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
200c204: b0 10 20 00 clr %i0 <== NOT EXECUTED
200c208: 81 c7 e0 08 ret <== NOT EXECUTED
200c20c: 81 e8 00 00 restore <== NOT EXECUTED
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
200c210: d0 06 40 00 ld [ %i1 ], %o0
200c214: 7f ff d8 2a call 20022bc <sparc_enable_interrupts>
200c218: b0 10 20 00 clr %i0
200c21c: 81 c7 e0 08 ret
200c220: 81 e8 00 00 restore
02006e10 <_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
)
{
2006e10: 9d e3 bf a0 save %sp, -96, %sp
2006e14: a0 10 00 18 mov %i0, %l0
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
2006e18: b0 10 20 00 clr %i0
2006e1c: 40 00 06 40 call 200871c <_Thread_queue_Dequeue>
2006e20: 90 10 00 10 mov %l0, %o0
2006e24: 80 a2 20 00 cmp %o0, 0
2006e28: 02 80 00 04 be 2006e38 <_CORE_semaphore_Surrender+0x28>
2006e2c: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
2006e30: 81 c7 e0 08 ret
2006e34: 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 );
2006e38: 7f ff ed 1d call 20022ac <sparc_disable_interrupts>
2006e3c: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
2006e40: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2006e44: c4 04 20 40 ld [ %l0 + 0x40 ], %g2
2006e48: 80 a0 40 02 cmp %g1, %g2
2006e4c: 1a 80 00 05 bcc 2006e60 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN
2006e50: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2006e54: 82 00 60 01 inc %g1
2006e58: b0 10 20 00 clr %i0
2006e5c: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
2006e60: 7f ff ed 17 call 20022bc <sparc_enable_interrupts>
2006e64: 01 00 00 00 nop
}
return status;
}
2006e68: 81 c7 e0 08 ret
2006e6c: 81 e8 00 00 restore
0200c070 <_Chain_Initialize>:
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
200c070: c0 22 20 04 clr [ %o0 + 4 ]
next = starting_address;
while ( count-- ) {
200c074: 80 a2 a0 00 cmp %o2, 0
200c078: 02 80 00 08 be 200c098 <_Chain_Initialize+0x28> <== NEVER TAKEN
200c07c: 82 10 00 08 mov %o0, %g1
current->next = next;
next->previous = current;
200c080: c2 22 60 04 st %g1, [ %o1 + 4 ]
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
200c084: d2 20 40 00 st %o1, [ %g1 ]
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
200c088: 94 82 bf ff addcc %o2, -1, %o2
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
200c08c: 82 10 00 09 mov %o1, %g1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
200c090: 12 bf ff fc bne 200c080 <_Chain_Initialize+0x10>
200c094: 92 02 40 0b add %o1, %o3, %o1
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
200c098: 84 02 20 04 add %o0, 4, %g2
200c09c: c4 20 40 00 st %g2, [ %g1 ]
the_chain->last = current;
}
200c0a0: 81 c3 e0 08 retl
200c0a4: c2 22 20 08 st %g1, [ %o0 + 8 ]
020059ec <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
20059ec: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
20059f0: 03 00 80 6d sethi %hi(0x201b400), %g1
20059f4: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing>
executing->Wait.return_code = RTEMS_SUCCESSFUL;
20059f8: c0 24 20 34 clr [ %l0 + 0x34 ]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
20059fc: 7f ff f2 2c call 20022ac <sparc_disable_interrupts>
2005a00: e4 04 21 60 ld [ %l0 + 0x160 ], %l2
pending_events = api->pending_events;
2005a04: c2 04 80 00 ld [ %l2 ], %g1
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
2005a08: a2 8e 00 01 andcc %i0, %g1, %l1
2005a0c: 02 80 00 07 be 2005a28 <_Event_Seize+0x3c>
2005a10: 80 8e 60 01 btst 1, %i1
2005a14: 80 a6 00 11 cmp %i0, %l1
2005a18: 02 80 00 23 be 2005aa4 <_Event_Seize+0xb8>
2005a1c: 80 8e 60 02 btst 2, %i1
2005a20: 12 80 00 21 bne 2005aa4 <_Event_Seize+0xb8> <== ALWAYS TAKEN
2005a24: 80 8e 60 01 btst 1, %i1
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
2005a28: 12 80 00 18 bne 2005a88 <_Event_Seize+0x9c>
2005a2c: 82 10 20 01 mov 1, %g1
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
2005a30: f2 24 20 30 st %i1, [ %l0 + 0x30 ]
executing->Wait.count = (uint32_t) event_in;
2005a34: f0 24 20 24 st %i0, [ %l0 + 0x24 ]
executing->Wait.return_argument = event_out;
2005a38: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2005a3c: 33 00 80 6e sethi %hi(0x201b800), %i1
2005a40: c2 26 60 98 st %g1, [ %i1 + 0x98 ] ! 201b898 <_Event_Sync_state>
_ISR_Enable( level );
2005a44: 7f ff f2 1e call 20022bc <sparc_enable_interrupts>
2005a48: 01 00 00 00 nop
if ( ticks ) {
2005a4c: 80 a6 a0 00 cmp %i2, 0
2005a50: 32 80 00 1c bne,a 2005ac0 <_Event_Seize+0xd4>
2005a54: c2 04 20 08 ld [ %l0 + 8 ], %g1
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
2005a58: 90 10 00 10 mov %l0, %o0
2005a5c: 40 00 0c b1 call 2008d20 <_Thread_Set_state>
2005a60: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
2005a64: 7f ff f2 12 call 20022ac <sparc_disable_interrupts>
2005a68: 01 00 00 00 nop
sync_state = _Event_Sync_state;
2005a6c: f0 06 60 98 ld [ %i1 + 0x98 ], %i0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
2005a70: c0 26 60 98 clr [ %i1 + 0x98 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
2005a74: 80 a6 20 01 cmp %i0, 1
2005a78: 02 80 00 1f be 2005af4 <_Event_Seize+0x108>
2005a7c: b2 10 00 10 mov %l0, %i1
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
2005a80: 40 00 08 6d call 2007c34 <_Thread_blocking_operation_Cancel>
2005a84: 95 e8 00 08 restore %g0, %o0, %o2
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
2005a88: 7f ff f2 0d call 20022bc <sparc_enable_interrupts>
2005a8c: 01 00 00 00 nop
executing->Wait.return_code = RTEMS_UNSATISFIED;
2005a90: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
2005a94: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
*event_out = seized_events;
2005a98: e2 26 c0 00 st %l1, [ %i3 ]
2005a9c: 81 c7 e0 08 ret
2005aa0: 81 e8 00 00 restore
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
2005aa4: 82 28 40 11 andn %g1, %l1, %g1
2005aa8: c2 24 80 00 st %g1, [ %l2 ]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
2005aac: 7f ff f2 04 call 20022bc <sparc_enable_interrupts>
2005ab0: 01 00 00 00 nop
*event_out = seized_events;
2005ab4: e2 26 c0 00 st %l1, [ %i3 ]
return;
2005ab8: 81 c7 e0 08 ret
2005abc: 81 e8 00 00 restore
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2005ac0: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2005ac4: c2 24 20 68 st %g1, [ %l0 + 0x68 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2005ac8: 03 00 80 17 sethi %hi(0x2005c00), %g1
2005acc: 82 10 60 a0 or %g1, 0xa0, %g1 ! 2005ca0 <_Event_Timeout>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2005ad0: c0 24 20 50 clr [ %l0 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2005ad4: c0 24 20 6c clr [ %l0 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2005ad8: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2005adc: 11 00 80 6d sethi %hi(0x201b400), %o0
2005ae0: 92 04 20 48 add %l0, 0x48, %o1
2005ae4: 40 00 0e 99 call 2009548 <_Watchdog_Insert>
2005ae8: 90 12 22 f0 or %o0, 0x2f0, %o0
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
2005aec: 10 bf ff dc b 2005a5c <_Event_Seize+0x70>
2005af0: 90 10 00 10 mov %l0, %o0
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
2005af4: 7f ff f1 f2 call 20022bc <sparc_enable_interrupts>
2005af8: 91 e8 00 08 restore %g0, %o0, %o0
02005b58 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
2005b58: 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 ];
2005b5c: e0 06 21 60 ld [ %i0 + 0x160 ], %l0
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2005b60: 7f ff f1 d3 call 20022ac <sparc_disable_interrupts>
2005b64: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
2005b68: a2 10 00 08 mov %o0, %l1
pending_events = api->pending_events;
2005b6c: c4 04 00 00 ld [ %l0 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
2005b70: 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 ) ) {
2005b74: 86 88 40 02 andcc %g1, %g2, %g3
2005b78: 02 80 00 3e be 2005c70 <_Event_Surrender+0x118>
2005b7c: 09 00 80 6d sethi %hi(0x201b400), %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() &&
2005b80: c8 01 22 ac ld [ %g4 + 0x2ac ], %g4 ! 201b6ac <_ISR_Nest_level>
2005b84: 80 a1 20 00 cmp %g4, 0
2005b88: 12 80 00 1d bne 2005bfc <_Event_Surrender+0xa4>
2005b8c: 09 00 80 6d sethi %hi(0x201b400), %g4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
2005b90: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
2005b94: 80 89 21 00 btst 0x100, %g4
2005b98: 02 80 00 34 be 2005c68 <_Event_Surrender+0x110>
2005b9c: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
2005ba0: 02 80 00 04 be 2005bb0 <_Event_Surrender+0x58>
2005ba4: 80 8c a0 02 btst 2, %l2
2005ba8: 02 80 00 30 be 2005c68 <_Event_Surrender+0x110> <== NEVER TAKEN
2005bac: 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;
2005bb0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
/*
* 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 );
2005bb4: 84 28 80 03 andn %g2, %g3, %g2
2005bb8: c4 24 00 00 st %g2, [ %l0 ]
the_thread->Wait.count = 0;
2005bbc: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2005bc0: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
2005bc4: 7f ff f1 be call 20022bc <sparc_enable_interrupts>
2005bc8: 90 10 00 11 mov %l1, %o0
2005bcc: 7f ff f1 b8 call 20022ac <sparc_disable_interrupts>
2005bd0: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
2005bd4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
2005bd8: 80 a0 60 02 cmp %g1, 2
2005bdc: 02 80 00 27 be 2005c78 <_Event_Surrender+0x120>
2005be0: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
2005be4: 90 10 00 11 mov %l1, %o0
2005be8: 7f ff f1 b5 call 20022bc <sparc_enable_interrupts>
2005bec: 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 );
2005bf0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2005bf4: 40 00 08 ab call 2007ea0 <_Thread_Clear_state>
2005bf8: 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() &&
2005bfc: c8 01 22 d0 ld [ %g4 + 0x2d0 ], %g4
2005c00: 80 a6 00 04 cmp %i0, %g4
2005c04: 32 bf ff e4 bne,a 2005b94 <_Event_Surrender+0x3c>
2005c08: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2005c0c: 09 00 80 6e sethi %hi(0x201b800), %g4
2005c10: da 01 20 98 ld [ %g4 + 0x98 ], %o5 ! 201b898 <_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() &&
2005c14: 80 a3 60 02 cmp %o5, 2
2005c18: 02 80 00 07 be 2005c34 <_Event_Surrender+0xdc> <== NEVER TAKEN
2005c1c: 80 a0 40 03 cmp %g1, %g3
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
2005c20: da 01 20 98 ld [ %g4 + 0x98 ], %o5
/*
* 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() &&
2005c24: 80 a3 60 01 cmp %o5, 1
2005c28: 32 bf ff db bne,a 2005b94 <_Event_Surrender+0x3c>
2005c2c: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_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) ) {
2005c30: 80 a0 40 03 cmp %g1, %g3
2005c34: 02 80 00 04 be 2005c44 <_Event_Surrender+0xec>
2005c38: 80 8c a0 02 btst 2, %l2
2005c3c: 02 80 00 09 be 2005c60 <_Event_Surrender+0x108> <== NEVER TAKEN
2005c40: 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;
2005c44: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
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 );
2005c48: 84 28 80 03 andn %g2, %g3, %g2
2005c4c: c4 24 00 00 st %g2, [ %l0 ]
the_thread->Wait.count = 0;
2005c50: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2005c54: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2005c58: 82 10 20 03 mov 3, %g1
2005c5c: c2 21 20 98 st %g1, [ %g4 + 0x98 ]
}
_ISR_Enable( level );
2005c60: 7f ff f1 97 call 20022bc <sparc_enable_interrupts>
2005c64: 91 e8 00 11 restore %g0, %l1, %o0
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
2005c68: 7f ff f1 95 call 20022bc <sparc_enable_interrupts>
2005c6c: 91 e8 00 11 restore %g0, %l1, %o0
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
2005c70: 7f ff f1 93 call 20022bc <sparc_enable_interrupts>
2005c74: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
2005c78: 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 );
2005c7c: 7f ff f1 90 call 20022bc <sparc_enable_interrupts>
2005c80: 90 10 00 11 mov %l1, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
2005c84: 40 00 0e 9e call 20096fc <_Watchdog_Remove>
2005c88: 90 06 20 48 add %i0, 0x48, %o0
2005c8c: 33 04 00 ff sethi %hi(0x1003fc00), %i1
2005c90: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2005c94: 40 00 08 83 call 2007ea0 <_Thread_Clear_state>
2005c98: 81 e8 00 00 restore
02005ca0 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
2005ca0: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
2005ca4: 90 10 00 18 mov %i0, %o0
2005ca8: 40 00 09 a6 call 2008340 <_Thread_Get>
2005cac: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2005cb0: c2 07 bf fc ld [ %fp + -4 ], %g1
2005cb4: 80 a0 60 00 cmp %g1, 0
2005cb8: 12 80 00 15 bne 2005d0c <_Event_Timeout+0x6c> <== NEVER TAKEN
2005cbc: a0 10 00 08 mov %o0, %l0
*
* 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 );
2005cc0: 7f ff f1 7b call 20022ac <sparc_disable_interrupts>
2005cc4: 01 00 00 00 nop
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
2005cc8: 03 00 80 6d sethi %hi(0x201b400), %g1
2005ccc: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing>
2005cd0: 80 a4 00 01 cmp %l0, %g1
2005cd4: 02 80 00 10 be 2005d14 <_Event_Timeout+0x74>
2005cd8: c0 24 20 24 clr [ %l0 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2005cdc: 82 10 20 06 mov 6, %g1
2005ce0: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
_ISR_Enable( level );
2005ce4: 7f ff f1 76 call 20022bc <sparc_enable_interrupts>
2005ce8: 01 00 00 00 nop
2005cec: 90 10 00 10 mov %l0, %o0
2005cf0: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2005cf4: 40 00 08 6b call 2007ea0 <_Thread_Clear_state>
2005cf8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2005cfc: 03 00 80 6d sethi %hi(0x201b400), %g1
2005d00: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level>
2005d04: 84 00 bf ff add %g2, -1, %g2
2005d08: c4 20 62 10 st %g2, [ %g1 + 0x210 ]
2005d0c: 81 c7 e0 08 ret
2005d10: 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 )
2005d14: 03 00 80 6e sethi %hi(0x201b800), %g1
2005d18: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 ! 201b898 <_Event_Sync_state>
2005d1c: 80 a0 a0 01 cmp %g2, 1
2005d20: 32 bf ff f0 bne,a 2005ce0 <_Event_Timeout+0x40>
2005d24: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2005d28: 84 10 20 02 mov 2, %g2
2005d2c: c4 20 60 98 st %g2, [ %g1 + 0x98 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2005d30: 10 bf ff ec b 2005ce0 <_Event_Timeout+0x40>
2005d34: 82 10 20 06 mov 6, %g1
0200c31c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
200c31c: 9d e3 bf 98 save %sp, -104, %sp
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
200c320: a8 06 60 04 add %i1, 4, %l4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
200c324: a0 10 00 18 mov %i0, %l0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
200c328: 80 a6 40 14 cmp %i1, %l4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200c32c: e4 06 20 08 ld [ %i0 + 8 ], %l2
200c330: 18 80 00 72 bgu 200c4f8 <_Heap_Allocate_aligned_with_boundary+0x1dc>
200c334: fa 06 20 10 ld [ %i0 + 0x10 ], %i5
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
200c338: 80 a6 e0 00 cmp %i3, 0
200c33c: 12 80 00 6d bne 200c4f0 <_Heap_Allocate_aligned_with_boundary+0x1d4>
200c340: 80 a6 40 1b cmp %i1, %i3
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
200c344: 80 a4 00 12 cmp %l0, %l2
200c348: 02 80 00 6f be 200c504 <_Heap_Allocate_aligned_with_boundary+0x1e8>
200c34c: a2 10 20 00 clr %l1
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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
200c350: 82 10 20 04 mov 4, %g1
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;
200c354: b8 07 60 07 add %i5, 7, %i4
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
200c358: 82 20 40 19 sub %g1, %i1, %g1
200c35c: 10 80 00 09 b 200c380 <_Heap_Allocate_aligned_with_boundary+0x64>
200c360: c2 27 bf fc st %g1, [ %fp + -4 ]
boundary
);
}
}
if ( alloc_begin != 0 ) {
200c364: 80 a6 20 00 cmp %i0, 0
200c368: 32 80 00 54 bne,a 200c4b8 <_Heap_Allocate_aligned_with_boundary+0x19c><== ALWAYS TAKEN
200c36c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
break;
}
block = block->next;
200c370: e4 04 a0 08 ld [ %l2 + 8 ], %l2
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
200c374: 80 a4 00 12 cmp %l0, %l2
200c378: 22 80 00 57 be,a 200c4d4 <_Heap_Allocate_aligned_with_boundary+0x1b8>
200c37c: b0 10 20 00 clr %i0
/*
* 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 ) {
200c380: e6 04 a0 04 ld [ %l2 + 4 ], %l3
200c384: 80 a5 00 13 cmp %l4, %l3
200c388: 1a bf ff fa bcc 200c370 <_Heap_Allocate_aligned_with_boundary+0x54>
200c38c: a2 04 60 01 inc %l1
if ( alignment == 0 ) {
200c390: 80 a6 a0 00 cmp %i2, 0
200c394: 02 bf ff f4 be 200c364 <_Heap_Allocate_aligned_with_boundary+0x48>
200c398: b0 04 a0 08 add %l2, 8, %i0
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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
200c39c: c2 07 bf fc ld [ %fp + -4 ], %g1
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
200c3a0: ee 04 20 14 ld [ %l0 + 0x14 ], %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;
200c3a4: a6 0c ff fe and %l3, -2, %l3
200c3a8: a6 04 80 13 add %l2, %l3, %l3
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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
200c3ac: b0 00 40 13 add %g1, %l3, %i0
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;
200c3b0: 82 27 00 17 sub %i4, %l7, %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200c3b4: 90 10 00 18 mov %i0, %o0
200c3b8: a6 00 40 13 add %g1, %l3, %l3
200c3bc: 40 00 2f 40 call 20180bc <.urem>
200c3c0: 92 10 00 1a mov %i2, %o1
200c3c4: 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 ) {
200c3c8: 80 a4 c0 18 cmp %l3, %i0
200c3cc: 1a 80 00 06 bcc 200c3e4 <_Heap_Allocate_aligned_with_boundary+0xc8>
200c3d0: ac 04 a0 08 add %l2, 8, %l6
200c3d4: 90 10 00 13 mov %l3, %o0
200c3d8: 40 00 2f 39 call 20180bc <.urem>
200c3dc: 92 10 00 1a mov %i2, %o1
200c3e0: b0 24 c0 08 sub %l3, %o0, %i0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
200c3e4: 80 a6 e0 00 cmp %i3, 0
200c3e8: 02 80 00 24 be 200c478 <_Heap_Allocate_aligned_with_boundary+0x15c>
200c3ec: 80 a5 80 18 cmp %l6, %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;
200c3f0: a6 06 00 19 add %i0, %i1, %l3
200c3f4: 92 10 00 1b mov %i3, %o1
200c3f8: 40 00 2f 31 call 20180bc <.urem>
200c3fc: 90 10 00 13 mov %l3, %o0
200c400: 90 24 c0 08 sub %l3, %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 ) {
200c404: 80 a4 c0 08 cmp %l3, %o0
200c408: 08 80 00 1b bleu 200c474 <_Heap_Allocate_aligned_with_boundary+0x158>
200c40c: 80 a6 00 08 cmp %i0, %o0
200c410: 1a 80 00 1a bcc 200c478 <_Heap_Allocate_aligned_with_boundary+0x15c>
200c414: 80 a5 80 18 cmp %l6, %i0
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
200c418: aa 05 80 19 add %l6, %i1, %l5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
200c41c: 80 a5 40 08 cmp %l5, %o0
200c420: 28 80 00 09 bleu,a 200c444 <_Heap_Allocate_aligned_with_boundary+0x128>
200c424: b0 22 00 19 sub %o0, %i1, %i0
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
200c428: 10 bf ff d3 b 200c374 <_Heap_Allocate_aligned_with_boundary+0x58>
200c42c: e4 04 a0 08 ld [ %l2 + 8 ], %l2
/* 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 ) {
200c430: 1a 80 00 11 bcc 200c474 <_Heap_Allocate_aligned_with_boundary+0x158>
200c434: 80 a5 40 08 cmp %l5, %o0
if ( boundary_line < boundary_floor ) {
200c438: 38 bf ff cf bgu,a 200c374 <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN
200c43c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED
return 0;
}
alloc_begin = boundary_line - alloc_size;
200c440: b0 22 00 19 sub %o0, %i1, %i0
200c444: 92 10 00 1a mov %i2, %o1
200c448: 40 00 2f 1d call 20180bc <.urem>
200c44c: 90 10 00 18 mov %i0, %o0
200c450: 92 10 00 1b mov %i3, %o1
200c454: b0 26 00 08 sub %i0, %o0, %i0
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
200c458: a6 06 00 19 add %i0, %i1, %l3
200c45c: 40 00 2f 18 call 20180bc <.urem>
200c460: 90 10 00 13 mov %l3, %o0
200c464: 90 24 c0 08 sub %l3, %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 ) {
200c468: 80 a4 c0 08 cmp %l3, %o0
200c46c: 18 bf ff f1 bgu 200c430 <_Heap_Allocate_aligned_with_boundary+0x114>
200c470: 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 ) {
200c474: 80 a5 80 18 cmp %l6, %i0
200c478: 18 bf ff be bgu 200c370 <_Heap_Allocate_aligned_with_boundary+0x54>
200c47c: 82 10 3f f8 mov -8, %g1
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;
200c480: 90 10 00 18 mov %i0, %o0
200c484: a6 20 40 12 sub %g1, %l2, %l3
200c488: 92 10 00 1d mov %i5, %o1
200c48c: 40 00 2f 0c call 20180bc <.urem>
200c490: a6 04 c0 18 add %l3, %i0, %l3
if ( free_size >= min_block_size || free_size == 0 ) {
200c494: 90 a4 c0 08 subcc %l3, %o0, %o0
200c498: 02 bf ff b4 be 200c368 <_Heap_Allocate_aligned_with_boundary+0x4c>
200c49c: 80 a6 20 00 cmp %i0, 0
200c4a0: 80 a5 c0 08 cmp %l7, %o0
200c4a4: 18 bf ff b3 bgu 200c370 <_Heap_Allocate_aligned_with_boundary+0x54>
200c4a8: 80 a6 20 00 cmp %i0, 0
boundary
);
}
}
if ( alloc_begin != 0 ) {
200c4ac: 22 bf ff b2 be,a 200c374 <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN
200c4b0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
200c4b4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200c4b8: 92 10 00 12 mov %l2, %o1
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
200c4bc: 82 00 40 11 add %g1, %l1, %g1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200c4c0: 96 10 00 19 mov %i1, %o3
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
200c4c4: c2 24 20 4c st %g1, [ %l0 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200c4c8: 90 10 00 10 mov %l0, %o0
200c4cc: 7f ff eb 35 call 20071a0 <_Heap_Block_allocate>
200c4d0: 94 10 00 18 mov %i0, %o2
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
200c4d4: c2 04 20 44 ld [ %l0 + 0x44 ], %g1
200c4d8: 80 a0 40 11 cmp %g1, %l1
200c4dc: 1a 80 00 08 bcc 200c4fc <_Heap_Allocate_aligned_with_boundary+0x1e0>
200c4e0: 01 00 00 00 nop
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
200c4e4: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
200c4e8: 81 c7 e0 08 ret
200c4ec: 81 e8 00 00 restore
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
200c4f0: 08 80 00 07 bleu 200c50c <_Heap_Allocate_aligned_with_boundary+0x1f0>
200c4f4: 80 a6 a0 00 cmp %i2, 0
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
200c4f8: b0 10 20 00 clr %i0
}
return (void *) alloc_begin;
}
200c4fc: 81 c7 e0 08 ret
200c500: 81 e8 00 00 restore
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
200c504: 10 bf ff f4 b 200c4d4 <_Heap_Allocate_aligned_with_boundary+0x1b8>
200c508: b0 10 20 00 clr %i0
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
200c50c: 22 bf ff 8e be,a 200c344 <_Heap_Allocate_aligned_with_boundary+0x28>
200c510: b4 10 00 1d mov %i5, %i2
alignment = page_size;
}
}
while ( block != free_list_tail ) {
200c514: 10 bf ff 8d b 200c348 <_Heap_Allocate_aligned_with_boundary+0x2c>
200c518: 80 a4 00 12 cmp %l0, %l2
02010fa8 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
2010fa8: 9d e3 bf a0 save %sp, -96, %sp
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
2010fac: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
2010fb0: a0 10 00 18 mov %i0, %l0
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
2010fb4: 80 a6 40 01 cmp %i1, %g1
2010fb8: 0a 80 00 2a bcs 2011060 <_Heap_Extend+0xb8>
2010fbc: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
2010fc0: 80 a6 40 01 cmp %i1, %g1
2010fc4: 12 80 00 25 bne 2011058 <_Heap_Extend+0xb0>
2010fc8: b0 10 20 02 mov 2, %i0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
2010fcc: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
2010fd0: b4 06 40 1a add %i1, %i2, %i2
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
2010fd4: b2 26 80 11 sub %i2, %l1, %i1
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
2010fd8: f4 24 20 1c st %i2, [ %l0 + 0x1c ]
extend_size = new_heap_area_end
2010fdc: b2 06 7f f8 add %i1, -8, %i1
2010fe0: 7f ff cc d7 call 200433c <.urem>
2010fe4: 90 10 00 19 mov %i1, %o0
2010fe8: 90 26 40 08 sub %i1, %o0, %o0
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
2010fec: d0 26 c0 00 st %o0, [ %i3 ]
if( extend_size >= heap->min_block_size ) {
2010ff0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
2010ff4: 80 a0 40 08 cmp %g1, %o0
2010ff8: 18 80 00 18 bgu 2011058 <_Heap_Extend+0xb0> <== NEVER TAKEN
2010ffc: b0 10 20 00 clr %i0
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
2011000: c2 04 60 04 ld [ %l1 + 4 ], %g1
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
2011004: c4 04 20 20 ld [ %l0 + 0x20 ], %g2
2011008: 82 08 60 01 and %g1, 1, %g1
201100c: 82 12 00 01 or %o0, %g1, %g1
2011010: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2011014: 82 02 00 11 add %o0, %l1, %g1
2011018: 84 20 80 01 sub %g2, %g1, %g2
201101c: 84 10 a0 01 or %g2, 1, %g2
2011020: c4 20 60 04 st %g2, [ %g1 + 4 ]
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
2011024: c6 04 20 40 ld [ %l0 + 0x40 ], %g3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
2011028: f2 04 20 2c ld [ %l0 + 0x2c ], %i1
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
201102c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
2011030: c2 24 20 24 st %g1, [ %l0 + 0x24 ]
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
2011034: 82 00 e0 01 add %g3, 1, %g1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
2011038: 90 06 40 08 add %i1, %o0, %o0
++stats->used_blocks;
201103c: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
--stats->frees; /* Do not count subsequent call as actual free() */
2011040: 82 00 bf ff add %g2, -1, %g1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
2011044: d0 24 20 2c st %o0, [ %l0 + 0x2c ]
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
2011048: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
201104c: 90 10 00 10 mov %l0, %o0
2011050: 7f ff e8 6f call 200b20c <_Heap_Free>
2011054: 92 04 60 08 add %l1, 8, %o1
}
return HEAP_EXTEND_SUCCESSFUL;
}
2011058: 81 c7 e0 08 ret
201105c: 81 e8 00 00 restore
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
2011060: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
2011064: 80 a6 40 02 cmp %i1, %g2
2011068: 0a bf ff d6 bcs 2010fc0 <_Heap_Extend+0x18>
201106c: b0 10 20 01 mov 1, %i0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
2011070: 81 c7 e0 08 ret
2011074: 81 e8 00 00 restore
0200c51c <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200c51c: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
200c520: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200c524: 40 00 2e e6 call 20180bc <.urem>
200c528: 90 10 00 19 mov %i1, %o0
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;
200c52c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
200c530: b2 06 7f f8 add %i1, -8, %i1
200c534: 90 26 40 08 sub %i1, %o0, %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
200c538: 80 a2 00 01 cmp %o0, %g1
200c53c: 0a 80 00 36 bcs 200c614 <_Heap_Free+0xf8>
200c540: 01 00 00 00 nop
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200c544: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
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
200c548: 80 a2 00 03 cmp %o0, %g3
200c54c: 18 80 00 32 bgu 200c614 <_Heap_Free+0xf8>
200c550: 01 00 00 00 nop
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200c554: da 02 20 04 ld [ %o0 + 4 ], %o5
200c558: 88 0b 7f fe and %o5, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200c55c: 84 02 00 04 add %o0, %g4, %g2
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
200c560: 80 a0 40 02 cmp %g1, %g2
200c564: 18 80 00 2c bgu 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN
200c568: 80 a0 c0 02 cmp %g3, %g2
200c56c: 0a 80 00 2a bcs 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN
200c570: 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;
200c574: d8 00 a0 04 ld [ %g2 + 4 ], %o4
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200c578: 80 8b 20 01 btst 1, %o4
200c57c: 02 80 00 26 be 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN
200c580: 96 0b 3f fe and %o4, -2, %o3
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
200c584: 80 a0 c0 02 cmp %g3, %g2
200c588: 02 80 00 06 be 200c5a0 <_Heap_Free+0x84>
200c58c: 98 10 20 00 clr %o4
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
200c590: 98 00 80 0b add %g2, %o3, %o4
200c594: d8 03 20 04 ld [ %o4 + 4 ], %o4
200c598: 98 0b 20 01 and %o4, 1, %o4
200c59c: 98 1b 20 01 xor %o4, 1, %o4
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 ) ) {
200c5a0: 80 8b 60 01 btst 1, %o5
200c5a4: 12 80 00 1e bne 200c61c <_Heap_Free+0x100>
200c5a8: 80 8b 20 ff btst 0xff, %o4
uintptr_t const prev_size = block->prev_size;
200c5ac: d4 02 00 00 ld [ %o0 ], %o2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200c5b0: 9a 22 00 0a sub %o0, %o2, %o5
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
200c5b4: 80 a0 40 0d cmp %g1, %o5
200c5b8: 18 80 00 17 bgu 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN
200c5bc: 80 a0 c0 0d cmp %g3, %o5
200c5c0: 0a 80 00 15 bcs 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN
200c5c4: 01 00 00 00 nop
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) ) {
200c5c8: c2 03 60 04 ld [ %o5 + 4 ], %g1
200c5cc: 80 88 60 01 btst 1, %g1
200c5d0: 02 80 00 11 be 200c614 <_Heap_Free+0xf8> <== NEVER TAKEN
200c5d4: 80 8b 20 ff btst 0xff, %o4
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200c5d8: 22 80 00 3a be,a 200c6c0 <_Heap_Free+0x1a4>
200c5dc: 94 01 00 0a add %g4, %o2, %o2
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200c5e0: 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;
200c5e4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
200c5e8: c4 00 a0 08 ld [ %g2 + 8 ], %g2
200c5ec: 86 00 ff ff add %g3, -1, %g3
200c5f0: c6 26 20 38 st %g3, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
200c5f4: 96 01 00 0b add %g4, %o3, %o3
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
200c5f8: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
200c5fc: 94 02 c0 0a add %o3, %o2, %o2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
200c600: c4 20 60 08 st %g2, [ %g1 + 8 ]
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200c604: d4 23 40 0a st %o2, [ %o5 + %o2 ]
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;
200c608: 94 12 a0 01 or %o2, 1, %o2
200c60c: 10 80 00 10 b 200c64c <_Heap_Free+0x130>
200c610: d4 23 60 04 st %o2, [ %o5 + 4 ]
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200c614: 81 c7 e0 08 ret
200c618: 91 e8 20 00 restore %g0, 0, %o0
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 */
200c61c: 02 80 00 17 be 200c678 <_Heap_Free+0x15c>
200c620: 82 11 20 01 or %g4, 1, %g1
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
200c624: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
200c628: c4 00 a0 08 ld [ %g2 + 8 ], %g2
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
200c62c: c2 22 20 0c st %g1, [ %o0 + 0xc ]
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
200c630: c4 22 20 08 st %g2, [ %o0 + 8 ]
uintptr_t const size = block_size + next_block_size;
200c634: 96 02 c0 04 add %o3, %g4, %o3
new_block->prev = prev;
next->prev = new_block;
200c638: d0 20 a0 0c st %o0, [ %g2 + 0xc ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200c63c: d6 22 00 0b st %o3, [ %o0 + %o3 ]
prev->next = new_block;
200c640: d0 20 60 08 st %o0, [ %g1 + 8 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200c644: 96 12 e0 01 or %o3, 1, %o3
200c648: d6 22 20 04 st %o3, [ %o0 + 4 ]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200c64c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
200c650: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
200c654: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200c658: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
stats->free_size += block_size;
200c65c: 88 00 c0 04 add %g3, %g4, %g4
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200c660: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
stats->free_size += block_size;
200c664: c8 26 20 30 st %g4, [ %i0 + 0x30 ]
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
200c668: 82 00 60 01 inc %g1
200c66c: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
return( true );
200c670: 81 c7 e0 08 ret
200c674: 91 e8 20 01 restore %g0, 1, %o0
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;
200c678: c2 22 20 04 st %g1, [ %o0 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200c67c: c2 00 a0 04 ld [ %g2 + 4 ], %g1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
200c680: c6 06 20 08 ld [ %i0 + 8 ], %g3
200c684: 82 08 7f fe and %g1, -2, %g1
next_block->prev_size = block_size;
200c688: c8 22 00 04 st %g4, [ %o0 + %g4 ]
} 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;
200c68c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200c690: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
new_block->next = next;
200c694: c6 22 20 08 st %g3, [ %o0 + 8 ]
new_block->prev = block_before;
200c698: f0 22 20 0c st %i0, [ %o0 + 0xc ]
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
200c69c: 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;
200c6a0: 82 00 60 01 inc %g1
block_before->next = new_block;
next->prev = new_block;
200c6a4: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
200c6a8: d0 26 20 08 st %o0, [ %i0 + 8 ]
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
200c6ac: 80 a0 40 02 cmp %g1, %g2
200c6b0: 08 bf ff e7 bleu 200c64c <_Heap_Free+0x130>
200c6b4: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
200c6b8: 10 bf ff e5 b 200c64c <_Heap_Free+0x130>
200c6bc: 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;
200c6c0: 82 12 a0 01 or %o2, 1, %g1
200c6c4: c2 23 60 04 st %g1, [ %o5 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200c6c8: c2 00 a0 04 ld [ %g2 + 4 ], %g1
next_block->prev_size = size;
200c6cc: d4 22 00 04 st %o2, [ %o0 + %g4 ]
_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;
200c6d0: 82 08 7f fe and %g1, -2, %g1
200c6d4: 10 bf ff de b 200c64c <_Heap_Free+0x130>
200c6d8: c2 20 a0 04 st %g1, [ %g2 + 4 ]
02011078 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
2011078: 9d e3 bf a0 save %sp, -96, %sp
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
201107c: c2 06 20 08 ld [ %i0 + 8 ], %g1
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
2011080: c0 26 40 00 clr [ %i1 ]
info->largest = 0;
2011084: c0 26 60 04 clr [ %i1 + 4 ]
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
2011088: 80 a6 00 01 cmp %i0, %g1
201108c: 02 80 00 13 be 20110d8 <_Heap_Get_free_information+0x60> <== NEVER TAKEN
2011090: c0 26 60 08 clr [ %i1 + 8 ]
2011094: 88 10 20 01 mov 1, %g4
2011098: 10 80 00 03 b 20110a4 <_Heap_Get_free_information+0x2c>
201109c: 86 10 20 00 clr %g3
20110a0: 88 10 00 02 mov %g2, %g4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
20110a4: c4 00 60 04 ld [ %g1 + 4 ], %g2
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
if ( info->largest < the_size )
20110a8: da 06 60 04 ld [ %i1 + 4 ], %o5
20110ac: 84 08 bf fe and %g2, -2, %g2
20110b0: 80 a3 40 02 cmp %o5, %g2
20110b4: 1a 80 00 03 bcc 20110c0 <_Heap_Get_free_information+0x48>
20110b8: 86 00 c0 02 add %g3, %g2, %g3
info->largest = the_size;
20110bc: c4 26 60 04 st %g2, [ %i1 + 4 ]
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
20110c0: c2 00 60 08 ld [ %g1 + 8 ], %g1
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
20110c4: 80 a6 00 01 cmp %i0, %g1
20110c8: 12 bf ff f6 bne 20110a0 <_Heap_Get_free_information+0x28>
20110cc: 84 01 20 01 add %g4, 1, %g2
20110d0: c6 26 60 08 st %g3, [ %i1 + 8 ]
20110d4: c8 26 40 00 st %g4, [ %i1 ]
20110d8: 81 c7 e0 08 ret
20110dc: 81 e8 00 00 restore
020110e0 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
20110e0: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
20110e4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
20110e8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
20110ec: c0 26 40 00 clr [ %i1 ]
the_info->Free.total = 0;
20110f0: c0 26 60 08 clr [ %i1 + 8 ]
the_info->Free.largest = 0;
20110f4: c0 26 60 04 clr [ %i1 + 4 ]
the_info->Used.number = 0;
20110f8: c0 26 60 0c clr [ %i1 + 0xc ]
the_info->Used.total = 0;
20110fc: c0 26 60 14 clr [ %i1 + 0x14 ]
the_info->Used.largest = 0;
2011100: c0 26 60 10 clr [ %i1 + 0x10 ]
while ( the_block != end ) {
2011104: 80 a0 40 02 cmp %g1, %g2
2011108: 02 80 00 1a be 2011170 <_Heap_Get_information+0x90> <== NEVER TAKEN
201110c: 86 10 20 08 mov 8, %g3
2011110: da 00 60 04 ld [ %g1 + 4 ], %o5
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) )
info = &the_info->Used;
2011114: 92 06 60 0c add %i1, 0xc, %o1
2011118: 88 0b 7f fe and %o5, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
201111c: 82 00 40 04 add %g1, %g4, %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;
2011120: da 00 60 04 ld [ %g1 + 4 ], %o5
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) )
2011124: 80 8b 60 01 btst 1, %o5
2011128: 12 80 00 03 bne 2011134 <_Heap_Get_information+0x54>
201112c: 86 10 00 09 mov %o1, %g3
2011130: 86 10 00 19 mov %i1, %g3
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
2011134: d4 00 c0 00 ld [ %g3 ], %o2
info->total += the_size;
2011138: d6 00 e0 08 ld [ %g3 + 8 ], %o3
if ( info->largest < the_size )
201113c: d8 00 e0 04 ld [ %g3 + 4 ], %o4
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
2011140: 94 02 a0 01 inc %o2
info->total += the_size;
2011144: 96 02 c0 04 add %o3, %g4, %o3
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
2011148: d4 20 c0 00 st %o2, [ %g3 ]
info->total += the_size;
if ( info->largest < the_size )
201114c: 80 a3 00 04 cmp %o4, %g4
2011150: 1a 80 00 03 bcc 201115c <_Heap_Get_information+0x7c>
2011154: d6 20 e0 08 st %o3, [ %g3 + 8 ]
info->largest = the_size;
2011158: c8 20 e0 04 st %g4, [ %g3 + 4 ]
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
201115c: 80 a0 80 01 cmp %g2, %g1
2011160: 12 bf ff ef bne 201111c <_Heap_Get_information+0x3c>
2011164: 88 0b 7f fe and %o5, -2, %g4
2011168: c6 06 60 14 ld [ %i1 + 0x14 ], %g3
201116c: 86 00 e0 08 add %g3, 8, %g3
/*
* Handle the last dummy block. Don't consider this block to be
* "used" as client never allocated it. Make 'Used.total' contain this
* blocks' overhead though.
*/
the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
2011170: c6 26 60 14 st %g3, [ %i1 + 0x14 ]
}
2011174: 81 c7 e0 08 ret
2011178: 81 e8 00 00 restore
020194a0 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
20194a0: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
20194a4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
20194a8: 7f ff fb 05 call 20180bc <.urem>
20194ac: 90 10 00 19 mov %i1, %o0
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;
20194b0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
20194b4: 84 06 7f f8 add %i1, -8, %g2
20194b8: 84 20 80 08 sub %g2, %o0, %g2
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
20194bc: 80 a0 80 01 cmp %g2, %g1
20194c0: 0a 80 00 16 bcs 2019518 <_Heap_Size_of_alloc_area+0x78>
20194c4: 01 00 00 00 nop
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
20194c8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
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
20194cc: 80 a0 80 03 cmp %g2, %g3
20194d0: 18 80 00 12 bgu 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
20194d4: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
20194d8: c8 00 a0 04 ld [ %g2 + 4 ], %g4
20194dc: 88 09 3f fe and %g4, -2, %g4
20194e0: 84 00 80 04 add %g2, %g4, %g2
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
20194e4: 80 a0 40 02 cmp %g1, %g2
20194e8: 18 80 00 0c bgu 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
20194ec: 80 a0 c0 02 cmp %g3, %g2
20194f0: 0a 80 00 0a bcs 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
20194f4: 01 00 00 00 nop
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
20194f8: c2 00 a0 04 ld [ %g2 + 4 ], %g1
20194fc: 80 88 60 01 btst 1, %g1
2019500: 02 80 00 06 be 2019518 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
2019504: 84 20 80 19 sub %g2, %i1, %g2
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
2019508: 84 00 a0 04 add %g2, 4, %g2
201950c: c4 26 80 00 st %g2, [ %i2 ]
return true;
2019510: 81 c7 e0 08 ret
2019514: 91 e8 20 01 restore %g0, 1, %o0
}
2019518: 81 c7 e0 08 ret
201951c: 91 e8 20 00 restore %g0, 0, %o0
02008118 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
2008118: 9d e3 bf 88 save %sp, -120, %sp
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
200811c: 25 00 80 21 sethi %hi(0x2008400), %l2
2008120: 80 8e a0 ff btst 0xff, %i2
2008124: a4 14 a3 18 or %l2, 0x318, %l2
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
2008128: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
uintptr_t const min_block_size = heap->min_block_size;
200812c: e6 06 20 14 ld [ %i0 + 0x14 ], %l3
Heap_Block *const last_block = heap->last_block;
2008130: e8 06 20 24 ld [ %i0 + 0x24 ], %l4
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
2008134: 12 80 00 04 bne 2008144 <_Heap_Walk+0x2c>
2008138: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
200813c: 25 00 80 20 sethi %hi(0x2008000), %l2
2008140: a4 14 a1 10 or %l2, 0x110, %l2 ! 2008110 <_Heap_Walk_print_nothing>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
2008144: 03 00 80 77 sethi %hi(0x201dc00), %g1
2008148: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201dfb0 <_System_state_Current>
200814c: 80 a0 60 03 cmp %g1, 3
2008150: 22 80 00 04 be,a 2008160 <_Heap_Walk+0x48>
2008154: da 06 20 18 ld [ %i0 + 0x18 ], %o5
block = next_block;
}
return true;
}
2008158: 81 c7 e0 08 ret
200815c: 91 e8 20 01 restore %g0, 1, %o0
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)(
2008160: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
2008164: c4 06 20 08 ld [ %i0 + 8 ], %g2
2008168: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200816c: 90 10 00 19 mov %i1, %o0
2008170: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2008174: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
2008178: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
200817c: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
2008180: e8 23 a0 64 st %l4, [ %sp + 0x64 ]
2008184: 92 10 20 00 clr %o1
2008188: 15 00 80 6c sethi %hi(0x201b000), %o2
200818c: 96 10 00 15 mov %l5, %o3
2008190: 94 12 a1 50 or %o2, 0x150, %o2
2008194: 9f c4 80 00 call %l2
2008198: 98 10 00 13 mov %l3, %o4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
200819c: 80 a5 60 00 cmp %l5, 0
20081a0: 02 80 00 36 be 2008278 <_Heap_Walk+0x160>
20081a4: 80 8d 60 07 btst 7, %l5
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
20081a8: 12 80 00 3c bne 2008298 <_Heap_Walk+0x180>
20081ac: 90 10 00 13 mov %l3, %o0
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
20081b0: 7f ff e6 45 call 2001ac4 <.urem>
20081b4: 92 10 00 15 mov %l5, %o1
20081b8: 80 a2 20 00 cmp %o0, 0
20081bc: 12 80 00 40 bne 20082bc <_Heap_Walk+0x1a4>
20081c0: 90 04 20 08 add %l0, 8, %o0
);
return false;
}
if (
20081c4: 7f ff e6 40 call 2001ac4 <.urem>
20081c8: 92 10 00 15 mov %l5, %o1
20081cc: 80 a2 20 00 cmp %o0, 0
20081d0: 32 80 00 44 bne,a 20082e0 <_Heap_Walk+0x1c8>
20081d4: 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;
20081d8: ec 04 20 04 ld [ %l0 + 4 ], %l6
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
20081dc: ae 8d a0 01 andcc %l6, 1, %l7
20081e0: 22 80 00 48 be,a 2008300 <_Heap_Walk+0x1e8>
20081e4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( first_block->prev_size != page_size ) {
20081e8: d6 04 00 00 ld [ %l0 ], %o3
20081ec: 80 a5 40 0b cmp %l5, %o3
20081f0: 32 80 00 1a bne,a 2008258 <_Heap_Walk+0x140>
20081f4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
20081f8: c2 05 20 04 ld [ %l4 + 4 ], %g1
20081fc: 82 08 7f fe and %g1, -2, %g1
2008200: 82 05 00 01 add %l4, %g1, %g1
2008204: c2 00 60 04 ld [ %g1 + 4 ], %g1
2008208: 80 88 60 01 btst 1, %g1
200820c: 22 80 01 23 be,a 2008698 <_Heap_Walk+0x580>
2008210: 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;
2008214: e2 06 20 08 ld [ %i0 + 8 ], %l1
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 ) {
2008218: 80 a6 00 11 cmp %i0, %l1
200821c: 02 80 00 6f be 20083d8 <_Heap_Walk+0x2c0>
2008220: f4 06 20 10 ld [ %i0 + 0x10 ], %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;
2008224: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
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
2008228: 80 a7 00 11 cmp %i4, %l1
200822c: 28 80 00 3c bleu,a 200831c <_Heap_Walk+0x204> <== ALWAYS TAKEN
2008230: f6 06 20 24 ld [ %i0 + 0x24 ], %i3
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
2008234: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2008238: 96 10 00 11 mov %l1, %o3
200823c: 92 10 20 01 mov 1, %o1
2008240: 15 00 80 6c sethi %hi(0x201b000), %o2
2008244: b0 10 20 00 clr %i0
2008248: 9f c4 80 00 call %l2
200824c: 94 12 a2 f8 or %o2, 0x2f8, %o2
2008250: 81 c7 e0 08 ret
2008254: 81 e8 00 00 restore
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
2008258: 98 10 00 15 mov %l5, %o4
200825c: 92 10 20 01 mov 1, %o1
2008260: 15 00 80 6c sethi %hi(0x201b000), %o2
2008264: b0 10 20 00 clr %i0
2008268: 9f c4 80 00 call %l2
200826c: 94 12 a2 b0 or %o2, 0x2b0, %o2
2008270: 81 c7 e0 08 ret
2008274: 81 e8 00 00 restore
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
2008278: 90 10 00 19 mov %i1, %o0
200827c: 92 10 20 01 mov 1, %o1
2008280: 15 00 80 6c sethi %hi(0x201b000), %o2
2008284: b0 10 20 00 clr %i0
2008288: 9f c4 80 00 call %l2
200828c: 94 12 a1 e8 or %o2, 0x1e8, %o2
2008290: 81 c7 e0 08 ret
2008294: 81 e8 00 00 restore
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
2008298: 90 10 00 19 mov %i1, %o0
200829c: 96 10 00 15 mov %l5, %o3
20082a0: 92 10 20 01 mov 1, %o1
20082a4: 15 00 80 6c sethi %hi(0x201b000), %o2
20082a8: b0 10 20 00 clr %i0
20082ac: 9f c4 80 00 call %l2
20082b0: 94 12 a2 00 or %o2, 0x200, %o2
20082b4: 81 c7 e0 08 ret
20082b8: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
20082bc: 90 10 00 19 mov %i1, %o0
20082c0: 96 10 00 13 mov %l3, %o3
20082c4: 92 10 20 01 mov 1, %o1
20082c8: 15 00 80 6c sethi %hi(0x201b000), %o2
20082cc: b0 10 20 00 clr %i0
20082d0: 9f c4 80 00 call %l2
20082d4: 94 12 a2 20 or %o2, 0x220, %o2
20082d8: 81 c7 e0 08 ret
20082dc: 81 e8 00 00 restore
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
20082e0: 96 10 00 10 mov %l0, %o3
20082e4: 92 10 20 01 mov 1, %o1
20082e8: 15 00 80 6c sethi %hi(0x201b000), %o2
20082ec: b0 10 20 00 clr %i0
20082f0: 9f c4 80 00 call %l2
20082f4: 94 12 a2 48 or %o2, 0x248, %o2
20082f8: 81 c7 e0 08 ret
20082fc: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
2008300: 92 10 20 01 mov 1, %o1
2008304: 15 00 80 6c sethi %hi(0x201b000), %o2
2008308: b0 10 20 00 clr %i0
200830c: 9f c4 80 00 call %l2
2008310: 94 12 a2 80 or %o2, 0x280, %o2
2008314: 81 c7 e0 08 ret
2008318: 81 e8 00 00 restore
200831c: 80 a6 c0 11 cmp %i3, %l1
2008320: 0a bf ff c6 bcs 2008238 <_Heap_Walk+0x120> <== NEVER TAKEN
2008324: 90 10 00 19 mov %i1, %o0
);
return false;
}
if (
2008328: 90 04 60 08 add %l1, 8, %o0
200832c: 7f ff e5 e6 call 2001ac4 <.urem>
2008330: 92 10 00 1a mov %i2, %o1
2008334: 80 a2 20 00 cmp %o0, 0
2008338: 12 80 00 df bne 20086b4 <_Heap_Walk+0x59c> <== NEVER TAKEN
200833c: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2008340: c2 04 60 04 ld [ %l1 + 4 ], %g1
2008344: 82 08 7f fe and %g1, -2, %g1
2008348: 82 04 40 01 add %l1, %g1, %g1
200834c: c2 00 60 04 ld [ %g1 + 4 ], %g1
2008350: 80 88 60 01 btst 1, %g1
2008354: 12 80 00 ea bne 20086fc <_Heap_Walk+0x5e4> <== NEVER TAKEN
2008358: 96 10 00 11 mov %l1, %o3
);
return false;
}
if ( free_block->prev != prev_block ) {
200835c: d8 04 60 0c ld [ %l1 + 0xc ], %o4
2008360: 80 a6 00 0c cmp %i0, %o4
2008364: 02 80 00 19 be 20083c8 <_Heap_Walk+0x2b0> <== ALWAYS TAKEN
2008368: ba 10 00 11 mov %l1, %i5
200836c: 30 80 00 dc b,a 20086dc <_Heap_Walk+0x5c4> <== NOT EXECUTED
2008370: 0a bf ff b2 bcs 2008238 <_Heap_Walk+0x120>
2008374: 90 10 00 19 mov %i1, %o0
2008378: 80 a6 c0 11 cmp %i3, %l1
200837c: 0a bf ff b0 bcs 200823c <_Heap_Walk+0x124> <== NEVER TAKEN
2008380: 96 10 00 11 mov %l1, %o3
);
return false;
}
if (
2008384: 90 04 60 08 add %l1, 8, %o0
2008388: 7f ff e5 cf call 2001ac4 <.urem>
200838c: 92 10 00 1a mov %i2, %o1
2008390: 80 a2 20 00 cmp %o0, 0
2008394: 32 80 00 c8 bne,a 20086b4 <_Heap_Walk+0x59c>
2008398: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200839c: c2 04 60 04 ld [ %l1 + 4 ], %g1
20083a0: 82 08 7f fe and %g1, -2, %g1
20083a4: 82 00 40 11 add %g1, %l1, %g1
20083a8: c2 00 60 04 ld [ %g1 + 4 ], %g1
20083ac: 80 88 60 01 btst 1, %g1
20083b0: 32 80 00 d2 bne,a 20086f8 <_Heap_Walk+0x5e0>
20083b4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( free_block->prev != prev_block ) {
20083b8: d8 04 60 0c ld [ %l1 + 0xc ], %o4
20083bc: 80 a3 00 1d cmp %o4, %i5
20083c0: 12 80 00 c5 bne 20086d4 <_Heap_Walk+0x5bc>
20083c4: ba 10 00 11 mov %l1, %i5
return false;
}
prev_block = free_block;
free_block = free_block->next;
20083c8: e2 04 60 08 ld [ %l1 + 8 ], %l1
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 ) {
20083cc: 80 a6 00 11 cmp %i0, %l1
20083d0: 12 bf ff e8 bne 2008370 <_Heap_Walk+0x258>
20083d4: 80 a4 40 1c cmp %l1, %i4
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
20083d8: 80 a5 00 10 cmp %l4, %l0
20083dc: 02 bf ff 5f be 2008158 <_Heap_Walk+0x40> <== NEVER TAKEN
20083e0: 37 00 80 6c sethi %hi(0x201b000), %i3
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
20083e4: 35 00 80 6c sethi %hi(0x201b000), %i2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
20083e8: 39 00 80 6d sethi %hi(0x201b400), %i4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
20083ec: ba 10 00 15 mov %l5, %i5
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;
if ( prev_used ) {
(*printer)(
20083f0: b6 16 e3 a0 or %i3, 0x3a0, %i3
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
20083f4: b4 16 a3 b8 or %i2, 0x3b8, %i2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
20083f8: b8 17 20 b8 or %i4, 0xb8, %i4
20083fc: aa 10 00 14 mov %l4, %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;
2008400: ac 0d bf fe and %l6, -2, %l6
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;
if ( prev_used ) {
2008404: 80 a5 e0 00 cmp %l7, 0
2008408: 02 80 00 16 be 2008460 <_Heap_Walk+0x348>
200840c: a2 05 80 10 add %l6, %l0, %l1
(*printer)(
2008410: 90 10 00 19 mov %i1, %o0
2008414: 92 10 20 00 clr %o1
2008418: 94 10 00 1b mov %i3, %o2
200841c: 96 10 00 10 mov %l0, %o3
2008420: 9f c4 80 00 call %l2
2008424: 98 10 00 16 mov %l6, %o4
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
2008428: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
200842c: 80 a0 40 11 cmp %g1, %l1
2008430: 28 80 00 18 bleu,a 2008490 <_Heap_Walk+0x378> <== ALWAYS TAKEN
2008434: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
2008438: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200843c: 96 10 00 10 mov %l0, %o3
2008440: 98 10 00 11 mov %l1, %o4
2008444: 92 10 20 01 mov 1, %o1
2008448: 15 00 80 6c sethi %hi(0x201b000), %o2
200844c: b0 10 20 00 clr %i0
2008450: 9f c4 80 00 call %l2
2008454: 94 12 a3 e0 or %o2, 0x3e0, %o2
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
2008458: 81 c7 e0 08 ret
200845c: 81 e8 00 00 restore
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
2008460: da 04 00 00 ld [ %l0 ], %o5
2008464: 90 10 00 19 mov %i1, %o0
2008468: 92 10 20 00 clr %o1
200846c: 94 10 00 1a mov %i2, %o2
2008470: 96 10 00 10 mov %l0, %o3
2008474: 9f c4 80 00 call %l2
2008478: 98 10 00 16 mov %l6, %o4
200847c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2008480: 80 a0 40 11 cmp %g1, %l1
2008484: 18 bf ff ee bgu 200843c <_Heap_Walk+0x324> <== NEVER TAKEN
2008488: 90 10 00 19 mov %i1, %o0
200848c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
2008490: 80 a0 40 11 cmp %g1, %l1
2008494: 0a bf ff ea bcs 200843c <_Heap_Walk+0x324>
2008498: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
200849c: 90 10 00 16 mov %l6, %o0
20084a0: 7f ff e5 89 call 2001ac4 <.urem>
20084a4: 92 10 00 1d mov %i5, %o1
20084a8: 80 a2 20 00 cmp %o0, 0
20084ac: 12 80 00 5d bne 2008620 <_Heap_Walk+0x508>
20084b0: 80 a4 c0 16 cmp %l3, %l6
);
return false;
}
if ( block_size < min_block_size ) {
20084b4: 18 80 00 65 bgu 2008648 <_Heap_Walk+0x530>
20084b8: 80 a4 00 11 cmp %l0, %l1
);
return false;
}
if ( next_block_begin <= block_begin ) {
20084bc: 3a 80 00 6e bcc,a 2008674 <_Heap_Walk+0x55c>
20084c0: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
20084c4: c2 04 60 04 ld [ %l1 + 4 ], %g1
20084c8: 80 88 60 01 btst 1, %g1
20084cc: 12 80 00 40 bne 20085cc <_Heap_Walk+0x4b4>
20084d0: 80 a5 40 11 cmp %l5, %l1
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;
20084d4: e8 04 20 04 ld [ %l0 + 4 ], %l4
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)(
20084d8: d8 04 20 0c ld [ %l0 + 0xc ], %o4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
20084dc: c2 06 20 08 ld [ %i0 + 8 ], %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;
20084e0: ac 0d 3f fe and %l4, -2, %l6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
20084e4: 1b 00 80 6d sethi %hi(0x201b400), %o5
20084e8: 80 a0 40 0c cmp %g1, %o4
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
20084ec: c6 06 20 0c ld [ %i0 + 0xc ], %g3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
20084f0: ae 04 00 16 add %l0, %l6, %l7
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
20084f4: 02 80 00 07 be 2008510 <_Heap_Walk+0x3f8>
20084f8: 9a 13 60 a8 or %o5, 0xa8, %o5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
20084fc: 1b 00 80 6d sethi %hi(0x201b400), %o5
2008500: 80 a3 00 18 cmp %o4, %i0
2008504: 02 80 00 03 be 2008510 <_Heap_Walk+0x3f8>
2008508: 9a 13 60 c0 or %o5, 0xc0, %o5
200850c: 9a 10 00 1c mov %i4, %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)(
2008510: c2 04 20 08 ld [ %l0 + 8 ], %g1
2008514: 05 00 80 6d sethi %hi(0x201b400), %g2
2008518: 80 a0 c0 01 cmp %g3, %g1
200851c: 02 80 00 07 be 2008538 <_Heap_Walk+0x420>
2008520: 84 10 a0 d0 or %g2, 0xd0, %g2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
2008524: 05 00 80 6d sethi %hi(0x201b400), %g2
2008528: 80 a0 40 18 cmp %g1, %i0
200852c: 02 80 00 03 be 2008538 <_Heap_Walk+0x420>
2008530: 84 10 a0 e0 or %g2, 0xe0, %g2
2008534: 84 10 00 1c mov %i4, %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)(
2008538: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
200853c: c4 23 a0 60 st %g2, [ %sp + 0x60 ]
2008540: 90 10 00 19 mov %i1, %o0
2008544: 92 10 20 00 clr %o1
2008548: 15 00 80 6d sethi %hi(0x201b400), %o2
200854c: 96 10 00 10 mov %l0, %o3
2008550: 9f c4 80 00 call %l2
2008554: 94 12 a0 f0 or %o2, 0xf0, %o2
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
2008558: da 05 c0 00 ld [ %l7 ], %o5
200855c: 80 a5 80 0d cmp %l6, %o5
2008560: 02 80 00 0c be 2008590 <_Heap_Walk+0x478>
2008564: 90 10 00 19 mov %i1, %o0
(*printer)(
2008568: ee 23 a0 5c st %l7, [ %sp + 0x5c ]
200856c: 96 10 00 10 mov %l0, %o3
2008570: 98 10 00 16 mov %l6, %o4
2008574: 92 10 20 01 mov 1, %o1
2008578: 15 00 80 6d sethi %hi(0x201b400), %o2
200857c: b0 10 20 00 clr %i0
2008580: 9f c4 80 00 call %l2
2008584: 94 12 a1 20 or %o2, 0x120, %o2
2008588: 81 c7 e0 08 ret
200858c: 81 e8 00 00 restore
);
return false;
}
if ( !prev_used ) {
2008590: 80 8d 20 01 btst 1, %l4
2008594: 02 80 00 1c be 2008604 <_Heap_Walk+0x4ec>
2008598: 96 10 00 10 mov %l0, %o3
200859c: 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 ) {
20085a0: 80 a0 40 18 cmp %g1, %i0
20085a4: 12 80 00 07 bne 20085c0 <_Heap_Walk+0x4a8> <== ALWAYS TAKEN
20085a8: 80 a0 40 10 cmp %g1, %l0
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
20085ac: 10 80 00 0f b 20085e8 <_Heap_Walk+0x4d0> <== NOT EXECUTED
20085b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
)
{
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 ) {
20085b4: 80 a0 40 18 cmp %g1, %i0
20085b8: 02 80 00 0a be 20085e0 <_Heap_Walk+0x4c8>
20085bc: 80 a0 40 10 cmp %g1, %l0
if ( free_block == block ) {
20085c0: 32 bf ff fd bne,a 20085b4 <_Heap_Walk+0x49c>
20085c4: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
20085c8: 80 a5 40 11 cmp %l5, %l1
20085cc: 02 bf fe e3 be 2008158 <_Heap_Walk+0x40>
20085d0: a0 10 00 11 mov %l1, %l0
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 ) {
20085d4: ec 04 60 04 ld [ %l1 + 4 ], %l6
20085d8: 10 bf ff 8a b 2008400 <_Heap_Walk+0x2e8>
20085dc: ae 0d a0 01 and %l6, 1, %l7
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
20085e0: 90 10 00 19 mov %i1, %o0
20085e4: 96 10 00 10 mov %l0, %o3
20085e8: 92 10 20 01 mov 1, %o1
20085ec: 15 00 80 6d sethi %hi(0x201b400), %o2
20085f0: b0 10 20 00 clr %i0
20085f4: 9f c4 80 00 call %l2
20085f8: 94 12 a1 90 or %o2, 0x190, %o2
20085fc: 81 c7 e0 08 ret
2008600: 81 e8 00 00 restore
return false;
}
if ( !prev_used ) {
(*printer)(
2008604: 92 10 20 01 mov 1, %o1
2008608: 15 00 80 6d sethi %hi(0x201b400), %o2
200860c: b0 10 20 00 clr %i0
2008610: 9f c4 80 00 call %l2
2008614: 94 12 a1 60 or %o2, 0x160, %o2
2008618: 81 c7 e0 08 ret
200861c: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
2008620: 90 10 00 19 mov %i1, %o0
2008624: 96 10 00 10 mov %l0, %o3
2008628: 98 10 00 16 mov %l6, %o4
200862c: 92 10 20 01 mov 1, %o1
2008630: 15 00 80 6d sethi %hi(0x201b400), %o2
2008634: b0 10 20 00 clr %i0
2008638: 9f c4 80 00 call %l2
200863c: 94 12 a0 10 or %o2, 0x10, %o2
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
2008640: 81 c7 e0 08 ret
2008644: 81 e8 00 00 restore
}
if ( block_size < min_block_size ) {
(*printer)(
2008648: 90 10 00 19 mov %i1, %o0
200864c: 96 10 00 10 mov %l0, %o3
2008650: 98 10 00 16 mov %l6, %o4
2008654: 9a 10 00 13 mov %l3, %o5
2008658: 92 10 20 01 mov 1, %o1
200865c: 15 00 80 6d sethi %hi(0x201b400), %o2
2008660: b0 10 20 00 clr %i0
2008664: 9f c4 80 00 call %l2
2008668: 94 12 a0 40 or %o2, 0x40, %o2
block,
block_size,
min_block_size
);
return false;
200866c: 81 c7 e0 08 ret
2008670: 81 e8 00 00 restore
}
if ( next_block_begin <= block_begin ) {
(*printer)(
2008674: 96 10 00 10 mov %l0, %o3
2008678: 98 10 00 11 mov %l1, %o4
200867c: 92 10 20 01 mov 1, %o1
2008680: 15 00 80 6d sethi %hi(0x201b400), %o2
2008684: b0 10 20 00 clr %i0
2008688: 9f c4 80 00 call %l2
200868c: 94 12 a0 70 or %o2, 0x70, %o2
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
2008690: 81 c7 e0 08 ret
2008694: 81 e8 00 00 restore
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
2008698: 92 10 20 01 mov 1, %o1
200869c: 15 00 80 6c sethi %hi(0x201b000), %o2
20086a0: b0 10 20 00 clr %i0
20086a4: 9f c4 80 00 call %l2
20086a8: 94 12 a2 e0 or %o2, 0x2e0, %o2
20086ac: 81 c7 e0 08 ret
20086b0: 81 e8 00 00 restore
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
20086b4: 96 10 00 11 mov %l1, %o3
20086b8: 92 10 20 01 mov 1, %o1
20086bc: 15 00 80 6c sethi %hi(0x201b000), %o2
20086c0: b0 10 20 00 clr %i0
20086c4: 9f c4 80 00 call %l2
20086c8: 94 12 a3 18 or %o2, 0x318, %o2
20086cc: 81 c7 e0 08 ret
20086d0: 81 e8 00 00 restore
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
20086d4: 90 10 00 19 mov %i1, %o0
20086d8: 96 10 00 11 mov %l1, %o3
20086dc: 92 10 20 01 mov 1, %o1
20086e0: 15 00 80 6c sethi %hi(0x201b000), %o2
20086e4: b0 10 20 00 clr %i0
20086e8: 9f c4 80 00 call %l2
20086ec: 94 12 a3 68 or %o2, 0x368, %o2
20086f0: 81 c7 e0 08 ret
20086f4: 81 e8 00 00 restore
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
20086f8: 96 10 00 11 mov %l1, %o3
20086fc: 92 10 20 01 mov 1, %o1
2008700: 15 00 80 6c sethi %hi(0x201b000), %o2
2008704: b0 10 20 00 clr %i0
2008708: 9f c4 80 00 call %l2
200870c: 94 12 a3 48 or %o2, 0x348, %o2
2008710: 81 c7 e0 08 ret
2008714: 81 e8 00 00 restore
020066dc <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
20066dc: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
20066e0: 23 00 80 6e sethi %hi(0x201b800), %l1
20066e4: c2 04 60 dc ld [ %l1 + 0xdc ], %g1 ! 201b8dc <_IO_Number_of_drivers>
20066e8: 80 a0 60 00 cmp %g1, 0
20066ec: 02 80 00 0c be 200671c <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
20066f0: a2 14 60 dc or %l1, 0xdc, %l1
20066f4: a0 10 20 00 clr %l0
(void) rtems_io_initialize( major, 0, NULL );
20066f8: 90 10 00 10 mov %l0, %o0
20066fc: 92 10 20 00 clr %o1
2006700: 40 00 16 28 call 200bfa0 <rtems_io_initialize>
2006704: 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 ++ )
2006708: c2 04 40 00 ld [ %l1 ], %g1
200670c: a0 04 20 01 inc %l0
2006710: 80 a0 40 10 cmp %g1, %l0
2006714: 18 bf ff fa bgu 20066fc <_IO_Initialize_all_drivers+0x20>
2006718: 90 10 00 10 mov %l0, %o0
200671c: 81 c7 e0 08 ret
2006720: 81 e8 00 00 restore
02006724 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
2006724: 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;
2006728: 03 00 80 6a sethi %hi(0x201a800), %g1
200672c: 82 10 63 78 or %g1, 0x378, %g1 ! 201ab78 <Configuration>
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
2006730: e6 00 60 2c ld [ %g1 + 0x2c ], %l3
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
2006734: e2 00 60 30 ld [ %g1 + 0x30 ], %l1
/*
* 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 )
2006738: 80 a4 40 13 cmp %l1, %l3
200673c: 0a 80 00 08 bcs 200675c <_IO_Manager_initialization+0x38>
2006740: e0 00 60 34 ld [ %g1 + 0x34 ], %l0
* 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;
2006744: 03 00 80 6e sethi %hi(0x201b800), %g1
2006748: e0 20 60 e0 st %l0, [ %g1 + 0xe0 ] ! 201b8e0 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
200674c: 03 00 80 6e sethi %hi(0x201b800), %g1
2006750: e2 20 60 dc st %l1, [ %g1 + 0xdc ] ! 201b8dc <_IO_Number_of_drivers>
return;
2006754: 81 c7 e0 08 ret
2006758: 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 )
200675c: 83 2c e0 03 sll %l3, 3, %g1
2006760: a5 2c e0 05 sll %l3, 5, %l2
2006764: a4 24 80 01 sub %l2, %g1, %l2
/*
* 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 *)
2006768: 40 00 0c 45 call 200987c <_Workspace_Allocate_or_fatal_error>
200676c: 90 10 00 12 mov %l2, %o0
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
2006770: 03 00 80 6e sethi %hi(0x201b800), %g1
memset(
2006774: 94 10 00 12 mov %l2, %o2
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
2006778: e6 20 60 dc st %l3, [ %g1 + 0xdc ]
/*
* 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 *)
200677c: 25 00 80 6e sethi %hi(0x201b800), %l2
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
2006780: 92 10 20 00 clr %o1
2006784: 40 00 22 e9 call 200f328 <memset>
2006788: d0 24 a0 e0 st %o0, [ %l2 + 0xe0 ]
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
200678c: 80 a4 60 00 cmp %l1, 0
2006790: 02 bf ff f1 be 2006754 <_IO_Manager_initialization+0x30> <== NEVER TAKEN
2006794: da 04 a0 e0 ld [ %l2 + 0xe0 ], %o5
2006798: 82 10 20 00 clr %g1
200679c: 88 10 20 00 clr %g4
_IO_Driver_address_table[index] = driver_table[index];
20067a0: c4 04 00 01 ld [ %l0 + %g1 ], %g2
20067a4: 86 04 00 01 add %l0, %g1, %g3
20067a8: c4 23 40 01 st %g2, [ %o5 + %g1 ]
20067ac: d8 00 e0 04 ld [ %g3 + 4 ], %o4
20067b0: 84 03 40 01 add %o5, %g1, %g2
20067b4: d8 20 a0 04 st %o4, [ %g2 + 4 ]
20067b8: d8 00 e0 08 ld [ %g3 + 8 ], %o4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20067bc: 88 01 20 01 inc %g4
_IO_Driver_address_table[index] = driver_table[index];
20067c0: d8 20 a0 08 st %o4, [ %g2 + 8 ]
20067c4: d8 00 e0 0c ld [ %g3 + 0xc ], %o4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20067c8: 82 00 60 18 add %g1, 0x18, %g1
_IO_Driver_address_table[index] = driver_table[index];
20067cc: d8 20 a0 0c st %o4, [ %g2 + 0xc ]
20067d0: d8 00 e0 10 ld [ %g3 + 0x10 ], %o4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20067d4: 80 a4 40 04 cmp %l1, %g4
_IO_Driver_address_table[index] = driver_table[index];
20067d8: d8 20 a0 10 st %o4, [ %g2 + 0x10 ]
20067dc: 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++ )
20067e0: 18 bf ff f0 bgu 20067a0 <_IO_Manager_initialization+0x7c>
20067e4: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
20067e8: 81 c7 e0 08 ret
20067ec: 81 e8 00 00 restore
020073a0 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
20073a0: 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 )
20073a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
20073a8: a0 10 00 18 mov %i0, %l0
* 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 )
20073ac: 80 a0 60 00 cmp %g1, 0
20073b0: 02 80 00 19 be 2007414 <_Objects_Allocate+0x74> <== NEVER TAKEN
20073b4: 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 );
20073b8: a2 04 20 20 add %l0, 0x20, %l1
20073bc: 40 00 13 1a call 200c024 <_Chain_Get>
20073c0: 90 10 00 11 mov %l1, %o0
if ( information->auto_extend ) {
20073c4: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1
20073c8: 80 a0 60 00 cmp %g1, 0
20073cc: 02 80 00 12 be 2007414 <_Objects_Allocate+0x74>
20073d0: 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 ) {
20073d4: 80 a2 20 00 cmp %o0, 0
20073d8: 02 80 00 11 be 200741c <_Objects_Allocate+0x7c>
20073dc: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
20073e0: c2 14 20 0a lduh [ %l0 + 0xa ], %g1
20073e4: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20073e8: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1
20073ec: 40 00 42 88 call 2017e0c <.udiv>
20073f0: 90 22 00 01 sub %o0, %g1, %o0
20073f4: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
20073f8: 91 2a 20 02 sll %o0, 2, %o0
information->inactive--;
20073fc: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2007400: c4 00 40 08 ld [ %g1 + %o0 ], %g2
information->inactive--;
2007404: 86 00 ff ff add %g3, -1, %g3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2007408: 84 00 bf ff add %g2, -1, %g2
information->inactive--;
200740c: c6 34 20 2c sth %g3, [ %l0 + 0x2c ]
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2007410: c4 20 40 08 st %g2, [ %g1 + %o0 ]
information->inactive--;
}
}
return the_object;
}
2007414: 81 c7 e0 08 ret
2007418: 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 );
200741c: 40 00 00 11 call 2007460 <_Objects_Extend_information>
2007420: 90 10 00 10 mov %l0, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2007424: 40 00 13 00 call 200c024 <_Chain_Get>
2007428: 90 10 00 11 mov %l1, %o0
}
if ( the_object ) {
200742c: b0 92 20 00 orcc %o0, 0, %i0
2007430: 32 bf ff ed bne,a 20073e4 <_Objects_Allocate+0x44>
2007434: c2 14 20 0a lduh [ %l0 + 0xa ], %g1
information->inactive--;
}
}
return the_object;
}
2007438: 81 c7 e0 08 ret
200743c: 81 e8 00 00 restore
02007460 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
2007460: 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 )
2007464: e8 06 20 34 ld [ %i0 + 0x34 ], %l4
2007468: 80 a5 20 00 cmp %l4, 0
200746c: 02 80 00 ab be 2007718 <_Objects_Extend_information+0x2b8>
2007470: e6 16 20 0a lduh [ %i0 + 0xa ], %l3
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2007474: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5
2007478: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2
200747c: ab 2d 60 10 sll %l5, 0x10, %l5
2007480: 92 10 00 12 mov %l2, %o1
2007484: 40 00 42 62 call 2017e0c <.udiv>
2007488: 91 35 60 10 srl %l5, 0x10, %o0
200748c: 91 2a 20 10 sll %o0, 0x10, %o0
2007490: b9 32 20 10 srl %o0, 0x10, %i4
for ( ; block < block_count; block++ ) {
2007494: 80 a7 20 00 cmp %i4, 0
2007498: 02 80 00 a7 be 2007734 <_Objects_Extend_information+0x2d4><== NEVER TAKEN
200749c: 90 10 00 12 mov %l2, %o0
if ( information->object_blocks[ block ] == NULL )
20074a0: c2 05 00 00 ld [ %l4 ], %g1
20074a4: 80 a0 60 00 cmp %g1, 0
20074a8: 02 80 00 a4 be 2007738 <_Objects_Extend_information+0x2d8><== NEVER TAKEN
20074ac: a2 10 00 13 mov %l3, %l1
20074b0: 10 80 00 06 b 20074c8 <_Objects_Extend_information+0x68>
20074b4: a0 10 20 00 clr %l0
20074b8: c2 05 00 01 ld [ %l4 + %g1 ], %g1
20074bc: 80 a0 60 00 cmp %g1, 0
20074c0: 22 80 00 08 be,a 20074e0 <_Objects_Extend_information+0x80>
20074c4: ab 35 60 10 srl %l5, 0x10, %l5
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
20074c8: a0 04 20 01 inc %l0
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
20074cc: a2 04 40 12 add %l1, %l2, %l1
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
20074d0: 80 a7 00 10 cmp %i4, %l0
20074d4: 18 bf ff f9 bgu 20074b8 <_Objects_Extend_information+0x58>
20074d8: 83 2c 20 02 sll %l0, 2, %g1
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
20074dc: ab 35 60 10 srl %l5, 0x10, %l5
/*
* 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 ) {
20074e0: 03 00 00 3f sethi %hi(0xfc00), %g1
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
20074e4: aa 05 40 08 add %l5, %o0, %l5
/*
* 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 ) {
20074e8: 82 10 63 ff or %g1, 0x3ff, %g1
20074ec: 80 a5 40 01 cmp %l5, %g1
20074f0: 18 80 00 96 bgu 2007748 <_Objects_Extend_information+0x2e8><== NEVER TAKEN
20074f4: 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;
20074f8: 40 00 42 0b call 2017d24 <.umul>
20074fc: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
2007500: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2007504: 80 a0 60 00 cmp %g1, 0
2007508: 12 80 00 6d bne 20076bc <_Objects_Extend_information+0x25c>
200750c: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
2007510: 40 00 08 db call 200987c <_Workspace_Allocate_or_fatal_error>
2007514: 01 00 00 00 nop
2007518: a4 10 00 08 mov %o0, %l2
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
200751c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2007520: 80 a4 40 01 cmp %l1, %g1
2007524: 2a 80 00 43 bcs,a 2007630 <_Objects_Extend_information+0x1d0>
2007528: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
200752c: a8 07 20 01 add %i4, 1, %l4
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
2007530: 91 2d 20 01 sll %l4, 1, %o0
2007534: 90 02 00 14 add %o0, %l4, %o0
2007538: 90 05 40 08 add %l5, %o0, %o0
200753c: 90 02 00 13 add %o0, %l3, %o0
2007540: 40 00 08 de call 20098b8 <_Workspace_Allocate>
2007544: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
2007548: ac 92 20 00 orcc %o0, 0, %l6
200754c: 02 80 00 7d be 2007740 <_Objects_Extend_information+0x2e0>
2007550: a9 2d 20 02 sll %l4, 2, %l4
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2007554: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2007558: 80 a4 c0 01 cmp %l3, %g1
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
200755c: ae 05 80 14 add %l6, %l4, %l7
2007560: 0a 80 00 5e bcs 20076d8 <_Objects_Extend_information+0x278>
2007564: a8 05 c0 14 add %l7, %l4, %l4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2007568: 80 a4 e0 00 cmp %l3, 0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
200756c: 82 10 20 00 clr %g1
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2007570: 02 80 00 08 be 2007590 <_Objects_Extend_information+0x130><== NEVER TAKEN
2007574: bb 2f 20 02 sll %i4, 2, %i5
local_table[ index ] = NULL;
2007578: 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++ ) {
200757c: 82 00 60 01 inc %g1
2007580: 80 a4 c0 01 cmp %l3, %g1
2007584: 18 bf ff fd bgu 2007578 <_Objects_Extend_information+0x118><== NEVER TAKEN
2007588: c0 20 80 14 clr [ %g2 + %l4 ]
200758c: bb 2f 20 02 sll %i4, 2, %i5
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2007590: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
2007594: c0 25 c0 1d clr [ %l7 + %i5 ]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2007598: 86 04 40 03 add %l1, %g3, %g3
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
200759c: 80 a4 40 03 cmp %l1, %g3
20075a0: 1a 80 00 0a bcc 20075c8 <_Objects_Extend_information+0x168><== NEVER TAKEN
20075a4: c0 25 80 1d clr [ %l6 + %i5 ]
20075a8: 85 2c 60 02 sll %l1, 2, %g2
20075ac: 82 10 00 11 mov %l1, %g1
20075b0: 84 05 00 02 add %l4, %g2, %g2
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
20075b4: c0 20 80 00 clr [ %g2 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
20075b8: 82 00 60 01 inc %g1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
20075bc: 80 a0 40 03 cmp %g1, %g3
20075c0: 0a bf ff fd bcs 20075b4 <_Objects_Extend_information+0x154>
20075c4: 84 00 a0 04 add %g2, 4, %g2
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
20075c8: 7f ff eb 39 call 20022ac <sparc_disable_interrupts>
20075cc: 01 00 00 00 nop
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(
20075d0: c6 06 00 00 ld [ %i0 ], %g3
20075d4: c4 16 20 04 lduh [ %i0 + 4 ], %g2
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
20075d8: ea 36 20 10 sth %l5, [ %i0 + 0x10 ]
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
20075dc: e6 06 20 34 ld [ %i0 + 0x34 ], %l3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
20075e0: ee 26 20 30 st %l7, [ %i0 + 0x30 ]
information->local_table = local_table;
20075e4: e8 26 20 1c st %l4, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
20075e8: 87 28 e0 18 sll %g3, 0x18, %g3
20075ec: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
20075f0: ec 26 20 34 st %l6, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
20075f4: ab 2d 60 10 sll %l5, 0x10, %l5
20075f8: 03 00 00 40 sethi %hi(0x10000), %g1
20075fc: ab 35 60 10 srl %l5, 0x10, %l5
2007600: 82 10 c0 01 or %g3, %g1, %g1
2007604: 82 10 40 02 or %g1, %g2, %g1
2007608: 82 10 40 15 or %g1, %l5, %g1
200760c: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
2007610: 7f ff eb 2b call 20022bc <sparc_enable_interrupts>
2007614: 01 00 00 00 nop
if ( old_tables )
2007618: 80 a4 e0 00 cmp %l3, 0
200761c: 22 80 00 05 be,a 2007630 <_Objects_Extend_information+0x1d0>
2007620: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
_Workspace_Free( old_tables );
2007624: 40 00 08 ae call 20098dc <_Workspace_Free>
2007628: 90 10 00 13 mov %l3, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
200762c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2007630: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
2007634: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
2007638: 92 10 00 12 mov %l2, %o1
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
200763c: a1 2c 20 02 sll %l0, 2, %l0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2007640: a6 06 20 20 add %i0, 0x20, %l3
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
2007644: e4 20 40 10 st %l2, [ %g1 + %l0 ]
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
2007648: 29 00 00 40 sethi %hi(0x10000), %l4
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
200764c: a4 07 bf f4 add %fp, -12, %l2
2007650: 40 00 12 88 call 200c070 <_Chain_Initialize>
2007654: 90 10 00 12 mov %l2, %o0
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2007658: 30 80 00 0c b,a 2007688 <_Objects_Extend_information+0x228>
the_object->id = _Objects_Build_id(
200765c: c4 16 20 04 lduh [ %i0 + 4 ], %g2
2007660: 83 28 60 18 sll %g1, 0x18, %g1
2007664: 85 28 a0 1b sll %g2, 0x1b, %g2
2007668: 82 10 40 14 or %g1, %l4, %g1
200766c: 82 10 40 02 or %g1, %g2, %g1
2007670: 82 10 40 11 or %g1, %l1, %g1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2007674: 92 10 00 08 mov %o0, %o1
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
2007678: c2 22 20 08 st %g1, [ %o0 + 8 ]
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
200767c: a2 04 60 01 inc %l1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2007680: 7f ff fc e2 call 2006a08 <_Chain_Append>
2007684: 90 10 00 13 mov %l3, %o0
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2007688: 40 00 12 67 call 200c024 <_Chain_Get>
200768c: 90 10 00 12 mov %l2, %o0
2007690: 80 a2 20 00 cmp %o0, 0
2007694: 32 bf ff f2 bne,a 200765c <_Objects_Extend_information+0x1fc>
2007698: c2 06 00 00 ld [ %i0 ], %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
200769c: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
20076a0: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
20076a4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive =
20076a8: 82 01 00 01 add %g4, %g1, %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
20076ac: c8 20 80 10 st %g4, [ %g2 + %l0 ]
information->inactive =
20076b0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
20076b4: 81 c7 e0 08 ret
20076b8: 81 e8 00 00 restore
* 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;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
20076bc: 40 00 08 7f call 20098b8 <_Workspace_Allocate>
20076c0: 01 00 00 00 nop
if ( !new_object_block )
20076c4: a4 92 20 00 orcc %o0, 0, %l2
20076c8: 32 bf ff 96 bne,a 2007520 <_Objects_Extend_information+0xc0>
20076cc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
20076d0: 81 c7 e0 08 ret
20076d4: 81 e8 00 00 restore
/*
* 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,
20076d8: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
20076dc: bb 2f 20 02 sll %i4, 2, %i5
/*
* 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,
20076e0: 40 00 1e d3 call 200f22c <memcpy>
20076e4: 94 10 00 1d mov %i5, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
20076e8: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
20076ec: 94 10 00 1d mov %i5, %o2
20076f0: 40 00 1e cf call 200f22c <memcpy>
20076f4: 90 10 00 17 mov %l7, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
20076f8: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2
20076fc: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
2007700: 94 04 c0 0a add %l3, %o2, %o2
2007704: 90 10 00 14 mov %l4, %o0
2007708: 40 00 1e c9 call 200f22c <memcpy>
200770c: 95 2a a0 02 sll %o2, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2007710: 10 bf ff a1 b 2007594 <_Objects_Extend_information+0x134>
2007714: 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 )
2007718: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5
200771c: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
2007720: ab 2d 60 10 sll %l5, 0x10, %l5
2007724: a2 10 00 13 mov %l3, %l1
2007728: a0 10 20 00 clr %l0
200772c: 10 bf ff 6c b 20074dc <_Objects_Extend_information+0x7c>
2007730: b8 10 20 00 clr %i4
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
2007734: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED
2007738: 10 bf ff 69 b 20074dc <_Objects_Extend_information+0x7c> <== NOT EXECUTED
200773c: a0 10 20 00 clr %l0 <== 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 );
2007740: 40 00 08 67 call 20098dc <_Workspace_Free>
2007744: 90 10 00 12 mov %l2, %o0
return;
2007748: 81 c7 e0 08 ret
200774c: 81 e8 00 00 restore
020077fc <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
20077fc: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
2007800: 80 a6 60 00 cmp %i1, 0
2007804: 12 80 00 04 bne 2007814 <_Objects_Get_information+0x18>
2007808: 01 00 00 00 nop
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
200780c: 81 c7 e0 08 ret
2007810: 91 e8 20 00 restore %g0, 0, %o0
/*
* 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 );
2007814: 40 00 13 b2 call 200c6dc <_Objects_API_maximum_class>
2007818: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
200781c: 80 a2 20 00 cmp %o0, 0
2007820: 22 80 00 15 be,a 2007874 <_Objects_Get_information+0x78>
2007824: b0 10 20 00 clr %i0
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
2007828: 80 a6 40 08 cmp %i1, %o0
200782c: 38 80 00 12 bgu,a 2007874 <_Objects_Get_information+0x78>
2007830: b0 10 20 00 clr %i0
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2007834: b1 2e 20 02 sll %i0, 2, %i0
2007838: 03 00 80 6d sethi %hi(0x201b400), %g1
200783c: 82 10 61 70 or %g1, 0x170, %g1 ! 201b570 <_Objects_Information_table>
2007840: c2 00 40 18 ld [ %g1 + %i0 ], %g1
2007844: 80 a0 60 00 cmp %g1, 0
2007848: 02 80 00 0b be 2007874 <_Objects_Get_information+0x78> <== NEVER TAKEN
200784c: b0 10 20 00 clr %i0
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
2007850: b3 2e 60 02 sll %i1, 2, %i1
2007854: f0 00 40 19 ld [ %g1 + %i1 ], %i0
if ( !info )
2007858: 80 a6 20 00 cmp %i0, 0
200785c: 02 80 00 06 be 2007874 <_Objects_Get_information+0x78> <== NEVER TAKEN
2007860: 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 )
2007864: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2007868: 80 a0 60 00 cmp %g1, 0
200786c: 22 80 00 02 be,a 2007874 <_Objects_Get_information+0x78>
2007870: b0 10 20 00 clr %i0
return NULL;
#endif
return info;
}
2007874: 81 c7 e0 08 ret
2007878: 81 e8 00 00 restore
020095e4 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
20095e4: 9d e3 bf 90 save %sp, -112, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
20095e8: 80 a6 60 00 cmp %i1, 0
20095ec: 12 80 00 05 bne 2009600 <_Objects_Get_name_as_string+0x1c>
20095f0: 80 a6 a0 00 cmp %i2, 0
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
20095f4: b4 10 20 00 clr %i2
}
return NULL; /* unreachable path */
}
20095f8: 81 c7 e0 08 ret
20095fc: 91 e8 00 1a restore %g0, %i2, %o0
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
2009600: 02 bf ff fe be 20095f8 <_Objects_Get_name_as_string+0x14>
2009604: 80 a6 20 00 cmp %i0, 0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2009608: 12 80 00 04 bne 2009618 <_Objects_Get_name_as_string+0x34>
200960c: 03 00 80 a7 sethi %hi(0x2029c00), %g1
2009610: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 2029c60 <_Thread_Executing>
2009614: f0 00 60 08 ld [ %g1 + 8 ], %i0
information = _Objects_Get_information_id( tmpId );
2009618: 7f ff ff af call 20094d4 <_Objects_Get_information_id>
200961c: 90 10 00 18 mov %i0, %o0
if ( !information )
2009620: 80 a2 20 00 cmp %o0, 0
2009624: 22 bf ff f5 be,a 20095f8 <_Objects_Get_name_as_string+0x14>
2009628: b4 10 20 00 clr %i2
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
200962c: 92 10 00 18 mov %i0, %o1
2009630: 40 00 00 2f call 20096ec <_Objects_Get>
2009634: 94 07 bf fc add %fp, -4, %o2
switch ( location ) {
2009638: c2 07 bf fc ld [ %fp + -4 ], %g1
200963c: 80 a0 60 00 cmp %g1, 0
2009640: 32 bf ff ee bne,a 20095f8 <_Objects_Get_name_as_string+0x14>
2009644: b4 10 20 00 clr %i2
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
2009648: 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';
200964c: c0 2f bf f4 clrb [ %fp + -12 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2009650: 87 30 60 18 srl %g1, 0x18, %g3
lname[ 1 ] = (u32_name >> 16) & 0xff;
2009654: 85 30 60 10 srl %g1, 0x10, %g2
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
2009658: c2 2f bf f3 stb %g1, [ %fp + -13 ]
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
200965c: c4 2f bf f1 stb %g2, [ %fp + -15 ]
lname[ 2 ] = (u32_name >> 8) & 0xff;
2009660: 83 30 60 08 srl %g1, 8, %g1
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2009664: c6 2f bf f0 stb %g3, [ %fp + -16 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
2009668: c2 2f bf f2 stb %g1, [ %fp + -14 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
200966c: b2 86 7f ff addcc %i1, -1, %i1
2009670: 02 80 00 1d be 20096e4 <_Objects_Get_name_as_string+0x100><== NEVER TAKEN
2009674: 84 10 00 03 mov %g3, %g2
2009678: 80 a0 e0 00 cmp %g3, 0
200967c: 02 80 00 1a be 20096e4 <_Objects_Get_name_as_string+0x100>
2009680: 17 00 80 85 sethi %hi(0x2021400), %o3
2009684: 86 10 00 1a mov %i2, %g3
2009688: 96 12 e0 b8 or %o3, 0xb8, %o3
200968c: 82 10 20 00 clr %g1
2009690: 10 80 00 06 b 20096a8 <_Objects_Get_name_as_string+0xc4>
2009694: 98 07 bf f0 add %fp, -16, %o4
2009698: c8 4b 00 01 ldsb [ %o4 + %g1 ], %g4
200969c: 80 a1 20 00 cmp %g4, 0
20096a0: 02 80 00 0e be 20096d8 <_Objects_Get_name_as_string+0xf4>
20096a4: c4 0b 00 01 ldub [ %o4 + %g1 ], %g2
*d = (isprint((unsigned char)*s)) ? *s : '*';
20096a8: da 02 c0 00 ld [ %o3 ], %o5
20096ac: 88 08 a0 ff and %g2, 0xff, %g4
20096b0: 88 03 40 04 add %o5, %g4, %g4
20096b4: c8 49 20 01 ldsb [ %g4 + 1 ], %g4
20096b8: 80 89 20 97 btst 0x97, %g4
20096bc: 12 80 00 03 bne 20096c8 <_Objects_Get_name_as_string+0xe4>
20096c0: 82 00 60 01 inc %g1
20096c4: 84 10 20 2a mov 0x2a, %g2
20096c8: c4 28 c0 00 stb %g2, [ %g3 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
20096cc: 80 a0 40 19 cmp %g1, %i1
20096d0: 0a bf ff f2 bcs 2009698 <_Objects_Get_name_as_string+0xb4>
20096d4: 86 00 e0 01 inc %g3
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
20096d8: 40 00 02 5d call 200a04c <_Thread_Enable_dispatch>
20096dc: c0 28 c0 00 clrb [ %g3 ]
return name;
20096e0: 30 bf ff c6 b,a 20095f8 <_Objects_Get_name_as_string+0x14>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
20096e4: 10 bf ff fd b 20096d8 <_Objects_Get_name_as_string+0xf4>
20096e8: 86 10 00 1a mov %i2, %g3
02018d78 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
2018d78: c4 02 20 08 ld [ %o0 + 8 ], %g2
if ( information->maximum >= index ) {
2018d7c: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
2018d80: 84 22 40 02 sub %o1, %g2, %g2
2018d84: 84 00 a0 01 inc %g2
if ( information->maximum >= index ) {
2018d88: 80 a0 80 01 cmp %g2, %g1
2018d8c: 18 80 00 09 bgu 2018db0 <_Objects_Get_no_protection+0x38>
2018d90: 85 28 a0 02 sll %g2, 2, %g2
if ( (the_object = information->local_table[ index ]) != NULL ) {
2018d94: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2018d98: d0 00 40 02 ld [ %g1 + %g2 ], %o0
2018d9c: 80 a2 20 00 cmp %o0, 0
2018da0: 02 80 00 05 be 2018db4 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
2018da4: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
return the_object;
2018da8: 81 c3 e0 08 retl
2018dac: c0 22 80 00 clr [ %o2 ]
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
2018db0: 82 10 20 01 mov 1, %g1
2018db4: 90 10 20 00 clr %o0
return NULL;
}
2018db8: 81 c3 e0 08 retl
2018dbc: c2 22 80 00 st %g1, [ %o2 ]
0200906c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
200906c: 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;
2009070: 92 96 20 00 orcc %i0, 0, %o1
2009074: 12 80 00 06 bne 200908c <_Objects_Id_to_name+0x20>
2009078: 83 32 60 18 srl %o1, 0x18, %g1
200907c: 03 00 80 83 sethi %hi(0x2020c00), %g1
2009080: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 ! 2020fe0 <_Thread_Executing>
2009084: d2 00 60 08 ld [ %g1 + 8 ], %o1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
2009088: 83 32 60 18 srl %o1, 0x18, %g1
200908c: 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 )
2009090: 84 00 7f ff add %g1, -1, %g2
2009094: 80 a0 a0 03 cmp %g2, 3
2009098: 18 80 00 18 bgu 20090f8 <_Objects_Id_to_name+0x8c>
200909c: 83 28 60 02 sll %g1, 2, %g1
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
20090a0: 05 00 80 83 sethi %hi(0x2020c00), %g2
20090a4: 84 10 a2 80 or %g2, 0x280, %g2 ! 2020e80 <_Objects_Information_table>
20090a8: c2 00 80 01 ld [ %g2 + %g1 ], %g1
20090ac: 80 a0 60 00 cmp %g1, 0
20090b0: 02 80 00 12 be 20090f8 <_Objects_Id_to_name+0x8c>
20090b4: 85 32 60 1b srl %o1, 0x1b, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
20090b8: 85 28 a0 02 sll %g2, 2, %g2
20090bc: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
20090c0: 80 a2 20 00 cmp %o0, 0
20090c4: 02 80 00 0d be 20090f8 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN
20090c8: 01 00 00 00 nop
#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 );
20090cc: 7f ff ff cb call 2008ff8 <_Objects_Get>
20090d0: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
20090d4: 80 a2 20 00 cmp %o0, 0
20090d8: 02 80 00 08 be 20090f8 <_Objects_Id_to_name+0x8c>
20090dc: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
20090e0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
20090e4: b0 10 20 00 clr %i0
20090e8: 40 00 02 6f call 2009aa4 <_Thread_Enable_dispatch>
20090ec: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
20090f0: 81 c7 e0 08 ret
20090f4: 81 e8 00 00 restore
}
20090f8: 81 c7 e0 08 ret
20090fc: 91 e8 20 03 restore %g0, 3, %o0
02007964 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
2007964: 9d e3 bf a0 save %sp, -96, %sp
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
2007968: 05 00 80 6d sethi %hi(0x201b400), %g2
200796c: 83 2e 60 02 sll %i1, 2, %g1
2007970: 84 10 a1 70 or %g2, 0x170, %g2
2007974: c2 00 80 01 ld [ %g2 + %g1 ], %g1
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
2007978: 85 2f 20 10 sll %i4, 0x10, %g2
200797c: 85 30 a0 10 srl %g2, 0x10, %g2
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
2007980: 87 2e a0 02 sll %i2, 2, %g3
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
2007984: c4 26 20 18 st %g2, [ %i0 + 0x18 ]
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
2007988: f0 20 40 03 st %i0, [ %g1 + %g3 ]
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
200798c: 85 36 e0 1f srl %i3, 0x1f, %g2
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
2007990: 03 20 00 00 sethi %hi(0x80000000), %g1
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
2007994: f2 26 00 00 st %i1, [ %i0 ]
information->the_class = the_class;
2007998: f4 36 20 04 sth %i2, [ %i0 + 4 ]
information->size = size;
information->local_table = 0;
200799c: c0 26 20 1c clr [ %i0 + 0x1c ]
information->inactive_per_block = 0;
20079a0: c0 26 20 30 clr [ %i0 + 0x30 ]
information->object_blocks = 0;
20079a4: c0 26 20 34 clr [ %i0 + 0x34 ]
information->inactive = 0;
20079a8: c0 36 20 2c clrh [ %i0 + 0x2c ]
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
20079ac: c0 36 20 10 clrh [ %i0 + 0x10 ]
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
20079b0: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ]
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
20079b4: b6 2e c0 01 andn %i3, %g1, %i3
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
20079b8: 80 a0 a0 00 cmp %g2, 0
20079bc: 02 80 00 05 be 20079d0 <_Objects_Initialize_information+0x6c>
20079c0: c2 07 a0 5c ld [ %fp + 0x5c ], %g1
20079c4: 80 a6 e0 00 cmp %i3, 0
20079c8: 02 80 00 28 be 2007a68 <_Objects_Initialize_information+0x104>
20079cc: 90 10 20 00 clr %o0
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
20079d0: 07 00 80 6c sethi %hi(0x201b000), %g3
20079d4: 86 10 e2 bc or %g3, 0x2bc, %g3 ! 201b2bc <null_local_table.3567>
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
20079d8: 80 a0 00 1b cmp %g0, %i3
20079dc: b3 2e 60 18 sll %i1, 0x18, %i1
20079e0: 84 40 20 00 addx %g0, 0, %g2
20079e4: b5 2e a0 1b sll %i2, 0x1b, %i2
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
20079e8: c6 26 20 1c st %g3, [ %i0 + 0x1c ]
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
20079ec: f6 36 20 14 sth %i3, [ %i0 + 0x14 ]
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
20079f0: 07 00 00 40 sethi %hi(0x10000), %g3
20079f4: b2 16 40 03 or %i1, %g3, %i1
20079f8: b4 16 40 1a or %i1, %i2, %i2
20079fc: b4 16 80 02 or %i2, %g2, %i2
2007a00: f4 26 20 08 st %i2, [ %i0 + 8 ]
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
2007a04: 84 00 60 04 add %g1, 4, %g2
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
2007a08: 80 88 60 03 btst 3, %g1
2007a0c: 02 80 00 0c be 2007a3c <_Objects_Initialize_information+0xd8><== ALWAYS TAKEN
2007a10: 84 08 bf fc and %g2, -4, %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2007a14: 82 06 20 24 add %i0, 0x24, %g1 <== NOT EXECUTED
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
2007a18: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED
2007a1c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED
the_chain->permanent_null = NULL;
2007a20: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
2007a24: 82 06 20 20 add %i0, 0x20, %g1 <== NOT EXECUTED
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
2007a28: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2007a2c: 12 80 00 0d bne 2007a60 <_Objects_Initialize_information+0xfc><== NOT EXECUTED
2007a30: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED
2007a34: 81 c7 e0 08 ret
2007a38: 81 e8 00 00 restore
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
2007a3c: 84 10 00 01 mov %g1, %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2007a40: 82 06 20 24 add %i0, 0x24, %g1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
2007a44: c4 36 20 38 sth %g2, [ %i0 + 0x38 ]
2007a48: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
the_chain->permanent_null = NULL;
2007a4c: c0 26 20 24 clr [ %i0 + 0x24 ]
the_chain->last = _Chain_Head(the_chain);
2007a50: 82 06 20 20 add %i0, 0x20, %g1
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
2007a54: 80 a6 e0 00 cmp %i3, 0
2007a58: 02 bf ff f7 be 2007a34 <_Objects_Initialize_information+0xd0>
2007a5c: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
2007a60: 7f ff fe 80 call 2007460 <_Objects_Extend_information>
2007a64: 81 e8 00 00 restore
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
2007a68: 92 10 20 01 mov 1, %o1
2007a6c: 7f ff fe 1e call 20072e4 <_Internal_error_Occurred>
2007a70: 94 10 20 14 mov 0x14, %o2
02007b38 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
2007b38: 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 );
2007b3c: e0 16 20 0a lduh [ %i0 + 0xa ], %l0
block_count = (information->maximum - index_base) /
2007b40: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1
2007b44: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
2007b48: 92 10 00 11 mov %l1, %o1
2007b4c: 40 00 40 b0 call 2017e0c <.udiv>
2007b50: 90 22 00 10 sub %o0, %l0, %o0
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
2007b54: 80 a2 20 00 cmp %o0, 0
2007b58: 02 80 00 12 be 2007ba0 <_Objects_Shrink_information+0x68> <== NEVER TAKEN
2007b5c: a4 10 20 04 mov 4, %l2
if ( information->inactive_per_block[ block ] ==
2007b60: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
2007b64: c4 00 c0 00 ld [ %g3 ], %g2
2007b68: 80 a4 40 02 cmp %l1, %g2
2007b6c: 12 80 00 09 bne 2007b90 <_Objects_Shrink_information+0x58><== ALWAYS TAKEN
2007b70: 82 10 20 00 clr %g1
2007b74: 10 80 00 0d b 2007ba8 <_Objects_Shrink_information+0x70> <== NOT EXECUTED
2007b78: a4 10 20 00 clr %l2 <== NOT EXECUTED
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
2007b7c: a0 04 00 11 add %l0, %l1, %l0
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 ] ==
2007b80: 80 a4 40 02 cmp %l1, %g2
2007b84: 02 80 00 09 be 2007ba8 <_Objects_Shrink_information+0x70>
2007b88: 84 04 a0 04 add %l2, 4, %g2
2007b8c: a4 10 00 02 mov %g2, %l2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
2007b90: 82 00 60 01 inc %g1
2007b94: 80 a2 00 01 cmp %o0, %g1
2007b98: 38 bf ff f9 bgu,a 2007b7c <_Objects_Shrink_information+0x44>
2007b9c: c4 00 c0 12 ld [ %g3 + %l2 ], %g2
2007ba0: 81 c7 e0 08 ret
2007ba4: 81 e8 00 00 restore
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
2007ba8: 10 80 00 06 b 2007bc0 <_Objects_Shrink_information+0x88>
2007bac: 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 );
2007bb0: 80 a4 60 00 cmp %l1, 0
2007bb4: 22 80 00 12 be,a 2007bfc <_Objects_Shrink_information+0xc4>
2007bb8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2007bbc: 90 10 00 11 mov %l1, %o0
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
2007bc0: 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) &&
2007bc4: 80 a0 40 10 cmp %g1, %l0
2007bc8: 0a bf ff fa bcs 2007bb0 <_Objects_Shrink_information+0x78>
2007bcc: e2 02 00 00 ld [ %o0 ], %l1
(index < (index_base + information->allocation_size))) {
2007bd0: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
2007bd4: 84 04 00 02 add %l0, %g2, %g2
2007bd8: 80 a0 40 02 cmp %g1, %g2
2007bdc: 1a bf ff f6 bcc 2007bb4 <_Objects_Shrink_information+0x7c>
2007be0: 80 a4 60 00 cmp %l1, 0
_Chain_Extract( &extract_me->Node );
2007be4: 40 00 11 06 call 200bffc <_Chain_Extract>
2007be8: 01 00 00 00 nop
}
}
while ( the_object );
2007bec: 80 a4 60 00 cmp %l1, 0
2007bf0: 12 bf ff f4 bne 2007bc0 <_Objects_Shrink_information+0x88><== ALWAYS TAKEN
2007bf4: 90 10 00 11 mov %l1, %o0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2007bf8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
2007bfc: 40 00 07 38 call 20098dc <_Workspace_Free>
2007c00: d0 00 40 12 ld [ %g1 + %l2 ], %o0
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2007c04: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2007c08: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
information->inactive_per_block[ block ] = 0;
2007c0c: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
information->inactive -= information->allocation_size;
2007c10: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
* 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;
2007c14: c0 21 00 12 clr [ %g4 + %l2 ]
information->inactive -= information->allocation_size;
2007c18: 84 20 c0 02 sub %g3, %g2, %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2007c1c: c0 20 40 12 clr [ %g1 + %l2 ]
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2007c20: c4 36 20 2c sth %g2, [ %i0 + 0x2c ]
return;
2007c24: 81 c7 e0 08 ret
2007c28: 81 e8 00 00 restore
020063d8 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
20063d8: 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;
20063dc: 03 00 80 6a sethi %hi(0x201a800), %g1
20063e0: 82 10 63 40 or %g1, 0x340, %g1 ! 201ab40 <Configuration_RTEMS_API>
20063e4: e0 00 60 2c ld [ %g1 + 0x2c ], %l0
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
20063e8: 80 a4 20 00 cmp %l0, 0
20063ec: 02 80 00 1a be 2006454 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
20063f0: e4 00 60 28 ld [ %g1 + 0x28 ], %l2
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
20063f4: 80 a4 a0 00 cmp %l2, 0
20063f8: 02 80 00 17 be 2006454 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN
20063fc: a2 10 20 00 clr %l1
2006400: a6 07 bf fc add %fp, -4, %l3
return_value = rtems_task_create(
2006404: d0 04 00 00 ld [ %l0 ], %o0
2006408: d2 04 20 08 ld [ %l0 + 8 ], %o1
200640c: d4 04 20 04 ld [ %l0 + 4 ], %o2
2006410: d6 04 20 14 ld [ %l0 + 0x14 ], %o3
2006414: d8 04 20 0c ld [ %l0 + 0xc ], %o4
2006418: 7f ff ff 6e call 20061d0 <rtems_task_create>
200641c: 9a 10 00 13 mov %l3, %o5
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
2006420: 80 a2 20 00 cmp %o0, 0
2006424: 12 80 00 0f bne 2006460 <_RTEMS_tasks_Initialize_user_tasks_body+0x88>
2006428: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
200642c: d0 07 bf fc ld [ %fp + -4 ], %o0
2006430: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
2006434: 40 00 00 0f call 2006470 <rtems_task_start>
2006438: d4 04 20 18 ld [ %l0 + 0x18 ], %o2
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
200643c: 80 a2 20 00 cmp %o0, 0
2006440: 12 80 00 07 bne 200645c <_RTEMS_tasks_Initialize_user_tasks_body+0x84>
2006444: a2 04 60 01 inc %l1
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
2006448: 80 a4 80 11 cmp %l2, %l1
200644c: 18 bf ff ee bgu 2006404 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c><== NEVER TAKEN
2006450: a0 04 20 1c add %l0, 0x1c, %l0
2006454: 81 c7 e0 08 ret
2006458: 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 );
200645c: 94 10 00 08 mov %o0, %o2
2006460: 92 10 20 01 mov 1, %o1
2006464: 40 00 03 a0 call 20072e4 <_Internal_error_Occurred>
2006468: 90 10 20 01 mov 1, %o0
0200bdac <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
200bdac: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200bdb0: e0 06 21 60 ld [ %i0 + 0x160 ], %l0
if ( !api )
200bdb4: 80 a4 20 00 cmp %l0, 0
200bdb8: 02 80 00 1f be 200be34 <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN
200bdbc: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
200bdc0: 7f ff d9 3b call 20022ac <sparc_disable_interrupts>
200bdc4: 01 00 00 00 nop
signal_set = asr->signals_posted;
200bdc8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
asr->signals_posted = 0;
200bdcc: c0 24 20 14 clr [ %l0 + 0x14 ]
_ISR_Enable( level );
200bdd0: 7f ff d9 3b call 20022bc <sparc_enable_interrupts>
200bdd4: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200bdd8: 80 a4 60 00 cmp %l1, 0
200bddc: 32 80 00 04 bne,a 200bdec <_RTEMS_tasks_Post_switch_extension+0x40><== ALWAYS TAKEN
200bde0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
200bde4: 81 c7 e0 08 ret <== NOT EXECUTED
200bde8: 81 e8 00 00 restore <== NOT EXECUTED
return;
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdec: d0 04 20 10 ld [ %l0 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200bdf0: 82 00 60 01 inc %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdf4: a4 07 bf fc add %fp, -4, %l2
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200bdf8: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdfc: 94 10 00 12 mov %l2, %o2
200be00: 27 00 00 3f sethi %hi(0xfc00), %l3
200be04: 40 00 07 c7 call 200dd20 <rtems_task_mode>
200be08: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
200be0c: c2 04 20 0c ld [ %l0 + 0xc ], %g1
200be10: 9f c0 40 00 call %g1
200be14: 90 10 00 11 mov %l1, %o0
asr->nest_level -= 1;
200be18: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200be1c: d0 07 bf fc ld [ %fp + -4 ], %o0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200be20: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200be24: 92 14 e3 ff or %l3, 0x3ff, %o1
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200be28: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200be2c: 40 00 07 bd call 200dd20 <rtems_task_mode>
200be30: 94 10 00 12 mov %l2, %o2
200be34: 81 c7 e0 08 ret
200be38: 81 e8 00 00 restore
0200bcd0 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
200bcd0: c2 02 21 70 ld [ %o0 + 0x170 ], %g1
while (tvp) {
200bcd4: 80 a0 60 00 cmp %g1, 0
200bcd8: 22 80 00 0b be,a 200bd04 <_RTEMS_tasks_Switch_extension+0x34>
200bcdc: c2 02 61 70 ld [ %o1 + 0x170 ], %g1
tvp->tval = *tvp->ptr;
200bce0: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->gval;
200bce4: c6 00 60 08 ld [ %g1 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
200bce8: c8 00 80 00 ld [ %g2 ], %g4
200bcec: c8 20 60 0c st %g4, [ %g1 + 0xc ]
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
200bcf0: c2 00 40 00 ld [ %g1 ], %g1
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
200bcf4: 80 a0 60 00 cmp %g1, 0
200bcf8: 12 bf ff fa bne 200bce0 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
200bcfc: c6 20 80 00 st %g3, [ %g2 ]
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
200bd00: c2 02 61 70 ld [ %o1 + 0x170 ], %g1
while (tvp) {
200bd04: 80 a0 60 00 cmp %g1, 0
200bd08: 02 80 00 0a be 200bd30 <_RTEMS_tasks_Switch_extension+0x60>
200bd0c: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
200bd10: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->tval;
200bd14: 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;
200bd18: c8 00 80 00 ld [ %g2 ], %g4
200bd1c: c8 20 60 08 st %g4, [ %g1 + 8 ]
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
200bd20: c2 00 40 00 ld [ %g1 ], %g1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
200bd24: 80 a0 60 00 cmp %g1, 0
200bd28: 12 bf ff fa bne 200bd10 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN
200bd2c: c6 20 80 00 st %g3, [ %g2 ]
200bd30: 81 c3 e0 08 retl
02007710 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2007710: 9d e3 bf 98 save %sp, -104, %sp
2007714: 11 00 80 84 sethi %hi(0x2021000), %o0
2007718: 92 10 00 18 mov %i0, %o1
200771c: 90 12 23 58 or %o0, 0x358, %o0
2007720: 40 00 07 e1 call 20096a4 <_Objects_Get>
2007724: 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 ) {
2007728: c2 07 bf fc ld [ %fp + -4 ], %g1
200772c: 80 a0 60 00 cmp %g1, 0
2007730: 12 80 00 16 bne 2007788 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN
2007734: a0 10 00 08 mov %o0, %l0
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2007738: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
200773c: 03 00 00 10 sethi %hi(0x4000), %g1
2007740: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2007744: 80 88 80 01 btst %g2, %g1
2007748: 22 80 00 08 be,a 2007768 <_Rate_monotonic_Timeout+0x58>
200774c: c2 04 20 38 ld [ %l0 + 0x38 ], %g1
the_thread->Wait.id == the_period->Object.id ) {
2007750: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2007754: c2 04 20 08 ld [ %l0 + 8 ], %g1
2007758: 80 a0 80 01 cmp %g2, %g1
200775c: 02 80 00 19 be 20077c0 <_Rate_monotonic_Timeout+0xb0>
2007760: 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 ) {
2007764: c2 04 20 38 ld [ %l0 + 0x38 ], %g1
2007768: 80 a0 60 01 cmp %g1, 1
200776c: 02 80 00 09 be 2007790 <_Rate_monotonic_Timeout+0x80>
2007770: 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;
2007774: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2007778: 03 00 80 85 sethi %hi(0x2021400), %g1
200777c: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20214d0 <_Thread_Dispatch_disable_level>
2007780: 84 00 bf ff add %g2, -1, %g2
2007784: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ]
2007788: 81 c7 e0 08 ret
200778c: 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;
2007790: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
2007794: 90 10 00 10 mov %l0, %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;
2007798: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
200779c: 7f ff fe 24 call 200702c <_Rate_monotonic_Initiate_statistics>
20077a0: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20077a4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20077a8: 92 04 20 10 add %l0, 0x10, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20077ac: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20077b0: 11 00 80 85 sethi %hi(0x2021400), %o0
20077b4: 40 00 0f b2 call 200b67c <_Watchdog_Insert>
20077b8: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 20215b0 <_Watchdog_Ticks_chain>
20077bc: 30 bf ff ef b,a 2007778 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20077c0: 40 00 09 25 call 2009c54 <_Thread_Clear_state>
20077c4: 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 );
20077c8: 10 bf ff f5 b 200779c <_Rate_monotonic_Timeout+0x8c>
20077cc: 90 10 00 10 mov %l0, %o0
02006ea4 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
2006ea4: 9d e3 bf 98 save %sp, -104, %sp
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2006ea8: 05 00 80 6d sethi %hi(0x201b400), %g2
2006eac: c6 00 a3 64 ld [ %g2 + 0x364 ], %g3 ! 201b764 <_Watchdog_Ticks_since_boot>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2006eb0: 03 00 80 6a sethi %hi(0x201a800), %g1
2006eb4: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201ab84 <Configuration+0xc>
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2006eb8: 86 00 e0 01 inc %g3
2006ebc: c6 20 a3 64 st %g3, [ %g2 + 0x364 ]
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2006ec0: 87 28 60 07 sll %g1, 7, %g3
2006ec4: 85 28 60 02 sll %g1, 2, %g2
2006ec8: 84 20 c0 02 sub %g3, %g2, %g2
2006ecc: 82 00 80 01 add %g2, %g1, %g1
2006ed0: 83 28 60 03 sll %g1, 3, %g1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
2006ed4: a0 07 bf f8 add %fp, -8, %l0
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2006ed8: c2 27 bf fc st %g1, [ %fp + -4 ]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
2006edc: 92 10 00 10 mov %l0, %o1
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2006ee0: c0 27 bf f8 clr [ %fp + -8 ]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
2006ee4: 11 00 80 6d sethi %hi(0x201b400), %o0
2006ee8: 40 00 08 ab call 2009194 <_Timespec_Add_to>
2006eec: 90 12 22 90 or %o0, 0x290, %o0 ! 201b690 <_TOD_Uptime>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
2006ef0: 92 10 00 10 mov %l0, %o1
2006ef4: 11 00 80 6d sethi %hi(0x201b400), %o0
2006ef8: 40 00 08 a7 call 2009194 <_Timespec_Add_to>
2006efc: 90 12 22 a4 or %o0, 0x2a4, %o0 ! 201b6a4 <_TOD_Now>
while ( seconds ) {
2006f00: a0 92 20 00 orcc %o0, 0, %l0
2006f04: 02 80 00 08 be 2006f24 <_TOD_Tickle_ticks+0x80>
2006f08: 23 00 80 6d sethi %hi(0x201b400), %l1
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
2006f0c: a2 14 62 e4 or %l1, 0x2e4, %l1 ! 201b6e4 <_Watchdog_Seconds_chain>
2006f10: 40 00 0a 31 call 20097d4 <_Watchdog_Tickle>
2006f14: 90 10 00 11 mov %l1, %o0
2006f18: a0 84 3f ff addcc %l0, -1, %l0
2006f1c: 12 bf ff fd bne 2006f10 <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN
2006f20: 01 00 00 00 nop
2006f24: 81 c7 e0 08 ret
2006f28: 81 e8 00 00 restore
02007088 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
2007088: 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();
200708c: 03 00 80 84 sethi %hi(0x2021000), %g1
if ((!the_tod) ||
2007090: 80 a6 20 00 cmp %i0, 0
2007094: 02 80 00 2e be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN
2007098: d2 00 63 14 ld [ %g1 + 0x314 ], %o1
200709c: 11 00 03 d0 sethi %hi(0xf4000), %o0
20070a0: 40 00 58 77 call 201d27c <.udiv>
20070a4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
(the_tod->ticks >= ticks_per_second) ||
20070a8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20070ac: 80 a2 00 01 cmp %o0, %g1
20070b0: 08 80 00 27 bleu 200714c <_TOD_Validate+0xc4>
20070b4: 01 00 00 00 nop
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
20070b8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
20070bc: 80 a0 60 3b cmp %g1, 0x3b
20070c0: 18 80 00 23 bgu 200714c <_TOD_Validate+0xc4>
20070c4: 01 00 00 00 nop
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
20070c8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20070cc: 80 a0 60 3b cmp %g1, 0x3b
20070d0: 18 80 00 1f bgu 200714c <_TOD_Validate+0xc4>
20070d4: 01 00 00 00 nop
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
20070d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1
20070dc: 80 a0 60 17 cmp %g1, 0x17
20070e0: 18 80 00 1b bgu 200714c <_TOD_Validate+0xc4>
20070e4: 01 00 00 00 nop
(the_tod->month == 0) ||
20070e8: c2 06 20 04 ld [ %i0 + 4 ], %g1
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) ||
20070ec: 80 a0 60 00 cmp %g1, 0
20070f0: 02 80 00 17 be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN
20070f4: 80 a0 60 0c cmp %g1, 0xc
20070f8: 18 80 00 15 bgu 200714c <_TOD_Validate+0xc4>
20070fc: 01 00 00 00 nop
(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) ||
2007100: c4 06 00 00 ld [ %i0 ], %g2
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) ||
2007104: 80 a0 a7 c3 cmp %g2, 0x7c3
2007108: 08 80 00 11 bleu 200714c <_TOD_Validate+0xc4>
200710c: 01 00 00 00 nop
(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) ||
(the_tod->day == 0) )
2007110: c6 06 20 08 ld [ %i0 + 8 ], %g3
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) ||
2007114: 80 a0 e0 00 cmp %g3, 0
2007118: 02 80 00 0d be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN
200711c: 80 88 a0 03 btst 3, %g2
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
2007120: 32 80 00 0d bne,a 2007154 <_TOD_Validate+0xcc>
2007124: 83 28 60 02 sll %g1, 2, %g1
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2007128: 82 00 60 0d add %g1, 0xd, %g1
200712c: 05 00 80 7f sethi %hi(0x201fc00), %g2
2007130: 83 28 60 02 sll %g1, 2, %g1
2007134: 84 10 a0 1c or %g2, 0x1c, %g2
2007138: 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(
200713c: 80 a0 40 03 cmp %g1, %g3
2007140: b0 60 3f ff subx %g0, -1, %i0
2007144: 81 c7 e0 08 ret
2007148: 81 e8 00 00 restore
if ( the_tod->day > days_in_month )
return false;
return true;
}
200714c: 81 c7 e0 08 ret
2007150: 91 e8 20 00 restore %g0, 0, %o0
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 ];
2007154: 05 00 80 7f sethi %hi(0x201fc00), %g2
2007158: 84 10 a0 1c or %g2, 0x1c, %g2 ! 201fc1c <_TOD_Days_per_month>
200715c: 10 bf ff f8 b 200713c <_TOD_Validate+0xb4>
2007160: c2 00 80 01 ld [ %g2 + %g1 ], %g1
02007c90 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2007c90: 9d e3 bf a0 save %sp, -96, %sp
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
2007c94: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
/*
* 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 );
2007c98: 40 00 04 84 call 2008ea8 <_Thread_Set_transient>
2007c9c: 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 )
2007ca0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2007ca4: 80 a0 40 19 cmp %g1, %i1
2007ca8: 02 80 00 05 be 2007cbc <_Thread_Change_priority+0x2c>
2007cac: a0 10 00 18 mov %i0, %l0
_Thread_Set_priority( the_thread, new_priority );
2007cb0: 92 10 00 19 mov %i1, %o1
2007cb4: 40 00 04 01 call 2008cb8 <_Thread_Set_priority>
2007cb8: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
2007cbc: 7f ff e9 7c call 20022ac <sparc_disable_interrupts>
2007cc0: 01 00 00 00 nop
2007cc4: b0 10 00 08 mov %o0, %i0
/*
* 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;
2007cc8: e4 04 20 10 ld [ %l0 + 0x10 ], %l2
if ( state != STATES_TRANSIENT ) {
2007ccc: 80 a4 a0 04 cmp %l2, 4
2007cd0: 02 80 00 18 be 2007d30 <_Thread_Change_priority+0xa0>
2007cd4: 80 8c 60 04 btst 4, %l1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
2007cd8: 02 80 00 0b be 2007d04 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN
2007cdc: 82 0c bf fb and %l2, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
2007ce0: 7f ff e9 77 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
2007ce4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2007ce8: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
2007cec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
2007cf0: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED
2007cf4: 32 80 00 0d bne,a 2007d28 <_Thread_Change_priority+0x98> <== NOT EXECUTED
2007cf8: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED
2007cfc: 81 c7 e0 08 ret
2007d00: 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 );
2007d04: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_ISR_Enable( level );
2007d08: 7f ff e9 6d call 20022bc <sparc_enable_interrupts>
2007d0c: 90 10 00 18 mov %i0, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2007d10: 03 00 00 ef sethi %hi(0x3bc00), %g1
2007d14: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2007d18: 80 8c 80 01 btst %l2, %g1
2007d1c: 02 bf ff f8 be 2007cfc <_Thread_Change_priority+0x6c>
2007d20: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
2007d24: f0 04 20 44 ld [ %l0 + 0x44 ], %i0
2007d28: 40 00 03 b4 call 2008bf8 <_Thread_queue_Requeue>
2007d2c: 93 e8 00 10 restore %g0, %l0, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
2007d30: 12 80 00 14 bne 2007d80 <_Thread_Change_priority+0xf0> <== NEVER TAKEN
2007d34: 23 00 80 6d sethi %hi(0x201b400), %l1
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2007d38: c2 04 20 90 ld [ %l0 + 0x90 ], %g1
2007d3c: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2
2007d40: c6 10 40 00 lduh [ %g1 ], %g3
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2007d44: c0 24 20 10 clr [ %l0 + 0x10 ]
2007d48: 84 10 c0 02 or %g3, %g2, %g2
2007d4c: c4 30 40 00 sth %g2, [ %g1 ]
_Priority_Major_bit_map |= the_priority_map->ready_major;
2007d50: c4 14 62 c4 lduh [ %l1 + 0x2c4 ], %g2
2007d54: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
2007d58: 80 8e a0 ff btst 0xff, %i2
2007d5c: 82 10 80 01 or %g2, %g1, %g1
2007d60: c2 34 62 c4 sth %g1, [ %l1 + 0x2c4 ]
2007d64: 02 80 00 48 be 2007e84 <_Thread_Change_priority+0x1f4>
2007d68: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2007d6c: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2007d70: c2 24 20 04 st %g1, [ %l0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
2007d74: e0 20 40 00 st %l0, [ %g1 ]
the_node->next = before_node;
before_node->previous = the_node;
2007d78: e0 20 a0 04 st %l0, [ %g2 + 4 ]
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
2007d7c: c4 24 00 00 st %g2, [ %l0 ]
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
2007d80: 7f ff e9 4f call 20022bc <sparc_enable_interrupts>
2007d84: 90 10 00 18 mov %i0, %o0
2007d88: 7f ff e9 49 call 20022ac <sparc_disable_interrupts>
2007d8c: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
2007d90: c2 14 62 c4 lduh [ %l1 + 0x2c4 ], %g1
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
2007d94: 05 00 80 6d sethi %hi(0x201b400), %g2
2007d98: 83 28 60 10 sll %g1, 0x10, %g1
2007d9c: da 00 a1 64 ld [ %g2 + 0x164 ], %o5
2007da0: 85 30 60 10 srl %g1, 0x10, %g2
2007da4: 80 a0 a0 ff cmp %g2, 0xff
2007da8: 08 80 00 27 bleu 2007e44 <_Thread_Change_priority+0x1b4>
2007dac: 07 00 80 67 sethi %hi(0x2019c00), %g3
2007db0: 83 30 60 18 srl %g1, 0x18, %g1
2007db4: 86 10 e1 00 or %g3, 0x100, %g3
2007db8: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
2007dbc: 09 00 80 6d sethi %hi(0x201b400), %g4
2007dc0: 85 28 a0 10 sll %g2, 0x10, %g2
2007dc4: 88 11 23 40 or %g4, 0x340, %g4
2007dc8: 83 30 a0 0f srl %g2, 0xf, %g1
2007dcc: c2 11 00 01 lduh [ %g4 + %g1 ], %g1
2007dd0: 83 28 60 10 sll %g1, 0x10, %g1
2007dd4: 89 30 60 10 srl %g1, 0x10, %g4
2007dd8: 80 a1 20 ff cmp %g4, 0xff
2007ddc: 18 80 00 28 bgu 2007e7c <_Thread_Change_priority+0x1ec>
2007de0: 83 30 60 18 srl %g1, 0x18, %g1
2007de4: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1
2007de8: 82 00 60 08 add %g1, 8, %g1
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
2007dec: 85 30 a0 0c srl %g2, 0xc, %g2
2007df0: 83 28 60 10 sll %g1, 0x10, %g1
2007df4: 83 30 60 10 srl %g1, 0x10, %g1
2007df8: 82 00 40 02 add %g1, %g2, %g1
2007dfc: 85 28 60 04 sll %g1, 4, %g2
2007e00: 83 28 60 02 sll %g1, 2, %g1
2007e04: 82 20 80 01 sub %g2, %g1, %g1
2007e08: c2 03 40 01 ld [ %o5 + %g1 ], %g1
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
2007e0c: 05 00 80 6d sethi %hi(0x201b400), %g2
2007e10: c4 00 a2 d0 ld [ %g2 + 0x2d0 ], %g2 ! 201b6d0 <_Thread_Executing>
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
2007e14: 07 00 80 6d sethi %hi(0x201b400), %g3
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
2007e18: 80 a0 40 02 cmp %g1, %g2
2007e1c: 02 80 00 08 be 2007e3c <_Thread_Change_priority+0x1ac>
2007e20: c2 20 e2 a0 st %g1, [ %g3 + 0x2a0 ]
_Thread_Executing->is_preemptible )
2007e24: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1
2007e28: 80 a0 60 00 cmp %g1, 0
2007e2c: 02 80 00 04 be 2007e3c <_Thread_Change_priority+0x1ac>
2007e30: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
2007e34: 03 00 80 6d sethi %hi(0x201b400), %g1
2007e38: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary>
_ISR_Enable( level );
2007e3c: 7f ff e9 20 call 20022bc <sparc_enable_interrupts>
2007e40: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
2007e44: 86 10 e1 00 or %g3, 0x100, %g3
2007e48: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
2007e4c: 09 00 80 6d sethi %hi(0x201b400), %g4
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
2007e50: 84 00 a0 08 add %g2, 8, %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
2007e54: 88 11 23 40 or %g4, 0x340, %g4
2007e58: 85 28 a0 10 sll %g2, 0x10, %g2
2007e5c: 83 30 a0 0f srl %g2, 0xf, %g1
2007e60: c2 11 00 01 lduh [ %g4 + %g1 ], %g1
2007e64: 83 28 60 10 sll %g1, 0x10, %g1
2007e68: 89 30 60 10 srl %g1, 0x10, %g4
2007e6c: 80 a1 20 ff cmp %g4, 0xff
2007e70: 28 bf ff de bleu,a 2007de8 <_Thread_Change_priority+0x158>
2007e74: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1
2007e78: 83 30 60 18 srl %g1, 0x18, %g1
2007e7c: 10 bf ff dc b 2007dec <_Thread_Change_priority+0x15c>
2007e80: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2007e84: 84 00 60 04 add %g1, 4, %g2
2007e88: c4 24 00 00 st %g2, [ %l0 ]
old_last_node = the_chain->last;
2007e8c: c4 00 60 08 ld [ %g1 + 8 ], %g2
the_chain->last = the_node;
2007e90: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
2007e94: c4 24 20 04 st %g2, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
2007e98: 10 bf ff ba b 2007d80 <_Thread_Change_priority+0xf0>
2007e9c: e0 20 80 00 st %l0, [ %g2 ]
02007ea0 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
2007ea0: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
2007ea4: 7f ff e9 02 call 20022ac <sparc_disable_interrupts>
2007ea8: a0 10 00 18 mov %i0, %l0
2007eac: b0 10 00 08 mov %o0, %i0
current_state = the_thread->current_state;
2007eb0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
if ( current_state & state ) {
2007eb4: 80 8e 40 01 btst %i1, %g1
2007eb8: 02 80 00 06 be 2007ed0 <_Thread_Clear_state+0x30>
2007ebc: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
2007ec0: b2 28 40 19 andn %g1, %i1, %i1
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
2007ec4: 80 a6 60 00 cmp %i1, 0
2007ec8: 02 80 00 04 be 2007ed8 <_Thread_Clear_state+0x38>
2007ecc: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
}
}
}
_ISR_Enable( level );
2007ed0: 7f ff e8 fb call 20022bc <sparc_enable_interrupts>
2007ed4: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2007ed8: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
if ( _States_Is_ready( current_state ) ) {
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
2007edc: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
2007ee0: c8 10 80 00 lduh [ %g2 ], %g4
2007ee4: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
2007ee8: 86 11 00 03 or %g4, %g3, %g3
2007eec: c6 30 80 00 sth %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2007ef0: 84 00 60 04 add %g1, 4, %g2
_Priority_Major_bit_map |= the_priority_map->ready_major;
2007ef4: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4
2007ef8: c4 24 00 00 st %g2, [ %l0 ]
2007efc: 07 00 80 6d sethi %hi(0x201b400), %g3
old_last_node = the_chain->last;
2007f00: c4 00 60 08 ld [ %g1 + 8 ], %g2
2007f04: da 10 e2 c4 lduh [ %g3 + 0x2c4 ], %o5
the_chain->last = the_node;
2007f08: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
2007f0c: c4 24 20 04 st %g2, [ %l0 + 4 ]
2007f10: 82 13 40 04 or %o5, %g4, %g1
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
2007f14: e0 20 80 00 st %l0, [ %g2 ]
2007f18: c2 30 e2 c4 sth %g1, [ %g3 + 0x2c4 ]
_ISR_Flash( level );
2007f1c: 7f ff e8 e8 call 20022bc <sparc_enable_interrupts>
2007f20: 01 00 00 00 nop
2007f24: 7f ff e8 e2 call 20022ac <sparc_disable_interrupts>
2007f28: 01 00 00 00 nop
* 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 ( the_thread->current_priority < _Thread_Heir->current_priority ) {
2007f2c: 03 00 80 6d sethi %hi(0x201b400), %g1
2007f30: c6 00 62 a0 ld [ %g1 + 0x2a0 ], %g3 ! 201b6a0 <_Thread_Heir>
2007f34: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
2007f38: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
2007f3c: 80 a0 80 03 cmp %g2, %g3
2007f40: 1a bf ff e4 bcc 2007ed0 <_Thread_Clear_state+0x30>
2007f44: 07 00 80 6d sethi %hi(0x201b400), %g3
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2007f48: c6 00 e2 d0 ld [ %g3 + 0x2d0 ], %g3 ! 201b6d0 <_Thread_Executing>
* 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 ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
2007f4c: e0 20 62 a0 st %l0, [ %g1 + 0x2a0 ]
if ( _Thread_Executing->is_preemptible ||
2007f50: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1
2007f54: 80 a0 60 00 cmp %g1, 0
2007f58: 32 80 00 05 bne,a 2007f6c <_Thread_Clear_state+0xcc>
2007f5c: 84 10 20 01 mov 1, %g2
2007f60: 80 a0 a0 00 cmp %g2, 0
2007f64: 12 bf ff db bne 2007ed0 <_Thread_Clear_state+0x30> <== ALWAYS TAKEN
2007f68: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
2007f6c: 03 00 80 6d sethi %hi(0x201b400), %g1
2007f70: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
2007f74: 7f ff e8 d2 call 20022bc <sparc_enable_interrupts>
2007f78: 81 e8 00 00 restore
02008128 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
2008128: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200812c: 90 10 00 18 mov %i0, %o0
2008130: 40 00 00 84 call 2008340 <_Thread_Get>
2008134: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2008138: c2 07 bf fc ld [ %fp + -4 ], %g1
200813c: 80 a0 60 00 cmp %g1, 0
2008140: 12 80 00 08 bne 2008160 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
2008144: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
2008148: 7f ff ff 56 call 2007ea0 <_Thread_Clear_state>
200814c: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_END+0xdc00018>
2008150: 03 00 80 6d sethi %hi(0x201b400), %g1
2008154: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level>
2008158: 84 00 bf ff add %g2, -1, %g2
200815c: c4 20 62 10 st %g2, [ %g1 + 0x210 ]
2008160: 81 c7 e0 08 ret
2008164: 81 e8 00 00 restore
02008168 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
2008168: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
200816c: 2b 00 80 6d sethi %hi(0x201b400), %l5
_ISR_Disable( level );
2008170: 7f ff e8 4f call 20022ac <sparc_disable_interrupts>
2008174: e0 05 62 d0 ld [ %l5 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing>
while ( _Context_Switch_necessary == true ) {
2008178: 2d 00 80 6d sethi %hi(0x201b400), %l6
200817c: c2 0d a2 e0 ldub [ %l6 + 0x2e0 ], %g1 ! 201b6e0 <_Context_Switch_necessary>
2008180: 80 a0 60 00 cmp %g1, 0
2008184: 02 80 00 50 be 20082c4 <_Thread_Dispatch+0x15c>
2008188: 33 00 80 6d sethi %hi(0x201b400), %i1
200818c: 25 00 80 6d sethi %hi(0x201b400), %l2
2008190: 35 00 80 6d sethi %hi(0x201b400), %i2
2008194: a4 14 a2 d8 or %l2, 0x2d8, %l2
#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;
2008198: 31 00 80 6d sethi %hi(0x201b400), %i0
#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 );
200819c: 2f 00 80 6d sethi %hi(0x201b400), %l7
20081a0: 03 00 80 6d sethi %hi(0x201b400), %g1
20081a4: ac 15 a2 e0 or %l6, 0x2e0, %l6
20081a8: aa 15 62 d0 or %l5, 0x2d0, %l5
20081ac: b2 16 62 a0 or %i1, 0x2a0, %i1
20081b0: b4 16 a2 9c or %i2, 0x29c, %i2
20081b4: b0 16 21 68 or %i0, 0x168, %i0
20081b8: ae 15 e2 98 or %l7, 0x298, %l7
20081bc: b6 10 62 10 or %g1, 0x210, %i3
20081c0: a8 07 bf f8 add %fp, -8, %l4
20081c4: a6 07 bf f0 add %fp, -16, %l3
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
20081c8: b8 10 20 01 mov 1, %i4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
20081cc: 10 80 00 34 b 200829c <_Thread_Dispatch+0x134>
20081d0: ba 10 00 12 mov %l2, %i5
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;
_ISR_Enable( level );
20081d4: 7f ff e8 3a call 20022bc <sparc_enable_interrupts>
20081d8: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
20081dc: 40 00 10 31 call 200c2a0 <_TOD_Get_uptime>
20081e0: 90 10 00 14 mov %l4, %o0
_Timestamp_Subtract(
20081e4: 90 10 00 1d mov %i5, %o0
20081e8: 92 10 00 14 mov %l4, %o1
20081ec: 40 00 04 03 call 20091f8 <_Timespec_Subtract>
20081f0: 94 10 00 13 mov %l3, %o2
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
20081f4: 92 10 00 13 mov %l3, %o1
20081f8: 40 00 03 e7 call 2009194 <_Timespec_Add_to>
20081fc: 90 04 20 84 add %l0, 0x84, %o0
_Thread_Time_of_last_context_switch = uptime;
2008200: c4 07 bf f8 ld [ %fp + -8 ], %g2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2008204: c2 06 80 00 ld [ %i2 ], %g1
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
2008208: c4 24 80 00 st %g2, [ %l2 ]
200820c: c4 07 bf fc ld [ %fp + -4 ], %g2
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
2008210: 90 10 00 10 mov %l0, %o0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
2008214: c4 24 a0 04 st %g2, [ %l2 + 4 ]
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2008218: 80 a0 60 00 cmp %g1, 0
200821c: 02 80 00 06 be 2008234 <_Thread_Dispatch+0xcc> <== NEVER TAKEN
2008220: 92 10 00 11 mov %l1, %o1
executing->libc_reent = *_Thread_libc_reent;
2008224: c4 00 40 00 ld [ %g1 ], %g2
2008228: c4 24 21 5c st %g2, [ %l0 + 0x15c ]
*_Thread_libc_reent = heir->libc_reent;
200822c: c4 04 61 5c ld [ %l1 + 0x15c ], %g2
2008230: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
2008234: 40 00 04 b3 call 2009500 <_User_extensions_Thread_switch>
2008238: 01 00 00 00 nop
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
200823c: 92 04 60 d0 add %l1, 0xd0, %o1
2008240: 40 00 06 04 call 2009a50 <_CPU_Context_switch>
2008244: 90 04 20 d0 add %l0, 0xd0, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2008248: c2 04 21 58 ld [ %l0 + 0x158 ], %g1
200824c: 80 a0 60 00 cmp %g1, 0
2008250: 02 80 00 0d be 2008284 <_Thread_Dispatch+0x11c>
2008254: 01 00 00 00 nop
2008258: d0 05 c0 00 ld [ %l7 ], %o0
200825c: 80 a4 00 08 cmp %l0, %o0
2008260: 02 80 00 09 be 2008284 <_Thread_Dispatch+0x11c>
2008264: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
2008268: 02 80 00 04 be 2008278 <_Thread_Dispatch+0x110>
200826c: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
2008270: 40 00 05 be call 2009968 <_CPU_Context_save_fp>
2008274: 90 02 21 58 add %o0, 0x158, %o0
_Context_Restore_fp( &executing->fp_context );
2008278: 40 00 05 d9 call 20099dc <_CPU_Context_restore_fp>
200827c: 90 04 21 58 add %l0, 0x158, %o0
_Thread_Allocated_fp = executing;
2008280: e0 25 c0 00 st %l0, [ %l7 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
2008284: 7f ff e8 0a call 20022ac <sparc_disable_interrupts>
2008288: e0 05 40 00 ld [ %l5 ], %l0
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
200828c: c2 0d 80 00 ldub [ %l6 ], %g1
2008290: 80 a0 60 00 cmp %g1, 0
2008294: 02 80 00 0d be 20082c8 <_Thread_Dispatch+0x160>
2008298: 03 00 80 6d sethi %hi(0x201b400), %g1
heir = _Thread_Heir;
200829c: e2 06 40 00 ld [ %i1 ], %l1
_Thread_Dispatch_disable_level = 1;
20082a0: f8 26 c0 00 st %i4, [ %i3 ]
_Thread_Executing = heir;
#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 )
20082a4: c2 04 60 7c ld [ %l1 + 0x7c ], %g1
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
20082a8: c0 2d 80 00 clrb [ %l6 ]
_Thread_Executing = heir;
#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 )
20082ac: 80 a0 60 01 cmp %g1, 1
20082b0: 12 bf ff c9 bne 20081d4 <_Thread_Dispatch+0x6c>
20082b4: e2 25 40 00 st %l1, [ %l5 ]
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
20082b8: c2 06 00 00 ld [ %i0 ], %g1
20082bc: 10 bf ff c6 b 20081d4 <_Thread_Dispatch+0x6c>
20082c0: c2 24 60 78 st %g1, [ %l1 + 0x78 ]
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
20082c4: 03 00 80 6d sethi %hi(0x201b400), %g1
20082c8: c0 20 62 10 clr [ %g1 + 0x210 ] ! 201b610 <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
20082cc: 7f ff e7 fc call 20022bc <sparc_enable_interrupts>
20082d0: 01 00 00 00 nop
if ( _Thread_Do_post_task_switch_extension ||
20082d4: 03 00 80 6d sethi %hi(0x201b400), %g1
20082d8: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 201b6b4 <_Thread_Do_post_task_switch_extension>
20082dc: 80 a0 60 00 cmp %g1, 0
20082e0: 12 80 00 06 bne 20082f8 <_Thread_Dispatch+0x190> <== NEVER TAKEN
20082e4: 01 00 00 00 nop
executing->do_post_task_switch_extension ) {
20082e8: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1
20082ec: 80 a0 60 00 cmp %g1, 0
20082f0: 02 80 00 04 be 2008300 <_Thread_Dispatch+0x198>
20082f4: 01 00 00 00 nop
executing->do_post_task_switch_extension = false;
_API_extensions_Run_postswitch();
20082f8: 7f ff f9 71 call 20068bc <_API_extensions_Run_postswitch>
20082fc: c0 2c 20 74 clrb [ %l0 + 0x74 ]
2008300: 81 c7 e0 08 ret
2008304: 81 e8 00 00 restore
0200e188 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
200e188: 03 00 80 6d sethi %hi(0x201b400), %g1
200e18c: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing>
if ( !_States_Is_ready( executing->current_state ) ||
200e190: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200e194: 80 a0 a0 00 cmp %g2, 0
200e198: 12 80 00 0b bne 200e1c4 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN
200e19c: 84 10 20 01 mov 1, %g2
200e1a0: 05 00 80 6d sethi %hi(0x201b400), %g2
200e1a4: c4 00 a2 a0 ld [ %g2 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir>
200e1a8: 80 a0 40 02 cmp %g1, %g2
200e1ac: 02 80 00 0b be 200e1d8 <_Thread_Evaluate_mode+0x50>
200e1b0: 01 00 00 00 nop
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
200e1b4: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1
200e1b8: 80 a0 60 00 cmp %g1, 0
200e1bc: 02 80 00 07 be 200e1d8 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN
200e1c0: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
200e1c4: 03 00 80 6d sethi %hi(0x201b400), %g1
200e1c8: 90 10 20 01 mov 1, %o0
200e1cc: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ]
return true;
200e1d0: 81 c3 e0 08 retl
200e1d4: 01 00 00 00 nop
}
return false;
}
200e1d8: 81 c3 e0 08 retl
200e1dc: 90 10 20 00 clr %o0 ! 0 <PROM_START>
0200e1e0 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200e1e0: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
200e1e4: 03 00 80 6d sethi %hi(0x201b400), %g1
200e1e8: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing>
/*
* 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();
200e1ec: 3f 00 80 38 sethi %hi(0x200e000), %i7
200e1f0: be 17 e1 e0 or %i7, 0x1e0, %i7 ! 200e1e0 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200e1f4: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0
_ISR_Set_level(level);
200e1f8: 7f ff d0 31 call 20022bc <sparc_enable_interrupts>
200e1fc: 91 2a 20 08 sll %o0, 8, %o0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
200e200: 03 00 80 6c sethi %hi(0x201b000), %g1
doneConstructors = 1;
200e204: 84 10 20 01 mov 1, %g2
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
200e208: e4 08 62 cc ldub [ %g1 + 0x2cc ], %l2
doneConstructors = 1;
200e20c: c4 28 62 cc stb %g2, [ %g1 + 0x2cc ]
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200e210: c2 04 21 58 ld [ %l0 + 0x158 ], %g1
200e214: 80 a0 60 00 cmp %g1, 0
200e218: 02 80 00 0b be 200e244 <_Thread_Handler+0x64>
200e21c: 23 00 80 6d sethi %hi(0x201b400), %l1
#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 );
200e220: d0 04 62 98 ld [ %l1 + 0x298 ], %o0 ! 201b698 <_Thread_Allocated_fp>
200e224: 80 a4 00 08 cmp %l0, %o0
200e228: 02 80 00 07 be 200e244 <_Thread_Handler+0x64>
200e22c: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200e230: 22 80 00 05 be,a 200e244 <_Thread_Handler+0x64>
200e234: e0 24 62 98 st %l0, [ %l1 + 0x298 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200e238: 7f ff ed cc call 2009968 <_CPU_Context_save_fp>
200e23c: 90 02 21 58 add %o0, 0x158, %o0
_Thread_Allocated_fp = executing;
200e240: e0 24 62 98 st %l0, [ %l1 + 0x298 ]
/*
* 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 );
200e244: 7f ff ec 31 call 2009308 <_User_extensions_Thread_begin>
200e248: 90 10 00 10 mov %l0, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200e24c: 7f ff e8 2f call 2008308 <_Thread_Enable_dispatch>
200e250: a5 2c a0 18 sll %l2, 0x18, %l2
/*
* _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 (!doneCons) /* && (volatile void *)_init) */ {
200e254: 80 a4 a0 00 cmp %l2, 0
200e258: 02 80 00 0c be 200e288 <_Thread_Handler+0xa8>
200e25c: 01 00 00 00 nop
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200e260: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200e264: 80 a0 60 00 cmp %g1, 0
200e268: 22 80 00 0f be,a 200e2a4 <_Thread_Handler+0xc4> <== ALWAYS TAKEN
200e26c: c2 04 20 9c ld [ %l0 + 0x9c ], %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 );
200e270: 7f ff ec 3a call 2009358 <_User_extensions_Thread_exitted>
200e274: 90 10 00 10 mov %l0, %o0
_Internal_error_Occurred(
200e278: 90 10 20 00 clr %o0
200e27c: 92 10 20 01 mov 1, %o1
200e280: 7f ff e4 19 call 20072e4 <_Internal_error_Occurred>
200e284: 94 10 20 06 mov 6, %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 (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
200e288: 40 00 31 fe call 201aa80 <_init>
200e28c: 01 00 00 00 nop
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200e290: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200e294: 80 a0 60 00 cmp %g1, 0
200e298: 12 bf ff f6 bne 200e270 <_Thread_Handler+0x90> <== NEVER TAKEN
200e29c: 01 00 00 00 nop
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
200e2a0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200e2a4: 9f c0 40 00 call %g1
200e2a8: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
200e2ac: 10 bf ff f1 b 200e270 <_Thread_Handler+0x90>
200e2b0: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
020083ec <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
20083ec: 9d e3 bf a0 save %sp, -96, %sp
20083f0: 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;
20083f4: c0 26 61 60 clr [ %i1 + 0x160 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
20083f8: e2 00 40 00 ld [ %g1 ], %l1
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
20083fc: c0 26 61 64 clr [ %i1 + 0x164 ]
2008400: c0 26 61 68 clr [ %i1 + 0x168 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
2008404: c0 26 61 5c clr [ %i1 + 0x15c ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2008408: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200840c: 90 10 00 19 mov %i1, %o0
2008410: 40 00 02 ca call 2008f38 <_Thread_Stack_Allocate>
2008414: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
2008418: 80 a6 c0 08 cmp %i3, %o0
200841c: 18 80 00 5a bgu 2008584 <_Thread_Initialize+0x198>
2008420: 80 a2 20 00 cmp %o0, 0
2008424: 02 80 00 58 be 2008584 <_Thread_Initialize+0x198> <== NEVER TAKEN
2008428: 80 8f 20 ff btst 0xff, %i4
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200842c: c2 06 60 cc ld [ %i1 + 0xcc ], %g1
the_stack->size = size;
2008430: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ]
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
2008434: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2008438: 82 10 20 00 clr %g1
200843c: 12 80 00 54 bne 200858c <_Thread_Initialize+0x1a0>
2008440: a4 10 20 00 clr %l2
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2008444: 27 00 80 6d sethi %hi(0x201b400), %l3
2008448: c4 04 e2 b0 ld [ %l3 + 0x2b0 ], %g2 ! 201b6b0 <_Thread_Maximum_extensions>
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
200844c: c2 26 60 c8 st %g1, [ %i1 + 0xc8 ]
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;
2008450: c2 26 61 58 st %g1, [ %i1 + 0x158 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2008454: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
2008458: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
200845c: c0 26 60 68 clr [ %i1 + 0x68 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2008460: 80 a0 a0 00 cmp %g2, 0
2008464: 12 80 00 5a bne 20085cc <_Thread_Initialize+0x1e0>
2008468: c0 26 60 6c clr [ %i1 + 0x6c ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200846c: c0 26 61 6c clr [ %i1 + 0x16c ]
2008470: b6 10 20 00 clr %i3
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
2008474: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2008478: 92 10 00 1d mov %i5, %o1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
200847c: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ]
the_thread->Start.budget_callout = budget_callout;
2008480: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2008484: 90 10 00 19 mov %i1, %o0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2008488: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200848c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2008490: e0 2e 60 ac stb %l0, [ %i1 + 0xac ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
2008494: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
2008498: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
200849c: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
20084a0: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
20084a4: c0 26 60 1c clr [ %i1 + 0x1c ]
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
20084a8: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
20084ac: 40 00 02 03 call 2008cb8 <_Thread_Set_priority>
20084b0: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20084b4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
20084b8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
20084bc: 83 28 60 02 sll %g1, 2, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20084c0: e2 26 60 0c st %l1, [ %i1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20084c4: f2 20 80 01 st %i1, [ %g2 + %g1 ]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
20084c8: c0 26 60 84 clr [ %i1 + 0x84 ]
20084cc: c0 26 60 88 clr [ %i1 + 0x88 ]
* 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 );
20084d0: 90 10 00 19 mov %i1, %o0
20084d4: 40 00 03 c8 call 20093f4 <_User_extensions_Thread_create>
20084d8: b0 10 20 01 mov 1, %i0
if ( extension_status )
20084dc: 80 8a 20 ff btst 0xff, %o0
20084e0: 12 80 00 27 bne 200857c <_Thread_Initialize+0x190>
20084e4: 01 00 00 00 nop
return true;
failed:
if ( the_thread->libc_reent )
20084e8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
20084ec: 80 a2 20 00 cmp %o0, 0
20084f0: 22 80 00 05 be,a 2008504 <_Thread_Initialize+0x118>
20084f4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
_Workspace_Free( the_thread->libc_reent );
20084f8: 40 00 04 f9 call 20098dc <_Workspace_Free>
20084fc: 01 00 00 00 nop
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
2008500: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
2008504: 80 a2 20 00 cmp %o0, 0
2008508: 22 80 00 05 be,a 200851c <_Thread_Initialize+0x130>
200850c: d0 06 61 64 ld [ %i1 + 0x164 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
2008510: 40 00 04 f3 call 20098dc <_Workspace_Free>
2008514: 01 00 00 00 nop
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
2008518: d0 06 61 64 ld [ %i1 + 0x164 ], %o0
200851c: 80 a2 20 00 cmp %o0, 0
2008520: 22 80 00 05 be,a 2008534 <_Thread_Initialize+0x148> <== ALWAYS TAKEN
2008524: d0 06 61 68 ld [ %i1 + 0x168 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
2008528: 40 00 04 ed call 20098dc <_Workspace_Free> <== NOT EXECUTED
200852c: 01 00 00 00 nop <== NOT EXECUTED
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
2008530: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 <== NOT EXECUTED
2008534: 80 a2 20 00 cmp %o0, 0
2008538: 02 80 00 05 be 200854c <_Thread_Initialize+0x160> <== ALWAYS TAKEN
200853c: 80 a6 e0 00 cmp %i3, 0
_Workspace_Free( the_thread->API_Extensions[i] );
2008540: 40 00 04 e7 call 20098dc <_Workspace_Free> <== NOT EXECUTED
2008544: 01 00 00 00 nop <== NOT EXECUTED
if ( extensions_area )
2008548: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
200854c: 02 80 00 05 be 2008560 <_Thread_Initialize+0x174>
2008550: 80 a4 a0 00 cmp %l2, 0
(void) _Workspace_Free( extensions_area );
2008554: 40 00 04 e2 call 20098dc <_Workspace_Free>
2008558: 90 10 00 1b mov %i3, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
200855c: 80 a4 a0 00 cmp %l2, 0
2008560: 02 80 00 05 be 2008574 <_Thread_Initialize+0x188>
2008564: 90 10 00 19 mov %i1, %o0
(void) _Workspace_Free( fp_area );
2008568: 40 00 04 dd call 20098dc <_Workspace_Free>
200856c: 90 10 00 12 mov %l2, %o0
#endif
_Thread_Stack_Free( the_thread );
2008570: 90 10 00 19 mov %i1, %o0
2008574: 40 00 02 8c call 2008fa4 <_Thread_Stack_Free>
2008578: b0 10 20 00 clr %i0
return false;
}
200857c: 81 c7 e0 08 ret
2008580: 81 e8 00 00 restore
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
2008584: 81 c7 e0 08 ret
2008588: 91 e8 20 00 restore %g0, 0, %o0
/*
* 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 );
200858c: 40 00 04 cb call 20098b8 <_Workspace_Allocate>
2008590: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
2008594: b6 10 20 00 clr %i3
2008598: a4 92 20 00 orcc %o0, 0, %l2
200859c: 02 bf ff d3 be 20084e8 <_Thread_Initialize+0xfc>
20085a0: 82 10 00 12 mov %l2, %g1
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
20085a4: 27 00 80 6d sethi %hi(0x201b400), %l3
20085a8: c4 04 e2 b0 ld [ %l3 + 0x2b0 ], %g2 ! 201b6b0 <_Thread_Maximum_extensions>
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
20085ac: c2 26 60 c8 st %g1, [ %i1 + 0xc8 ]
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;
20085b0: c2 26 61 58 st %g1, [ %i1 + 0x158 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20085b4: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
20085b8: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
20085bc: c0 26 60 68 clr [ %i1 + 0x68 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
20085c0: 80 a0 a0 00 cmp %g2, 0
20085c4: 02 bf ff aa be 200846c <_Thread_Initialize+0x80>
20085c8: c0 26 60 6c clr [ %i1 + 0x6c ]
extensions_area = _Workspace_Allocate(
20085cc: 84 00 a0 01 inc %g2
20085d0: 40 00 04 ba call 20098b8 <_Workspace_Allocate>
20085d4: 91 28 a0 02 sll %g2, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
20085d8: b6 92 20 00 orcc %o0, 0, %i3
20085dc: 02 bf ff c3 be 20084e8 <_Thread_Initialize+0xfc>
20085e0: c8 04 e2 b0 ld [ %l3 + 0x2b0 ], %g4
goto failed;
}
the_thread->extensions = (void **) extensions_area;
20085e4: f6 26 61 6c st %i3, [ %i1 + 0x16c ]
20085e8: 86 10 00 1b mov %i3, %g3
* 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++ )
20085ec: 84 10 20 00 clr %g2
20085f0: 10 80 00 03 b 20085fc <_Thread_Initialize+0x210>
20085f4: 82 10 20 00 clr %g1
20085f8: c6 06 61 6c ld [ %i1 + 0x16c ], %g3
the_thread->extensions[i] = NULL;
20085fc: 85 28 a0 02 sll %g2, 2, %g2
2008600: 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++ )
2008604: 82 00 60 01 inc %g1
2008608: 80 a1 00 01 cmp %g4, %g1
200860c: 1a bf ff fb bcc 20085f8 <_Thread_Initialize+0x20c>
2008610: 84 10 00 01 mov %g1, %g2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
2008614: 10 bf ff 99 b 2008478 <_Thread_Initialize+0x8c>
2008618: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
0200cb78 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
200cb78: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
200cb7c: 03 00 80 6d sethi %hi(0x201b400), %g1
200cb80: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
200cb84: 7f ff d5 ca call 20022ac <sparc_disable_interrupts>
200cb88: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
200cb8c: b0 10 00 08 mov %o0, %i0
if ( _Chain_Has_only_one_node( ready ) ) {
200cb90: c4 04 40 00 ld [ %l1 ], %g2
200cb94: c2 04 60 08 ld [ %l1 + 8 ], %g1
200cb98: 80 a0 80 01 cmp %g2, %g1
200cb9c: 02 80 00 1f be 200cc18 <_Thread_Reset_timeslice+0xa0>
200cba0: 86 04 60 04 add %l1, 4, %g3
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
200cba4: c2 04 00 00 ld [ %l0 ], %g1
previous = the_node->previous;
200cba8: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
200cbac: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200cbb0: c6 24 00 00 st %g3, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200cbb4: c4 20 60 04 st %g2, [ %g1 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
200cbb8: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
200cbbc: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200cbc0: c2 24 20 04 st %g1, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
200cbc4: e0 20 40 00 st %l0, [ %g1 ]
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
200cbc8: 7f ff d5 bd call 20022bc <sparc_enable_interrupts>
200cbcc: 01 00 00 00 nop
200cbd0: 7f ff d5 b7 call 20022ac <sparc_disable_interrupts>
200cbd4: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
200cbd8: 03 00 80 6d sethi %hi(0x201b400), %g1
200cbdc: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir>
200cbe0: 80 a4 00 02 cmp %l0, %g2
200cbe4: 02 80 00 06 be 200cbfc <_Thread_Reset_timeslice+0x84> <== ALWAYS TAKEN
200cbe8: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
200cbec: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
200cbf0: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary><== NOT EXECUTED
_ISR_Enable( level );
200cbf4: 7f ff d5 b2 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
200cbf8: 81 e8 00 00 restore <== NOT EXECUTED
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
200cbfc: c4 04 40 00 ld [ %l1 ], %g2
200cc00: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ]
_Context_Switch_necessary = true;
200cc04: 84 10 20 01 mov 1, %g2
200cc08: 03 00 80 6d sethi %hi(0x201b400), %g1
200cc0c: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary>
_ISR_Enable( level );
200cc10: 7f ff d5 ab call 20022bc <sparc_enable_interrupts>
200cc14: 81 e8 00 00 restore
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
200cc18: 7f ff d5 a9 call 20022bc <sparc_enable_interrupts>
200cc1c: 81 e8 00 00 restore
0200d1dc <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
200d1dc: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
200d1e0: 7f ff d4 b8 call 20024c0 <sparc_disable_interrupts>
200d1e4: a0 10 00 18 mov %i0, %l0
200d1e8: b0 10 00 08 mov %o0, %i0
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
200d1ec: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
if ( current_state & STATES_SUSPENDED ) {
200d1f0: 80 88 60 02 btst 2, %g1
200d1f4: 02 80 00 05 be 200d208 <_Thread_Resume+0x2c> <== NEVER TAKEN
200d1f8: 82 08 7f fd and %g1, -3, %g1
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
200d1fc: 80 a0 60 00 cmp %g1, 0
200d200: 02 80 00 04 be 200d210 <_Thread_Resume+0x34>
200d204: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_Context_Switch_necessary = true;
}
}
}
_ISR_Enable( level );
200d208: 7f ff d4 b2 call 20024d0 <sparc_enable_interrupts>
200d20c: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
200d210: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
if ( _States_Is_ready( current_state ) ) {
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
200d214: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
200d218: c8 10 80 00 lduh [ %g2 ], %g4
200d21c: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
200d220: 86 11 00 03 or %g4, %g3, %g3
200d224: c6 30 80 00 sth %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200d228: 84 00 60 04 add %g1, 4, %g2
_Priority_Major_bit_map |= the_priority_map->ready_major;
200d22c: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4
200d230: c4 24 00 00 st %g2, [ %l0 ]
200d234: 07 00 80 86 sethi %hi(0x2021800), %g3
old_last_node = the_chain->last;
200d238: c4 00 60 08 ld [ %g1 + 8 ], %g2
200d23c: da 10 e0 34 lduh [ %g3 + 0x34 ], %o5
the_chain->last = the_node;
200d240: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200d244: c4 24 20 04 st %g2, [ %l0 + 4 ]
200d248: 82 13 40 04 or %o5, %g4, %g1
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
200d24c: e0 20 80 00 st %l0, [ %g2 ]
200d250: c2 30 e0 34 sth %g1, [ %g3 + 0x34 ]
_ISR_Flash( level );
200d254: 7f ff d4 9f call 20024d0 <sparc_enable_interrupts>
200d258: 01 00 00 00 nop
200d25c: 7f ff d4 99 call 20024c0 <sparc_disable_interrupts>
200d260: 01 00 00 00 nop
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
200d264: 03 00 80 86 sethi %hi(0x2021800), %g1
200d268: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 2021810 <_Thread_Heir>
200d26c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
200d270: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
200d274: 80 a0 80 03 cmp %g2, %g3
200d278: 1a bf ff e4 bcc 200d208 <_Thread_Resume+0x2c>
200d27c: 07 00 80 86 sethi %hi(0x2021800), %g3
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200d280: c6 00 e0 40 ld [ %g3 + 0x40 ], %g3 ! 2021840 <_Thread_Executing>
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
200d284: e0 20 60 10 st %l0, [ %g1 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200d288: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1
200d28c: 80 a0 60 00 cmp %g1, 0
200d290: 32 80 00 05 bne,a 200d2a4 <_Thread_Resume+0xc8>
200d294: 84 10 20 01 mov 1, %g2
200d298: 80 a0 a0 00 cmp %g2, 0
200d29c: 12 bf ff db bne 200d208 <_Thread_Resume+0x2c> <== ALWAYS TAKEN
200d2a0: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
200d2a4: 03 00 80 86 sethi %hi(0x2021800), %g1
200d2a8: c4 28 60 50 stb %g2, [ %g1 + 0x50 ] ! 2021850 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
200d2ac: 7f ff d4 89 call 20024d0 <sparc_enable_interrupts>
200d2b0: 81 e8 00 00 restore
020090e8 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
20090e8: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
20090ec: 03 00 80 6d sethi %hi(0x201b400), %g1
20090f0: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
20090f4: 7f ff e4 6e call 20022ac <sparc_disable_interrupts>
20090f8: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
20090fc: b0 10 00 08 mov %o0, %i0
if ( !_Chain_Has_only_one_node( ready ) ) {
2009100: c4 04 40 00 ld [ %l1 ], %g2
2009104: c2 04 60 08 ld [ %l1 + 8 ], %g1
2009108: 80 a0 80 01 cmp %g2, %g1
200910c: 02 80 00 19 be 2009170 <_Thread_Yield_processor+0x88>
2009110: 86 04 60 04 add %l1, 4, %g3
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2009114: c2 04 00 00 ld [ %l0 ], %g1
previous = the_node->previous;
2009118: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
200911c: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2009120: c6 24 00 00 st %g3, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2009124: c4 20 60 04 st %g2, [ %g1 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
2009128: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
200912c: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
2009130: c2 24 20 04 st %g1, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
2009134: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
2009138: 7f ff e4 61 call 20022bc <sparc_enable_interrupts>
200913c: 01 00 00 00 nop
2009140: 7f ff e4 5b call 20022ac <sparc_disable_interrupts>
2009144: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
2009148: 03 00 80 6d sethi %hi(0x201b400), %g1
200914c: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir>
2009150: 80 a4 00 02 cmp %l0, %g2
2009154: 22 80 00 0e be,a 200918c <_Thread_Yield_processor+0xa4> <== ALWAYS TAKEN
2009158: c4 04 40 00 ld [ %l1 ], %g2
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
200915c: 84 10 20 01 mov 1, %g2
2009160: 03 00 80 6d sethi %hi(0x201b400), %g1
2009164: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary>
_ISR_Enable( level );
2009168: 7f ff e4 55 call 20022bc <sparc_enable_interrupts>
200916c: 81 e8 00 00 restore
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
2009170: 03 00 80 6d sethi %hi(0x201b400), %g1
2009174: c2 00 62 a0 ld [ %g1 + 0x2a0 ], %g1 ! 201b6a0 <_Thread_Heir>
2009178: 80 a4 00 01 cmp %l0, %g1
200917c: 32 bf ff f9 bne,a 2009160 <_Thread_Yield_processor+0x78> <== NEVER TAKEN
2009180: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
_Context_Switch_necessary = true;
_ISR_Enable( level );
2009184: 7f ff e4 4e call 20022bc <sparc_enable_interrupts>
2009188: 81 e8 00 00 restore
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
200918c: 10 bf ff f4 b 200915c <_Thread_Yield_processor+0x74>
2009190: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ]
0200893c <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
200893c: 9d e3 bf a0 save %sp, -96, %sp
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
2008940: e0 06 60 14 ld [ %i1 + 0x14 ], %l0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2008944: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
2008948: c0 26 60 3c clr [ %i1 + 0x3c ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200894c: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2008950: 82 06 60 38 add %i1, 0x38, %g1
2008954: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
2008958: 2d 00 80 6a sethi %hi(0x201a800), %l6
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
200895c: 83 34 20 06 srl %l0, 6, %g1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
2008960: 80 8c 20 20 btst 0x20, %l0
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
2008964: ab 28 60 04 sll %g1, 4, %l5
2008968: ac 15 a3 74 or %l6, 0x374, %l6
200896c: 83 28 60 02 sll %g1, 2, %g1
block_state = the_thread_queue->state;
2008970: e8 06 20 38 ld [ %i0 + 0x38 ], %l4
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
2008974: aa 25 40 01 sub %l5, %g1, %l5
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
2008978: 12 80 00 24 bne 2008a08 <_Thread_queue_Enqueue_priority+0xcc>
200897c: aa 06 00 15 add %i0, %l5, %l5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2008980: ac 05 60 04 add %l5, 4, %l6
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
2008984: 7f ff e6 4a call 20022ac <sparc_disable_interrupts>
2008988: 01 00 00 00 nop
200898c: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->first;
2008990: c2 05 40 00 ld [ %l5 ], %g1
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
2008994: 80 a0 40 16 cmp %g1, %l6
2008998: 02 80 00 3a be 2008a80 <_Thread_queue_Enqueue_priority+0x144>
200899c: a2 10 00 01 mov %g1, %l1
search_priority = search_thread->current_priority;
20089a0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3
if ( priority <= search_priority )
20089a4: 80 a4 00 13 cmp %l0, %l3
20089a8: 18 80 00 0b bgu 20089d4 <_Thread_queue_Enqueue_priority+0x98>
20089ac: 01 00 00 00 nop
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
20089b0: 10 80 00 36 b 2008a88 <_Thread_queue_Enqueue_priority+0x14c>
20089b4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
20089b8: 80 a4 40 16 cmp %l1, %l6
20089bc: 02 80 00 32 be 2008a84 <_Thread_queue_Enqueue_priority+0x148>
20089c0: 82 10 00 11 mov %l1, %g1
search_priority = search_thread->current_priority;
20089c4: e6 04 60 14 ld [ %l1 + 0x14 ], %l3
if ( priority <= search_priority )
20089c8: 80 a4 00 13 cmp %l0, %l3
20089cc: 28 80 00 2f bleu,a 2008a88 <_Thread_queue_Enqueue_priority+0x14c>
20089d0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
20089d4: 7f ff e6 3a call 20022bc <sparc_enable_interrupts>
20089d8: 90 10 00 12 mov %l2, %o0
20089dc: 7f ff e6 34 call 20022ac <sparc_disable_interrupts>
20089e0: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
20089e4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
20089e8: 80 8d 00 01 btst %l4, %g1
20089ec: 32 bf ff f3 bne,a 20089b8 <_Thread_queue_Enqueue_priority+0x7c><== ALWAYS TAKEN
20089f0: e2 04 40 00 ld [ %l1 ], %l1
_ISR_Enable( level );
20089f4: 7f ff e6 32 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
20089f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
goto restart_forward_search;
20089fc: 30 bf ff e2 b,a 2008984 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
2008a00: 7f ff e6 2f call 20022bc <sparc_enable_interrupts>
2008a04: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
2008a08: 7f ff e6 29 call 20022ac <sparc_disable_interrupts>
2008a0c: e6 0d 80 00 ldub [ %l6 ], %l3
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2008a10: a6 04 e0 01 inc %l3
_ISR_Disable( level );
2008a14: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->last;
2008a18: c2 05 60 08 ld [ %l5 + 8 ], %g1
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
2008a1c: 80 a0 40 15 cmp %g1, %l5
2008a20: 02 80 00 20 be 2008aa0 <_Thread_queue_Enqueue_priority+0x164>
2008a24: a2 10 00 01 mov %g1, %l1
search_priority = search_thread->current_priority;
2008a28: e6 00 60 14 ld [ %g1 + 0x14 ], %l3
if ( priority >= search_priority )
2008a2c: 80 a4 00 13 cmp %l0, %l3
2008a30: 0a 80 00 0b bcs 2008a5c <_Thread_queue_Enqueue_priority+0x120>
2008a34: 01 00 00 00 nop
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
2008a38: 10 80 00 1b b 2008aa4 <_Thread_queue_Enqueue_priority+0x168>
2008a3c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
2008a40: 80 a4 40 15 cmp %l1, %l5
2008a44: 02 80 00 17 be 2008aa0 <_Thread_queue_Enqueue_priority+0x164>
2008a48: 82 10 00 11 mov %l1, %g1
search_priority = search_thread->current_priority;
2008a4c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3
if ( priority >= search_priority )
2008a50: 80 a4 00 13 cmp %l0, %l3
2008a54: 3a 80 00 14 bcc,a 2008aa4 <_Thread_queue_Enqueue_priority+0x168>
2008a58: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
2008a5c: 7f ff e6 18 call 20022bc <sparc_enable_interrupts>
2008a60: 90 10 00 12 mov %l2, %o0
2008a64: 7f ff e6 12 call 20022ac <sparc_disable_interrupts>
2008a68: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
2008a6c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
2008a70: 80 8d 00 01 btst %l4, %g1
2008a74: 32 bf ff f3 bne,a 2008a40 <_Thread_queue_Enqueue_priority+0x104>
2008a78: e2 04 60 04 ld [ %l1 + 4 ], %l1
2008a7c: 30 bf ff e1 b,a 2008a00 <_Thread_queue_Enqueue_priority+0xc4>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
2008a80: a6 10 3f ff mov -1, %l3
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
2008a84: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
2008a88: 80 a0 a0 01 cmp %g2, 1
2008a8c: 02 80 00 17 be 2008ae8 <_Thread_queue_Enqueue_priority+0x1ac>
2008a90: 80 a4 00 13 cmp %l0, %l3
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
2008a94: e4 26 80 00 st %l2, [ %i2 ]
return the_thread_queue->sync_state;
}
2008a98: 81 c7 e0 08 ret
2008a9c: 91 e8 00 02 restore %g0, %g2, %o0
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
2008aa0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
2008aa4: 80 a0 a0 01 cmp %g2, 1
2008aa8: 32 bf ff fc bne,a 2008a98 <_Thread_queue_Enqueue_priority+0x15c>
2008aac: e4 26 80 00 st %l2, [ %i2 ]
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2008ab0: 80 a4 00 13 cmp %l0, %l3
2008ab4: 02 80 00 1a be 2008b1c <_Thread_queue_Enqueue_priority+0x1e0>
2008ab8: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
2008abc: c4 00 40 00 ld [ %g1 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
2008ac0: c2 26 60 04 st %g1, [ %i1 + 4 ]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
2008ac4: c4 26 40 00 st %g2, [ %i1 ]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
2008ac8: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
2008acc: f2 20 40 00 st %i1, [ %g1 ]
next_node->previous = the_node;
2008ad0: f2 20 a0 04 st %i1, [ %g2 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2008ad4: b0 10 20 01 mov 1, %i0
2008ad8: 7f ff e5 f9 call 20022bc <sparc_enable_interrupts>
2008adc: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2008ae0: 81 c7 e0 08 ret
2008ae4: 81 e8 00 00 restore
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2008ae8: 02 80 00 0d be 2008b1c <_Thread_queue_Enqueue_priority+0x1e0>
2008aec: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
2008af0: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2008af4: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = previous_node;
2008af8: c4 26 60 04 st %g2, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
2008afc: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
2008b00: f2 20 80 00 st %i1, [ %g2 ]
search_node->previous = the_node;
2008b04: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2008b08: b0 10 20 01 mov 1, %i0
2008b0c: 7f ff e5 ec call 20022bc <sparc_enable_interrupts>
2008b10: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2008b14: 81 c7 e0 08 ret
2008b18: 81 e8 00 00 restore
2008b1c: a2 04 60 3c add %l1, 0x3c, %l1
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
2008b20: c2 04 60 04 ld [ %l1 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2008b24: e2 26 40 00 st %l1, [ %i1 ]
the_node->previous = previous_node;
2008b28: c2 26 60 04 st %g1, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
2008b2c: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
2008b30: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
2008b34: f2 24 60 04 st %i1, [ %l1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2008b38: b0 10 20 01 mov 1, %i0
2008b3c: 7f ff e5 e0 call 20022bc <sparc_enable_interrupts>
2008b40: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2008b44: 81 c7 e0 08 ret
2008b48: 81 e8 00 00 restore
02008bf8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
2008bf8: 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 )
2008bfc: 80 a6 20 00 cmp %i0, 0
2008c00: 02 80 00 13 be 2008c4c <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
2008c04: 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 ) {
2008c08: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
2008c0c: 80 a4 60 01 cmp %l1, 1
2008c10: 02 80 00 04 be 2008c20 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
2008c14: 01 00 00 00 nop
2008c18: 81 c7 e0 08 ret <== NOT EXECUTED
2008c1c: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
2008c20: 7f ff e5 a3 call 20022ac <sparc_disable_interrupts>
2008c24: 01 00 00 00 nop
2008c28: a0 10 00 08 mov %o0, %l0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
2008c2c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2008c30: 03 00 00 ef sethi %hi(0x3bc00), %g1
2008c34: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2008c38: 80 88 80 01 btst %g2, %g1
2008c3c: 12 80 00 06 bne 2008c54 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
2008c40: 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 );
2008c44: 7f ff e5 9e call 20022bc <sparc_enable_interrupts>
2008c48: 90 10 00 10 mov %l0, %o0
2008c4c: 81 c7 e0 08 ret
2008c50: 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 );
2008c54: 92 10 00 19 mov %i1, %o1
2008c58: e2 26 20 30 st %l1, [ %i0 + 0x30 ]
2008c5c: 40 00 0f 25 call 200c8f0 <_Thread_queue_Extract_priority_helper>
2008c60: 94 10 20 01 mov 1, %o2
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
2008c64: 90 10 00 18 mov %i0, %o0
2008c68: 92 10 00 19 mov %i1, %o1
2008c6c: 7f ff ff 34 call 200893c <_Thread_queue_Enqueue_priority>
2008c70: 94 07 bf fc add %fp, -4, %o2
2008c74: 30 bf ff f4 b,a 2008c44 <_Thread_queue_Requeue+0x4c>
02008c78 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
2008c78: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2008c7c: 90 10 00 18 mov %i0, %o0
2008c80: 7f ff fd b0 call 2008340 <_Thread_Get>
2008c84: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2008c88: c2 07 bf fc ld [ %fp + -4 ], %g1
2008c8c: 80 a0 60 00 cmp %g1, 0
2008c90: 12 80 00 08 bne 2008cb0 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
2008c94: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
2008c98: 40 00 0f 51 call 200c9dc <_Thread_queue_Process_timeout>
2008c9c: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2008ca0: 03 00 80 6d sethi %hi(0x201b400), %g1
2008ca4: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level>
2008ca8: 84 00 bf ff add %g2, -1, %g2
2008cac: c4 20 62 10 st %g2, [ %g1 + 0x210 ]
2008cb0: 81 c7 e0 08 ret
2008cb4: 81 e8 00 00 restore
020166ec <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
20166ec: 9d e3 bf 88 save %sp, -120, %sp
20166f0: 2d 00 80 f3 sethi %hi(0x203cc00), %l6
20166f4: ba 07 bf f4 add %fp, -12, %i5
20166f8: a8 07 bf f8 add %fp, -8, %l4
20166fc: a4 07 bf e8 add %fp, -24, %l2
2016700: ae 07 bf ec add %fp, -20, %l7
2016704: 2b 00 80 f3 sethi %hi(0x203cc00), %l5
2016708: 39 00 80 f3 sethi %hi(0x203cc00), %i4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
201670c: c0 27 bf f8 clr [ %fp + -8 ]
2016710: c0 27 bf ec clr [ %fp + -20 ]
the_chain->last = _Chain_Head(the_chain);
2016714: fa 27 bf fc st %i5, [ %fp + -4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2016718: e8 27 bf f4 st %l4, [ %fp + -12 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
201671c: e4 27 bf f0 st %l2, [ %fp + -16 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2016720: ee 27 bf e8 st %l7, [ %fp + -24 ]
2016724: ac 15 a2 14 or %l6, 0x214, %l6
2016728: aa 15 61 54 or %l5, 0x154, %l5
201672c: b8 17 20 c0 or %i4, 0xc0, %i4
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2016730: a2 06 20 30 add %i0, 0x30, %l1
/*
* 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 );
2016734: a6 06 20 68 add %i0, 0x68, %l3
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2016738: b2 06 20 08 add %i0, 8, %i1
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
201673c: b4 06 20 40 add %i0, 0x40, %i2
_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;
2016740: b6 10 20 01 mov 1, %i3
{
/*
* 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;
2016744: fa 26 20 78 st %i5, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2016748: c2 05 80 00 ld [ %l6 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
201674c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2016750: 90 10 00 11 mov %l1, %o0
2016754: 92 20 40 09 sub %g1, %o1, %o1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2016758: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
201675c: 40 00 12 10 call 201af9c <_Watchdog_Adjust_to_chain>
2016760: 94 10 00 12 mov %l2, %o2
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2016764: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
2016768: e0 05 40 00 ld [ %l5 ], %l0
/*
* 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 ) {
201676c: 80 a4 00 09 cmp %l0, %o1
2016770: 38 80 00 2f bgu,a 201682c <_Timer_server_Body+0x140>
2016774: 92 24 00 09 sub %l0, %o1, %o1
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
2016778: 80 a4 00 09 cmp %l0, %o1
201677c: 0a 80 00 30 bcs 201683c <_Timer_server_Body+0x150>
2016780: 94 22 40 10 sub %o1, %l0, %o2
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
2016784: e0 26 20 74 st %l0, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2016788: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
201678c: 40 00 02 98 call 20171ec <_Chain_Get>
2016790: 01 00 00 00 nop
if ( timer == NULL ) {
2016794: 80 a2 20 00 cmp %o0, 0
2016798: 02 80 00 10 be 20167d8 <_Timer_server_Body+0xec>
201679c: 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 ) {
20167a0: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
20167a4: 80 a0 60 01 cmp %g1, 1
20167a8: 02 80 00 29 be 201684c <_Timer_server_Body+0x160>
20167ac: 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 ) {
20167b0: 12 bf ff f6 bne 2016788 <_Timer_server_Body+0x9c> <== NEVER TAKEN
20167b4: 92 02 20 10 add %o0, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
20167b8: 40 00 12 2f call 201b074 <_Watchdog_Insert>
20167bc: 90 10 00 13 mov %l3, %o0
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
20167c0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
20167c4: 40 00 02 8a call 20171ec <_Chain_Get>
20167c8: 01 00 00 00 nop
if ( timer == NULL ) {
20167cc: 80 a2 20 00 cmp %o0, 0
20167d0: 32 bf ff f5 bne,a 20167a4 <_Timer_server_Body+0xb8> <== NEVER TAKEN
20167d4: c2 02 20 38 ld [ %o0 + 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 );
20167d8: 7f ff e3 aa call 200f680 <sparc_disable_interrupts>
20167dc: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
20167e0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20167e4: 80 a5 00 01 cmp %l4, %g1
20167e8: 02 80 00 1d be 201685c <_Timer_server_Body+0x170> <== ALWAYS TAKEN
20167ec: 01 00 00 00 nop
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
20167f0: 7f ff e3 a8 call 200f690 <sparc_enable_interrupts> <== NOT EXECUTED
20167f4: 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;
20167f8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
20167fc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2016800: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2016804: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2016808: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
201680c: 40 00 11 e4 call 201af9c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED
2016810: 94 10 00 12 mov %l2, %o2 <== 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;
2016814: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== 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();
2016818: e0 05 40 00 ld [ %l5 ], %l0 <== 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 ) {
201681c: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED
2016820: 08 bf ff d7 bleu 201677c <_Timer_server_Body+0x90> <== NOT EXECUTED
2016824: 01 00 00 00 nop <== 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 );
2016828: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED
201682c: 90 10 00 13 mov %l3, %o0
2016830: 40 00 11 db call 201af9c <_Watchdog_Adjust_to_chain>
2016834: 94 10 00 12 mov %l2, %o2
2016838: 30 bf ff d3 b,a 2016784 <_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 );
201683c: 90 10 00 13 mov %l3, %o0
2016840: 40 00 11 a7 call 201aedc <_Watchdog_Adjust>
2016844: 92 10 20 01 mov 1, %o1
2016848: 30 bf ff cf b,a 2016784 <_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 );
201684c: 92 02 20 10 add %o0, 0x10, %o1
2016850: 40 00 12 09 call 201b074 <_Watchdog_Insert>
2016854: 90 10 00 11 mov %l1, %o0
2016858: 30 bf ff cc b,a 2016788 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
201685c: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2016860: 7f ff e3 8c call 200f690 <sparc_enable_interrupts>
2016864: 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 ) ) {
2016868: c2 07 bf e8 ld [ %fp + -24 ], %g1
201686c: 80 a5 c0 01 cmp %l7, %g1
2016870: 12 80 00 0c bne 20168a0 <_Timer_server_Body+0x1b4>
2016874: 01 00 00 00 nop
2016878: 30 80 00 13 b,a 20168c4 <_Timer_server_Body+0x1d8>
* 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;
201687c: c0 24 20 08 clr [ %l0 + 8 ]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
2016880: c2 27 bf e8 st %g1, [ %fp + -24 ]
new_first->previous = _Chain_Head(the_chain);
2016884: e4 20 60 04 st %l2, [ %g1 + 4 ]
_ISR_Enable( level );
2016888: 7f ff e3 82 call 200f690 <sparc_enable_interrupts>
201688c: 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 );
2016890: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
2016894: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
2016898: 9f c0 40 00 call %g1
201689c: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
20168a0: 7f ff e3 78 call 200f680 <sparc_disable_interrupts>
20168a4: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
20168a8: e0 07 bf e8 ld [ %fp + -24 ], %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
20168ac: 80 a5 c0 10 cmp %l7, %l0
20168b0: 32 bf ff f3 bne,a 201687c <_Timer_server_Body+0x190>
20168b4: c2 04 00 00 ld [ %l0 ], %g1
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
20168b8: 7f ff e3 76 call 200f690 <sparc_enable_interrupts>
20168bc: 01 00 00 00 nop
20168c0: 30 bf ff a1 b,a 2016744 <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
20168c4: c0 2e 20 7c clrb [ %i0 + 0x7c ]
20168c8: c2 07 00 00 ld [ %i4 ], %g1
20168cc: 82 00 60 01 inc %g1
20168d0: c2 27 00 00 st %g1, [ %i4 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
20168d4: d0 06 00 00 ld [ %i0 ], %o0
20168d8: 40 00 0e db call 201a444 <_Thread_Set_state>
20168dc: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
20168e0: 7f ff ff 59 call 2016644 <_Timer_server_Reset_interval_system_watchdog>
20168e4: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
20168e8: 7f ff ff 6c call 2016698 <_Timer_server_Reset_tod_system_watchdog>
20168ec: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
20168f0: 40 00 0b df call 201986c <_Thread_Enable_dispatch>
20168f4: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
20168f8: 90 10 00 19 mov %i1, %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;
20168fc: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2016900: 40 00 12 4a call 201b228 <_Watchdog_Remove>
2016904: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2016908: 40 00 12 48 call 201b228 <_Watchdog_Remove>
201690c: 90 10 00 1a mov %i2, %o0
2016910: 30 bf ff 8d b,a 2016744 <_Timer_server_Body+0x58>
02009194 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
2009194: 9d e3 bf a0 save %sp, -96, %sp
2009198: 82 10 00 18 mov %i0, %g1
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
200919c: c8 06 60 04 ld [ %i1 + 4 ], %g4
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
20091a0: f0 06 40 00 ld [ %i1 ], %i0
/* Add the basics */
time->tv_sec += add->tv_sec;
20091a4: c6 00 40 00 ld [ %g1 ], %g3
time->tv_nsec += add->tv_nsec;
20091a8: c4 00 60 04 ld [ %g1 + 4 ], %g2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
20091ac: 86 00 c0 18 add %g3, %i0, %g3
time->tv_nsec += add->tv_nsec;
20091b0: 84 01 00 02 add %g4, %g2, %g2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
20091b4: c6 20 40 00 st %g3, [ %g1 ]
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
20091b8: 1b 0e e6 b2 sethi %hi(0x3b9ac800), %o5
20091bc: 9a 13 61 ff or %o5, 0x1ff, %o5 ! 3b9ac9ff <RAM_END+0x395ac9ff>
20091c0: 80 a0 80 0d cmp %g2, %o5
20091c4: 08 80 00 0b bleu 20091f0 <_Timespec_Add_to+0x5c>
20091c8: c4 20 60 04 st %g2, [ %g1 + 4 ]
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
20091cc: 09 31 19 4d sethi %hi(0xc4653400), %g4
20091d0: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 <RAM_END+0xc2253600>
20091d4: 84 00 80 04 add %g2, %g4, %g2
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
20091d8: 86 00 e0 01 inc %g3
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
20091dc: 80 a0 80 0d cmp %g2, %o5
20091e0: 18 bf ff fd bgu 20091d4 <_Timespec_Add_to+0x40> <== NEVER TAKEN
20091e4: b0 06 20 01 inc %i0
20091e8: c6 20 40 00 st %g3, [ %g1 ]
20091ec: c4 20 60 04 st %g2, [ %g1 + 4 ]
time->tv_sec++;
seconds++;
}
return seconds;
}
20091f0: 81 c7 e0 08 ret
20091f4: 81 e8 00 00 restore
0200b29c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
200b29c: c6 02 00 00 ld [ %o0 ], %g3
200b2a0: c4 02 40 00 ld [ %o1 ], %g2
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
200b2a4: 82 10 00 08 mov %o0, %g1
if ( lhs->tv_sec > rhs->tv_sec )
200b2a8: 80 a0 c0 02 cmp %g3, %g2
200b2ac: 14 80 00 0a bg 200b2d4 <_Timespec_Greater_than+0x38>
200b2b0: 90 10 20 01 mov 1, %o0
return true;
if ( lhs->tv_sec < rhs->tv_sec )
200b2b4: 80 a0 c0 02 cmp %g3, %g2
200b2b8: 06 80 00 07 bl 200b2d4 <_Timespec_Greater_than+0x38> <== NEVER TAKEN
200b2bc: 90 10 20 00 clr %o0
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
200b2c0: c4 00 60 04 ld [ %g1 + 4 ], %g2
200b2c4: c2 02 60 04 ld [ %o1 + 4 ], %g1
200b2c8: 80 a0 80 01 cmp %g2, %g1
200b2cc: 04 80 00 04 ble 200b2dc <_Timespec_Greater_than+0x40>
200b2d0: 90 10 20 01 mov 1, %o0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
200b2d4: 81 c3 e0 08 retl
200b2d8: 01 00 00 00 nop
200b2dc: 81 c3 e0 08 retl
200b2e0: 90 10 20 00 clr %o0 ! 0 <PROM_START>
020093a4 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
20093a4: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
20093a8: 23 00 80 6e sethi %hi(0x201b800), %l1
20093ac: a2 14 60 48 or %l1, 0x48, %l1 ! 201b848 <_User_extensions_List>
20093b0: e0 04 60 08 ld [ %l1 + 8 ], %l0
20093b4: 80 a4 00 11 cmp %l0, %l1
20093b8: 02 80 00 0d be 20093ec <_User_extensions_Fatal+0x48> <== NEVER TAKEN
20093bc: b2 0e 60 ff and %i1, 0xff, %i1
!_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 )
20093c0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
20093c4: 80 a0 60 00 cmp %g1, 0
20093c8: 02 80 00 05 be 20093dc <_User_extensions_Fatal+0x38>
20093cc: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
20093d0: 92 10 00 19 mov %i1, %o1
20093d4: 9f c0 40 00 call %g1
20093d8: 94 10 00 1a mov %i2, %o2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
20093dc: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
20093e0: 80 a4 00 11 cmp %l0, %l1
20093e4: 32 bf ff f8 bne,a 20093c4 <_User_extensions_Fatal+0x20>
20093e8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
20093ec: 81 c7 e0 08 ret
20093f0: 81 e8 00 00 restore
02009250 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
2009250: 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;
2009254: 07 00 80 6a sethi %hi(0x201a800), %g3
2009258: 86 10 e3 78 or %g3, 0x378, %g3 ! 201ab78 <Configuration>
initial_extensions = Configuration.User_extension_table;
200925c: e6 00 e0 3c ld [ %g3 + 0x3c ], %l3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2009260: 1b 00 80 6e sethi %hi(0x201b800), %o5
2009264: 09 00 80 6d sethi %hi(0x201b400), %g4
2009268: 84 13 60 48 or %o5, 0x48, %g2
200926c: 82 11 22 14 or %g4, 0x214, %g1
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2009270: c4 20 a0 08 st %g2, [ %g2 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2009274: c0 20 a0 04 clr [ %g2 + 4 ]
the_chain->last = _Chain_Head(the_chain);
2009278: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
200927c: c0 20 60 04 clr [ %g1 + 4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2009280: 84 00 a0 04 add %g2, 4, %g2
2009284: 82 00 60 04 add %g1, 4, %g1
2009288: c4 23 60 48 st %g2, [ %o5 + 0x48 ]
200928c: c2 21 22 14 st %g1, [ %g4 + 0x214 ]
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
2009290: 80 a4 e0 00 cmp %l3, 0
2009294: 02 80 00 1b be 2009300 <_User_extensions_Handler_initialization+0xb0>
2009298: e4 00 e0 38 ld [ %g3 + 0x38 ], %l2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
200929c: 83 2c a0 02 sll %l2, 2, %g1
20092a0: a3 2c a0 04 sll %l2, 4, %l1
20092a4: a2 24 40 01 sub %l1, %g1, %l1
20092a8: a2 04 40 12 add %l1, %l2, %l1
20092ac: a3 2c 60 02 sll %l1, 2, %l1
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
20092b0: 40 00 01 73 call 200987c <_Workspace_Allocate_or_fatal_error>
20092b4: 90 10 00 11 mov %l1, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
20092b8: 94 10 00 11 mov %l1, %o2
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
20092bc: a0 10 00 08 mov %o0, %l0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
20092c0: 40 00 18 1a call 200f328 <memset>
20092c4: 92 10 20 00 clr %o1
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
20092c8: 80 a4 a0 00 cmp %l2, 0
20092cc: 02 80 00 0d be 2009300 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
20092d0: a2 10 20 00 clr %l1
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
20092d4: 93 2c 60 05 sll %l1, 5, %o1
20092d8: 94 10 20 20 mov 0x20, %o2
20092dc: 92 04 c0 09 add %l3, %o1, %o1
20092e0: 40 00 17 d3 call 200f22c <memcpy>
20092e4: 90 04 20 14 add %l0, 0x14, %o0
_User_extensions_Add_set( extension );
20092e8: 40 00 0e 4f call 200cc24 <_User_extensions_Add_set>
20092ec: 90 10 00 10 mov %l0, %o0
20092f0: a2 04 60 01 inc %l1
20092f4: 80 a4 80 11 cmp %l2, %l1
20092f8: 18 bf ff f7 bgu 20092d4 <_User_extensions_Handler_initialization+0x84>
20092fc: a0 04 20 34 add %l0, 0x34, %l0
2009300: 81 c7 e0 08 ret
2009304: 81 e8 00 00 restore
02009308 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
2009308: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
200930c: 23 00 80 6e sethi %hi(0x201b800), %l1
2009310: e0 04 60 48 ld [ %l1 + 0x48 ], %l0 ! 201b848 <_User_extensions_List>
2009314: a2 14 60 48 or %l1, 0x48, %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2009318: a2 04 60 04 add %l1, 4, %l1
200931c: 80 a4 00 11 cmp %l0, %l1
2009320: 02 80 00 0c be 2009350 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
2009324: 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 )
2009328: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
200932c: 80 a0 60 00 cmp %g1, 0
2009330: 02 80 00 04 be 2009340 <_User_extensions_Thread_begin+0x38>
2009334: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
2009338: 9f c0 40 00 call %g1
200933c: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2009340: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
2009344: 80 a4 00 11 cmp %l0, %l1
2009348: 32 bf ff f9 bne,a 200932c <_User_extensions_Thread_begin+0x24>
200934c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
2009350: 81 c7 e0 08 ret
2009354: 81 e8 00 00 restore
020093f4 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
20093f4: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
20093f8: 23 00 80 6e sethi %hi(0x201b800), %l1
20093fc: e0 04 60 48 ld [ %l1 + 0x48 ], %l0 ! 201b848 <_User_extensions_List>
2009400: a2 14 60 48 or %l1, 0x48, %l1
2009404: a2 04 60 04 add %l1, 4, %l1
2009408: 80 a4 00 11 cmp %l0, %l1
200940c: 02 80 00 10 be 200944c <_User_extensions_Thread_create+0x58><== NEVER TAKEN
2009410: 25 00 80 6d sethi %hi(0x201b400), %l2
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)(
2009414: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_Thread_Executing>
!_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 ) {
2009418: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
200941c: 80 a0 60 00 cmp %g1, 0
2009420: 02 80 00 07 be 200943c <_User_extensions_Thread_create+0x48>
2009424: 92 10 00 18 mov %i0, %o1
status = (*the_extension->Callouts.thread_create)(
2009428: 9f c0 40 00 call %g1
200942c: d0 04 80 00 ld [ %l2 ], %o0
_Thread_Executing,
the_thread
);
if ( !status )
2009430: 80 8a 20 ff btst 0xff, %o0
2009434: 02 80 00 08 be 2009454 <_User_extensions_Thread_create+0x60>
2009438: 01 00 00 00 nop
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200943c: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
2009440: 80 a4 00 11 cmp %l0, %l1
2009444: 32 bf ff f6 bne,a 200941c <_User_extensions_Thread_create+0x28>
2009448: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
return false;
}
}
return true;
}
200944c: 81 c7 e0 08 ret
2009450: 91 e8 20 01 restore %g0, 1, %o0
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
2009454: 81 c7 e0 08 ret
2009458: 91 e8 20 00 restore %g0, 0, %o0
0200945c <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
200945c: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
2009460: 23 00 80 6e sethi %hi(0x201b800), %l1
2009464: a2 14 60 48 or %l1, 0x48, %l1 ! 201b848 <_User_extensions_List>
2009468: e0 04 60 08 ld [ %l1 + 8 ], %l0
200946c: 80 a4 00 11 cmp %l0, %l1
2009470: 02 80 00 0d be 20094a4 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN
2009474: 25 00 80 6d sethi %hi(0x201b400), %l2
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
2009478: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_Thread_Executing>
!_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 )
200947c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
2009480: 80 a0 60 00 cmp %g1, 0
2009484: 02 80 00 04 be 2009494 <_User_extensions_Thread_delete+0x38>
2009488: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_delete)(
200948c: 9f c0 40 00 call %g1
2009490: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
2009494: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
2009498: 80 a4 00 11 cmp %l0, %l1
200949c: 32 bf ff f9 bne,a 2009480 <_User_extensions_Thread_delete+0x24>
20094a0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
20094a4: 81 c7 e0 08 ret
20094a8: 81 e8 00 00 restore
02009358 <_User_extensions_Thread_exitted>:
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
2009358: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
200935c: 23 00 80 6e sethi %hi(0x201b800), %l1
2009360: a2 14 60 48 or %l1, 0x48, %l1 ! 201b848 <_User_extensions_List>
2009364: e0 04 60 08 ld [ %l1 + 8 ], %l0
2009368: 80 a4 00 11 cmp %l0, %l1
200936c: 02 80 00 0c be 200939c <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
2009370: 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 )
2009374: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
2009378: 80 a0 60 00 cmp %g1, 0
200937c: 02 80 00 04 be 200938c <_User_extensions_Thread_exitted+0x34>
2009380: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
2009384: 9f c0 40 00 call %g1
2009388: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200938c: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
2009390: 80 a4 00 11 cmp %l0, %l1
2009394: 32 bf ff f9 bne,a 2009378 <_User_extensions_Thread_exitted+0x20>
2009398: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
200939c: 81 c7 e0 08 ret
20093a0: 81 e8 00 00 restore
0200a1b4 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
200a1b4: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
200a1b8: 23 00 80 80 sethi %hi(0x2020000), %l1
200a1bc: e0 04 61 e8 ld [ %l1 + 0x1e8 ], %l0 ! 20201e8 <_User_extensions_List>
200a1c0: a2 14 61 e8 or %l1, 0x1e8, %l1
200a1c4: a2 04 60 04 add %l1, 4, %l1
200a1c8: 80 a4 00 11 cmp %l0, %l1
200a1cc: 02 80 00 0d be 200a200 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
200a1d0: 25 00 80 80 sethi %hi(0x2020000), %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
200a1d4: a4 14 a0 70 or %l2, 0x70, %l2 ! 2020070 <_Thread_Executing>
!_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 )
200a1d8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
200a1dc: 80 a0 60 00 cmp %g1, 0
200a1e0: 02 80 00 04 be 200a1f0 <_User_extensions_Thread_restart+0x3c>
200a1e4: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_restart)(
200a1e8: 9f c0 40 00 call %g1
200a1ec: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200a1f0: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
200a1f4: 80 a4 00 11 cmp %l0, %l1
200a1f8: 32 bf ff f9 bne,a 200a1dc <_User_extensions_Thread_restart+0x28>
200a1fc: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
200a200: 81 c7 e0 08 ret
200a204: 81 e8 00 00 restore
020094ac <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
20094ac: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
20094b0: 23 00 80 6e sethi %hi(0x201b800), %l1
20094b4: e0 04 60 48 ld [ %l1 + 0x48 ], %l0 ! 201b848 <_User_extensions_List>
20094b8: a2 14 60 48 or %l1, 0x48, %l1
20094bc: a2 04 60 04 add %l1, 4, %l1
20094c0: 80 a4 00 11 cmp %l0, %l1
20094c4: 02 80 00 0d be 20094f8 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
20094c8: 25 00 80 6d sethi %hi(0x201b400), %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
20094cc: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_Thread_Executing>
!_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 )
20094d0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
20094d4: 80 a0 60 00 cmp %g1, 0
20094d8: 02 80 00 04 be 20094e8 <_User_extensions_Thread_start+0x3c>
20094dc: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_start)(
20094e0: 9f c0 40 00 call %g1
20094e4: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
20094e8: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
20094ec: 80 a4 00 11 cmp %l0, %l1
20094f0: 32 bf ff f9 bne,a 20094d4 <_User_extensions_Thread_start+0x28>
20094f4: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
20094f8: 81 c7 e0 08 ret
20094fc: 81 e8 00 00 restore
02009500 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
2009500: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
2009504: 23 00 80 6d sethi %hi(0x201b400), %l1
2009508: e0 04 62 14 ld [ %l1 + 0x214 ], %l0 ! 201b614 <_User_extensions_Switches_list>
200950c: a2 14 62 14 or %l1, 0x214, %l1
2009510: a2 04 60 04 add %l1, 4, %l1
2009514: 80 a4 00 11 cmp %l0, %l1
2009518: 02 80 00 0a be 2009540 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
200951c: 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 );
2009520: c2 04 20 08 ld [ %l0 + 8 ], %g1
2009524: 90 10 00 18 mov %i0, %o0
2009528: 9f c0 40 00 call %g1
200952c: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
2009530: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
2009534: 80 a4 00 11 cmp %l0, %l1
2009538: 32 bf ff fb bne,a 2009524 <_User_extensions_Thread_switch+0x24>
200953c: c2 04 20 08 ld [ %l0 + 8 ], %g1
2009540: 81 c7 e0 08 ret
2009544: 81 e8 00 00 restore
0200b7d0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200b7d0: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200b7d4: 7f ff de 97 call 2003230 <sparc_disable_interrupts>
200b7d8: a0 10 00 18 mov %i0, %l0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200b7dc: c2 06 00 00 ld [ %i0 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200b7e0: a2 06 20 04 add %i0, 4, %l1
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200b7e4: 80 a0 40 11 cmp %g1, %l1
200b7e8: 02 80 00 1f be 200b864 <_Watchdog_Adjust+0x94>
200b7ec: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200b7f0: 12 80 00 1f bne 200b86c <_Watchdog_Adjust+0x9c>
200b7f4: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200b7f8: 80 a6 a0 00 cmp %i2, 0
200b7fc: 02 80 00 1a be 200b864 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
200b800: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200b804: f2 00 60 10 ld [ %g1 + 0x10 ], %i1
200b808: 80 a6 80 19 cmp %i2, %i1
200b80c: 1a 80 00 0b bcc 200b838 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN
200b810: a4 10 20 01 mov 1, %l2
_Watchdog_First( header )->delta_interval -= units;
200b814: 10 80 00 1d b 200b888 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED
200b818: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200b81c: b4 a6 80 19 subcc %i2, %i1, %i2
200b820: 02 80 00 11 be 200b864 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
200b824: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200b828: f2 00 60 10 ld [ %g1 + 0x10 ], %i1
200b82c: 80 a6 40 1a cmp %i1, %i2
200b830: 38 80 00 16 bgu,a 200b888 <_Watchdog_Adjust+0xb8>
200b834: b4 26 40 1a sub %i1, %i2, %i2
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
200b838: e4 20 60 10 st %l2, [ %g1 + 0x10 ]
_ISR_Enable( level );
200b83c: 7f ff de 81 call 2003240 <sparc_enable_interrupts>
200b840: 01 00 00 00 nop
_Watchdog_Tickle( header );
200b844: 40 00 00 b6 call 200bb1c <_Watchdog_Tickle>
200b848: 90 10 00 10 mov %l0, %o0
_ISR_Disable( level );
200b84c: 7f ff de 79 call 2003230 <sparc_disable_interrupts>
200b850: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200b854: c4 04 00 00 ld [ %l0 ], %g2
if ( _Chain_Is_empty( header ) )
200b858: 80 a4 40 02 cmp %l1, %g2
200b85c: 12 bf ff f0 bne 200b81c <_Watchdog_Adjust+0x4c>
200b860: 82 10 00 02 mov %g2, %g1
}
break;
}
}
_ISR_Enable( level );
200b864: 7f ff de 77 call 2003240 <sparc_enable_interrupts>
200b868: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
200b86c: 12 bf ff fe bne 200b864 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
200b870: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200b874: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200b878: b4 00 80 1a add %g2, %i2, %i2
200b87c: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
200b880: 7f ff de 70 call 2003240 <sparc_enable_interrupts>
200b884: 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;
200b888: 10 bf ff f7 b 200b864 <_Watchdog_Adjust+0x94>
200b88c: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
020096fc <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
20096fc: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
2009700: 7f ff e2 eb call 20022ac <sparc_disable_interrupts>
2009704: 01 00 00 00 nop
previous_state = the_watchdog->state;
2009708: e0 06 20 08 ld [ %i0 + 8 ], %l0
switch ( previous_state ) {
200970c: 80 a4 20 01 cmp %l0, 1
2009710: 02 80 00 2a be 20097b8 <_Watchdog_Remove+0xbc>
2009714: 03 00 80 6d sethi %hi(0x201b400), %g1
2009718: 1a 80 00 09 bcc 200973c <_Watchdog_Remove+0x40>
200971c: 80 a4 20 03 cmp %l0, 3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
2009720: 03 00 80 6d sethi %hi(0x201b400), %g1
2009724: c2 00 63 64 ld [ %g1 + 0x364 ], %g1 ! 201b764 <_Watchdog_Ticks_since_boot>
2009728: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200972c: 7f ff e2 e4 call 20022bc <sparc_enable_interrupts>
2009730: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
2009734: 81 c7 e0 08 ret
2009738: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
200973c: 18 bf ff fa bgu 2009724 <_Watchdog_Remove+0x28> <== NEVER TAKEN
2009740: 03 00 80 6d sethi %hi(0x201b400), %g1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
2009744: c2 06 00 00 ld [ %i0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
2009748: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200974c: c4 00 40 00 ld [ %g1 ], %g2
2009750: 80 a0 a0 00 cmp %g2, 0
2009754: 02 80 00 07 be 2009770 <_Watchdog_Remove+0x74>
2009758: 05 00 80 6d sethi %hi(0x201b400), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200975c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
2009760: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
2009764: 84 00 c0 02 add %g3, %g2, %g2
2009768: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200976c: 05 00 80 6d sethi %hi(0x201b400), %g2
2009770: c4 00 a3 60 ld [ %g2 + 0x360 ], %g2 ! 201b760 <_Watchdog_Sync_count>
2009774: 80 a0 a0 00 cmp %g2, 0
2009778: 22 80 00 07 be,a 2009794 <_Watchdog_Remove+0x98>
200977c: c4 06 20 04 ld [ %i0 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
2009780: 05 00 80 6d sethi %hi(0x201b400), %g2
2009784: c6 00 a2 ac ld [ %g2 + 0x2ac ], %g3 ! 201b6ac <_ISR_Nest_level>
2009788: 05 00 80 6d sethi %hi(0x201b400), %g2
200978c: c6 20 a2 cc st %g3, [ %g2 + 0x2cc ] ! 201b6cc <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
2009790: c4 06 20 04 ld [ %i0 + 4 ], %g2
next->previous = previous;
previous->next = next;
2009794: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2009798: c4 20 60 04 st %g2, [ %g1 + 4 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200979c: 03 00 80 6d sethi %hi(0x201b400), %g1
20097a0: c2 00 63 64 ld [ %g1 + 0x364 ], %g1 ! 201b764 <_Watchdog_Ticks_since_boot>
20097a4: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
20097a8: 7f ff e2 c5 call 20022bc <sparc_enable_interrupts>
20097ac: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
20097b0: 81 c7 e0 08 ret
20097b4: 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;
20097b8: c2 00 63 64 ld [ %g1 + 0x364 ], %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;
20097bc: 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;
20097c0: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
20097c4: 7f ff e2 be call 20022bc <sparc_enable_interrupts>
20097c8: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
20097cc: 81 c7 e0 08 ret
20097d0: 81 e8 00 00 restore
0200afe4 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200afe4: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200afe8: 7f ff df 69 call 2002d8c <sparc_disable_interrupts>
200afec: a0 10 00 18 mov %i0, %l0
200aff0: b0 10 00 08 mov %o0, %i0
printk( "Watchdog Chain: %s %p\n", name, header );
200aff4: 11 00 80 7d sethi %hi(0x201f400), %o0
200aff8: 94 10 00 19 mov %i1, %o2
200affc: 90 12 21 18 or %o0, 0x118, %o0
200b000: 7f ff e4 b3 call 20042cc <printk>
200b004: 92 10 00 10 mov %l0, %o1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200b008: e2 06 40 00 ld [ %i1 ], %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200b00c: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200b010: 80 a4 40 19 cmp %l1, %i1
200b014: 02 80 00 0f be 200b050 <_Watchdog_Report_chain+0x6c>
200b018: 11 00 80 7d sethi %hi(0x201f400), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200b01c: 92 10 00 11 mov %l1, %o1
200b020: 40 00 00 11 call 200b064 <_Watchdog_Report>
200b024: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
200b028: e2 04 40 00 ld [ %l1 ], %l1
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
200b02c: 80 a4 40 19 cmp %l1, %i1
200b030: 12 bf ff fc bne 200b020 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
200b034: 92 10 00 11 mov %l1, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200b038: 92 10 00 10 mov %l0, %o1
200b03c: 11 00 80 7d sethi %hi(0x201f400), %o0
200b040: 7f ff e4 a3 call 20042cc <printk>
200b044: 90 12 21 30 or %o0, 0x130, %o0 ! 201f530 <_Status_Object_name_errors_to_status+0x30>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
200b048: 7f ff df 55 call 2002d9c <sparc_enable_interrupts>
200b04c: 81 e8 00 00 restore
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200b050: 7f ff e4 9f call 20042cc <printk>
200b054: 90 12 21 40 or %o0, 0x140, %o0
}
_ISR_Enable( level );
200b058: 7f ff df 51 call 2002d9c <sparc_enable_interrupts>
200b05c: 81 e8 00 00 restore
020238a8 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
20238a8: 81 c3 e0 08 retl <== NOT EXECUTED
20238ac: 90 10 20 00 clr %o0 <== NOT EXECUTED
02018f64 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
2018f64: 9d e3 bf a0 save %sp, -96, %sp
2018f68: 40 00 06 cd call 201aa9c <_fini>
2018f6c: 01 00 00 00 nop
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
2018f70: 7f ff ff e2 call 2018ef8 <libc_wrapup>
2018f74: 01 00 00 00 nop
rtems_shutdown_executive(status);
2018f78: 40 00 00 50 call 20190b8 <rtems_shutdown_executive>
2018f7c: 90 10 00 18 mov %i0, %o0
2018f80: 30 80 00 00 b,a 2018f80 <_exit+0x1c> <== NOT EXECUTED
02003b88 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
2003b88: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2003b8c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2003b90: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED
2003b94: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003b98: 7f ff ff 69 call 200393c <fcntl> <== NOT EXECUTED
2003b9c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0202387c <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
202387c: 81 c3 e0 08 retl <== NOT EXECUTED
2023880: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
0200b47c <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
200b47c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200b480: 7f ff ff e6 call 200b418 <gettimeofday> <== NOT EXECUTED
200b484: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
020238a0 <_kill_r>:
#include <reent.h>
int _kill_r( struct _reent *ptr, pid_t pid, int sig )
{
return 0;
}
20238a0: 81 c3 e0 08 retl <== NOT EXECUTED
20238a4: 90 10 20 00 clr %o0 <== NOT EXECUTED
020046c0 <_link_r>:
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
20046c0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
20046c4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
20046c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20046cc: 7f ff ff 51 call 2004410 <link> <== NOT EXECUTED
20046d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02019084 <_realloc_r>:
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
2019084: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2019088: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
201908c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2019090: 40 00 00 17 call 20190ec <realloc> <== NOT EXECUTED
2019094: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
020072ac <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
20072ac: 9d e3 bf 60 save %sp, -160, %sp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
20072b0: 7f ff fa 07 call 2005acc <rtems_filesystem_dirname>
20072b4: 90 10 00 19 mov %i1, %o0
if ( old_parent_pathlen == 0 )
20072b8: a0 92 20 00 orcc %o0, 0, %l0
20072bc: 32 80 01 1f bne,a 2007738 <_rename_r+0x48c>
20072c0: 90 10 00 19 mov %i1, %o0
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
20072c4: c2 4e 40 00 ldsb [ %i1 ], %g1
20072c8: 80 a0 60 5c cmp %g1, 0x5c
20072cc: 12 80 00 7f bne 20074c8 <_rename_r+0x21c> <== ALWAYS TAKEN
20072d0: 80 a0 60 2f cmp %g1, 0x2f
20072d4: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED
20072d8: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env><== NOT EXECUTED
20072dc: a2 10 20 00 clr %l1 <== NOT EXECUTED
20072e0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED
20072e4: c4 27 bf d4 st %g2, [ %fp + -44 ] <== NOT EXECUTED
20072e8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED
20072ec: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED
20072f0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
20072f4: c4 27 bf dc st %g2, [ %fp + -36 ] <== NOT EXECUTED
20072f8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED
20072fc: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED
2007300: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED
2007304: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
2007308: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = old + old_parent_pathlen;
200730c: b2 06 40 10 add %i1, %l0, %i1
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
2007310: c2 27 bf e8 st %g1, [ %fp + -24 ]
2007314: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = old + old_parent_pathlen;
2007318: 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;
200731c: c2 27 bf ec st %g1, [ %fp + -20 ]
2007320: c2 07 bf dc ld [ %fp + -36 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2007324: 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;
2007328: c2 27 bf f0 st %g1, [ %fp + -16 ]
200732c: c2 07 bf e0 ld [ %fp + -32 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2007330: a0 07 bf e8 add %fp, -24, %l0
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
2007334: c2 27 bf f4 st %g1, [ %fp + -12 ]
2007338: c2 07 bf e4 ld [ %fp + -28 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
200733c: 40 00 40 be call 2017634 <strlen>
2007340: c2 27 bf f8 st %g1, [ %fp + -8 ]
2007344: 92 10 00 08 mov %o0, %o1
2007348: 7f ff f9 c0 call 2005a48 <rtems_filesystem_prefix_separators>
200734c: 90 10 00 19 mov %i1, %o0
2007350: b2 06 40 08 add %i1, %o0, %i1
2007354: f2 27 bf fc st %i1, [ %fp + -4 ]
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2007358: 40 00 40 b7 call 2017634 <strlen>
200735c: 90 10 00 19 mov %i1, %o0
2007360: 94 10 20 00 clr %o2
2007364: 92 10 00 08 mov %o0, %o1
2007368: 96 10 00 10 mov %l0, %o3
200736c: 90 10 00 19 mov %i1, %o0
2007370: 7f ff f9 f4 call 2005b40 <rtems_filesystem_evaluate_relative_path>
2007374: 98 10 20 00 clr %o4
0, &old_loc, false );
if ( result != 0 ) {
2007378: 80 a2 20 00 cmp %o0, 0
200737c: 12 80 00 4f bne 20074b8 <_rename_r+0x20c>
2007380: 80 8c 60 ff btst 0xff, %l1
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
2007384: c2 4e 80 00 ldsb [ %i2 ], %g1
2007388: 80 a0 60 5c cmp %g1, 0x5c
200738c: 12 80 00 61 bne 2007510 <_rename_r+0x264> <== ALWAYS TAKEN
2007390: 80 a0 60 2f cmp %g1, 0x2f
2007394: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED
2007398: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env>
200739c: 90 10 20 01 mov 1, %o0
20073a0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
20073a4: c4 27 bf c0 st %g2, [ %fp + -64 ]
20073a8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
20073ac: c4 27 bf c4 st %g2, [ %fp + -60 ]
20073b0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
20073b4: c4 27 bf c8 st %g2, [ %fp + -56 ]
20073b8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
20073bc: c4 27 bf cc st %g2, [ %fp + -52 ]
20073c0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
20073c4: c2 27 bf d0 st %g1, [ %fp + -48 ]
if ( !new_parent_loc.ops->evalformake_h ) {
20073c8: c2 07 bf cc ld [ %fp + -52 ], %g1
20073cc: c2 00 60 04 ld [ %g1 + 4 ], %g1
20073d0: 80 a0 60 00 cmp %g1, 0
20073d4: 02 80 00 bc be 20076c4 <_rename_r+0x418>
20073d8: 94 07 bf fc add %fp, -4, %o2
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
20073dc: 90 06 80 08 add %i2, %o0, %o0
20073e0: b4 07 bf c0 add %fp, -64, %i2
20073e4: 9f c0 40 00 call %g1
20073e8: 92 10 00 1a mov %i2, %o1
if ( result != 0 ) {
20073ec: 80 a2 20 00 cmp %o0, 0
20073f0: 12 80 00 8c bne 2007620 <_rename_r+0x374>
20073f4: c2 07 bf d0 ld [ %fp + -48 ], %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 ) {
20073f8: c4 07 bf e4 ld [ %fp + -28 ], %g2
20073fc: 80 a0 80 01 cmp %g2, %g1
2007400: 12 80 00 56 bne 2007558 <_rename_r+0x2ac>
2007404: c4 07 bf cc ld [ %fp + -52 ], %g2
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
2007408: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1
200740c: 80 a0 60 00 cmp %g1, 0
2007410: 02 80 00 a7 be 20076ac <_rename_r+0x400>
2007414: d6 07 bf fc ld [ %fp + -4 ], %o3
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
2007418: b2 07 bf d4 add %fp, -44, %i1
200741c: 92 10 00 10 mov %l0, %o1
2007420: 90 10 00 19 mov %i1, %o0
2007424: 9f c0 40 00 call %g1
2007428: 94 10 00 1a mov %i2, %o2
rtems_filesystem_freenode( &new_parent_loc );
200742c: c2 07 bf cc ld [ %fp + -52 ], %g1
2007430: 80 a0 60 00 cmp %g1, 0
2007434: 02 80 00 08 be 2007454 <_rename_r+0x1a8> <== NEVER TAKEN
2007438: b0 10 00 08 mov %o0, %i0
200743c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007440: 80 a0 60 00 cmp %g1, 0
2007444: 02 80 00 05 be 2007458 <_rename_r+0x1ac> <== NEVER TAKEN
2007448: 80 8c 60 ff btst 0xff, %l1
200744c: 9f c0 40 00 call %g1
2007450: 90 10 00 1a mov %i2, %o0
if ( free_old_parentloc )
2007454: 80 8c 60 ff btst 0xff, %l1
2007458: 02 80 00 0d be 200748c <_rename_r+0x1e0>
200745c: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_filesystem_freenode( &old_parent_loc );
2007460: c2 07 bf e0 ld [ %fp + -32 ], %g1
2007464: 80 a0 60 00 cmp %g1, 0
2007468: 22 80 00 09 be,a 200748c <_rename_r+0x1e0> <== NEVER TAKEN
200746c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2007470: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007474: 80 a0 60 00 cmp %g1, 0
2007478: 22 80 00 05 be,a 200748c <_rename_r+0x1e0> <== NEVER TAKEN
200747c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2007480: 9f c0 40 00 call %g1
2007484: 90 10 00 19 mov %i1, %o0
rtems_filesystem_freenode( &old_loc );
2007488: c2 07 bf f4 ld [ %fp + -12 ], %g1
200748c: 80 a0 60 00 cmp %g1, 0
2007490: 02 80 00 a8 be 2007730 <_rename_r+0x484> <== NEVER TAKEN
2007494: 01 00 00 00 nop
2007498: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200749c: 80 a0 60 00 cmp %g1, 0
20074a0: 02 80 00 a4 be 2007730 <_rename_r+0x484> <== NEVER TAKEN
20074a4: 01 00 00 00 nop
20074a8: 9f c0 40 00 call %g1
20074ac: 90 10 00 10 mov %l0, %o0
20074b0: 81 c7 e0 08 ret
20074b4: 81 e8 00 00 restore
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
20074b8: 12 80 00 4f bne 20075f4 <_rename_r+0x348> <== ALWAYS TAKEN
20074bc: c2 07 bf e0 ld [ %fp + -32 ], %g1
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
20074c0: 81 c7 e0 08 ret <== NOT EXECUTED
20074c4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
20074c8: 22 bf ff 84 be,a 20072d8 <_rename_r+0x2c> <== NEVER TAKEN
20074cc: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED
20074d0: 80 a0 60 00 cmp %g1, 0
20074d4: 02 bf ff 81 be 20072d8 <_rename_r+0x2c> <== NEVER TAKEN
20074d8: 03 00 80 9a sethi %hi(0x2026800), %g1
20074dc: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env>
20074e0: a2 10 20 00 clr %l1
20074e4: c4 00 60 04 ld [ %g1 + 4 ], %g2
20074e8: c4 27 bf d4 st %g2, [ %fp + -44 ]
20074ec: c4 00 60 08 ld [ %g1 + 8 ], %g2
20074f0: c4 27 bf d8 st %g2, [ %fp + -40 ]
20074f4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
20074f8: c4 27 bf dc st %g2, [ %fp + -36 ]
20074fc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2007500: c4 27 bf e0 st %g2, [ %fp + -32 ]
2007504: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2007508: 10 bf ff 80 b 2007308 <_rename_r+0x5c>
200750c: c2 27 bf e4 st %g1, [ %fp + -28 ]
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
2007510: 22 bf ff a2 be,a 2007398 <_rename_r+0xec>
2007514: 03 00 80 9a sethi %hi(0x2026800), %g1
2007518: 80 a0 60 00 cmp %g1, 0
200751c: 02 bf ff 9f be 2007398 <_rename_r+0xec> <== NEVER TAKEN
2007520: 03 00 80 9a sethi %hi(0x2026800), %g1
2007524: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env>
2007528: 90 10 20 00 clr %o0
200752c: c4 00 60 04 ld [ %g1 + 4 ], %g2
2007530: c4 27 bf c0 st %g2, [ %fp + -64 ]
2007534: c4 00 60 08 ld [ %g1 + 8 ], %g2
2007538: c4 27 bf c4 st %g2, [ %fp + -60 ]
200753c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2007540: c4 27 bf c8 st %g2, [ %fp + -56 ]
2007544: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2007548: c4 27 bf cc st %g2, [ %fp + -52 ]
200754c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2007550: 10 bf ff 9e b 20073c8 <_rename_r+0x11c>
2007554: c2 27 bf d0 st %g1, [ %fp + -48 ]
* 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 );
2007558: c2 07 bf cc ld [ %fp + -52 ], %g1
200755c: 80 a0 60 00 cmp %g1, 0
2007560: 02 80 00 09 be 2007584 <_rename_r+0x2d8> <== NEVER TAKEN
2007564: 80 8c 60 ff btst 0xff, %l1
2007568: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200756c: 80 a0 60 00 cmp %g1, 0
2007570: 02 80 00 05 be 2007584 <_rename_r+0x2d8> <== NEVER TAKEN
2007574: 80 8c 60 ff btst 0xff, %l1
2007578: 9f c0 40 00 call %g1
200757c: 90 10 00 1a mov %i2, %o0
if ( free_old_parentloc )
2007580: 80 8c 60 ff btst 0xff, %l1
2007584: 02 80 00 0d be 20075b8 <_rename_r+0x30c>
2007588: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_filesystem_freenode( &old_parent_loc );
200758c: c2 07 bf e0 ld [ %fp + -32 ], %g1
2007590: 80 a0 60 00 cmp %g1, 0
2007594: 22 80 00 09 be,a 20075b8 <_rename_r+0x30c> <== NEVER TAKEN
2007598: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
200759c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20075a0: 80 a0 60 00 cmp %g1, 0
20075a4: 22 80 00 05 be,a 20075b8 <_rename_r+0x30c> <== NEVER TAKEN
20075a8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
20075ac: 9f c0 40 00 call %g1
20075b0: 90 07 bf d4 add %fp, -44, %o0
rtems_filesystem_freenode( &old_loc );
20075b4: c2 07 bf f4 ld [ %fp + -12 ], %g1
20075b8: 80 a0 60 00 cmp %g1, 0
20075bc: 02 80 00 08 be 20075dc <_rename_r+0x330> <== NEVER TAKEN
20075c0: 01 00 00 00 nop
20075c4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20075c8: 80 a0 60 00 cmp %g1, 0
20075cc: 02 80 00 04 be 20075dc <_rename_r+0x330> <== NEVER TAKEN
20075d0: 01 00 00 00 nop
20075d4: 9f c0 40 00 call %g1
20075d8: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EXDEV );
20075dc: 40 00 33 0a call 2014204 <__errno>
20075e0: b0 10 3f ff mov -1, %i0
20075e4: 82 10 20 12 mov 0x12, %g1
20075e8: c2 22 00 00 st %g1, [ %o0 ]
20075ec: 81 c7 e0 08 ret
20075f0: 81 e8 00 00 restore
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 );
20075f4: 80 a0 60 00 cmp %g1, 0
20075f8: 02 bf ff ae be 20074b0 <_rename_r+0x204> <== NEVER TAKEN
20075fc: b0 10 3f ff mov -1, %i0
2007600: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007604: 80 a0 60 00 cmp %g1, 0
2007608: 02 bf ff aa be 20074b0 <_rename_r+0x204> <== NEVER TAKEN
200760c: 90 07 bf d4 add %fp, -44, %o0
2007610: 9f c0 40 00 call %g1
2007614: 01 00 00 00 nop
2007618: 81 c7 e0 08 ret
200761c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
2007620: c2 07 bf cc ld [ %fp + -52 ], %g1
2007624: 80 a0 60 00 cmp %g1, 0
2007628: 02 80 00 09 be 200764c <_rename_r+0x3a0> <== NEVER TAKEN
200762c: 80 8c 60 ff btst 0xff, %l1
2007630: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007634: 80 a0 60 00 cmp %g1, 0
2007638: 02 80 00 05 be 200764c <_rename_r+0x3a0> <== NEVER TAKEN
200763c: 80 8c 60 ff btst 0xff, %l1
2007640: 9f c0 40 00 call %g1
2007644: 90 10 00 1a mov %i2, %o0
if ( free_old_parentloc )
2007648: 80 8c 60 ff btst 0xff, %l1
200764c: 02 80 00 0d be 2007680 <_rename_r+0x3d4> <== NEVER TAKEN
2007650: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_filesystem_freenode( &old_parent_loc );
2007654: c2 07 bf e0 ld [ %fp + -32 ], %g1
2007658: 80 a0 60 00 cmp %g1, 0
200765c: 22 80 00 09 be,a 2007680 <_rename_r+0x3d4> <== NEVER TAKEN
2007660: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2007664: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007668: 80 a0 60 00 cmp %g1, 0
200766c: 22 80 00 05 be,a 2007680 <_rename_r+0x3d4> <== NEVER TAKEN
2007670: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2007674: 9f c0 40 00 call %g1
2007678: 90 07 bf d4 add %fp, -44, %o0
rtems_filesystem_freenode( &old_loc );
200767c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007680: 80 a0 60 00 cmp %g1, 0
2007684: 02 bf ff 8b be 20074b0 <_rename_r+0x204> <== NEVER TAKEN
2007688: b0 10 3f ff mov -1, %i0
200768c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007690: 80 a0 60 00 cmp %g1, 0
2007694: 02 bf ff 87 be 20074b0 <_rename_r+0x204> <== NEVER TAKEN
2007698: 90 10 00 10 mov %l0, %o0
200769c: 9f c0 40 00 call %g1
20076a0: 01 00 00 00 nop
20076a4: 81 c7 e0 08 ret
20076a8: 81 e8 00 00 restore
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
20076ac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
20076b0: 80 a0 60 00 cmp %g1, 0
20076b4: 02 80 00 05 be 20076c8 <_rename_r+0x41c> <== NEVER TAKEN
20076b8: 80 8c 60 ff btst 0xff, %l1
20076bc: 9f c0 40 00 call %g1
20076c0: 90 10 00 1a mov %i2, %o0
if ( free_old_parentloc )
20076c4: 80 8c 60 ff btst 0xff, %l1
20076c8: 02 80 00 0d be 20076fc <_rename_r+0x450> <== NEVER TAKEN
20076cc: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_filesystem_freenode( &old_parent_loc );
20076d0: c2 07 bf e0 ld [ %fp + -32 ], %g1
20076d4: 80 a0 60 00 cmp %g1, 0
20076d8: 22 80 00 09 be,a 20076fc <_rename_r+0x450> <== NEVER TAKEN
20076dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
20076e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20076e4: 80 a0 60 00 cmp %g1, 0
20076e8: 22 80 00 05 be,a 20076fc <_rename_r+0x450> <== NEVER TAKEN
20076ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
20076f0: 9f c0 40 00 call %g1
20076f4: 90 07 bf d4 add %fp, -44, %o0
rtems_filesystem_freenode( &old_loc );
20076f8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20076fc: 80 a0 60 00 cmp %g1, 0
2007700: 02 80 00 08 be 2007720 <_rename_r+0x474> <== NEVER TAKEN
2007704: 01 00 00 00 nop
2007708: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200770c: 80 a0 60 00 cmp %g1, 0
2007710: 02 80 00 04 be 2007720 <_rename_r+0x474> <== NEVER TAKEN
2007714: 01 00 00 00 nop
2007718: 9f c0 40 00 call %g1
200771c: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
2007720: 40 00 32 b9 call 2014204 <__errno>
2007724: b0 10 3f ff mov -1, %i0
2007728: 82 10 20 86 mov 0x86, %g1
200772c: c2 22 00 00 st %g1, [ %o0 ]
2007730: 81 c7 e0 08 ret
2007734: 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,
2007738: 92 10 00 10 mov %l0, %o1
200773c: 94 10 20 02 mov 2, %o2
2007740: 96 07 bf d4 add %fp, -44, %o3
2007744: 7f ff f9 40 call 2005c44 <rtems_filesystem_evaluate_path>
2007748: 98 10 20 00 clr %o4
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
200774c: 80 a2 20 00 cmp %o0, 0
2007750: 12 bf ff 58 bne 20074b0 <_rename_r+0x204> <== NEVER TAKEN
2007754: b0 10 3f ff mov -1, %i0
2007758: 10 bf fe ec b 2007308 <_rename_r+0x5c>
200775c: a2 10 20 01 mov 1, %l1
02005594 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
2005594: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2005598: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
200559c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20055a0: 7f ff ff b1 call 2005464 <stat> <== NOT EXECUTED
20055a4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200e864 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
200e864: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
200e868: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200e86c: 7f ff ff 42 call 200e574 <unlink> <== NOT EXECUTED
200e870: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200b13c <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
200b13c: 9d e3 bf a0 save %sp, -96, %sp
200b140: 21 00 80 6d sethi %hi(0x201b400), %l0
200b144: a0 14 20 50 or %l0, 0x50, %l0 ! 201b450 <rtems_malloc_statistics>
200b148: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
length = nelem * elsize;
200b14c: 92 10 00 18 mov %i0, %o1
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
200b150: 82 00 60 01 inc %g1
length = nelem * elsize;
200b154: 90 10 00 19 mov %i1, %o0
200b158: 40 00 32 f3 call 2017d24 <.umul>
200b15c: c2 24 20 14 st %g1, [ %l0 + 0x14 ]
cptr = malloc( length );
200b160: 40 00 01 b4 call 200b830 <malloc>
200b164: a2 10 00 08 mov %o0, %l1
if ( cptr )
200b168: b0 92 20 00 orcc %o0, 0, %i0
200b16c: 02 80 00 04 be 200b17c <calloc+0x40> <== NEVER TAKEN
200b170: 94 10 00 11 mov %l1, %o2
memset( cptr, '\0', length );
200b174: 40 00 10 6d call 200f328 <memset>
200b178: 92 10 20 00 clr %o1
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
200b17c: c2 04 20 04 ld [ %l0 + 4 ], %g1
200b180: 82 00 7f ff add %g1, -1, %g1
200b184: c2 24 20 04 st %g1, [ %l0 + 4 ]
return cptr;
}
200b188: 81 c7 e0 08 ret
200b18c: 81 e8 00 00 restore
0200d170 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
200d170: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
200d174: 80 a6 20 00 cmp %i0, 0
200d178: 02 80 00 31 be 200d23c <chdir+0xcc>
200d17c: 01 00 00 00 nop
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
200d180: 40 00 11 8b call 20117ac <strlen>
200d184: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
200d188: a0 07 bf ec add %fp, -20, %l0
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
200d18c: 92 10 00 08 mov %o0, %o1
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
200d190: 94 10 20 01 mov 1, %o2
200d194: 90 10 00 18 mov %i0, %o0
200d198: 96 10 00 10 mov %l0, %o3
200d19c: 98 10 20 01 mov 1, %o4
200d1a0: 7f ff d7 c4 call 20030b0 <rtems_filesystem_evaluate_path>
200d1a4: b0 10 3f ff mov -1, %i0
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
200d1a8: 80 a2 20 00 cmp %o0, 0
200d1ac: 12 80 00 28 bne 200d24c <chdir+0xdc>
200d1b0: c4 07 bf f8 ld [ %fp + -8 ], %g2
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
200d1b4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200d1b8: 80 a0 60 00 cmp %g1, 0
200d1bc: 22 80 00 35 be,a 200d290 <chdir+0x120> <== NEVER TAKEN
200d1c0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
200d1c4: 9f c0 40 00 call %g1
200d1c8: 90 10 00 10 mov %l0, %o0
200d1cc: 80 a2 20 01 cmp %o0, 1
200d1d0: 12 80 00 21 bne 200d254 <chdir+0xe4>
200d1d4: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
200d1d8: 21 00 80 75 sethi %hi(0x201d400), %l0
200d1dc: d0 04 21 78 ld [ %l0 + 0x178 ], %o0 ! 201d578 <rtems_current_user_env>
200d1e0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
200d1e4: 80 a0 60 00 cmp %g1, 0
200d1e8: 22 80 00 0a be,a 200d210 <chdir+0xa0> <== NEVER TAKEN
200d1ec: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
200d1f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200d1f4: 80 a0 60 00 cmp %g1, 0
200d1f8: 22 80 00 06 be,a 200d210 <chdir+0xa0> <== NEVER TAKEN
200d1fc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
200d200: 9f c0 40 00 call %g1
200d204: 90 02 20 04 add %o0, 4, %o0
200d208: d0 04 21 78 ld [ %l0 + 0x178 ], %o0
rtems_filesystem_current = loc;
200d20c: c2 07 bf ec ld [ %fp + -20 ], %g1
200d210: c2 22 20 04 st %g1, [ %o0 + 4 ]
200d214: c2 07 bf f0 ld [ %fp + -16 ], %g1
200d218: c2 22 20 08 st %g1, [ %o0 + 8 ]
200d21c: c2 07 bf f4 ld [ %fp + -12 ], %g1
200d220: c2 22 20 0c st %g1, [ %o0 + 0xc ]
200d224: c2 07 bf f8 ld [ %fp + -8 ], %g1
200d228: c2 22 20 10 st %g1, [ %o0 + 0x10 ]
200d22c: c2 07 bf fc ld [ %fp + -4 ], %g1
200d230: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
return 0;
}
200d234: 81 c7 e0 08 ret
200d238: 91 e8 20 00 restore %g0, 0, %o0
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
200d23c: 40 00 0d bd call 2010930 <__errno>
200d240: b0 10 3f ff mov -1, %i0
200d244: 82 10 20 0e mov 0xe, %g1
200d248: c2 22 00 00 st %g1, [ %o0 ]
200d24c: 81 c7 e0 08 ret
200d250: 81 e8 00 00 restore
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
200d254: 80 a0 60 00 cmp %g1, 0
200d258: 02 80 00 08 be 200d278 <chdir+0x108> <== NEVER TAKEN
200d25c: 01 00 00 00 nop
200d260: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200d264: 80 a0 60 00 cmp %g1, 0
200d268: 02 80 00 04 be 200d278 <chdir+0x108> <== NEVER TAKEN
200d26c: 01 00 00 00 nop
200d270: 9f c0 40 00 call %g1
200d274: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
200d278: 40 00 0d ae call 2010930 <__errno>
200d27c: b0 10 3f ff mov -1, %i0
200d280: 82 10 20 14 mov 0x14, %g1
200d284: c2 22 00 00 st %g1, [ %o0 ]
200d288: 81 c7 e0 08 ret
200d28c: 81 e8 00 00 restore
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
200d290: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d294: 02 80 00 04 be 200d2a4 <chdir+0x134> <== NOT EXECUTED
200d298: 01 00 00 00 nop <== NOT EXECUTED
200d29c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200d2a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200d2a4: 40 00 0d a3 call 2010930 <__errno> <== NOT EXECUTED
200d2a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200d2ac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200d2b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200d2b4: 81 c7 e0 08 ret <== NOT EXECUTED
200d2b8: 81 e8 00 00 restore <== NOT EXECUTED
02004c3c <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
2004c3c: 9d e3 bf 88 save %sp, -120, %sp
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
2004c40: 40 00 41 6b call 20151ec <strlen>
2004c44: 90 10 00 18 mov %i0, %o0
2004c48: a0 07 bf ec add %fp, -20, %l0
2004c4c: 92 10 00 08 mov %o0, %o1
2004c50: 94 10 20 00 clr %o2
2004c54: 90 10 00 18 mov %i0, %o0
2004c58: 96 10 00 10 mov %l0, %o3
2004c5c: 98 10 20 01 mov 1, %o4
2004c60: 40 00 00 e7 call 2004ffc <rtems_filesystem_evaluate_path>
2004c64: b0 10 3f ff mov -1, %i0
if ( status != 0 )
2004c68: 80 a2 20 00 cmp %o0, 0
2004c6c: 12 80 00 15 bne 2004cc0 <chmod+0x84>
2004c70: c2 07 bf f4 ld [ %fp + -12 ], %g1
return -1;
if ( !loc.handlers ){
2004c74: 80 a0 60 00 cmp %g1, 0
2004c78: 22 80 00 24 be,a 2004d08 <chmod+0xcc> <== NEVER TAKEN
2004c7c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
2004c80: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004c84: 80 a0 60 00 cmp %g1, 0
2004c88: 02 80 00 10 be 2004cc8 <chmod+0x8c> <== NEVER TAKEN
2004c8c: 92 10 00 19 mov %i1, %o1
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
2004c90: 9f c0 40 00 call %g1
2004c94: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2004c98: c2 07 bf f8 ld [ %fp + -8 ], %g1
2004c9c: 80 a0 60 00 cmp %g1, 0
2004ca0: 02 80 00 08 be 2004cc0 <chmod+0x84> <== NEVER TAKEN
2004ca4: b0 10 00 08 mov %o0, %i0
2004ca8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004cac: 80 a0 60 00 cmp %g1, 0
2004cb0: 02 80 00 23 be 2004d3c <chmod+0x100> <== NEVER TAKEN
2004cb4: 01 00 00 00 nop
2004cb8: 9f c0 40 00 call %g1
2004cbc: 90 10 00 10 mov %l0, %o0
return result;
}
2004cc0: 81 c7 e0 08 ret
2004cc4: 81 e8 00 00 restore
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
2004cc8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2004ccc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004cd0: 02 80 00 08 be 2004cf0 <chmod+0xb4> <== NOT EXECUTED
2004cd4: 01 00 00 00 nop <== NOT EXECUTED
2004cd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004cdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004ce0: 02 80 00 04 be 2004cf0 <chmod+0xb4> <== NOT EXECUTED
2004ce4: 01 00 00 00 nop <== NOT EXECUTED
2004ce8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004cec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004cf0: 40 00 3a 39 call 20135d4 <__errno> <== NOT EXECUTED
2004cf4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004cf8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004cfc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004d00: 81 c7 e0 08 ret <== NOT EXECUTED
2004d04: 81 e8 00 00 restore <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
2004d08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004d0c: 02 80 00 08 be 2004d2c <chmod+0xf0> <== NOT EXECUTED
2004d10: 01 00 00 00 nop <== NOT EXECUTED
2004d14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004d18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004d1c: 02 80 00 04 be 2004d2c <chmod+0xf0> <== NOT EXECUTED
2004d20: 01 00 00 00 nop <== NOT EXECUTED
2004d24: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004d28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
2004d2c: 40 00 3a 2a call 20135d4 <__errno> <== NOT EXECUTED
2004d30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004d34: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2004d38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004d3c: 81 c7 e0 08 ret <== NOT EXECUTED
2004d40: 81 e8 00 00 restore <== NOT EXECUTED
02004d44 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
2004d44: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
2004d48: 40 00 41 29 call 20151ec <strlen>
2004d4c: 90 10 00 18 mov %i0, %o0
2004d50: a0 07 bf ec add %fp, -20, %l0
2004d54: 92 10 00 08 mov %o0, %o1
2004d58: 94 10 20 00 clr %o2
2004d5c: 90 10 00 18 mov %i0, %o0
2004d60: 96 10 00 10 mov %l0, %o3
2004d64: 98 10 20 01 mov 1, %o4
2004d68: 40 00 00 a5 call 2004ffc <rtems_filesystem_evaluate_path>
2004d6c: b0 10 3f ff mov -1, %i0
2004d70: 80 a2 20 00 cmp %o0, 0
2004d74: 12 80 00 15 bne 2004dc8 <chown+0x84>
2004d78: c4 07 bf f8 ld [ %fp + -8 ], %g2
return -1;
if ( !loc.ops->chown_h ) {
2004d7c: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1
2004d80: 80 a0 60 00 cmp %g1, 0
2004d84: 02 80 00 13 be 2004dd0 <chown+0x8c> <== NEVER TAKEN
2004d88: 93 2e 60 10 sll %i1, 0x10, %o1
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
2004d8c: 95 2e a0 10 sll %i2, 0x10, %o2
2004d90: 93 32 60 10 srl %o1, 0x10, %o1
2004d94: 95 32 a0 10 srl %o2, 0x10, %o2
2004d98: 9f c0 40 00 call %g1
2004d9c: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2004da0: c2 07 bf f8 ld [ %fp + -8 ], %g1
2004da4: 80 a0 60 00 cmp %g1, 0
2004da8: 02 80 00 08 be 2004dc8 <chown+0x84> <== NEVER TAKEN
2004dac: b0 10 00 08 mov %o0, %i0
2004db0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004db4: 80 a0 60 00 cmp %g1, 0
2004db8: 02 80 00 10 be 2004df8 <chown+0xb4> <== NEVER TAKEN
2004dbc: 01 00 00 00 nop
2004dc0: 9f c0 40 00 call %g1
2004dc4: 90 10 00 10 mov %l0, %o0
return result;
}
2004dc8: 81 c7 e0 08 ret
2004dcc: 81 e8 00 00 restore
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
2004dd0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2004dd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004dd8: 02 80 00 04 be 2004de8 <chown+0xa4> <== NOT EXECUTED
2004ddc: 01 00 00 00 nop <== NOT EXECUTED
2004de0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004de4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004de8: 40 00 39 fb call 20135d4 <__errno> <== NOT EXECUTED
2004dec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004df0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004df4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004df8: 81 c7 e0 08 ret <== NOT EXECUTED
2004dfc: 81 e8 00 00 restore <== NOT EXECUTED
02002cec <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
2002cec: 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) {
2002cf0: 21 00 80 75 sethi %hi(0x201d400), %l0
2002cf4: e2 04 21 78 ld [ %l0 + 0x178 ], %l1 ! 201d578 <rtems_current_user_env>
2002cf8: 03 00 80 77 sethi %hi(0x201dc00), %g1
2002cfc: 82 10 61 98 or %g1, 0x198, %g1 ! 201dd98 <rtems_global_user_env>
2002d00: 80 a4 40 01 cmp %l1, %g1
2002d04: 02 80 00 28 be 2002da4 <chroot+0xb8> <== ALWAYS TAKEN
2002d08: 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);
2002d0c: 40 00 29 19 call 200d170 <chdir>
2002d10: 90 10 00 18 mov %i0, %o0
if (result) {
2002d14: 80 a2 20 00 cmp %o0, 0
2002d18: 12 80 00 2f bne 2002dd4 <chroot+0xe8> <== NEVER TAKEN
2002d1c: 11 00 80 70 sethi %hi(0x201c000), %o0
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
2002d20: 92 10 20 01 mov 1, %o1
2002d24: 90 12 23 a8 or %o0, 0x3a8, %o0
2002d28: 94 10 20 00 clr %o2
2002d2c: 96 07 bf ec add %fp, -20, %o3
2002d30: 40 00 00 e0 call 20030b0 <rtems_filesystem_evaluate_path>
2002d34: 98 10 20 00 clr %o4
2002d38: 80 a2 20 00 cmp %o0, 0
2002d3c: 12 80 00 26 bne 2002dd4 <chroot+0xe8> <== NEVER TAKEN
2002d40: d0 04 21 78 ld [ %l0 + 0x178 ], %o0
/* 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);
2002d44: c2 02 20 24 ld [ %o0 + 0x24 ], %g1
2002d48: 80 a0 60 00 cmp %g1, 0
2002d4c: 22 80 00 0b be,a 2002d78 <chroot+0x8c> <== NEVER TAKEN
2002d50: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2002d54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2002d58: 80 a0 60 00 cmp %g1, 0
2002d5c: 22 80 00 07 be,a 2002d78 <chroot+0x8c> <== NEVER TAKEN
2002d60: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2002d64: 9f c0 40 00 call %g1
2002d68: 90 02 20 18 add %o0, 0x18, %o0
2002d6c: 03 00 80 75 sethi %hi(0x201d400), %g1
2002d70: d0 00 61 78 ld [ %g1 + 0x178 ], %o0 ! 201d578 <rtems_current_user_env>
rtems_filesystem_root = loc;
2002d74: c2 07 bf ec ld [ %fp + -20 ], %g1
2002d78: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
2002d7c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2002d80: c2 22 20 1c st %g1, [ %o0 + 0x1c ]
2002d84: c2 07 bf f4 ld [ %fp + -12 ], %g1
2002d88: c2 22 20 20 st %g1, [ %o0 + 0x20 ]
2002d8c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2002d90: c2 22 20 24 st %g1, [ %o0 + 0x24 ]
2002d94: c2 07 bf fc ld [ %fp + -4 ], %g1
2002d98: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
return 0;
}
2002d9c: 81 c7 e0 08 ret
2002da0: 91 e8 20 00 restore %g0, 0, %o0
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*/
2002da4: 40 00 05 fe call 200459c <rtems_libio_set_private_env>
2002da8: 01 00 00 00 nop
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
2002dac: c2 04 21 78 ld [ %l0 + 0x178 ], %g1
2002db0: 80 a0 40 11 cmp %g1, %l1
2002db4: 12 bf ff d6 bne 2002d0c <chroot+0x20> <== ALWAYS TAKEN
2002db8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2002dbc: 40 00 36 dd call 2010930 <__errno> <== NOT EXECUTED
2002dc0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2002dc4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002dc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002dcc: 81 c7 e0 08 ret <== NOT EXECUTED
2002dd0: 81 e8 00 00 restore <== NOT EXECUTED
}
/* 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 );
2002dd4: 40 00 36 d7 call 2010930 <__errno> <== NOT EXECUTED
2002dd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002ddc: 40 00 36 d5 call 2010930 <__errno> <== NOT EXECUTED
2002de0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
2002de4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2002de8: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED
2002dec: 81 c7 e0 08 ret <== NOT EXECUTED
2002df0: 81 e8 00 00 restore <== NOT EXECUTED
0200b190 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
200b190: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
200b194: 03 00 80 6a sethi %hi(0x201a800), %g1
200b198: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
200b19c: 80 a6 00 01 cmp %i0, %g1
200b1a0: 1a 80 00 21 bcc 200b224 <close+0x94>
200b1a4: 03 00 80 6d sethi %hi(0x201b400), %g1
iop = rtems_libio_iop(fd);
200b1a8: e0 00 60 44 ld [ %g1 + 0x44 ], %l0 ! 201b444 <rtems_libio_iops>
200b1ac: 83 2e 20 06 sll %i0, 6, %g1
200b1b0: b1 2e 20 03 sll %i0, 3, %i0
200b1b4: b0 06 00 01 add %i0, %g1, %i0
200b1b8: a0 04 00 18 add %l0, %i0, %l0
rtems_libio_check_is_open(iop);
200b1bc: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
200b1c0: 80 88 61 00 btst 0x100, %g1
200b1c4: 02 80 00 18 be 200b224 <close+0x94>
200b1c8: 01 00 00 00 nop
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
200b1cc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
200b1d0: c2 00 60 04 ld [ %g1 + 4 ], %g1
200b1d4: 80 a0 60 00 cmp %g1, 0
200b1d8: 02 80 00 05 be 200b1ec <close+0x5c> <== NEVER TAKEN
200b1dc: b0 10 20 00 clr %i0
rc = (*iop->handlers->close_h)( iop );
200b1e0: 9f c0 40 00 call %g1
200b1e4: 90 10 00 10 mov %l0, %o0
200b1e8: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &iop->pathinfo );
200b1ec: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
200b1f0: 80 a0 60 00 cmp %g1, 0
200b1f4: 02 80 00 08 be 200b214 <close+0x84> <== NEVER TAKEN
200b1f8: 01 00 00 00 nop
200b1fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200b200: 80 a0 60 00 cmp %g1, 0
200b204: 02 80 00 04 be 200b214 <close+0x84>
200b208: 01 00 00 00 nop
200b20c: 9f c0 40 00 call %g1
200b210: 90 04 20 1c add %l0, 0x1c, %o0
rtems_libio_free( iop );
200b214: 40 00 00 fc call 200b604 <rtems_libio_free>
200b218: 90 10 00 10 mov %l0, %o0
return rc;
}
200b21c: 81 c7 e0 08 ret
200b220: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
200b224: 40 00 0d c6 call 200e93c <__errno>
200b228: b0 10 3f ff mov -1, %i0
200b22c: 82 10 20 09 mov 9, %g1
200b230: c2 22 00 00 st %g1, [ %o0 ]
200b234: 81 c7 e0 08 ret
200b238: 81 e8 00 00 restore
0200a034 <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
200a034: 9d e3 bf 90 save %sp, -112, %sp
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
200a038: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
args.flags = 0;
200a03c: c0 27 bf f8 clr [ %fp + -8 ]
args.mode = 0;
200a040: c0 27 bf fc clr [ %fp + -4 ]
status = rtems_io_close(
200a044: d2 00 60 0c ld [ %g1 + 0xc ], %o1
200a048: d0 00 60 08 ld [ %g1 + 8 ], %o0
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
200a04c: f0 27 bf f4 st %i0, [ %fp + -12 ]
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
200a050: 94 07 bf f4 add %fp, -12, %o2
200a054: 40 00 03 d3 call 200afa0 <rtems_io_close>
200a058: b0 10 20 00 clr %i0
np->major,
np->minor,
(void *) &args
);
if ( status ) {
200a05c: 80 a2 20 00 cmp %o0, 0
200a060: 12 80 00 04 bne 200a070 <devFS_close+0x3c> <== NEVER TAKEN
200a064: 01 00 00 00 nop
return rtems_deviceio_errno(status);
}
return 0;
}
200a068: 81 c7 e0 08 ret
200a06c: 81 e8 00 00 restore
np->major,
np->minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
200a070: 40 00 00 3f call 200a16c <rtems_deviceio_errno> <== NOT EXECUTED
200a074: 01 00 00 00 nop <== NOT EXECUTED
}
return 0;
}
200a078: 81 c7 e0 08 ret <== NOT EXECUTED
200a07c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200a08c <devFS_evaluate_path>:
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
200a08c: 9d e3 bf a0 save %sp, -96, %sp
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
200a090: e0 06 c0 00 ld [ %i3 ], %l0
if (!device_name_table)
200a094: 80 a4 20 00 cmp %l0, 0
200a098: 02 80 00 2f be 200a154 <devFS_evaluate_path+0xc8> <== NEVER TAKEN
200a09c: 03 00 80 3e sethi %hi(0x200f800), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
200a0a0: e6 00 62 b8 ld [ %g1 + 0x2b8 ], %l3 ! 200fab8 <rtems_device_table_size>
}
/* 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 );
200a0a4: a2 10 20 00 clr %l1
for (i = 0; i < rtems_device_table_size; i++) {
200a0a8: 80 a4 e0 00 cmp %l3, 0
200a0ac: 02 80 00 18 be 200a10c <devFS_evaluate_path+0x80> <== NEVER TAKEN
200a0b0: 82 10 20 00 clr %g1
if (!device_name_table[i].device_name)
200a0b4: 85 28 60 04 sll %g1, 4, %g2
200a0b8: a9 28 60 02 sll %g1, 2, %l4
200a0bc: a8 05 00 02 add %l4, %g2, %l4
200a0c0: e4 04 00 14 ld [ %l0 + %l4 ], %l2
/* 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++) {
200a0c4: a2 04 60 01 inc %l1
if (!device_name_table[i].device_name)
200a0c8: 80 a4 a0 00 cmp %l2, 0
200a0cc: 02 80 00 0d be 200a100 <devFS_evaluate_path+0x74>
200a0d0: a8 04 00 14 add %l0, %l4, %l4
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
200a0d4: 90 10 00 18 mov %i0, %o0
200a0d8: 92 10 00 12 mov %l2, %o1
200a0dc: 40 00 0b 91 call 200cf20 <strncmp>
200a0e0: 94 10 00 19 mov %i1, %o2
200a0e4: 80 a2 20 00 cmp %o0, 0
200a0e8: 12 80 00 07 bne 200a104 <devFS_evaluate_path+0x78> <== NEVER TAKEN
200a0ec: 80 a4 c0 11 cmp %l3, %l1
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
200a0f0: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1
200a0f4: 80 a0 60 00 cmp %g1, 0
200a0f8: 02 80 00 0b be 200a124 <devFS_evaluate_path+0x98>
200a0fc: 03 00 80 3f sethi %hi(0x200fc00), %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++) {
200a100: 80 a4 c0 11 cmp %l3, %l1
200a104: 18 bf ff ec bgu 200a0b4 <devFS_evaluate_path+0x28>
200a108: 82 10 00 11 mov %l1, %g1
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
200a10c: 40 00 07 e4 call 200c09c <__errno>
200a110: b0 10 3f ff mov -1, %i0
200a114: 82 10 20 02 mov 2, %g1
200a118: c2 22 00 00 st %g1, [ %o0 ]
}
200a11c: 81 c7 e0 08 ret
200a120: 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;
200a124: c2 00 60 dc ld [ %g1 + 0xdc ], %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];
200a128: e8 26 c0 00 st %l4, [ %i3 ]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
200a12c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
200a130: c2 26 e0 10 st %g1, [ %i3 + 0x10 ]
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;
200a134: 03 00 80 3f sethi %hi(0x200fc00), %g1
200a138: 82 10 60 90 or %g1, 0x90, %g1 ! 200fc90 <devFS_file_handlers>
200a13c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
pathloc->ops = &devFS_ops;
200a140: 03 00 80 3f sethi %hi(0x200fc00), %g1
200a144: 82 10 60 48 or %g1, 0x48, %g1 ! 200fc48 <devFS_ops>
200a148: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
200a14c: 81 c7 e0 08 ret
200a150: 91 e8 20 00 restore %g0, 0, %o0
}
/* 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 );
200a154: 40 00 07 d2 call 200c09c <__errno> <== NOT EXECUTED
200a158: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a15c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
200a160: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a164: 81 c7 e0 08 ret <== NOT EXECUTED
200a168: 81 e8 00 00 restore <== NOT EXECUTED
020020f0 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
20020f0: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
20020f4: 23 00 80 3e sethi %hi(0x200f800), %l1
20020f8: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 ! 200fab8 <rtems_device_table_size>
20020fc: 85 28 60 04 sll %g1, 4, %g2
2002100: 83 28 60 02 sll %g1, 2, %g1
2002104: 40 00 1d fc call 20098f4 <_Workspace_Allocate>
2002108: 90 00 40 02 add %g1, %g2, %o0
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
200210c: a0 92 20 00 orcc %o0, 0, %l0
2002110: 02 80 00 10 be 2002150 <devFS_initialize+0x60> <== NEVER TAKEN
2002114: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
2002118: 92 10 20 00 clr %o1
200211c: 85 28 60 04 sll %g1, 4, %g2
2002120: 83 28 60 02 sll %g1, 2, %g1
2002124: 40 00 2a 3f call 200ca20 <memset>
2002128: 94 00 40 02 add %g1, %g2, %o2
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
200212c: 03 00 80 3f sethi %hi(0x200fc00), %g1
2002130: 82 10 60 90 or %g1, 0x90, %g1 ! 200fc90 <devFS_file_handlers>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
2002134: e0 26 20 1c st %l0, [ %i0 + 0x1c ]
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
2002138: c2 26 20 24 st %g1, [ %i0 + 0x24 ]
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
200213c: 03 00 80 3f sethi %hi(0x200fc00), %g1
2002140: 82 10 60 48 or %g1, 0x48, %g1 ! 200fc48 <devFS_ops>
2002144: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
2002148: 81 c7 e0 08 ret
200214c: 91 e8 20 00 restore %g0, 0, %o0
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
2002150: 40 00 27 d3 call 200c09c <__errno> <== NOT EXECUTED
2002154: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002158: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200215c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002160: 81 c7 e0 08 ret <== NOT EXECUTED
2002164: 81 e8 00 00 restore <== NOT EXECUTED
02002314 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
2002314: 9d e3 bf 90 save %sp, -112, %sp
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
2002318: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
args.command = command;
200231c: f2 27 bf f4 st %i1, [ %fp + -12 ]
args.buffer = buffer;
status = rtems_io_control(
2002320: d2 00 60 0c ld [ %g1 + 0xc ], %o1
2002324: d0 00 60 08 ld [ %g1 + 8 ], %o0
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
2002328: f0 27 bf f0 st %i0, [ %fp + -16 ]
args.command = command;
args.buffer = buffer;
200232c: f4 27 bf f8 st %i2, [ %fp + -8 ]
status = rtems_io_control(
2002330: 40 00 11 30 call 20067f0 <rtems_io_control>
2002334: 94 07 bf f0 add %fp, -16, %o2
np->major,
np->minor,
(void *) &args
);
if ( status )
2002338: 80 a2 20 00 cmp %o0, 0
200233c: 12 80 00 05 bne 2002350 <devFS_ioctl+0x3c> <== NEVER TAKEN
2002340: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return args.ioctl_return;
2002344: f0 07 bf fc ld [ %fp + -4 ], %i0
}
2002348: 81 c7 e0 08 ret
200234c: 81 e8 00 00 restore
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
2002350: 40 00 1f 87 call 200a16c <rtems_deviceio_errno> <== NOT EXECUTED
2002354: 01 00 00 00 nop <== NOT EXECUTED
2002358: 81 c7 e0 08 ret <== NOT EXECUTED
200235c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02002168 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
2002168: 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') &&
200216c: c2 4e 00 00 ldsb [ %i0 ], %g1
2002170: 80 a0 60 64 cmp %g1, 0x64
2002174: 02 80 00 43 be 2002280 <devFS_mknod+0x118> <== ALWAYS TAKEN
2002178: a0 10 00 18 mov %i0, %l0
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
200217c: 03 00 00 3c sethi %hi(0xf000), %g1
2002180: 05 00 00 08 sethi %hi(0x2000), %g2
2002184: 82 0e 40 01 and %i1, %g1, %g1
2002188: 80 a0 40 02 cmp %g1, %g2
200218c: 12 80 00 4b bne 20022b8 <devFS_mknod+0x150> <== NEVER TAKEN
2002190: 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;
2002194: e4 07 00 00 ld [ %i4 ], %l2
if (!device_name_table)
2002198: 80 a4 a0 00 cmp %l2, 0
200219c: 02 80 00 56 be 20022f4 <devFS_mknod+0x18c> <== NEVER TAKEN
20021a0: 03 00 80 3e sethi %hi(0x200f800), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
20021a4: e6 00 62 b8 ld [ %g1 + 0x2b8 ], %l3 ! 200fab8 <rtems_device_table_size>
20021a8: 80 a4 e0 00 cmp %l3, 0
20021ac: 02 80 00 4c be 20022dc <devFS_mknod+0x174> <== NEVER TAKEN
20021b0: 82 10 20 00 clr %g1
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 );
20021b4: a8 10 3f ff mov -1, %l4
20021b8: 10 80 00 0a b 20021e0 <devFS_mknod+0x78>
20021bc: a2 10 20 00 clr %l1
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)
20021c0: 40 00 2a d2 call 200cd08 <strcmp>
20021c4: 01 00 00 00 nop
20021c8: 80 a2 20 00 cmp %o0, 0
20021cc: 02 80 00 27 be 2002268 <devFS_mknod+0x100> <== NEVER TAKEN
20021d0: a2 04 60 01 inc %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++){
20021d4: 80 a4 40 13 cmp %l1, %l3
20021d8: 1a 80 00 0e bcc 2002210 <devFS_mknod+0xa8> <== ALWAYS TAKEN
20021dc: 82 10 00 11 mov %l1, %g1
if (device_name_table[i].device_name == NULL)
20021e0: 85 28 60 04 sll %g1, 4, %g2
20021e4: 83 28 60 02 sll %g1, 2, %g1
20021e8: 82 00 40 02 add %g1, %g2, %g1
20021ec: d2 04 80 01 ld [ %l2 + %g1 ], %o1
20021f0: 80 a2 60 00 cmp %o1, 0
20021f4: 12 bf ff f3 bne 20021c0 <devFS_mknod+0x58>
20021f8: 90 10 00 10 mov %l0, %o0
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
20021fc: a8 10 00 11 mov %l1, %l4
/* 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++){
2002200: a2 04 60 01 inc %l1
2002204: 80 a4 40 13 cmp %l1, %l3
2002208: 0a bf ff f6 bcs 20021e0 <devFS_mknod+0x78>
200220c: 82 10 00 11 mov %l1, %g1
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
2002210: 80 a5 3f ff cmp %l4, -1
2002214: 02 80 00 32 be 20022dc <devFS_mknod+0x174> <== NEVER TAKEN
2002218: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
200221c: 7f ff ff ad call 20020d0 <sparc_disable_interrupts>
2002220: 01 00 00 00 nop
2002224: a2 10 00 08 mov %o0, %l1
device_name_table[slot].device_name = (char *)path;
2002228: 83 2d 20 04 sll %l4, 4, %g1
device_name_table[slot].device_name_length = strlen(path);
200222c: 90 10 00 10 mov %l0, %o0
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
2002230: a9 2d 20 02 sll %l4, 2, %l4
2002234: a8 05 00 01 add %l4, %g1, %l4
2002238: e0 24 80 14 st %l0, [ %l2 + %l4 ]
device_name_table[slot].device_name_length = strlen(path);
200223c: 40 00 2b 04 call 200ce4c <strlen>
2002240: a4 04 80 14 add %l2, %l4, %l2
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
2002244: f2 24 a0 10 st %i1, [ %l2 + 0x10 ]
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);
2002248: d0 24 a0 04 st %o0, [ %l2 + 4 ]
device_name_table[slot].major = major;
200224c: f4 24 a0 08 st %i2, [ %l2 + 8 ]
device_name_table[slot].minor = minor;
2002250: f6 24 a0 0c st %i3, [ %l2 + 0xc ]
device_name_table[slot].mode = mode;
_ISR_Enable(level);
2002254: b0 10 20 00 clr %i0
2002258: 7f ff ff a2 call 20020e0 <sparc_enable_interrupts>
200225c: 90 10 00 11 mov %l1, %o0
return 0;
}
2002260: 81 c7 e0 08 ret
2002264: 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 );
2002268: 40 00 27 8d call 200c09c <__errno> <== NOT EXECUTED
200226c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002270: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED
2002274: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002278: 81 c7 e0 08 ret <== NOT EXECUTED
200227c: 81 e8 00 00 restore <== NOT EXECUTED
* 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') &&
2002280: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1
2002284: 80 a0 60 65 cmp %g1, 0x65
2002288: 12 bf ff be bne 2002180 <devFS_mknod+0x18> <== NEVER TAKEN
200228c: 03 00 00 3c sethi %hi(0xf000), %g1
(path[2] == 'v') && (path[3] == '\0'))
2002290: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1
2002294: 80 a0 60 76 cmp %g1, 0x76
2002298: 12 bf ff ba bne 2002180 <devFS_mknod+0x18> <== NEVER TAKEN
200229c: 03 00 00 3c sethi %hi(0xf000), %g1
20022a0: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1
20022a4: 80 a0 60 00 cmp %g1, 0
20022a8: 12 bf ff b5 bne 200217c <devFS_mknod+0x14>
20022ac: b0 10 20 00 clr %i0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
20022b0: 81 c7 e0 08 ret
20022b4: 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))
20022b8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20022bc: 22 bf ff b7 be,a 2002198 <devFS_mknod+0x30> <== NOT EXECUTED
20022c0: e4 07 00 00 ld [ %i4 ], %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
20022c4: 40 00 27 76 call 200c09c <__errno> <== NOT EXECUTED
20022c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20022cc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20022d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20022d4: 81 c7 e0 08 ret <== NOT EXECUTED
20022d8: 81 e8 00 00 restore <== NOT EXECUTED
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 );
20022dc: 40 00 27 70 call 200c09c <__errno> <== NOT EXECUTED
20022e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20022e4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
20022e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20022ec: 81 c7 e0 08 ret <== NOT EXECUTED
20022f0: 81 e8 00 00 restore <== NOT EXECUTED
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 );
20022f4: 40 00 27 6a call 200c09c <__errno> <== NOT EXECUTED
20022f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20022fc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2002300: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002304: 81 c7 e0 08 ret <== NOT EXECUTED
2002308: 81 e8 00 00 restore <== NOT EXECUTED
02002360 <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
2002360: 9d e3 bf 90 save %sp, -112, %sp
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = iop->flags;
2002364: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
2002368: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
args.flags = iop->flags;
200236c: c4 27 bf f8 st %g2, [ %fp + -8 ]
args.mode = mode;
2002370: f6 27 bf fc st %i3, [ %fp + -4 ]
status = rtems_io_open(
2002374: d2 00 60 0c ld [ %g1 + 0xc ], %o1
2002378: d0 00 60 08 ld [ %g1 + 8 ], %o0
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
200237c: f0 27 bf f4 st %i0, [ %fp + -12 ]
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
2002380: 94 07 bf f4 add %fp, -12, %o2
2002384: 40 00 11 78 call 2006964 <rtems_io_open>
2002388: b0 10 20 00 clr %i0
np->major,
np->minor,
(void *) &args
);
if ( status )
200238c: 80 a2 20 00 cmp %o0, 0
2002390: 12 80 00 04 bne 20023a0 <devFS_open+0x40> <== NEVER TAKEN
2002394: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return 0;
}
2002398: 81 c7 e0 08 ret
200239c: 81 e8 00 00 restore
np->major,
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
20023a0: 40 00 1f 73 call 200a16c <rtems_deviceio_errno> <== NOT EXECUTED
20023a4: 01 00 00 00 nop <== NOT EXECUTED
return 0;
}
20023a8: 81 c7 e0 08 ret <== NOT EXECUTED
20023ac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020023b0 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
20023b0: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
20023b4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
20023b8: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
20023bc: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
20023c0: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
20023c4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
20023c8: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
20023cc: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED
20023d0: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
20023d4: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = buffer;
20023d8: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
20023dc: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
20023e0: 40 00 11 79 call 20069c4 <rtems_io_read> <== NOT EXECUTED
20023e4: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
20023e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20023ec: 12 80 00 05 bne 2002400 <devFS_read+0x50> <== NOT EXECUTED
20023f0: 01 00 00 00 nop <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
20023f4: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
}
20023f8: 81 c7 e0 08 ret <== NOT EXECUTED
20023fc: 81 e8 00 00 restore <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
2002400: 40 00 1f 5b call 200a16c <rtems_deviceio_errno> <== NOT EXECUTED
2002404: 01 00 00 00 nop <== NOT EXECUTED
2002408: 81 c7 e0 08 ret <== NOT EXECUTED
200240c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02002410 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
2002410: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
2002414: c2 06 00 00 ld [ %i0 ], %g1
if (!the_dev)
2002418: 80 a0 60 00 cmp %g1, 0
200241c: 02 80 00 0a be 2002444 <devFS_stat+0x34> <== NEVER TAKEN
2002420: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
2002424: c4 00 60 0c ld [ %g1 + 0xc ], %g2
buf->st_mode = the_dev->mode;
2002428: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
200242c: c2 00 60 08 ld [ %g1 + 8 ], %g1
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
2002430: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
buf->st_mode = the_dev->mode;
2002434: c6 26 60 0c st %g3, [ %i1 + 0xc ]
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
2002438: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
buf->st_mode = the_dev->mode;
return 0;
}
200243c: 81 c7 e0 08 ret
2002440: 91 e8 20 00 restore %g0, 0, %o0
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
2002444: 40 00 27 16 call 200c09c <__errno> <== NOT EXECUTED
2002448: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200244c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2002450: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002454: 81 c7 e0 08 ret <== NOT EXECUTED
2002458: 81 e8 00 00 restore <== NOT EXECUTED
0200245c <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
200245c: 9d e3 bf 80 save %sp, -128, %sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
2002460: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
2002464: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
2002468: c4 27 bf f8 st %g2, [ %fp + -8 ]
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
200246c: f4 27 bf f4 st %i2, [ %fp + -12 ]
args.flags = iop->flags;
args.bytes_moved = 0;
2002470: c0 27 bf fc clr [ %fp + -4 ]
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
2002474: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
2002478: d2 00 60 0c ld [ %g1 + 0xc ], %o1
200247c: d0 00 60 08 ld [ %g1 + 8 ], %o0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
2002480: c4 3f bf e8 std %g2, [ %fp + -24 ]
args.buffer = (void *) buffer;
2002484: f2 27 bf f0 st %i1, [ %fp + -16 ]
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
2002488: f0 27 bf e0 st %i0, [ %fp + -32 ]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
200248c: 40 00 11 66 call 2006a24 <rtems_io_write>
2002490: 94 07 bf e0 add %fp, -32, %o2
np->major,
np->minor,
(void *) &args
);
if ( status )
2002494: 80 a2 20 00 cmp %o0, 0
2002498: 12 80 00 05 bne 20024ac <devFS_write+0x50> <== NEVER TAKEN
200249c: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
20024a0: f0 07 bf fc ld [ %fp + -4 ], %i0
}
20024a4: 81 c7 e0 08 ret
20024a8: 81 e8 00 00 restore
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
20024ac: 40 00 1f 30 call 200a16c <rtems_deviceio_errno> <== NOT EXECUTED
20024b0: 01 00 00 00 nop <== NOT EXECUTED
20024b4: 81 c7 e0 08 ret <== NOT EXECUTED
20024b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cd74 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
200cd74: 9d e3 bf 90 save %sp, -112, %sp
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200cd78: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
200cd7c: f0 27 bf f4 st %i0, [ %fp + -12 ]
args.flags = 0;
200cd80: c0 27 bf f8 clr [ %fp + -8 ]
args.mode = 0;
200cd84: c0 27 bf fc clr [ %fp + -4 ]
status = rtems_io_close(
200cd88: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0
200cd8c: 94 07 bf f4 add %fp, -12, %o2
200cd90: 40 00 04 4d call 200dec4 <rtems_io_close>
200cd94: b0 10 20 00 clr %i0
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
200cd98: 80 a2 20 00 cmp %o0, 0
200cd9c: 12 80 00 04 bne 200cdac <device_close+0x38> <== NEVER TAKEN
200cda0: 01 00 00 00 nop
return rtems_deviceio_errno(status);
}
return 0;
}
200cda4: 81 c7 e0 08 ret
200cda8: 81 e8 00 00 restore
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
200cdac: 40 00 05 d3 call 200e4f8 <rtems_deviceio_errno> <== NOT EXECUTED
200cdb0: 01 00 00 00 nop <== NOT EXECUTED
}
return 0;
}
200cdb4: 81 c7 e0 08 ret <== NOT EXECUTED
200cdb8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cc74 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
200cc74: 9d e3 bf 90 save %sp, -112, %sp
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
200cc78: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
200cc7c: f2 27 bf f4 st %i1, [ %fp + -12 ]
args.buffer = buffer;
200cc80: f4 27 bf f8 st %i2, [ %fp + -8 ]
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
200cc84: f0 27 bf f0 st %i0, [ %fp + -16 ]
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
200cc88: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0
200cc8c: 40 00 04 a6 call 200df24 <rtems_io_control>
200cc90: 94 07 bf f0 add %fp, -16, %o2
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200cc94: 80 a2 20 00 cmp %o0, 0
200cc98: 12 80 00 05 bne 200ccac <device_ioctl+0x38> <== NEVER TAKEN
200cc9c: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return args.ioctl_return;
200cca0: f0 07 bf fc ld [ %fp + -4 ], %i0
}
200cca4: 81 c7 e0 08 ret
200cca8: 81 e8 00 00 restore
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200ccac: 40 00 06 13 call 200e4f8 <rtems_deviceio_errno> <== NOT EXECUTED
200ccb0: 01 00 00 00 nop <== NOT EXECUTED
200ccb4: 81 c7 e0 08 ret <== NOT EXECUTED
200ccb8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cdbc <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200cdbc: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.flags = iop->flags;
200cdc0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200cdc4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
200cdc8: f0 27 bf f4 st %i0, [ %fp + -12 ]
args.flags = iop->flags;
200cdcc: c4 27 bf f8 st %g2, [ %fp + -8 ]
args.mode = mode;
200cdd0: f6 27 bf fc st %i3, [ %fp + -4 ]
status = rtems_io_open(
200cdd4: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0
200cdd8: 94 07 bf f4 add %fp, -12, %o2
200cddc: 40 00 04 6a call 200df84 <rtems_io_open>
200cde0: b0 10 20 00 clr %i0
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200cde4: 80 a2 20 00 cmp %o0, 0
200cde8: 12 80 00 04 bne 200cdf8 <device_open+0x3c> <== NEVER TAKEN
200cdec: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return 0;
}
200cdf0: 81 c7 e0 08 ret
200cdf4: 81 e8 00 00 restore
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200cdf8: 40 00 05 c0 call 200e4f8 <rtems_deviceio_errno> <== NOT EXECUTED
200cdfc: 01 00 00 00 nop <== NOT EXECUTED
return 0;
}
200ce00: 81 c7 e0 08 ret <== NOT EXECUTED
200ce04: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cd18 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200cd18: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
200cd1c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200cd20: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
200cd24: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED
args.buffer = buffer;
200cd28: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
200cd2c: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
200cd30: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
200cd34: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
200cd38: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
200cd3c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_read(
200cd40: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED
200cd44: 40 00 04 a8 call 200dfe4 <rtems_io_read> <== NOT EXECUTED
200cd48: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200cd4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cd50: 12 80 00 05 bne 200cd64 <device_read+0x4c> <== NOT EXECUTED
200cd54: 01 00 00 00 nop <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
200cd58: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
}
200cd5c: 81 c7 e0 08 ret <== NOT EXECUTED
200cd60: 81 e8 00 00 restore <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200cd64: 40 00 05 e5 call 200e4f8 <rtems_deviceio_errno> <== NOT EXECUTED
200cd68: 01 00 00 00 nop <== NOT EXECUTED
200cd6c: 81 c7 e0 08 ret <== NOT EXECUTED
200cd70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200ccbc <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
200ccbc: 9d e3 bf 80 save %sp, -128, %sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
200ccc0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200ccc4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
args.iop = iop;
args.offset = iop->offset;
200ccc8: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4
args.buffer = (void *) buffer;
200cccc: f2 27 bf f0 st %i1, [ %fp + -16 ]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
200ccd0: d8 3f bf e8 std %o4, [ %fp + -24 ]
args.buffer = (void *) buffer;
args.count = count;
200ccd4: f4 27 bf f4 st %i2, [ %fp + -12 ]
args.flags = iop->flags;
200ccd8: c4 27 bf f8 st %g2, [ %fp + -8 ]
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
200ccdc: f0 27 bf e0 st %i0, [ %fp + -32 ]
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
200cce0: c0 27 bf fc clr [ %fp + -4 ]
status = rtems_io_write(
200cce4: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0
200cce8: 40 00 04 d7 call 200e044 <rtems_io_write>
200ccec: 94 07 bf e0 add %fp, -32, %o2
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200ccf0: 80 a2 20 00 cmp %o0, 0
200ccf4: 12 80 00 05 bne 200cd08 <device_write+0x4c> <== NEVER TAKEN
200ccf8: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
200ccfc: f0 07 bf fc ld [ %fp + -4 ], %i0
}
200cd00: 81 c7 e0 08 ret
200cd04: 81 e8 00 00 restore
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200cd08: 40 00 05 fc call 200e4f8 <rtems_deviceio_errno> <== NOT EXECUTED
200cd0c: 01 00 00 00 nop <== NOT EXECUTED
200cd10: 81 c7 e0 08 ret <== NOT EXECUTED
200cd14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02004474 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
2004474: 9d e3 bf a0 save %sp, -96, %sp
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2004478: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
200447c: 80 a0 60 00 cmp %g1, 0
2004480: 12 80 00 04 bne 2004490 <drainOutput+0x1c>
2004484: 01 00 00 00 nop
2004488: 81 c7 e0 08 ret
200448c: 81 e8 00 00 restore
rtems_interrupt_disable (level);
2004490: 7f ff f7 87 call 20022ac <sparc_disable_interrupts>
2004494: 01 00 00 00 nop
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2004498: c4 06 20 84 ld [ %i0 + 0x84 ], %g2
200449c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
20044a0: 80 a0 80 01 cmp %g2, %g1
20044a4: 02 80 00 14 be 20044f4 <drainOutput+0x80>
20044a8: 01 00 00 00 nop
tty->rawOutBufState = rob_wait;
20044ac: a0 10 20 02 mov 2, %l0 ! 2 <PROM_START+0x2>
20044b0: e0 26 20 94 st %l0, [ %i0 + 0x94 ]
rtems_interrupt_enable (level);
20044b4: 7f ff f7 82 call 20022bc <sparc_enable_interrupts>
20044b8: 01 00 00 00 nop
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
20044bc: d0 06 20 8c ld [ %i0 + 0x8c ], %o0
20044c0: 92 10 20 00 clr %o1
20044c4: 40 00 06 d0 call 2006004 <rtems_semaphore_obtain>
20044c8: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20044cc: 80 a2 20 00 cmp %o0, 0
20044d0: 12 80 00 0b bne 20044fc <drainOutput+0x88> <== NEVER TAKEN
20044d4: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
20044d8: 7f ff f7 75 call 20022ac <sparc_disable_interrupts>
20044dc: 01 00 00 00 nop
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) {
20044e0: c4 06 20 84 ld [ %i0 + 0x84 ], %g2
20044e4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
20044e8: 80 a0 80 01 cmp %g2, %g1
20044ec: 32 bf ff f2 bne,a 20044b4 <drainOutput+0x40> <== NEVER TAKEN
20044f0: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
20044f4: 7f ff f7 72 call 20022bc <sparc_enable_interrupts>
20044f8: 91 e8 00 08 restore %g0, %o0, %o0
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);
20044fc: 40 00 08 6f call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
020035c0 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
20035c0: 9d e3 bf 58 save %sp, -168, %sp
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
20035c4: a0 07 bf b8 add %fp, -72, %l0
20035c8: 90 10 00 18 mov %i0, %o0
20035cc: 40 00 02 28 call 2003e6c <fstat>
20035d0: 92 10 00 10 mov %l0, %o1
if ( status == -1 )
20035d4: 80 a2 3f ff cmp %o0, -1
20035d8: 12 80 00 04 bne 20035e8 <dup2+0x28> <== ALWAYS TAKEN
20035dc: 92 10 00 10 mov %l0, %o1
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
}
20035e0: 81 c7 e0 08 ret
20035e4: 91 e8 3f ff restore %g0, -1, %o0
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
20035e8: 40 00 02 21 call 2003e6c <fstat>
20035ec: 90 10 00 19 mov %i1, %o0
if ( status == -1 )
20035f0: 80 a2 3f ff cmp %o0, -1
20035f4: 02 bf ff fb be 20035e0 <dup2+0x20> <== ALWAYS TAKEN
20035f8: 90 10 00 18 mov %i0, %o0
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
20035fc: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2003600: 40 00 00 cf call 200393c <fcntl> <== NOT EXECUTED
2003604: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003608: 81 c7 e0 08 ret <== NOT EXECUTED
200360c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02003ea0 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2003ea0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2003ea4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2003ea8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2003eac: 02 80 00 09 be 2003ed0 <echo+0x30> <== NOT EXECUTED
2003eb0: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED
2003eb4: 05 00 80 6b sethi %hi(0x201ac00), %g2 <== NOT EXECUTED
2003eb8: c4 00 a0 dc ld [ %g2 + 0xdc ], %g2 ! 201acdc <__ctype_ptr__><== NOT EXECUTED
2003ebc: 82 00 80 08 add %g2, %o0, %g1 <== NOT EXECUTED
2003ec0: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED
2003ec4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003ec8: 12 80 00 06 bne 2003ee0 <echo+0x40> <== NOT EXECUTED
2003ecc: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
2003ed0: 7f ff ff 87 call 2003cec <oproc> <== NOT EXECUTED
2003ed4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2003ed8: 81 c7 e0 08 ret <== NOT EXECUTED
2003edc: 81 e8 00 00 restore <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2003ee0: 02 bf ff fc be 2003ed0 <echo+0x30> <== NOT EXECUTED
2003ee4: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED
2003ee8: 02 bf ff fa be 2003ed0 <echo+0x30> <== NOT EXECUTED
2003eec: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2003ef0: b0 1e 20 40 xor %i0, 0x40, %i0 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2003ef4: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
2003ef8: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
2003efc: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
2003f00: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2003f04: 7f ff ff 2b call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
2003f08: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += 2;
2003f0c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2003f10: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
2003f14: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2003f18: 81 c7 e0 08 ret <== NOT EXECUTED
2003f1c: 81 e8 00 00 restore <== NOT EXECUTED
020030c4 <endgrent>:
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
if (group_fp != NULL)
20030c4: 03 00 80 7b sethi %hi(0x201ec00), %g1 <== NOT EXECUTED
20030c8: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 201ed3c <group_fp> <== NOT EXECUTED
20030cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20030d0: 02 80 00 05 be 20030e4 <endgrent+0x20> <== NOT EXECUTED
20030d4: 01 00 00 00 nop <== NOT EXECUTED
fclose(group_fp);
20030d8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20030dc: 40 00 37 83 call 2010ee8 <fclose> <== NOT EXECUTED
20030e0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
20030e4: 81 c3 e0 08 retl <== NOT EXECUTED
020030ec <endpwent>:
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
if (passwd_fp != NULL)
20030ec: 03 00 80 7b sethi %hi(0x201ec00), %g1 <== NOT EXECUTED
20030f0: d0 00 60 54 ld [ %g1 + 0x54 ], %o0 ! 201ec54 <passwd_fp> <== NOT EXECUTED
20030f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20030f8: 02 80 00 05 be 200310c <endpwent+0x20> <== NOT EXECUTED
20030fc: 01 00 00 00 nop <== NOT EXECUTED
fclose(passwd_fp);
2003100: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003104: 40 00 37 79 call 2010ee8 <fclose> <== NOT EXECUTED
2003108: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
200310c: 81 c3 e0 08 retl <== NOT EXECUTED
02003f20 <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)
{
2003f20: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (tty->ccount == 0)
2003f24: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
2003f28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003f2c: 02 80 00 36 be 2004004 <erase+0xe4> <== NOT EXECUTED
2003f30: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
return;
if (lineFlag) {
2003f34: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2003f38: 12 80 00 35 bne 200400c <erase+0xec> <== NOT EXECUTED
2003f3c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2003f40: 27 00 80 6b sethi %hi(0x201ac00), %l3 <== NOT EXECUTED
2003f44: 29 00 80 67 sethi %hi(0x2019c00), %l4 <== NOT EXECUTED
2003f48: 25 00 80 67 sethi %hi(0x2019c00), %l2 <== NOT EXECUTED
2003f4c: a6 14 e0 dc or %l3, 0xdc, %l3 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
2003f50: a8 15 20 a8 or %l4, 0xa8, %l4 <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
2003f54: 10 80 00 0c b 2003f84 <erase+0x64> <== NOT EXECUTED
2003f58: a4 14 a0 a0 or %l2, 0xa0, %l2 <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2003f5c: 12 80 00 6a bne 2004104 <erase+0x1e4> <== NOT EXECUTED
2003f60: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2003f64: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2003f68: 02 80 00 63 be 20040f4 <erase+0x1d4> <== NOT EXECUTED
2003f6c: 01 00 00 00 nop <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
2003f70: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003f74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003f78: 02 80 00 5f be 20040f4 <erase+0x1d4> <== NOT EXECUTED
2003f7c: 01 00 00 00 nop <== NOT EXECUTED
2003f80: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED
unsigned char c = tty->cbuf[--tty->ccount];
2003f84: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED
2003f88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003f8c: c2 24 20 20 st %g1, [ %l0 + 0x20 ] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2003f90: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
2003f94: 02 bf ff f4 be 2003f64 <erase+0x44> <== NOT EXECUTED
2003f98: e2 09 00 01 ldub [ %g4 + %g1 ], %l1 <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2003f9c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2003fa0: 12 80 00 05 bne 2003fb4 <erase+0x94> <== NOT EXECUTED
2003fa4: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED
2003fa8: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED
2003fac: 22 80 00 54 be,a 20040fc <erase+0x1dc> <== NOT EXECUTED
2003fb0: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
2003fb4: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED
2003fb8: 02 80 00 24 be 2004048 <erase+0x128> <== NOT EXECUTED
2003fbc: a2 04 60 01 inc %l1 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2003fc0: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED
2003fc4: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED
2003fc8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003fcc: 12 bf ff e4 bne 2003f5c <erase+0x3c> <== NOT EXECUTED
2003fd0: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED
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);
2003fd4: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
2003fd8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2003fdc: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED
2003fe0: 7f ff fe f4 call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
2003fe4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
2003fe8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2003fec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003ff0: 02 bf ff de be 2003f68 <erase+0x48> <== NOT EXECUTED
2003ff4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
tty->column--;
2003ff8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
}
}
}
if (!lineFlag)
2003ffc: 12 bf ff dd bne 2003f70 <erase+0x50> <== NOT EXECUTED
2004000: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
2004004: 81 c7 e0 08 ret <== NOT EXECUTED
2004008: 81 e8 00 00 restore <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
200400c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
2004010: 02 80 00 38 be 20040f0 <erase+0x1d0> <== NOT EXECUTED
2004014: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
2004018: 12 bf ff cb bne 2003f44 <erase+0x24> <== NOT EXECUTED
200401c: 27 00 80 6b sethi %hi(0x201ac00), %l3 <== NOT EXECUTED
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
2004020: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
2004024: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
2004028: 7f ff ff 9e call 2003ea0 <echo> <== NOT EXECUTED
200402c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2004030: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
2004034: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2004038: 02 bf ff f3 be 2004004 <erase+0xe4> <== NOT EXECUTED
200403c: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED
echo ('\n', tty);
2004040: 7f ff ff 98 call 2003ea0 <echo> <== NOT EXECUTED
2004044: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2004048: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200404c: 02 80 00 17 be 20040a8 <erase+0x188> <== NOT EXECUTED
2004050: e2 04 20 2c ld [ %l0 + 0x2c ], %l1 <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
2004054: 96 08 a2 00 and %g2, 0x200, %o3 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2004058: d8 04 c0 00 ld [ %l3 ], %o4 <== NOT EXECUTED
200405c: 10 80 00 07 b 2004078 <erase+0x158> <== NOT EXECUTED
2004060: 84 10 20 00 clr %g2 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2004064: 32 80 00 02 bne,a 200406c <erase+0x14c> <== NOT EXECUTED
2004068: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
200406c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2004070: 22 80 00 0f be,a 20040ac <erase+0x18c> <== NOT EXECUTED
2004074: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
c = tty->cbuf[i++];
2004078: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 <== NOT EXECUTED
200407c: 84 00 a0 01 inc %g2 <== NOT EXECUTED
if (c == '\t') {
2004080: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED
2004084: 02 80 00 18 be 20040e4 <erase+0x1c4> <== NOT EXECUTED
2004088: 9a 03 00 03 add %o4, %g3, %o5 <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
200408c: c6 0b 60 01 ldub [ %o5 + 1 ], %g3 <== NOT EXECUTED
2004090: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED
2004094: 12 bf ff f4 bne 2004064 <erase+0x144> <== NOT EXECUTED
2004098: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
200409c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20040a0: 12 bf ff f6 bne 2004078 <erase+0x158> <== NOT EXECUTED
20040a4: a2 04 60 01 inc %l1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
20040a8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
20040ac: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
20040b0: 16 bf ff ae bge 2003f68 <erase+0x48> <== NOT EXECUTED
20040b4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
20040b8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
20040bc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20040c0: 7f ff fe bc call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
20040c4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
tty->column--;
20040c8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
20040cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
20040d0: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
20040d4: 06 bf ff f9 bl 20040b8 <erase+0x198> <== NOT EXECUTED
20040d8: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
20040dc: 10 bf ff a3 b 2003f68 <erase+0x48> <== NOT EXECUTED
20040e0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
20040e4: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED
20040e8: 10 bf ff e1 b 200406c <erase+0x14c> <== NOT EXECUTED
20040ec: a2 04 60 01 inc %l1 <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
20040f0: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
return;
20040f4: 81 c7 e0 08 ret <== NOT EXECUTED
20040f8: 81 e8 00 00 restore <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
20040fc: 7f ff ff 69 call 2003ea0 <echo> <== NOT EXECUTED
2004100: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2004104: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2004108: 7f ff fe aa call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
200410c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
2004110: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2004114: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004118: 22 80 00 05 be,a 200412c <erase+0x20c> <== NOT EXECUTED
200411c: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED
tty->column--;
2004120: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2004124: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
2004128: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED
200412c: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED
2004130: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2004134: 02 bf ff a9 be 2003fd8 <erase+0xb8> <== NOT EXECUTED
2004138: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200413c: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED
2004140: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED
2004144: 12 bf ff a6 bne 2003fdc <erase+0xbc> <== NOT EXECUTED
2004148: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
200414c: 10 bf ff 87 b 2003f68 <erase+0x48> <== NOT EXECUTED
2004150: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
0200393c <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
200393c: 9d e3 bf 90 save %sp, -112, %sp
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2003940: 03 00 80 7b sethi %hi(0x201ec00), %g1
2003944: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 201ed74 <rtems_libio_number_iops>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
2003948: 84 07 a0 4c add %fp, 0x4c, %g2
200394c: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003950: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2003954: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2003958: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
200395c: 80 a6 00 01 cmp %i0, %g1
2003960: 1a 80 00 7a bcc 2003b48 <fcntl+0x20c> <== NEVER TAKEN
2003964: c4 27 bf fc st %g2, [ %fp + -4 ]
iop = rtems_libio_iop( fd );
2003968: 21 00 80 7d sethi %hi(0x201f400), %l0
200396c: c6 04 22 fc ld [ %l0 + 0x2fc ], %g3 ! 201f6fc <rtems_libio_iops>
2003970: 89 2e 20 06 sll %i0, 6, %g4
2003974: 93 2e 20 03 sll %i0, 3, %o1
2003978: 92 02 40 04 add %o1, %g4, %o1
200397c: 92 00 c0 09 add %g3, %o1, %o1
rtems_libio_check_is_open(iop);
2003980: d0 02 60 18 ld [ %o1 + 0x18 ], %o0
2003984: 80 8a 21 00 btst 0x100, %o0
2003988: 02 80 00 70 be 2003b48 <fcntl+0x20c> <== NEVER TAKEN
200398c: 80 a6 60 09 cmp %i1, 9
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
2003990: 08 80 00 08 bleu 20039b0 <fcntl+0x74>
2003994: 89 2e 60 02 sll %i1, 2, %g4
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
2003998: 40 00 37 5a call 2011700 <__errno>
200399c: b0 10 3f ff mov -1, %i0
20039a0: 82 10 20 16 mov 0x16, %g1
20039a4: c2 22 00 00 st %g1, [ %o0 ]
20039a8: 81 c7 e0 08 ret
20039ac: 81 e8 00 00 restore
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
20039b0: 1b 00 80 0e sethi %hi(0x2003800), %o5
20039b4: 9a 13 61 14 or %o5, 0x114, %o5 ! 2003914 <rtems_filesystem_evaluate_path+0xf0>
20039b8: c8 03 40 04 ld [ %o5 + %g4 ], %g4
20039bc: 81 c1 00 00 jmp %g4
20039c0: 01 00 00 00 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
20039c4: 40 00 37 4f call 2011700 <__errno>
20039c8: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
20039cc: 82 10 20 86 mov 0x86, %g1
20039d0: c2 22 00 00 st %g1, [ %o0 ]
20039d4: 81 c7 e0 08 ret
20039d8: 81 e8 00 00 restore
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
20039dc: d0 00 80 00 ld [ %g2 ], %o0
20039e0: 40 00 02 a5 call 2004474 <rtems_libio_fcntl_flags>
20039e4: 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);
20039e8: d2 07 bf f4 ld [ %fp + -12 ], %o1
20039ec: 90 0a 22 01 and %o0, 0x201, %o0
20039f0: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
20039f4: b0 10 20 00 clr %i0
20039f8: 82 08 7d fe and %g1, -514, %g1
20039fc: 82 12 00 01 or %o0, %g1, %g1
2003a00: 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) {
if (iop->handlers->fcntl_h) {
2003a04: c2 02 60 40 ld [ %o1 + 0x40 ], %g1
2003a08: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
2003a0c: 80 a0 60 00 cmp %g1, 0
2003a10: 02 80 00 52 be 2003b58 <fcntl+0x21c> <== NEVER TAKEN
2003a14: 01 00 00 00 nop
int err = (*iop->handlers->fcntl_h)( cmd, iop );
2003a18: 9f c0 40 00 call %g1
2003a1c: 90 10 00 19 mov %i1, %o0
if (err) {
2003a20: b2 92 20 00 orcc %o0, 0, %i1
2003a24: 12 80 00 04 bne 2003a34 <fcntl+0xf8> <== NEVER TAKEN
2003a28: 01 00 00 00 nop
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
2003a2c: 81 c7 e0 08 ret
2003a30: 81 e8 00 00 restore
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
2003a34: 40 00 37 33 call 2011700 <__errno> <== NOT EXECUTED
2003a38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003a3c: 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;
}
2003a40: 81 c7 e0 08 ret <== NOT EXECUTED
2003a44: 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 );
2003a48: 40 00 01 db call 20041b4 <rtems_libio_to_fcntl_flags>
2003a4c: d2 27 bf f4 st %o1, [ %fp + -12 ]
2003a50: d2 07 bf f4 ld [ %fp + -12 ], %o1
2003a54: 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) {
2003a58: 80 a6 20 00 cmp %i0, 0
2003a5c: 36 bf ff eb bge,a 2003a08 <fcntl+0xcc> <== ALWAYS TAKEN
2003a60: c2 02 60 40 ld [ %o1 + 0x40 ], %g1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
2003a64: 81 c7 e0 08 ret <== NOT EXECUTED
2003a68: 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 ) )
2003a6c: c2 00 80 00 ld [ %g2 ], %g1
2003a70: 80 a0 60 00 cmp %g1, 0
2003a74: 22 80 00 2c be,a 2003b24 <fcntl+0x1e8> <== NEVER TAKEN
2003a78: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
2003a7c: 90 12 28 00 or %o0, 0x800, %o0
2003a80: b0 10 20 00 clr %i0
2003a84: 10 bf ff e0 b 2003a04 <fcntl+0xc8>
2003a88: 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);
2003a8c: b1 32 20 0b srl %o0, 0xb, %i0
2003a90: 10 bf ff dd b 2003a04 <fcntl+0xc8>
2003a94: b0 0e 20 01 and %i0, 1, %i0
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
2003a98: c4 00 80 00 ld [ %g2 ], %g2
if ( fd2 )
2003a9c: 80 a0 a0 00 cmp %g2, 0
2003aa0: 02 80 00 30 be 2003b60 <fcntl+0x224> <== ALWAYS TAKEN
2003aa4: 80 a0 40 02 cmp %g1, %g2
diop = rtems_libio_iop( fd2 );
2003aa8: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003aac: 18 80 00 21 bgu 2003b30 <fcntl+0x1f4> <== NOT EXECUTED
2003ab0: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003ab4: c4 02 60 1c ld [ %o1 + 0x1c ], %g2
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2003ab8: da 02 60 40 ld [ %o1 + 0x40 ], %o5
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003abc: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
2003ac0: c4 02 60 20 ld [ %o1 + 0x20 ], %g2
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
2003ac4: c8 02 60 3c ld [ %o1 + 0x3c ], %g4
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003ac8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
2003acc: c4 02 60 24 ld [ %o1 + 0x24 ], %g2
ret = (int) (diop - rtems_libio_iops);
2003ad0: 86 26 00 03 sub %i0, %g3, %g3
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003ad4: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2003ad8: c4 02 60 28 ld [ %o1 + 0x28 ], %g2
ret = (int) (diop - rtems_libio_iops);
2003adc: 87 38 e0 03 sra %g3, 3, %g3
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003ae0: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
2003ae4: c4 02 60 2c ld [ %o1 + 0x2c ], %g2
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2003ae8: da 20 60 40 st %o5, [ %g1 + 0x40 ]
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003aec: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
ret = (int) (diop - rtems_libio_iops);
2003af0: 85 28 e0 06 sll %g3, 6, %g2
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
2003af4: c8 20 60 3c st %g4, [ %g1 + 0x3c ]
diop->flags = iop->flags;
2003af8: d0 20 60 18 st %o0, [ %g1 + 0x18 ]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
2003afc: 83 28 e0 03 sll %g3, 3, %g1
2003b00: 82 20 80 01 sub %g2, %g1, %g1
2003b04: 85 28 60 06 sll %g1, 6, %g2
2003b08: 82 00 40 02 add %g1, %g2, %g1
2003b0c: 82 00 40 03 add %g1, %g3, %g1
2003b10: b1 28 60 0f sll %g1, 0xf, %i0
2003b14: b0 26 00 01 sub %i0, %g1, %i0
2003b18: b1 2e 20 03 sll %i0, 3, %i0
2003b1c: 10 bf ff cf b 2003a58 <fcntl+0x11c>
2003b20: b0 06 00 03 add %i0, %g3, %i0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2003b24: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003b28: 10 bf ff b7 b 2003a04 <fcntl+0xc8> <== NOT EXECUTED
2003b2c: d0 22 60 18 st %o0, [ %o1 + 0x18 ] <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
2003b30: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED
2003b34: 85 28 a0 03 sll %g2, 3, %g2 <== NOT EXECUTED
2003b38: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
2003b3c: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED
2003b40: 10 bf ff dd b 2003ab4 <fcntl+0x178> <== NOT EXECUTED
2003b44: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
2003b48: 40 00 36 ee call 2011700 <__errno> <== NOT EXECUTED
2003b4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003b50: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2003b54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003b58: 81 c7 e0 08 ret <== NOT EXECUTED
2003b5c: 81 e8 00 00 restore <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
2003b60: 40 00 02 04 call 2004370 <rtems_libio_allocate>
2003b64: d2 27 bf f4 st %o1, [ %fp + -12 ]
if ( diop == 0 ) {
2003b68: b0 10 3f ff mov -1, %i0
2003b6c: 82 92 20 00 orcc %o0, 0, %g1
2003b70: 02 bf ff 8e be 20039a8 <fcntl+0x6c> <== NEVER TAKEN
2003b74: d2 07 bf f4 ld [ %fp + -12 ], %o1
2003b78: c6 04 22 fc ld [ %l0 + 0x2fc ], %g3
2003b7c: d0 02 60 18 ld [ %o1 + 0x18 ], %o0
2003b80: 10 bf ff cd b 2003ab4 <fcntl+0x178>
2003b84: b0 10 00 01 mov %g1, %i0
02003ba4 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
2003ba4: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2003ba8: 03 00 80 7b sethi %hi(0x201ec00), %g1
2003bac: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 201ed74 <rtems_libio_number_iops>
2003bb0: 80 a6 00 01 cmp %i0, %g1
2003bb4: 1a 80 00 16 bcc 2003c0c <fdatasync+0x68>
2003bb8: 03 00 80 7d sethi %hi(0x201f400), %g1
iop = rtems_libio_iop( fd );
2003bbc: d0 00 62 fc ld [ %g1 + 0x2fc ], %o0 ! 201f6fc <rtems_libio_iops>
2003bc0: 83 2e 20 06 sll %i0, 6, %g1
2003bc4: b1 2e 20 03 sll %i0, 3, %i0
2003bc8: b0 06 00 01 add %i0, %g1, %i0
2003bcc: 90 02 00 18 add %o0, %i0, %o0
rtems_libio_check_is_open(iop);
2003bd0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
2003bd4: 80 88 61 00 btst 0x100, %g1
2003bd8: 02 80 00 0d be 2003c0c <fdatasync+0x68> <== NEVER TAKEN
2003bdc: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
2003be0: 02 80 00 11 be 2003c24 <fdatasync+0x80>
2003be4: 01 00 00 00 nop
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
2003be8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1
2003bec: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
2003bf0: 80 a0 60 00 cmp %g1, 0
2003bf4: 02 80 00 12 be 2003c3c <fdatasync+0x98>
2003bf8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
2003bfc: 9f c0 40 00 call %g1
2003c00: 01 00 00 00 nop
}
2003c04: 81 c7 e0 08 ret
2003c08: 91 e8 00 08 restore %g0, %o0, %o0
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
2003c0c: 40 00 36 bd call 2011700 <__errno>
2003c10: b0 10 3f ff mov -1, %i0
2003c14: 82 10 20 09 mov 9, %g1
2003c18: c2 22 00 00 st %g1, [ %o0 ]
2003c1c: 81 c7 e0 08 ret
2003c20: 81 e8 00 00 restore
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
2003c24: 40 00 36 b7 call 2011700 <__errno>
2003c28: b0 10 3f ff mov -1, %i0
2003c2c: 82 10 20 16 mov 0x16, %g1
2003c30: c2 22 00 00 st %g1, [ %o0 ]
2003c34: 81 c7 e0 08 ret
2003c38: 81 e8 00 00 restore
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2003c3c: 40 00 36 b1 call 2011700 <__errno>
2003c40: b0 10 3f ff mov -1, %i0
2003c44: 82 10 20 86 mov 0x86, %g1
2003c48: c2 22 00 00 st %g1, [ %o0 ]
2003c4c: 81 c7 e0 08 ret
2003c50: 81 e8 00 00 restore
0200d3dc <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200d3dc: 9d e3 bf 98 save %sp, -104, %sp
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
200d3e0: 21 00 80 6c sethi %hi(0x201b000), %l0
200d3e4: d0 04 22 c8 ld [ %l0 + 0x2c8 ], %o0 ! 201b2c8 <rtems_pipe_semaphore>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200d3e8: a2 10 00 18 mov %i0, %l1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
200d3ec: 92 10 20 00 clr %o1
200d3f0: 94 10 20 00 clr %o2
200d3f4: 7f ff e3 04 call 2006004 <rtems_semaphore_obtain>
200d3f8: b0 10 3f fc mov -4, %i0
200d3fc: 80 a2 20 00 cmp %o0, 0
200d400: 12 80 00 ea bne 200d7a8 <fifo_open+0x3cc> <== ALWAYS TAKEN
200d404: 01 00 00 00 nop
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
200d408: e4 04 40 00 ld [ %l1 ], %l2 <== NOT EXECUTED
if (pipe == NULL) {
200d40c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
200d410: 02 80 00 4a be 200d538 <fifo_open+0x15c> <== NOT EXECUTED
200d414: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200d418: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED
200d41c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d420: 7f ff e2 f9 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d424: 94 10 20 00 clr %o2 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
200d428: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200d42c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
200d430: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
200d434: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200d438: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
200d43c: 02 80 00 be be 200d734 <fifo_open+0x358> <== NOT EXECUTED
200d440: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
200d444: 7f ff e3 37 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d448: d0 04 22 c8 ld [ %l0 + 0x2c8 ], %o0 <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
200d44c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200d450: 12 80 00 d6 bne 200d7a8 <fifo_open+0x3cc> <== NOT EXECUTED
200d454: 01 00 00 00 nop <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200d458: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED
200d45c: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED
200d460: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED
200d464: 02 80 00 8c be 200d694 <fifo_open+0x2b8> <== NOT EXECUTED
200d468: e0 04 40 00 ld [ %l1 ], %l0 <== NOT EXECUTED
200d46c: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED
200d470: 02 80 00 74 be 200d640 <fifo_open+0x264> <== NOT EXECUTED
200d474: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
200d478: 22 80 00 07 be,a 200d494 <fifo_open+0xb8> <== NOT EXECUTED
200d47c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
200d480: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
200d484: 7f ff e3 27 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d488: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
200d48c: 81 c7 e0 08 ret <== NOT EXECUTED
200d490: 81 e8 00 00 restore <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200d494: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
200d498: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200d49c: 84 00 a0 01 inc %g2 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
200d4a0: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED
200d4a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d4a8: 02 80 00 c7 be 200d7c4 <fifo_open+0x3e8> <== NOT EXECUTED
200d4ac: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
200d4b0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
200d4b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d4b8: 32 bf ff f3 bne,a 200d484 <fifo_open+0xa8> <== NOT EXECUTED
200d4bc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
200d4c0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED
200d4c4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200d4c8: 32 bf ff ef bne,a 200d484 <fifo_open+0xa8> <== NOT EXECUTED
200d4cc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
200d4d0: 10 80 00 0c b 200d500 <fifo_open+0x124> <== NOT EXECUTED
200d4d4: e4 04 20 24 ld [ %l0 + 0x24 ], %l2 <== NOT EXECUTED
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200d4d8: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d4dc: 7f ff e2 ca call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d4e0: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d4e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d4e8: 12 80 00 0f bne 200d524 <fifo_open+0x148> <== NOT EXECUTED
200d4ec: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
200d4f0: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED
200d4f4: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED
200d4f8: 32 bf ff e3 bne,a 200d484 <fifo_open+0xa8> <== NOT EXECUTED
200d4fc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
200d500: 7f ff e3 08 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d504: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
200d508: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
200d50c: 40 00 01 eb call 200dcb8 <rtems_barrier_wait> <== NOT EXECUTED
200d510: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d514: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d518: 22 bf ff f0 be,a 200d4d8 <fifo_open+0xfc> <== NOT EXECUTED
200d51c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
200d520: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
200d524: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200d528: 7f ff ff 5c call 200d298 <pipe_release> <== NOT EXECUTED
200d52c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
return err;
}
200d530: 81 c7 e0 08 ret <== NOT EXECUTED
200d534: 81 e8 00 00 restore <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
200d538: 7f ff f8 be call 200b830 <malloc> <== NOT EXECUTED
200d53c: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED
if (pipe == NULL)
200d540: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED
200d544: 02 bf ff c0 be 200d444 <fifo_open+0x68> <== NOT EXECUTED
200d548: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
200d54c: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
200d550: c0 24 c0 00 clr [ %l3 ] <== NOT EXECUTED
200d554: c0 24 e0 08 clr [ %l3 + 8 ] <== NOT EXECUTED
200d558: c0 24 e0 0c clr [ %l3 + 0xc ] <== NOT EXECUTED
200d55c: c0 24 e0 10 clr [ %l3 + 0x10 ] <== NOT EXECUTED
200d560: c0 24 e0 14 clr [ %l3 + 0x14 ] <== NOT EXECUTED
200d564: c0 24 e0 18 clr [ %l3 + 0x18 ] <== NOT EXECUTED
200d568: c0 24 e0 1c clr [ %l3 + 0x1c ] <== NOT EXECUTED
200d56c: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED
200d570: c0 24 e0 24 clr [ %l3 + 0x24 ] <== NOT EXECUTED
200d574: c0 24 e0 28 clr [ %l3 + 0x28 ] <== NOT EXECUTED
200d578: c0 24 e0 2c clr [ %l3 + 0x2c ] <== NOT EXECUTED
200d57c: c0 24 e0 30 clr [ %l3 + 0x30 ] <== NOT EXECUTED
pipe->Size = PIPE_BUF;
200d580: c2 24 e0 04 st %g1, [ %l3 + 4 ] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
200d584: 7f ff f8 ab call 200b830 <malloc> <== NOT EXECUTED
200d588: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED
if (! pipe->Buffer)
200d58c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d590: 02 80 00 77 be 200d76c <fifo_open+0x390> <== NOT EXECUTED
200d594: d0 24 c0 00 st %o0, [ %l3 ] <== NOT EXECUTED
goto err_buf;
err = -EINTR;
if (rtems_barrier_create(
200d598: 29 00 80 6b sethi %hi(0x201ac00), %l4 <== NOT EXECUTED
200d59c: d0 4d 20 c8 ldsb [ %l4 + 0xc8 ], %o0 ! 201acc8 <c.5538> <== NOT EXECUTED
200d5a0: 2b 14 12 5c sethi %hi(0x50497000), %l5 <== NOT EXECUTED
200d5a4: 82 15 62 00 or %l5, 0x200, %g1 ! 50497200 <RAM_END+0x4e097200><== NOT EXECUTED
200d5a8: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d5ac: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED
200d5b0: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d5b4: 40 00 01 58 call 200db14 <rtems_barrier_create> <== NOT EXECUTED
200d5b8: 96 04 e0 2c add %l3, 0x2c, %o3 <== NOT EXECUTED
200d5bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d5c0: 32 80 00 69 bne,a 200d764 <fifo_open+0x388> <== NOT EXECUTED
200d5c4: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
200d5c8: d0 4d 20 c8 ldsb [ %l4 + 0xc8 ], %o0 <== NOT EXECUTED
200d5cc: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED
200d5d0: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <RAM_END+0x4e097700><== NOT EXECUTED
200d5d4: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d5d8: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED
200d5dc: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d5e0: 40 00 01 4d call 200db14 <rtems_barrier_create> <== NOT EXECUTED
200d5e4: 96 04 e0 30 add %l3, 0x30, %o3 <== NOT EXECUTED
200d5e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d5ec: 12 80 00 5b bne 200d758 <fifo_open+0x37c> <== NOT EXECUTED
200d5f0: aa 15 63 00 or %l5, 0x300, %l5 <== NOT EXECUTED
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
200d5f4: d0 4d 20 c8 ldsb [ %l4 + 0xc8 ], %o0 <== NOT EXECUTED
200d5f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200d5fc: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED
200d600: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
200d604: 96 10 20 00 clr %o3 <== NOT EXECUTED
200d608: 7f ff e1 de call 2005d80 <rtems_semaphore_create> <== NOT EXECUTED
200d60c: 98 04 e0 28 add %l3, 0x28, %o4 <== NOT EXECUTED
200d610: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d614: 12 80 00 4f bne 200d750 <fifo_open+0x374> <== NOT EXECUTED
200d618: c2 0d 20 c8 ldub [ %l4 + 0xc8 ], %g1 <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
200d61c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
200d620: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED
200d624: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED
200d628: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED
200d62c: 12 bf ff 7b bne 200d418 <fifo_open+0x3c> <== NOT EXECUTED
200d630: c4 2d 20 c8 stb %g2, [ %l4 + 0xc8 ] <== NOT EXECUTED
c = 'a';
200d634: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED
200d638: 10 bf ff 78 b 200d418 <fifo_open+0x3c> <== NOT EXECUTED
200d63c: c2 2d 20 c8 stb %g1, [ %l4 + 0xc8 ] <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
200d640: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200d644: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
200d648: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200d64c: 84 00 a0 01 inc %g2 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
200d650: c6 24 20 10 st %g3, [ %l0 + 0x10 ] <== NOT EXECUTED
200d654: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d658: 02 80 00 56 be 200d7b0 <fifo_open+0x3d4> <== NOT EXECUTED
200d65c: c4 24 20 20 st %g2, [ %l0 + 0x20 ] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200d660: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200d664: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
200d668: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200d66c: 84 00 a0 01 inc %g2 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
200d670: c6 24 20 14 st %g3, [ %l0 + 0x14 ] <== NOT EXECUTED
200d674: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d678: 12 bf ff 82 bne 200d480 <fifo_open+0xa4> <== NOT EXECUTED
200d67c: c4 24 20 24 st %g2, [ %l0 + 0x24 ] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
200d680: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
200d684: 40 00 01 76 call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d688: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
200d68c: 10 bf ff 7e b 200d484 <fifo_open+0xa8> <== NOT EXECUTED
200d690: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200d694: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
200d698: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d69c: 32 80 00 06 bne,a 200d6b4 <fifo_open+0x2d8> <== NOT EXECUTED
200d6a0: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED
200d6a4: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED
200d6a8: 12 bf ff 9f bne 200d524 <fifo_open+0x148> <== NOT EXECUTED
200d6ac: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200d6b0: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
200d6b4: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
200d6b8: 88 00 a0 01 add %g2, 1, %g4 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
200d6bc: 86 00 e0 01 inc %g3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
200d6c0: c8 24 20 14 st %g4, [ %l0 + 0x14 ] <== NOT EXECUTED
200d6c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200d6c8: 02 80 00 44 be 200d7d8 <fifo_open+0x3fc> <== NOT EXECUTED
200d6cc: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0) {
200d6d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d6d4: 32 bf ff 6c bne,a 200d484 <fifo_open+0xa8> <== NOT EXECUTED
200d6d8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
prevCounter = pipe->readerCounter;
200d6dc: 10 80 00 0c b 200d70c <fifo_open+0x330> <== NOT EXECUTED
200d6e0: e4 04 20 20 ld [ %l0 + 0x20 ], %l2 <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200d6e4: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d6e8: 7f ff e2 47 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d6ec: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d6f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d6f4: 12 bf ff 8c bne 200d524 <fifo_open+0x148> <== NOT EXECUTED
200d6f8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
200d6fc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
200d700: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED
200d704: 32 bf ff 60 bne,a 200d484 <fifo_open+0xa8> <== NOT EXECUTED
200d708: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
200d70c: 7f ff e2 85 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d710: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
200d714: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
200d718: 40 00 01 68 call 200dcb8 <rtems_barrier_wait> <== NOT EXECUTED
200d71c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d720: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d724: 22 bf ff f0 be,a 200d6e4 <fifo_open+0x308> <== NOT EXECUTED
200d728: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
200d72c: 10 bf ff 7e b 200d524 <fifo_open+0x148> <== NOT EXECUTED
200d730: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
200d734: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200d738: 12 80 00 10 bne 200d778 <fifo_open+0x39c> <== NOT EXECUTED
200d73c: d0 04 22 c8 ld [ %l0 + 0x2c8 ], %o0 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
200d740: 7f ff e2 78 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d744: e4 24 40 00 st %l2, [ %l1 ] <== NOT EXECUTED
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200d748: 10 bf ff 45 b 200d45c <fifo_open+0x80> <== NOT EXECUTED
200d74c: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
200d750: 40 00 01 29 call 200dbf4 <rtems_barrier_delete> <== NOT EXECUTED
200d754: d0 04 e0 30 ld [ %l3 + 0x30 ], %o0 <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
200d758: 40 00 01 27 call 200dbf4 <rtems_barrier_delete> <== NOT EXECUTED
200d75c: d0 04 e0 2c ld [ %l3 + 0x2c ], %o0 <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
200d760: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED
200d764: 7f ff f6 bb call 200b250 <free> <== NOT EXECUTED
200d768: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
err_buf:
free(pipe);
200d76c: 7f ff f6 b9 call 200b250 <free> <== NOT EXECUTED
200d770: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
200d774: 30 bf ff 34 b,a 200d444 <fifo_open+0x68> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200d778: 40 00 01 1f call 200dbf4 <rtems_barrier_delete> <== NOT EXECUTED
200d77c: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
200d780: 40 00 01 1d call 200dbf4 <rtems_barrier_delete> <== NOT EXECUTED
200d784: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
200d788: 7f ff e1 f2 call 2005f50 <rtems_semaphore_delete> <== NOT EXECUTED
200d78c: d0 04 a0 28 ld [ %l2 + 0x28 ], %o0 <== NOT EXECUTED
free(pipe->Buffer);
200d790: 7f ff f6 b0 call 200b250 <free> <== NOT EXECUTED
200d794: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED
free(pipe);
200d798: 7f ff f6 ae call 200b250 <free> <== NOT EXECUTED
200d79c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
200d7a0: 7f ff e2 60 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d7a4: d0 04 22 c8 ld [ %l0 + 0x2c8 ], %o0 <== NOT EXECUTED
200d7a8: 81 c7 e0 08 ret
200d7ac: 81 e8 00 00 restore
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200d7b0: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
200d7b4: 40 00 01 2a call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d7b8: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200d7bc: 10 bf ff aa b 200d664 <fifo_open+0x288> <== NOT EXECUTED
200d7c0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200d7c4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
200d7c8: 40 00 01 25 call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d7cc: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
if (pipe->Writers == 0) {
200d7d0: 10 bf ff 39 b 200d4b4 <fifo_open+0xd8> <== NOT EXECUTED
200d7d4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
goto out_error;
}
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
200d7d8: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
200d7dc: 40 00 01 20 call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d7e0: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
200d7e4: 10 bf ff bb b 200d6d0 <fifo_open+0x2f4> <== NOT EXECUTED
200d7e8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
02009e5c <file_systems_below_this_mountpoint>:
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2009e5c: 05 00 80 9e sethi %hi(0x2027800), %g2 <== NOT EXECUTED
2009e60: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 2027b80 <rtems_filesystem_mount_table_control><== NOT EXECUTED
2009e64: 84 10 a3 80 or %g2, 0x380, %g2 <== NOT EXECUTED
2009e68: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED
2009e6c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2009e70: 02 80 00 10 be 2009eb0 <file_systems_below_this_mountpoint+0x54><== NOT EXECUTED
2009e74: 01 00 00 00 nop <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
2009e78: c8 02 60 10 ld [ %o1 + 0x10 ], %g4 <== NOT EXECUTED
2009e7c: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED
2009e80: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED
2009e84: 32 80 00 08 bne,a 2009ea4 <file_systems_below_this_mountpoint+0x48><== NOT EXECUTED
2009e88: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2009e8c: 81 c3 e0 08 retl <== NOT EXECUTED
2009e90: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
2009e94: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED
2009e98: 02 80 00 08 be 2009eb8 <file_systems_below_this_mountpoint+0x5c><== NOT EXECUTED
2009e9c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
2009ea0: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2009ea4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2009ea8: 32 bf ff fb bne,a 2009e94 <file_systems_below_this_mountpoint+0x38><== NOT EXECUTED
2009eac: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED
return true;
}
}
return false;
}
2009eb0: 81 c3 e0 08 retl <== NOT EXECUTED
2009eb4: 90 10 20 00 clr %o0 <== NOT EXECUTED
2009eb8: 81 c3 e0 08 retl <== NOT EXECUTED
02003c84 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
2003c84: 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);
2003c88: 03 00 80 7b sethi %hi(0x201ec00), %g1
2003c8c: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 201ed74 <rtems_libio_number_iops>
2003c90: 80 a6 00 01 cmp %i0, %g1
2003c94: 1a 80 00 3f bcc 2003d90 <fpathconf+0x10c>
2003c98: 03 00 80 7d sethi %hi(0x201f400), %g1
iop = rtems_libio_iop(fd);
2003c9c: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 201f6fc <rtems_libio_iops>
2003ca0: 85 2e 20 06 sll %i0, 6, %g2
2003ca4: b1 2e 20 03 sll %i0, 3, %i0
2003ca8: b0 06 00 02 add %i0, %g2, %i0
2003cac: b0 00 40 18 add %g1, %i0, %i0
rtems_libio_check_is_open(iop);
2003cb0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2003cb4: 80 88 61 00 btst 0x100, %g1
2003cb8: 02 80 00 36 be 2003d90 <fpathconf+0x10c> <== NEVER TAKEN
2003cbc: 80 88 60 02 btst 2, %g1
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2003cc0: 02 80 00 3a be 2003da8 <fpathconf+0x124> <== NEVER TAKEN
2003cc4: 80 a6 60 0b cmp %i1, 0xb
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2003cc8: 08 80 00 08 bleu 2003ce8 <fpathconf+0x64>
2003ccc: 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 );
2003cd0: 40 00 36 8c call 2011700 <__errno>
2003cd4: b0 10 3f ff mov -1, %i0
2003cd8: 82 10 20 16 mov 0x16, %g1
2003cdc: c2 22 00 00 st %g1, [ %o0 ]
break;
}
return return_value;
}
2003ce0: 81 c7 e0 08 ret
2003ce4: 81 e8 00 00 restore
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2003ce8: b3 2e 60 02 sll %i1, 2, %i1
2003cec: 05 00 80 0f sethi %hi(0x2003c00), %g2
2003cf0: 84 10 a0 54 or %g2, 0x54, %g2 ! 2003c54 <fdatasync+0xb0>
2003cf4: c4 00 80 19 ld [ %g2 + %i1 ], %g2
2003cf8: 81 c0 80 00 jmp %g2
2003cfc: 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;
2003d00: f0 00 60 5c ld [ %g1 + 0x5c ], %i0
break;
2003d04: 81 c7 e0 08 ret
2003d08: 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;
2003d0c: f0 00 60 50 ld [ %g1 + 0x50 ], %i0
break;
2003d10: 81 c7 e0 08 ret
2003d14: 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;
2003d18: f0 00 60 64 ld [ %g1 + 0x64 ], %i0
break;
2003d1c: 81 c7 e0 08 ret
2003d20: 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;
2003d24: f0 00 60 58 ld [ %g1 + 0x58 ], %i0
break;
2003d28: 81 c7 e0 08 ret
2003d2c: 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;
2003d30: f0 00 60 54 ld [ %g1 + 0x54 ], %i0
break;
2003d34: 81 c7 e0 08 ret
2003d38: 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;
2003d3c: f0 00 60 4c ld [ %g1 + 0x4c ], %i0
break;
2003d40: 81 c7 e0 08 ret
2003d44: 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;
2003d48: f0 00 60 48 ld [ %g1 + 0x48 ], %i0
break;
2003d4c: 81 c7 e0 08 ret
2003d50: 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;
2003d54: f0 00 60 44 ld [ %g1 + 0x44 ], %i0
break;
2003d58: 81 c7 e0 08 ret
2003d5c: 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;
2003d60: f0 00 60 40 ld [ %g1 + 0x40 ], %i0
break;
2003d64: 81 c7 e0 08 ret
2003d68: 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;
2003d6c: f0 00 60 3c ld [ %g1 + 0x3c ], %i0
break;
2003d70: 81 c7 e0 08 ret
2003d74: 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;
2003d78: f0 00 60 38 ld [ %g1 + 0x38 ], %i0
break;
2003d7c: 81 c7 e0 08 ret
2003d80: 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;
2003d84: f0 00 60 60 ld [ %g1 + 0x60 ], %i0
break;
2003d88: 81 c7 e0 08 ret
2003d8c: 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);
2003d90: 40 00 36 5c call 2011700 <__errno>
2003d94: b0 10 3f ff mov -1, %i0
2003d98: 82 10 20 09 mov 9, %g1
2003d9c: c2 22 00 00 st %g1, [ %o0 ]
2003da0: 81 c7 e0 08 ret
2003da4: 81 e8 00 00 restore
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2003da8: 40 00 36 56 call 2011700 <__errno> <== NOT EXECUTED
2003dac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003db0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003db4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003db8: 81 c7 e0 08 ret <== NOT EXECUTED
2003dbc: 81 e8 00 00 restore <== NOT EXECUTED
0200b250 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
200b250: 9d e3 bf a0 save %sp, -96, %sp
200b254: 03 00 80 6d sethi %hi(0x201b400), %g1
200b258: 82 10 60 50 or %g1, 0x50, %g1 ! 201b450 <rtems_malloc_statistics>
200b25c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200b260: b2 10 00 18 mov %i0, %i1
200b264: 84 00 a0 01 inc %g2
if ( !ptr )
200b268: 80 a6 20 00 cmp %i0, 0
200b26c: 02 80 00 15 be 200b2c0 <free+0x70>
200b270: c4 20 60 0c st %g2, [ %g1 + 0xc ]
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200b274: 03 00 80 6d sethi %hi(0x201b400), %g1
200b278: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b7b0 <_System_state_Current>
200b27c: 80 a0 60 03 cmp %g1, 3
200b280: 02 80 00 17 be 200b2dc <free+0x8c> <== ALWAYS TAKEN
200b284: 03 00 80 6c sethi %hi(0x201b000), %g1
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200b288: c2 00 61 a8 ld [ %g1 + 0x1a8 ], %g1 ! 201b1a8 <rtems_malloc_statistics_helpers>
200b28c: 80 a0 60 00 cmp %g1, 0
200b290: 02 80 00 06 be 200b2a8 <free+0x58> <== ALWAYS TAKEN
200b294: 21 00 80 6a sethi %hi(0x201a800), %l0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
200b298: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
200b29c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b2a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
200b2a4: 21 00 80 6a sethi %hi(0x201a800), %l0 <== NOT EXECUTED
200b2a8: d0 04 22 d0 ld [ %l0 + 0x2d0 ], %o0 ! 201aad0 <RTEMS_Malloc_Heap>
200b2ac: 40 00 05 24 call 200c73c <_Protected_heap_Free>
200b2b0: 92 10 00 19 mov %i1, %o1
200b2b4: 80 8a 20 ff btst 0xff, %o0
200b2b8: 02 80 00 04 be 200b2c8 <free+0x78> <== NEVER TAKEN
200b2bc: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1
200b2c0: 81 c7 e0 08 ret
200b2c4: 81 e8 00 00 restore
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
200b2c8: 31 00 80 68 sethi %hi(0x201a000), %i0 <== NOT EXECUTED
200b2cc: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED
200b2d0: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED
200b2d4: 7f ff e0 96 call 200352c <printk> <== NOT EXECUTED
200b2d8: 91 ee 20 48 restore %i0, 0x48, %o0 <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200b2dc: 40 00 01 2f call 200b798 <malloc_is_system_state_OK>
200b2e0: 01 00 00 00 nop
200b2e4: 80 8a 20 ff btst 0xff, %o0
200b2e8: 12 bf ff e8 bne 200b288 <free+0x38> <== ALWAYS TAKEN
200b2ec: 03 00 80 6c sethi %hi(0x201b000), %g1
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
200b2f0: 40 00 01 3c call 200b7e0 <malloc_deferred_free> <== NOT EXECUTED
200b2f4: 81 e8 00 00 restore <== NOT EXECUTED
02004468 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2004468: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
200446c: 03 00 80 77 sethi %hi(0x201dc00), %g1 <== NOT EXECUTED
2004470: 82 10 61 98 or %g1, 0x198, %g1 ! 201dd98 <rtems_global_user_env><== NOT EXECUTED
2004474: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
2004478: 02 80 00 18 be 20044d8 <free_user_env+0x70> <== NOT EXECUTED
200447c: 01 00 00 00 nop <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2004480: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2004484: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004488: 22 80 00 09 be,a 20044ac <free_user_env+0x44> <== NOT EXECUTED
200448c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED
2004490: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004494: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004498: 22 80 00 05 be,a 20044ac <free_user_env+0x44> <== NOT EXECUTED
200449c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED
20044a0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20044a4: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
20044a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED
20044ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20044b0: 02 80 00 08 be 20044d0 <free_user_env+0x68> <== NOT EXECUTED
20044b4: 01 00 00 00 nop <== NOT EXECUTED
20044b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20044bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20044c0: 02 80 00 04 be 20044d0 <free_user_env+0x68> <== NOT EXECUTED
20044c4: 01 00 00 00 nop <== NOT EXECUTED
20044c8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20044cc: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED
free(env);
20044d0: 7f ff fb 34 call 20031a0 <free> <== NOT EXECUTED
20044d4: 81 e8 00 00 restore <== NOT EXECUTED
20044d8: 81 c7 e0 08 ret <== NOT EXECUTED
20044dc: 81 e8 00 00 restore <== NOT EXECUTED
02018c1c <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
2018c1c: 9d e3 bf a0 save %sp, -96, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
2018c20: 80 a6 60 00 cmp %i1, 0
2018c24: 02 80 00 3b be 2018d10 <fstat+0xf4>
2018c28: 03 00 80 6a sethi %hi(0x201a800), %g1
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
2018c2c: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
2018c30: 80 a6 00 01 cmp %i0, %g1
2018c34: 1a 80 00 2b bcc 2018ce0 <fstat+0xc4>
2018c38: 03 00 80 6d sethi %hi(0x201b400), %g1
2018c3c: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201b444 <rtems_libio_iops>
2018c40: 83 2e 20 06 sll %i0, 6, %g1
2018c44: b1 2e 20 03 sll %i0, 3, %i0
2018c48: b0 06 00 01 add %i0, %g1, %i0
2018c4c: 90 02 00 18 add %o0, %i0, %o0
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
2018c50: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
2018c54: 80 88 61 00 btst 0x100, %g1
2018c58: 02 80 00 22 be 2018ce0 <fstat+0xc4> <== NEVER TAKEN
2018c5c: 01 00 00 00 nop
if ( !iop->handlers )
2018c60: c2 02 20 40 ld [ %o0 + 0x40 ], %g1
2018c64: 80 a0 60 00 cmp %g1, 0
2018c68: 02 80 00 1e be 2018ce0 <fstat+0xc4> <== NEVER TAKEN
2018c6c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
2018c70: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2018c74: 80 a0 60 00 cmp %g1, 0
2018c78: 02 80 00 20 be 2018cf8 <fstat+0xdc> <== NEVER TAKEN
2018c7c: 92 10 00 19 mov %i1, %o1
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
2018c80: c0 26 40 00 clr [ %i1 ]
2018c84: c0 26 60 04 clr [ %i1 + 4 ]
2018c88: c0 26 60 08 clr [ %i1 + 8 ]
2018c8c: c0 26 60 0c clr [ %i1 + 0xc ]
2018c90: c0 26 60 10 clr [ %i1 + 0x10 ]
2018c94: c0 26 60 14 clr [ %i1 + 0x14 ]
2018c98: c0 26 60 18 clr [ %i1 + 0x18 ]
2018c9c: c0 26 60 1c clr [ %i1 + 0x1c ]
2018ca0: c0 26 60 20 clr [ %i1 + 0x20 ]
2018ca4: c0 26 60 24 clr [ %i1 + 0x24 ]
2018ca8: c0 26 60 28 clr [ %i1 + 0x28 ]
2018cac: c0 26 60 2c clr [ %i1 + 0x2c ]
2018cb0: c0 26 60 30 clr [ %i1 + 0x30 ]
2018cb4: c0 26 60 34 clr [ %i1 + 0x34 ]
2018cb8: c0 26 60 38 clr [ %i1 + 0x38 ]
2018cbc: c0 26 60 3c clr [ %i1 + 0x3c ]
2018cc0: c0 26 60 40 clr [ %i1 + 0x40 ]
2018cc4: c0 26 60 44 clr [ %i1 + 0x44 ]
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
2018cc8: c2 02 20 40 ld [ %o0 + 0x40 ], %g1
2018ccc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2018cd0: 9f c0 40 00 call %g1
2018cd4: 90 02 20 1c add %o0, 0x1c, %o0
}
2018cd8: 81 c7 e0 08 ret
2018cdc: 91 e8 00 08 restore %g0, %o0, %o0
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
2018ce0: 7f ff d7 17 call 200e93c <__errno>
2018ce4: b0 10 3f ff mov -1, %i0
2018ce8: 82 10 20 09 mov 9, %g1
2018cec: c2 22 00 00 st %g1, [ %o0 ]
2018cf0: 81 c7 e0 08 ret
2018cf4: 81 e8 00 00 restore
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2018cf8: 7f ff d7 11 call 200e93c <__errno> <== NOT EXECUTED
2018cfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2018d00: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2018d04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2018d08: 81 c7 e0 08 ret <== NOT EXECUTED
2018d0c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
2018d10: 7f ff d7 0b call 200e93c <__errno>
2018d14: b0 10 3f ff mov -1, %i0
2018d18: 82 10 20 0e mov 0xe, %g1
2018d1c: c2 22 00 00 st %g1, [ %o0 ]
2018d20: 81 c7 e0 08 ret
2018d24: 81 e8 00 00 restore
02003f90 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
2003f90: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2003f94: 03 00 80 7b sethi %hi(0x201ec00), %g1
2003f98: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 201ed74 <rtems_libio_number_iops>
2003f9c: 80 a6 00 01 cmp %i0, %g1
2003fa0: 1a 80 00 19 bcc 2004004 <fsync+0x74> <== NEVER TAKEN
2003fa4: 03 00 80 7d sethi %hi(0x201f400), %g1
iop = rtems_libio_iop( fd );
2003fa8: d0 00 62 fc ld [ %g1 + 0x2fc ], %o0 ! 201f6fc <rtems_libio_iops>
2003fac: 83 2e 20 06 sll %i0, 6, %g1
2003fb0: b1 2e 20 03 sll %i0, 3, %i0
2003fb4: b0 06 00 01 add %i0, %g1, %i0
2003fb8: 90 02 00 18 add %o0, %i0, %o0
rtems_libio_check_is_open(iop);
2003fbc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
2003fc0: 80 88 61 00 btst 0x100, %g1
2003fc4: 02 80 00 10 be 2004004 <fsync+0x74> <== NEVER TAKEN
2003fc8: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
2003fcc: 02 80 00 14 be 200401c <fsync+0x8c>
2003fd0: 01 00 00 00 nop
/*
* Now process the fsync().
*/
if ( !iop->handlers )
2003fd4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1
2003fd8: 80 a0 60 00 cmp %g1, 0
2003fdc: 02 80 00 0a be 2004004 <fsync+0x74> <== NEVER TAKEN
2003fe0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
2003fe4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2003fe8: 80 a0 60 00 cmp %g1, 0
2003fec: 02 80 00 12 be 2004034 <fsync+0xa4>
2003ff0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
2003ff4: 9f c0 40 00 call %g1
2003ff8: 01 00 00 00 nop
}
2003ffc: 81 c7 e0 08 ret
2004000: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
2004004: 40 00 35 bf call 2011700 <__errno> <== NOT EXECUTED
2004008: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200400c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2004010: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004014: 81 c7 e0 08 ret <== NOT EXECUTED
2004018: 81 e8 00 00 restore <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
200401c: 40 00 35 b9 call 2011700 <__errno>
2004020: b0 10 3f ff mov -1, %i0
2004024: 82 10 20 16 mov 0x16, %g1
2004028: c2 22 00 00 st %g1, [ %o0 ]
200402c: 81 c7 e0 08 ret
2004030: 81 e8 00 00 restore
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004034: 40 00 35 b3 call 2011700 <__errno>
2004038: b0 10 3f ff mov -1, %i0
200403c: 82 10 20 86 mov 0x86, %g1
2004040: c2 22 00 00 st %g1, [ %o0 ]
2004044: 81 c7 e0 08 ret
2004048: 81 e8 00 00 restore
0200b2fc <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
200b2fc: 9d e3 bf 88 save %sp, -120, %sp
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
200b300: 03 00 80 6a sethi %hi(0x201a800), %g1
200b304: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
200b308: 80 a6 00 01 cmp %i0, %g1
200b30c: 1a 80 00 2b bcc 200b3b8 <ftruncate+0xbc> <== NEVER TAKEN
200b310: 03 00 80 6d sethi %hi(0x201b400), %g1
iop = rtems_libio_iop( fd );
200b314: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 201b444 <rtems_libio_iops>
200b318: 85 2e 20 06 sll %i0, 6, %g2
200b31c: b1 2e 20 03 sll %i0, 3, %i0
200b320: b0 06 00 02 add %i0, %g2, %i0
200b324: b0 00 40 18 add %g1, %i0, %i0
rtems_libio_check_is_open(iop);
200b328: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b32c: 80 88 61 00 btst 0x100, %g1
200b330: 02 80 00 22 be 200b3b8 <ftruncate+0xbc> <== NEVER TAKEN
200b334: 01 00 00 00 nop
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
200b338: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200b33c: c2 27 bf ec st %g1, [ %fp + -20 ]
200b340: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
200b344: c2 27 bf f0 st %g1, [ %fp + -16 ]
200b348: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200b34c: c2 27 bf f4 st %g1, [ %fp + -12 ]
200b350: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200b354: c2 27 bf f8 st %g1, [ %fp + -8 ]
200b358: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
if ( !loc.ops->node_type_h )
200b35c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200b360: 80 a0 60 00 cmp %g1, 0
200b364: 02 80 00 21 be 200b3e8 <ftruncate+0xec> <== NEVER TAKEN
200b368: c4 27 bf fc st %g2, [ %fp + -4 ]
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
200b36c: 9f c0 40 00 call %g1
200b370: 90 07 bf ec add %fp, -20, %o0
200b374: 80 a2 20 01 cmp %o0, 1
200b378: 02 80 00 22 be 200b400 <ftruncate+0x104>
200b37c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
200b380: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b384: 80 88 60 04 btst 4, %g1
200b388: 02 80 00 12 be 200b3d0 <ftruncate+0xd4> <== NEVER TAKEN
200b38c: 01 00 00 00 nop
if ( !iop->handlers->ftruncate_h )
200b390: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
200b394: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
200b398: 80 a0 60 00 cmp %g1, 0
200b39c: 02 80 00 13 be 200b3e8 <ftruncate+0xec> <== NEVER TAKEN
200b3a0: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
200b3a4: 92 10 00 19 mov %i1, %o1
200b3a8: 9f c0 40 00 call %g1
200b3ac: 94 10 00 1a mov %i2, %o2
}
200b3b0: 81 c7 e0 08 ret
200b3b4: 91 e8 00 08 restore %g0, %o0, %o0
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
200b3b8: 40 00 0d 61 call 200e93c <__errno> <== NOT EXECUTED
200b3bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b3c0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
200b3c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b3c8: 81 c7 e0 08 ret <== NOT EXECUTED
200b3cc: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
200b3d0: 40 00 0d 5b call 200e93c <__errno> <== NOT EXECUTED
200b3d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b3d8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200b3dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b3e0: 81 c7 e0 08 ret <== NOT EXECUTED
200b3e4: 81 e8 00 00 restore <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
200b3e8: 40 00 0d 55 call 200e93c <__errno> <== NOT EXECUTED
200b3ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b3f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200b3f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b3f8: 81 c7 e0 08 ret <== NOT EXECUTED
200b3fc: 81 e8 00 00 restore <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
200b400: 40 00 0d 4f call 200e93c <__errno>
200b404: b0 10 3f ff mov -1, %i0
200b408: 82 10 20 15 mov 0x15, %g1
200b40c: c2 22 00 00 st %g1, [ %o0 ]
200b410: 81 c7 e0 08 ret
200b414: 81 e8 00 00 restore
0201cf70 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
201cf70: 9d e3 bf 88 save %sp, -120, %sp
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
201cf74: 03 00 80 80 sethi %hi(0x2020000), %g1
201cf78: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 2020174 <rtems_libio_number_iops>
201cf7c: 80 a6 00 01 cmp %i0, %g1
201cf80: 1a 80 00 08 bcc 201cfa0 <getdents+0x30> <== NEVER TAKEN
201cf84: a0 10 20 00 clr %l0
201cf88: 03 00 80 83 sethi %hi(0x2020c00), %g1
201cf8c: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2020c14 <rtems_libio_iops>
201cf90: 83 2e 20 06 sll %i0, 6, %g1
201cf94: b1 2e 20 03 sll %i0, 3, %i0
201cf98: b0 06 00 01 add %i0, %g1, %i0
201cf9c: a0 04 00 18 add %l0, %i0, %l0
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
201cfa0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
201cfa4: c2 27 bf ec st %g1, [ %fp + -20 ]
201cfa8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
201cfac: c2 27 bf f0 st %g1, [ %fp + -16 ]
201cfb0: c2 04 20 24 ld [ %l0 + 0x24 ], %g1
201cfb4: c2 27 bf f4 st %g1, [ %fp + -12 ]
201cfb8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
201cfbc: c2 27 bf f8 st %g1, [ %fp + -8 ]
201cfc0: c4 04 20 2c ld [ %l0 + 0x2c ], %g2
if ( !loc.ops->node_type_h )
201cfc4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
201cfc8: 80 a0 60 00 cmp %g1, 0
201cfcc: 02 80 00 17 be 201d028 <getdents+0xb8> <== NEVER TAKEN
201cfd0: c4 27 bf fc st %g2, [ %fp + -4 ]
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
201cfd4: 9f c0 40 00 call %g1
201cfd8: 90 07 bf ec add %fp, -20, %o0
201cfdc: 80 a2 20 01 cmp %o0, 1
201cfe0: 12 80 00 0c bne 201d010 <getdents+0xa0>
201cfe4: 01 00 00 00 nop
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
201cfe8: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
201cfec: c2 00 60 08 ld [ %g1 + 8 ], %g1
201cff0: 80 a0 60 00 cmp %g1, 0
201cff4: 02 80 00 0d be 201d028 <getdents+0xb8> <== NEVER TAKEN
201cff8: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
201cffc: 92 10 00 19 mov %i1, %o1
201d000: 9f c0 40 00 call %g1
201d004: 94 10 00 1a mov %i2, %o2
}
201d008: 81 c7 e0 08 ret
201d00c: 91 e8 00 08 restore %g0, %o0, %o0
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
201d010: 7f ff d1 9f call 201168c <__errno>
201d014: b0 10 3f ff mov -1, %i0
201d018: 82 10 20 14 mov 0x14, %g1
201d01c: c2 22 00 00 st %g1, [ %o0 ]
201d020: 81 c7 e0 08 ret
201d024: 81 e8 00 00 restore
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
201d028: 7f ff d1 99 call 201168c <__errno> <== NOT EXECUTED
201d02c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201d030: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
201d034: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201d038: 81 c7 e0 08 ret <== NOT EXECUTED
201d03c: 81 e8 00 00 restore <== NOT EXECUTED
0200378c <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
200378c: 9d e3 bf a0 save %sp, -96, %sp
FILE *fp;
int match;
init_etc_passwd_group();
2003790: 7f ff ff b3 call 200365c <init_etc_passwd_group>
2003794: 01 00 00 00 nop
if ((fp = fopen("/etc/group", "r")) == NULL) {
2003798: 11 00 80 75 sethi %hi(0x201d400), %o0
200379c: 13 00 80 75 sethi %hi(0x201d400), %o1
20037a0: 90 12 21 38 or %o0, 0x138, %o0
20037a4: 40 00 37 a7 call 2011640 <fopen>
20037a8: 92 12 60 c0 or %o1, 0xc0, %o1
20037ac: a0 92 20 00 orcc %o0, 0, %l0
20037b0: 12 80 00 0b bne 20037dc <getgr_r+0x50> <== ALWAYS TAKEN
20037b4: 92 10 00 1a mov %i2, %o1
20037b8: 30 80 00 27 b,a 2003854 <getgr_r+0xc8> <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
20037bc: 40 00 3b 9b call 2012628 <strcmp>
20037c0: 92 10 00 18 mov %i0, %o1
20037c4: 80 a0 00 08 cmp %g0, %o0
20037c8: 82 60 3f ff subx %g0, -1, %g1
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
20037cc: 80 a0 60 00 cmp %g1, 0
20037d0: 12 80 00 14 bne 2003820 <getgr_r+0x94>
20037d4: 90 10 00 10 mov %l0, %o0
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
20037d8: 92 10 00 1a mov %i2, %o1
20037dc: 94 10 00 1b mov %i3, %o2
20037e0: 96 10 00 1c mov %i4, %o3
20037e4: 7f ff fe d1 call 2003328 <scangr>
20037e8: 90 10 00 10 mov %l0, %o0
20037ec: 80 a2 20 00 cmp %o0, 0
20037f0: 02 80 00 11 be 2003834 <getgr_r+0xa8> <== NEVER TAKEN
20037f4: 80 a6 20 00 cmp %i0, 0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
20037f8: 32 bf ff f1 bne,a 20037bc <getgr_r+0x30> <== ALWAYS TAKEN
20037fc: d0 06 80 00 ld [ %i2 ], %o0
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
2003800: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED
2003804: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED
2003808: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
200380c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
}
if (match) {
2003810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003814: 02 bf ff f2 be 20037dc <getgr_r+0x50> <== NOT EXECUTED
2003818: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
fclose(fp);
200381c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003820: 40 00 35 b2 call 2010ee8 <fclose>
2003824: b0 10 20 00 clr %i0
*result = grp;
2003828: f4 27 40 00 st %i2, [ %i5 ]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
200382c: 81 c7 e0 08 ret
2003830: 81 e8 00 00 restore
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
2003834: 40 00 35 55 call 2010d88 <__errno> <== NOT EXECUTED
2003838: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200383c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003840: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fclose(fp);
2003844: 40 00 35 a9 call 2010ee8 <fclose> <== NOT EXECUTED
2003848: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return -1;
200384c: 81 c7 e0 08 ret <== NOT EXECUTED
2003850: 81 e8 00 00 restore <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
2003854: 40 00 35 4d call 2010d88 <__errno> <== NOT EXECUTED
2003858: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200385c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003860: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
2003864: 81 c7 e0 08 ret <== NOT EXECUTED
2003868: 81 e8 00 00 restore <== NOT EXECUTED
020034a8 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
20034a8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (group_fp == NULL)
20034ac: 03 00 80 7b sethi %hi(0x201ec00), %g1 <== NOT EXECUTED
20034b0: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 201ed3c <group_fp> <== NOT EXECUTED
20034b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20034b8: 32 80 00 04 bne,a 20034c8 <getgrent+0x20> <== NOT EXECUTED
20034bc: 31 00 80 7b sethi %hi(0x201ec00), %i0 <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
return NULL;
return &grent;
}
20034c0: 81 c7 e0 08 ret <== NOT EXECUTED
20034c4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
20034c8: 15 00 80 7b sethi %hi(0x201ec00), %o2 <== NOT EXECUTED
20034cc: 92 16 22 08 or %i0, 0x208, %o1 <== NOT EXECUTED
20034d0: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED
20034d4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED
20034d8: 7f ff ff 94 call 2003328 <scangr> <== NOT EXECUTED
20034dc: b0 16 22 08 or %i0, 0x208, %i0 <== NOT EXECUTED
20034e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20034e4: 02 bf ff f7 be 20034c0 <getgrent+0x18> <== NOT EXECUTED
20034e8: 01 00 00 00 nop <== NOT EXECUTED
return NULL;
return &grent;
}
20034ec: 81 c7 e0 08 ret <== NOT EXECUTED
20034f0: 81 e8 00 00 restore <== NOT EXECUTED
020038a0 <getgrgid>:
}
struct group *getgrgid(
gid_t gid
)
{
20038a0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
20038a4: 13 00 80 7b sethi %hi(0x201ec00), %o1 <== NOT EXECUTED
20038a8: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED
20038ac: 92 12 62 08 or %o1, 0x208, %o1 <== NOT EXECUTED
20038b0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED
20038b4: 15 00 80 7b sethi %hi(0x201ec00), %o2 <== NOT EXECUTED
20038b8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED
20038bc: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED
20038c0: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
20038c4: 7f ff ff ea call 200386c <getgrgid_r> <== NOT EXECUTED
20038c8: b0 10 20 00 clr %i0 <== NOT EXECUTED
20038cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20038d0: 22 80 00 02 be,a 20038d8 <getgrgid+0x38> <== NOT EXECUTED
20038d4: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return NULL;
return p;
}
20038d8: 81 c7 e0 08 ret <== NOT EXECUTED
20038dc: 81 e8 00 00 restore <== NOT EXECUTED
0200386c <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
200386c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED
2003870: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
2003874: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
2003878: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
200387c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
2003880: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
2003884: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED
2003888: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
200388c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2003890: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003894: 7f ff ff be call 200378c <getgr_r> <== NOT EXECUTED
2003898: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200390c <getgrnam>:
}
struct group *getgrnam(
const char *name
)
{
200390c: 9d e3 bf 98 save %sp, -104, %sp
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
2003910: 13 00 80 7b sethi %hi(0x201ec00), %o1
2003914: 90 10 00 18 mov %i0, %o0
2003918: 92 12 62 08 or %o1, 0x208, %o1
200391c: 15 00 80 7b sethi %hi(0x201ec00), %o2
2003920: 96 10 20 c8 mov 0xc8, %o3
2003924: 94 12 a1 40 or %o2, 0x140, %o2
2003928: 98 07 bf fc add %fp, -4, %o4
200392c: 7f ff ff ed call 20038e0 <getgrnam_r>
2003930: b0 10 20 00 clr %i0
2003934: 80 a2 20 00 cmp %o0, 0
2003938: 22 80 00 02 be,a 2003940 <getgrnam+0x34> <== ALWAYS TAKEN
200393c: f0 07 bf fc ld [ %fp + -4 ], %i0
return NULL;
return p;
}
2003940: 81 c7 e0 08 ret
2003944: 81 e8 00 00 restore
02023874 <getpid>:
*/
pid_t getpid( void )
{
return _Objects_Local_node;
}
2023874: 81 c3 e0 08 retl <== NOT EXECUTED
2023878: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1> <== NOT EXECUTED
0200398c <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
200398c: 9d e3 bf a0 save %sp, -96, %sp
FILE *fp;
int match;
init_etc_passwd_group();
2003990: 7f ff ff 33 call 200365c <init_etc_passwd_group>
2003994: 01 00 00 00 nop
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
2003998: 11 00 80 75 sethi %hi(0x201d400), %o0
200399c: 13 00 80 75 sethi %hi(0x201d400), %o1
20039a0: 90 12 20 b0 or %o0, 0xb0, %o0
20039a4: 40 00 37 27 call 2011640 <fopen>
20039a8: 92 12 60 c0 or %o1, 0xc0, %o1
20039ac: a0 92 20 00 orcc %o0, 0, %l0
20039b0: 12 80 00 0b bne 20039dc <getpw_r+0x50> <== ALWAYS TAKEN
20039b4: 92 10 00 1a mov %i2, %o1
20039b8: 30 80 00 27 b,a 2003a54 <getpw_r+0xc8> <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
20039bc: 40 00 3b 1b call 2012628 <strcmp>
20039c0: 92 10 00 18 mov %i0, %o1
20039c4: 80 a0 00 08 cmp %g0, %o0
20039c8: 82 60 3f ff subx %g0, -1, %g1
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
20039cc: 80 a0 60 00 cmp %g1, 0
20039d0: 12 80 00 14 bne 2003a20 <getpw_r+0x94>
20039d4: 90 10 00 10 mov %l0, %o0
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
20039d8: 92 10 00 1a mov %i2, %o1
20039dc: 94 10 00 1b mov %i3, %o2
20039e0: 96 10 00 1c mov %i4, %o3
20039e4: 7f ff fe c4 call 20034f4 <scanpw>
20039e8: 90 10 00 10 mov %l0, %o0
20039ec: 80 a2 20 00 cmp %o0, 0
20039f0: 02 80 00 11 be 2003a34 <getpw_r+0xa8> <== NEVER TAKEN
20039f4: 80 a6 20 00 cmp %i0, 0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
20039f8: 32 bf ff f1 bne,a 20039bc <getpw_r+0x30> <== ALWAYS TAKEN
20039fc: d0 06 80 00 ld [ %i2 ], %o0
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
2003a00: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED
2003a04: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED
2003a08: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
2003a0c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
}
if (match) {
2003a10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003a14: 02 bf ff f2 be 20039dc <getpw_r+0x50> <== NOT EXECUTED
2003a18: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
fclose(fp);
2003a1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003a20: 40 00 35 32 call 2010ee8 <fclose>
2003a24: b0 10 20 00 clr %i0
*result = pwd;
2003a28: f4 27 40 00 st %i2, [ %i5 ]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
2003a2c: 81 c7 e0 08 ret
2003a30: 81 e8 00 00 restore
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
2003a34: 40 00 34 d5 call 2010d88 <__errno> <== NOT EXECUTED
2003a38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003a3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003a40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fclose(fp);
2003a44: 40 00 35 29 call 2010ee8 <fclose> <== NOT EXECUTED
2003a48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return -1;
2003a4c: 81 c7 e0 08 ret <== NOT EXECUTED
2003a50: 81 e8 00 00 restore <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
2003a54: 40 00 34 cd call 2010d88 <__errno> <== NOT EXECUTED
2003a58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003a5c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003a60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
2003a64: 81 c7 e0 08 ret <== NOT EXECUTED
2003a68: 81 e8 00 00 restore <== NOT EXECUTED
02003610 <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
2003610: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (passwd_fp == NULL)
2003614: 03 00 80 7b sethi %hi(0x201ec00), %g1 <== NOT EXECUTED
2003618: d0 00 60 54 ld [ %g1 + 0x54 ], %o0 ! 201ec54 <passwd_fp> <== NOT EXECUTED
200361c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003620: 32 80 00 04 bne,a 2003630 <getpwent+0x20> <== NOT EXECUTED
2003624: 31 00 80 7b sethi %hi(0x201ec00), %i0 <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
return NULL;
return &pwent;
}
2003628: 81 c7 e0 08 ret <== NOT EXECUTED
200362c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
2003630: 15 00 80 7b sethi %hi(0x201ec00), %o2 <== NOT EXECUTED
2003634: 92 16 21 20 or %i0, 0x120, %o1 <== NOT EXECUTED
2003638: 94 12 a0 58 or %o2, 0x58, %o2 <== NOT EXECUTED
200363c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED
2003640: 7f ff ff ad call 20034f4 <scanpw> <== NOT EXECUTED
2003644: b0 16 21 20 or %i0, 0x120, %i0 <== NOT EXECUTED
2003648: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200364c: 02 bf ff f7 be 2003628 <getpwent+0x18> <== NOT EXECUTED
2003650: 01 00 00 00 nop <== NOT EXECUTED
return NULL;
return &pwent;
}
2003654: 81 c7 e0 08 ret <== NOT EXECUTED
2003658: 81 e8 00 00 restore <== NOT EXECUTED
02003b0c <getpwnam>:
}
struct passwd *getpwnam(
const char *name
)
{
2003b0c: 9d e3 bf 98 save %sp, -104, %sp
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
2003b10: 13 00 80 7b sethi %hi(0x201ec00), %o1
2003b14: 90 10 00 18 mov %i0, %o0
2003b18: 92 12 61 20 or %o1, 0x120, %o1
2003b1c: 15 00 80 7b sethi %hi(0x201ec00), %o2
2003b20: 96 10 20 c8 mov 0xc8, %o3
2003b24: 94 12 a0 58 or %o2, 0x58, %o2
2003b28: 98 07 bf fc add %fp, -4, %o4
2003b2c: 7f ff ff ed call 2003ae0 <getpwnam_r>
2003b30: b0 10 20 00 clr %i0
2003b34: 80 a2 20 00 cmp %o0, 0
2003b38: 22 80 00 02 be,a 2003b40 <getpwnam+0x34> <== ALWAYS TAKEN
2003b3c: f0 07 bf fc ld [ %fp + -4 ], %i0
return NULL;
return p;
}
2003b40: 81 c7 e0 08 ret
2003b44: 81 e8 00 00 restore
02003aa0 <getpwuid>:
}
struct passwd *getpwuid(
uid_t uid
)
{
2003aa0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
2003aa4: 13 00 80 7b sethi %hi(0x201ec00), %o1 <== NOT EXECUTED
2003aa8: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED
2003aac: 92 12 61 20 or %o1, 0x120, %o1 <== NOT EXECUTED
2003ab0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED
2003ab4: 15 00 80 7b sethi %hi(0x201ec00), %o2 <== NOT EXECUTED
2003ab8: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED
2003abc: 94 12 a0 58 or %o2, 0x58, %o2 <== NOT EXECUTED
2003ac0: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
2003ac4: 7f ff ff ea call 2003a6c <getpwuid_r> <== NOT EXECUTED
2003ac8: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003acc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003ad0: 22 80 00 02 be,a 2003ad8 <getpwuid+0x38> <== NOT EXECUTED
2003ad4: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return NULL;
return p;
}
2003ad8: 81 c7 e0 08 ret <== NOT EXECUTED
2003adc: 81 e8 00 00 restore <== NOT EXECUTED
02003a6c <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
2003a6c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED
2003a70: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
2003a74: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
2003a78: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
2003a7c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
2003a80: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
2003a84: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED
2003a88: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
2003a8c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2003a90: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003a94: 7f ff ff be call 200398c <getpw_r> <== NOT EXECUTED
2003a98: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200b418 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
200b418: 9d e3 bf 98 save %sp, -104, %sp
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
200b41c: 80 a6 20 00 cmp %i0, 0
200b420: 02 80 00 11 be 200b464 <gettimeofday+0x4c> <== NEVER TAKEN
200b424: 01 00 00 00 nop
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
200b428: 7f ff db a1 call 20022ac <sparc_disable_interrupts>
200b42c: 01 00 00 00 nop
200b430: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
200b434: 40 00 03 7c call 200c224 <_TOD_Get>
200b438: 90 07 bf f8 add %fp, -8, %o0
_ISR_Enable(level);
200b43c: 7f ff db a0 call 20022bc <sparc_enable_interrupts>
200b440: 90 10 00 10 mov %l0, %o0
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
200b444: d0 07 bf fc ld [ %fp + -4 ], %o0
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
200b448: c2 07 bf f8 ld [ %fp + -8 ], %g1
time->tv_usec = useconds;
200b44c: 92 10 23 e8 mov 0x3e8, %o1
200b450: 40 00 32 71 call 2017e14 <.div>
200b454: c2 26 00 00 st %g1, [ %i0 ]
200b458: d0 26 20 04 st %o0, [ %i0 + 4 ]
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
200b45c: 81 c7 e0 08 ret
200b460: 91 e8 20 00 restore %g0, 0, %o0
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
200b464: 40 00 0d 36 call 200e93c <__errno> <== NOT EXECUTED
200b468: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b46c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
200b470: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
200b474: 81 c7 e0 08 ret <== NOT EXECUTED
200b478: 81 e8 00 00 restore <== NOT EXECUTED
02013bac <imfs_dir_open>:
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
2013bac: c4 02 20 3c ld [ %o0 + 0x3c ], %g2
2013bb0: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2
2013bb4: 80 a0 a0 01 cmp %g2, 1
2013bb8: 12 80 00 05 bne 2013bcc <imfs_dir_open+0x20> <== NEVER TAKEN
2013bbc: 82 10 3f ff mov -1, %g1
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
2013bc0: c0 22 20 10 clr [ %o0 + 0x10 ]
2013bc4: c0 22 20 14 clr [ %o0 + 0x14 ]
2013bc8: 82 10 20 00 clr %g1
return 0;
}
2013bcc: 81 c3 e0 08 retl
2013bd0: 90 10 00 01 mov %g1, %o0
02013e2c <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
2013e2c: 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->file_info;
2013e30: e4 06 20 3c ld [ %i0 + 0x3c ], %l2
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
2013e34: a0 10 00 18 mov %i0, %l0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2013e38: e2 04 a0 50 ld [ %l2 + 0x50 ], %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2013e3c: a4 04 a0 54 add %l2, 0x54, %l2
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
2013e40: 80 a4 40 12 cmp %l1, %l2
2013e44: 02 80 00 36 be 2013f1c <imfs_dir_read+0xf0>
2013e48: b0 10 20 00 clr %i0
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
2013e4c: ea 04 20 14 ld [ %l0 + 0x14 ], %l5
/* 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);
2013e50: 90 10 00 1a mov %i2, %o0
2013e54: 40 00 26 7e call 201d84c <.udiv>
2013e58: 92 10 21 18 mov 0x118, %o1
2013e5c: 85 2a 20 05 sll %o0, 5, %g2
2013e60: 83 2a 20 03 sll %o0, 3, %g1
2013e64: 82 00 40 02 add %g1, %g2, %g1
2013e68: a9 28 60 03 sll %g1, 3, %l4
2013e6c: a8 25 00 01 sub %l4, %g1, %l4
2013e70: a8 05 00 15 add %l4, %l5, %l4
/* The directory was not empty so try to move to the desired entry in chain*/
for (
2013e74: 80 a5 20 00 cmp %l4, 0
2013e78: 04 80 00 29 ble 2013f1c <imfs_dir_read+0xf0> <== NEVER TAKEN
2013e7c: a6 10 20 00 clr %l3
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
2013e80: ba 10 21 18 mov 0x118, %i5
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
strcpy( tmp_dirent.d_name, the_jnode->name );
2013e84: ae 07 be e8 add %fp, -280, %l7
2013e88: 10 80 00 08 b 2013ea8 <imfs_dir_read+0x7c>
2013e8c: ac 07 be fc add %fp, -260, %l6
/* 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 (
2013e90: 80 a4 c0 14 cmp %l3, %l4
2013e94: 16 80 00 22 bge 2013f1c <imfs_dir_read+0xf0> <== NEVER TAKEN
2013e98: e2 04 40 00 ld [ %l1 ], %l1
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
2013e9c: 80 a4 40 12 cmp %l1, %l2
2013ea0: 02 80 00 21 be 2013f24 <imfs_dir_read+0xf8>
2013ea4: 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 ) {
2013ea8: 80 a5 40 13 cmp %l5, %l3
2013eac: 34 bf ff f9 bg,a 2013e90 <imfs_dir_read+0x64>
2013eb0: a6 04 e1 18 add %l3, 0x118, %l3
/* 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;
2013eb4: c2 04 60 38 ld [ %l1 + 0x38 ], %g1
tmp_dirent.d_namlen = strlen( the_jnode->name );
2013eb8: b8 04 60 0c add %l1, 0xc, %i4
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
2013ebc: 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;
2013ec0: 83 3c e0 1f sra %l3, 0x1f, %g1
2013ec4: e6 27 be f4 st %l3, [ %fp + -268 ]
2013ec8: c2 27 be f0 st %g1, [ %fp + -272 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
2013ecc: fa 37 be f8 sth %i5, [ %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 );
2013ed0: 40 00 05 26 call 2015368 <strlen>
2013ed4: 90 10 00 1c mov %i4, %o0
strcpy( tmp_dirent.d_name, the_jnode->name );
2013ed8: 92 10 00 1c mov %i4, %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 );
2013edc: d0 37 be fa sth %o0, [ %fp + -262 ]
strcpy( tmp_dirent.d_name, the_jnode->name );
2013ee0: 40 00 04 ea call 2015288 <strcpy>
2013ee4: 90 10 00 16 mov %l6, %o0
memcpy(
2013ee8: 90 06 40 18 add %i1, %i0, %o0
2013eec: 92 10 00 17 mov %l7, %o1
2013ef0: 40 00 03 bb call 2014ddc <memcpy>
2013ef4: 94 10 21 18 mov 0x118, %o2
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
2013ef8: c4 1c 20 10 ldd [ %l0 + 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(
2013efc: a6 04 e1 18 add %l3, 0x118, %l3
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
2013f00: 86 80 e1 18 addcc %g3, 0x118, %g3
2013f04: 84 40 a0 00 addx %g2, 0, %g2
2013f08: c4 3c 20 10 std %g2, [ %l0 + 0x10 ]
bytes_transferred = bytes_transferred + sizeof( struct dirent );
2013f0c: 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 (
2013f10: 80 a4 c0 14 cmp %l3, %l4
2013f14: 06 bf ff e2 bl 2013e9c <imfs_dir_read+0x70> <== NEVER TAKEN
2013f18: e2 04 40 00 ld [ %l1 ], %l1
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
2013f1c: 81 c7 e0 08 ret
2013f20: 81 e8 00 00 restore
2013f24: 81 c7 e0 08 ret
2013f28: 81 e8 00 00 restore
02013d28 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
2013d28: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
2013d2c: e0 06 40 00 ld [ %i1 ], %l0
2013d30: c4 04 20 50 ld [ %l0 + 0x50 ], %g2
2013d34: 82 04 20 54 add %l0, 0x54, %g1
2013d38: 80 a0 80 01 cmp %g2, %g1
2013d3c: 12 80 00 30 bne 2013dfc <imfs_dir_rmnod+0xd4>
2013d40: 01 00 00 00 nop
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
2013d44: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
2013d48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2013d4c: 80 a4 00 01 cmp %l0, %g1
2013d50: 02 80 00 31 be 2013e14 <imfs_dir_rmnod+0xec>
2013d54: 01 00 00 00 nop
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
2013d58: c2 04 20 5c ld [ %l0 + 0x5c ], %g1
2013d5c: 80 a0 60 00 cmp %g1, 0
2013d60: 12 80 00 2d bne 2013e14 <imfs_dir_rmnod+0xec> <== NEVER TAKEN
2013d64: 01 00 00 00 nop
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
2013d68: c2 04 20 08 ld [ %l0 + 8 ], %g1
2013d6c: 80 a0 60 00 cmp %g1, 0
2013d70: 22 80 00 06 be,a 2013d88 <imfs_dir_rmnod+0x60>
2013d74: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1
2013d78: 7f ff d3 0c call 20089a8 <_Chain_Extract>
2013d7c: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
2013d80: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
2013d84: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1
IMFS_update_ctime( the_jnode );
2013d88: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
2013d8c: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
2013d90: 90 07 bf f8 add %fp, -8, %o0
2013d94: 7f ff c0 ab call 2004040 <gettimeofday>
2013d98: c2 34 20 34 sth %g1, [ %l0 + 0x34 ]
2013d9c: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
2013da0: 90 10 00 10 mov %l0, %o0
2013da4: 7f ff f3 89 call 2010bc8 <rtems_libio_is_file_open>
2013da8: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
2013dac: 80 a2 20 00 cmp %o0, 0
2013db0: 12 80 00 11 bne 2013df4 <imfs_dir_rmnod+0xcc>
2013db4: 01 00 00 00 nop
2013db8: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1
2013dbc: 80 a0 60 00 cmp %g1, 0
2013dc0: 12 80 00 0d bne 2013df4 <imfs_dir_rmnod+0xcc>
2013dc4: 03 00 80 83 sethi %hi(0x2020c00), %g1
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
2013dc8: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 2020f58 <rtems_current_user_env>
2013dcc: c4 06 40 00 ld [ %i1 ], %g2
2013dd0: c6 00 60 04 ld [ %g1 + 4 ], %g3
2013dd4: 80 a0 c0 02 cmp %g3, %g2
2013dd8: 22 80 00 02 be,a 2013de0 <imfs_dir_rmnod+0xb8> <== NEVER TAKEN
2013ddc: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
2013de0: 90 10 00 10 mov %l0, %o0
2013de4: 7f ff c0 6c call 2003f94 <free>
2013de8: b0 10 20 00 clr %i0
2013dec: 81 c7 e0 08 ret
2013df0: 81 e8 00 00 restore
}
return 0;
}
2013df4: 81 c7 e0 08 ret
2013df8: 91 e8 20 00 restore %g0, 0, %o0
/*
* 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 );
2013dfc: 40 00 01 bc call 20144ec <__errno>
2013e00: b0 10 3f ff mov -1, %i0
2013e04: 82 10 20 5a mov 0x5a, %g1
2013e08: c2 22 00 00 st %g1, [ %o0 ]
2013e0c: 81 c7 e0 08 ret
2013e10: 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 );
2013e14: 40 00 01 b6 call 20144ec <__errno>
2013e18: b0 10 3f ff mov -1, %i0
2013e1c: 82 10 20 10 mov 0x10, %g1
2013e20: c2 22 00 00 st %g1, [ %o0 ]
2013e24: 81 c7 e0 08 ret
2013e28: 81 e8 00 00 restore
0200365c <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
200365c: 9d e3 bf a0 save %sp, -96, %sp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
2003660: 03 00 80 7b sethi %hi(0x201ec00), %g1
2003664: c4 48 60 50 ldsb [ %g1 + 0x50 ], %g2 ! 201ec50 <etc_passwd_initted.6356>
2003668: 80 a0 a0 00 cmp %g2, 0
200366c: 02 80 00 04 be 200367c <init_etc_passwd_group+0x20>
2003670: 84 10 20 01 mov 1, %g2
2003674: 81 c7 e0 08 ret
2003678: 81 e8 00 00 restore
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
200367c: 92 10 21 ff mov 0x1ff, %o1
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
2003680: c4 28 60 50 stb %g2, [ %g1 + 0x50 ]
mkdir("/etc", 0777);
2003684: 11 00 80 75 sethi %hi(0x201d400), %o0
2003688: 40 00 02 2e call 2003f40 <mkdir>
200368c: 90 12 20 a8 or %o0, 0xa8, %o0 ! 201d4a8 <IMFS_ops+0x90>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
2003690: 31 00 80 75 sethi %hi(0x201d400), %i0
2003694: 21 00 80 75 sethi %hi(0x201d400), %l0
2003698: 90 16 20 b0 or %i0, 0xb0, %o0
200369c: 40 00 37 e9 call 2011640 <fopen>
20036a0: 92 14 20 c0 or %l0, 0xc0, %o1
20036a4: 80 a2 20 00 cmp %o0, 0
20036a8: 22 80 00 0d be,a 20036dc <init_etc_passwd_group+0x80> <== ALWAYS TAKEN
20036ac: 90 16 20 b0 or %i0, 0xb0, %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);
20036b0: 40 00 36 0e call 2010ee8 <fclose>
20036b4: 01 00 00 00 nop
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
20036b8: 92 14 20 c0 or %l0, 0xc0, %o1
20036bc: 21 00 80 75 sethi %hi(0x201d400), %l0
20036c0: 40 00 37 e0 call 2011640 <fopen>
20036c4: 90 14 21 38 or %l0, 0x138, %o0 ! 201d538 <IMFS_ops+0x120>
20036c8: 80 a2 20 00 cmp %o0, 0
20036cc: 22 80 00 11 be,a 2003710 <init_etc_passwd_group+0xb4> <== ALWAYS TAKEN
20036d0: 90 14 21 38 or %l0, 0x138, %o0
fclose(fp);
20036d4: 40 00 36 05 call 2010ee8 <fclose> <== NOT EXECUTED
20036d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
20036dc: 13 00 80 75 sethi %hi(0x201d400), %o1
20036e0: 40 00 37 d8 call 2011640 <fopen>
20036e4: 92 12 60 c8 or %o1, 0xc8, %o1 ! 201d4c8 <IMFS_ops+0xb0>
20036e8: b0 92 20 00 orcc %o0, 0, %i0
20036ec: 02 bf ff f3 be 20036b8 <init_etc_passwd_group+0x5c> <== NEVER TAKEN
20036f0: 92 10 20 01 mov 1, %o1
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
20036f4: 94 10 20 66 mov 0x66, %o2
20036f8: 96 10 00 18 mov %i0, %o3
20036fc: 11 00 80 75 sethi %hi(0x201d400), %o0
2003700: 40 00 39 c2 call 2011e08 <fwrite>
2003704: 90 12 20 d0 or %o0, 0xd0, %o0 ! 201d4d0 <IMFS_ops+0xb8>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
2003708: 10 bf ff ea b 20036b0 <init_etc_passwd_group+0x54>
200370c: 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) {
2003710: 13 00 80 75 sethi %hi(0x201d400), %o1
2003714: 40 00 37 cb call 2011640 <fopen>
2003718: 92 12 60 c8 or %o1, 0xc8, %o1 ! 201d4c8 <IMFS_ops+0xb0>
200371c: b0 92 20 00 orcc %o0, 0, %i0
2003720: 02 bf ff d5 be 2003674 <init_etc_passwd_group+0x18> <== NEVER TAKEN
2003724: 11 00 80 75 sethi %hi(0x201d400), %o0
fprintf( fp, "root:x:0:root\n"
2003728: 92 10 20 01 mov 1, %o1
200372c: 94 10 20 2a mov 0x2a, %o2
2003730: 96 10 00 18 mov %i0, %o3
2003734: 40 00 39 b5 call 2011e08 <fwrite>
2003738: 90 12 21 48 or %o0, 0x148, %o0
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
200373c: 40 00 35 eb call 2010ee8 <fclose>
2003740: 81 e8 00 00 restore
02006998 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
2006998: 9d e3 bf 98 save %sp, -104, %sp
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
200699c: 03 00 80 84 sethi %hi(0x2021000), %g1
20069a0: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 ! 2021234 <rtems_libio_number_iops>
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
20069a4: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
20069a8: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
20069ac: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
20069b0: 80 a6 00 01 cmp %i0, %g1
20069b4: 1a 80 00 18 bcc 2006a14 <ioctl+0x7c>
20069b8: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
iop = rtems_libio_iop( fd );
20069bc: 03 00 80 87 sethi %hi(0x2021c00), %g1
20069c0: d0 00 60 94 ld [ %g1 + 0x94 ], %o0 ! 2021c94 <rtems_libio_iops>
20069c4: 83 2e 20 06 sll %i0, 6, %g1
20069c8: b1 2e 20 03 sll %i0, 3, %i0
20069cc: b0 06 00 01 add %i0, %g1, %i0
20069d0: 90 02 00 18 add %o0, %i0, %o0
rtems_libio_check_is_open(iop);
20069d4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
20069d8: 80 88 61 00 btst 0x100, %g1
20069dc: 02 80 00 0e be 2006a14 <ioctl+0x7c> <== NEVER TAKEN
20069e0: 84 07 a0 50 add %fp, 0x50, %g2
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
20069e4: c2 02 20 40 ld [ %o0 + 0x40 ], %g1
20069e8: 80 a0 60 00 cmp %g1, 0
20069ec: 02 80 00 0a be 2006a14 <ioctl+0x7c> <== NEVER TAKEN
20069f0: c4 27 bf fc st %g2, [ %fp + -4 ]
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
20069f4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
20069f8: 80 a0 60 00 cmp %g1, 0
20069fc: 02 80 00 0c be 2006a2c <ioctl+0x94> <== NEVER TAKEN
2006a00: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
2006a04: 9f c0 40 00 call %g1
2006a08: 94 10 00 1a mov %i2, %o2
return rc;
}
2006a0c: 81 c7 e0 08 ret
2006a10: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
2006a14: 40 00 37 c4 call 2014924 <__errno>
2006a18: b0 10 3f ff mov -1, %i0
2006a1c: 82 10 20 09 mov 9, %g1
2006a20: c2 22 00 00 st %g1, [ %o0 ]
2006a24: 81 c7 e0 08 ret
2006a28: 81 e8 00 00 restore
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2006a2c: 40 00 37 be call 2014924 <__errno> <== NOT EXECUTED
2006a30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2006a34: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2006a38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2006a3c: 81 c7 e0 08 ret <== NOT EXECUTED
2006a40: 81 e8 00 00 restore <== NOT EXECUTED
02004154 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2004154: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
2004158: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED
200415c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2004160: 02 80 00 03 be 200416c <iproc+0x18> <== NOT EXECUTED
2004164: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
c &= 0x7f;
2004168: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
200416c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2004170: 02 80 00 0c be 20041a0 <iproc+0x4c> <== NOT EXECUTED
2004174: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED
c = tolower (c);
2004178: 05 00 80 6b sethi %hi(0x201ac00), %g2 <== NOT EXECUTED
200417c: c4 00 a0 dc ld [ %g2 + 0xdc ], %g2 ! 201acdc <__ctype_ptr__><== NOT EXECUTED
2004180: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED
2004184: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED
2004188: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED
200418c: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED
2004190: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED
2004194: 22 80 00 02 be,a 200419c <iproc+0x48> <== NOT EXECUTED
2004198: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED
if (c == '\r') {
200419c: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED
20041a0: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED
20041a4: 02 80 00 16 be 20041fc <iproc+0xa8> <== NOT EXECUTED
20041a8: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
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)) {
20041ac: 02 80 00 41 be 20042b0 <iproc+0x15c> <== NOT EXECUTED
20041b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
20041b4: 32 80 00 1a bne,a 200421c <iproc+0xc8> <== NOT EXECUTED
20041b8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
20041bc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
20041c0: 05 00 80 6b sethi %hi(0x201ac00), %g2 <== NOT EXECUTED
20041c4: c4 00 a0 70 ld [ %g2 + 0x70 ], %g2 ! 201ac70 <rtems_termios_cbufsize><== NOT EXECUTED
20041c8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
20041cc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20041d0: 16 80 00 09 bge 20041f4 <iproc+0xa0> <== NOT EXECUTED
20041d4: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
20041d8: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED
20041dc: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
20041e0: 12 80 00 39 bne 20042c4 <iproc+0x170> <== NOT EXECUTED
20041e4: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
20041e8: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
20041ec: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED
20041f0: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
20041f4: 81 c7 e0 08 ret <== NOT EXECUTED
20041f8: 81 e8 00 00 restore <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
20041fc: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED
2004200: 02 80 00 04 be 2004210 <iproc+0xbc> <== NOT EXECUTED
2004204: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
2004208: 81 c7 e0 08 ret <== NOT EXECUTED
200420c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
2004210: 32 80 00 02 bne,a 2004218 <iproc+0xc4> <== NOT EXECUTED
2004214: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2004218: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
200421c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2004220: 22 bf ff e8 be,a 20041c0 <iproc+0x6c> <== NOT EXECUTED
2004224: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
2004228: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 <== NOT EXECUTED
200422c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2004230: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2004234: 22 80 00 43 be,a 2004340 <iproc+0x1ec> <== NOT EXECUTED
2004238: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
200423c: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 <== NOT EXECUTED
2004240: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2004244: 22 80 00 2e be,a 20042fc <iproc+0x1a8> <== NOT EXECUTED
2004248: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
200424c: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 <== NOT EXECUTED
2004250: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2004254: 02 bf ff e8 be 20041f4 <iproc+0xa0> <== NOT EXECUTED
2004258: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
200425c: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED
2004260: 02 80 00 2c be 2004310 <iproc+0x1bc> <== NOT EXECUTED
2004264: 80 88 60 48 btst 0x48, %g1 <== NOT EXECUTED
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])
2004268: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 <== NOT EXECUTED
200426c: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2004270: 02 80 00 07 be 200428c <iproc+0x138> <== NOT EXECUTED
2004274: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
2004278: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 <== NOT EXECUTED
200427c: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2004280: 32 bf ff d0 bne,a 20041c0 <iproc+0x6c> <== NOT EXECUTED
2004284: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
2004288: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
200428c: 12 80 00 18 bne 20042ec <iproc+0x198> <== NOT EXECUTED
2004290: 01 00 00 00 nop <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2004294: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2004298: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
200429c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
20042a0: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED
20042a4: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
return 1;
20042a8: 81 c7 e0 08 ret <== NOT EXECUTED
20042ac: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
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)) {
20042b0: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED
20042b4: 32 bf ff d9 bne,a 2004218 <iproc+0xc4> <== NOT EXECUTED
20042b8: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
20042bc: 10 bf ff d8 b 200421c <iproc+0xc8> <== NOT EXECUTED
20042c0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
20042c4: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
20042c8: 7f ff fe f6 call 2003ea0 <echo> <== NOT EXECUTED
20042cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20042d0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
20042d4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
20042d8: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
20042dc: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED
20042e0: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
20042e4: 81 c7 e0 08 ret <== NOT EXECUTED
20042e8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
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);
20042ec: 7f ff fe ed call 2003ea0 <echo> <== NOT EXECUTED
20042f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
20042f4: 10 bf ff e9 b 2004298 <iproc+0x144> <== NOT EXECUTED
20042f8: 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);
20042fc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2004300: 7f ff ff 08 call 2003f20 <erase> <== NOT EXECUTED
2004304: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
2004308: 81 c7 e0 08 ret <== NOT EXECUTED
200430c: 81 e8 00 00 restore <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
2004310: 22 80 00 05 be,a 2004324 <iproc+0x1d0> <== NOT EXECUTED
2004314: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2004318: 7f ff fe e2 call 2003ea0 <echo> <== NOT EXECUTED
200431c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2004320: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2004324: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
2004328: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED
200432c: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED
2004330: 82 00 60 01 inc %g1 <== NOT EXECUTED
2004334: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED
return 1;
2004338: 81 c7 e0 08 ret <== NOT EXECUTED
200433c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
2004340: 92 10 20 00 clr %o1 <== NOT EXECUTED
2004344: 7f ff fe f7 call 2003f20 <erase> <== NOT EXECUTED
2004348: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
200434c: 81 c7 e0 08 ret <== NOT EXECUTED
2004350: 81 e8 00 00 restore <== NOT EXECUTED
02023898 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
2023898: 81 c3 e0 08 retl <== NOT EXECUTED
202389c: 90 10 20 00 clr %o0 ! 0 <PROM_START> <== NOT EXECUTED
02018ef8 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
2018ef8: 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()))
2018efc: 03 00 80 6d sethi %hi(0x201b400), %g1
2018f00: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b7b0 <_System_state_Current>
2018f04: 80 a0 60 03 cmp %g1, 3
2018f08: 02 80 00 04 be 2018f18 <libc_wrapup+0x20> <== ALWAYS TAKEN
2018f0c: 03 00 80 69 sethi %hi(0x201a400), %g1
2018f10: 81 c7 e0 08 ret <== NOT EXECUTED
2018f14: 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) {
2018f18: 21 00 80 6b sethi %hi(0x201ac00), %l0
2018f1c: e2 00 61 e0 ld [ %g1 + 0x1e0 ], %l1
2018f20: c2 04 20 e0 ld [ %l0 + 0xe0 ], %g1
2018f24: 80 a0 40 11 cmp %g1, %l1
2018f28: 02 80 00 05 be 2018f3c <libc_wrapup+0x44>
2018f2c: 01 00 00 00 nop
_wrapup_reent(_global_impure_ptr);
2018f30: 40 00 01 80 call 2019530 <_wrapup_reent>
2018f34: 90 10 00 11 mov %l1, %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;
2018f38: e2 24 20 e0 st %l1, [ %l0 + 0xe0 ]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
2018f3c: 7f ff d6 d8 call 200ea9c <fclose>
2018f40: d0 04 60 04 ld [ %l1 + 4 ], %o0
fclose (stdout);
2018f44: c2 04 20 e0 ld [ %l0 + 0xe0 ], %g1
2018f48: 7f ff d6 d5 call 200ea9c <fclose>
2018f4c: d0 00 60 08 ld [ %g1 + 8 ], %o0
fclose (stderr);
2018f50: c2 04 20 e0 ld [ %l0 + 0xe0 ], %g1
2018f54: f0 00 60 0c ld [ %g1 + 0xc ], %i0
2018f58: 7f ff d6 d1 call 200ea9c <fclose>
2018f5c: 81 e8 00 00 restore
02004410 <link>:
int link(
const char *existing,
const char *new
)
{
2004410: 9d e3 bf 70 save %sp, -144, %sp
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
2004414: 40 00 39 fd call 2012c08 <strlen>
2004418: 90 10 00 18 mov %i0, %o0
200441c: a0 07 bf e8 add %fp, -24, %l0
2004420: 92 10 00 08 mov %o0, %o1
2004424: 94 10 20 00 clr %o2
2004428: 90 10 00 18 mov %i0, %o0
200442c: 96 10 00 10 mov %l0, %o3
2004430: 98 10 20 01 mov 1, %o4
2004434: 7f ff fe 79 call 2003e18 <rtems_filesystem_evaluate_path>
2004438: b0 10 3f ff mov -1, %i0
0, &existing_loc, true );
if ( result != 0 )
200443c: 80 a2 20 00 cmp %o0, 0
2004440: 12 80 00 89 bne 2004664 <link+0x254>
2004444: 01 00 00 00 nop
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2004448: c2 4e 40 00 ldsb [ %i1 ], %g1
200444c: 80 a0 60 5c cmp %g1, 0x5c
2004450: 12 80 00 3c bne 2004540 <link+0x130> <== ALWAYS TAKEN
2004454: 80 a0 60 2f cmp %g1, 0x2f
2004458: 03 00 80 80 sethi %hi(0x2020000), %g1 <== NOT EXECUTED
200445c: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 20203bc <rtems_current_user_env>
2004460: 90 10 20 01 mov 1, %o0
2004464: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2004468: c4 27 bf d4 st %g2, [ %fp + -44 ]
200446c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2004470: c4 27 bf d8 st %g2, [ %fp + -40 ]
2004474: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
2004478: c4 27 bf dc st %g2, [ %fp + -36 ]
200447c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
2004480: c4 27 bf e0 st %g2, [ %fp + -32 ]
2004484: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2004488: c2 27 bf e4 st %g1, [ %fp + -28 ]
if ( !parent_loc.ops->evalformake_h ) {
200448c: c2 07 bf e0 ld [ %fp + -32 ], %g1
2004490: c2 00 60 04 ld [ %g1 + 4 ], %g1
2004494: 80 a0 60 00 cmp %g1, 0
2004498: 02 80 00 65 be 200462c <link+0x21c> <== NEVER TAKEN
200449c: 90 06 40 08 add %i1, %o0, %o0
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
20044a0: 94 07 bf fc add %fp, -4, %o2
20044a4: b2 07 bf d4 add %fp, -44, %i1
20044a8: 9f c0 40 00 call %g1
20044ac: 92 10 00 19 mov %i1, %o1
if ( result != 0 ) {
20044b0: a2 92 20 00 orcc %o0, 0, %l1
20044b4: 12 80 00 4f bne 20045f0 <link+0x1e0>
20044b8: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
20044bc: c4 07 bf e4 ld [ %fp + -28 ], %g2
20044c0: 80 a0 80 01 cmp %g2, %g1
20044c4: 12 80 00 31 bne 2004588 <link+0x178>
20044c8: c4 07 bf e0 ld [ %fp + -32 ], %g2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
20044cc: c2 00 a0 08 ld [ %g2 + 8 ], %g1
20044d0: 80 a0 60 00 cmp %g1, 0
20044d4: 02 80 00 66 be 200466c <link+0x25c> <== NEVER TAKEN
20044d8: d4 07 bf fc ld [ %fp + -4 ], %o2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
20044dc: 90 10 00 10 mov %l0, %o0
20044e0: 9f c0 40 00 call %g1
20044e4: 92 10 00 19 mov %i1, %o1
rtems_filesystem_freenode( &existing_loc );
20044e8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20044ec: 80 a0 60 00 cmp %g1, 0
20044f0: 02 80 00 08 be 2004510 <link+0x100> <== NEVER TAKEN
20044f4: b0 10 00 08 mov %o0, %i0
20044f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20044fc: 80 a0 60 00 cmp %g1, 0
2004500: 22 80 00 05 be,a 2004514 <link+0x104> <== NEVER TAKEN
2004504: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
2004508: 9f c0 40 00 call %g1
200450c: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &parent_loc );
2004510: c2 07 bf e0 ld [ %fp + -32 ], %g1
2004514: 80 a0 60 00 cmp %g1, 0
2004518: 02 80 00 53 be 2004664 <link+0x254> <== NEVER TAKEN
200451c: 01 00 00 00 nop
2004520: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004524: 80 a0 60 00 cmp %g1, 0
2004528: 02 80 00 4f be 2004664 <link+0x254> <== NEVER TAKEN
200452c: 01 00 00 00 nop
2004530: 9f c0 40 00 call %g1
2004534: 90 10 00 19 mov %i1, %o0
return result;
}
2004538: 81 c7 e0 08 ret
200453c: 81 e8 00 00 restore
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2004540: 22 bf ff c7 be,a 200445c <link+0x4c>
2004544: 03 00 80 80 sethi %hi(0x2020000), %g1
2004548: 80 a0 60 00 cmp %g1, 0
200454c: 02 bf ff c4 be 200445c <link+0x4c> <== NEVER TAKEN
2004550: 03 00 80 80 sethi %hi(0x2020000), %g1
2004554: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 20203bc <rtems_current_user_env>
2004558: 90 10 20 00 clr %o0
200455c: c4 00 60 04 ld [ %g1 + 4 ], %g2
2004560: c4 27 bf d4 st %g2, [ %fp + -44 ]
2004564: c4 00 60 08 ld [ %g1 + 8 ], %g2
2004568: c4 27 bf d8 st %g2, [ %fp + -40 ]
200456c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2004570: c4 27 bf dc st %g2, [ %fp + -36 ]
2004574: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2004578: c4 27 bf e0 st %g2, [ %fp + -32 ]
200457c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2004580: 10 bf ff c3 b 200448c <link+0x7c>
2004584: c2 27 bf e4 st %g1, [ %fp + -28 ]
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
2004588: c2 07 bf f4 ld [ %fp + -12 ], %g1
200458c: 80 a0 60 00 cmp %g1, 0
2004590: 22 80 00 09 be,a 20045b4 <link+0x1a4> <== NEVER TAKEN
2004594: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
2004598: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200459c: 80 a0 60 00 cmp %g1, 0
20045a0: 22 80 00 05 be,a 20045b4 <link+0x1a4> <== NEVER TAKEN
20045a4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
20045a8: 9f c0 40 00 call %g1
20045ac: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &parent_loc );
20045b0: c2 07 bf e0 ld [ %fp + -32 ], %g1
20045b4: 80 a0 60 00 cmp %g1, 0
20045b8: 02 80 00 08 be 20045d8 <link+0x1c8> <== NEVER TAKEN
20045bc: 01 00 00 00 nop
20045c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20045c4: 80 a0 60 00 cmp %g1, 0
20045c8: 02 80 00 04 be 20045d8 <link+0x1c8> <== NEVER TAKEN
20045cc: 01 00 00 00 nop
20045d0: 9f c0 40 00 call %g1
20045d4: 90 10 00 19 mov %i1, %o0
rtems_set_errno_and_return_minus_one( EXDEV );
20045d8: 40 00 34 2d call 201168c <__errno>
20045dc: b0 10 3f ff mov -1, %i0
20045e0: 82 10 20 12 mov 0x12, %g1
20045e4: c2 22 00 00 st %g1, [ %o0 ]
20045e8: 81 c7 e0 08 ret
20045ec: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
20045f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20045f4: 80 a0 60 00 cmp %g1, 0
20045f8: 02 80 00 08 be 2004618 <link+0x208> <== NEVER TAKEN
20045fc: 01 00 00 00 nop
2004600: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004604: 80 a0 60 00 cmp %g1, 0
2004608: 02 80 00 04 be 2004618 <link+0x208> <== NEVER TAKEN
200460c: 01 00 00 00 nop
2004610: 9f c0 40 00 call %g1
2004614: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( result );
2004618: 40 00 34 1d call 201168c <__errno>
200461c: b0 10 3f ff mov -1, %i0
2004620: e2 22 00 00 st %l1, [ %o0 ]
2004624: 81 c7 e0 08 ret
2004628: 81 e8 00 00 restore
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
200462c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2004630: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004634: 02 80 00 08 be 2004654 <link+0x244> <== NOT EXECUTED
2004638: 01 00 00 00 nop <== NOT EXECUTED
200463c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004640: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004644: 02 80 00 04 be 2004654 <link+0x244> <== NOT EXECUTED
2004648: 01 00 00 00 nop <== NOT EXECUTED
200464c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004650: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004654: 40 00 34 0e call 201168c <__errno> <== NOT EXECUTED
2004658: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200465c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004664: 81 c7 e0 08 ret
2004668: 81 e8 00 00 restore
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
200466c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2004670: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004674: 02 80 00 0a be 200469c <link+0x28c> <== NOT EXECUTED
2004678: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200467c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004680: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004684: 02 80 00 06 be 200469c <link+0x28c> <== NOT EXECUTED
2004688: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200468c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004690: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004694: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
2004698: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200469c: 02 bf ff ee be 2004654 <link+0x244> <== NOT EXECUTED
20046a0: 01 00 00 00 nop <== NOT EXECUTED
20046a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
20046a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20046ac: 02 bf ff ea be 2004654 <link+0x244> <== NOT EXECUTED
20046b0: 01 00 00 00 nop <== NOT EXECUTED
20046b4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20046b8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20046bc: 30 bf ff e6 b,a 2004654 <link+0x244> <== NOT EXECUTED
02018d54 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
2018d54: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
2018d58: 03 00 80 6a sethi %hi(0x201a800), %g1
2018d5c: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
off_t lseek(
int fd,
off_t offset,
int whence
)
{
2018d60: 84 10 00 19 mov %i1, %g2
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
2018d64: 80 a6 00 01 cmp %i0, %g1
2018d68: 1a 80 00 46 bcc 2018e80 <lseek+0x12c> <== NEVER TAKEN
2018d6c: 86 10 00 1a mov %i2, %g3
iop = rtems_libio_iop( fd );
2018d70: 03 00 80 6d sethi %hi(0x201b400), %g1
2018d74: e0 00 60 44 ld [ %g1 + 0x44 ], %l0 ! 201b444 <rtems_libio_iops>
2018d78: 83 2e 20 06 sll %i0, 6, %g1
2018d7c: b1 2e 20 03 sll %i0, 3, %i0
2018d80: b0 06 00 01 add %i0, %g1, %i0
2018d84: a0 04 00 18 add %l0, %i0, %l0
rtems_libio_check_is_open(iop);
2018d88: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2018d8c: 80 88 61 00 btst 0x100, %g1
2018d90: 02 80 00 3c be 2018e80 <lseek+0x12c> <== NEVER TAKEN
2018d94: 01 00 00 00 nop
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
2018d98: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2018d9c: c8 00 60 14 ld [ %g1 + 0x14 ], %g4
2018da0: 80 a1 20 00 cmp %g4, 0
2018da4: 02 80 00 3f be 2018ea0 <lseek+0x14c> <== NEVER TAKEN
2018da8: 80 a6 e0 01 cmp %i3, 1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
2018dac: 02 80 00 31 be 2018e70 <lseek+0x11c>
2018db0: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2
2018db4: 80 a6 e0 02 cmp %i3, 2
2018db8: 02 80 00 11 be 2018dfc <lseek+0xa8>
2018dbc: 80 a6 e0 00 cmp %i3, 0
2018dc0: 12 80 00 22 bne 2018e48 <lseek+0xf4>
2018dc4: 01 00 00 00 nop
case SEEK_SET:
iop->offset = offset;
2018dc8: c4 3c 20 10 std %g2, [ %l0 + 0x10 ]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
2018dcc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2018dd0: 92 10 00 02 mov %g2, %o1
2018dd4: 94 10 00 03 mov %g3, %o2
2018dd8: 96 10 00 1b mov %i3, %o3
2018ddc: 9f c0 40 00 call %g1
2018de0: 90 10 00 10 mov %l0, %o0
if ( status == (off_t) -1 )
2018de4: 80 a2 3f ff cmp %o0, -1
2018de8: 02 80 00 13 be 2018e34 <lseek+0xe0> <== NEVER TAKEN
2018dec: 80 a2 7f ff cmp %o1, -1
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
2018df0: b2 10 00 09 mov %o1, %i1
2018df4: 81 c7 e0 08 ret
2018df8: 91 e8 00 08 restore %g0, %o0, %o0
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
2018dfc: d8 1c 20 08 ldd [ %l0 + 8 ], %o4
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
2018e00: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
2018e04: 9a 86 80 0d addcc %i2, %o5, %o5
2018e08: 98 46 40 0c addx %i1, %o4, %o4
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
2018e0c: 92 10 00 02 mov %g2, %o1
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
2018e10: d8 3c 20 10 std %o4, [ %l0 + 0x10 ]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
2018e14: 94 10 00 03 mov %g3, %o2
2018e18: 96 10 00 1b mov %i3, %o3
2018e1c: 9f c0 40 00 call %g1
2018e20: 90 10 00 10 mov %l0, %o0
if ( status == (off_t) -1 )
2018e24: 80 a2 3f ff cmp %o0, -1
2018e28: 12 bf ff f3 bne 2018df4 <lseek+0xa0>
2018e2c: b2 10 00 09 mov %o1, %i1
2018e30: 80 a2 7f ff cmp %o1, -1
2018e34: 12 bf ff f0 bne 2018df4 <lseek+0xa0> <== NEVER TAKEN
2018e38: b2 10 00 09 mov %o1, %i1
iop->offset = old_offset;
2018e3c: e4 3c 20 10 std %l2, [ %l0 + 0x10 ]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
2018e40: 81 c7 e0 08 ret
2018e44: 91 e8 00 08 restore %g0, %o0, %o0
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2018e48: 7f ff d6 bd call 200e93c <__errno>
2018e4c: 01 00 00 00 nop
2018e50: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2018e54: c2 22 00 00 st %g1, [ %o0 ]
2018e58: 11 3f ff ff sethi %hi(0xfffffc00), %o0
2018e5c: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <RAM_END+0xfdbfffff>
2018e60: 92 10 00 08 mov %o0, %o1
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
2018e64: b0 10 00 08 mov %o0, %i0
2018e68: 81 c7 e0 08 ret
2018e6c: 93 e8 00 09 restore %g0, %o1, %o1
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
2018e70: 9a 86 80 13 addcc %i2, %l3, %o5
2018e74: 98 46 40 12 addx %i1, %l2, %o4
break;
2018e78: 10 bf ff d5 b 2018dcc <lseek+0x78>
2018e7c: d8 3c 20 10 std %o4, [ %l0 + 0x10 ]
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
2018e80: 7f ff d6 af call 200e93c <__errno> <== NOT EXECUTED
2018e84: 01 00 00 00 nop <== NOT EXECUTED
2018e88: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
2018e8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2018e90: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED
2018e94: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <RAM_END+0xfdbfffff><== NOT EXECUTED
2018e98: 10 bf ff d6 b 2018df0 <lseek+0x9c> <== NOT EXECUTED
2018e9c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2018ea0: 7f ff d6 a7 call 200e93c <__errno> <== NOT EXECUTED
2018ea4: 01 00 00 00 nop <== NOT EXECUTED
2018ea8: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2018eac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2018eb0: 11 3f ff ff sethi %hi(0xfffffc00), %o0 <== NOT EXECUTED
2018eb4: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff <RAM_END+0xfdbfffff><== NOT EXECUTED
2018eb8: 10 bf ff ce b 2018df0 <lseek+0x9c> <== NOT EXECUTED
2018ebc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
0200b830 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
200b830: 9d e3 bf a0 save %sp, -96, %sp
200b834: 03 00 80 6d sethi %hi(0x201b400), %g1
200b838: 82 10 60 50 or %g1, 0x50, %g1 ! 201b450 <rtems_malloc_statistics>
200b83c: c4 00 60 04 ld [ %g1 + 4 ], %g2
200b840: a0 10 00 18 mov %i0, %l0
200b844: 84 00 a0 01 inc %g2
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
200b848: 7f ff ff ed call 200b7fc <malloc_deferred_frees_process>
200b84c: c4 20 60 04 st %g2, [ %g1 + 4 ]
/*
* Validate the parameters
*/
if ( !size )
200b850: 80 a6 20 00 cmp %i0, 0
200b854: 02 80 00 25 be 200b8e8 <malloc+0xb8> <== NEVER TAKEN
200b858: 03 00 80 6d sethi %hi(0x201b400), %g1
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200b85c: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b7b0 <_System_state_Current>
200b860: 80 a0 60 03 cmp %g1, 3
200b864: 02 80 00 1c be 200b8d4 <malloc+0xa4>
200b868: 03 00 80 6a sethi %hi(0x201a800), %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 );
200b86c: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 201aad0 <RTEMS_Malloc_Heap>
200b870: 92 10 00 10 mov %l0, %o1
200b874: 94 10 20 00 clr %o2
200b878: 40 00 03 a3 call 200c704 <_Protected_heap_Allocate_aligned_with_boundary>
200b87c: 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 ) {
200b880: b0 92 20 00 orcc %o0, 0, %i0
200b884: 02 80 00 1b be 200b8f0 <malloc+0xc0>
200b888: a2 10 00 18 mov %i0, %l1
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
200b88c: 03 00 80 6c sethi %hi(0x201b000), %g1
200b890: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 201b1b0 <rtems_malloc_dirty_helper>
200b894: 80 a0 60 00 cmp %g1, 0
200b898: 02 80 00 05 be 200b8ac <malloc+0x7c> <== ALWAYS TAKEN
200b89c: 92 10 00 10 mov %l0, %o1
(*rtems_malloc_dirty_helper)( return_this, size );
200b8a0: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
200b8a4: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b8a8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200b8ac: 03 00 80 6c sethi %hi(0x201b000), %g1
200b8b0: c2 00 61 a8 ld [ %g1 + 0x1a8 ], %g1 ! 201b1a8 <rtems_malloc_statistics_helpers>
200b8b4: 80 a0 60 00 cmp %g1, 0
200b8b8: 02 80 00 05 be 200b8cc <malloc+0x9c> <== ALWAYS TAKEN
200b8bc: b0 10 00 11 mov %l1, %i0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
200b8c0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
200b8c4: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b8c8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200b8cc: 81 c7 e0 08 ret
200b8d0: 81 e8 00 00 restore
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200b8d4: 7f ff ff b1 call 200b798 <malloc_is_system_state_OK>
200b8d8: 01 00 00 00 nop
200b8dc: 80 8a 20 ff btst 0xff, %o0
200b8e0: 12 bf ff e3 bne 200b86c <malloc+0x3c> <== ALWAYS TAKEN
200b8e4: 03 00 80 6a sethi %hi(0x201a800), %g1
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
200b8e8: 81 c7 e0 08 ret <== NOT EXECUTED
200b8ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
200b8f0: 03 00 80 6c sethi %hi(0x201b000), %g1
200b8f4: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 201b1ac <rtems_malloc_sbrk_helpers>
200b8f8: 80 a0 60 00 cmp %g1, 0
200b8fc: 02 80 00 08 be 200b91c <malloc+0xec> <== ALWAYS TAKEN
200b900: 01 00 00 00 nop
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
200b904: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
200b908: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b90c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( !return_this ) {
200b910: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED
200b914: 12 bf ff df bne 200b890 <malloc+0x60> <== NOT EXECUTED
200b918: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
errno = ENOMEM;
200b91c: 40 00 0c 08 call 200e93c <__errno>
200b920: 01 00 00 00 nop
200b924: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
200b928: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
200b92c: 81 c7 e0 08 ret
200b930: 81 e8 00 00 restore
0200b7e0 <malloc_deferred_free>:
200b7e0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200b7e4: 11 00 80 6e sethi %hi(0x201b800), %o0 <== NOT EXECUTED
200b7e8: 90 12 20 8c or %o0, 0x8c, %o0 ! 201b88c <RTEMS_Malloc_GC_list><== NOT EXECUTED
200b7ec: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200b7f0: 7f ff ec 86 call 2006a08 <_Chain_Append> <== NOT EXECUTED
200b7f4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200b7fc <malloc_deferred_frees_process>:
void malloc_deferred_frees_process(void)
{
200b7fc: 9d e3 bf a0 save %sp, -96, %sp
200b800: 21 00 80 6e sethi %hi(0x201b800), %l0
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
200b804: 10 80 00 04 b 200b814 <malloc_deferred_frees_process+0x18>
200b808: a0 14 20 8c or %l0, 0x8c, %l0 ! 201b88c <RTEMS_Malloc_GC_list>
free(to_be_freed);
200b80c: 7f ff fe 91 call 200b250 <free> <== NOT EXECUTED
200b810: 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 );
200b814: 40 00 02 04 call 200c024 <_Chain_Get>
200b818: 90 10 00 10 mov %l0, %o0
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
200b81c: 80 a2 20 00 cmp %o0, 0
200b820: 12 bf ff fb bne 200b80c <malloc_deferred_frees_process+0x10><== NEVER TAKEN
200b824: 01 00 00 00 nop
free(to_be_freed);
}
200b828: 81 c7 e0 08 ret
200b82c: 81 e8 00 00 restore
0200b798 <malloc_is_system_state_OK>:
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
200b798: 03 00 80 6d sethi %hi(0x201b400), %g1
200b79c: c2 00 62 10 ld [ %g1 + 0x210 ], %g1 ! 201b610 <_Thread_Dispatch_disable_level>
200b7a0: 80 a0 60 00 cmp %g1, 0
200b7a4: 12 80 00 06 bne 200b7bc <malloc_is_system_state_OK+0x24> <== NEVER TAKEN
200b7a8: 90 10 20 00 clr %o0
return false;
if ( _ISR_Nest_level > 0 )
200b7ac: 03 00 80 6d sethi %hi(0x201b400), %g1
200b7b0: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 201b6ac <_ISR_Nest_level>
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
200b7b4: 80 a0 00 01 cmp %g0, %g1
200b7b8: 90 60 3f ff subx %g0, -1, %o0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
200b7bc: 81 c3 e0 08 retl
0201277c <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
201277c: 9d e3 bf a0 save %sp, -96, %sp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
2012780: 03 00 80 85 sethi %hi(0x2021400), %g1
2012784: d2 00 60 d8 ld [ %g1 + 0xd8 ], %o1 ! 20214d8 <imfs_memfile_bytes_per_block>
2012788: 7f ff c5 33 call 2003c54 <calloc>
201278c: 90 10 20 01 mov 1, %o0
if ( memory )
2012790: 80 a2 20 00 cmp %o0, 0
2012794: 02 80 00 05 be 20127a8 <memfile_alloc_block+0x2c> <== NEVER TAKEN
2012798: 03 00 80 85 sethi %hi(0x2021400), %g1
memfile_blocks_allocated++;
201279c: c4 00 62 7c ld [ %g1 + 0x27c ], %g2 ! 202167c <memfile_blocks_allocated>
20127a0: 84 00 a0 01 inc %g2
20127a4: c4 20 62 7c st %g2, [ %g1 + 0x27c ]
return memory;
}
20127a8: 81 c7 e0 08 ret
20127ac: 91 e8 00 08 restore %g0, %o0, %o0
02012d18 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
2012d18: 9d e3 bf a0 save %sp, -96, %sp
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
2012d1c: 7f ff f7 ab call 2010bc8 <rtems_libio_is_file_open>
2012d20: 90 10 00 18 mov %i0, %o0
2012d24: 80 a2 20 00 cmp %o0, 0
2012d28: 12 80 00 13 bne 2012d74 <memfile_check_rmnod+0x5c>
2012d2c: 01 00 00 00 nop
2012d30: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1
2012d34: 80 a0 60 00 cmp %g1, 0
2012d38: 12 80 00 0f bne 2012d74 <memfile_check_rmnod+0x5c> <== NEVER TAKEN
2012d3c: 03 00 80 83 sethi %hi(0x2020c00), %g1
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
2012d40: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 2020f58 <rtems_current_user_env>
2012d44: c4 00 60 04 ld [ %g1 + 4 ], %g2
2012d48: 80 a0 80 18 cmp %g2, %i0
2012d4c: 22 80 00 02 be,a 2012d54 <memfile_check_rmnod+0x3c> <== NEVER TAKEN
2012d50: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
2012d54: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
2012d58: 80 a0 60 06 cmp %g1, 6
2012d5c: 02 80 00 04 be 2012d6c <memfile_check_rmnod+0x54> <== NEVER TAKEN
2012d60: 01 00 00 00 nop
IMFS_memfile_remove( the_jnode );
2012d64: 7f ff ff 7a call 2012b4c <IMFS_memfile_remove>
2012d68: 90 10 00 18 mov %i0, %o0
free( the_jnode );
2012d6c: 7f ff c4 8a call 2003f94 <free>
2012d70: 90 10 00 18 mov %i0, %o0
}
return 0;
}
2012d74: 81 c7 e0 08 ret
2012d78: 91 e8 20 00 restore %g0, 0, %o0
02012a6c <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
2012a6c: 9d e3 bf a0 save %sp, -96, %sp
/*
* Perform internal consistency checks
*/
assert( block_table );
2012a70: 80 a6 20 00 cmp %i0, 0
2012a74: 02 80 00 16 be 2012acc <memfile_free_blocks_in_table+0x60><== NEVER TAKEN
2012a78: 80 a6 60 00 cmp %i1, 0
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
2012a7c: 04 80 00 0f ble 2012ab8 <memfile_free_blocks_in_table+0x4c><== NEVER TAKEN
2012a80: d0 06 00 00 ld [ %i0 ], %o0
2012a84: a0 10 00 08 mov %o0, %l0
2012a88: a2 10 20 00 clr %l1
if ( b[i] ) {
2012a8c: d0 04 00 00 ld [ %l0 ], %o0
2012a90: 80 a2 20 00 cmp %o0, 0
2012a94: 02 80 00 05 be 2012aa8 <memfile_free_blocks_in_table+0x3c>
2012a98: a2 04 60 01 inc %l1
memfile_free_block( b[i] );
2012a9c: 7f ff ff 2f call 2012758 <memfile_free_block>
2012aa0: 01 00 00 00 nop
b[i] = 0;
2012aa4: c0 24 00 00 clr [ %l0 ]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
2012aa8: 80 a6 40 11 cmp %i1, %l1
2012aac: 14 bf ff f8 bg 2012a8c <memfile_free_blocks_in_table+0x20>
2012ab0: a0 04 20 04 add %l0, 4, %l0
2012ab4: 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 );
2012ab8: 7f ff ff 28 call 2012758 <memfile_free_block>
2012abc: 01 00 00 00 nop
*block_table = 0;
2012ac0: c0 26 00 00 clr [ %i0 ]
}
2012ac4: 81 c7 e0 08 ret
2012ac8: 81 e8 00 00 restore
/*
* Perform internal consistency checks
*/
assert( block_table );
2012acc: 11 00 80 80 sethi %hi(0x2020000), %o0 <== NOT EXECUTED
2012ad0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED
2012ad4: 17 00 80 80 sethi %hi(0x2020000), %o3 <== NOT EXECUTED
2012ad8: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED
2012adc: 94 12 a0 90 or %o2, 0x90, %o2 <== NOT EXECUTED
2012ae0: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED
2012ae4: 7f ff f7 9a call 201094c <__assert_func> <== NOT EXECUTED
2012ae8: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED
02013038 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
2013038: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
201303c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0
* 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 )
2013040: c2 04 20 50 ld [ %l0 + 0x50 ], %g1
2013044: 80 a0 40 19 cmp %g1, %i1
2013048: 06 80 00 13 bl 2013094 <memfile_ftruncate+0x5c> <== NEVER TAKEN
201304c: 90 10 00 10 mov %l0, %o0
2013050: 22 80 00 0d be,a 2013084 <memfile_ftruncate+0x4c> <== ALWAYS TAKEN
2013054: c2 04 20 54 ld [ %l0 + 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;
2013058: f2 24 20 50 st %i1, [ %l0 + 0x50 ] <== NOT EXECUTED
201305c: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
iop->size = the_jnode->info.file.size;
2013060: f4 26 20 0c st %i2, [ %i0 + 0xc ]
2013064: f2 26 20 08 st %i1, [ %i0 + 8 ]
IMFS_update_atime( the_jnode );
2013068: 90 07 bf f8 add %fp, -8, %o0
201306c: 7f ff c3 f5 call 2004040 <gettimeofday>
2013070: 92 10 20 00 clr %o1
2013074: c2 07 bf f8 ld [ %fp + -8 ], %g1
2013078: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
return 0;
}
201307c: 81 c7 e0 08 ret
2013080: 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 )
2013084: 80 a0 40 1a cmp %g1, %i2
2013088: 3a bf ff f5 bcc,a 201305c <memfile_ftruncate+0x24> <== ALWAYS TAKEN
201308c: f2 24 20 50 st %i1, [ %l0 + 0x50 ]
return IMFS_memfile_extend( the_jnode, length );
2013090: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2013094: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2013098: 7f ff ff 83 call 2012ea4 <IMFS_memfile_extend> <== NOT EXECUTED
201309c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20130a0: 81 c7 e0 08 ret <== NOT EXECUTED
20130a4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020130a8 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
20130a8: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
20130ac: e0 06 20 3c ld [ %i0 + 0x3c ], %l0
if (the_jnode->type == IMFS_LINEAR_FILE) {
20130b0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
20130b4: 80 a0 60 06 cmp %g1, 6
20130b8: 02 80 00 0f be 20130f4 <memfile_lseek+0x4c> <== NEVER TAKEN
20130bc: 90 10 00 10 mov %l0, %o0
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 ))
20130c0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
20130c4: 92 10 00 02 mov %g2, %o1
20130c8: 7f ff ff 77 call 2012ea4 <IMFS_memfile_extend>
20130cc: 94 10 00 03 mov %g3, %o2
20130d0: 80 a2 20 00 cmp %o0, 0
20130d4: 12 80 00 1b bne 2013140 <memfile_lseek+0x98> <== NEVER TAKEN
20130d8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
20130dc: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4
20130e0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
20130e4: d8 3e 20 08 std %o4, [ %i0 + 8 ]
}
return iop->offset;
}
20130e8: b2 10 00 03 mov %g3, %i1
20130ec: 81 c7 e0 08 ret
20130f0: 91 e8 00 02 restore %g0, %g2, %o0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
20130f4: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 <== NOT EXECUTED
20130f8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
20130fc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2013100: 14 80 00 0c bg 2013130 <memfile_lseek+0x88> <== NOT EXECUTED
2013104: c8 06 20 14 ld [ %i0 + 0x14 ], %g4 <== NOT EXECUTED
2013108: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201310c: 02 80 00 07 be 2013128 <memfile_lseek+0x80> <== NOT EXECUTED
2013110: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED
2013114: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
2013118: 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;
}
201311c: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
2013120: 81 c7 e0 08 ret <== NOT EXECUTED
2013124: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
2013128: 28 bf ff fc bleu,a 2013118 <memfile_lseek+0x70> <== NOT EXECUTED
201312c: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
2013130: c4 3e 20 10 std %g2, [ %i0 + 0x10 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
2013134: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED
2013138: 81 c7 e0 08 ret <== NOT EXECUTED
201313c: 91 e8 00 02 restore %g0, %g2, %o0 <== 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 );
2013140: 40 00 04 eb call 20144ec <__errno> <== NOT EXECUTED
2013144: 01 00 00 00 nop <== NOT EXECUTED
2013148: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c> <== NOT EXECUTED
201314c: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
2013150: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013154: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
2013158: 10 bf ff e4 b 20130e8 <memfile_lseek+0x40> <== NOT EXECUTED
201315c: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
02013454 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
2013454: 9d e3 bf a0 save %sp, -96, %sp
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
2013458: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
201345c: a0 10 00 18 mov %i0, %l0
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
2013460: 80 88 62 04 btst 0x204, %g1
2013464: 02 80 00 06 be 201347c <memfile_open+0x28>
2013468: e2 06 20 3c ld [ %i0 + 0x3c ], %l1
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
201346c: c4 04 60 4c ld [ %l1 + 0x4c ], %g2
2013470: 80 a0 a0 06 cmp %g2, 6
2013474: 22 80 00 0c be,a 20134a4 <memfile_open+0x50> <== NEVER TAKEN
2013478: d8 04 60 54 ld [ %l1 + 0x54 ], %o4 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
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)
201347c: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
2013480: 80 88 62 00 btst 0x200, %g1
2013484: 22 80 00 05 be,a 2013498 <memfile_open+0x44>
2013488: c4 3c 20 08 std %g2, [ %l0 + 8 ]
iop->offset = the_jnode->info.file.size;
201348c: c4 3c 20 10 std %g2, [ %l0 + 0x10 ]
2013490: c4 1c 60 50 ldd [ %l1 + 0x50 ], %g2
iop->size = the_jnode->info.file.size;
2013494: c4 3c 20 08 std %g2, [ %l0 + 8 ]
2013498: b0 10 20 00 clr %i0
return 0;
}
201349c: 81 c7 e0 08 ret
20134a0: 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;
20134a4: d6 04 60 58 ld [ %l1 + 0x58 ], %o3 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
20134a8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
20134ac: c0 24 60 5c clr [ %l1 + 0x5c ] <== NOT EXECUTED
&& (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;
the_jnode->info.file.size = 0;
20134b0: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED
20134b4: c0 24 60 54 clr [ %l1 + 0x54 ] <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
20134b8: c0 24 60 60 clr [ %l1 + 0x60 ] <== NOT EXECUTED
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
20134bc: c0 24 60 58 clr [ %l1 + 0x58 ] <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
20134c0: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED
20134c4: 12 80 00 06 bne 20134dc <memfile_open+0x88> <== NOT EXECUTED
20134c8: c2 24 60 4c st %g1, [ %l1 + 0x4c ] <== NOT EXECUTED
20134cc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
20134d0: 84 10 20 00 clr %g2 <== NOT EXECUTED
20134d4: 10 bf ff eb b 2013480 <memfile_open+0x2c> <== NOT EXECUTED
20134d8: 86 10 20 00 clr %g3 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
20134dc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20134e0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20134e4: 94 10 20 00 clr %o2 <== NOT EXECUTED
20134e8: 7f ff ff 1e call 2013160 <IMFS_memfile_write> <== NOT EXECUTED
20134ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
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)
20134f0: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
20134f4: 02 bf ff ea be 201349c <memfile_open+0x48> <== NOT EXECUTED
20134f8: 01 00 00 00 nop <== NOT EXECUTED
20134fc: 10 bf ff e0 b 201347c <memfile_open+0x28> <== NOT EXECUTED
2013500: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED
02012d7c <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
2012d7c: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
2012d80: e0 06 40 00 ld [ %i1 ], %l0
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
2012d84: c2 04 20 08 ld [ %l0 + 8 ], %g1
2012d88: 80 a0 60 00 cmp %g1, 0
2012d8c: 22 80 00 06 be,a 2012da4 <memfile_rmnod+0x28> <== NEVER TAKEN
2012d90: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED
2012d94: 7f ff d7 05 call 20089a8 <_Chain_Extract>
2012d98: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
2012d9c: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
2012da0: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1
IMFS_update_ctime( the_jnode );
2012da4: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
2012da8: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
2012dac: 90 07 bf f8 add %fp, -8, %o0
2012db0: 7f ff c4 a4 call 2004040 <gettimeofday>
2012db4: c2 34 20 34 sth %g1, [ %l0 + 0x34 ]
2012db8: c2 07 bf f8 ld [ %fp + -8 ], %g1
return memfile_check_rmnod( the_jnode );
2012dbc: 90 10 00 10 mov %l0, %o0
2012dc0: 7f ff ff d6 call 2012d18 <memfile_check_rmnod>
2012dc4: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
}
2012dc8: 81 c7 e0 08 ret
2012dcc: 91 e8 00 08 restore %g0, %o0, %o0
02002a4c <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2002a4c: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
2002a50: 03 00 00 3c sethi %hi(0xf000), %g1
2002a54: 80 8e 40 01 btst %i1, %g1
2002a58: 02 80 00 50 be 2002b98 <mknod+0x14c> <== NEVER TAKEN
2002a5c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2002a60: c2 4e 00 00 ldsb [ %i0 ], %g1
2002a64: 80 a0 60 5c cmp %g1, 0x5c
2002a68: 12 80 00 31 bne 2002b2c <mknod+0xe0> <== ALWAYS TAKEN
2002a6c: 80 a0 60 2f cmp %g1, 0x2f
2002a70: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
2002a74: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
2002a78: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2002a7c: c4 27 bf e8 st %g2, [ %fp + -24 ]
2002a80: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2002a84: c4 27 bf ec st %g2, [ %fp + -20 ]
2002a88: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
2002a8c: c4 27 bf f0 st %g2, [ %fp + -16 ]
2002a90: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
2002a94: c4 27 bf f4 st %g2, [ %fp + -12 ]
2002a98: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2002a9c: c2 27 bf f8 st %g1, [ %fp + -8 ]
if ( !temp_loc.ops->evalformake_h ) {
2002aa0: c2 07 bf f4 ld [ %fp + -12 ], %g1
2002aa4: c2 00 60 04 ld [ %g1 + 4 ], %g1
2002aa8: 80 a0 60 00 cmp %g1, 0
2002aac: 02 80 00 35 be 2002b80 <mknod+0x134> <== NEVER TAKEN
2002ab0: 90 10 20 01 mov 1, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
2002ab4: 90 06 00 08 add %i0, %o0, %o0
2002ab8: a0 07 bf e8 add %fp, -24, %l0
2002abc: 94 07 bf fc add %fp, -4, %o2
2002ac0: 92 10 00 10 mov %l0, %o1
2002ac4: 9f c0 40 00 call %g1
2002ac8: b0 10 3f ff mov -1, %i0
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
2002acc: 80 a2 20 00 cmp %o0, 0
2002ad0: 12 80 00 15 bne 2002b24 <mknod+0xd8>
2002ad4: c4 07 bf f4 ld [ %fp + -12 ], %g2
return -1;
if ( !temp_loc.ops->mknod_h ) {
2002ad8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2002adc: 80 a0 60 00 cmp %g1, 0
2002ae0: 02 80 00 34 be 2002bb0 <mknod+0x164> <== NEVER TAKEN
2002ae4: d0 07 bf fc ld [ %fp + -4 ], %o0
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
2002ae8: 92 10 00 19 mov %i1, %o1
2002aec: 94 10 00 1a mov %i2, %o2
2002af0: 96 10 00 1b mov %i3, %o3
2002af4: 9f c0 40 00 call %g1
2002af8: 98 10 00 10 mov %l0, %o4
rtems_filesystem_freenode( &temp_loc );
2002afc: c2 07 bf f4 ld [ %fp + -12 ], %g1
2002b00: 80 a0 60 00 cmp %g1, 0
2002b04: 02 80 00 08 be 2002b24 <mknod+0xd8> <== NEVER TAKEN
2002b08: b0 10 00 08 mov %o0, %i0
2002b0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2002b10: 80 a0 60 00 cmp %g1, 0
2002b14: 02 80 00 25 be 2002ba8 <mknod+0x15c>
2002b18: 01 00 00 00 nop
2002b1c: 9f c0 40 00 call %g1
2002b20: 90 10 00 10 mov %l0, %o0
return result;
}
2002b24: 81 c7 e0 08 ret
2002b28: 81 e8 00 00 restore
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2002b2c: 22 bf ff d2 be,a 2002a74 <mknod+0x28>
2002b30: 03 00 80 6b sethi %hi(0x201ac00), %g1
2002b34: 80 a0 60 00 cmp %g1, 0
2002b38: 02 bf ff cf be 2002a74 <mknod+0x28> <== NEVER TAKEN
2002b3c: 03 00 80 6b sethi %hi(0x201ac00), %g1
2002b40: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
2002b44: c4 00 60 04 ld [ %g1 + 4 ], %g2
2002b48: c4 27 bf e8 st %g2, [ %fp + -24 ]
2002b4c: c4 00 60 08 ld [ %g1 + 8 ], %g2
2002b50: c4 27 bf ec st %g2, [ %fp + -20 ]
2002b54: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2002b58: c4 27 bf f0 st %g2, [ %fp + -16 ]
2002b5c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2002b60: c4 27 bf f4 st %g2, [ %fp + -12 ]
2002b64: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2002b68: c2 27 bf f8 st %g1, [ %fp + -8 ]
if ( !temp_loc.ops->evalformake_h ) {
2002b6c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2002b70: c2 00 60 04 ld [ %g1 + 4 ], %g1
2002b74: 80 a0 60 00 cmp %g1, 0
2002b78: 12 bf ff cf bne 2002ab4 <mknod+0x68> <== ALWAYS TAKEN
2002b7c: 90 10 20 00 clr %o0
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
2002b80: 40 00 2f 6f call 200e93c <__errno> <== NOT EXECUTED
2002b84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002b88: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002b8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002b90: 81 c7 e0 08 ret <== NOT EXECUTED
2002b94: 81 e8 00 00 restore <== NOT EXECUTED
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
2002b98: 40 00 2f 69 call 200e93c <__errno> <== NOT EXECUTED
2002b9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002ba0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2002ba4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002ba8: 81 c7 e0 08 ret
2002bac: 81 e8 00 00 restore
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
2002bb0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2002bb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002bb8: 02 bf ff f2 be 2002b80 <mknod+0x134> <== NOT EXECUTED
2002bbc: 01 00 00 00 nop <== NOT EXECUTED
2002bc0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002bc4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002bc8: 30 bf ff ee b,a 2002b80 <mknod+0x134> <== NOT EXECUTED
02002bec <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
2002bec: 9d e3 bf 88 save %sp, -120, %sp
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
2002bf0: 80 a6 60 00 cmp %i1, 0
2002bf4: 02 80 00 94 be 2002e44 <mount+0x258>
2002bf8: a0 10 00 18 mov %i0, %l0
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
2002bfc: 80 a6 a0 01 cmp %i2, 1
2002c00: 18 80 00 91 bgu 2002e44 <mount+0x258>
2002c04: 01 00 00 00 nop
errno = EINVAL;
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
2002c08: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
2002c0c: 80 a0 60 00 cmp %g1, 0
2002c10: 02 80 00 98 be 2002e70 <mount+0x284> <== NEVER TAKEN
2002c14: 80 a6 e0 00 cmp %i3, 0
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
2002c18: 02 80 00 05 be 2002c2c <mount+0x40> <== ALWAYS TAKEN
2002c1c: 90 10 20 6c mov 0x6c, %o0
size += strlen( device ) + 1;
2002c20: 40 00 32 ff call 200f81c <strlen> <== NOT EXECUTED
2002c24: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2002c28: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED
temp_mt_entry = malloc( size );
2002c2c: 40 00 23 01 call 200b830 <malloc>
2002c30: 01 00 00 00 nop
if ( !temp_mt_entry ) {
2002c34: a2 92 20 00 orcc %o0, 0, %l1
2002c38: 02 80 00 97 be 2002e94 <mount+0x2a8> <== NEVER TAKEN
2002c3c: a6 10 00 11 mov %l1, %l3
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
2002c40: f4 24 60 30 st %i2, [ %l1 + 0x30 ]
if ( device ) {
2002c44: 80 a6 e0 00 cmp %i3, 0
2002c48: 02 80 00 7d be 2002e3c <mount+0x250> <== ALWAYS TAKEN
2002c4c: e2 24 60 2c st %l1, [ %l1 + 0x2c ]
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
2002c50: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED
strcpy( temp_mt_entry->dev, device );
2002c54: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2002c58: 40 00 32 ce call 200f790 <strcpy> <== NOT EXECUTED
2002c5c: d0 24 60 68 st %o0, [ %l1 + 0x68 ] <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
2002c60: 80 a7 20 00 cmp %i4, 0
2002c64: 22 80 00 6e be,a 2002e1c <mount+0x230>
2002c68: c0 24 60 1c clr [ %l1 + 0x1c ]
if ( rtems_filesystem_evaluate_path(
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
2002c6c: 40 00 32 ec call 200f81c <strlen>
2002c70: 90 10 00 1c mov %i4, %o0
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
2002c74: a4 07 bf ec add %fp, -20, %l2
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
2002c78: 92 10 00 08 mov %o0, %o1
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
2002c7c: 94 10 20 07 mov 7, %o2
2002c80: 90 10 00 1c mov %i4, %o0
2002c84: 96 10 00 12 mov %l2, %o3
2002c88: 7f ff fe b9 call 200276c <rtems_filesystem_evaluate_path>
2002c8c: 98 10 20 01 mov 1, %o4
2002c90: 80 a2 3f ff cmp %o0, -1
2002c94: 02 80 00 7b be 2002e80 <mount+0x294> <== NEVER TAKEN
2002c98: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
2002c9c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2002ca0: 80 a0 60 00 cmp %g1, 0
2002ca4: 02 80 00 46 be 2002dbc <mount+0x1d0> <== NEVER TAKEN
2002ca8: 01 00 00 00 nop
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
2002cac: 9f c0 40 00 call %g1
2002cb0: 90 10 00 12 mov %l2, %o0
2002cb4: 80 a2 20 01 cmp %o0, 1
2002cb8: 12 80 00 69 bne 2002e5c <mount+0x270>
2002cbc: 09 00 80 6d sethi %hi(0x201b400), %g4
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2002cc0: c2 01 20 80 ld [ %g4 + 0x80 ], %g1 ! 201b480 <rtems_filesystem_mount_table_control>
2002cc4: 88 11 20 80 or %g4, 0x80, %g4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2002cc8: 88 01 20 04 add %g4, 4, %g4
2002ccc: 80 a0 40 04 cmp %g1, %g4
2002cd0: 02 80 00 0e be 2002d08 <mount+0x11c> <== NEVER TAKEN
2002cd4: c6 07 bf ec ld [ %fp + -20 ], %g3
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
2002cd8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2002cdc: 80 a0 80 03 cmp %g2, %g3
2002ce0: 32 80 00 07 bne,a 2002cfc <mount+0x110> <== ALWAYS TAKEN
2002ce4: c2 00 40 00 ld [ %g1 ], %g1
2002ce8: 30 80 00 48 b,a 2002e08 <mount+0x21c> <== NOT EXECUTED
2002cec: 80 a0 80 03 cmp %g2, %g3
2002cf0: 02 80 00 46 be 2002e08 <mount+0x21c>
2002cf4: 01 00 00 00 nop
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
2002cf8: c2 00 40 00 ld [ %g1 ], %g1
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2002cfc: 80 a0 40 04 cmp %g1, %g4
2002d00: 32 bf ff fb bne,a 2002cec <mount+0x100>
2002d04: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
* 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.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
2002d08: c6 24 60 08 st %g3, [ %l1 + 8 ]
temp_mt_entry->mt_point_node.handlers = loc.handlers;
2002d0c: c6 07 bf f4 ld [ %fp + -12 ], %g3
temp_mt_entry->mt_point_node.ops = loc.ops;
2002d10: c4 07 bf f8 ld [ %fp + -8 ], %g2
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
2002d14: c6 24 60 10 st %g3, [ %l1 + 0x10 ]
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2002d18: c6 07 bf fc ld [ %fp + -4 ], %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 ){
2002d1c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2002d20: c6 24 60 18 st %g3, [ %l1 + 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 ){
2002d24: 80 a0 60 00 cmp %g1, 0
2002d28: 02 80 00 25 be 2002dbc <mount+0x1d0> <== NEVER TAKEN
2002d2c: c4 24 60 14 st %g2, [ %l1 + 0x14 ]
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
2002d30: 90 10 00 11 mov %l1, %o0
2002d34: 9f c0 40 00 call %g1
2002d38: a6 10 00 12 mov %l2, %l3
2002d3c: 80 a2 20 00 cmp %o0, 0
2002d40: 12 80 00 24 bne 2002dd0 <mount+0x1e4> <== NEVER TAKEN
2002d44: 90 10 00 11 mov %l1, %o0
temp_mt_entry->mt_point_node.handlers = NULL;
temp_mt_entry->mt_point_node.ops = NULL;
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
2002d48: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
2002d4c: 9f c0 40 00 call %g1
2002d50: 90 10 00 11 mov %l1, %o0
2002d54: 80 a2 20 00 cmp %o0, 0
2002d58: 12 80 00 0b bne 2002d84 <mount+0x198> <== NEVER TAKEN
2002d5c: 11 00 80 6d sethi %hi(0x201b400), %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2002d60: 92 10 00 11 mov %l1, %o1
2002d64: 40 00 0f 29 call 2006a08 <_Chain_Append>
2002d68: 90 12 20 80 or %o0, 0x80, %o0
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
2002d6c: 80 a4 20 00 cmp %l0, 0
2002d70: 02 80 00 03 be 2002d7c <mount+0x190> <== NEVER TAKEN
2002d74: b0 10 20 00 clr %i0
*mt_entry = temp_mt_entry;
2002d78: e2 24 00 00 st %l1, [ %l0 ]
2002d7c: 81 c7 e0 08 ret
2002d80: 81 e8 00 00 restore
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
2002d84: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2002d88: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED
2002d8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002d90: 02 80 00 04 be 2002da0 <mount+0x1b4> <== NOT EXECUTED
2002d94: 01 00 00 00 nop <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
2002d98: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002d9c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
2002da0: 40 00 21 2c call 200b250 <free> <== NOT EXECUTED
2002da4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
if ( loc_to_free )
2002da8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2002dac: 32 80 00 0c bne,a 2002ddc <mount+0x1f0> <== NOT EXECUTED
2002db0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
return -1;
}
2002db4: 81 c7 e0 08 ret <== NOT EXECUTED
2002db8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
2002dbc: 40 00 2e e0 call 200e93c <__errno> <== NOT EXECUTED
2002dc0: 01 00 00 00 nop <== NOT EXECUTED
2002dc4: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2002dc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
2002dcc: 90 10 00 11 mov %l1, %o0
2002dd0: 40 00 21 20 call 200b250 <free>
2002dd4: a6 10 00 12 mov %l2, %l3
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
2002dd8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1
2002ddc: 80 a0 60 00 cmp %g1, 0
2002de0: 02 bf ff e7 be 2002d7c <mount+0x190> <== NEVER TAKEN
2002de4: b0 10 3f ff mov -1, %i0
2002de8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2002dec: 80 a0 60 00 cmp %g1, 0
2002df0: 02 bf ff e3 be 2002d7c <mount+0x190> <== NEVER TAKEN
2002df4: 90 10 00 13 mov %l3, %o0
2002df8: 9f c0 40 00 call %g1
2002dfc: 01 00 00 00 nop
2002e00: 81 c7 e0 08 ret
2002e04: 81 e8 00 00 restore
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
2002e08: 40 00 2e cd call 200e93c <__errno>
2002e0c: 01 00 00 00 nop
2002e10: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10>
goto cleanup_and_bail;
2002e14: 10 bf ff ee b 2002dcc <mount+0x1e0>
2002e18: c2 22 00 00 st %g1, [ %o0 ]
* mt_point_node.node_access will be set to null to indicate that this
* is the root of the entire file system.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
temp_mt_entry->mt_fs_root.handlers = NULL;
2002e1c: c0 24 60 24 clr [ %l1 + 0x24 ]
temp_mt_entry->mt_fs_root.ops = NULL;
2002e20: c0 24 60 28 clr [ %l1 + 0x28 ]
temp_mt_entry->mt_point_node.node_access = NULL;
2002e24: c0 24 60 08 clr [ %l1 + 8 ]
temp_mt_entry->mt_point_node.handlers = NULL;
2002e28: c0 24 60 10 clr [ %l1 + 0x10 ]
temp_mt_entry->mt_point_node.ops = NULL;
2002e2c: c0 24 60 14 clr [ %l1 + 0x14 ]
temp_mt_entry->mt_point_node.mt_entry = NULL;
2002e30: c0 24 60 18 clr [ %l1 + 0x18 ]
2002e34: 10 bf ff c5 b 2002d48 <mount+0x15c>
2002e38: a6 10 20 00 clr %l3
if ( device ) {
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
} else
temp_mt_entry->dev = 0;
2002e3c: 10 bf ff 89 b 2002c60 <mount+0x74>
2002e40: c0 24 60 68 clr [ %l1 + 0x68 ]
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
2002e44: 40 00 2e be call 200e93c <__errno>
2002e48: b0 10 3f ff mov -1, %i0
2002e4c: 82 10 20 16 mov 0x16, %g1
2002e50: c2 22 00 00 st %g1, [ %o0 ]
return -1;
2002e54: 81 c7 e0 08 ret
2002e58: 81 e8 00 00 restore
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
2002e5c: 40 00 2e b8 call 200e93c <__errno>
2002e60: 01 00 00 00 nop
2002e64: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
goto cleanup_and_bail;
2002e68: 10 bf ff d9 b 2002dcc <mount+0x1e0>
2002e6c: c2 22 00 00 st %g1, [ %o0 ]
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
2002e70: 40 00 2e b3 call 200e93c <__errno> <== NOT EXECUTED
2002e74: a6 10 20 00 clr %l3 <== NOT EXECUTED
2002e78: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002e7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
2002e80: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2002e84: 40 00 20 f3 call 200b250 <free> <== NOT EXECUTED
2002e88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002e8c: 81 c7 e0 08 ret <== NOT EXECUTED
2002e90: 81 e8 00 00 restore <== NOT EXECUTED
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
if ( !temp_mt_entry ) {
errno = ENOMEM;
2002e94: 40 00 2e aa call 200e93c <__errno> <== NOT EXECUTED
2002e98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002e9c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2002ea0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
2002ea4: 81 c7 e0 08 ret <== NOT EXECUTED
2002ea8: 81 e8 00 00 restore <== NOT EXECUTED
02002eb4 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
2002eb4: 9d e3 bf a0 save %sp, -96, %sp
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
2002eb8: 80 a6 00 19 cmp %i0, %i1
2002ebc: 02 80 00 16 be 2002f14 <newlib_delete_hook+0x60>
2002ec0: 03 00 80 6b sethi %hi(0x201ac00), %g1
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
2002ec4: e0 06 61 5c ld [ %i1 + 0x15c ], %l0
}
if (ptr && ptr != _global_impure_ptr) {
2002ec8: 80 a4 20 00 cmp %l0, 0
2002ecc: 02 80 00 0b be 2002ef8 <newlib_delete_hook+0x44> <== NEVER TAKEN
2002ed0: 03 00 80 69 sethi %hi(0x201a400), %g1
2002ed4: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 201a5e0 <_global_impure_ptr>
2002ed8: 80 a4 00 01 cmp %l0, %g1
2002edc: 02 80 00 07 be 2002ef8 <newlib_delete_hook+0x44>
2002ee0: 13 00 80 0b sethi %hi(0x2002c00), %o1
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
2002ee4: 90 10 00 10 mov %l0, %o0
2002ee8: 40 00 30 af call 200f1a4 <_fwalk>
2002eec: 92 12 63 1c or %o1, 0x31c, %o1
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
2002ef0: 40 00 1a 7b call 20098dc <_Workspace_Free>
2002ef4: 90 10 00 10 mov %l0, %o0
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
2002ef8: 80 a6 00 19 cmp %i0, %i1
2002efc: 12 80 00 04 bne 2002f0c <newlib_delete_hook+0x58>
2002f00: c0 26 61 5c clr [ %i1 + 0x15c ]
_REENT = 0;
2002f04: 03 00 80 6b sethi %hi(0x201ac00), %g1
2002f08: c0 20 60 e0 clr [ %g1 + 0xe0 ] ! 201ace0 <_impure_ptr>
2002f0c: 81 c7 e0 08 ret
2002f10: 81 e8 00 00 restore
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
2002f14: 10 bf ff ed b 2002ec8 <newlib_delete_hook+0x14>
2002f18: e0 00 60 e0 ld [ %g1 + 0xe0 ], %l0
02002f1c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
2002f1c: 9d e3 bf a0 save %sp, -96, %sp
switch ( fileno(fp) ) {
2002f20: 40 00 2f a1 call 200eda4 <fileno>
2002f24: 90 10 00 18 mov %i0, %o0
2002f28: 80 a2 20 02 cmp %o0, 2
2002f2c: 28 80 00 06 bleu,a 2002f44 <newlib_free_buffers+0x28> <== ALWAYS TAKEN
2002f30: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
2002f34: 40 00 2e da call 200ea9c <fclose> <== NOT EXECUTED
2002f38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
return 0;
}
2002f3c: 81 c7 e0 08 ret
2002f40: 91 e8 20 00 restore %g0, 0, %o0
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
2002f44: 80 88 60 80 btst 0x80, %g1
2002f48: 02 bf ff fd be 2002f3c <newlib_free_buffers+0x20> <== ALWAYS TAKEN
2002f4c: 01 00 00 00 nop
free( fp->_bf._base );
2002f50: 40 00 20 c0 call 200b250 <free> <== NOT EXECUTED
2002f54: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2002f58: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2002f5c: 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;
2002f60: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2002f64: 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;
2002f68: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
2002f6c: 81 c7 e0 08 ret <== NOT EXECUTED
2002f70: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02003074 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
2003074: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_driver status;
if ( !initialized ) {
2003078: 03 00 80 80 sethi %hi(0x2020000), %g1
200307c: c4 48 63 40 ldsb [ %g1 + 0x340 ], %g2 ! 2020340 <initialized>
2003080: 80 a0 a0 00 cmp %g2, 0
2003084: 02 80 00 04 be 2003094 <null_initialize+0x20>
2003088: 84 10 20 01 mov 1, %g2
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
200308c: 81 c7 e0 08 ret
2003090: 91 e8 20 00 restore %g0, 0, %o0
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
status = rtems_io_register_name(
2003094: 11 00 80 78 sethi %hi(0x201e000), %o0
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
2003098: c4 28 63 40 stb %g2, [ %g1 + 0x340 ]
status = rtems_io_register_name(
200309c: 90 12 20 f0 or %o0, 0xf0, %o0
20030a0: 92 10 00 18 mov %i0, %o1
20030a4: 40 00 00 51 call 20031e8 <rtems_io_register_name>
20030a8: 94 10 20 00 clr %o2
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
20030ac: 80 a2 20 00 cmp %o0, 0
20030b0: 12 80 00 05 bne 20030c4 <null_initialize+0x50> <== NEVER TAKEN
20030b4: 03 00 80 81 sethi %hi(0x2020400), %g1
rtems_fatal_error_occurred(status);
NULL_major = major;
20030b8: f0 20 61 f0 st %i0, [ %g1 + 0x1f0 ] ! 20205f0 <NULL_major>
}
return RTEMS_SUCCESSFUL;
}
20030bc: 81 c7 e0 08 ret
20030c0: 91 e8 20 00 restore %g0, 0, %o0
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
20030c4: 40 00 11 a3 call 2007750 <rtems_fatal_error_occurred> <== NOT EXECUTED
02003050 <null_write>:
void *pargp
)
{
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
2003050: 80 a2 a0 00 cmp %o2, 0
2003054: 02 80 00 04 be 2003064 <null_write+0x14> <== ALWAYS TAKEN
2003058: 01 00 00 00 nop
rw_args->bytes_moved = rw_args->count;
200305c: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED
2003060: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
2003064: 81 c3 e0 08 retl
2003068: 90 10 20 00 clr %o0
020031bc <open>:
int open(
const char *pathname,
int flags,
...
)
{
20031bc: 9d e3 bf 88 save %sp, -120, %sp
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
20031c0: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
20031c4: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
20031c8: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
20031cc: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
20031d0: a2 06 60 01 add %i1, 1, %l1
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
20031d4: 80 8c 60 02 btst 2, %l1
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
20031d8: a2 0c 60 01 and %l1, 1, %l1
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
20031dc: 02 80 00 03 be 20031e8 <open+0x2c>
20031e0: a3 2c 60 02 sll %l1, 2, %l1
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
20031e4: a2 14 60 02 or %l1, 2, %l1
va_start(ap, flags);
mode = va_arg( ap, int );
20031e8: 82 07 a0 50 add %fp, 0x50, %g1
20031ec: e4 07 a0 4c ld [ %fp + 0x4c ], %l2
20031f0: c2 27 bf fc st %g1, [ %fp + -4 ]
* 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();
20031f4: 40 00 21 1b call 200b660 <rtems_libio_allocate>
20031f8: a6 10 20 17 mov 0x17, %l3
if ( iop == 0 ) {
20031fc: a0 92 20 00 orcc %o0, 0, %l0
2003200: 02 80 00 6c be 20033b0 <open+0x1f4>
2003204: 01 00 00 00 nop
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
2003208: 40 00 31 85 call 200f81c <strlen>
200320c: 90 10 00 18 mov %i0, %o0
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2003210: 94 10 00 11 mov %l1, %o2
pathname, strlen( pathname ), eval_flags, &loc, true );
2003214: 92 10 00 08 mov %o0, %o1
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2003218: a2 07 bf e8 add %fp, -24, %l1
200321c: 90 10 00 18 mov %i0, %o0
2003220: 96 10 00 11 mov %l1, %o3
2003224: 7f ff fd 52 call 200276c <rtems_filesystem_evaluate_path>
2003228: 98 10 20 01 mov 1, %o4
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
200322c: 80 a2 3f ff cmp %o0, -1
2003230: 02 80 00 65 be 20033c4 <open+0x208>
2003234: 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)) {
2003238: a6 10 20 11 mov 0x11, %l3
200323c: 80 a0 6a 00 cmp %g1, 0xa00
2003240: 02 80 00 4a be 2003368 <open+0x1ac>
2003244: a8 10 00 11 mov %l1, %l4
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2003248: c2 07 bf f0 ld [ %fp + -16 ], %g1
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
200324c: e6 04 20 18 ld [ %l0 + 0x18 ], %l3
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2003250: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
iop->file_info = loc.node_access;
2003254: c2 07 bf e8 ld [ %fp + -24 ], %g1
iop->flags |= rtems_libio_fcntl_flags( flags );
2003258: 90 10 00 19 mov %i1, %o0
200325c: 40 00 21 42 call 200b764 <rtems_libio_fcntl_flags>
2003260: c2 24 20 3c st %g1, [ %l0 + 0x3c ]
iop->pathinfo = loc;
2003264: c4 07 bf e8 ld [ %fp + -24 ], %g2
if ( !iop->handlers || !iop->handlers->open_h ) {
2003268: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
200326c: c4 24 20 1c st %g2, [ %l0 + 0x1c ]
2003270: c4 07 bf ec ld [ %fp + -20 ], %g2
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
2003274: 90 12 00 13 or %o0, %l3, %o0
iop->pathinfo = loc;
2003278: c4 24 20 20 st %g2, [ %l0 + 0x20 ]
200327c: c4 07 bf f0 ld [ %fp + -16 ], %g2
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
2003280: d0 24 20 18 st %o0, [ %l0 + 0x18 ]
iop->pathinfo = loc;
2003284: c4 24 20 24 st %g2, [ %l0 + 0x24 ]
2003288: c4 07 bf f4 ld [ %fp + -12 ], %g2
if ( !iop->handlers || !iop->handlers->open_h ) {
200328c: 80 a0 60 00 cmp %g1, 0
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
2003290: c4 24 20 28 st %g2, [ %l0 + 0x28 ]
2003294: c4 07 bf f8 ld [ %fp + -8 ], %g2
if ( !iop->handlers || !iop->handlers->open_h ) {
2003298: 02 80 00 32 be 2003360 <open+0x1a4> <== NEVER TAKEN
200329c: c4 24 20 2c st %g2, [ %l0 + 0x2c ]
20032a0: c2 00 40 00 ld [ %g1 ], %g1
20032a4: 80 a0 60 00 cmp %g1, 0
20032a8: 02 80 00 2e be 2003360 <open+0x1a4> <== NEVER TAKEN
20032ac: 92 10 00 18 mov %i0, %o1
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
20032b0: 96 10 00 12 mov %l2, %o3
20032b4: 90 10 00 10 mov %l0, %o0
20032b8: 9f c0 40 00 call %g1
20032bc: 94 10 00 19 mov %i1, %o2
if ( rc ) {
20032c0: 80 a2 20 00 cmp %o0, 0
20032c4: 12 80 00 12 bne 200330c <open+0x150>
20032c8: 80 8e 64 00 btst 0x400, %i1
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
20032cc: 12 80 00 48 bne 20033ec <open+0x230>
20032d0: 23 00 80 6d sethi %hi(0x201b400), %l1
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
20032d4: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 ! 201b444 <rtems_libio_iops>
20032d8: a0 24 00 01 sub %l0, %g1, %l0
20032dc: a1 3c 20 03 sra %l0, 3, %l0
20032e0: 85 2c 20 06 sll %l0, 6, %g2
20032e4: 83 2c 20 03 sll %l0, 3, %g1
20032e8: 82 20 80 01 sub %g2, %g1, %g1
20032ec: 85 28 60 06 sll %g1, 6, %g2
20032f0: 82 00 40 02 add %g1, %g2, %g1
20032f4: 82 00 40 10 add %g1, %l0, %g1
20032f8: b1 28 60 0f sll %g1, 0xf, %i0
20032fc: b0 26 00 01 sub %i0, %g1, %i0
2003300: b1 2e 20 03 sll %i0, 3, %i0
}
2003304: 81 c7 e0 08 ret
2003308: 91 ee 00 10 restore %i0, %l0, %o0
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
200330c: a8 10 00 11 mov %l1, %l4
2003310: 40 00 2d 8b call 200e93c <__errno>
2003314: 01 00 00 00 nop
2003318: e6 02 00 00 ld [ %o0 ], %l3
*/
done:
va_end(ap);
if ( rc ) {
200331c: 80 a4 e0 00 cmp %l3, 0
2003320: 12 80 00 12 bne 2003368 <open+0x1ac> <== ALWAYS TAKEN
2003324: 23 00 80 6d sethi %hi(0x201b400), %l1
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2003328: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 ! 201b444 <rtems_libio_iops><== NOT EXECUTED
200332c: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED
2003330: a1 3c 20 03 sra %l0, 3, %l0 <== NOT EXECUTED
2003334: 85 2c 20 06 sll %l0, 6, %g2 <== NOT EXECUTED
2003338: 83 2c 20 03 sll %l0, 3, %g1 <== NOT EXECUTED
200333c: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
2003340: 85 28 60 06 sll %g1, 6, %g2 <== NOT EXECUTED
2003344: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
2003348: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED
200334c: b1 28 60 0f sll %g1, 0xf, %i0 <== NOT EXECUTED
2003350: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED
2003354: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED
}
2003358: 81 c7 e0 08 ret <== NOT EXECUTED
200335c: 91 ee 00 10 restore %i0, %l0, %o0 <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2003360: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED
2003364: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED
done:
va_end(ap);
if ( rc ) {
if ( iop )
2003368: 80 a4 20 00 cmp %l0, 0
200336c: 02 80 00 05 be 2003380 <open+0x1c4> <== NEVER TAKEN
2003370: 80 a5 20 00 cmp %l4, 0
rtems_libio_free( iop );
2003374: 40 00 20 a4 call 200b604 <rtems_libio_free>
2003378: 90 10 00 10 mov %l0, %o0
if ( loc_to_free )
200337c: 80 a5 20 00 cmp %l4, 0
2003380: 02 80 00 0c be 20033b0 <open+0x1f4>
2003384: 01 00 00 00 nop
rtems_filesystem_freenode( loc_to_free );
2003388: c2 05 20 0c ld [ %l4 + 0xc ], %g1
200338c: 80 a0 60 00 cmp %g1, 0
2003390: 02 80 00 08 be 20033b0 <open+0x1f4> <== NEVER TAKEN
2003394: 01 00 00 00 nop
2003398: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200339c: 80 a0 60 00 cmp %g1, 0
20033a0: 02 80 00 04 be 20033b0 <open+0x1f4> <== NEVER TAKEN
20033a4: 01 00 00 00 nop
20033a8: 9f c0 40 00 call %g1
20033ac: 90 10 00 14 mov %l4, %o0
rtems_set_errno_and_return_minus_one( rc );
20033b0: 40 00 2d 63 call 200e93c <__errno>
20033b4: b0 10 3f ff mov -1, %i0
20033b8: e6 22 00 00 st %l3, [ %o0 ]
20033bc: 81 c7 e0 08 ret
20033c0: 81 e8 00 00 restore
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
20033c4: 40 00 2d 5e call 200e93c <__errno>
20033c8: 01 00 00 00 nop
20033cc: c2 02 00 00 ld [ %o0 ], %g1
20033d0: 80 a0 60 02 cmp %g1, 2
20033d4: 02 80 00 31 be 2003498 <open+0x2dc>
20033d8: 80 8e 62 00 btst 0x200, %i1
rc = errno;
20033dc: 40 00 2d 58 call 200e93c <__errno>
20033e0: a8 10 20 00 clr %l4
goto done;
20033e4: 10 bf ff ce b 200331c <open+0x160>
20033e8: e6 02 00 00 ld [ %o0 ], %l3
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
20033ec: c2 04 60 44 ld [ %l1 + 0x44 ], %g1
20033f0: 92 10 20 00 clr %o1
20033f4: 82 24 00 01 sub %l0, %g1, %g1
20033f8: 83 38 60 03 sra %g1, 3, %g1
20033fc: 87 28 60 06 sll %g1, 6, %g3
2003400: 85 28 60 03 sll %g1, 3, %g2
2003404: 84 20 c0 02 sub %g3, %g2, %g2
2003408: 87 28 a0 06 sll %g2, 6, %g3
200340c: 84 00 80 03 add %g2, %g3, %g2
2003410: 84 00 80 01 add %g2, %g1, %g2
2003414: 91 28 a0 0f sll %g2, 0xf, %o0
2003418: 84 22 00 02 sub %o0, %g2, %g2
200341c: 94 10 20 00 clr %o2
2003420: 91 28 a0 03 sll %g2, 3, %o0
2003424: 40 00 1f b6 call 200b2fc <ftruncate>
2003428: 90 02 00 01 add %o0, %g1, %o0
if ( rc ) {
200342c: a6 92 20 00 orcc %o0, 0, %l3
2003430: 02 bf ff aa be 20032d8 <open+0x11c> <== ALWAYS TAKEN
2003434: c2 04 60 44 ld [ %l1 + 0x44 ], %g1
if(errno) rc = errno;
2003438: 40 00 2d 41 call 200e93c <__errno> <== NOT EXECUTED
200343c: 01 00 00 00 nop <== NOT EXECUTED
2003440: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2003444: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003448: 12 80 00 2e bne 2003500 <open+0x344> <== NOT EXECUTED
200344c: 01 00 00 00 nop <== NOT EXECUTED
close( iop - rtems_libio_iops );
2003450: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 <== NOT EXECUTED
2003454: a8 10 20 00 clr %l4 <== NOT EXECUTED
2003458: 82 24 00 01 sub %l0, %g1, %g1 <== NOT EXECUTED
200345c: 83 38 60 03 sra %g1, 3, %g1 <== NOT EXECUTED
2003460: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED
2003464: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED
2003468: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED
200346c: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED
2003470: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED
2003474: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED
2003478: 87 28 a0 0f sll %g2, 0xf, %g3 <== NOT EXECUTED
200347c: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED
2003480: a0 10 20 00 clr %l0 <== NOT EXECUTED
2003484: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED
2003488: 40 00 1f 42 call 200b190 <close> <== NOT EXECUTED
200348c: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
2003490: 10 bf ff a4 b 2003320 <open+0x164> <== NOT EXECUTED
2003494: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2003498: a6 10 20 02 mov 2, %l3
200349c: 02 bf ff b3 be 2003368 <open+0x1ac>
20034a0: a8 10 20 00 clr %l4
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
20034a4: 13 00 00 20 sethi %hi(0x8000), %o1
20034a8: 90 10 00 18 mov %i0, %o0
20034ac: 92 14 80 09 or %l2, %o1, %o1
20034b0: 94 10 20 00 clr %o2
20034b4: 7f ff fd 66 call 2002a4c <mknod>
20034b8: 96 10 20 00 clr %o3
if ( rc ) {
20034bc: 80 a2 20 00 cmp %o0, 0
20034c0: 12 bf ff 94 bne 2003310 <open+0x154> <== NEVER TAKEN
20034c4: 01 00 00 00 nop
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
20034c8: 40 00 30 d5 call 200f81c <strlen>
20034cc: 90 10 00 18 mov %i0, %o0
20034d0: 94 10 20 00 clr %o2
20034d4: 92 10 00 08 mov %o0, %o1
20034d8: 96 10 00 11 mov %l1, %o3
20034dc: 90 10 00 18 mov %i0, %o0
20034e0: 98 10 20 01 mov 1, %o4
20034e4: 7f ff fc a2 call 200276c <rtems_filesystem_evaluate_path>
20034e8: a6 10 20 0d mov 0xd, %l3
if ( status != 0 ) { /* The file did not exist */
20034ec: 80 a2 20 00 cmp %o0, 0
20034f0: 12 bf ff 9e bne 2003368 <open+0x1ac> <== NEVER TAKEN
20034f4: a8 10 20 00 clr %l4
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
20034f8: 10 bf ff 55 b 200324c <open+0x90>
20034fc: c2 07 bf f0 ld [ %fp + -16 ], %g1
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
2003500: 40 00 2d 0f call 200e93c <__errno> <== NOT EXECUTED
2003504: 01 00 00 00 nop <== NOT EXECUTED
2003508: 10 bf ff d2 b 2003450 <open+0x294> <== NOT EXECUTED
200350c: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED
02003148 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
2003148: 9d e3 bf a0 save %sp, -96, %sp
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
200314c: 21 00 80 67 sethi %hi(0x2019c00), %l0
2003150: 92 10 20 00 clr %o1
2003154: 90 14 20 78 or %l0, 0x78, %o0
2003158: 40 00 00 19 call 20031bc <open>
200315c: 94 10 20 00 clr %o2
2003160: 80 a2 3f ff cmp %o0, -1
2003164: 02 80 00 0e be 200319c <open_dev_console+0x54>
2003168: 90 14 20 78 or %l0, 0x78, %o0
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
200316c: 92 10 20 01 mov 1, %o1
2003170: 40 00 00 13 call 20031bc <open>
2003174: 94 10 20 00 clr %o2
2003178: 80 a2 3f ff cmp %o0, -1
200317c: 02 80 00 0c be 20031ac <open_dev_console+0x64> <== NEVER TAKEN
2003180: 92 10 20 01 mov 1, %o1
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
2003184: 90 14 20 78 or %l0, 0x78, %o0
2003188: 40 00 00 0d call 20031bc <open>
200318c: 94 10 20 00 clr %o2
2003190: 80 a2 3f ff cmp %o0, -1
2003194: 02 80 00 04 be 20031a4 <open_dev_console+0x5c> <== NEVER TAKEN
2003198: 11 15 55 11 sethi %hi(0x55544400), %o0
200319c: 81 c7 e0 08 ret
20031a0: 81 e8 00 00 restore
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
20031a4: 40 00 0d 45 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
20031a8: 90 12 20 32 or %o0, 0x32, %o0 <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
20031ac: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED
20031b0: 40 00 0d 42 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
20031b4: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <RAM_END+0x53144431><== NOT EXECUTED
02003cec <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
2003cec: 9d e3 bf a0 save %sp, -96, %sp
int i;
if (tty->termios.c_oflag & OPOST) {
2003cf0: c2 06 60 34 ld [ %i1 + 0x34 ], %g1
2003cf4: 80 88 60 01 btst 1, %g1
2003cf8: 02 80 00 19 be 2003d5c <oproc+0x70> <== NEVER TAKEN
2003cfc: f0 2f a0 44 stb %i0, [ %fp + 0x44 ]
switch (c) {
2003d00: b0 0e 20 ff and %i0, 0xff, %i0
2003d04: 80 a6 20 09 cmp %i0, 9
2003d08: 22 80 00 42 be,a 2003e10 <oproc+0x124>
2003d0c: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
2003d10: 08 80 00 19 bleu 2003d74 <oproc+0x88> <== NEVER TAKEN
2003d14: 80 a6 20 08 cmp %i0, 8
2003d18: 80 a6 20 0a cmp %i0, 0xa
2003d1c: 02 80 00 22 be 2003da4 <oproc+0xb8>
2003d20: 80 a6 20 0d cmp %i0, 0xd
2003d24: 02 80 00 2d be 2003dd8 <oproc+0xec> <== NEVER TAKEN
2003d28: 80 88 60 10 btst 0x10, %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2003d2c: 80 88 60 02 btst 2, %g1
2003d30: 12 80 00 46 bne 2003e48 <oproc+0x15c> <== NEVER TAKEN
2003d34: 03 00 80 6b sethi %hi(0x201ac00), %g1
2003d38: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 ! 201acdc <__ctype_ptr__>
c = toupper(c);
if (!iscntrl(c))
2003d3c: b0 00 40 18 add %g1, %i0, %i0
2003d40: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2003d44: 80 88 60 20 btst 0x20, %g1
2003d48: 12 80 00 06 bne 2003d60 <oproc+0x74> <== NEVER TAKEN
2003d4c: 94 10 00 19 mov %i1, %o2
tty->column++;
2003d50: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2003d54: 82 00 60 01 inc %g1
2003d58: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
break;
}
}
rtems_termios_puts (&c, 1, tty);
2003d5c: 94 10 00 19 mov %i1, %o2
2003d60: 90 07 a0 44 add %fp, 0x44, %o0
2003d64: 7f ff ff 93 call 2003bb0 <rtems_termios_puts>
2003d68: 92 10 20 01 mov 1, %o1
2003d6c: 81 c7 e0 08 ret
2003d70: 81 e8 00 00 restore
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
2003d74: 12 bf ff ef bne 2003d30 <oproc+0x44> <== NOT EXECUTED
2003d78: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
2003d7c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2003d80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003d84: 04 bf ff f6 ble 2003d5c <oproc+0x70> <== NOT EXECUTED
2003d88: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2003d8c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += i;
break;
case '\b':
if (tty->column > 0)
tty->column--;
2003d90: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2003d94: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
2003d98: 7f ff ff 86 call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
2003d9c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003da0: 30 80 00 3e b,a 2003e98 <oproc+0x1ac> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
2003da4: 80 88 60 20 btst 0x20, %g1
2003da8: 32 80 00 02 bne,a 2003db0 <oproc+0xc4> <== NEVER TAKEN
2003dac: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
tty->column = 0;
if (tty->termios.c_oflag & ONLCR) {
2003db0: 80 88 60 04 btst 4, %g1
2003db4: 02 bf ff eb be 2003d60 <oproc+0x74> <== NEVER TAKEN
2003db8: 94 10 00 19 mov %i1, %o2
rtems_termios_puts ("\r", 1, tty);
2003dbc: 11 00 80 67 sethi %hi(0x2019c00), %o0
2003dc0: 92 10 20 01 mov 1, %o1
2003dc4: 90 12 20 88 or %o0, 0x88, %o0
2003dc8: 7f ff ff 7a call 2003bb0 <rtems_termios_puts>
2003dcc: 94 10 00 19 mov %i1, %o2
tty->column = 0;
2003dd0: 10 bf ff e3 b 2003d5c <oproc+0x70>
2003dd4: c0 26 60 28 clr [ %i1 + 0x28 ]
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2003dd8: 02 80 00 06 be 2003df0 <oproc+0x104> <== NOT EXECUTED
2003ddc: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2003de0: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED
2003de4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003de8: 02 bf ff e1 be 2003d6c <oproc+0x80> <== NOT EXECUTED
2003dec: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
2003df0: 22 bf ff db be,a 2003d5c <oproc+0x70> <== NOT EXECUTED
2003df4: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
c = '\n';
2003df8: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2003dfc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003e00: 02 bf ff d7 be 2003d5c <oproc+0x70> <== NOT EXECUTED
2003e04: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
break;
2003e08: 10 bf ff d5 b 2003d5c <oproc+0x70> <== NOT EXECUTED
2003e0c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2003e10: 05 00 00 06 sethi %hi(0x1800), %g2
2003e14: 82 08 40 02 and %g1, %g2, %g1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
2003e18: 92 10 20 08 mov 8, %o1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2003e1c: 80 a0 40 02 cmp %g1, %g2
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
2003e20: 82 08 e0 07 and %g3, 7, %g1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2003e24: 02 80 00 17 be 2003e80 <oproc+0x194> <== ALWAYS TAKEN
2003e28: 92 22 40 01 sub %o1, %g1, %o1
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
2003e2c: 86 02 40 03 add %o1, %g3, %g3 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2003e30: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
2003e34: c6 26 60 28 st %g3, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2003e38: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
2003e3c: 7f ff ff 5d call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
2003e40: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003e44: 30 80 00 15 b,a 2003e98 <oproc+0x1ac> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
2003e48: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 <== NOT EXECUTED
2003e4c: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED
2003e50: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
2003e54: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED
2003e58: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED
2003e5c: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED
2003e60: 22 80 00 05 be,a 2003e74 <oproc+0x188> <== NOT EXECUTED
2003e64: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED
2003e68: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
2003e6c: 10 bf ff b4 b 2003d3c <oproc+0x50> <== NOT EXECUTED
2003e70: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED
2003e74: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
2003e78: 10 bf ff b1 b 2003d3c <oproc+0x50> <== NOT EXECUTED
2003e7c: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
2003e80: 86 02 40 03 add %o1, %g3, %g3
rtems_termios_puts ( " ", i, tty);
2003e84: 94 10 00 19 mov %i1, %o2
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
2003e88: c6 26 60 28 st %g3, [ %i1 + 0x28 ]
rtems_termios_puts ( " ", i, tty);
2003e8c: 11 00 80 67 sethi %hi(0x2019c00), %o0
2003e90: 7f ff ff 48 call 2003bb0 <rtems_termios_puts>
2003e94: 90 12 20 90 or %o0, 0x90, %o0 ! 2019c90 <rtems_filesystem_mount_table_size+0x410>
return;
2003e98: 81 c7 e0 08 ret
2003e9c: 81 e8 00 00 restore
0200e348 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
200e348: 9d e3 bf 78 save %sp, -136, %sp
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
200e34c: 23 00 80 68 sethi %hi(0x201a000), %l1
200e350: a0 07 bf dc add %fp, -36, %l0
200e354: 92 10 20 03 mov 3, %o1
200e358: 90 14 62 20 or %l1, 0x220, %o0
200e35c: 94 10 20 07 mov 7, %o2
200e360: 96 10 00 10 mov %l0, %o3
200e364: 7f ff d1 02 call 200276c <rtems_filesystem_evaluate_path>
200e368: 98 10 20 01 mov 1, %o4
200e36c: 80 a2 20 00 cmp %o0, 0
200e370: 12 80 00 43 bne 200e47c <pipe_create+0x134> <== ALWAYS TAKEN
200e374: c2 07 bf e8 ld [ %fp + -24 ], %g1
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
200e378: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e37c: 22 80 00 09 be,a 200e3a0 <pipe_create+0x58> <== NOT EXECUTED
200e380: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
200e384: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 201b01c <impure_data+0x334><== NOT EXECUTED
200e388: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e38c: 22 80 00 05 be,a 200e3a0 <pipe_create+0x58> <== NOT EXECUTED
200e390: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
200e394: 9f c0 40 00 call %g1 <== NOT EXECUTED
200e398: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e39c: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
200e3a0: c4 10 62 ce lduh [ %g1 + 0x2ce ], %g2 ! 201b2ce <rtems_pipe_no>
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e3a4: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e3a8: 95 28 a0 10 sll %g2, 0x10, %o2
200e3ac: 84 00 a0 01 inc %g2
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e3b0: 86 10 e2 69 or %g3, 0x269, %g3
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e3b4: c4 30 62 ce sth %g2, [ %g1 + 0x2ce ]
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e3b8: 05 0b dd 1b sethi %hi(0x2f746c00), %g2
200e3bc: 03 00 00 19 sethi %hi(0x6400), %g1
200e3c0: 84 10 a1 70 or %g2, 0x170, %g2
200e3c4: 82 10 62 6f or %g1, 0x26f, %g1
200e3c8: a0 07 bf f0 add %fp, -16, %l0
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e3cc: 95 32 a0 10 srl %o2, 0x10, %o2
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e3d0: c4 3f bf f0 std %g2, [ %fp + -16 ]
200e3d4: c2 34 20 08 sth %g1, [ %l0 + 8 ]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e3d8: 90 07 bf fa add %fp, -6, %o0
200e3dc: 13 00 80 68 sethi %hi(0x201a000), %o1
200e3e0: 40 00 04 43 call 200f4ec <sprintf>
200e3e4: 92 12 62 28 or %o1, 0x228, %o1 ! 201a228 <__FUNCTION__.5900+0x30>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
200e3e8: 90 10 00 10 mov %l0, %o0
200e3ec: 40 00 00 5a call 200e554 <mkfifo>
200e3f0: 92 10 21 80 mov 0x180, %o1
200e3f4: 80 a2 20 00 cmp %o0, 0
200e3f8: 12 80 00 1d bne 200e46c <pipe_create+0x124> <== NEVER TAKEN
200e3fc: 90 10 00 10 mov %l0, %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);
200e400: 7f ff d3 6f call 20031bc <open>
200e404: 13 00 00 10 sethi %hi(0x4000), %o1
if (filsdes[0] < 0) {
200e408: 80 a2 20 00 cmp %o0, 0
200e40c: 06 80 00 2f bl 200e4c8 <pipe_create+0x180> <== ALWAYS TAKEN
200e410: 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]);
200e414: 03 00 80 6a sethi %hi(0x201a800), %g1 <== NOT EXECUTED
200e418: c4 00 62 c4 ld [ %g1 + 0x2c4 ], %g2 ! 201aac4 <rtems_libio_number_iops><== NOT EXECUTED
200e41c: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED
200e420: 0a 80 00 23 bcs 200e4ac <pipe_create+0x164> <== NOT EXECUTED
200e424: 82 10 20 00 clr %g1 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200e428: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
200e42c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200e430: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
200e434: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200e438: 7f ff d3 61 call 20031bc <open> <== NOT EXECUTED
200e43c: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED
200e440: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED
if (filsdes[1] < 0) {
200e444: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e448: 06 80 00 26 bl 200e4e0 <pipe_create+0x198> <== NOT EXECUTED
200e44c: a2 10 20 00 clr %l1 <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
200e450: 40 00 00 49 call 200e574 <unlink> <== NOT EXECUTED
200e454: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
200e458: 40 00 01 39 call 200e93c <__errno>
200e45c: b0 10 3f ff mov -1, %i0
200e460: e2 22 00 00 st %l1, [ %o0 ]
}
200e464: 81 c7 e0 08 ret
200e468: 81 e8 00 00 restore
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){
200e46c: 40 00 01 34 call 200e93c <__errno> <== NOT EXECUTED
200e470: 01 00 00 00 nop <== NOT EXECUTED
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
}
200e474: 81 c7 e0 08 ret <== NOT EXECUTED
200e478: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
!= 0) {
if (errno != ENOENT)
200e47c: 40 00 01 30 call 200e93c <__errno>
200e480: 01 00 00 00 nop
200e484: c2 02 00 00 ld [ %o0 ], %g1
200e488: 80 a0 60 02 cmp %g1, 2
200e48c: 12 bf ff fa bne 200e474 <pipe_create+0x12c> <== NEVER TAKEN
200e490: 90 14 62 20 or %l1, 0x220, %o0
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
200e494: 7f ff d1 66 call 2002a2c <mkdir>
200e498: 92 10 23 ff mov 0x3ff, %o1
200e49c: 80 a2 20 00 cmp %o0, 0
200e4a0: 02 bf ff c0 be 200e3a0 <pipe_create+0x58> <== ALWAYS TAKEN
200e4a4: 03 00 80 6c sethi %hi(0x201b000), %g1
200e4a8: 30 bf ff f3 b,a 200e474 <pipe_create+0x12c> <== NOT EXECUTED
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]);
200e4ac: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
200e4b0: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 201b444 <rtems_libio_iops><== NOT EXECUTED
200e4b4: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED
200e4b8: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
200e4bc: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED
200e4c0: 10 bf ff da b 200e428 <pipe_create+0xe0> <== NOT EXECUTED
200e4c4: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
200e4c8: 40 00 01 1d call 200e93c <__errno>
200e4cc: 01 00 00 00 nop
200e4d0: e2 02 00 00 ld [ %o0 ], %l1
/* 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);
200e4d4: 40 00 00 28 call 200e574 <unlink>
200e4d8: 90 10 00 10 mov %l0, %o0
200e4dc: 30 bf ff df b,a 200e458 <pipe_create+0x110>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
200e4e0: 40 00 01 17 call 200e93c <__errno> <== NOT EXECUTED
200e4e4: 01 00 00 00 nop <== NOT EXECUTED
200e4e8: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED
close(filsdes[0]);
200e4ec: 7f ff f3 29 call 200b190 <close> <== NOT EXECUTED
200e4f0: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
200e4f4: 30 bf ff d7 b,a 200e450 <pipe_create+0x108> <== NOT EXECUTED
0200ce80 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
200ce80: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (cmd == FIONREAD) {
200ce84: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
200ce88: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
if (cmd == FIONREAD) {
200ce8c: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED
200ce90: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200ce94: 12 80 00 12 bne 200cedc <pipe_ioctl+0x5c> <== NOT EXECUTED
200ce98: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED
if (buffer == NULL)
200ce9c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
200cea0: 02 80 00 0f be 200cedc <pipe_ioctl+0x5c> <== NOT EXECUTED
200cea4: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
200cea8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
200ceac: 92 10 20 00 clr %o1 <== NOT EXECUTED
200ceb0: 94 10 20 00 clr %o2 <== NOT EXECUTED
200ceb4: 7f ff e4 54 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200ceb8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
200cebc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cec0: 12 80 00 07 bne 200cedc <pipe_ioctl+0x5c> <== NOT EXECUTED
200cec4: 01 00 00 00 nop <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
200cec8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
200cecc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
200ced0: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
200ced4: 7f ff e4 93 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200ced8: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
200cedc: 81 c7 e0 08 ret <== NOT EXECUTED
200cee0: 81 e8 00 00 restore <== NOT EXECUTED
0200ce08 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
200ce08: 81 c3 e0 08 retl <== NOT EXECUTED
200ce0c: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED
0200d0dc <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200d0dc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200d0e0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200d0e4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200d0e8: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d0ec: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d0f0: 7f ff e3 c5 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d0f4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
200d0f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d0fc: 12 80 00 2f bne 200d1b8 <pipe_read+0xdc> <== NOT EXECUTED
200d100: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
200d104: a4 10 20 00 clr %l2 <== NOT EXECUTED
200d108: b0 10 20 00 clr %i0 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
200d10c: 02 80 00 26 be 200d1a4 <pipe_read+0xc8> <== NOT EXECUTED
200d110: a2 10 20 00 clr %l1 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
200d114: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
200d118: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED
200d11c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
200d120: 12 80 00 2a bne 200d1c8 <pipe_read+0xec> <== NOT EXECUTED
200d124: 82 26 80 12 sub %i2, %l2, %g1 <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
200d128: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
200d12c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d130: 22 80 00 1d be,a 200d1a4 <pipe_read+0xc8> <== NOT EXECUTED
200d134: a2 10 20 00 clr %l1 <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
200d138: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED
200d13c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200d140: 32 80 00 19 bne,a 200d1a4 <pipe_read+0xc8> <== NOT EXECUTED
200d144: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200d148: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
200d14c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200d150: 82 00 60 01 inc %g1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
200d154: 7f ff e3 f3 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d158: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
200d15c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
200d160: 40 00 02 d6 call 200dcb8 <rtems_barrier_wait> <== NOT EXECUTED
200d164: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d168: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200d16c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
200d170: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200d174: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
200d178: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200d17c: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d180: 7f ff e3 a1 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d184: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED
200d188: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d18c: 12 80 00 32 bne 200d254 <pipe_read+0x178> <== NOT EXECUTED
200d190: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
200d194: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED
200d198: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if (ret != 0)
200d19c: 02 bf ff df be 200d118 <pipe_read+0x3c> <== NOT EXECUTED
200d1a0: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
200d1a4: 7f ff e3 df call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d1a8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
out_nolock:
if (read > 0)
200d1ac: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200d1b0: 04 80 00 04 ble 200d1c0 <pipe_read+0xe4> <== NOT EXECUTED
200d1b4: 01 00 00 00 nop <== NOT EXECUTED
return read;
return ret;
}
200d1b8: 81 c7 e0 08 ret <== NOT EXECUTED
200d1bc: 81 e8 00 00 restore <== NOT EXECUTED
200d1c0: 81 c7 e0 08 ret <== NOT EXECUTED
200d1c4: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
200d1c8: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
200d1cc: 38 80 00 02 bgu,a 200d1d4 <pipe_read+0xf8> <== NOT EXECUTED
200d1d0: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
200d1d4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED
200d1d8: e8 04 20 04 ld [ %l0 + 4 ], %l4 <== NOT EXECUTED
200d1dc: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED
if (chunk > chunk1) {
200d1e0: 80 a4 40 14 cmp %l1, %l4 <== NOT EXECUTED
200d1e4: 14 80 00 1e bg 200d25c <pipe_read+0x180> <== NOT EXECUTED
200d1e8: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
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);
200d1ec: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED
200d1f0: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
200d1f4: 40 00 08 0e call 200f22c <memcpy> <== NOT EXECUTED
200d1f8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
pipe->Start += chunk;
200d1fc: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED
pipe->Start %= pipe->Size;
200d200: d2 04 20 04 ld [ %l0 + 4 ], %o1 <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
200d204: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED
pipe->Start %= pipe->Size;
200d208: 40 00 2b ad call 20180bc <.urem> <== NOT EXECUTED
200d20c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED
pipe->Length -= chunk;
200d210: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
200d214: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED
pipe->Length -= chunk;
200d218: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
200d21c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d220: 12 80 00 03 bne 200d22c <pipe_read+0x150> <== NOT EXECUTED
200d224: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED
pipe->Start = 0;
200d228: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
200d22c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
200d230: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d234: 32 80 00 15 bne,a 200d288 <pipe_read+0x1ac> <== NOT EXECUTED
200d238: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
200d23c: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
200d240: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED
200d244: 0a bf ff b5 bcs 200d118 <pipe_read+0x3c> <== NOT EXECUTED
200d248: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED
200d24c: 10 bf ff d6 b 200d1a4 <pipe_read+0xc8> <== NOT EXECUTED
200d250: a2 10 20 00 clr %l1 <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200d254: 10 bf ff d6 b 200d1ac <pipe_read+0xd0> <== NOT EXECUTED
200d258: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
200d25c: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
200d260: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
200d264: 40 00 07 f2 call 200f22c <memcpy> <== NOT EXECUTED
200d268: 90 06 40 12 add %i1, %l2, %o0 <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
200d26c: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
200d270: 90 04 80 14 add %l2, %l4, %o0 <== NOT EXECUTED
200d274: 94 24 40 14 sub %l1, %l4, %o2 <== NOT EXECUTED
200d278: 40 00 07 ed call 200f22c <memcpy> <== NOT EXECUTED
200d27c: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
200d280: 10 bf ff e0 b 200d200 <pipe_read+0x124> <== NOT EXECUTED
200d284: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
200d288: 40 00 02 75 call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d28c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
read += chunk;
200d290: 10 bf ff ec b 200d240 <pipe_read+0x164> <== NOT EXECUTED
200d294: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED
0200d298 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200d298: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
200d29c: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
200d2a0: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d2a4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
200d2a8: 7f ff e3 57 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d2ac: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
200d2b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d2b4: 12 80 00 47 bne 200d3d0 <pipe_release+0x138> <== NOT EXECUTED
200d2b8: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
200d2bc: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
200d2c0: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED
200d2c4: 02 80 00 05 be 200d2d8 <pipe_release+0x40> <== NOT EXECUTED
200d2c8: a4 0c a0 06 and %l2, 6, %l2 <== NOT EXECUTED
pipe->Readers --;
200d2cc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
200d2d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200d2d4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
200d2d8: 80 8c a0 04 btst 4, %l2 <== NOT EXECUTED
200d2dc: 32 80 00 1d bne,a 200d350 <pipe_release+0xb8> <== NOT EXECUTED
200d2e0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
pipe->Writers --;
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
200d2e4: 23 00 80 6c sethi %hi(0x201b000), %l1 <== NOT EXECUTED
200d2e8: d0 04 62 c8 ld [ %l1 + 0x2c8 ], %o0 ! 201b2c8 <rtems_pipe_semaphore><== NOT EXECUTED
200d2ec: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d2f0: 7f ff e3 45 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200d2f4: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
200d2f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d2fc: 12 80 00 35 bne 200d3d0 <pipe_release+0x138> <== NOT EXECUTED
200d300: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
200d304: 7f ff e3 87 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d308: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
200d30c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
200d310: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d314: 12 80 00 12 bne 200d35c <pipe_release+0xc4> <== NOT EXECUTED
200d318: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
200d31c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d320: 02 80 00 1c be 200d390 <pipe_release+0xf8> <== NOT EXECUTED
200d324: 80 a4 a0 04 cmp %l2, 4 <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
200d328: 02 80 00 06 be 200d340 <pipe_release+0xa8> <== NOT EXECUTED
200d32c: d0 04 62 c8 ld [ %l1 + 0x2c8 ], %o0 <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
200d330: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
200d334: 40 00 02 4a call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d338: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
200d33c: d0 04 62 c8 ld [ %l1 + 0x2c8 ], %o0 <== NOT EXECUTED
200d340: 7f ff e3 78 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d344: b0 10 20 00 clr %i0 <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
200d348: 81 c7 e0 08 ret <== NOT EXECUTED
200d34c: 81 e8 00 00 restore <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
200d350: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200d354: 10 bf ff e4 b 200d2e4 <pipe_release+0x4c> <== NOT EXECUTED
200d358: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== 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)
200d35c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d360: 12 bf ff f7 bne 200d33c <pipe_release+0xa4> <== NOT EXECUTED
200d364: 80 a4 a0 02 cmp %l2, 2 <== NOT EXECUTED
200d368: 02 bf ff f6 be 200d340 <pipe_release+0xa8> <== NOT EXECUTED
200d36c: d0 04 62 c8 ld [ %l1 + 0x2c8 ], %o0 <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
200d370: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
200d374: 40 00 02 3a call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d378: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
200d37c: d0 04 62 c8 ld [ %l1 + 0x2c8 ], %o0 <== NOT EXECUTED
200d380: 7f ff e3 68 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d384: b0 10 20 00 clr %i0 <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
200d388: 81 c7 e0 08 ret <== NOT EXECUTED
200d38c: 81 e8 00 00 restore <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200d390: 40 00 02 19 call 200dbf4 <rtems_barrier_delete> <== NOT EXECUTED
200d394: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
200d398: 40 00 02 17 call 200dbf4 <rtems_barrier_delete> <== NOT EXECUTED
200d39c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
200d3a0: 7f ff e2 ec call 2005f50 <rtems_semaphore_delete> <== NOT EXECUTED
200d3a4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
free(pipe->Buffer);
200d3a8: 7f ff f7 aa call 200b250 <free> <== NOT EXECUTED
200d3ac: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED
free(pipe);
200d3b0: 7f ff f7 a8 call 200b250 <free> <== NOT EXECUTED
200d3b4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
200d3b8: d0 04 62 c8 ld [ %l1 + 0x2c8 ], %o0 <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
200d3bc: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
200d3c0: 7f ff e3 58 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d3c4: b0 10 20 00 clr %i0 <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
200d3c8: 81 c7 e0 08 ret <== NOT EXECUTED
200d3cc: 81 e8 00 00 restore <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
200d3d0: 7f ff e4 ba call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
0200cee4 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200cee4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
200cee8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
200ceec: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
200cef0: 12 80 00 04 bne 200cf00 <pipe_write+0x1c> <== NOT EXECUTED
200cef4: b0 10 20 00 clr %i0 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
200cef8: 81 c7 e0 08 ret <== NOT EXECUTED
200cefc: 81 e8 00 00 restore <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
200cf00: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
200cf04: 92 10 20 00 clr %o1 <== NOT EXECUTED
200cf08: 94 10 20 00 clr %o2 <== NOT EXECUTED
200cf0c: 7f ff e4 3e call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200cf10: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
200cf14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cf18: 12 bf ff f8 bne 200cef8 <pipe_write+0x14> <== NOT EXECUTED
200cf1c: 01 00 00 00 nop <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
200cf20: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
200cf24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200cf28: 02 80 00 56 be 200d080 <pipe_write+0x19c> <== NOT EXECUTED
200cf2c: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
200cf30: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED
200cf34: 80 a6 80 15 cmp %i2, %l5 <== NOT EXECUTED
200cf38: 18 80 00 03 bgu 200cf44 <pipe_write+0x60> <== NOT EXECUTED
200cf3c: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
200cf40: a4 10 00 1a mov %i2, %l2 <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
200cf44: a6 10 20 00 clr %l3 <== NOT EXECUTED
200cf48: b0 10 20 00 clr %i0 <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
200cf4c: a8 07 bf fc add %fp, -4, %l4 <== NOT EXECUTED
/* 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) {
200cf50: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
200cf54: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED
200cf58: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED
200cf5c: 1a 80 00 28 bcc 200cffc <pipe_write+0x118> <== NOT EXECUTED
200cf60: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
200cf64: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED
200cf68: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200cf6c: 32 80 00 46 bne,a 200d084 <pipe_write+0x1a0> <== NOT EXECUTED
200cf70: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
200cf74: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
200cf78: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
200cf7c: 82 00 60 01 inc %g1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
200cf80: 7f ff e4 68 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200cf84: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
200cf88: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED
200cf8c: 40 00 03 4b call 200dcb8 <rtems_barrier_wait> <== NOT EXECUTED
200cf90: 92 10 20 00 clr %o1 <== NOT EXECUTED
200cf94: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200cf98: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
200cf9c: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200cfa0: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
200cfa4: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200cfa8: 94 10 20 00 clr %o2 <== NOT EXECUTED
200cfac: 7f ff e4 16 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200cfb0: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED
200cfb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cfb8: 12 80 00 3a bne 200d0a0 <pipe_write+0x1bc> <== NOT EXECUTED
200cfbc: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
200cfc0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
200cfc4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if (ret != 0)
200cfc8: 12 80 00 2f bne 200d084 <pipe_write+0x1a0> <== NOT EXECUTED
200cfcc: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
200cfd0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED
200cfd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200cfd8: 02 80 00 2b be 200d084 <pipe_write+0x1a0> <== NOT EXECUTED
200cfdc: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED
200cfe0: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED
/* 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) {
200cfe4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
200cfe8: a2 25 40 01 sub %l5, %g1, %l1 <== NOT EXECUTED
200cfec: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED
200cff0: 2a bf ff de bcs,a 200cf68 <pipe_write+0x84> <== NOT EXECUTED
200cff4: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
200cff8: 84 26 80 13 sub %i2, %l3, %g2 <== NOT EXECUTED
200cffc: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED
200d000: 38 80 00 02 bgu,a 200d008 <pipe_write+0x124> <== NOT EXECUTED
200d004: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
200d008: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED
200d00c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
200d010: 40 00 2c 2b call 20180bc <.urem> <== NOT EXECUTED
200d014: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
200d018: a4 25 40 08 sub %l5, %o0, %l2 <== NOT EXECUTED
if (chunk > chunk1) {
200d01c: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED
200d020: 04 80 00 22 ble 200d0a8 <pipe_write+0x1c4> <== NOT EXECUTED
200d024: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
200d028: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED
200d02c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
200d030: 40 00 08 7f call 200f22c <memcpy> <== NOT EXECUTED
200d034: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
200d038: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED
200d03c: 92 04 80 13 add %l2, %l3, %o1 <== NOT EXECUTED
200d040: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED
200d044: 40 00 08 7a call 200f22c <memcpy> <== NOT EXECUTED
200d048: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
200d04c: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
200d050: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
200d054: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
200d058: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d05c: 12 80 00 19 bne 200d0c0 <pipe_write+0x1dc> <== NOT EXECUTED
200d060: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
200d064: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
200d068: 80 a6 80 18 cmp %i2, %i0 <== NOT EXECUTED
200d06c: 08 80 00 1a bleu 200d0d4 <pipe_write+0x1f0> <== NOT EXECUTED
200d070: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED
200d074: ea 04 20 04 ld [ %l0 + 4 ], %l5 <== NOT EXECUTED
200d078: 10 bf ff b6 b 200cf50 <pipe_write+0x6c> <== NOT EXECUTED
200d07c: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
200d080: b0 10 20 00 clr %i0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
200d084: 7f ff e4 27 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200d088: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
200d08c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200d090: 14 bf ff 9a bg 200cef8 <pipe_write+0x14> <== NOT EXECUTED
200d094: 01 00 00 00 nop <== NOT EXECUTED
return written;
return ret;
}
200d098: 81 c7 e0 08 ret <== NOT EXECUTED
200d09c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200d0a0: 10 bf ff fb b 200d08c <pipe_write+0x1a8> <== NOT EXECUTED
200d0a4: a2 10 3f fc mov -4, %l1 <== 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);
200d0a8: 92 06 40 13 add %i1, %l3, %o1 <== NOT EXECUTED
200d0ac: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
200d0b0: 40 00 08 5f call 200f22c <memcpy> <== NOT EXECUTED
200d0b4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
pipe->Length += chunk;
200d0b8: 10 bf ff e6 b 200d050 <pipe_write+0x16c> <== NOT EXECUTED
200d0bc: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
200d0c0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED
200d0c4: 40 00 02 e6 call 200dc5c <rtems_barrier_release> <== NOT EXECUTED
200d0c8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
written += chunk;
200d0cc: 10 bf ff e7 b 200d068 <pipe_write+0x184> <== NOT EXECUTED
200d0d0: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
200d0d4: 10 bf ff ec b 200d084 <pipe_write+0x1a0> <== NOT EXECUTED
200d0d8: a2 10 20 00 clr %l1 <== NOT EXECUTED
02006f30 <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
2006f30: 05 00 80 95 sethi %hi(0x2025400), %g2
2006f34: 84 10 a2 b0 or %g2, 0x2b0, %g2 ! 20256b0 <rtems_malloc_statistics>
2006f38: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2006f3c: 86 00 e0 01 inc %g3
2006f40: c6 20 a0 08 st %g3, [ %g2 + 8 ]
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2006f44: 84 02 7f ff add %o1, -1, %g2
2006f48: 80 88 80 09 btst %g2, %o1
2006f4c: 02 80 00 04 be 2006f5c <posix_memalign+0x2c> <== ALWAYS TAKEN
2006f50: 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 );
}
2006f54: 81 c3 e0 08 retl
2006f58: 90 10 20 16 mov 0x16, %o0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2006f5c: 08 bf ff fe bleu 2006f54 <posix_memalign+0x24>
2006f60: 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 );
2006f64: 82 13 c0 00 mov %o7, %g1
2006f68: 40 00 00 68 call 2007108 <rtems_memalign>
2006f6c: 9e 10 40 00 mov %g1, %o7
02002c10 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
2002c10: 9d e3 bf a0 save %sp, -96, %sp
const char *p = s;
for (p=s ; *p ; p++ )
2002c14: d0 0e 00 00 ldub [ %i0 ], %o0
2002c18: 91 2a 20 18 sll %o0, 0x18, %o0
2002c1c: 80 a2 20 00 cmp %o0, 0
2002c20: 02 80 00 0c be 2002c50 <putk+0x40> <== NEVER TAKEN
2002c24: 23 00 80 55 sethi %hi(0x2015400), %l1
2002c28: a0 14 62 a0 or %l1, 0x2a0, %l0 ! 20156a0 <BSP_output_char>
BSP_output_char(*p);
2002c2c: c2 04 00 00 ld [ %l0 ], %g1
2002c30: 9f c0 40 00 call %g1
2002c34: 91 3a 20 18 sra %o0, 0x18, %o0
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
2002c38: b0 06 20 01 inc %i0
2002c3c: d0 0e 00 00 ldub [ %i0 ], %o0
2002c40: 91 2a 20 18 sll %o0, 0x18, %o0
2002c44: 80 a2 20 00 cmp %o0, 0
2002c48: 32 bf ff fa bne,a 2002c30 <putk+0x20>
2002c4c: c2 04 00 00 ld [ %l0 ], %g1
BSP_output_char(*p);
BSP_output_char('\n');
2002c50: c2 04 62 a0 ld [ %l1 + 0x2a0 ], %g1
2002c54: 9f c0 40 00 call %g1
2002c58: 90 10 20 0a mov 0xa, %o0
}
2002c5c: 81 c7 e0 08 ret
2002c60: 81 e8 00 00 restore
02018f84 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
2018f84: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2018f88: 03 00 80 6a sethi %hi(0x201a800), %g1
2018f8c: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
2018f90: 80 a6 00 01 cmp %i0, %g1
2018f94: 1a 80 00 23 bcc 2019020 <read+0x9c> <== NEVER TAKEN
2018f98: 03 00 80 6d sethi %hi(0x201b400), %g1
iop = rtems_libio_iop( fd );
2018f9c: e0 00 60 44 ld [ %g1 + 0x44 ], %l0 ! 201b444 <rtems_libio_iops>
2018fa0: 83 2e 20 06 sll %i0, 6, %g1
2018fa4: b1 2e 20 03 sll %i0, 3, %i0
2018fa8: b0 06 00 01 add %i0, %g1, %i0
2018fac: a0 04 00 18 add %l0, %i0, %l0
rtems_libio_check_is_open( iop );
2018fb0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2018fb4: 80 88 61 00 btst 0x100, %g1
2018fb8: 02 80 00 1a be 2019020 <read+0x9c>
2018fbc: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
2018fc0: 02 80 00 1e be 2019038 <read+0xb4> <== NEVER TAKEN
2018fc4: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
2018fc8: 02 80 00 14 be 2019018 <read+0x94> <== NEVER TAKEN
2018fcc: b0 10 20 00 clr %i0
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
2018fd0: 80 88 60 02 btst 2, %g1
2018fd4: 02 80 00 19 be 2019038 <read+0xb4> <== NEVER TAKEN
2018fd8: 01 00 00 00 nop
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
2018fdc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2018fe0: c2 00 60 08 ld [ %g1 + 8 ], %g1
2018fe4: 80 a0 60 00 cmp %g1, 0
2018fe8: 02 80 00 1a be 2019050 <read+0xcc> <== NEVER TAKEN
2018fec: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
2018ff0: 94 10 00 1a mov %i2, %o2
2018ff4: 9f c0 40 00 call %g1
2018ff8: 90 10 00 10 mov %l0, %o0
if ( rc > 0 )
2018ffc: b0 92 20 00 orcc %o0, 0, %i0
2019000: 04 80 00 06 ble 2019018 <read+0x94>
2019004: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
2019008: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4
201900c: 86 83 40 18 addcc %o5, %i0, %g3
2019010: 84 43 00 02 addx %o4, %g2, %g2
2019014: c4 3c 20 10 std %g2, [ %l0 + 0x10 ]
return rc;
}
2019018: 81 c7 e0 08 ret
201901c: 81 e8 00 00 restore
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
2019020: 7f ff d6 47 call 200e93c <__errno>
2019024: b0 10 3f ff mov -1, %i0
2019028: 82 10 20 09 mov 9, %g1
201902c: c2 22 00 00 st %g1, [ %o0 ]
2019030: 81 c7 e0 08 ret
2019034: 81 e8 00 00 restore
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
2019038: 7f ff d6 41 call 200e93c <__errno> <== NOT EXECUTED
201903c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019040: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2019044: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019048: 81 c7 e0 08 ret <== NOT EXECUTED
201904c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2019050: 7f ff d6 3b call 200e93c <__errno> <== NOT EXECUTED
2019054: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019058: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
201905c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019060: 81 c7 e0 08 ret <== NOT EXECUTED
2019064: 81 e8 00 00 restore <== NOT EXECUTED
020064cc <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
20064cc: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
20064d0: 80 a6 60 00 cmp %i1, 0
20064d4: 02 80 00 2b be 2006580 <readlink+0xb4> <== NEVER TAKEN
20064d8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
20064dc: 40 00 3b 44 call 20151ec <strlen>
20064e0: 90 10 00 18 mov %i0, %o0
20064e4: a0 07 bf ec add %fp, -20, %l0
20064e8: 92 10 00 08 mov %o0, %o1
20064ec: 94 10 20 00 clr %o2
20064f0: 90 10 00 18 mov %i0, %o0
20064f4: 96 10 00 10 mov %l0, %o3
20064f8: 98 10 20 00 clr %o4
20064fc: 7f ff fa c0 call 2004ffc <rtems_filesystem_evaluate_path>
2006500: b0 10 3f ff mov -1, %i0
0, &loc, false );
if ( result != 0 )
2006504: 80 a2 20 00 cmp %o0, 0
2006508: 12 80 00 1c bne 2006578 <readlink+0xac> <== NEVER TAKEN
200650c: c4 07 bf f8 ld [ %fp + -8 ], %g2
return -1;
if ( !loc.ops->node_type_h ){
2006510: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2006514: 80 a0 60 00 cmp %g1, 0
2006518: 22 80 00 31 be,a 20065dc <readlink+0x110> <== NEVER TAKEN
200651c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
2006520: 9f c0 40 00 call %g1
2006524: 90 10 00 10 mov %l0, %o0
2006528: 80 a2 20 04 cmp %o0, 4
200652c: 12 80 00 1b bne 2006598 <readlink+0xcc>
2006530: c4 07 bf f8 ld [ %fp + -8 ], %g2
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
2006534: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1
2006538: 80 a0 60 00 cmp %g1, 0
200653c: 02 80 00 27 be 20065d8 <readlink+0x10c> <== NEVER TAKEN
2006540: 92 10 00 19 mov %i1, %o1
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
2006544: 94 10 00 1a mov %i2, %o2
2006548: 9f c0 40 00 call %g1
200654c: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2006550: c2 07 bf f8 ld [ %fp + -8 ], %g1
2006554: 80 a0 60 00 cmp %g1, 0
2006558: 02 80 00 08 be 2006578 <readlink+0xac> <== NEVER TAKEN
200655c: b0 10 00 08 mov %o0, %i0
2006560: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006564: 80 a0 60 00 cmp %g1, 0
2006568: 02 80 00 26 be 2006600 <readlink+0x134> <== NEVER TAKEN
200656c: 01 00 00 00 nop
2006570: 9f c0 40 00 call %g1
2006574: 90 10 00 10 mov %l0, %o0
return result;
}
2006578: 81 c7 e0 08 ret
200657c: 81 e8 00 00 restore
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
2006580: 40 00 34 15 call 20135d4 <__errno> <== NOT EXECUTED
2006584: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2006588: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
200658c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2006590: 81 c7 e0 08 ret <== NOT EXECUTED
2006594: 81 e8 00 00 restore <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
2006598: c2 07 bf f8 ld [ %fp + -8 ], %g1
200659c: 80 a0 60 00 cmp %g1, 0
20065a0: 02 80 00 08 be 20065c0 <readlink+0xf4> <== NEVER TAKEN
20065a4: 01 00 00 00 nop
20065a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20065ac: 80 a0 60 00 cmp %g1, 0
20065b0: 02 80 00 04 be 20065c0 <readlink+0xf4> <== NEVER TAKEN
20065b4: 01 00 00 00 nop
20065b8: 9f c0 40 00 call %g1
20065bc: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
20065c0: 40 00 34 05 call 20135d4 <__errno>
20065c4: b0 10 3f ff mov -1, %i0
20065c8: 82 10 20 16 mov 0x16, %g1
20065cc: c2 22 00 00 st %g1, [ %o0 ]
20065d0: 81 c7 e0 08 ret
20065d4: 81 e8 00 00 restore
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
20065d8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
20065dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20065e0: 02 80 00 04 be 20065f0 <readlink+0x124> <== NOT EXECUTED
20065e4: 01 00 00 00 nop <== NOT EXECUTED
20065e8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20065ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20065f0: 40 00 33 f9 call 20135d4 <__errno> <== NOT EXECUTED
20065f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20065f8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20065fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2006600: 81 c7 e0 08 ret <== NOT EXECUTED
2006604: 81 e8 00 00 restore <== NOT EXECUTED
02004cf0 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
2004cf0: 9d e3 bf a0 save %sp, -96, %sp
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
2004cf4: 03 00 80 7e sethi %hi(0x201f800), %g1
2004cf8: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 201f8f4 <rtems_libio_number_iops>
2004cfc: 80 a6 00 01 cmp %i0, %g1
2004d00: 1a 80 00 52 bcc 2004e48 <readv+0x158> <== NEVER TAKEN
2004d04: 03 00 80 82 sethi %hi(0x2020800), %g1
iop = rtems_libio_iop( fd );
2004d08: e4 00 62 4c ld [ %g1 + 0x24c ], %l2 ! 2020a4c <rtems_libio_iops>
2004d0c: 83 2e 20 06 sll %i0, 6, %g1
2004d10: b1 2e 20 03 sll %i0, 3, %i0
2004d14: b0 06 00 01 add %i0, %g1, %i0
2004d18: a4 04 80 18 add %l2, %i0, %l2
rtems_libio_check_is_open( iop );
2004d1c: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1
2004d20: 80 88 61 00 btst 0x100, %g1
2004d24: 02 80 00 49 be 2004e48 <readv+0x158> <== NEVER TAKEN
2004d28: 80 88 60 02 btst 2, %g1
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
2004d2c: 02 80 00 26 be 2004dc4 <readv+0xd4> <== NEVER TAKEN
2004d30: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
2004d34: 02 80 00 24 be 2004dc4 <readv+0xd4>
2004d38: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
2004d3c: 04 80 00 22 ble 2004dc4 <readv+0xd4>
2004d40: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2004d44: 14 80 00 20 bg 2004dc4 <readv+0xd4> <== NEVER TAKEN
2004d48: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
2004d4c: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1
2004d50: c2 00 60 08 ld [ %g1 + 8 ], %g1
2004d54: 80 a0 60 00 cmp %g1, 0
2004d58: 02 80 00 42 be 2004e60 <readv+0x170> <== NEVER TAKEN
2004d5c: 96 10 20 01 mov 1, %o3
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004d60: 84 10 00 19 mov %i1, %g2
2004d64: 86 10 20 00 clr %g3
2004d68: 10 80 00 03 b 2004d74 <readv+0x84>
2004d6c: 88 10 20 00 clr %g4
* 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++ ) {
2004d70: 88 10 00 0c mov %o4, %g4
ssize_t old;
if ( !iov[v].iov_base )
2004d74: da 00 80 00 ld [ %g2 ], %o5
2004d78: 80 a3 60 00 cmp %o5, 0
2004d7c: 02 80 00 12 be 2004dc4 <readv+0xd4>
2004d80: 86 00 e0 01 inc %g3
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
2004d84: da 00 a0 04 ld [ %g2 + 4 ], %o5
2004d88: 98 01 00 0d add %g4, %o5, %o4
if ( total < old )
2004d8c: 80 a3 00 04 cmp %o4, %g4
2004d90: 06 80 00 0d bl 2004dc4 <readv+0xd4>
2004d94: 84 00 a0 08 add %g2, 8, %g2
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
2004d98: 80 a0 00 0d cmp %g0, %o5
2004d9c: 88 40 3f ff addx %g0, -1, %g4
* 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++ ) {
2004da0: 80 a6 80 03 cmp %i2, %g3
2004da4: 14 bf ff f3 bg 2004d70 <readv+0x80>
2004da8: 96 0a c0 04 and %o3, %g4, %o3
/*
* 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 ) {
2004dac: 80 8a e0 ff btst 0xff, %o3
2004db0: a6 10 20 00 clr %l3
2004db4: 02 80 00 0c be 2004de4 <readv+0xf4>
2004db8: b0 10 20 00 clr %i0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
2004dbc: 81 c7 e0 08 ret
2004dc0: 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 );
2004dc4: 40 00 31 5b call 2011330 <__errno>
2004dc8: b0 10 3f ff mov -1, %i0
2004dcc: 82 10 20 16 mov 0x16, %g1
2004dd0: c2 22 00 00 st %g1, [ %o0 ]
2004dd4: 81 c7 e0 08 ret
2004dd8: 81 e8 00 00 restore
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2004ddc: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1
2004de0: c2 00 60 08 ld [ %g1 + 8 ], %g1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
2004de4: d2 06 40 00 ld [ %i1 ], %o1
2004de8: d4 06 60 04 ld [ %i1 + 4 ], %o2
2004dec: 9f c0 40 00 call %g1
2004df0: 90 10 00 12 mov %l2, %o0
if ( bytes < 0 )
2004df4: 80 a2 20 00 cmp %o0, 0
2004df8: 06 80 00 12 bl 2004e40 <readv+0x150> <== NEVER TAKEN
2004dfc: 01 00 00 00 nop
return -1;
if ( bytes > 0 ) {
2004e00: 02 80 00 07 be 2004e1c <readv+0x12c> <== NEVER TAKEN
2004e04: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
2004e08: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2
2004e0c: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2004e10: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
2004e14: 84 40 80 10 addx %g2, %l0, %g2
2004e18: c4 3c a0 10 std %g2, [ %l2 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
2004e1c: c2 06 60 04 ld [ %i1 + 4 ], %g1
2004e20: 80 a2 00 01 cmp %o0, %g1
2004e24: 12 bf ff e6 bne 2004dbc <readv+0xcc> <== NEVER TAKEN
2004e28: a6 04 e0 01 inc %l3
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2004e2c: 80 a6 80 13 cmp %i2, %l3
2004e30: 14 bf ff eb bg 2004ddc <readv+0xec>
2004e34: b2 06 60 08 add %i1, 8, %i1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
2004e38: 81 c7 e0 08 ret
2004e3c: 81 e8 00 00 restore
2004e40: 81 c7 e0 08 ret <== NOT EXECUTED
2004e44: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
2004e48: 40 00 31 3a call 2011330 <__errno> <== NOT EXECUTED
2004e4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004e50: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2004e54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004e58: 81 c7 e0 08 ret <== NOT EXECUTED
2004e5c: 81 e8 00 00 restore <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004e60: 40 00 31 34 call 2011330 <__errno> <== NOT EXECUTED
2004e64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004e68: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004e6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004e70: 81 c7 e0 08 ret <== NOT EXECUTED
2004e74: 81 e8 00 00 restore <== NOT EXECUTED
020190ec <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
20190ec: 9d e3 bf 98 save %sp, -104, %sp
20190f0: 21 00 80 6d sethi %hi(0x201b400), %l0
20190f4: a0 14 20 50 or %l0, 0x50, %l0 ! 201b450 <rtems_malloc_statistics>
20190f8: c4 04 20 10 ld [ %l0 + 0x10 ], %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
20190fc: 03 00 80 6d sethi %hi(0x201b400), %g1
2019100: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b7b0 <_System_state_Current>
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
2019104: 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())) {
2019108: 80 a0 60 03 cmp %g1, 3
201910c: 02 80 00 36 be 20191e4 <realloc+0xf8> <== ALWAYS TAKEN
2019110: c4 24 20 10 st %g2, [ %l0 + 0x10 ]
}
/*
* Continue with realloc().
*/
if ( !ptr )
2019114: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2019118: 02 80 00 3e be 2019210 <realloc+0x124>
201911c: 80 a6 60 00 cmp %i1, 0
return malloc( size );
if ( !size ) {
2019120: 02 80 00 11 be 2019164 <realloc+0x78> <== NEVER TAKEN
2019124: 23 00 80 6a sethi %hi(0x201a800), %l1
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
2019128: d0 04 62 d0 ld [ %l1 + 0x2d0 ], %o0 ! 201aad0 <RTEMS_Malloc_Heap>
201912c: 92 10 00 18 mov %i0, %o1
2019130: 40 00 00 75 call 2019304 <_Protected_heap_Get_block_size>
2019134: 94 07 bf fc add %fp, -4, %o2
2019138: 80 8a 20 ff btst 0xff, %o0
201913c: 02 80 00 0f be 2019178 <realloc+0x8c>
2019140: d0 04 62 d0 ld [ %l1 + 0x2d0 ], %o0
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
2019144: 92 10 00 18 mov %i0, %o1
2019148: 40 00 00 7c call 2019338 <_Protected_heap_Resize_block>
201914c: 94 10 00 19 mov %i1, %o2
2019150: 80 8a 20 ff btst 0xff, %o0
2019154: 02 80 00 0f be 2019190 <realloc+0xa4>
2019158: 01 00 00 00 nop
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
201915c: 81 c7 e0 08 ret
2019160: 81 e8 00 00 restore
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
2019164: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2019168: 7f ff c8 3a call 200b250 <free> <== NOT EXECUTED
201916c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return (void *) 0;
2019170: 81 c7 e0 08 ret <== NOT EXECUTED
2019174: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
2019178: 7f ff d5 f1 call 200e93c <__errno>
201917c: b0 10 20 00 clr %i0
2019180: 82 10 20 16 mov 0x16, %g1
2019184: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
2019188: 81 c7 e0 08 ret
201918c: 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 );
2019190: 7f ff c9 a8 call 200b830 <malloc>
2019194: 90 10 00 19 mov %i1, %o0
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
2019198: c2 04 20 04 ld [ %l0 + 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 );
201919c: a2 10 00 08 mov %o0, %l1
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
20191a0: 82 00 7f ff add %g1, -1, %g1
if ( !new_area ) {
20191a4: 80 a2 20 00 cmp %o0, 0
20191a8: 02 80 00 18 be 2019208 <realloc+0x11c>
20191ac: c2 24 20 04 st %g1, [ %l0 + 4 ]
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
20191b0: c2 07 bf fc ld [ %fp + -4 ], %g1
20191b4: 80 a6 40 01 cmp %i1, %g1
20191b8: 08 80 00 03 bleu 20191c4 <realloc+0xd8> <== NEVER TAKEN
20191bc: 94 10 00 19 mov %i1, %o2
20191c0: 94 10 00 01 mov %g1, %o2
20191c4: 92 10 00 18 mov %i0, %o1
20191c8: 7f ff d8 19 call 200f22c <memcpy>
20191cc: 90 10 00 11 mov %l1, %o0
free( ptr );
20191d0: 90 10 00 18 mov %i0, %o0
20191d4: 7f ff c8 1f call 200b250 <free>
20191d8: b0 10 00 11 mov %l1, %i0
return new_area;
20191dc: 81 c7 e0 08 ret
20191e0: 81 e8 00 00 restore
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
20191e4: 03 00 80 6d sethi %hi(0x201b400), %g1
20191e8: c2 00 62 10 ld [ %g1 + 0x210 ], %g1 ! 201b610 <_Thread_Dispatch_disable_level>
20191ec: 80 a0 60 00 cmp %g1, 0
20191f0: 12 80 00 06 bne 2019208 <realloc+0x11c> <== NEVER TAKEN
20191f4: 03 00 80 6d sethi %hi(0x201b400), %g1
return (void *) 0;
if (_ISR_Nest_level > 0)
20191f8: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 201b6ac <_ISR_Nest_level>
20191fc: 80 a0 60 00 cmp %g1, 0
2019200: 02 bf ff c6 be 2019118 <realloc+0x2c> <== ALWAYS TAKEN
2019204: 80 a6 20 00 cmp %i0, 0
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
2019208: 81 c7 e0 08 ret
201920c: 91 e8 20 00 restore %g0, 0, %o0
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
2019210: 7f ff c9 88 call 200b830 <malloc>
2019214: 90 10 00 19 mov %i1, %o0
2019218: 81 c7 e0 08 ret
201921c: 91 e8 00 08 restore %g0, %o0, %o0
02007760 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
2007760: 9d e3 bf 78 save %sp, -136, %sp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
2007764: 7f ff f8 da call 2005acc <rtems_filesystem_dirname>
2007768: 90 10 00 18 mov %i0, %o0
if ( parentpathlen == 0 )
200776c: a0 92 20 00 orcc %o0, 0, %l0
2007770: 32 80 00 96 bne,a 20079c8 <rmdir+0x268>
2007774: 90 10 00 18 mov %i0, %o0
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
2007778: c2 4e 00 00 ldsb [ %i0 ], %g1
200777c: 80 a0 60 5c cmp %g1, 0x5c
2007780: 12 80 00 59 bne 20078e4 <rmdir+0x184> <== ALWAYS TAKEN
2007784: 80 a0 60 2f cmp %g1, 0x2f
2007788: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED
200778c: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env>
2007790: a2 10 20 00 clr %l1
2007794: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2007798: c4 27 bf ec st %g2, [ %fp + -20 ]
200779c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
20077a0: c4 27 bf f0 st %g2, [ %fp + -16 ]
20077a4: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
20077a8: c4 27 bf f4 st %g2, [ %fp + -12 ]
20077ac: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
20077b0: c4 27 bf f8 st %g2, [ %fp + -8 ]
20077b4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
20077b8: c2 27 bf fc st %g1, [ %fp + -4 ]
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077bc: c2 07 bf ec ld [ %fp + -20 ], %g1
name = pathname + parentpathlen;
20077c0: b0 06 00 10 add %i0, %l0, %i0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077c4: c2 27 bf d8 st %g1, [ %fp + -40 ]
20077c8: c2 07 bf f0 ld [ %fp + -16 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
20077cc: 90 10 00 18 mov %i0, %o0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077d0: c2 27 bf dc st %g1, [ %fp + -36 ]
20077d4: c2 07 bf f4 ld [ %fp + -12 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
20077d8: a0 07 bf d8 add %fp, -40, %l0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077dc: c2 27 bf e0 st %g1, [ %fp + -32 ]
20077e0: c2 07 bf f8 ld [ %fp + -8 ], %g1
20077e4: c2 27 bf e4 st %g1, [ %fp + -28 ]
20077e8: c2 07 bf fc ld [ %fp + -4 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
20077ec: 40 00 3f 92 call 2017634 <strlen>
20077f0: c2 27 bf e8 st %g1, [ %fp + -24 ]
20077f4: 92 10 00 08 mov %o0, %o1
20077f8: 7f ff f8 94 call 2005a48 <rtems_filesystem_prefix_separators>
20077fc: 90 10 00 18 mov %i0, %o0
2007800: b0 06 00 08 add %i0, %o0, %i0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2007804: 40 00 3f 8c call 2017634 <strlen>
2007808: 90 10 00 18 mov %i0, %o0
200780c: 94 10 20 00 clr %o2
2007810: 92 10 00 08 mov %o0, %o1
2007814: 96 10 00 10 mov %l0, %o3
2007818: 90 10 00 18 mov %i0, %o0
200781c: 7f ff f8 c9 call 2005b40 <rtems_filesystem_evaluate_relative_path>
2007820: 98 10 20 00 clr %o4
0, &loc, false );
if ( result != 0 ) {
2007824: 80 a2 20 00 cmp %o0, 0
2007828: 12 80 00 2a bne 20078d0 <rmdir+0x170>
200782c: c4 07 bf e4 ld [ %fp + -28 ], %g2
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
2007830: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2007834: 80 a0 60 00 cmp %g1, 0
2007838: 22 80 00 8a be,a 2007a60 <rmdir+0x300> <== NEVER TAKEN
200783c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
2007840: 9f c0 40 00 call %g1
2007844: 90 10 00 10 mov %l0, %o0
2007848: 80 a2 20 01 cmp %o0, 1
200784c: 12 80 00 38 bne 200792c <rmdir+0x1cc>
2007850: c2 07 bf e0 ld [ %fp + -32 ], %g1
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
2007854: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2007858: 80 a0 60 00 cmp %g1, 0
200785c: 02 80 00 65 be 20079f0 <rmdir+0x290> <== NEVER TAKEN
2007860: a4 07 bf ec add %fp, -20, %l2
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
2007864: 92 10 00 10 mov %l0, %o1
2007868: 9f c0 40 00 call %g1
200786c: 90 10 00 12 mov %l2, %o0
rtems_filesystem_freenode( &loc );
2007870: c2 07 bf e4 ld [ %fp + -28 ], %g1
2007874: 80 a0 60 00 cmp %g1, 0
2007878: 02 80 00 08 be 2007898 <rmdir+0x138> <== NEVER TAKEN
200787c: b0 10 00 08 mov %o0, %i0
2007880: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007884: 80 a0 60 00 cmp %g1, 0
2007888: 02 80 00 05 be 200789c <rmdir+0x13c> <== NEVER TAKEN
200788c: 80 8c 60 ff btst 0xff, %l1
2007890: 9f c0 40 00 call %g1
2007894: 90 10 00 10 mov %l0, %o0
if ( free_parentloc )
2007898: 80 8c 60 ff btst 0xff, %l1
200789c: 02 80 00 0b be 20078c8 <rmdir+0x168>
20078a0: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &parentloc );
20078a4: 80 a0 60 00 cmp %g1, 0
20078a8: 02 80 00 6c be 2007a58 <rmdir+0x2f8> <== NEVER TAKEN
20078ac: 01 00 00 00 nop
20078b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20078b4: 80 a0 60 00 cmp %g1, 0
20078b8: 02 80 00 68 be 2007a58 <rmdir+0x2f8> <== NEVER TAKEN
20078bc: 01 00 00 00 nop
20078c0: 9f c0 40 00 call %g1
20078c4: 90 10 00 12 mov %l2, %o0
20078c8: 81 c7 e0 08 ret
20078cc: 81 e8 00 00 restore
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
20078d0: 80 8c 60 ff btst 0xff, %l1
20078d4: 12 80 00 32 bne 200799c <rmdir+0x23c> <== NEVER TAKEN
20078d8: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
20078dc: 81 c7 e0 08 ret
20078e0: 91 e8 3f ff restore %g0, -1, %o0
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
20078e4: 22 bf ff aa be,a 200778c <rmdir+0x2c> <== ALWAYS TAKEN
20078e8: 03 00 80 9a sethi %hi(0x2026800), %g1
20078ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20078f0: 02 bf ff a7 be 200778c <rmdir+0x2c> <== NOT EXECUTED
20078f4: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED
20078f8: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env><== NOT EXECUTED
20078fc: a2 10 20 00 clr %l1 <== NOT EXECUTED
2007900: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
2007904: c4 27 bf ec st %g2, [ %fp + -20 ] <== NOT EXECUTED
2007908: c4 00 60 08 ld [ %g1 + 8 ], %g2 <== NOT EXECUTED
200790c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED
2007910: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
2007914: c4 27 bf f4 st %g2, [ %fp + -12 ] <== NOT EXECUTED
2007918: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
200791c: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
2007920: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
2007924: 10 bf ff a6 b 20077bc <rmdir+0x5c> <== NOT EXECUTED
2007928: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
200792c: c2 07 bf e4 ld [ %fp + -28 ], %g1
2007930: 80 a0 60 00 cmp %g1, 0
2007934: 02 80 00 09 be 2007958 <rmdir+0x1f8> <== NEVER TAKEN
2007938: 80 8c 60 ff btst 0xff, %l1
200793c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007940: 80 a0 60 00 cmp %g1, 0
2007944: 02 80 00 05 be 2007958 <rmdir+0x1f8> <== NEVER TAKEN
2007948: 80 8c 60 ff btst 0xff, %l1
200794c: 9f c0 40 00 call %g1
2007950: 90 10 00 10 mov %l0, %o0
if ( free_parentloc )
2007954: 80 8c 60 ff btst 0xff, %l1
2007958: 02 80 00 0b be 2007984 <rmdir+0x224> <== NEVER TAKEN
200795c: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &parentloc );
2007960: 80 a0 60 00 cmp %g1, 0
2007964: 02 80 00 08 be 2007984 <rmdir+0x224> <== NEVER TAKEN
2007968: 01 00 00 00 nop
200796c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007970: 80 a0 60 00 cmp %g1, 0
2007974: 02 80 00 04 be 2007984 <rmdir+0x224> <== NEVER TAKEN
2007978: 01 00 00 00 nop
200797c: 9f c0 40 00 call %g1
2007980: 90 07 bf ec add %fp, -20, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
2007984: 40 00 32 20 call 2014204 <__errno>
2007988: b0 10 3f ff mov -1, %i0
200798c: 82 10 20 14 mov 0x14, %g1
2007990: c2 22 00 00 st %g1, [ %o0 ]
2007994: 81 c7 e0 08 ret
2007998: 81 e8 00 00 restore
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
200799c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20079a0: 02 bf ff ca be 20078c8 <rmdir+0x168> <== NOT EXECUTED
20079a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20079a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20079ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20079b0: 02 bf ff c6 be 20078c8 <rmdir+0x168> <== NOT EXECUTED
20079b4: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
20079b8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20079bc: 01 00 00 00 nop <== NOT EXECUTED
20079c0: 81 c7 e0 08 ret <== NOT EXECUTED
20079c4: 81 e8 00 00 restore <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
20079c8: 92 10 00 10 mov %l0, %o1
20079cc: 94 10 20 02 mov 2, %o2
20079d0: 96 07 bf ec add %fp, -20, %o3
20079d4: 7f ff f8 9c call 2005c44 <rtems_filesystem_evaluate_path>
20079d8: 98 10 20 00 clr %o4
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
20079dc: 80 a2 20 00 cmp %o0, 0
20079e0: 12 bf ff bf bne 20078dc <rmdir+0x17c> <== NEVER TAKEN
20079e4: a2 10 20 01 mov 1, %l1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20079e8: 10 bf ff 76 b 20077c0 <rmdir+0x60>
20079ec: c2 07 bf ec ld [ %fp + -20 ], %g1
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
20079f0: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
20079f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20079f8: 02 80 00 09 be 2007a1c <rmdir+0x2bc> <== NOT EXECUTED
20079fc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
2007a00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2007a04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007a08: 02 80 00 05 be 2007a1c <rmdir+0x2bc> <== NOT EXECUTED
2007a0c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
2007a10: 9f c0 40 00 call %g1 <== NOT EXECUTED
2007a14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( free_parentloc )
2007a18: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
2007a1c: 02 80 00 0b be 2007a48 <rmdir+0x2e8> <== NOT EXECUTED
2007a20: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
2007a24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007a28: 02 80 00 08 be 2007a48 <rmdir+0x2e8> <== NOT EXECUTED
2007a2c: 01 00 00 00 nop <== NOT EXECUTED
2007a30: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2007a34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007a38: 02 80 00 04 be 2007a48 <rmdir+0x2e8> <== NOT EXECUTED
2007a3c: 01 00 00 00 nop <== NOT EXECUTED
2007a40: 9f c0 40 00 call %g1 <== NOT EXECUTED
2007a44: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2007a48: 40 00 31 ef call 2014204 <__errno> <== NOT EXECUTED
2007a4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2007a50: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2007a54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2007a58: 81 c7 e0 08 ret <== NOT EXECUTED
2007a5c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
2007a60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007a64: 12 bf ff eb bne 2007a10 <rmdir+0x2b0> <== NOT EXECUTED
2007a68: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
2007a6c: 30 bf ff ec b,a 2007a1c <rmdir+0x2bc> <== NOT EXECUTED
0200da04 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200da04: 9d e3 bf a0 save %sp, -96, %sp
200da08: a4 10 20 00 clr %l2
200da0c: a0 10 00 18 mov %i0, %l0
200da10: a2 10 20 01 mov 1, %l1
200da14: 10 80 00 05 b 200da28 <rtems_assoc_local_by_remote_bitfield+0x24>
200da18: b0 10 20 00 clr %i0
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200da1c: 80 a4 a0 20 cmp %l2, 0x20
200da20: 02 80 00 0d be 200da54 <rtems_assoc_local_by_remote_bitfield+0x50>
200da24: a3 2c 60 01 sll %l1, 1, %l1
if (b & remote_value)
200da28: 80 8c 40 19 btst %l1, %i1
200da2c: 22 bf ff fc be,a 200da1c <rtems_assoc_local_by_remote_bitfield+0x18>
200da30: a4 04 a0 01 inc %l2
local_value |= rtems_assoc_local_by_remote(ap, b);
200da34: 92 10 00 11 mov %l1, %o1
200da38: 40 00 00 09 call 200da5c <rtems_assoc_local_by_remote>
200da3c: 90 10 00 10 mov %l0, %o0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200da40: a4 04 a0 01 inc %l2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
200da44: b0 16 00 08 or %i0, %o0, %i0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200da48: 80 a4 a0 20 cmp %l2, 0x20
200da4c: 12 bf ff f7 bne 200da28 <rtems_assoc_local_by_remote_bitfield+0x24><== ALWAYS TAKEN
200da50: a3 2c 60 01 sll %l1, 1, %l1
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
200da54: 81 c7 e0 08 ret
200da58: 81 e8 00 00 restore
02015928 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
2015928: 11 00 80 9a sethi %hi(0x2026800), %o0 <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
201592c: 81 c3 e0 08 retl <== NOT EXECUTED
2015930: 90 12 22 00 or %o0, 0x200, %o0 ! 2026a00 <bad_buffer.4916><== NOT EXECUTED
02012488 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
2012488: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
201248c: 90 10 00 18 mov %i0, %o0
2012490: 40 00 00 0b call 20124bc <rtems_assoc_ptr_by_local>
2012494: 92 10 00 19 mov %i1, %o1
if (nap)
2012498: 80 a2 20 00 cmp %o0, 0
201249c: 02 80 00 05 be 20124b0 <rtems_assoc_name_by_local+0x28> <== NEVER TAKEN
20124a0: 01 00 00 00 nop
return nap->name;
return rtems_assoc_name_bad(local_value);
}
20124a4: f0 02 00 00 ld [ %o0 ], %i0
20124a8: 81 c7 e0 08 ret
20124ac: 81 e8 00 00 restore
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
20124b0: 40 00 0d 1e call 2015928 <rtems_assoc_name_bad> <== NOT EXECUTED
20124b4: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED
0200e88c <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200e88c: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200e890: d0 06 00 00 ld [ %i0 ], %o0
200e894: 80 a2 20 00 cmp %o0, 0
200e898: 02 80 00 1d be 200e90c <rtems_assoc_ptr_by_local+0x80> <== NEVER TAKEN
200e89c: 13 00 80 68 sethi %hi(0x201a000), %o1
200e8a0: 40 00 03 8e call 200f6d8 <strcmp>
200e8a4: 92 12 63 48 or %o1, 0x348, %o1 ! 201a348 <errno_assoc+0x88>
200e8a8: 80 a2 20 00 cmp %o0, 0
200e8ac: 02 80 00 11 be 200e8f0 <rtems_assoc_ptr_by_local+0x64> <== NEVER TAKEN
200e8b0: 84 10 20 00 clr %g2
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
200e8b4: c2 06 20 04 ld [ %i0 + 4 ], %g1
200e8b8: 80 a0 40 19 cmp %g1, %i1
200e8bc: 32 80 00 07 bne,a 200e8d8 <rtems_assoc_ptr_by_local+0x4c>
200e8c0: b0 06 20 0c add %i0, 0xc, %i0
200e8c4: 30 80 00 14 b,a 200e914 <rtems_assoc_ptr_by_local+0x88>
200e8c8: 80 a0 40 19 cmp %g1, %i1
200e8cc: 02 80 00 12 be 200e914 <rtems_assoc_ptr_by_local+0x88>
200e8d0: 01 00 00 00 nop
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200e8d4: b0 06 20 0c add %i0, 0xc, %i0
200e8d8: c2 06 00 00 ld [ %i0 ], %g1
200e8dc: 80 a0 60 00 cmp %g1, 0
200e8e0: 32 bf ff fa bne,a 200e8c8 <rtems_assoc_ptr_by_local+0x3c>
200e8e4: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (ap->local_value == local_value)
return ap;
return default_ap;
}
200e8e8: 81 c7 e0 08 ret
200e8ec: 91 e8 00 02 restore %g0, %g2, %o0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200e8f0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED
200e8f4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200e8f8: 02 80 00 07 be 200e914 <rtems_assoc_ptr_by_local+0x88> <== NOT EXECUTED
200e8fc: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED
200e900: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED
200e904: 10 bf ff ec b 200e8b4 <rtems_assoc_ptr_by_local+0x28> <== NOT EXECUTED
200e908: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200e90c: 81 c7 e0 08 ret <== NOT EXECUTED
200e910: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200e914: 81 c7 e0 08 ret
200e918: 81 e8 00 00 restore
0200da84 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200da84: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200da88: d0 06 00 00 ld [ %i0 ], %o0
200da8c: 80 a2 20 00 cmp %o0, 0
200da90: 02 80 00 1d be 200db04 <rtems_assoc_ptr_by_remote+0x80> <== NEVER TAKEN
200da94: 13 00 80 68 sethi %hi(0x201a000), %o1
200da98: 40 00 07 10 call 200f6d8 <strcmp>
200da9c: 92 12 62 10 or %o1, 0x210, %o1 ! 201a210 <__FUNCTION__.5900+0x18>
200daa0: 80 a2 20 00 cmp %o0, 0
200daa4: 02 80 00 11 be 200dae8 <rtems_assoc_ptr_by_remote+0x64> <== NEVER TAKEN
200daa8: 84 10 20 00 clr %g2
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
200daac: c2 06 20 08 ld [ %i0 + 8 ], %g1
200dab0: 80 a0 40 19 cmp %g1, %i1
200dab4: 32 80 00 07 bne,a 200dad0 <rtems_assoc_ptr_by_remote+0x4c>
200dab8: b0 06 20 0c add %i0, 0xc, %i0
200dabc: 30 80 00 14 b,a 200db0c <rtems_assoc_ptr_by_remote+0x88>
200dac0: 80 a0 40 19 cmp %g1, %i1
200dac4: 02 80 00 12 be 200db0c <rtems_assoc_ptr_by_remote+0x88>
200dac8: 01 00 00 00 nop
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200dacc: b0 06 20 0c add %i0, 0xc, %i0
200dad0: c2 06 00 00 ld [ %i0 ], %g1
200dad4: 80 a0 60 00 cmp %g1, 0
200dad8: 32 bf ff fa bne,a 200dac0 <rtems_assoc_ptr_by_remote+0x3c>
200dadc: c2 06 20 08 ld [ %i0 + 8 ], %g1
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
200dae0: 81 c7 e0 08 ret
200dae4: 91 e8 00 02 restore %g0, %g2, %o0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200dae8: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED
200daec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200daf0: 02 80 00 07 be 200db0c <rtems_assoc_ptr_by_remote+0x88> <== NOT EXECUTED
200daf4: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED
200daf8: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED
200dafc: 10 bf ff ec b 200daac <rtems_assoc_ptr_by_remote+0x28> <== NOT EXECUTED
200db00: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200db04: 81 c7 e0 08 ret <== NOT EXECUTED
200db08: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200db0c: 81 c7 e0 08 ret
200db10: 81 e8 00 00 restore
0200e52c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200e52c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
200e530: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e534: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e538: 40 00 00 d5 call 200e88c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
200e53c: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (nap)
200e540: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e544: 32 80 00 02 bne,a 200e54c <rtems_assoc_remote_by_local+0x20><== NOT EXECUTED
200e548: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED
return nap->remote_value;
return 0;
}
200e54c: 81 c7 e0 08 ret <== NOT EXECUTED
200e550: 81 e8 00 00 restore <== NOT EXECUTED
0200db14 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
200db14: 9d e3 bf 98 save %sp, -104, %sp
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
200db18: a0 96 20 00 orcc %i0, 0, %l0
200db1c: 02 80 00 23 be 200dba8 <rtems_barrier_create+0x94>
200db20: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200db24: 80 a6 e0 00 cmp %i3, 0
200db28: 02 80 00 20 be 200dba8 <rtems_barrier_create+0x94>
200db2c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
200db30: 80 8e 60 10 btst 0x10, %i1
200db34: 02 80 00 1f be 200dbb0 <rtems_barrier_create+0x9c>
200db38: 80 a6 a0 00 cmp %i2, 0
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
200db3c: 02 80 00 1b be 200dba8 <rtems_barrier_create+0x94>
200db40: b0 10 20 0a mov 0xa, %i0
200db44: 03 00 80 6d sethi %hi(0x201b400), %g1
200db48: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
200db4c: c0 27 bf f8 clr [ %fp + -8 ]
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
200db50: f4 27 bf fc st %i2, [ %fp + -4 ]
200db54: 84 00 a0 01 inc %g2
200db58: c4 20 62 10 st %g2, [ %g1 + 0x210 ]
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
200db5c: 25 00 80 6e sethi %hi(0x201b800), %l2
200db60: 7f ff e6 10 call 20073a0 <_Objects_Allocate>
200db64: 90 14 a0 e4 or %l2, 0xe4, %o0 ! 201b8e4 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
200db68: a2 92 20 00 orcc %o0, 0, %l1
200db6c: 02 80 00 1e be 200dbe4 <rtems_barrier_create+0xd0> <== NEVER TAKEN
200db70: 90 04 60 14 add %l1, 0x14, %o0
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
200db74: 92 07 bf f8 add %fp, -8, %o1
200db78: 40 00 01 4b call 200e0a4 <_CORE_barrier_Initialize>
200db7c: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
200db80: c2 14 60 0a lduh [ %l1 + 0xa ], %g1
200db84: c6 04 60 08 ld [ %l1 + 8 ], %g3
200db88: a4 14 a0 e4 or %l2, 0xe4, %l2
200db8c: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200db90: e0 24 60 0c st %l0, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200db94: 83 28 60 02 sll %g1, 2, %g1
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
200db98: c6 26 c0 00 st %g3, [ %i3 ]
200db9c: e2 20 80 01 st %l1, [ %g2 + %g1 ]
_Thread_Enable_dispatch();
200dba0: 7f ff e9 da call 2008308 <_Thread_Enable_dispatch>
200dba4: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
200dba8: 81 c7 e0 08 ret
200dbac: 81 e8 00 00 restore
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
200dbb0: 82 10 20 01 mov 1, %g1
200dbb4: c2 27 bf f8 st %g1, [ %fp + -8 ]
200dbb8: 03 00 80 6d sethi %hi(0x201b400), %g1
200dbbc: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level>
the_attributes.maximum_count = maximum_waiters;
200dbc0: f4 27 bf fc st %i2, [ %fp + -4 ]
200dbc4: 84 00 a0 01 inc %g2
200dbc8: c4 20 62 10 st %g2, [ %g1 + 0x210 ]
200dbcc: 25 00 80 6e sethi %hi(0x201b800), %l2
200dbd0: 7f ff e5 f4 call 20073a0 <_Objects_Allocate>
200dbd4: 90 14 a0 e4 or %l2, 0xe4, %o0 ! 201b8e4 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
200dbd8: a2 92 20 00 orcc %o0, 0, %l1
200dbdc: 12 bf ff e6 bne 200db74 <rtems_barrier_create+0x60>
200dbe0: 90 04 60 14 add %l1, 0x14, %o0
_Thread_Enable_dispatch();
200dbe4: 7f ff e9 c9 call 2008308 <_Thread_Enable_dispatch>
200dbe8: b0 10 20 05 mov 5, %i0
return RTEMS_TOO_MANY;
200dbec: 81 c7 e0 08 ret
200dbf0: 81 e8 00 00 restore
020026dc <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
20026dc: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
if ( !name )
20026e0: 80 a6 20 00 cmp %i0, 0
20026e4: 12 80 00 05 bne 20026f8 <rtems_bsp_cmdline_get_param+0x1c>
20026e8: 80 a6 60 00 cmp %i1, 0
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20026ec: b2 10 20 00 clr %i1
return NULL;
copy_string( p, value, length );
return value;
}
20026f0: 81 c7 e0 08 ret
20026f4: 91 e8 00 19 restore %g0, %i1, %o0
const char *p;
if ( !name )
return NULL;
if ( !value )
20026f8: 02 bf ff fe be 20026f0 <rtems_bsp_cmdline_get_param+0x14>
20026fc: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( !length )
2002700: 22 bf ff fc be,a 20026f0 <rtems_bsp_cmdline_get_param+0x14>
2002704: b2 10 20 00 clr %i1
return NULL;
value[0] = '\0';
2002708: c0 2e 40 00 clrb [ %i1 ]
p = rtems_bsp_cmdline_get_param_raw( name );
200270c: 40 00 00 25 call 20027a0 <rtems_bsp_cmdline_get_param_raw>
2002710: 90 10 00 18 mov %i0, %o0
if ( !p )
2002714: 80 a2 20 00 cmp %o0, 0
2002718: 22 bf ff f6 be,a 20026f0 <rtems_bsp_cmdline_get_param+0x14>
200271c: b2 10 20 00 clr %i1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2002720: c6 0a 00 00 ldub [ %o0 ], %g3
2002724: 85 28 e0 18 sll %g3, 0x18, %g2
2002728: 80 a0 a0 00 cmp %g2, 0
200272c: 02 bf ff f1 be 20026f0 <rtems_bsp_cmdline_get_param+0x14> <== NEVER TAKEN
2002730: b4 86 bf ff addcc %i2, -1, %i2
2002734: 02 bf ff ef be 20026f0 <rtems_bsp_cmdline_get_param+0x14> <== NEVER TAKEN
2002738: 88 10 20 00 clr %g4
200273c: 82 10 20 00 clr %g1
2002740: 10 80 00 12 b 2002788 <rtems_bsp_cmdline_get_param+0xac>
2002744: 9a 10 20 00 clr %o5
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
2002748: 32 80 00 06 bne,a 2002760 <rtems_bsp_cmdline_get_param+0x84>
200274c: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
2002750: 80 a0 a0 20 cmp %g2, 0x20
2002754: 02 bf ff e7 be 20026f0 <rtems_bsp_cmdline_get_param+0x14>
2002758: 01 00 00 00 nop
break;
value[i++] = *p++;
200275c: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
2002760: 82 00 60 01 inc %g1
value[i] = '\0';
2002764: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2002768: c6 0a 00 01 ldub [ %o0 + %g1 ], %g3
200276c: 85 28 e0 18 sll %g3, 0x18, %g2
2002770: 80 a0 a0 00 cmp %g2, 0
2002774: 02 bf ff df be 20026f0 <rtems_bsp_cmdline_get_param+0x14>
2002778: 88 10 00 01 mov %g1, %g4
200277c: 80 a0 40 1a cmp %g1, %i2
2002780: 1a bf ff dc bcc 20026f0 <rtems_bsp_cmdline_get_param+0x14><== NEVER TAKEN
2002784: 01 00 00 00 nop
if ( *p == '\"' ) {
2002788: 85 38 a0 18 sra %g2, 0x18, %g2
200278c: 80 a0 a0 22 cmp %g2, 0x22
2002790: 12 bf ff ee bne 2002748 <rtems_bsp_cmdline_get_param+0x6c>
2002794: 80 8b 60 01 btst 1, %o5
quotes++;
2002798: 10 bf ff f1 b 200275c <rtems_bsp_cmdline_get_param+0x80>
200279c: 9a 03 60 01 inc %o5
020027d4 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
20027d4: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
20027d8: 94 10 00 1a mov %i2, %o2
20027dc: 90 10 00 18 mov %i0, %o0
20027e0: 7f ff ff bf call 20026dc <rtems_bsp_cmdline_get_param>
20027e4: 92 10 00 19 mov %i1, %o1
if ( !p )
20027e8: a2 92 20 00 orcc %o0, 0, %l1
20027ec: 12 80 00 05 bne 2002800 <rtems_bsp_cmdline_get_param_rhs+0x2c>
20027f0: 01 00 00 00 nop
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
20027f4: b2 10 20 00 clr %i1 ! 0 <PROM_START>
}
20027f8: 81 c7 e0 08 ret
20027fc: 91 e8 00 19 restore %g0, %i1, %o0
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
2002800: 40 00 34 48 call 200f920 <strlen>
2002804: 90 10 00 18 mov %i0, %o0
if ( *rhs != '=' )
2002808: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1
200280c: 80 a0 60 3d cmp %g1, 0x3d
2002810: 12 bf ff f9 bne 20027f4 <rtems_bsp_cmdline_get_param_rhs+0x20><== NEVER TAKEN
2002814: a2 04 40 08 add %l1, %o0, %l1
return NULL;
rhs++;
if ( *rhs == '\"' )
2002818: c6 0c 60 01 ldub [ %l1 + 1 ], %g3
200281c: 85 28 e0 18 sll %g3, 0x18, %g2
2002820: 89 38 a0 18 sra %g2, 0x18, %g4
2002824: 80 a1 20 22 cmp %g4, 0x22
2002828: 02 80 00 14 be 2002878 <rtems_bsp_cmdline_get_param_rhs+0xa4>
200282c: 82 04 60 01 add %l1, 1, %g1
rhs++;
for ( d=value ; *rhs ; )
2002830: 80 a0 a0 00 cmp %g2, 0
2002834: 02 80 00 09 be 2002858 <rtems_bsp_cmdline_get_param_rhs+0x84>
2002838: 84 10 00 19 mov %i1, %g2
*d++ = *rhs++;
200283c: c6 28 80 00 stb %g3, [ %g2 ]
2002840: 82 00 60 01 inc %g1
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
2002844: c6 48 40 00 ldsb [ %g1 ], %g3
*d++ = *rhs++;
2002848: 84 00 a0 01 inc %g2
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
200284c: 80 a0 e0 00 cmp %g3, 0
2002850: 12 bf ff fb bne 200283c <rtems_bsp_cmdline_get_param_rhs+0x68>
2002854: c6 08 40 00 ldub [ %g1 ], %g3
*d++ = *rhs++;
if ( *(d-1) == '\"' )
2002858: c6 48 bf ff ldsb [ %g2 + -1 ], %g3
200285c: 80 a0 e0 22 cmp %g3, 0x22
2002860: 02 80 00 03 be 200286c <rtems_bsp_cmdline_get_param_rhs+0x98>
2002864: 82 00 bf ff add %g2, -1, %g1
2002868: 82 10 00 02 mov %g2, %g1
d--;
*d = '\0';
200286c: c0 28 40 00 clrb [ %g1 ]
return value;
}
2002870: 81 c7 e0 08 ret
2002874: 91 e8 00 19 restore %g0, %i1, %o0
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
2002878: c6 0c 60 02 ldub [ %l1 + 2 ], %g3
200287c: 82 04 60 02 add %l1, 2, %g1
2002880: 10 bf ff ec b 2002830 <rtems_bsp_cmdline_get_param_rhs+0x5c>
2002884: 85 28 e0 18 sll %g3, 0x18, %g2
02003250 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2003250: 9d e3 bf 60 save %sp, -160, %sp
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2003254: 80 a6 60 00 cmp %i1, 0
2003258: 02 80 00 72 be 2003420 <rtems_cpu_usage_report_with_plugin+0x1d0><== NEVER TAKEN
200325c: 01 00 00 00 nop
* 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__
_TOD_Get_uptime( &uptime );
2003260: 40 00 15 d2 call 20089a8 <_TOD_Get_uptime>
2003264: 90 07 bf f0 add %fp, -16, %o0
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2003268: 92 07 bf f0 add %fp, -16, %o1
200326c: a8 07 bf e8 add %fp, -24, %l4
2003270: 11 00 80 a7 sethi %hi(0x2029c00), %o0
2003274: 94 10 00 14 mov %l4, %o2
2003278: 40 00 20 73 call 200b444 <_Timespec_Subtract>
200327c: 90 12 22 5c or %o0, 0x25c, %o0
}
}
}
#endif
(*print)(
2003280: 90 10 00 18 mov %i0, %o0
2003284: 13 00 80 7c sethi %hi(0x201f000), %o1
2003288: 37 00 80 a6 sethi %hi(0x2029800), %i3
200328c: 92 12 63 e8 or %o1, 0x3e8, %o1
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2003290: 3b 00 80 7d sethi %hi(0x201f400), %i5
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003294: 2f 00 80 a7 sethi %hi(0x2029c00), %l7
}
}
}
#endif
(*print)(
2003298: 9f c6 40 00 call %i1
200329c: 2d 00 80 7d sethi %hi(0x201f400), %l6
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
20032a0: a4 07 bf c8 add %fp, -56, %l2
}
}
}
#endif
(*print)(
20032a4: b6 16 e3 04 or %i3, 0x304, %i3
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
20032a8: ba 17 61 60 or %i5, 0x160, %i5
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
20032ac: ae 15 e0 60 or %l7, 0x60, %l7
/*
* Print the information
*/
(*print)( context,
20032b0: ac 15 a1 78 or %l6, 0x178, %l6
20032b4: a6 07 bf e0 add %fp, -32, %l3
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
20032b8: aa 07 bf fc add %fp, -4, %l5
20032bc: b8 07 bf f8 add %fp, -8, %i4
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
20032c0: b4 07 bf d8 add %fp, -40, %i2
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
20032c4: c2 06 c0 00 ld [ %i3 ], %g1
20032c8: 80 a0 60 00 cmp %g1, 0
20032cc: 22 80 00 47 be,a 20033e8 <rtems_cpu_usage_report_with_plugin+0x198>
20032d0: b6 06 e0 04 add %i3, 4, %i3
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
20032d4: e2 00 60 04 ld [ %g1 + 4 ], %l1
if ( information ) {
20032d8: 80 a4 60 00 cmp %l1, 0
20032dc: 22 80 00 43 be,a 20033e8 <rtems_cpu_usage_report_with_plugin+0x198><== NEVER TAKEN
20032e0: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
20032e4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1
20032e8: 86 90 60 00 orcc %g1, 0, %g3
20032ec: 02 80 00 3e be 20033e4 <rtems_cpu_usage_report_with_plugin+0x194><== NEVER TAKEN
20032f0: a0 10 20 01 mov 1, %l0
the_thread = (Thread_Control *)information->local_table[ i ];
20032f4: 10 80 00 17 b 2003350 <rtems_cpu_usage_report_with_plugin+0x100>
20032f8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
20032fc: 96 10 00 1c mov %i4, %o3
2003300: 90 10 00 13 mov %l3, %o0
2003304: 40 00 1f be call 200b1fc <_Timespec_Divide>
2003308: 92 10 00 14 mov %l4, %o1
/*
* Print the information
*/
(*print)( context,
200330c: d0 07 bf e4 ld [ %fp + -28 ], %o0
2003310: 40 00 67 db call 201d27c <.udiv>
2003314: 92 10 23 e8 mov 0x3e8, %o1
2003318: d4 07 bf e0 ld [ %fp + -32 ], %o2
200331c: d8 07 bf fc ld [ %fp + -4 ], %o4
2003320: da 07 bf f8 ld [ %fp + -8 ], %o5
2003324: 96 10 00 08 mov %o0, %o3
2003328: 92 10 00 16 mov %l6, %o1
200332c: 9f c6 40 00 call %i1
2003330: 90 10 00 18 mov %i0, %o0
2003334: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2003338: 83 28 e0 10 sll %g3, 0x10, %g1
200333c: 83 30 60 10 srl %g1, 0x10, %g1
2003340: 80 a0 40 10 cmp %g1, %l0
2003344: 2a 80 00 29 bcs,a 20033e8 <rtems_cpu_usage_report_with_plugin+0x198>
2003348: b6 06 e0 04 add %i3, 4, %i3
the_thread = (Thread_Control *)information->local_table[ i ];
200334c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
2003350: 83 2c 20 02 sll %l0, 2, %g1
2003354: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2003358: 94 10 00 12 mov %l2, %o2
200335c: 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 )
2003360: 80 a0 60 00 cmp %g1, 0
2003364: 02 bf ff f5 be 2003338 <rtems_cpu_usage_report_with_plugin+0xe8><== NEVER TAKEN
2003368: a0 04 20 01 inc %l0
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
200336c: d0 00 60 08 ld [ %g1 + 8 ], %o0
2003370: 40 00 10 7e call 2007568 <rtems_object_get_name>
2003374: c2 27 bf c4 st %g1, [ %fp + -60 ]
(*print)(
2003378: c2 07 bf c4 ld [ %fp + -60 ], %g1
200337c: 90 10 00 18 mov %i0, %o0
2003380: d4 00 60 08 ld [ %g1 + 8 ], %o2
2003384: 92 10 00 1d mov %i5, %o1
2003388: 9f c6 40 00 call %i1
200338c: 96 10 00 12 mov %l2, %o3
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2003390: c2 07 bf c4 ld [ %fp + -60 ], %g1
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003394: c4 05 c0 00 ld [ %l7 ], %g2
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2003398: c6 00 60 84 ld [ %g1 + 0x84 ], %g3
200339c: c6 27 bf e0 st %g3, [ %fp + -32 ]
20033a0: c6 00 60 88 ld [ %g1 + 0x88 ], %g3
20033a4: c6 27 bf e4 st %g3, [ %fp + -28 ]
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
20033a8: c4 00 a0 08 ld [ %g2 + 8 ], %g2
20033ac: c2 00 60 08 ld [ %g1 + 8 ], %g1
20033b0: 80 a0 80 01 cmp %g2, %g1
20033b4: 32 bf ff d2 bne,a 20032fc <rtems_cpu_usage_report_with_plugin+0xac>
20033b8: 94 10 00 15 mov %l5, %o2
Timestamp_Control used;
_Timestamp_Subtract(
20033bc: 92 07 bf f0 add %fp, -16, %o1
20033c0: 94 10 00 1a mov %i2, %o2
20033c4: 11 00 80 a7 sethi %hi(0x2029c00), %o0
20033c8: 40 00 20 1f call 200b444 <_Timespec_Subtract>
20033cc: 90 12 20 68 or %o0, 0x68, %o0 ! 2029c68 <_Thread_Time_of_last_context_switch>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
20033d0: 90 10 00 13 mov %l3, %o0
20033d4: 40 00 1f 71 call 200b198 <_Timespec_Add_to>
20033d8: 92 10 00 1a mov %i2, %o1
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
20033dc: 10 bf ff c8 b 20032fc <rtems_cpu_usage_report_with_plugin+0xac>
20033e0: 94 10 00 15 mov %l5, %o2
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
20033e4: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
20033e8: 03 00 80 a6 sethi %hi(0x2029800), %g1
20033ec: 82 10 63 14 or %g1, 0x314, %g1 ! 2029b14 <_Objects_Information_table+0x14>
20033f0: 80 a6 c0 01 cmp %i3, %g1
20033f4: 32 bf ff b5 bne,a 20032c8 <rtems_cpu_usage_report_with_plugin+0x78>
20033f8: c2 06 c0 00 ld [ %i3 ], %g1
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
20033fc: d0 07 bf ec ld [ %fp + -20 ], %o0
2003400: 40 00 67 9f call 201d27c <.udiv>
2003404: 92 10 23 e8 mov 0x3e8, %o1
2003408: d4 07 bf e8 ld [ %fp + -24 ], %o2
200340c: 96 10 00 08 mov %o0, %o3
2003410: 13 00 80 7d sethi %hi(0x201f400), %o1
2003414: 90 10 00 18 mov %i0, %o0
2003418: 9f c6 40 00 call %i1
200341c: 92 12 61 90 or %o1, 0x190, %o1
2003420: 81 c7 e0 08 ret
2003424: 81 e8 00 00 restore
0200e4f8 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
200e4f8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
200e4fc: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED
200e500: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200e504: 40 00 00 0a call 200e52c <rtems_assoc_remote_by_local> <== NOT EXECUTED
200e508: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED
200e50c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
200e510: 02 80 00 05 be 200e524 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
200e514: 01 00 00 00 nop <== NOT EXECUTED
{
errno = rc;
200e518: 40 00 01 09 call 200e93c <__errno> <== NOT EXECUTED
200e51c: 01 00 00 00 nop <== NOT EXECUTED
200e520: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
return -1;
}
return -1;
}
200e524: 81 c7 e0 08 ret <== NOT EXECUTED
200e528: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02007ff4 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
2007ff4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
2007ff8: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED
2007ffc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2008000: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
2008004: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
2008008: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
200800c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2008010: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2008014: 7f ff ff 7e call 2007e0c <rtems_verror> <== NOT EXECUTED
2008018: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
200801c: 81 c7 e0 08 ret <== NOT EXECUTED
2008020: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020025f4 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
20025f4: 9d e3 bf a0 save %sp, -96, %sp
int len = strlen( pathname );
20025f8: 40 00 34 89 call 200f81c <strlen>
20025fc: 90 10 00 18 mov %i0, %o0
while ( len ) {
2002600: 80 a2 20 00 cmp %o0, 0
2002604: 02 80 00 17 be 2002660 <rtems_filesystem_dirname+0x6c> <== NEVER TAKEN
2002608: 84 10 00 08 mov %o0, %g2
len--;
200260c: 90 02 3f ff add %o0, -1, %o0
if ( rtems_filesystem_is_separator( pathname[len] ) )
2002610: c2 4e 00 08 ldsb [ %i0 + %o0 ], %g1
2002614: 80 a0 60 5c cmp %g1, 0x5c
2002618: 02 80 00 12 be 2002660 <rtems_filesystem_dirname+0x6c> <== NEVER TAKEN
200261c: 80 a0 60 2f cmp %g1, 0x2f
2002620: 02 80 00 10 be 2002660 <rtems_filesystem_dirname+0x6c> <== NEVER TAKEN
2002624: 80 a0 60 00 cmp %g1, 0
2002628: 02 80 00 0e be 2002660 <rtems_filesystem_dirname+0x6c> <== NEVER TAKEN
200262c: a0 06 00 02 add %i0, %g2, %l0
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
2002630: 80 a2 20 00 cmp %o0, 0
2002634: 02 80 00 0b be 2002660 <rtems_filesystem_dirname+0x6c>
2002638: 01 00 00 00 nop
len--;
if ( rtems_filesystem_is_separator( pathname[len] ) )
200263c: c2 4c 3f fe ldsb [ %l0 + -2 ], %g1
2002640: 80 a0 60 5c cmp %g1, 0x5c
2002644: 02 80 00 07 be 2002660 <rtems_filesystem_dirname+0x6c> <== NEVER TAKEN
2002648: 90 02 3f ff add %o0, -1, %o0
200264c: 80 a0 60 2f cmp %g1, 0x2f
2002650: 02 80 00 04 be 2002660 <rtems_filesystem_dirname+0x6c>
2002654: 80 a0 60 00 cmp %g1, 0
2002658: 12 bf ff f6 bne 2002630 <rtems_filesystem_dirname+0x3c> <== ALWAYS TAKEN
200265c: a0 04 3f ff add %l0, -1, %l0
break;
}
return len;
}
2002660: 81 c7 e0 08 ret
2002664: 91 e8 00 08 restore %g0, %o0, %o0
0200276c <rtems_filesystem_evaluate_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
200276c: 9d e3 bf a0 save %sp, -96, %sp
/*
* Verify Input parameters.
*/
if ( !pathname )
2002770: 80 a6 20 00 cmp %i0, 0
2002774: 02 80 00 34 be 2002844 <rtems_filesystem_evaluate_path+0xd8><== NEVER TAKEN
2002778: 80 a6 e0 00 cmp %i3, 0
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
200277c: 22 80 00 2c be,a 200282c <rtems_filesystem_evaluate_path+0xc0><== NEVER TAKEN
2002780: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
2002784: c2 4e 00 00 ldsb [ %i0 ], %g1
2002788: 80 a0 60 5c cmp %g1, 0x5c
200278c: 22 80 00 18 be,a 20027ec <rtems_filesystem_evaluate_path+0x80><== NEVER TAKEN
2002790: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
2002794: 80 a0 60 2f cmp %g1, 0x2f
2002798: 22 80 00 15 be,a 20027ec <rtems_filesystem_evaluate_path+0x80>
200279c: 03 00 80 6b sethi %hi(0x201ac00), %g1
20027a0: 80 a0 60 00 cmp %g1, 0
20027a4: 02 80 00 12 be 20027ec <rtems_filesystem_evaluate_path+0x80><== NEVER TAKEN
20027a8: 03 00 80 6b sethi %hi(0x201ac00), %g1
20027ac: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 201ac80 <rtems_current_user_env>
20027b0: 86 10 20 00 clr %g3
20027b4: c8 00 a0 04 ld [ %g2 + 4 ], %g4
20027b8: 82 10 20 00 clr %g1
20027bc: c8 26 c0 00 st %g4, [ %i3 ]
20027c0: c8 00 a0 08 ld [ %g2 + 8 ], %g4
20027c4: c8 26 e0 04 st %g4, [ %i3 + 4 ]
20027c8: c8 00 a0 0c ld [ %g2 + 0xc ], %g4
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
20027cc: b2 26 40 01 sub %i1, %g1, %i1
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
20027d0: c8 26 e0 08 st %g4, [ %i3 + 8 ]
20027d4: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4
20027d8: c8 26 e0 0c st %g4, [ %i3 + 0xc ]
20027dc: c4 00 a0 14 ld [ %g2 + 0x14 ], %g2
20027e0: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
20027e4: 7f ff ff a1 call 2002668 <rtems_filesystem_evaluate_relative_path>
20027e8: 91 ee 00 03 restore %i0, %g3, %o0
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
20027ec: c4 00 60 80 ld [ %g1 + 0x80 ], %g2
20027f0: 86 10 20 01 mov 1, %g3
20027f4: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
20027f8: 82 10 20 01 mov 1, %g1
20027fc: c8 26 c0 00 st %g4, [ %i3 ]
2002800: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4
2002804: c8 26 e0 04 st %g4, [ %i3 + 4 ]
2002808: c8 00 a0 20 ld [ %g2 + 0x20 ], %g4
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
200280c: b2 26 40 01 sub %i1, %g1, %i1
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
2002810: c8 26 e0 08 st %g4, [ %i3 + 8 ]
2002814: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4
2002818: c8 26 e0 0c st %g4, [ %i3 + 0xc ]
200281c: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2
2002820: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
2002824: 7f ff ff 91 call 2002668 <rtems_filesystem_evaluate_relative_path>
2002828: 91 ee 00 03 restore %i0, %g3, %o0
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
200282c: 40 00 30 44 call 200e93c <__errno> <== NOT EXECUTED
2002830: 01 00 00 00 nop <== NOT EXECUTED
2002834: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2002838: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
200283c: 81 c7 e0 08 ret <== NOT EXECUTED
2002840: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
2002844: 40 00 30 3e call 200e93c <__errno> <== NOT EXECUTED
2002848: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200284c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2002850: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002854: 81 c7 e0 08 ret <== NOT EXECUTED
2002858: 81 e8 00 00 restore <== NOT EXECUTED
02002668 <rtems_filesystem_evaluate_relative_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2002668: 9d e3 bf a0 save %sp, -96, %sp
/*
* Verify Input parameters.
*/
if ( !pathname )
200266c: 80 a6 20 00 cmp %i0, 0
2002670: 02 80 00 33 be 200273c <rtems_filesystem_evaluate_relative_path+0xd4><== NEVER TAKEN
2002674: 80 a6 e0 00 cmp %i3, 0
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
2002678: 02 80 00 37 be 2002754 <rtems_filesystem_evaluate_relative_path+0xec><== NEVER TAKEN
200267c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
2002680: c2 06 e0 0c ld [ %i3 + 0xc ], %g1
2002684: c2 00 40 00 ld [ %g1 ], %g1
2002688: 80 a0 60 00 cmp %g1, 0
200268c: 02 80 00 26 be 2002724 <rtems_filesystem_evaluate_relative_path+0xbc><== NEVER TAKEN
2002690: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
2002694: 92 10 00 19 mov %i1, %o1
2002698: 94 10 00 1a mov %i2, %o2
200269c: 9f c0 40 00 call %g1
20026a0: 96 10 00 1b mov %i3, %o3
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
20026a4: b0 92 20 00 orcc %o0, 0, %i0
20026a8: 12 80 00 0f bne 20026e4 <rtems_filesystem_evaluate_relative_path+0x7c>
20026ac: 80 a7 20 00 cmp %i4, 0
20026b0: 02 80 00 2d be 2002764 <rtems_filesystem_evaluate_relative_path+0xfc>
20026b4: 01 00 00 00 nop
if ( !pathloc->ops->node_type_h ){
20026b8: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
20026bc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
20026c0: 80 a0 60 00 cmp %g1, 0
20026c4: 22 80 00 13 be,a 2002710 <rtems_filesystem_evaluate_relative_path+0xa8><== NEVER TAKEN
20026c8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
20026cc: 9f c0 40 00 call %g1
20026d0: 90 10 00 1b mov %i3, %o0
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
20026d4: 90 02 3f fd add %o0, -3, %o0
20026d8: 80 a2 20 01 cmp %o0, 1
20026dc: 28 80 00 04 bleu,a 20026ec <rtems_filesystem_evaluate_relative_path+0x84>
20026e0: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
20026e4: 81 c7 e0 08 ret
20026e8: 81 e8 00 00 restore
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
20026ec: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1
20026f0: 80 a0 60 00 cmp %g1, 0
20026f4: 02 80 00 06 be 200270c <rtems_filesystem_evaluate_relative_path+0xa4><== NEVER TAKEN
20026f8: 90 10 00 1b mov %i3, %o0
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
20026fc: 9f c0 40 00 call %g1
2002700: 92 10 00 1a mov %i2, %o1
}
}
return result;
}
2002704: 81 c7 e0 08 ret
2002708: 91 e8 00 08 restore %g0, %o0, %o0
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
200270c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2002710: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002714: 02 80 00 04 be 2002724 <rtems_filesystem_evaluate_relative_path+0xbc><== NOT EXECUTED
2002718: 01 00 00 00 nop <== NOT EXECUTED
200271c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002720: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2002724: 40 00 30 86 call 200e93c <__errno> <== NOT EXECUTED
2002728: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200272c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002730: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002734: 81 c7 e0 08 ret <== NOT EXECUTED
2002738: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
200273c: 40 00 30 80 call 200e93c <__errno> <== NOT EXECUTED
2002740: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002744: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2002748: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200274c: 81 c7 e0 08 ret <== NOT EXECUTED
2002750: 81 e8 00 00 restore <== NOT EXECUTED
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
2002754: 40 00 30 7a call 200e93c <__errno> <== NOT EXECUTED
2002758: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200275c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2002760: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002764: 81 c7 e0 08 ret
2002768: 81 e8 00 00 restore
02002414 <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 )
{
2002414: 9d e3 bf 88 save %sp, -120, %sp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
2002418: 21 00 80 6b sethi %hi(0x201ac00), %l0
200241c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
2002420: 84 10 20 12 mov 0x12, %g2
init_fs_mount_table();
2002424: 40 00 01 ea call 2002bcc <init_fs_mount_table>
2002428: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
200242c: 03 00 80 66 sethi %hi(0x2019800), %g1
2002430: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 2019880 <rtems_filesystem_mount_table_size>
2002434: 80 a0 60 00 cmp %g1, 0
2002438: 02 80 00 45 be 200254c <rtems_filesystem_initialize+0x138><== NEVER TAKEN
200243c: 03 00 80 6a sethi %hi(0x201a800), %g1
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
2002440: c2 00 62 cc ld [ %g1 + 0x2cc ], %g1 ! 201aacc <rtems_filesystem_mount_table>
status = mount(
2002444: 90 07 bf fc add %fp, -4, %o0
2002448: d8 00 60 0c ld [ %g1 + 0xc ], %o4
200244c: d2 00 40 00 ld [ %g1 ], %o1
2002450: d4 00 60 04 ld [ %g1 + 4 ], %o2
2002454: 40 00 01 e6 call 2002bec <mount>
2002458: d6 00 60 08 ld [ %g1 + 8 ], %o3
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
200245c: 80 a2 3f ff cmp %o0, -1
2002460: 02 80 00 40 be 2002560 <rtems_filesystem_initialize+0x14c><== NEVER TAKEN
2002464: c4 07 bf fc ld [ %fp + -4 ], %g2
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
2002468: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
200246c: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
2002470: c0 30 60 30 clrh [ %g1 + 0x30 ]
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
2002474: c6 20 60 18 st %g3, [ %g1 + 0x18 ]
2002478: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
200247c: a4 07 bf e8 add %fp, -24, %l2
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
2002480: c6 20 60 1c st %g3, [ %g1 + 0x1c ]
2002484: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002488: 23 00 80 67 sethi %hi(0x2019c00), %l1
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
200248c: c6 20 60 20 st %g3, [ %g1 + 0x20 ]
2002490: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002494: 92 10 20 01 mov 1, %o1
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
2002498: c6 20 60 24 st %g3, [ %g1 + 0x24 ]
200249c: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024a0: 94 10 20 00 clr %o2
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
20024a4: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024a8: 96 10 00 12 mov %l2, %o3
20024ac: 98 10 20 00 clr %o4
20024b0: 40 00 00 af call 200276c <rtems_filesystem_evaluate_path>
20024b4: 90 14 60 60 or %l1, 0x60, %o0
rtems_filesystem_root = loc;
20024b8: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
20024bc: c4 07 bf e8 ld [ %fp + -24 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024c0: 96 10 00 12 mov %l2, %o3
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
20024c4: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
20024c8: c4 07 bf ec ld [ %fp + -20 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024cc: 92 10 20 01 mov 1, %o1
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
20024d0: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
20024d4: c4 07 bf f0 ld [ %fp + -16 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024d8: 94 10 20 00 clr %o2
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
20024dc: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
20024e0: c4 07 bf f4 ld [ %fp + -12 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024e4: 98 10 20 00 clr %o4
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
20024e8: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
20024ec: c4 07 bf f8 ld [ %fp + -8 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
20024f0: 90 14 60 60 or %l1, 0x60, %o0
20024f4: 40 00 00 9e call 200276c <rtems_filesystem_evaluate_path>
20024f8: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
rtems_filesystem_current = loc;
20024fc: c4 07 bf e8 ld [ %fp + -24 ], %g2
2002500: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
*
* 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);
2002504: 11 00 80 67 sethi %hi(0x2019c00), %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;
2002508: c4 20 60 04 st %g2, [ %g1 + 4 ]
200250c: 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);
2002510: 90 12 20 68 or %o0, 0x68, %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;
2002514: c4 20 60 08 st %g2, [ %g1 + 8 ]
2002518: 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);
200251c: 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;
2002520: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2002524: c4 07 bf f4 ld [ %fp + -12 ], %g2
2002528: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
200252c: c4 07 bf f8 ld [ %fp + -8 ], %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);
2002530: 40 00 01 3f call 2002a2c <mkdir>
2002534: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
if ( status != 0 )
2002538: 80 a2 20 00 cmp %o0, 0
200253c: 12 80 00 07 bne 2002558 <rtems_filesystem_initialize+0x144><== NEVER TAKEN
2002540: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
2002544: 81 c7 e0 08 ret
2002548: 81 e8 00 00 restore
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
200254c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
2002550: 40 00 10 5a call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002554: 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 );
2002558: 40 00 10 58 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200255c: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED
status = mount(
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
2002560: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
2002564: 40 00 10 55 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002568: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <RAM_END+0xa98d0002><== NOT EXECUTED
02009e44 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
2009e44: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2009e48: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED
2009e4c: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED
2009e50: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
2009e54: 81 c3 e0 08 retl <== NOT EXECUTED
2009e58: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
02002570 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
2002570: 82 10 00 08 mov %o0, %g1
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
2002574: 80 a2 60 00 cmp %o1, 0
2002578: 02 80 00 1c be 20025e8 <rtems_filesystem_prefix_separators+0x78><== NEVER TAKEN
200257c: c4 0a 00 00 ldub [ %o0 ], %g2
2002580: 85 28 a0 18 sll %g2, 0x18, %g2
2002584: 85 38 a0 18 sra %g2, 0x18, %g2
2002588: 80 a0 a0 00 cmp %g2, 0
200258c: 02 80 00 17 be 20025e8 <rtems_filesystem_prefix_separators+0x78><== NEVER TAKEN
2002590: 80 a0 a0 5c cmp %g2, 0x5c
2002594: 12 80 00 13 bne 20025e0 <rtems_filesystem_prefix_separators+0x70><== ALWAYS TAKEN
2002598: 80 a0 a0 2f cmp %g2, 0x2f
200259c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
pathname++;
pathnamelen--;
stripped++;
20025a0: 90 02 20 01 inc %o0
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
20025a4: 80 a2 40 08 cmp %o1, %o0
20025a8: 02 80 00 0c be 20025d8 <rtems_filesystem_prefix_separators+0x68><== NEVER TAKEN
20025ac: c4 08 40 08 ldub [ %g1 + %o0 ], %g2
20025b0: 85 28 a0 18 sll %g2, 0x18, %g2
20025b4: 85 38 a0 18 sra %g2, 0x18, %g2
20025b8: 80 a0 a0 00 cmp %g2, 0
20025bc: 02 80 00 07 be 20025d8 <rtems_filesystem_prefix_separators+0x68><== NEVER TAKEN
20025c0: 80 a0 a0 5c cmp %g2, 0x5c
20025c4: 22 bf ff f8 be,a 20025a4 <rtems_filesystem_prefix_separators+0x34><== NEVER TAKEN
20025c8: 90 02 20 01 inc %o0 <== NOT EXECUTED
20025cc: 80 a0 a0 2f cmp %g2, 0x2f
20025d0: 22 bf ff f5 be,a 20025a4 <rtems_filesystem_prefix_separators+0x34><== NEVER TAKEN
20025d4: 90 02 20 01 inc %o0 <== NOT EXECUTED
20025d8: 81 c3 e0 08 retl
20025dc: 01 00 00 00 nop
20025e0: 22 bf ff f0 be,a 20025a0 <rtems_filesystem_prefix_separators+0x30>
20025e4: 90 10 20 00 clr %o0 ! 0 <PROM_START>
20025e8: 90 10 20 00 clr %o0
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
20025ec: 81 c3 e0 08 retl
020022cc <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
20022cc: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED
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( name, strlen( name ), 0x00, &loc, true );
20022d0: 40 00 35 53 call 200f81c <strlen> <== NOT EXECUTED
20022d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20022d8: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED
20022dc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20022e0: 94 10 20 00 clr %o2 <== NOT EXECUTED
20022e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20022e8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
20022ec: 40 00 01 20 call 200276c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
20022f0: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
20022f4: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
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( name, strlen( name ), 0x00, &loc, true );
20022f8: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
20022fc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
2002300: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002304: 02 80 00 13 be 2002350 <rtems_io_lookup_name+0x84> <== NOT EXECUTED
2002308: e4 07 bf ec ld [ %fp + -20 ], %l2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
200230c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002310: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2002314: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED
2002318: 02 80 00 1a be 2002380 <rtems_io_lookup_name+0xb4> <== NOT EXECUTED
200231c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2002320: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2002324: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002328: 02 80 00 2b be 20023d4 <rtems_io_lookup_name+0x108> <== NOT EXECUTED
200232c: 01 00 00 00 nop <== NOT EXECUTED
2002330: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2002334: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002338: 02 80 00 27 be 20023d4 <rtems_io_lookup_name+0x108> <== NOT EXECUTED
200233c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002340: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002344: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
2002348: 81 c7 e0 08 ret <== NOT EXECUTED
200234c: 81 e8 00 00 restore <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
2002350: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2002354: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002358: 02 80 00 04 be 2002368 <rtems_io_lookup_name+0x9c> <== NOT EXECUTED
200235c: 01 00 00 00 nop <== NOT EXECUTED
2002360: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002364: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2002368: 40 00 31 75 call 200e93c <__errno> <== NOT EXECUTED
200236c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002370: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002374: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002378: 81 c7 e0 08 ret <== NOT EXECUTED
200237c: 81 e8 00 00 restore <== NOT EXECUTED
}
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2002380: 12 bf ff e9 bne 2002324 <rtems_io_lookup_name+0x58> <== NOT EXECUTED
2002384: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
2002388: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
200238c: 40 00 35 24 call 200f81c <strlen> <== NOT EXECUTED
2002390: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2002394: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
2002398: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
200239c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
20023a0: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
20023a4: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
20023a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20023ac: 02 80 00 0c be 20023dc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
20023b0: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED
20023b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20023b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20023bc: 02 80 00 08 be 20023dc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
20023c0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20023c4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20023c8: b0 10 20 00 clr %i0 <== NOT EXECUTED
20023cc: 81 c7 e0 08 ret <== NOT EXECUTED
20023d0: 81 e8 00 00 restore <== NOT EXECUTED
20023d4: 81 c7 e0 08 ret <== NOT EXECUTED
20023d8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
20023dc: 81 c7 e0 08 ret <== NOT EXECUTED
20023e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02008558 <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
)
{
2008558: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
200855c: 03 00 80 86 sethi %hi(0x2021800), %g1
2008560: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 2021a6c <_ISR_Nest_level>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
2008564: 09 00 80 87 sethi %hi(0x2021c00), %g4
if ( rtems_interrupt_is_in_progress() )
2008568: 80 a0 60 00 cmp %g1, 0
200856c: 84 10 20 12 mov 0x12, %g2
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
)
{
2008570: 82 10 00 19 mov %i1, %g1
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2008574: 12 80 00 49 bne 2008698 <rtems_io_register_driver+0x140>
2008578: c6 01 20 d0 ld [ %g4 + 0xd0 ], %g3
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
200857c: 80 a6 a0 00 cmp %i2, 0
2008580: 02 80 00 4b be 20086ac <rtems_io_register_driver+0x154>
2008584: 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 )
2008588: 02 80 00 49 be 20086ac <rtems_io_register_driver+0x154>
200858c: c6 26 80 00 st %g3, [ %i2 ]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008590: c4 06 40 00 ld [ %i1 ], %g2
2008594: 80 a0 a0 00 cmp %g2, 0
2008598: 22 80 00 42 be,a 20086a0 <rtems_io_register_driver+0x148>
200859c: 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 )
20085a0: 80 a0 c0 18 cmp %g3, %i0
20085a4: 08 80 00 3d bleu 2008698 <rtems_io_register_driver+0x140>
20085a8: 84 10 20 0a mov 0xa, %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20085ac: 05 00 80 86 sethi %hi(0x2021800), %g2
20085b0: c6 00 a1 d0 ld [ %g2 + 0x1d0 ], %g3 ! 20219d0 <_Thread_Dispatch_disable_level>
20085b4: 86 00 e0 01 inc %g3
20085b8: c6 20 a1 d0 st %g3, [ %g2 + 0x1d0 ]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
20085bc: 80 a6 20 00 cmp %i0, 0
20085c0: 12 80 00 2b bne 200866c <rtems_io_register_driver+0x114>
20085c4: 05 00 80 87 sethi %hi(0x2021c00), %g2
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
20085c8: da 01 20 d0 ld [ %g4 + 0xd0 ], %o5
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
20085cc: 80 a3 60 00 cmp %o5, 0
20085d0: 02 80 00 3a be 20086b8 <rtems_io_register_driver+0x160> <== NEVER TAKEN
20085d4: d8 00 a0 d4 ld [ %g2 + 0xd4 ], %o4
20085d8: 10 80 00 05 b 20085ec <rtems_io_register_driver+0x94>
20085dc: 86 10 00 0c mov %o4, %g3
20085e0: 80 a3 40 18 cmp %o5, %i0
20085e4: 08 80 00 0b bleu 2008610 <rtems_io_register_driver+0xb8>
20085e8: 86 00 e0 18 add %g3, 0x18, %g3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
20085ec: c8 00 c0 00 ld [ %g3 ], %g4
20085f0: 80 a1 20 00 cmp %g4, 0
20085f4: 32 bf ff fb bne,a 20085e0 <rtems_io_register_driver+0x88>
20085f8: b0 06 20 01 inc %i0
20085fc: c8 00 e0 04 ld [ %g3 + 4 ], %g4
2008600: 80 a1 20 00 cmp %g4, 0
2008604: 32 bf ff f7 bne,a 20085e0 <rtems_io_register_driver+0x88>
2008608: b0 06 20 01 inc %i0
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
200860c: 80 a3 40 18 cmp %o5, %i0
2008610: 02 80 00 2b be 20086bc <rtems_io_register_driver+0x164>
2008614: f0 26 80 00 st %i0, [ %i2 ]
2008618: 85 2e 20 03 sll %i0, 3, %g2
200861c: 87 2e 20 05 sll %i0, 5, %g3
2008620: 84 20 c0 02 sub %g3, %g2, %g2
2008624: 84 03 00 02 add %o4, %g2, %g2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2008628: c6 00 40 00 ld [ %g1 ], %g3
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
200862c: b2 10 20 00 clr %i1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2008630: c6 20 80 00 st %g3, [ %g2 ]
2008634: c6 00 60 04 ld [ %g1 + 4 ], %g3
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2008638: b4 10 20 00 clr %i2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
200863c: c6 20 a0 04 st %g3, [ %g2 + 4 ]
2008640: c6 00 60 08 ld [ %g1 + 8 ], %g3
2008644: c6 20 a0 08 st %g3, [ %g2 + 8 ]
2008648: c6 00 60 0c ld [ %g1 + 0xc ], %g3
200864c: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
2008650: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
2008654: c6 20 a0 10 st %g3, [ %g2 + 0x10 ]
2008658: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
_Thread_Enable_dispatch();
200865c: 40 00 07 2b call 200a308 <_Thread_Enable_dispatch>
2008660: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
return rtems_io_initialize( major, 0, NULL );
2008664: 40 00 24 c9 call 2011988 <rtems_io_initialize>
2008668: 81 e8 00 00 restore
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
200866c: c6 00 a0 d4 ld [ %g2 + 0xd4 ], %g3
2008670: 89 2e 20 05 sll %i0, 5, %g4
2008674: 85 2e 20 03 sll %i0, 3, %g2
2008678: 84 21 00 02 sub %g4, %g2, %g2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
200867c: c8 00 c0 02 ld [ %g3 + %g2 ], %g4
2008680: 80 a1 20 00 cmp %g4, 0
2008684: 02 80 00 12 be 20086cc <rtems_io_register_driver+0x174>
2008688: 84 00 c0 02 add %g3, %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();
200868c: 40 00 07 1f call 200a308 <_Thread_Enable_dispatch>
2008690: 01 00 00 00 nop
2008694: 84 10 20 0c mov 0xc, %g2 ! c <PROM_START+0xc>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2008698: 81 c7 e0 08 ret
200869c: 91 e8 00 02 restore %g0, %g2, %o0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
20086a0: 80 a0 a0 00 cmp %g2, 0
20086a4: 12 bf ff c0 bne 20085a4 <rtems_io_register_driver+0x4c>
20086a8: 80 a0 c0 18 cmp %g3, %i0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
20086ac: 84 10 20 09 mov 9, %g2
}
20086b0: 81 c7 e0 08 ret
20086b4: 91 e8 00 02 restore %g0, %g2, %o0
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
20086b8: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
20086bc: 40 00 07 13 call 200a308 <_Thread_Enable_dispatch>
20086c0: 01 00 00 00 nop
return sc;
20086c4: 10 bf ff f5 b 2008698 <rtems_io_register_driver+0x140>
20086c8: 84 10 20 05 mov 5, %g2 ! 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;
20086cc: c6 00 a0 04 ld [ %g2 + 4 ], %g3
20086d0: 80 a0 e0 00 cmp %g3, 0
20086d4: 12 bf ff ee bne 200868c <rtems_io_register_driver+0x134>
20086d8: 01 00 00 00 nop
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
20086dc: 10 bf ff d3 b 2008628 <rtems_io_register_driver+0xd0>
20086e0: f0 26 80 00 st %i0, [ %i2 ]
02008ff8 <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)
{
2008ff8: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
2008ffc: 80 a6 20 00 cmp %i0, 0
2009000: 02 80 00 23 be 200908c <rtems_iterate_over_all_threads+0x94><== NEVER TAKEN
2009004: 25 00 80 a6 sethi %hi(0x2029800), %l2
2009008: a4 14 a3 04 or %l2, 0x304, %l2 ! 2029b04 <_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)
200900c: a6 04 a0 10 add %l2, 0x10, %l3
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
2009010: c2 04 80 00 ld [ %l2 ], %g1
2009014: 80 a0 60 00 cmp %g1, 0
2009018: 22 80 00 1a be,a 2009080 <rtems_iterate_over_all_threads+0x88>
200901c: a4 04 a0 04 add %l2, 4, %l2
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
2009020: e2 00 60 04 ld [ %g1 + 4 ], %l1
if ( !information )
2009024: 80 a4 60 00 cmp %l1, 0
2009028: 22 80 00 16 be,a 2009080 <rtems_iterate_over_all_threads+0x88>
200902c: a4 04 a0 04 add %l2, 4, %l2
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
2009030: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1
2009034: 84 90 60 00 orcc %g1, 0, %g2
2009038: 22 80 00 12 be,a 2009080 <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
200903c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
2009040: a0 10 20 01 mov 1, %l0
the_thread = (Thread_Control *)information->local_table[ i ];
2009044: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
2009048: 83 2c 20 02 sll %l0, 2, %g1
200904c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if ( !the_thread )
2009050: 90 90 60 00 orcc %g1, 0, %o0
2009054: 02 80 00 05 be 2009068 <rtems_iterate_over_all_threads+0x70><== NEVER TAKEN
2009058: a0 04 20 01 inc %l0
continue;
(*routine)(the_thread);
200905c: 9f c6 00 00 call %i0
2009060: 01 00 00 00 nop
2009064: c4 14 60 10 lduh [ %l1 + 0x10 ], %g2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
2009068: 83 28 a0 10 sll %g2, 0x10, %g1
200906c: 83 30 60 10 srl %g1, 0x10, %g1
2009070: 80 a0 40 10 cmp %g1, %l0
2009074: 3a bf ff f5 bcc,a 2009048 <rtems_iterate_over_all_threads+0x50>
2009078: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
200907c: a4 04 a0 04 add %l2, 4, %l2
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
2009080: 80 a4 80 13 cmp %l2, %l3
2009084: 32 bf ff e4 bne,a 2009014 <rtems_iterate_over_all_threads+0x1c>
2009088: c2 04 80 00 ld [ %l2 ], %g1
200908c: 81 c7 e0 08 ret
2009090: 81 e8 00 00 restore
0200b660 <rtems_libio_allocate>:
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate( void )
{
200b660: 9d e3 bf 98 save %sp, -104, %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 );
200b664: 21 00 80 6d sethi %hi(0x201b400), %l0
200b668: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 ! 201b44c <rtems_libio_semaphore>
200b66c: 92 10 20 00 clr %o1
200b670: 7f ff ea 65 call 2006004 <rtems_semaphore_obtain>
200b674: 94 10 20 00 clr %o2
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
200b678: 23 00 80 6d sethi %hi(0x201b400), %l1
200b67c: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 ! 201b448 <rtems_libio_iop_freelist>
200b680: 80 a0 60 00 cmp %g1, 0
200b684: 12 80 00 07 bne 200b6a0 <rtems_libio_allocate+0x40>
200b688: 05 00 80 6d sethi %hi(0x201b400), %g2
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
200b68c: b0 10 20 00 clr %i0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200b690: 7f ff ea a4 call 2006120 <rtems_semaphore_release>
200b694: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
200b698: 81 c7 e0 08 ret
200b69c: 81 e8 00 00 restore
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
rc = rtems_semaphore_create(
200b6a0: c4 00 a0 44 ld [ %g2 + 0x44 ], %g2
200b6a4: 92 10 20 01 mov 1, %o1
200b6a8: 82 20 40 02 sub %g1, %g2, %g1
200b6ac: 83 38 60 03 sra %g1, 3, %g1
200b6b0: 87 28 60 06 sll %g1, 6, %g3
200b6b4: 85 28 60 03 sll %g1, 3, %g2
200b6b8: 84 20 c0 02 sub %g3, %g2, %g2
200b6bc: 87 28 a0 06 sll %g2, 6, %g3
200b6c0: 84 00 80 03 add %g2, %g3, %g2
200b6c4: 84 00 80 01 add %g2, %g1, %g2
200b6c8: 87 28 a0 0f sll %g2, 0xf, %g3
200b6cc: 84 20 c0 02 sub %g3, %g2, %g2
200b6d0: 07 13 10 92 sethi %hi(0x4c424800), %g3
200b6d4: 85 28 a0 03 sll %g2, 3, %g2
200b6d8: 86 10 e1 00 or %g3, 0x100, %g3
200b6dc: 82 00 80 01 add %g2, %g1, %g1
200b6e0: 94 10 20 54 mov 0x54, %o2
200b6e4: 96 10 20 00 clr %o3
200b6e8: 90 10 40 03 or %g1, %g3, %o0
200b6ec: 7f ff e9 a5 call 2005d80 <rtems_semaphore_create>
200b6f0: 98 07 bf fc add %fp, -4, %o4
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
200b6f4: 80 a2 20 00 cmp %o0, 0
200b6f8: 32 bf ff e6 bne,a 200b690 <rtems_libio_allocate+0x30> <== NEVER TAKEN
200b6fc: b0 10 20 00 clr %i0 <== NOT EXECUTED
goto failed;
iop = rtems_libio_iop_freelist;
200b700: f0 04 60 48 ld [ %l1 + 0x48 ], %i0
next = iop->data1;
200b704: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
(void) memset( iop, 0, sizeof(rtems_libio_t) );
200b708: c0 26 20 30 clr [ %i0 + 0x30 ]
200b70c: c0 26 20 1c clr [ %i0 + 0x1c ]
200b710: c0 26 20 34 clr [ %i0 + 0x34 ]
200b714: c0 26 00 00 clr [ %i0 ]
200b718: c0 26 20 04 clr [ %i0 + 4 ]
200b71c: c0 26 20 08 clr [ %i0 + 8 ]
200b720: c0 26 20 0c clr [ %i0 + 0xc ]
200b724: c0 26 20 10 clr [ %i0 + 0x10 ]
200b728: c0 26 20 14 clr [ %i0 + 0x14 ]
200b72c: c0 26 20 20 clr [ %i0 + 0x20 ]
200b730: c0 26 20 24 clr [ %i0 + 0x24 ]
200b734: c0 26 20 28 clr [ %i0 + 0x28 ]
200b738: c0 26 20 2c clr [ %i0 + 0x2c ]
200b73c: c0 26 20 40 clr [ %i0 + 0x40 ]
200b740: c0 26 20 44 clr [ %i0 + 0x44 ]
200b744: c0 26 20 38 clr [ %i0 + 0x38 ]
200b748: c0 26 20 3c clr [ %i0 + 0x3c ]
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
200b74c: c2 24 60 48 st %g1, [ %l1 + 0x48 ]
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
200b750: 82 10 21 00 mov 0x100, %g1
200b754: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
iop->sem = sema;
200b758: c2 07 bf fc ld [ %fp + -4 ], %g1
rtems_libio_iop_freelist = next;
goto done;
200b75c: 10 bf ff cd b 200b690 <rtems_libio_allocate+0x30>
200b760: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
0200b604 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
200b604: 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 );
200b608: 23 00 80 6d sethi %hi(0x201b400), %l1
200b60c: d0 04 60 4c ld [ %l1 + 0x4c ], %o0 ! 201b44c <rtems_libio_semaphore>
200b610: 92 10 20 00 clr %o1
200b614: 7f ff ea 7c call 2006004 <rtems_semaphore_obtain>
200b618: 94 10 20 00 clr %o2
rtems_libio_lock();
if (iop->sem)
200b61c: d0 06 20 30 ld [ %i0 + 0x30 ], %o0
200b620: 80 a2 20 00 cmp %o0, 0
200b624: 02 80 00 04 be 200b634 <rtems_libio_free+0x30> <== NEVER TAKEN
200b628: a0 10 00 18 mov %i0, %l0
rtems_semaphore_delete(iop->sem);
200b62c: 7f ff ea 49 call 2005f50 <rtems_semaphore_delete>
200b630: 01 00 00 00 nop
iop->flags &= ~LIBIO_FLAGS_OPEN;
200b634: c4 04 20 18 ld [ %l0 + 0x18 ], %g2
iop->data1 = rtems_libio_iop_freelist;
200b638: 03 00 80 6d sethi %hi(0x201b400), %g1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200b63c: f0 04 60 4c ld [ %l1 + 0x4c ], %i0
200b640: c6 00 60 48 ld [ %g1 + 0x48 ], %g3
rtems_libio_iop_freelist = iop;
200b644: e0 20 60 48 st %l0, [ %g1 + 0x48 ]
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200b648: 82 08 be ff and %g2, -257, %g1
iop->data1 = rtems_libio_iop_freelist;
200b64c: c6 24 20 38 st %g3, [ %l0 + 0x38 ]
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200b650: c2 24 20 18 st %g1, [ %l0 + 0x18 ]
200b654: 7f ff ea b3 call 2006120 <rtems_semaphore_release>
200b658: 81 e8 00 00 restore
0200285c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
200285c: 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)
2002860: 21 00 80 6a sethi %hi(0x201a800), %l0
2002864: d0 04 22 c4 ld [ %l0 + 0x2c4 ], %o0 ! 201aac4 <rtems_libio_number_iops>
2002868: 80 a2 20 00 cmp %o0, 0
200286c: 22 80 00 1c be,a 20028dc <rtems_libio_init+0x80> <== NEVER TAKEN
2002870: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
2002874: 40 00 22 32 call 200b13c <calloc>
2002878: 92 10 20 48 mov 0x48, %o1
200287c: 03 00 80 6d sethi %hi(0x201b400), %g1
2002880: d0 20 60 44 st %o0, [ %g1 + 0x44 ] ! 201b444 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
2002884: 80 a2 20 00 cmp %o0, 0
2002888: 02 80 00 29 be 200292c <rtems_libio_init+0xd0> <== NEVER TAKEN
200288c: 82 10 00 08 mov %o0, %g1
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++)
2002890: c6 04 22 c4 ld [ %l0 + 0x2c4 ], %g3
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
2002894: 05 00 80 6d sethi %hi(0x201b400), %g2
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2002898: 80 a0 e0 01 cmp %g3, 1
200289c: 08 80 00 0e bleu 20028d4 <rtems_libio_init+0x78> <== NEVER TAKEN
20028a0: d0 20 a0 48 st %o0, [ %g2 + 0x48 ]
20028a4: 82 02 20 48 add %o0, 0x48, %g1
20028a8: 84 10 20 01 mov 1, %g2
iop->data1 = iop + 1;
20028ac: c2 20 7f f0 st %g1, [ %g1 + -16 ]
20028b0: 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++)
20028b4: 80 a0 80 03 cmp %g2, %g3
20028b8: 12 bf ff fd bne 20028ac <rtems_libio_init+0x50>
20028bc: 82 00 60 48 add %g1, 0x48, %g1
20028c0: 84 00 bf ff add %g2, -1, %g2
20028c4: 83 28 a0 06 sll %g2, 6, %g1
20028c8: 85 28 a0 03 sll %g2, 3, %g2
20028cc: 82 00 80 01 add %g2, %g1, %g1
20028d0: 82 02 00 01 add %o0, %g1, %g1
iop->data1 = iop + 1;
iop->data1 = NULL;
20028d4: c0 20 60 38 clr [ %g1 + 0x38 ]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
20028d8: 11 13 10 92 sethi %hi(0x4c424800), %o0
20028dc: 92 10 20 01 mov 1, %o1
20028e0: 90 12 21 4f or %o0, 0x14f, %o0
20028e4: 94 10 20 54 mov 0x54, %o2
20028e8: 96 10 20 00 clr %o3
20028ec: 19 00 80 6d sethi %hi(0x201b400), %o4
20028f0: 40 00 0d 24 call 2005d80 <rtems_semaphore_create>
20028f4: 98 13 20 4c or %o4, 0x4c, %o4 ! 201b44c <rtems_libio_semaphore>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
20028f8: 80 a2 20 00 cmp %o0, 0
20028fc: 12 80 00 0a bne 2002924 <rtems_libio_init+0xc8> <== NEVER TAKEN
2002900: 03 00 80 6a sethi %hi(0x201a800), %g1
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
2002904: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 201aac0 <rtems_fs_init_helper>
2002908: 80 a0 60 00 cmp %g1, 0
200290c: 02 80 00 04 be 200291c <rtems_libio_init+0xc0> <== NEVER TAKEN
2002910: 01 00 00 00 nop
(* rtems_fs_init_helper)();
2002914: 9f c0 40 00 call %g1
2002918: 01 00 00 00 nop
200291c: 81 c7 e0 08 ret
2002920: 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 );
2002924: 40 00 0f 65 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002928: 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);
200292c: 40 00 0f 63 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002930: 90 10 20 1a mov 0x1a, %o0 ! 1a <PROM_START+0x1a> <== NOT EXECUTED
0200b4fc <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
200b4fc: 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 );
200b500: 21 00 80 6d sethi %hi(0x201b400), %l0
200b504: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 ! 201b44c <rtems_libio_semaphore>
200b508: 92 10 20 00 clr %o1
200b50c: 7f ff ea be call 2006004 <rtems_semaphore_obtain>
200b510: 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++){
200b514: 03 00 80 6a sethi %hi(0x201a800), %g1
200b518: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
200b51c: 05 00 80 6d sethi %hi(0x201b400), %g2
200b520: 80 a0 60 00 cmp %g1, 0
200b524: 02 80 00 0e be 200b55c <rtems_libio_is_file_open+0x60> <== NEVER TAKEN
200b528: c4 00 a0 44 ld [ %g2 + 0x44 ], %g2
200b52c: 86 10 20 00 clr %g3
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200b530: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
200b534: 80 89 21 00 btst 0x100, %g4
200b538: 02 80 00 06 be 200b550 <rtems_libio_is_file_open+0x54>
200b53c: 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 ) {
200b540: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4
200b544: 80 a1 00 18 cmp %g4, %i0
200b548: 02 80 00 0a be 200b570 <rtems_libio_is_file_open+0x74>
200b54c: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200b550: 80 a0 c0 01 cmp %g3, %g1
200b554: 0a bf ff f7 bcs 200b530 <rtems_libio_is_file_open+0x34>
200b558: 84 00 a0 48 add %g2, 0x48, %g2
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200b55c: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
200b560: 7f ff ea f0 call 2006120 <rtems_semaphore_release>
200b564: b0 10 20 00 clr %i0
}
rtems_libio_unlock();
return result;
}
200b568: 81 c7 e0 08 ret
200b56c: 81 e8 00 00 restore
200b570: 7f ff ea ec call 2006120 <rtems_semaphore_release>
200b574: b0 10 20 01 mov 1, %i0
200b578: 81 c7 e0 08 ret
200b57c: 81 e8 00 00 restore
0200b580 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
200b580: 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 );
200b584: 21 00 80 6d sethi %hi(0x201b400), %l0
200b588: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 ! 201b44c <rtems_libio_semaphore>
200b58c: 92 10 20 00 clr %o1
200b590: 7f ff ea 9d call 2006004 <rtems_semaphore_obtain>
200b594: 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++){
200b598: 03 00 80 6a sethi %hi(0x201a800), %g1
200b59c: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
200b5a0: 05 00 80 6d sethi %hi(0x201b400), %g2
200b5a4: 80 a0 60 00 cmp %g1, 0
200b5a8: 02 80 00 0e be 200b5e0 <rtems_libio_is_open_files_in_fs+0x60><== NEVER TAKEN
200b5ac: c4 00 a0 44 ld [ %g2 + 0x44 ], %g2
200b5b0: 86 10 20 00 clr %g3
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200b5b4: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
200b5b8: 80 89 21 00 btst 0x100, %g4
200b5bc: 02 80 00 06 be 200b5d4 <rtems_libio_is_open_files_in_fs+0x54>
200b5c0: 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 ) {
200b5c4: c8 00 a0 2c ld [ %g2 + 0x2c ], %g4
200b5c8: 80 a1 00 18 cmp %g4, %i0
200b5cc: 02 80 00 0a be 200b5f4 <rtems_libio_is_open_files_in_fs+0x74>
200b5d0: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200b5d4: 80 a0 c0 01 cmp %g3, %g1
200b5d8: 0a bf ff f7 bcs 200b5b4 <rtems_libio_is_open_files_in_fs+0x34>
200b5dc: 84 00 a0 48 add %g2, 0x48, %g2
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200b5e0: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
200b5e4: 7f ff ea cf call 2006120 <rtems_semaphore_release>
200b5e8: b0 10 20 00 clr %i0
}
rtems_libio_unlock();
return result;
}
200b5ec: 81 c7 e0 08 ret
200b5f0: 81 e8 00 00 restore
200b5f4: 7f ff ea cb call 2006120 <rtems_semaphore_release>
200b5f8: b0 10 20 01 mov 1, %i0
200b5fc: 81 c7 e0 08 ret
200b600: 81 e8 00 00 restore
0200459c <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
200459c: 9d e3 bf 88 save %sp, -120, %sp
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
20045a0: 90 10 20 00 clr %o0
20045a4: 92 10 20 00 clr %o1
20045a8: 40 00 0c 10 call 20075e8 <rtems_task_ident>
20045ac: 94 07 bf fc add %fp, -4, %o2
if (sc != RTEMS_SUCCESSFUL) return sc;
20045b0: b0 92 20 00 orcc %o0, 0, %i0
20045b4: 12 80 00 51 bne 20046f8 <rtems_libio_set_private_env+0x15c><== NEVER TAKEN
20045b8: 21 00 80 75 sethi %hi(0x201d400), %l0
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
20045bc: e6 04 21 78 ld [ %l0 + 0x178 ], %l3 ! 201d578 <rtems_current_user_env>
20045c0: 23 00 80 77 sethi %hi(0x201dc00), %l1
20045c4: a2 14 61 98 or %l1, 0x198, %l1 ! 201dd98 <rtems_global_user_env>
20045c8: 80 a4 c0 11 cmp %l3, %l1
20045cc: 02 80 00 3a be 20046b4 <rtems_libio_set_private_env+0x118>
20045d0: a4 14 21 78 or %l0, 0x178, %l2
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
20045d4: 92 10 00 11 mov %l1, %o1
20045d8: 94 10 20 48 mov 0x48, %o2
20045dc: 40 00 33 11 call 2011220 <memcpy>
20045e0: 90 10 00 13 mov %l3, %o0
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
20045e4: 03 00 80 77 sethi %hi(0x201dc00), %g1
20045e8: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 201dd80 <rtems_filesystem_mount_table_control>
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
20045ec: c6 07 bf fc ld [ %fp + -4 ], %g3
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
20045f0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
20045f4: c6 24 c0 00 st %g3, [ %l3 ]
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
20045f8: c4 24 e0 18 st %g2, [ %l3 + 0x18 ]
20045fc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004600: a2 07 bf e8 add %fp, -24, %l1
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2004604: c4 24 e0 1c st %g2, [ %l3 + 0x1c ]
2004608: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
200460c: 25 00 80 71 sethi %hi(0x201c400), %l2
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2004610: c4 24 e0 20 st %g2, [ %l3 + 0x20 ]
2004614: c4 00 60 28 ld [ %g1 + 0x28 ], %g2
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004618: 92 10 20 01 mov 1, %o1
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
200461c: c4 24 e0 24 st %g2, [ %l3 + 0x24 ]
2004620: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004624: 94 10 20 00 clr %o2
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2004628: c2 24 e0 28 st %g1, [ %l3 + 0x28 ]
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
200462c: 96 10 00 11 mov %l1, %o3
2004630: 98 10 20 00 clr %o4
2004634: 7f ff fa 9f call 20030b0 <rtems_filesystem_evaluate_path>
2004638: 90 14 a0 a0 or %l2, 0xa0, %o0
rtems_filesystem_root = loc;
200463c: c2 04 21 78 ld [ %l0 + 0x178 ], %g1
2004640: c4 07 bf e8 ld [ %fp + -24 ], %g2
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004644: 90 14 a0 a0 or %l2, 0xa0, %o0
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2004648: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
200464c: c4 07 bf ec ld [ %fp + -20 ], %g2
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004650: 96 10 00 11 mov %l1, %o3
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2004654: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
2004658: c4 07 bf f0 ld [ %fp + -16 ], %g2
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
200465c: 92 10 20 01 mov 1, %o1
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2004660: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
2004664: c4 07 bf f4 ld [ %fp + -12 ], %g2
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004668: 94 10 20 00 clr %o2
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
200466c: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2004670: c4 07 bf f8 ld [ %fp + -8 ], %g2
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2004674: 98 10 20 00 clr %o4
2004678: 7f ff fa 8e call 20030b0 <rtems_filesystem_evaluate_path>
200467c: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
rtems_filesystem_current = loc;
2004680: c4 07 bf e8 ld [ %fp + -24 ], %g2
2004684: c2 04 21 78 ld [ %l0 + 0x178 ], %g1
2004688: c4 20 60 04 st %g2, [ %g1 + 4 ]
200468c: c4 07 bf ec ld [ %fp + -20 ], %g2
2004690: c4 20 60 08 st %g2, [ %g1 + 8 ]
2004694: c4 07 bf f0 ld [ %fp + -16 ], %g2
2004698: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200469c: c4 07 bf f4 ld [ %fp + -12 ], %g2
20046a0: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
20046a4: c4 07 bf f8 ld [ %fp + -8 ], %g2
20046a8: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
return RTEMS_SUCCESSFUL;
}
20046ac: 81 c7 e0 08 ret
20046b0: 91 e8 20 00 restore %g0, 0, %o0
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
20046b4: 90 10 20 48 mov 0x48, %o0
20046b8: 7f ff fc 5f call 2003834 <malloc>
20046bc: b0 10 20 1a mov 0x1a, %i0
if (!tmp)
20046c0: a6 92 20 00 orcc %o0, 0, %l3
20046c4: 02 80 00 0d be 20046f8 <rtems_libio_set_private_env+0x15c><== NEVER TAKEN
20046c8: 92 10 00 12 mov %l2, %o1
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
20046cc: 90 10 20 00 clr %o0
20046d0: 15 00 80 11 sethi %hi(0x2004400), %o2
20046d4: 40 00 0c 20 call 2007754 <rtems_task_variable_add>
20046d8: 94 12 a0 68 or %o2, 0x68, %o2 ! 2004468 <free_user_env>
if (sc != RTEMS_SUCCESSFUL) {
20046dc: b0 92 20 00 orcc %o0, 0, %i0
20046e0: 12 80 00 04 bne 20046f0 <rtems_libio_set_private_env+0x154><== NEVER TAKEN
20046e4: 01 00 00 00 nop
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
20046e8: 10 bf ff bb b 20045d4 <rtems_libio_set_private_env+0x38>
20046ec: e6 24 21 78 st %l3, [ %l0 + 0x178 ]
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
20046f0: 7f ff fa ac call 20031a0 <free> <== NOT EXECUTED
20046f4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
return sc;
20046f8: 81 c7 e0 08 ret <== NOT EXECUTED
20046fc: 81 e8 00 00 restore <== NOT EXECUTED
020044e0 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) {
20044e0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
20044e4: 90 10 20 00 clr %o0 <== NOT EXECUTED
20044e8: 92 10 20 00 clr %o1 <== NOT EXECUTED
20044ec: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
20044f0: 40 00 0c 3e call 20075e8 <rtems_task_ident> <== NOT EXECUTED
20044f4: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
20044f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20044fc: 12 80 00 14 bne 200454c <rtems_libio_share_private_env+0x6c><== NOT EXECUTED
2004500: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
2004504: 21 00 80 75 sethi %hi(0x201d400), %l0 <== NOT EXECUTED
2004508: e6 04 21 78 ld [ %l0 + 0x178 ], %l3 ! 201d578 <rtems_current_user_env><== NOT EXECUTED
200450c: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
2004510: c6 04 c0 00 ld [ %l3 ], %g3 <== NOT EXECUTED
2004514: 82 14 21 78 or %l0, 0x178, %g1 <== NOT EXECUTED
2004518: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
200451c: 02 80 00 0e be 2004554 <rtems_libio_share_private_env+0x74><== NOT EXECUTED
2004520: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
2004524: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2004528: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200452c: 40 00 0c e8 call 20078cc <rtems_task_variable_get> <== NOT EXECUTED
2004530: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
2004534: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2004538: 02 80 00 10 be 2004578 <rtems_libio_share_private_env+0x98><== NOT EXECUTED
200453c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
2004540: 05 00 80 77 sethi %hi(0x201dc00), %g2 <== NOT EXECUTED
2004544: 84 10 a1 98 or %g2, 0x198, %g2 ! 201dd98 <rtems_global_user_env><== NOT EXECUTED
2004548: c4 24 21 78 st %g2, [ %l0 + 0x178 ] <== NOT EXECUTED
return sc;
}
200454c: 81 c7 e0 08 ret <== NOT EXECUTED
2004550: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
2004554: 40 00 0c b0 call 2007814 <rtems_task_variable_delete> <== NOT EXECUTED
2004558: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
200455c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2004560: 12 bf ff fb bne 200454c <rtems_libio_share_private_env+0x6c><== NOT EXECUTED
2004564: 01 00 00 00 nop <== NOT EXECUTED
free_user_env(tmp);
2004568: 7f ff ff c0 call 2004468 <free_user_env> <== NOT EXECUTED
200456c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
2004570: 10 bf ff ee b 2004528 <rtems_libio_share_private_env+0x48><== NOT EXECUTED
2004574: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
2004578: 15 00 80 11 sethi %hi(0x2004400), %o2 <== NOT EXECUTED
200457c: 40 00 0c 76 call 2007754 <rtems_task_variable_add> <== NOT EXECUTED
2004580: 94 12 a0 68 or %o2, 0x68, %o2 ! 2004468 <free_user_env> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2004584: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2004588: 12 bf ff ef bne 2004544 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
200458c: 05 00 80 77 sethi %hi(0x201dc00), %g2 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2004590: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
2004594: 10 bf ff ee b 200454c <rtems_libio_share_private_env+0x6c><== NOT EXECUTED
2004598: c4 24 21 78 st %g2, [ %l0 + 0x178 ] <== NOT EXECUTED
0200b4a4 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
200b4a4: 82 10 00 08 mov %o0, %g1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
200b4a8: 84 08 60 06 and %g1, 6, %g2
200b4ac: 80 a0 a0 06 cmp %g2, 6
200b4b0: 02 80 00 07 be 200b4cc <rtems_libio_to_fcntl_flags+0x28> <== NEVER TAKEN
200b4b4: 90 10 20 02 mov 2, %o0
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
200b4b8: 84 08 60 02 and %g1, 2, %g2
200b4bc: 80 a0 00 02 cmp %g0, %g2
200b4c0: 85 30 60 02 srl %g1, 2, %g2
200b4c4: 90 60 3f ff subx %g0, -1, %o0
200b4c8: 90 0a 00 02 and %o0, %g2, %o0
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 ) {
200b4cc: 80 88 60 01 btst 1, %g1
200b4d0: 02 80 00 04 be 200b4e0 <rtems_libio_to_fcntl_flags+0x3c>
200b4d4: 80 88 62 00 btst 0x200, %g1
fcntl_flags |= O_NONBLOCK;
200b4d8: 05 00 00 10 sethi %hi(0x4000), %g2
200b4dc: 90 12 00 02 or %o0, %g2, %o0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
200b4e0: 32 80 00 02 bne,a 200b4e8 <rtems_libio_to_fcntl_flags+0x44>
200b4e4: 90 12 20 08 or %o0, 8, %o0
fcntl_flags |= O_APPEND;
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
200b4e8: 80 88 64 00 btst 0x400, %g1
200b4ec: 32 80 00 02 bne,a 200b4f4 <rtems_libio_to_fcntl_flags+0x50>
200b4f0: 90 12 22 00 or %o0, 0x200, %o0
fcntl_flags |= O_CREAT;
}
return fcntl_flags;
}
200b4f4: 81 c3 e0 08 retl
02010e64 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
2010e64: 9d e3 bf a0 save %sp, -96, %sp
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
2010e68: a0 96 20 00 orcc %i0, 0, %l0
2010e6c: 02 80 00 20 be 2010eec <rtems_memalign+0x88>
2010e70: 03 00 80 86 sethi %hi(0x2021800), %g1
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2010e74: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 2021b70 <_System_state_Current>
2010e78: 80 a0 60 03 cmp %g1, 3
2010e7c: 02 80 00 17 be 2010ed8 <rtems_memalign+0x74> <== ALWAYS TAKEN
2010e80: c0 24 00 00 clr [ %l0 ]
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2010e84: 7f ff cc e2 call 200420c <malloc_deferred_frees_process>
2010e88: b0 10 20 0c mov 0xc, %i0
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
2010e8c: 03 00 80 83 sethi %hi(0x2020c00), %g1
2010e90: d0 00 61 c0 ld [ %g1 + 0x1c0 ], %o0 ! 2020dc0 <RTEMS_Malloc_Heap>
2010e94: 94 10 00 19 mov %i1, %o2
2010e98: 92 10 00 1a mov %i2, %o1
2010e9c: 7f ff e3 2c call 2009b4c <_Protected_heap_Allocate_aligned_with_boundary>
2010ea0: 96 10 20 00 clr %o3
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
2010ea4: b2 92 20 00 orcc %o0, 0, %i1
2010ea8: 02 80 00 12 be 2010ef0 <rtems_memalign+0x8c>
2010eac: 03 00 80 85 sethi %hi(0x2021400), %g1
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
2010eb0: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 20214b8 <rtems_malloc_statistics_helpers>
2010eb4: 80 a0 60 00 cmp %g1, 0
2010eb8: 22 80 00 06 be,a 2010ed0 <rtems_memalign+0x6c> <== ALWAYS TAKEN
2010ebc: f2 24 00 00 st %i1, [ %l0 ]
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
2010ec0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2010ec4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2010ec8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
2010ecc: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED
return 0;
2010ed0: 81 c7 e0 08 ret
2010ed4: 91 e8 20 00 restore %g0, 0, %o0
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2010ed8: 7f ff cc b4 call 20041a8 <malloc_is_system_state_OK>
2010edc: 01 00 00 00 nop
2010ee0: 80 8a 20 ff btst 0xff, %o0
2010ee4: 12 bf ff e8 bne 2010e84 <rtems_memalign+0x20> <== ALWAYS TAKEN
2010ee8: 01 00 00 00 nop
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
2010eec: b0 10 20 16 mov 0x16, %i0 ! 16 <PROM_START+0x16>
}
2010ef0: 81 c7 e0 08 ret
2010ef4: 81 e8 00 00 restore
02007c78 <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
)
{
2007c78: 9d e3 bf a0 save %sp, -96, %sp
2007c7c: 90 10 00 18 mov %i0, %o0
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
2007c80: 80 a6 a0 00 cmp %i2, 0
2007c84: 02 80 00 20 be 2007d04 <rtems_object_get_class_information+0x8c>
2007c88: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
2007c8c: 92 10 00 19 mov %i1, %o1
2007c90: 40 00 07 19 call 20098f4 <_Objects_Get_information>
2007c94: b0 10 20 0a mov 0xa, %i0
if ( !obj_info )
2007c98: 80 a2 20 00 cmp %o0, 0
2007c9c: 02 80 00 1a be 2007d04 <rtems_object_get_class_information+0x8c>
2007ca0: 01 00 00 00 nop
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2007ca4: c2 02 20 08 ld [ %o0 + 8 ], %g1
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
2007ca8: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
2007cac: c4 0a 20 12 ldub [ %o0 + 0x12 ], %g2
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2007cb0: c2 26 80 00 st %g1, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
2007cb4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
info->auto_extend = obj_info->auto_extend;
2007cb8: c4 2e a0 0c stb %g2, [ %i2 + 0xc ]
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
2007cbc: c2 26 a0 04 st %g1, [ %i2 + 4 ]
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
2007cc0: c8 26 a0 08 st %g4, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2007cc4: 80 a1 20 00 cmp %g4, 0
2007cc8: 02 80 00 0d be 2007cfc <rtems_object_get_class_information+0x84><== NEVER TAKEN
2007ccc: 84 10 20 00 clr %g2
2007cd0: da 02 20 1c ld [ %o0 + 0x1c ], %o5
2007cd4: 86 10 20 01 mov 1, %g3
2007cd8: 82 10 20 01 mov 1, %g1
if ( !obj_info->local_table[i] )
2007cdc: 87 28 e0 02 sll %g3, 2, %g3
2007ce0: c6 03 40 03 ld [ %o5 + %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++ )
2007ce4: 82 00 60 01 inc %g1
if ( !obj_info->local_table[i] )
unallocated++;
2007ce8: 80 a0 00 03 cmp %g0, %g3
2007cec: 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++ )
2007cf0: 80 a1 00 01 cmp %g4, %g1
2007cf4: 1a bf ff fa bcc 2007cdc <rtems_object_get_class_information+0x64>
2007cf8: 86 10 00 01 mov %g1, %g3
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
2007cfc: c4 26 a0 10 st %g2, [ %i2 + 0x10 ]
2007d00: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2007d04: 81 c7 e0 08 ret
2007d08: 81 e8 00 00 restore
02007fc0 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
2007fc0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
2007fc4: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
2007fc8: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED
2007fcc: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED
2007fd0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2007fd4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
2007fd8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
2007fdc: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
2007fe0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2007fe4: 7f ff ff 8a call 2007e0c <rtems_verror> <== NOT EXECUTED
2007fe8: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED
va_end(arglist);
}
2007fec: 81 c7 e0 08 ret <== NOT EXECUTED
2007ff0: 81 e8 00 00 restore <== NOT EXECUTED
02013ea4 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
2013ea4: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
2013ea8: a0 96 20 00 orcc %i0, 0, %l0
2013eac: 02 80 00 31 be 2013f70 <rtems_partition_create+0xcc>
2013eb0: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !starting_address )
2013eb4: 80 a6 60 00 cmp %i1, 0
2013eb8: 02 80 00 32 be 2013f80 <rtems_partition_create+0xdc>
2013ebc: 80 a7 60 00 cmp %i5, 0
return RTEMS_INVALID_ADDRESS;
if ( !id )
2013ec0: 02 80 00 30 be 2013f80 <rtems_partition_create+0xdc> <== NEVER TAKEN
2013ec4: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
2013ec8: 02 80 00 2c be 2013f78 <rtems_partition_create+0xd4>
2013ecc: 80 a6 a0 00 cmp %i2, 0
2013ed0: 02 80 00 2a be 2013f78 <rtems_partition_create+0xd4>
2013ed4: 80 a6 80 1b cmp %i2, %i3
2013ed8: 0a 80 00 28 bcs 2013f78 <rtems_partition_create+0xd4>
2013edc: 80 8e e0 07 btst 7, %i3
2013ee0: 12 80 00 26 bne 2013f78 <rtems_partition_create+0xd4>
2013ee4: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
2013ee8: 12 80 00 26 bne 2013f80 <rtems_partition_create+0xdc>
2013eec: 03 00 80 f3 sethi %hi(0x203cc00), %g1
2013ef0: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 203ccc0 <_Thread_Dispatch_disable_level>
2013ef4: 84 00 a0 01 inc %g2
2013ef8: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
* 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 );
2013efc: 25 00 80 f2 sethi %hi(0x203c800), %l2
2013f00: 40 00 12 4a call 2018828 <_Objects_Allocate>
2013f04: 90 14 a2 c8 or %l2, 0x2c8, %o0 ! 203cac8 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
2013f08: a2 92 20 00 orcc %o0, 0, %l1
2013f0c: 02 80 00 1f be 2013f88 <rtems_partition_create+0xe4>
2013f10: 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;
2013f14: f8 24 60 1c st %i4, [ %l1 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
2013f18: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
the_partition->length = length;
2013f1c: f4 24 60 14 st %i2, [ %l1 + 0x14 ]
the_partition->buffer_size = buffer_size;
2013f20: f6 24 60 18 st %i3, [ %l1 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2013f24: c0 24 60 20 clr [ %l1 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
2013f28: 40 00 61 eb call 202c6d4 <.udiv>
2013f2c: 90 10 00 1a mov %i2, %o0
2013f30: 92 10 00 19 mov %i1, %o1
2013f34: 94 10 00 08 mov %o0, %o2
2013f38: 96 10 00 1b mov %i3, %o3
2013f3c: b8 04 60 24 add %l1, 0x24, %i4
2013f40: 40 00 0c be call 2017238 <_Chain_Initialize>
2013f44: 90 10 00 1c mov %i4, %o0
2013f48: c2 14 60 0a lduh [ %l1 + 0xa ], %g1
2013f4c: c6 04 60 08 ld [ %l1 + 8 ], %g3
2013f50: a4 14 a2 c8 or %l2, 0x2c8, %l2
2013f54: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2013f58: e0 24 60 0c st %l0, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2013f5c: 83 28 60 02 sll %g1, 2, %g1
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
2013f60: c6 27 40 00 st %g3, [ %i5 ]
2013f64: e2 20 80 01 st %l1, [ %g2 + %g1 ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
2013f68: 40 00 16 41 call 201986c <_Thread_Enable_dispatch>
2013f6c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2013f70: 81 c7 e0 08 ret
2013f74: 81 e8 00 00 restore
}
2013f78: 81 c7 e0 08 ret
2013f7c: 91 e8 20 08 restore %g0, 8, %o0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
2013f80: 81 c7 e0 08 ret
2013f84: 91 e8 20 09 restore %g0, 9, %o0
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
2013f88: 40 00 16 39 call 201986c <_Thread_Enable_dispatch>
2013f8c: b0 10 20 05 mov 5, %i0
return RTEMS_TOO_MANY;
2013f90: 81 c7 e0 08 ret
2013f94: 81 e8 00 00 restore
0200ce10 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
200ce10: 9d e3 bf a0 save %sp, -96, %sp
if (!rtems_pipe_configured)
200ce14: 03 00 80 6c sethi %hi(0x201b000), %g1
200ce18: c2 08 61 a4 ldub [ %g1 + 0x1a4 ], %g1 ! 201b1a4 <rtems_pipe_configured>
200ce1c: 80 a0 60 00 cmp %g1, 0
200ce20: 02 80 00 13 be 200ce6c <rtems_pipe_initialize+0x5c> <== ALWAYS TAKEN
200ce24: 19 00 80 6c sethi %hi(0x201b000), %o4
return;
if (rtems_pipe_semaphore)
200ce28: c2 03 22 c8 ld [ %o4 + 0x2c8 ], %g1 ! 201b2c8 <rtems_pipe_semaphore><== NOT EXECUTED
200ce2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ce30: 12 80 00 0f bne 200ce6c <rtems_pipe_initialize+0x5c> <== NOT EXECUTED
200ce34: 98 13 22 c8 or %o4, 0x2c8, %o4 <== NOT EXECUTED
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
200ce38: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED
200ce3c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200ce40: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED
200ce44: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED
200ce48: 7f ff e3 ce call 2005d80 <rtems_semaphore_create> <== NOT EXECUTED
200ce4c: 96 10 20 00 clr %o3 <== NOT EXECUTED
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
200ce50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200ce54: 12 80 00 08 bne 200ce74 <rtems_pipe_initialize+0x64> <== NOT EXECUTED
200ce58: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
200ce5c: 7f ff e2 a5 call 20058f0 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
200ce60: 01 00 00 00 nop <== NOT EXECUTED
rtems_pipe_no = now;
200ce64: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
200ce68: d0 30 62 ce sth %o0, [ %g1 + 0x2ce ] ! 201b2ce <rtems_pipe_no><== NOT EXECUTED
200ce6c: 81 c7 e0 08 ret
200ce70: 81 e8 00 00 restore
sc = rtems_semaphore_create(
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
200ce74: 7f ff e6 11 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
02007248 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2007248: 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 *)
200724c: 11 00 80 84 sethi %hi(0x2021000), %o0
2007250: 92 10 00 18 mov %i0, %o1
2007254: 90 12 23 58 or %o0, 0x358, %o0
2007258: 40 00 09 13 call 20096a4 <_Objects_Get>
200725c: 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 ) {
2007260: c2 07 bf fc ld [ %fp + -4 ], %g1
2007264: 80 a0 60 00 cmp %g1, 0
2007268: 02 80 00 04 be 2007278 <rtems_rate_monotonic_period+0x30>
200726c: a0 10 00 08 mov %o0, %l0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007270: 81 c7 e0 08 ret
2007274: 91 e8 20 04 restore %g0, 4, %o0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2007278: 23 00 80 85 sethi %hi(0x2021400), %l1
200727c: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
2007280: c2 04 61 90 ld [ %l1 + 0x190 ], %g1
2007284: 80 a0 80 01 cmp %g2, %g1
2007288: 02 80 00 06 be 20072a0 <rtems_rate_monotonic_period+0x58>
200728c: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
2007290: 40 00 0b 8b call 200a0bc <_Thread_Enable_dispatch>
2007294: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
2007298: 81 c7 e0 08 ret
200729c: 81 e8 00 00 restore
}
if ( length == RTEMS_PERIOD_STATUS ) {
20072a0: 12 80 00 0e bne 20072d8 <rtems_rate_monotonic_period+0x90>
20072a4: 01 00 00 00 nop
switch ( the_period->state ) {
20072a8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
20072ac: 80 a0 60 04 cmp %g1, 4
20072b0: 18 80 00 06 bgu 20072c8 <rtems_rate_monotonic_period+0x80><== NEVER TAKEN
20072b4: b0 10 20 00 clr %i0
20072b8: 83 28 60 02 sll %g1, 2, %g1
20072bc: 05 00 80 7c sethi %hi(0x201f000), %g2
20072c0: 84 10 a1 78 or %g2, 0x178, %g2 ! 201f178 <CSWTCH.48>
20072c4: f0 00 80 01 ld [ %g2 + %g1 ], %i0
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
20072c8: 40 00 0b 7d call 200a0bc <_Thread_Enable_dispatch>
20072cc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20072d0: 81 c7 e0 08 ret
20072d4: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
20072d8: 7f ff ef a9 call 200317c <sparc_disable_interrupts>
20072dc: 01 00 00 00 nop
20072e0: a6 10 00 08 mov %o0, %l3
switch ( the_period->state ) {
20072e4: e4 04 20 38 ld [ %l0 + 0x38 ], %l2
20072e8: 80 a4 a0 02 cmp %l2, 2
20072ec: 02 80 00 1a be 2007354 <rtems_rate_monotonic_period+0x10c>
20072f0: 80 a4 a0 04 cmp %l2, 4
20072f4: 02 80 00 32 be 20073bc <rtems_rate_monotonic_period+0x174>
20072f8: 80 a4 a0 00 cmp %l2, 0
20072fc: 12 bf ff dd bne 2007270 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
2007300: 01 00 00 00 nop
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
2007304: 7f ff ef a2 call 200318c <sparc_enable_interrupts>
2007308: 01 00 00 00 nop
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
200730c: 7f ff ff 48 call 200702c <_Rate_monotonic_Initiate_statistics>
2007310: 90 10 00 10 mov %l0, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2007314: 82 10 20 02 mov 2, %g1
2007318: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200731c: 03 00 80 1d sethi %hi(0x2007400), %g1
2007320: 82 10 63 10 or %g1, 0x310, %g1 ! 2007710 <_Rate_monotonic_Timeout>
the_watchdog->id = id;
2007324: f0 24 20 30 st %i0, [ %l0 + 0x30 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007328: 92 04 20 10 add %l0, 0x10, %o1
200732c: 11 00 80 85 sethi %hi(0x2021400), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007330: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007334: 90 12 21 b0 or %o0, 0x1b0, %o0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007338: c0 24 20 18 clr [ %l0 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200733c: c0 24 20 34 clr [ %l0 + 0x34 ]
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
2007340: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007344: c2 24 20 2c st %g1, [ %l0 + 0x2c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007348: 40 00 10 cd call 200b67c <_Watchdog_Insert>
200734c: b0 10 20 00 clr %i0
2007350: 30 bf ff de b,a 20072c8 <rtems_rate_monotonic_period+0x80>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2007354: 7f ff ff 7d call 2007148 <_Rate_monotonic_Update_statistics>
2007358: 90 10 00 10 mov %l0, %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;
200735c: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
2007360: f2 24 20 3c st %i1, [ %l0 + 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;
2007364: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2007368: 7f ff ef 89 call 200318c <sparc_enable_interrupts>
200736c: 90 10 00 13 mov %l3, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
2007370: c2 04 61 90 ld [ %l1 + 0x190 ], %g1
2007374: c4 04 20 08 ld [ %l0 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2007378: 90 10 00 01 mov %g1, %o0
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
200737c: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2007380: 40 00 0d eb call 200ab2c <_Thread_Set_state>
2007384: 13 00 00 10 sethi %hi(0x4000), %o1
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2007388: 7f ff ef 7d call 200317c <sparc_disable_interrupts>
200738c: 01 00 00 00 nop
local_state = the_period->state;
2007390: e6 04 20 38 ld [ %l0 + 0x38 ], %l3
the_period->state = RATE_MONOTONIC_ACTIVE;
2007394: e4 24 20 38 st %l2, [ %l0 + 0x38 ]
_ISR_Enable( level );
2007398: 7f ff ef 7d call 200318c <sparc_enable_interrupts>
200739c: 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 )
20073a0: 80 a4 e0 03 cmp %l3, 3
20073a4: 02 80 00 17 be 2007400 <rtems_rate_monotonic_period+0x1b8>
20073a8: d0 04 61 90 ld [ %l1 + 0x190 ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
20073ac: 40 00 0b 44 call 200a0bc <_Thread_Enable_dispatch>
20073b0: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
20073b4: 81 c7 e0 08 ret
20073b8: 81 e8 00 00 restore
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
20073bc: 7f ff ff 63 call 2007148 <_Rate_monotonic_Update_statistics>
20073c0: 90 10 00 10 mov %l0, %o0
_ISR_Enable( level );
20073c4: 7f ff ef 72 call 200318c <sparc_enable_interrupts>
20073c8: 90 10 00 13 mov %l3, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
20073cc: 82 10 20 02 mov 2, %g1
20073d0: 92 04 20 10 add %l0, 0x10, %o1
20073d4: 11 00 80 85 sethi %hi(0x2021400), %o0
20073d8: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 20215b0 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20073dc: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
the_period->next_length = length;
20073e0: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
20073e4: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20073e8: 40 00 10 a5 call 200b67c <_Watchdog_Insert>
20073ec: b0 10 20 06 mov 6, %i0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
20073f0: 40 00 0b 33 call 200a0bc <_Thread_Enable_dispatch>
20073f4: 01 00 00 00 nop
return RTEMS_TIMEOUT;
20073f8: 81 c7 e0 08 ret
20073fc: 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 );
2007400: 40 00 0a 15 call 2009c54 <_Thread_Clear_state>
2007404: 13 00 00 10 sethi %hi(0x4000), %o1
2007408: 30 bf ff e9 b,a 20073ac <rtems_rate_monotonic_period+0x164>
0200740c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200740c: 9d e3 bf 30 save %sp, -208, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
2007410: 80 a6 60 00 cmp %i1, 0
2007414: 02 80 00 4d be 2007548 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c><== NEVER TAKEN
2007418: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
200741c: 13 00 80 7c sethi %hi(0x201f000), %o1
2007420: 9f c6 40 00 call %i1
2007424: 92 12 61 90 or %o1, 0x190, %o1 ! 201f190 <CSWTCH.48+0x18>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
2007428: 90 10 00 18 mov %i0, %o0
200742c: 13 00 80 7c sethi %hi(0x201f000), %o1
2007430: 9f c6 40 00 call %i1
2007434: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 201f1b0 <CSWTCH.48+0x38>
(*print)( context, "--- Wall times are in seconds ---\n" );
2007438: 90 10 00 18 mov %i0, %o0
200743c: 13 00 80 7c sethi %hi(0x201f000), %o1
2007440: 9f c6 40 00 call %i1
2007444: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 201f1d8 <CSWTCH.48+0x60>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
2007448: 90 10 00 18 mov %i0, %o0
200744c: 13 00 80 7c sethi %hi(0x201f000), %o1
2007450: 9f c6 40 00 call %i1
2007454: 92 12 62 00 or %o1, 0x200, %o1 ! 201f200 <CSWTCH.48+0x88>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
2007458: 90 10 00 18 mov %i0, %o0
200745c: 13 00 80 7c sethi %hi(0x201f000), %o1
2007460: 9f c6 40 00 call %i1
2007464: 92 12 62 50 or %o1, 0x250, %o1 ! 201f250 <CSWTCH.48+0xd8>
/*
* 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 ;
2007468: 23 00 80 84 sethi %hi(0x2021000), %l1
200746c: a2 14 63 58 or %l1, 0x358, %l1 ! 2021358 <_Rate_monotonic_Information>
2007470: e0 04 60 08 ld [ %l1 + 8 ], %l0
2007474: c2 04 60 0c ld [ %l1 + 0xc ], %g1
2007478: 80 a4 00 01 cmp %l0, %g1
200747c: 18 80 00 33 bgu 2007548 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c><== NEVER TAKEN
2007480: 3b 00 80 7c sethi %hi(0x201f000), %i5
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,
2007484: 39 00 80 7c sethi %hi(0x201f000), %i4
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,
2007488: 35 00 80 7c sethi %hi(0x201f000), %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
200748c: 2f 00 80 7c sethi %hi(0x201f000), %l7
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2007490: ba 17 62 a0 or %i5, 0x2a0, %i5
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,
2007494: b8 17 22 c0 or %i4, 0x2c0, %i4
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,
2007498: b4 16 a2 e0 or %i2, 0x2e0, %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
200749c: ae 15 e2 b8 or %l7, 0x2b8, %l7
20074a0: a4 07 bf a0 add %fp, -96, %l2
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
20074a4: ac 07 bf d8 add %fp, -40, %l6
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
20074a8: a6 07 bf f8 add %fp, -8, %l3
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 );
20074ac: aa 07 bf b8 add %fp, -72, %l5
20074b0: 10 80 00 06 b 20074c8 <rtems_rate_monotonic_report_statistics_with_plugin+0xbc>
20074b4: a8 07 bf f0 add %fp, -16, %l4
* 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++ ) {
20074b8: a0 04 20 01 inc %l0
/*
* 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 ;
20074bc: 80 a0 40 10 cmp %g1, %l0
20074c0: 0a 80 00 22 bcs 2007548 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c>
20074c4: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
20074c8: 90 10 00 10 mov %l0, %o0
20074cc: 40 00 1a 4c call 200ddfc <rtems_rate_monotonic_get_statistics>
20074d0: 92 10 00 12 mov %l2, %o1
if ( status != RTEMS_SUCCESSFUL )
20074d4: 80 a2 20 00 cmp %o0, 0
20074d8: 32 bf ff f8 bne,a 20074b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xac>
20074dc: c2 04 60 0c ld [ %l1 + 0xc ], %g1
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
20074e0: 92 10 00 16 mov %l6, %o1
20074e4: 40 00 1a 75 call 200deb8 <rtems_rate_monotonic_get_status>
20074e8: 90 10 00 10 mov %l0, %o0
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
20074ec: d0 07 bf d8 ld [ %fp + -40 ], %o0
20074f0: 94 10 00 13 mov %l3, %o2
20074f4: 40 00 00 b7 call 20077d0 <rtems_object_get_name>
20074f8: 92 10 20 05 mov 5, %o1
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20074fc: d8 1f bf a0 ldd [ %fp + -96 ], %o4
2007500: 92 10 00 1d mov %i5, %o1
2007504: 94 10 00 10 mov %l0, %o2
2007508: 90 10 00 18 mov %i0, %o0
200750c: 9f c6 40 00 call %i1
2007510: 96 10 00 13 mov %l3, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2007514: 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 );
2007518: 94 10 00 14 mov %l4, %o2
200751c: 90 10 00 15 mov %l5, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2007520: 80 a0 60 00 cmp %g1, 0
2007524: 12 80 00 0b bne 2007550 <rtems_rate_monotonic_report_statistics_with_plugin+0x144>
2007528: 92 10 00 17 mov %l7, %o1
(*print)( context, "\n" );
200752c: 9f c6 40 00 call %i1
2007530: 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 ;
2007534: c2 04 60 0c ld [ %l1 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2007538: a0 04 20 01 inc %l0
/*
* 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 ;
200753c: 80 a0 40 10 cmp %g1, %l0
2007540: 1a bf ff e3 bcc 20074cc <rtems_rate_monotonic_report_statistics_with_plugin+0xc0><== ALWAYS TAKEN
2007544: 90 10 00 10 mov %l0, %o0
2007548: 81 c7 e0 08 ret
200754c: 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 );
2007550: 40 00 0f 10 call 200b190 <_Timespec_Divide_by_integer>
2007554: 92 10 00 01 mov %g1, %o1
(*print)( context,
2007558: d0 07 bf ac ld [ %fp + -84 ], %o0
200755c: 40 00 55 79 call 201cb40 <.div>
2007560: 92 10 23 e8 mov 0x3e8, %o1
2007564: 96 10 00 08 mov %o0, %o3
2007568: d0 07 bf b4 ld [ %fp + -76 ], %o0
200756c: d6 27 bf 9c st %o3, [ %fp + -100 ]
2007570: 40 00 55 74 call 201cb40 <.div>
2007574: 92 10 23 e8 mov 0x3e8, %o1
2007578: c2 07 bf f0 ld [ %fp + -16 ], %g1
200757c: b6 10 00 08 mov %o0, %i3
2007580: d0 07 bf f4 ld [ %fp + -12 ], %o0
2007584: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2007588: 40 00 55 6e call 201cb40 <.div>
200758c: 92 10 23 e8 mov 0x3e8, %o1
2007590: d8 07 bf b0 ld [ %fp + -80 ], %o4
2007594: d6 07 bf 9c ld [ %fp + -100 ], %o3
2007598: d4 07 bf a8 ld [ %fp + -88 ], %o2
200759c: 9a 10 00 1b mov %i3, %o5
20075a0: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
20075a4: 92 10 00 1c mov %i4, %o1
20075a8: 9f c6 40 00 call %i1
20075ac: 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);
20075b0: d2 07 bf a0 ld [ %fp + -96 ], %o1
20075b4: 94 10 00 14 mov %l4, %o2
20075b8: 40 00 0e f6 call 200b190 <_Timespec_Divide_by_integer>
20075bc: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
20075c0: d0 07 bf c4 ld [ %fp + -60 ], %o0
20075c4: 40 00 55 5f call 201cb40 <.div>
20075c8: 92 10 23 e8 mov 0x3e8, %o1
20075cc: 96 10 00 08 mov %o0, %o3
20075d0: d0 07 bf cc ld [ %fp + -52 ], %o0
20075d4: d6 27 bf 9c st %o3, [ %fp + -100 ]
20075d8: 40 00 55 5a call 201cb40 <.div>
20075dc: 92 10 23 e8 mov 0x3e8, %o1
20075e0: c2 07 bf f0 ld [ %fp + -16 ], %g1
20075e4: b6 10 00 08 mov %o0, %i3
20075e8: d0 07 bf f4 ld [ %fp + -12 ], %o0
20075ec: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20075f0: 40 00 55 54 call 201cb40 <.div>
20075f4: 92 10 23 e8 mov 0x3e8, %o1
20075f8: d4 07 bf c0 ld [ %fp + -64 ], %o2
20075fc: d6 07 bf 9c ld [ %fp + -100 ], %o3
2007600: d8 07 bf c8 ld [ %fp + -56 ], %o4
2007604: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2007608: 9a 10 00 1b mov %i3, %o5
200760c: 90 10 00 18 mov %i0, %o0
2007610: 9f c6 40 00 call %i1
2007614: 92 10 00 1a mov %i2, %o1
/*
* 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 ;
2007618: 10 bf ff a8 b 20074b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xac>
200761c: c2 04 60 0c ld [ %l1 + 0xc ], %g1
0200763c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
200763c: 9d e3 bf a0 save %sp, -96, %sp
2007640: 03 00 80 85 sethi %hi(0x2021400), %g1
2007644: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20214d0 <_Thread_Dispatch_disable_level>
2007648: 84 00 a0 01 inc %g2
200764c: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ]
/*
* 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 ;
2007650: 23 00 80 84 sethi %hi(0x2021000), %l1
2007654: a2 14 63 58 or %l1, 0x358, %l1 ! 2021358 <_Rate_monotonic_Information>
2007658: e0 04 60 08 ld [ %l1 + 8 ], %l0
200765c: c2 04 60 0c ld [ %l1 + 0xc ], %g1
2007660: 80 a4 00 01 cmp %l0, %g1
2007664: 18 80 00 09 bgu 2007688 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NEVER TAKEN
2007668: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
200766c: 40 00 00 0a call 2007694 <rtems_rate_monotonic_reset_statistics>
2007670: 90 10 00 10 mov %l0, %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 ;
2007674: c2 04 60 0c ld [ %l1 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2007678: a0 04 20 01 inc %l0
/*
* 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 ;
200767c: 80 a0 40 10 cmp %g1, %l0
2007680: 1a bf ff fb bcc 200766c <rtems_rate_monotonic_reset_all_statistics+0x30>
2007684: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
2007688: 40 00 0a 8d call 200a0bc <_Thread_Enable_dispatch>
200768c: 81 e8 00 00 restore
02014d88 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
2014d88: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
2014d8c: 80 a6 60 00 cmp %i1, 0
2014d90: 02 80 00 22 be 2014e18 <rtems_region_get_segment_size+0x90>
2014d94: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( !size )
2014d98: 02 80 00 20 be 2014e18 <rtems_region_get_segment_size+0x90>
2014d9c: 21 00 80 f3 sethi %hi(0x203cc00), %l0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
2014da0: 40 00 08 e5 call 2017134 <_API_Mutex_Lock>
2014da4: d0 04 21 78 ld [ %l0 + 0x178 ], %o0 ! 203cd78 <_RTEMS_Allocator_Mutex>
2014da8: 92 10 00 18 mov %i0, %o1
2014dac: 11 00 80 f2 sethi %hi(0x203c800), %o0
2014db0: 94 07 bf fc add %fp, -4, %o2
2014db4: 40 00 0f f1 call 2018d78 <_Objects_Get_no_protection>
2014db8: 90 12 23 48 or %o0, 0x348, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2014dbc: c2 07 bf fc ld [ %fp + -4 ], %g1
2014dc0: 80 a0 60 00 cmp %g1, 0
2014dc4: 12 80 00 0f bne 2014e00 <rtems_region_get_segment_size+0x78>
2014dc8: 80 a0 60 01 cmp %g1, 1
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
2014dcc: 90 02 20 68 add %o0, 0x68, %o0
2014dd0: 92 10 00 19 mov %i1, %o1
2014dd4: 94 10 00 1a mov %i2, %o2
2014dd8: 40 00 0e 45 call 20186ec <_Heap_Size_of_alloc_area>
2014ddc: b0 10 20 09 mov 9, %i0
2014de0: 80 8a 20 ff btst 0xff, %o0
2014de4: 02 80 00 03 be 2014df0 <rtems_region_get_segment_size+0x68><== NEVER TAKEN
2014de8: 01 00 00 00 nop
2014dec: b0 10 20 00 clr %i0 ! 0 <PROM_START>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2014df0: 40 00 08 e7 call 201718c <_API_Mutex_Unlock>
2014df4: d0 04 21 78 ld [ %l0 + 0x178 ], %o0
return return_status;
2014df8: 81 c7 e0 08 ret
2014dfc: 81 e8 00 00 restore
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
2014e00: 12 bf ff fb bne 2014dec <rtems_region_get_segment_size+0x64><== NEVER TAKEN
2014e04: b0 10 20 04 mov 4, %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2014e08: 40 00 08 e1 call 201718c <_API_Mutex_Unlock>
2014e0c: d0 04 21 78 ld [ %l0 + 0x178 ], %o0
return return_status;
2014e10: 81 c7 e0 08 ret
2014e14: 81 e8 00 00 restore
}
2014e18: 81 c7 e0 08 ret
2014e1c: 91 e8 20 09 restore %g0, 9, %o0
020154ac <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
20154ac: 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 )
20154b0: 80 a6 60 00 cmp %i1, 0
20154b4: 12 80 00 04 bne 20154c4 <rtems_signal_send+0x18>
20154b8: 82 10 20 0a mov 0xa, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20154bc: 81 c7 e0 08 ret
20154c0: 91 e8 00 01 restore %g0, %g1, %o0
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
20154c4: 90 10 00 18 mov %i0, %o0
20154c8: 40 00 11 0d call 20198fc <_Thread_Get>
20154cc: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20154d0: c4 07 bf fc ld [ %fp + -4 ], %g2
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
20154d4: a2 10 00 08 mov %o0, %l1
switch ( location ) {
20154d8: 80 a0 a0 00 cmp %g2, 0
20154dc: 12 bf ff f8 bne 20154bc <rtems_signal_send+0x10>
20154e0: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
20154e4: e0 02 21 60 ld [ %o0 + 0x160 ], %l0
asr = &api->Signal;
20154e8: c2 04 20 0c ld [ %l0 + 0xc ], %g1
20154ec: 80 a0 60 00 cmp %g1, 0
20154f0: 02 80 00 26 be 2015588 <rtems_signal_send+0xdc>
20154f4: 01 00 00 00 nop
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
20154f8: c2 0c 20 08 ldub [ %l0 + 8 ], %g1
20154fc: 80 a0 60 00 cmp %g1, 0
2015500: 02 80 00 16 be 2015558 <rtems_signal_send+0xac>
2015504: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2015508: 7f ff e8 5e call 200f680 <sparc_disable_interrupts>
201550c: 01 00 00 00 nop
*signal_set |= signals;
2015510: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
2015514: b2 10 40 19 or %g1, %i1, %i1
2015518: f2 24 20 14 st %i1, [ %l0 + 0x14 ]
_ISR_Enable( _level );
201551c: 7f ff e8 5d call 200f690 <sparc_enable_interrupts>
2015520: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2015524: 03 00 80 f3 sethi %hi(0x203cc00), %g1
2015528: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 ! 203cd5c <_ISR_Nest_level>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
201552c: 82 10 20 01 mov 1, %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2015530: 80 a0 a0 00 cmp %g2, 0
2015534: 02 80 00 10 be 2015574 <rtems_signal_send+0xc8>
2015538: c2 2c 60 74 stb %g1, [ %l1 + 0x74 ]
201553c: 05 00 80 f3 sethi %hi(0x203cc00), %g2
2015540: c4 00 a1 80 ld [ %g2 + 0x180 ], %g2 ! 203cd80 <_Thread_Executing>
2015544: 80 a4 40 02 cmp %l1, %g2
2015548: 12 80 00 0b bne 2015574 <rtems_signal_send+0xc8> <== NEVER TAKEN
201554c: 05 00 80 f3 sethi %hi(0x203cc00), %g2
_ISR_Signals_to_thread_executing = true;
2015550: 10 80 00 09 b 2015574 <rtems_signal_send+0xc8>
2015554: c2 28 a2 18 stb %g1, [ %g2 + 0x218 ] ! 203ce18 <_ISR_Signals_to_thread_executing>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2015558: 7f ff e8 4a call 200f680 <sparc_disable_interrupts>
201555c: 01 00 00 00 nop
*signal_set |= signals;
2015560: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2015564: b2 10 40 19 or %g1, %i1, %i1
2015568: f2 24 20 18 st %i1, [ %l0 + 0x18 ]
_ISR_Enable( _level );
201556c: 7f ff e8 49 call 200f690 <sparc_enable_interrupts>
2015570: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2015574: 40 00 10 be call 201986c <_Thread_Enable_dispatch>
2015578: 01 00 00 00 nop
201557c: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2015580: 81 c7 e0 08 ret
2015584: 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();
2015588: 40 00 10 b9 call 201986c <_Thread_Enable_dispatch>
201558c: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
2015590: 10 bf ff cb b 20154bc <rtems_signal_send+0x10>
2015594: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
02002158 <rtems_stack_checker_begin_extension>:
Thread_Control *the_thread
)
{
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
2002158: c2 02 20 08 ld [ %o0 + 8 ], %g1
200215c: 80 a0 60 00 cmp %g1, 0
2002160: 02 80 00 0c be 2002190 <rtems_stack_checker_begin_extension+0x38><== NEVER TAKEN
2002164: 05 00 80 6d sethi %hi(0x201b400), %g2
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
2002168: c2 02 20 c4 ld [ %o0 + 0xc4 ], %g1
200216c: c6 00 a2 7c ld [ %g2 + 0x27c ], %g3
2002170: 84 10 a2 7c or %g2, 0x27c, %g2
2002174: c6 20 60 08 st %g3, [ %g1 + 8 ]
2002178: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200217c: c6 20 60 0c st %g3, [ %g1 + 0xc ]
2002180: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2002184: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
2002188: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
200218c: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
2002190: 81 c3 e0 08 retl
02002630 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
2002630: 9d e3 bf a0 save %sp, -96, %sp
Stack_check_Initialize();
2002634: 7f ff ff d9 call 2002598 <Stack_check_Initialize>
2002638: 01 00 00 00 nop
if (the_thread)
200263c: 80 a6 60 00 cmp %i1, 0
2002640: 02 80 00 06 be 2002658 <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
2002644: 01 00 00 00 nop
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
2002648: d4 06 60 c0 ld [ %i1 + 0xc0 ], %o2
200264c: d0 06 60 c4 ld [ %i1 + 0xc4 ], %o0
2002650: 40 00 33 c5 call 200f564 <memset>
2002654: 92 10 20 a5 mov 0xa5, %o1
return true;
}
2002658: 81 c7 e0 08 ret
200265c: 91 e8 20 01 restore %g0, 1, %o0
020024a0 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
20024a0: 9d e3 bf a0 save %sp, -96, %sp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
20024a4: 21 00 80 6e sethi %hi(0x201b800), %l0
20024a8: c2 04 21 20 ld [ %l0 + 0x120 ], %g1 ! 201b920 <_Thread_Executing>
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
20024ac: d0 00 60 c4 ld [ %g1 + 0xc4 ], %o0
20024b0: 80 a7 80 08 cmp %fp, %o0
20024b4: 0a 80 00 06 bcs 20024cc <rtems_stack_checker_is_blown+0x2c><== NEVER TAKEN
20024b8: a2 10 20 00 clr %l1
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
20024bc: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1
20024c0: 82 02 00 01 add %o0, %g1, %g1
20024c4: 80 a0 40 1e cmp %g1, %fp
20024c8: a2 60 3f ff subx %g0, -1, %l1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
20024cc: 03 00 80 6c sethi %hi(0x201b000), %g1
20024d0: c4 00 63 e8 ld [ %g1 + 0x3e8 ], %g2 ! 201b3e8 <Stack_check_Initialized>
20024d4: 80 a0 a0 00 cmp %g2, 0
20024d8: 02 80 00 09 be 20024fc <rtems_stack_checker_is_blown+0x5c><== NEVER TAKEN
20024dc: 82 10 20 01 mov 1, %g1
pattern_ok = (!memcmp(
20024e0: 90 02 20 08 add %o0, 8, %o0
20024e4: 13 00 80 6d sethi %hi(0x201b400), %o1
20024e8: 94 10 20 10 mov 0x10, %o2
20024ec: 40 00 33 ae call 200f3a4 <memcmp>
20024f0: 92 12 62 7c or %o1, 0x27c, %o1
20024f4: 80 a0 00 08 cmp %g0, %o0
20024f8: 82 60 3f ff subx %g0, -1, %g1
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
20024fc: 80 8c 60 ff btst 0xff, %l1
2002500: 02 80 00 05 be 2002514 <rtems_stack_checker_is_blown+0x74><== NEVER TAKEN
2002504: 92 08 60 ff and %g1, 0xff, %o1
2002508: 92 88 60 ff andcc %g1, 0xff, %o1
200250c: 12 80 00 05 bne 2002520 <rtems_stack_checker_is_blown+0x80><== ALWAYS TAKEN
2002510: b0 10 20 00 clr %i0
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
2002514: d0 04 21 20 ld [ %l0 + 0x120 ], %o0 <== NOT EXECUTED
2002518: 7f ff ff b8 call 20023f8 <Stack_check_report_blown_task> <== NOT EXECUTED
200251c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return true;
}
2002520: 81 c7 e0 08 ret
2002524: 81 e8 00 00 restore
020023dc <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
20023dc: 13 00 80 0e sethi %hi(0x2003800), %o1 <== NOT EXECUTED
20023e0: 90 10 20 00 clr %o0 <== NOT EXECUTED
20023e4: 92 12 60 f0 or %o1, 0xf0, %o1 <== NOT EXECUTED
20023e8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20023ec: 7f ff ff e6 call 2002384 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
20023f0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02002384 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2002384: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
print_context = context;
2002388: 23 00 80 6c sethi %hi(0x201b000), %l1 <== NOT EXECUTED
print_handler = print;
200238c: 21 00 80 6c sethi %hi(0x201b000), %l0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
2002390: f0 24 63 ec st %i0, [ %l1 + 0x3ec ] <== NOT EXECUTED
print_handler = print;
2002394: f2 24 23 f0 st %i1, [ %l0 + 0x3f0 ] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
2002398: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200239c: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
20023a0: 9f c6 40 00 call %i1 <== NOT EXECUTED
20023a4: 92 12 61 38 or %o1, 0x138, %o1 ! 2019d38 <rtems_filesystem_mount_table_size+0x3b8><== NOT EXECUTED
(*print)( context,
20023a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20023ac: 13 00 80 67 sethi %hi(0x2019c00), %o1 <== NOT EXECUTED
20023b0: 9f c6 40 00 call %i1 <== NOT EXECUTED
20023b4: 92 12 61 50 or %o1, 0x150, %o1 ! 2019d50 <rtems_filesystem_mount_table_size+0x3d0><== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
20023b8: 11 00 80 08 sethi %hi(0x2002000), %o0 <== NOT EXECUTED
20023bc: 40 00 14 95 call 2007610 <rtems_iterate_over_all_threads> <== NOT EXECUTED
20023c0: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 20021f8 <Stack_check_Dump_threads_usage><== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
20023c4: 7f ff ff 8d call 20021f8 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
20023c8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
print_context = NULL;
20023cc: c0 24 63 ec clr [ %l1 + 0x3ec ] <== NOT EXECUTED
print_handler = NULL;
20023d0: c0 24 23 f0 clr [ %l0 + 0x3f0 ] <== NOT EXECUTED
}
20023d4: 81 c7 e0 08 ret <== NOT EXECUTED
20023d8: 81 e8 00 00 restore <== NOT EXECUTED
02002528 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
2002528: 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 = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
200252c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
2002530: 80 a7 80 01 cmp %fp, %g1
2002534: 0a 80 00 07 bcs 2002550 <rtems_stack_checker_switch_extension+0x28><== NEVER TAKEN
2002538: 90 00 60 08 add %g1, 8, %o0
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
200253c: c4 06 20 c0 ld [ %i0 + 0xc0 ], %g2
2002540: 82 00 40 02 add %g1, %g2, %g1
2002544: 80 a7 80 01 cmp %fp, %g1
2002548: 28 80 00 0b bleu,a 2002574 <rtems_stack_checker_switch_extension+0x4c><== ALWAYS TAKEN
200254c: 13 00 80 6d sethi %hi(0x201b400), %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,
2002550: 13 00 80 6d sethi %hi(0x201b400), %o1 <== NOT EXECUTED
2002554: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
2002558: 40 00 33 93 call 200f3a4 <memcmp> <== NOT EXECUTED
200255c: 92 12 62 7c or %o1, 0x27c, %o1 <== NOT EXECUTED
2002560: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
2002564: b2 60 3f ff subx %g0, -1, %i1 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
2002568: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED
200256c: 7f ff ff a3 call 20023f8 <Stack_check_report_blown_task> <== NOT EXECUTED
2002570: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002574: 94 10 20 10 mov 0x10, %o2
2002578: 92 12 62 7c or %o1, 0x27c, %o1
200257c: 40 00 33 8a call 200f3a4 <memcmp>
2002580: b2 10 20 00 clr %i1
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
2002584: 80 a2 20 00 cmp %o0, 0
2002588: 12 bf ff f9 bne 200256c <rtems_stack_checker_switch_extension+0x44><== NEVER TAKEN
200258c: b2 0e 60 01 and %i1, 1, %i1
2002590: 81 c7 e0 08 ret
2002594: 81 e8 00 00 restore
0200cc0c <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200cc0c: 9d e3 bf 90 save %sp, -112, %sp
200cc10: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200cc14: 80 a6 60 00 cmp %i1, 0
200cc18: 02 80 00 18 be 200cc78 <rtems_string_to_double+0x6c>
200cc1c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cc20: 40 00 09 b4 call 200f2f0 <__errno>
200cc24: 01 00 00 00 nop
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
200cc28: 92 07 bf fc add %fp, -4, %o1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cc2c: c0 22 00 00 clr [ %o0 ]
*n = 0;
200cc30: c0 26 40 00 clr [ %i1 ]
200cc34: c0 26 60 04 clr [ %i1 + 4 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
200cc38: 40 00 15 32 call 2012100 <strtod>
200cc3c: 90 10 00 10 mov %l0, %o0
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200cc40: 80 a6 a0 00 cmp %i2, 0
200cc44: 02 80 00 03 be 200cc50 <rtems_string_to_double+0x44>
200cc48: c2 07 bf fc ld [ %fp + -4 ], %g1
*endptr = end;
200cc4c: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200cc50: 80 a0 40 10 cmp %g1, %l0
200cc54: 02 80 00 09 be 200cc78 <rtems_string_to_double+0x6c>
200cc58: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cc5c: 03 00 80 78 sethi %hi(0x201e000), %g1
200cc60: d1 18 60 e0 ldd [ %g1 + 0xe0 ], %f8 ! 201e0e0 <_CPU_Trap_slot_template+0x14>
200cc64: 81 a8 0a c8 fcmped %f0, %f8
200cc68: 01 00 00 00 nop
200cc6c: 0d 80 00 05 fbg 200cc80 <rtems_string_to_double+0x74>
200cc70: b0 10 20 00 clr %i0 ! 0 <PROM_START>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cc74: c1 3e 40 00 std %f0, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
}
200cc78: 81 c7 e0 08 ret
200cc7c: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cc80: c1 27 bf f4 st %f0, [ %fp + -12 ]
200cc84: 40 00 09 9b call 200f2f0 <__errno>
200cc88: c3 27 bf f0 st %f1, [ %fp + -16 ]
200cc8c: c2 02 00 00 ld [ %o0 ], %g1
200cc90: b0 10 20 0a mov 0xa, %i0
200cc94: 80 a0 60 22 cmp %g1, 0x22
200cc98: c1 07 bf f4 ld [ %fp + -12 ], %f0
200cc9c: 02 bf ff f7 be 200cc78 <rtems_string_to_double+0x6c> <== ALWAYS TAKEN
200cca0: c3 07 bf f0 ld [ %fp + -16 ], %f1
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cca4: c1 3e 40 00 std %f0, [ %i1 ] <== NOT EXECUTED
200cca8: 81 c7 e0 08 ret <== NOT EXECUTED
200ccac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200ccb0 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200ccb0: 9d e3 bf 90 save %sp, -112, %sp
200ccb4: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200ccb8: 80 a6 60 00 cmp %i1, 0
200ccbc: 02 80 00 17 be 200cd18 <rtems_string_to_float+0x68>
200ccc0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200ccc4: 40 00 09 8b call 200f2f0 <__errno>
200ccc8: 01 00 00 00 nop
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
200cccc: 92 07 bf fc add %fp, -4, %o1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200ccd0: c0 22 00 00 clr [ %o0 ]
*n = 0;
200ccd4: c0 26 40 00 clr [ %i1 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
200ccd8: 40 00 14 f5 call 20120ac <strtof>
200ccdc: 90 10 00 10 mov %l0, %o0
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200cce0: 80 a6 a0 00 cmp %i2, 0
200cce4: 02 80 00 03 be 200ccf0 <rtems_string_to_float+0x40>
200cce8: c2 07 bf fc ld [ %fp + -4 ], %g1
*endptr = end;
200ccec: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200ccf0: 80 a0 40 10 cmp %g1, %l0
200ccf4: 02 80 00 09 be 200cd18 <rtems_string_to_float+0x68>
200ccf8: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200ccfc: 03 00 80 78 sethi %hi(0x201e000), %g1
200cd00: d1 00 60 e8 ld [ %g1 + 0xe8 ], %f8 ! 201e0e8 <_CPU_Trap_slot_template+0x1c>
200cd04: 81 a8 0a a8 fcmpes %f0, %f8
200cd08: 01 00 00 00 nop
200cd0c: 0d 80 00 05 fbg 200cd20 <rtems_string_to_float+0x70>
200cd10: b0 10 20 00 clr %i0 ! 0 <PROM_START>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cd14: c1 26 40 00 st %f0, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
}
200cd18: 81 c7 e0 08 ret
200cd1c: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cd20: 40 00 09 74 call 200f2f0 <__errno>
200cd24: c1 27 bf f4 st %f0, [ %fp + -12 ]
200cd28: c2 02 00 00 ld [ %o0 ], %g1
200cd2c: b0 10 20 0a mov 0xa, %i0
200cd30: 80 a0 60 22 cmp %g1, 0x22
200cd34: 02 bf ff f9 be 200cd18 <rtems_string_to_float+0x68> <== ALWAYS TAKEN
200cd38: c1 07 bf f4 ld [ %fp + -12 ], %f0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cd3c: c1 26 40 00 st %f0, [ %i1 ] <== NOT EXECUTED
200cd40: 81 c7 e0 08 ret <== NOT EXECUTED
200cd44: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200cd48 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200cd48: 9d e3 bf 98 save %sp, -104, %sp
200cd4c: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200cd50: 80 a6 60 00 cmp %i1, 0
200cd54: 02 80 00 18 be 200cdb4 <rtems_string_to_int+0x6c>
200cd58: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cd5c: 40 00 09 65 call 200f2f0 <__errno>
200cd60: 01 00 00 00 nop
200cd64: c0 22 00 00 clr [ %o0 ]
*n = 0;
200cd68: c0 26 40 00 clr [ %i1 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200cd6c: 94 10 00 1b mov %i3, %o2
200cd70: 90 10 00 10 mov %l0, %o0
200cd74: 40 00 15 6e call 201232c <strtol>
200cd78: 92 07 bf fc add %fp, -4, %o1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200cd7c: 80 a6 a0 00 cmp %i2, 0
200cd80: 02 80 00 18 be 200cde0 <rtems_string_to_int+0x98>
200cd84: a2 10 00 08 mov %o0, %l1
*endptr = end;
200cd88: c2 07 bf fc ld [ %fp + -4 ], %g1
200cd8c: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200cd90: 80 a0 40 10 cmp %g1, %l0
200cd94: 02 80 00 08 be 200cdb4 <rtems_string_to_int+0x6c>
200cd98: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cd9c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
200cda0: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
200cda4: 80 a4 40 01 cmp %l1, %g1
200cda8: 02 80 00 05 be 200cdbc <rtems_string_to_int+0x74>
200cdac: b0 10 20 00 clr %i0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cdb0: e2 26 40 00 st %l1, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
}
200cdb4: 81 c7 e0 08 ret
200cdb8: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cdbc: 40 00 09 4d call 200f2f0 <__errno>
200cdc0: b0 10 20 0a mov 0xa, %i0
200cdc4: c2 02 00 00 ld [ %o0 ], %g1
200cdc8: 80 a0 60 22 cmp %g1, 0x22
200cdcc: 02 bf ff fa be 200cdb4 <rtems_string_to_int+0x6c> <== ALWAYS TAKEN
200cdd0: 01 00 00 00 nop
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cdd4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED
200cdd8: 81 c7 e0 08 ret <== NOT EXECUTED
200cddc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200cde0: 10 bf ff ec b 200cd90 <rtems_string_to_int+0x48>
200cde4: c2 07 bf fc ld [ %fp + -4 ], %g1
0200ceb4 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200ceb4: 9d e3 bf 98 save %sp, -104, %sp
200ceb8: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200cebc: 80 a6 60 00 cmp %i1, 0
200cec0: 02 80 00 24 be 200cf50 <rtems_string_to_long+0x9c>
200cec4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cec8: 40 00 09 0a call 200f2f0 <__errno>
200cecc: 01 00 00 00 nop
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200ced0: 94 10 00 1b mov %i3, %o2
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200ced4: c0 22 00 00 clr [ %o0 ]
*n = 0;
200ced8: c0 26 40 00 clr [ %i1 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200cedc: 90 10 00 10 mov %l0, %o0
200cee0: 40 00 15 13 call 201232c <strtol>
200cee4: 92 07 bf fc add %fp, -4, %o1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200cee8: 80 a6 a0 00 cmp %i2, 0
200ceec: 02 80 00 1b be 200cf58 <rtems_string_to_long+0xa4>
200cef0: a2 10 00 08 mov %o0, %l1
*endptr = end;
200cef4: c2 07 bf fc ld [ %fp + -4 ], %g1
200cef8: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200cefc: 80 a0 40 10 cmp %g1, %l0
200cf00: 02 80 00 14 be 200cf50 <rtems_string_to_long+0x9c>
200cf04: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cf08: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
200cf0c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
200cf10: 80 a4 40 01 cmp %l1, %g1
200cf14: 02 80 00 08 be 200cf34 <rtems_string_to_long+0x80>
200cf18: 03 20 00 00 sethi %hi(0x80000000), %g1
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
200cf1c: 80 a4 40 01 cmp %l1, %g1
200cf20: 02 80 00 05 be 200cf34 <rtems_string_to_long+0x80>
200cf24: 01 00 00 00 nop
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200cf28: e2 26 40 00 st %l1, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
200cf2c: 81 c7 e0 08 ret
200cf30: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
200cf34: 40 00 08 ef call 200f2f0 <__errno>
200cf38: 01 00 00 00 nop
200cf3c: c2 02 00 00 ld [ %o0 ], %g1
200cf40: 80 a0 60 22 cmp %g1, 0x22
200cf44: 32 bf ff fa bne,a 200cf2c <rtems_string_to_long+0x78> <== NEVER TAKEN
200cf48: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
200cf4c: b0 10 20 0a mov 0xa, %i0
}
200cf50: 81 c7 e0 08 ret
200cf54: 81 e8 00 00 restore
200cf58: 10 bf ff e9 b 200cefc <rtems_string_to_long+0x48>
200cf5c: c2 07 bf fc ld [ %fp + -4 ], %g1
0200cde8 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200cde8: 9d e3 bf 90 save %sp, -112, %sp
200cdec: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200cdf0: 80 a6 60 00 cmp %i1, 0
200cdf4: 02 80 00 29 be 200ce98 <rtems_string_to_long_long+0xb0>
200cdf8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cdfc: 40 00 09 3d call 200f2f0 <__errno>
200ce00: 01 00 00 00 nop
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200ce04: 94 10 00 1b mov %i3, %o2
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200ce08: c0 22 00 00 clr [ %o0 ]
*n = 0;
200ce0c: c0 26 40 00 clr [ %i1 ]
200ce10: c0 26 60 04 clr [ %i1 + 4 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200ce14: 90 10 00 10 mov %l0, %o0
200ce18: 40 00 15 4f call 2012354 <strtoll>
200ce1c: 92 07 bf fc add %fp, -4, %o1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200ce20: 80 a6 a0 00 cmp %i2, 0
200ce24: 02 80 00 22 be 200ceac <rtems_string_to_long_long+0xc4>
200ce28: a2 10 00 08 mov %o0, %l1
*endptr = end;
200ce2c: c2 07 bf fc ld [ %fp + -4 ], %g1
200ce30: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200ce34: 80 a0 40 10 cmp %g1, %l0
200ce38: 02 80 00 18 be 200ce98 <rtems_string_to_long_long+0xb0>
200ce3c: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200ce40: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
200ce44: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
200ce48: 80 a4 40 01 cmp %l1, %g1
200ce4c: 02 80 00 15 be 200cea0 <rtems_string_to_long_long+0xb8>
200ce50: 80 a2 7f ff cmp %o1, -1
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
200ce54: 03 20 00 00 sethi %hi(0x80000000), %g1
200ce58: 80 a4 40 01 cmp %l1, %g1
200ce5c: 02 80 00 06 be 200ce74 <rtems_string_to_long_long+0x8c>
200ce60: 80 a2 60 00 cmp %o1, 0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200ce64: d2 26 60 04 st %o1, [ %i1 + 4 ]
200ce68: e2 26 40 00 st %l1, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
200ce6c: 81 c7 e0 08 ret
200ce70: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
200ce74: 32 bf ff fd bne,a 200ce68 <rtems_string_to_long_long+0x80><== NEVER TAKEN
200ce78: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED
200ce7c: 40 00 09 1d call 200f2f0 <__errno>
200ce80: d2 27 bf f4 st %o1, [ %fp + -12 ]
200ce84: c2 02 00 00 ld [ %o0 ], %g1
200ce88: 80 a0 60 22 cmp %g1, 0x22
200ce8c: 12 bf ff f6 bne 200ce64 <rtems_string_to_long_long+0x7c> <== NEVER TAKEN
200ce90: d2 07 bf f4 ld [ %fp + -12 ], %o1
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
200ce94: b0 10 20 0a mov 0xa, %i0
}
200ce98: 81 c7 e0 08 ret
200ce9c: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cea0: 12 bf ff ee bne 200ce58 <rtems_string_to_long_long+0x70> <== NEVER TAKEN
200cea4: 03 20 00 00 sethi %hi(0x80000000), %g1
200cea8: 30 bf ff f5 b,a 200ce7c <rtems_string_to_long_long+0x94>
200ceac: 10 bf ff e2 b 200ce34 <rtems_string_to_long_long+0x4c>
200ceb0: c2 07 bf fc ld [ %fp + -4 ], %g1
0200cf60 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200cf60: 9d e3 bf 98 save %sp, -104, %sp
200cf64: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200cf68: 80 a6 60 00 cmp %i1, 0
200cf6c: 02 80 00 16 be 200cfc4 <rtems_string_to_pointer+0x64>
200cf70: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cf74: 40 00 08 df call 200f2f0 <__errno>
200cf78: 01 00 00 00 nop
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
200cf7c: 92 07 bf fc add %fp, -4, %o1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200cf80: c0 22 00 00 clr [ %o0 ]
*n = 0;
200cf84: c0 26 40 00 clr [ %i1 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
200cf88: 90 10 00 10 mov %l0, %o0
200cf8c: 40 00 16 20 call 201280c <strtoul>
200cf90: 94 10 20 10 mov 0x10, %o2
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200cf94: 80 a6 a0 00 cmp %i2, 0
200cf98: 02 80 00 16 be 200cff0 <rtems_string_to_pointer+0x90>
200cf9c: a2 10 00 08 mov %o0, %l1
*endptr = end;
200cfa0: c2 07 bf fc ld [ %fp + -4 ], %g1
200cfa4: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200cfa8: 80 a0 40 10 cmp %g1, %l0
200cfac: 02 80 00 06 be 200cfc4 <rtems_string_to_pointer+0x64>
200cfb0: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cfb4: 80 a4 7f ff cmp %l1, -1
200cfb8: 02 80 00 05 be 200cfcc <rtems_string_to_pointer+0x6c> <== NEVER TAKEN
200cfbc: b0 10 20 00 clr %i0
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
200cfc0: e2 26 40 00 st %l1, [ %i1 ]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
200cfc4: 81 c7 e0 08 ret
200cfc8: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200cfcc: 40 00 08 c9 call 200f2f0 <__errno> <== NOT EXECUTED
200cfd0: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
200cfd4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
200cfd8: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED
200cfdc: 02 bf ff fa be 200cfc4 <rtems_string_to_pointer+0x64> <== NOT EXECUTED
200cfe0: 01 00 00 00 nop <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
200cfe4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED
200cfe8: 81 c7 e0 08 ret <== NOT EXECUTED
200cfec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200cff0: 10 bf ff ee b 200cfa8 <rtems_string_to_pointer+0x48>
200cff4: c2 07 bf fc ld [ %fp + -4 ], %g1
0200d058 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200d058: 9d e3 bf 98 save %sp, -104, %sp
200d05c: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200d060: 80 a6 60 00 cmp %i1, 0
200d064: 02 80 00 16 be 200d0bc <rtems_string_to_unsigned_int+0x64>
200d068: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d06c: 40 00 08 a1 call 200f2f0 <__errno>
200d070: 01 00 00 00 nop
200d074: c0 22 00 00 clr [ %o0 ]
*n = 0;
200d078: c0 26 40 00 clr [ %i1 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200d07c: 94 10 00 1b mov %i3, %o2
200d080: 90 10 00 10 mov %l0, %o0
200d084: 40 00 15 e2 call 201280c <strtoul>
200d088: 92 07 bf fc add %fp, -4, %o1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200d08c: 80 a6 a0 00 cmp %i2, 0
200d090: 02 80 00 16 be 200d0e8 <rtems_string_to_unsigned_int+0x90>
200d094: a2 10 00 08 mov %o0, %l1
*endptr = end;
200d098: c2 07 bf fc ld [ %fp + -4 ], %g1
200d09c: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200d0a0: 80 a0 40 10 cmp %g1, %l0
200d0a4: 02 80 00 06 be 200d0bc <rtems_string_to_unsigned_int+0x64>
200d0a8: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200d0ac: 80 a4 7f ff cmp %l1, -1
200d0b0: 02 80 00 05 be 200d0c4 <rtems_string_to_unsigned_int+0x6c>
200d0b4: b0 10 20 00 clr %i0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200d0b8: e2 26 40 00 st %l1, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
}
200d0bc: 81 c7 e0 08 ret
200d0c0: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200d0c4: 40 00 08 8b call 200f2f0 <__errno>
200d0c8: b0 10 20 0a mov 0xa, %i0
200d0cc: c2 02 00 00 ld [ %o0 ], %g1
200d0d0: 80 a0 60 22 cmp %g1, 0x22
200d0d4: 02 bf ff fa be 200d0bc <rtems_string_to_unsigned_int+0x64><== ALWAYS TAKEN
200d0d8: 01 00 00 00 nop
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200d0dc: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED
200d0e0: 81 c7 e0 08 ret <== NOT EXECUTED
200d0e4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200d0e8: 10 bf ff ee b 200d0a0 <rtems_string_to_unsigned_int+0x48>
200d0ec: c2 07 bf fc ld [ %fp + -4 ], %g1
0200d198 <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200d198: 9d e3 bf 98 save %sp, -104, %sp
200d19c: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200d1a0: 80 a6 60 00 cmp %i1, 0
200d1a4: 02 80 00 16 be 200d1fc <rtems_string_to_unsigned_long+0x64>
200d1a8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d1ac: 40 00 08 51 call 200f2f0 <__errno>
200d1b0: 01 00 00 00 nop
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200d1b4: 94 10 00 1b mov %i3, %o2
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d1b8: c0 22 00 00 clr [ %o0 ]
*n = 0;
200d1bc: c0 26 40 00 clr [ %i1 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200d1c0: 90 10 00 10 mov %l0, %o0
200d1c4: 40 00 15 92 call 201280c <strtoul>
200d1c8: 92 07 bf fc add %fp, -4, %o1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200d1cc: 80 a6 a0 00 cmp %i2, 0
200d1d0: 02 80 00 16 be 200d228 <rtems_string_to_unsigned_long+0x90>
200d1d4: a2 10 00 08 mov %o0, %l1
*endptr = end;
200d1d8: c2 07 bf fc ld [ %fp + -4 ], %g1
200d1dc: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200d1e0: 80 a0 40 10 cmp %g1, %l0
200d1e4: 02 80 00 06 be 200d1fc <rtems_string_to_unsigned_long+0x64>
200d1e8: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200d1ec: 80 a4 7f ff cmp %l1, -1
200d1f0: 02 80 00 05 be 200d204 <rtems_string_to_unsigned_long+0x6c>
200d1f4: b0 10 20 00 clr %i0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200d1f8: e2 26 40 00 st %l1, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
}
200d1fc: 81 c7 e0 08 ret
200d200: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200d204: 40 00 08 3b call 200f2f0 <__errno>
200d208: b0 10 20 0a mov 0xa, %i0
200d20c: c2 02 00 00 ld [ %o0 ], %g1
200d210: 80 a0 60 22 cmp %g1, 0x22
200d214: 02 bf ff fa be 200d1fc <rtems_string_to_unsigned_long+0x64><== ALWAYS TAKEN
200d218: 01 00 00 00 nop
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200d21c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED
200d220: 81 c7 e0 08 ret <== NOT EXECUTED
200d224: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200d228: 10 bf ff ee b 200d1e0 <rtems_string_to_unsigned_long+0x48>
200d22c: c2 07 bf fc ld [ %fp + -4 ], %g1
0200d0f0 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
200d0f0: 9d e3 bf 90 save %sp, -112, %sp
200d0f4: a0 10 00 18 mov %i0, %l0
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
200d0f8: 80 a6 60 00 cmp %i1, 0
200d0fc: 02 80 00 23 be 200d188 <rtems_string_to_unsigned_long_long+0x98>
200d100: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d104: 40 00 08 7b call 200f2f0 <__errno>
200d108: 01 00 00 00 nop
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200d10c: 94 10 00 1b mov %i3, %o2
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d110: c0 22 00 00 clr [ %o0 ]
*n = 0;
200d114: c0 26 40 00 clr [ %i1 ]
200d118: c0 26 60 04 clr [ %i1 + 4 ]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
200d11c: 90 10 00 10 mov %l0, %o0
200d120: 40 00 15 c5 call 2012834 <strtoull>
200d124: 92 07 bf fc add %fp, -4, %o1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
200d128: 80 a6 a0 00 cmp %i2, 0
200d12c: 02 80 00 19 be 200d190 <rtems_string_to_unsigned_long_long+0xa0>
200d130: a2 10 00 08 mov %o0, %l1
*endptr = end;
200d134: c2 07 bf fc ld [ %fp + -4 ], %g1
200d138: c2 26 80 00 st %g1, [ %i2 ]
/* nothing was converted */
if ( end == s )
200d13c: 80 a0 40 10 cmp %g1, %l0
200d140: 02 80 00 12 be 200d188 <rtems_string_to_unsigned_long_long+0x98>
200d144: b0 10 20 0b mov 0xb, %i0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200d148: 80 a4 7f ff cmp %l1, -1
200d14c: 02 80 00 06 be 200d164 <rtems_string_to_unsigned_long_long+0x74>
200d150: 80 a2 7f ff cmp %o1, -1
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
200d154: d2 26 60 04 st %o1, [ %i1 + 4 ]
200d158: e2 26 40 00 st %l1, [ %i1 ]
#endif
return RTEMS_SUCCESSFUL;
}
200d15c: 81 c7 e0 08 ret
200d160: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
200d164: 32 bf ff fd bne,a 200d158 <rtems_string_to_unsigned_long_long+0x68><== NEVER TAKEN
200d168: d2 26 60 04 st %o1, [ %i1 + 4 ] <== NOT EXECUTED
200d16c: 40 00 08 61 call 200f2f0 <__errno>
200d170: d2 27 bf f4 st %o1, [ %fp + -12 ]
200d174: c2 02 00 00 ld [ %o0 ], %g1
200d178: b0 10 20 0a mov 0xa, %i0
200d17c: 80 a0 60 22 cmp %g1, 0x22
200d180: 12 bf ff f5 bne 200d154 <rtems_string_to_unsigned_long_long+0x64><== NEVER TAKEN
200d184: d2 07 bf f4 ld [ %fp + -12 ], %o1
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
200d188: 81 c7 e0 08 ret
200d18c: 81 e8 00 00 restore
200d190: 10 bf ff eb b 200d13c <rtems_string_to_unsigned_long_long+0x4c>
200d194: c2 07 bf fc ld [ %fp + -4 ], %g1
0200dd20 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200dd20: 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 )
200dd24: 80 a6 a0 00 cmp %i2, 0
200dd28: 02 80 00 44 be 200de38 <rtems_task_mode+0x118>
200dd2c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200dd30: 03 00 80 6d sethi %hi(0x201b400), %g1
200dd34: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200dd38: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200dd3c: c2 04 20 7c ld [ %l0 + 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;
200dd40: 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 ];
200dd44: e2 04 21 60 ld [ %l0 + 0x160 ], %l1
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200dd48: a4 60 3f ff subx %g0, -1, %l2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200dd4c: 80 a0 60 00 cmp %g1, 0
200dd50: 12 80 00 3c bne 200de40 <rtems_task_mode+0x120>
200dd54: a5 2c a0 08 sll %l2, 8, %l2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200dd58: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
200dd5c: 80 a0 00 01 cmp %g0, %g1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
200dd60: 7f ff f0 41 call 2009e64 <_CPU_ISR_Get_level>
200dd64: a6 60 3f ff subx %g0, -1, %l3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200dd68: a7 2c e0 0a sll %l3, 0xa, %l3
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;
200dd6c: a6 14 c0 08 or %l3, %o0, %l3
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
200dd70: a4 14 c0 12 or %l3, %l2, %l2
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200dd74: 80 8e 61 00 btst 0x100, %i1
200dd78: 02 80 00 06 be 200dd90 <rtems_task_mode+0x70>
200dd7c: e4 26 80 00 st %l2, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
200dd80: 83 36 20 08 srl %i0, 8, %g1
200dd84: 82 18 60 01 xor %g1, 1, %g1
200dd88: 82 08 60 01 and %g1, 1, %g1
200dd8c: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200dd90: 80 8e 62 00 btst 0x200, %i1
200dd94: 02 80 00 0b be 200ddc0 <rtems_task_mode+0xa0>
200dd98: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
200dd9c: 80 8e 22 00 btst 0x200, %i0
200dda0: 22 80 00 07 be,a 200ddbc <rtems_task_mode+0x9c>
200dda4: c0 24 20 7c clr [ %l0 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200dda8: 03 00 80 6d sethi %hi(0x201b400), %g1
200ddac: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 201b568 <_Thread_Ticks_per_timeslice>
200ddb0: c2 24 20 78 st %g1, [ %l0 + 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;
200ddb4: 82 10 20 01 mov 1, %g1
200ddb8: c2 24 20 7c st %g1, [ %l0 + 0x7c ]
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200ddbc: 80 8e 60 0f btst 0xf, %i1
200ddc0: 12 80 00 2d bne 200de74 <rtems_task_mode+0x154>
200ddc4: 01 00 00 00 nop
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200ddc8: 80 8e 64 00 btst 0x400, %i1
200ddcc: 22 80 00 16 be,a 200de24 <rtems_task_mode+0x104>
200ddd0: a0 10 20 00 clr %l0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200ddd4: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
200ddd8: b1 36 20 0a srl %i0, 0xa, %i0
200dddc: b0 1e 20 01 xor %i0, 1, %i0
200dde0: b0 0e 20 01 and %i0, 1, %i0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200dde4: 80 a0 40 18 cmp %g1, %i0
200dde8: 22 80 00 0f be,a 200de24 <rtems_task_mode+0x104>
200ddec: a0 10 20 00 clr %l0
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200ddf0: 7f ff d1 2f call 20022ac <sparc_disable_interrupts>
200ddf4: f0 2c 60 08 stb %i0, [ %l1 + 8 ]
_signals = information->signals_pending;
200ddf8: c4 04 60 18 ld [ %l1 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
200ddfc: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
information->signals_posted = _signals;
200de00: c4 24 60 14 st %g2, [ %l1 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200de04: c2 24 60 18 st %g1, [ %l1 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200de08: 7f ff d1 2d call 20022bc <sparc_enable_interrupts>
200de0c: 01 00 00 00 nop
200de10: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
200de14: 80 a0 60 00 cmp %g1, 0
200de18: 12 80 00 28 bne 200deb8 <rtems_task_mode+0x198>
200de1c: 82 10 20 01 mov 1, %g1
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
200de20: a0 10 20 00 clr %l0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
200de24: 03 00 80 6d sethi %hi(0x201b400), %g1
200de28: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b7b0 <_System_state_Current>
200de2c: 80 a0 60 03 cmp %g1, 3
200de30: 02 80 00 16 be 200de88 <rtems_task_mode+0x168> <== ALWAYS TAKEN
200de34: 82 10 20 00 clr %g1
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
200de38: 81 c7 e0 08 ret
200de3c: 91 e8 00 01 restore %g0, %g1, %o0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200de40: c2 0c 60 08 ldub [ %l1 + 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;
200de44: a4 14 a2 00 or %l2, 0x200, %l2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200de48: 80 a0 00 01 cmp %g0, %g1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
200de4c: 7f ff f0 06 call 2009e64 <_CPU_ISR_Get_level>
200de50: a6 60 3f ff subx %g0, -1, %l3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
200de54: a7 2c e0 0a sll %l3, 0xa, %l3
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;
200de58: a6 14 c0 08 or %l3, %o0, %l3
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
200de5c: a4 14 c0 12 or %l3, %l2, %l2
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200de60: 80 8e 61 00 btst 0x100, %i1
200de64: 02 bf ff cb be 200dd90 <rtems_task_mode+0x70>
200de68: e4 26 80 00 st %l2, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
200de6c: 10 bf ff c6 b 200dd84 <rtems_task_mode+0x64>
200de70: 83 36 20 08 srl %i0, 8, %g1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200de74: 90 0e 20 0f and %i0, 0xf, %o0
200de78: 7f ff d1 11 call 20022bc <sparc_enable_interrupts>
200de7c: 91 2a 20 08 sll %o0, 8, %o0
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200de80: 10 bf ff d3 b 200ddcc <rtems_task_mode+0xac>
200de84: 80 8e 64 00 btst 0x400, %i1
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
200de88: 40 00 00 c0 call 200e188 <_Thread_Evaluate_mode>
200de8c: 01 00 00 00 nop
200de90: 80 8a 20 ff btst 0xff, %o0
200de94: 12 80 00 04 bne 200dea4 <rtems_task_mode+0x184>
200de98: 80 8c 20 ff btst 0xff, %l0
200de9c: 02 bf ff e7 be 200de38 <rtems_task_mode+0x118>
200dea0: 82 10 20 00 clr %g1
_Thread_Dispatch();
200dea4: 7f ff e8 b1 call 2008168 <_Thread_Dispatch>
200dea8: 01 00 00 00 nop
200deac: 82 10 20 00 clr %g1 ! 0 <PROM_START>
return RTEMS_SUCCESSFUL;
}
200deb0: 81 c7 e0 08 ret
200deb4: 91 e8 00 01 restore %g0, %g1, %o0
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
200deb8: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ]
200debc: 10 bf ff da b 200de24 <rtems_task_mode+0x104>
200dec0: a0 10 20 01 mov 1, %l0
0200b944 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200b944: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200b948: 80 a6 60 00 cmp %i1, 0
200b94c: 02 80 00 07 be 200b968 <rtems_task_set_priority+0x24>
200b950: 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 ) &&
200b954: 03 00 80 86 sethi %hi(0x2021800), %g1
200b958: c2 08 62 c4 ldub [ %g1 + 0x2c4 ], %g1 ! 2021ac4 <rtems_maximum_priority>
200b95c: 80 a6 40 01 cmp %i1, %g1
200b960: 18 80 00 1c bgu 200b9d0 <rtems_task_set_priority+0x8c>
200b964: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200b968: 80 a6 a0 00 cmp %i2, 0
200b96c: 02 80 00 19 be 200b9d0 <rtems_task_set_priority+0x8c>
200b970: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200b974: 40 00 08 ad call 200dc28 <_Thread_Get>
200b978: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200b97c: c2 07 bf fc ld [ %fp + -4 ], %g1
200b980: 80 a0 60 00 cmp %g1, 0
200b984: 12 80 00 13 bne 200b9d0 <rtems_task_set_priority+0x8c>
200b988: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200b98c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200b990: 80 a6 60 00 cmp %i1, 0
200b994: 02 80 00 0d be 200b9c8 <rtems_task_set_priority+0x84>
200b998: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200b99c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200b9a0: 80 a0 60 00 cmp %g1, 0
200b9a4: 02 80 00 06 be 200b9bc <rtems_task_set_priority+0x78>
200b9a8: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
the_thread->current_priority > new_priority )
200b9ac: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200b9b0: 80 a6 40 01 cmp %i1, %g1
200b9b4: 1a 80 00 05 bcc 200b9c8 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
200b9b8: 01 00 00 00 nop
_Thread_Change_priority( the_thread, new_priority, false );
200b9bc: 92 10 00 19 mov %i1, %o1
200b9c0: 40 00 06 d8 call 200d520 <_Thread_Change_priority>
200b9c4: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200b9c8: 40 00 08 74 call 200db98 <_Thread_Enable_dispatch>
200b9cc: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200b9d0: 81 c7 e0 08 ret
200b9d4: 81 e8 00 00 restore
02007814 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
2007814: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
2007818: 80 a6 60 00 cmp %i1, 0
200781c: 02 80 00 09 be 2007840 <rtems_task_variable_delete+0x2c>
2007820: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
2007824: 90 10 00 18 mov %i0, %o0
2007828: 40 00 08 2b call 20098d4 <_Thread_Get>
200782c: 92 07 bf fc add %fp, -4, %o1
switch (location) {
2007830: c4 07 bf fc ld [ %fp + -4 ], %g2
2007834: 80 a0 a0 00 cmp %g2, 0
2007838: 02 80 00 04 be 2007848 <rtems_task_variable_delete+0x34>
200783c: 82 10 20 04 mov 4, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007840: 81 c7 e0 08 ret
2007844: 91 e8 00 01 restore %g0, %g1, %o0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
2007848: d2 02 21 70 ld [ %o0 + 0x170 ], %o1
while (tvp) {
200784c: 80 a2 60 00 cmp %o1, 0
2007850: 02 80 00 10 be 2007890 <rtems_task_variable_delete+0x7c>
2007854: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2007858: c2 02 60 04 ld [ %o1 + 4 ], %g1
200785c: 80 a0 40 19 cmp %g1, %i1
2007860: 12 80 00 08 bne 2007880 <rtems_task_variable_delete+0x6c>
2007864: 84 10 00 09 mov %o1, %g2
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2007868: 10 80 00 17 b 20078c4 <rtems_task_variable_delete+0xb0>
200786c: c2 02 40 00 ld [ %o1 ], %g1
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
2007870: 80 a0 40 19 cmp %g1, %i1
2007874: 22 80 00 0c be,a 20078a4 <rtems_task_variable_delete+0x90>
2007878: c2 02 40 00 ld [ %o1 ], %g1
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
200787c: 84 10 00 09 mov %o1, %g2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
2007880: d2 02 40 00 ld [ %o1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
2007884: 80 a2 60 00 cmp %o1, 0
2007888: 32 bf ff fa bne,a 2007870 <rtems_task_variable_delete+0x5c><== ALWAYS TAKEN
200788c: c2 02 60 04 ld [ %o1 + 4 ], %g1
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2007890: 40 00 08 03 call 200989c <_Thread_Enable_dispatch>
2007894: 01 00 00 00 nop
2007898: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200789c: 81 c7 e0 08 ret
20078a0: 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;
20078a4: c2 20 80 00 st %g1, [ %g2 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
20078a8: 40 00 00 2d call 200795c <_RTEMS_Tasks_Invoke_task_variable_dtor>
20078ac: 01 00 00 00 nop
_Thread_Enable_dispatch();
20078b0: 40 00 07 fb call 200989c <_Thread_Enable_dispatch>
20078b4: 01 00 00 00 nop
20078b8: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20078bc: 81 c7 e0 08 ret
20078c0: 91 e8 00 01 restore %g0, %g1, %o0
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
20078c4: 10 bf ff f9 b 20078a8 <rtems_task_variable_delete+0x94>
20078c8: c2 22 21 70 st %g1, [ %o0 + 0x170 ]
020078cc <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
20078cc: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
20078d0: 80 a6 60 00 cmp %i1, 0
20078d4: 02 80 00 1c be 2007944 <rtems_task_variable_get+0x78>
20078d8: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( !result )
20078dc: 02 80 00 1a be 2007944 <rtems_task_variable_get+0x78>
20078e0: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
20078e4: 40 00 07 fc call 20098d4 <_Thread_Get>
20078e8: 92 07 bf fc add %fp, -4, %o1
switch (location) {
20078ec: c2 07 bf fc ld [ %fp + -4 ], %g1
20078f0: 80 a0 60 00 cmp %g1, 0
20078f4: 12 80 00 12 bne 200793c <rtems_task_variable_get+0x70>
20078f8: 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;
20078fc: c2 02 21 70 ld [ %o0 + 0x170 ], %g1
while (tvp) {
2007900: 80 a0 60 00 cmp %g1, 0
2007904: 32 80 00 07 bne,a 2007920 <rtems_task_variable_get+0x54>
2007908: c4 00 60 04 ld [ %g1 + 4 ], %g2
200790c: 30 80 00 10 b,a 200794c <rtems_task_variable_get+0x80>
2007910: 80 a0 60 00 cmp %g1, 0
2007914: 02 80 00 0e be 200794c <rtems_task_variable_get+0x80> <== NEVER TAKEN
2007918: 01 00 00 00 nop
if (tvp->ptr == ptr) {
200791c: c4 00 60 04 ld [ %g1 + 4 ], %g2
2007920: 80 a0 80 19 cmp %g2, %i1
2007924: 32 bf ff fb bne,a 2007910 <rtems_task_variable_get+0x44>
2007928: 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;
200792c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
_Thread_Enable_dispatch();
2007930: b0 10 20 00 clr %i0
2007934: 40 00 07 da call 200989c <_Thread_Enable_dispatch>
2007938: c2 26 80 00 st %g1, [ %i2 ]
return RTEMS_SUCCESSFUL;
200793c: 81 c7 e0 08 ret
2007940: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007944: 81 c7 e0 08 ret
2007948: 91 e8 20 09 restore %g0, 9, %o0
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
200794c: 40 00 07 d4 call 200989c <_Thread_Enable_dispatch>
2007950: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
2007954: 81 c7 e0 08 ret
2007958: 81 e8 00 00 restore
02004b3c <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
2004b3c: 82 10 00 08 mov %o0, %g1
int baud_index;
switch (termios_baud) {
2004b40: 80 a2 20 09 cmp %o0, 9
2004b44: 02 80 00 2d be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NEVER TAKEN
2004b48: 90 10 20 09 mov 9, %o0
2004b4c: 80 a0 60 09 cmp %g1, 9
2004b50: 04 80 00 1a ble 2004bb8 <rtems_termios_baud_to_index+0x7c><== ALWAYS TAKEN
2004b54: 80 a0 60 04 cmp %g1, 4
2004b58: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED
2004b5c: 02 80 00 27 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004b60: 90 10 20 0e mov 0xe, %o0 <== NOT EXECUTED
2004b64: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED
2004b68: 04 80 00 26 ble 2004c00 <rtems_termios_baud_to_index+0xc4><== NOT EXECUTED
2004b6c: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
2004b70: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED
2004b74: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <PROM_START+0x1002> <== NOT EXECUTED
2004b78: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2004b7c: 02 80 00 1f be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004b80: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED
2004b84: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2004b88: 04 80 00 38 ble 2004c68 <rtems_termios_baud_to_index+0x12c><== NOT EXECUTED
2004b8c: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED
2004b90: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED
2004b94: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2004b98: 02 80 00 18 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004b9c: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED
2004ba0: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED
2004ba4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2004ba8: 02 80 00 14 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004bac: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
2004bb0: 81 c3 e0 08 retl
2004bb4: 90 10 3f ff mov -1, %o0
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
2004bb8: 02 80 00 10 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NEVER TAKEN
2004bbc: 90 10 20 04 mov 4, %o0
2004bc0: 80 a0 60 04 cmp %g1, 4
2004bc4: 14 80 00 1c bg 2004c34 <rtems_termios_baud_to_index+0xf8> <== NEVER TAKEN
2004bc8: 80 a0 60 06 cmp %g1, 6
2004bcc: 80 a0 60 01 cmp %g1, 1
2004bd0: 02 80 00 0a be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NEVER TAKEN
2004bd4: 90 10 20 01 mov 1, %o0
2004bd8: 80 a0 60 01 cmp %g1, 1
2004bdc: 04 80 00 2b ble 2004c88 <rtems_termios_baud_to_index+0x14c><== ALWAYS TAKEN
2004be0: 80 a0 60 02 cmp %g1, 2
2004be4: 02 80 00 05 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004be8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
2004bec: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
2004bf0: 12 bf ff f0 bne 2004bb0 <rtems_termios_baud_to_index+0x74><== NOT EXECUTED
2004bf4: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
2004bf8: 81 c3 e0 08 retl <== NOT EXECUTED
2004bfc: 01 00 00 00 nop <== NOT EXECUTED
2004c00: 02 bf ff fe be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c04: 90 10 20 0b mov 0xb, %o0 ! b <PROM_START+0xb> <== NOT EXECUTED
2004c08: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
2004c0c: 06 bf ff fb bl 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c10: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
2004c14: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED
2004c18: 02 bf ff f8 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c1c: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED
2004c20: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED
2004c24: 12 bf ff e3 bne 2004bb0 <rtems_termios_baud_to_index+0x74><== NOT EXECUTED
2004c28: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED
2004c2c: 81 c3 e0 08 retl <== NOT EXECUTED
2004c30: 01 00 00 00 nop <== NOT EXECUTED
2004c34: 02 bf ff f1 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c38: 90 10 20 06 mov 6, %o0 ! 6 <PROM_START+0x6> <== NOT EXECUTED
2004c3c: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED
2004c40: 06 bf ff ee bl 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c44: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
2004c48: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED
2004c4c: 02 bf ff eb be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c50: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED
2004c54: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED
2004c58: 12 bf ff d6 bne 2004bb0 <rtems_termios_baud_to_index+0x74><== NOT EXECUTED
2004c5c: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
2004c60: 81 c3 e0 08 retl <== NOT EXECUTED
2004c64: 01 00 00 00 nop <== NOT EXECUTED
2004c68: 02 bf ff e4 be 2004bf8 <rtems_termios_baud_to_index+0xbc> <== NOT EXECUTED
2004c6c: 90 10 20 0f mov 0xf, %o0 ! f <PROM_START+0xf> <== NOT EXECUTED
2004c70: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED
2004c74: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2004c78: 12 bf ff ce bne 2004bb0 <rtems_termios_baud_to_index+0x74><== NOT EXECUTED
2004c7c: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED
2004c80: 81 c3 e0 08 retl <== NOT EXECUTED
2004c84: 01 00 00 00 nop <== NOT EXECUTED
2004c88: 80 a0 60 00 cmp %g1, 0
2004c8c: 12 bf ff c9 bne 2004bb0 <rtems_termios_baud_to_index+0x74><== ALWAYS TAKEN
2004c90: 90 10 20 00 clr %o0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
2004c94: 81 c3 e0 08 retl <== NOT EXECUTED
02004c9c <rtems_termios_baud_to_number>:
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
2004c9c: 82 10 00 08 mov %o0, %g1
int32_t baud;
switch (termios_baud) {
2004ca0: 80 a2 20 09 cmp %o0, 9
2004ca4: 02 80 00 2f be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004ca8: 90 10 24 b0 mov 0x4b0, %o0
2004cac: 80 a0 60 09 cmp %g1, 9
2004cb0: 04 80 00 1c ble 2004d20 <rtems_termios_baud_to_number+0x84>
2004cb4: 80 a0 60 04 cmp %g1, 4
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
2004cb8: 11 00 00 12 sethi %hi(0x4800), %o0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
2004cbc: 80 a0 60 0e cmp %g1, 0xe
2004cc0: 02 80 00 28 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004cc4: 90 12 23 00 or %o0, 0x300, %o0
2004cc8: 80 a0 60 0e cmp %g1, 0xe
2004ccc: 04 80 00 27 ble 2004d68 <rtems_termios_baud_to_number+0xcc>
2004cd0: 80 a0 60 0b cmp %g1, 0xb
2004cd4: 05 00 00 04 sethi %hi(0x1000), %g2
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
2004cd8: 11 00 00 70 sethi %hi(0x1c000), %o0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
2004cdc: 86 10 a0 02 or %g2, 2, %g3
2004ce0: 80 a0 40 03 cmp %g1, %g3
2004ce4: 02 80 00 1f be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004ce8: 90 12 22 00 or %o0, 0x200, %o0
2004cec: 80 a0 40 03 cmp %g1, %g3
2004cf0: 04 80 00 3a ble 2004dd8 <rtems_termios_baud_to_number+0x13c>
2004cf4: 11 00 00 25 sethi %hi(0x9400), %o0
2004cf8: 86 10 a0 03 or %g2, 3, %g3
2004cfc: 80 a0 40 03 cmp %g1, %g3
2004d00: 02 80 00 18 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d04: 11 00 00 e1 sethi %hi(0x38400), %o0
2004d08: 84 10 a0 04 or %g2, 4, %g2
2004d0c: 80 a0 40 02 cmp %g1, %g2
2004d10: 02 80 00 14 be 2004d60 <rtems_termios_baud_to_number+0xc4><== ALWAYS TAKEN
2004d14: 11 00 01 c2 sethi %hi(0x70800), %o0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
2004d18: 81 c3 e0 08 retl
2004d1c: 90 10 3f ff mov -1, %o0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
2004d20: 02 80 00 10 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d24: 90 10 20 86 mov 0x86, %o0
2004d28: 80 a0 60 04 cmp %g1, 4
2004d2c: 14 80 00 1e bg 2004da4 <rtems_termios_baud_to_number+0x108>
2004d30: 80 a0 60 06 cmp %g1, 6
2004d34: 80 a0 60 01 cmp %g1, 1
2004d38: 02 80 00 0a be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d3c: 90 10 20 32 mov 0x32, %o0
2004d40: 80 a0 60 01 cmp %g1, 1
2004d44: 04 80 00 2f ble 2004e00 <rtems_termios_baud_to_number+0x164>
2004d48: 80 a0 60 02 cmp %g1, 2
2004d4c: 02 80 00 05 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d50: 90 10 20 4b mov 0x4b, %o0
2004d54: 80 a0 60 03 cmp %g1, 3
2004d58: 12 bf ff f0 bne 2004d18 <rtems_termios_baud_to_number+0x7c><== NEVER TAKEN
2004d5c: 90 10 20 6e mov 0x6e, %o0
2004d60: 81 c3 e0 08 retl
2004d64: 01 00 00 00 nop
2004d68: 02 bf ff fe be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d6c: 90 10 29 60 mov 0x960, %o0 ! 960 <PROM_START+0x960>
2004d70: 80 a0 60 0b cmp %g1, 0xb
2004d74: 06 bf ff fb bl 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d78: 90 10 27 08 mov 0x708, %o0
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
2004d7c: 90 02 28 f8 add %o0, 0x8f8, %o0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
2004d80: 80 a0 60 0c cmp %g1, 0xc
2004d84: 02 bf ff f7 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004d88: 90 12 22 c0 or %o0, 0x2c0, %o0
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
2004d8c: 11 00 00 09 sethi %hi(0x2400), %o0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
2004d90: 80 a0 60 0d cmp %g1, 0xd
2004d94: 12 bf ff e1 bne 2004d18 <rtems_termios_baud_to_number+0x7c><== NEVER TAKEN
2004d98: 90 12 21 80 or %o0, 0x180, %o0
2004d9c: 81 c3 e0 08 retl
2004da0: 01 00 00 00 nop
2004da4: 02 bf ff ef be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004da8: 90 10 20 c8 mov 0xc8, %o0 ! c8 <PROM_START+0xc8>
2004dac: 80 a0 60 06 cmp %g1, 6
2004db0: 06 bf ff ec bl 2004d60 <rtems_termios_baud_to_number+0xc4>
2004db4: 90 10 20 96 mov 0x96, %o0
2004db8: 80 a0 60 07 cmp %g1, 7
2004dbc: 02 bf ff e9 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004dc0: 90 10 21 2c mov 0x12c, %o0
2004dc4: 80 a0 60 08 cmp %g1, 8
2004dc8: 12 bf ff d4 bne 2004d18 <rtems_termios_baud_to_number+0x7c><== NEVER TAKEN
2004dcc: 90 10 22 58 mov 0x258, %o0
2004dd0: 81 c3 e0 08 retl
2004dd4: 01 00 00 00 nop
2004dd8: 80 a0 60 0f cmp %g1, 0xf
2004ddc: 02 bf ff e1 be 2004d60 <rtems_termios_baud_to_number+0xc4>
2004de0: 90 12 22 00 or %o0, 0x200, %o0
2004de4: 84 10 a0 01 or %g2, 1, %g2
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
2004de8: 11 00 00 38 sethi %hi(0xe000), %o0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
2004dec: 80 a0 40 02 cmp %g1, %g2
2004df0: 12 bf ff ca bne 2004d18 <rtems_termios_baud_to_number+0x7c><== NEVER TAKEN
2004df4: 90 12 21 00 or %o0, 0x100, %o0
2004df8: 81 c3 e0 08 retl
2004dfc: 01 00 00 00 nop
2004e00: 80 a0 60 00 cmp %g1, 0
2004e04: 12 bf ff c5 bne 2004d18 <rtems_termios_baud_to_number+0x7c>
2004e08: 90 10 20 00 clr %o0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
2004e0c: 81 c3 e0 08 retl
020035ac <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
20035ac: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
20035b0: d0 20 60 70 st %o0, [ %g1 + 0x70 ] ! 201ac70 <rtems_termios_cbufsize><== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
20035b4: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
20035b8: 90 10 20 00 clr %o0 <== NOT EXECUTED
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
20035bc: d2 20 60 74 st %o1, [ %g1 + 0x74 ] <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
20035c0: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
20035c4: 81 c3 e0 08 retl <== NOT EXECUTED
20035c8: d4 20 60 78 st %o2, [ %g1 + 0x78 ] ! 201ac78 <rtems_termios_raw_output_size><== NOT EXECUTED
02004ce0 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
2004ce0: 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004ce4: 23 00 80 6d sethi %hi(0x201b400), %l1
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004ce8: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004cec: d0 04 60 8c ld [ %l1 + 0x8c ], %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;
2004cf0: e0 00 60 38 ld [ %g1 + 0x38 ], %l0
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004cf4: 92 10 20 00 clr %o1
2004cf8: 40 00 04 c3 call 2006004 <rtems_semaphore_obtain>
2004cfc: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2004d00: 80 a2 20 00 cmp %o0, 0
2004d04: 12 80 00 6e bne 2004ebc <rtems_termios_close+0x1dc> <== NEVER TAKEN
2004d08: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
2004d0c: c2 04 20 08 ld [ %l0 + 8 ], %g1
2004d10: 82 00 7f ff add %g1, -1, %g1
2004d14: 80 a0 60 00 cmp %g1, 0
2004d18: 12 80 00 3a bne 2004e00 <rtems_termios_close+0x120>
2004d1c: c2 24 20 08 st %g1, [ %l0 + 8 ]
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2004d20: c4 04 20 cc ld [ %l0 + 0xcc ], %g2
2004d24: 03 00 80 6c sethi %hi(0x201b000), %g1
2004d28: 85 28 a0 05 sll %g2, 5, %g2
2004d2c: 82 10 61 b8 or %g1, 0x1b8, %g1
2004d30: 82 00 40 02 add %g1, %g2, %g1
2004d34: c2 00 60 04 ld [ %g1 + 4 ], %g1
2004d38: 80 a0 60 00 cmp %g1, 0
2004d3c: 22 80 00 48 be,a 2004e5c <rtems_termios_close+0x17c> <== ALWAYS TAKEN
2004d40: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2004d44: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004d48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
2004d4c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED
2004d50: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2004d54: 22 80 00 4f be,a 2004e90 <rtems_termios_close+0x1b0> <== NOT EXECUTED
2004d58: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
2004d5c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
2004d60: 80 a0 60 00 cmp %g1, 0
2004d64: 22 80 00 07 be,a 2004d80 <rtems_termios_close+0xa0> <== ALWAYS TAKEN
2004d68: c2 04 00 00 ld [ %l0 ], %g1
(*tty->device.lastClose)(tty->major, tty->minor, arg);
2004d6c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED
2004d70: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED
2004d74: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004d78: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->forw == NULL) {
2004d7c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
2004d80: 80 a0 60 00 cmp %g1, 0
2004d84: 22 80 00 27 be,a 2004e20 <rtems_termios_close+0x140>
2004d88: c2 04 20 04 ld [ %l0 + 4 ], %g1
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
2004d8c: c4 04 20 04 ld [ %l0 + 4 ], %g2
2004d90: c4 20 60 04 st %g2, [ %g1 + 4 ]
}
if (tty->back == NULL) {
2004d94: c4 04 20 04 ld [ %l0 + 4 ], %g2
2004d98: 80 a0 a0 00 cmp %g2, 0
2004d9c: 22 80 00 2b be,a 2004e48 <rtems_termios_close+0x168> <== ALWAYS TAKEN
2004da0: 05 00 80 6d sethi %hi(0x201b400), %g2
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
2004da4: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
2004da8: 40 00 04 6a call 2005f50 <rtems_semaphore_delete>
2004dac: d0 04 20 14 ld [ %l0 + 0x14 ], %o0
rtems_semaphore_delete (tty->osem);
2004db0: 40 00 04 68 call 2005f50 <rtems_semaphore_delete>
2004db4: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
2004db8: 40 00 04 66 call 2005f50 <rtems_semaphore_delete>
2004dbc: d0 04 20 8c ld [ %l0 + 0x8c ], %o0
if ((tty->device.pollRead == NULL) ||
2004dc0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
2004dc4: 80 a0 60 00 cmp %g1, 0
2004dc8: 02 80 00 13 be 2004e14 <rtems_termios_close+0x134>
2004dcc: 01 00 00 00 nop
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
2004dd0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
2004dd4: 80 a0 60 02 cmp %g1, 2
2004dd8: 02 80 00 0f be 2004e14 <rtems_termios_close+0x134> <== NEVER TAKEN
2004ddc: 01 00 00 00 nop
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
2004de0: 40 00 19 1c call 200b250 <free>
2004de4: d0 04 20 58 ld [ %l0 + 0x58 ], %o0
free (tty->rawOutBuf.theBuf);
2004de8: 40 00 19 1a call 200b250 <free>
2004dec: d0 04 20 7c ld [ %l0 + 0x7c ], %o0
free (tty->cbuf);
2004df0: 40 00 19 18 call 200b250 <free>
2004df4: d0 04 20 1c ld [ %l0 + 0x1c ], %o0
free (tty);
2004df8: 40 00 19 16 call 200b250 <free>
2004dfc: 90 10 00 10 mov %l0, %o0
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004e00: d0 04 60 8c ld [ %l1 + 0x8c ], %o0
2004e04: 40 00 04 c7 call 2006120 <rtems_semaphore_release>
2004e08: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2004e0c: 81 c7 e0 08 ret
2004e10: 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);
2004e14: 40 00 04 4f call 2005f50 <rtems_semaphore_delete>
2004e18: d0 04 20 68 ld [ %l0 + 0x68 ], %o0
2004e1c: 30 bf ff f1 b,a 2004de0 <rtems_termios_close+0x100>
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;
2004e20: 05 00 80 6d sethi %hi(0x201b400), %g2
if ( rtems_termios_ttyTail != NULL ) {
2004e24: 80 a0 60 00 cmp %g1, 0
2004e28: 02 80 00 27 be 2004ec4 <rtems_termios_close+0x1e4> <== ALWAYS TAKEN
2004e2c: c2 20 a0 90 st %g1, [ %g2 + 0x90 ]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
2004e30: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
2004e34: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
2004e38: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004e3c: 12 bf ff da bne 2004da4 <rtems_termios_close+0xc4> <== NOT EXECUTED
2004e40: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
2004e44: 05 00 80 6d sethi %hi(0x201b400), %g2 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
2004e48: 80 a0 60 00 cmp %g1, 0
2004e4c: 02 bf ff d7 be 2004da8 <rtems_termios_close+0xc8> <== NEVER TAKEN
2004e50: c2 20 a0 94 st %g1, [ %g2 + 0x94 ]
rtems_termios_ttyHead->back = NULL;
2004e54: 10 bf ff d5 b 2004da8 <rtems_termios_close+0xc8>
2004e58: c0 20 60 04 clr [ %g1 + 4 ]
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004e5c: 92 10 20 00 clr %o1
2004e60: 40 00 04 69 call 2006004 <rtems_semaphore_obtain>
2004e64: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL) {
2004e68: 80 a2 20 00 cmp %o0, 0
2004e6c: 12 80 00 14 bne 2004ebc <rtems_termios_close+0x1dc> <== NEVER TAKEN
2004e70: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
2004e74: 7f ff fd 80 call 2004474 <drainOutput>
2004e78: 90 10 00 10 mov %l0, %o0
}
if (tty->device.outputUsesInterrupts
2004e7c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
2004e80: 80 a0 60 02 cmp %g1, 2
2004e84: 32 bf ff b7 bne,a 2004d60 <rtems_termios_close+0x80> <== ALWAYS TAKEN
2004e88: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
2004e8c: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED
2004e90: 40 00 03 1c call 2005b00 <rtems_event_send> <== NOT EXECUTED
2004e94: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
2004e98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004e9c: 12 80 00 08 bne 2004ebc <rtems_termios_close+0x1dc> <== NOT EXECUTED
2004ea0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
2004ea4: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED
2004ea8: 40 00 03 16 call 2005b00 <rtems_event_send> <== NOT EXECUTED
2004eac: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
2004eb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004eb4: 22 bf ff ab be,a 2004d60 <rtems_termios_close+0x80> <== NOT EXECUTED
2004eb8: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2004ebc: 40 00 05 ff call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
2004ec0: 01 00 00 00 nop <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
2004ec4: 03 00 80 6d sethi %hi(0x201b400), %g1
2004ec8: 10 bf ff b8 b 2004da8 <rtems_termios_close+0xc8>
2004ecc: c0 20 60 94 clr [ %g1 + 0x94 ] ! 201b494 <rtems_termios_ttyHead>
020037e4 <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)
{
20037e4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
20037e8: c4 06 20 90 ld [ %i0 + 0x90 ], %g2
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20037ec: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
20037f0: 84 00 80 19 add %g2, %i1, %g2
20037f4: c4 26 20 90 st %g2, [ %i0 + 0x90 ]
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20037f8: 80 a0 60 02 cmp %g1, 2
20037fc: 02 80 00 10 be 200383c <rtems_termios_dequeue_characters+0x58><== NEVER TAKEN
2003800: 90 10 00 18 mov %i0, %o0
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
2003804: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2003808: 80 a0 60 05 cmp %g1, 5
200380c: 02 80 00 04 be 200381c <rtems_termios_dequeue_characters+0x38><== NEVER TAKEN
2003810: 03 00 80 6c sethi %hi(0x201b000), %g1
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
2003814: 7f ff ff 74 call 20035e4 <rtems_termios_refill_transmitter>
2003818: 81 e8 00 00 restore
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
200381c: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 <== NOT EXECUTED
2003820: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003824: 02 80 00 04 be 2003834 <rtems_termios_dequeue_characters+0x50><== NOT EXECUTED
2003828: 01 00 00 00 nop <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
200382c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003830: 01 00 00 00 nop <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
2003834: 81 c7 e0 08 ret <== NOT EXECUTED
2003838: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
200383c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED
2003840: 40 00 08 b0 call 2005b00 <rtems_event_send> <== NOT EXECUTED
2003844: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
2003848: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200384c: 02 bf ff fa be 2003834 <rtems_termios_dequeue_characters+0x50><== NOT EXECUTED
2003850: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2003854: 40 00 0b 99 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
02003860 <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, char *buf, int len)
{
2003860: 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) {
2003864: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2003868: 23 00 80 6c sethi %hi(0x201b000), %l1
200386c: 83 28 60 05 sll %g1, 5, %g1
2003870: a2 14 61 b8 or %l1, 0x1b8, %l1
2003874: 82 00 60 10 add %g1, 0x10, %g1
2003878: c2 04 40 01 ld [ %l1 + %g1 ], %g1
200387c: 80 a0 60 00 cmp %g1, 0
2003880: 02 80 00 22 be 2003908 <rtems_termios_enqueue_raw_characters+0xa8><== ALWAYS TAKEN
2003884: a0 10 00 18 mov %i0, %l0
while (len--) {
2003888: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
200388c: 22 80 00 0f be,a 20038c8 <rtems_termios_enqueue_raw_characters+0x68><== NOT EXECUTED
2003890: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED
2003894: 10 80 00 05 b 20038a8 <rtems_termios_enqueue_raw_characters+0x48><== NOT EXECUTED
2003898: a4 10 20 00 clr %l2 <== NOT EXECUTED
200389c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
20038a0: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED
20038a4: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
20038a8: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
20038ac: 9f c0 40 00 call %g1 <== NOT EXECUTED
20038b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20038b4: a4 04 a0 01 inc %l2 <== NOT EXECUTED
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--) {
20038b8: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED
20038bc: 32 bf ff f8 bne,a 200389c <rtems_termios_enqueue_raw_characters+0x3c><== NOT EXECUTED
20038c0: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
20038c4: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED
20038c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20038cc: 12 80 00 0d bne 2003900 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
20038d0: 01 00 00 00 nop <== NOT EXECUTED
20038d4: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED
20038d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20038dc: 02 80 00 09 be 2003900 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
20038e0: 01 00 00 00 nop <== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
20038e4: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED
20038e8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20038ec: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
20038f0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
20038f4: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED
20038f8: 81 c7 e0 08 ret <== NOT EXECUTED
20038fc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
2003900: 81 c7 e0 08 ret <== NOT EXECUTED
2003904: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2003908: a2 10 00 1a mov %i2, %l1
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,
200390c: ae 06 20 4a add %i0, 0x4a, %l7
/*
* 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);
2003910: ac 06 20 30 add %i0, 0x30, %l6
2003914: a8 10 20 00 clr %l4
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2003918: 80 a4 60 00 cmp %l1, 0
200391c: 02 80 00 1c be 200398c <rtems_termios_enqueue_raw_characters+0x12c><== ALWAYS TAKEN
2003920: b0 10 20 00 clr %i0
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2003924: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003928: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
200392c: 02 80 00 0b be 2003958 <rtems_termios_enqueue_raw_characters+0xf8><== NOT EXECUTED
2003930: e4 0e 40 00 ldub [ %i1 ], %l2 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
2003934: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED
2003938: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED
200393c: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED
2003940: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2003944: 02 80 00 63 be 2003ad0 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
2003948: c4 0c 20 49 ldub [ %l0 + 0x49 ], %g2 <== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
200394c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2003950: 02 80 00 68 be 2003af0 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
2003954: 01 00 00 00 nop <== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
2003958: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED
200395c: 02 80 00 22 be 20039e4 <rtems_termios_enqueue_raw_characters+0x184><== NOT EXECUTED
2003960: 01 00 00 00 nop <== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
2003964: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003968: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED
200396c: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
2003970: 02 80 00 0e be 20039a8 <rtems_termios_enqueue_raw_characters+0x148><== NOT EXECUTED
2003974: 01 00 00 00 nop <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
2003978: b2 06 60 01 inc %i1 <== NOT EXECUTED
200397c: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2003980: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2003984: 12 bf ff e8 bne 2003924 <rtems_termios_enqueue_raw_characters+0xc4><== NOT EXECUTED
2003988: 01 00 00 00 nop <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
200398c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2003990: d0 04 20 68 ld [ %l0 + 0x68 ], %o0
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
2003994: 82 00 40 18 add %g1, %i0, %g1
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2003998: 40 00 09 e2 call 2006120 <rtems_semaphore_release>
200399c: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
return dropped;
20039a0: 81 c7 e0 08 ret
20039a4: 81 e8 00 00 restore
}
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);
20039a8: 7f ff fa 41 call 20022ac <sparc_disable_interrupts> <== NOT EXECUTED
20039ac: 01 00 00 00 nop <== NOT EXECUTED
20039b0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
20039b4: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20039b8: c2 04 20 94 ld [ %l0 + 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;
20039bc: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
20039c0: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20039c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20039c8: 12 80 00 57 bne 2003b24 <rtems_termios_enqueue_raw_characters+0x2c4><== NOT EXECUTED
20039cc: 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);
20039d0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
20039d4: 7f ff fa 3a call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
20039d8: b2 06 60 01 inc %i1 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
20039dc: 10 bf ff e9 b 2003980 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
20039e0: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
20039e4: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED
20039e8: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
20039ec: 40 00 51 b4 call 20180bc <.urem> <== NOT EXECUTED
20039f0: 90 02 20 01 inc %o0 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
20039f4: 7f ff fa 2e call 20022ac <sparc_disable_interrupts> <== NOT EXECUTED
20039f8: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
20039fc: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2003a00: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED
2003a04: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED
2003a08: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
2003a0c: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
2003a10: 40 00 51 ab call 20180bc <.urem> <== NOT EXECUTED
2003a14: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
2003a18: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED
2003a1c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
2003a20: 08 80 00 13 bleu 2003a6c <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
2003a24: 01 00 00 00 nop <== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
2003a28: c2 04 20 b8 ld [ %l0 + 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)
2003a2c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2003a30: 12 80 00 0f bne 2003a6c <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
2003a34: 01 00 00 00 nop <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
2003a38: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003a3c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
2003a40: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2003a44: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003a48: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED
2003a4c: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED
2003a50: 02 80 00 3d be 2003b44 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
2003a54: 01 00 00 00 nop <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
2003a58: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003a5c: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED
2003a60: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED
2003a64: 02 80 00 49 be 2003b88 <rtems_termios_enqueue_raw_characters+0x328><== NOT EXECUTED
2003a68: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2003a6c: 7f ff fa 14 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
2003a70: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
2003a74: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED
2003a78: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED
2003a7c: 22 80 00 22 be,a 2003b04 <rtems_termios_enqueue_raw_characters+0x2a4><== NOT EXECUTED
2003a80: b0 06 20 01 inc %i0 <== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
2003a84: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED
2003a88: e4 28 40 13 stb %l2, [ %g1 + %l3 ] <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2003a8c: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
2003a90: e6 24 20 60 st %l3, [ %l0 + 0x60 ] <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2003a94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003a98: 32 bf ff b9 bne,a 200397c <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
2003a9c: b2 06 60 01 inc %i1 <== NOT EXECUTED
2003aa0: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED
2003aa4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003aa8: 22 bf ff b5 be,a 200397c <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
2003aac: b2 06 60 01 inc %i1 <== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2003ab0: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED
2003ab4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003ab8: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2003abc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
2003ac0: b2 06 60 01 inc %i1 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
2003ac4: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
2003ac8: 10 bf ff ae b 2003980 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
2003acc: a2 04 7f ff add %l1, -1, %l1 <== 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]) {
2003ad0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2003ad4: 02 80 00 0f be 2003b10 <rtems_termios_enqueue_raw_characters+0x2b0><== NOT EXECUTED
2003ad8: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
2003adc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
2003ae0: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
2003ae4: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED
2003ae8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
2003aec: 30 bf ff 9e b,a 2003964 <rtems_termios_enqueue_raw_characters+0x104><== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
2003af0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
2003af4: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
2003af8: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED
2003afc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
2003b00: 30 bf ff 99 b,a 2003964 <rtems_termios_enqueue_raw_characters+0x104><== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
2003b04: b2 06 60 01 inc %i1 <== NOT EXECUTED
2003b08: 10 bf ff 9e b 2003980 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
2003b0c: a2 04 7f ff add %l1, -1, %l1 <== 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;
2003b10: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
2003b14: a8 10 20 01 mov 1, %l4 <== 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;
2003b18: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED
2003b1c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
2003b20: 30 bf ff 91 b,a 2003964 <rtems_termios_enqueue_raw_characters+0x104><== 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);
2003b24: c4 04 20 84 ld [ %l0 + 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)(tty->minor,
2003b28: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED
2003b2c: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
2003b30: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
2003b34: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2003b38: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003b3c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2003b40: 30 bf ff a4 b,a 20039d0 <rtems_termios_enqueue_raw_characters+0x170><== 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) ||
2003b44: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2003b48: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003b4c: 12 80 00 06 bne 2003b64 <rtems_termios_enqueue_raw_characters+0x304><== NOT EXECUTED
2003b50: 01 00 00 00 nop <== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
2003b54: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED
2003b58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b5c: 12 bf ff c4 bne 2003a6c <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
2003b60: 01 00 00 00 nop <== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
2003b64: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003b68: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
2003b6c: d0 04 20 10 ld [ %l0 + 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;
2003b70: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003b74: 92 10 00 17 mov %l7, %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;
2003b78: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003b7c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003b80: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2003b84: 30 bf ff ba b,a 2003a6c <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2003b88: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2003b8c: c2 04 20 ac ld [ %l0 + 0xac ], %g1 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2003b90: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED
2003b94: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2003b98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003b9c: 02 bf ff b4 be 2003a6c <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
2003ba0: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
2003ba4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003ba8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
2003bac: 30 bf ff b0 b,a 2003a6c <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
0200355c <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
200355c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
2003560: 19 00 80 6d sethi %hi(0x201b400), %o4
2003564: c2 03 20 8c ld [ %o4 + 0x8c ], %g1 ! 201b48c <rtems_termios_ttyMutex>
2003568: 80 a0 60 00 cmp %g1, 0
200356c: 02 80 00 04 be 200357c <rtems_termios_initialize+0x20>
2003570: 98 13 20 8c or %o4, 0x8c, %o4
2003574: 81 c7 e0 08 ret
2003578: 81 e8 00 00 restore
sc = rtems_semaphore_create (
200357c: 11 15 14 9b sethi %hi(0x54526c00), %o0
2003580: 92 10 20 01 mov 1, %o1
2003584: 90 12 21 69 or %o0, 0x169, %o0
2003588: 94 10 20 54 mov 0x54, %o2
200358c: 40 00 09 fd call 2005d80 <rtems_semaphore_create>
2003590: 96 10 20 00 clr %o3
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
2003594: 80 a2 20 00 cmp %o0, 0
2003598: 02 bf ff f7 be 2003574 <rtems_termios_initialize+0x18> <== ALWAYS TAKEN
200359c: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
20035a0: 40 00 0c 46 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
020048d4 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
20048d4: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20048d8: c2 06 00 00 ld [ %i0 ], %g1
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
20048dc: c0 26 20 0c clr [ %i0 + 0xc ]
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20048e0: e0 00 60 38 ld [ %g1 + 0x38 ], %l0
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
20048e4: e4 06 20 08 ld [ %i0 + 8 ], %l2
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20048e8: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
20048ec: 92 10 20 00 clr %o1
20048f0: 40 00 05 c5 call 2006004 <rtems_semaphore_obtain>
20048f4: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL) {
20048f8: a2 92 20 00 orcc %o0, 0, %l1
20048fc: 32 80 00 16 bne,a 2004954 <rtems_termios_ioctl+0x80> <== NEVER TAKEN
2004900: e2 26 20 0c st %l1, [ %i0 + 0xc ] <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004904: c2 06 20 04 ld [ %i0 + 4 ], %g1
2004908: 80 a0 60 04 cmp %g1, 4
200490c: 22 80 00 0c be,a 200493c <rtems_termios_ioctl+0x68> <== NEVER TAKEN
2004910: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
2004914: 18 80 00 12 bgu 200495c <rtems_termios_ioctl+0x88> <== NEVER TAKEN
2004918: 05 10 01 19 sethi %hi(0x40046400), %g2
200491c: 80 a0 60 02 cmp %g1, 2
2004920: 22 80 00 26 be,a 20049b8 <rtems_termios_ioctl+0xe4>
2004924: d2 06 20 08 ld [ %i0 + 8 ], %o1
2004928: 08 80 00 81 bleu 2004b2c <rtems_termios_ioctl+0x258>
200492c: 80 a0 60 01 cmp %g1, 1
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
2004930: 7f ff fe d1 call 2004474 <drainOutput>
2004934: 90 10 00 10 mov %l0, %o0
break;
2004938: 30 80 00 04 b,a 2004948 <rtems_termios_ioctl+0x74>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
200493c: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED
2004940: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED
2004944: c2 24 20 e0 st %g1, [ %l0 + 0xe0 ] <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
2004948: 40 00 05 f6 call 2006120 <rtems_semaphore_release>
200494c: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
args->ioctl_return = sc;
2004950: e2 26 20 0c st %l1, [ %i0 + 0xc ]
return sc;
}
2004954: 81 c7 e0 08 ret
2004958: 91 e8 00 11 restore %g0, %l1, %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) {
200495c: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED
2004960: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2004964: 02 80 00 66 be 2004afc <rtems_termios_ioctl+0x228> <== NOT EXECUTED
2004968: 01 00 00 00 nop <== NOT EXECUTED
200496c: 18 80 00 77 bgu 2004b48 <rtems_termios_ioctl+0x274> <== NOT EXECUTED
2004970: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED
2004974: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED
2004978: 22 80 00 98 be,a 2004bd8 <rtems_termios_ioctl+0x304> <== NOT EXECUTED
200497c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
2004980: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED
2004984: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED
2004988: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED
200498c: 82 10 61 b8 or %g1, 0x1b8, %g1 <== NOT EXECUTED
2004990: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
2004994: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED
2004998: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200499c: 02 bf ff eb be 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
20049a0: a2 10 20 0a mov 0xa, %l1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
20049a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20049a8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20049ac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20049b0: 10 bf ff e6 b 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
20049b4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
20049b8: a4 04 20 30 add %l0, 0x30, %l2
20049bc: 94 10 20 24 mov 0x24, %o2
20049c0: 40 00 2a 1b call 200f22c <memcpy>
20049c4: 90 10 00 12 mov %l2, %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) &&
20049c8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1
20049cc: 80 88 62 00 btst 0x200, %g1
20049d0: 02 80 00 19 be 2004a34 <rtems_termios_ioctl+0x160>
20049d4: 01 00 00 00 nop
20049d8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
20049dc: 80 88 64 00 btst 0x400, %g1
20049e0: 12 80 00 15 bne 2004a34 <rtems_termios_ioctl+0x160> <== ALWAYS TAKEN
20049e4: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
20049e8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
20049ec: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED
20049f0: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
20049f4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
20049f8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20049fc: 02 80 00 0e be 2004a34 <rtems_termios_ioctl+0x160> <== NOT EXECUTED
2004a00: 01 00 00 00 nop <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
2004a04: 7f ff f6 2a call 20022ac <sparc_disable_interrupts> <== NOT EXECUTED
2004a08: 01 00 00 00 nop <== NOT EXECUTED
2004a0c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
2004a10: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2004a14: c2 04 20 94 ld [ %l0 + 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;
2004a18: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
2004a1c: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2004a20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004a24: 12 80 00 a7 bne 2004cc0 <rtems_termios_ioctl+0x3ec> <== NOT EXECUTED
2004a28: 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);
2004a2c: 7f ff f6 24 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
2004a30: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
2004a34: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1
2004a38: 80 88 64 00 btst 0x400, %g1
2004a3c: 02 80 00 0c be 2004a6c <rtems_termios_ioctl+0x198> <== ALWAYS TAKEN
2004a40: 03 00 00 04 sethi %hi(0x1000), %g1
2004a44: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED
2004a48: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED
2004a4c: 12 80 00 08 bne 2004a6c <rtems_termios_ioctl+0x198> <== NOT EXECUTED
2004a50: 01 00 00 00 nop <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
2004a54: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004a58: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED
2004a5c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
2004a60: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004a64: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED
2004a68: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
2004a6c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1
2004a70: 80 88 61 00 btst 0x100, %g1
2004a74: 12 80 00 5d bne 2004be8 <rtems_termios_ioctl+0x314> <== NEVER TAKEN
2004a78: c4 04 20 38 ld [ %l0 + 0x38 ], %g2
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
2004a7c: 80 a0 a0 00 cmp %g2, 0
2004a80: 06 80 00 84 bl 2004c90 <rtems_termios_ioctl+0x3bc> <== NEVER TAKEN
2004a84: 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) {
2004a88: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
2004a8c: 05 00 00 04 sethi %hi(0x1000), %g2
2004a90: 80 88 40 02 btst %g1, %g2
2004a94: 02 80 00 06 be 2004aac <rtems_termios_ioctl+0x1d8> <== ALWAYS TAKEN
2004a98: 80 88 64 00 btst 0x400, %g1
tty->flow_ctrl |= FL_MDXOF;
2004a9c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
2004aa0: 84 10 a4 00 or %g2, 0x400, %g2 <== NOT EXECUTED
2004aa4: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
2004aa8: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED
2004aac: 22 80 00 06 be,a 2004ac4 <rtems_termios_ioctl+0x1f0> <== NEVER TAKEN
2004ab0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXON;
2004ab4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1
2004ab8: 82 10 62 00 or %g1, 0x200, %g1
2004abc: c2 24 20 b8 st %g1, [ %l0 + 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) {
2004ac0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1
2004ac4: 80 88 60 02 btst 2, %g1
2004ac8: 02 80 00 5e be 2004c40 <rtems_termios_ioctl+0x36c> <== NEVER TAKEN
2004acc: 01 00 00 00 nop
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2004ad0: c0 24 20 6c clr [ %l0 + 0x6c ]
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
2004ad4: c0 24 20 70 clr [ %l0 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
2004ad8: c0 24 20 74 clr [ %l0 + 0x74 ]
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
2004adc: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1
2004ae0: 80 a0 60 00 cmp %g1, 0
2004ae4: 02 bf ff 99 be 2004948 <rtems_termios_ioctl+0x74> <== NEVER TAKEN
2004ae8: 01 00 00 00 nop
(*tty->device.setAttributes)(tty->minor, &tty->termios);
2004aec: d0 04 20 10 ld [ %l0 + 0x10 ], %o0
2004af0: 9f c0 40 00 call %g1
2004af4: 92 10 00 12 mov %l2, %o1
2004af8: 30 bf ff 94 b,a 2004948 <rtems_termios_ioctl+0x74>
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
2004afc: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED
2004b00: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED
if ( rawnc < 0 )
2004b04: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED
2004b08: 0c 80 00 5f bneg 2004c84 <rtems_termios_ioctl+0x3b0> <== NOT EXECUTED
2004b0c: 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;
2004b10: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED
2004b14: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED
2004b18: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED
2004b1c: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED
2004b20: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
2004b24: 10 bf ff 89 b 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
2004b28: 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) {
2004b2c: 32 bf ff 96 bne,a 2004984 <rtems_termios_ioctl+0xb0> <== NEVER TAKEN
2004b30: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
2004b34: d0 06 20 08 ld [ %i0 + 8 ], %o0
2004b38: 92 04 20 30 add %l0, 0x30, %o1
2004b3c: 40 00 29 bc call 200f22c <memcpy>
2004b40: 94 10 20 24 mov 0x24, %o2
break;
2004b44: 30 bf ff 81 b,a 2004948 <rtems_termios_ioctl+0x74>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004b48: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED
2004b4c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2004b50: 02 80 00 1e be 2004bc8 <rtems_termios_ioctl+0x2f4> <== NOT EXECUTED
2004b54: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED
2004b58: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <RAM_END+0x7dc4741b><== NOT EXECUTED
2004b5c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2004b60: 32 bf ff 89 bne,a 2004984 <rtems_termios_ioctl+0xb0> <== NOT EXECUTED
2004b64: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2004b68: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED
2004b6c: 25 00 80 6c sethi %hi(0x201b000), %l2 <== NOT EXECUTED
2004b70: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2004b74: a4 14 a1 b8 or %l2, 0x1b8, %l2 <== NOT EXECUTED
2004b78: 82 04 80 01 add %l2, %g1, %g1 <== NOT EXECUTED
2004b7c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2004b80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004b84: 22 80 00 06 be,a 2004b9c <rtems_termios_ioctl+0x2c8> <== NOT EXECUTED
2004b88: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2004b8c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004b90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004b94: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
2004b98: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
2004b9c: c0 24 20 d0 clr [ %l0 + 0xd0 ] <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
2004ba0: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
2004ba4: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED
2004ba8: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED
2004bac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004bb0: 02 bf ff 66 be 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
2004bb4: c4 24 20 cc st %g2, [ %l0 + 0xcc ] <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
2004bb8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004bbc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004bc0: 10 bf ff 62 b 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
2004bc4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
2004bc8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
2004bcc: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED
break;
2004bd0: 10 bf ff 5e b 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
2004bd4: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
2004bd8: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED
2004bdc: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED
break;
2004be0: 10 bf ff 5a b 2004948 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
2004be4: c2 24 20 d8 st %g1, [ %l0 + 0xd8 ] <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
2004be8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004bec: 06 80 00 29 bl 2004c90 <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
2004bf0: 01 00 00 00 nop <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
2004bf4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004bf8: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
2004bfc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
2004c00: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004c04: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2004c08: 02 80 00 09 be 2004c2c <rtems_termios_ioctl+0x358> <== NOT EXECUTED
2004c0c: 01 00 00 00 nop <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
2004c10: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
2004c14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004c18: 02 80 00 05 be 2004c2c <rtems_termios_ioctl+0x358> <== NOT EXECUTED
2004c1c: 01 00 00 00 nop <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
2004c20: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004c24: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
2004c28: c4 04 20 38 ld [ %l0 + 0x38 ], %g2 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
2004c2c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004c30: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
2004c34: c2 24 20 b8 st %g1, [ %l0 + 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) {
2004c38: 10 bf ff 92 b 2004a80 <rtems_termios_ioctl+0x1ac> <== NOT EXECUTED
2004c3c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
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;
2004c40: 40 00 03 24 call 20058d0 <rtems_clock_get_ticks_per_second><== NOT EXECUTED
2004c44: e6 0c 20 46 ldub [ %l0 + 0x46 ], %l3 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
2004c48: 40 00 4c 37 call 2017d24 <.umul> <== NOT EXECUTED
2004c4c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2004c50: 40 00 4c 6f call 2017e0c <.udiv> <== NOT EXECUTED
2004c54: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
2004c58: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
2004c5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004c60: 02 80 00 11 be 2004ca4 <rtems_termios_ioctl+0x3d0> <== NOT EXECUTED
2004c64: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2004c68: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2004c6c: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2004c70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004c74: 12 bf ff 99 bne 2004ad8 <rtems_termios_ioctl+0x204> <== NOT EXECUTED
2004c78: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
2004c7c: 10 bf ff 98 b 2004adc <rtems_termios_ioctl+0x208> <== NOT EXECUTED
2004c80: d0 24 20 74 st %o0, [ %l0 + 0x74 ] <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
2004c84: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED
2004c88: 10 bf ff a2 b 2004b10 <rtems_termios_ioctl+0x23c> <== NOT EXECUTED
2004c8c: 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;
2004c90: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004c94: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED
2004c98: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
2004c9c: 10 bf ff 7c b 2004a8c <rtems_termios_ioctl+0x1b8> <== NOT EXECUTED
2004ca0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
2004ca4: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2004ca8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004cac: 32 bf ff 8a bne,a 2004ad4 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
2004cb0: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
2004cb4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2004cb8: 10 bf ff 89 b 2004adc <rtems_termios_ioctl+0x208> <== NOT EXECUTED
2004cbc: c2 24 20 6c st %g1, [ %l0 + 0x6c ] <== 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);
2004cc0: c4 04 20 84 ld [ %l0 + 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)(tty->minor,
2004cc4: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED
2004cc8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
2004ccc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
2004cd0: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2004cd4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004cd8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2004cdc: 30 bf ff 54 b,a 2004a2c <rtems_termios_ioctl+0x158> <== NOT EXECUTED
0200b934 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
200b934: 82 10 00 08 mov %o0, %g1
int termios_baud;
switch (baud) {
200b938: 80 a2 24 b0 cmp %o0, 0x4b0
200b93c: 02 80 00 32 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b940: 90 10 20 09 mov 9, %o0
200b944: 80 a0 64 b0 cmp %g1, 0x4b0
200b948: 04 80 00 1e ble 200b9c0 <rtems_termios_number_to_baud+0x8c>
200b94c: 80 a0 60 86 cmp %g1, 0x86
200b950: 05 00 00 12 sethi %hi(0x4800), %g2
200b954: 84 10 a3 00 or %g2, 0x300, %g2 ! 4b00 <PROM_START+0x4b00>
200b958: 80 a0 40 02 cmp %g1, %g2
200b95c: 02 80 00 2a be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b960: 90 10 20 0e mov 0xe, %o0
200b964: 80 a0 40 02 cmp %g1, %g2
200b968: 04 80 00 29 ble 200ba0c <rtems_termios_number_to_baud+0xd8>
200b96c: 80 a0 69 60 cmp %g1, 0x960
200b970: 07 00 00 70 sethi %hi(0x1c000), %g3
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
200b974: 05 00 00 04 sethi %hi(0x1000), %g2
int32_t baud
)
{
int termios_baud;
switch (baud) {
200b978: 86 10 e2 00 or %g3, 0x200, %g3
200b97c: 80 a0 40 03 cmp %g1, %g3
200b980: 02 80 00 21 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b984: 90 10 a0 02 or %g2, 2, %o0
200b988: 80 a0 40 03 cmp %g1, %g3
200b98c: 04 80 00 46 ble 200baa4 <rtems_termios_number_to_baud+0x170>
200b990: 07 00 00 25 sethi %hi(0x9400), %g3
200b994: 07 00 00 e1 sethi %hi(0x38400), %g3
200b998: 80 a0 40 03 cmp %g1, %g3
200b99c: 02 80 00 1a be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b9a0: 90 10 a0 03 or %g2, 3, %o0
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
200b9a4: 90 10 a0 04 or %g2, 4, %o0
int32_t baud
)
{
int termios_baud;
switch (baud) {
200b9a8: 05 00 01 c2 sethi %hi(0x70800), %g2
200b9ac: 80 a0 40 02 cmp %g1, %g2
200b9b0: 02 80 00 4b be 200badc <rtems_termios_number_to_baud+0x1a8><== ALWAYS TAKEN
200b9b4: 01 00 00 00 nop
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
200b9b8: 81 c3 e0 08 retl
200b9bc: 90 10 3f ff mov -1, %o0 ! ffffffff <RAM_END+0xfdbfffff>
int32_t baud
)
{
int termios_baud;
switch (baud) {
200b9c0: 02 80 00 11 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b9c4: 90 10 20 04 mov 4, %o0
200b9c8: 80 a0 60 86 cmp %g1, 0x86
200b9cc: 04 80 00 21 ble 200ba50 <rtems_termios_number_to_baud+0x11c>
200b9d0: 80 a0 60 32 cmp %g1, 0x32
200b9d4: 80 a0 60 c8 cmp %g1, 0xc8
200b9d8: 02 80 00 0b be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b9dc: 90 10 20 06 mov 6, %o0
200b9e0: 80 a0 60 c8 cmp %g1, 0xc8
200b9e4: 04 80 00 28 ble 200ba84 <rtems_termios_number_to_baud+0x150>
200b9e8: 80 a0 60 96 cmp %g1, 0x96
200b9ec: 80 a0 61 2c cmp %g1, 0x12c
200b9f0: 02 80 00 05 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200b9f4: 90 10 20 07 mov 7, %o0
200b9f8: 80 a0 62 58 cmp %g1, 0x258
200b9fc: 12 bf ff ef bne 200b9b8 <rtems_termios_number_to_baud+0x84><== NEVER TAKEN
200ba00: 90 10 20 08 mov 8, %o0
200ba04: 81 c3 e0 08 retl
200ba08: 01 00 00 00 nop
200ba0c: 02 bf ff fe be 200ba04 <rtems_termios_number_to_baud+0xd0>
200ba10: 90 10 20 0b mov 0xb, %o0 ! b <PROM_START+0xb>
200ba14: 80 a0 69 60 cmp %g1, 0x960
200ba18: 04 80 00 2f ble 200bad4 <rtems_termios_number_to_baud+0x1a0>
200ba1c: 80 a0 67 08 cmp %g1, 0x708
200ba20: 05 00 00 04 sethi %hi(0x1000), %g2
200ba24: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 12c0 <PROM_START+0x12c0>
200ba28: 80 a0 40 02 cmp %g1, %g2
200ba2c: 02 bf ff f6 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200ba30: 90 10 20 0c mov 0xc, %o0
200ba34: 05 00 00 09 sethi %hi(0x2400), %g2
200ba38: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 <PROM_START+0x2580>
200ba3c: 80 a0 40 02 cmp %g1, %g2
200ba40: 12 bf ff de bne 200b9b8 <rtems_termios_number_to_baud+0x84>
200ba44: 90 10 20 0d mov 0xd, %o0
200ba48: 81 c3 e0 08 retl
200ba4c: 01 00 00 00 nop
200ba50: 02 bf ff ed be 200ba04 <rtems_termios_number_to_baud+0xd0>
200ba54: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
200ba58: 80 a0 60 32 cmp %g1, 0x32
200ba5c: 04 80 00 0e ble 200ba94 <rtems_termios_number_to_baud+0x160>
200ba60: 80 a0 60 00 cmp %g1, 0
200ba64: 80 a0 60 4b cmp %g1, 0x4b
200ba68: 02 bf ff e7 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200ba6c: 90 10 20 02 mov 2, %o0
200ba70: 80 a0 60 6e cmp %g1, 0x6e
200ba74: 12 bf ff d1 bne 200b9b8 <rtems_termios_number_to_baud+0x84><== NEVER TAKEN
200ba78: 90 10 20 03 mov 3, %o0
200ba7c: 81 c3 e0 08 retl
200ba80: 01 00 00 00 nop
200ba84: 12 bf ff cd bne 200b9b8 <rtems_termios_number_to_baud+0x84><== NEVER TAKEN
200ba88: 90 10 20 05 mov 5, %o0 ! 5 <PROM_START+0x5>
200ba8c: 81 c3 e0 08 retl
200ba90: 01 00 00 00 nop
200ba94: 12 bf ff c9 bne 200b9b8 <rtems_termios_number_to_baud+0x84>
200ba98: 90 10 20 00 clr %o0 ! 0 <PROM_START>
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
200ba9c: 81 c3 e0 08 retl
200baa0: 01 00 00 00 nop
int32_t baud
)
{
int termios_baud;
switch (baud) {
200baa4: 86 10 e2 00 or %g3, 0x200, %g3
200baa8: 80 a0 40 03 cmp %g1, %g3
200baac: 02 bf ff d6 be 200ba04 <rtems_termios_number_to_baud+0xd0>
200bab0: 90 10 20 0f mov 0xf, %o0
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
200bab4: 90 10 a0 01 or %g2, 1, %o0
int32_t baud
)
{
int termios_baud;
switch (baud) {
200bab8: 05 00 00 38 sethi %hi(0xe000), %g2
200babc: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 <PROM_START+0xe100>
200bac0: 80 a0 40 02 cmp %g1, %g2
200bac4: 32 bf ff d0 bne,a 200ba04 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
200bac8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
200bacc: 81 c3 e0 08 retl
200bad0: 01 00 00 00 nop
200bad4: 12 bf ff b9 bne 200b9b8 <rtems_termios_number_to_baud+0x84><== NEVER TAKEN
200bad8: 90 10 20 0a mov 0xa, %o0 ! a <PROM_START+0xa>
200badc: 81 c3 e0 08 retl
02004ed0 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
2004ed0: 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 (rtems_termios_ttyMutex,
2004ed4: 23 00 80 6d sethi %hi(0x201b400), %l1
2004ed8: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 ! 201b48c <rtems_termios_ttyMutex>
2004edc: 92 10 20 00 clr %o1
2004ee0: 40 00 04 49 call 2006004 <rtems_semaphore_obtain>
2004ee4: 94 10 20 00 clr %o2
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004ee8: a0 92 20 00 orcc %o0, 0, %l0
2004eec: 32 80 00 29 bne,a 2004f90 <rtems_termios_open+0xc0> <== NEVER TAKEN
2004ef0: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004ef4: 29 00 80 6d sethi %hi(0x201b400), %l4
2004ef8: e4 05 20 94 ld [ %l4 + 0x94 ], %l2 ! 201b494 <rtems_termios_ttyHead>
2004efc: 80 a4 a0 00 cmp %l2, 0
2004f00: 32 80 00 08 bne,a 2004f20 <rtems_termios_open+0x50>
2004f04: c2 04 a0 0c ld [ %l2 + 0xc ], %g1
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004f08: 10 80 00 33 b 2004fd4 <rtems_termios_open+0x104>
2004f0c: 90 10 20 01 mov 1, %o0
*/
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) {
2004f10: 80 a4 a0 00 cmp %l2, 0
2004f14: 02 80 00 30 be 2004fd4 <rtems_termios_open+0x104> <== ALWAYS TAKEN
2004f18: 90 10 20 01 mov 1, %o0
if ((tty->major == major) && (tty->minor == minor))
2004f1c: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 <== NOT EXECUTED
2004f20: 80 a0 40 18 cmp %g1, %i0
2004f24: 32 bf ff fb bne,a 2004f10 <rtems_termios_open+0x40>
2004f28: e4 04 80 00 ld [ %l2 ], %l2
2004f2c: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
2004f30: 80 a0 40 19 cmp %g1, %i1
2004f34: 32 bf ff f7 bne,a 2004f10 <rtems_termios_open+0x40> <== NEVER TAKEN
2004f38: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
2004f3c: c2 04 a0 08 ld [ %l2 + 8 ], %g1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
2004f40: c6 06 80 00 ld [ %i2 ], %g3
if (!tty->refcount++) {
2004f44: 84 00 60 01 add %g1, 1, %g2
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
2004f48: e4 20 e0 38 st %l2, [ %g3 + 0x38 ]
if (!tty->refcount++) {
2004f4c: 80 a0 60 00 cmp %g1, 0
2004f50: 12 80 00 0d bne 2004f84 <rtems_termios_open+0xb4>
2004f54: c4 24 a0 08 st %g2, [ %l2 + 8 ]
if (tty->device.firstOpen)
2004f58: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1
2004f5c: 80 a0 60 00 cmp %g1, 0
2004f60: 02 80 00 05 be 2004f74 <rtems_termios_open+0xa4>
2004f64: 90 10 00 18 mov %i0, %o0
(*tty->device.firstOpen)(major, minor, arg);
2004f68: 92 10 00 19 mov %i1, %o1
2004f6c: 9f c0 40 00 call %g1
2004f70: 94 10 00 1a mov %i2, %o2
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004f74: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1
2004f78: 80 a0 60 02 cmp %g1, 2
2004f7c: 22 80 00 07 be,a 2004f98 <rtems_termios_open+0xc8> <== NEVER TAKEN
2004f80: d0 04 a0 c4 ld [ %l2 + 0xc4 ], %o0 <== NOT EXECUTED
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004f84: 40 00 04 67 call 2006120 <rtems_semaphore_release>
2004f88: d0 04 60 8c ld [ %l1 + 0x8c ], %o0
return RTEMS_SUCCESSFUL;
}
2004f8c: b0 10 00 10 mov %l0, %i0
2004f90: 81 c7 e0 08 ret
2004f94: 81 e8 00 00 restore
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
2004f98: 13 00 80 14 sethi %hi(0x2005000), %o1 <== NOT EXECUTED
2004f9c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
2004fa0: 40 00 05 34 call 2006470 <rtems_task_start> <== NOT EXECUTED
2004fa4: 92 12 63 c0 or %o1, 0x3c0, %o1 <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004fa8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004fac: 12 80 00 bf bne 20052a8 <rtems_termios_open+0x3d8> <== NOT EXECUTED
2004fb0: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
2004fb4: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED
2004fb8: 13 00 80 14 sethi %hi(0x2005000), %o1 <== NOT EXECUTED
2004fbc: 40 00 05 2d call 2006470 <rtems_task_start> <== NOT EXECUTED
2004fc0: 92 12 63 28 or %o1, 0x328, %o1 ! 2005328 <rtems_termios_txdaemon><== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004fc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004fc8: 02 bf ff ef be 2004f84 <rtems_termios_open+0xb4> <== NOT EXECUTED
2004fcc: 01 00 00 00 nop <== NOT EXECUTED
2004fd0: 30 80 00 b6 b,a 20052a8 <rtems_termios_open+0x3d8> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004fd4: 40 00 18 5a call 200b13c <calloc>
2004fd8: 92 10 20 e8 mov 0xe8, %o1
if (tty == NULL) {
2004fdc: a6 92 20 00 orcc %o0, 0, %l3
2004fe0: 02 80 00 99 be 2005244 <rtems_termios_open+0x374> <== NEVER TAKEN
2004fe4: a4 10 00 13 mov %l3, %l2
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
2004fe8: 03 00 80 6b sethi %hi(0x201ac00), %g1
2004fec: c2 00 60 74 ld [ %g1 + 0x74 ], %g1 ! 201ac74 <rtems_termios_raw_input_size>
2004ff0: c2 24 e0 64 st %g1, [ %l3 + 0x64 ]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
2004ff4: d0 04 e0 64 ld [ %l3 + 0x64 ], %o0
2004ff8: 40 00 1a 0e call 200b830 <malloc>
2004ffc: 01 00 00 00 nop
if (tty->rawInBuf.theBuf == NULL) {
2005000: 80 a2 20 00 cmp %o0, 0
2005004: 02 80 00 8e be 200523c <rtems_termios_open+0x36c> <== NEVER TAKEN
2005008: d0 24 e0 58 st %o0, [ %l3 + 0x58 ]
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
200500c: 03 00 80 6b sethi %hi(0x201ac00), %g1
2005010: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201ac78 <rtems_termios_raw_output_size>
2005014: c2 24 e0 88 st %g1, [ %l3 + 0x88 ]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
2005018: d0 04 e0 88 ld [ %l3 + 0x88 ], %o0
200501c: 40 00 1a 05 call 200b830 <malloc>
2005020: 01 00 00 00 nop
if (tty->rawOutBuf.theBuf == NULL) {
2005024: 80 a2 20 00 cmp %o0, 0
2005028: 02 80 00 8c be 2005258 <rtems_termios_open+0x388> <== NEVER TAKEN
200502c: d0 24 e0 7c st %o0, [ %l3 + 0x7c ]
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
2005030: 03 00 80 6b sethi %hi(0x201ac00), %g1
2005034: 40 00 19 ff call 200b830 <malloc>
2005038: d0 00 60 70 ld [ %g1 + 0x70 ], %o0 ! 201ac70 <rtems_termios_cbufsize>
if (tty->cbuf == NULL) {
200503c: 80 a2 20 00 cmp %o0, 0
2005040: 02 80 00 9c be 20052b0 <rtems_termios_open+0x3e0> <== NEVER TAKEN
2005044: d0 24 e0 1c st %o0, [ %l3 + 0x1c ]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2005048: c2 05 20 94 ld [ %l4 + 0x94 ], %g1
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
200504c: c0 24 e0 d4 clr [ %l3 + 0xd4 ]
tty->tty_snd.sw_arg = NULL;
2005050: c0 24 e0 d8 clr [ %l3 + 0xd8 ]
tty->tty_rcv.sw_pfn = NULL;
2005054: c0 24 e0 dc clr [ %l3 + 0xdc ]
tty->tty_rcv.sw_arg = NULL;
2005058: c0 24 e0 e0 clr [ %l3 + 0xe0 ]
tty->tty_rcvwakeup = 0;
200505c: c0 24 e0 e4 clr [ %l3 + 0xe4 ]
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2005060: c2 24 c0 00 st %g1, [ %l3 ]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
2005064: 80 a0 60 00 cmp %g1, 0
2005068: 02 80 00 03 be 2005074 <rtems_termios_open+0x1a4>
200506c: c0 24 e0 04 clr [ %l3 + 4 ]
rtems_termios_ttyHead->back = tty;
2005070: e6 20 60 04 st %l3, [ %g1 + 4 ]
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
2005074: 03 00 80 6d sethi %hi(0x201b400), %g1
2005078: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 201b490 <rtems_termios_ttyTail>
200507c: 80 a0 a0 00 cmp %g2, 0
2005080: 02 80 00 a8 be 2005320 <rtems_termios_open+0x450>
2005084: e6 25 20 94 st %l3, [ %l4 + 0x94 ]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2005088: 29 00 80 6b sethi %hi(0x201ac00), %l4
200508c: d0 4d 20 7c ldsb [ %l4 + 0x7c ], %o0 ! 201ac7c <c.6319>
2005090: 03 15 14 9a sethi %hi(0x54526800), %g1
2005094: 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;
2005098: f2 24 e0 10 st %i1, [ %l3 + 0x10 ]
tty->major = major;
200509c: f0 24 e0 0c st %i0, [ %l3 + 0xc ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
20050a0: 90 12 00 01 or %o0, %g1, %o0
20050a4: 92 10 20 01 mov 1, %o1
20050a8: 94 10 20 54 mov 0x54, %o2
20050ac: 96 10 20 00 clr %o3
20050b0: 40 00 03 34 call 2005d80 <rtems_semaphore_create>
20050b4: 98 04 e0 14 add %l3, 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)
20050b8: 80 a2 20 00 cmp %o0, 0
20050bc: 12 80 00 7b bne 20052a8 <rtems_termios_open+0x3d8> <== NEVER TAKEN
20050c0: 03 15 14 9b sethi %hi(0x54526c00), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
20050c4: d0 4d 20 7c ldsb [ %l4 + 0x7c ], %o0
20050c8: 82 10 63 00 or %g1, 0x300, %g1
20050cc: 92 10 20 01 mov 1, %o1
20050d0: 90 12 00 01 or %o0, %g1, %o0
20050d4: 94 10 20 54 mov 0x54, %o2
20050d8: 96 10 20 00 clr %o3
20050dc: 40 00 03 29 call 2005d80 <rtems_semaphore_create>
20050e0: 98 04 e0 18 add %l3, 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)
20050e4: 80 a2 20 00 cmp %o0, 0
20050e8: 12 80 00 70 bne 20052a8 <rtems_termios_open+0x3d8> <== NEVER TAKEN
20050ec: 03 15 14 9e sethi %hi(0x54527800), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
20050f0: d0 4d 20 7c ldsb [ %l4 + 0x7c ], %o0
20050f4: 92 10 20 00 clr %o1
20050f8: 90 12 00 01 or %o0, %g1, %o0
20050fc: 94 10 20 20 mov 0x20, %o2
2005100: 96 10 20 00 clr %o3
2005104: 40 00 03 1f call 2005d80 <rtems_semaphore_create>
2005108: 98 04 e0 8c add %l3, 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)
200510c: 80 a2 20 00 cmp %o0, 0
2005110: 12 80 00 66 bne 20052a8 <rtems_termios_open+0x3d8> <== NEVER TAKEN
2005114: 92 10 00 1b mov %i3, %o1
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
2005118: c0 24 e0 94 clr [ %l3 + 0x94 ]
/*
* Set callbacks
*/
tty->device = *callbacks;
200511c: 90 04 e0 98 add %l3, 0x98, %o0
2005120: 40 00 28 43 call 200f22c <memcpy>
2005124: 94 10 20 20 mov 0x20, %o2
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005128: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1
200512c: 80 a0 60 02 cmp %g1, 2
2005130: 02 80 00 65 be 20052c4 <rtems_termios_open+0x3f4> <== NEVER TAKEN
2005134: d0 4d 20 7c ldsb [ %l4 + 0x7c ], %o0
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
2005138: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1
200513c: 80 a0 60 00 cmp %g1, 0
2005140: 02 80 00 4f be 200527c <rtems_termios_open+0x3ac>
2005144: d0 4d 20 7c ldsb [ %l4 + 0x7c ], %o0
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
2005148: c2 04 e0 b4 ld [ %l3 + 0xb4 ], %g1
200514c: 80 a0 60 02 cmp %g1, 2
2005150: 02 80 00 4c be 2005280 <rtems_termios_open+0x3b0> <== NEVER TAKEN
2005154: 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;
2005158: c0 24 e0 b8 clr [ %l3 + 0xb8 ]
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
200515c: c6 04 e0 64 ld [ %l3 + 0x64 ], %g3
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
2005160: c2 0d 20 7c ldub [ %l4 + 0x7c ], %g1
/* 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;
2005164: 87 30 e0 01 srl %g3, 1, %g3
2005168: c6 24 e0 bc st %g3, [ %l3 + 0xbc ]
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
200516c: 07 00 00 09 sethi %hi(0x2400), %g3
2005170: 86 10 e1 02 or %g3, 0x102, %g3 ! 2502 <PROM_START+0x2502>
2005174: c6 24 e0 30 st %g3, [ %l3 + 0x30 ]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
2005178: 07 00 00 06 sethi %hi(0x1800), %g3
200517c: 86 10 e0 05 or %g3, 5, %g3 ! 1805 <PROM_START+0x1805>
2005180: c6 24 e0 34 st %g3, [ %l3 + 0x34 ]
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
2005184: 86 10 28 bd mov 0x8bd, %g3
2005188: c6 24 e0 38 st %g3, [ %l3 + 0x38 ]
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
200518c: 07 00 00 20 sethi %hi(0x8000), %g3
2005190: 86 10 e2 3b or %g3, 0x23b, %g3 ! 823b <PROM_START+0x823b>
2005194: c6 24 e0 3c st %g3, [ %l3 + 0x3c ]
tty->termios.c_cc[VINTR] = '\003';
2005198: 86 10 20 03 mov 3, %g3
200519c: c6 2c e0 41 stb %g3, [ %l3 + 0x41 ]
tty->termios.c_cc[VQUIT] = '\034';
20051a0: 86 10 20 1c mov 0x1c, %g3
20051a4: c6 2c e0 42 stb %g3, [ %l3 + 0x42 ]
tty->termios.c_cc[VERASE] = '\177';
20051a8: 86 10 20 7f mov 0x7f, %g3
20051ac: c6 2c e0 43 stb %g3, [ %l3 + 0x43 ]
tty->termios.c_cc[VKILL] = '\025';
20051b0: 86 10 20 15 mov 0x15, %g3
20051b4: c6 2c e0 44 stb %g3, [ %l3 + 0x44 ]
tty->termios.c_cc[VEOF] = '\004';
20051b8: 86 10 20 04 mov 4, %g3
20051bc: c6 2c e0 45 stb %g3, [ %l3 + 0x45 ]
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
20051c0: 86 10 20 11 mov 0x11, %g3
20051c4: c6 2c e0 49 stb %g3, [ %l3 + 0x49 ]
tty->termios.c_cc[VSTOP] = '\023';
20051c8: 86 10 20 13 mov 0x13, %g3
20051cc: c6 2c e0 4a stb %g3, [ %l3 + 0x4a ]
tty->termios.c_cc[VSUSP] = '\032';
20051d0: 86 10 20 1a mov 0x1a, %g3
20051d4: c6 2c e0 4b stb %g3, [ %l3 + 0x4b ]
tty->termios.c_cc[VREPRINT] = '\022';
20051d8: 86 10 20 12 mov 0x12, %g3
20051dc: c6 2c e0 4d stb %g3, [ %l3 + 0x4d ]
tty->termios.c_cc[VDISCARD] = '\017';
20051e0: 86 10 20 0f mov 0xf, %g3
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;
20051e4: c4 04 e0 64 ld [ %l3 + 0x64 ], %g2
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
20051e8: c6 2c e0 4e stb %g3, [ %l3 + 0x4e ]
tty->termios.c_cc[VWERASE] = '\027';
20051ec: 86 10 20 17 mov 0x17, %g3
20051f0: c6 2c e0 4f stb %g3, [ %l3 + 0x4f ]
tty->termios.c_cc[VLNEXT] = '\026';
20051f4: 86 10 20 16 mov 0x16, %g3
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';
20051f8: c0 2c e0 4c clrb [ %l3 + 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';
20051fc: c6 2c e0 50 stb %g3, [ %l3 + 0x50 ]
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';
2005200: c0 2c e0 51 clrb [ %l3 + 0x51 ]
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;
2005204: 87 28 a0 01 sll %g2, 1, %g3
2005208: 84 00 c0 02 add %g3, %g2, %g2
200520c: 85 30 a0 02 srl %g2, 2, %g2
2005210: c4 24 e0 c0 st %g2, [ %l3 + 0xc0 ]
/*
* Bump name characer
*/
if (c++ == 'z')
2005214: 84 00 60 01 add %g1, 1, %g2
2005218: 83 28 60 18 sll %g1, 0x18, %g1
200521c: 83 38 60 18 sra %g1, 0x18, %g1
2005220: 80 a0 60 7a cmp %g1, 0x7a
2005224: 12 bf ff 46 bne 2004f3c <rtems_termios_open+0x6c> <== ALWAYS TAKEN
2005228: c4 2d 20 7c stb %g2, [ %l4 + 0x7c ]
c = 'a';
200522c: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED
2005230: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
2005234: 10 bf ff 42 b 2004f3c <rtems_termios_open+0x6c> <== NOT EXECUTED
2005238: c4 28 60 7c stb %g2, [ %g1 + 0x7c ] ! 201ac7c <c.6319> <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
200523c: 40 00 18 05 call 200b250 <free> <== NOT EXECUTED
2005240: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
2005244: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 <== NOT EXECUTED
2005248: 40 00 03 b6 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
200524c: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
2005250: 81 c7 e0 08 ret <== NOT EXECUTED
2005254: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
2005258: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
200525c: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
free((void *)(tty->rawInBuf.theBuf));
2005260: 40 00 17 fc call 200b250 <free> <== NOT EXECUTED
2005264: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED
free(tty);
2005268: 40 00 17 fa call 200b250 <free> <== NOT EXECUTED
200526c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
2005270: 40 00 03 ac call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
2005274: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
2005278: 30 bf ff 46 b,a 2004f90 <rtems_termios_open+0xc0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
200527c: 03 15 14 9c sethi %hi(0x54527000), %g1
2005280: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <RAM_END+0x52127200>
2005284: 92 10 20 00 clr %o1
2005288: 90 12 00 01 or %o0, %g1, %o0
200528c: 94 10 20 24 mov 0x24, %o2
2005290: 96 10 20 00 clr %o3
2005294: 40 00 02 bb call 2005d80 <rtems_semaphore_create>
2005298: 98 04 e0 68 add %l3, 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)
200529c: 80 a2 20 00 cmp %o0, 0
20052a0: 02 bf ff ae be 2005158 <rtems_termios_open+0x288> <== ALWAYS TAKEN
20052a4: 01 00 00 00 nop
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
20052a8: 40 00 05 04 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
20052ac: 01 00 00 00 nop <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
20052b0: d0 04 e0 7c ld [ %l3 + 0x7c ], %o0 <== NOT EXECUTED
20052b4: 40 00 17 e7 call 200b250 <free> <== NOT EXECUTED
20052b8: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
20052bc: 10 bf ff e9 b 2005260 <rtems_termios_open+0x390> <== NOT EXECUTED
20052c0: d0 04 e0 58 ld [ %l3 + 0x58 ], %o0 <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
20052c4: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED
20052c8: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
20052cc: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED
20052d0: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED
20052d4: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED
20052d8: 98 10 20 00 clr %o4 <== NOT EXECUTED
20052dc: 40 00 03 bd call 20061d0 <rtems_task_create> <== NOT EXECUTED
20052e0: 9a 04 e0 c8 add %l3, 0xc8, %o5 <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
20052e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20052e8: 12 bf ff f0 bne 20052a8 <rtems_termios_open+0x3d8> <== NOT EXECUTED
20052ec: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
20052f0: d0 4d 20 7c ldsb [ %l4 + 0x7c ], %o0 <== NOT EXECUTED
20052f4: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED
20052f8: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED
20052fc: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED
2005300: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED
2005304: 98 10 20 00 clr %o4 <== NOT EXECUTED
2005308: 40 00 03 b2 call 20061d0 <rtems_task_create> <== NOT EXECUTED
200530c: 9a 04 e0 c4 add %l3, 0xc4, %o5 <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
2005310: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2005314: 22 bf ff 8a be,a 200513c <rtems_termios_open+0x26c> <== NOT EXECUTED
2005318: c2 04 e0 a0 ld [ %l3 + 0xa0 ], %g1 <== NOT EXECUTED
200531c: 30 bf ff e3 b,a 20052a8 <rtems_termios_open+0x3d8> <== 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;
2005320: 10 bf ff 5a b 2005088 <rtems_termios_open+0x1b8>
2005324: e6 20 60 90 st %l3, [ %g1 + 0x90 ]
02003bb0 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
2003bb0: 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) {
2003bb4: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1
2003bb8: 80 a0 60 00 cmp %g1, 0
2003bbc: 02 80 00 42 be 2003cc4 <rtems_termios_puts+0x114> <== NEVER TAKEN
2003bc0: a8 10 00 18 mov %i0, %l4
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
2003bc4: e6 06 a0 80 ld [ %i2 + 0x80 ], %l3
while (len) {
2003bc8: 80 a6 60 00 cmp %i1, 0
2003bcc: 02 80 00 43 be 2003cd8 <rtems_termios_puts+0x128> <== NEVER TAKEN
2003bd0: a4 10 20 02 mov 2, %l2
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
2003bd4: aa 10 20 01 mov 1, %l5
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
2003bd8: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1
2003bdc: 40 00 51 38 call 20180bc <.urem>
2003be0: 90 04 e0 01 add %l3, 1, %o0
rtems_interrupt_disable (level);
2003be4: 7f ff f9 b2 call 20022ac <sparc_disable_interrupts>
2003be8: a6 10 00 08 mov %o0, %l3
2003bec: a0 10 00 08 mov %o0, %l0
while (newHead == tty->rawOutBuf.Tail) {
2003bf0: e2 06 a0 84 ld [ %i2 + 0x84 ], %l1
2003bf4: 80 a4 40 13 cmp %l1, %l3
2003bf8: 12 80 00 13 bne 2003c44 <rtems_termios_puts+0x94>
2003bfc: 01 00 00 00 nop
tty->rawOutBufState = rob_wait;
2003c00: e4 26 a0 94 st %l2, [ %i2 + 0x94 ]
rtems_interrupt_enable (level);
2003c04: 7f ff f9 ae call 20022bc <sparc_enable_interrupts>
2003c08: 90 10 00 10 mov %l0, %o0
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2003c0c: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0
2003c10: 92 10 20 00 clr %o1
2003c14: 40 00 08 fc call 2006004 <rtems_semaphore_obtain>
2003c18: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2003c1c: 80 a2 20 00 cmp %o0, 0
2003c20: 12 80 00 30 bne 2003ce0 <rtems_termios_puts+0x130> <== NEVER TAKEN
2003c24: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2003c28: 7f ff f9 a1 call 20022ac <sparc_disable_interrupts>
2003c2c: 01 00 00 00 nop
2003c30: a0 10 00 08 mov %o0, %l0
* 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) {
2003c34: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1
2003c38: 80 a0 40 11 cmp %g1, %l1
2003c3c: 22 bf ff f2 be,a 2003c04 <rtems_termios_puts+0x54> <== NEVER TAKEN
2003c40: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
2003c44: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1
2003c48: c6 0d 00 00 ldub [ %l4 ], %g3
2003c4c: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2
2003c50: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
2003c54: 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;
2003c58: e6 26 a0 80 st %l3, [ %i2 + 0x80 ]
if (tty->rawOutBufState == rob_idle) {
2003c5c: 80 a0 60 00 cmp %g1, 0
2003c60: 12 80 00 0a bne 2003c88 <rtems_termios_puts+0xd8>
2003c64: 01 00 00 00 nop
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2003c68: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1
2003c6c: 80 88 60 10 btst 0x10, %g1
2003c70: 02 80 00 0c be 2003ca0 <rtems_termios_puts+0xf0> <== ALWAYS TAKEN
2003c74: 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;
2003c78: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
2003c7c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
2003c80: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
2003c84: ea 26 a0 94 st %l5, [ %i2 + 0x94 ] <== NOT EXECUTED
}
rtems_interrupt_enable (level);
2003c88: 7f ff f9 8d call 20022bc <sparc_enable_interrupts>
2003c8c: 90 10 00 10 mov %l0, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
2003c90: b2 86 7f ff addcc %i1, -1, %i1
2003c94: 02 80 00 11 be 2003cd8 <rtems_termios_puts+0x128>
2003c98: a8 05 20 01 inc %l4
2003c9c: 30 bf ff cf b,a 2003bd8 <rtems_termios_puts+0x28>
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);
2003ca0: 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,
2003ca4: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1
2003ca8: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
2003cac: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
2003cb0: 92 02 40 02 add %o1, %g2, %o1
2003cb4: 9f c0 40 00 call %g1
2003cb8: 94 10 20 01 mov 1, %o2
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
2003cbc: 10 bf ff f3 b 2003c88 <rtems_termios_puts+0xd8>
2003cc0: ea 26 a0 94 st %l5, [ %i2 + 0x94 ]
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
2003cc4: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED
2003cc8: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED
2003ccc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2003cd0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003cd4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
return;
2003cd8: 81 c7 e0 08 ret
2003cdc: 81 e8 00 00 restore
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);
2003ce0: 40 00 0a 76 call 20066b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
02004508 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2004508: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
200450c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
uint32_t count = args->count;
2004510: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004514: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
2004518: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200451c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2004520: ac 10 00 18 mov %i0, %l6 <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004524: 92 10 20 00 clr %o1 <== NOT EXECUTED
2004528: 40 00 06 b7 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200452c: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2004530: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2004534: 12 80 00 10 bne 2004574 <rtems_termios_read+0x6c> <== NOT EXECUTED
2004538: 05 00 80 6c sethi %hi(0x201b000), %g2 <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
200453c: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED
2004540: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2004544: 84 10 a1 b8 or %g2, 0x1b8, %g2 <== NOT EXECUTED
2004548: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED
200454c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED
2004550: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004554: 02 80 00 0a be 200457c <rtems_termios_read+0x74> <== NOT EXECUTED
2004558: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
200455c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004560: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004564: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2004568: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
200456c: 40 00 06 ed call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
2004570: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED
return sc;
2004574: 81 c7 e0 08 ret <== NOT EXECUTED
2004578: 81 e8 00 00 restore <== NOT EXECUTED
}
if (tty->cindex == tty->ccount) {
200457c: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED
2004580: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2004584: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004588: 22 80 00 20 be,a 2004608 <rtems_termios_read+0x100> <== NOT EXECUTED
200458c: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2004590: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2004594: 22 80 00 16 be,a 20045ec <rtems_termios_read+0xe4> <== NOT EXECUTED
2004598: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED
200459c: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED
20045a0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
20045a4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20045a8: 26 80 00 09 bl,a 20045cc <rtems_termios_read+0xc4> <== NOT EXECUTED
20045ac: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
20045b0: 10 80 00 0f b 20045ec <rtems_termios_read+0xe4> <== NOT EXECUTED
20045b4: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
20045b8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
20045bc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20045c0: 24 80 00 0b ble,a 20045ec <rtems_termios_read+0xe4> <== NOT EXECUTED
20045c4: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
20045c8: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
20045cc: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
20045d0: c4 08 80 01 ldub [ %g2 + %g1 ], %g2 <== NOT EXECUTED
20045d4: 82 00 60 01 inc %g1 <== NOT EXECUTED
20045d8: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED
20045dc: c2 24 20 24 st %g1, [ %l0 + 0x24 ] <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
20045e0: 12 bf ff f6 bne 20045b8 <rtems_termios_read+0xb0> <== NOT EXECUTED
20045e4: a8 05 20 01 inc %l4 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
20045e8: c2 05 a0 14 ld [ %l6 + 0x14 ], %g1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
20045ec: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
20045f0: a6 20 40 13 sub %g1, %l3, %l3 <== NOT EXECUTED
20045f4: e6 25 a0 1c st %l3, [ %l6 + 0x1c ] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
20045f8: 40 00 06 ca call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
20045fc: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
return sc;
}
2004600: 81 c7 e0 08 ret <== NOT EXECUTED
2004604: 81 e8 00 00 restore <== NOT EXECUTED
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
2004608: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
200460c: c4 24 20 2c st %g2, [ %l0 + 0x2c ] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
2004610: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
2004614: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004618: 02 80 00 06 be 2004630 <rtems_termios_read+0x128> <== NOT EXECUTED
200461c: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
2004620: c4 04 20 b4 ld [ %l0 + 0xb4 ], %g2 <== NOT EXECUTED
2004624: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004628: 22 80 00 67 be,a 20047c4 <rtems_termios_read+0x2bc> <== NOT EXECUTED
200462c: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
2004630: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2004634: 25 00 80 6b sethi %hi(0x201ac00), %l2 <== NOT EXECUTED
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)(tty->minor,
2004638: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
200463c: a4 14 a0 70 or %l2, 0x70, %l2 <== NOT EXECUTED
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)(tty->minor,
2004640: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2004644: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED
2004648: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
200464c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004650: 02 80 00 3d be 2004744 <rtems_termios_read+0x23c> <== NOT EXECUTED
2004654: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
2004658: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
200465c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
2004660: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2004664: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004668: 16 80 00 37 bge 2004744 <rtems_termios_read+0x23c> <== NOT EXECUTED
200466c: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
2004670: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED
2004674: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
2004678: 40 00 4e 91 call 20180bc <.urem> <== NOT EXECUTED
200467c: 90 02 20 01 inc %o0 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
2004680: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED
2004684: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
2004688: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
200468c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
2004690: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED
2004694: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
2004698: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
200469c: 40 00 4e 88 call 20180bc <.urem> <== NOT EXECUTED
20046a0: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED
20046a4: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED
20046a8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
20046ac: 3a 80 00 18 bcc,a 200470c <rtems_termios_read+0x204> <== NOT EXECUTED
20046b0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
20046b4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
20046b8: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED
20046bc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
20046c0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
20046c4: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED
20046c8: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED
20046cc: 22 80 00 30 be,a 200478c <rtems_termios_read+0x284> <== NOT EXECUTED
20046d0: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
20046d4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
20046d8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
20046dc: 22 80 00 0c be,a 200470c <rtems_termios_read+0x204> <== NOT EXECUTED
20046e0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
20046e4: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
20046e8: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
20046ec: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED
20046f0: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
20046f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20046f8: 22 80 00 05 be,a 200470c <rtems_termios_read+0x204> <== NOT EXECUTED
20046fc: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2004700: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004704: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2004708: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
200470c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2004710: 02 80 00 17 be 200476c <rtems_termios_read+0x264> <== NOT EXECUTED
2004714: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED
if (siproc (c, tty))
2004718: 7f ff ff 0f call 2004354 <siproc> <== NOT EXECUTED
200471c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2004720: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004724: 32 80 00 02 bne,a 200472c <rtems_termios_read+0x224> <== NOT EXECUTED
2004728: aa 10 20 00 clr %l5 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
200472c: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED
2004730: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
2004734: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004738: 12 bf ff c8 bne 2004658 <rtems_termios_read+0x150> <== NOT EXECUTED
200473c: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
2004740: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
2004744: 02 bf ff 94 be 2004594 <rtems_termios_read+0x8c> <== NOT EXECUTED
2004748: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
200474c: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED
2004750: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED
2004754: 40 00 06 2c call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
2004758: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
200475c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004760: 02 bf ff b9 be 2004644 <rtems_termios_read+0x13c> <== NOT EXECUTED
2004764: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2004768: 30 bf ff 8b b,a 2004594 <rtems_termios_read+0x8c> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
200476c: 7f ff fe fa call 2004354 <siproc> <== NOT EXECUTED
2004770: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
2004774: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2004778: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
200477c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004780: 36 bf ff eb bge,a 200472c <rtems_termios_read+0x224> <== NOT EXECUTED
2004784: aa 10 20 00 clr %l5 <== NOT EXECUTED
2004788: 30 bf ff e9 b,a 200472c <rtems_termios_read+0x224> <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
200478c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004790: 22 80 00 07 be,a 20047ac <rtems_termios_read+0x2a4> <== NOT EXECUTED
2004794: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
2004798: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
200479c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20047a0: 02 bf ff cd be 20046d4 <rtems_termios_read+0x1cc> <== NOT EXECUTED
20047a4: 01 00 00 00 nop <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
20047a8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
20047ac: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
20047b0: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED
20047b4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20047b8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
20047bc: 10 bf ff d4 b 200470c <rtems_termios_read+0x204> <== NOT EXECUTED
20047c0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20047c4: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED
20047c8: 02 80 00 0e be 2004800 <rtems_termios_read+0x2f8> <== NOT EXECUTED
20047cc: 01 00 00 00 nop <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
20047d0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20047d4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
20047d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20047dc: 06 80 00 3a bl 20048c4 <rtems_termios_read+0x3bc> <== NOT EXECUTED
20047e0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
20047e4: 7f ff fe dc call 2004354 <siproc> <== NOT EXECUTED
20047e8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20047ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20047f0: 12 bf ff 69 bne 2004594 <rtems_termios_read+0x8c> <== NOT EXECUTED
20047f4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20047f8: 10 bf ff f6 b 20047d0 <rtems_termios_read+0x2c8> <== NOT EXECUTED
20047fc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
2004800: 40 00 04 3c call 20058f0 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
2004804: 01 00 00 00 nop <== NOT EXECUTED
2004808: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
200480c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2004810: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004814: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
2004818: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200481c: 06 80 00 10 bl 200485c <rtems_termios_read+0x354> <== NOT EXECUTED
2004820: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
2004824: 7f ff fe cc call 2004354 <siproc> <== NOT EXECUTED
2004828: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
200482c: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2004830: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
2004834: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004838: 16 bf ff 56 bge 2004590 <rtems_termios_read+0x88> <== NOT EXECUTED
200483c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2004840: 22 bf ff f4 be,a 2004810 <rtems_termios_read+0x308> <== NOT EXECUTED
2004844: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2004848: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
200484c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004850: 22 bf ff f0 be,a 2004810 <rtems_termios_read+0x308> <== NOT EXECUTED
2004854: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
2004858: 30 bf ff ea b,a 2004800 <rtems_termios_read+0x2f8> <== NOT EXECUTED
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
200485c: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2004860: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004864: 02 80 00 0d be 2004898 <rtems_termios_read+0x390> <== NOT EXECUTED
2004868: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
200486c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004870: 02 80 00 06 be 2004888 <rtems_termios_read+0x380> <== NOT EXECUTED
2004874: 01 00 00 00 nop <== NOT EXECUTED
2004878: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
200487c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004880: 12 80 00 09 bne 20048a4 <rtems_termios_read+0x39c> <== NOT EXECUTED
2004884: 01 00 00 00 nop <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
2004888: 40 00 07 17 call 20064e4 <rtems_task_wake_after> <== NOT EXECUTED
200488c: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1> <== NOT EXECUTED
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2004890: 10 bf ff e0 b 2004810 <rtems_termios_read+0x308> <== NOT EXECUTED
2004894: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
2004898: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200489c: 02 bf ff 3e be 2004594 <rtems_termios_read+0x8c> <== NOT EXECUTED
20048a0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
20048a4: 40 00 04 13 call 20058f0 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
20048a8: 01 00 00 00 nop <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
20048ac: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED
20048b0: 90 22 00 11 sub %o0, %l1, %o0 <== NOT EXECUTED
20048b4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
20048b8: 08 bf ff f4 bleu 2004888 <rtems_termios_read+0x380> <== NOT EXECUTED
20048bc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
20048c0: 30 bf ff 35 b,a 2004594 <rtems_termios_read+0x8c> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
20048c4: 40 00 07 08 call 20064e4 <rtems_task_wake_after> <== NOT EXECUTED
20048c8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20048cc: 10 bf ff c1 b 20047d0 <rtems_termios_read+0x2c8> <== NOT EXECUTED
20048d0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED
020035e4 <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)
{
20035e4: 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))
20035e8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
20035ec: 82 08 64 03 and %g1, 0x403, %g1
20035f0: 80 a0 64 01 cmp %g1, 0x401
20035f4: 02 80 00 44 be 2003704 <rtems_termios_refill_transmitter+0x120><== NEVER TAKEN
20035f8: a0 10 00 18 mov %i0, %l0
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
20035fc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
2003600: 82 08 60 03 and %g1, 3, %g1
2003604: 80 a0 60 02 cmp %g1, 2
2003608: 22 80 00 50 be,a 2003748 <rtems_termios_refill_transmitter+0x164><== NEVER TAKEN
200360c: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2003610: c4 06 20 80 ld [ %i0 + 0x80 ], %g2
2003614: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2003618: 80 a0 80 01 cmp %g2, %g1
200361c: 22 80 00 30 be,a 20036dc <rtems_termios_refill_transmitter+0xf8>
2003620: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
2003624: 7f ff fb 22 call 20022ac <sparc_disable_interrupts>
2003628: 01 00 00 00 nop
len = tty->t_dqlen;
200362c: e2 06 20 90 ld [ %i0 + 0x90 ], %l1
tty->t_dqlen = 0;
2003630: c0 26 20 90 clr [ %i0 + 0x90 ]
rtems_interrupt_enable(level);
2003634: 7f ff fb 22 call 20022bc <sparc_enable_interrupts>
2003638: 01 00 00 00 nop
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
200363c: d0 06 20 84 ld [ %i0 + 0x84 ], %o0
2003640: d2 06 20 88 ld [ %i0 + 0x88 ], %o1
2003644: 40 00 52 9e call 20180bc <.urem>
2003648: 90 04 40 08 add %l1, %o0, %o0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
200364c: 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;
2003650: d0 24 20 84 st %o0, [ %l0 + 0x84 ]
if (tty->rawOutBufState == rob_wait) {
2003654: 80 a0 60 02 cmp %g1, 2
2003658: 02 80 00 55 be 20037ac <rtems_termios_refill_transmitter+0x1c8>
200365c: a2 10 00 08 mov %o0, %l1
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
2003660: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
2003664: 80 a0 40 11 cmp %g1, %l1
2003668: 22 80 00 48 be,a 2003788 <rtems_termios_refill_transmitter+0x1a4>
200366c: c2 04 20 d4 ld [ %l0 + 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))
2003670: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1
2003674: 82 08 62 10 and %g1, 0x210, %g1
2003678: 80 a0 62 10 cmp %g1, 0x210
200367c: 02 80 00 4f be 20037b8 <rtems_termios_refill_transmitter+0x1d4><== NEVER TAKEN
2003680: 01 00 00 00 nop
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2003684: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
2003688: 80 a4 40 01 cmp %l1, %g1
200368c: 18 80 00 1b bgu 20036f8 <rtems_termios_refill_transmitter+0x114>
2003690: 01 00 00 00 nop
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
2003694: f0 04 20 80 ld [ %l0 + 0x80 ], %i0
2003698: b0 26 00 11 sub %i0, %l1, %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)) {
200369c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1
20036a0: 80 88 66 00 btst 0x600, %g1
20036a4: 02 80 00 04 be 20036b4 <rtems_termios_refill_transmitter+0xd0><== ALWAYS TAKEN
20036a8: 94 10 00 18 mov %i0, %o2
20036ac: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20036b0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
20036b4: d2 04 20 7c ld [ %l0 + 0x7c ], %o1
20036b8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1
20036bc: d0 04 20 10 ld [ %l0 + 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*/
20036c0: 84 10 20 01 mov 1, %g2
(*tty->device.write)(tty->minor,
20036c4: 92 02 40 11 add %o1, %l1, %o1
20036c8: 9f c0 40 00 call %g1
20036cc: c4 24 20 94 st %g2, [ %l0 + 0x94 ]
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
20036d0: e2 24 20 84 st %l1, [ %l0 + 0x84 ]
}
return nToSend;
}
20036d4: 81 c7 e0 08 ret
20036d8: 81 e8 00 00 restore
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
20036dc: 80 a0 60 02 cmp %g1, 2
20036e0: 12 bf ff fd bne 20036d4 <rtems_termios_refill_transmitter+0xf0><== ALWAYS TAKEN
20036e4: b0 10 20 00 clr %i0
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
20036e8: 40 00 0a 8e call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
20036ec: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED
20036f0: 81 c7 e0 08 ret <== NOT EXECUTED
20036f4: 81 e8 00 00 restore <== NOT EXECUTED
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
20036f8: f0 04 20 88 ld [ %l0 + 0x88 ], %i0
20036fc: 10 bf ff e8 b 200369c <rtems_termios_refill_transmitter+0xb8>
2003700: b0 26 00 11 sub %i0, %l1, %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,
2003704: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
2003708: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
200370c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED
2003710: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003714: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
2003718: 7f ff fa e5 call 20022ac <sparc_disable_interrupts> <== NOT EXECUTED
200371c: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2003720: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2003724: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2003728: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
200372c: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2003730: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2003734: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2003738: 7f ff fa e1 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
200373c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2003740: 81 c7 e0 08 ret <== NOT EXECUTED
2003744: 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,
2003748: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
200374c: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED
2003750: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003754: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
2003758: 7f ff fa d5 call 20022ac <sparc_disable_interrupts> <== NOT EXECUTED
200375c: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2003760: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2003764: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2003768: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
200376c: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2003770: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2003774: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2003778: 7f ff fa d1 call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
200377c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2003780: 81 c7 e0 08 ret <== NOT EXECUTED
2003784: 81 e8 00 00 restore <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2003788: c0 24 20 94 clr [ %l0 + 0x94 ]
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
200378c: 80 a0 60 00 cmp %g1, 0
2003790: 02 bf ff d0 be 20036d0 <rtems_termios_refill_transmitter+0xec><== ALWAYS TAKEN
2003794: b0 10 20 00 clr %i0
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2003798: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED
200379c: 9f c0 40 00 call %g1 <== NOT EXECUTED
20037a0: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
20037a4: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED
20037a8: 30 bf ff f6 b,a 2003780 <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);
20037ac: 40 00 0a 5d call 2006120 <rtems_semaphore_release>
20037b0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0
20037b4: 30 bf ff ab b,a 2003660 <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);
20037b8: 7f ff fa bd call 20022ac <sparc_disable_interrupts> <== NOT EXECUTED
20037bc: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
20037c0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
20037c4: 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;
20037c8: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
20037cc: c4 24 20 94 st %g2, [ %l0 + 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;
20037d0: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
20037d4: 7f ff fa ba call 20022bc <sparc_enable_interrupts> <== NOT EXECUTED
20037d8: 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*/
20037dc: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED
20037e0: 30 bf ff e8 b,a 2003780 <rtems_termios_refill_transmitter+0x19c><== NOT EXECUTED
020053c0 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
20053c0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
20053c4: a0 07 bf f8 add %fp, -8, %l0 <== NOT EXECUTED
20053c8: a2 07 bf ff add %fp, -1, %l1 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
20053cc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
20053d0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20053d4: 94 10 20 00 clr %o2 <== NOT EXECUTED
20053d8: 40 00 01 69 call 200597c <rtems_event_receive> <== NOT EXECUTED
20053dc: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
20053e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
20053e4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
20053e8: 32 80 00 16 bne,a 2005440 <rtems_termios_rxdaemon+0x80> <== NOT EXECUTED
20053ec: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
20053f0: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
20053f4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20053f8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
if (c != EOF) {
20053fc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2005400: 02 bf ff f3 be 20053cc <rtems_termios_rxdaemon+0xc> <== NOT EXECUTED
2005404: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
2005408: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
200540c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2005410: 7f ff f9 14 call 2003860 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
2005414: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2005418: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
200541c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2005420: 94 10 20 00 clr %o2 <== NOT EXECUTED
2005424: 40 00 01 56 call 200597c <rtems_event_receive> <== NOT EXECUTED
2005428: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
200542c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2005430: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2005434: 22 bf ff f0 be,a 20053f4 <rtems_termios_rxdaemon+0x34> <== NOT EXECUTED
2005438: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
tty->rxTaskId = 0;
200543c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2005440: 40 00 03 af call 20062fc <rtems_task_delete> <== NOT EXECUTED
2005444: 90 10 20 00 clr %o0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2005448: 10 bf ff e2 b 20053d0 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
200544c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
020035cc <rtems_termios_rxirq_occured>:
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
20035cc: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED
20035d0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20035d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20035d8: 40 00 09 4a call 2005b00 <rtems_event_send> <== NOT EXECUTED
20035dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02005328 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
2005328: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
200532c: 23 00 80 6c sethi %hi(0x201b000), %l1 <== NOT EXECUTED
2005330: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED
2005334: a2 14 61 b8 or %l1, 0x1b8, %l1 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2005338: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200533c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2005340: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2005344: 40 00 01 8e call 200597c <rtems_event_receive> <== NOT EXECUTED
2005348: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
200534c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
2005350: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2005354: 12 80 00 16 bne 20053ac <rtems_termios_txdaemon+0x84> <== NOT EXECUTED
2005358: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
200535c: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
2005360: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2005364: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED
2005368: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
200536c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005370: 02 80 00 04 be 2005380 <rtems_termios_txdaemon+0x58> <== NOT EXECUTED
2005374: 01 00 00 00 nop <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2005378: 9f c0 40 00 call %g1 <== NOT EXECUTED
200537c: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
2005380: 7f ff f8 99 call 20035e4 <rtems_termios_refill_transmitter><== NOT EXECUTED
2005384: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2005388: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200538c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2005390: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2005394: 40 00 01 7a call 200597c <rtems_event_receive> <== NOT EXECUTED
2005398: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
200539c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
20053a0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
20053a4: 02 bf ff ee be 200535c <rtems_termios_txdaemon+0x34> <== NOT EXECUTED
20053a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
tty->txTaskId = 0;
20053ac: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
20053b0: 40 00 03 d3 call 20062fc <rtems_task_delete> <== NOT EXECUTED
20053b4: 90 10 20 00 clr %o0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
20053b8: 10 bf ff e1 b 200533c <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
20053bc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
020043a0 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
20043a0: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20043a4: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20043a8: 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;
20043ac: e0 00 60 38 ld [ %g1 + 0x38 ], %l0
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20043b0: 94 10 20 00 clr %o2
20043b4: 40 00 07 14 call 2006004 <rtems_semaphore_obtain>
20043b8: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20043bc: a2 92 20 00 orcc %o0, 0, %l1
20043c0: 12 80 00 0f bne 20043fc <rtems_termios_write+0x5c> <== NEVER TAKEN
20043c4: 03 00 80 6c sethi %hi(0x201b000), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
20043c8: c4 04 20 cc ld [ %l0 + 0xcc ], %g2
20043cc: 85 28 a0 05 sll %g2, 5, %g2
20043d0: 82 10 61 b8 or %g1, 0x1b8, %g1
20043d4: 82 00 40 02 add %g1, %g2, %g1
20043d8: c2 00 60 0c ld [ %g1 + 0xc ], %g1
20043dc: 80 a0 60 00 cmp %g1, 0
20043e0: 02 80 00 09 be 2004404 <rtems_termios_write+0x64> <== ALWAYS TAKEN
20043e4: 92 10 00 18 mov %i0, %o1
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
20043e8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20043ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20043f0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
20043f4: 40 00 07 4b call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
20043f8: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
20043fc: 81 c7 e0 08 ret <== NOT EXECUTED
2004400: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED
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) {
2004404: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
2004408: 80 88 60 01 btst 1, %g1
200440c: 22 80 00 16 be,a 2004464 <rtems_termios_write+0xc4> <== NEVER TAKEN
2004410: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
uint32_t count = args->count;
2004414: e6 06 20 14 ld [ %i0 + 0x14 ], %l3
char *buffer = args->buffer;
2004418: e8 06 20 10 ld [ %i0 + 0x10 ], %l4
while (count--)
200441c: 80 a4 e0 00 cmp %l3, 0
2004420: a4 10 20 00 clr %l2
2004424: 02 80 00 0a be 200444c <rtems_termios_write+0xac> <== NEVER TAKEN
2004428: 82 10 20 00 clr %g1
oproc (*buffer++, tty);
200442c: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0
2004430: 7f ff fe 2f call 2003cec <oproc>
2004434: 92 10 00 10 mov %l0, %o1
2004438: a4 04 a0 01 inc %l2
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
200443c: 80 a4 80 13 cmp %l2, %l3
2004440: 32 bf ff fc bne,a 2004430 <rtems_termios_write+0x90>
2004444: d0 0d 00 12 ldub [ %l4 + %l2 ], %o0
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2004448: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200444c: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
}
rtems_semaphore_release (tty->osem);
2004450: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
2004454: 40 00 07 33 call 2006120 <rtems_semaphore_release>
2004458: b0 10 00 11 mov %l1, %i0
return sc;
}
200445c: 81 c7 e0 08 ret
2004460: 81 e8 00 00 restore
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
2004464: 7f ff fd d3 call 2003bb0 <rtems_termios_puts> <== NOT EXECUTED
2004468: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
args->bytes_moved = args->count;
200446c: 10 bf ff f8 b 200444c <rtems_termios_write+0xac> <== NOT EXECUTED
2004470: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
02015ee8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
2015ee8: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2015eec: 11 00 80 f3 sethi %hi(0x203cc00), %o0
2015ef0: 92 10 00 18 mov %i0, %o1
2015ef4: 90 12 23 94 or %o0, 0x394, %o0
2015ef8: 40 00 0b b2 call 2018dc0 <_Objects_Get>
2015efc: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2015f00: c2 07 bf fc ld [ %fp + -4 ], %g1
2015f04: 80 a0 60 00 cmp %g1, 0
2015f08: 12 80 00 0a bne 2015f30 <rtems_timer_cancel+0x48>
2015f0c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2015f10: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2015f14: 80 a0 60 04 cmp %g1, 4
2015f18: 02 80 00 04 be 2015f28 <rtems_timer_cancel+0x40> <== NEVER TAKEN
2015f1c: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2015f20: 40 00 14 c2 call 201b228 <_Watchdog_Remove>
2015f24: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2015f28: 40 00 0e 51 call 201986c <_Thread_Enable_dispatch>
2015f2c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2015f30: 81 c7 e0 08 ret
2015f34: 81 e8 00 00 restore
020163f4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20163f4: 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;
20163f8: 03 00 80 f3 sethi %hi(0x203cc00), %g1
20163fc: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 203cfd4 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2016400: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
2016404: 80 a4 20 00 cmp %l0, 0
2016408: 02 80 00 34 be 20164d8 <rtems_timer_server_fire_when+0xe4>
201640c: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
2016410: 03 00 80 f3 sethi %hi(0x203cc00), %g1
2016414: c2 08 60 d4 ldub [ %g1 + 0xd4 ], %g1 ! 203ccd4 <_TOD_Is_set>
2016418: 80 a0 60 00 cmp %g1, 0
201641c: 02 80 00 2f be 20164d8 <rtems_timer_server_fire_when+0xe4><== NEVER TAKEN
2016420: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
2016424: 80 a6 a0 00 cmp %i2, 0
2016428: 02 80 00 2c be 20164d8 <rtems_timer_server_fire_when+0xe4>
201642c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2016430: 7f ff f3 d2 call 2013378 <_TOD_Validate>
2016434: 90 10 00 19 mov %i1, %o0
2016438: 80 8a 20 ff btst 0xff, %o0
201643c: 12 80 00 04 bne 201644c <rtems_timer_server_fire_when+0x58>
2016440: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016444: 81 c7 e0 08 ret
2016448: 91 e8 20 14 restore %g0, 0x14, %o0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
201644c: 7f ff f3 95 call 20132a0 <_TOD_To_seconds>
2016450: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
2016454: 25 00 80 f3 sethi %hi(0x203cc00), %l2
2016458: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1 ! 203cd54 <_TOD_Now>
201645c: 80 a2 00 01 cmp %o0, %g1
2016460: 08 bf ff f9 bleu 2016444 <rtems_timer_server_fire_when+0x50>
2016464: b2 10 00 08 mov %o0, %i1
2016468: 11 00 80 f3 sethi %hi(0x203cc00), %o0
201646c: 92 10 00 11 mov %l1, %o1
2016470: 90 12 23 94 or %o0, 0x394, %o0
2016474: 40 00 0a 53 call 2018dc0 <_Objects_Get>
2016478: 94 07 bf fc add %fp, -4, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
201647c: c2 07 bf fc ld [ %fp + -4 ], %g1
2016480: a6 10 00 08 mov %o0, %l3
2016484: 80 a0 60 00 cmp %g1, 0
2016488: 12 80 00 14 bne 20164d8 <rtems_timer_server_fire_when+0xe4>
201648c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2016490: 40 00 13 66 call 201b228 <_Watchdog_Remove>
2016494: 90 02 20 10 add %o0, 0x10, %o0
the_watchdog->routine = routine;
the_watchdog->id = id;
2016498: e2 24 e0 30 st %l1, [ %l3 + 0x30 ]
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();
201649c: c4 04 a1 54 ld [ %l2 + 0x154 ], %g2
(*timer_server->schedule_operation)( timer_server, the_timer );
20164a0: c2 04 20 04 ld [ %l0 + 4 ], %g1
20164a4: 90 10 00 10 mov %l0, %o0
20164a8: 92 10 00 13 mov %l3, %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();
20164ac: b2 26 40 02 sub %i1, %g2, %i1
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;
20164b0: 84 10 20 03 mov 3, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20164b4: f4 24 e0 2c st %i2, [ %l3 + 0x2c ]
20164b8: c4 24 e0 38 st %g2, [ %l3 + 0x38 ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20164bc: f6 24 e0 34 st %i3, [ %l3 + 0x34 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
20164c0: f2 24 e0 1c st %i1, [ %l3 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20164c4: c0 24 e0 18 clr [ %l3 + 0x18 ]
(*timer_server->schedule_operation)( timer_server, the_timer );
20164c8: 9f c0 40 00 call %g1
20164cc: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20164d0: 40 00 0c e7 call 201986c <_Thread_Enable_dispatch>
20164d4: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20164d8: 81 c7 e0 08 ret
20164dc: 81 e8 00 00 restore
02007e0c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
2007e0c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
2007e10: 29 08 00 00 sethi %hi(0x20000000), %l4 <== NOT EXECUTED
2007e14: a8 8e 00 14 andcc %i0, %l4, %l4 <== NOT EXECUTED
2007e18: 02 80 00 0f be 2007e54 <rtems_verror+0x48> <== NOT EXECUTED
2007e1c: 05 00 80 9c sethi %hi(0x2027000), %g2 <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
2007e20: c6 00 a2 a0 ld [ %g2 + 0x2a0 ], %g3 ! 20272a0 <rtems_panic_in_progress><== NOT EXECUTED
2007e24: 82 00 e0 01 add %g3, 1, %g1 <== NOT EXECUTED
2007e28: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2007e2c: 02 80 00 07 be 2007e48 <rtems_verror+0x3c> <== NOT EXECUTED
2007e30: c2 20 a2 a0 st %g1, [ %g2 + 0x2a0 ] <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2007e34: 03 00 80 9d sethi %hi(0x2027400), %g1 <== NOT EXECUTED
2007e38: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 ! 2027480 <_Thread_Dispatch_disable_level><== NOT EXECUTED
2007e3c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
2007e40: c6 20 60 80 st %g3, [ %g1 + 0x80 ] <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
2007e44: c2 00 a2 a0 ld [ %g2 + 0x2a0 ], %g1 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2007e48: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2007e4c: 14 80 00 3c bg 2007f3c <rtems_verror+0x130> <== NOT EXECUTED
2007e50: a4 10 20 00 clr %l2 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2007e54: 21 00 80 9a sethi %hi(0x2026800), %l0 <== NOT EXECUTED
2007e58: c2 04 22 40 ld [ %l0 + 0x240 ], %g1 ! 2026a40 <_impure_ptr><== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
2007e5c: 27 1c 00 00 sethi %hi(0x70000000), %l3 <== NOT EXECUTED
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2007e60: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2007e64: 40 00 38 e6 call 20161fc <fflush> <== NOT EXECUTED
2007e68: a2 10 20 00 clr %l1 <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2007e6c: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED
2007e70: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED
2007e74: 12 80 00 45 bne 2007f88 <rtems_verror+0x17c> <== NOT EXECUTED
2007e78: a6 2e 00 13 andn %i0, %l3, %l3 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2007e7c: c2 04 22 40 ld [ %l0 + 0x240 ], %g1 <== NOT EXECUTED
2007e80: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2007e84: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2007e88: 40 00 50 60 call 201c008 <vfprintf> <== NOT EXECUTED
2007e8c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (status)
2007e90: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2007e94: 12 80 00 31 bne 2007f58 <rtems_verror+0x14c> <== NOT EXECUTED
2007e98: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
2007e9c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2007ea0: 02 80 00 12 be 2007ee8 <rtems_verror+0xdc> <== NOT EXECUTED
2007ea4: c2 04 22 40 ld [ %l0 + 0x240 ], %g1 <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
2007ea8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2007eac: 04 80 00 09 ble 2007ed0 <rtems_verror+0xc4> <== NOT EXECUTED
2007eb0: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
2007eb4: 40 00 3c f9 call 2017298 <strerror> <== NOT EXECUTED
2007eb8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2007ebc: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED
2007ec0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007ec4: 12 80 00 35 bne 2007f98 <rtems_verror+0x18c> <== NOT EXECUTED
2007ec8: c2 04 22 40 ld [ %l0 + 0x240 ], %g1 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
2007ecc: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
2007ed0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2007ed4: 92 12 63 48 or %o1, 0x348, %o1 <== NOT EXECUTED
2007ed8: 40 00 39 9d call 201654c <fprintf> <== NOT EXECUTED
2007edc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2007ee0: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
2007ee4: c2 04 22 40 ld [ %l0 + 0x240 ], %g1 <== NOT EXECUTED
2007ee8: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
2007eec: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2007ef0: 40 00 39 97 call 201654c <fprintf> <== NOT EXECUTED
2007ef4: 92 12 63 60 or %o1, 0x360, %o1 <== NOT EXECUTED
(void) fflush(stderr);
2007ef8: c2 04 22 40 ld [ %l0 + 0x240 ], %g1 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
2007efc: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
(void) fflush(stderr);
2007f00: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2007f04: 40 00 38 be call 20161fc <fflush> <== NOT EXECUTED
2007f08: a4 04 c0 12 add %l3, %l2, %l2 <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
2007f0c: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED
2007f10: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED
2007f14: 02 80 00 0a be 2007f3c <rtems_verror+0x130> <== NOT EXECUTED
2007f18: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
2007f1c: 22 80 00 0a be,a 2007f44 <rtems_verror+0x138> <== NOT EXECUTED
2007f20: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
2007f24: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
2007f28: 90 10 20 00 clr %o0 <== NOT EXECUTED
2007f2c: 40 00 00 32 call 2007ff4 <rtems_error> <== NOT EXECUTED
2007f30: 92 12 63 68 or %o1, 0x368, %o1 <== NOT EXECUTED
_exit(local_errno);
2007f34: 40 00 03 5b call 2008ca0 <_exit> <== NOT EXECUTED
2007f38: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_error(0, "fatal error, aborting");
abort();
}
}
return chars_written;
}
2007f3c: 81 c7 e0 08 ret <== NOT EXECUTED
2007f40: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
2007f44: 90 10 20 00 clr %o0 <== NOT EXECUTED
2007f48: 40 00 00 2b call 2007ff4 <rtems_error> <== NOT EXECUTED
2007f4c: 92 12 63 80 or %o1, 0x380, %o1 <== NOT EXECUTED
abort();
2007f50: 40 00 37 93 call 2015d9c <abort> <== NOT EXECUTED
2007f54: 01 00 00 00 nop <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2007f58: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED
2007f5c: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 ! 2026a40 <_impure_ptr><== NOT EXECUTED
2007f60: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2007f64: 7f ff ff a3 call 2007df0 <rtems_status_text> <== NOT EXECUTED
2007f68: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED
2007f6c: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
2007f70: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2007f74: 92 12 63 28 or %o1, 0x328, %o1 <== NOT EXECUTED
2007f78: 40 00 39 75 call 201654c <fprintf> <== NOT EXECUTED
2007f7c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2007f80: 10 bf ff c7 b 2007e9c <rtems_verror+0x90> <== NOT EXECUTED
2007f84: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
2007f88: 40 00 37 93 call 2015dd4 <__errno> <== NOT EXECUTED
2007f8c: 01 00 00 00 nop <== NOT EXECUTED
2007f90: 10 bf ff bb b 2007e7c <rtems_verror+0x70> <== NOT EXECUTED
2007f94: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED
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));
2007f98: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2007f9c: 40 00 3c bf call 2017298 <strerror> <== NOT EXECUTED
2007fa0: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED
2007fa4: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED
2007fa8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2007fac: 92 12 63 38 or %o1, 0x338, %o1 <== NOT EXECUTED
2007fb0: 40 00 39 67 call 201654c <fprintf> <== NOT EXECUTED
2007fb4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
2007fb8: 10 bf ff cb b 2007ee4 <rtems_verror+0xd8> <== NOT EXECUTED
2007fbc: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED
02003114 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
2003114: 9d e3 bf a0 save %sp, -96, %sp
2003118: 27 1f ff ff sethi %hi(0x7ffffc00), %l3
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
200311c: 2b 00 80 79 sethi %hi(0x201e400), %l5
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
2003120: 29 00 80 79 sethi %hi(0x201e400), %l4
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
2003124: a6 14 e3 ff or %l3, 0x3ff, %l3
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2003128: aa 15 63 70 or %l5, 0x370, %l5
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
200312c: a8 15 23 6c or %l4, 0x36c, %l4
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
2003130: a4 10 20 00 clr %l2
2003134: a2 10 20 00 clr %l1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2003138: c2 06 20 04 ld [ %i0 + 4 ], %g1
200313c: 82 00 7f ff add %g1, -1, %g1
2003140: 80 a0 60 00 cmp %g1, 0
2003144: 06 80 00 24 bl 20031d4 <scanInt+0xc0> <== NEVER TAKEN
2003148: c2 26 20 04 st %g1, [ %i0 + 4 ]
200314c: c2 06 00 00 ld [ %i0 ], %g1
2003150: e0 08 40 00 ldub [ %g1 ], %l0
2003154: 84 00 60 01 add %g1, 1, %g2
if (c == ':')
2003158: 80 a4 20 3a cmp %l0, 0x3a
200315c: 02 80 00 25 be 20031f0 <scanInt+0xdc>
2003160: c4 26 00 00 st %g2, [ %i0 ]
break;
if (sign == 0) {
2003164: 80 a4 a0 00 cmp %l2, 0
2003168: 32 80 00 06 bne,a 2003180 <scanInt+0x6c> <== NEVER TAKEN
200316c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
if (c == '-') {
2003170: 80 a4 20 2d cmp %l0, 0x2d
2003174: 02 80 00 30 be 2003234 <scanInt+0x120> <== NEVER TAKEN
2003178: a4 10 20 01 mov 1, %l2
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
200317c: c2 05 00 00 ld [ %l4 ], %g1
2003180: 82 00 40 10 add %g1, %l0, %g1
2003184: c2 08 60 01 ldub [ %g1 + 1 ], %g1
2003188: 80 88 60 04 btst 4, %g1
200318c: 02 80 00 28 be 200322c <scanInt+0x118> <== NEVER TAKEN
2003190: 90 10 00 13 mov %l3, %o0
return 0;
d = c - '0';
if ((i > (limit / 10))
2003194: 40 00 5e d3 call 201ace0 <.udiv>
2003198: 92 10 20 0a mov 0xa, %o1
200319c: 80 a4 40 08 cmp %l1, %o0
20031a0: 18 80 00 23 bgu 200322c <scanInt+0x118> <== NEVER TAKEN
20031a4: 01 00 00 00 nop
20031a8: 02 80 00 1b be 2003214 <scanInt+0x100> <== NEVER TAKEN
20031ac: a0 04 3f d0 add %l0, -48, %l0
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
20031b0: 83 2c 60 03 sll %l1, 3, %g1
20031b4: a3 2c 60 01 sll %l1, 1, %l1
20031b8: a2 04 40 01 add %l1, %g1, %l1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20031bc: 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;
20031c0: a2 04 00 11 add %l0, %l1, %l1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20031c4: 82 00 7f ff add %g1, -1, %g1
20031c8: 80 a0 60 00 cmp %g1, 0
20031cc: 16 bf ff e0 bge 200314c <scanInt+0x38> <== ALWAYS TAKEN
20031d0: c2 26 20 04 st %g1, [ %i0 + 4 ]
20031d4: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED
20031d8: 40 00 3c 77 call 20123b4 <__srget_r> <== NOT EXECUTED
20031dc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20031e0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
if (c == ':')
20031e4: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED
20031e8: 12 bf ff e0 bne 2003168 <scanInt+0x54> <== NOT EXECUTED
20031ec: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
20031f0: 80 a4 a0 00 cmp %l2, 0
20031f4: 02 80 00 0e be 200322c <scanInt+0x118> <== NEVER TAKEN
20031f8: 90 10 00 12 mov %l2, %o0
return 0;
*val = i * sign;
20031fc: 92 10 00 11 mov %l1, %o1
2003200: 40 00 5e 7e call 201abf8 <.umul>
2003204: b0 10 20 01 mov 1, %i0
2003208: d0 26 40 00 st %o0, [ %i1 ]
return 1;
200320c: 81 c7 e0 08 ret
2003210: 81 e8 00 00 restore
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
2003214: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2003218: 40 00 5f 5e call 201af90 <.urem> <== NOT EXECUTED
200321c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
2003220: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED
2003224: 08 bf ff e4 bleu 20031b4 <scanInt+0xa0> <== NOT EXECUTED
2003228: 83 2c 60 03 sll %l1, 3, %g1 <== NOT EXECUTED
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
200322c: 81 c7 e0 08 ret <== NOT EXECUTED
2003230: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
2003234: a6 04 e0 01 inc %l3 <== NOT EXECUTED
continue;
2003238: 10 bf ff c0 b 2003138 <scanInt+0x24> <== NOT EXECUTED
200323c: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED
02003240 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
2003240: 9d e3 bf a0 save %sp, -96, %sp
int c;
*name = *bufp;
2003244: c2 06 80 00 ld [ %i2 ], %g1
for (;;) {
c = getc(fp);
2003248: 21 00 80 79 sethi %hi(0x201e400), %l0
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
int c;
*name = *bufp;
200324c: c2 26 40 00 st %g1, [ %i1 ]
for (;;) {
c = getc(fp);
2003250: 10 80 00 19 b 20032b4 <scanString+0x74>
2003254: a0 14 23 70 or %l0, 0x370, %l0
2003258: c2 06 00 00 ld [ %i0 ], %g1
200325c: d0 08 40 00 ldub [ %g1 ], %o0
2003260: 84 00 60 01 add %g1, 1, %g2
if (c == ':') {
2003264: 80 a2 20 3a cmp %o0, 0x3a
2003268: 02 80 00 1e be 20032e0 <scanString+0xa0>
200326c: c4 26 00 00 st %g2, [ %i0 ]
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
2003270: 80 a2 20 0a cmp %o0, 0xa
2003274: 02 80 00 28 be 2003314 <scanString+0xd4>
2003278: 80 a2 3f ff cmp %o0, -1
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
200327c: 02 80 00 29 be 2003320 <scanString+0xe0> <== NEVER TAKEN
2003280: 01 00 00 00 nop
return 0;
if (*nleft < 2)
2003284: c2 06 c0 00 ld [ %i3 ], %g1
2003288: 80 a0 60 01 cmp %g1, 1
200328c: 08 80 00 25 bleu 2003320 <scanString+0xe0> <== NEVER TAKEN
2003290: 01 00 00 00 nop
return 0;
**bufp = c;
2003294: c2 06 80 00 ld [ %i2 ], %g1
2003298: d0 28 40 00 stb %o0, [ %g1 ]
++(*bufp);
200329c: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
20032a0: c2 06 c0 00 ld [ %i3 ], %g1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
20032a4: 84 00 a0 01 inc %g2
--(*nleft);
20032a8: 82 00 7f ff add %g1, -1, %g1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
20032ac: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
20032b0: c2 26 c0 00 st %g1, [ %i3 ]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
20032b4: c2 06 20 04 ld [ %i0 + 4 ], %g1
20032b8: 82 00 7f ff add %g1, -1, %g1
20032bc: 80 a0 60 00 cmp %g1, 0
20032c0: 16 bf ff e6 bge 2003258 <scanString+0x18>
20032c4: c2 26 20 04 st %g1, [ %i0 + 4 ]
20032c8: d0 04 00 00 ld [ %l0 ], %o0
20032cc: 40 00 3c 3a call 20123b4 <__srget_r>
20032d0: 92 10 00 18 mov %i0, %o1
if (c == ':') {
20032d4: 80 a2 20 3a cmp %o0, 0x3a
20032d8: 12 bf ff e7 bne 2003274 <scanString+0x34> <== ALWAYS TAKEN
20032dc: 80 a2 20 0a cmp %o0, 0xa
if (nlFlag)
20032e0: 80 a7 20 00 cmp %i4, 0
20032e4: 12 80 00 0f bne 2003320 <scanString+0xe0> <== NEVER TAKEN
20032e8: 01 00 00 00 nop
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
20032ec: c2 06 80 00 ld [ %i2 ], %g1
20032f0: c0 28 40 00 clrb [ %g1 ]
++(*bufp);
20032f4: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
20032f8: c2 06 c0 00 ld [ %i3 ], %g1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
20032fc: 84 00 a0 01 inc %g2
--(*nleft);
2003300: 82 00 7f ff add %g1, -1, %g1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
2003304: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
2003308: c2 26 c0 00 st %g1, [ %i3 ]
return 1;
200330c: 81 c7 e0 08 ret
2003310: 91 e8 20 01 restore %g0, 1, %o0
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
2003314: 80 a7 20 00 cmp %i4, 0
2003318: 32 bf ff f6 bne,a 20032f0 <scanString+0xb0> <== ALWAYS TAKEN
200331c: c2 06 80 00 ld [ %i2 ], %g1
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
2003320: 81 c7 e0 08 ret <== NOT EXECUTED
2003324: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02003328 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
2003328: 9d e3 bf 98 save %sp, -104, %sp
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
200332c: 98 10 20 00 clr %o4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
2003330: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003334: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2003338: a2 07 a0 4c add %fp, 0x4c, %l1
200333c: a0 07 a0 50 add %fp, 0x50, %l0
2003340: 90 10 00 18 mov %i0, %o0
2003344: 92 10 00 19 mov %i1, %o1
2003348: 94 10 00 11 mov %l1, %o2
200334c: 7f ff ff bd call 2003240 <scanString>
2003350: 96 10 00 10 mov %l0, %o3
2003354: 80 a2 20 00 cmp %o0, 0
2003358: 12 80 00 04 bne 2003368 <scangr+0x40> <== ALWAYS TAKEN
200335c: 90 10 00 18 mov %i0, %o0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
2003360: 81 c7 e0 08 ret <== NOT EXECUTED
2003364: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
2003368: 92 06 60 04 add %i1, 4, %o1
200336c: 94 10 00 11 mov %l1, %o2
2003370: 96 10 00 10 mov %l0, %o3
2003374: 7f ff ff b3 call 2003240 <scanString>
2003378: 98 10 20 00 clr %o4
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
200337c: 80 a2 20 00 cmp %o0, 0
2003380: 02 bf ff f8 be 2003360 <scangr+0x38> <== NEVER TAKEN
2003384: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
2003388: 7f ff ff 63 call 2003114 <scanInt>
200338c: 92 07 bf fc add %fp, -4, %o1
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2003390: 80 a2 20 00 cmp %o0, 0
2003394: 02 bf ff f3 be 2003360 <scangr+0x38> <== NEVER TAKEN
2003398: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
200339c: 94 10 00 11 mov %l1, %o2
20033a0: 96 10 00 10 mov %l0, %o3
20033a4: 92 07 bf f8 add %fp, -8, %o1
20033a8: 7f ff ff a6 call 2003240 <scanString>
20033ac: 98 10 20 01 mov 1, %o4
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
20033b0: 80 a2 20 00 cmp %o0, 0
20033b4: 02 bf ff eb be 2003360 <scangr+0x38> <== NEVER TAKEN
20033b8: da 07 bf f8 ld [ %fp + -8 ], %o5
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
20033bc: c2 07 bf fc ld [ %fp + -4 ], %g1
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20033c0: 84 10 00 0d mov %o5, %g2
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;
20033c4: c2 36 60 08 sth %g1, [ %i1 + 8 ]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20033c8: c6 0b 40 00 ldub [ %o5 ], %g3
20033cc: 88 10 20 01 mov 1, %g4
20033d0: 83 28 e0 18 sll %g3, 0x18, %g1
20033d4: 80 a0 60 00 cmp %g1, 0
20033d8: 02 80 00 0e be 2003410 <scangr+0xe8> <== NEVER TAKEN
20033dc: 86 10 20 17 mov 0x17, %g3
20033e0: 84 00 a0 01 inc %g2
20033e4: c6 08 80 00 ldub [ %g2 ], %g3
if(*cp == ',')
20033e8: 83 38 60 18 sra %g1, 0x18, %g1
memcount++;
20033ec: 82 18 60 2c xor %g1, 0x2c, %g1
20033f0: 80 a0 00 01 cmp %g0, %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20033f4: 83 28 e0 18 sll %g3, 0x18, %g1
if(*cp == ',')
memcount++;
20033f8: 88 61 3f ff subx %g4, -1, %g4
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
20033fc: 80 a0 60 00 cmp %g1, 0
2003400: 32 bf ff f9 bne,a 20033e4 <scangr+0xbc>
2003404: 84 00 a0 01 inc %g2
2003408: 87 29 20 02 sll %g4, 2, %g3
200340c: 86 00 e0 13 add %g3, 0x13, %g3
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
2003410: c2 07 a0 50 ld [ %fp + 0x50 ], %g1
2003414: 80 a0 40 03 cmp %g1, %g3
2003418: 0a bf ff d2 bcs 2003360 <scangr+0x38> <== NEVER TAKEN
200341c: c4 07 a0 4c ld [ %fp + 0x4c ], %g2
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003420: 86 10 20 01 mov 1, %g3
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
2003424: 84 00 a0 0f add %g2, 0xf, %g2
2003428: 84 08 bf f0 and %g2, -16, %g2
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
200342c: da 20 80 00 st %o5, [ %g2 ]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003430: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
2003434: c4 26 60 0c st %g2, [ %i1 + 0xc ]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003438: c4 08 40 00 ldub [ %g1 ], %g2
200343c: 88 10 20 04 mov 4, %g4
2003440: 85 28 a0 18 sll %g2, 0x18, %g2
2003444: 80 a0 a0 00 cmp %g2, 0
2003448: 12 80 00 09 bne 200346c <scangr+0x144> <== ALWAYS TAKEN
200344c: 82 00 60 01 inc %g1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
2003450: 10 80 00 13 b 200349c <scangr+0x174> <== NOT EXECUTED
2003454: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003458: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
200345c: 85 28 a0 18 sll %g2, 0x18, %g2
2003460: 80 a0 a0 00 cmp %g2, 0
2003464: 02 80 00 0c be 2003494 <scangr+0x16c>
2003468: 82 00 60 01 inc %g1
if(*cp == ',') {
200346c: 85 38 a0 18 sra %g2, 0x18, %g2
2003470: 80 a0 a0 2c cmp %g2, 0x2c
2003474: 32 bf ff fa bne,a 200345c <scangr+0x134> <== ALWAYS TAKEN
2003478: c4 08 40 00 ldub [ %g1 ], %g2
*cp = '\0';
200347c: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
2003480: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED
2003484: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED
2003488: 86 00 e0 01 inc %g3 <== NOT EXECUTED
200348c: 10 bf ff f3 b 2003458 <scangr+0x130> <== NOT EXECUTED
2003490: c2 21 00 02 st %g1, [ %g4 + %g2 ] <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003494: 89 28 e0 02 sll %g3, 2, %g4
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
2003498: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200349c: c0 20 40 04 clr [ %g1 + %g4 ]
return 1;
20034a0: 81 c7 e0 08 ret
20034a4: 91 e8 20 01 restore %g0, 1, %o0
020034f4 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
20034f4: 9d e3 bf 98 save %sp, -104, %sp
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
20034f8: 98 10 20 00 clr %o4
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
20034fc: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003500: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003504: a2 07 a0 4c add %fp, 0x4c, %l1
2003508: a0 07 a0 50 add %fp, 0x50, %l0
200350c: 90 10 00 18 mov %i0, %o0
2003510: 92 10 00 19 mov %i1, %o1
2003514: 94 10 00 11 mov %l1, %o2
2003518: 7f ff ff 4a call 2003240 <scanString>
200351c: 96 10 00 10 mov %l0, %o3
2003520: 80 a2 20 00 cmp %o0, 0
2003524: 12 80 00 04 bne 2003534 <scanpw+0x40> <== ALWAYS TAKEN
2003528: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
200352c: 81 c7 e0 08 ret <== NOT EXECUTED
2003530: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
2003534: 92 06 60 04 add %i1, 4, %o1
2003538: 94 10 00 11 mov %l1, %o2
200353c: 96 10 00 10 mov %l0, %o3
2003540: 7f ff ff 40 call 2003240 <scanString>
2003544: 98 10 20 00 clr %o4
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003548: 80 a2 20 00 cmp %o0, 0
200354c: 02 bf ff f8 be 200352c <scanpw+0x38> <== NEVER TAKEN
2003550: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
2003554: 7f ff fe f0 call 2003114 <scanInt>
2003558: 92 07 bf fc add %fp, -4, %o1
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
200355c: 80 a2 20 00 cmp %o0, 0
2003560: 02 bf ff f3 be 200352c <scanpw+0x38> <== NEVER TAKEN
2003564: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
2003568: 7f ff fe eb call 2003114 <scanInt>
200356c: 92 07 bf f8 add %fp, -8, %o1
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003570: 80 a2 20 00 cmp %o0, 0
2003574: 02 bf ff ee be 200352c <scanpw+0x38> <== NEVER TAKEN
2003578: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
200357c: 92 06 60 0c add %i1, 0xc, %o1
2003580: 94 10 00 11 mov %l1, %o2
2003584: 96 10 00 10 mov %l0, %o3
2003588: 7f ff ff 2e call 2003240 <scanString>
200358c: 98 10 20 00 clr %o4
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003590: 80 a2 20 00 cmp %o0, 0
2003594: 02 bf ff e6 be 200352c <scanpw+0x38> <== NEVER TAKEN
2003598: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
200359c: 92 06 60 10 add %i1, 0x10, %o1
20035a0: 94 10 00 11 mov %l1, %o2
20035a4: 96 10 00 10 mov %l0, %o3
20035a8: 7f ff ff 26 call 2003240 <scanString>
20035ac: 98 10 20 00 clr %o4
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
20035b0: 80 a2 20 00 cmp %o0, 0
20035b4: 02 bf ff de be 200352c <scanpw+0x38> <== NEVER TAKEN
20035b8: 90 10 00 18 mov %i0, %o0
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
20035bc: 92 06 60 14 add %i1, 0x14, %o1
20035c0: 94 10 00 11 mov %l1, %o2
20035c4: 96 10 00 10 mov %l0, %o3
20035c8: 7f ff ff 1e call 2003240 <scanString>
20035cc: 98 10 20 00 clr %o4
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
20035d0: 80 a2 20 00 cmp %o0, 0
20035d4: 02 bf ff d6 be 200352c <scanpw+0x38> <== NEVER TAKEN
20035d8: 90 10 00 18 mov %i0, %o0
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
20035dc: 94 10 00 11 mov %l1, %o2
20035e0: 96 10 00 10 mov %l0, %o3
20035e4: 92 06 60 18 add %i1, 0x18, %o1
20035e8: 7f ff ff 16 call 2003240 <scanString>
20035ec: 98 10 20 01 mov 1, %o4
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
20035f0: 80 a2 20 00 cmp %o0, 0
20035f4: 02 bf ff ce be 200352c <scanpw+0x38> <== NEVER TAKEN
20035f8: c2 07 bf fc ld [ %fp + -4 ], %g1
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
20035fc: c2 36 60 08 sth %g1, [ %i1 + 8 ]
pwd->pw_gid = pwgid;
2003600: c2 07 bf f8 ld [ %fp + -8 ], %g1
2003604: c2 36 60 0a sth %g1, [ %i1 + 0xa ]
return 1;
2003608: 81 c7 e0 08 ret
200360c: 91 e8 20 01 restore %g0, 1, %o0
02003748 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
2003748: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
init_etc_passwd_group();
200374c: 7f ff ff c4 call 200365c <init_etc_passwd_group> <== NOT EXECUTED
2003750: 21 00 80 7b sethi %hi(0x201ec00), %l0 <== NOT EXECUTED
if (group_fp != NULL)
2003754: d0 04 21 3c ld [ %l0 + 0x13c ], %o0 ! 201ed3c <group_fp> <== NOT EXECUTED
2003758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200375c: 22 80 00 05 be,a 2003770 <setgrent+0x28> <== NOT EXECUTED
2003760: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED
fclose(group_fp);
2003764: 40 00 35 e1 call 2010ee8 <fclose> <== NOT EXECUTED
2003768: 01 00 00 00 nop <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
200376c: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED
2003770: 13 00 80 75 sethi %hi(0x201d400), %o1 <== NOT EXECUTED
2003774: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
2003778: 40 00 37 b2 call 2011640 <fopen> <== NOT EXECUTED
200377c: 92 12 60 c0 or %o1, 0xc0, %o1 <== NOT EXECUTED
2003780: d0 24 21 3c st %o0, [ %l0 + 0x13c ] <== NOT EXECUTED
}
2003784: 81 c7 e0 08 ret <== NOT EXECUTED
2003788: 81 e8 00 00 restore <== NOT EXECUTED
02003948 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
2003948: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
init_etc_passwd_group();
200394c: 7f ff ff 44 call 200365c <init_etc_passwd_group> <== NOT EXECUTED
2003950: 21 00 80 7b sethi %hi(0x201ec00), %l0 <== NOT EXECUTED
if (passwd_fp != NULL)
2003954: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 ! 201ec54 <passwd_fp> <== NOT EXECUTED
2003958: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200395c: 22 80 00 05 be,a 2003970 <setpwent+0x28> <== NOT EXECUTED
2003960: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED
fclose(passwd_fp);
2003964: 40 00 35 61 call 2010ee8 <fclose> <== NOT EXECUTED
2003968: 01 00 00 00 nop <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
200396c: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED
2003970: 13 00 80 75 sethi %hi(0x201d400), %o1 <== NOT EXECUTED
2003974: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED
2003978: 40 00 37 32 call 2011640 <fopen> <== NOT EXECUTED
200397c: 92 12 60 c0 or %o1, 0xc0, %o1 <== NOT EXECUTED
2003980: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED
}
2003984: 81 c7 e0 08 ret <== NOT EXECUTED
2003988: 81 e8 00 00 restore <== NOT EXECUTED
02004354 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
2004354: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2004358: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
200435c: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED
2004360: 32 80 00 05 bne,a 2004374 <siproc+0x20> <== NOT EXECUTED
2004364: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
2004368: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED
200436c: 7f ff ff 7a call 2004154 <iproc> <== NOT EXECUTED
2004370: 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);
2004374: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004378: 40 00 07 23 call 2006004 <rtems_semaphore_obtain> <== NOT EXECUTED
200437c: 92 10 20 00 clr %o1 <== NOT EXECUTED
i = iproc (c, tty);
2004380: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED
2004384: 7f ff ff 74 call 2004154 <iproc> <== NOT EXECUTED
2004388: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200438c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2004390: 40 00 07 64 call 2006120 <rtems_semaphore_release> <== NOT EXECUTED
2004394: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
2004398: 81 c7 e0 08 ret <== NOT EXECUTED
200439c: 81 e8 00 00 restore <== NOT EXECUTED
02005464 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
2005464: 9d e3 bf 88 save %sp, -120, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2005468: 80 a6 60 00 cmp %i1, 0
200546c: 02 80 00 34 be 200553c <stat+0xd8>
2005470: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
2005474: 40 00 37 8b call 20132a0 <strlen>
2005478: 90 10 00 18 mov %i0, %o0
200547c: a0 07 bf ec add %fp, -20, %l0
2005480: 92 10 00 08 mov %o0, %o1
2005484: 94 10 20 00 clr %o2
2005488: 90 10 00 18 mov %i0, %o0
200548c: 96 10 00 10 mov %l0, %o3
2005490: 98 10 20 01 mov 1, %o4
2005494: 7f ff f8 e4 call 2003824 <rtems_filesystem_evaluate_path>
2005498: b0 10 3f ff mov -1, %i0
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
200549c: 80 a2 20 00 cmp %o0, 0
20054a0: 12 80 00 25 bne 2005534 <stat+0xd0>
20054a4: c2 07 bf f4 ld [ %fp + -12 ], %g1
return -1;
if ( !loc.handlers->fstat_h ){
20054a8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
20054ac: 80 a0 a0 00 cmp %g2, 0
20054b0: 02 80 00 29 be 2005554 <stat+0xf0> <== NEVER TAKEN
20054b4: 92 10 00 19 mov %i1, %o1
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
20054b8: c0 26 40 00 clr [ %i1 ]
20054bc: c0 26 60 04 clr [ %i1 + 4 ]
20054c0: c0 26 60 08 clr [ %i1 + 8 ]
20054c4: c0 26 60 0c clr [ %i1 + 0xc ]
20054c8: c0 26 60 10 clr [ %i1 + 0x10 ]
20054cc: c0 26 60 14 clr [ %i1 + 0x14 ]
20054d0: c0 26 60 18 clr [ %i1 + 0x18 ]
20054d4: c0 26 60 1c clr [ %i1 + 0x1c ]
20054d8: c0 26 60 20 clr [ %i1 + 0x20 ]
20054dc: c0 26 60 24 clr [ %i1 + 0x24 ]
20054e0: c0 26 60 28 clr [ %i1 + 0x28 ]
20054e4: c0 26 60 2c clr [ %i1 + 0x2c ]
20054e8: c0 26 60 30 clr [ %i1 + 0x30 ]
20054ec: c0 26 60 34 clr [ %i1 + 0x34 ]
20054f0: c0 26 60 38 clr [ %i1 + 0x38 ]
20054f4: c0 26 60 3c clr [ %i1 + 0x3c ]
20054f8: c0 26 60 40 clr [ %i1 + 0x40 ]
20054fc: c0 26 60 44 clr [ %i1 + 0x44 ]
status = (*loc.handlers->fstat_h)( &loc, buf );
2005500: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2005504: 9f c0 40 00 call %g1
2005508: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
200550c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2005510: 80 a0 60 00 cmp %g1, 0
2005514: 02 80 00 08 be 2005534 <stat+0xd0> <== NEVER TAKEN
2005518: b0 10 00 08 mov %o0, %i0
200551c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005520: 80 a0 60 00 cmp %g1, 0
2005524: 02 80 00 1a be 200558c <stat+0x128> <== NEVER TAKEN
2005528: 01 00 00 00 nop
200552c: 9f c0 40 00 call %g1
2005530: 90 10 00 10 mov %l0, %o0
return status;
}
2005534: 81 c7 e0 08 ret
2005538: 81 e8 00 00 restore
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
200553c: 40 00 30 71 call 2011700 <__errno>
2005540: b0 10 3f ff mov -1, %i0
2005544: 82 10 20 0e mov 0xe, %g1
2005548: c2 22 00 00 st %g1, [ %o0 ]
200554c: 81 c7 e0 08 ret
2005550: 81 e8 00 00 restore
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
2005554: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2005558: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200555c: 02 80 00 08 be 200557c <stat+0x118> <== NOT EXECUTED
2005560: 01 00 00 00 nop <== NOT EXECUTED
2005564: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2005568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200556c: 02 80 00 04 be 200557c <stat+0x118> <== NOT EXECUTED
2005570: 01 00 00 00 nop <== NOT EXECUTED
2005574: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005578: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200557c: 40 00 30 61 call 2011700 <__errno> <== NOT EXECUTED
2005580: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005584: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2005588: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200558c: 81 c7 e0 08 ret <== NOT EXECUTED
2005590: 81 e8 00 00 restore <== NOT EXECUTED
020055e0 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
20055e0: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
20055e4: c2 4e 40 00 ldsb [ %i1 ], %g1
20055e8: 80 a0 60 5c cmp %g1, 0x5c
20055ec: 02 80 00 05 be 2005600 <symlink+0x20> <== NEVER TAKEN
20055f0: a2 10 00 18 mov %i0, %l1
20055f4: 80 a0 60 2f cmp %g1, 0x2f
20055f8: 12 80 00 2f bne 20056b4 <symlink+0xd4>
20055fc: 80 a0 60 00 cmp %g1, 0
2005600: 03 00 80 80 sethi %hi(0x2020000), %g1
2005604: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 20203bc <rtems_current_user_env>
2005608: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
200560c: c4 27 bf e8 st %g2, [ %fp + -24 ]
2005610: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2005614: c4 27 bf ec st %g2, [ %fp + -20 ]
2005618: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
200561c: c4 27 bf f0 st %g2, [ %fp + -16 ]
2005620: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
2005624: c4 27 bf f4 st %g2, [ %fp + -12 ]
2005628: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
200562c: c2 27 bf f8 st %g1, [ %fp + -8 ]
if ( !loc.ops->evalformake_h ) {
2005630: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005634: c2 00 60 04 ld [ %g1 + 4 ], %g1
2005638: 80 a0 60 00 cmp %g1, 0
200563c: 02 80 00 30 be 20056fc <symlink+0x11c> <== NEVER TAKEN
2005640: 90 10 20 01 mov 1, %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
2005644: 90 06 40 08 add %i1, %o0, %o0
2005648: a0 07 bf e8 add %fp, -24, %l0
200564c: 94 07 bf fc add %fp, -4, %o2
2005650: 92 10 00 10 mov %l0, %o1
2005654: 9f c0 40 00 call %g1
2005658: b0 10 3f ff mov -1, %i0
if ( result != 0 )
200565c: 80 a2 20 00 cmp %o0, 0
2005660: 12 80 00 13 bne 20056ac <symlink+0xcc>
2005664: c4 07 bf f4 ld [ %fp + -12 ], %g2
return -1;
if ( !loc.ops->symlink_h ) {
2005668: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1
200566c: 80 a0 60 00 cmp %g1, 0
2005670: 02 80 00 29 be 2005714 <symlink+0x134> <== NEVER TAKEN
2005674: d4 07 bf fc ld [ %fp + -4 ], %o2
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
2005678: 92 10 00 11 mov %l1, %o1
200567c: 9f c0 40 00 call %g1
2005680: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2005684: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005688: 80 a0 60 00 cmp %g1, 0
200568c: 02 80 00 08 be 20056ac <symlink+0xcc> <== NEVER TAKEN
2005690: b0 10 00 08 mov %o0, %i0
2005694: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005698: 80 a0 60 00 cmp %g1, 0
200569c: 02 80 00 1c be 200570c <symlink+0x12c> <== NEVER TAKEN
20056a0: 01 00 00 00 nop
20056a4: 9f c0 40 00 call %g1
20056a8: 90 10 00 10 mov %l0, %o0
return result;
}
20056ac: 81 c7 e0 08 ret
20056b0: 81 e8 00 00 restore
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
20056b4: 02 bf ff d4 be 2005604 <symlink+0x24> <== NEVER TAKEN
20056b8: 03 00 80 80 sethi %hi(0x2020000), %g1
20056bc: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 20203bc <rtems_current_user_env>
20056c0: c4 00 60 04 ld [ %g1 + 4 ], %g2
20056c4: c4 27 bf e8 st %g2, [ %fp + -24 ]
20056c8: c4 00 60 08 ld [ %g1 + 8 ], %g2
20056cc: c4 27 bf ec st %g2, [ %fp + -20 ]
20056d0: c4 00 60 0c ld [ %g1 + 0xc ], %g2
20056d4: c4 27 bf f0 st %g2, [ %fp + -16 ]
20056d8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
20056dc: c4 27 bf f4 st %g2, [ %fp + -12 ]
20056e0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
20056e4: c2 27 bf f8 st %g1, [ %fp + -8 ]
if ( !loc.ops->evalformake_h ) {
20056e8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20056ec: c2 00 60 04 ld [ %g1 + 4 ], %g1
20056f0: 80 a0 60 00 cmp %g1, 0
20056f4: 12 bf ff d4 bne 2005644 <symlink+0x64> <== ALWAYS TAKEN
20056f8: 90 10 20 00 clr %o0
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
20056fc: 40 00 2f e4 call 201168c <__errno> <== NOT EXECUTED
2005700: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005704: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2005708: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200570c: 81 c7 e0 08 ret <== NOT EXECUTED
2005710: 81 e8 00 00 restore <== NOT EXECUTED
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
2005714: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2005718: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200571c: 02 bf ff f8 be 20056fc <symlink+0x11c> <== NOT EXECUTED
2005720: 01 00 00 00 nop <== NOT EXECUTED
2005724: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005728: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200572c: 30 bf ff f4 b,a 20056fc <symlink+0x11c> <== NOT EXECUTED
020055ac <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
20055ac: 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;
20055b0: c2 06 21 5c ld [ %i0 + 0x15c ], %g1
if ( this_reent ) {
20055b4: 80 a0 60 00 cmp %g1, 0
20055b8: 02 80 00 0b be 20055e4 <sync_per_thread+0x38> <== NEVER TAKEN
20055bc: 21 00 80 7e sethi %hi(0x201f800), %l0
current_reent = _Thread_Executing->libc_reent;
20055c0: c4 04 21 a0 ld [ %l0 + 0x1a0 ], %g2 ! 201f9a0 <_Thread_Executing>
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
20055c4: 13 00 80 15 sethi %hi(0x2005400), %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;
20055c8: e2 00 a1 5c ld [ %g2 + 0x15c ], %l1
_Thread_Executing->libc_reent = this_reent;
20055cc: c2 20 a1 5c st %g1, [ %g2 + 0x15c ]
_fwalk (t->libc_reent, sync_wrapper);
20055d0: d0 06 21 5c ld [ %i0 + 0x15c ], %o0
20055d4: 40 00 34 3c call 20126c4 <_fwalk>
20055d8: 92 12 62 14 or %o1, 0x214, %o1
_Thread_Executing->libc_reent = current_reent;
20055dc: c2 04 21 a0 ld [ %l0 + 0x1a0 ], %g1
20055e0: e2 20 61 5c st %l1, [ %g1 + 0x15c ]
20055e4: 81 c7 e0 08 ret
20055e8: 81 e8 00 00 restore
02004ae8 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
2004ae8: 9d e3 bf a0 save %sp, -96, %sp
switch (opt) {
2004aec: 80 a6 60 00 cmp %i1, 0
2004af0: 02 80 00 10 be 2004b30 <tcsetattr+0x48> <== ALWAYS TAKEN
2004af4: 80 a6 60 01 cmp %i1, 1
2004af8: 02 80 00 08 be 2004b18 <tcsetattr+0x30> <== NOT EXECUTED
2004afc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004b00: 40 00 2d 3b call 200ffec <__errno> <== NOT EXECUTED
2004b04: 01 00 00 00 nop <== NOT EXECUTED
2004b08: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2004b0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
2004b10: 81 c7 e0 08 ret <== NOT EXECUTED
2004b14: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
2004b18: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2004b1c: 40 00 21 6b call 200d0c8 <ioctl> <== NOT EXECUTED
2004b20: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004b24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004b28: 06 bf ff fa bl 2004b10 <tcsetattr+0x28> <== NOT EXECUTED
2004b2c: 01 00 00 00 nop <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
2004b30: 40 00 21 66 call 200d0c8 <ioctl>
2004b34: 93 e8 20 02 restore %g0, 2, %o1
0200e574 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
200e574: 9d e3 bf 78 save %sp, -136, %sp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
200e578: 7f ff d0 1f call 20025f4 <rtems_filesystem_dirname>
200e57c: 90 10 00 18 mov %i0, %o0
if ( parentpathlen == 0 )
200e580: a0 92 20 00 orcc %o0, 0, %l0
200e584: 32 80 00 92 bne,a 200e7cc <unlink+0x258>
200e588: 90 10 00 18 mov %i0, %o0
rtems_filesystem_get_start_loc( path, &i, &parentloc );
200e58c: c2 4e 00 00 ldsb [ %i0 ], %g1
200e590: 80 a0 60 5c cmp %g1, 0x5c
200e594: 12 80 00 59 bne 200e6f8 <unlink+0x184> <== ALWAYS TAKEN
200e598: 80 a0 60 2f cmp %g1, 0x2f
200e59c: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
200e5a0: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
200e5a4: a2 10 20 00 clr %l1
200e5a8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
200e5ac: c4 27 bf ec st %g2, [ %fp + -20 ]
200e5b0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
200e5b4: c4 27 bf f0 st %g2, [ %fp + -16 ]
200e5b8: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
200e5bc: c4 27 bf f4 st %g2, [ %fp + -12 ]
200e5c0: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200e5c4: c4 27 bf f8 st %g2, [ %fp + -8 ]
200e5c8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
200e5cc: c2 27 bf fc st %g1, [ %fp + -4 ]
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
200e5d0: c2 07 bf ec ld [ %fp + -20 ], %g1
name = path + parentpathlen;
200e5d4: b0 06 00 10 add %i0, %l0, %i0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
200e5d8: c2 27 bf d8 st %g1, [ %fp + -40 ]
200e5dc: c2 07 bf f0 ld [ %fp + -16 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
200e5e0: 90 10 00 18 mov %i0, %o0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
200e5e4: c2 27 bf dc st %g1, [ %fp + -36 ]
200e5e8: c2 07 bf f4 ld [ %fp + -12 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
200e5ec: a0 07 bf d8 add %fp, -40, %l0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
200e5f0: c2 27 bf e0 st %g1, [ %fp + -32 ]
200e5f4: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e5f8: c2 27 bf e4 st %g1, [ %fp + -28 ]
200e5fc: c2 07 bf fc ld [ %fp + -4 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
200e600: 40 00 04 87 call 200f81c <strlen>
200e604: c2 27 bf e8 st %g1, [ %fp + -24 ]
200e608: 92 10 00 08 mov %o0, %o1
200e60c: 7f ff cf d9 call 2002570 <rtems_filesystem_prefix_separators>
200e610: 90 10 00 18 mov %i0, %o0
200e614: b0 06 00 08 add %i0, %o0, %i0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
200e618: 40 00 04 81 call 200f81c <strlen>
200e61c: 90 10 00 18 mov %i0, %o0
200e620: 94 10 20 00 clr %o2
200e624: 92 10 00 08 mov %o0, %o1
200e628: 96 10 00 10 mov %l0, %o3
200e62c: 90 10 00 18 mov %i0, %o0
200e630: 7f ff d0 0e call 2002668 <rtems_filesystem_evaluate_relative_path>
200e634: 98 10 20 00 clr %o4
0, &loc, false );
if ( result != 0 ) {
200e638: 80 a2 20 00 cmp %o0, 0
200e63c: 12 80 00 2a bne 200e6e4 <unlink+0x170>
200e640: c4 07 bf e4 ld [ %fp + -28 ], %g2
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
200e644: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200e648: 80 a0 60 00 cmp %g1, 0
200e64c: 22 80 00 49 be,a 200e770 <unlink+0x1fc> <== NEVER TAKEN
200e650: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
200e654: 9f c0 40 00 call %g1
200e658: 90 10 00 10 mov %l0, %o0
200e65c: 80 a2 20 01 cmp %o0, 1
200e660: 02 80 00 65 be 200e7f4 <unlink+0x280>
200e664: c4 07 bf e4 ld [ %fp + -28 ], %g2
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
200e668: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200e66c: 80 a0 60 00 cmp %g1, 0
200e670: 02 80 00 3f be 200e76c <unlink+0x1f8> <== NEVER TAKEN
200e674: a4 07 bf ec add %fp, -20, %l2
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
200e678: 92 10 00 10 mov %l0, %o1
200e67c: 9f c0 40 00 call %g1
200e680: 90 10 00 12 mov %l2, %o0
rtems_filesystem_freenode( &loc );
200e684: c2 07 bf e4 ld [ %fp + -28 ], %g1
200e688: 80 a0 60 00 cmp %g1, 0
200e68c: 02 80 00 08 be 200e6ac <unlink+0x138> <== NEVER TAKEN
200e690: b0 10 00 08 mov %o0, %i0
200e694: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200e698: 80 a0 60 00 cmp %g1, 0
200e69c: 02 80 00 05 be 200e6b0 <unlink+0x13c> <== NEVER TAKEN
200e6a0: 80 8c 60 ff btst 0xff, %l1
200e6a4: 9f c0 40 00 call %g1
200e6a8: 90 10 00 10 mov %l0, %o0
if ( free_parentloc )
200e6ac: 80 8c 60 ff btst 0xff, %l1
200e6b0: 02 80 00 0b be 200e6dc <unlink+0x168>
200e6b4: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &parentloc );
200e6b8: 80 a0 60 00 cmp %g1, 0
200e6bc: 02 80 00 68 be 200e85c <unlink+0x2e8> <== NEVER TAKEN
200e6c0: 01 00 00 00 nop
200e6c4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200e6c8: 80 a0 60 00 cmp %g1, 0
200e6cc: 02 80 00 64 be 200e85c <unlink+0x2e8> <== NEVER TAKEN
200e6d0: 01 00 00 00 nop
200e6d4: 9f c0 40 00 call %g1
200e6d8: 90 10 00 12 mov %l2, %o0
200e6dc: 81 c7 e0 08 ret
200e6e0: 81 e8 00 00 restore
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
200e6e4: 80 8c 60 ff btst 0xff, %l1
200e6e8: 12 80 00 16 bne 200e740 <unlink+0x1cc> <== ALWAYS TAKEN
200e6ec: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
200e6f0: 81 c7 e0 08 ret <== NOT EXECUTED
200e6f4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
200e6f8: 22 bf ff aa be,a 200e5a0 <unlink+0x2c>
200e6fc: 03 00 80 6b sethi %hi(0x201ac00), %g1
200e700: 80 a0 60 00 cmp %g1, 0
200e704: 02 bf ff a7 be 200e5a0 <unlink+0x2c> <== NEVER TAKEN
200e708: 03 00 80 6b sethi %hi(0x201ac00), %g1
200e70c: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201ac80 <rtems_current_user_env>
200e710: a2 10 20 00 clr %l1
200e714: c4 00 60 04 ld [ %g1 + 4 ], %g2
200e718: c4 27 bf ec st %g2, [ %fp + -20 ]
200e71c: c4 00 60 08 ld [ %g1 + 8 ], %g2
200e720: c4 27 bf f0 st %g2, [ %fp + -16 ]
200e724: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200e728: c4 27 bf f4 st %g2, [ %fp + -12 ]
200e72c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200e730: c4 27 bf f8 st %g2, [ %fp + -8 ]
200e734: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
200e738: 10 bf ff a6 b 200e5d0 <unlink+0x5c>
200e73c: c2 27 bf fc st %g1, [ %fp + -4 ]
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
200e740: 80 a0 60 00 cmp %g1, 0
200e744: 02 bf ff e6 be 200e6dc <unlink+0x168> <== NEVER TAKEN
200e748: b0 10 3f ff mov -1, %i0
200e74c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200e750: 80 a0 60 00 cmp %g1, 0
200e754: 02 bf ff e2 be 200e6dc <unlink+0x168> <== NEVER TAKEN
200e758: 90 07 bf ec add %fp, -20, %o0
200e75c: 9f c0 40 00 call %g1
200e760: 01 00 00 00 nop
200e764: 81 c7 e0 08 ret
200e768: 81 e8 00 00 restore
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
200e76c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
200e770: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e774: 02 80 00 05 be 200e788 <unlink+0x214> <== NOT EXECUTED
200e778: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
200e77c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200e780: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( free_parentloc )
200e784: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
200e788: 02 80 00 0b be 200e7b4 <unlink+0x240> <== NOT EXECUTED
200e78c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
200e790: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e794: 02 80 00 08 be 200e7b4 <unlink+0x240> <== NOT EXECUTED
200e798: 01 00 00 00 nop <== NOT EXECUTED
200e79c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
200e7a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e7a4: 02 80 00 04 be 200e7b4 <unlink+0x240> <== NOT EXECUTED
200e7a8: 01 00 00 00 nop <== NOT EXECUTED
200e7ac: 9f c0 40 00 call %g1 <== NOT EXECUTED
200e7b0: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200e7b4: 40 00 00 62 call 200e93c <__errno> <== NOT EXECUTED
200e7b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200e7bc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200e7c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200e7c4: 81 c7 e0 08 ret <== NOT EXECUTED
200e7c8: 81 e8 00 00 restore <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
200e7cc: 92 10 00 10 mov %l0, %o1
200e7d0: 94 10 20 02 mov 2, %o2
200e7d4: 96 07 bf ec add %fp, -20, %o3
200e7d8: 7f ff cf e5 call 200276c <rtems_filesystem_evaluate_path>
200e7dc: 98 10 20 00 clr %o4
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
200e7e0: 80 a2 20 00 cmp %o0, 0
200e7e4: 12 bf ff c3 bne 200e6f0 <unlink+0x17c> <== NEVER TAKEN
200e7e8: a2 10 20 01 mov 1, %l1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
200e7ec: 10 bf ff 7a b 200e5d4 <unlink+0x60>
200e7f0: c2 07 bf ec ld [ %fp + -20 ], %g1
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
200e7f4: c2 07 bf e4 ld [ %fp + -28 ], %g1
200e7f8: 80 a0 60 00 cmp %g1, 0
200e7fc: 02 80 00 09 be 200e820 <unlink+0x2ac> <== NEVER TAKEN
200e800: 80 8c 60 ff btst 0xff, %l1
200e804: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200e808: 80 a0 60 00 cmp %g1, 0
200e80c: 02 80 00 05 be 200e820 <unlink+0x2ac> <== NEVER TAKEN
200e810: 80 8c 60 ff btst 0xff, %l1
200e814: 9f c0 40 00 call %g1
200e818: 90 10 00 10 mov %l0, %o0
if ( free_parentloc )
200e81c: 80 8c 60 ff btst 0xff, %l1
200e820: 02 80 00 0b be 200e84c <unlink+0x2d8> <== ALWAYS TAKEN
200e824: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &parentloc );
200e828: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e82c: 02 80 00 08 be 200e84c <unlink+0x2d8> <== NOT EXECUTED
200e830: 01 00 00 00 nop <== NOT EXECUTED
200e834: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
200e838: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e83c: 02 80 00 04 be 200e84c <unlink+0x2d8> <== NOT EXECUTED
200e840: 01 00 00 00 nop <== NOT EXECUTED
200e844: 9f c0 40 00 call %g1 <== NOT EXECUTED
200e848: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
200e84c: 40 00 00 3c call 200e93c <__errno>
200e850: b0 10 3f ff mov -1, %i0
200e854: 82 10 20 15 mov 0x15, %g1
200e858: c2 22 00 00 st %g1, [ %o0 ]
200e85c: 81 c7 e0 08 ret
200e860: 81 e8 00 00 restore
02009ec0 <unmount>:
*/
int unmount(
const char *path
)
{
2009ec0: 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 ) )
2009ec4: 40 00 35 dc call 2017634 <strlen>
2009ec8: 90 10 00 18 mov %i0, %o0
2009ecc: a0 07 bf ec add %fp, -20, %l0
2009ed0: 92 10 00 08 mov %o0, %o1
2009ed4: 94 10 20 00 clr %o2
2009ed8: 90 10 00 18 mov %i0, %o0
2009edc: 96 10 00 10 mov %l0, %o3
2009ee0: 7f ff ef 59 call 2005c44 <rtems_filesystem_evaluate_path>
2009ee4: 98 10 20 01 mov 1, %o4
2009ee8: 80 a2 20 00 cmp %o0, 0
2009eec: 12 80 00 3e bne 2009fe4 <unmount+0x124>
2009ef0: e2 07 bf fc ld [ %fp + -4 ], %l1
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
2009ef4: c2 07 bf ec ld [ %fp + -20 ], %g1
2009ef8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
2009efc: 80 a0 80 01 cmp %g2, %g1
2009f00: 12 80 00 41 bne 200a004 <unmount+0x144>
2009f04: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
2009f08: 80 a0 60 00 cmp %g1, 0
2009f0c: 22 80 00 09 be,a 2009f30 <unmount+0x70> <== NEVER TAKEN
2009f10: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED
2009f14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2009f18: 80 a0 60 00 cmp %g1, 0
2009f1c: 22 80 00 05 be,a 2009f30 <unmount+0x70> <== NEVER TAKEN
2009f20: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED
2009f24: 9f c0 40 00 call %g1
2009f28: 90 10 00 10 mov %l0, %o0
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
2009f2c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
2009f30: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2009f34: 80 a0 60 00 cmp %g1, 0
2009f38: 02 80 00 61 be 200a0bc <unmount+0x1fc> <== NEVER TAKEN
2009f3c: 01 00 00 00 nop
fs_root_loc = &mt_entry->mt_fs_root;
2009f40: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
2009f44: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
2009f48: 80 a0 60 00 cmp %g1, 0
2009f4c: 02 80 00 5c be 200a0bc <unmount+0x1fc> <== NEVER TAKEN
2009f50: 03 00 80 9a sethi %hi(0x2026800), %g1
* 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 )
2009f54: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2026a90 <rtems_current_user_env>
2009f58: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2009f5c: 80 a0 40 11 cmp %g1, %l1
2009f60: 02 80 00 23 be 2009fec <unmount+0x12c>
2009f64: 07 00 80 9e sethi %hi(0x2027800), %g3
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2009f68: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 2027b80 <rtems_filesystem_mount_table_control>
2009f6c: 86 10 e3 80 or %g3, 0x380, %g3
2009f70: 86 00 e0 04 add %g3, 4, %g3
2009f74: 80 a0 40 03 cmp %g1, %g3
2009f78: 02 80 00 0f be 2009fb4 <unmount+0xf4> <== NEVER TAKEN
2009f7c: 01 00 00 00 nop
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
2009f80: c8 04 60 2c ld [ %l1 + 0x2c ], %g4
2009f84: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2009f88: 80 a0 80 04 cmp %g2, %g4
2009f8c: 32 80 00 07 bne,a 2009fa8 <unmount+0xe8> <== ALWAYS TAKEN
2009f90: c2 00 40 00 ld [ %g1 ], %g1
2009f94: 30 80 00 16 b,a 2009fec <unmount+0x12c> <== NOT EXECUTED
2009f98: 80 a1 00 02 cmp %g4, %g2
2009f9c: 02 80 00 14 be 2009fec <unmount+0x12c>
2009fa0: 01 00 00 00 nop
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
2009fa4: c2 00 40 00 ld [ %g1 ], %g1
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2009fa8: 80 a0 40 03 cmp %g1, %g3
2009fac: 32 bf ff fb bne,a 2009f98 <unmount+0xd8>
2009fb0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
* 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 )
2009fb4: 7f ff f0 1c call 2006024 <rtems_libio_is_open_files_in_fs>
2009fb8: 90 10 00 11 mov %l1, %o0
2009fbc: 80 a2 20 01 cmp %o0, 1
2009fc0: 02 80 00 0b be 2009fec <unmount+0x12c>
2009fc4: 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 )
2009fc8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
2009fcc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2009fd0: 9f c0 40 00 call %g1
2009fd4: 90 10 00 11 mov %l1, %o0
2009fd8: 80 a2 20 00 cmp %o0, 0
2009fdc: 22 80 00 19 be,a 200a040 <unmount+0x180> <== ALWAYS TAKEN
2009fe0: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
2009fe4: 81 c7 e0 08 ret
2009fe8: 91 e8 3f ff restore %g0, -1, %o0
* 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 );
2009fec: 40 00 28 86 call 2014204 <__errno>
2009ff0: b0 10 3f ff mov -1, %i0
2009ff4: 82 10 20 10 mov 0x10, %g1
2009ff8: c2 22 00 00 st %g1, [ %o0 ]
2009ffc: 81 c7 e0 08 ret
200a000: 81 e8 00 00 restore
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
rtems_filesystem_freenode( &loc );
200a004: 80 a0 60 00 cmp %g1, 0
200a008: 02 80 00 08 be 200a028 <unmount+0x168> <== NEVER TAKEN
200a00c: 01 00 00 00 nop
200a010: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200a014: 80 a0 60 00 cmp %g1, 0
200a018: 02 80 00 04 be 200a028 <unmount+0x168> <== NEVER TAKEN
200a01c: 01 00 00 00 nop
200a020: 9f c0 40 00 call %g1
200a024: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EACCES );
200a028: 40 00 28 77 call 2014204 <__errno>
200a02c: b0 10 3f ff mov -1, %i0
200a030: 82 10 20 0d mov 0xd, %g1
200a034: c2 22 00 00 st %g1, [ %o0 ]
200a038: 81 c7 e0 08 ret
200a03c: 81 e8 00 00 restore
* 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){
200a040: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
200a044: 9f c0 40 00 call %g1
200a048: 90 10 00 11 mov %l1, %o0
200a04c: 80 a2 20 00 cmp %o0, 0
200a050: 32 80 00 13 bne,a 200a09c <unmount+0x1dc> <== NEVER TAKEN
200a054: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200a058: 40 00 06 3c call 200b948 <_Chain_Extract>
200a05c: 90 10 00 11 mov %l1, %o0
/*
* 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 );
200a060: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
200a064: 80 a0 60 00 cmp %g1, 0
200a068: 02 80 00 09 be 200a08c <unmount+0x1cc> <== NEVER TAKEN
200a06c: 90 10 00 11 mov %l1, %o0
200a070: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200a074: 80 a0 60 00 cmp %g1, 0
200a078: 02 80 00 05 be 200a08c <unmount+0x1cc> <== NEVER TAKEN
200a07c: 01 00 00 00 nop
200a080: 9f c0 40 00 call %g1
200a084: 90 04 60 08 add %l1, 8, %o0
free( mt_entry );
200a088: 90 10 00 11 mov %l1, %o0
200a08c: 7f ff ef 2a call 2005d34 <free>
200a090: b0 10 20 00 clr %i0
return 0;
200a094: 81 c7 e0 08 ret
200a098: 81 e8 00 00 restore
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
200a09c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED
200a0a0: 9f c0 40 00 call %g1 <== NOT EXECUTED
200a0a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200a0a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200a0ac: 02 bf ff ce be 2009fe4 <unmount+0x124> <== NOT EXECUTED
200a0b0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
200a0b4: 40 00 05 45 call 200b5c8 <rtems_fatal_error_occurred> <== NOT EXECUTED
200a0b8: 90 10 20 00 clr %o0 ! 0 <PROM_START> <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
200a0bc: 40 00 28 52 call 2014204 <__errno> <== NOT EXECUTED
200a0c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a0c4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200a0c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a0cc: 81 c7 e0 08 ret <== NOT EXECUTED
200a0d0: 81 e8 00 00 restore <== NOT EXECUTED
0200757c <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
200757c: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
2007580: 40 00 2f 48 call 20132a0 <strlen>
2007584: 90 10 00 18 mov %i0, %o0
2007588: a0 07 bf ec add %fp, -20, %l0
200758c: 92 10 00 08 mov %o0, %o1
2007590: 94 10 20 00 clr %o2
2007594: 90 10 00 18 mov %i0, %o0
2007598: 96 10 00 10 mov %l0, %o3
200759c: 98 10 20 01 mov 1, %o4
20075a0: 7f ff f0 a1 call 2003824 <rtems_filesystem_evaluate_path>
20075a4: b0 10 3f ff mov -1, %i0
20075a8: 80 a2 20 00 cmp %o0, 0
20075ac: 12 80 00 14 bne 20075fc <utime+0x80>
20075b0: c4 07 bf f8 ld [ %fp + -8 ], %g2
return -1;
if ( !temp_loc.ops->utime_h ){
20075b4: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1
20075b8: 80 a0 60 00 cmp %g1, 0
20075bc: 22 80 00 12 be,a 2007604 <utime+0x88> <== NEVER TAKEN
20075c0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
20075c4: d4 06 60 04 ld [ %i1 + 4 ], %o2
20075c8: d2 06 40 00 ld [ %i1 ], %o1
20075cc: 9f c0 40 00 call %g1
20075d0: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &temp_loc );
20075d4: c2 07 bf f8 ld [ %fp + -8 ], %g1
20075d8: 80 a0 60 00 cmp %g1, 0
20075dc: 02 80 00 08 be 20075fc <utime+0x80> <== NEVER TAKEN
20075e0: b0 10 00 08 mov %o0, %i0
20075e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20075e8: 80 a0 60 00 cmp %g1, 0
20075ec: 02 80 00 0f be 2007628 <utime+0xac> <== NEVER TAKEN
20075f0: 01 00 00 00 nop
20075f4: 9f c0 40 00 call %g1
20075f8: 90 10 00 10 mov %l0, %o0
return result;
}
20075fc: 81 c7 e0 08 ret
2007600: 81 e8 00 00 restore
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
2007604: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007608: 02 80 00 04 be 2007618 <utime+0x9c> <== NOT EXECUTED
200760c: 01 00 00 00 nop <== NOT EXECUTED
2007610: 9f c0 40 00 call %g1 <== NOT EXECUTED
2007614: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2007618: 40 00 28 3a call 2011700 <__errno> <== NOT EXECUTED
200761c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2007620: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2007624: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2007628: 81 c7 e0 08 ret <== NOT EXECUTED
200762c: 81 e8 00 00 restore <== NOT EXECUTED
0200548c <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
200548c: 9d e3 bf 88 save %sp, -120, %sp
for (; *fmt != '\0'; fmt++) {
2005490: c2 0e 00 00 ldub [ %i0 ], %g1
2005494: 83 28 60 18 sll %g1, 0x18, %g1
2005498: 80 a0 60 00 cmp %g1, 0
200549c: 02 80 00 7d be 2005690 <vprintk+0x204> <== NEVER TAKEN
20054a0: 29 00 80 6c sethi %hi(0x201b000), %l4
20054a4: 3b 00 80 67 sethi %hi(0x2019c00), %i5
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
20054a8: 37 00 80 67 sethi %hi(0x2019c00), %i3
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
20054ac: a8 15 21 5c or %l4, 0x15c, %l4
20054b0: ba 17 60 b8 or %i5, 0xb8, %i5
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
20054b4: b6 16 e0 b0 or %i3, 0xb0, %i3
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
20054b8: ac 07 bf e8 add %fp, -24, %l6
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
20054bc: 91 38 60 18 sra %g1, 0x18, %o0
20054c0: 80 a2 20 25 cmp %o0, 0x25
20054c4: 32 80 00 8d bne,a 20056f8 <vprintk+0x26c>
20054c8: c2 05 00 00 ld [ %l4 ], %g1
BSP_output_char(*fmt);
continue;
}
fmt++;
20054cc: b0 06 20 01 inc %i0
if (*fmt == '0' ) {
20054d0: c2 0e 00 00 ldub [ %i0 ], %g1
20054d4: 85 28 60 18 sll %g1, 0x18, %g2
20054d8: 87 38 a0 18 sra %g2, 0x18, %g3
20054dc: 80 a0 e0 30 cmp %g3, 0x30
20054e0: 02 80 00 a9 be 2005784 <vprintk+0x2f8>
20054e4: b8 10 20 20 mov 0x20, %i4
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
20054e8: 87 38 a0 18 sra %g2, 0x18, %g3
20054ec: 80 a0 e0 2d cmp %g3, 0x2d
20054f0: 02 80 00 a0 be 2005770 <vprintk+0x2e4>
20054f4: aa 10 20 00 clr %l5
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
20054f8: 82 00 7f d0 add %g1, -48, %g1
20054fc: 82 08 60 ff and %g1, 0xff, %g1
2005500: 80 a0 60 09 cmp %g1, 9
2005504: 18 80 00 0f bgu 2005540 <vprintk+0xb4>
2005508: a0 10 20 00 clr %l0
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
200550c: b0 06 20 01 inc %i0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2005510: c2 0e 00 00 ldub [ %i0 ], %g1
width *= 10;
width += ((unsigned) *fmt - '0');
2005514: 87 38 a0 18 sra %g2, 0x18, %g3
2005518: 89 2c 20 03 sll %l0, 3, %g4
200551c: 85 28 60 18 sll %g1, 0x18, %g2
2005520: a1 2c 20 01 sll %l0, 1, %l0
2005524: a0 04 00 04 add %l0, %g4, %l0
2005528: a0 04 00 03 add %l0, %g3, %l0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
200552c: 86 00 7f d0 add %g1, -48, %g3
2005530: 86 08 e0 ff and %g3, 0xff, %g3
2005534: 80 a0 e0 09 cmp %g3, 9
2005538: 08 bf ff f5 bleu 200550c <vprintk+0x80>
200553c: a0 04 3f d0 add %l0, -48, %l0
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
2005540: 83 38 a0 18 sra %g2, 0x18, %g1
2005544: 80 a0 60 6c cmp %g1, 0x6c
2005548: 02 80 00 77 be 2005724 <vprintk+0x298>
200554c: 80 a0 60 63 cmp %g1, 0x63
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
2005550: 22 80 00 7d be,a 2005744 <vprintk+0x2b8>
2005554: 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' ) {
2005558: 80 a0 60 73 cmp %g1, 0x73
200555c: 02 80 00 8f be 2005798 <vprintk+0x30c>
2005560: 80 a0 60 4f cmp %g1, 0x4f
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
2005564: 22 80 00 6e be,a 200571c <vprintk+0x290>
2005568: 82 10 20 00 clr %g1
200556c: 80 a0 60 6f cmp %g1, 0x6f
2005570: 22 80 00 6b be,a 200571c <vprintk+0x290> <== NEVER TAKEN
2005574: 82 10 20 00 clr %g1 <== NOT EXECUTED
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
2005578: 80 a0 60 49 cmp %g1, 0x49
200557c: 22 80 00 06 be,a 2005594 <vprintk+0x108>
2005580: 82 10 20 01 mov 1, %g1
2005584: 80 a0 60 69 cmp %g1, 0x69
2005588: 12 80 00 44 bne 2005698 <vprintk+0x20c>
200558c: 80 a0 60 44 cmp %g1, 0x44
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
2005590: 82 10 20 01 mov 1, %g1
2005594: aa 10 20 0a mov 0xa, %l5
}
printNum(
2005598: e6 06 40 00 ld [ %i1 ], %l3
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
200559c: 80 88 60 ff btst 0xff, %g1
BSP_output_char(c);
continue;
}
printNum(
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
20055a0: b2 06 60 04 add %i1, 4, %i1
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
20055a4: 02 80 00 05 be 20055b8 <vprintk+0x12c>
20055a8: b8 0f 20 30 and %i4, 0x30, %i4
20055ac: 80 a4 e0 00 cmp %l3, 0
20055b0: 26 80 00 c0 bl,a 20058b0 <vprintk+0x424>
20055b4: c2 05 00 00 ld [ %l4 ], %g1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20055b8: 90 10 00 13 mov %l3, %o0
20055bc: 92 10 00 15 mov %l5, %o1
20055c0: 40 00 4a 13 call 2017e0c <.udiv>
20055c4: ae 10 20 01 mov 1, %l7
20055c8: a2 92 20 00 orcc %o0, 0, %l1
20055cc: 02 80 00 12 be 2005614 <vprintk+0x188>
20055d0: a4 10 20 00 clr %l2
20055d4: 10 80 00 03 b 20055e0 <vprintk+0x154>
20055d8: ae 10 00 15 mov %l5, %l7
20055dc: a2 10 00 08 mov %o0, %l1
toPrint[count++] = (char) (unsigned_num - (n * base));
20055e0: 92 10 00 11 mov %l1, %o1
20055e4: 40 00 49 d0 call 2017d24 <.umul>
20055e8: 90 10 00 17 mov %l7, %o0
20055ec: 90 24 c0 08 sub %l3, %o0, %o0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20055f0: 92 10 00 15 mov %l5, %o1
toPrint[count++] = (char) (unsigned_num - (n * base));
20055f4: d0 2d 80 12 stb %o0, [ %l6 + %l2 ]
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20055f8: 90 10 00 11 mov %l1, %o0
20055fc: 40 00 4a 04 call 2017e0c <.udiv>
2005600: a4 04 a0 01 inc %l2
2005604: 80 a2 20 00 cmp %o0, 0
2005608: 12 bf ff f5 bne 20055dc <vprintk+0x150>
200560c: a6 10 00 11 mov %l1, %l3
2005610: ae 04 a0 01 add %l2, 1, %l7
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
2005614: a4 07 80 12 add %fp, %l2, %l2
for (n=maxwidth ; n > count; n-- )
2005618: 80 a4 00 17 cmp %l0, %l7
200561c: 08 80 00 09 bleu 2005640 <vprintk+0x1b4>
2005620: e6 2c bf e8 stb %l3, [ %l2 + -24 ]
BSP_output_char(lead);
2005624: c2 05 00 00 ld [ %l4 ], %g1
2005628: 9f c0 40 00 call %g1
200562c: 90 10 00 1c mov %i4, %o0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
2005630: a0 04 3f ff add %l0, -1, %l0
2005634: 80 a4 00 17 cmp %l0, %l7
2005638: 38 bf ff fc bgu,a 2005628 <vprintk+0x19c>
200563c: c2 05 00 00 ld [ %l4 ], %g1
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2005640: 80 a5 e0 00 cmp %l7, 0
2005644: 22 80 00 0e be,a 200567c <vprintk+0x1f0> <== NEVER TAKEN
2005648: b0 06 20 01 inc %i0 <== NOT EXECUTED
200564c: a2 05 ff ff add %l7, -1, %l1
2005650: a0 10 20 00 clr %l0
2005654: a2 05 80 11 add %l6, %l1, %l1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2005658: c4 4c 40 00 ldsb [ %l1 ], %g2
200565c: c2 05 00 00 ld [ %l4 ], %g1
2005660: d0 4f 40 02 ldsb [ %i5 + %g2 ], %o0
2005664: 9f c0 40 00 call %g1
2005668: a0 04 20 01 inc %l0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
200566c: 80 a4 00 17 cmp %l0, %l7
2005670: 0a bf ff fa bcs 2005658 <vprintk+0x1cc>
2005674: a2 04 7f ff add %l1, -1, %l1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2005678: b0 06 20 01 inc %i0
200567c: c2 0e 00 00 ldub [ %i0 ], %g1
2005680: 83 28 60 18 sll %g1, 0x18, %g1
2005684: 80 a0 60 00 cmp %g1, 0
2005688: 12 bf ff 8e bne 20054c0 <vprintk+0x34> <== ALWAYS TAKEN
200568c: 91 38 60 18 sra %g1, 0x18, %o0
2005690: 81 c7 e0 08 ret <== NOT EXECUTED
2005694: 81 e8 00 00 restore <== NOT EXECUTED
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
2005698: 22 bf ff bf be,a 2005594 <vprintk+0x108>
200569c: 82 10 20 01 mov 1, %g1
20056a0: 80 a0 60 64 cmp %g1, 0x64
20056a4: 22 bf ff bc be,a 2005594 <vprintk+0x108>
20056a8: 82 10 20 01 mov 1, %g1
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
20056ac: 80 a0 60 55 cmp %g1, 0x55
20056b0: 12 80 00 05 bne 20056c4 <vprintk+0x238>
20056b4: 80 a0 60 75 cmp %g1, 0x75
20056b8: 82 10 20 00 clr %g1
20056bc: 10 bf ff b7 b 2005598 <vprintk+0x10c>
20056c0: aa 10 20 0a mov 0xa, %l5
20056c4: 02 bf ff fe be 20056bc <vprintk+0x230>
20056c8: 82 10 20 00 clr %g1
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
20056cc: 91 38 a0 18 sra %g2, 0x18, %o0
20056d0: 80 a2 20 58 cmp %o0, 0x58
20056d4: 02 bf ff b1 be 2005598 <vprintk+0x10c>
20056d8: aa 10 20 10 mov 0x10, %l5
20056dc: 80 a2 20 78 cmp %o0, 0x78
20056e0: 02 bf ff ae be 2005598 <vprintk+0x10c>
20056e4: 01 00 00 00 nop
base = 16; sign = false;
} else if ( c == 'p' ) {
20056e8: 80 a2 20 70 cmp %o0, 0x70
20056ec: 02 bf ff ab be 2005598 <vprintk+0x10c>
20056f0: 01 00 00 00 nop
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
20056f4: c2 05 00 00 ld [ %l4 ], %g1
20056f8: 9f c0 40 00 call %g1
20056fc: b0 06 20 01 inc %i0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2005700: c2 0e 00 00 ldub [ %i0 ], %g1
2005704: 83 28 60 18 sll %g1, 0x18, %g1
2005708: 80 a0 60 00 cmp %g1, 0
200570c: 12 bf ff 6d bne 20054c0 <vprintk+0x34>
2005710: 91 38 60 18 sra %g1, 0x18, %o0
2005714: 81 c7 e0 08 ret
2005718: 81 e8 00 00 restore
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
200571c: 10 bf ff 9f b 2005598 <vprintk+0x10c>
2005720: aa 10 20 08 mov 8, %l5
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
2005724: b0 06 20 01 inc %i0
2005728: c2 0e 00 00 ldub [ %i0 ], %g1
200572c: 85 28 60 18 sll %g1, 0x18, %g2
}
if ( c == 'c' ) {
2005730: 83 38 a0 18 sra %g2, 0x18, %g1
2005734: 80 a0 60 63 cmp %g1, 0x63
2005738: 12 bf ff 89 bne 200555c <vprintk+0xd0> <== ALWAYS TAKEN
200573c: 80 a0 60 73 cmp %g1, 0x73
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
2005740: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
BSP_output_char(chr);
2005744: c2 05 00 00 ld [ %l4 ], %g1
2005748: 91 2a 20 18 sll %o0, 0x18, %o0
200574c: 9f c0 40 00 call %g1
2005750: 91 3a 20 18 sra %o0, 0x18, %o0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2005754: b0 06 20 01 inc %i0
2005758: c2 0e 00 00 ldub [ %i0 ], %g1
200575c: 83 28 60 18 sll %g1, 0x18, %g1
2005760: 80 a0 60 00 cmp %g1, 0
2005764: 12 bf ff 56 bne 20054bc <vprintk+0x30> <== ALWAYS TAKEN
2005768: b2 06 60 04 add %i1, 4, %i1
200576c: 30 bf ff ea b,a 2005714 <vprintk+0x288> <== NOT EXECUTED
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
2005770: b0 06 20 01 inc %i0
2005774: c2 0e 00 00 ldub [ %i0 ], %g1
2005778: aa 10 20 01 mov 1, %l5
200577c: 10 bf ff 5f b 20054f8 <vprintk+0x6c>
2005780: 85 28 60 18 sll %g1, 0x18, %g2
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
2005784: b0 06 20 01 inc %i0
2005788: c2 0e 00 00 ldub [ %i0 ], %g1
200578c: b8 10 20 30 mov 0x30, %i4
2005790: 10 bf ff 56 b 20054e8 <vprintk+0x5c>
2005794: 85 28 60 18 sll %g1, 0x18, %g2
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
2005798: e4 06 40 00 ld [ %i1 ], %l2
if ( str == NULL ) {
200579c: 80 a4 a0 00 cmp %l2, 0
20057a0: 02 80 00 4a be 20058c8 <vprintk+0x43c>
20057a4: b2 06 60 04 add %i1, 4, %i1
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
20057a8: c2 4c 80 00 ldsb [ %l2 ], %g1
20057ac: 80 a0 60 00 cmp %g1, 0
20057b0: 02 80 00 07 be 20057cc <vprintk+0x340>
20057b4: a2 10 20 00 clr %l1
20057b8: a2 04 60 01 inc %l1
20057bc: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1
20057c0: 80 a0 60 00 cmp %g1, 0
20057c4: 32 bf ff fe bne,a 20057bc <vprintk+0x330>
20057c8: a2 04 60 01 inc %l1
;
/* leading spaces */
if ( !minus )
20057cc: aa 8d 60 ff andcc %l5, 0xff, %l5
20057d0: 12 80 00 0e bne 2005808 <vprintk+0x37c>
20057d4: 80 a4 20 00 cmp %l0, 0
for ( i=len ; i<width ; i++ )
20057d8: 80 a4 00 11 cmp %l0, %l1
20057dc: 08 80 00 0b bleu 2005808 <vprintk+0x37c>
20057e0: 80 a4 20 00 cmp %l0, 0
20057e4: a6 10 00 11 mov %l1, %l3
BSP_output_char(' ');
20057e8: c2 05 00 00 ld [ %l4 ], %g1
20057ec: 9f c0 40 00 call %g1
20057f0: 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++ )
20057f4: a6 04 e0 01 inc %l3
20057f8: 80 a4 c0 10 cmp %l3, %l0
20057fc: 2a bf ff fc bcs,a 20057ec <vprintk+0x360>
2005800: c2 05 00 00 ld [ %l4 ], %g1
BSP_output_char(' ');
/* no width option */
if (width == 0) {
2005804: 80 a4 20 00 cmp %l0, 0
2005808: 32 80 00 07 bne,a 2005824 <vprintk+0x398>
200580c: d0 4c 80 00 ldsb [ %l2 ], %o0
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2005810: 80 a4 60 00 cmp %l1, 0
2005814: 02 80 00 14 be 2005864 <vprintk+0x3d8>
2005818: 80 a5 60 00 cmp %l5, 0
200581c: a0 10 00 11 mov %l1, %l0
2005820: d0 4c 80 00 ldsb [ %l2 ], %o0
2005824: 80 a2 20 00 cmp %o0, 0
2005828: 02 80 00 0f be 2005864 <vprintk+0x3d8> <== NEVER TAKEN
200582c: 80 a5 60 00 cmp %l5, 0
BSP_output_char(*str);
2005830: c2 05 00 00 ld [ %l4 ], %g1
2005834: 9f c0 40 00 call %g1
2005838: a4 04 a0 01 inc %l2
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
200583c: 10 80 00 06 b 2005854 <vprintk+0x3c8>
2005840: d0 4c 80 00 ldsb [ %l2 ], %o0
BSP_output_char(*str);
2005844: c2 05 00 00 ld [ %l4 ], %g1
2005848: 9f c0 40 00 call %g1
200584c: 01 00 00 00 nop
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2005850: d0 4c 80 00 ldsb [ %l2 ], %o0
2005854: 80 a2 20 00 cmp %o0, 0
2005858: 12 bf ff fb bne 2005844 <vprintk+0x3b8>
200585c: a4 04 a0 01 inc %l2
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
2005860: 80 a5 60 00 cmp %l5, 0
2005864: 22 bf ff 86 be,a 200567c <vprintk+0x1f0>
2005868: b0 06 20 01 inc %i0
for ( i=len ; i<width ; i++ )
200586c: 80 a4 40 10 cmp %l1, %l0
2005870: 3a bf ff 83 bcc,a 200567c <vprintk+0x1f0>
2005874: b0 06 20 01 inc %i0
BSP_output_char(' ');
2005878: c2 05 00 00 ld [ %l4 ], %g1
200587c: 9f c0 40 00 call %g1
2005880: 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++ )
2005884: a2 04 60 01 inc %l1
2005888: 80 a4 40 10 cmp %l1, %l0
200588c: 2a bf ff fc bcs,a 200587c <vprintk+0x3f0>
2005890: c2 05 00 00 ld [ %l4 ], %g1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2005894: b0 06 20 01 inc %i0
2005898: c2 0e 00 00 ldub [ %i0 ], %g1
200589c: 83 28 60 18 sll %g1, 0x18, %g1
20058a0: 80 a0 60 00 cmp %g1, 0
20058a4: 32 bf ff 07 bne,a 20054c0 <vprintk+0x34> <== ALWAYS TAKEN
20058a8: 91 38 60 18 sra %g1, 0x18, %o0
20058ac: 30 bf ff 9a b,a 2005714 <vprintk+0x288> <== NOT EXECUTED
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
20058b0: 9f c0 40 00 call %g1
20058b4: 90 10 20 2d mov 0x2d, %o0
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
20058b8: 80 a0 00 10 cmp %g0, %l0
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
20058bc: a6 20 00 13 neg %l3
if (maxwidth) maxwidth--;
20058c0: 10 bf ff 3e b 20055b8 <vprintk+0x12c>
20058c4: a0 64 20 00 subx %l0, 0, %l0
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
20058c8: 10 bf ff b8 b 20057a8 <vprintk+0x31c>
20058cc: a4 10 00 1b mov %i3, %l2
02019220 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
2019220: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2019224: 03 00 80 6a sethi %hi(0x201a800), %g1
2019228: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201aac4 <rtems_libio_number_iops>
201922c: 80 a6 00 01 cmp %i0, %g1
2019230: 1a 80 00 23 bcc 20192bc <write+0x9c> <== NEVER TAKEN
2019234: 03 00 80 6d sethi %hi(0x201b400), %g1
iop = rtems_libio_iop( fd );
2019238: e0 00 60 44 ld [ %g1 + 0x44 ], %l0 ! 201b444 <rtems_libio_iops>
201923c: 83 2e 20 06 sll %i0, 6, %g1
2019240: b1 2e 20 03 sll %i0, 3, %i0
2019244: b0 06 00 01 add %i0, %g1, %i0
2019248: a0 04 00 18 add %l0, %i0, %l0
rtems_libio_check_is_open( iop );
201924c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2019250: 80 88 61 00 btst 0x100, %g1
2019254: 02 80 00 1a be 20192bc <write+0x9c> <== NEVER TAKEN
2019258: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201925c: 02 80 00 1e be 20192d4 <write+0xb4> <== NEVER TAKEN
2019260: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
2019264: 02 80 00 14 be 20192b4 <write+0x94>
2019268: b0 10 20 00 clr %i0
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
201926c: 80 88 60 04 btst 4, %g1
2019270: 02 80 00 19 be 20192d4 <write+0xb4> <== NEVER TAKEN
2019274: 01 00 00 00 nop
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
2019278: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
201927c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2019280: 80 a0 60 00 cmp %g1, 0
2019284: 02 80 00 1a be 20192ec <write+0xcc> <== NEVER TAKEN
2019288: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
201928c: 94 10 00 1a mov %i2, %o2
2019290: 9f c0 40 00 call %g1
2019294: 90 10 00 10 mov %l0, %o0
if ( rc > 0 )
2019298: b0 92 20 00 orcc %o0, 0, %i0
201929c: 04 80 00 06 ble 20192b4 <write+0x94> <== NEVER TAKEN
20192a0: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
20192a4: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4
20192a8: 86 83 40 18 addcc %o5, %i0, %g3
20192ac: 84 43 00 02 addx %o4, %g2, %g2
20192b0: c4 3c 20 10 std %g2, [ %l0 + 0x10 ]
return rc;
}
20192b4: 81 c7 e0 08 ret
20192b8: 81 e8 00 00 restore
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
20192bc: 7f ff d5 a0 call 200e93c <__errno> <== NOT EXECUTED
20192c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20192c4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
20192c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20192cc: 81 c7 e0 08 ret <== NOT EXECUTED
20192d0: 81 e8 00 00 restore <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
20192d4: 7f ff d5 9a call 200e93c <__errno> <== NOT EXECUTED
20192d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20192dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20192e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20192e4: 81 c7 e0 08 ret <== NOT EXECUTED
20192e8: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
20192ec: 7f ff d5 94 call 200e93c <__errno> <== NOT EXECUTED
20192f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20192f4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20192f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20192fc: 81 c7 e0 08 ret <== NOT EXECUTED
2019300: 81 e8 00 00 restore <== NOT EXECUTED
020074f0 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
20074f0: 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 );
20074f4: 03 00 80 7e sethi %hi(0x201f800), %g1
20074f8: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 201f8f4 <rtems_libio_number_iops>
20074fc: 80 a6 00 01 cmp %i0, %g1
2007500: 1a 80 00 56 bcc 2007658 <writev+0x168> <== NEVER TAKEN
2007504: 03 00 80 82 sethi %hi(0x2020800), %g1
iop = rtems_libio_iop( fd );
2007508: e6 00 62 4c ld [ %g1 + 0x24c ], %l3 ! 2020a4c <rtems_libio_iops>
200750c: 83 2e 20 06 sll %i0, 6, %g1
2007510: b1 2e 20 03 sll %i0, 3, %i0
2007514: b0 06 00 01 add %i0, %g1, %i0
2007518: a6 04 c0 18 add %l3, %i0, %l3
rtems_libio_check_is_open( iop );
200751c: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1
2007520: 80 88 61 00 btst 0x100, %g1
2007524: 02 80 00 4d be 2007658 <writev+0x168>
2007528: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
200752c: 02 80 00 30 be 20075ec <writev+0xfc> <== NEVER TAKEN
2007530: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
2007534: 02 80 00 2e be 20075ec <writev+0xfc>
2007538: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
200753c: 04 80 00 2c ble 20075ec <writev+0xfc>
2007540: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2007544: 14 80 00 2a bg 20075ec <writev+0xfc> <== NEVER TAKEN
2007548: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
200754c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1
2007550: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2007554: 80 a0 60 00 cmp %g1, 0
2007558: 02 80 00 46 be 2007670 <writev+0x180> <== NEVER TAKEN
200755c: 17 00 00 1f sethi %hi(0x7c00), %o3
rtems_set_errno_and_return_minus_one( ENOTSUP );
2007560: 82 10 00 19 mov %i1, %g1
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
2007564: 96 12 e3 ff or %o3, 0x3ff, %o3
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2007568: 9a 10 20 01 mov 1, %o5
200756c: 86 10 20 00 clr %g3
2007570: 88 10 20 00 clr %g4
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
2007574: c4 00 40 00 ld [ %g1 ], %g2
2007578: 80 a0 a0 00 cmp %g2, 0
200757c: 02 80 00 1c be 20075ec <writev+0xfc>
2007580: 86 00 e0 01 inc %g3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
2007584: c4 00 60 04 ld [ %g1 + 4 ], %g2
* 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++ ) {
2007588: 82 00 60 08 add %g1, 8, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
200758c: 80 a0 00 02 cmp %g0, %g2
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
2007590: 84 01 00 02 add %g4, %g2, %g2
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
2007594: 98 40 3f ff addx %g0, -1, %o4
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
2007598: 80 a0 80 0b cmp %g2, %o3
200759c: 14 80 00 14 bg 20075ec <writev+0xfc> <== NEVER TAKEN
20075a0: 9a 0b 40 0c and %o5, %o4, %o5
20075a4: 80 a1 00 02 cmp %g4, %g2
20075a8: 14 80 00 11 bg 20075ec <writev+0xfc>
20075ac: 80 a6 80 03 cmp %i2, %g3
* 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++ ) {
20075b0: 34 bf ff f1 bg,a 2007574 <writev+0x84>
20075b4: 88 10 00 02 mov %g2, %g4
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
20075b8: 80 8b 60 ff btst 0xff, %o5
20075bc: a4 10 20 00 clr %l2
20075c0: 12 80 00 09 bne 20075e4 <writev+0xf4>
20075c4: b0 10 20 00 clr %i0
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
20075c8: d4 06 60 04 ld [ %i1 + 4 ], %o2
20075cc: 80 a2 a0 00 cmp %o2, 0
20075d0: 12 80 00 0d bne 2007604 <writev+0x114> <== ALWAYS TAKEN
20075d4: a4 04 a0 01 inc %l2
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
20075d8: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED
20075dc: 14 bf ff fb bg 20075c8 <writev+0xd8>
20075e0: b2 06 60 08 add %i1, 8, %i1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
20075e4: 81 c7 e0 08 ret
20075e8: 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 );
20075ec: 40 00 27 51 call 2011330 <__errno>
20075f0: b0 10 3f ff mov -1, %i0
20075f4: 82 10 20 16 mov 0x16, %g1
20075f8: c2 22 00 00 st %g1, [ %o0 ]
20075fc: 81 c7 e0 08 ret
2007600: 81 e8 00 00 restore
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
2007604: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1
2007608: d2 06 40 00 ld [ %i1 ], %o1
200760c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2007610: 9f c0 40 00 call %g1
2007614: 90 10 00 13 mov %l3, %o0
if ( bytes < 0 )
2007618: 80 a2 20 00 cmp %o0, 0
200761c: 06 80 00 1b bl 2007688 <writev+0x198> <== NEVER TAKEN
2007620: 01 00 00 00 nop
return -1;
if ( bytes > 0 ) {
2007624: 02 80 00 07 be 2007640 <writev+0x150> <== NEVER TAKEN
2007628: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
200762c: c4 1c e0 10 ldd [ %l3 + 0x10 ], %g2
2007630: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2007634: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
2007638: 84 40 80 10 addx %g2, %l0, %g2
200763c: c4 3c e0 10 std %g2, [ %l3 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
2007640: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007644: 80 a2 00 01 cmp %o0, %g1
2007648: 02 bf ff e5 be 20075dc <writev+0xec> <== ALWAYS TAKEN
200764c: 80 a6 80 12 cmp %i2, %l2
break;
}
return total;
}
2007650: 81 c7 e0 08 ret <== NOT EXECUTED
2007654: 81 e8 00 00 restore <== NOT EXECUTED
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
2007658: 40 00 27 36 call 2011330 <__errno>
200765c: b0 10 3f ff mov -1, %i0
2007660: 82 10 20 09 mov 9, %g1
2007664: c2 22 00 00 st %g1, [ %o0 ]
2007668: 81 c7 e0 08 ret
200766c: 81 e8 00 00 restore
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2007670: 40 00 27 30 call 2011330 <__errno> <== NOT EXECUTED
2007674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2007678: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200767c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2007680: 81 c7 e0 08 ret <== NOT EXECUTED
2007684: 81 e8 00 00 restore <== NOT EXECUTED
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
2007688: 81 c7 e0 08 ret <== NOT EXECUTED
200768c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED