RTEMS 4.11Annotated Report
Thu Dec 1 15:47:17 2011
0200b8f8 <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 ) {
200b8f8: 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;
200b8fc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
switch( node->type ) {
200b900: c2 00 60 4c ld [ %g1 + 0x4c ], %g1
200b904: 80 a0 60 07 cmp %g1, 7
200b908: 18 80 00 0a bgu 200b930 <IMFS_Set_handlers+0x38> <== NEVER TAKEN
200b90c: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
200b910: 83 28 60 02 sll %g1, 2, %g1
200b914: 07 00 80 2e sethi %hi(0x200b800), %g3
200b918: 86 10 e0 18 or %g3, 0x18, %g3 ! 200b818 <IMFS_create_root_node+0x90>
200b91c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
200b920: 81 c0 40 00 jmp %g1
200b924: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200b928: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200b92c: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200b930: 81 c3 e0 08 retl
200b934: 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;
200b938: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200b93c: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200b940: 81 c3 e0 08 retl
200b944: 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;
200b948: 03 00 80 75 sethi %hi(0x201d400), %g1
200b94c: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <IMFS_link_handlers>
200b950: c2 22 20 08 st %g1, [ %o0 + 8 ]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200b954: 81 c3 e0 08 retl
200b958: 90 10 20 00 clr %o0
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200b95c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
200b960: c2 22 20 08 st %g1, [ %o0 + 8 ] <== NOT EXECUTED
break;
}
return 0;
}
200b964: 81 c3 e0 08 retl <== NOT EXECUTED
200b968: 90 10 20 00 clr %o0 <== NOT EXECUTED
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200b96c: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED
200b970: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <IMFS_device_handlers><== NOT EXECUTED
200b974: c2 22 20 08 st %g1, [ %o0 + 8 ] <== NOT EXECUTED
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
200b978: 81 c3 e0 08 retl <== NOT EXECUTED
200b97c: 90 10 20 00 clr %o0 <== NOT EXECUTED
0200b71c <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
200b71c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
200b720: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
200b724: 7f ff dd d0 call 2002e64 <calloc> <== NOT EXECUTED
200b728: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED
if ( !node )
200b72c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
200b730: 02 80 00 14 be 200b780 <IMFS_allocate_node+0x64> <== NOT EXECUTED
200b734: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
200b738: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
200b73c: c2 37 60 34 sth %g1, [ %i5 + 0x34 ] <== NOT EXECUTED
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
200b740: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
200b744: f0 27 60 4c st %i0, [ %i5 + 0x4c ] <== NOT EXECUTED
strncpy( node->name, name, IMFS_NAME_MAX );
200b748: 40 00 1d 6b call 2012cf4 <strncpy> <== NOT EXECUTED
200b74c: 90 07 60 0c add %i5, 0xc, %o0 <== NOT EXECUTED
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
200b750: 40 00 06 0f call 200cf8c <geteuid> <== NOT EXECUTED
200b754: f4 27 60 30 st %i2, [ %i5 + 0x30 ] <== NOT EXECUTED
node->st_gid = getegid();
200b758: 40 00 06 09 call 200cf7c <getegid> <== NOT EXECUTED
200b75c: d0 37 60 3c sth %o0, [ %i5 + 0x3c ] <== NOT EXECUTED
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200b760: 92 10 20 00 clr %o1 <== NOT EXECUTED
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
200b764: d0 37 60 3e sth %o0, [ %i5 + 0x3e ] <== NOT EXECUTED
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200b768: 7f ff df 0c call 2003398 <gettimeofday> <== NOT EXECUTED
200b76c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
node->stat_atime = (time_t) tv.tv_sec;
200b770: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
200b774: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
node->stat_mtime = (time_t) tv.tv_sec;
200b778: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED
node->stat_ctime = (time_t) tv.tv_sec;
200b77c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] <== NOT EXECUTED
return node;
}
200b780: 81 c7 e0 08 ret <== NOT EXECUTED
200b784: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
0200ca90 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
200ca90: 9d e3 bf a0 save %sp, -96, %sp
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
200ca94: 40 00 01 c7 call 200d1b0 <rtems_libio_is_file_open>
200ca98: 90 10 00 18 mov %i0, %o0
200ca9c: 80 a2 20 00 cmp %o0, 0
200caa0: 12 80 00 14 bne 200caf0 <IMFS_check_node_remove+0x60>
200caa4: 01 00 00 00 nop
200caa8: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1
200caac: 80 a0 60 00 cmp %g1, 0
200cab0: 12 80 00 10 bne 200caf0 <IMFS_check_node_remove+0x60>
200cab4: 01 00 00 00 nop
if ( rtems_filesystem_current.node_access == jnode )
200cab8: 03 00 80 7a sethi %hi(0x201e800), %g1
200cabc: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201e970 <rtems_current_user_env>
200cac0: c4 00 60 04 ld [ %g1 + 4 ], %g2
200cac4: 80 a0 80 18 cmp %g2, %i0
200cac8: 22 80 00 02 be,a 200cad0 <IMFS_check_node_remove+0x40>
200cacc: c0 20 60 04 clr [ %g1 + 4 ]
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
200cad0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
200cad4: 80 a0 60 04 cmp %g1, 4
200cad8: 02 80 00 0c be 200cb08 <IMFS_check_node_remove+0x78> <== NEVER TAKEN
200cadc: 80 a0 60 05 cmp %g1, 5
200cae0: 02 80 00 06 be 200caf8 <IMFS_check_node_remove+0x68> <== NEVER TAKEN
200cae4: 01 00 00 00 nop
break;
default:
break;
}
free( jnode );
200cae8: 7f ff da 02 call 20032f0 <free>
200caec: 81 e8 00 00 restore
200caf0: 81 c7 e0 08 ret
200caf4: 81 e8 00 00 restore
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
200caf8: 40 00 0b 94 call 200f948 <IMFS_memfile_remove> <== NOT EXECUTED
200cafc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
break;
default:
break;
}
free( jnode );
200cb00: 7f ff d9 fc call 20032f0 <free> <== NOT EXECUTED
200cb04: 81 e8 00 00 restore <== NOT EXECUTED
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
200cb08: 7f ff d9 fa call 20032f0 <free> <== NOT EXECUTED
200cb0c: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 <== NOT EXECUTED
break;
default:
break;
}
free( jnode );
200cb10: 7f ff d9 f8 call 20032f0 <free> <== NOT EXECUTED
200cb14: 81 e8 00 00 restore <== NOT EXECUTED
0200b5a4 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
200b5a4: 9d e3 bf 98 save %sp, -104, %sp
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
200b5a8: 80 a6 20 00 cmp %i0, 0
200b5ac: 02 80 00 3e be 200b6a4 <IMFS_create_node+0x100> <== NEVER TAKEN
200b5b0: ba 10 20 00 clr %i5
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
200b5b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
200b5b8: e0 06 00 00 ld [ %i0 ], %l0
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
200b5bc: 80 a6 60 07 cmp %i1, 7
200b5c0: 02 80 00 3b be 200b6ac <IMFS_create_node+0x108>
200b5c4: f0 00 60 34 ld [ %g1 + 0x34 ], %i0
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
200b5c8: 03 00 80 7a sethi %hi(0x201e800), %g1
200b5cc: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201e970 <rtems_current_user_env>
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
200b5d0: 90 10 20 01 mov 1, %o0
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
200b5d4: e2 00 60 2c ld [ %g1 + 0x2c ], %l1
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
200b5d8: 7f ff de 23 call 2002e64 <calloc>
200b5dc: 92 10 20 68 mov 0x68, %o1
if ( !node )
200b5e0: ba 92 20 00 orcc %o0, 0, %i5
200b5e4: 02 80 00 30 be 200b6a4 <IMFS_create_node+0x100>
200b5e8: 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 );
200b5ec: 92 10 00 1a mov %i2, %o1
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
200b5f0: c2 37 60 34 sth %g1, [ %i5 + 0x34 ]
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
200b5f4: 94 10 20 20 mov 0x20, %o2
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
200b5f8: f2 27 60 4c st %i1, [ %i5 + 0x4c ]
strncpy( node->name, name, IMFS_NAME_MAX );
200b5fc: 40 00 1d be call 2012cf4 <strncpy>
200b600: 90 07 60 0c add %i5, 0xc, %o0
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
200b604: b6 2e c0 11 andn %i3, %l1, %i3
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
200b608: 40 00 06 61 call 200cf8c <geteuid>
200b60c: f6 27 60 30 st %i3, [ %i5 + 0x30 ]
node->st_gid = getegid();
200b610: 40 00 06 5b call 200cf7c <getegid>
200b614: d0 37 60 3c sth %o0, [ %i5 + 0x3c ]
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200b618: 92 10 20 00 clr %o1
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
200b61c: d0 37 60 3e sth %o0, [ %i5 + 0x3e ]
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200b620: 7f ff df 5e call 2003398 <gettimeofday>
200b624: 90 07 bf f8 add %fp, -8, %o0
node->stat_atime = (time_t) tv.tv_sec;
200b628: c2 07 bf f8 ld [ %fp + -8 ], %g1
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
200b62c: 80 a6 60 01 cmp %i1, 1
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
200b630: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
node->stat_mtime = (time_t) tv.tv_sec;
200b634: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
200b638: 02 80 00 24 be 200b6c8 <IMFS_create_node+0x124>
200b63c: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
200b640: 80 a6 60 03 cmp %i1, 3
200b644: 02 80 00 0e be 200b67c <IMFS_create_node+0xd8>
200b648: 80 a6 60 04 cmp %i1, 4
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
200b64c: 02 80 00 0c be 200b67c <IMFS_create_node+0xd8>
200b650: 80 a6 60 02 cmp %i1, 2
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
200b654: 02 80 00 27 be 200b6f0 <IMFS_create_node+0x14c>
200b658: 80 a6 60 06 cmp %i1, 6
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
200b65c: 02 80 00 21 be 200b6e0 <IMFS_create_node+0x13c>
200b660: 80 a6 60 05 cmp %i1, 5
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
200b664: 02 80 00 28 be 200b704 <IMFS_create_node+0x160>
200b668: 80 a6 60 07 cmp %i1, 7
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
200b66c: 22 80 00 06 be,a 200b684 <IMFS_create_node+0xe0> <== ALWAYS TAKEN
200b670: c0 27 60 50 clr [ %i5 + 0x50 ]
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
200b674: 10 80 00 05 b 200b688 <IMFS_create_node+0xe4> <== NOT EXECUTED
200b678: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
200b67c: c2 07 00 00 ld [ %i4 ], %g1
200b680: c2 27 60 50 st %g1, [ %i5 + 0x50 ]
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
200b684: c2 06 20 04 ld [ %i0 + 4 ], %g1
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
200b688: e0 27 60 08 st %l0, [ %i5 + 8 ]
node->st_ino = ++fs_info->ino_count;
200b68c: 82 00 60 01 inc %g1
200b690: c2 26 20 04 st %g1, [ %i0 + 4 ]
200b694: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
200b698: 90 04 20 50 add %l0, 0x50, %o0
200b69c: 7f ff f1 b8 call 2007d7c <_Chain_Append>
200b6a0: 92 10 00 1d mov %i5, %o1
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
200b6a4: 81 c7 e0 08 ret
200b6a8: 91 e8 00 1d restore %g0, %i5, %o0
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
200b6ac: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
200b6b0: 03 00 80 75 sethi %hi(0x201d400), %g1
200b6b4: 82 10 61 40 or %g1, 0x140, %g1 ! 201d540 <rtems_filesystem_handlers_default>
200b6b8: 80 a0 80 01 cmp %g2, %g1
200b6bc: 12 bf ff c4 bne 200b5cc <IMFS_create_node+0x28>
200b6c0: 03 00 80 7a sethi %hi(0x201e800), %g1
200b6c4: 30 bf ff f8 b,a 200b6a4 <IMFS_create_node+0x100>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200b6c8: 82 07 60 50 add %i5, 0x50, %g1
200b6cc: 84 07 60 54 add %i5, 0x54, %g2
head->next = tail;
head->previous = NULL;
200b6d0: c0 27 60 54 clr [ %i5 + 0x54 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200b6d4: c4 27 60 50 st %g2, [ %i5 + 0x50 ]
head->previous = NULL;
tail->previous = head;
200b6d8: 10 bf ff eb b 200b684 <IMFS_create_node+0xe0>
200b6dc: c2 27 60 58 st %g1, [ %i5 + 0x58 ]
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
200b6e0: c0 27 60 50 clr [ %i5 + 0x50 ]
200b6e4: c0 27 60 54 clr [ %i5 + 0x54 ]
node->info.linearfile.direct = 0;
200b6e8: 10 bf ff e7 b 200b684 <IMFS_create_node+0xe0>
200b6ec: c0 27 60 58 clr [ %i5 + 0x58 ]
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
200b6f0: c4 07 00 00 ld [ %i4 ], %g2
node->info.device.minor = info->device.minor;
200b6f4: c2 07 20 04 ld [ %i4 + 4 ], %g1
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
200b6f8: c4 27 60 50 st %g2, [ %i5 + 0x50 ]
node->info.device.minor = info->device.minor;
200b6fc: 10 bf ff e2 b 200b684 <IMFS_create_node+0xe0>
200b700: c2 27 60 54 st %g1, [ %i5 + 0x54 ]
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
200b704: c0 27 60 50 clr [ %i5 + 0x50 ]
200b708: c0 27 60 54 clr [ %i5 + 0x54 ]
node->info.file.indirect = 0;
200b70c: c0 27 60 58 clr [ %i5 + 0x58 ]
node->info.file.doubly_indirect = 0;
200b710: c0 27 60 5c clr [ %i5 + 0x5c ]
node->info.file.triply_indirect = 0;
200b714: 10 bf ff dc b 200b684 <IMFS_create_node+0xe0>
200b718: c0 27 60 60 clr [ %i5 + 0x60 ]
0200561c <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
200561c: 9d e3 bf 58 save %sp, -168, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2005620: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
2005624: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2005628: b0 06 20 54 add %i0, 0x54, %i0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200562c: c2 27 bf ec st %g1, [ %fp + -20 ]
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005630: 80 a0 40 18 cmp %g1, %i0
2005634: 02 80 00 2f be 20056f0 <IMFS_dump_directory+0xd4> <== NEVER TAKEN
2005638: f0 27 bf cc st %i0, [ %fp + -52 ]
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 );
200563c: c2 07 a0 48 ld [ %fp + 0x48 ], %g1
2005640: c4 07 a0 48 ld [ %fp + 0x48 ], %g2
2005644: 82 00 60 01 inc %g1
2005648: c2 27 bf dc st %g1, [ %fp + -36 ]
200564c: c2 07 a0 48 ld [ %fp + 0x48 ], %g1
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2005650: 3b 00 80 93 sethi %hi(0x2024c00), %i5
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2005654: 84 00 a0 02 add %g2, 2, %g2
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2005658: ba 17 62 80 or %i5, 0x280, %i5
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
200565c: c4 27 bf e4 st %g2, [ %fp + -28 ]
2005660: ac 00 60 03 add %g1, 3, %l6
2005664: a6 00 60 04 add %g1, 4, %l3
2005668: a2 00 60 05 add %g1, 5, %l1
200566c: b0 00 60 06 add %g1, 6, %i0
2005670: b2 00 60 07 add %g1, 7, %i1
!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++ )
2005674: c4 07 a0 48 ld [ %fp + 0x48 ], %g2
2005678: 80 a0 a0 00 cmp %g2, 0
200567c: 06 80 00 10 bl 20056bc <IMFS_dump_directory+0xa0> <== NEVER TAKEN
2005680: 01 00 00 00 nop
2005684: f4 07 a0 48 ld [ %fp + 0x48 ], %i2
2005688: 37 00 80 9b sethi %hi(0x2026c00), %i3
200568c: b8 10 20 00 clr %i4
2005690: b6 16 e1 e8 or %i3, 0x1e8, %i3
fprintf(stdout, "...." );
2005694: c2 06 c0 00 ld [ %i3 ], %g1
2005698: 90 10 00 1d mov %i5, %o0
200569c: d6 00 60 08 ld [ %g1 + 8 ], %o3
20056a0: 92 10 20 01 mov 1, %o1
20056a4: 40 00 47 84 call 20174b4 <fwrite>
20056a8: 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++ )
20056ac: b8 07 20 01 inc %i4
20056b0: 80 a6 80 1c cmp %i2, %i4
20056b4: 36 bf ff f9 bge,a 2005698 <IMFS_dump_directory+0x7c> <== NEVER TAKEN
20056b8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
20056bc: 7f ff ff 92 call 2005504 <IMFS_print_jnode>
20056c0: d0 07 bf ec ld [ %fp + -20 ], %o0
if ( the_jnode->type == IMFS_DIRECTORY )
20056c4: c4 07 bf ec ld [ %fp + -20 ], %g2
20056c8: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1
20056cc: 80 a0 60 01 cmp %g1, 1
20056d0: 22 80 00 0a be,a 20056f8 <IMFS_dump_directory+0xdc>
20056d4: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20056d8: c2 07 bf ec ld [ %fp + -20 ], %g1
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20056dc: c4 07 bf cc ld [ %fp + -52 ], %g2
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20056e0: c2 00 40 00 ld [ %g1 ], %g1
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20056e4: 80 a0 40 02 cmp %g1, %g2
20056e8: 12 bf ff e3 bne 2005674 <IMFS_dump_directory+0x58>
20056ec: c2 27 bf ec st %g1, [ %fp + -20 ]
20056f0: 81 c7 e0 08 ret
20056f4: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
20056f8: 84 00 a0 54 add %g2, 0x54, %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
20056fc: c2 27 bf f4 st %g1, [ %fp + -12 ]
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 );
2005700: c2 07 a0 48 ld [ %fp + 0x48 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2005704: c4 27 bf d0 st %g2, [ %fp + -48 ]
2005708: b6 00 60 08 add %g1, 8, %i3
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
200570c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005710: 80 a0 40 02 cmp %g1, %g2
2005714: 02 bf ff f2 be 20056dc <IMFS_dump_directory+0xc0> <== NEVER TAKEN
2005718: c2 07 bf ec ld [ %fp + -20 ], %g1
!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++ )
200571c: c4 07 bf dc ld [ %fp + -36 ], %g2
2005720: 80 a0 a0 00 cmp %g2, 0
2005724: 06 80 00 10 bl 2005764 <IMFS_dump_directory+0x148> <== NEVER TAKEN
2005728: 01 00 00 00 nop
200572c: e0 07 bf dc ld [ %fp + -36 ], %l0
2005730: 35 00 80 9b sethi %hi(0x2026c00), %i2
2005734: b8 10 20 00 clr %i4
2005738: b4 16 a1 e8 or %i2, 0x1e8, %i2
fprintf(stdout, "...." );
200573c: c2 06 80 00 ld [ %i2 ], %g1
2005740: 90 10 00 1d mov %i5, %o0
2005744: d6 00 60 08 ld [ %g1 + 8 ], %o3
2005748: 92 10 20 01 mov 1, %o1
200574c: 40 00 47 5a call 20174b4 <fwrite>
2005750: 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++ )
2005754: b8 07 20 01 inc %i4
2005758: 80 a4 00 1c cmp %l0, %i4
200575c: 36 bf ff f9 bge,a 2005740 <IMFS_dump_directory+0x124>
2005760: c2 06 80 00 ld [ %i2 ], %g1
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2005764: 7f ff ff 68 call 2005504 <IMFS_print_jnode>
2005768: d0 07 bf f4 ld [ %fp + -12 ], %o0
if ( the_jnode->type == IMFS_DIRECTORY )
200576c: c4 07 bf f4 ld [ %fp + -12 ], %g2
2005770: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1
2005774: 80 a0 60 01 cmp %g1, 1
2005778: 22 80 00 0a be,a 20057a0 <IMFS_dump_directory+0x184>
200577c: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005780: c4 07 bf f4 ld [ %fp + -12 ], %g2
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005784: c2 07 bf d0 ld [ %fp + -48 ], %g1
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005788: c4 00 80 00 ld [ %g2 ], %g2
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
200578c: 80 a0 80 01 cmp %g2, %g1
2005790: 12 bf ff e3 bne 200571c <IMFS_dump_directory+0x100>
2005794: c4 27 bf f4 st %g2, [ %fp + -12 ]
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005798: 10 bf ff d1 b 20056dc <IMFS_dump_directory+0xc0>
200579c: c2 07 bf ec ld [ %fp + -20 ], %g1
20057a0: 84 00 a0 54 add %g2, 0x54, %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
20057a4: c2 27 bf f8 st %g1, [ %fp + -8 ]
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 );
20057a8: c2 07 a0 48 ld [ %fp + 0x48 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
20057ac: c4 27 bf d8 st %g2, [ %fp + -40 ]
20057b0: 82 00 60 09 add %g1, 9, %g1
20057b4: c2 27 bf d4 st %g1, [ %fp + -44 ]
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20057b8: c2 07 bf f8 ld [ %fp + -8 ], %g1
20057bc: 80 a0 40 02 cmp %g1, %g2
20057c0: 02 bf ff f1 be 2005784 <IMFS_dump_directory+0x168>
20057c4: c4 07 bf f4 ld [ %fp + -12 ], %g2
!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++ )
20057c8: c2 07 bf e4 ld [ %fp + -28 ], %g1
20057cc: 80 a0 60 00 cmp %g1, 0
20057d0: 06 80 00 10 bl 2005810 <IMFS_dump_directory+0x1f4> <== NEVER TAKEN
20057d4: 01 00 00 00 nop
20057d8: e0 07 bf e4 ld [ %fp + -28 ], %l0
20057dc: 35 00 80 9b sethi %hi(0x2026c00), %i2
20057e0: b8 10 20 00 clr %i4
20057e4: b4 16 a1 e8 or %i2, 0x1e8, %i2
fprintf(stdout, "...." );
20057e8: c2 06 80 00 ld [ %i2 ], %g1
20057ec: 90 10 00 1d mov %i5, %o0
20057f0: d6 00 60 08 ld [ %g1 + 8 ], %o3
20057f4: 92 10 20 01 mov 1, %o1
20057f8: 40 00 47 2f call 20174b4 <fwrite>
20057fc: 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++ )
2005800: b8 07 20 01 inc %i4
2005804: 80 a4 00 1c cmp %l0, %i4
2005808: 36 bf ff f9 bge,a 20057ec <IMFS_dump_directory+0x1d0>
200580c: c2 06 80 00 ld [ %i2 ], %g1
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2005810: 7f ff ff 3d call 2005504 <IMFS_print_jnode>
2005814: d0 07 bf f8 ld [ %fp + -8 ], %o0
if ( the_jnode->type == IMFS_DIRECTORY )
2005818: c4 07 bf f8 ld [ %fp + -8 ], %g2
200581c: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1
2005820: 80 a0 60 01 cmp %g1, 1
2005824: 22 80 00 0a be,a 200584c <IMFS_dump_directory+0x230> <== NEVER TAKEN
2005828: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
200582c: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005830: c4 07 bf d8 ld [ %fp + -40 ], %g2
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005834: c2 00 40 00 ld [ %g1 ], %g1
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005838: 80 a0 40 02 cmp %g1, %g2
200583c: 12 bf ff e3 bne 20057c8 <IMFS_dump_directory+0x1ac> <== NEVER TAKEN
2005840: c2 27 bf f8 st %g1, [ %fp + -8 ]
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005844: 10 bf ff d0 b 2005784 <IMFS_dump_directory+0x168>
2005848: c4 07 bf f4 ld [ %fp + -12 ], %g2
200584c: 84 00 a0 54 add %g2, 0x54, %g2 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2005850: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2005854: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005858: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
200585c: 02 bf ff f4 be 200582c <IMFS_dump_directory+0x210> <== NOT EXECUTED
2005860: 29 00 80 9b sethi %hi(0x2026c00), %l4 <== NOT EXECUTED
!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++ )
2005864: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED
2005868: 06 80 00 0e bl 20058a0 <IMFS_dump_directory+0x284> <== NOT EXECUTED
200586c: 01 00 00 00 nop <== NOT EXECUTED
2005870: b8 10 20 00 clr %i4 ! 0 <PROM_START> <== NOT EXECUTED
2005874: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED
fprintf(stdout, "...." );
2005878: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
200587c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005880: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2005884: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005888: 40 00 47 0b call 20174b4 <fwrite> <== NOT EXECUTED
200588c: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED
!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++ )
2005890: b8 07 20 01 inc %i4 <== NOT EXECUTED
2005894: 80 a5 80 1c cmp %l6, %i4 <== NOT EXECUTED
2005898: 36 bf ff f9 bge,a 200587c <IMFS_dump_directory+0x260> <== NOT EXECUTED
200589c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
20058a0: 7f ff ff 19 call 2005504 <IMFS_print_jnode> <== NOT EXECUTED
20058a4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
if ( the_jnode->type == IMFS_DIRECTORY )
20058a8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
20058ac: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 <== NOT EXECUTED
20058b0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
20058b4: 22 80 00 0a be,a 20058dc <IMFS_dump_directory+0x2c0> <== NOT EXECUTED
20058b8: ee 00 a0 50 ld [ %g2 + 0x50 ], %l7 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20058bc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20058c0: c4 07 bf e0 ld [ %fp + -32 ], %g2 <== NOT EXECUTED
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20058c4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20058c8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20058cc: 12 bf ff e6 bne 2005864 <IMFS_dump_directory+0x248> <== NOT EXECUTED
20058d0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20058d4: 10 bf ff d7 b 2005830 <IMFS_dump_directory+0x214> <== NOT EXECUTED
20058d8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
20058dc: 82 00 a0 54 add %g2, 0x54, %g1 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20058e0: 80 a5 c0 01 cmp %l7, %g1 <== NOT EXECUTED
20058e4: 02 bf ff f6 be 20058bc <IMFS_dump_directory+0x2a0> <== NOT EXECUTED
20058e8: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED
20058ec: ec 27 bf bc st %l6, [ %fp + -68 ] <== NOT EXECUTED
!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++ )
20058f0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
20058f4: 06 80 00 0e bl 200592c <IMFS_dump_directory+0x310> <== NOT EXECUTED
20058f8: 01 00 00 00 nop <== NOT EXECUTED
20058fc: b8 10 20 00 clr %i4 ! 0 <PROM_START> <== NOT EXECUTED
2005900: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED
fprintf(stdout, "...." );
2005904: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2005908: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200590c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2005910: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005914: 40 00 46 e8 call 20174b4 <fwrite> <== NOT EXECUTED
2005918: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED
!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++ )
200591c: b8 07 20 01 inc %i4 <== NOT EXECUTED
2005920: 80 a4 c0 1c cmp %l3, %i4 <== NOT EXECUTED
2005924: 36 bf ff f9 bge,a 2005908 <IMFS_dump_directory+0x2ec> <== NOT EXECUTED
2005928: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
200592c: 7f ff fe f6 call 2005504 <IMFS_print_jnode> <== NOT EXECUTED
2005930: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
if ( the_jnode->type == IMFS_DIRECTORY )
2005934: c2 05 e0 4c ld [ %l7 + 0x4c ], %g1 <== NOT EXECUTED
2005938: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
200593c: 22 80 00 09 be,a 2005960 <IMFS_dump_directory+0x344> <== NOT EXECUTED
2005940: ec 05 e0 50 ld [ %l7 + 0x50 ], %l6 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005944: ee 05 c0 00 ld [ %l7 ], %l7 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005948: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED
200594c: 80 a5 c0 02 cmp %l7, %g2 <== NOT EXECUTED
2005950: 12 bf ff e9 bne 20058f4 <IMFS_dump_directory+0x2d8> <== NOT EXECUTED
2005954: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2005958: 10 bf ff d9 b 20058bc <IMFS_dump_directory+0x2a0> <== NOT EXECUTED
200595c: ec 07 bf bc ld [ %fp + -68 ], %l6 <== NOT EXECUTED
2005960: 84 05 e0 54 add %l7, 0x54, %g2 <== NOT EXECUTED
2005964: 80 a5 80 02 cmp %l6, %g2 <== NOT EXECUTED
2005968: 02 bf ff f7 be 2005944 <IMFS_dump_directory+0x328> <== NOT EXECUTED
200596c: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED
2005970: ee 27 bf c4 st %l7, [ %fp + -60 ] <== NOT EXECUTED
2005974: e6 27 bf c0 st %l3, [ %fp + -64 ] <== NOT EXECUTED
!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++ )
2005978: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
200597c: 06 80 00 0e bl 20059b4 <IMFS_dump_directory+0x398> <== NOT EXECUTED
2005980: 01 00 00 00 nop <== NOT EXECUTED
2005984: b8 10 20 00 clr %i4 ! 0 <PROM_START> <== NOT EXECUTED
2005988: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED
fprintf(stdout, "...." );
200598c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2005990: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005994: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2005998: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200599c: 40 00 46 c6 call 20174b4 <fwrite> <== NOT EXECUTED
20059a0: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED
!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++ )
20059a4: b8 07 20 01 inc %i4 <== NOT EXECUTED
20059a8: 80 a4 40 1c cmp %l1, %i4 <== NOT EXECUTED
20059ac: 36 bf ff f9 bge,a 2005990 <IMFS_dump_directory+0x374> <== NOT EXECUTED
20059b0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
20059b4: 7f ff fe d4 call 2005504 <IMFS_print_jnode> <== NOT EXECUTED
20059b8: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
if ( the_jnode->type == IMFS_DIRECTORY )
20059bc: c2 05 a0 4c ld [ %l6 + 0x4c ], %g1 <== NOT EXECUTED
20059c0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
20059c4: 22 80 00 0a be,a 20059ec <IMFS_dump_directory+0x3d0> <== NOT EXECUTED
20059c8: e6 05 a0 50 ld [ %l6 + 0x50 ], %l3 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
20059cc: ec 05 80 00 ld [ %l6 ], %l6 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
20059d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
20059d4: 80 a5 80 01 cmp %l6, %g1 <== NOT EXECUTED
20059d8: 12 bf ff e9 bne 200597c <IMFS_dump_directory+0x360> <== NOT EXECUTED
20059dc: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
20059e0: ee 07 bf c4 ld [ %fp + -60 ], %l7 <== NOT EXECUTED
20059e4: 10 bf ff d8 b 2005944 <IMFS_dump_directory+0x328> <== NOT EXECUTED
20059e8: e6 07 bf c0 ld [ %fp + -64 ], %l3 <== NOT EXECUTED
20059ec: 82 05 a0 54 add %l6, 0x54, %g1 <== NOT EXECUTED
20059f0: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
20059f4: 22 bf ff f7 be,a 20059d0 <IMFS_dump_directory+0x3b4> <== NOT EXECUTED
20059f8: ec 05 80 00 ld [ %l6 ], %l6 <== NOT EXECUTED
20059fc: e2 27 bf c8 st %l1, [ %fp + -56 ] <== NOT EXECUTED
2005a00: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED
!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++ )
2005a04: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2005a08: 06 80 00 0e bl 2005a40 <IMFS_dump_directory+0x424> <== NOT EXECUTED
2005a0c: 01 00 00 00 nop <== NOT EXECUTED
2005a10: b8 10 20 00 clr %i4 ! 0 <PROM_START> <== NOT EXECUTED
2005a14: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED
fprintf(stdout, "...." );
2005a18: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2005a1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005a20: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2005a24: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005a28: 40 00 46 a3 call 20174b4 <fwrite> <== NOT EXECUTED
2005a2c: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED
!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++ )
2005a30: b8 07 20 01 inc %i4 <== NOT EXECUTED
2005a34: 80 a6 00 1c cmp %i0, %i4 <== NOT EXECUTED
2005a38: 36 bf ff f9 bge,a 2005a1c <IMFS_dump_directory+0x400> <== NOT EXECUTED
2005a3c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2005a40: 7f ff fe b1 call 2005504 <IMFS_print_jnode> <== NOT EXECUTED
2005a44: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
if ( the_jnode->type == IMFS_DIRECTORY )
2005a48: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED
2005a4c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2005a50: 22 80 00 08 be,a 2005a70 <IMFS_dump_directory+0x454> <== NOT EXECUTED
2005a54: e4 04 e0 50 ld [ %l3 + 0x50 ], %l2 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005a58: e6 04 c0 00 ld [ %l3 ], %l3 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005a5c: 80 a4 c0 11 cmp %l3, %l1 <== NOT EXECUTED
2005a60: 12 bf ff ea bne 2005a08 <IMFS_dump_directory+0x3ec> <== NOT EXECUTED
2005a64: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2005a68: 10 bf ff d9 b 20059cc <IMFS_dump_directory+0x3b0> <== NOT EXECUTED
2005a6c: e2 07 bf c8 ld [ %fp + -56 ], %l1 <== NOT EXECUTED
2005a70: ae 04 e0 54 add %l3, 0x54, %l7 <== NOT EXECUTED
2005a74: 80 a4 80 17 cmp %l2, %l7 <== NOT EXECUTED
2005a78: 22 bf ff f9 be,a 2005a5c <IMFS_dump_directory+0x440> <== NOT EXECUTED
2005a7c: e6 04 c0 00 ld [ %l3 ], %l3 <== NOT EXECUTED
!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++ )
2005a80: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2005a84: 06 80 00 0e bl 2005abc <IMFS_dump_directory+0x4a0> <== NOT EXECUTED
2005a88: 01 00 00 00 nop <== NOT EXECUTED
2005a8c: b8 10 20 00 clr %i4 ! 0 <PROM_START> <== NOT EXECUTED
2005a90: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED
fprintf(stdout, "...." );
2005a94: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2005a98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005a9c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2005aa0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005aa4: 40 00 46 84 call 20174b4 <fwrite> <== NOT EXECUTED
2005aa8: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED
!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++ )
2005aac: b8 07 20 01 inc %i4 <== NOT EXECUTED
2005ab0: 80 a6 40 1c cmp %i1, %i4 <== NOT EXECUTED
2005ab4: 36 bf ff f9 bge,a 2005a98 <IMFS_dump_directory+0x47c> <== NOT EXECUTED
2005ab8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2005abc: 7f ff fe 92 call 2005504 <IMFS_print_jnode> <== NOT EXECUTED
2005ac0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
if ( the_jnode->type == IMFS_DIRECTORY )
2005ac4: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED
2005ac8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2005acc: 22 80 00 08 be,a 2005aec <IMFS_dump_directory+0x4d0> <== NOT EXECUTED
2005ad0: e0 04 a0 50 ld [ %l2 + 0x50 ], %l0 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005ad4: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005ad8: 80 a4 80 17 cmp %l2, %l7 <== NOT EXECUTED
2005adc: 12 bf ff ea bne 2005a84 <IMFS_dump_directory+0x468> <== NOT EXECUTED
2005ae0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005ae4: 10 bf ff de b 2005a5c <IMFS_dump_directory+0x440> <== NOT EXECUTED
2005ae8: e6 04 c0 00 ld [ %l3 ], %l3 <== NOT EXECUTED
2005aec: aa 04 a0 54 add %l2, 0x54, %l5 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005af0: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED
2005af4: 22 bf ff f9 be,a 2005ad8 <IMFS_dump_directory+0x4bc> <== NOT EXECUTED
2005af8: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED
!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++ )
2005afc: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2005b00: 06 80 00 0e bl 2005b38 <IMFS_dump_directory+0x51c> <== NOT EXECUTED
2005b04: 01 00 00 00 nop <== NOT EXECUTED
2005b08: b8 10 20 00 clr %i4 ! 0 <PROM_START> <== NOT EXECUTED
2005b0c: b4 15 21 e8 or %l4, 0x1e8, %i2 <== NOT EXECUTED
fprintf(stdout, "...." );
2005b10: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2005b14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005b18: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2005b1c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005b20: 40 00 46 65 call 20174b4 <fwrite> <== NOT EXECUTED
2005b24: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED
!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++ )
2005b28: b8 07 20 01 inc %i4 <== NOT EXECUTED
2005b2c: 80 a6 c0 1c cmp %i3, %i4 <== NOT EXECUTED
2005b30: 36 bf ff f9 bge,a 2005b14 <IMFS_dump_directory+0x4f8> <== NOT EXECUTED
2005b34: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2005b38: 7f ff fe 73 call 2005504 <IMFS_print_jnode> <== NOT EXECUTED
2005b3c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( the_jnode->type == IMFS_DIRECTORY )
2005b40: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED
2005b44: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2005b48: 02 80 00 08 be 2005b68 <IMFS_dump_directory+0x54c> <== NOT EXECUTED
2005b4c: d2 07 bf d4 ld [ %fp + -44 ], %o1 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005b50: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
2005b54: 80 a4 00 15 cmp %l0, %l5 <== NOT EXECUTED
2005b58: 12 bf ff ea bne 2005b00 <IMFS_dump_directory+0x4e4> <== NOT EXECUTED
2005b5c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005b60: 10 bf ff de b 2005ad8 <IMFS_dump_directory+0x4bc> <== NOT EXECUTED
2005b64: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED
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 );
2005b68: 7f ff fe ad call 200561c <IMFS_dump_directory> <== NOT EXECUTED
2005b6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2005b70: 10 bf ff f9 b 2005b54 <IMFS_dump_directory+0x538> <== NOT EXECUTED
2005b74: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
0200bb54 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200bb54: 9d e3 bf 78 save %sp, -136, %sp
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
200bb58: 80 8e bf f8 btst -8, %i2
200bb5c: 12 80 00 ff bne 200bf58 <IMFS_eval_path+0x404> <== NEVER TAKEN
200bb60: ba 10 00 18 mov %i0, %i5
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200bb64: f0 06 c0 00 ld [ %i3 ], %i0
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
200bb68: b8 10 20 00 clr %i4
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200bb6c: 21 00 80 7a sethi %hi(0x201e800), %l0
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
200bb70: 90 07 40 1c add %i5, %i4, %o0
200bb74: 92 10 00 19 mov %i1, %o1
200bb78: 94 07 bf d8 add %fp, -40, %o2
200bb7c: 40 00 03 7a call 200c964 <IMFS_get_token>
200bb80: 96 07 bf fc add %fp, -4, %o3
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
200bb84: e2 06 c0 00 ld [ %i3 ], %l1
* 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 );
200bb88: a4 10 00 08 mov %o0, %l2
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
200bb8c: 90 94 60 00 orcc %l1, 0, %o0
200bb90: 02 80 00 ca be 200beb8 <IMFS_eval_path+0x364> <== NEVER TAKEN
200bb94: c2 07 bf fc ld [ %fp + -4 ], %g1
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
200bb98: b2 26 40 01 sub %i1, %g1, %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 )
200bb9c: 80 a4 a0 00 cmp %l2, 0
200bba0: 12 80 00 0f bne 200bbdc <IMFS_eval_path+0x88>
200bba4: b8 07 00 01 add %i4, %g1, %i4
* 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 ) {
200bba8: c2 04 60 4c ld [ %l1 + 0x4c ], %g1
200bbac: 80 a0 60 01 cmp %g1, 1
200bbb0: 02 80 00 ca be 200bed8 <IMFS_eval_path+0x384>
200bbb4: 80 a0 60 07 cmp %g1, 7
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200bbb8: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
switch( node->type ) {
200bbbc: 18 80 00 a9 bgu 200be60 <IMFS_eval_path+0x30c> <== NEVER TAKEN
200bbc0: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
200bbc4: 83 28 60 02 sll %g1, 2, %g1
200bbc8: 07 00 80 2e sethi %hi(0x200b800), %g3
200bbcc: 86 10 e0 78 or %g3, 0x78, %g3 ! 200b878 <IMFS_create_root_node+0xf0>
200bbd0: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
200bbd4: 81 c0 40 00 jmp %g1
200bbd8: 01 00 00 00 nop
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
200bbdc: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
200bbe0: 80 a0 60 01 cmp %g1, 1
200bbe4: 02 80 00 5f be 200bd60 <IMFS_eval_path+0x20c>
200bbe8: 01 00 00 00 nop
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200bbec: 80 a4 a0 03 cmp %l2, 3
200bbf0: 02 80 00 0a be 200bc18 <IMFS_eval_path+0xc4>
200bbf4: 80 a4 a0 04 cmp %l2, 4
200bbf8: 02 80 00 2f be 200bcb4 <IMFS_eval_path+0x160>
200bbfc: 80 a4 a0 02 cmp %l2, 2
200bc00: 02 80 00 1a be 200bc68 <IMFS_eval_path+0x114>
200bc04: 80 a4 a0 04 cmp %l2, 4
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
200bc08: 22 bf ff e9 be,a 200bbac <IMFS_eval_path+0x58> <== NEVER TAKEN
200bc0c: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED
200bc10: 10 bf ff d8 b 200bb70 <IMFS_eval_path+0x1c>
200bc14: b0 10 00 11 mov %l1, %i0
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
200bc18: c2 04 60 4c ld [ %l1 + 0x4c ], %g1
200bc1c: 80 a0 60 03 cmp %g1, 3
200bc20: 02 80 00 6d be 200bdd4 <IMFS_eval_path+0x280>
200bc24: 80 a0 60 04 cmp %g1, 4
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
200bc28: 22 80 00 84 be,a 200be38 <IMFS_eval_path+0x2e4>
200bc2c: 90 10 00 1b mov %i3, %o0
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200bc30: 80 a0 60 01 cmp %g1, 1
200bc34: 12 80 00 cf bne 200bf70 <IMFS_eval_path+0x41c>
200bc38: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
200bc3c: 40 00 03 27 call 200c8d8 <IMFS_find_match_in_dir>
200bc40: 92 07 bf d8 add %fp, -40, %o1
if ( !node )
200bc44: b0 92 20 00 orcc %o0, 0, %i0
200bc48: 02 80 00 9c be 200beb8 <IMFS_eval_path+0x364>
200bc4c: 01 00 00 00 nop
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200bc50: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
200bc54: 80 a0 60 01 cmp %g1, 1
200bc58: 22 80 00 1d be,a 200bccc <IMFS_eval_path+0x178>
200bc5c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
break;
200bc60: 10 bf ff c4 b 200bb70 <IMFS_eval_path+0x1c>
200bc64: f0 26 c0 00 st %i0, [ %i3 ]
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200bc68: c2 04 21 70 ld [ %l0 + 0x170 ], %g1
200bc6c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
200bc70: 80 a0 40 11 cmp %g1, %l1
200bc74: 02 bf ff bf be 200bb70 <IMFS_eval_path+0x1c>
200bc78: b0 10 00 11 mov %l1, %i0
static inline bool rtems_filesystem_is_root_location(
const rtems_filesystem_location_info_t *loc
)
{
return loc->mt_entry->mt_fs_root.node_access == loc->node_access;
200bc7c: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
200bc80: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
200bc84: 80 a0 40 11 cmp %g1, %l1
200bc88: 22 80 00 59 be,a 200bdec <IMFS_eval_path+0x298>
200bc8c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
200bc90: f0 04 60 08 ld [ %l1 + 8 ], %i0
200bc94: 80 a6 20 00 cmp %i0, 0
200bc98: 32 bf ff b6 bne,a 200bb70 <IMFS_eval_path+0x1c>
200bc9c: f0 26 c0 00 st %i0, [ %i3 ]
rtems_set_errno_and_return_minus_one( ENOENT );
200bca0: 40 00 16 4c call 20115d0 <__errno>
200bca4: b0 10 3f ff mov -1, %i0
200bca8: e4 22 00 00 st %l2, [ %o0 ]
200bcac: 81 c7 e0 08 ret
200bcb0: 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 );
200bcb4: 40 00 16 47 call 20115d0 <__errno>
200bcb8: b0 10 3f ff mov -1, %i0
200bcbc: 82 10 20 5b mov 0x5b, %g1
200bcc0: c2 22 00 00 st %g1, [ %o0 ]
200bcc4: 81 c7 e0 08 ret
200bcc8: 81 e8 00 00 restore
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200bccc: 80 a0 60 00 cmp %g1, 0
200bcd0: 22 bf ff a8 be,a 200bb70 <IMFS_eval_path+0x1c>
200bcd4: f0 26 c0 00 st %i0, [ %i3 ]
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
200bcd8: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0
200bcdc: 7f ff e2 47 call 20045f8 <rtems_filesystem_is_separator>
200bce0: a2 07 40 1c add %i5, %i4, %l1
200bce4: 80 a2 20 00 cmp %o0, 0
200bce8: 22 80 00 11 be,a 200bd2c <IMFS_eval_path+0x1d8> <== NEVER TAKEN
200bcec: c2 0c 40 00 ldub [ %l1 ], %g1 <== NOT EXECUTED
200bcf0: c2 0f 40 1c ldub [ %i5 + %i4 ], %g1
200bcf4: 83 28 60 18 sll %g1, 0x18, %g1
200bcf8: 80 a0 60 00 cmp %g1, 0
200bcfc: 02 80 00 b3 be 200bfc8 <IMFS_eval_path+0x474>
200bd00: 80 a6 60 00 cmp %i1, 0
200bd04: 02 80 00 0c be 200bd34 <IMFS_eval_path+0x1e0> <== NEVER TAKEN
200bd08: 83 38 60 18 sra %g1, 0x18, %g1
++(*index);
200bd0c: b8 07 20 01 inc %i4
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
200bd10: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0
200bd14: 7f ff e2 39 call 20045f8 <rtems_filesystem_is_separator>
200bd18: b2 06 7f ff add %i1, -1, %i1
200bd1c: 80 a2 20 00 cmp %o0, 0
200bd20: 12 bf ff f4 bne 200bcf0 <IMFS_eval_path+0x19c>
200bd24: a2 07 40 1c add %i5, %i4, %l1
200bd28: c2 0c 40 00 ldub [ %l1 ], %g1
200bd2c: 83 28 60 18 sll %g1, 0x18, %g1
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
200bd30: 83 38 60 18 sra %g1, 0x18, %g1
200bd34: 80 a0 60 2e cmp %g1, 0x2e
200bd38: 32 80 00 a5 bne,a 200bfcc <IMFS_eval_path+0x478>
200bd3c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
200bd40: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1
200bd44: 80 a0 60 2e cmp %g1, 0x2e
200bd48: 12 80 00 a0 bne 200bfc8 <IMFS_eval_path+0x474>
200bd4c: b8 07 20 02 add %i4, 2, %i4
pathnamelen,
flags, pathloc );
}
i += 2;
pathnamelen -= 2;
node = node->Parent;
200bd50: f0 06 20 08 ld [ %i0 + 8 ], %i0
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
pathnamelen -= 2;
200bd54: b2 06 7f fe add %i1, -2, %i1
}
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
200bd58: 10 bf ff 86 b 200bb70 <IMFS_eval_path+0x1c>
200bd5c: f0 26 c0 00 st %i0, [ %i3 ]
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200bd60: 40 00 04 8b call 200cf8c <geteuid>
200bd64: 01 00 00 00 nop
st_gid = getegid();
200bd68: 40 00 04 85 call 200cf7c <getegid>
200bd6c: b0 10 00 08 mov %o0, %i0
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200bd70: c4 14 60 3c lduh [ %l1 + 0x3c ], %g2
200bd74: b1 2e 20 10 sll %i0, 0x10, %i0
200bd78: b1 36 20 10 srl %i0, 0x10, %i0
200bd7c: 80 a6 00 02 cmp %i0, %g2
200bd80: 02 80 00 0a be 200bda8 <IMFS_eval_path+0x254>
200bd84: 82 10 20 40 mov 0x40, %g1
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200bd88: c4 14 60 3e lduh [ %l1 + 0x3e ], %g2
200bd8c: 83 2a 20 10 sll %o0, 0x10, %g1
200bd90: 83 30 60 10 srl %g1, 0x10, %g1
200bd94: 82 18 40 02 xor %g1, %g2, %g1
200bd98: 80 a0 00 01 cmp %g0, %g1
200bd9c: 82 40 3f ff addx %g0, -1, %g1
200bda0: 82 08 60 07 and %g1, 7, %g1
200bda4: 82 00 60 01 inc %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200bda8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2
200bdac: 84 08 40 02 and %g1, %g2, %g2
200bdb0: 80 a0 80 01 cmp %g2, %g1
200bdb4: 22 80 00 47 be,a 200bed0 <IMFS_eval_path+0x37c>
200bdb8: e2 06 c0 00 ld [ %i3 ], %l1
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
200bdbc: 40 00 16 05 call 20115d0 <__errno>
200bdc0: b0 10 3f ff mov -1, %i0
200bdc4: 82 10 20 0d mov 0xd, %g1
200bdc8: c2 22 00 00 st %g1, [ %o0 ]
200bdcc: 81 c7 e0 08 ret
200bdd0: 81 e8 00 00 restore
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
200bdd4: 90 10 00 1b mov %i3, %o0
200bdd8: 7f ff ff 15 call 200ba2c <IMFS_evaluate_hard_link>
200bddc: 92 10 20 00 clr %o1
node = pathloc->node_access;
200bde0: d0 06 c0 00 ld [ %i3 ], %o0
200bde4: 10 bf ff 93 b 200bc30 <IMFS_eval_path+0xdc>
200bde8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200bdec: d2 07 bf fc ld [ %fp + -4 ], %o1
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200bdf0: c2 26 c0 00 st %g1, [ %i3 ]
200bdf4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200bdf8: b8 27 00 09 sub %i4, %o1, %i4
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200bdfc: c2 26 e0 04 st %g1, [ %i3 + 4 ]
200be00: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200be04: 90 07 40 1c add %i5, %i4, %o0
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200be08: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200be0c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200be10: 92 06 40 09 add %i1, %o1, %o1
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200be14: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
200be18: c2 00 40 00 ld [ %g1 ], %g1
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200be1c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200be20: 94 10 00 1a mov %i2, %o2
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200be24: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200be28: 9f c0 40 00 call %g1
200be2c: 96 10 00 1b mov %i3, %o3
200be30: 81 c7 e0 08 ret
200be34: 91 e8 00 08 restore %g0, %o0, %o0
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
200be38: 40 00 00 77 call 200c014 <IMFS_evaluate_sym_link>
200be3c: 92 10 20 00 clr %o1
200be40: b0 10 00 08 mov %o0, %i0
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
200be44: 80 a6 3f ff cmp %i0, -1
200be48: 02 bf ff 99 be 200bcac <IMFS_eval_path+0x158> <== NEVER TAKEN
200be4c: d0 06 c0 00 ld [ %i3 ], %o0
200be50: 10 bf ff 78 b 200bc30 <IMFS_eval_path+0xdc>
200be54: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200be58: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200be5c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200be60: 40 00 04 4b call 200cf8c <geteuid>
200be64: 01 00 00 00 nop
st_gid = getegid();
200be68: 40 00 04 45 call 200cf7c <getegid>
200be6c: ba 10 00 08 mov %o0, %i5
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200be70: c2 14 60 3c lduh [ %l1 + 0x3c ], %g1
200be74: 85 2f 60 10 sll %i5, 0x10, %g2
200be78: 85 30 a0 10 srl %g2, 0x10, %g2
200be7c: 80 a0 80 01 cmp %g2, %g1
200be80: 02 80 00 42 be 200bf88 <IMFS_eval_path+0x434>
200be84: 85 2a 20 10 sll %o0, 0x10, %g2
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200be88: c2 14 60 3e lduh [ %l1 + 0x3e ], %g1
200be8c: 85 30 a0 10 srl %g2, 0x10, %g2
200be90: 80 a0 80 01 cmp %g2, %g1
200be94: 22 80 00 02 be,a 200be9c <IMFS_eval_path+0x348>
200be98: b5 2e a0 03 sll %i2, 3, %i2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200be9c: c2 04 60 30 ld [ %l1 + 0x30 ], %g1
200bea0: 82 0e 80 01 and %i2, %g1, %g1
200bea4: 80 a6 80 01 cmp %i2, %g1
200bea8: 12 bf ff c5 bne 200bdbc <IMFS_eval_path+0x268>
200beac: 01 00 00 00 nop
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200beb0: 81 c7 e0 08 ret
200beb4: 91 e8 20 00 restore %g0, 0, %o0
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
200beb8: 40 00 15 c6 call 20115d0 <__errno>
200bebc: b0 10 3f ff mov -1, %i0
200bec0: 82 10 20 02 mov 2, %g1
200bec4: c2 22 00 00 st %g1, [ %o0 ]
200bec8: 81 c7 e0 08 ret
200becc: 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 )
200bed0: 10 bf ff 47 b 200bbec <IMFS_eval_path+0x98>
200bed4: 90 10 00 11 mov %l1, %o0
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
200bed8: c4 04 60 5c ld [ %l1 + 0x5c ], %g2
200bedc: 80 a0 a0 00 cmp %g2, 0
200bee0: 02 80 00 2c be 200bf90 <IMFS_eval_path+0x43c> <== ALWAYS TAKEN
200bee4: d2 07 bf fc ld [ %fp + -4 ], %o1
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bee8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
200beec: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
200bef0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200bef4: b8 27 00 09 sub %i4, %o1, %i4 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bef8: c2 26 e0 04 st %g1, [ %i3 + 4 ] <== NOT EXECUTED
200befc: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200bf00: 90 07 40 1c add %i5, %i4, %o0 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bf04: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
200bf08: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200bf0c: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bf10: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
200bf14: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bf18: 10 bf ff c2 b 200be20 <IMFS_eval_path+0x2cc> <== NOT EXECUTED
200bf1c: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2 <== NOT EXECUTED
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200bf20: 03 00 80 75 sethi %hi(0x201d400), %g1
200bf24: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <IMFS_link_handlers>
200bf28: 10 bf ff ce b 200be60 <IMFS_eval_path+0x30c>
200bf2c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200bf30: 03 00 80 75 sethi %hi(0x201d400), %g1
200bf34: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <IMFS_device_handlers>
200bf38: 10 bf ff ca b 200be60 <IMFS_eval_path+0x30c>
200bf3c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200bf40: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200bf44: 10 bf ff c7 b 200be60 <IMFS_eval_path+0x30c>
200bf48: c2 26 e0 08 st %g1, [ %i3 + 8 ]
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200bf4c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED
200bf50: 10 bf ff c4 b 200be60 <IMFS_eval_path+0x30c> <== NOT EXECUTED
200bf54: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
200bf58: 40 00 15 9e call 20115d0 <__errno> <== NOT EXECUTED
200bf5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200bf60: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
200bf64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200bf68: 81 c7 e0 08 ret <== NOT EXECUTED
200bf6c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200bf70: 40 00 15 98 call 20115d0 <__errno>
200bf74: b0 10 3f ff mov -1, %i0
200bf78: 82 10 20 14 mov 0x14, %g1
200bf7c: c2 22 00 00 st %g1, [ %o0 ]
200bf80: 81 c7 e0 08 ret
200bf84: 81 e8 00 00 restore
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
200bf88: 10 bf ff c5 b 200be9c <IMFS_eval_path+0x348>
200bf8c: b5 2e a0 06 sll %i2, 6, %i2
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200bf90: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
switch( node->type ) {
200bf94: 05 00 80 2e sethi %hi(0x200b800), %g2
200bf98: c4 00 a0 5c ld [ %g2 + 0x5c ], %g2 ! 200b85c <IMFS_create_root_node+0xd4>
200bf9c: 81 c0 80 00 jmp %g2
200bfa0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200bfa4: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
200bfa8: 10 bf ff ae b 200be60 <IMFS_eval_path+0x30c> <== NOT EXECUTED
200bfac: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200bfb0: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200bfb4: 10 bf ff ab b 200be60 <IMFS_eval_path+0x30c>
200bfb8: c2 26 e0 08 st %g1, [ %i3 + 8 ]
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200bfbc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200bfc0: 10 bf ff a8 b 200be60 <IMFS_eval_path+0x30c> <== NOT EXECUTED
200bfc4: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bfc8: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
return (*pathloc->ops->evalpath_h)( &pathname[i],
200bfcc: 90 10 00 11 mov %l1, %o0
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bfd0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
return (*pathloc->ops->evalpath_h)( &pathname[i],
200bfd4: 92 10 00 19 mov %i1, %o1
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bfd8: c2 26 c0 00 st %g1, [ %i3 ]
200bfdc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
return (*pathloc->ops->evalpath_h)( &pathname[i],
200bfe0: 94 10 00 1a mov %i2, %o2
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bfe4: c2 26 e0 04 st %g1, [ %i3 + 4 ]
200bfe8: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
return (*pathloc->ops->evalpath_h)( &pathname[i],
200bfec: 96 10 00 1b mov %i3, %o3
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200bff0: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200bff4: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1
200bff8: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)( &pathname[i],
200bffc: c2 00 40 00 ld [ %g1 ], %g1
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200c000: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2
return (*pathloc->ops->evalpath_h)( &pathname[i],
200c004: 9f c0 40 00 call %g1
200c008: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
200c00c: 81 c7 e0 08 ret
200c010: 91 e8 00 08 restore %g0, %o0, %o0
0200c338 <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 */
)
{
200c338: 9d e3 bf 78 save %sp, -136, %sp
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
200c33c: 90 10 00 18 mov %i0, %o0
200c340: 40 00 1a 3c call 2012c30 <strlen>
200c344: ba 10 00 18 mov %i0, %i5
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
200c348: f0 06 40 00 ld [ %i1 ], %i0
/*
* Get the path length.
*/
pathlen = strlen( path );
200c34c: b6 10 00 08 mov %o0, %i3
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
200c350: b8 10 20 00 clr %i4
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200c354: 21 00 80 7a sethi %hi(0x201e800), %l0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
200c358: 90 07 40 1c add %i5, %i4, %o0
200c35c: 92 10 00 1b mov %i3, %o1
200c360: 94 07 bf d8 add %fp, -40, %o2
200c364: 40 00 01 80 call 200c964 <IMFS_get_token>
200c368: 96 07 bf fc add %fp, -4, %o3
pathlen -= len;
i += len;
if ( !pathloc->node_access )
200c36c: e2 06 40 00 ld [ %i1 ], %l1
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
200c370: a4 10 00 08 mov %o0, %l2
pathlen -= len;
i += len;
if ( !pathloc->node_access )
200c374: 80 a4 60 00 cmp %l1, 0
200c378: 02 80 00 d0 be 200c6b8 <IMFS_evaluate_for_make+0x380> <== NEVER TAKEN
200c37c: e6 07 bf fc ld [ %fp + -4 ], %l3
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
200c380: 80 a2 20 00 cmp %o0, 0
200c384: 32 80 00 08 bne,a 200c3a4 <IMFS_evaluate_for_make+0x6c>
200c388: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200c38c: 40 00 14 91 call 20115d0 <__errno>
200c390: b0 10 3f ff mov -1, %i0
200c394: 82 10 20 11 mov 0x11, %g1
200c398: c2 22 00 00 st %g1, [ %o0 ]
200c39c: 81 c7 e0 08 ret
200c3a0: 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 )
200c3a4: 80 a0 60 01 cmp %g1, 1
200c3a8: 02 80 00 66 be 200c540 <IMFS_evaluate_for_make+0x208>
200c3ac: 01 00 00 00 nop
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
200c3b0: b6 26 c0 13 sub %i3, %l3, %i3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200c3b4: 80 a4 a0 02 cmp %l2, 2
200c3b8: 02 80 00 1a be 200c420 <IMFS_evaluate_for_make+0xe8>
200c3bc: b8 07 00 13 add %i4, %l3, %i4
200c3c0: 80 a4 a0 02 cmp %l2, 2
200c3c4: 08 80 00 09 bleu 200c3e8 <IMFS_evaluate_for_make+0xb0>
200c3c8: 80 a4 a0 00 cmp %l2, 0
200c3cc: 80 a4 a0 03 cmp %l2, 3
200c3d0: 02 80 00 24 be 200c460 <IMFS_evaluate_for_make+0x128>
200c3d4: 80 a4 a0 04 cmp %l2, 4
200c3d8: 02 80 00 0c be 200c408 <IMFS_evaluate_for_make+0xd0> <== ALWAYS TAKEN
200c3dc: 01 00 00 00 nop
200c3e0: 10 bf ff de b 200c358 <IMFS_evaluate_for_make+0x20> <== NOT EXECUTED
200c3e4: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED
200c3e8: 32 bf ff dc bne,a 200c358 <IMFS_evaluate_for_make+0x20> <== ALWAYS TAKEN
200c3ec: b0 10 00 11 mov %l1, %i0
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200c3f0: 40 00 14 78 call 20115d0 <__errno> <== NOT EXECUTED
200c3f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200c3f8: 82 10 20 11 mov 0x11, %g1 <== NOT EXECUTED
200c3fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200c400: 81 c7 e0 08 ret <== NOT EXECUTED
200c404: 81 e8 00 00 restore <== NOT EXECUTED
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200c408: 40 00 14 72 call 20115d0 <__errno>
200c40c: b0 10 3f ff mov -1, %i0
200c410: 82 10 20 5b mov 0x5b, %g1
200c414: c2 22 00 00 st %g1, [ %o0 ]
200c418: 81 c7 e0 08 ret
200c41c: 81 e8 00 00 restore
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200c420: c2 04 21 70 ld [ %l0 + 0x170 ], %g1
200c424: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
200c428: 80 a4 40 01 cmp %l1, %g1
200c42c: 02 bf ff cb be 200c358 <IMFS_evaluate_for_make+0x20>
200c430: b0 10 00 11 mov %l1, %i0
200c434: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
200c438: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
200c43c: 80 a4 40 01 cmp %l1, %g1
200c440: 22 80 00 a4 be,a 200c6d0 <IMFS_evaluate_for_make+0x398>
200c444: c2 00 a0 08 ld [ %g2 + 8 ], %g1
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
200c448: f0 04 60 08 ld [ %l1 + 8 ], %i0
200c44c: 80 a6 20 00 cmp %i0, 0
200c450: 02 80 00 b2 be 200c718 <IMFS_evaluate_for_make+0x3e0>
200c454: 01 00 00 00 nop
}
i += 2;
pathlen -= 2;
node = node->Parent;
}
pathloc->node_access = node;
200c458: 10 bf ff c0 b 200c358 <IMFS_evaluate_for_make+0x20>
200c45c: f0 26 40 00 st %i0, [ %i1 ]
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
200c460: c2 04 60 4c ld [ %l1 + 0x4c ], %g1
200c464: 80 a0 60 03 cmp %g1, 3
200c468: 02 80 00 53 be 200c5b4 <IMFS_evaluate_for_make+0x27c>
200c46c: 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 ) {
200c470: 02 80 00 52 be 200c5b8 <IMFS_evaluate_for_make+0x280>
200c474: 90 10 00 19 mov %i1, %o0
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
200c478: 80 a4 60 00 cmp %l1, 0
200c47c: 02 80 00 ae be 200c734 <IMFS_evaluate_for_make+0x3fc> <== NEVER TAKEN
200c480: 01 00 00 00 nop
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200c484: c2 04 60 4c ld [ %l1 + 0x4c ], %g1
200c488: 80 a0 60 01 cmp %g1, 1
200c48c: 12 80 00 aa bne 200c734 <IMFS_evaluate_for_make+0x3fc>
200c490: 90 10 00 11 mov %l1, %o0
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
200c494: 40 00 01 11 call 200c8d8 <IMFS_find_match_in_dir>
200c498: 92 07 bf d8 add %fp, -40, %o1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
200c49c: b0 92 20 00 orcc %o0, 0, %i0
200c4a0: 02 80 00 72 be 200c668 <IMFS_evaluate_for_make+0x330>
200c4a4: c2 07 bf fc ld [ %fp + -4 ], %g1
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
200c4a8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
200c4ac: 80 a0 60 01 cmp %g1, 1
200c4b0: 32 bf ff aa bne,a 200c358 <IMFS_evaluate_for_make+0x20>
200c4b4: f0 26 40 00 st %i0, [ %i1 ]
200c4b8: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
200c4bc: 80 a0 60 00 cmp %g1, 0
200c4c0: 32 80 00 0d bne,a 200c4f4 <IMFS_evaluate_for_make+0x1bc>
200c4c4: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0
200c4c8: 10 bf ff a4 b 200c358 <IMFS_evaluate_for_make+0x20>
200c4cc: f0 26 40 00 st %i0, [ %i1 ]
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
200c4d0: 83 28 60 18 sll %g1, 0x18, %g1
200c4d4: 80 a0 60 00 cmp %g1, 0
200c4d8: 02 80 00 b1 be 200c79c <IMFS_evaluate_for_make+0x464> <== NEVER TAKEN
200c4dc: 80 a6 e0 00 cmp %i3, 0
200c4e0: 02 80 00 0d be 200c514 <IMFS_evaluate_for_make+0x1dc> <== NEVER TAKEN
200c4e4: 83 38 60 18 sra %g1, 0x18, %g1
++(*index);
200c4e8: b8 07 20 01 inc %i4
--(*len);
200c4ec: b6 06 ff ff add %i3, -1, %i3
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
200c4f0: d0 4f 40 1c ldsb [ %i5 + %i4 ], %o0
200c4f4: 7f ff e0 41 call 20045f8 <rtems_filesystem_is_separator>
200c4f8: a2 07 40 1c add %i5, %i4, %l1
200c4fc: 80 a2 20 00 cmp %o0, 0
200c500: 32 bf ff f4 bne,a 200c4d0 <IMFS_evaluate_for_make+0x198>
200c504: c2 0f 40 1c ldub [ %i5 + %i4 ], %g1
200c508: c2 0c 40 00 ldub [ %l1 ], %g1
200c50c: 83 28 60 18 sll %g1, 0x18, %g1
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
200c510: 83 38 60 18 sra %g1, 0x18, %g1
200c514: 80 a0 60 2e cmp %g1, 0x2e
200c518: 32 80 00 a2 bne,a 200c7a0 <IMFS_evaluate_for_make+0x468>
200c51c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
200c520: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1
200c524: 80 a0 60 2e cmp %g1, 0x2e
200c528: 12 80 00 9d bne 200c79c <IMFS_evaluate_for_make+0x464> <== NEVER TAKEN
200c52c: b8 07 20 02 add %i4, 2, %i4
pathloc,
name );
}
i += 2;
pathlen -= 2;
node = node->Parent;
200c530: f0 06 20 08 ld [ %i0 + 8 ], %i0
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
pathlen -= 2;
200c534: b6 06 ff fe add %i3, -2, %i3
node = node->Parent;
}
pathloc->node_access = node;
200c538: 10 bf ff 88 b 200c358 <IMFS_evaluate_for_make+0x20>
200c53c: f0 26 40 00 st %i0, [ %i1 ]
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200c540: 40 00 02 93 call 200cf8c <geteuid>
200c544: 01 00 00 00 nop
st_gid = getegid();
200c548: 40 00 02 8d call 200cf7c <getegid>
200c54c: b0 10 00 08 mov %o0, %i0
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200c550: c4 14 60 3c lduh [ %l1 + 0x3c ], %g2
200c554: b1 2e 20 10 sll %i0, 0x10, %i0
200c558: b1 36 20 10 srl %i0, 0x10, %i0
200c55c: 80 a6 00 02 cmp %i0, %g2
200c560: 02 80 00 0a be 200c588 <IMFS_evaluate_for_make+0x250>
200c564: 82 10 20 40 mov 0x40, %g1
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200c568: c4 14 60 3e lduh [ %l1 + 0x3e ], %g2
200c56c: 83 2a 20 10 sll %o0, 0x10, %g1
200c570: 83 30 60 10 srl %g1, 0x10, %g1
200c574: 82 18 40 02 xor %g1, %g2, %g1
200c578: 80 a0 00 01 cmp %g0, %g1
200c57c: 82 40 3f ff addx %g0, -1, %g1
200c580: 82 08 60 07 and %g1, 7, %g1
200c584: 82 00 60 01 inc %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200c588: c4 04 60 30 ld [ %l1 + 0x30 ], %g2
200c58c: 84 08 40 02 and %g1, %g2, %g2
200c590: 80 a0 80 01 cmp %g2, %g1
200c594: 22 bf ff 87 be,a 200c3b0 <IMFS_evaluate_for_make+0x78>
200c598: e2 06 40 00 ld [ %i1 ], %l1
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
200c59c: 40 00 14 0d call 20115d0 <__errno>
200c5a0: b0 10 3f ff mov -1, %i0
200c5a4: 82 10 20 0d mov 0xd, %g1
200c5a8: c2 22 00 00 st %g1, [ %o0 ]
200c5ac: 81 c7 e0 08 ret
200c5b0: 81 e8 00 00 restore
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
200c5b4: 90 10 00 19 mov %i1, %o0
200c5b8: 7f ff fe ec call 200c168 <IMFS_evaluate_link>
200c5bc: 92 10 20 00 clr %o1
if ( result == -1 )
200c5c0: 80 a2 3f ff cmp %o0, -1
200c5c4: 02 bf ff 76 be 200c39c <IMFS_evaluate_for_make+0x64> <== NEVER TAKEN
200c5c8: b0 10 00 08 mov %o0, %i0
200c5cc: 10 bf ff ab b 200c478 <IMFS_evaluate_for_make+0x140>
200c5d0: e2 06 40 00 ld [ %i1 ], %l1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200c5d4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
switch( node->type ) {
200c5d8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200c5dc: 80 a0 60 07 cmp %g1, 7
200c5e0: 08 80 00 5b bleu 200c74c <IMFS_evaluate_for_make+0x414> <== ALWAYS TAKEN
200c5e4: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
200c5e8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
200c5ec: 12 80 00 52 bne 200c734 <IMFS_evaluate_for_make+0x3fc> <== NOT EXECUTED
200c5f0: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200c5f4: 40 00 02 66 call 200cf8c <geteuid>
200c5f8: 01 00 00 00 nop
st_gid = getegid();
200c5fc: 40 00 02 60 call 200cf7c <getegid>
200c600: b8 10 00 08 mov %o0, %i4
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200c604: c4 17 60 3c lduh [ %i5 + 0x3c ], %g2
200c608: 87 2f 20 10 sll %i4, 0x10, %g3
200c60c: 87 30 e0 10 srl %g3, 0x10, %g3
200c610: 80 a0 c0 02 cmp %g3, %g2
200c614: 02 80 00 0a be 200c63c <IMFS_evaluate_for_make+0x304>
200c618: 82 10 20 c0 mov 0xc0, %g1
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200c61c: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1
200c620: 85 2a 20 10 sll %o0, 0x10, %g2
200c624: 85 30 a0 10 srl %g2, 0x10, %g2
200c628: 82 18 80 01 xor %g2, %g1, %g1
200c62c: 80 a0 00 01 cmp %g0, %g1
200c630: 82 40 3f ff addx %g0, -1, %g1
200c634: 82 08 60 15 and %g1, 0x15, %g1
200c638: 82 00 60 03 add %g1, 3, %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200c63c: c4 07 60 30 ld [ %i5 + 0x30 ], %g2
200c640: 84 08 40 02 and %g1, %g2, %g2
200c644: 80 a0 80 01 cmp %g2, %g1
200c648: 02 bf ff 55 be 200c39c <IMFS_evaluate_for_make+0x64>
200c64c: b0 10 20 00 clr %i0
/*
* 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 );
200c650: 40 00 13 e0 call 20115d0 <__errno>
200c654: b0 10 3f ff mov -1, %i0
200c658: 82 10 20 0d mov 0xd, %g1
200c65c: c2 22 00 00 st %g1, [ %o0 ]
return result;
}
200c660: 81 c7 e0 08 ret
200c664: 81 e8 00 00 restore
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
200c668: 82 27 00 01 sub %i4, %g1, %g1
200c66c: 82 07 40 01 add %i5, %g1, %g1
200c670: 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++) {
200c674: d0 0f 40 1c ldub [ %i5 + %i4 ], %o0
200c678: 91 2a 20 18 sll %o0, 0x18, %o0
200c67c: 80 a2 20 00 cmp %o0, 0
200c680: 12 80 00 09 bne 200c6a4 <IMFS_evaluate_for_make+0x36c>
200c684: 01 00 00 00 nop
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
IMFS_jnode_t *node = loc->node_access;
200c688: 10 bf ff d3 b 200c5d4 <IMFS_evaluate_for_make+0x29c>
200c68c: fa 06 40 00 ld [ %i1 ], %i5
/*
* 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++) {
200c690: d0 0f 40 1c ldub [ %i5 + %i4 ], %o0
200c694: 91 2a 20 18 sll %o0, 0x18, %o0
200c698: 80 a2 20 00 cmp %o0, 0
200c69c: 22 bf ff ce be,a 200c5d4 <IMFS_evaluate_for_make+0x29c>
200c6a0: fa 06 40 00 ld [ %i1 ], %i5
if ( !IMFS_is_separator( path[ i ] ) )
200c6a4: 7f ff df d5 call 20045f8 <rtems_filesystem_is_separator>
200c6a8: 91 3a 20 18 sra %o0, 0x18, %o0
200c6ac: 80 a2 20 00 cmp %o0, 0
200c6b0: 32 bf ff f8 bne,a 200c690 <IMFS_evaluate_for_make+0x358>
200c6b4: b8 07 20 01 inc %i4
rtems_set_errno_and_return_minus_one( ENOENT );
200c6b8: 40 00 13 c6 call 20115d0 <__errno>
200c6bc: b0 10 3f ff mov -1, %i0
200c6c0: 82 10 20 02 mov 2, %g1
200c6c4: c2 22 00 00 st %g1, [ %o0 ]
200c6c8: 81 c7 e0 08 ret
200c6cc: 81 e8 00 00 restore
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200c6d0: c6 07 bf fc ld [ %fp + -4 ], %g3
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200c6d4: c2 26 40 00 st %g1, [ %i1 ]
200c6d8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200c6dc: b8 27 00 03 sub %i4, %g3, %i4
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200c6e0: c2 26 60 04 st %g1, [ %i1 + 4 ]
200c6e4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200c6e8: 90 07 40 1c add %i5, %i4, %o0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200c6ec: c2 26 60 08 st %g1, [ %i1 + 8 ]
200c6f0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200c6f4: 92 10 00 19 mov %i1, %o1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200c6f8: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200c6fc: c2 00 60 04 ld [ %g1 + 4 ], %g1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
200c700: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200c704: 94 10 00 1a mov %i2, %o2
200c708: 9f c0 40 00 call %g1
200c70c: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
200c710: 81 c7 e0 08 ret
200c714: 91 e8 00 08 restore %g0, %o0, %o0
}
} else {
if ( !node->Parent )
rtems_set_errno_and_return_minus_one( ENOENT );
200c718: 40 00 13 ae call 20115d0 <__errno>
200c71c: b0 10 3f ff mov -1, %i0
200c720: e4 22 00 00 st %l2, [ %o0 ]
200c724: 81 c7 e0 08 ret
200c728: 81 e8 00 00 restore
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200c72c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED
200c730: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200c734: 40 00 13 a7 call 20115d0 <__errno>
200c738: b0 10 3f ff mov -1, %i0
200c73c: 82 10 20 14 mov 0x14, %g1
200c740: c2 22 00 00 st %g1, [ %o0 ]
200c744: 81 c7 e0 08 ret
200c748: 81 e8 00 00 restore
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c74c: 87 28 60 02 sll %g1, 2, %g3
200c750: 09 00 80 2e sethi %hi(0x200b800), %g4
200c754: 88 11 20 d8 or %g4, 0xd8, %g4 ! 200b8d8 <IMFS_create_root_node+0x150>
200c758: c6 01 00 03 ld [ %g4 + %g3 ], %g3
200c75c: 81 c0 c0 00 jmp %g3
200c760: 01 00 00 00 nop
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200c764: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED
200c768: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <IMFS_link_handlers><== NOT EXECUTED
200c76c: 10 bf ff f2 b 200c734 <IMFS_evaluate_for_make+0x3fc> <== NOT EXECUTED
200c770: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200c774: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED
200c778: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <IMFS_device_handlers><== NOT EXECUTED
200c77c: 10 bf ff ee b 200c734 <IMFS_evaluate_for_make+0x3fc> <== NOT EXECUTED
200c780: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200c784: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200c788: 10 bf ff 9b b 200c5f4 <IMFS_evaluate_for_make+0x2bc>
200c78c: c2 26 60 08 st %g1, [ %i1 + 8 ]
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200c790: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
200c794: 10 bf ff e8 b 200c734 <IMFS_evaluate_for_make+0x3fc> <== NOT EXECUTED
200c798: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200c79c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)( &path[i],
200c7a0: 90 10 00 11 mov %l1, %o0
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200c7a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
return (*pathloc->ops->evalformake_h)( &path[i],
200c7a8: 92 10 00 19 mov %i1, %o1
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200c7ac: c2 26 40 00 st %g1, [ %i1 ]
200c7b0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
return (*pathloc->ops->evalformake_h)( &path[i],
200c7b4: 94 10 00 1a mov %i2, %o2
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200c7b8: c2 26 60 04 st %g1, [ %i1 + 4 ]
200c7bc: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
200c7c0: c2 26 60 08 st %g1, [ %i1 + 8 ]
200c7c4: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1
200c7c8: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return (*pathloc->ops->evalformake_h)( &path[i],
200c7cc: c2 00 60 04 ld [ %g1 + 4 ], %g1
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
200c7d0: c4 00 a0 2c ld [ %g2 + 0x2c ], %g2
return (*pathloc->ops->evalformake_h)( &path[i],
200c7d4: 9f c0 40 00 call %g1
200c7d8: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
200c7dc: 81 c7 e0 08 ret
200c7e0: 91 e8 00 08 restore %g0, %o0, %o0
0200ba2c <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200ba2c: 9d e3 bf a0 save %sp, -96, %sp
IMFS_assert( jnode->type == IMFS_HARD_LINK );
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
200ba30: c4 06 00 00 ld [ %i0 ], %g2
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200ba34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
IMFS_assert( jnode->type == IMFS_HARD_LINK );
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
200ba38: fa 00 a0 50 ld [ %g2 + 0x50 ], %i5
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200ba3c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
switch( node->type ) {
200ba40: c4 07 60 4c ld [ %i5 + 0x4c ], %g2
200ba44: 80 a0 a0 07 cmp %g2, 7
200ba48: 18 80 00 0a bgu 200ba70 <IMFS_evaluate_hard_link+0x44> <== NEVER TAKEN
200ba4c: fa 26 00 00 st %i5, [ %i0 ]
200ba50: 85 28 a0 02 sll %g2, 2, %g2
200ba54: 07 00 80 2e sethi %hi(0x200b800), %g3
200ba58: 86 10 e0 38 or %g3, 0x38, %g3 ! 200b838 <IMFS_create_root_node+0xb0>
200ba5c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
200ba60: 81 c0 80 00 jmp %g2
200ba64: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200ba68: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200ba6c: c2 26 20 08 st %g1, [ %i0 + 8 ]
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
200ba70: 80 8e 7f f8 btst -8, %i1
200ba74: 12 80 00 32 bne 200bb3c <IMFS_evaluate_hard_link+0x110> <== NEVER TAKEN
200ba78: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200ba7c: 40 00 05 44 call 200cf8c <geteuid>
200ba80: 01 00 00 00 nop
st_gid = getegid();
200ba84: 40 00 05 3e call 200cf7c <getegid>
200ba88: b8 10 00 08 mov %o0, %i4
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200ba8c: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1
200ba90: b9 2f 20 10 sll %i4, 0x10, %i4
200ba94: b9 37 20 10 srl %i4, 0x10, %i4
200ba98: 80 a7 00 01 cmp %i4, %g1
200ba9c: 02 80 00 15 be 200baf0 <IMFS_evaluate_hard_link+0xc4> <== ALWAYS TAKEN
200baa0: 91 2a 20 10 sll %o0, 0x10, %o0
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200baa4: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 <== NOT EXECUTED
200baa8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED
200baac: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
200bab0: 22 80 00 02 be,a 200bab8 <IMFS_evaluate_hard_link+0x8c> <== NOT EXECUTED
200bab4: b3 2e 60 03 sll %i1, 3, %i1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200bab8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
200babc: 82 0e 40 01 and %i1, %g1, %g1 <== NOT EXECUTED
200bac0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200bac4: 02 80 00 11 be 200bb08 <IMFS_evaluate_hard_link+0xdc> <== NOT EXECUTED
200bac8: 01 00 00 00 nop <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
200bacc: 40 00 16 c1 call 20115d0 <__errno> <== NOT EXECUTED
200bad0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200bad4: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
200bad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200badc: 81 c7 e0 08 ret <== NOT EXECUTED
200bae0: 81 e8 00 00 restore <== NOT EXECUTED
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200bae4: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
200bae8: 10 bf ff e2 b 200ba70 <IMFS_evaluate_hard_link+0x44> <== NOT EXECUTED
200baec: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200baf0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
200baf4: b3 2e 60 06 sll %i1, 6, %i1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200baf8: 82 0e 40 01 and %i1, %g1, %g1
200bafc: 80 a6 40 01 cmp %i1, %g1
200bb00: 12 bf ff f3 bne 200bacc <IMFS_evaluate_hard_link+0xa0> <== NEVER TAKEN
200bb04: 01 00 00 00 nop
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200bb08: 81 c7 e0 08 ret
200bb0c: 91 e8 20 00 restore %g0, 0, %o0
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200bb10: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED
200bb14: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <IMFS_device_handlers><== NOT EXECUTED
200bb18: 10 bf ff d6 b 200ba70 <IMFS_evaluate_hard_link+0x44> <== NOT EXECUTED
200bb1c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200bb20: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED
200bb24: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <IMFS_link_handlers><== NOT EXECUTED
200bb28: 10 bf ff d2 b 200ba70 <IMFS_evaluate_hard_link+0x44> <== NOT EXECUTED
200bb2c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200bb30: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200bb34: 10 bf ff cf b 200ba70 <IMFS_evaluate_hard_link+0x44> <== NOT EXECUTED
200bb38: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200bb3c: 40 00 16 a5 call 20115d0 <__errno> <== NOT EXECUTED
200bb40: b0 10 20 00 clr %i0 <== NOT EXECUTED
200bb44: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200bb48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200bb4c: 81 c7 e0 08 ret <== NOT EXECUTED
200bb50: 81 e8 00 00 restore <== NOT EXECUTED
0200c168 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200c168: 9d e3 bf a0 save %sp, -96, %sp
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200c16c: 3b 00 80 7a sethi %hi(0x201e800), %i5
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c170: 25 00 80 2e sethi %hi(0x200b800), %l2
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200c174: 29 00 80 75 sethi %hi(0x201d400), %l4
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200c178: 27 00 80 75 sethi %hi(0x201d400), %l3
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200c17c: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200c180: b6 10 00 18 mov %i0, %i3
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
200c184: a1 2e 60 06 sll %i1, 6, %l0
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
200c188: a3 2e 60 03 sll %i1, 3, %l1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
200c18c: b4 0e 7f f8 and %i1, -8, %i2
rtems_set_errno_and_return_minus_one( EPERM );
200c190: aa 10 20 01 mov 1, %l5
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c194: a4 14 a0 b8 or %l2, 0xb8, %l2
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200c198: a8 15 22 34 or %l4, 0x234, %l4
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200c19c: 10 80 00 07 b 200c1b8 <IMFS_evaluate_link+0x50>
200c1a0: a6 14 e1 c4 or %l3, 0x1c4, %l3
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
200c1a4: 02 80 00 46 be 200c2bc <IMFS_evaluate_link+0x154>
200c1a8: 84 00 bf fd add %g2, -3, %g2
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
200c1ac: 80 a0 a0 01 cmp %g2, 1
200c1b0: 38 80 00 41 bgu,a 200c2b4 <IMFS_evaluate_link+0x14c> <== ALWAYS TAKEN
200c1b4: c0 30 60 30 clrh [ %g1 + 0x30 ]
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
200c1b8: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
200c1bc: f8 06 c0 00 ld [ %i3 ], %i4
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
200c1c0: 84 00 a0 01 inc %g2
200c1c4: c4 30 60 30 sth %g2, [ %g1 + 0x30 ]
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
200c1c8: 85 28 a0 10 sll %g2, 0x10, %g2
200c1cc: 85 30 a0 10 srl %g2, 0x10, %g2
200c1d0: 80 a0 a0 05 cmp %g2, 5
200c1d4: 18 80 00 53 bgu 200c320 <IMFS_evaluate_link+0x1b8>
200c1d8: 01 00 00 00 nop
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
200c1dc: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
200c1e0: 80 a0 a0 03 cmp %g2, 3
200c1e4: 12 bf ff f0 bne 200c1a4 <IMFS_evaluate_link+0x3c>
200c1e8: 80 a0 a0 04 cmp %g2, 4
IMFS_assert( jnode->type == IMFS_HARD_LINK );
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
200c1ec: c2 07 20 50 ld [ %i4 + 0x50 ], %g1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200c1f0: c6 06 e0 10 ld [ %i3 + 0x10 ], %g3
switch( node->type ) {
200c1f4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
IMFS_assert( jnode->type == IMFS_HARD_LINK );
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
200c1f8: c2 26 c0 00 st %g1, [ %i3 ]
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c1fc: 80 a0 a0 07 cmp %g2, 7
200c200: 08 80 00 37 bleu 200c2dc <IMFS_evaluate_link+0x174> <== ALWAYS TAKEN
200c204: c2 00 e0 34 ld [ %g3 + 0x34 ], %g1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
200c208: 80 a6 a0 00 cmp %i2, 0
200c20c: 12 80 00 20 bne 200c28c <IMFS_evaluate_link+0x124> <== NEVER TAKEN
200c210: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200c214: 40 00 03 5e call 200cf8c <geteuid>
200c218: f0 06 c0 00 ld [ %i3 ], %i0
st_gid = getegid();
200c21c: 40 00 03 58 call 200cf7c <getegid>
200c220: ac 10 00 08 mov %o0, %l6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200c224: c4 16 20 3c lduh [ %i0 + 0x3c ], %g2
200c228: ad 2d a0 10 sll %l6, 0x10, %l6
200c22c: ad 35 a0 10 srl %l6, 0x10, %l6
200c230: 80 a5 80 02 cmp %l6, %g2
200c234: 02 80 00 09 be 200c258 <IMFS_evaluate_link+0xf0>
200c238: 82 10 00 10 mov %l0, %g1
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200c23c: c4 16 20 3e lduh [ %i0 + 0x3e ], %g2
200c240: 91 2a 20 10 sll %o0, 0x10, %o0
200c244: 91 32 20 10 srl %o0, 0x10, %o0
200c248: 80 a2 00 02 cmp %o0, %g2
200c24c: 02 80 00 03 be 200c258 <IMFS_evaluate_link+0xf0>
200c250: 82 10 00 11 mov %l1, %g1
200c254: 82 10 00 19 mov %i1, %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200c258: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
200c25c: 84 08 40 02 and %g1, %g2, %g2
200c260: 80 a0 40 02 cmp %g1, %g2
200c264: 22 80 00 0e be,a 200c29c <IMFS_evaluate_link+0x134>
200c268: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
200c26c: 40 00 14 d9 call 20115d0 <__errno>
200c270: b0 10 3f ff mov -1, %i0
200c274: 82 10 20 0d mov 0xd, %g1
200c278: c2 22 00 00 st %g1, [ %o0 ]
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 ) ) );
200c27c: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
200c280: c0 30 60 30 clrh [ %g1 + 0x30 ]
return result;
}
200c284: 81 c7 e0 08 ret
200c288: 81 e8 00 00 restore
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200c28c: 40 00 14 d1 call 20115d0 <__errno> <== NOT EXECUTED
200c290: 01 00 00 00 nop <== NOT EXECUTED
200c294: ea 22 00 00 st %l5, [ %o0 ] <== NOT EXECUTED
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 ) ) );
200c298: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 <== NOT EXECUTED
200c29c: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
200c2a0: 84 00 bf fd add %g2, -3, %g2
200c2a4: 80 a0 a0 01 cmp %g2, 1
200c2a8: 28 bf ff c5 bleu,a 200c1bc <IMFS_evaluate_link+0x54> <== ALWAYS TAKEN
200c2ac: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
200c2b0: c0 30 60 30 clrh [ %g1 + 0x30 ] <== NOT EXECUTED
return result;
}
200c2b4: 81 c7 e0 08 ret
200c2b8: 91 e8 20 00 restore %g0, 0, %o0
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
200c2bc: 90 10 00 1b mov %i3, %o0
200c2c0: 7f ff ff 55 call 200c014 <IMFS_evaluate_sym_link>
200c2c4: 92 10 00 19 mov %i1, %o1
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
200c2c8: b0 92 20 00 orcc %o0, 0, %i0
200c2cc: 12 bf ff ec bne 200c27c <IMFS_evaluate_link+0x114>
200c2d0: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
200c2d4: 10 bf ff f3 b 200c2a0 <IMFS_evaluate_link+0x138>
200c2d8: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c2dc: 85 28 a0 02 sll %g2, 2, %g2
200c2e0: c4 04 80 02 ld [ %l2 + %g2 ], %g2
200c2e4: 81 c0 80 00 jmp %g2
200c2e8: 01 00 00 00 nop
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200c2ec: c2 00 60 08 ld [ %g1 + 8 ], %g1
200c2f0: 10 bf ff c6 b 200c208 <IMFS_evaluate_link+0xa0>
200c2f4: c2 26 e0 08 st %g1, [ %i3 + 8 ]
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200c2f8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200c2fc: 10 bf ff c3 b 200c208 <IMFS_evaluate_link+0xa0> <== NOT EXECUTED
200c300: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200c304: 10 bf ff c1 b 200c208 <IMFS_evaluate_link+0xa0> <== NOT EXECUTED
200c308: e8 26 e0 08 st %l4, [ %i3 + 8 ] <== NOT EXECUTED
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200c30c: 10 bf ff bf b 200c208 <IMFS_evaluate_link+0xa0> <== NOT EXECUTED
200c310: e6 26 e0 08 st %l3, [ %i3 + 8 ] <== NOT EXECUTED
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200c314: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200c318: 10 bf ff bc b 200c208 <IMFS_evaluate_link+0xa0>
200c31c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
200c320: 40 00 14 ac call 20115d0 <__errno>
200c324: c0 30 60 30 clrh [ %g1 + 0x30 ]
200c328: 82 10 20 5c mov 0x5c, %g1
200c32c: c2 22 00 00 st %g1, [ %o0 ]
200c330: 81 c7 e0 08 ret
200c334: 91 e8 3f ff restore %g0, -1, %o0
0200b980 <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
200b980: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
200b984: 80 8e 7f f8 btst -8, %i1 <== NOT EXECUTED
200b988: 12 80 00 23 bne 200ba14 <IMFS_evaluate_permission+0x94> <== NOT EXECUTED
200b98c: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200b990: 40 00 05 7f call 200cf8c <geteuid> <== NOT EXECUTED
200b994: fa 06 00 00 ld [ %i0 ], %i5 <== NOT EXECUTED
st_gid = getegid();
200b998: 40 00 05 79 call 200cf7c <getegid> <== NOT EXECUTED
200b99c: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200b9a0: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
200b9a4: b9 2f 20 10 sll %i4, 0x10, %i4 <== NOT EXECUTED
200b9a8: b9 37 20 10 srl %i4, 0x10, %i4 <== NOT EXECUTED
200b9ac: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
200b9b0: 02 80 00 0c be 200b9e0 <IMFS_evaluate_permission+0x60> <== NOT EXECUTED
200b9b4: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200b9b8: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 <== NOT EXECUTED
200b9bc: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED
200b9c0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
200b9c4: 02 80 00 0e be 200b9fc <IMFS_evaluate_permission+0x7c> <== NOT EXECUTED
200b9c8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
200b9cc: b2 2e 40 01 andn %i1, %g1, %i1 <== NOT EXECUTED
200b9d0: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
200b9d4: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED
return 0;
}
200b9d8: 81 c7 e0 08 ret <== NOT EXECUTED
200b9dc: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200b9e0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
200b9e4: b3 2e 60 06 sll %i1, 6, %i1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
200b9e8: b2 2e 40 01 andn %i1, %g1, %i1 <== NOT EXECUTED
200b9ec: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
200b9f0: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED
return 0;
}
200b9f4: 81 c7 e0 08 ret <== NOT EXECUTED
200b9f8: 81 e8 00 00 restore <== NOT EXECUTED
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
200b9fc: b3 2e 60 03 sll %i1, 3, %i1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
200ba00: b2 2e 40 01 andn %i1, %g1, %i1 <== NOT EXECUTED
200ba04: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
200ba08: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED
return 0;
}
200ba0c: 81 c7 e0 08 ret <== NOT EXECUTED
200ba10: 81 e8 00 00 restore <== NOT EXECUTED
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200ba14: 40 00 16 ef call 20115d0 <__errno> <== NOT EXECUTED
200ba18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200ba1c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200ba20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200ba24: 81 c7 e0 08 ret <== NOT EXECUTED
200ba28: 81 e8 00 00 restore <== NOT EXECUTED
0200c014 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
200c014: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = node->node_access;
200c018: f8 06 00 00 ld [ %i0 ], %i4
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
200c01c: 94 10 00 18 mov %i0, %o2
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
200c020: c2 07 20 08 ld [ %i4 + 8 ], %g1
rtems_filesystem_get_sym_start_loc(
200c024: 92 07 bf fc add %fp, -4, %o1
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
200c028: c2 26 00 00 st %g1, [ %i0 ]
rtems_filesystem_get_sym_start_loc(
200c02c: d0 07 20 50 ld [ %i4 + 0x50 ], %o0
200c030: 40 00 05 9f call 200d6ac <rtems_filesystem_get_sym_start_loc>
200c034: ba 10 00 18 mov %i0, %i5
);
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
200c038: c2 07 bf fc ld [ %fp + -4 ], %g1
200c03c: f8 07 20 50 ld [ %i4 + 0x50 ], %i4
200c040: b8 07 00 01 add %i4, %g1, %i4
200c044: 40 00 1a fb call 2012c30 <strlen>
200c048: 90 10 00 1c mov %i4, %o0
200c04c: 96 10 00 18 mov %i0, %o3
200c050: 92 10 00 08 mov %o0, %o1
200c054: 94 10 00 19 mov %i1, %o2
200c058: 7f ff fe bf call 200bb54 <IMFS_eval_path>
200c05c: 90 10 00 1c mov %i4, %o0
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c060: f8 07 40 00 ld [ %i5 ], %i4
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
200c064: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
switch( node->type ) {
200c068: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
);
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
200c06c: b0 10 00 08 mov %o0, %i0
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
200c070: 80 a0 60 07 cmp %g1, 7
200c074: 18 80 00 0a bgu 200c09c <IMFS_evaluate_sym_link+0x88> <== NEVER TAKEN
200c078: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
200c07c: 83 28 60 02 sll %g1, 2, %g1
200c080: 07 00 80 2e sethi %hi(0x200b800), %g3
200c084: 86 10 e0 98 or %g3, 0x98, %g3 ! 200b898 <IMFS_create_root_node+0x110>
200c088: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
200c08c: 81 c0 40 00 jmp %g1
200c090: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
200c094: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200c098: c2 27 60 08 st %g1, [ %i5 + 8 ]
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
200c09c: 80 8e 7f f8 btst -8, %i1
200c0a0: 12 80 00 2c bne 200c150 <IMFS_evaluate_sym_link+0x13c> <== NEVER TAKEN
200c0a4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
200c0a8: 40 00 03 b9 call 200cf8c <geteuid>
200c0ac: 01 00 00 00 nop
st_gid = getegid();
200c0b0: 40 00 03 b3 call 200cf7c <getegid>
200c0b4: ba 10 00 08 mov %o0, %i5
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
200c0b8: c2 17 20 3c lduh [ %i4 + 0x3c ], %g1
200c0bc: bb 2f 60 10 sll %i5, 0x10, %i5
200c0c0: bb 37 60 10 srl %i5, 0x10, %i5
200c0c4: 80 a7 40 01 cmp %i5, %g1
200c0c8: 02 80 00 15 be 200c11c <IMFS_evaluate_sym_link+0x108>
200c0cc: 91 2a 20 10 sll %o0, 0x10, %o0
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
200c0d0: c2 17 20 3e lduh [ %i4 + 0x3e ], %g1
200c0d4: 91 32 20 10 srl %o0, 0x10, %o0
200c0d8: 80 a2 00 01 cmp %o0, %g1
200c0dc: 22 80 00 02 be,a 200c0e4 <IMFS_evaluate_sym_link+0xd0> <== ALWAYS TAKEN
200c0e0: b3 2e 60 03 sll %i1, 3, %i1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
200c0e4: c2 07 20 30 ld [ %i4 + 0x30 ], %g1
200c0e8: 82 0e 40 01 and %i1, %g1, %g1
200c0ec: 80 a6 40 01 cmp %i1, %g1
200c0f0: 02 80 00 1c be 200c160 <IMFS_evaluate_sym_link+0x14c>
200c0f4: 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 );
200c0f8: 40 00 15 36 call 20115d0 <__errno>
200c0fc: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200c100: 82 10 20 0d mov 0xd, %g1
200c104: c2 22 00 00 st %g1, [ %o0 ]
200c108: 81 c7 e0 08 ret
200c10c: 81 e8 00 00 restore
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
200c110: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200c114: 10 bf ff e2 b 200c09c <IMFS_evaluate_sym_link+0x88>
200c118: c2 27 60 08 st %g1, [ %i5 + 8 ]
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
200c11c: 10 bf ff f2 b 200c0e4 <IMFS_evaluate_sym_link+0xd0>
200c120: b3 2e 60 06 sll %i1, 6, %i1
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
200c124: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED
200c128: 82 10 61 c4 or %g1, 0x1c4, %g1 ! 201d5c4 <IMFS_device_handlers><== NOT EXECUTED
200c12c: 10 bf ff dc b 200c09c <IMFS_evaluate_sym_link+0x88> <== NOT EXECUTED
200c130: c2 27 60 08 st %g1, [ %i5 + 8 ] <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
200c134: 03 00 80 75 sethi %hi(0x201d400), %g1
200c138: 82 10 62 34 or %g1, 0x234, %g1 ! 201d634 <IMFS_link_handlers>
200c13c: 10 bf ff d8 b 200c09c <IMFS_evaluate_sym_link+0x88>
200c140: c2 27 60 08 st %g1, [ %i5 + 8 ]
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
200c144: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
200c148: 10 bf ff d5 b 200c09c <IMFS_evaluate_sym_link+0x88> <== NOT EXECUTED
200c14c: c2 27 60 08 st %g1, [ %i5 + 8 ] <== NOT EXECUTED
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200c150: 40 00 15 20 call 20115d0 <__errno> <== NOT EXECUTED
200c154: 01 00 00 00 nop <== NOT EXECUTED
200c158: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1> <== NOT EXECUTED
200c15c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200c160: 81 c7 e0 08 ret
200c164: 81 e8 00 00 restore
02004574 <IMFS_fifo_lseek>:
off_t IMFS_fifo_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
2004574: 9d e3 bf a0 save %sp, -96, %sp
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
2004578: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200457c: 92 10 00 19 mov %i1, %o1
2004580: d0 00 60 50 ld [ %g1 + 0x50 ], %o0
2004584: 98 10 00 18 mov %i0, %o4
2004588: 94 10 00 1a mov %i2, %o2
200458c: 40 00 2f 43 call 2010298 <pipe_lseek>
2004590: 96 10 00 1b mov %i3, %o3
2004594: b1 3a 20 1f sra %o0, 0x1f, %i0
IMFS_FIFO_RETURN(err);
2004598: 80 a6 20 00 cmp %i0, 0
200459c: 06 80 00 04 bl 20045ac <IMFS_fifo_lseek+0x38> <== ALWAYS TAKEN
20045a0: b2 10 00 08 mov %o0, %i1
}
20045a4: 81 c7 e0 08 ret <== NOT EXECUTED
20045a8: 81 e8 00 00 restore <== NOT EXECUTED
off_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
20045ac: 40 00 3d ed call 2013d60 <__errno>
20045b0: 31 3f ff ff sethi %hi(0xfffffc00), %i0
20045b4: 82 20 00 19 neg %i1, %g1
20045b8: c2 22 00 00 st %g1, [ %o0 ]
20045bc: b0 16 23 ff or %i0, 0x3ff, %i0
}
20045c0: 81 c7 e0 08 ret
20045c4: 93 e8 00 18 restore %g0, %i0, %o1
020045c8 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20045c8: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
20045cc: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20045d0: 96 10 00 18 mov %i0, %o3
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
20045d4: d0 07 60 50 ld [ %i5 + 0x50 ], %o0
20045d8: 92 10 00 19 mov %i1, %o1
20045dc: 40 00 2e 91 call 2010020 <pipe_write>
20045e0: 94 10 00 1a mov %i2, %o2
if (err > 0) {
20045e4: b0 92 20 00 orcc %o0, 0, %i0
20045e8: 04 80 00 09 ble 200460c <IMFS_fifo_write+0x44>
20045ec: 90 07 bf f8 add %fp, -8, %o0
IMFS_mtime_ctime_update(jnode);
20045f0: 40 00 05 64 call 2005b80 <gettimeofday>
20045f4: 92 10 20 00 clr %o1
20045f8: c2 07 bf f8 ld [ %fp + -8 ], %g1
20045fc: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
2004600: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
2004604: 81 c7 e0 08 ret
2004608: 81 e8 00 00 restore
}
IMFS_FIFO_RETURN(err);
200460c: 80 a6 20 00 cmp %i0, 0
2004610: 12 80 00 04 bne 2004620 <IMFS_fifo_write+0x58> <== ALWAYS TAKEN
2004614: 01 00 00 00 nop
}
2004618: 81 c7 e0 08 ret <== NOT EXECUTED
200461c: 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);
2004620: 40 00 3d d0 call 2013d60 <__errno>
2004624: 01 00 00 00 nop
2004628: 82 20 00 18 neg %i0, %g1
200462c: c2 22 00 00 st %g1, [ %o0 ]
}
2004630: 81 c7 e0 08 ret
2004634: 91 e8 3f ff restore %g0, -1, %o0
0200c8d8 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
200c8d8: 9d e3 bf a0 save %sp, -96, %sp
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
200c8dc: 13 00 80 75 sethi %hi(0x201d400), %o1
200c8e0: 90 10 00 19 mov %i1, %o0
200c8e4: 40 00 16 e2 call 201246c <strcmp>
200c8e8: 92 12 61 a8 or %o1, 0x1a8, %o1
200c8ec: 80 a2 20 00 cmp %o0, 0
200c8f0: 02 80 00 19 be 200c954 <IMFS_find_match_in_dir+0x7c> <== NEVER TAKEN
200c8f4: 90 10 00 19 mov %i1, %o0
return directory;
if ( !strcmp( name, dotdotname ) )
200c8f8: 13 00 80 75 sethi %hi(0x201d400), %o1
200c8fc: 40 00 16 dc call 201246c <strcmp>
200c900: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 201d5b0 <dotdotname>
200c904: 80 a2 20 00 cmp %o0, 0
200c908: 02 80 00 12 be 200c950 <IMFS_find_match_in_dir+0x78> <== NEVER TAKEN
200c90c: b8 06 20 54 add %i0, 0x54, %i4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200c910: fa 06 20 50 ld [ %i0 + 0x50 ], %i5
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
200c914: 80 a7 40 1c cmp %i5, %i4
200c918: 12 80 00 06 bne 200c930 <IMFS_find_match_in_dir+0x58>
200c91c: b0 10 20 00 clr %i0
200c920: 30 80 00 0d b,a 200c954 <IMFS_find_match_in_dir+0x7c>
200c924: 80 a7 40 1c cmp %i5, %i4
200c928: 02 80 00 0d be 200c95c <IMFS_find_match_in_dir+0x84>
200c92c: 01 00 00 00 nop
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
200c930: 92 07 60 0c add %i5, 0xc, %o1
200c934: 40 00 16 ce call 201246c <strcmp>
200c938: 90 10 00 19 mov %i1, %o0
200c93c: 80 a2 20 00 cmp %o0, 0
200c940: 32 bf ff f9 bne,a 200c924 <IMFS_find_match_in_dir+0x4c>
200c944: fa 07 40 00 ld [ %i5 ], %i5
return the_jnode;
}
return 0;
}
200c948: 81 c7 e0 08 ret
200c94c: 91 e8 00 1d restore %g0, %i5, %o0
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
200c950: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
200c954: 81 c7 e0 08 ret
200c958: 81 e8 00 00 restore
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
200c95c: 81 c7 e0 08 ret
200c960: 91 e8 20 00 restore %g0, 0, %o0
0200c7e4 <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
)
{
200c7e4: 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;
200c7e8: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
loc = temp_mt_entry->mt_fs_root;
200c7ec: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
200c7f0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
200c7f4: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
200c7f8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200c7fc: f8 27 bf ec st %i4, [ %fp + -20 ]
200c800: c8 27 bf f0 st %g4, [ %fp + -16 ]
200c804: c6 27 bf f4 st %g3, [ %fp + -12 ]
200c808: c4 27 bf f8 st %g2, [ %fp + -8 ]
200c80c: 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;
200c810: c0 26 20 1c clr [ %i0 + 0x1c ]
do {
next = jnode->Parent;
200c814: fa 07 20 08 ld [ %i4 + 8 ], %i5
loc.node_access = (void *)jnode;
200c818: f8 27 bf ec st %i4, [ %fp + -20 ]
IMFS_Set_handlers( &loc );
200c81c: 7f ff fc 37 call 200b8f8 <IMFS_Set_handlers>
200c820: 90 07 bf ec add %fp, -20, %o0
if ( jnode->type != IMFS_DIRECTORY ) {
200c824: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200c828: 80 a0 60 01 cmp %g1, 1
200c82c: 32 80 00 1d bne,a 200c8a0 <IMFS_fsunmount+0xbc> <== NEVER TAKEN
200c830: 90 10 20 00 clr %o0 <== NOT EXECUTED
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
200c834: c4 07 20 50 ld [ %i4 + 0x50 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c838: 82 07 20 54 add %i4, 0x54, %g1
200c83c: 80 a0 80 01 cmp %g2, %g1
200c840: 02 80 00 17 be 200c89c <IMFS_fsunmount+0xb8>
200c844: 80 a7 20 00 cmp %i4, 0
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
200c848: 02 80 00 1e be 200c8c0 <IMFS_fsunmount+0xdc> <== NEVER TAKEN
200c84c: 01 00 00 00 nop
if ( jnode->type == IMFS_DIRECTORY ) {
200c850: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200c854: 80 a0 60 01 cmp %g1, 1
200c858: 32 bf ff f0 bne,a 200c818 <IMFS_fsunmount+0x34> <== NEVER TAKEN
200c85c: fa 07 20 08 ld [ %i4 + 8 ], %i5 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c860: c2 07 20 50 ld [ %i4 + 0x50 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c864: 84 07 20 54 add %i4, 0x54, %g2
if ( jnode_has_children( jnode ) )
200c868: 80 a0 40 02 cmp %g1, %g2
200c86c: 02 bf ff ea be 200c814 <IMFS_fsunmount+0x30>
200c870: 80 a0 60 00 cmp %g1, 0
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
200c874: 02 80 00 17 be 200c8d0 <IMFS_fsunmount+0xec> <== NEVER TAKEN
200c878: b8 10 00 01 mov %g1, %i4
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200c87c: 90 07 bf ec add %fp, -20, %o0
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
200c880: fa 07 20 08 ld [ %i4 + 8 ], %i5
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200c884: 7f ff fc 1d call 200b8f8 <IMFS_Set_handlers>
200c888: f8 27 bf ec st %i4, [ %fp + -20 ]
if ( jnode->type != IMFS_DIRECTORY ) {
200c88c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
200c890: 80 a0 60 01 cmp %g1, 1
200c894: 22 bf ff e9 be,a 200c838 <IMFS_fsunmount+0x54>
200c898: c4 07 20 50 ld [ %i4 + 0x50 ], %g2
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
200c89c: 90 10 20 00 clr %o0
200c8a0: 7f ff d8 92 call 2002ae8 <IMFS_unlink>
200c8a4: 92 07 bf ec add %fp, -20, %o1
if (result != 0)
200c8a8: 80 a2 20 00 cmp %o0, 0
200c8ac: 12 80 00 07 bne 200c8c8 <IMFS_fsunmount+0xe4> <== NEVER TAKEN
200c8b0: b8 10 00 1d mov %i5, %i4
return -1;
jnode = next;
}
if ( jnode != NULL ) {
200c8b4: 80 a7 20 00 cmp %i4, 0
200c8b8: 32 bf ff e7 bne,a 200c854 <IMFS_fsunmount+0x70>
200c8bc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
}
}
} while (jnode != NULL);
return 0;
}
200c8c0: 81 c7 e0 08 ret
200c8c4: 91 e8 20 00 restore %g0, 0, %o0
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
200c8c8: 81 c7 e0 08 ret <== NOT EXECUTED
200c8cc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
200c8d0: 81 c7 e0 08 ret <== NOT EXECUTED
200c8d4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200c964 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
200c964: 9d e3 bf a0 save %sp, -96, %sp
register int i = 0;
200c968: ba 10 20 00 clr %i5
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
200c96c: 10 80 00 08 b 200c98c <IMFS_get_token+0x28>
200c970: f8 0e 00 00 ldub [ %i0 ], %i4
200c974: 16 80 00 0c bge 200c9a4 <IMFS_get_token+0x40> <== NEVER TAKEN
200c978: 80 a7 60 20 cmp %i5, 0x20
token[i] = c;
200c97c: f8 2e 80 1d stb %i4, [ %i2 + %i5 ]
if ( i == IMFS_NAME_MAX )
200c980: 02 80 00 25 be 200ca14 <IMFS_get_token+0xb0>
200c984: ba 07 60 01 inc %i5
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
200c988: f8 0e 00 1d ldub [ %i0 + %i5 ], %i4
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
200c98c: a1 2f 20 18 sll %i4, 0x18, %l0
200c990: 7f ff df 1a call 20045f8 <rtems_filesystem_is_separator>
200c994: 91 3c 20 18 sra %l0, 0x18, %o0
200c998: 80 a2 20 00 cmp %o0, 0
200c99c: 02 bf ff f6 be 200c974 <IMFS_get_token+0x10>
200c9a0: 80 a7 40 19 cmp %i5, %i1
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
200c9a4: 80 a7 60 00 cmp %i5, 0
200c9a8: 12 80 00 0c bne 200c9d8 <IMFS_get_token+0x74>
200c9ac: 82 06 80 1d add %i2, %i5, %g1
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
200c9b0: 80 a4 20 00 cmp %l0, 0
200c9b4: 02 80 00 1a be 200ca1c <IMFS_get_token+0xb8>
200c9b8: f8 2e 80 00 stb %i4, [ %i2 ]
200c9bc: 80 a6 60 00 cmp %i1, 0
200c9c0: 22 80 00 18 be,a 200ca20 <IMFS_get_token+0xbc>
200c9c4: fa 26 c0 00 st %i5, [ %i3 ]
i++;
200c9c8: ba 10 20 01 mov 1, %i5
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200c9cc: fa 26 c0 00 st %i5, [ %i3 ]
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
200c9d0: 81 c7 e0 08 ret
200c9d4: 91 e8 20 01 restore %g0, 1, %o0
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
200c9d8: c2 48 7f ff ldsb [ %g1 + -1 ], %g1
200c9dc: 80 a0 60 00 cmp %g1, 0
200c9e0: 32 80 00 02 bne,a 200c9e8 <IMFS_get_token+0x84> <== ALWAYS TAKEN
200c9e4: c0 2e 80 1d clrb [ %i2 + %i5 ]
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200c9e8: fa 26 c0 00 st %i5, [ %i3 ]
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
200c9ec: 90 10 00 1a mov %i2, %o0
200c9f0: 13 00 80 75 sethi %hi(0x201d400), %o1
type = IMFS_UP_DIR;
200c9f4: b0 10 20 02 mov 2, %i0
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
200c9f8: 40 00 16 9d call 201246c <strcmp>
200c9fc: 92 12 61 c0 or %o1, 0x1c0, %o1
200ca00: 80 a2 20 00 cmp %o0, 0
200ca04: 12 80 00 09 bne 200ca28 <IMFS_get_token+0xc4>
200ca08: 90 10 00 1a mov %i2, %o0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
200ca0c: 81 c7 e0 08 ret
200ca10: 81 e8 00 00 restore
200ca14: 81 c7 e0 08 ret
200ca18: 91 e8 20 04 restore %g0, 4, %o0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200ca1c: fa 26 c0 00 st %i5, [ %i3 ]
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
200ca20: 81 c7 e0 08 ret
200ca24: 91 e8 20 00 restore %g0, 0, %o0
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
200ca28: 13 00 80 75 sethi %hi(0x201d400), %o1
200ca2c: 40 00 16 90 call 201246c <strcmp>
200ca30: 92 12 61 b8 or %o1, 0x1b8, %o1 ! 201d5b8 <dotdotname+0x8>
200ca34: 80 a0 00 08 cmp %g0, %o0
200ca38: b0 40 3f ff addx %g0, -1, %i0
200ca3c: b0 0e 3f fe and %i0, -2, %i0
200ca40: 81 c7 e0 08 ret
200ca44: 91 ee 20 03 restore %i0, 3, %o0
020026c4 <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
20026c4: 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,
20026c8: 03 00 80 7a sethi %hi(0x201e800), %g1
20026cc: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 201e888 <imfs_rq_memfile_bytes_per_block>
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
20026d0: 80 a0 60 10 cmp %g1, 0x10
20026d4: 02 80 00 0d be 2002708 <IMFS_initialize_support+0x44>
20026d8: 86 10 20 05 mov 5, %g3
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
20026dc: 80 a0 60 0f cmp %g1, 0xf
20026e0: 04 80 00 09 ble 2002704 <IMFS_initialize_support+0x40>
20026e4: 84 10 20 20 mov 0x20, %g2
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
20026e8: 80 a0 40 02 cmp %g1, %g2
20026ec: 22 80 00 08 be,a 200270c <IMFS_initialize_support+0x48>
20026f0: 05 00 80 7c sethi %hi(0x201f000), %g2
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
20026f4: 06 80 00 04 bl 2002704 <IMFS_initialize_support+0x40> <== NEVER TAKEN
20026f8: 86 80 ff ff addcc %g3, -1, %g3
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
20026fc: 12 bf ff fb bne 20026e8 <IMFS_initialize_support+0x24> <== ALWAYS TAKEN
2002700: 85 28 a0 01 sll %g2, 1, %g2
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
2002704: 82 10 20 80 mov 0x80, %g1
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
2002708: 05 00 80 7c sethi %hi(0x201f000), %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();
200270c: 40 00 24 1f call 200b788 <IMFS_create_root_node>
2002710: c2 20 a0 84 st %g1, [ %g2 + 0x84 ] ! 201f084 <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;
2002714: 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();
2002718: d0 26 20 1c st %o0, [ %i0 + 0x1c ]
200271c: ba 10 00 08 mov %o0, %i5
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
2002720: f6 26 20 24 st %i3, [ %i0 + 0x24 ]
temp_mt_entry->mt_fs_root.ops = op_table;
2002724: f2 26 20 28 st %i1, [ %i0 + 0x28 ]
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
2002728: 90 06 20 38 add %i0, 0x38, %o0
200272c: 13 00 80 75 sethi %hi(0x201d400), %o1
2002730: 40 00 3e 04 call 2011f40 <memcpy>
2002734: 92 12 61 78 or %o1, 0x178, %o1 ! 201d578 <IMFS_LIMITS_AND_OPTIONS>
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
2002738: 90 10 20 01 mov 1, %o0
200273c: 40 00 01 ca call 2002e64 <calloc>
2002740: 92 10 20 14 mov 0x14, %o1
if ( !fs_info ) {
2002744: 80 a2 20 00 cmp %o0, 0
2002748: 02 80 00 0f be 2002784 <IMFS_initialize_support+0xc0>
200274c: 03 00 80 7c sethi %hi(0x201f000), %g1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
2002750: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 ! 201f088 <imfs_instance.6165>
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;
2002754: d0 26 20 34 st %o0, [ %i0 + 0x34 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
2002758: 84 10 20 01 mov 1, %g2
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
200275c: c6 22 00 00 st %g3, [ %o0 ]
fs_info->ino_count = 1;
2002760: c4 22 20 04 st %g2, [ %o0 + 4 ]
fs_info->memfile_handlers = memfile_handlers;
2002764: f4 22 20 08 st %i2, [ %o0 + 8 ]
fs_info->directory_handlers = directory_handlers;
2002768: f6 22 20 0c st %i3, [ %o0 + 0xc ]
fs_info->fifo_handlers = fifo_handlers;
200276c: f8 22 20 10 st %i4, [ %o0 + 0x10 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
2002770: 86 00 e0 01 inc %g3
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
2002774: c4 27 60 38 st %g2, [ %i5 + 0x38 ]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
2002778: c6 20 60 88 st %g3, [ %g1 + 0x88 ]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
200277c: 81 c7 e0 08 ret
2002780: 91 e8 20 00 restore %g0, 0, %o0
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
2002784: 40 00 02 db call 20032f0 <free>
2002788: 90 10 00 1d mov %i5, %o0
rtems_set_errno_and_return_minus_one(ENOMEM);
200278c: 40 00 3b 91 call 20115d0 <__errno>
2002790: b0 10 3f ff mov -1, %i0
2002794: 82 10 20 0c mov 0xc, %g1
2002798: c2 22 00 00 st %g1, [ %o0 ]
200279c: 81 c7 e0 08 ret
20027a0: 81 e8 00 00 restore
0200f770 <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
200f770: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200f774: 3b 00 80 7c sethi %hi(0x201f000), %i5 <== NOT EXECUTED
200f778: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 ! 201f084 <imfs_memfile_bytes_per_block><== NOT EXECUTED
200f77c: 83 32 60 02 srl %o1, 2, %g1 <== NOT EXECUTED
200f780: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200f784: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200f788: 18 80 00 0e bgu 200f7c0 <IMFS_memfile_addblock+0x50> <== NOT EXECUTED
200f78c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
p = info->indirect;
200f790: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
if ( malloc_it ) {
if ( !p ) {
200f794: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f798: 22 80 00 1f be,a 200f814 <IMFS_memfile_addblock+0xa4> <== NOT EXECUTED
200f79c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
}
return &info->indirect[ my_block ];
200f7a0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
200f7a4: b8 02 00 19 add %o0, %i1, %i4 <== NOT EXECUTED
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
200f7a8: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED
200f7ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200f7b0: 02 80 00 0c be 200f7e0 <IMFS_memfile_addblock+0x70> <== NOT EXECUTED
200f7b4: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
200f7b8: 81 c7 e0 08 ret <== NOT EXECUTED
200f7bc: 81 e8 00 00 restore <== NOT EXECUTED
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
}
return &info->indirect[ my_block ];
200f7c0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f7c4: 7f ff fd ff call 200efc0 <IMFS_memfile_get_block_pointer.part.0><== NOT EXECUTED
200f7c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
200f7cc: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
200f7d0: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED
200f7d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200f7d8: 12 bf ff f8 bne 200f7b8 <IMFS_memfile_addblock+0x48> <== NOT EXECUTED
200f7dc: b0 10 20 00 clr %i0 <== NOT EXECUTED
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f7e0: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 <== NOT EXECUTED
200f7e4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
200f7e8: 7f ff cd 9f call 2002e64 <calloc> <== NOT EXECUTED
200f7ec: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
if ( memory )
200f7f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f7f4: 02 bf ff f1 be 200f7b8 <IMFS_memfile_addblock+0x48> <== NOT EXECUTED
200f7f8: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
memfile_blocks_allocated++;
200f7fc: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
200f800: 84 00 a0 01 inc %g2 <== NOT EXECUTED
200f804: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
200f808: d0 27 00 00 st %o0, [ %i4 ] <== NOT EXECUTED
return 0;
}
200f80c: 81 c7 e0 08 ret <== NOT EXECUTED
200f810: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f814: 7f ff cd 94 call 2002e64 <calloc> <== NOT EXECUTED
200f818: b8 10 20 00 clr %i4 <== NOT EXECUTED
if ( memory )
200f81c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f820: 02 bf ff ec be 200f7d0 <IMFS_memfile_addblock+0x60> <== NOT EXECUTED
200f824: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
memfile_blocks_allocated++;
200f828: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
}
return &info->indirect[ my_block ];
200f82c: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
200f830: 84 00 a0 01 inc %g2 <== NOT EXECUTED
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
200f834: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
200f838: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
}
return &info->indirect[ my_block ];
200f83c: 10 bf ff db b 200f7a8 <IMFS_memfile_addblock+0x38> <== NOT EXECUTED
200f840: b8 02 00 19 add %o0, %i1, %i4 <== NOT EXECUTED
0200f6c8 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
200f6c8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f6cc: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
200f6d0: fa 00 60 84 ld [ %g1 + 0x84 ], %i5 ! 201f084 <imfs_memfile_bytes_per_block><== NOT EXECUTED
200f6d4: b9 37 60 02 srl %i5, 2, %i4 <== NOT EXECUTED
200f6d8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200f6dc: 40 00 2b 16 call 201a334 <.umul> <== NOT EXECUTED
200f6e0: 90 07 20 01 add %i4, 1, %o0 <== NOT EXECUTED
200f6e4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200f6e8: 40 00 2b 13 call 201a334 <.umul> <== NOT EXECUTED
200f6ec: 90 02 20 01 inc %o0 <== NOT EXECUTED
200f6f0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f6f4: 40 00 2b 10 call 201a334 <.umul> <== NOT EXECUTED
200f6f8: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED
200f6fc: 82 10 20 00 clr %g1 <== NOT EXECUTED
200f700: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED
200f704: 04 80 00 10 ble 200f744 <IMFS_memfile_extend+0x7c> <== NOT EXECUTED
200f708: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200f70c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 <== NOT EXECUTED
200f710: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED
200f714: 16 80 00 04 bge 200f724 <IMFS_memfile_extend+0x5c> <== NOT EXECUTED
200f718: 01 00 00 00 nop <== NOT EXECUTED
200f71c: 7f ff fe cb call 200f248 <IMFS_memfile_extend.part.1> <== NOT EXECUTED
200f720: 81 e8 00 00 restore <== NOT EXECUTED
200f724: 12 80 00 06 bne 200f73c <IMFS_memfile_extend+0x74> <== NOT EXECUTED
200f728: 01 00 00 00 nop <== NOT EXECUTED
200f72c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED
200f730: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
200f734: 0a bf ff fa bcs 200f71c <IMFS_memfile_extend+0x54> <== NOT EXECUTED
200f738: 01 00 00 00 nop <== NOT EXECUTED
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
200f73c: 81 c7 e0 08 ret <== NOT EXECUTED
200f740: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f744: 12 80 00 05 bne 200f758 <IMFS_memfile_extend+0x90> <== NOT EXECUTED
200f748: 01 00 00 00 nop <== NOT EXECUTED
200f74c: 80 a2 00 1a cmp %o0, %i2 <== NOT EXECUTED
200f750: 38 bf ff f0 bgu,a 200f710 <IMFS_memfile_extend+0x48> <== NOT EXECUTED
200f754: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
200f758: 40 00 07 9e call 20115d0 <__errno> <== NOT EXECUTED
200f75c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f760: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200f764: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f768: 81 c7 e0 08 ret <== NOT EXECUTED
200f76c: 81 e8 00 00 restore <== NOT EXECUTED
0200f248 <IMFS_memfile_extend.part.1>:
*
* This routine insures that the in-memory file is of the length
* specified. If necessary, it will allocate memory blocks to
* extend the file.
*/
MEMFILE_STATIC int IMFS_memfile_extend(
200f248: 9d e3 bf 98 save %sp, -104, %sp
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200f24c: 21 00 80 7c sethi %hi(0x201f000), %l0
200f250: f6 04 20 84 ld [ %l0 + 0x84 ], %i3 ! 201f084 <imfs_memfile_bytes_per_block>
*
* This routine insures that the in-memory file is of the length
* specified. If necessary, it will allocate memory blocks to
* extend the file.
*/
MEMFILE_STATIC int IMFS_memfile_extend(
200f254: b8 10 00 19 mov %i1, %i4
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200f258: 96 10 00 1b mov %i3, %o3
200f25c: b3 3e e0 1f sra %i3, 0x1f, %i1
200f260: 92 10 00 1a mov %i2, %o1
200f264: 94 10 00 19 mov %i1, %o2
200f268: 40 00 2d c5 call 201a97c <__divdi3>
200f26c: 90 10 00 1c mov %i4, %o0
*
* This routine insures that the in-memory file is of the length
* specified. If necessary, it will allocate memory blocks to
* extend the file.
*/
MEMFILE_STATIC int IMFS_memfile_extend(
200f270: ba 10 00 1a mov %i2, %i5
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200f274: b4 10 00 09 mov %o1, %i2
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200f278: d0 1e 20 50 ldd [ %i0 + 0x50 ], %o0
200f27c: 94 10 00 19 mov %i1, %o2
200f280: 40 00 2d bf call 201a97c <__divdi3>
200f284: 96 10 00 1b mov %i3, %o3
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200f288: 80 a6 80 09 cmp %i2, %o1
200f28c: 0a 80 00 33 bcs 200f358 <IMFS_memfile_extend.part.1+0x110><== NEVER TAKEN
200f290: a4 10 00 09 mov %o1, %l2
200f294: b2 10 00 09 mov %o1, %i1
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200f298: 83 36 e0 02 srl %i3, 2, %g1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200f29c: a3 2a 60 02 sll %o1, 2, %l1
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200f2a0: 82 00 7f ff add %g1, -1, %g1
200f2a4: 80 a0 40 19 cmp %g1, %i1
200f2a8: 0a 80 00 15 bcs 200f2fc <IMFS_memfile_extend.part.1+0xb4>
200f2ac: 29 00 80 7c sethi %hi(0x201f000), %l4
p = info->indirect;
200f2b0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
if ( malloc_it ) {
if ( !p ) {
200f2b4: 80 a2 20 00 cmp %o0, 0
200f2b8: 02 80 00 36 be 200f390 <IMFS_memfile_extend.part.1+0x148>
200f2bc: 92 10 00 1b mov %i3, %o1
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
}
return &info->indirect[ my_block ];
200f2c0: b6 02 00 11 add %o0, %l1, %i3
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
200f2c4: c2 06 c0 00 ld [ %i3 ], %g1
200f2c8: 80 a0 60 00 cmp %g1, 0
200f2cc: 02 80 00 16 be 200f324 <IMFS_memfile_extend.part.1+0xdc>
200f2d0: d2 04 20 84 ld [ %l0 + 0x84 ], %o1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200f2d4: b2 06 60 01 inc %i1
200f2d8: 80 a6 80 19 cmp %i2, %i1
200f2dc: 0a 80 00 1f bcs 200f358 <IMFS_memfile_extend.part.1+0x110>
200f2e0: a2 04 60 04 add %l1, 4, %l1
200f2e4: f6 04 20 84 ld [ %l0 + 0x84 ], %i3
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200f2e8: 83 36 e0 02 srl %i3, 2, %g1
200f2ec: 82 00 7f ff add %g1, -1, %g1
200f2f0: 80 a0 40 19 cmp %g1, %i1
200f2f4: 3a bf ff f0 bcc,a 200f2b4 <IMFS_memfile_extend.part.1+0x6c>
200f2f8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
}
return &info->indirect[ my_block ];
200f2fc: 90 10 00 18 mov %i0, %o0
200f300: 92 10 00 19 mov %i1, %o1
200f304: 7f ff ff 2f call 200efc0 <IMFS_memfile_get_block_pointer.part.0>
200f308: 94 10 20 01 mov 1, %o2
200f30c: b6 10 00 08 mov %o0, %i3
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
200f310: c2 06 c0 00 ld [ %i3 ], %g1
200f314: 80 a0 60 00 cmp %g1, 0
200f318: 32 bf ff f0 bne,a 200f2d8 <IMFS_memfile_extend.part.1+0x90>
200f31c: b2 06 60 01 inc %i1
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f320: d2 04 20 84 ld [ %l0 + 0x84 ], %o1
200f324: 90 10 20 01 mov 1, %o0
200f328: 7f ff ce cf call 2002e64 <calloc>
200f32c: a6 14 20 84 or %l0, 0x84, %l3
if ( memory )
200f330: 80 a2 20 00 cmp %o0, 0
200f334: 02 80 00 21 be 200f3b8 <IMFS_memfile_extend.part.1+0x170>
200f338: c2 05 21 94 ld [ %l4 + 0x194 ], %g1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200f33c: b2 06 60 01 inc %i1
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
200f340: 82 00 60 01 inc %g1
200f344: c2 25 21 94 st %g1, [ %l4 + 0x194 ]
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
200f348: d0 26 c0 00 st %o0, [ %i3 ]
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200f34c: 80 a6 80 19 cmp %i2, %i1
200f350: 1a bf ff e5 bcc 200f2e4 <IMFS_memfile_extend.part.1+0x9c>
200f354: a2 04 60 04 add %l1, 4, %l1
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
200f358: f8 3e 20 50 std %i4, [ %i0 + 0x50 ]
IMFS_update_ctime(the_jnode);
200f35c: 92 10 20 00 clr %o1
200f360: 7f ff d0 0e call 2003398 <gettimeofday>
200f364: 90 07 bf f8 add %fp, -8, %o0
200f368: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_update_mtime(the_jnode);
200f36c: 90 07 bf f8 add %fp, -8, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
200f370: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
IMFS_update_mtime(the_jnode);
200f374: 7f ff d0 09 call 2003398 <gettimeofday>
200f378: 92 10 20 00 clr %o1
200f37c: c4 07 bf f8 ld [ %fp + -8 ], %g2
return 0;
200f380: 82 10 20 00 clr %g1
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
200f384: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
return 0;
}
200f388: 81 c7 e0 08 ret
200f38c: 91 e8 00 01 restore %g0, %g1, %o0
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f390: 90 10 20 01 mov 1, %o0
200f394: 7f ff ce b4 call 2002e64 <calloc>
200f398: b6 10 20 00 clr %i3
if ( memory )
200f39c: 80 a2 20 00 cmp %o0, 0
200f3a0: 02 bf ff c9 be 200f2c4 <IMFS_memfile_extend.part.1+0x7c> <== NEVER TAKEN
200f3a4: c2 05 21 94 ld [ %l4 + 0x194 ], %g1
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
200f3a8: d0 26 20 58 st %o0, [ %i0 + 0x58 ]
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
200f3ac: 82 00 60 01 inc %g1
200f3b0: 10 bf ff c4 b 200f2c0 <IMFS_memfile_extend.part.1+0x78>
200f3b4: c2 25 21 94 st %g1, [ %l4 + 0x194 ]
/*
* 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-- ) {
200f3b8: 80 a4 80 19 cmp %l2, %i1
200f3bc: 18 80 00 29 bgu 200f460 <IMFS_memfile_extend.part.1+0x218><== NEVER TAKEN
200f3c0: 01 00 00 00 nop
200f3c4: 37 00 80 7c sethi %hi(0x201f000), %i3
200f3c8: b9 2e 60 02 sll %i1, 2, %i4
200f3cc: 10 80 00 10 b 200f40c <IMFS_memfile_extend.part.1+0x1c4>
200f3d0: b6 16 e1 94 or %i3, 0x194, %i3
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
200f3d4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200f3d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200f3dc: 32 80 00 02 bne,a 200f3e4 <IMFS_memfile_extend.part.1+0x19c><== NOT EXECUTED
200f3e0: 82 00 80 1c add %g2, %i4, %g1 <== NOT EXECUTED
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
IMFS_assert( block_ptr );
ptr = *block_ptr;
200f3e4: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f3e8: 7f ff cf c2 call 20032f0 <free> <== NOT EXECUTED
200f3ec: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED
memfile_blocks_allocated--;
200f3f0: c2 06 c0 00 ld [ %i3 ], %g1 <== 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-- ) {
200f3f4: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED
void memfile_free_block(
void *memory
)
{
free(memory);
memfile_blocks_allocated--;
200f3f8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200f3fc: c2 26 c0 00 st %g1, [ %i3 ] <== 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-- ) {
200f400: 80 a4 80 19 cmp %l2, %i1 <== NOT EXECUTED
200f404: 18 80 00 17 bgu 200f460 <IMFS_memfile_extend.part.1+0x218><== NOT EXECUTED
200f408: b8 07 3f fc add %i4, -4, %i4 <== NOT EXECUTED
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200f40c: c4 04 c0 00 ld [ %l3 ], %g2
200f410: 85 30 a0 02 srl %g2, 2, %g2
200f414: 84 00 bf ff add %g2, -1, %g2
200f418: 80 a0 80 19 cmp %g2, %i1
200f41c: 1a bf ff ee bcc 200f3d4 <IMFS_memfile_extend.part.1+0x18c><== NEVER TAKEN
200f420: 82 10 20 00 clr %g1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200f424: 92 10 00 19 mov %i1, %o1
200f428: 94 10 20 00 clr %o2
200f42c: 7f ff fe e5 call 200efc0 <IMFS_memfile_get_block_pointer.part.0>
200f430: 90 10 00 18 mov %i0, %o0
200f434: 82 10 00 08 mov %o0, %g1
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
IMFS_assert( block_ptr );
ptr = *block_ptr;
200f438: d0 00 40 00 ld [ %g1 ], %o0
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f43c: 7f ff cf ad call 20032f0 <free>
200f440: c0 20 40 00 clr [ %g1 ]
memfile_blocks_allocated--;
200f444: c2 06 c0 00 ld [ %i3 ], %g1
/*
* 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-- ) {
200f448: b2 06 7f ff add %i1, -1, %i1
void memfile_free_block(
void *memory
)
{
free(memory);
memfile_blocks_allocated--;
200f44c: 82 00 7f ff add %g1, -1, %g1
200f450: c2 26 c0 00 st %g1, [ %i3 ]
/*
* 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-- ) {
200f454: 80 a4 80 19 cmp %l2, %i1
200f458: 08 bf ff ed bleu 200f40c <IMFS_memfile_extend.part.1+0x1c4>
200f45c: b8 07 3f fc add %i4, -4, %i4
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
200f460: 40 00 08 5c call 20115d0 <__errno>
200f464: 01 00 00 00 nop
200f468: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
200f46c: 84 10 20 1c mov 0x1c, %g2
200f470: c4 22 00 00 st %g2, [ %o0 ]
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
200f474: 81 c7 e0 08 ret
200f478: 91 e8 00 01 restore %g0, %g1, %o0
02010368 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
2010368: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
201036c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
2010370: d2 00 60 84 ld [ %g1 + 0x84 ], %o1 ! 201f084 <imfs_memfile_bytes_per_block><== NOT EXECUTED
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
2010374: ba 10 00 19 mov %i1, %i5 <== NOT EXECUTED
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
2010378: 83 32 60 02 srl %o1, 2, %g1 <== NOT EXECUTED
201037c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2010380: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2010384: 18 80 00 0b bgu 20103b0 <IMFS_memfile_get_block_pointer+0x48><== NOT EXECUTED
2010388: b8 10 00 18 mov %i0, %i4 <== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
201038c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2010390: 12 80 00 0a bne 20103b8 <IMFS_memfile_get_block_pointer+0x50><== NOT EXECUTED
2010394: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
2010398: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201039c: 02 80 00 16 be 20103f4 <IMFS_memfile_get_block_pointer+0x8c><== NOT EXECUTED
20103a0: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
return &info->indirect[ my_block ];
20103a4: bb 2f 60 02 sll %i5, 2, %i5 <== NOT EXECUTED
20103a8: 81 c7 e0 08 ret <== NOT EXECUTED
20103ac: 91 ea 00 1d restore %o0, %i5, %o0 <== NOT EXECUTED
20103b0: 7f ff fb 04 call 200efc0 <IMFS_memfile_get_block_pointer.part.0><== NOT EXECUTED
20103b4: 81 e8 00 00 restore <== NOT EXECUTED
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
20103b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20103bc: 32 bf ff fb bne,a 20103a8 <IMFS_memfile_get_block_pointer+0x40><== NOT EXECUTED
20103c0: bb 2f 60 02 sll %i5, 2, %i5 <== NOT EXECUTED
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
20103c4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
20103c8: 7f ff ca a7 call 2002e64 <calloc> <== NOT EXECUTED
20103cc: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( memory )
20103d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20103d4: 02 80 00 08 be 20103f4 <IMFS_memfile_get_block_pointer+0x8c><== NOT EXECUTED
20103d8: 01 00 00 00 nop <== NOT EXECUTED
memfile_blocks_allocated++;
20103dc: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
20103e0: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
20103e4: d0 27 20 58 st %o0, [ %i4 + 0x58 ] <== NOT EXECUTED
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
20103e8: 84 00 a0 01 inc %g2 <== NOT EXECUTED
20103ec: 10 bf ff ee b 20103a4 <IMFS_memfile_get_block_pointer+0x3c><== NOT EXECUTED
20103f0: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
20103f4: 81 c7 e0 08 ret <== NOT EXECUTED
20103f8: 81 e8 00 00 restore <== NOT EXECUTED
0200efc0 <IMFS_memfile_get_block_pointer.part.0>:
return p;
}
block_p *IMFS_memfile_get_block_pointer_DEBUG(
#else
block_p *IMFS_memfile_get_block_pointer(
200efc0: 9d e3 bf a0 save %sp, -96, %sp
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
200efc4: 3b 00 80 7c sethi %hi(0x201f000), %i5
200efc8: f8 07 60 84 ld [ %i5 + 0x84 ], %i4 ! 201f084 <imfs_memfile_bytes_per_block>
return p;
}
block_p *IMFS_memfile_get_block_pointer_DEBUG(
#else
block_p *IMFS_memfile_get_block_pointer(
200efcc: a2 10 00 18 mov %i0, %l1
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
200efd0: b7 37 20 02 srl %i4, 2, %i3
200efd4: 90 06 e0 01 add %i3, 1, %o0
200efd8: 40 00 2c d7 call 201a334 <.umul>
200efdc: 92 10 00 1b mov %i3, %o1
200efe0: 82 02 3f ff add %o0, -1, %g1
200efe4: 80 a0 40 19 cmp %g1, %i1
200efe8: 0a 80 00 19 bcs 200f04c <IMFS_memfile_get_block_pointer.part.0+0x8c>
200efec: a0 10 00 08 mov %o0, %l0
my_block -= FIRST_DOUBLY_INDIRECT;
200eff0: b2 26 40 1b sub %i1, %i3, %i1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200eff4: 92 10 00 1b mov %i3, %o1
200eff8: 40 00 2d b5 call 201a6cc <.urem>
200effc: 90 10 00 19 mov %i1, %o0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200f000: 92 10 00 1b mov %i3, %o1
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200f004: a0 10 00 08 mov %o0, %l0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200f008: 40 00 2d 05 call 201a41c <.udiv>
200f00c: 90 10 00 19 mov %i1, %o0
p = info->doubly_indirect;
200f010: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
if ( malloc_it ) {
200f014: 80 a6 a0 00 cmp %i2, 0
200f018: 02 80 00 46 be 200f130 <IMFS_memfile_get_block_pointer.part.0+0x170>
200f01c: b6 10 00 08 mov %o0, %i3
if ( !p ) {
200f020: 80 a0 60 00 cmp %g1, 0
200f024: 02 80 00 66 be 200f1bc <IMFS_memfile_get_block_pointer.part.0+0x1fc>
200f028: 90 10 20 01 mov 1, %o0
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
200f02c: b7 2e e0 02 sll %i3, 2, %i3
200f030: d0 00 40 1b ld [ %g1 + %i3 ], %o0
if ( !p1 ) {
200f034: 80 a2 20 00 cmp %o0, 0
200f038: 02 80 00 49 be 200f15c <IMFS_memfile_get_block_pointer.part.0+0x19c>
200f03c: b6 00 40 1b add %g1, %i3, %i3
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
}
return (block_p *)&p1[ singly ];
200f040: b1 2c 20 02 sll %l0, 2, %i0
200f044: 81 c7 e0 08 ret
200f048: 91 ea 00 18 restore %o0, %i0, %o0
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
200f04c: 90 02 20 01 inc %o0
200f050: 40 00 2c b9 call 201a334 <.umul>
200f054: 92 10 00 1b mov %i3, %o1
200f058: 90 02 3f ff add %o0, -1, %o0
200f05c: 80 a6 40 08 cmp %i1, %o0
200f060: 18 80 00 32 bgu 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f064: b0 10 20 00 clr %i0
my_block -= FIRST_TRIPLY_INDIRECT;
200f068: b2 26 40 10 sub %i1, %l0, %i1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200f06c: 92 10 00 1b mov %i3, %o1
200f070: 40 00 2d 97 call 201a6cc <.urem>
200f074: 90 10 00 19 mov %i1, %o0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200f078: 92 10 00 1b mov %i3, %o1
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200f07c: a4 10 00 08 mov %o0, %l2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200f080: 40 00 2c e7 call 201a41c <.udiv>
200f084: 90 10 00 19 mov %i1, %o0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200f088: 92 10 00 1b mov %i3, %o1
200f08c: 40 00 2c e4 call 201a41c <.udiv>
200f090: b2 10 00 08 mov %o0, %i1
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200f094: 92 10 00 1b mov %i3, %o1
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200f098: a0 10 00 08 mov %o0, %l0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200f09c: 40 00 2d 8c call 201a6cc <.urem>
200f0a0: 90 10 00 19 mov %i1, %o0
p = info->triply_indirect;
200f0a4: c2 04 60 60 ld [ %l1 + 0x60 ], %g1
if ( malloc_it ) {
200f0a8: 80 a6 a0 00 cmp %i2, 0
200f0ac: 02 80 00 12 be 200f0f4 <IMFS_memfile_get_block_pointer.part.0+0x134>
200f0b0: b6 10 00 08 mov %o0, %i3
if ( !p ) {
200f0b4: 80 a0 60 00 cmp %g1, 0
200f0b8: 02 80 00 4d be 200f1ec <IMFS_memfile_get_block_pointer.part.0+0x22c>
200f0bc: 90 10 20 01 mov 1, %o0
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
200f0c0: a1 2c 20 02 sll %l0, 2, %l0
200f0c4: c4 00 40 10 ld [ %g1 + %l0 ], %g2
if ( !p1 ) {
200f0c8: 80 a0 a0 00 cmp %g2, 0
200f0cc: 02 80 00 52 be 200f214 <IMFS_memfile_get_block_pointer.part.0+0x254>
200f0d0: a0 00 40 10 add %g1, %l0, %l0
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
200f0d4: b7 2e e0 02 sll %i3, 2, %i3
200f0d8: d0 00 80 1b ld [ %g2 + %i3 ], %o0
if ( !p2 ) {
200f0dc: 80 a2 20 00 cmp %o0, 0
200f0e0: 02 80 00 2b be 200f18c <IMFS_memfile_get_block_pointer.part.0+0x1cc>
200f0e4: b6 00 80 1b add %g2, %i3, %i3
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
200f0e8: b1 2c a0 02 sll %l2, 2, %i0
200f0ec: 81 c7 e0 08 ret
200f0f0: 91 ea 00 18 restore %o0, %i0, %o0
}
if ( !p )
200f0f4: 80 a0 60 00 cmp %g1, 0
200f0f8: 02 80 00 0c be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f0fc: a1 2c 20 02 sll %l0, 2, %l0
return 0;
p1 = (block_p *) p[ triply ];
200f100: c2 00 40 10 ld [ %g1 + %l0 ], %g1
if ( !p1 )
200f104: 80 a0 60 00 cmp %g1, 0
200f108: 02 80 00 08 be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f10c: b7 2a 20 02 sll %o0, 2, %i3
return 0;
p2 = (block_p *)p1[ doubly ];
200f110: c2 00 40 1b ld [ %g1 + %i3 ], %g1
if ( !p2 )
200f114: 80 a0 60 00 cmp %g1, 0
200f118: 02 80 00 04 be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f11c: 01 00 00 00 nop
return 0;
return (block_p *)&p2[ singly ];
200f120: b1 2c a0 02 sll %l2, 2, %i0
200f124: b0 00 40 18 add %g1, %i0, %i0
/*
* This means the requested block number is out of range.
*/
return 0;
}
200f128: 81 c7 e0 08 ret
200f12c: 81 e8 00 00 restore
}
return (block_p *)&p1[ singly ];
}
if ( !p )
200f130: 80 a0 60 00 cmp %g1, 0
200f134: 02 bf ff fd be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f138: b0 10 20 00 clr %i0
return 0;
p = (block_p *)p[ doubly ];
200f13c: b7 2a 20 02 sll %o0, 2, %i3
200f140: c2 00 40 1b ld [ %g1 + %i3 ], %g1
if ( !p )
200f144: 80 a0 60 00 cmp %g1, 0
200f148: 02 bf ff f8 be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f14c: 01 00 00 00 nop
return 0;
return (block_p *)&p[ singly ];
200f150: b1 2c 20 02 sll %l0, 2, %i0
200f154: 81 c7 e0 08 ret
200f158: 91 e8 40 18 restore %g1, %i0, %o0
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f15c: d2 07 60 84 ld [ %i5 + 0x84 ], %o1
200f160: 90 10 20 01 mov 1, %o0
200f164: 7f ff cf 40 call 2002e64 <calloc>
200f168: b0 10 20 00 clr %i0
if ( memory )
200f16c: 80 a2 20 00 cmp %o0, 0
200f170: 02 bf ff ee be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f174: 03 00 80 7c sethi %hi(0x201f000), %g1
memfile_blocks_allocated++;
200f178: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated>
200f17c: 84 00 a0 01 inc %g2
200f180: c4 20 61 94 st %g2, [ %g1 + 0x194 ]
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
200f184: 10 bf ff af b 200f040 <IMFS_memfile_get_block_pointer.part.0+0x80>
200f188: d0 26 c0 00 st %o0, [ %i3 ]
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f18c: d2 07 60 84 ld [ %i5 + 0x84 ], %o1
200f190: 90 10 20 01 mov 1, %o0
200f194: 7f ff cf 34 call 2002e64 <calloc>
200f198: b0 10 20 00 clr %i0
if ( memory )
200f19c: 80 a2 20 00 cmp %o0, 0
200f1a0: 02 bf ff e2 be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f1a4: 03 00 80 7c sethi %hi(0x201f000), %g1
memfile_blocks_allocated++;
200f1a8: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated>
200f1ac: 84 00 a0 01 inc %g2
200f1b0: c4 20 61 94 st %g2, [ %g1 + 0x194 ]
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
200f1b4: 10 bf ff cd b 200f0e8 <IMFS_memfile_get_block_pointer.part.0+0x128>
200f1b8: d0 26 c0 00 st %o0, [ %i3 ]
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f1bc: 92 10 00 1c mov %i4, %o1
200f1c0: 7f ff cf 29 call 2002e64 <calloc>
200f1c4: b0 10 20 00 clr %i0
if ( memory )
200f1c8: 80 a2 20 00 cmp %o0, 0
200f1cc: 02 bf ff d7 be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f1d0: 82 10 00 08 mov %o0, %g1
memfile_blocks_allocated++;
200f1d4: 05 00 80 7c sethi %hi(0x201f000), %g2
200f1d8: c6 00 a1 94 ld [ %g2 + 0x194 ], %g3 ! 201f194 <memfile_blocks_allocated>
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
return 0;
info->doubly_indirect = p;
200f1dc: d0 24 60 5c st %o0, [ %l1 + 0x5c ]
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
200f1e0: 86 00 e0 01 inc %g3
200f1e4: 10 bf ff 92 b 200f02c <IMFS_memfile_get_block_pointer.part.0+0x6c>
200f1e8: c6 20 a1 94 st %g3, [ %g2 + 0x194 ]
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f1ec: 7f ff cf 1e call 2002e64 <calloc>
200f1f0: 92 10 00 1c mov %i4, %o1
if ( memory )
200f1f4: 82 92 20 00 orcc %o0, 0, %g1
200f1f8: 02 bf ff cc be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f1fc: 05 00 80 7c sethi %hi(0x201f000), %g2
memfile_blocks_allocated++;
200f200: c6 00 a1 94 ld [ %g2 + 0x194 ], %g3 ! 201f194 <memfile_blocks_allocated>
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
return 0;
info->triply_indirect = p;
200f204: c2 24 60 60 st %g1, [ %l1 + 0x60 ]
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
if ( memory )
memfile_blocks_allocated++;
200f208: 86 00 e0 01 inc %g3
200f20c: 10 bf ff ad b 200f0c0 <IMFS_memfile_get_block_pointer.part.0+0x100>
200f210: c6 20 a1 94 st %g3, [ %g2 + 0x194 ]
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200f214: d2 07 60 84 ld [ %i5 + 0x84 ], %o1
200f218: 90 10 20 01 mov 1, %o0
200f21c: 7f ff cf 12 call 2002e64 <calloc>
200f220: b0 10 20 00 clr %i0
if ( memory )
200f224: 80 a2 20 00 cmp %o0, 0
200f228: 02 bf ff c0 be 200f128 <IMFS_memfile_get_block_pointer.part.0+0x168><== NEVER TAKEN
200f22c: 84 10 00 08 mov %o0, %g2
memfile_blocks_allocated++;
200f230: 03 00 80 7c sethi %hi(0x201f000), %g1
200f234: c6 00 61 94 ld [ %g1 + 0x194 ], %g3 ! 201f194 <memfile_blocks_allocated>
200f238: 86 00 e0 01 inc %g3
200f23c: c6 20 61 94 st %g3, [ %g1 + 0x194 ]
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
200f240: 10 bf ff a5 b 200f0d4 <IMFS_memfile_get_block_pointer.part.0+0x114>
200f244: d0 24 00 00 st %o0, [ %l0 ]
0200fcdc <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200fcdc: 9d e3 bf 98 save %sp, -104, %sp
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
200fce0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200fce4: ba 10 00 18 mov %i0, %i5
200fce8: a0 10 00 19 mov %i1, %l0
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
200fcec: 80 a0 60 06 cmp %g1, 6
200fcf0: 02 80 00 7f be 200feec <IMFS_memfile_read+0x210>
200fcf4: a2 10 00 1a mov %i2, %l1
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
200fcf8: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
200fcfc: 82 10 00 1a mov %i2, %g1
if ( last_byte > the_jnode->info.file.size )
200fd00: 86 10 20 00 clr %g3
200fd04: c8 06 20 54 ld [ %i0 + 0x54 ], %g4
200fd08: 80 a0 c0 02 cmp %g3, %g2
200fd0c: 04 80 00 55 ble 200fe60 <IMFS_memfile_read+0x184> <== ALWAYS TAKEN
200fd10: b4 07 00 1a add %i4, %i2, %i2
my_length = the_jnode->info.file.size - start;
200fd14: 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;
200fd18: 33 00 80 7c sethi %hi(0x201f000), %i1 <== NOT EXECUTED
200fd1c: f4 06 60 84 ld [ %i1 + 0x84 ], %i2 ! 201f084 <imfs_memfile_bytes_per_block>
200fd20: 90 10 00 10 mov %l0, %o0
200fd24: b1 3e a0 1f sra %i2, 0x1f, %i0
200fd28: 92 10 00 11 mov %l1, %o1
200fd2c: 94 10 00 18 mov %i0, %o2
200fd30: 40 00 2b f9 call 201ad14 <__moddi3>
200fd34: 96 10 00 1a mov %i2, %o3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200fd38: 90 10 00 10 mov %l0, %o0
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200fd3c: a4 10 00 09 mov %o1, %l2
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200fd40: 94 10 00 18 mov %i0, %o2
200fd44: 92 10 00 11 mov %l1, %o1
200fd48: 40 00 2b 0d call 201a97c <__divdi3>
200fd4c: 96 10 00 1a mov %i2, %o3
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
200fd50: a2 10 00 1b mov %i3, %l1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200fd54: a0 10 00 09 mov %o1, %l0
if ( start_offset ) {
200fd58: 80 a4 a0 00 cmp %l2, 0
200fd5c: 02 80 00 1b be 200fdc8 <IMFS_memfile_read+0xec>
200fd60: b0 10 20 00 clr %i0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200fd64: 83 36 a0 02 srl %i2, 2, %g1
200fd68: 82 00 7f ff add %g1, -1, %g1
200fd6c: 80 a2 40 01 cmp %o1, %g1
200fd70: 28 80 00 72 bleu,a 200ff38 <IMFS_memfile_read+0x25c>
200fd74: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200fd78: 90 10 00 1d mov %i5, %o0
200fd7c: 7f ff fc 91 call 200efc0 <IMFS_memfile_get_block_pointer.part.0>
200fd80: 94 10 20 00 clr %o2
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 );
if ( !block_ptr )
200fd84: 80 a2 20 00 cmp %o0, 0
200fd88: 02 80 00 34 be 200fe58 <IMFS_memfile_read+0x17c> <== NEVER TAKEN
200fd8c: b0 10 20 00 clr %i0
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
200fd90: b4 26 80 12 sub %i2, %l2, %i2
200fd94: 80 a7 00 1a cmp %i4, %i2
200fd98: 08 80 00 03 bleu 200fda4 <IMFS_memfile_read+0xc8>
200fd9c: b0 10 00 1c mov %i4, %i0
200fda0: b0 10 00 1a mov %i2, %i0
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
200fda4: d2 02 00 00 ld [ %o0 ], %o1
200fda8: 94 10 00 18 mov %i0, %o2
200fdac: 90 10 00 1b mov %i3, %o0
200fdb0: 40 00 08 64 call 2011f40 <memcpy>
200fdb4: 92 02 40 12 add %o1, %l2, %o1
dest += to_copy;
block++;
my_length -= to_copy;
200fdb8: f4 06 60 84 ld [ %i1 + 0x84 ], %i2
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
200fdbc: a2 06 c0 18 add %i3, %i0, %l1
block++;
200fdc0: a0 04 20 01 inc %l0
my_length -= to_copy;
200fdc4: 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 ) {
200fdc8: 80 a7 00 1a cmp %i4, %i2
200fdcc: 0a 80 00 2c bcs 200fe7c <IMFS_memfile_read+0x1a0>
200fdd0: b7 2c 20 02 sll %l0, 2, %i3
200fdd4: 10 80 00 13 b 200fe20 <IMFS_memfile_read+0x144>
200fdd8: 82 10 00 1a mov %i2, %g1
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200fddc: 80 a0 60 00 cmp %g1, 0
200fde0: 02 80 00 1e be 200fe58 <IMFS_memfile_read+0x17c> <== NEVER TAKEN
200fde4: 82 00 40 1b add %g1, %i3, %g1
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200fde8: 90 10 00 11 mov %l1, %o0
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
200fdec: 80 a0 60 00 cmp %g1, 0
200fdf0: 02 80 00 1a be 200fe58 <IMFS_memfile_read+0x17c> <== NEVER TAKEN
200fdf4: 94 10 00 1a mov %i2, %o2
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200fdf8: d2 00 40 00 ld [ %g1 ], %o1
200fdfc: 40 00 08 51 call 2011f40 <memcpy>
200fe00: b8 27 00 1a sub %i4, %i2, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200fe04: c2 06 60 84 ld [ %i1 + 0x84 ], %g1
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
200fe08: a2 04 40 1a add %l1, %i2, %l1
block++;
200fe0c: a0 04 20 01 inc %l0
my_length -= to_copy;
copied += to_copy;
200fe10: b0 06 00 1a add %i0, %i2, %i0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200fe14: 80 a0 40 1c cmp %g1, %i4
200fe18: 18 80 00 1a bgu 200fe80 <IMFS_memfile_read+0x1a4>
200fe1c: b6 06 e0 04 add %i3, 4, %i3
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200fe20: 83 30 60 02 srl %g1, 2, %g1
200fe24: 82 00 7f ff add %g1, -1, %g1
200fe28: 80 a4 00 01 cmp %l0, %g1
200fe2c: 28 bf ff ec bleu,a 200fddc <IMFS_memfile_read+0x100> <== ALWAYS TAKEN
200fe30: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200fe34: 94 10 20 00 clr %o2 <== NOT EXECUTED
200fe38: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
200fe3c: 7f ff fc 61 call 200efc0 <IMFS_memfile_get_block_pointer.part.0><== NOT EXECUTED
200fe40: 90 10 00 1d mov %i5, %o0 <== 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 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200fe44: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200fe48: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
200fe4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200fe50: 12 bf ff ea bne 200fdf8 <IMFS_memfile_read+0x11c> <== NOT EXECUTED
200fe54: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
200fe58: 81 c7 e0 08 ret <== NOT EXECUTED
200fe5c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
200fe60: 12 bf ff af bne 200fd1c <IMFS_memfile_read+0x40> <== NEVER TAKEN
200fe64: 33 00 80 7c sethi %hi(0x201f000), %i1
200fe68: 80 a6 80 04 cmp %i2, %g4
200fe6c: 08 bf ff ad bleu 200fd20 <IMFS_memfile_read+0x44>
200fe70: f4 06 60 84 ld [ %i1 + 0x84 ], %i2
my_length = the_jnode->info.file.size - start;
200fe74: 10 bf ff aa b 200fd1c <IMFS_memfile_read+0x40>
200fe78: b8 21 00 01 sub %g4, %g1, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200fe7c: 82 10 00 1a mov %i2, %g1
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200fe80: 80 a7 20 00 cmp %i4, 0
200fe84: 02 80 00 14 be 200fed4 <IMFS_memfile_read+0x1f8>
200fe88: 90 07 bf f8 add %fp, -8, %o0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200fe8c: 83 30 60 02 srl %g1, 2, %g1
200fe90: 82 00 7f ff add %g1, -1, %g1
200fe94: 80 a0 40 10 cmp %g1, %l0
200fe98: 2a 80 00 3e bcs,a 200ff90 <IMFS_memfile_read+0x2b4>
200fe9c: 90 10 00 1d mov %i5, %o0
p = info->indirect;
200fea0: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200fea4: 91 2c 20 02 sll %l0, 2, %o0
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200fea8: 80 a0 60 00 cmp %g1, 0
200feac: 02 bf ff eb be 200fe58 <IMFS_memfile_read+0x17c> <== NEVER TAKEN
200feb0: 90 00 40 08 add %g1, %o0, %o0
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
200feb4: 80 a2 20 00 cmp %o0, 0
200feb8: 02 bf ff e8 be 200fe58 <IMFS_memfile_read+0x17c> <== NEVER TAKEN
200febc: 94 10 00 1c mov %i4, %o2
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
200fec0: d2 02 00 00 ld [ %o0 ], %o1
200fec4: 90 10 00 11 mov %l1, %o0
200fec8: 40 00 08 1e call 2011f40 <memcpy>
200fecc: b0 06 00 1c add %i0, %i4, %i0
copied += my_length;
}
IMFS_update_atime( the_jnode );
200fed0: 90 07 bf f8 add %fp, -8, %o0
200fed4: 7f ff cd 31 call 2003398 <gettimeofday>
200fed8: 92 10 20 00 clr %o1
200fedc: c2 07 bf f8 ld [ %fp + -8 ], %g1
200fee0: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return copied;
}
200fee4: 81 c7 e0 08 ret
200fee8: 81 e8 00 00 restore
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
200feec: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4
200fef0: 82 10 20 00 clr %g1
200fef4: 86 a3 40 1a subcc %o5, %i2, %g3
200fef8: 84 63 00 19 subx %o4, %i1, %g2
200fefc: 80 a0 40 02 cmp %g1, %g2
200ff00: 04 80 00 14 ble 200ff50 <IMFS_memfile_read+0x274> <== ALWAYS TAKEN
200ff04: d2 06 20 58 ld [ %i0 + 0x58 ], %o1
my_length = the_jnode->info.linearfile.size - start;
200ff08: b0 23 40 11 sub %o5, %l1, %i0 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
200ff0c: 92 02 40 11 add %o1, %l1, %o1
200ff10: 94 10 00 18 mov %i0, %o2
200ff14: 40 00 08 0b call 2011f40 <memcpy>
200ff18: 90 10 00 1b mov %i3, %o0
IMFS_update_atime( the_jnode );
200ff1c: 90 07 bf f8 add %fp, -8, %o0
200ff20: 7f ff cd 1e call 2003398 <gettimeofday>
200ff24: 92 10 20 00 clr %o1
200ff28: c2 07 bf f8 ld [ %fp + -8 ], %g1
200ff2c: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return my_length;
200ff30: 81 c7 e0 08 ret
200ff34: 81 e8 00 00 restore
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200ff38: 91 2a 60 02 sll %o1, 2, %o0
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200ff3c: 80 a0 60 00 cmp %g1, 0
200ff40: 12 bf ff 91 bne 200fd84 <IMFS_memfile_read+0xa8> <== ALWAYS TAKEN
200ff44: 90 00 40 08 add %g1, %o0, %o0
}
IMFS_update_atime( the_jnode );
return copied;
}
200ff48: 81 c7 e0 08 ret <== NOT EXECUTED
200ff4c: 81 e8 00 00 restore <== 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))
200ff50: 12 80 00 04 bne 200ff60 <IMFS_memfile_read+0x284> <== NEVER TAKEN
200ff54: 80 a7 00 03 cmp %i4, %g3
200ff58: 38 bf ff ed bgu,a 200ff0c <IMFS_memfile_read+0x230> <== ALWAYS TAKEN
200ff5c: b0 23 40 11 sub %o5, %l1, %i0
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200ff60: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
200ff64: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200ff68: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200ff6c: 40 00 07 f5 call 2011f40 <memcpy> <== NOT EXECUTED
200ff70: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
IMFS_update_atime( the_jnode );
200ff74: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
200ff78: 7f ff cd 08 call 2003398 <gettimeofday> <== NOT EXECUTED
200ff7c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200ff80: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
200ff84: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
return my_length;
200ff88: 81 c7 e0 08 ret <== NOT EXECUTED
200ff8c: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200ff90: 92 10 00 10 mov %l0, %o1
200ff94: 7f ff fc 0b call 200efc0 <IMFS_memfile_get_block_pointer.part.0>
200ff98: 94 10 20 00 clr %o2
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
200ff9c: 10 bf ff c7 b 200feb8 <IMFS_memfile_read+0x1dc>
200ffa0: 80 a2 20 00 cmp %o0, 0
0200f948 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
200f948: 9d e3 bf a0 save %sp, -96, %sp
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
200f94c: 29 00 80 7c sethi %hi(0x201f000), %l4
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200f950: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
/*
* 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;
200f954: f4 05 20 84 ld [ %l4 + 0x84 ], %i2
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200f958: 80 a2 20 00 cmp %o0, 0
200f95c: 02 80 00 1b be 200f9c8 <IMFS_memfile_remove+0x80>
200f960: b5 36 a0 02 srl %i2, 2, %i2
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200f964: 80 a6 a0 00 cmp %i2, 0
200f968: 02 80 00 12 be 200f9b0 <IMFS_memfile_remove+0x68> <== NEVER TAKEN
200f96c: 27 00 80 7c sethi %hi(0x201f000), %l3
200f970: ba 10 00 08 mov %o0, %i5
200f974: b8 10 20 00 clr %i4
if ( b[i] ) {
200f978: c2 07 40 00 ld [ %i5 ], %g1
200f97c: 90 90 60 00 orcc %g1, 0, %o0
200f980: 02 80 00 08 be 200f9a0 <IMFS_memfile_remove+0x58>
200f984: b8 07 20 01 inc %i4
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f988: 7f ff ce 5a call 20032f0 <free>
200f98c: 01 00 00 00 nop
memfile_blocks_allocated--;
200f990: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1
200f994: 82 00 7f ff add %g1, -1, %g1
200f998: c2 24 e1 94 st %g1, [ %l3 + 0x194 ]
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200f99c: c0 27 40 00 clr [ %i5 ]
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200f9a0: 80 a6 80 1c cmp %i2, %i4
200f9a4: 12 bf ff f5 bne 200f978 <IMFS_memfile_remove+0x30>
200f9a8: ba 07 60 04 add %i5, 4, %i5
200f9ac: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f9b0: 7f ff ce 50 call 20032f0 <free>
200f9b4: 01 00 00 00 nop
memfile_blocks_allocated--;
200f9b8: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
*block_table = 0;
200f9bc: c0 26 20 58 clr [ %i0 + 0x58 ]
void memfile_free_block(
void *memory
)
{
free(memory);
memfile_blocks_allocated--;
200f9c0: 82 00 7f ff add %g1, -1, %g1
200f9c4: c2 24 e1 94 st %g1, [ %l3 + 0x194 ]
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
200f9c8: fa 06 20 5c ld [ %i0 + 0x5c ], %i5
200f9cc: 80 a7 60 00 cmp %i5, 0
200f9d0: 02 80 00 48 be 200faf0 <IMFS_memfile_remove+0x1a8>
200f9d4: c2 05 20 84 ld [ %l4 + 0x84 ], %g1
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200f9d8: 83 30 60 02 srl %g1, 2, %g1
200f9dc: 80 a0 60 00 cmp %g1, 0
200f9e0: 02 80 00 2c be 200fa90 <IMFS_memfile_remove+0x148> <== NEVER TAKEN
200f9e4: 27 00 80 7c sethi %hi(0x201f000), %l3
200f9e8: 25 00 80 7c sethi %hi(0x201f000), %l2
200f9ec: a0 10 20 00 clr %l0
200f9f0: b2 10 20 00 clr %i1
200f9f4: a4 14 a0 84 or %l2, 0x84, %l2
200f9f8: a2 10 00 13 mov %l3, %l1
if ( info->doubly_indirect[i] ) {
200f9fc: a1 2c 20 02 sll %l0, 2, %l0
200fa00: d0 07 40 10 ld [ %i5 + %l0 ], %o0
200fa04: 80 a2 20 00 cmp %o0, 0
200fa08: 02 80 00 1c be 200fa78 <IMFS_memfile_remove+0x130> <== NEVER TAKEN
200fa0c: a0 07 40 10 add %i5, %l0, %l0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fa10: 80 a6 a0 00 cmp %i2, 0
200fa14: 02 80 00 12 be 200fa5c <IMFS_memfile_remove+0x114> <== NEVER TAKEN
200fa18: b6 14 61 94 or %l1, 0x194, %i3
200fa1c: ba 10 00 08 mov %o0, %i5
200fa20: b8 10 20 00 clr %i4
if ( b[i] ) {
200fa24: c2 07 40 00 ld [ %i5 ], %g1
200fa28: 90 90 60 00 orcc %g1, 0, %o0
200fa2c: 02 80 00 08 be 200fa4c <IMFS_memfile_remove+0x104> <== NEVER TAKEN
200fa30: b8 07 20 01 inc %i4
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fa34: 7f ff ce 2f call 20032f0 <free>
200fa38: 01 00 00 00 nop
memfile_blocks_allocated--;
200fa3c: c2 06 c0 00 ld [ %i3 ], %g1
200fa40: 82 00 7f ff add %g1, -1, %g1
200fa44: c2 26 c0 00 st %g1, [ %i3 ]
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200fa48: c0 27 40 00 clr [ %i5 ]
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fa4c: 80 a7 00 1a cmp %i4, %i2
200fa50: 12 bf ff f5 bne 200fa24 <IMFS_memfile_remove+0xdc>
200fa54: ba 07 60 04 add %i5, 4, %i5
200fa58: d0 04 00 00 ld [ %l0 ], %o0
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fa5c: 7f ff ce 25 call 20032f0 <free>
200fa60: 01 00 00 00 nop
memfile_blocks_allocated--;
200fa64: c2 04 61 94 ld [ %l1 + 0x194 ], %g1
200fa68: 82 00 7f ff add %g1, -1, %g1
200fa6c: c2 24 61 94 st %g1, [ %l1 + 0x194 ]
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
*block_table = 0;
200fa70: c0 24 00 00 clr [ %l0 ]
200fa74: fa 06 20 5c ld [ %i0 + 0x5c ], %i5
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200fa78: c2 04 80 00 ld [ %l2 ], %g1
200fa7c: b2 06 60 01 inc %i1
200fa80: 83 30 60 02 srl %g1, 2, %g1
200fa84: 80 a6 40 01 cmp %i1, %g1
200fa88: 0a bf ff dd bcs 200f9fc <IMFS_memfile_remove+0xb4>
200fa8c: a0 10 00 19 mov %i1, %l0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fa90: 80 a6 a0 00 cmp %i2, 0
200fa94: 02 80 00 11 be 200fad8 <IMFS_memfile_remove+0x190> <== NEVER TAKEN
200fa98: 01 00 00 00 nop
200fa9c: b8 10 20 00 clr %i4 ! 0 <PROM_START>
if ( b[i] ) {
200faa0: c2 07 40 00 ld [ %i5 ], %g1
200faa4: 90 90 60 00 orcc %g1, 0, %o0
200faa8: 02 80 00 08 be 200fac8 <IMFS_memfile_remove+0x180> <== ALWAYS TAKEN
200faac: b8 07 20 01 inc %i4
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fab0: 7f ff ce 10 call 20032f0 <free> <== NOT EXECUTED
200fab4: 01 00 00 00 nop <== NOT EXECUTED
memfile_blocks_allocated--;
200fab8: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 <== NOT EXECUTED
200fabc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200fac0: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] <== NOT EXECUTED
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200fac4: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fac8: 80 a7 00 1a cmp %i4, %i2
200facc: 12 bf ff f5 bne 200faa0 <IMFS_memfile_remove+0x158>
200fad0: ba 07 60 04 add %i5, 4, %i5
200fad4: fa 06 20 5c ld [ %i0 + 0x5c ], %i5
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fad8: 7f ff ce 06 call 20032f0 <free>
200fadc: 90 10 00 1d mov %i5, %o0
memfile_blocks_allocated--;
200fae0: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
*block_table = 0;
200fae4: c0 26 20 5c clr [ %i0 + 0x5c ]
void memfile_free_block(
void *memory
)
{
free(memory);
memfile_blocks_allocated--;
200fae8: 82 00 7f ff add %g1, -1, %g1
200faec: c2 24 e1 94 st %g1, [ %l3 + 0x194 ]
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
200faf0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
200faf4: 82 92 20 00 orcc %o0, 0, %g1
200faf8: 02 80 00 75 be 200fccc <IMFS_memfile_remove+0x384>
200fafc: c4 05 20 84 ld [ %l4 + 0x84 ], %g2
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200fb00: 85 30 a0 02 srl %g2, 2, %g2
200fb04: 80 a0 a0 00 cmp %g2, 0
200fb08: 02 80 00 58 be 200fc68 <IMFS_memfile_remove+0x320> <== NEVER TAKEN
200fb0c: 27 00 80 7c sethi %hi(0x201f000), %l3
p = (block_p *) info->triply_indirect[i];
200fb10: e2 00 40 00 ld [ %g1 ], %l1
if ( !p ) /* ensure we have a valid pointer */
200fb14: 80 a4 60 00 cmp %l1, 0
200fb18: 02 80 00 55 be 200fc6c <IMFS_memfile_remove+0x324> <== NEVER TAKEN
200fb1c: 80 a6 a0 00 cmp %i2, 0
200fb20: 25 00 80 7c sethi %hi(0x201f000), %l2
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200fb24: aa 10 20 00 clr %l5
if ( !p ) /* ensure we have a valid pointer */
200fb28: a8 10 20 00 clr %l4
200fb2c: b6 14 e1 94 or %l3, 0x194, %i3
200fb30: a4 14 a0 84 or %l2, 0x84, %l2
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200fb34: 80 a0 a0 00 cmp %g2, 0
200fb38: 02 80 00 28 be 200fbd8 <IMFS_memfile_remove+0x290> <== NEVER TAKEN
200fb3c: b2 10 20 00 clr %i1
200fb40: a0 10 20 00 clr %l0
if ( p[j] ) {
200fb44: a1 2c 20 02 sll %l0, 2, %l0
200fb48: d0 04 40 10 ld [ %l1 + %l0 ], %o0
200fb4c: 80 a2 20 00 cmp %o0, 0
200fb50: 02 80 00 1b be 200fbbc <IMFS_memfile_remove+0x274> <== NEVER TAKEN
200fb54: a0 04 40 10 add %l1, %l0, %l0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fb58: 80 a6 a0 00 cmp %i2, 0
200fb5c: 02 80 00 12 be 200fba4 <IMFS_memfile_remove+0x25c> <== NEVER TAKEN
200fb60: 01 00 00 00 nop
200fb64: ba 10 00 08 mov %o0, %i5
200fb68: b8 10 20 00 clr %i4
if ( b[i] ) {
200fb6c: c2 07 40 00 ld [ %i5 ], %g1
200fb70: 90 90 60 00 orcc %g1, 0, %o0
200fb74: 02 80 00 08 be 200fb94 <IMFS_memfile_remove+0x24c>
200fb78: b8 07 20 01 inc %i4
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fb7c: 7f ff cd dd call 20032f0 <free>
200fb80: 01 00 00 00 nop
memfile_blocks_allocated--;
200fb84: c2 06 c0 00 ld [ %i3 ], %g1
200fb88: 82 00 7f ff add %g1, -1, %g1
200fb8c: c2 26 c0 00 st %g1, [ %i3 ]
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200fb90: c0 27 40 00 clr [ %i5 ]
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fb94: 80 a7 00 1a cmp %i4, %i2
200fb98: 12 bf ff f5 bne 200fb6c <IMFS_memfile_remove+0x224>
200fb9c: ba 07 60 04 add %i5, 4, %i5
200fba0: d0 04 00 00 ld [ %l0 ], %o0
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fba4: 7f ff cd d3 call 20032f0 <free>
200fba8: 01 00 00 00 nop
memfile_blocks_allocated--;
200fbac: c2 06 c0 00 ld [ %i3 ], %g1
200fbb0: 82 00 7f ff add %g1, -1, %g1
200fbb4: c2 26 c0 00 st %g1, [ %i3 ]
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
*block_table = 0;
200fbb8: c0 24 00 00 clr [ %l0 ]
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++ ) {
200fbbc: c2 04 80 00 ld [ %l2 ], %g1
200fbc0: b2 06 60 01 inc %i1
200fbc4: 83 30 60 02 srl %g1, 2, %g1
200fbc8: 80 a6 40 01 cmp %i1, %g1
200fbcc: 0a bf ff de bcs 200fb44 <IMFS_memfile_remove+0x1fc>
200fbd0: a0 10 00 19 mov %i1, %l0
200fbd4: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
200fbd8: b2 00 40 15 add %g1, %l5, %i1
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fbdc: 80 a6 a0 00 cmp %i2, 0
200fbe0: 02 80 00 12 be 200fc28 <IMFS_memfile_remove+0x2e0> <== NEVER TAKEN
200fbe4: d0 00 40 15 ld [ %g1 + %l5 ], %o0
200fbe8: ba 10 00 08 mov %o0, %i5
200fbec: b8 10 20 00 clr %i4
if ( b[i] ) {
200fbf0: c2 07 40 00 ld [ %i5 ], %g1
200fbf4: 90 90 60 00 orcc %g1, 0, %o0
200fbf8: 02 80 00 08 be 200fc18 <IMFS_memfile_remove+0x2d0> <== ALWAYS TAKEN
200fbfc: b8 07 20 01 inc %i4
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fc00: 7f ff cd bc call 20032f0 <free> <== NOT EXECUTED
200fc04: 01 00 00 00 nop <== NOT EXECUTED
memfile_blocks_allocated--;
200fc08: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
200fc0c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200fc10: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200fc14: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fc18: 80 a7 00 1a cmp %i4, %i2
200fc1c: 12 bf ff f5 bne 200fbf0 <IMFS_memfile_remove+0x2a8>
200fc20: ba 07 60 04 add %i5, 4, %i5
200fc24: d0 06 40 00 ld [ %i1 ], %o0
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fc28: 7f ff cd b2 call 20032f0 <free>
200fc2c: a8 05 20 01 inc %l4
memfile_blocks_allocated--;
200fc30: c2 06 c0 00 ld [ %i3 ], %g1
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200fc34: c4 04 80 00 ld [ %l2 ], %g2
void memfile_free_block(
void *memory
)
{
free(memory);
memfile_blocks_allocated--;
200fc38: 82 00 7f ff add %g1, -1, %g1
200fc3c: c2 26 c0 00 st %g1, [ %i3 ]
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200fc40: 85 30 a0 02 srl %g2, 2, %g2
200fc44: 80 a5 00 02 cmp %l4, %g2
200fc48: 1a 80 00 23 bcc 200fcd4 <IMFS_memfile_remove+0x38c>
200fc4c: c0 26 40 00 clr [ %i1 ]
p = (block_p *) info->triply_indirect[i];
200fc50: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
200fc54: ab 2d 20 02 sll %l4, 2, %l5
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200fc58: e2 00 40 15 ld [ %g1 + %l5 ], %l1
if ( !p ) /* ensure we have a valid pointer */
200fc5c: 80 a4 60 00 cmp %l1, 0
200fc60: 12 bf ff b5 bne 200fb34 <IMFS_memfile_remove+0x1ec> <== ALWAYS TAKEN
200fc64: 90 10 00 01 mov %g1, %o0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fc68: 80 a6 a0 00 cmp %i2, 0
200fc6c: 02 80 00 12 be 200fcb4 <IMFS_memfile_remove+0x36c> <== NEVER TAKEN
200fc70: 01 00 00 00 nop
200fc74: ba 10 00 08 mov %o0, %i5
200fc78: b8 10 20 00 clr %i4
if ( b[i] ) {
200fc7c: c2 07 40 00 ld [ %i5 ], %g1
200fc80: 90 90 60 00 orcc %g1, 0, %o0
200fc84: 02 80 00 08 be 200fca4 <IMFS_memfile_remove+0x35c> <== ALWAYS TAKEN
200fc88: b8 07 20 01 inc %i4
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fc8c: 7f ff cd 99 call 20032f0 <free> <== NOT EXECUTED
200fc90: 01 00 00 00 nop <== NOT EXECUTED
memfile_blocks_allocated--;
200fc94: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1 <== NOT EXECUTED
200fc98: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200fc9c: c2 24 e1 94 st %g1, [ %l3 + 0x194 ] <== NOT EXECUTED
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200fca0: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200fca4: 80 a7 00 1a cmp %i4, %i2
200fca8: 12 bf ff f5 bne 200fc7c <IMFS_memfile_remove+0x334>
200fcac: ba 07 60 04 add %i5, 4, %i5
200fcb0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200fcb4: 7f ff cd 8f call 20032f0 <free>
200fcb8: 01 00 00 00 nop
memfile_blocks_allocated--;
200fcbc: c2 04 e1 94 ld [ %l3 + 0x194 ], %g1
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
*block_table = 0;
200fcc0: c0 26 20 60 clr [ %i0 + 0x60 ]
void memfile_free_block(
void *memory
)
{
free(memory);
memfile_blocks_allocated--;
200fcc4: 82 00 7f ff add %g1, -1, %g1
200fcc8: c2 24 e1 94 st %g1, [ %l3 + 0x194 ]
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
200fccc: 81 c7 e0 08 ret
200fcd0: 91 e8 20 00 restore %g0, 0, %o0
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200fcd4: 10 bf ff e5 b 200fc68 <IMFS_memfile_remove+0x320>
200fcd8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
0200f844 <IMFS_memfile_remove_block>:
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
200f844: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200f848: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
200f84c: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 201f084 <imfs_memfile_bytes_per_block><== NOT EXECUTED
200f850: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200f854: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200f858: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200f85c: 18 80 00 11 bgu 200f8a0 <IMFS_memfile_remove_block+0x5c> <== NOT EXECUTED
200f860: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
p = info->indirect;
200f864: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200f868: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200f86c: 02 80 00 04 be 200f87c <IMFS_memfile_remove_block+0x38> <== NOT EXECUTED
200f870: 82 10 20 00 clr %g1 <== NOT EXECUTED
return 0;
return &info->indirect[ my_block ];
200f874: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
200f878: 82 00 80 19 add %g2, %i1, %g1 <== NOT EXECUTED
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
IMFS_assert( block_ptr );
ptr = *block_ptr;
200f87c: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f880: 7f ff ce 9c call 20032f0 <free> <== NOT EXECUTED
200f884: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED
memfile_blocks_allocated--;
200f888: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
200f88c: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
200f890: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
200f894: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
ptr = *block_ptr;
*block_ptr = 0;
memfile_free_block( ptr );
return 1;
}
200f898: 81 c7 e0 08 ret <== NOT EXECUTED
200f89c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200f8a0: 94 10 20 00 clr %o2 <== NOT EXECUTED
200f8a4: 7f ff fd c7 call 200efc0 <IMFS_memfile_get_block_pointer.part.0><== NOT EXECUTED
200f8a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200f8ac: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
IMFS_assert( block_ptr );
ptr = *block_ptr;
200f8b0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f8b4: 7f ff ce 8f call 20032f0 <free> <== NOT EXECUTED
200f8b8: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED
memfile_blocks_allocated--;
200f8bc: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
200f8c0: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
200f8c4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
200f8c8: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
ptr = *block_ptr;
*block_ptr = 0;
memfile_free_block( ptr );
return 1;
}
200f8cc: 81 c7 e0 08 ret <== NOT EXECUTED
200f8d0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
0200ffc8 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200ffc8: 9d e3 bf 98 save %sp, -104, %sp
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
200ffcc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200ffd0: ba 10 00 18 mov %i0, %i5
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
200ffd4: 80 a0 60 00 cmp %g1, 0
200ffd8: 06 80 00 76 bl 20101b0 <IMFS_memfile_write+0x1e8> <== NEVER TAKEN
200ffdc: b0 07 00 1a add %i4, %i2, %i0
200ffe0: 80 a0 60 00 cmp %g1, 0
200ffe4: 02 80 00 6f be 20101a0 <IMFS_memfile_write+0x1d8> <== ALWAYS TAKEN
200ffe8: 23 00 80 7c sethi %hi(0x201f000), %l1
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200ffec: e0 04 60 84 ld [ %l1 + 0x84 ], %l0 ! 201f084 <imfs_memfile_bytes_per_block><== NOT EXECUTED
200fff0: 92 10 00 1a mov %i2, %o1
200fff4: b1 3c 20 1f sra %l0, 0x1f, %i0
200fff8: 96 10 00 10 mov %l0, %o3
200fffc: 94 10 00 18 mov %i0, %o2
2010000: 40 00 2b 45 call 201ad14 <__moddi3>
2010004: 90 10 00 19 mov %i1, %o0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
2010008: 94 10 00 18 mov %i0, %o2
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
201000c: a4 10 00 09 mov %o1, %l2
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
2010010: 90 10 00 19 mov %i1, %o0
2010014: 92 10 00 1a mov %i2, %o1
2010018: 40 00 2a 59 call 201a97c <__divdi3>
201001c: 96 10 00 10 mov %l0, %o3
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
2010020: b0 10 20 00 clr %i0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
2010024: 80 a4 a0 00 cmp %l2, 0
2010028: 12 80 00 27 bne 20100c4 <IMFS_memfile_write+0xfc>
201002c: b4 10 00 09 mov %o1, %i2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
2010030: 80 a7 00 10 cmp %i4, %l0
2010034: 0a 80 00 3f bcs 2010130 <IMFS_memfile_write+0x168>
2010038: b3 2e a0 02 sll %i2, 2, %i1
201003c: 10 80 00 13 b 2010088 <IMFS_memfile_write+0xc0>
2010040: 82 10 00 10 mov %l0, %g1
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
2010044: 80 a2 20 00 cmp %o0, 0
2010048: 02 80 00 1d be 20100bc <IMFS_memfile_write+0xf4> <== NEVER TAKEN
201004c: 90 02 00 19 add %o0, %i1, %o0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
2010050: 92 10 00 1b mov %i3, %o1
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
2010054: 80 a2 20 00 cmp %o0, 0
2010058: 02 80 00 19 be 20100bc <IMFS_memfile_write+0xf4> <== NEVER TAKEN
201005c: 94 10 00 10 mov %l0, %o2
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 );
2010060: d0 02 00 00 ld [ %o0 ], %o0
2010064: 40 00 07 b7 call 2011f40 <memcpy>
2010068: b8 27 00 10 sub %i4, %l0, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
201006c: c2 04 60 84 ld [ %l1 + 0x84 ], %g1
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
2010070: b6 06 c0 10 add %i3, %l0, %i3
block++;
2010074: b4 06 a0 01 inc %i2
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
2010078: b0 06 00 10 add %i0, %l0, %i0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
201007c: 80 a0 40 1c cmp %g1, %i4
2010080: 18 80 00 2d bgu 2010134 <IMFS_memfile_write+0x16c>
2010084: b2 06 60 04 add %i1, 4, %i1
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
2010088: 83 30 60 02 srl %g1, 2, %g1
201008c: 82 00 7f ff add %g1, -1, %g1
2010090: 80 a6 80 01 cmp %i2, %g1
2010094: 28 bf ff ec bleu,a 2010044 <IMFS_memfile_write+0x7c>
2010098: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
201009c: 92 10 00 1a mov %i2, %o1
20100a0: 94 10 20 00 clr %o2
20100a4: 7f ff fb c7 call 200efc0 <IMFS_memfile_get_block_pointer.part.0>
20100a8: 90 10 00 1d mov %i5, %o0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
20100ac: 92 10 00 1b mov %i3, %o1
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
20100b0: 80 a2 20 00 cmp %o0, 0
20100b4: 12 bf ff eb bne 2010060 <IMFS_memfile_write+0x98> <== ALWAYS TAKEN
20100b8: 94 10 00 10 mov %l0, %o2
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
20100bc: 81 c7 e0 08 ret <== NOT EXECUTED
20100c0: 81 e8 00 00 restore <== NOT EXECUTED
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
20100c4: 83 34 20 02 srl %l0, 2, %g1
20100c8: 82 00 7f ff add %g1, -1, %g1
20100cc: 80 a2 40 01 cmp %o1, %g1
20100d0: 18 80 00 4e bgu 2010208 <IMFS_memfile_write+0x240> <== NEVER TAKEN
20100d4: 90 10 00 1d mov %i5, %o0
p = info->indirect;
20100d8: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
20100dc: 91 2a 60 02 sll %o1, 2, %o0
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
20100e0: b0 10 20 00 clr %i0
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
20100e4: 80 a0 60 00 cmp %g1, 0
20100e8: 02 bf ff f5 be 20100bc <IMFS_memfile_write+0xf4> <== NEVER TAKEN
20100ec: 90 00 40 08 add %g1, %o0, %o0
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 );
if ( !block_ptr )
20100f0: 80 a2 20 00 cmp %o0, 0
20100f4: 02 bf ff f2 be 20100bc <IMFS_memfile_write+0xf4> <== NEVER TAKEN
20100f8: b0 10 20 00 clr %i0
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
20100fc: b0 24 00 12 sub %l0, %l2, %i0
2010100: 80 a6 00 1c cmp %i0, %i4
2010104: 18 80 00 45 bgu 2010218 <IMFS_memfile_write+0x250>
2010108: d0 02 00 00 ld [ %o0 ], %o0
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
201010c: 92 10 00 1b mov %i3, %o1
2010110: 90 02 00 12 add %o0, %l2, %o0
2010114: 94 10 00 18 mov %i0, %o2
2010118: 40 00 07 8a call 2011f40 <memcpy>
201011c: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
2010120: b4 06 a0 01 inc %i2
my_length -= to_copy;
2010124: b8 27 00 18 sub %i4, %i0, %i4
copied += to_copy;
2010128: 10 bf ff c2 b 2010030 <IMFS_memfile_write+0x68>
201012c: e0 04 60 84 ld [ %l1 + 0x84 ], %l0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
2010130: 82 10 00 10 mov %l0, %g1
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
2010134: 80 a7 20 00 cmp %i4, 0
2010138: 02 80 00 13 be 2010184 <IMFS_memfile_write+0x1bc>
201013c: 90 07 bf f8 add %fp, -8, %o0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
2010140: 83 30 60 02 srl %g1, 2, %g1
2010144: 82 00 7f ff add %g1, -1, %g1
2010148: 80 a6 80 01 cmp %i2, %g1
201014c: 28 80 00 3d bleu,a 2010240 <IMFS_memfile_write+0x278> <== ALWAYS TAKEN
2010150: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
2010154: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010158: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201015c: 7f ff fb 99 call 200efc0 <IMFS_memfile_get_block_pointer.part.0><== NOT EXECUTED
2010160: 94 10 20 00 clr %o2 <== NOT EXECUTED
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
2010164: 80 a2 20 00 cmp %o0, 0
2010168: 02 bf ff d5 be 20100bc <IMFS_memfile_write+0xf4> <== NEVER TAKEN
201016c: 92 10 00 1b mov %i3, %o1
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
2010170: d0 02 00 00 ld [ %o0 ], %o0
2010174: 94 10 00 1c mov %i4, %o2
2010178: 40 00 07 72 call 2011f40 <memcpy>
201017c: b0 06 00 1c add %i0, %i4, %i0
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
2010180: 90 07 bf f8 add %fp, -8, %o0
2010184: 7f ff cc 85 call 2003398 <gettimeofday>
2010188: 92 10 20 00 clr %o1
201018c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2010190: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
2010194: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
return copied;
}
2010198: 81 c7 e0 08 ret
201019c: 81 e8 00 00 restore
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
20101a0: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
20101a4: 80 a0 40 18 cmp %g1, %i0
20101a8: 1a bf ff 92 bcc 200fff0 <IMFS_memfile_write+0x28>
20101ac: e0 04 60 84 ld [ %l1 + 0x84 ], %l0
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
20101b0: 23 00 80 7c sethi %hi(0x201f000), %l1
20101b4: e4 04 60 84 ld [ %l1 + 0x84 ], %l2 ! 201f084 <imfs_memfile_bytes_per_block>
20101b8: a1 34 a0 02 srl %l2, 2, %l0
20101bc: 92 10 00 10 mov %l0, %o1
20101c0: 40 00 28 5d call 201a334 <.umul>
20101c4: 90 04 20 01 add %l0, 1, %o0
20101c8: 92 10 00 10 mov %l0, %o1
20101cc: 40 00 28 5a call 201a334 <.umul>
20101d0: 90 02 20 01 inc %o0
20101d4: 92 10 00 12 mov %l2, %o1
20101d8: 40 00 28 57 call 201a334 <.umul>
20101dc: 90 02 3f ff add %o0, -1, %o0
20101e0: 80 a2 00 18 cmp %o0, %i0
20101e4: 08 80 00 1d bleu 2010258 <IMFS_memfile_write+0x290>
20101e8: 90 10 00 1d mov %i5, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
20101ec: 92 10 20 00 clr %o1
20101f0: 7f ff fc 16 call 200f248 <IMFS_memfile_extend.part.1>
20101f4: 94 10 00 18 mov %i0, %o2
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
20101f8: 80 a2 20 00 cmp %o0, 0
20101fc: 02 bf ff 7d be 200fff0 <IMFS_memfile_write+0x28> <== ALWAYS TAKEN
2010200: e0 04 60 84 ld [ %l1 + 0x84 ], %l0
2010204: 30 80 00 19 b,a 2010268 <IMFS_memfile_write+0x2a0> <== NOT EXECUTED
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
2010208: 7f ff fb 6e call 200efc0 <IMFS_memfile_get_block_pointer.part.0><== NOT EXECUTED
201020c: 94 10 20 00 clr %o2 <== 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 );
if ( !block_ptr )
2010210: 10 bf ff b9 b 20100f4 <IMFS_memfile_write+0x12c> <== NOT EXECUTED
2010214: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
2010218: b0 10 00 1c mov %i4, %i0
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
201021c: 92 10 00 1b mov %i3, %o1
2010220: 90 02 00 12 add %o0, %l2, %o0
2010224: 94 10 00 18 mov %i0, %o2
2010228: 40 00 07 46 call 2011f40 <memcpy>
201022c: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
2010230: b4 06 a0 01 inc %i2
my_length -= to_copy;
2010234: b8 27 00 18 sub %i4, %i0, %i4
copied += to_copy;
2010238: 10 bf ff 7e b 2010030 <IMFS_memfile_write+0x68>
201023c: e0 04 60 84 ld [ %l1 + 0x84 ], %l0
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
2010240: b5 2e a0 02 sll %i2, 2, %i2
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
2010244: 80 a0 60 00 cmp %g1, 0
2010248: 12 bf ff c7 bne 2010164 <IMFS_memfile_write+0x19c> <== ALWAYS TAKEN
201024c: 90 00 40 1a add %g1, %i2, %o0
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
2010250: 81 c7 e0 08 ret <== NOT EXECUTED
2010254: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
2010258: 40 00 04 de call 20115d0 <__errno>
201025c: 01 00 00 00 nop
2010260: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2010264: c2 22 00 00 st %g1, [ %o0 ]
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
2010268: 40 00 04 da call 20115d0 <__errno>
201026c: b0 10 3f ff mov -1, %i0
2010270: 82 10 20 1c mov 0x1c, %g1
2010274: c2 22 00 00 st %g1, [ %o0 ]
2010278: 81 c7 e0 08 ret
201027c: 81 e8 00 00 restore
0200294c <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
200294c: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2002950: c2 06 20 08 ld [ %i0 + 8 ], %g1
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002954: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
2002958: 80 a0 a0 01 cmp %g2, 1
200295c: 12 80 00 05 bne 2002970 <IMFS_mount+0x24> <== NEVER TAKEN
2002960: 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;
2002964: f0 20 60 5c st %i0, [ %g1 + 0x5c ]
return 0;
}
2002968: 81 c7 e0 08 ret
200296c: 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 );
2002970: 40 00 3b 18 call 20115d0 <__errno> <== NOT EXECUTED
2002974: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002978: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
200297c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002980: 81 c7 e0 08 ret <== NOT EXECUTED
2002984: 81 e8 00 00 restore <== NOT EXECUTED
02005504 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
2005504: 9d e3 bf a0 save %sp, -96, %sp
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
2005508: 3b 00 80 9b sethi %hi(0x2026c00), %i5
200550c: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 ! 2026de8 <_impure_ptr>
2005510: 90 06 20 0c add %i0, 0xc, %o0
2005514: 40 00 44 c6 call 201682c <fputs>
2005518: d2 00 60 08 ld [ %g1 + 8 ], %o1
switch( the_jnode->type ) {
200551c: f4 06 20 4c ld [ %i0 + 0x4c ], %i2
2005520: 80 a6 a0 07 cmp %i2, 7
2005524: 08 80 00 07 bleu 2005540 <IMFS_print_jnode+0x3c> <== ALWAYS TAKEN
2005528: 83 2e a0 02 sll %i2, 2, %g1
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
200552c: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1 <== NOT EXECUTED
2005530: 33 00 80 93 sethi %hi(0x2024c00), %i1 <== NOT EXECUTED
2005534: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED
2005538: 40 00 44 6c call 20166e8 <fprintf> <== NOT EXECUTED
200553c: 93 ee 62 70 restore %i1, 0x270, %o1 <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
2005540: 05 00 80 15 sethi %hi(0x2005400), %g2
2005544: 84 10 a0 e4 or %g2, 0xe4, %g2 ! 20054e4 <console_inbyte_nonblocking+0xac>
2005548: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200554c: 81 c0 40 00 jmp %g1
2005550: 01 00 00 00 nop
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2005554: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1
2005558: 31 00 80 93 sethi %hi(0x2024c00), %i0
200555c: f6 00 60 08 ld [ %g1 + 8 ], %i3
2005560: b0 16 22 40 or %i0, 0x240, %i0
2005564: b2 10 20 01 mov 1, %i1
2005568: 40 00 47 d3 call 20174b4 <fwrite>
200556c: 95 e8 20 13 restore %g0, 0x13, %o2
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
2005570: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1
2005574: 31 00 80 93 sethi %hi(0x2024c00), %i0
2005578: f6 00 60 08 ld [ %g1 + 8 ], %i3
200557c: b0 16 22 58 or %i0, 0x258, %i0
2005580: b2 10 20 01 mov 1, %i1
2005584: 40 00 47 cc call 20174b4 <fwrite>
2005588: 95 e8 20 12 restore %g0, 0x12, %o2
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
200558c: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1
2005590: d4 06 20 54 ld [ %i0 + 0x54 ], %o2
2005594: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005598: 13 00 80 93 sethi %hi(0x2024c00), %o1
200559c: 40 00 44 53 call 20166e8 <fprintf>
20055a0: 92 12 62 30 or %o1, 0x230, %o1 ! 2024e30 <rtems_filesystem_table+0x174c>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
20055a4: 31 00 80 93 sethi %hi(0x2024c00), %i0
20055a8: 40 00 4b c5 call 20184bc <puts>
20055ac: 91 ee 21 b8 restore %i0, 0x1b8, %o0
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
20055b0: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1
20055b4: d4 06 20 54 ld [ %i0 + 0x54 ], %o2
20055b8: d6 06 20 58 ld [ %i0 + 0x58 ], %o3
20055bc: d0 00 60 08 ld [ %g1 + 8 ], %o0
20055c0: 13 00 80 93 sethi %hi(0x2024c00), %o1
20055c4: 40 00 44 49 call 20166e8 <fprintf>
20055c8: 92 12 62 20 or %o1, 0x220, %o1 ! 2024e20 <rtems_filesystem_table+0x173c>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
20055cc: 31 00 80 93 sethi %hi(0x2024c00), %i0
20055d0: 40 00 4b bb call 20184bc <puts>
20055d4: 91 ee 21 b8 restore %i0, 0x1b8, %o0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
20055d8: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1
20055dc: 90 10 20 2f mov 0x2f, %o0
20055e0: d2 00 60 08 ld [ %g1 + 8 ], %o1
20055e4: 40 00 44 5d call 2016758 <fputc>
20055e8: 31 00 80 93 sethi %hi(0x2024c00), %i0
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
20055ec: 40 00 4b b4 call 20184bc <puts>
20055f0: 91 ee 21 b8 restore %i0, 0x1b8, %o0
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
20055f4: c2 07 61 e8 ld [ %i5 + 0x1e8 ], %g1
20055f8: d4 06 20 50 ld [ %i0 + 0x50 ], %o2
20055fc: d6 06 20 54 ld [ %i0 + 0x54 ], %o3
2005600: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005604: 13 00 80 93 sethi %hi(0x2024c00), %o1
2005608: 40 00 44 38 call 20166e8 <fprintf>
200560c: 92 12 62 08 or %o1, 0x208, %o1 ! 2024e08 <rtems_filesystem_table+0x1724>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
2005610: 31 00 80 93 sethi %hi(0x2024c00), %i0
2005614: 40 00 4b aa call 20184bc <puts>
2005618: 91 ee 21 b8 restore %i0, 0x1b8, %o0
02002994 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
2002994: c8 02 00 00 ld [ %o0 ], %g4
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
2002998: 80 a2 a0 00 cmp %o2, 0
200299c: 02 80 00 13 be 20029e8 <IMFS_readlink+0x54> <== NEVER TAKEN
20029a0: 90 10 20 00 clr %o0
20029a4: c2 01 20 50 ld [ %g4 + 0x50 ], %g1
20029a8: c4 48 40 00 ldsb [ %g1 ], %g2
20029ac: 80 a0 a0 00 cmp %g2, 0
20029b0: 02 80 00 0e be 20029e8 <IMFS_readlink+0x54> <== NEVER TAKEN
20029b4: c2 08 40 00 ldub [ %g1 ], %g1
20029b8: 10 80 00 07 b 20029d4 <IMFS_readlink+0x40>
20029bc: 84 10 20 00 clr %g2
20029c0: c2 01 20 50 ld [ %g4 + 0x50 ], %g1
20029c4: c6 48 40 08 ldsb [ %g1 + %o0 ], %g3
20029c8: 80 a0 e0 00 cmp %g3, 0
20029cc: 02 80 00 07 be 20029e8 <IMFS_readlink+0x54>
20029d0: c2 08 40 08 ldub [ %g1 + %o0 ], %g1
buf[i] = node->info.sym_link.name[i];
20029d4: c2 2a 40 02 stb %g1, [ %o1 + %g2 ]
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20029d8: 90 02 20 01 inc %o0
20029dc: 80 a2 00 0a cmp %o0, %o2
20029e0: 12 bf ff f8 bne 20029c0 <IMFS_readlink+0x2c>
20029e4: 84 10 00 08 mov %o0, %g2
buf[i] = node->info.sym_link.name[i];
return i;
}
20029e8: 81 c3 e0 08 retl
020029f0 <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 */
)
{
20029f0: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
20029f4: fa 06 40 00 ld [ %i1 ], %i5
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
20029f8: 92 10 00 1b mov %i3, %o1
20029fc: 90 07 60 0c add %i5, 0xc, %o0
2002a00: 40 00 40 bd call 2012cf4 <strncpy>
2002a04: 94 10 20 20 mov 0x20, %o2
if ( the_jnode->Parent != NULL )
2002a08: c2 07 60 08 ld [ %i5 + 8 ], %g1
2002a0c: 80 a0 60 00 cmp %g1, 0
2002a10: 22 80 00 05 be,a 2002a24 <IMFS_rename+0x34> <== NEVER TAKEN
2002a14: 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 );
2002a18: 40 00 14 e4 call 2007da8 <_Chain_Extract>
2002a1c: 90 10 00 1d mov %i5, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
2002a20: 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 );
2002a24: 92 10 00 1d mov %i5, %o1
2002a28: 90 00 60 50 add %g1, 0x50, %o0
2002a2c: 40 00 14 d4 call 2007d7c <_Chain_Append>
2002a30: c2 27 60 08 st %g1, [ %i5 + 8 ]
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
2002a34: 90 07 bf f8 add %fp, -8, %o0
2002a38: 40 00 02 58 call 2003398 <gettimeofday>
2002a3c: 92 10 20 00 clr %o1
2002a40: c2 07 bf f8 ld [ %fp + -8 ], %g1
2002a44: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
return 0;
}
2002a48: 81 c7 e0 08 ret
2002a4c: 91 e8 20 00 restore %g0, 0, %o0
0200cb18 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200cb18: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = (IMFS_jnode_t *) pathloc->node_access;
200cb1c: fa 06 40 00 ld [ %i1 ], %i5
#include "imfs.h"
void IMFS_create_orphan( IMFS_jnode_t *jnode )
{
if ( jnode->Parent != NULL ) {
200cb20: c2 07 60 08 ld [ %i5 + 8 ], %g1
200cb24: 80 a0 60 00 cmp %g1, 0
200cb28: 22 80 00 06 be,a 200cb40 <IMFS_rmnod+0x28>
200cb2c: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1
200cb30: 7f ff ec 9e call 2007da8 <_Chain_Extract>
200cb34: 90 10 00 1d mov %i5, %o0
rtems_chain_extract( &jnode->Node );
jnode->Parent = NULL;
200cb38: c0 27 60 08 clr [ %i5 + 8 ]
}
--jnode->st_nlink;
200cb3c: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1
IMFS_update_ctime( jnode );
200cb40: 92 10 20 00 clr %o1
if ( jnode->Parent != NULL ) {
rtems_chain_extract( &jnode->Node );
jnode->Parent = NULL;
}
--jnode->st_nlink;
200cb44: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( jnode );
200cb48: 90 07 bf f8 add %fp, -8, %o0
200cb4c: 7f ff da 13 call 2003398 <gettimeofday>
200cb50: c2 37 60 34 sth %g1, [ %i5 + 0x34 ]
200cb54: c2 07 bf f8 ld [ %fp + -8 ], %g1
}
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
200cb58: 90 10 00 1d mov %i5, %o0
200cb5c: 40 00 01 95 call 200d1b0 <rtems_libio_is_file_open>
200cb60: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
200cb64: 80 a2 20 00 cmp %o0, 0
200cb68: 12 80 00 13 bne 200cbb4 <IMFS_rmnod+0x9c>
200cb6c: 01 00 00 00 nop
200cb70: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1
200cb74: 80 a0 60 00 cmp %g1, 0
200cb78: 12 80 00 0f bne 200cbb4 <IMFS_rmnod+0x9c>
200cb7c: 03 00 80 7a sethi %hi(0x201e800), %g1
if ( rtems_filesystem_current.node_access == jnode )
200cb80: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201e970 <rtems_current_user_env>
200cb84: c4 00 60 04 ld [ %g1 + 4 ], %g2
200cb88: 80 a7 40 02 cmp %i5, %g2
200cb8c: 22 80 00 02 be,a 200cb94 <IMFS_rmnod+0x7c> <== NEVER TAKEN
200cb90: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
200cb94: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200cb98: 80 a0 60 04 cmp %g1, 4
200cb9c: 02 80 00 0d be 200cbd0 <IMFS_rmnod+0xb8>
200cba0: 80 a0 60 05 cmp %g1, 5
200cba4: 02 80 00 06 be 200cbbc <IMFS_rmnod+0xa4>
200cba8: 01 00 00 00 nop
break;
default:
break;
}
free( jnode );
200cbac: 7f ff d9 d1 call 20032f0 <free>
200cbb0: 90 10 00 1d mov %i5, %o0
IMFS_create_orphan( jnode );
IMFS_check_node_remove( jnode );
return 0;
}
200cbb4: 81 c7 e0 08 ret
200cbb8: 91 e8 20 00 restore %g0, 0, %o0
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
200cbbc: 40 00 0b 63 call 200f948 <IMFS_memfile_remove>
200cbc0: 90 10 00 1d mov %i5, %o0
break;
default:
break;
}
free( jnode );
200cbc4: 7f ff d9 cb call 20032f0 <free>
200cbc8: 90 10 00 1d mov %i5, %o0
200cbcc: 30 bf ff fa b,a 200cbb4 <IMFS_rmnod+0x9c>
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
200cbd0: 7f ff d9 c8 call 20032f0 <free>
200cbd4: d0 07 60 50 ld [ %i5 + 0x50 ], %o0
break;
default:
break;
}
free( jnode );
200cbd8: 7f ff d9 c6 call 20032f0 <free>
200cbdc: 90 10 00 1d mov %i5, %o0
200cbe0: 30 bf ff f5 b,a 200cbb4 <IMFS_rmnod+0x9c>
0200cc04 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
200cc04: 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;
200cc08: c2 06 00 00 ld [ %i0 ], %g1
switch ( the_jnode->type ) {
200cc0c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
200cc10: 80 a0 a0 07 cmp %g2, 7
200cc14: 08 80 00 08 bleu 200cc34 <IMFS_stat+0x30> <== ALWAYS TAKEN
200cc18: 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 );
200cc1c: 40 00 12 6d call 20115d0 <__errno>
200cc20: b0 10 3f ff mov -1, %i0
200cc24: 82 10 20 86 mov 0x86, %g1
200cc28: c2 22 00 00 st %g1, [ %o0 ]
200cc2c: 81 c7 e0 08 ret
200cc30: 81 e8 00 00 restore
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
200cc34: 07 00 80 32 sethi %hi(0x200c800), %g3
200cc38: 86 10 e3 e4 or %g3, 0x3e4, %g3 ! 200cbe4 <IMFS_rmnod+0xcc>
200cc3c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
200cc40: 81 c0 80 00 jmp %g2
200cc44: 01 00 00 00 nop
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
200cc48: c0 26 60 20 clr [ %i1 + 0x20 ]
200cc4c: c0 26 60 24 clr [ %i1 + 0x24 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
200cc50: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
200cc54: d6 00 60 30 ld [ %g1 + 0x30 ], %o3
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
200cc58: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
200cc5c: f0 10 60 3e lduh [ %g1 + 0x3e ], %i0
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
200cc60: d8 10 60 34 lduh [ %g1 + 0x34 ], %o4
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
200cc64: d4 00 80 00 ld [ %g2 ], %o2
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200cc68: da 00 60 38 ld [ %g1 + 0x38 ], %o5
buf->st_uid = the_jnode->st_uid;
200cc6c: de 10 60 3c lduh [ %g1 + 0x3c ], %o7
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
200cc70: c8 00 60 40 ld [ %g1 + 0x40 ], %g4
buf->st_mtime = the_jnode->stat_mtime;
200cc74: c6 00 60 44 ld [ %g1 + 0x44 ], %g3
buf->st_ctime = the_jnode->stat_ctime;
200cc78: c4 00 60 48 ld [ %g1 + 0x48 ], %g2
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200cc7c: 03 00 80 7a sethi %hi(0x201e800), %g1
200cc80: c2 00 60 88 ld [ %g1 + 0x88 ], %g1 ! 201e888 <imfs_rq_memfile_bytes_per_block>
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
200cc84: d6 26 60 0c st %o3, [ %i1 + 0xc ]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
200cc88: f0 36 60 14 sth %i0, [ %i1 + 0x14 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
200cc8c: d4 26 60 04 st %o2, [ %i1 + 4 ]
200cc90: 17 00 00 3f sethi %hi(0xfc00), %o3
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
200cc94: d8 36 60 10 sth %o4, [ %i1 + 0x10 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
200cc98: 96 12 e3 fe or %o3, 0x3fe, %o3
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200cc9c: da 26 60 08 st %o5, [ %i1 + 8 ]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
200cca0: d6 26 40 00 st %o3, [ %i1 ]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
200cca4: de 36 60 12 sth %o7, [ %i1 + 0x12 ]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
200cca8: c8 26 60 28 st %g4, [ %i1 + 0x28 ]
buf->st_mtime = the_jnode->stat_mtime;
200ccac: c6 26 60 30 st %g3, [ %i1 + 0x30 ]
buf->st_ctime = the_jnode->stat_ctime;
200ccb0: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200ccb4: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
return 0;
}
200ccb8: 81 c7 e0 08 ret
200ccbc: 91 e8 20 00 restore %g0, 0, %o0
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
200ccc0: c6 00 60 54 ld [ %g1 + 0x54 ], %g3
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
200ccc4: c4 00 60 50 ld [ %g1 + 0x50 ], %g2
break;
200ccc8: 10 bf ff e2 b 200cc50 <IMFS_stat+0x4c>
200cccc: c4 3e 60 18 std %g2, [ %i1 + 0x18 ]
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
200ccd0: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2
break;
200ccd4: 10 bf ff df b 200cc50 <IMFS_stat+0x4c>
200ccd8: c4 3e 60 20 std %g2, [ %i1 + 0x20 ]
02002ae8 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
2002ae8: 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;
2002aec: fa 06 40 00 ld [ %i1 ], %i5
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
2002af0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
2002af4: 80 a0 60 03 cmp %g1, 3
2002af8: 02 80 00 09 be 2002b1c <IMFS_unlink+0x34>
2002afc: b8 10 00 18 mov %i0, %i4
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
2002b00: c2 06 60 08 ld [ %i1 + 8 ], %g1
2002b04: 90 10 00 1c mov %i4, %o0
2002b08: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002b0c: 9f c0 40 00 call %g1
2002b10: 92 10 00 19 mov %i1, %o1
return result;
}
2002b14: 81 c7 e0 08 ret
2002b18: 91 e8 00 08 restore %g0, %o0, %o0
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
2002b1c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
2002b20: 80 a0 60 00 cmp %g1, 0
2002b24: 02 80 00 2b be 2002bd0 <IMFS_unlink+0xe8> <== NEVER TAKEN
2002b28: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
2002b2c: c6 06 60 0c ld [ %i1 + 0xc ], %g3
2002b30: f0 06 60 04 ld [ %i1 + 4 ], %i0
2002b34: c8 06 60 08 ld [ %i1 + 8 ], %g4
2002b38: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2002b3c: c6 27 bf f0 st %g3, [ %fp + -16 ]
the_link.node_access = node->info.hard_link.link_node;
2002b40: 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;
2002b44: f0 27 bf e8 st %i0, [ %fp + -24 ]
2002b48: c8 27 bf ec st %g4, [ %fp + -20 ]
2002b4c: c4 27 bf f4 st %g2, [ %fp + -12 ]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
2002b50: 40 00 23 6a call 200b8f8 <IMFS_Set_handlers>
2002b54: 90 07 bf e4 add %fp, -28, %o0
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
2002b58: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
2002b5c: c6 10 60 34 lduh [ %g1 + 0x34 ], %g3
2002b60: 80 a0 e0 01 cmp %g3, 1
2002b64: 02 80 00 10 be 2002ba4 <IMFS_unlink+0xbc>
2002b68: 84 00 ff ff add %g3, -1, %g2
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
2002b6c: 90 07 bf f8 add %fp, -8, %o0
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
2002b70: c4 30 60 34 sth %g2, [ %g1 + 0x34 ]
IMFS_update_ctime( node->info.hard_link.link_node );
2002b74: 40 00 02 09 call 2003398 <gettimeofday>
2002b78: 92 10 20 00 clr %o1
2002b7c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
2002b80: c4 07 bf f8 ld [ %fp + -8 ], %g2
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
2002b84: 90 10 00 1c mov %i4, %o0
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
2002b88: c4 20 60 48 st %g2, [ %g1 + 0x48 ]
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
2002b8c: c2 06 60 08 ld [ %i1 + 8 ], %g1
2002b90: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002b94: 9f c0 40 00 call %g1
2002b98: 92 10 00 19 mov %i1, %o1
return result;
}
2002b9c: 81 c7 e0 08 ret
2002ba0: 91 e8 00 08 restore %g0, %o0, %o0
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
2002ba4: c2 07 bf ec ld [ %fp + -20 ], %g1
2002ba8: 90 10 00 1c mov %i4, %o0
2002bac: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2002bb0: 92 07 bf e4 add %fp, -28, %o1
2002bb4: 9f c0 40 00 call %g1
2002bb8: b0 10 3f ff mov -1, %i0
if ( result != 0 )
2002bbc: 80 a2 20 00 cmp %o0, 0
2002bc0: 22 bf ff d1 be,a 2002b04 <IMFS_unlink+0x1c>
2002bc4: c2 06 60 08 ld [ %i1 + 8 ], %g1
2002bc8: 81 c7 e0 08 ret
2002bcc: 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 );
2002bd0: 40 00 3a 80 call 20115d0 <__errno> <== NOT EXECUTED
2002bd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002bd8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2002bdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002be0: 81 c7 e0 08 ret <== NOT EXECUTED
2002be4: 81 e8 00 00 restore <== NOT EXECUTED
02002be8 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2002be8: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2002bec: c2 06 20 08 ld [ %i0 + 8 ], %g1
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002bf0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
2002bf4: 80 a0 a0 01 cmp %g2, 1
2002bf8: 12 80 00 09 bne 2002c1c <IMFS_unmount+0x34> <== NEVER TAKEN
2002bfc: 01 00 00 00 nop
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
2002c00: c4 00 60 5c ld [ %g1 + 0x5c ], %g2
2002c04: 80 a0 a0 00 cmp %g2, 0
2002c08: 02 80 00 0b be 2002c34 <IMFS_unmount+0x4c> <== NEVER TAKEN
2002c0c: 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;
2002c10: c0 20 60 5c clr [ %g1 + 0x5c ]
return 0;
}
2002c14: 81 c7 e0 08 ret
2002c18: 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 );
2002c1c: 40 00 3a 6d call 20115d0 <__errno> <== NOT EXECUTED
2002c20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002c24: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2002c28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002c2c: 81 c7 e0 08 ret <== NOT EXECUTED
2002c30: 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 */
2002c34: 40 00 3a 67 call 20115d0 <__errno> <== NOT EXECUTED
2002c38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002c3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2002c40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002c44: 81 c7 e0 08 ret <== NOT EXECUTED
2002c48: 81 e8 00 00 restore <== NOT EXECUTED
020036c4 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
20036c4: 9d e3 bf a0 save %sp, -96, %sp
bool separate_areas = !rtems_configuration_get_unified_work_area();
20036c8: 3b 00 80 79 sethi %hi(0x201e400), %i5
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
20036cc: 03 00 80 7c sethi %hi(0x201f000), %g1
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
bool separate_areas = !rtems_configuration_get_unified_work_area();
20036d0: ba 17 63 5c or %i5, 0x35c, %i5
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
20036d4: c2 00 60 64 ld [ %g1 + 0x64 ], %g1
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
bool separate_areas = !rtems_configuration_get_unified_work_area();
20036d8: f6 0f 60 2d ldub [ %i5 + 0x2d ], %i3
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
20036dc: 80 a0 60 00 cmp %g1, 0
20036e0: 02 80 00 05 be 20036f4 <RTEMS_Malloc_Initialize+0x30>
20036e4: b6 1e e0 01 xor %i3, 1, %i3
(*rtems_malloc_statistics_helpers->initialize)();
20036e8: c2 00 40 00 ld [ %g1 ], %g1
20036ec: 9f c0 40 00 call %g1
20036f0: 01 00 00 00 nop
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
20036f4: 7f ff ff da call 200365c <malloc_deferred_frees_initialize>
20036f8: 01 00 00 00 nop
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
20036fc: 03 00 80 7c sethi %hi(0x201f000), %g1
2003700: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f060 <rtems_malloc_sbrk_helpers>
2003704: 80 a0 60 00 cmp %g1, 0
2003708: 02 80 00 08 be 2003728 <RTEMS_Malloc_Initialize+0x64>
200370c: 90 10 00 18 mov %i0, %o0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2003710: c2 00 40 00 ld [ %g1 ], %g1
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2003714: b2 06 00 19 add %i0, %i1, %i1
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2003718: 9f c0 40 00 call %g1
200371c: 92 10 00 1a mov %i2, %o1
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
heap_begin = new_heap_begin;
2003720: b0 10 00 08 mov %o0, %i0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2003724: b2 26 40 08 sub %i1, %o0, %i1
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) {
2003728: 80 8e e0 ff btst 0xff, %i3
200372c: 02 80 00 0d be 2003760 <RTEMS_Malloc_Initialize+0x9c>
2003730: 39 00 80 7a sethi %hi(0x201e800), %i4
2003734: c2 0f 60 2c ldub [ %i5 + 0x2c ], %g1
2003738: 80 a0 60 00 cmp %g1, 0
200373c: 12 80 00 11 bne 2003780 <RTEMS_Malloc_Initialize+0xbc>
2003740: d0 07 20 44 ld [ %i4 + 0x44 ], %o0
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
2003744: 92 10 00 18 mov %i0, %o1
2003748: 94 10 00 19 mov %i1, %o2
200374c: 40 00 13 87 call 2008568 <_Heap_Initialize>
2003750: 96 10 20 08 mov 8, %o3
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
2003754: 80 a2 20 00 cmp %o0, 0
2003758: 02 80 00 17 be 20037b4 <RTEMS_Malloc_Initialize+0xf0>
200375c: 01 00 00 00 nop
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
2003760: 3b 00 80 7c sethi %hi(0x201f000), %i5
2003764: d0 07 20 44 ld [ %i4 + 0x44 ], %o0
2003768: 40 00 16 93 call 20091b4 <_Protected_heap_Get_size>
200376c: f8 07 63 10 ld [ %i5 + 0x310 ], %i4
2003770: b8 02 00 1c add %o0, %i4, %i4
2003774: f8 27 63 10 st %i4, [ %i5 + 0x310 ]
}
2003778: 81 c7 e0 08 ret
200377c: 81 e8 00 00 restore
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) {
memset( heap_begin, 0, heap_size );
2003780: 92 10 20 00 clr %o1
2003784: 94 10 00 19 mov %i1, %o2
2003788: 40 00 3a 2a call 2012030 <memset>
200378c: 90 10 00 18 mov %i0, %o0
2003790: 39 00 80 7a sethi %hi(0x201e800), %i4
2003794: d0 07 20 44 ld [ %i4 + 0x44 ], %o0 ! 201e844 <RTEMS_Malloc_Heap>
2003798: 92 10 00 18 mov %i0, %o1
200379c: 94 10 00 19 mov %i1, %o2
20037a0: 40 00 13 72 call 2008568 <_Heap_Initialize>
20037a4: 96 10 20 08 mov 8, %o3
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
20037a8: 80 a2 20 00 cmp %o0, 0
20037ac: 12 bf ff ee bne 2003764 <RTEMS_Malloc_Initialize+0xa0> <== ALWAYS TAKEN
20037b0: 3b 00 80 7c sethi %hi(0x201f000), %i5
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
20037b4: 40 00 10 87 call 20079d0 <rtems_fatal_error_occurred>
20037b8: 90 10 20 1a mov 0x1a, %o0
02002290 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
2002290: 9d e3 bf 98 save %sp, -104, %sp
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
2002294: 80 a6 3f ff cmp %i0, -1
2002298: 02 80 00 5d be 200240c <Stack_check_Dump_threads_usage+0x17c>
200229c: b6 06 20 b4 add %i0, 0xb4, %i3
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
20022a0: e0 06 21 40 ld [ %i0 + 0x140 ], %l0
20022a4: f4 06 20 b8 ld [ %i0 + 0xb8 ], %i2
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
20022a8: f8 06 c0 00 ld [ %i3 ], %i4
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
20022ac: 82 06 a0 20 add %i2, 0x20, %g1
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
20022b0: b8 07 3f f0 add %i4, -16, %i4
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
20022b4: 86 0f 3f fc and %i4, -4, %g3
20022b8: 86 00 40 03 add %g1, %g3, %g3
20022bc: 80 a0 40 03 cmp %g1, %g3
20022c0: 1a 80 00 12 bcc 2002308 <Stack_check_Dump_threads_usage+0x78><== NEVER TAKEN
20022c4: ba 10 20 00 clr %i5
if (*base != U32_PATTERN)
20022c8: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4
20022cc: 05 29 69 69 sethi %hi(0xa5a5a400), %g2
20022d0: 84 10 a1 a5 or %g2, 0x1a5, %g2 ! a5a5a5a5 <RAM_END+0xa365a5a5>
20022d4: 80 a1 00 02 cmp %g4, %g2
20022d8: 22 80 00 08 be,a 20022f8 <Stack_check_Dump_threads_usage+0x68><== ALWAYS TAKEN
20022dc: 82 00 60 04 add %g1, 4, %g1
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
20022e0: 10 80 00 36 b 20023b8 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
20022e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
20022e8: 80 a0 80 04 cmp %g2, %g4
20022ec: 12 80 00 32 bne 20023b4 <Stack_check_Dump_threads_usage+0x124>
20022f0: ba 10 20 00 clr %i5
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
20022f4: 82 00 60 04 add %g1, 4, %g1
20022f8: 80 a0 c0 01 cmp %g3, %g1
20022fc: 38 bf ff fb bgu,a 20022e8 <Stack_check_Dump_threads_usage+0x58><== ALWAYS TAKEN
2002300: c4 00 40 00 ld [ %g1 ], %g2
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
2002304: ba 10 20 00 clr %i5 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
2002308: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200230c: 02 80 00 32 be 20023d4 <Stack_check_Dump_threads_usage+0x144><== NOT EXECUTED
2002310: 33 00 80 7c sethi %hi(0x201f000), %i1 <== NOT EXECUTED
#endif
{
(*print_handler)(
2002314: e2 06 20 08 ld [ %i0 + 8 ], %l1
2002318: 35 00 80 7c sethi %hi(0x201f000), %i2
200231c: 33 00 80 7c sethi %hi(0x201f000), %i1
2002320: e4 06 a1 3c ld [ %i2 + 0x13c ], %l2
2002324: f0 06 61 38 ld [ %i1 + 0x138 ], %i0
2002328: 94 07 bf f8 add %fp, -8, %o2
200232c: 92 10 20 05 mov 5, %o1
2002330: 40 00 13 8b call 200715c <rtems_object_get_name>
2002334: 90 10 00 11 mov %l1, %o0
2002338: 13 00 80 73 sethi %hi(0x201cc00), %o1
200233c: 96 10 00 08 mov %o0, %o3
2002340: 94 10 00 11 mov %l1, %o2
2002344: 90 10 00 12 mov %l2, %o0
2002348: 9f c6 00 00 call %i0
200234c: 92 12 60 c8 or %o1, 0xc8, %o1
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
2002350: d4 06 e0 04 ld [ %i3 + 4 ], %o2
2002354: d6 06 c0 00 ld [ %i3 ], %o3
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
2002358: c2 06 61 38 ld [ %i1 + 0x138 ], %g1
200235c: d0 06 a1 3c ld [ %i2 + 0x13c ], %o0
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
2002360: 96 02 ff ff add %o3, -1, %o3
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
2002364: 13 00 80 73 sethi %hi(0x201cc00), %o1
2002368: 96 02 80 0b add %o2, %o3, %o3
200236c: 92 12 60 e8 or %o1, 0xe8, %o1
2002370: 98 10 00 10 mov %l0, %o4
2002374: 9f c0 40 00 call %g1
2002378: 9a 10 00 1c mov %i4, %o5
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
200237c: 03 00 80 7c sethi %hi(0x201f000), %g1
2002380: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 201f134 <Stack_check_Initialized>
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
2002384: 07 00 80 7c sethi %hi(0x201f000), %g3
2002388: 05 00 80 7c sethi %hi(0x201f000), %g2
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
200238c: 80 a0 60 00 cmp %g1, 0
(*print_handler)( print_context, "Unavailable\n" );
2002390: d0 00 a1 3c ld [ %g2 + 0x13c ], %o0
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
2002394: 02 80 00 19 be 20023f8 <Stack_check_Dump_threads_usage+0x168><== NEVER TAKEN
2002398: c2 00 e1 38 ld [ %g3 + 0x138 ], %g1
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
200239c: 94 10 00 1d mov %i5, %o2
20023a0: 13 00 80 73 sethi %hi(0x201cc00), %o1
20023a4: 9f c0 40 00 call %g1
20023a8: 92 12 61 18 or %o1, 0x118, %o1 ! 201cd18 <rtems_filesystem_table+0x59c>
20023ac: 81 c7 e0 08 ret
20023b0: 81 e8 00 00 restore
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
20023b4: 80 a0 60 00 cmp %g1, 0
20023b8: 02 bf ff d4 be 2002308 <Stack_check_Dump_threads_usage+0x78><== NEVER TAKEN
20023bc: 80 a6 20 00 cmp %i0, 0
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
20023c0: ba 06 a0 10 add %i2, 0x10, %i5
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
20023c4: ba 07 40 1c add %i5, %i4, %i5
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
20023c8: 12 bf ff d3 bne 2002314 <Stack_check_Dump_threads_usage+0x84>
20023cc: ba 27 40 01 sub %i5, %g1, %i5
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
20023d0: 33 00 80 7c sethi %hi(0x201f000), %i1
20023d4: 35 00 80 7c sethi %hi(0x201f000), %i2
20023d8: c2 06 61 38 ld [ %i1 + 0x138 ], %g1
20023dc: d0 06 a1 3c ld [ %i2 + 0x13c ], %o0
20023e0: 94 10 3f ff mov -1, %o2
20023e4: 13 00 80 73 sethi %hi(0x201cc00), %o1
20023e8: 9f c0 40 00 call %g1
20023ec: 92 12 60 d8 or %o1, 0xd8, %o1 ! 201ccd8 <rtems_filesystem_table+0x55c>
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
20023f0: 10 bf ff d9 b 2002354 <Stack_check_Dump_threads_usage+0xc4>
20023f4: d4 06 e0 04 ld [ %i3 + 4 ], %o2
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
20023f8: 13 00 80 73 sethi %hi(0x201cc00), %o1 <== NOT EXECUTED
20023fc: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002400: 92 12 61 08 or %o1, 0x108, %o1 ! 201cd08 <rtems_filesystem_table+0x58c><== NOT EXECUTED
2002404: 81 c7 e0 08 ret <== NOT EXECUTED
2002408: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
200240c: 37 00 80 7c sethi %hi(0x201f000), %i3
2002410: b6 16 e3 bc or %i3, 0x3bc, %i3 ! 201f3bc <Stack_check_Interrupt_stack>
2002414: f4 06 e0 04 ld [ %i3 + 4 ], %i2
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
2002418: a0 10 20 00 clr %l0
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
200241c: 80 a6 a0 00 cmp %i2, 0
2002420: 12 bf ff a2 bne 20022a8 <Stack_check_Dump_threads_usage+0x18><== ALWAYS TAKEN
2002424: b0 10 20 00 clr %i0
2002428: 81 c7 e0 08 ret <== NOT EXECUTED
200242c: 81 e8 00 00 restore <== NOT EXECUTED
02002430 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
2002430: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
2002434: 3b 00 80 7c sethi %hi(0x201f000), %i5 <== NOT EXECUTED
2002438: c2 07 61 34 ld [ %i5 + 0x134 ], %g1 ! 201f134 <Stack_check_Initialized><== NOT EXECUTED
200243c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002440: 12 80 00 20 bne 20024c0 <Stack_check_Initialize+0x90> <== NOT EXECUTED
2002444: 07 00 80 7c sethi %hi(0x201f000), %g3 <== NOT EXECUTED
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
2002448: 09 3f bb 7c sethi %hi(0xfeedf000), %g4 <== NOT EXECUTED
200244c: 82 10 e3 ac or %g3, 0x3ac, %g1 <== NOT EXECUTED
2002450: 88 11 20 0d or %g4, 0xd, %g4 <== NOT EXECUTED
2002454: c8 20 e3 ac st %g4, [ %g3 + 0x3ac ] <== NOT EXECUTED
2002458: 07 02 eb 43 sethi %hi(0xbad0c00), %g3 <== NOT EXECUTED
200245c: 86 10 e1 06 or %g3, 0x106, %g3 ! bad0d06 <RAM_END+0x96d0d06><== NOT EXECUTED
/*
* 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) {
2002460: 05 00 80 7e sethi %hi(0x201f800), %g2 <== NOT EXECUTED
2002464: d0 00 a2 d0 ld [ %g2 + 0x2d0 ], %o0 ! 201fad0 <_Per_CPU_Information><== NOT EXECUTED
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
2002468: c6 20 60 04 st %g3, [ %g1 + 4 ] <== NOT EXECUTED
200246c: 07 37 ab 7c sethi %hi(0xdeadf000), %g3 <== NOT EXECUTED
2002470: 86 10 e0 0d or %g3, 0xd, %g3 ! deadf00d <RAM_END+0xdc6df00d><== NOT EXECUTED
2002474: c6 20 60 08 st %g3, [ %g1 + 8 ] <== NOT EXECUTED
2002478: 07 18 03 43 sethi %hi(0x600d0c00), %g3 <== NOT EXECUTED
200247c: 86 10 e1 06 or %g3, 0x106, %g3 ! 600d0d06 <RAM_END+0x5dcd0d06><== NOT EXECUTED
2002480: c6 20 60 0c st %g3, [ %g1 + 0xc ] <== NOT EXECUTED
/*
* 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) {
2002484: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2002488: 02 80 00 0c be 20024b8 <Stack_check_Initialize+0x88> <== NOT EXECUTED
200248c: 84 10 a2 d0 or %g2, 0x2d0, %g2 <== NOT EXECUTED
2002490: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED
2002494: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED
2002498: 02 80 00 08 be 20024b8 <Stack_check_Initialize+0x88> <== NOT EXECUTED
200249c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
20024a0: 84 10 63 bc or %g1, 0x3bc, %g2 ! 201f3bc <Stack_check_Interrupt_stack><== NOT EXECUTED
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
20024a4: 94 22 80 08 sub %o2, %o0, %o2 <== NOT EXECUTED
* 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;
20024a8: d0 20 a0 04 st %o0, [ %g2 + 4 ] <== NOT EXECUTED
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
20024ac: d4 20 63 bc st %o2, [ %g1 + 0x3bc ] <== NOT EXECUTED
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
20024b0: 40 00 3f 2a call 2012158 <memset> <== NOT EXECUTED
20024b4: 92 10 20 a5 mov 0xa5, %o1 <== NOT EXECUTED
}
#endif
Stack_check_Initialized = 1;
20024b8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
20024bc: c2 27 61 34 st %g1, [ %i5 + 0x134 ] <== NOT EXECUTED
20024c0: 81 c7 e0 08 ret <== NOT EXECUTED
20024c4: 81 e8 00 00 restore <== NOT EXECUTED
020025bc <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
20025bc: 9d e3 bf 80 save %sp, -128, %sp
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
20025c0: 11 00 80 73 sethi %hi(0x201cc00), %o0
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
20025c4: fa 06 20 b8 ld [ %i0 + 0xb8 ], %i5
char name[32];
printk("BLOWN STACK!!!\n");
20025c8: 40 00 07 e7 call 2004564 <printk>
20025cc: 90 12 21 20 or %o0, 0x120, %o0
printk("task control block: 0x%08" PRIxPTR "\n", running);
20025d0: 92 10 00 18 mov %i0, %o1
20025d4: 11 00 80 73 sethi %hi(0x201cc00), %o0
20025d8: 40 00 07 e3 call 2004564 <printk>
20025dc: 90 12 21 30 or %o0, 0x130, %o0 ! 201cd30 <rtems_filesystem_table+0x5b4>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
20025e0: d2 06 20 08 ld [ %i0 + 8 ], %o1
20025e4: 11 00 80 73 sethi %hi(0x201cc00), %o0
20025e8: 40 00 07 df call 2004564 <printk>
20025ec: 90 12 21 50 or %o0, 0x150, %o0 ! 201cd50 <rtems_filesystem_table+0x5d4>
printk(
20025f0: d2 06 20 0c ld [ %i0 + 0xc ], %o1
20025f4: 11 00 80 73 sethi %hi(0x201cc00), %o0
20025f8: 40 00 07 db call 2004564 <printk>
20025fc: 90 12 21 68 or %o0, 0x168, %o0 ! 201cd68 <rtems_filesystem_table+0x5ec>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
2002600: d0 06 20 08 ld [ %i0 + 8 ], %o0
2002604: 94 07 bf e0 add %fp, -32, %o2
2002608: 40 00 12 d5 call 200715c <rtems_object_get_name>
200260c: 92 10 20 20 mov 0x20, %o1
2002610: 92 10 00 08 mov %o0, %o1
2002614: 11 00 80 73 sethi %hi(0x201cc00), %o0
2002618: 40 00 07 d3 call 2004564 <printk>
200261c: 90 12 21 80 or %o0, 0x180, %o0 ! 201cd80 <rtems_filesystem_table+0x604>
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
2002620: d4 06 20 b8 ld [ %i0 + 0xb8 ], %o2
2002624: d2 06 20 b4 ld [ %i0 + 0xb4 ], %o1
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
2002628: 11 00 80 73 sethi %hi(0x201cc00), %o0
200262c: 96 02 80 09 add %o2, %o1, %o3
2002630: 40 00 07 cd call 2004564 <printk>
2002634: 90 12 21 98 or %o0, 0x198, %o0
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
2002638: 80 a6 60 00 cmp %i1, 0
200263c: 02 80 00 04 be 200264c <Stack_check_report_blown_task+0x90><== ALWAYS TAKEN
2002640: 92 10 20 10 mov 0x10, %o1
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
2002644: 40 00 15 1c call 2007ab4 <rtems_fatal_error_occurred>
2002648: 90 10 20 81 mov 0x81, %o0
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
200264c: 11 00 80 73 sethi %hi(0x201cc00), %o0
2002650: 94 07 60 08 add %i5, 8, %o2
2002654: 90 12 21 d0 or %o0, 0x1d0, %o0
2002658: 40 00 07 c3 call 2004564 <printk>
200265c: 96 07 60 18 add %i5, 0x18, %o3
2002660: 30 bf ff f9 b,a 2002644 <Stack_check_report_blown_task+0x88>
02007c0c <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2007c0c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007c10: 39 00 80 7d sethi %hi(0x201f400), %i4
2007c14: fa 07 22 b4 ld [ %i4 + 0x2b4 ], %i5 ! 201f6b4 <_API_extensions_List>
2007c18: b8 17 22 b4 or %i4, 0x2b4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2007c1c: b8 07 20 04 add %i4, 4, %i4
2007c20: 80 a7 40 1c cmp %i5, %i4
2007c24: 02 80 00 09 be 2007c48 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
2007c28: 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)();
2007c2c: c2 07 60 08 ld [ %i5 + 8 ], %g1
2007c30: 9f c0 40 00 call %g1
2007c34: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2007c38: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2007c3c: 80 a7 40 1c cmp %i5, %i4
2007c40: 32 bf ff fc bne,a 2007c30 <_API_extensions_Run_postdriver+0x24>
2007c44: c2 07 60 08 ld [ %i5 + 8 ], %g1
2007c48: 81 c7 e0 08 ret
2007c4c: 81 e8 00 00 restore
02007c50 <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
2007c50: 9d e3 bf a0 save %sp, -96, %sp
2007c54: 39 00 80 7d sethi %hi(0x201f400), %i4
2007c58: fa 07 22 b4 ld [ %i4 + 0x2b4 ], %i5 ! 201f6b4 <_API_extensions_List>
2007c5c: b8 17 22 b4 or %i4, 0x2b4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2007c60: b8 07 20 04 add %i4, 4, %i4
2007c64: 80 a7 40 1c cmp %i5, %i4
2007c68: 02 80 00 0a be 2007c90 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
2007c6c: 37 00 80 7e sethi %hi(0x201f800), %i3
2007c70: b6 16 e2 00 or %i3, 0x200, %i3 ! 201fa00 <_Per_CPU_Information>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
2007c74: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2007c78: 9f c0 40 00 call %g1
2007c7c: d0 06 e0 0c ld [ %i3 + 0xc ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2007c80: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2007c84: 80 a7 40 1c cmp %i5, %i4
2007c88: 32 bf ff fc bne,a 2007c78 <_API_extensions_Run_postswitch+0x28>
2007c8c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2007c90: 81 c7 e0 08 ret
2007c94: 81 e8 00 00 restore
0200a308 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
200a308: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
200a30c: 03 00 80 8a sethi %hi(0x2022800), %g1
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
200a310: 7f ff e5 7c call 2003900 <sparc_disable_interrupts>
200a314: fa 00 62 1c ld [ %g1 + 0x21c ], %i5 ! 2022a1c <_Per_CPU_Information+0xc>
200a318: 84 10 00 08 mov %o0, %g2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
200a31c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
200a320: 80 a0 60 00 cmp %g1, 0
200a324: 02 80 00 2b be 200a3d0 <_CORE_RWLock_Release+0xc8>
200a328: 80 a0 60 01 cmp %g1, 1
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
200a32c: 22 80 00 22 be,a 200a3b4 <_CORE_RWLock_Release+0xac>
200a330: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
200a334: c0 27 60 34 clr [ %i5 + 0x34 ]
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
200a338: c0 26 20 44 clr [ %i0 + 0x44 ]
_ISR_Enable( level );
200a33c: 7f ff e5 75 call 2003910 <sparc_enable_interrupts>
200a340: 90 10 00 02 mov %g2, %o0
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
200a344: 40 00 08 1d call 200c3b8 <_Thread_queue_Dequeue>
200a348: 90 10 00 18 mov %i0, %o0
if ( next ) {
200a34c: 80 a2 20 00 cmp %o0, 0
200a350: 22 80 00 24 be,a 200a3e0 <_CORE_RWLock_Release+0xd8>
200a354: b0 10 20 00 clr %i0
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
200a358: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
200a35c: 80 a0 60 01 cmp %g1, 1
200a360: 02 80 00 22 be 200a3e8 <_CORE_RWLock_Release+0xe0>
200a364: 84 10 20 01 mov 1, %g2
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
200a368: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200a36c: 82 00 60 01 inc %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
200a370: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
200a374: 10 80 00 09 b 200a398 <_CORE_RWLock_Release+0x90>
200a378: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
200a37c: 80 a0 60 01 cmp %g1, 1
200a380: 02 80 00 0b be 200a3ac <_CORE_RWLock_Release+0xa4> <== NEVER TAKEN
200a384: 90 10 00 18 mov %i0, %o0
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
200a388: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200a38c: 82 00 60 01 inc %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
200a390: 40 00 09 1a call 200c7f8 <_Thread_queue_Extract>
200a394: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
200a398: 40 00 09 69 call 200c93c <_Thread_queue_First>
200a39c: 90 10 00 18 mov %i0, %o0
if ( !next ||
200a3a0: 92 92 20 00 orcc %o0, 0, %o1
200a3a4: 32 bf ff f6 bne,a 200a37c <_CORE_RWLock_Release+0x74>
200a3a8: c2 02 60 30 ld [ %o1 + 0x30 ], %g1
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200a3ac: 81 c7 e0 08 ret
200a3b0: 91 e8 20 00 restore %g0, 0, %o0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
200a3b4: 82 00 7f ff add %g1, -1, %g1
if ( the_rwlock->number_of_readers != 0 ) {
200a3b8: 80 a0 60 00 cmp %g1, 0
200a3bc: 02 bf ff de be 200a334 <_CORE_RWLock_Release+0x2c>
200a3c0: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/* must be unlocked again */
_ISR_Enable( level );
200a3c4: 7f ff e5 53 call 2003910 <sparc_enable_interrupts>
200a3c8: b0 10 20 00 clr %i0
return CORE_RWLOCK_SUCCESSFUL;
200a3cc: 30 80 00 05 b,a 200a3e0 <_CORE_RWLock_Release+0xd8>
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
200a3d0: 7f ff e5 50 call 2003910 <sparc_enable_interrupts>
200a3d4: b0 10 20 00 clr %i0
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
200a3d8: 82 10 20 02 mov 2, %g1
200a3dc: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200a3e0: 81 c7 e0 08 ret
200a3e4: 81 e8 00 00 restore
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
200a3e8: 82 10 20 02 mov 2, %g1
200a3ec: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200a3f0: 81 c7 e0 08 ret
200a3f4: 91 e8 20 00 restore %g0, 0, %o0
0200a3f8 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
200a3f8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a3fc: 90 10 00 18 mov %i0, %o0
200a400: 40 00 07 17 call 200c05c <_Thread_Get>
200a404: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a408: c2 07 bf fc ld [ %fp + -4 ], %g1
200a40c: 80 a0 60 00 cmp %g1, 0
200a410: 12 80 00 09 bne 200a434 <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN
200a414: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200a418: 40 00 09 8b call 200ca44 <_Thread_queue_Process_timeout>
200a41c: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a420: 03 00 80 89 sethi %hi(0x2022400), %g1
200a424: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20224d0 <_Thread_Dispatch_disable_level>
200a428: 84 00 bf ff add %g2, -1, %g2
200a42c: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ]
return _Thread_Dispatch_disable_level;
200a430: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1
200a434: 81 c7 e0 08 ret
200a438: 81 e8 00 00 restore
02011fac <_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
)
{
2011fac: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
2011fb0: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
2011fb4: 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;
2011fb8: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
2011fbc: c0 26 20 60 clr [ %i0 + 0x60 ]
the_message_queue->notify_argument = the_argument;
2011fc0: c0 26 20 64 clr [ %i0 + 0x64 ]
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
2011fc4: 80 8e e0 03 btst 3, %i3
2011fc8: 02 80 00 0a be 2011ff0 <_CORE_message_queue_Initialize+0x44>
2011fcc: b8 10 00 1b mov %i3, %i4
allocated_message_size += sizeof(uint32_t);
2011fd0: b8 06 e0 04 add %i3, 4, %i4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
2011fd4: b8 0f 3f fc and %i4, -4, %i4
}
if (allocated_message_size < maximum_message_size)
2011fd8: 80 a6 c0 1c cmp %i3, %i4
2011fdc: 08 80 00 05 bleu 2011ff0 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN
2011fe0: ba 10 20 00 clr %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2011fe4: b0 0f 60 01 and %i5, 1, %i0
2011fe8: 81 c7 e0 08 ret
2011fec: 81 e8 00 00 restore
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
2011ff0: b8 07 20 14 add %i4, 0x14, %i4
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
2011ff4: 90 10 20 00 clr %o0
2011ff8: 92 10 00 1a mov %i2, %o1
2011ffc: 94 10 20 00 clr %o2
2012000: 96 10 00 1c mov %i4, %o3
2012004: 40 00 4b a0 call 2024e84 <__muldi3>
2012008: ba 10 20 00 clr %i5
if ( x > SIZE_MAX )
201200c: 80 a2 20 00 cmp %o0, 0
2012010: 34 bf ff f6 bg,a 2011fe8 <_CORE_message_queue_Initialize+0x3c>
2012014: b0 0f 60 01 and %i5, 1, %i0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
2012018: 40 00 0d 1c call 2015488 <_Workspace_Allocate>
201201c: 90 10 00 09 mov %o1, %o0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
2012020: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
2012024: 80 a2 20 00 cmp %o0, 0
2012028: 02 bf ff ef be 2011fe4 <_CORE_message_queue_Initialize+0x38>
201202c: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
2012030: 90 06 20 68 add %i0, 0x68, %o0
2012034: 94 10 00 1a mov %i2, %o2
2012038: 40 00 1a 26 call 20188d0 <_Chain_Initialize>
201203c: 96 10 00 1c mov %i4, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2012040: c4 06 40 00 ld [ %i1 ], %g2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2012044: 82 06 20 50 add %i0, 0x50, %g1
2012048: 84 18 a0 01 xor %g2, 1, %g2
201204c: 80 a0 00 02 cmp %g0, %g2
2012050: 84 06 20 54 add %i0, 0x54, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2012054: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2012058: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
201205c: 90 10 00 18 mov %i0, %o0
head->previous = NULL;
2012060: c0 26 20 54 clr [ %i0 + 0x54 ]
2012064: 92 60 3f ff subx %g0, -1, %o1
2012068: 94 10 20 80 mov 0x80, %o2
201206c: 96 10 20 06 mov 6, %o3
2012070: 40 00 0a 9a call 2014ad8 <_Thread_queue_Initialize>
2012074: ba 10 20 01 mov 1, %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2012078: b0 0f 60 01 and %i5, 1, %i0
201207c: 81 c7 e0 08 ret
2012080: 81 e8 00 00 restore
0200800c <_CORE_mutex_Seize_interrupt_blocking>:
void _CORE_mutex_Seize_interrupt_blocking(
CORE_mutex_Control *the_mutex,
Watchdog_Interval timeout
)
{
200800c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
Thread_Control *executing;
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
2008010: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
Watchdog_Interval timeout
)
{
Thread_Control *executing;
executing = _Thread_Executing;
2008014: 05 00 80 7e sethi %hi(0x201f800), %g2 <== NOT EXECUTED
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
2008018: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
200801c: 02 80 00 0c be 200804c <_CORE_mutex_Seize_interrupt_blocking+0x40><== NOT EXECUTED
2008020: fa 00 a2 0c ld [ %g2 + 0x20c ], %i5 <== NOT EXECUTED
false
);
}
}
the_mutex->blocked_count++;
2008024: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
2008028: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
false
);
}
}
the_mutex->blocked_count++;
200802c: 82 00 60 01 inc %g1 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
2008030: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2008034: 15 00 80 29 sethi %hi(0x200a400), %o2 <== NOT EXECUTED
2008038: 94 12 a3 30 or %o2, 0x330, %o2 ! 200a730 <_Thread_queue_Timeout><== NOT EXECUTED
200803c: 40 00 08 c5 call 200a350 <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED
2008040: c2 26 20 58 st %g1, [ %i0 + 0x58 ] <== NOT EXECUTED
_Thread_Enable_dispatch();
2008044: 40 00 07 78 call 2009e24 <_Thread_Enable_dispatch> <== NOT EXECUTED
2008048: 81 e8 00 00 restore <== NOT EXECUTED
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
if ( _Scheduler_Is_priority_higher_than(
200804c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 <== NOT EXECUTED
2008050: d0 07 60 14 ld [ %i5 + 0x14 ], %o0 <== NOT EXECUTED
2008054: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED
2008058: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201e878 <_Scheduler+0x30><== NOT EXECUTED
200805c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2008060: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 <== NOT EXECUTED
2008064: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2008068: 24 bf ff f0 ble,a 2008028 <_CORE_mutex_Seize_interrupt_blocking+0x1c><== NOT EXECUTED
200806c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
executing->current_priority,
the_mutex->holder->current_priority)) {
_Thread_Change_priority(
2008070: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED
2008074: d2 07 60 14 ld [ %i5 + 0x14 ], %o1 <== NOT EXECUTED
2008078: 40 00 06 2e call 2009930 <_Thread_Change_priority> <== NOT EXECUTED
200807c: 94 10 20 00 clr %o2 <== NOT EXECUTED
false
);
}
}
the_mutex->blocked_count++;
2008080: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
2008084: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
false
);
}
}
the_mutex->blocked_count++;
2008088: 82 00 60 01 inc %g1 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
200808c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2008090: 15 00 80 29 sethi %hi(0x200a400), %o2 <== NOT EXECUTED
2008094: 94 12 a3 30 or %o2, 0x330, %o2 ! 200a730 <_Thread_queue_Timeout><== NOT EXECUTED
2008098: 40 00 08 ae call 200a350 <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED
200809c: c2 26 20 58 st %g1, [ %i0 + 0x58 ] <== NOT EXECUTED
_Thread_Enable_dispatch();
20080a0: 40 00 07 61 call 2009e24 <_Thread_Enable_dispatch> <== NOT EXECUTED
20080a4: 81 e8 00 00 restore <== NOT EXECUTED
0200821c <_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
)
{
200821c: 9d e3 bf a0 save %sp, -96, %sp
2008220: ba 10 00 18 mov %i0, %i5
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008224: b0 10 20 00 clr %i0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
2008228: 40 00 07 e3 call 200a1b4 <_Thread_queue_Dequeue>
200822c: 90 10 00 1d mov %i5, %o0
2008230: 80 a2 20 00 cmp %o0, 0
2008234: 02 80 00 04 be 2008244 <_CORE_semaphore_Surrender+0x28>
2008238: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
200823c: 81 c7 e0 08 ret
2008240: 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 );
2008244: 7f ff e8 c6 call 200255c <sparc_disable_interrupts>
2008248: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
200824c: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2008250: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
2008254: 80 a0 40 02 cmp %g1, %g2
2008258: 1a 80 00 05 bcc 200826c <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN
200825c: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2008260: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008264: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
2008268: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
200826c: 7f ff e8 c0 call 200256c <sparc_enable_interrupts>
2008270: 01 00 00 00 nop
}
return status;
}
2008274: 81 c7 e0 08 ret
2008278: 81 e8 00 00 restore
0200e430 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
200e430: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
200e434: c0 26 20 04 clr [ %i0 + 4 ]
size_t node_size
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200e438: ba 06 20 04 add %i0, 4, %i5
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200e43c: 80 a6 a0 00 cmp %i2, 0
200e440: 02 80 00 12 be 200e488 <_Chain_Initialize+0x58> <== NEVER TAKEN
200e444: 90 10 00 18 mov %i0, %o0
200e448: b4 06 bf ff add %i2, -1, %i2
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
200e44c: 82 10 00 19 mov %i1, %g1
head->previous = NULL;
while ( count-- ) {
200e450: 92 10 00 1a mov %i2, %o1
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
200e454: 10 80 00 05 b 200e468 <_Chain_Initialize+0x38>
200e458: 84 10 00 18 mov %i0, %g2
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200e45c: 84 10 00 01 mov %g1, %g2
200e460: b4 06 bf ff add %i2, -1, %i2
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
200e464: 82 10 00 03 mov %g3, %g1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
200e468: c2 20 80 00 st %g1, [ %g2 ]
next->previous = current;
200e46c: c4 20 60 04 st %g2, [ %g1 + 4 ]
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200e470: 80 a6 a0 00 cmp %i2, 0
200e474: 12 bf ff fa bne 200e45c <_Chain_Initialize+0x2c>
200e478: 86 00 40 1b add %g1, %i3, %g3
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
200e47c: 40 00 2f ae call 201a334 <.umul>
200e480: 90 10 00 1b mov %i3, %o0
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200e484: 90 06 40 08 add %i1, %o0, %o0
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
200e488: fa 22 00 00 st %i5, [ %o0 ]
tail->previous = current;
200e48c: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
200e490: 81 c7 e0 08 ret
200e494: 81 e8 00 00 restore
02006e20 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
2006e20: 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 ];
2006e24: fa 06 21 58 ld [ %i0 + 0x158 ], %i5
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2006e28: 7f ff ed cd call 200255c <sparc_disable_interrupts>
2006e2c: f8 06 20 30 ld [ %i0 + 0x30 ], %i4
pending_events = api->pending_events;
2006e30: c4 07 40 00 ld [ %i5 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
2006e34: 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 ) ) {
2006e38: 86 88 40 02 andcc %g1, %g2, %g3
2006e3c: 02 80 00 39 be 2006f20 <_Event_Surrender+0x100>
2006e40: 09 00 80 7e sethi %hi(0x201f800), %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() &&
2006e44: 88 11 22 00 or %g4, 0x200, %g4 ! 201fa00 <_Per_CPU_Information>
2006e48: f2 01 20 08 ld [ %g4 + 8 ], %i1
2006e4c: 80 a6 60 00 cmp %i1, 0
2006e50: 32 80 00 1c bne,a 2006ec0 <_Event_Surrender+0xa0>
2006e54: c8 01 20 0c ld [ %g4 + 0xc ], %g4
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
2006e58: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
2006e5c: 80 89 21 00 btst 0x100, %g4
2006e60: 02 80 00 30 be 2006f20 <_Event_Surrender+0x100>
2006e64: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
2006e68: 02 80 00 04 be 2006e78 <_Event_Surrender+0x58>
2006e6c: 80 8f 20 02 btst 2, %i4
2006e70: 02 80 00 2c be 2006f20 <_Event_Surrender+0x100> <== NEVER TAKEN
2006e74: 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;
2006e78: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
2006e7c: 84 28 80 03 andn %g2, %g3, %g2
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
2006e80: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
2006e84: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2006e88: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
2006e8c: 7f ff ed b8 call 200256c <sparc_enable_interrupts>
2006e90: 01 00 00 00 nop
2006e94: 7f ff ed b2 call 200255c <sparc_disable_interrupts>
2006e98: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
2006e9c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
2006ea0: 80 a0 60 02 cmp %g1, 2
2006ea4: 02 80 00 21 be 2006f28 <_Event_Surrender+0x108>
2006ea8: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
2006eac: 7f ff ed b0 call 200256c <sparc_enable_interrupts>
2006eb0: 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 );
2006eb4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2006eb8: 40 00 0a e9 call 2009a5c <_Thread_Clear_state>
2006ebc: 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() &&
2006ec0: 80 a6 00 04 cmp %i0, %g4
2006ec4: 32 bf ff e6 bne,a 2006e5c <_Event_Surrender+0x3c>
2006ec8: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2006ecc: 09 00 80 7f sethi %hi(0x201fc00), %g4
2006ed0: f2 01 22 00 ld [ %g4 + 0x200 ], %i1 ! 201fe00 <_Event_Sync_state>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
2006ed4: 80 a6 60 02 cmp %i1, 2
2006ed8: 02 80 00 07 be 2006ef4 <_Event_Surrender+0xd4> <== NEVER TAKEN
2006edc: 80 a0 40 03 cmp %g1, %g3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
2006ee0: f2 01 22 00 ld [ %g4 + 0x200 ], %i1
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2006ee4: 80 a6 60 01 cmp %i1, 1
2006ee8: 32 bf ff dd bne,a 2006e5c <_Event_Surrender+0x3c>
2006eec: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
2006ef0: 80 a0 40 03 cmp %g1, %g3
2006ef4: 02 80 00 04 be 2006f04 <_Event_Surrender+0xe4>
2006ef8: 80 8f 20 02 btst 2, %i4
2006efc: 02 80 00 09 be 2006f20 <_Event_Surrender+0x100> <== NEVER TAKEN
2006f00: 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;
2006f04: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2006f08: 84 28 80 03 andn %g2, %g3, %g2
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2006f0c: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
2006f10: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2006f14: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2006f18: 82 10 20 03 mov 3, %g1
2006f1c: c2 21 22 00 st %g1, [ %g4 + 0x200 ]
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
2006f20: 7f ff ed 93 call 200256c <sparc_enable_interrupts>
2006f24: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
2006f28: 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 );
2006f2c: 7f ff ed 90 call 200256c <sparc_enable_interrupts>
2006f30: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
2006f34: 40 00 0f b0 call 200adf4 <_Watchdog_Remove>
2006f38: 90 06 20 48 add %i0, 0x48, %o0
2006f3c: b2 16 63 f8 or %i1, 0x3f8, %i1
2006f40: 40 00 0a c7 call 2009a5c <_Thread_Clear_state>
2006f44: 81 e8 00 00 restore
02006f48 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
2006f48: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
2006f4c: 90 10 00 18 mov %i0, %o0
2006f50: 40 00 0b c2 call 2009e58 <_Thread_Get>
2006f54: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2006f58: c2 07 bf fc ld [ %fp + -4 ], %g1
2006f5c: 80 a0 60 00 cmp %g1, 0
2006f60: 12 80 00 16 bne 2006fb8 <_Event_Timeout+0x70> <== NEVER TAKEN
2006f64: ba 10 00 08 mov %o0, %i5
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
2006f68: 7f ff ed 7d call 200255c <sparc_disable_interrupts>
2006f6c: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
2006f70: 03 00 80 7e sethi %hi(0x201f800), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
2006f74: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 201fa0c <_Per_CPU_Information+0xc>
2006f78: 80 a7 40 01 cmp %i5, %g1
2006f7c: 02 80 00 11 be 2006fc0 <_Event_Timeout+0x78>
2006f80: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2006f84: 82 10 20 06 mov 6, %g1
2006f88: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
2006f8c: 7f ff ed 78 call 200256c <sparc_enable_interrupts>
2006f90: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2006f94: 90 10 00 1d mov %i5, %o0
2006f98: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2006f9c: 40 00 0a b0 call 2009a5c <_Thread_Clear_state>
2006fa0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2006fa4: 03 00 80 7d sethi %hi(0x201f400), %g1
2006fa8: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level>
2006fac: 84 00 bf ff add %g2, -1, %g2
2006fb0: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
return _Thread_Dispatch_disable_level;
2006fb4: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1
2006fb8: 81 c7 e0 08 ret
2006fbc: 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 )
2006fc0: 03 00 80 7f sethi %hi(0x201fc00), %g1
2006fc4: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 201fe00 <_Event_Sync_state>
2006fc8: 80 a0 a0 01 cmp %g2, 1
2006fcc: 32 bf ff ef bne,a 2006f88 <_Event_Timeout+0x40>
2006fd0: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2006fd4: 84 10 20 02 mov 2, %g2
2006fd8: c4 20 62 00 st %g2, [ %g1 + 0x200 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2006fdc: 10 bf ff eb b 2006f88 <_Event_Timeout+0x40>
2006fe0: 82 10 20 06 mov 6, %g1
0200e644 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
200e644: 9d e3 bf 98 save %sp, -104, %sp
200e648: ba 10 00 18 mov %i0, %i5
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
200e64c: a0 06 60 04 add %i1, 4, %l0
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
200e650: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
200e654: 80 a6 40 10 cmp %i1, %l0
200e658: 18 80 00 23 bgu 200e6e4 <_Heap_Allocate_aligned_with_boundary+0xa0>
200e65c: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
200e660: 80 a6 e0 00 cmp %i3, 0
200e664: 12 80 00 7d bne 200e858 <_Heap_Allocate_aligned_with_boundary+0x214>
200e668: 80 a6 40 1b cmp %i1, %i3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200e66c: e2 07 60 08 ld [ %i5 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200e670: 80 a7 40 11 cmp %i5, %l1
200e674: 02 80 00 18 be 200e6d4 <_Heap_Allocate_aligned_with_boundary+0x90>
200e678: b8 10 20 00 clr %i4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200e67c: 82 05 a0 07 add %l6, 7, %g1
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200e680: ae 10 20 04 mov 4, %l7
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200e684: c2 27 bf fc st %g1, [ %fp + -4 ]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200e688: 10 80 00 0b b 200e6b4 <_Heap_Allocate_aligned_with_boundary+0x70>
200e68c: ae 25 c0 19 sub %l7, %i1, %l7
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
200e690: 12 80 00 17 bne 200e6ec <_Heap_Allocate_aligned_with_boundary+0xa8>
200e694: b0 04 60 08 add %l1, 8, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200e698: 80 a6 20 00 cmp %i0, 0
200e69c: 12 80 00 5b bne 200e808 <_Heap_Allocate_aligned_with_boundary+0x1c4>
200e6a0: b8 07 20 01 inc %i4
break;
}
block = block->next;
200e6a4: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200e6a8: 80 a7 40 11 cmp %i5, %l1
200e6ac: 22 80 00 0b be,a 200e6d8 <_Heap_Allocate_aligned_with_boundary+0x94>
200e6b0: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
200e6b4: e4 04 60 04 ld [ %l1 + 4 ], %l2
200e6b8: 80 a4 00 12 cmp %l0, %l2
200e6bc: 0a bf ff f5 bcs 200e690 <_Heap_Allocate_aligned_with_boundary+0x4c>
200e6c0: 80 a6 a0 00 cmp %i2, 0
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
200e6c4: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200e6c8: 80 a7 40 11 cmp %i5, %l1
200e6cc: 12 bf ff fa bne 200e6b4 <_Heap_Allocate_aligned_with_boundary+0x70>
200e6d0: b8 07 20 01 inc %i4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200e6d4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200e6d8: 80 a0 40 1c cmp %g1, %i4
200e6dc: 0a 80 00 5a bcs 200e844 <_Heap_Allocate_aligned_with_boundary+0x200>
200e6e0: b0 10 20 00 clr %i0
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
200e6e4: 81 c7 e0 08 ret
200e6e8: 81 e8 00 00 restore
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
200e6ec: c4 07 bf fc ld [ %fp + -4 ], %g2
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
200e6f0: ea 07 60 14 ld [ %i5 + 0x14 ], %l5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200e6f4: a4 0c bf fe and %l2, -2, %l2
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
200e6f8: 82 20 80 15 sub %g2, %l5, %g1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
200e6fc: a4 04 40 12 add %l1, %l2, %l2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200e700: 92 10 00 1a mov %i2, %o1
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
200e704: b0 05 c0 12 add %l7, %l2, %i0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200e708: a4 00 40 12 add %g1, %l2, %l2
200e70c: 40 00 2f f0 call 201a6cc <.urem>
200e710: 90 10 00 18 mov %i0, %o0
200e714: 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 ) {
200e718: 80 a4 80 18 cmp %l2, %i0
200e71c: 1a 80 00 06 bcc 200e734 <_Heap_Allocate_aligned_with_boundary+0xf0>
200e720: a8 04 60 08 add %l1, 8, %l4
200e724: 90 10 00 12 mov %l2, %o0
200e728: 40 00 2f e9 call 201a6cc <.urem>
200e72c: 92 10 00 1a mov %i2, %o1
200e730: b0 24 80 08 sub %l2, %o0, %i0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
200e734: 80 a6 e0 00 cmp %i3, 0
200e738: 02 80 00 24 be 200e7c8 <_Heap_Allocate_aligned_with_boundary+0x184>
200e73c: 80 a5 00 18 cmp %l4, %i0
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
200e740: a4 06 00 19 add %i0, %i1, %l2
200e744: 92 10 00 1b mov %i3, %o1
200e748: 40 00 2f e1 call 201a6cc <.urem>
200e74c: 90 10 00 12 mov %l2, %o0
200e750: 90 24 80 08 sub %l2, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200e754: 80 a6 00 08 cmp %i0, %o0
200e758: 1a 80 00 1b bcc 200e7c4 <_Heap_Allocate_aligned_with_boundary+0x180>
200e75c: 80 a2 00 12 cmp %o0, %l2
200e760: 1a 80 00 1a bcc 200e7c8 <_Heap_Allocate_aligned_with_boundary+0x184>
200e764: 80 a5 00 18 cmp %l4, %i0
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
200e768: a6 05 00 19 add %l4, %i1, %l3
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
200e76c: 80 a4 c0 08 cmp %l3, %o0
200e770: 08 80 00 08 bleu 200e790 <_Heap_Allocate_aligned_with_boundary+0x14c>
200e774: b0 10 20 00 clr %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200e778: 10 bf ff c9 b 200e69c <_Heap_Allocate_aligned_with_boundary+0x58>
200e77c: 80 a6 20 00 cmp %i0, 0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200e780: 1a 80 00 11 bcc 200e7c4 <_Heap_Allocate_aligned_with_boundary+0x180>
200e784: 80 a4 c0 08 cmp %l3, %o0
if ( boundary_line < boundary_floor ) {
200e788: 18 bf ff c4 bgu 200e698 <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN
200e78c: b0 10 20 00 clr %i0
return 0;
}
alloc_begin = boundary_line - alloc_size;
200e790: b0 22 00 19 sub %o0, %i1, %i0
200e794: 92 10 00 1a mov %i2, %o1
200e798: 40 00 2f cd call 201a6cc <.urem>
200e79c: 90 10 00 18 mov %i0, %o0
200e7a0: 92 10 00 1b mov %i3, %o1
200e7a4: b0 26 00 08 sub %i0, %o0, %i0
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
200e7a8: a4 06 00 19 add %i0, %i1, %l2
200e7ac: 40 00 2f c8 call 201a6cc <.urem>
200e7b0: 90 10 00 12 mov %l2, %o0
200e7b4: 90 24 80 08 sub %l2, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200e7b8: 80 a2 00 12 cmp %o0, %l2
200e7bc: 0a bf ff f1 bcs 200e780 <_Heap_Allocate_aligned_with_boundary+0x13c>
200e7c0: 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 ) {
200e7c4: 80 a5 00 18 cmp %l4, %i0
200e7c8: 18 80 00 22 bgu 200e850 <_Heap_Allocate_aligned_with_boundary+0x20c>
200e7cc: 82 10 3f f8 mov -8, %g1
200e7d0: 90 10 00 18 mov %i0, %o0
200e7d4: a4 20 40 11 sub %g1, %l1, %l2
200e7d8: 92 10 00 16 mov %l6, %o1
200e7dc: 40 00 2f bc call 201a6cc <.urem>
200e7e0: a4 04 80 18 add %l2, %i0, %l2
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
200e7e4: 90 a4 80 08 subcc %l2, %o0, %o0
200e7e8: 02 bf ff ad be 200e69c <_Heap_Allocate_aligned_with_boundary+0x58>
200e7ec: 80 a6 20 00 cmp %i0, 0
200e7f0: 80 a2 00 15 cmp %o0, %l5
return alloc_begin;
}
}
return 0;
200e7f4: 82 40 3f ff addx %g0, -1, %g1
200e7f8: b0 0e 00 01 and %i0, %g1, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200e7fc: 80 a6 20 00 cmp %i0, 0
200e800: 02 bf ff a9 be 200e6a4 <_Heap_Allocate_aligned_with_boundary+0x60>
200e804: b8 07 20 01 inc %i4
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200e808: c4 07 60 48 ld [ %i5 + 0x48 ], %g2
stats->searches += search_count;
200e80c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200e810: 84 00 a0 01 inc %g2
stats->searches += search_count;
200e814: 82 00 40 1c add %g1, %i4, %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200e818: c4 27 60 48 st %g2, [ %i5 + 0x48 ]
stats->searches += search_count;
200e81c: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200e820: 90 10 00 1d mov %i5, %o0
200e824: 92 10 00 11 mov %l1, %o1
200e828: 94 10 00 18 mov %i0, %o2
200e82c: 7f ff e7 ad call 20086e0 <_Heap_Block_allocate>
200e830: 96 10 00 19 mov %i1, %o3
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200e834: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200e838: 80 a0 40 1c cmp %g1, %i4
200e83c: 1a 80 00 03 bcc 200e848 <_Heap_Allocate_aligned_with_boundary+0x204>
200e840: 01 00 00 00 nop
stats->max_search = search_count;
200e844: f8 27 60 44 st %i4, [ %i5 + 0x44 ]
}
return (void *) alloc_begin;
}
200e848: 81 c7 e0 08 ret
200e84c: 81 e8 00 00 restore
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
200e850: 10 bf ff 92 b 200e698 <_Heap_Allocate_aligned_with_boundary+0x54>
200e854: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
200e858: 18 bf ff a3 bgu 200e6e4 <_Heap_Allocate_aligned_with_boundary+0xa0>
200e85c: 80 a6 a0 00 cmp %i2, 0
return NULL;
}
if ( alignment == 0 ) {
200e860: 22 bf ff 83 be,a 200e66c <_Heap_Allocate_aligned_with_boundary+0x28>
200e864: b4 10 00 16 mov %l6, %i2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200e868: 10 bf ff 82 b 200e670 <_Heap_Allocate_aligned_with_boundary+0x2c>
200e86c: e2 07 60 08 ld [ %i5 + 8 ], %l1
0200e85c <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
200e85c: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
200e860: c0 27 bf f8 clr [ %fp + -8 ]
Heap_Block *extend_last_block = NULL;
200e864: c0 27 bf fc clr [ %fp + -4 ]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
200e868: ba 06 40 1a add %i1, %i2, %i5
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
200e86c: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
200e870: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
200e874: d6 06 20 14 ld [ %i0 + 0x14 ], %o3
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
200e878: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
200e87c: 80 a6 40 1d cmp %i1, %i5
200e880: 08 80 00 05 bleu 200e894 <_Heap_Extend+0x38>
200e884: a2 10 20 00 clr %l1
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
200e888: b0 0c 60 01 and %l1, 1, %i0
200e88c: 81 c7 e0 08 ret
200e890: 81 e8 00 00 restore
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
200e894: 90 10 00 19 mov %i1, %o0
200e898: 92 10 00 1a mov %i2, %o1
200e89c: 94 10 00 10 mov %l0, %o2
200e8a0: 98 07 bf f8 add %fp, -8, %o4
200e8a4: 7f ff e7 26 call 200853c <_Heap_Get_first_and_last_block>
200e8a8: 9a 07 bf fc add %fp, -4, %o5
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
200e8ac: 80 8a 20 ff btst 0xff, %o0
200e8b0: 02 bf ff f6 be 200e888 <_Heap_Extend+0x2c>
200e8b4: aa 10 20 00 clr %l5
200e8b8: a2 10 00 1c mov %i4, %l1
200e8bc: ac 10 20 00 clr %l6
200e8c0: a6 10 20 00 clr %l3
200e8c4: 10 80 00 14 b 200e914 <_Heap_Extend+0xb8>
200e8c8: a8 10 20 00 clr %l4
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
200e8cc: 2a 80 00 02 bcs,a 200e8d4 <_Heap_Extend+0x78>
200e8d0: ac 10 00 11 mov %l1, %l6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200e8d4: 90 10 00 1a mov %i2, %o0
200e8d8: 40 00 30 4d call 201aa0c <.urem>
200e8dc: 92 10 00 10 mov %l0, %o1
200e8e0: 82 06 bf f8 add %i2, -8, %g1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200e8e4: 80 a6 80 19 cmp %i2, %i1
200e8e8: 02 80 00 1c be 200e958 <_Heap_Extend+0xfc>
200e8ec: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
200e8f0: 80 a6 40 1a cmp %i1, %i2
200e8f4: 38 80 00 02 bgu,a 200e8fc <_Heap_Extend+0xa0>
200e8f8: aa 10 00 01 mov %g1, %l5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200e8fc: e2 00 60 04 ld [ %g1 + 4 ], %l1
200e900: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200e904: a2 00 40 11 add %g1, %l1, %l1
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200e908: 80 a7 00 11 cmp %i4, %l1
200e90c: 22 80 00 1b be,a 200e978 <_Heap_Extend+0x11c>
200e910: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200e914: 80 a4 40 1c cmp %l1, %i4
200e918: 02 80 00 72 be 200eae0 <_Heap_Extend+0x284>
200e91c: 82 10 00 11 mov %l1, %g1
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200e920: 80 a0 40 1d cmp %g1, %i5
200e924: 0a 80 00 7c bcs 200eb14 <_Heap_Extend+0x2b8>
200e928: f4 04 40 00 ld [ %l1 ], %i2
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
200e92c: 80 a0 40 1d cmp %g1, %i5
200e930: 12 bf ff e7 bne 200e8cc <_Heap_Extend+0x70>
200e934: 80 a7 40 1a cmp %i5, %i2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200e938: 90 10 00 1a mov %i2, %o0
200e93c: 40 00 30 34 call 201aa0c <.urem>
200e940: 92 10 00 10 mov %l0, %o1
200e944: 82 06 bf f8 add %i2, -8, %g1
200e948: a8 10 00 11 mov %l1, %l4
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200e94c: 80 a6 80 19 cmp %i2, %i1
200e950: 12 bf ff e8 bne 200e8f0 <_Heap_Extend+0x94> <== ALWAYS TAKEN
200e954: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
200e958: fa 24 40 00 st %i5, [ %l1 ]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200e95c: e2 00 60 04 ld [ %g1 + 4 ], %l1
200e960: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200e964: a2 00 40 11 add %g1, %l1, %l1
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200e968: 80 a7 00 11 cmp %i4, %l1
200e96c: 12 bf ff ea bne 200e914 <_Heap_Extend+0xb8> <== NEVER TAKEN
200e970: a6 10 00 01 mov %g1, %l3
if ( extend_area_begin < heap->area_begin ) {
200e974: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200e978: 80 a6 40 01 cmp %i1, %g1
200e97c: 3a 80 00 61 bcc,a 200eb00 <_Heap_Extend+0x2a4>
200e980: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
heap->area_begin = extend_area_begin;
200e984: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200e988: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e98c: c4 07 bf fc ld [ %fp + -4 ], %g2
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200e990: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
200e994: 86 20 80 01 sub %g2, %g1, %g3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
200e998: fa 20 40 00 st %i5, [ %g1 ]
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
200e99c: b8 10 e0 01 or %g3, 1, %i4
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
200e9a0: f8 20 60 04 st %i4, [ %g1 + 4 ]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
200e9a4: c6 20 80 00 st %g3, [ %g2 ]
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200e9a8: 80 a1 00 01 cmp %g4, %g1
200e9ac: 08 80 00 4f bleu 200eae8 <_Heap_Extend+0x28c>
200e9b0: c0 20 a0 04 clr [ %g2 + 4 ]
heap->first_block = extend_first_block;
200e9b4: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200e9b8: 80 a5 20 00 cmp %l4, 0
200e9bc: 02 80 00 76 be 200eb94 <_Heap_Extend+0x338>
200e9c0: b2 06 60 08 add %i1, 8, %i1
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
200e9c4: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
200e9c8: 92 10 00 1c mov %i4, %o1
200e9cc: 40 00 30 10 call 201aa0c <.urem>
200e9d0: 90 10 00 19 mov %i1, %o0
if ( remainder != 0 ) {
200e9d4: 80 a2 20 00 cmp %o0, 0
200e9d8: 02 80 00 04 be 200e9e8 <_Heap_Extend+0x18c>
200e9dc: c8 05 00 00 ld [ %l4 ], %g4
return value - remainder + alignment;
200e9e0: b2 06 40 1c add %i1, %i4, %i1
200e9e4: b2 26 40 08 sub %i1, %o0, %i1
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200e9e8: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
--stats->frees;
200e9ec: c6 06 20 50 ld [ %i0 + 0x50 ], %g3
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
200e9f0: 82 06 7f f8 add %i1, -8, %g1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
200e9f4: c8 26 7f f8 st %g4, [ %i1 + -8 ]
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200e9f8: 84 00 a0 01 inc %g2
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
200e9fc: 88 25 00 01 sub %l4, %g1, %g4
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
--stats->frees;
200ea00: 82 00 ff ff add %g3, -1, %g1
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
200ea04: 88 11 20 01 or %g4, 1, %g4
200ea08: c8 26 7f fc st %g4, [ %i1 + -4 ]
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200ea0c: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
--stats->frees;
200ea10: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block ));
200ea14: 90 10 00 18 mov %i0, %o0
200ea18: 40 00 00 66 call 200ebb0 <_Heap_Free>
200ea1c: 92 10 00 19 mov %i1, %o1
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
200ea20: 80 a4 e0 00 cmp %l3, 0
200ea24: 02 80 00 41 be 200eb28 <_Heap_Extend+0x2cc>
200ea28: ba 07 7f f8 add %i5, -8, %i5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200ea2c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
200ea30: ba 27 40 13 sub %i5, %l3, %i5
200ea34: 40 00 2f f6 call 201aa0c <.urem>
200ea38: 90 10 00 1d mov %i5, %o0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
200ea3c: c2 04 e0 04 ld [ %l3 + 4 ], %g1
200ea40: ba 27 40 08 sub %i5, %o0, %i5
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200ea44: 84 07 40 13 add %i5, %l3, %g2
(last_block->size_and_flag - last_block_new_size)
200ea48: 82 20 40 1d sub %g1, %i5, %g1
| HEAP_PREV_BLOCK_USED;
200ea4c: 82 10 60 01 or %g1, 1, %g1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200ea50: c2 20 a0 04 st %g1, [ %g2 + 4 ]
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200ea54: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200ea58: c6 04 e0 04 ld [ %l3 + 4 ], %g3
--stats->frees;
200ea5c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200ea60: 86 08 e0 01 and %g3, 1, %g3
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200ea64: 84 00 a0 01 inc %g2
block->size_and_flag = size | flag;
200ea68: ba 17 40 03 or %i5, %g3, %i5
--stats->frees;
200ea6c: 82 00 7f ff add %g1, -1, %g1
200ea70: fa 24 e0 04 st %i5, [ %l3 + 4 ]
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200ea74: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
--stats->frees;
200ea78: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block ));
200ea7c: 90 10 00 18 mov %i0, %o0
200ea80: 40 00 00 4c call 200ebb0 <_Heap_Free>
200ea84: 92 04 e0 08 add %l3, 8, %o1
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200ea88: 80 a4 e0 00 cmp %l3, 0
200ea8c: 02 80 00 34 be 200eb5c <_Heap_Extend+0x300>
200ea90: 80 a5 20 00 cmp %l4, 0
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200ea94: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200ea98: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200ea9c: c8 00 60 04 ld [ %g1 + 4 ], %g4
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
200eaa0: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200eaa4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200eaa8: ba 27 40 01 sub %i5, %g1, %i5
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200eaac: 88 09 20 01 and %g4, 1, %g4
block->size_and_flag = size | flag;
200eab0: 88 17 40 04 or %i5, %g4, %g4
200eab4: c8 20 60 04 st %g4, [ %g1 + 4 ]
200eab8: a4 20 c0 12 sub %g3, %l2, %l2
/* Statistics */
stats->size += extended_size;
200eabc: 82 00 80 12 add %g2, %l2, %g1
200eac0: c2 26 20 2c st %g1, [ %i0 + 0x2c ]
if ( extended_size_ptr != NULL )
200eac4: 80 a6 e0 00 cmp %i3, 0
200eac8: 02 bf ff 70 be 200e888 <_Heap_Extend+0x2c> <== NEVER TAKEN
200eacc: a2 10 20 01 mov 1, %l1
*extended_size_ptr = extended_size;
200ead0: e4 26 c0 00 st %l2, [ %i3 ]
return true;
}
200ead4: b0 0c 60 01 and %l1, 1, %i0
200ead8: 81 c7 e0 08 ret
200eadc: 81 e8 00 00 restore
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200eae0: 10 bf ff 90 b 200e920 <_Heap_Extend+0xc4>
200eae4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
200eae8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200eaec: 80 a0 40 02 cmp %g1, %g2
200eaf0: 2a bf ff b2 bcs,a 200e9b8 <_Heap_Extend+0x15c>
200eaf4: c4 26 20 24 st %g2, [ %i0 + 0x24 ]
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200eaf8: 10 bf ff b1 b 200e9bc <_Heap_Extend+0x160>
200eafc: 80 a5 20 00 cmp %l4, 0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
200eb00: 80 a7 40 01 cmp %i5, %g1
200eb04: 38 bf ff a1 bgu,a 200e988 <_Heap_Extend+0x12c>
200eb08: fa 26 20 1c st %i5, [ %i0 + 0x1c ]
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200eb0c: 10 bf ff a0 b 200e98c <_Heap_Extend+0x130>
200eb10: c2 07 bf f8 ld [ %fp + -8 ], %g1
(uintptr_t) start_block : heap->area_begin;
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200eb14: 80 a6 40 1a cmp %i1, %i2
200eb18: 1a bf ff 86 bcc 200e930 <_Heap_Extend+0xd4>
200eb1c: 80 a0 40 1d cmp %g1, %i5
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
200eb20: 10 bf ff 5a b 200e888 <_Heap_Extend+0x2c>
200eb24: a2 10 20 00 clr %l1
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
200eb28: 80 a5 60 00 cmp %l5, 0
200eb2c: 02 bf ff d7 be 200ea88 <_Heap_Extend+0x22c>
200eb30: c4 07 bf f8 ld [ %fp + -8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200eb34: c6 05 60 04 ld [ %l5 + 4 ], %g3
_Heap_Link_above(
200eb38: c2 07 bf fc ld [ %fp + -4 ], %g1
200eb3c: 86 08 e0 01 and %g3, 1, %g3
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
200eb40: 84 20 80 15 sub %g2, %l5, %g2
block->size_and_flag = size | flag;
200eb44: 84 10 80 03 or %g2, %g3, %g2
200eb48: c4 25 60 04 st %g2, [ %l5 + 4 ]
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
200eb4c: c4 00 60 04 ld [ %g1 + 4 ], %g2
200eb50: 84 10 a0 01 or %g2, 1, %g2
200eb54: 10 bf ff cd b 200ea88 <_Heap_Extend+0x22c>
200eb58: c4 20 60 04 st %g2, [ %g1 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200eb5c: 32 bf ff cf bne,a 200ea98 <_Heap_Extend+0x23c>
200eb60: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200eb64: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
--stats->frees;
200eb68: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block ));
200eb6c: d2 07 bf f8 ld [ %fp + -8 ], %o1
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200eb70: 84 00 a0 01 inc %g2
--stats->frees;
200eb74: 82 00 7f ff add %g1, -1, %g1
static void _Heap_Free_block( Heap_Control *heap, Heap_Block *block )
{
Heap_Statistics *const stats = &heap->stats;
/* Statistics */
++stats->used_blocks;
200eb78: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
--stats->frees;
200eb7c: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( block ));
200eb80: 90 10 00 18 mov %i0, %o0
200eb84: 40 00 00 0b call 200ebb0 <_Heap_Free>
200eb88: 92 02 60 08 add %o1, 8, %o1
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200eb8c: 10 bf ff c3 b 200ea98 <_Heap_Extend+0x23c>
200eb90: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
200eb94: 80 a5 a0 00 cmp %l6, 0
200eb98: 02 bf ff a3 be 200ea24 <_Heap_Extend+0x1c8>
200eb9c: 80 a4 e0 00 cmp %l3, 0
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
200eba0: ac 25 80 02 sub %l6, %g2, %l6
200eba4: ac 15 a0 01 or %l6, 1, %l6
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
200eba8: 10 bf ff 9f b 200ea24 <_Heap_Extend+0x1c8>
200ebac: ec 20 a0 04 st %l6, [ %g2 + 4 ]
0200e870 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200e870: 9d e3 bf a0 save %sp, -96, %sp
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
200e874: 80 a6 60 00 cmp %i1, 0
200e878: 02 80 00 57 be 200e9d4 <_Heap_Free+0x164>
200e87c: 84 10 20 01 mov 1, %g2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200e880: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200e884: 40 00 2f 92 call 201a6cc <.urem>
200e888: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
200e88c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200e890: ba 06 7f f8 add %i1, -8, %i5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200e894: ba 27 40 08 sub %i5, %o0, %i5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200e898: 80 a7 40 01 cmp %i5, %g1
200e89c: 0a 80 00 4e bcs 200e9d4 <_Heap_Free+0x164>
200e8a0: 84 10 20 00 clr %g2
200e8a4: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200e8a8: 80 a7 40 04 cmp %i5, %g4
200e8ac: 38 80 00 4b bgu,a 200e9d8 <_Heap_Free+0x168>
200e8b0: b0 08 a0 01 and %g2, 1, %i0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200e8b4: de 07 60 04 ld [ %i5 + 4 ], %o7
200e8b8: b2 0b ff fe and %o7, -2, %i1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200e8bc: 86 07 40 19 add %i5, %i1, %g3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200e8c0: 80 a0 40 03 cmp %g1, %g3
200e8c4: 38 80 00 45 bgu,a 200e9d8 <_Heap_Free+0x168> <== NEVER TAKEN
200e8c8: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
200e8cc: 80 a1 00 03 cmp %g4, %g3
200e8d0: 2a 80 00 42 bcs,a 200e9d8 <_Heap_Free+0x168> <== NEVER TAKEN
200e8d4: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200e8d8: da 00 e0 04 ld [ %g3 + 4 ], %o5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
200e8dc: 80 8b 60 01 btst 1, %o5
200e8e0: 02 80 00 3d be 200e9d4 <_Heap_Free+0x164>
200e8e4: 98 0b 7f fe and %o5, -2, %o4
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
200e8e8: 80 a1 00 03 cmp %g4, %g3
200e8ec: 02 80 00 06 be 200e904 <_Heap_Free+0x94>
200e8f0: 9a 10 20 00 clr %o5
200e8f4: 84 00 c0 0c add %g3, %o4, %g2
200e8f8: da 00 a0 04 ld [ %g2 + 4 ], %o5
200e8fc: 9a 0b 60 01 and %o5, 1, %o5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
200e900: 9a 1b 60 01 xor %o5, 1, %o5
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
200e904: 80 8b e0 01 btst 1, %o7
200e908: 12 80 00 1d bne 200e97c <_Heap_Free+0x10c>
200e90c: 80 8b 60 ff btst 0xff, %o5
uintptr_t const prev_size = block->prev_size;
200e910: d6 07 40 00 ld [ %i5 ], %o3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200e914: 9e 27 40 0b sub %i5, %o3, %o7
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200e918: 80 a0 40 0f cmp %g1, %o7
200e91c: 18 80 00 2e bgu 200e9d4 <_Heap_Free+0x164> <== NEVER TAKEN
200e920: 84 10 20 00 clr %g2
200e924: 80 a1 00 0f cmp %g4, %o7
200e928: 2a 80 00 2c bcs,a 200e9d8 <_Heap_Free+0x168> <== NEVER TAKEN
200e92c: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200e930: c2 03 e0 04 ld [ %o7 + 4 ], %g1
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
200e934: 80 88 60 01 btst 1, %g1
200e938: 02 80 00 27 be 200e9d4 <_Heap_Free+0x164> <== NEVER TAKEN
200e93c: 80 8b 60 ff btst 0xff, %o5
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200e940: 22 80 00 3a be,a 200ea28 <_Heap_Free+0x1b8>
200e944: 96 06 40 0b add %i1, %o3, %o3
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
200e948: c2 00 e0 08 ld [ %g3 + 8 ], %g1
Heap_Block *prev = block->prev;
200e94c: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200e950: c6 06 20 38 ld [ %i0 + 0x38 ], %g3
prev->next = next;
200e954: c2 20 a0 08 st %g1, [ %g2 + 8 ]
next->prev = prev;
200e958: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200e95c: 82 00 ff ff add %g3, -1, %g1
200e960: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
200e964: 98 06 40 0c add %i1, %o4, %o4
200e968: 96 03 00 0b add %o4, %o3, %o3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200e96c: 82 12 e0 01 or %o3, 1, %g1
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200e970: d6 23 c0 0b st %o3, [ %o7 + %o3 ]
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200e974: 10 80 00 0e b 200e9ac <_Heap_Free+0x13c>
200e978: c2 23 e0 04 st %g1, [ %o7 + 4 ]
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
200e97c: 22 80 00 19 be,a 200e9e0 <_Heap_Free+0x170>
200e980: c4 06 20 08 ld [ %i0 + 8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
200e984: c4 00 e0 08 ld [ %g3 + 8 ], %g2
Heap_Block *prev = old_block->prev;
200e988: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
new_block->next = next;
200e98c: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = prev;
200e990: c2 27 60 0c st %g1, [ %i5 + 0xc ]
uintptr_t const size = block_size + next_block_size;
200e994: 98 03 00 19 add %o4, %i1, %o4
next->prev = new_block;
200e998: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
prev->next = new_block;
200e99c: fa 20 60 08 st %i5, [ %g1 + 8 ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200e9a0: 84 13 20 01 or %o4, 1, %g2
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200e9a4: d8 27 40 0c st %o4, [ %i5 + %o4 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200e9a8: c4 27 60 04 st %g2, [ %i5 + 4 ]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200e9ac: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
200e9b0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
200e9b4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200e9b8: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
200e9bc: 82 00 60 01 inc %g1
stats->free_size += block_size;
200e9c0: b2 00 c0 19 add %g3, %i1, %i1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200e9c4: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
200e9c8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
200e9cc: f2 26 20 30 st %i1, [ %i0 + 0x30 ]
return( true );
200e9d0: 84 10 20 01 mov 1, %g2
}
200e9d4: b0 08 a0 01 and %g2, 1, %i0
200e9d8: 81 c7 e0 08 ret
200e9dc: 81 e8 00 00 restore
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
200e9e0: 82 16 60 01 or %i1, 1, %g1
200e9e4: c2 27 60 04 st %g1, [ %i5 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200e9e8: c8 00 e0 04 ld [ %g3 + 4 ], %g4
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
200e9ec: f0 27 60 0c st %i0, [ %i5 + 0xc ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200e9f0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
200e9f4: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
200e9f8: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200e9fc: 84 09 3f fe and %g4, -2, %g2
next_block->prev_size = block_size;
200ea00: f2 27 40 19 st %i1, [ %i5 + %i1 ]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200ea04: c4 20 e0 04 st %g2, [ %g3 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
200ea08: 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;
200ea0c: 82 00 60 01 inc %g1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
200ea10: fa 26 20 08 st %i5, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
200ea14: 80 a0 40 02 cmp %g1, %g2
200ea18: 08 bf ff e5 bleu 200e9ac <_Heap_Free+0x13c>
200ea1c: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200ea20: 10 bf ff e3 b 200e9ac <_Heap_Free+0x13c>
200ea24: 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;
200ea28: 82 12 e0 01 or %o3, 1, %g1
200ea2c: c2 23 e0 04 st %g1, [ %o7 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200ea30: c2 00 e0 04 ld [ %g3 + 4 ], %g1
next_block->prev_size = size;
200ea34: d6 27 40 19 st %o3, [ %i5 + %i1 ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200ea38: 82 08 7f fe and %g1, -2, %g1
200ea3c: 10 bf ff dc b 200e9ac <_Heap_Free+0x13c>
200ea40: c2 20 e0 04 st %g1, [ %g3 + 4 ]
020084dc <_Heap_Get_first_and_last_block>:
uintptr_t page_size,
uintptr_t min_block_size,
Heap_Block **first_block_ptr,
Heap_Block **last_block_ptr
)
{
20084dc: 9d e3 bf a0 save %sp, -96, %sp
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
20084e0: a0 06 20 08 add %i0, 8, %l0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
20084e4: 92 10 00 1a mov %i2, %o1
20084e8: 40 00 48 79 call 201a6cc <.urem>
20084ec: 90 10 00 10 mov %l0, %o0
if ( remainder != 0 ) {
20084f0: 80 a2 20 00 cmp %o0, 0
20084f4: 02 80 00 04 be 2008504 <_Heap_Get_first_and_last_block+0x28>
20084f8: 84 06 40 18 add %i1, %i0, %g2
return value - remainder + alignment;
20084fc: a0 06 80 10 add %i2, %l0, %l0
2008500: a0 24 00 08 sub %l0, %o0, %l0
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
2008504: 82 24 00 18 sub %l0, %i0, %g1
_Heap_Align_down( heap_area_size - overhead, page_size );
Heap_Block *const first_block = (Heap_Block *) first_block_begin;
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
2008508: 80 a0 40 19 cmp %g1, %i1
200850c: 1a 80 00 13 bcc 2008558 <_Heap_Get_first_and_last_block+0x7c>
2008510: a0 04 3f f8 add %l0, -8, %l0
2008514: 80 a0 80 18 cmp %g2, %i0
2008518: 0a 80 00 10 bcs 2008558 <_Heap_Get_first_and_last_block+0x7c><== NEVER TAKEN
200851c: b2 26 40 01 sub %i1, %g1, %i1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
2008520: 92 10 00 1a mov %i2, %o1
2008524: 40 00 48 6a call 201a6cc <.urem>
2008528: 90 10 00 19 mov %i1, %o0
200852c: b2 26 40 08 sub %i1, %o0, %i1
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
2008530: 80 a6 c0 19 cmp %i3, %i1
2008534: 18 80 00 06 bgu 200854c <_Heap_Get_first_and_last_block+0x70><== NEVER TAKEN
2008538: b0 10 20 00 clr %i0
) {
/* Invalid area or area too small */
return false;
}
*first_block_ptr = first_block;
200853c: e0 27 00 00 st %l0, [ %i4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2008540: b2 06 40 10 add %i1, %l0, %i1
*last_block_ptr = last_block;
return true;
2008544: b0 10 20 01 mov 1, %i0
/* Invalid area or area too small */
return false;
}
*first_block_ptr = first_block;
*last_block_ptr = last_block;
2008548: f2 27 40 00 st %i1, [ %i5 ]
return true;
}
200854c: b0 0e 20 01 and %i0, 1, %i0
2008550: 81 c7 e0 08 ret
2008554: 81 e8 00 00 restore
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
) {
/* Invalid area or area too small */
return false;
2008558: b0 10 20 00 clr %i0
*first_block_ptr = first_block;
*last_block_ptr = last_block;
return true;
}
200855c: b0 0e 20 01 and %i0, 1, %i0
2008560: 81 c7 e0 08 ret
2008564: 81 e8 00 00 restore
0200f364 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
200f364: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *the_block = the_heap->first_block;
200f368: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
Heap_Block *const end = the_heap->last_block;
200f36c: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
memset(the_info, 0, sizeof(*the_info));
200f370: 92 10 20 00 clr %o1
200f374: 90 10 00 19 mov %i1, %o0
200f378: 40 00 0c e3 call 2012704 <memset>
200f37c: 94 10 20 18 mov 0x18, %o2
while ( the_block != end ) {
200f380: 80 a7 40 1c cmp %i5, %i4
200f384: 02 80 00 17 be 200f3e0 <_Heap_Get_information+0x7c> <== NEVER TAKEN
200f388: 01 00 00 00 nop
200f38c: c6 07 60 04 ld [ %i5 + 4 ], %g3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200f390: 84 08 ff fe and %g3, -2, %g2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200f394: ba 07 40 02 add %i5, %g2, %i5
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;
200f398: c6 07 60 04 ld [ %i5 + 4 ], %g3
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) )
200f39c: 80 88 e0 01 btst 1, %g3
200f3a0: 02 80 00 03 be 200f3ac <_Heap_Get_information+0x48>
200f3a4: 82 10 00 19 mov %i1, %g1
info = &the_info->Used;
200f3a8: 82 06 60 0c add %i1, 0xc, %g1
else
info = &the_info->Free;
info->number++;
200f3ac: de 00 40 00 ld [ %g1 ], %o7
info->total += the_size;
200f3b0: f0 00 60 08 ld [ %g1 + 8 ], %i0
if ( info->largest < the_size )
200f3b4: c8 00 60 04 ld [ %g1 + 4 ], %g4
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
200f3b8: 9e 03 e0 01 inc %o7
info->total += the_size;
200f3bc: b0 06 00 02 add %i0, %g2, %i0
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
200f3c0: de 20 40 00 st %o7, [ %g1 ]
info->total += the_size;
if ( info->largest < the_size )
200f3c4: 80 a1 00 02 cmp %g4, %g2
200f3c8: 1a 80 00 03 bcc 200f3d4 <_Heap_Get_information+0x70>
200f3cc: f0 20 60 08 st %i0, [ %g1 + 8 ]
info->largest = the_size;
200f3d0: c4 20 60 04 st %g2, [ %g1 + 4 ]
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
200f3d4: 80 a7 00 1d cmp %i4, %i5
200f3d8: 12 bf ff ef bne 200f394 <_Heap_Get_information+0x30>
200f3dc: 84 08 ff fe and %g3, -2, %g2
200f3e0: 81 c7 e0 08 ret
200f3e4: 81 e8 00 00 restore
0200eb64 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
200eb64: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200eb68: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200eb6c: 40 00 2e d8 call 201a6cc <.urem>
200eb70: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
200eb74: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200eb78: 84 06 7f f8 add %i1, -8, %g2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200eb7c: 84 20 80 08 sub %g2, %o0, %g2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200eb80: 80 a0 80 01 cmp %g2, %g1
200eb84: 0a 80 00 16 bcs 200ebdc <_Heap_Size_of_alloc_area+0x78>
200eb88: 86 10 20 00 clr %g3
200eb8c: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200eb90: 80 a0 80 04 cmp %g2, %g4
200eb94: 18 80 00 13 bgu 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200eb98: b0 08 e0 01 and %g3, 1, %i0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200eb9c: f0 00 a0 04 ld [ %g2 + 4 ], %i0
200eba0: b0 0e 3f fe and %i0, -2, %i0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200eba4: 84 00 80 18 add %g2, %i0, %g2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200eba8: 80 a0 40 02 cmp %g1, %g2
200ebac: 18 80 00 0d bgu 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200ebb0: b0 08 e0 01 and %g3, 1, %i0
200ebb4: 80 a1 00 02 cmp %g4, %g2
200ebb8: 0a 80 00 0a bcs 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200ebbc: 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;
200ebc0: c2 00 a0 04 ld [ %g2 + 4 ], %g1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
200ebc4: 80 88 60 01 btst 1, %g1
200ebc8: 02 80 00 06 be 200ebe0 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200ebcc: 84 20 80 19 sub %g2, %i1, %g2
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
200ebd0: 86 10 20 01 mov 1, %g3
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
200ebd4: 84 00 a0 04 add %g2, 4, %g2
200ebd8: c4 26 80 00 st %g2, [ %i2 ]
return true;
}
200ebdc: b0 08 e0 01 and %g3, 1, %i0
200ebe0: 81 c7 e0 08 ret
200ebe4: 81 e8 00 00 restore
020094bc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
20094bc: 9d e3 bf 80 save %sp, -128, %sp
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
20094c0: 3b 00 80 25 sethi %hi(0x2009400), %i5
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
20094c4: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
20094c8: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
20094cc: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *const last_block = heap->last_block;
20094d0: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
20094d4: 80 a6 a0 00 cmp %i2, 0
20094d8: 02 80 00 04 be 20094e8 <_Heap_Walk+0x2c>
20094dc: ba 17 60 50 or %i5, 0x50, %i5
20094e0: 3b 00 80 25 sethi %hi(0x2009400), %i5
20094e4: ba 17 60 58 or %i5, 0x58, %i5 ! 2009458 <_Heap_Walk_print>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
20094e8: 03 00 80 86 sethi %hi(0x2021800), %g1
20094ec: c4 00 63 18 ld [ %g1 + 0x318 ], %g2 ! 2021b18 <_System_state_Current>
20094f0: 80 a0 a0 03 cmp %g2, 3
20094f4: 02 80 00 05 be 2009508 <_Heap_Walk+0x4c>
20094f8: 82 10 20 01 mov 1, %g1
block = next_block;
} while ( block != first_block );
return true;
}
20094fc: b0 08 60 01 and %g1, 1, %i0
2009500: 81 c7 e0 08 ret
2009504: 81 e8 00 00 restore
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
2009508: da 06 20 18 ld [ %i0 + 0x18 ], %o5
200950c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
2009510: c4 06 20 08 ld [ %i0 + 8 ], %g2
2009514: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2009518: 90 10 00 19 mov %i1, %o0
200951c: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2009520: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
2009524: e2 23 a0 64 st %l1, [ %sp + 0x64 ]
2009528: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
200952c: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2009530: 92 10 20 00 clr %o1
2009534: 96 10 00 10 mov %l0, %o3
2009538: 15 00 80 79 sethi %hi(0x201e400), %o2
200953c: 98 10 00 1b mov %i3, %o4
2009540: 9f c7 40 00 call %i5
2009544: 94 12 a1 98 or %o2, 0x198, %o2
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
2009548: 80 a4 20 00 cmp %l0, 0
200954c: 02 80 00 28 be 20095ec <_Heap_Walk+0x130>
2009550: 80 8c 20 07 btst 7, %l0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
2009554: 12 80 00 2d bne 2009608 <_Heap_Walk+0x14c>
2009558: 90 10 00 1b mov %i3, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200955c: 7f ff e1 64 call 2001aec <.urem>
2009560: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
2009564: 80 a2 20 00 cmp %o0, 0
2009568: 12 80 00 30 bne 2009628 <_Heap_Walk+0x16c>
200956c: 90 07 20 08 add %i4, 8, %o0
2009570: 7f ff e1 5f call 2001aec <.urem>
2009574: 92 10 00 10 mov %l0, %o1
);
return false;
}
if (
2009578: 80 a2 20 00 cmp %o0, 0
200957c: 32 80 00 33 bne,a 2009648 <_Heap_Walk+0x18c>
2009580: 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;
2009584: e8 07 20 04 ld [ %i4 + 4 ], %l4
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
2009588: 80 8d 20 01 btst 1, %l4
200958c: 22 80 00 36 be,a 2009664 <_Heap_Walk+0x1a8>
2009590: 90 10 00 19 mov %i1, %o0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2009594: c2 04 60 04 ld [ %l1 + 4 ], %g1
2009598: 82 08 7f fe and %g1, -2, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200959c: 82 04 40 01 add %l1, %g1, %g1
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
20095a0: c4 00 60 04 ld [ %g1 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
20095a4: 80 88 a0 01 btst 1, %g2
20095a8: 02 80 00 0a be 20095d0 <_Heap_Walk+0x114>
20095ac: 80 a7 00 01 cmp %i4, %g1
);
return false;
}
if (
20095b0: 02 80 00 33 be 200967c <_Heap_Walk+0x1c0>
20095b4: 90 10 00 19 mov %i1, %o0
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
20095b8: 92 10 20 01 mov 1, %o1
20095bc: 15 00 80 79 sethi %hi(0x201e400), %o2
20095c0: 9f c7 40 00 call %i5
20095c4: 94 12 a3 10 or %o2, 0x310, %o2 ! 201e710 <__log2table+0x2d8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
20095c8: 10 bf ff cd b 20094fc <_Heap_Walk+0x40>
20095cc: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
20095d0: 90 10 00 19 mov %i1, %o0
20095d4: 92 10 20 01 mov 1, %o1
20095d8: 15 00 80 79 sethi %hi(0x201e400), %o2
20095dc: 9f c7 40 00 call %i5
20095e0: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 201e6f8 <__log2table+0x2c0>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
20095e4: 10 bf ff c6 b 20094fc <_Heap_Walk+0x40>
20095e8: 82 10 20 00 clr %g1
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
20095ec: 90 10 00 19 mov %i1, %o0
20095f0: 92 10 20 01 mov 1, %o1
20095f4: 15 00 80 79 sethi %hi(0x201e400), %o2
20095f8: 9f c7 40 00 call %i5
20095fc: 94 12 a2 30 or %o2, 0x230, %o2 ! 201e630 <__log2table+0x1f8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009600: 10 bf ff bf b 20094fc <_Heap_Walk+0x40>
2009604: 82 10 20 00 clr %g1
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
2009608: 90 10 00 19 mov %i1, %o0
200960c: 92 10 20 01 mov 1, %o1
2009610: 96 10 00 10 mov %l0, %o3
2009614: 15 00 80 79 sethi %hi(0x201e400), %o2
2009618: 9f c7 40 00 call %i5
200961c: 94 12 a2 48 or %o2, 0x248, %o2 ! 201e648 <__log2table+0x210>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009620: 10 bf ff b7 b 20094fc <_Heap_Walk+0x40>
2009624: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
2009628: 90 10 00 19 mov %i1, %o0
200962c: 92 10 20 01 mov 1, %o1
2009630: 96 10 00 1b mov %i3, %o3
2009634: 15 00 80 79 sethi %hi(0x201e400), %o2
2009638: 9f c7 40 00 call %i5
200963c: 94 12 a2 68 or %o2, 0x268, %o2 ! 201e668 <__log2table+0x230>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009640: 10 bf ff af b 20094fc <_Heap_Walk+0x40>
2009644: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
2009648: 92 10 20 01 mov 1, %o1
200964c: 96 10 00 1c mov %i4, %o3
2009650: 15 00 80 79 sethi %hi(0x201e400), %o2
2009654: 9f c7 40 00 call %i5
2009658: 94 12 a2 90 or %o2, 0x290, %o2 ! 201e690 <__log2table+0x258>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200965c: 10 bf ff a8 b 20094fc <_Heap_Walk+0x40>
2009660: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
2009664: 92 10 20 01 mov 1, %o1
2009668: 15 00 80 79 sethi %hi(0x201e400), %o2
200966c: 9f c7 40 00 call %i5
2009670: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 201e6c8 <__log2table+0x290>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009674: 10 bf ff a2 b 20094fc <_Heap_Walk+0x40>
2009678: 82 10 20 00 clr %g1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200967c: f4 06 20 08 ld [ %i0 + 8 ], %i2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
2009680: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
2009684: 80 a6 00 1a cmp %i0, %i2
2009688: 02 80 00 0d be 20096bc <_Heap_Walk+0x200>
200968c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2009690: 80 a0 40 1a cmp %g1, %i2
2009694: 28 80 00 bc bleu,a 2009984 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN
2009698: e6 06 20 24 ld [ %i0 + 0x24 ], %l3
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
200969c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20096a0: 92 10 20 01 mov 1, %o1
20096a4: 96 10 00 1a mov %i2, %o3
20096a8: 15 00 80 79 sethi %hi(0x201e400), %o2
20096ac: 9f c7 40 00 call %i5
20096b0: 94 12 a3 40 or %o2, 0x340, %o2 ! 201e740 <__log2table+0x308>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
20096b4: 10 bf ff 92 b 20094fc <_Heap_Walk+0x40>
20096b8: 82 10 20 00 clr %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
20096bc: 2d 00 80 7a sethi %hi(0x201e800), %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
20096c0: 2f 00 80 7a sethi %hi(0x201e800), %l7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
20096c4: a4 10 00 1c mov %i4, %l2
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
20096c8: ac 15 a1 70 or %l6, 0x170, %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
20096cc: ae 15 e1 58 or %l7, 0x158, %l7
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
20096d0: 2b 00 80 7a sethi %hi(0x201e800), %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;
20096d4: a6 0d 3f fe and %l4, -2, %l3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
20096d8: b4 04 c0 12 add %l3, %l2, %i2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
20096dc: 80 a0 40 1a cmp %g1, %i2
20096e0: 28 80 00 0b bleu,a 200970c <_Heap_Walk+0x250> <== ALWAYS TAKEN
20096e4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
20096e8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20096ec: 92 10 20 01 mov 1, %o1
20096f0: 96 10 00 12 mov %l2, %o3
20096f4: 15 00 80 79 sethi %hi(0x201e400), %o2
20096f8: 98 10 00 1a mov %i2, %o4
20096fc: 9f c7 40 00 call %i5
2009700: 94 12 a3 e8 or %o2, 0x3e8, %o2
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
2009704: 10 bf ff 7e b 20094fc <_Heap_Walk+0x40>
2009708: 82 10 20 00 clr %g1
200970c: 80 a0 40 1a cmp %g1, %i2
2009710: 0a bf ff f7 bcs 20096ec <_Heap_Walk+0x230>
2009714: 90 10 00 19 mov %i1, %o0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
2009718: 82 1c 80 11 xor %l2, %l1, %g1
200971c: 80 a0 00 01 cmp %g0, %g1
2009720: 82 40 20 00 addx %g0, 0, %g1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2009724: 90 10 00 13 mov %l3, %o0
2009728: c2 27 bf fc st %g1, [ %fp + -4 ]
200972c: 7f ff e0 f0 call 2001aec <.urem>
2009730: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
2009734: 80 a2 20 00 cmp %o0, 0
2009738: 02 80 00 05 be 200974c <_Heap_Walk+0x290>
200973c: c2 07 bf fc ld [ %fp + -4 ], %g1
2009740: 80 88 60 ff btst 0xff, %g1
2009744: 12 80 00 76 bne 200991c <_Heap_Walk+0x460>
2009748: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
200974c: 80 a6 c0 13 cmp %i3, %l3
2009750: 08 80 00 05 bleu 2009764 <_Heap_Walk+0x2a8>
2009754: 80 a4 80 1a cmp %l2, %i2
2009758: 80 88 60 ff btst 0xff, %g1
200975c: 12 80 00 78 bne 200993c <_Heap_Walk+0x480> <== ALWAYS TAKEN
2009760: 80 a4 80 1a cmp %l2, %i2
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
2009764: 2a 80 00 06 bcs,a 200977c <_Heap_Walk+0x2c0>
2009768: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200976c: 80 88 60 ff btst 0xff, %g1
2009770: 12 80 00 7d bne 2009964 <_Heap_Walk+0x4a8>
2009774: 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;
2009778: c2 06 a0 04 ld [ %i2 + 4 ], %g1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200977c: 80 88 60 01 btst 1, %g1
2009780: 02 80 00 19 be 20097e4 <_Heap_Walk+0x328>
2009784: a8 0d 20 01 and %l4, 1, %l4
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
2009788: 80 a5 20 00 cmp %l4, 0
200978c: 22 80 00 0e be,a 20097c4 <_Heap_Walk+0x308>
2009790: da 04 80 00 ld [ %l2 ], %o5
(*printer)(
2009794: 90 10 00 19 mov %i1, %o0
2009798: 92 10 20 00 clr %o1
200979c: 94 10 00 17 mov %l7, %o2
20097a0: 96 10 00 12 mov %l2, %o3
20097a4: 9f c7 40 00 call %i5
20097a8: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
20097ac: 80 a7 00 1a cmp %i4, %i2
20097b0: 02 80 00 42 be 20098b8 <_Heap_Walk+0x3fc>
20097b4: a4 10 00 1a mov %i2, %l2
20097b8: e8 06 a0 04 ld [ %i2 + 4 ], %l4
20097bc: 10 bf ff c6 b 20096d4 <_Heap_Walk+0x218>
20097c0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
20097c4: 96 10 00 12 mov %l2, %o3
20097c8: 90 10 00 19 mov %i1, %o0
20097cc: 92 10 20 00 clr %o1
20097d0: 94 10 00 16 mov %l6, %o2
20097d4: 9f c7 40 00 call %i5
20097d8: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
20097dc: 10 bf ff f5 b 20097b0 <_Heap_Walk+0x2f4>
20097e0: 80 a7 00 1a cmp %i4, %i2
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
20097e4: da 04 a0 0c ld [ %l2 + 0xc ], %o5
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
20097e8: c2 06 20 08 ld [ %i0 + 8 ], %g1
20097ec: 05 00 80 79 sethi %hi(0x201e400), %g2
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
20097f0: c8 06 20 0c ld [ %i0 + 0xc ], %g4
20097f4: 80 a0 40 0d cmp %g1, %o5
20097f8: 02 80 00 05 be 200980c <_Heap_Walk+0x350>
20097fc: 86 10 a1 58 or %g2, 0x158, %g3
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
2009800: 80 a6 00 0d cmp %i0, %o5
2009804: 02 80 00 3c be 20098f4 <_Heap_Walk+0x438>
2009808: 86 15 61 20 or %l5, 0x120, %g3
block->next,
block->next == last_free_block ?
200980c: c2 04 a0 08 ld [ %l2 + 8 ], %g1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009810: 1f 00 80 79 sethi %hi(0x201e400), %o7
2009814: 80 a1 00 01 cmp %g4, %g1
2009818: 02 80 00 05 be 200982c <_Heap_Walk+0x370>
200981c: 84 13 e1 78 or %o7, 0x178, %g2
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
2009820: 80 a6 00 01 cmp %i0, %g1
2009824: 02 80 00 31 be 20098e8 <_Heap_Walk+0x42c>
2009828: 84 15 61 20 or %l5, 0x120, %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)(
200982c: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2009830: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
2009834: c4 23 a0 64 st %g2, [ %sp + 0x64 ]
2009838: 90 10 00 19 mov %i1, %o0
200983c: 92 10 20 00 clr %o1
2009840: 15 00 80 7a sethi %hi(0x201e800), %o2
2009844: 96 10 00 12 mov %l2, %o3
2009848: 94 12 a0 b0 or %o2, 0xb0, %o2
200984c: 9f c7 40 00 call %i5
2009850: 98 10 00 13 mov %l3, %o4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
2009854: da 06 80 00 ld [ %i2 ], %o5
2009858: 80 a4 c0 0d cmp %l3, %o5
200985c: 12 80 00 19 bne 20098c0 <_Heap_Walk+0x404>
2009860: 80 a5 20 00 cmp %l4, 0
);
return false;
}
if ( !prev_used ) {
2009864: 02 80 00 27 be 2009900 <_Heap_Walk+0x444>
2009868: 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;
200986c: 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 ) {
2009870: 80 a6 00 01 cmp %i0, %g1
2009874: 02 80 00 0b be 20098a0 <_Heap_Walk+0x3e4> <== NEVER TAKEN
2009878: 92 10 20 01 mov 1, %o1
if ( free_block == block ) {
200987c: 80 a4 80 01 cmp %l2, %g1
2009880: 02 bf ff cc be 20097b0 <_Heap_Walk+0x2f4>
2009884: 80 a7 00 1a cmp %i4, %i2
return true;
}
free_block = free_block->next;
2009888: c2 00 60 08 ld [ %g1 + 8 ], %g1
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
200988c: 80 a6 00 01 cmp %i0, %g1
2009890: 12 bf ff fc bne 2009880 <_Heap_Walk+0x3c4>
2009894: 80 a4 80 01 cmp %l2, %g1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
2009898: 90 10 00 19 mov %i1, %o0
200989c: 92 10 20 01 mov 1, %o1
20098a0: 96 10 00 12 mov %l2, %o3
20098a4: 15 00 80 7a sethi %hi(0x201e800), %o2
20098a8: 9f c7 40 00 call %i5
20098ac: 94 12 a1 98 or %o2, 0x198, %o2 ! 201e998 <__log2table+0x560>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
20098b0: 10 bf ff 13 b 20094fc <_Heap_Walk+0x40>
20098b4: 82 10 20 00 clr %g1
}
block = next_block;
} while ( block != first_block );
return true;
20098b8: 10 bf ff 11 b 20094fc <_Heap_Walk+0x40>
20098bc: 82 10 20 01 mov 1, %g1
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
20098c0: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
20098c4: 90 10 00 19 mov %i1, %o0
20098c8: 92 10 20 01 mov 1, %o1
20098cc: 96 10 00 12 mov %l2, %o3
20098d0: 15 00 80 7a sethi %hi(0x201e800), %o2
20098d4: 98 10 00 13 mov %l3, %o4
20098d8: 9f c7 40 00 call %i5
20098dc: 94 12 a0 e8 or %o2, 0xe8, %o2
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
20098e0: 10 bf ff 07 b 20094fc <_Heap_Walk+0x40>
20098e4: 82 10 20 00 clr %g1
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
20098e8: 05 00 80 79 sethi %hi(0x201e400), %g2
20098ec: 10 bf ff d0 b 200982c <_Heap_Walk+0x370>
20098f0: 84 10 a1 88 or %g2, 0x188, %g2 ! 201e588 <__log2table+0x150>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
20098f4: 07 00 80 79 sethi %hi(0x201e400), %g3
20098f8: 10 bf ff c5 b 200980c <_Heap_Walk+0x350>
20098fc: 86 10 e1 68 or %g3, 0x168, %g3 ! 201e568 <__log2table+0x130>
return false;
}
if ( !prev_used ) {
(*printer)(
2009900: 92 10 20 01 mov 1, %o1
2009904: 96 10 00 12 mov %l2, %o3
2009908: 15 00 80 7a sethi %hi(0x201e800), %o2
200990c: 9f c7 40 00 call %i5
2009910: 94 12 a1 28 or %o2, 0x128, %o2 ! 201e928 <__log2table+0x4f0>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
2009914: 10 bf fe fa b 20094fc <_Heap_Walk+0x40>
2009918: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
200991c: 92 10 20 01 mov 1, %o1
2009920: 96 10 00 12 mov %l2, %o3
2009924: 15 00 80 7a sethi %hi(0x201e800), %o2
2009928: 98 10 00 13 mov %l3, %o4
200992c: 9f c7 40 00 call %i5
2009930: 94 12 a0 18 or %o2, 0x18, %o2
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
2009934: 10 bf fe f2 b 20094fc <_Heap_Walk+0x40>
2009938: 82 10 20 00 clr %g1
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
200993c: 90 10 00 19 mov %i1, %o0
2009940: 92 10 20 01 mov 1, %o1
2009944: 96 10 00 12 mov %l2, %o3
2009948: 15 00 80 7a sethi %hi(0x201e800), %o2
200994c: 98 10 00 13 mov %l3, %o4
2009950: 94 12 a0 48 or %o2, 0x48, %o2
2009954: 9f c7 40 00 call %i5
2009958: 9a 10 00 1b mov %i3, %o5
block,
block_size,
min_block_size
);
return false;
200995c: 10 bf fe e8 b 20094fc <_Heap_Walk+0x40>
2009960: 82 10 20 00 clr %g1
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
2009964: 92 10 20 01 mov 1, %o1
2009968: 96 10 00 12 mov %l2, %o3
200996c: 15 00 80 7a sethi %hi(0x201e800), %o2
2009970: 98 10 00 1a mov %i2, %o4
2009974: 9f c7 40 00 call %i5
2009978: 94 12 a0 78 or %o2, 0x78, %o2
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
200997c: 10 bf fe e0 b 20094fc <_Heap_Walk+0x40>
2009980: 82 10 20 00 clr %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2009984: 80 a4 c0 1a cmp %l3, %i2
2009988: 0a bf ff 46 bcs 20096a0 <_Heap_Walk+0x1e4> <== NEVER TAKEN
200998c: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2009990: c2 27 bf fc st %g1, [ %fp + -4 ]
2009994: 90 06 a0 08 add %i2, 8, %o0
2009998: 7f ff e0 55 call 2001aec <.urem>
200999c: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
20099a0: 80 a2 20 00 cmp %o0, 0
20099a4: 12 80 00 36 bne 2009a7c <_Heap_Walk+0x5c0> <== NEVER TAKEN
20099a8: c2 07 bf fc ld [ %fp + -4 ], %g1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
20099ac: c4 06 a0 04 ld [ %i2 + 4 ], %g2
20099b0: 84 08 bf fe and %g2, -2, %g2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
20099b4: 84 06 80 02 add %i2, %g2, %g2
20099b8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
20099bc: 80 88 a0 01 btst 1, %g2
20099c0: 12 80 00 27 bne 2009a5c <_Heap_Walk+0x5a0> <== NEVER TAKEN
20099c4: 84 10 00 18 mov %i0, %g2
20099c8: 10 80 00 19 b 2009a2c <_Heap_Walk+0x570>
20099cc: a4 10 00 1a mov %i2, %l2
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
20099d0: 80 a6 00 1a cmp %i0, %i2
20099d4: 02 bf ff 3a be 20096bc <_Heap_Walk+0x200>
20099d8: 80 a6 80 01 cmp %i2, %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
20099dc: 0a bf ff 31 bcs 20096a0 <_Heap_Walk+0x1e4>
20099e0: 90 10 00 19 mov %i1, %o0
20099e4: 80 a6 80 13 cmp %i2, %l3
20099e8: 18 bf ff 2f bgu 20096a4 <_Heap_Walk+0x1e8> <== NEVER TAKEN
20099ec: 92 10 20 01 mov 1, %o1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
20099f0: c2 27 bf fc st %g1, [ %fp + -4 ]
20099f4: 90 06 a0 08 add %i2, 8, %o0
20099f8: 7f ff e0 3d call 2001aec <.urem>
20099fc: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
2009a00: 80 a2 20 00 cmp %o0, 0
2009a04: 12 80 00 1e bne 2009a7c <_Heap_Walk+0x5c0>
2009a08: c2 07 bf fc ld [ %fp + -4 ], %g1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2009a0c: c6 06 a0 04 ld [ %i2 + 4 ], %g3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2009a10: 84 10 00 12 mov %l2, %g2
2009a14: 86 08 ff fe and %g3, -2, %g3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2009a18: 86 00 c0 1a add %g3, %i2, %g3
2009a1c: c6 00 e0 04 ld [ %g3 + 4 ], %g3
2009a20: 80 88 e0 01 btst 1, %g3
2009a24: 12 80 00 0e bne 2009a5c <_Heap_Walk+0x5a0>
2009a28: a4 10 00 1a mov %i2, %l2
);
return false;
}
if ( free_block->prev != prev_block ) {
2009a2c: d8 06 a0 0c ld [ %i2 + 0xc ], %o4
2009a30: 80 a3 00 02 cmp %o4, %g2
2009a34: 22 bf ff e7 be,a 20099d0 <_Heap_Walk+0x514>
2009a38: f4 06 a0 08 ld [ %i2 + 8 ], %i2
(*printer)(
2009a3c: 90 10 00 19 mov %i1, %o0
2009a40: 92 10 20 01 mov 1, %o1
2009a44: 96 10 00 1a mov %i2, %o3
2009a48: 15 00 80 79 sethi %hi(0x201e400), %o2
2009a4c: 9f c7 40 00 call %i5
2009a50: 94 12 a3 b0 or %o2, 0x3b0, %o2 ! 201e7b0 <__log2table+0x378>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009a54: 10 bf fe aa b 20094fc <_Heap_Walk+0x40>
2009a58: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
2009a5c: 90 10 00 19 mov %i1, %o0
2009a60: 92 10 20 01 mov 1, %o1
2009a64: 96 10 00 1a mov %i2, %o3
2009a68: 15 00 80 79 sethi %hi(0x201e400), %o2
2009a6c: 9f c7 40 00 call %i5
2009a70: 94 12 a3 90 or %o2, 0x390, %o2 ! 201e790 <__log2table+0x358>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009a74: 10 bf fe a2 b 20094fc <_Heap_Walk+0x40>
2009a78: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
2009a7c: 90 10 00 19 mov %i1, %o0
2009a80: 92 10 20 01 mov 1, %o1
2009a84: 96 10 00 1a mov %i2, %o3
2009a88: 15 00 80 79 sethi %hi(0x201e400), %o2
2009a8c: 9f c7 40 00 call %i5
2009a90: 94 12 a3 60 or %o2, 0x360, %o2 ! 201e760 <__log2table+0x328>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009a94: 10 bf fe 9a b 20094fc <_Heap_Walk+0x40>
2009a98: 82 10 20 00 clr %g1
02007ac0 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
2007ac0: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2007ac4: 39 00 80 7f sethi %hi(0x201fc00), %i4
2007ac8: c2 07 22 44 ld [ %i4 + 0x244 ], %g1 ! 201fe44 <_IO_Number_of_drivers>
2007acc: 80 a0 60 00 cmp %g1, 0
2007ad0: 02 80 00 0c be 2007b00 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
2007ad4: ba 10 20 00 clr %i5
2007ad8: b8 17 22 44 or %i4, 0x244, %i4
(void) rtems_io_initialize( major, 0, NULL );
2007adc: 90 10 00 1d mov %i5, %o0
2007ae0: 92 10 20 00 clr %o1
2007ae4: 40 00 1a 3b call 200e3d0 <rtems_io_initialize>
2007ae8: 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 ++ )
2007aec: c2 07 00 00 ld [ %i4 ], %g1
2007af0: ba 07 60 01 inc %i5
2007af4: 80 a0 40 1d cmp %g1, %i5
2007af8: 18 bf ff fa bgu 2007ae0 <_IO_Initialize_all_drivers+0x20>
2007afc: 90 10 00 1d mov %i5, %o0
2007b00: 81 c7 e0 08 ret
2007b04: 81 e8 00 00 restore
020079f4 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
20079f4: 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;
20079f8: 03 00 80 79 sethi %hi(0x201e400), %g1
20079fc: 82 10 63 5c or %g1, 0x35c, %g1 ! 201e75c <Configuration>
drivers_in_table = Configuration.number_of_device_drivers;
2007a00: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
number_of_drivers = Configuration.maximum_drivers;
2007a04: f2 00 60 30 ld [ %g1 + 0x30 ], %i1
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
2007a08: 80 a7 00 19 cmp %i4, %i1
2007a0c: 0a 80 00 08 bcs 2007a2c <_IO_Manager_initialization+0x38>
2007a10: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
2007a14: 03 00 80 7f sethi %hi(0x201fc00), %g1
2007a18: fa 20 62 48 st %i5, [ %g1 + 0x248 ] ! 201fe48 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
2007a1c: 03 00 80 7f sethi %hi(0x201fc00), %g1
2007a20: f8 20 62 44 st %i4, [ %g1 + 0x244 ] ! 201fe44 <_IO_Number_of_drivers>
return;
2007a24: 81 c7 e0 08 ret
2007a28: 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 )
2007a2c: 83 2e 60 03 sll %i1, 3, %g1
2007a30: b5 2e 60 05 sll %i1, 5, %i2
2007a34: b4 26 80 01 sub %i2, %g1, %i2
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
2007a38: 40 00 0d 7f call 200b034 <_Workspace_Allocate_or_fatal_error>
2007a3c: 90 10 00 1a mov %i2, %o0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
2007a40: 03 00 80 7f sethi %hi(0x201fc00), %g1
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
2007a44: 37 00 80 7f sethi %hi(0x201fc00), %i3
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
2007a48: f2 20 62 44 st %i1, [ %g1 + 0x244 ]
/*
* 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 *)
2007a4c: d0 26 e2 48 st %o0, [ %i3 + 0x248 ]
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
2007a50: 92 10 20 00 clr %o1
2007a54: 40 00 29 77 call 2012030 <memset>
2007a58: 94 10 00 1a mov %i2, %o2
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007a5c: 80 a7 20 00 cmp %i4, 0
2007a60: 02 bf ff f1 be 2007a24 <_IO_Manager_initialization+0x30> <== NEVER TAKEN
2007a64: f6 06 e2 48 ld [ %i3 + 0x248 ], %i3
2007a68: 82 10 20 00 clr %g1
2007a6c: 88 10 20 00 clr %g4
_IO_Driver_address_table[index] = driver_table[index];
2007a70: c4 07 40 01 ld [ %i5 + %g1 ], %g2
2007a74: 86 07 40 01 add %i5, %g1, %g3
2007a78: c4 26 c0 01 st %g2, [ %i3 + %g1 ]
2007a7c: f4 00 e0 04 ld [ %g3 + 4 ], %i2
2007a80: 84 06 c0 01 add %i3, %g1, %g2
2007a84: f4 20 a0 04 st %i2, [ %g2 + 4 ]
2007a88: f4 00 e0 08 ld [ %g3 + 8 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007a8c: 88 01 20 01 inc %g4
_IO_Driver_address_table[index] = driver_table[index];
2007a90: f4 20 a0 08 st %i2, [ %g2 + 8 ]
2007a94: f4 00 e0 0c ld [ %g3 + 0xc ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007a98: 82 00 60 18 add %g1, 0x18, %g1
_IO_Driver_address_table[index] = driver_table[index];
2007a9c: f4 20 a0 0c st %i2, [ %g2 + 0xc ]
2007aa0: f4 00 e0 10 ld [ %g3 + 0x10 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2007aa4: 80 a1 00 1c cmp %g4, %i4
_IO_Driver_address_table[index] = driver_table[index];
2007aa8: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
2007aac: 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++ )
2007ab0: 12 bf ff f0 bne 2007a70 <_IO_Manager_initialization+0x7c>
2007ab4: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
2007ab8: 81 c7 e0 08 ret
2007abc: 81 e8 00 00 restore
020088c0 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
20088c0: 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 )
20088c4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
20088c8: ba 10 00 18 mov %i0, %i5
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
20088cc: 80 a0 60 00 cmp %g1, 0
20088d0: 02 80 00 19 be 2008934 <_Objects_Allocate+0x74> <== NEVER TAKEN
20088d4: 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 );
20088d8: b8 07 60 20 add %i5, 0x20, %i4
20088dc: 7f ff fd 3c call 2007dcc <_Chain_Get>
20088e0: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
20088e4: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
20088e8: 80 a0 60 00 cmp %g1, 0
20088ec: 02 80 00 12 be 2008934 <_Objects_Allocate+0x74>
20088f0: 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 ) {
20088f4: 80 a2 20 00 cmp %o0, 0
20088f8: 02 80 00 11 be 200893c <_Objects_Allocate+0x7c>
20088fc: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
2008900: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
2008904: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
2008908: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
200890c: 40 00 46 c4 call 201a41c <.udiv>
2008910: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
2008914: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2008918: 91 2a 20 02 sll %o0, 2, %o0
200891c: c6 00 40 08 ld [ %g1 + %o0 ], %g3
information->inactive--;
2008920: c4 17 60 2c lduh [ %i5 + 0x2c ], %g2
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2008924: 86 00 ff ff add %g3, -1, %g3
2008928: c6 20 40 08 st %g3, [ %g1 + %o0 ]
information->inactive--;
200892c: 82 00 bf ff add %g2, -1, %g1
2008930: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
2008934: 81 c7 e0 08 ret
2008938: 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 );
200893c: 40 00 00 10 call 200897c <_Objects_Extend_information>
2008940: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2008944: 7f ff fd 22 call 2007dcc <_Chain_Get>
2008948: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
200894c: b0 92 20 00 orcc %o0, 0, %i0
2008950: 32 bf ff ed bne,a 2008904 <_Objects_Allocate+0x44>
2008954: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
);
}
#endif
return the_object;
}
2008958: 81 c7 e0 08 ret
200895c: 81 e8 00 00 restore
0200897c <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
200897c: 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 )
2008980: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2008984: f8 16 20 0a lduh [ %i0 + 0xa ], %i4
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
2008988: 80 a4 20 00 cmp %l0, 0
200898c: 02 80 00 a6 be 2008c24 <_Objects_Extend_information+0x2a8>
2008990: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2008994: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2
2008998: b3 2e 60 10 sll %i1, 0x10, %i1
200899c: 92 10 00 1a mov %i2, %o1
20089a0: 40 00 46 9f call 201a41c <.udiv>
20089a4: 91 36 60 10 srl %i1, 0x10, %o0
20089a8: a7 2a 20 10 sll %o0, 0x10, %l3
20089ac: a7 34 e0 10 srl %l3, 0x10, %l3
for ( ; block < block_count; block++ ) {
20089b0: 80 a4 e0 00 cmp %l3, 0
20089b4: 02 80 00 a3 be 2008c40 <_Objects_Extend_information+0x2c4><== NEVER TAKEN
20089b8: 90 10 00 1a mov %i2, %o0
if ( information->object_blocks[ block ] == NULL ) {
20089bc: c2 04 00 00 ld [ %l0 ], %g1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
20089c0: ba 10 00 1c mov %i4, %i5
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
20089c4: 80 a0 60 00 cmp %g1, 0
20089c8: 12 80 00 08 bne 20089e8 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN
20089cc: b6 10 20 00 clr %i3
do_extend = false;
20089d0: 10 80 00 a0 b 2008c50 <_Objects_Extend_information+0x2d4> <== NOT EXECUTED
20089d4: b4 10 20 00 clr %i2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
20089d8: c2 04 00 01 ld [ %l0 + %g1 ], %g1
20089dc: 80 a0 60 00 cmp %g1, 0
20089e0: 22 80 00 08 be,a 2008a00 <_Objects_Extend_information+0x84>
20089e4: b4 10 20 00 clr %i2
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
20089e8: b6 06 e0 01 inc %i3
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
20089ec: ba 07 40 1a add %i5, %i2, %i5
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
20089f0: 80 a4 c0 1b cmp %l3, %i3
20089f4: 18 bf ff f9 bgu 20089d8 <_Objects_Extend_information+0x5c>
20089f8: 83 2e e0 02 sll %i3, 2, %g1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
20089fc: b4 10 20 01 mov 1, %i2
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
2008a00: b3 36 60 10 srl %i1, 0x10, %i1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
2008a04: 03 00 00 3f sethi %hi(0xfc00), %g1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
2008a08: b2 06 40 08 add %i1, %o0, %i1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
2008a0c: 82 10 63 ff or %g1, 0x3ff, %g1
2008a10: 80 a6 40 01 cmp %i1, %g1
2008a14: 18 80 00 93 bgu 2008c60 <_Objects_Extend_information+0x2e4>
2008a18: 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;
2008a1c: 40 00 46 46 call 201a334 <.umul>
2008a20: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
2008a24: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2008a28: 80 a0 60 00 cmp %g1, 0
2008a2c: 02 80 00 6a be 2008bd4 <_Objects_Extend_information+0x258>
2008a30: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
2008a34: 40 00 09 72 call 200affc <_Workspace_Allocate>
2008a38: 01 00 00 00 nop
if ( !new_object_block )
2008a3c: a0 92 20 00 orcc %o0, 0, %l0
2008a40: 02 80 00 88 be 2008c60 <_Objects_Extend_information+0x2e4>
2008a44: 01 00 00 00 nop
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
2008a48: 80 8e a0 ff btst 0xff, %i2
2008a4c: 22 80 00 3f be,a 2008b48 <_Objects_Extend_information+0x1cc>
2008a50: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
2008a54: b4 04 e0 01 add %l3, 1, %i2
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2008a58: 91 2e a0 01 sll %i2, 1, %o0
2008a5c: 90 02 00 1a add %o0, %i2, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
2008a60: 90 06 40 08 add %i1, %o0, %o0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2008a64: 90 02 00 1c add %o0, %i4, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
2008a68: 40 00 09 65 call 200affc <_Workspace_Allocate>
2008a6c: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
2008a70: a2 92 20 00 orcc %o0, 0, %l1
2008a74: 02 80 00 79 be 2008c58 <_Objects_Extend_information+0x2dc>
2008a78: b5 2e a0 02 sll %i2, 2, %i2
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2008a7c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2008a80: 80 a7 00 01 cmp %i4, %g1
2008a84: a4 04 40 1a add %l1, %i2, %l2
2008a88: 0a 80 00 57 bcs 2008be4 <_Objects_Extend_information+0x268>
2008a8c: b4 04 80 1a add %l2, %i2, %i2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2008a90: 80 a7 20 00 cmp %i4, 0
2008a94: 02 80 00 07 be 2008ab0 <_Objects_Extend_information+0x134><== NEVER TAKEN
2008a98: 82 10 20 00 clr %g1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
2008a9c: 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++ ) {
2008aa0: 82 00 60 01 inc %g1
2008aa4: 80 a7 00 01 cmp %i4, %g1
2008aa8: 18 bf ff fd bgu 2008a9c <_Objects_Extend_information+0x120><== NEVER TAKEN
2008aac: c0 20 80 1a clr [ %g2 + %i2 ]
2008ab0: a7 2c e0 02 sll %l3, 2, %l3
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2008ab4: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2008ab8: c0 24 40 13 clr [ %l1 + %l3 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2008abc: 86 07 40 03 add %i5, %g3, %g3
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
2008ac0: 80 a7 40 03 cmp %i5, %g3
2008ac4: 1a 80 00 0a bcc 2008aec <_Objects_Extend_information+0x170><== NEVER TAKEN
2008ac8: c0 24 80 13 clr [ %l2 + %l3 ]
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
2008acc: 83 2f 60 02 sll %i5, 2, %g1
2008ad0: 84 10 00 1d mov %i5, %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
2008ad4: 82 06 80 01 add %i2, %g1, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
2008ad8: c0 20 40 00 clr [ %g1 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
2008adc: 84 00 a0 01 inc %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
2008ae0: 80 a0 c0 02 cmp %g3, %g2
2008ae4: 18 bf ff fd bgu 2008ad8 <_Objects_Extend_information+0x15c>
2008ae8: 82 00 60 04 add %g1, 4, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
2008aec: 7f ff e6 9c call 200255c <sparc_disable_interrupts>
2008af0: 01 00 00 00 nop
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008af4: c6 06 00 00 ld [ %i0 ], %g3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
2008af8: c4 16 20 04 lduh [ %i0 + 4 ], %g2
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
2008afc: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
2008b00: f2 36 20 10 sth %i1, [ %i0 + 0x10 ]
2008b04: 87 28 e0 18 sll %g3, 0x18, %g3
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008b08: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
2008b0c: e2 26 20 34 st %l1, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
2008b10: e4 26 20 30 st %l2, [ %i0 + 0x30 ]
information->local_table = local_table;
2008b14: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
2008b18: b3 2e 60 10 sll %i1, 0x10, %i1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008b1c: 03 00 00 40 sethi %hi(0x10000), %g1
2008b20: b3 36 60 10 srl %i1, 0x10, %i1
2008b24: 82 10 c0 01 or %g3, %g1, %g1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008b28: 82 10 40 02 or %g1, %g2, %g1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008b2c: 82 10 40 19 or %g1, %i1, %g1
2008b30: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
2008b34: 7f ff e6 8e call 200256c <sparc_enable_interrupts>
2008b38: 01 00 00 00 nop
_Workspace_Free( old_tables );
2008b3c: 40 00 09 38 call 200b01c <_Workspace_Free>
2008b40: 90 10 00 1c mov %i4, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
2008b44: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2008b48: b7 2e e0 02 sll %i3, 2, %i3
2008b4c: e0 20 40 1b st %l0, [ %g1 + %i3 ]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2008b50: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2008b54: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
2008b58: d2 00 40 1b ld [ %g1 + %i3 ], %o1
2008b5c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
2008b60: 90 07 bf f4 add %fp, -12, %o0
2008b64: 40 00 16 33 call 200e430 <_Chain_Initialize>
2008b68: 39 00 00 40 sethi %hi(0x10000), %i4
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2008b6c: 10 80 00 0d b 2008ba0 <_Objects_Extend_information+0x224>
2008b70: b4 06 20 20 add %i0, 0x20, %i2
the_object->id = _Objects_Build_id(
2008b74: c6 16 20 04 lduh [ %i0 + 4 ], %g3
2008b78: 85 28 a0 18 sll %g2, 0x18, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008b7c: 87 28 e0 1b sll %g3, 0x1b, %g3
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008b80: 84 10 80 1c or %g2, %i4, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2008b84: 84 10 80 03 or %g2, %g3, %g2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2008b88: 84 10 80 1d or %g2, %i5, %g2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2008b8c: 90 10 00 1a mov %i2, %o0
2008b90: 92 10 00 01 mov %g1, %o1
index++;
2008b94: ba 07 60 01 inc %i5
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2008b98: 7f ff fc 79 call 2007d7c <_Chain_Append>
2008b9c: c4 20 60 08 st %g2, [ %g1 + 8 ]
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2008ba0: 7f ff fc 8b call 2007dcc <_Chain_Get>
2008ba4: 90 07 bf f4 add %fp, -12, %o0
2008ba8: 82 92 20 00 orcc %o0, 0, %g1
2008bac: 32 bf ff f2 bne,a 2008b74 <_Objects_Extend_information+0x1f8>
2008bb0: c4 06 00 00 ld [ %i0 ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2008bb4: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
2008bb8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
2008bbc: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2008bc0: c8 20 c0 1b st %g4, [ %g3 + %i3 ]
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
2008bc4: 82 00 80 04 add %g2, %g4, %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
2008bc8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2008bcc: 81 c7 e0 08 ret
2008bd0: 81 e8 00 00 restore
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
2008bd4: 40 00 09 18 call 200b034 <_Workspace_Allocate_or_fatal_error>
2008bd8: 01 00 00 00 nop
2008bdc: 10 bf ff 9b b 2008a48 <_Objects_Extend_information+0xcc>
2008be0: a0 10 00 08 mov %o0, %l0
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
2008be4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
2008be8: a7 2c e0 02 sll %l3, 2, %l3
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
2008bec: 40 00 24 d5 call 2011f40 <memcpy>
2008bf0: 94 10 00 13 mov %l3, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
2008bf4: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
2008bf8: 94 10 00 13 mov %l3, %o2
2008bfc: 40 00 24 d1 call 2011f40 <memcpy>
2008c00: 90 10 00 12 mov %l2, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
2008c04: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
2008c08: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
2008c0c: b8 07 00 01 add %i4, %g1, %i4
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
2008c10: 90 10 00 1a mov %i2, %o0
2008c14: 40 00 24 cb call 2011f40 <memcpy>
2008c18: 95 2f 20 02 sll %i4, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2008c1c: 10 bf ff a7 b 2008ab8 <_Objects_Extend_information+0x13c>
2008c20: 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 )
2008c24: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2008c28: ba 10 00 1c mov %i4, %i5
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
2008c2c: b4 10 20 01 mov 1, %i2
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
2008c30: b6 10 20 00 clr %i3
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
2008c34: a6 10 20 00 clr %l3
2008c38: 10 bf ff 72 b 2008a00 <_Objects_Extend_information+0x84>
2008c3c: b3 2e 60 10 sll %i1, 0x10, %i1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2008c40: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
2008c44: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
2008c48: 10 bf ff 6e b 2008a00 <_Objects_Extend_information+0x84> <== NOT EXECUTED
2008c4c: b6 10 20 00 clr %i3 <== NOT EXECUTED
2008c50: 10 bf ff 6c b 2008a00 <_Objects_Extend_information+0x84> <== NOT EXECUTED
2008c54: b6 10 20 00 clr %i3 <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
2008c58: 40 00 08 f1 call 200b01c <_Workspace_Free>
2008c5c: 90 10 00 10 mov %l0, %o0
return;
2008c60: 81 c7 e0 08 ret
2008c64: 81 e8 00 00 restore
02008d0c <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
2008d0c: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
2008d10: 80 a6 60 00 cmp %i1, 0
2008d14: 02 80 00 17 be 2008d70 <_Objects_Get_information+0x64>
2008d18: ba 10 20 00 clr %i5
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
2008d1c: 40 00 17 b3 call 200ebe8 <_Objects_API_maximum_class>
2008d20: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
2008d24: 80 a2 20 00 cmp %o0, 0
2008d28: 02 80 00 12 be 2008d70 <_Objects_Get_information+0x64>
2008d2c: 80 a2 00 19 cmp %o0, %i1
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
2008d30: 0a 80 00 10 bcs 2008d70 <_Objects_Get_information+0x64>
2008d34: 03 00 80 7d sethi %hi(0x201f400), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2008d38: b1 2e 20 02 sll %i0, 2, %i0
2008d3c: 82 10 60 28 or %g1, 0x28, %g1
2008d40: c2 00 40 18 ld [ %g1 + %i0 ], %g1
2008d44: 80 a0 60 00 cmp %g1, 0
2008d48: 02 80 00 0a be 2008d70 <_Objects_Get_information+0x64> <== NEVER TAKEN
2008d4c: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
2008d50: fa 00 40 19 ld [ %g1 + %i1 ], %i5
if ( !info )
2008d54: 80 a7 60 00 cmp %i5, 0
2008d58: 02 80 00 06 be 2008d70 <_Objects_Get_information+0x64> <== NEVER TAKEN
2008d5c: 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 )
2008d60: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1
return NULL;
2008d64: 80 a0 00 01 cmp %g0, %g1
2008d68: 82 60 20 00 subx %g0, 0, %g1
2008d6c: ba 0f 40 01 and %i5, %g1, %i5
#endif
return info;
}
2008d70: 81 c7 e0 08 ret
2008d74: 91 e8 00 1d restore %g0, %i5, %o0
0200a658 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
200a658: 9d e3 bf 90 save %sp, -112, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
200a65c: 80 a6 60 00 cmp %i1, 0
200a660: 02 80 00 41 be 200a764 <_Objects_Get_name_as_string+0x10c>
200a664: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( name == NULL )
200a668: 02 80 00 3a be 200a750 <_Objects_Get_name_as_string+0xf8>
200a66c: 80 a6 20 00 cmp %i0, 0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
200a670: 02 80 00 3a be 200a758 <_Objects_Get_name_as_string+0x100>
200a674: 03 00 80 89 sethi %hi(0x2022400), %g1
information = _Objects_Get_information_id( tmpId );
200a678: 7f ff ff ba call 200a560 <_Objects_Get_information_id>
200a67c: 90 10 00 18 mov %i0, %o0
if ( !information )
200a680: ba 92 20 00 orcc %o0, 0, %i5
200a684: 02 80 00 38 be 200a764 <_Objects_Get_name_as_string+0x10c>
200a688: 92 10 00 18 mov %i0, %o1
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
200a68c: 40 00 00 3f call 200a788 <_Objects_Get>
200a690: 94 07 bf fc add %fp, -4, %o2
switch ( location ) {
200a694: c2 07 bf fc ld [ %fp + -4 ], %g1
200a698: 80 a0 60 00 cmp %g1, 0
200a69c: 32 80 00 33 bne,a 200a768 <_Objects_Get_name_as_string+0x110>
200a6a0: b4 10 20 00 clr %i2
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
200a6a4: c2 0f 60 38 ldub [ %i5 + 0x38 ], %g1
200a6a8: 80 a0 60 00 cmp %g1, 0
200a6ac: 32 80 00 31 bne,a 200a770 <_Objects_Get_name_as_string+0x118>
200a6b0: c4 02 20 0c ld [ %o0 + 0xc ], %g2
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
200a6b4: 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';
200a6b8: c0 2f bf f4 clrb [ %fp + -12 ]
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
200a6bc: 85 30 60 08 srl %g1, 8, %g2
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
200a6c0: 89 30 60 18 srl %g1, 0x18, %g4
lname[ 1 ] = (u32_name >> 16) & 0xff;
200a6c4: 87 30 60 10 srl %g1, 0x10, %g3
lname[ 2 ] = (u32_name >> 8) & 0xff;
200a6c8: c4 2f bf f2 stb %g2, [ %fp + -14 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
200a6cc: c8 2f bf f0 stb %g4, [ %fp + -16 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
200a6d0: c6 2f bf f1 stb %g3, [ %fp + -15 ]
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
200a6d4: c2 2f bf f3 stb %g1, [ %fp + -13 ]
lname[ 4 ] = '\0';
s = lname;
200a6d8: 84 07 bf f0 add %fp, -16, %g2
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
200a6dc: b2 86 7f ff addcc %i1, -1, %i1
200a6e0: 02 80 00 1a be 200a748 <_Objects_Get_name_as_string+0xf0> <== NEVER TAKEN
200a6e4: 82 10 00 1a mov %i2, %g1
200a6e8: c8 48 80 00 ldsb [ %g2 ], %g4
200a6ec: 80 a1 20 00 cmp %g4, 0
200a6f0: 02 80 00 16 be 200a748 <_Objects_Get_name_as_string+0xf0>
200a6f4: c6 08 80 00 ldub [ %g2 ], %g3
200a6f8: 31 00 80 84 sethi %hi(0x2021000), %i0
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
200a6fc: b2 06 80 19 add %i2, %i1, %i1
200a700: 10 80 00 05 b 200a714 <_Objects_Get_name_as_string+0xbc>
200a704: b0 16 21 d4 or %i0, 0x1d4, %i0
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
200a708: 80 a1 20 00 cmp %g4, 0
200a70c: 02 80 00 0f be 200a748 <_Objects_Get_name_as_string+0xf0>
200a710: c6 08 80 00 ldub [ %g2 ], %g3
*d = (isprint((unsigned char)*s)) ? *s : '*';
200a714: fa 06 00 00 ld [ %i0 ], %i5
200a718: 88 08 e0 ff and %g3, 0xff, %g4
200a71c: 88 07 40 04 add %i5, %g4, %g4
200a720: c8 49 20 01 ldsb [ %g4 + 1 ], %g4
200a724: 80 89 20 97 btst 0x97, %g4
200a728: 12 80 00 03 bne 200a734 <_Objects_Get_name_as_string+0xdc>
200a72c: 84 00 a0 01 inc %g2
200a730: 86 10 20 2a mov 0x2a, %g3
200a734: c6 28 40 00 stb %g3, [ %g1 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
200a738: 82 00 60 01 inc %g1
200a73c: 80 a0 40 19 cmp %g1, %i1
200a740: 32 bf ff f2 bne,a 200a708 <_Objects_Get_name_as_string+0xb0>
200a744: c8 48 80 00 ldsb [ %g2 ], %g4
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
200a748: 40 00 03 f2 call 200b710 <_Thread_Enable_dispatch>
200a74c: c0 28 40 00 clrb [ %g1 ]
return name;
}
return NULL; /* unreachable path */
}
200a750: 81 c7 e0 08 ret
200a754: 91 e8 00 1a restore %g0, %i2, %o0
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
200a758: c2 00 60 bc ld [ %g1 + 0xbc ], %g1
200a75c: 10 bf ff c7 b 200a678 <_Objects_Get_name_as_string+0x20>
200a760: f0 00 60 08 ld [ %g1 + 8 ], %i0
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
200a764: b4 10 20 00 clr %i2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
200a768: 81 c7 e0 08 ret
200a76c: 91 e8 00 1a restore %g0, %i2, %o0
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
200a770: 80 a0 a0 00 cmp %g2, 0
200a774: 12 bf ff da bne 200a6dc <_Objects_Get_name_as_string+0x84>
200a778: 82 10 00 1a mov %i2, %g1
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
200a77c: 40 00 03 e5 call 200b710 <_Thread_Enable_dispatch>
200a780: c0 28 40 00 clrb [ %g1 ]
200a784: 30 bf ff f3 b,a 200a750 <_Objects_Get_name_as_string+0xf8>
02008d38 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
2008d38: 9d e3 bf a0 save %sp, -96, %sp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
2008d3c: 90 10 20 00 clr %o0
)
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
2008d40: 80 a6 20 00 cmp %i0, 0
2008d44: 02 80 00 19 be 2008da8 <_Objects_Get_next+0x70>
2008d48: ba 10 00 18 mov %i0, %i5
return NULL;
if ( !location_p )
2008d4c: 80 a6 a0 00 cmp %i2, 0
2008d50: 02 80 00 16 be 2008da8 <_Objects_Get_next+0x70>
2008d54: 80 a6 e0 00 cmp %i3, 0
return NULL;
if ( !next_id_p )
2008d58: 02 80 00 14 be 2008da8 <_Objects_Get_next+0x70>
2008d5c: 83 2e 60 10 sll %i1, 0x10, %g1
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
2008d60: 80 a0 60 00 cmp %g1, 0
2008d64: 22 80 00 13 be,a 2008db0 <_Objects_Get_next+0x78>
2008d68: f2 06 20 08 ld [ %i0 + 8 ], %i1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008d6c: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2008d70: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008d74: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008d78: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008d7c: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008d80: 80 a0 80 01 cmp %g2, %g1
2008d84: 0a 80 00 13 bcs 2008dd0 <_Objects_Get_next+0x98>
2008d88: 94 10 00 1a mov %i2, %o2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008d8c: 40 00 00 18 call 2008dec <_Objects_Get>
2008d90: b2 06 60 01 inc %i1
next_id++;
} while (*location_p != OBJECTS_LOCAL);
2008d94: c2 06 80 00 ld [ %i2 ], %g1
2008d98: 80 a0 60 00 cmp %g1, 0
2008d9c: 32 bf ff f5 bne,a 2008d70 <_Objects_Get_next+0x38>
2008da0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
*next_id_p = next_id;
2008da4: f2 26 c0 00 st %i1, [ %i3 ]
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
2008da8: 81 c7 e0 08 ret
2008dac: 91 e8 00 08 restore %g0, %o0, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008db0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2008db4: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008db8: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008dbc: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2008dc0: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2008dc4: 80 a0 80 01 cmp %g2, %g1
2008dc8: 1a bf ff f1 bcc 2008d8c <_Objects_Get_next+0x54> <== ALWAYS TAKEN
2008dcc: 94 10 00 1a mov %i2, %o2
{
*location_p = OBJECTS_ERROR;
2008dd0: 82 10 20 01 mov 1, %g1
2008dd4: c2 26 80 00 st %g1, [ %i2 ]
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
2008dd8: 90 10 20 00 clr %o0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
2008ddc: 82 10 3f ff mov -1, %g1
2008de0: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
2008de4: 81 c7 e0 08 ret
2008de8: 91 e8 00 08 restore %g0, %o0, %o0
020098cc <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
20098cc: 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;
20098d0: 80 a6 20 00 cmp %i0, 0
20098d4: 12 80 00 06 bne 20098ec <_Objects_Id_to_name+0x20>
20098d8: 83 36 20 18 srl %i0, 0x18, %g1
20098dc: 03 00 80 83 sethi %hi(0x2020c00), %g1
20098e0: c2 00 62 9c ld [ %g1 + 0x29c ], %g1 ! 2020e9c <_Per_CPU_Information+0xc>
20098e4: f0 00 60 08 ld [ %g1 + 8 ], %i0
20098e8: 83 36 20 18 srl %i0, 0x18, %g1
20098ec: 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 )
20098f0: 84 00 7f ff add %g1, -1, %g2
20098f4: 80 a0 a0 02 cmp %g2, 2
20098f8: 18 80 00 12 bgu 2009940 <_Objects_Id_to_name+0x74>
20098fc: ba 10 20 03 mov 3, %i5
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
2009900: 83 28 60 02 sll %g1, 2, %g1
2009904: 05 00 80 82 sethi %hi(0x2020800), %g2
2009908: 84 10 a0 b8 or %g2, 0xb8, %g2 ! 20208b8 <_Objects_Information_table>
200990c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2009910: 80 a0 60 00 cmp %g1, 0
2009914: 02 80 00 0b be 2009940 <_Objects_Id_to_name+0x74>
2009918: 85 36 20 1b srl %i0, 0x1b, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
200991c: 85 28 a0 02 sll %g2, 2, %g2
2009920: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
2009924: 80 a2 20 00 cmp %o0, 0
2009928: 02 80 00 06 be 2009940 <_Objects_Id_to_name+0x74> <== NEVER TAKEN
200992c: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
2009930: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
2009934: 80 a0 60 00 cmp %g1, 0
2009938: 02 80 00 04 be 2009948 <_Objects_Id_to_name+0x7c> <== ALWAYS TAKEN
200993c: 92 10 00 18 mov %i0, %o1
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
2009940: 81 c7 e0 08 ret
2009944: 91 e8 00 1d restore %g0, %i5, %o0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
2009948: 7f ff ff c3 call 2009854 <_Objects_Get>
200994c: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
2009950: 80 a2 20 00 cmp %o0, 0
2009954: 02 bf ff fb be 2009940 <_Objects_Id_to_name+0x74>
2009958: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
200995c: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
2009960: ba 10 20 00 clr %i5
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
2009964: 40 00 03 c7 call 200a880 <_Thread_Enable_dispatch>
2009968: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
200996c: 30 bf ff f5 b,a 2009940 <_Objects_Id_to_name+0x74>
02009018 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
2009018: 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 );
200901c: fa 16 20 0a lduh [ %i0 + 0xa ], %i5
block_count = (information->maximum - index_base) /
2009020: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4
2009024: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
2009028: 92 10 00 1c mov %i4, %o1
200902c: 40 00 44 fc call 201a41c <.udiv>
2009030: 90 22 00 1d sub %o0, %i5, %o0
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
2009034: 80 a2 20 00 cmp %o0, 0
2009038: 02 80 00 34 be 2009108 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN
200903c: 01 00 00 00 nop
if ( information->inactive_per_block[ block ] ==
2009040: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
2009044: c2 01 00 00 ld [ %g4 ], %g1
2009048: 80 a7 00 01 cmp %i4, %g1
200904c: 02 80 00 0f be 2009088 <_Objects_Shrink_information+0x70> <== NEVER TAKEN
2009050: 82 10 20 00 clr %g1
2009054: 10 80 00 07 b 2009070 <_Objects_Shrink_information+0x58>
2009058: b6 10 20 04 mov 4, %i3
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
200905c: 86 06 e0 04 add %i3, 4, %g3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
2009060: 80 a7 00 02 cmp %i4, %g2
2009064: 02 80 00 0a be 200908c <_Objects_Shrink_information+0x74>
2009068: ba 07 40 1c add %i5, %i4, %i5
200906c: b6 10 00 03 mov %g3, %i3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
2009070: 82 00 60 01 inc %g1
2009074: 80 a0 40 08 cmp %g1, %o0
2009078: 32 bf ff f9 bne,a 200905c <_Objects_Shrink_information+0x44>
200907c: c4 01 00 1b ld [ %g4 + %i3 ], %g2
2009080: 81 c7 e0 08 ret
2009084: 81 e8 00 00 restore
if ( information->inactive_per_block[ block ] ==
2009088: b6 10 20 00 clr %i3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200908c: 10 80 00 06 b 20090a4 <_Objects_Shrink_information+0x8c>
2009090: 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 );
2009094: 80 a7 20 00 cmp %i4, 0
2009098: 22 80 00 12 be,a 20090e0 <_Objects_Shrink_information+0xc8>
200909c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
20090a0: 90 10 00 1c mov %i4, %o0
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
20090a4: 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) &&
20090a8: 80 a0 40 1d cmp %g1, %i5
20090ac: 0a bf ff fa bcs 2009094 <_Objects_Shrink_information+0x7c>
20090b0: f8 02 00 00 ld [ %o0 ], %i4
(index < (index_base + information->allocation_size))) {
20090b4: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
20090b8: 84 07 40 02 add %i5, %g2, %g2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
20090bc: 80 a0 40 02 cmp %g1, %g2
20090c0: 1a bf ff f6 bcc 2009098 <_Objects_Shrink_information+0x80>
20090c4: 80 a7 20 00 cmp %i4, 0
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
20090c8: 7f ff fb 38 call 2007da8 <_Chain_Extract>
20090cc: 01 00 00 00 nop
}
}
while ( the_object );
20090d0: 80 a7 20 00 cmp %i4, 0
20090d4: 12 bf ff f4 bne 20090a4 <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN
20090d8: 90 10 00 1c mov %i4, %o0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
20090dc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
20090e0: 40 00 07 cf call 200b01c <_Workspace_Free>
20090e4: d0 00 40 1b ld [ %g1 + %i3 ], %o0
information->object_blocks[ block ] = NULL;
20090e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
20090ec: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
20090f0: c0 20 40 1b clr [ %g1 + %i3 ]
information->inactive_per_block[ block ] = 0;
20090f4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive -= information->allocation_size;
20090f8: c2 16 20 14 lduh [ %i0 + 0x14 ], %g1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
20090fc: c0 20 c0 1b clr [ %g3 + %i3 ]
information->inactive -= information->allocation_size;
2009100: 82 20 80 01 sub %g2, %g1, %g1
2009104: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
return;
2009108: 81 c7 e0 08 ret
200910c: 81 e8 00 00 restore
02010bb8 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
2010bb8: 9d e3 bf a0 save %sp, -96, %sp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
2010bbc: f4 06 20 08 ld [ %i0 + 8 ], %i2
2010bc0: 3b 00 80 7e sethi %hi(0x201f800), %i5
2010bc4: b3 36 a0 18 srl %i2, 0x18, %i1
2010bc8: ba 17 60 d8 or %i5, 0xd8, %i5
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
2010bcc: b5 2e a0 10 sll %i2, 0x10, %i2
2010bd0: b2 0e 60 07 and %i1, 7, %i1
2010bd4: b5 36 a0 0e srl %i2, 0xe, %i2
2010bd8: b2 06 60 04 add %i1, 4, %i1
2010bdc: b3 2e 60 02 sll %i1, 2, %i1
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
2010be0: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3
2010be4: 80 a6 e0 00 cmp %i3, 0
2010be8: 02 80 00 20 be 2010c68 <_POSIX_Keys_Run_destructors+0xb0>
2010bec: b8 10 20 01 mov 1, %i4
2010bf0: 84 10 20 01 mov 1, %g2
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
2010bf4: c6 07 60 1c ld [ %i5 + 0x1c ], %g3
_POSIX_Keys_Information.local_table [ index ];
2010bf8: 83 2f 20 10 sll %i4, 0x10, %g1
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
2010bfc: 83 30 60 0e srl %g1, 0xe, %g1
2010c00: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
2010c04: 80 a0 60 00 cmp %g1, 0
2010c08: 02 80 00 10 be 2010c48 <_POSIX_Keys_Run_destructors+0x90>
2010c0c: 86 00 40 19 add %g1, %i1, %g3
2010c10: c8 00 60 10 ld [ %g1 + 0x10 ], %g4
2010c14: 80 a1 20 00 cmp %g4, 0
2010c18: 22 80 00 0d be,a 2010c4c <_POSIX_Keys_Run_destructors+0x94>
2010c1c: b8 07 20 01 inc %i4
void *value = key->Values [ thread_api ][ thread_index ];
2010c20: c6 00 e0 04 ld [ %g3 + 4 ], %g3
2010c24: d0 00 c0 1a ld [ %g3 + %i2 ], %o0
if ( value != NULL ) {
2010c28: 80 a2 20 00 cmp %o0, 0
2010c2c: 22 80 00 08 be,a 2010c4c <_POSIX_Keys_Run_destructors+0x94><== ALWAYS TAKEN
2010c30: b8 07 20 01 inc %i4
key->Values [ thread_api ][ thread_index ] = NULL;
2010c34: c0 20 c0 1a clr [ %g3 + %i2 ] <== NOT EXECUTED
(*key->destructor)( value );
2010c38: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
2010c3c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2010c40: 01 00 00 00 nop <== NOT EXECUTED
done = false;
2010c44: 84 10 20 00 clr %g2 ! 0 <PROM_START> <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
2010c48: b8 07 20 01 inc %i4
2010c4c: 83 2f 20 10 sll %i4, 0x10, %g1
2010c50: 83 30 60 10 srl %g1, 0x10, %g1
2010c54: 80 a6 c0 01 cmp %i3, %g1
2010c58: 1a bf ff e7 bcc 2010bf4 <_POSIX_Keys_Run_destructors+0x3c>
2010c5c: 80 88 a0 ff btst 0xff, %g2
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
2010c60: 22 bf ff e1 be,a 2010be4 <_POSIX_Keys_Run_destructors+0x2c><== NEVER TAKEN
2010c64: f6 17 60 10 lduh [ %i5 + 0x10 ], %i3 <== NOT EXECUTED
2010c68: 81 c7 e0 08 ret
2010c6c: 81 e8 00 00 restore
0200c754 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
200c754: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
200c758: 11 00 80 b4 sethi %hi(0x202d000), %o0
200c75c: 92 10 00 18 mov %i0, %o1
200c760: 90 12 20 2c or %o0, 0x2c, %o0
200c764: 40 00 0d ba call 200fe4c <_Objects_Get>
200c768: 94 07 bf f8 add %fp, -8, %o2
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
200c76c: c2 07 bf f8 ld [ %fp + -8 ], %g1
200c770: 80 a0 60 00 cmp %g1, 0
200c774: 22 80 00 08 be,a 200c794 <_POSIX_Message_queue_Receive_support+0x40>
200c778: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
200c77c: 40 00 32 1c call 2018fec <__errno>
200c780: b0 10 3f ff mov -1, %i0
200c784: 82 10 20 09 mov 9, %g1
200c788: c2 22 00 00 st %g1, [ %o0 ]
}
200c78c: 81 c7 e0 08 ret
200c790: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
200c794: 84 08 60 03 and %g1, 3, %g2
200c798: 80 a0 a0 01 cmp %g2, 1
200c79c: 02 80 00 3a be 200c884 <_POSIX_Message_queue_Receive_support+0x130>
200c7a0: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
200c7a4: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
200c7a8: c4 02 20 68 ld [ %o0 + 0x68 ], %g2
200c7ac: 80 a0 80 1a cmp %g2, %i2
200c7b0: 18 80 00 24 bgu 200c840 <_POSIX_Message_queue_Receive_support+0xec>
200c7b4: 84 10 3f ff mov -1, %g2
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
200c7b8: c4 27 bf fc st %g2, [ %fp + -4 ]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
200c7bc: 80 a7 20 00 cmp %i4, 0
200c7c0: 12 80 00 1b bne 200c82c <_POSIX_Message_queue_Receive_support+0xd8>
200c7c4: 98 10 20 00 clr %o4
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
200c7c8: 9a 10 00 1d mov %i5, %o5
200c7cc: 90 02 20 1c add %o0, 0x1c, %o0
200c7d0: 92 10 00 18 mov %i0, %o1
200c7d4: 94 10 00 19 mov %i1, %o2
200c7d8: 96 07 bf fc add %fp, -4, %o3
200c7dc: 40 00 09 0b call 200ec08 <_CORE_message_queue_Seize>
200c7e0: 98 0b 20 01 and %o4, 1, %o4
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
200c7e4: 40 00 11 9b call 2010e50 <_Thread_Enable_dispatch>
200c7e8: 3b 00 80 b4 sethi %hi(0x202d000), %i5
if (msg_prio) {
200c7ec: 80 a6 e0 00 cmp %i3, 0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
200c7f0: ba 17 60 a0 or %i5, 0xa0, %i5
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
200c7f4: 02 80 00 07 be 200c810 <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN
200c7f8: c2 07 60 0c ld [ %i5 + 0xc ], %g1
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
200c7fc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
200c800: 85 38 e0 1f sra %g3, 0x1f, %g2
200c804: 86 18 80 03 xor %g2, %g3, %g3
200c808: 84 20 c0 02 sub %g3, %g2, %g2
*msg_prio = _POSIX_Message_queue_Priority_from_core(
200c80c: c4 26 c0 00 st %g2, [ %i3 ]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
200c810: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
200c814: 80 a0 60 00 cmp %g1, 0
200c818: 12 80 00 12 bne 200c860 <_POSIX_Message_queue_Receive_support+0x10c>
200c81c: 01 00 00 00 nop
return length_out;
200c820: f0 07 bf fc ld [ %fp + -4 ], %i0
200c824: 81 c7 e0 08 ret
200c828: 81 e8 00 00 restore
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
200c82c: 05 00 00 10 sethi %hi(0x4000), %g2
200c830: 82 08 40 02 and %g1, %g2, %g1
200c834: 80 a0 00 01 cmp %g0, %g1
200c838: 10 bf ff e4 b 200c7c8 <_POSIX_Message_queue_Receive_support+0x74>
200c83c: 98 60 3f ff subx %g0, -1, %o4
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
200c840: 40 00 11 84 call 2010e50 <_Thread_Enable_dispatch>
200c844: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EMSGSIZE );
200c848: 40 00 31 e9 call 2018fec <__errno>
200c84c: 01 00 00 00 nop
200c850: 82 10 20 7a mov 0x7a, %g1 ! 7a <PROM_START+0x7a>
200c854: c2 22 00 00 st %g1, [ %o0 ]
200c858: 81 c7 e0 08 ret
200c85c: 81 e8 00 00 restore
}
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
200c860: 40 00 31 e3 call 2018fec <__errno>
200c864: b0 10 3f ff mov -1, %i0
200c868: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200c86c: b6 10 00 08 mov %o0, %i3
200c870: 40 00 00 a3 call 200cafc <_POSIX_Message_queue_Translate_core_message_queue_return_code>
200c874: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
200c878: d0 26 c0 00 st %o0, [ %i3 ]
200c87c: 81 c7 e0 08 ret
200c880: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
200c884: 40 00 11 73 call 2010e50 <_Thread_Enable_dispatch>
200c888: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EBADF );
200c88c: 40 00 31 d8 call 2018fec <__errno>
200c890: 01 00 00 00 nop
200c894: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
200c898: c2 22 00 00 st %g1, [ %o0 ]
200c89c: 81 c7 e0 08 ret
200c8a0: 81 e8 00 00 restore
0200d870 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
Thread_Control *the_thread
)
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
200d870: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
200d874: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2
200d878: 80 a0 a0 00 cmp %g2, 0
200d87c: 12 80 00 06 bne 200d894 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24><== NEVER TAKEN
200d880: 01 00 00 00 nop
200d884: c4 00 60 dc ld [ %g1 + 0xdc ], %g2
200d888: 80 a0 a0 01 cmp %g2, 1
200d88c: 22 80 00 05 be,a 200d8a0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30>
200d890: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
200d894: 82 13 c0 00 mov %o7, %g1
200d898: 7f ff f1 af call 2009f54 <_Thread_Enable_dispatch>
200d89c: 9e 10 40 00 mov %g1, %o7
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
200d8a0: 80 a0 60 00 cmp %g1, 0
200d8a4: 02 bf ff fc be 200d894 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24>
200d8a8: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200d8ac: 03 00 80 7e sethi %hi(0x201f800), %g1
200d8b0: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 201f9e0 <_Thread_Dispatch_disable_level>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
200d8b4: 92 10 3f ff mov -1, %o1
200d8b8: 84 00 bf ff add %g2, -1, %g2
200d8bc: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ]
return _Thread_Dispatch_disable_level;
200d8c0: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1
200d8c4: 82 13 c0 00 mov %o7, %g1
200d8c8: 40 00 01 da call 200e030 <_POSIX_Thread_Exit>
200d8cc: 9e 10 40 00 mov %g1, %o7
0200ed94 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
200ed94: 9d e3 bf a0 save %sp, -96, %sp
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
200ed98: d0 06 40 00 ld [ %i1 ], %o0
200ed9c: 7f ff ff f1 call 200ed60 <_POSIX_Priority_Is_valid>
200eda0: ba 10 00 18 mov %i0, %i5
200eda4: 80 8a 20 ff btst 0xff, %o0
200eda8: 02 80 00 34 be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4><== NEVER TAKEN
200edac: b0 10 20 16 mov 0x16, %i0
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
200edb0: c0 26 80 00 clr [ %i2 ]
*budget_callout = NULL;
200edb4: c0 26 c0 00 clr [ %i3 ]
if ( policy == SCHED_OTHER ) {
200edb8: 80 a7 60 00 cmp %i5, 0
200edbc: 02 80 00 2d be 200ee70 <_POSIX_Thread_Translate_sched_param+0xdc>
200edc0: b0 10 20 00 clr %i0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
200edc4: 80 a7 60 01 cmp %i5, 1
200edc8: 02 80 00 2c be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4>
200edcc: 80 a7 60 02 cmp %i5, 2
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
200edd0: 02 80 00 2c be 200ee80 <_POSIX_Thread_Translate_sched_param+0xec>
200edd4: 80 a7 60 04 cmp %i5, 4
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
200edd8: 12 80 00 28 bne 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4>
200eddc: b0 10 20 16 mov 0x16, %i0
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
200ede0: c2 06 60 08 ld [ %i1 + 8 ], %g1
200ede4: 80 a0 60 00 cmp %g1, 0
200ede8: 32 80 00 07 bne,a 200ee04 <_POSIX_Thread_Translate_sched_param+0x70>
200edec: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200edf0: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200edf4: 80 a0 60 00 cmp %g1, 0
200edf8: 02 80 00 23 be 200ee84 <_POSIX_Thread_Translate_sched_param+0xf0>
200edfc: 01 00 00 00 nop
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
200ee00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200ee04: 80 a0 60 00 cmp %g1, 0
200ee08: 12 80 00 06 bne 200ee20 <_POSIX_Thread_Translate_sched_param+0x8c>
200ee0c: 01 00 00 00 nop
200ee10: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200ee14: 80 a0 60 00 cmp %g1, 0
200ee18: 02 80 00 18 be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4>
200ee1c: b0 10 20 16 mov 0x16, %i0
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200ee20: 7f ff f2 d7 call 200b97c <_Timespec_To_ticks>
200ee24: 90 06 60 08 add %i1, 8, %o0
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
200ee28: b0 10 20 16 mov 0x16, %i0
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200ee2c: ba 10 00 08 mov %o0, %i5
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
200ee30: 7f ff f2 d3 call 200b97c <_Timespec_To_ticks>
200ee34: 90 06 60 10 add %i1, 0x10, %o0
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200ee38: 80 a7 40 08 cmp %i5, %o0
200ee3c: 0a 80 00 12 bcs 200ee84 <_POSIX_Thread_Translate_sched_param+0xf0>
200ee40: 01 00 00 00 nop
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
200ee44: 7f ff ff c7 call 200ed60 <_POSIX_Priority_Is_valid>
200ee48: d0 06 60 04 ld [ %i1 + 4 ], %o0
200ee4c: 80 8a 20 ff btst 0xff, %o0
200ee50: 02 80 00 0a be 200ee78 <_POSIX_Thread_Translate_sched_param+0xe4>
200ee54: 82 10 20 03 mov 3, %g1
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
200ee58: c2 26 80 00 st %g1, [ %i2 ]
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
200ee5c: 03 00 80 1e sethi %hi(0x2007800), %g1
200ee60: 82 10 60 dc or %g1, 0xdc, %g1 ! 20078dc <_POSIX_Threads_Sporadic_budget_callout>
200ee64: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
return EINVAL;
}
200ee68: 81 c7 e0 08 ret
200ee6c: 91 e8 20 00 restore %g0, 0, %o0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200ee70: 82 10 20 01 mov 1, %g1
200ee74: c2 26 80 00 st %g1, [ %i2 ]
return 0;
200ee78: 81 c7 e0 08 ret
200ee7c: 81 e8 00 00 restore
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
200ee80: fa 26 80 00 st %i5, [ %i2 ]
return 0;
200ee84: 81 c7 e0 08 ret
200ee88: 81 e8 00 00 restore
0200dbac <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
200dbac: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
200dbb0: f0 06 61 5c ld [ %i1 + 0x15c ], %i0
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
200dbb4: 40 00 0b e5 call 2010b48 <_POSIX_Threads_cancel_run>
200dbb8: 90 10 00 19 mov %i1, %o0
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
200dbbc: 90 10 00 19 mov %i1, %o0
200dbc0: 40 00 0b fe call 2010bb8 <_POSIX_Keys_Run_destructors>
200dbc4: ba 06 20 44 add %i0, 0x44, %i5
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
200dbc8: 10 80 00 03 b 200dbd4 <_POSIX_Threads_Delete_extension+0x28>
200dbcc: f8 06 60 28 ld [ %i1 + 0x28 ], %i4
*(void **)the_thread->Wait.return_argument = value_ptr;
200dbd0: f8 20 40 00 st %i4, [ %g1 ] <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
200dbd4: 7f ff f1 78 call 200a1b4 <_Thread_queue_Dequeue>
200dbd8: 90 10 00 1d mov %i5, %o0
200dbdc: 80 a2 20 00 cmp %o0, 0
200dbe0: 32 bf ff fc bne,a 200dbd0 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN
200dbe4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
200dbe8: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
200dbec: 80 a0 60 04 cmp %g1, 4
200dbf0: 02 80 00 05 be 200dc04 <_POSIX_Threads_Delete_extension+0x58>
200dbf4: 01 00 00 00 nop
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
200dbf8: c0 26 61 5c clr [ %i1 + 0x15c ]
_Workspace_Free( api );
200dbfc: 7f ff f5 08 call 200b01c <_Workspace_Free>
200dc00: 81 e8 00 00 restore
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
200dc04: 7f ff f4 7c call 200adf4 <_Watchdog_Remove>
200dc08: 90 06 20 a8 add %i0, 0xa8, %o0
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
200dc0c: c0 26 61 5c clr [ %i1 + 0x15c ]
_Workspace_Free( api );
200dc10: 7f ff f5 03 call 200b01c <_Workspace_Free>
200dc14: 81 e8 00 00 restore
020075dc <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
20075dc: 9d e3 bf 58 save %sp, -168, %sp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
20075e0: 03 00 80 8d sethi %hi(0x2023400), %g1
20075e4: 82 10 61 48 or %g1, 0x148, %g1 ! 2023548 <Configuration_POSIX_API>
maximum = Configuration_POSIX_API.number_of_initialization_threads;
20075e8: f6 00 60 30 ld [ %g1 + 0x30 ], %i3
if ( !user_threads || maximum == 0 )
20075ec: 80 a6 e0 00 cmp %i3, 0
20075f0: 02 80 00 18 be 2007650 <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN
20075f4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
20075f8: 80 a7 60 00 cmp %i5, 0
20075fc: 02 80 00 15 be 2007650 <_POSIX_Threads_Initialize_user_threads_body+0x74><== NEVER TAKEN
2007600: b8 10 20 00 clr %i4
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
2007604: 40 00 1e 22 call 200ee8c <pthread_attr_init>
2007608: 90 07 bf bc add %fp, -68, %o0
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
200760c: 92 10 20 02 mov 2, %o1
2007610: 40 00 1e 2b call 200eebc <pthread_attr_setinheritsched>
2007614: 90 07 bf bc add %fp, -68, %o0
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
2007618: d2 07 60 04 ld [ %i5 + 4 ], %o1
200761c: 40 00 1e 38 call 200eefc <pthread_attr_setstacksize>
2007620: 90 07 bf bc add %fp, -68, %o0
status = pthread_create(
2007624: d4 07 40 00 ld [ %i5 ], %o2
2007628: 90 07 bf fc add %fp, -4, %o0
200762c: 92 07 bf bc add %fp, -68, %o1
2007630: 7f ff fe fd call 2007224 <pthread_create>
2007634: 96 10 20 00 clr %o3
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
2007638: 94 92 20 00 orcc %o0, 0, %o2
200763c: 12 80 00 07 bne 2007658 <_POSIX_Threads_Initialize_user_threads_body+0x7c>
2007640: b8 07 20 01 inc %i4
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
2007644: 80 a6 c0 1c cmp %i3, %i4
2007648: 18 bf ff ef bgu 2007604 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN
200764c: ba 07 60 08 add %i5, 8, %i5
2007650: 81 c7 e0 08 ret
2007654: 81 e8 00 00 restore
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
2007658: 90 10 20 02 mov 2, %o0
200765c: 40 00 08 89 call 2009880 <_Internal_error_Occurred>
2007660: 92 10 20 01 mov 1, %o1
0200dd4c <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
200dd4c: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200dd50: fa 06 61 5c ld [ %i1 + 0x15c ], %i5
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
200dd54: 40 00 04 6a call 200eefc <_Timespec_To_ticks>
200dd58: 90 07 60 98 add %i5, 0x98, %o0
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
200dd5c: c4 07 60 88 ld [ %i5 + 0x88 ], %g2
200dd60: 03 00 80 79 sethi %hi(0x201e400), %g1
200dd64: d2 08 63 a0 ldub [ %g1 + 0x3a0 ], %o1 ! 201e7a0 <rtems_maximum_priority>
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
200dd68: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
200dd6c: 92 22 40 02 sub %o1, %g2, %o1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
200dd70: d0 26 60 74 st %o0, [ %i1 + 0x74 ]
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
200dd74: 80 a0 60 00 cmp %g1, 0
200dd78: 12 80 00 06 bne 200dd90 <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NEVER TAKEN
200dd7c: d2 26 60 18 st %o1, [ %i1 + 0x18 ]
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
200dd80: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200dd84: 80 a0 40 09 cmp %g1, %o1
200dd88: 38 80 00 09 bgu,a 200ddac <_POSIX_Threads_Sporadic_budget_TSR+0x60>
200dd8c: 90 10 00 19 mov %i1, %o0
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
200dd90: 40 00 04 5b call 200eefc <_Timespec_To_ticks>
200dd94: 90 07 60 90 add %i5, 0x90, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200dd98: 31 00 80 7d sethi %hi(0x201f400), %i0
200dd9c: b2 07 60 a8 add %i5, 0xa8, %i1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200dda0: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200dda4: 7f ff f3 b2 call 200ac6c <_Watchdog_Insert>
200dda8: 91 ee 21 80 restore %i0, 0x180, %o0
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
200ddac: 7f ff ee e1 call 2009930 <_Thread_Change_priority>
200ddb0: 94 10 20 01 mov 1, %o2
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
200ddb4: 40 00 04 52 call 200eefc <_Timespec_To_ticks>
200ddb8: 90 07 60 90 add %i5, 0x90, %o0
200ddbc: 31 00 80 7d sethi %hi(0x201f400), %i0
200ddc0: b2 07 60 a8 add %i5, 0xa8, %i1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200ddc4: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200ddc8: 7f ff f3 a9 call 200ac6c <_Watchdog_Insert>
200ddcc: 91 ee 21 80 restore %i0, 0x180, %o0
0200ddd0 <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200ddd0: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
200ddd4: c6 00 a0 8c ld [ %g2 + 0x8c ], %g3
200ddd8: 05 00 80 79 sethi %hi(0x201e400), %g2
200dddc: d2 08 a3 a0 ldub [ %g2 + 0x3a0 ], %o1 ! 201e7a0 <rtems_maximum_priority>
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
200dde0: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
200dde4: 92 22 40 03 sub %o1, %g3, %o1
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
200dde8: 86 10 3f ff mov -1, %g3
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
200ddec: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
200ddf0: 80 a0 a0 00 cmp %g2, 0
200ddf4: 12 80 00 06 bne 200de0c <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NEVER TAKEN
200ddf8: c6 22 20 74 st %g3, [ %o0 + 0x74 ]
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
200ddfc: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200de00: 80 a0 40 09 cmp %g1, %o1
200de04: 0a 80 00 04 bcs 200de14 <_POSIX_Threads_Sporadic_budget_callout+0x44><== ALWAYS TAKEN
200de08: 94 10 20 01 mov 1, %o2
200de0c: 81 c3 e0 08 retl <== NOT EXECUTED
200de10: 01 00 00 00 nop <== NOT EXECUTED
_Thread_Change_priority( the_thread, new_priority, true );
200de14: 82 13 c0 00 mov %o7, %g1
200de18: 7f ff ee c6 call 2009930 <_Thread_Change_priority>
200de1c: 9e 10 40 00 mov %g1, %o7
02010b48 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
2010b48: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
2010b4c: f8 06 21 5c ld [ %i0 + 0x15c ], %i4
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
2010b50: 84 10 20 01 mov 1, %g2
while ( !_Chain_Is_empty( handler_stack ) ) {
2010b54: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2010b58: b6 07 20 e8 add %i4, 0xe8, %i3
2010b5c: 80 a0 40 1b cmp %g1, %i3
2010b60: 02 80 00 14 be 2010bb0 <_POSIX_Threads_cancel_run+0x68>
2010b64: c4 27 20 d8 st %g2, [ %i4 + 0xd8 ]
_ISR_Disable( level );
2010b68: 7f ff c6 7d call 200255c <sparc_disable_interrupts>
2010b6c: 01 00 00 00 nop
handler = (POSIX_Cancel_Handler_control *)
2010b70: fa 07 20 ec ld [ %i4 + 0xec ], %i5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2010b74: c4 07 40 00 ld [ %i5 ], %g2
previous = the_node->previous;
2010b78: c2 07 60 04 ld [ %i5 + 4 ], %g1
next->previous = previous;
2010b7c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
2010b80: c4 20 40 00 st %g2, [ %g1 ]
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
2010b84: 7f ff c6 7a call 200256c <sparc_enable_interrupts>
2010b88: 01 00 00 00 nop
(*handler->routine)( handler->arg );
2010b8c: c2 07 60 08 ld [ %i5 + 8 ], %g1
2010b90: 9f c0 40 00 call %g1
2010b94: d0 07 60 0c ld [ %i5 + 0xc ], %o0
_Workspace_Free( handler );
2010b98: 7f ff e9 21 call 200b01c <_Workspace_Free>
2010b9c: 90 10 00 1d mov %i5, %o0
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
2010ba0: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1
2010ba4: 80 a0 40 1b cmp %g1, %i3
2010ba8: 12 bf ff f0 bne 2010b68 <_POSIX_Threads_cancel_run+0x20> <== NEVER TAKEN
2010bac: 01 00 00 00 nop
2010bb0: 81 c7 e0 08 ret
2010bb4: 81 e8 00 00 restore
0200708c <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
200708c: 9d e3 bf 98 save %sp, -104, %sp
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2007090: c4 06 60 68 ld [ %i1 + 0x68 ], %g2
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
2007094: c2 06 60 54 ld [ %i1 + 0x54 ], %g1
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2007098: 84 00 a0 01 inc %g2
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
200709c: 80 a0 60 00 cmp %g1, 0
20070a0: 12 80 00 0e bne 20070d8 <_POSIX_Timer_TSR+0x4c>
20070a4: c4 26 60 68 st %g2, [ %i1 + 0x68 ]
20070a8: c2 06 60 58 ld [ %i1 + 0x58 ], %g1
20070ac: 80 a0 60 00 cmp %g1, 0
20070b0: 32 80 00 0b bne,a 20070dc <_POSIX_Timer_TSR+0x50> <== ALWAYS TAKEN
20070b4: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
20070b8: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
20070bc: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
20070c0: d0 06 60 38 ld [ %i1 + 0x38 ], %o0
20070c4: 40 00 1c 89 call 200e2e8 <pthread_kill>
20070c8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
20070cc: c0 26 60 68 clr [ %i1 + 0x68 ]
20070d0: 81 c7 e0 08 ret
20070d4: 81 e8 00 00 restore
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
20070d8: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
20070dc: d4 06 60 08 ld [ %i1 + 8 ], %o2
20070e0: 90 06 60 10 add %i1, 0x10, %o0
20070e4: 98 10 00 19 mov %i1, %o4
20070e8: 17 00 80 1c sethi %hi(0x2007000), %o3
20070ec: 40 00 1d a6 call 200e784 <_POSIX_Timer_Insert_helper>
20070f0: 96 12 e0 8c or %o3, 0x8c, %o3 ! 200708c <_POSIX_Timer_TSR>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
20070f4: 80 8a 20 ff btst 0xff, %o0
20070f8: 02 bf ff f6 be 20070d0 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
20070fc: 01 00 00 00 nop
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
2007100: 40 00 06 16 call 2008958 <_TOD_Get_as_timestamp>
2007104: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2007108: f8 1f bf f8 ldd [ %fp + -8 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
200710c: 94 10 20 00 clr %o2
2007110: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007114: 90 10 00 1c mov %i4, %o0
2007118: 96 12 e2 00 or %o3, 0x200, %o3
200711c: 40 00 51 51 call 201b660 <__divdi3>
2007120: 92 10 00 1d mov %i5, %o1
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007124: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007128: d2 26 60 6c st %o1, [ %i1 + 0x6c ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
200712c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007130: 90 10 00 1c mov %i4, %o0
2007134: 96 12 e2 00 or %o3, 0x200, %o3
2007138: 40 00 52 30 call 201b9f8 <__moddi3>
200713c: 92 10 00 1d mov %i5, %o1
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
2007140: 82 10 20 03 mov 3, %g1
2007144: d2 26 60 70 st %o1, [ %i1 + 0x70 ]
2007148: 10 bf ff de b 20070c0 <_POSIX_Timer_TSR+0x34>
200714c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
02010c70 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
2010c70: 9d e3 bf 68 save %sp, -152, %sp
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
2010c74: 98 10 20 01 mov 1, %o4
2010c78: 90 10 00 18 mov %i0, %o0
2010c7c: 92 10 00 19 mov %i1, %o1
2010c80: 94 07 bf f4 add %fp, -12, %o2
2010c84: 40 00 00 2e call 2010d3c <_POSIX_signals_Clear_signals>
2010c88: 96 10 00 1a mov %i2, %o3
2010c8c: 80 8a 20 ff btst 0xff, %o0
2010c90: 02 80 00 23 be 2010d1c <_POSIX_signals_Check_signal+0xac>
2010c94: 82 10 20 00 clr %g1
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
2010c98: 85 2e 60 02 sll %i1, 2, %g2
2010c9c: 37 00 80 7e sethi %hi(0x201f800), %i3
2010ca0: b9 2e 60 04 sll %i1, 4, %i4
2010ca4: b6 16 e2 60 or %i3, 0x260, %i3
2010ca8: b8 27 00 02 sub %i4, %g2, %i4
2010cac: 84 06 c0 1c add %i3, %i4, %g2
2010cb0: fa 00 a0 08 ld [ %g2 + 8 ], %i5
2010cb4: 80 a7 60 01 cmp %i5, 1
2010cb8: 02 80 00 19 be 2010d1c <_POSIX_signals_Check_signal+0xac> <== NEVER TAKEN
2010cbc: 21 00 80 7e sethi %hi(0x201f800), %l0
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
2010cc0: f4 06 20 d0 ld [ %i0 + 0xd0 ], %i2
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
2010cc4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
2010cc8: a0 14 22 00 or %l0, 0x200, %l0
2010ccc: d2 04 20 0c ld [ %l0 + 0xc ], %o1
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
2010cd0: 82 10 40 1a or %g1, %i2, %g1
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
2010cd4: 90 07 bf cc add %fp, -52, %o0
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
2010cd8: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ]
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
2010cdc: 92 02 60 20 add %o1, 0x20, %o1
2010ce0: 40 00 04 98 call 2011f40 <memcpy>
2010ce4: 94 10 20 28 mov 0x28, %o2
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
2010ce8: c2 06 c0 1c ld [ %i3 + %i4 ], %g1
2010cec: 80 a0 60 02 cmp %g1, 2
2010cf0: 02 80 00 0e be 2010d28 <_POSIX_signals_Check_signal+0xb8>
2010cf4: 90 10 00 19 mov %i1, %o0
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
2010cf8: 9f c7 40 00 call %i5
2010cfc: 01 00 00 00 nop
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
2010d00: d0 04 20 0c ld [ %l0 + 0xc ], %o0
2010d04: 92 07 bf cc add %fp, -52, %o1
2010d08: 90 02 20 20 add %o0, 0x20, %o0
2010d0c: 40 00 04 8d call 2011f40 <memcpy>
2010d10: 94 10 20 28 mov 0x28, %o2
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
2010d14: 82 10 20 01 mov 1, %g1
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
2010d18: f4 26 20 d0 st %i2, [ %i0 + 0xd0 ]
return true;
}
2010d1c: b0 08 60 01 and %g1, 1, %i0
2010d20: 81 c7 e0 08 ret
2010d24: 81 e8 00 00 restore
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
2010d28: 92 07 bf f4 add %fp, -12, %o1
2010d2c: 9f c7 40 00 call %i5
2010d30: 94 10 20 00 clr %o2
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
2010d34: 10 bf ff f4 b 2010d04 <_POSIX_signals_Check_signal+0x94>
2010d38: d0 04 20 0c ld [ %l0 + 0xc ], %o0
02011524 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
2011524: 9d e3 bf a0 save %sp, -96, %sp
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
2011528: 7f ff c4 0d call 200255c <sparc_disable_interrupts>
201152c: 01 00 00 00 nop
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
2011530: 85 2e 20 04 sll %i0, 4, %g2
2011534: 83 2e 20 02 sll %i0, 2, %g1
2011538: 82 20 80 01 sub %g2, %g1, %g1
201153c: 05 00 80 7e sethi %hi(0x201f800), %g2
2011540: 84 10 a2 60 or %g2, 0x260, %g2 ! 201fa60 <_POSIX_signals_Vectors>
2011544: c4 00 80 01 ld [ %g2 + %g1 ], %g2
2011548: 80 a0 a0 02 cmp %g2, 2
201154c: 02 80 00 0b be 2011578 <_POSIX_signals_Clear_process_signals+0x54>
2011550: 05 00 80 7f sethi %hi(0x201fc00), %g2
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
2011554: 03 00 80 7f sethi %hi(0x201fc00), %g1
2011558: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 ! 201fc54 <_POSIX_signals_Pending>
201155c: 86 10 20 01 mov 1, %g3
2011560: b0 06 3f ff add %i0, -1, %i0
2011564: b1 28 c0 18 sll %g3, %i0, %i0
2011568: b0 28 80 18 andn %g2, %i0, %i0
201156c: f0 20 60 54 st %i0, [ %g1 + 0x54 ]
}
_ISR_Enable( level );
2011570: 7f ff c3 ff call 200256c <sparc_enable_interrupts>
2011574: 91 e8 00 08 restore %g0, %o0, %o0
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
2011578: 84 10 a0 58 or %g2, 0x58, %g2
201157c: c6 00 40 02 ld [ %g1 + %g2 ], %g3
2011580: 82 00 40 02 add %g1, %g2, %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2011584: 82 00 60 04 add %g1, 4, %g1
2011588: 80 a0 c0 01 cmp %g3, %g1
201158c: 02 bf ff f3 be 2011558 <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN
2011590: 03 00 80 7f sethi %hi(0x201fc00), %g1
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
2011594: 7f ff c3 f6 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
2011598: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02007f00 <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
2007f00: 82 10 20 1b mov 0x1b, %g1 <== NOT EXECUTED
2007f04: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
2007f08: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED
2007f0c: 85 28 c0 02 sll %g3, %g2, %g2 <== NOT EXECUTED
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
2007f10: 80 88 80 08 btst %g2, %o0 <== NOT EXECUTED
2007f14: 12 80 00 11 bne 2007f58 <_POSIX_signals_Get_lowest+0x58> <== NOT EXECUTED
2007f18: 01 00 00 00 nop <== NOT EXECUTED
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
2007f1c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2007f20: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
2007f24: 12 bf ff fa bne 2007f0c <_POSIX_signals_Get_lowest+0xc> <== NOT EXECUTED
2007f28: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED
2007f2c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2007f30: 10 80 00 05 b 2007f44 <_POSIX_signals_Get_lowest+0x44> <== NOT EXECUTED
2007f34: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
2007f38: 80 a0 60 1b cmp %g1, 0x1b <== NOT EXECUTED
2007f3c: 02 80 00 07 be 2007f58 <_POSIX_signals_Get_lowest+0x58> <== NOT EXECUTED
2007f40: 01 00 00 00 nop <== NOT EXECUTED
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
2007f44: 84 00 7f ff add %g1, -1, %g2 <== NOT EXECUTED
2007f48: 85 28 c0 02 sll %g3, %g2, %g2 <== NOT EXECUTED
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
2007f4c: 80 88 80 08 btst %g2, %o0 <== NOT EXECUTED
2007f50: 22 bf ff fa be,a 2007f38 <_POSIX_signals_Get_lowest+0x38><== NOT EXECUTED
2007f54: 82 00 60 01 inc %g1 <== NOT EXECUTED
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
2007f58: 81 c3 e0 08 retl <== NOT EXECUTED
2007f5c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
0200d8fc <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
200d8fc: 9d e3 bf a0 save %sp, -96, %sp
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
200d900: 35 00 80 7e sethi %hi(0x201f800), %i2
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200d904: f8 06 21 5c ld [ %i0 + 0x15c ], %i4
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
200d908: b4 16 a2 00 or %i2, 0x200, %i2
200d90c: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
200d910: 80 a7 20 00 cmp %i4, 0
200d914: 02 80 00 34 be 200d9e4 <_POSIX_signals_Post_switch_extension+0xe8>
200d918: f2 00 60 34 ld [ %g1 + 0x34 ], %i1
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
200d91c: 7f ff d3 10 call 200255c <sparc_disable_interrupts>
200d920: 37 00 80 7f sethi %hi(0x201fc00), %i3
200d924: b6 16 e0 54 or %i3, 0x54, %i3 ! 201fc54 <_POSIX_signals_Pending>
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
200d928: c6 06 c0 00 ld [ %i3 ], %g3
200d92c: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
200d930: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2
(api->signals_pending | _POSIX_signals_Pending)) ) {
200d934: 82 10 c0 01 or %g3, %g1, %g1
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
200d938: 80 a8 40 02 andncc %g1, %g2, %g0
200d93c: 02 80 00 26 be 200d9d4 <_POSIX_signals_Post_switch_extension+0xd8>
200d940: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
200d944: 7f ff d3 0a call 200256c <sparc_enable_interrupts>
200d948: ba 10 20 1b mov 0x1b, %i5 ! 1b <PROM_START+0x1b>
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
200d94c: 92 10 00 1d mov %i5, %o1
200d950: 94 10 20 00 clr %o2
200d954: 40 00 0c c7 call 2010c70 <_POSIX_signals_Check_signal>
200d958: 90 10 00 1c mov %i4, %o0
_POSIX_signals_Check_signal( api, signo, true );
200d95c: 92 10 00 1d mov %i5, %o1
200d960: 90 10 00 1c mov %i4, %o0
200d964: 40 00 0c c3 call 2010c70 <_POSIX_signals_Check_signal>
200d968: 94 10 20 01 mov 1, %o2
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200d96c: ba 07 60 01 inc %i5
200d970: 80 a7 60 20 cmp %i5, 0x20
200d974: 12 bf ff f7 bne 200d950 <_POSIX_signals_Post_switch_extension+0x54>
200d978: 92 10 00 1d mov %i5, %o1
200d97c: ba 10 20 01 mov 1, %i5
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
200d980: 92 10 00 1d mov %i5, %o1
200d984: 94 10 20 00 clr %o2
200d988: 40 00 0c ba call 2010c70 <_POSIX_signals_Check_signal>
200d98c: 90 10 00 1c mov %i4, %o0
_POSIX_signals_Check_signal( api, signo, true );
200d990: 92 10 00 1d mov %i5, %o1
200d994: 90 10 00 1c mov %i4, %o0
200d998: 40 00 0c b6 call 2010c70 <_POSIX_signals_Check_signal>
200d99c: 94 10 20 01 mov 1, %o2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
200d9a0: ba 07 60 01 inc %i5
200d9a4: 80 a7 60 1b cmp %i5, 0x1b
200d9a8: 12 bf ff f7 bne 200d984 <_POSIX_signals_Post_switch_extension+0x88>
200d9ac: 92 10 00 1d mov %i5, %o1
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
200d9b0: 7f ff d2 eb call 200255c <sparc_disable_interrupts>
200d9b4: 01 00 00 00 nop
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
200d9b8: c6 06 c0 00 ld [ %i3 ], %g3
200d9bc: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
200d9c0: c4 07 20 d0 ld [ %i4 + 0xd0 ], %g2
(api->signals_pending | _POSIX_signals_Pending)) ) {
200d9c4: 82 10 c0 01 or %g3, %g1, %g1
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
200d9c8: 80 a8 40 02 andncc %g1, %g2, %g0
200d9cc: 12 bf ff de bne 200d944 <_POSIX_signals_Post_switch_extension+0x48><== NEVER TAKEN
200d9d0: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
200d9d4: 7f ff d2 e6 call 200256c <sparc_enable_interrupts>
200d9d8: 01 00 00 00 nop
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
200d9dc: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
200d9e0: f2 20 60 34 st %i1, [ %g1 + 0x34 ]
200d9e4: 81 c7 e0 08 ret
200d9e8: 81 e8 00 00 restore
0201c2a0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
201c2a0: 9d e3 bf a0 save %sp, -96, %sp
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
201c2a4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
201c2a8: 05 04 00 20 sethi %hi(0x10008000), %g2
201c2ac: 86 10 20 01 mov 1, %g3
201c2b0: ba 06 7f ff add %i1, -1, %i5
201c2b4: 88 08 40 02 and %g1, %g2, %g4
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
201c2b8: da 06 21 5c ld [ %i0 + 0x15c ], %o5
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
201c2bc: 80 a1 00 02 cmp %g4, %g2
201c2c0: 02 80 00 1c be 201c330 <_POSIX_signals_Unblock_thread+0x90>
201c2c4: 9f 28 c0 1d sll %g3, %i5, %o7
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
201c2c8: c4 03 60 d0 ld [ %o5 + 0xd0 ], %g2
201c2cc: 80 ab c0 02 andncc %o7, %g2, %g0
201c2d0: 02 80 00 15 be 201c324 <_POSIX_signals_Unblock_thread+0x84>
201c2d4: ba 10 20 00 clr %i5
201c2d8: 05 04 00 00 sethi %hi(0x10000000), %g2
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
201c2dc: 80 88 40 02 btst %g1, %g2
201c2e0: 02 80 00 29 be 201c384 <_POSIX_signals_Unblock_thread+0xe4>
201c2e4: 80 a0 60 00 cmp %g1, 0
the_thread->Wait.return_code = EINTR;
201c2e8: 84 10 20 04 mov 4, %g2
201c2ec: c4 26 20 34 st %g2, [ %i0 + 0x34 ]
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
201c2f0: 05 00 00 ef sethi %hi(0x3bc00), %g2
201c2f4: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 <PROM_START+0x3bee0>
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
201c2f8: 80 88 40 02 btst %g1, %g2
201c2fc: 12 80 00 36 bne 201c3d4 <_POSIX_signals_Unblock_thread+0x134>
201c300: 80 88 60 08 btst 8, %g1
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
201c304: 22 80 00 09 be,a 201c328 <_POSIX_signals_Unblock_thread+0x88><== NEVER TAKEN
201c308: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
201c30c: 7f ff ba ba call 200adf4 <_Watchdog_Remove>
201c310: 90 06 20 48 add %i0, 0x48, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
201c314: 13 04 00 ff sethi %hi(0x1003fc00), %o1
201c318: 90 10 00 18 mov %i0, %o0
201c31c: 7f ff b5 d0 call 2009a5c <_Thread_Clear_state>
201c320: 92 12 63 f8 or %o1, 0x3f8, %o1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
201c324: b0 0f 60 01 and %i5, 1, %i0
201c328: 81 c7 e0 08 ret
201c32c: 81 e8 00 00 restore
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
201c330: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
201c334: 80 8b c0 01 btst %o7, %g1
201c338: 22 80 00 21 be,a 201c3bc <_POSIX_signals_Unblock_thread+0x11c>
201c33c: c2 03 60 d0 ld [ %o5 + 0xd0 ], %g1
the_thread->Wait.return_code = EINTR;
201c340: 82 10 20 04 mov 4, %g1
201c344: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
201c348: 80 a6 a0 00 cmp %i2, 0
201c34c: 02 80 00 27 be 201c3e8 <_POSIX_signals_Unblock_thread+0x148>
201c350: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
201c354: c4 06 80 00 ld [ %i2 ], %g2
201c358: c4 20 40 00 st %g2, [ %g1 ]
201c35c: c4 06 a0 04 ld [ %i2 + 4 ], %g2
201c360: c4 20 60 04 st %g2, [ %g1 + 4 ]
201c364: c4 06 a0 08 ld [ %i2 + 8 ], %g2
201c368: c4 20 60 08 st %g2, [ %g1 + 8 ]
}
_Thread_queue_Extract_with_proxy( the_thread );
201c36c: 90 10 00 18 mov %i0, %o0
201c370: 7f ff b8 a1 call 200a5f4 <_Thread_queue_Extract_with_proxy>
201c374: ba 10 20 01 mov 1, %i5
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
201c378: b0 0f 60 01 and %i5, 1, %i0
201c37c: 81 c7 e0 08 ret
201c380: 81 e8 00 00 restore
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
201c384: 12 bf ff e8 bne 201c324 <_POSIX_signals_Unblock_thread+0x84><== NEVER TAKEN
201c388: 03 00 80 7e sethi %hi(0x201f800), %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201c38c: 82 10 62 00 or %g1, 0x200, %g1 ! 201fa00 <_Per_CPU_Information>
201c390: c4 00 60 08 ld [ %g1 + 8 ], %g2
201c394: 80 a0 a0 00 cmp %g2, 0
201c398: 22 bf ff e4 be,a 201c328 <_POSIX_signals_Unblock_thread+0x88>
201c39c: b0 0f 60 01 and %i5, 1, %i0
201c3a0: c4 00 60 0c ld [ %g1 + 0xc ], %g2
201c3a4: 80 a6 00 02 cmp %i0, %g2
201c3a8: 22 bf ff df be,a 201c324 <_POSIX_signals_Unblock_thread+0x84><== ALWAYS TAKEN
201c3ac: c6 28 60 18 stb %g3, [ %g1 + 0x18 ]
201c3b0: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED
201c3b4: 81 c7 e0 08 ret <== NOT EXECUTED
201c3b8: 81 e8 00 00 restore <== NOT EXECUTED
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
201c3bc: 80 ab c0 01 andncc %o7, %g1, %g0
201c3c0: 12 bf ff e0 bne 201c340 <_POSIX_signals_Unblock_thread+0xa0>
201c3c4: ba 10 20 00 clr %i5
201c3c8: b0 0f 60 01 and %i5, 1, %i0
201c3cc: 81 c7 e0 08 ret
201c3d0: 81 e8 00 00 restore
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
201c3d4: 7f ff b8 88 call 200a5f4 <_Thread_queue_Extract_with_proxy>
201c3d8: 90 10 00 18 mov %i0, %o0
201c3dc: b0 0f 60 01 and %i5, 1, %i0
201c3e0: 81 c7 e0 08 ret
201c3e4: 81 e8 00 00 restore
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
201c3e8: 84 10 20 01 mov 1, %g2
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
201c3ec: f2 20 40 00 st %i1, [ %g1 ]
the_info->si_code = SI_USER;
201c3f0: c4 20 60 04 st %g2, [ %g1 + 4 ]
the_info->si_value.sival_int = 0;
201c3f4: 10 bf ff de b 201c36c <_POSIX_signals_Unblock_thread+0xcc>
201c3f8: c0 20 60 08 clr [ %g1 + 8 ]
0200f8ec <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200f8ec: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
200f8f0: 80 a6 60 00 cmp %i1, 0
200f8f4: 02 80 00 4c be 200fa24 <_RBTree_Extract_unprotected+0x138>
200f8f8: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
200f8fc: c2 06 20 08 ld [ %i0 + 8 ], %g1
200f900: 80 a0 40 19 cmp %g1, %i1
200f904: 22 80 00 59 be,a 200fa68 <_RBTree_Extract_unprotected+0x17c>
200f908: c2 06 60 08 ld [ %i1 + 8 ], %g1
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
200f90c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200f910: 80 a0 40 19 cmp %g1, %i1
200f914: 22 80 00 46 be,a 200fa2c <_RBTree_Extract_unprotected+0x140>
200f918: c2 06 60 04 ld [ %i1 + 4 ], %g1
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200f91c: fa 06 60 04 ld [ %i1 + 4 ], %i5
200f920: 80 a7 60 00 cmp %i5, 0
200f924: 22 80 00 4a be,a 200fa4c <_RBTree_Extract_unprotected+0x160>
200f928: f8 06 60 08 ld [ %i1 + 8 ], %i4
200f92c: c2 06 60 08 ld [ %i1 + 8 ], %g1
200f930: 80 a0 60 00 cmp %g1, 0
200f934: 32 80 00 05 bne,a 200f948 <_RBTree_Extract_unprotected+0x5c>
200f938: c2 07 60 08 ld [ %i5 + 8 ], %g1
200f93c: 10 80 00 50 b 200fa7c <_RBTree_Extract_unprotected+0x190>
200f940: b8 10 00 1d mov %i5, %i4
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
200f944: c2 07 60 08 ld [ %i5 + 8 ], %g1
200f948: 80 a0 60 00 cmp %g1, 0
200f94c: 32 bf ff fe bne,a 200f944 <_RBTree_Extract_unprotected+0x58>
200f950: ba 10 00 01 mov %g1, %i5
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
200f954: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
200f958: 80 a7 20 00 cmp %i4, 0
200f95c: 02 80 00 54 be 200faac <_RBTree_Extract_unprotected+0x1c0>
200f960: 01 00 00 00 nop
leaf->parent = target->parent;
200f964: c2 07 40 00 ld [ %i5 ], %g1
200f968: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200f96c: c4 07 40 00 ld [ %i5 ], %g2
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200f970: c2 06 40 00 ld [ %i1 ], %g1
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200f974: c8 00 a0 04 ld [ %g2 + 4 ], %g4
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
200f978: c6 07 60 0c ld [ %i5 + 0xc ], %g3
dir = target != target->parent->child[0];
200f97c: 88 19 00 1d xor %g4, %i5, %g4
200f980: 80 a0 00 04 cmp %g0, %g4
200f984: 88 40 20 00 addx %g0, 0, %g4
target->parent->child[dir] = leaf;
200f988: 89 29 20 02 sll %g4, 2, %g4
200f98c: 84 00 80 04 add %g2, %g4, %g2
200f990: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200f994: c4 00 60 04 ld [ %g1 + 4 ], %g2
200f998: 84 18 80 19 xor %g2, %i1, %g2
200f99c: 80 a0 00 02 cmp %g0, %g2
200f9a0: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = target;
200f9a4: 85 28 a0 02 sll %g2, 2, %g2
200f9a8: 82 00 40 02 add %g1, %g2, %g1
200f9ac: fa 20 60 04 st %i5, [ %g1 + 4 ]
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
200f9b0: c2 06 60 08 ld [ %i1 + 8 ], %g1
200f9b4: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
200f9b8: c2 06 60 08 ld [ %i1 + 8 ], %g1
200f9bc: 80 a0 60 00 cmp %g1, 0
200f9c0: 32 80 00 02 bne,a 200f9c8 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN
200f9c4: fa 20 40 00 st %i5, [ %g1 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
200f9c8: c2 06 60 04 ld [ %i1 + 4 ], %g1
200f9cc: c2 27 60 04 st %g1, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
200f9d0: c2 06 60 04 ld [ %i1 + 4 ], %g1
200f9d4: 80 a0 60 00 cmp %g1, 0
200f9d8: 32 80 00 02 bne,a 200f9e0 <_RBTree_Extract_unprotected+0xf4>
200f9dc: fa 20 40 00 st %i5, [ %g1 ]
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200f9e0: c4 06 40 00 ld [ %i1 ], %g2
target->color = the_node->color;
200f9e4: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200f9e8: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
200f9ec: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
200f9f0: 80 a0 e0 00 cmp %g3, 0
200f9f4: 32 80 00 06 bne,a 200fa0c <_RBTree_Extract_unprotected+0x120>
200f9f8: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
200f9fc: 80 a7 20 00 cmp %i4, 0
200fa00: 32 80 00 02 bne,a 200fa08 <_RBTree_Extract_unprotected+0x11c>
200fa04: c0 27 20 0c clr [ %i4 + 0xc ]
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
200fa08: c2 06 20 04 ld [ %i0 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
200fa0c: c0 26 60 08 clr [ %i1 + 8 ]
200fa10: c0 26 60 04 clr [ %i1 + 4 ]
200fa14: 80 a0 60 00 cmp %g1, 0
200fa18: 02 80 00 03 be 200fa24 <_RBTree_Extract_unprotected+0x138>
200fa1c: c0 26 40 00 clr [ %i1 ]
200fa20: c0 20 60 0c clr [ %g1 + 0xc ]
200fa24: 81 c7 e0 08 ret
200fa28: 81 e8 00 00 restore
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
200fa2c: 80 a0 60 00 cmp %g1, 0
200fa30: 22 80 00 28 be,a 200fad0 <_RBTree_Extract_unprotected+0x1e4>
200fa34: c2 06 40 00 ld [ %i1 ], %g1
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200fa38: fa 06 60 04 ld [ %i1 + 4 ], %i5
200fa3c: 80 a7 60 00 cmp %i5, 0
200fa40: 12 bf ff bb bne 200f92c <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN
200fa44: c2 26 20 0c st %g1, [ %i0 + 0xc ]
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
200fa48: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
if( leaf ) {
200fa4c: 80 a7 20 00 cmp %i4, 0
200fa50: 32 80 00 0c bne,a 200fa80 <_RBTree_Extract_unprotected+0x194>
200fa54: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
200fa58: 7f ff fe e0 call 200f5d8 <_RBTree_Extract_validate_unprotected>
200fa5c: 90 10 00 19 mov %i1, %o0
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200fa60: 10 80 00 0a b 200fa88 <_RBTree_Extract_unprotected+0x19c>
200fa64: c2 06 40 00 ld [ %i1 ], %g1
if (!the_node) return;
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
200fa68: 80 a0 60 00 cmp %g1, 0
200fa6c: 22 80 00 14 be,a 200fabc <_RBTree_Extract_unprotected+0x1d0>
200fa70: c2 06 40 00 ld [ %i1 ], %g1
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
200fa74: 10 bf ff a6 b 200f90c <_RBTree_Extract_unprotected+0x20>
200fa78: c2 26 20 08 st %g1, [ %i0 + 8 ]
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
200fa7c: c2 06 40 00 ld [ %i1 ], %g1
200fa80: c2 27 00 00 st %g1, [ %i4 ]
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200fa84: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
200fa88: c6 06 60 0c ld [ %i1 + 0xc ], %g3
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200fa8c: c4 00 60 04 ld [ %g1 + 4 ], %g2
200fa90: 84 18 80 19 xor %g2, %i1, %g2
200fa94: 80 a0 00 02 cmp %g0, %g2
200fa98: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = leaf;
200fa9c: 85 28 a0 02 sll %g2, 2, %g2
200faa0: 82 00 40 02 add %g1, %g2, %g1
200faa4: 10 bf ff d3 b 200f9f0 <_RBTree_Extract_unprotected+0x104>
200faa8: f8 20 60 04 st %i4, [ %g1 + 4 ]
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
200faac: 7f ff fe cb call 200f5d8 <_RBTree_Extract_validate_unprotected>
200fab0: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
200fab4: 10 bf ff af b 200f970 <_RBTree_Extract_unprotected+0x84>
200fab8: c4 07 40 00 ld [ %i5 ], %g2
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200fabc: 80 a6 00 01 cmp %i0, %g1
200fac0: 12 bf ff 93 bne 200f90c <_RBTree_Extract_unprotected+0x20>
200fac4: c2 26 20 08 st %g1, [ %i0 + 8 ]
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
200fac8: 10 bf ff 91 b 200f90c <_RBTree_Extract_unprotected+0x20>
200facc: c0 26 20 08 clr [ %i0 + 8 ]
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200fad0: 80 a6 00 01 cmp %i0, %g1
200fad4: 12 bf ff 92 bne 200f91c <_RBTree_Extract_unprotected+0x30>
200fad8: c2 26 20 0c st %g1, [ %i0 + 0xc ]
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
200fadc: 10 bf ff 90 b 200f91c <_RBTree_Extract_unprotected+0x30>
200fae0: c0 26 20 0c clr [ %i0 + 0xc ]
0200f5d8 <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
200f5d8: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
200f5dc: c2 06 00 00 ld [ %i0 ], %g1
if(!parent->parent) return;
200f5e0: c4 00 40 00 ld [ %g1 ], %g2
200f5e4: 80 a0 a0 00 cmp %g2, 0
200f5e8: 02 80 00 bf be 200f8e4 <_RBTree_Extract_validate_unprotected+0x30c>
200f5ec: 01 00 00 00 nop
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
200f5f0: c4 00 60 04 ld [ %g1 + 4 ], %g2
200f5f4: 80 a6 00 02 cmp %i0, %g2
200f5f8: 22 80 00 02 be,a 200f600 <_RBTree_Extract_validate_unprotected+0x28>
200f5fc: c4 00 60 08 ld [ %g1 + 8 ], %g2
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
200f600: 98 10 20 01 mov 1, %o4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200f604: c6 06 20 0c ld [ %i0 + 0xc ], %g3
200f608: 80 a0 e0 01 cmp %g3, 1
200f60c: 22 80 00 58 be,a 200f76c <_RBTree_Extract_validate_unprotected+0x194>
200f610: c2 06 00 00 ld [ %i0 ], %g1
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
200f614: c6 00 40 00 ld [ %g1 ], %g3
200f618: 80 a0 e0 00 cmp %g3, 0
200f61c: 02 80 00 53 be 200f768 <_RBTree_Extract_validate_unprotected+0x190>
200f620: 80 a0 a0 00 cmp %g2, 0
200f624: 22 80 00 07 be,a 200f640 <_RBTree_Extract_validate_unprotected+0x68><== NEVER TAKEN
200f628: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED
200f62c: c8 00 a0 0c ld [ %g2 + 0xc ], %g4
200f630: 80 a1 20 01 cmp %g4, 1
200f634: 22 80 00 28 be,a 200f6d4 <_RBTree_Extract_validate_unprotected+0xfc>
200f638: de 00 60 04 ld [ %g1 + 4 ], %o7
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
200f63c: c6 00 a0 08 ld [ %g2 + 8 ], %g3
200f640: 80 a0 e0 00 cmp %g3, 0
200f644: 22 80 00 07 be,a 200f660 <_RBTree_Extract_validate_unprotected+0x88>
200f648: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200f64c: c6 00 e0 0c ld [ %g3 + 0xc ], %g3
200f650: 80 a0 e0 01 cmp %g3, 1
200f654: 22 80 00 4c be,a 200f784 <_RBTree_Extract_validate_unprotected+0x1ac>
200f658: c6 00 60 04 ld [ %g1 + 4 ], %g3
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
200f65c: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200f660: 80 a0 e0 00 cmp %g3, 0
200f664: 22 80 00 07 be,a 200f680 <_RBTree_Extract_validate_unprotected+0xa8>
200f668: d8 20 a0 0c st %o4, [ %g2 + 0xc ]
200f66c: c6 00 e0 0c ld [ %g3 + 0xc ], %g3
200f670: 80 a0 e0 01 cmp %g3, 1
200f674: 22 80 00 44 be,a 200f784 <_RBTree_Extract_validate_unprotected+0x1ac>
200f678: c6 00 60 04 ld [ %g1 + 4 ], %g3
sibling->color = RBT_RED;
200f67c: d8 20 a0 0c st %o4, [ %g2 + 0xc ]
200f680: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200f684: 80 a0 a0 01 cmp %g2, 1
200f688: 22 80 00 38 be,a 200f768 <_RBTree_Extract_validate_unprotected+0x190>
200f68c: c0 20 60 0c clr [ %g1 + 0xc ]
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
200f690: c6 00 40 00 ld [ %g1 ], %g3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200f694: 80 a0 e0 00 cmp %g3, 0
200f698: 02 80 00 0a be 200f6c0 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN
200f69c: 84 10 20 00 clr %g2
if(!(the_node->parent->parent)) return NULL;
200f6a0: c8 00 c0 00 ld [ %g3 ], %g4
200f6a4: 80 a1 20 00 cmp %g4, 0
200f6a8: 02 80 00 07 be 200f6c4 <_RBTree_Extract_validate_unprotected+0xec>
200f6ac: b0 10 00 01 mov %g1, %i0
if(the_node == the_node->parent->child[RBT_LEFT])
200f6b0: c4 00 e0 04 ld [ %g3 + 4 ], %g2
200f6b4: 80 a0 40 02 cmp %g1, %g2
200f6b8: 22 80 00 05 be,a 200f6cc <_RBTree_Extract_validate_unprotected+0xf4>
200f6bc: c4 00 e0 08 ld [ %g3 + 8 ], %g2
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
200f6c0: b0 10 00 01 mov %g1, %i0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200f6c4: 10 bf ff d0 b 200f604 <_RBTree_Extract_validate_unprotected+0x2c>
200f6c8: 82 10 00 03 mov %g3, %g1
200f6cc: 10 bf ff ce b 200f604 <_RBTree_Extract_validate_unprotected+0x2c>
200f6d0: 82 10 00 03 mov %g3, %g1
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
200f6d4: c8 20 60 0c st %g4, [ %g1 + 0xc ]
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
200f6d8: 9e 1b c0 18 xor %o7, %i0, %o7
200f6dc: 80 a0 00 0f cmp %g0, %o7
200f6e0: 9a 40 20 00 addx %g0, 0, %o5
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200f6e4: 88 21 00 0d sub %g4, %o5, %g4
200f6e8: 89 29 20 02 sll %g4, 2, %g4
200f6ec: 88 00 40 04 add %g1, %g4, %g4
200f6f0: de 01 20 04 ld [ %g4 + 4 ], %o7
200f6f4: 80 a3 e0 00 cmp %o7, 0
200f6f8: 02 80 00 16 be 200f750 <_RBTree_Extract_validate_unprotected+0x178><== NEVER TAKEN
200f6fc: c0 20 a0 0c clr [ %g2 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200f700: 85 2b 60 02 sll %o5, 2, %g2
200f704: 96 03 c0 02 add %o7, %g2, %o3
200f708: d4 02 e0 04 ld [ %o3 + 4 ], %o2
200f70c: d4 21 20 04 st %o2, [ %g4 + 4 ]
if (c->child[dir])
200f710: c8 02 e0 04 ld [ %o3 + 4 ], %g4
200f714: 80 a1 20 00 cmp %g4, 0
200f718: 02 80 00 04 be 200f728 <_RBTree_Extract_validate_unprotected+0x150><== NEVER TAKEN
200f71c: 84 03 c0 02 add %o7, %g2, %g2
c->child[dir]->parent = the_node;
200f720: c2 21 00 00 st %g1, [ %g4 ]
200f724: c6 00 40 00 ld [ %g1 ], %g3
c->child[dir] = the_node;
200f728: c2 20 a0 04 st %g1, [ %g2 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f72c: c4 00 e0 04 ld [ %g3 + 4 ], %g2
c->parent = the_node->parent;
200f730: c6 23 c0 00 st %g3, [ %o7 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f734: 84 18 40 02 xor %g1, %g2, %g2
c->parent = the_node->parent;
the_node->parent = c;
200f738: de 20 40 00 st %o7, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f73c: 80 a0 00 02 cmp %g0, %g2
200f740: 84 40 20 00 addx %g0, 0, %g2
200f744: 85 28 a0 02 sll %g2, 2, %g2
200f748: 86 00 c0 02 add %g3, %g2, %g3
200f74c: de 20 e0 04 st %o7, [ %g3 + 4 ]
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
200f750: 80 a0 00 0d cmp %g0, %o5
200f754: 84 60 3f ff subx %g0, -1, %g2
200f758: 85 28 a0 02 sll %g2, 2, %g2
200f75c: 84 00 40 02 add %g1, %g2, %g2
200f760: 10 bf ff b7 b 200f63c <_RBTree_Extract_validate_unprotected+0x64>
200f764: c4 00 a0 04 ld [ %g2 + 4 ], %g2
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200f768: c2 06 00 00 ld [ %i0 ], %g1
200f76c: c2 00 40 00 ld [ %g1 ], %g1
200f770: 80 a0 60 00 cmp %g1, 0
200f774: 22 80 00 02 be,a 200f77c <_RBTree_Extract_validate_unprotected+0x1a4>
200f778: c0 26 20 0c clr [ %i0 + 0xc ]
200f77c: 81 c7 e0 08 ret
200f780: 81 e8 00 00 restore
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
200f784: 86 18 c0 18 xor %g3, %i0, %g3
200f788: 80 a0 00 03 cmp %g0, %g3
200f78c: 86 40 20 00 addx %g0, 0, %g3
if (!_RBTree_Is_red(sibling->child[!dir])) {
200f790: 80 a0 00 03 cmp %g0, %g3
200f794: 9e 60 3f ff subx %g0, -1, %o7
200f798: 9f 2b e0 02 sll %o7, 2, %o7
200f79c: 88 00 80 0f add %g2, %o7, %g4
200f7a0: c8 01 20 04 ld [ %g4 + 4 ], %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200f7a4: 80 a1 20 00 cmp %g4, 0
200f7a8: 22 80 00 07 be,a 200f7c4 <_RBTree_Extract_validate_unprotected+0x1ec>
200f7ac: 89 28 e0 02 sll %g3, 2, %g4
200f7b0: da 01 20 0c ld [ %g4 + 0xc ], %o5
200f7b4: 80 a3 60 01 cmp %o5, 1
200f7b8: 22 80 00 28 be,a 200f858 <_RBTree_Extract_validate_unprotected+0x280>
200f7bc: de 00 60 0c ld [ %g1 + 0xc ], %o7
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
200f7c0: 89 28 e0 02 sll %g3, 2, %g4
200f7c4: 88 00 80 04 add %g2, %g4, %g4
200f7c8: d6 01 20 04 ld [ %g4 + 4 ], %o3
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
200f7cc: 88 10 20 01 mov 1, %g4
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
200f7d0: 98 18 e0 01 xor %g3, 1, %o4
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
200f7d4: c8 20 a0 0c st %g4, [ %g2 + 0xc ]
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200f7d8: 9a 21 00 0c sub %g4, %o4, %o5
200f7dc: 9b 2b 60 02 sll %o5, 2, %o5
200f7e0: 9a 00 80 0d add %g2, %o5, %o5
200f7e4: c8 03 60 04 ld [ %o5 + 4 ], %g4
200f7e8: 80 a1 20 00 cmp %g4, 0
200f7ec: 02 80 00 16 be 200f844 <_RBTree_Extract_validate_unprotected+0x26c><== NEVER TAKEN
200f7f0: c0 22 e0 0c clr [ %o3 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200f7f4: 99 2b 20 02 sll %o4, 2, %o4
200f7f8: 96 01 00 0c add %g4, %o4, %o3
200f7fc: d4 02 e0 04 ld [ %o3 + 4 ], %o2
200f800: d4 23 60 04 st %o2, [ %o5 + 4 ]
if (c->child[dir])
200f804: da 02 e0 04 ld [ %o3 + 4 ], %o5
200f808: 80 a3 60 00 cmp %o5, 0
200f80c: 32 80 00 02 bne,a 200f814 <_RBTree_Extract_validate_unprotected+0x23c>
200f810: c4 23 40 00 st %g2, [ %o5 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f814: da 00 80 00 ld [ %g2 ], %o5
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200f818: 98 01 00 0c add %g4, %o4, %o4
200f81c: c4 23 20 04 st %g2, [ %o4 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f820: d8 03 60 04 ld [ %o5 + 4 ], %o4
c->parent = the_node->parent;
200f824: da 21 00 00 st %o5, [ %g4 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f828: 98 18 80 0c xor %g2, %o4, %o4
c->parent = the_node->parent;
the_node->parent = c;
200f82c: c8 20 80 00 st %g4, [ %g2 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f830: 80 a0 00 0c cmp %g0, %o4
200f834: 84 40 20 00 addx %g0, 0, %g2
200f838: 85 28 a0 02 sll %g2, 2, %g2
200f83c: 9a 03 40 02 add %o5, %g2, %o5
200f840: c8 23 60 04 st %g4, [ %o5 + 4 ]
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
200f844: 84 00 40 0f add %g1, %o7, %g2
200f848: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200f84c: 9e 00 80 0f add %g2, %o7, %o7
200f850: c8 03 e0 04 ld [ %o7 + 4 ], %g4
}
sibling->color = parent->color;
200f854: de 00 60 0c ld [ %g1 + 0xc ], %o7
200f858: de 20 a0 0c st %o7, [ %g2 + 0xc ]
parent->color = RBT_BLACK;
200f85c: c0 20 60 0c clr [ %g1 + 0xc ]
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200f860: 9e 10 20 01 mov 1, %o7
200f864: 9e 23 c0 03 sub %o7, %g3, %o7
200f868: 9f 2b e0 02 sll %o7, 2, %o7
200f86c: 9e 00 40 0f add %g1, %o7, %o7
200f870: c4 03 e0 04 ld [ %o7 + 4 ], %g2
200f874: 80 a0 a0 00 cmp %g2, 0
200f878: 02 bf ff bc be 200f768 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN
200f87c: c0 21 20 0c clr [ %g4 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200f880: 87 28 e0 02 sll %g3, 2, %g3
200f884: 88 00 80 03 add %g2, %g3, %g4
200f888: da 01 20 04 ld [ %g4 + 4 ], %o5
200f88c: da 23 e0 04 st %o5, [ %o7 + 4 ]
if (c->child[dir])
200f890: c8 01 20 04 ld [ %g4 + 4 ], %g4
200f894: 80 a1 20 00 cmp %g4, 0
200f898: 32 80 00 02 bne,a 200f8a0 <_RBTree_Extract_validate_unprotected+0x2c8>
200f89c: c2 21 00 00 st %g1, [ %g4 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f8a0: c8 00 40 00 ld [ %g1 ], %g4
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200f8a4: 86 00 80 03 add %g2, %g3, %g3
200f8a8: c2 20 e0 04 st %g1, [ %g3 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f8ac: c6 01 20 04 ld [ %g4 + 4 ], %g3
c->parent = the_node->parent;
200f8b0: c8 20 80 00 st %g4, [ %g2 ]
the_node->parent = c;
200f8b4: c4 20 40 00 st %g2, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200f8b8: 86 18 40 03 xor %g1, %g3, %g3
200f8bc: 80 a0 00 03 cmp %g0, %g3
200f8c0: 82 40 20 00 addx %g0, 0, %g1
200f8c4: 83 28 60 02 sll %g1, 2, %g1
200f8c8: 88 01 00 01 add %g4, %g1, %g4
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200f8cc: c2 06 00 00 ld [ %i0 ], %g1
200f8d0: c4 21 20 04 st %g2, [ %g4 + 4 ]
200f8d4: c2 00 40 00 ld [ %g1 ], %g1
200f8d8: 80 a0 60 00 cmp %g1, 0
200f8dc: 22 bf ff a8 be,a 200f77c <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
200f8e0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
200f8e4: 81 c7 e0 08 ret
200f8e8: 81 e8 00 00 restore
0200acd0 <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
200acd0: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
200acd4: 7f ff e3 e7 call 2003c70 <sparc_disable_interrupts>
200acd8: b8 10 00 18 mov %i0, %i4
200acdc: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
200ace0: f6 06 20 04 ld [ %i0 + 4 ], %i3
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
200ace4: 80 a6 e0 00 cmp %i3, 0
200ace8: 02 80 00 15 be 200ad3c <_RBTree_Find+0x6c> <== NEVER TAKEN
200acec: b0 10 20 00 clr %i0
compare_result = the_rbtree->compare_function(the_node, iter_node);
200acf0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
200acf4: 92 10 00 1b mov %i3, %o1
200acf8: 9f c0 40 00 call %g1
200acfc: 90 10 00 19 mov %i1, %o0
if (compare_result == 0) {
200ad00: 80 a2 20 00 cmp %o0, 0
200ad04: 12 80 00 06 bne 200ad1c <_RBTree_Find+0x4c>
200ad08: 82 1a 20 01 xor %o0, 1, %g1
found = iter_node;
if ( the_rbtree->is_unique )
200ad0c: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2
200ad10: 80 a0 a0 00 cmp %g2, 0
200ad14: 12 80 00 0e bne 200ad4c <_RBTree_Find+0x7c>
200ad18: b0 10 00 1b mov %i3, %i0
break;
}
RBTree_Direction dir = (compare_result == 1);
200ad1c: 80 a0 00 01 cmp %g0, %g1
200ad20: 82 60 3f ff subx %g0, -1, %g1
iter_node = iter_node->child[dir];
200ad24: 83 28 60 02 sll %g1, 2, %g1
200ad28: b6 06 c0 01 add %i3, %g1, %i3
200ad2c: f6 06 e0 04 ld [ %i3 + 4 ], %i3
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
200ad30: 80 a6 e0 00 cmp %i3, 0
200ad34: 32 bf ff f0 bne,a 200acf4 <_RBTree_Find+0x24>
200ad38: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
200ad3c: 7f ff e3 d1 call 2003c80 <sparc_enable_interrupts>
200ad40: 90 10 00 1d mov %i5, %o0
return return_node;
}
200ad44: 81 c7 e0 08 ret
200ad48: 81 e8 00 00 restore
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
200ad4c: 7f ff e3 cd call 2003c80 <sparc_enable_interrupts>
200ad50: 90 10 00 1d mov %i5, %o0
return return_node;
}
200ad54: 81 c7 e0 08 ret
200ad58: 81 e8 00 00 restore
0200b048 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
200b048: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
200b04c: 80 a6 20 00 cmp %i0, 0
200b050: 02 80 00 0f be 200b08c <_RBTree_Initialize+0x44> <== NEVER TAKEN
200b054: 80 a6 e0 00 cmp %i3, 0
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
200b058: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
200b05c: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
200b060: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
200b064: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
200b068: f2 26 20 10 st %i1, [ %i0 + 0x10 ]
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200b06c: 02 80 00 08 be 200b08c <_RBTree_Initialize+0x44> <== NEVER TAKEN
200b070: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert(the_rbtree, next);
200b074: 92 10 00 1a mov %i2, %o1
200b078: 7f ff ff ef call 200b034 <_RBTree_Insert>
200b07c: 90 10 00 18 mov %i0, %o0
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200b080: b6 86 ff ff addcc %i3, -1, %i3
200b084: 12 bf ff fc bne 200b074 <_RBTree_Initialize+0x2c>
200b088: b4 06 80 1c add %i2, %i4, %i2
200b08c: 81 c7 e0 08 ret
200b090: 81 e8 00 00 restore
0200fb0c <_RBTree_Validate_insert_unprotected>:
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
200fb0c: 9d e3 bf a0 save %sp, -96, %sp
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
200fb10: c2 06 00 00 ld [ %i0 ], %g1
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200fb14: 96 10 20 01 mov 1, %o3
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200fb18: c4 00 40 00 ld [ %g1 ], %g2
200fb1c: 86 90 a0 00 orcc %g2, 0, %g3
200fb20: 22 80 00 06 be,a 200fb38 <_RBTree_Validate_insert_unprotected+0x2c>
200fb24: c0 26 20 0c clr [ %i0 + 0xc ]
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200fb28: c8 00 60 0c ld [ %g1 + 0xc ], %g4
200fb2c: 80 a1 20 01 cmp %g4, 1
200fb30: 22 80 00 04 be,a 200fb40 <_RBTree_Validate_insert_unprotected+0x34>
200fb34: d8 00 80 00 ld [ %g2 ], %o4
200fb38: 81 c7 e0 08 ret
200fb3c: 81 e8 00 00 restore
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
200fb40: 80 a3 20 00 cmp %o4, 0
200fb44: 02 80 00 0c be 200fb74 <_RBTree_Validate_insert_unprotected+0x68><== NEVER TAKEN
200fb48: de 00 a0 04 ld [ %g2 + 4 ], %o7
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
200fb4c: 80 a3 c0 01 cmp %o7, %g1
200fb50: 02 80 00 5a be 200fcb8 <_RBTree_Validate_insert_unprotected+0x1ac>
200fb54: 88 10 00 0f mov %o7, %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200fb58: 80 a1 20 00 cmp %g4, 0
200fb5c: 22 80 00 07 be,a 200fb78 <_RBTree_Validate_insert_unprotected+0x6c>
200fb60: c8 00 60 04 ld [ %g1 + 4 ], %g4
200fb64: da 01 20 0c ld [ %g4 + 0xc ], %o5
200fb68: 80 a3 60 01 cmp %o5, 1
200fb6c: 22 80 00 4c be,a 200fc9c <_RBTree_Validate_insert_unprotected+0x190>
200fb70: c0 20 60 0c clr [ %g1 + 0xc ]
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200fb74: c8 00 60 04 ld [ %g1 + 4 ], %g4
RBTree_Direction pdir = the_node->parent != g->child[0];
200fb78: 9e 1b c0 01 xor %o7, %g1, %o7
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200fb7c: 88 19 00 18 xor %g4, %i0, %g4
200fb80: 80 a0 00 04 cmp %g0, %g4
200fb84: 9a 40 20 00 addx %g0, 0, %o5
RBTree_Direction pdir = the_node->parent != g->child[0];
200fb88: 80 a0 00 0f cmp %g0, %o7
200fb8c: 88 40 20 00 addx %g0, 0, %g4
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200fb90: 80 a3 40 04 cmp %o5, %g4
200fb94: 02 80 00 47 be 200fcb0 <_RBTree_Validate_insert_unprotected+0x1a4>
200fb98: 98 22 c0 0d sub %o3, %o5, %o4
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200fb9c: 98 22 c0 04 sub %o3, %g4, %o4
200fba0: 9b 2b 20 02 sll %o4, 2, %o5
200fba4: 9a 00 40 0d add %g1, %o5, %o5
200fba8: de 03 60 04 ld [ %o5 + 4 ], %o7
200fbac: 80 a3 e0 00 cmp %o7, 0
200fbb0: 02 80 00 16 be 200fc08 <_RBTree_Validate_insert_unprotected+0xfc><== NEVER TAKEN
200fbb4: 89 29 20 02 sll %g4, 2, %g4
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200fbb8: 94 03 c0 04 add %o7, %g4, %o2
200fbbc: d2 02 a0 04 ld [ %o2 + 4 ], %o1
200fbc0: d2 23 60 04 st %o1, [ %o5 + 4 ]
if (c->child[dir])
200fbc4: da 02 a0 04 ld [ %o2 + 4 ], %o5
200fbc8: 80 a3 60 00 cmp %o5, 0
200fbcc: 22 80 00 05 be,a 200fbe0 <_RBTree_Validate_insert_unprotected+0xd4>
200fbd0: 9a 03 c0 04 add %o7, %g4, %o5
c->child[dir]->parent = the_node;
200fbd4: c2 23 40 00 st %g1, [ %o5 ]
200fbd8: c4 00 40 00 ld [ %g1 ], %g2
c->child[dir] = the_node;
200fbdc: 9a 03 c0 04 add %o7, %g4, %o5
200fbe0: c2 23 60 04 st %g1, [ %o5 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200fbe4: da 00 a0 04 ld [ %g2 + 4 ], %o5
c->parent = the_node->parent;
200fbe8: c4 23 c0 00 st %g2, [ %o7 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200fbec: 9a 1b 40 01 xor %o5, %g1, %o5
c->parent = the_node->parent;
the_node->parent = c;
200fbf0: de 20 40 00 st %o7, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200fbf4: 80 a0 00 0d cmp %g0, %o5
200fbf8: 82 40 20 00 addx %g0, 0, %g1
200fbfc: 83 28 60 02 sll %g1, 2, %g1
200fc00: 84 00 80 01 add %g2, %g1, %g2
200fc04: de 20 a0 04 st %o7, [ %g2 + 4 ]
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
200fc08: b0 06 00 04 add %i0, %g4, %i0
200fc0c: f0 06 20 04 ld [ %i0 + 4 ], %i0
200fc10: c2 06 00 00 ld [ %i0 ], %g1
}
the_node->parent->color = RBT_BLACK;
200fc14: c0 20 60 0c clr [ %g1 + 0xc ]
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
200fc18: 88 00 c0 04 add %g3, %g4, %g4
200fc1c: c4 01 20 04 ld [ %g4 + 4 ], %g2
200fc20: 80 a0 a0 00 cmp %g2, 0
200fc24: 02 bf ff bd be 200fb18 <_RBTree_Validate_insert_unprotected+0xc><== NEVER TAKEN
200fc28: d6 20 e0 0c st %o3, [ %g3 + 0xc ]
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
200fc2c: 99 2b 20 02 sll %o4, 2, %o4
200fc30: 82 00 80 0c add %g2, %o4, %g1
200fc34: de 00 60 04 ld [ %g1 + 4 ], %o7
200fc38: de 21 20 04 st %o7, [ %g4 + 4 ]
if (c->child[dir])
200fc3c: c2 00 60 04 ld [ %g1 + 4 ], %g1
200fc40: 80 a0 60 00 cmp %g1, 0
200fc44: 32 80 00 02 bne,a 200fc4c <_RBTree_Validate_insert_unprotected+0x140>
200fc48: c6 20 40 00 st %g3, [ %g1 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200fc4c: c8 00 c0 00 ld [ %g3 ], %g4
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200fc50: 98 00 80 0c add %g2, %o4, %o4
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
200fc54: c8 20 80 00 st %g4, [ %g2 ]
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200fc58: c6 23 20 04 st %g3, [ %o4 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200fc5c: de 01 20 04 ld [ %g4 + 4 ], %o7
c->parent = the_node->parent;
the_node->parent = c;
200fc60: c4 20 c0 00 st %g2, [ %g3 ]
200fc64: c2 06 00 00 ld [ %i0 ], %g1
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200fc68: 86 1b c0 03 xor %o7, %g3, %g3
200fc6c: 80 a0 00 03 cmp %g0, %g3
200fc70: 86 40 20 00 addx %g0, 0, %g3
200fc74: 87 28 e0 02 sll %g3, 2, %g3
200fc78: 88 01 00 03 add %g4, %g3, %g4
200fc7c: c4 21 20 04 st %g2, [ %g4 + 4 ]
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200fc80: c4 00 40 00 ld [ %g1 ], %g2
200fc84: 86 90 a0 00 orcc %g2, 0, %g3
200fc88: 32 bf ff a9 bne,a 200fb2c <_RBTree_Validate_insert_unprotected+0x20><== ALWAYS TAKEN
200fc8c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200fc90: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
200fc94: 81 c7 e0 08 ret <== NOT EXECUTED
200fc98: 81 e8 00 00 restore <== NOT EXECUTED
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
200fc9c: c0 21 20 0c clr [ %g4 + 0xc ]
g->color = RBT_RED;
200fca0: da 20 a0 0c st %o5, [ %g2 + 0xc ]
200fca4: 82 10 00 0c mov %o4, %g1
200fca8: 10 bf ff 9c b 200fb18 <_RBTree_Validate_insert_unprotected+0xc>
200fcac: b0 10 00 02 mov %g2, %i0
200fcb0: 10 bf ff d9 b 200fc14 <_RBTree_Validate_insert_unprotected+0x108>
200fcb4: 89 2b 60 02 sll %o5, 2, %g4
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
200fcb8: 10 bf ff a8 b 200fb58 <_RBTree_Validate_insert_unprotected+0x4c>
200fcbc: c8 00 a0 08 ld [ %g2 + 8 ], %g4
02007698 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2007698: 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;
200769c: 03 00 80 79 sethi %hi(0x201e400), %g1
20076a0: 82 10 63 a8 or %g1, 0x3a8, %g1 ! 201e7a8 <Configuration_RTEMS_API>
20076a4: fa 00 60 2c ld [ %g1 + 0x2c ], %i5
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
20076a8: 80 a7 60 00 cmp %i5, 0
20076ac: 02 80 00 18 be 200770c <_RTEMS_tasks_Initialize_user_tasks_body+0x74>
20076b0: f6 00 60 28 ld [ %g1 + 0x28 ], %i3
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
20076b4: 80 a6 e0 00 cmp %i3, 0
20076b8: 02 80 00 15 be 200770c <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN
20076bc: b8 10 20 00 clr %i4
return_value = rtems_task_create(
20076c0: d4 07 60 04 ld [ %i5 + 4 ], %o2
20076c4: d0 07 40 00 ld [ %i5 ], %o0
20076c8: d2 07 60 08 ld [ %i5 + 8 ], %o1
20076cc: d6 07 60 14 ld [ %i5 + 0x14 ], %o3
20076d0: d8 07 60 0c ld [ %i5 + 0xc ], %o4
20076d4: 7f ff ff 70 call 2007494 <rtems_task_create>
20076d8: 9a 07 bf fc add %fp, -4, %o5
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
20076dc: 94 92 20 00 orcc %o0, 0, %o2
20076e0: 12 80 00 0d bne 2007714 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
20076e4: d0 07 bf fc ld [ %fp + -4 ], %o0
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
20076e8: d4 07 60 18 ld [ %i5 + 0x18 ], %o2
20076ec: 40 00 00 0e call 2007724 <rtems_task_start>
20076f0: d2 07 60 10 ld [ %i5 + 0x10 ], %o1
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
20076f4: 94 92 20 00 orcc %o0, 0, %o2
20076f8: 12 80 00 07 bne 2007714 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
20076fc: b8 07 20 01 inc %i4
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
2007700: 80 a7 00 1b cmp %i4, %i3
2007704: 12 bf ff ef bne 20076c0 <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN
2007708: ba 07 60 1c add %i5, 0x1c, %i5
200770c: 81 c7 e0 08 ret
2007710: 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 );
2007714: 90 10 20 01 mov 1, %o0
2007718: 40 00 04 3d call 200880c <_Internal_error_Occurred>
200771c: 92 10 20 01 mov 1, %o1
0200e0f8 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
200e0f8: c2 02 21 64 ld [ %o0 + 0x164 ], %g1
while (tvp) {
200e0fc: 80 a0 60 00 cmp %g1, 0
200e100: 22 80 00 0c be,a 200e130 <_RTEMS_tasks_Switch_extension+0x38>
200e104: c2 02 61 64 ld [ %o1 + 0x164 ], %g1
tvp->tval = *tvp->ptr;
200e108: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->gval;
200e10c: c6 00 60 08 ld [ %g1 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
200e110: c8 00 80 00 ld [ %g2 ], %g4
200e114: c8 20 60 0c st %g4, [ %g1 + 0xc ]
*tvp->ptr = tvp->gval;
200e118: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200e11c: c2 00 40 00 ld [ %g1 ], %g1
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
200e120: 80 a0 60 00 cmp %g1, 0
200e124: 32 bf ff fa bne,a 200e10c <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN
200e128: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
200e12c: c2 02 61 64 ld [ %o1 + 0x164 ], %g1
while (tvp) {
200e130: 80 a0 60 00 cmp %g1, 0
200e134: 02 80 00 0b be 200e160 <_RTEMS_tasks_Switch_extension+0x68>
200e138: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
200e13c: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->tval;
200e140: 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;
200e144: c8 00 80 00 ld [ %g2 ], %g4
200e148: c8 20 60 08 st %g4, [ %g1 + 8 ]
*tvp->ptr = tvp->tval;
200e14c: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200e150: c2 00 40 00 ld [ %g1 ], %g1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
200e154: 80 a0 60 00 cmp %g1, 0
200e158: 32 bf ff fa bne,a 200e140 <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN
200e15c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
200e160: 81 c3 e0 08 retl
02007d6c <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
2007d6c: 9d e3 bf 98 save %sp, -104, %sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2007d70: fa 06 20 40 ld [ %i0 + 0x40 ], %i5
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2007d74: 40 00 07 43 call 2009a80 <_TOD_Get_uptime>
2007d78: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2007d7c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4
_Timestamp_Subtract(
2007d80: c4 1f bf f8 ldd [ %fp + -8 ], %g2
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2007d84: 03 00 80 86 sethi %hi(0x2021800), %g1
2007d88: 82 10 62 80 or %g1, 0x280, %g1 ! 2021a80 <_Per_CPU_Information>
2007d8c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
2007d90: 9a a0 c0 0d subcc %g3, %o5, %o5
2007d94: 98 60 80 0c subx %g2, %o4, %o4
2007d98: d8 3e 40 00 std %o4, [ %i1 ]
2007d9c: 80 a1 00 1d cmp %g4, %i5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
2007da0: d8 1f 60 80 ldd [ %i5 + 0x80 ], %o4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2007da4: 02 80 00 05 be 2007db8 <_Rate_monotonic_Get_status+0x4c>
2007da8: b2 10 20 01 mov 1, %i1
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
2007dac: b0 0e 60 01 and %i1, 1, %i0
2007db0: 81 c7 e0 08 ret
2007db4: 81 e8 00 00 restore
2007db8: d4 18 60 20 ldd [ %g1 + 0x20 ], %o2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007dbc: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0
2007dc0: 86 a0 c0 0b subcc %g3, %o3, %g3
2007dc4: 84 60 80 0a subx %g2, %o2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2007dc8: 86 83 40 03 addcc %o5, %g3, %g3
2007dcc: 84 43 00 02 addx %o4, %g2, %g2
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2007dd0: 80 a6 00 02 cmp %i0, %g2
2007dd4: 34 bf ff f6 bg,a 2007dac <_Rate_monotonic_Get_status+0x40><== NEVER TAKEN
2007dd8: b2 10 20 00 clr %i1 <== NOT EXECUTED
2007ddc: 02 80 00 09 be 2007e00 <_Rate_monotonic_Get_status+0x94> <== ALWAYS TAKEN
2007de0: 80 a6 40 03 cmp %i1, %g3
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2007de4: 86 a0 c0 19 subcc %g3, %i1, %g3 <== NOT EXECUTED
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
2007de8: b2 10 20 01 mov 1, %i1
2007dec: 84 60 80 18 subx %g2, %i0, %g2
}
2007df0: b0 0e 60 01 and %i1, 1, %i0
2007df4: c4 3e 80 00 std %g2, [ %i2 ]
2007df8: 81 c7 e0 08 ret
2007dfc: 81 e8 00 00 restore
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2007e00: 28 bf ff fa bleu,a 2007de8 <_Rate_monotonic_Get_status+0x7c>
2007e04: 86 a0 c0 19 subcc %g3, %i1, %g3
return false;
2007e08: 10 bf ff e9 b 2007dac <_Rate_monotonic_Get_status+0x40>
2007e0c: b2 10 20 00 clr %i1
02008560 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2008560: 9d e3 bf 98 save %sp, -104, %sp
2008564: 11 00 80 84 sethi %hi(0x2021000), %o0
2008568: 92 10 00 18 mov %i0, %o1
200856c: 90 12 23 d4 or %o0, 0x3d4, %o0
2008570: 40 00 08 6c call 200a720 <_Objects_Get>
2008574: 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 ) {
2008578: c2 07 bf fc ld [ %fp + -4 ], %g1
200857c: 80 a0 60 00 cmp %g1, 0
2008580: 12 80 00 17 bne 20085dc <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN
2008584: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2008588: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
200858c: 03 00 00 10 sethi %hi(0x4000), %g1
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
2008590: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2008594: 80 88 80 01 btst %g2, %g1
2008598: 22 80 00 08 be,a 20085b8 <_Rate_monotonic_Timeout+0x58>
200859c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
20085a0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
20085a4: c2 07 60 08 ld [ %i5 + 8 ], %g1
20085a8: 80 a0 80 01 cmp %g2, %g1
20085ac: 02 80 00 1a be 2008614 <_Rate_monotonic_Timeout+0xb4>
20085b0: 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 ) {
20085b4: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
20085b8: 80 a0 60 01 cmp %g1, 1
20085bc: 02 80 00 0a be 20085e4 <_Rate_monotonic_Timeout+0x84>
20085c0: 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;
20085c4: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
20085c8: 03 00 80 85 sethi %hi(0x2021400), %g1
20085cc: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2021540 <_Thread_Dispatch_disable_level>
20085d0: 84 00 bf ff add %g2, -1, %g2
20085d4: c4 20 61 40 st %g2, [ %g1 + 0x140 ]
return _Thread_Dispatch_disable_level;
20085d8: c2 00 61 40 ld [ %g1 + 0x140 ], %g1
20085dc: 81 c7 e0 08 ret
20085e0: 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;
20085e4: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
20085e8: 90 10 00 1d mov %i5, %o0
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
20085ec: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
20085f0: 7f ff fe 08 call 2007e10 <_Rate_monotonic_Initiate_statistics>
20085f4: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20085f8: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20085fc: 11 00 80 85 sethi %hi(0x2021400), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2008600: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2008604: 90 12 22 00 or %o0, 0x200, %o0
2008608: 40 00 10 28 call 200c6a8 <_Watchdog_Insert>
200860c: 92 07 60 10 add %i5, 0x10, %o1
2008610: 30 bf ff ee b,a 20085c8 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2008614: 40 00 0b 5f call 200b390 <_Thread_Clear_state>
2008618: 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 );
200861c: 10 bf ff f5 b 20085f0 <_Rate_monotonic_Timeout+0x90>
2008620: 90 10 00 1d mov %i5, %o0
02007e94 <_Rate_monotonic_Update_statistics>:
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
2007e94: 9d e3 bf 98 save %sp, -104, %sp
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2007e98: c4 06 20 58 ld [ %i0 + 0x58 ], %g2
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2007e9c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2007ea0: 84 00 a0 01 inc %g2
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2007ea4: 80 a0 60 04 cmp %g1, 4
2007ea8: 02 80 00 4b be 2007fd4 <_Rate_monotonic_Update_statistics+0x140>
2007eac: c4 26 20 58 st %g2, [ %i0 + 0x58 ]
)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2007eb0: f6 06 20 40 ld [ %i0 + 0x40 ], %i3
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2007eb4: 40 00 06 f3 call 2009a80 <_TOD_Get_uptime>
2007eb8: 90 07 bf f8 add %fp, -8, %o0
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2007ebc: 03 00 80 86 sethi %hi(0x2021800), %g1
2007ec0: 82 10 62 80 or %g1, 0x280, %g1 ! 2021a80 <_Per_CPU_Information>
2007ec4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007ec8: d0 1e 20 50 ldd [ %i0 + 0x50 ], %o0
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
2007ecc: d4 1f bf f8 ldd [ %fp + -8 ], %o2
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2007ed0: 80 a6 c0 02 cmp %i3, %g2
2007ed4: 02 80 00 4e be 200800c <_Rate_monotonic_Update_statistics+0x178><== ALWAYS TAKEN
2007ed8: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4
2007edc: c4 1e 20 70 ldd [ %i0 + 0x70 ], %g2
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2007ee0: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2007ee4: 86 80 c0 1d addcc %g3, %i5, %g3
2007ee8: 84 40 80 1c addx %g2, %i4, %g2
2007eec: 80 a0 40 1c cmp %g1, %i4
2007ef0: 04 80 00 1d ble 2007f64 <_Rate_monotonic_Update_statistics+0xd0>
2007ef4: c4 3e 20 70 std %g2, [ %i0 + 0x70 ]
stats->min_cpu_time = executed;
2007ef8: f8 3e 20 60 std %i4, [ %i0 + 0x60 ]
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2007efc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
2007f00: 80 a0 40 1c cmp %g1, %i4
2007f04: 26 80 00 05 bl,a 2007f18 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN
2007f08: f8 3e 20 68 std %i4, [ %i0 + 0x68 ] <== NOT EXECUTED
2007f0c: 80 a0 40 1c cmp %g1, %i4
2007f10: 22 80 00 2c be,a 2007fc0 <_Rate_monotonic_Update_statistics+0x12c><== ALWAYS TAKEN
2007f14: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
2007f18: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2007f1c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2007f20: 86 a2 c0 09 subcc %o3, %o1, %g3
2007f24: 84 62 80 08 subx %o2, %o0, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2007f28: ba 87 40 03 addcc %i5, %g3, %i5
2007f2c: b8 47 00 02 addx %i4, %g2, %i4
2007f30: 80 a0 40 02 cmp %g1, %g2
2007f34: 14 80 00 1e bg 2007fac <_Rate_monotonic_Update_statistics+0x118>
2007f38: f8 3e 20 88 std %i4, [ %i0 + 0x88 ]
2007f3c: 80 a0 40 02 cmp %g1, %g2
2007f40: 22 80 00 18 be,a 2007fa0 <_Rate_monotonic_Update_statistics+0x10c><== ALWAYS TAKEN
2007f44: c2 06 20 7c ld [ %i0 + 0x7c ], %g1
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2007f48: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2007f4c: 80 a0 40 02 cmp %g1, %g2
2007f50: 16 80 00 0d bge 2007f84 <_Rate_monotonic_Update_statistics+0xf0><== ALWAYS TAKEN
2007f54: 01 00 00 00 nop
stats->max_wall_time = since_last_period;
2007f58: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED
2007f5c: 81 c7 e0 08 ret
2007f60: 81 e8 00 00 restore
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2007f64: 32 bf ff e7 bne,a 2007f00 <_Rate_monotonic_Update_statistics+0x6c><== NEVER TAKEN
2007f68: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
2007f6c: c2 06 20 64 ld [ %i0 + 0x64 ], %g1
2007f70: 80 a0 40 1d cmp %g1, %i5
2007f74: 28 bf ff e3 bleu,a 2007f00 <_Rate_monotonic_Update_statistics+0x6c>
2007f78: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
stats->min_cpu_time = executed;
2007f7c: 10 bf ff e0 b 2007efc <_Rate_monotonic_Update_statistics+0x68>
2007f80: f8 3e 20 60 std %i4, [ %i0 + 0x60 ]
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2007f84: 12 bf ff f6 bne 2007f5c <_Rate_monotonic_Update_statistics+0xc8><== NEVER TAKEN
2007f88: 01 00 00 00 nop
2007f8c: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2007f90: 80 a0 40 03 cmp %g1, %g3
2007f94: 2a bf ff f2 bcs,a 2007f5c <_Rate_monotonic_Update_statistics+0xc8>
2007f98: c4 3e 20 80 std %g2, [ %i0 + 0x80 ]
2007f9c: 30 bf ff f0 b,a 2007f5c <_Rate_monotonic_Update_statistics+0xc8>
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2007fa0: 80 a0 40 03 cmp %g1, %g3
2007fa4: 28 bf ff ea bleu,a 2007f4c <_Rate_monotonic_Update_statistics+0xb8>
2007fa8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2007fac: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2007fb0: 80 a0 40 02 cmp %g1, %g2
2007fb4: 06 bf ff e9 bl 2007f58 <_Rate_monotonic_Update_statistics+0xc4><== NEVER TAKEN
2007fb8: c4 3e 20 78 std %g2, [ %i0 + 0x78 ]
2007fbc: 30 bf ff f2 b,a 2007f84 <_Rate_monotonic_Update_statistics+0xf0>
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2007fc0: 80 a0 40 1d cmp %g1, %i5
2007fc4: 3a bf ff d6 bcc,a 2007f1c <_Rate_monotonic_Update_statistics+0x88>
2007fc8: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4
stats->max_cpu_time = executed;
2007fcc: 10 bf ff d3 b 2007f18 <_Rate_monotonic_Update_statistics+0x84>
2007fd0: f8 3e 20 68 std %i4, [ %i0 + 0x68 ]
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
2007fd4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2007fd8: f6 06 20 40 ld [ %i0 + 0x40 ], %i3
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
2007fdc: 82 00 60 01 inc %g1
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2007fe0: 90 07 bf f8 add %fp, -8, %o0
2007fe4: 40 00 06 a7 call 2009a80 <_TOD_Get_uptime>
2007fe8: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2007fec: 03 00 80 86 sethi %hi(0x2021800), %g1
2007ff0: 82 10 62 80 or %g1, 0x280, %g1 ! 2021a80 <_Per_CPU_Information>
2007ff4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007ff8: d0 1e 20 50 ldd [ %i0 + 0x50 ], %o0
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
2007ffc: d4 1f bf f8 ldd [ %fp + -8 ], %o2
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2008000: 80 a6 c0 02 cmp %i3, %g2
2008004: 12 bf ff b6 bne 2007edc <_Rate_monotonic_Update_statistics+0x48><== NEVER TAKEN
2008008: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200800c: c4 18 60 20 ldd [ %g1 + 0x20 ], %g2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2008010: f8 1e 20 48 ldd [ %i0 + 0x48 ], %i4
2008014: 86 a2 c0 03 subcc %o3, %g3, %g3
2008018: 84 62 80 02 subx %o2, %g2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200801c: 86 83 40 03 addcc %o5, %g3, %g3
2008020: 84 43 00 02 addx %o4, %g2, %g2
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2008024: 80 a7 00 02 cmp %i4, %g2
2008028: 14 bf ff cd bg 2007f5c <_Rate_monotonic_Update_statistics+0xc8><== NEVER TAKEN
200802c: 01 00 00 00 nop
2008030: 02 80 00 05 be 2008044 <_Rate_monotonic_Update_statistics+0x1b0>
2008034: 80 a7 40 03 cmp %i5, %g3
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2008038: ba a0 c0 1d subcc %g3, %i5, %i5
200803c: 10 bf ff a8 b 2007edc <_Rate_monotonic_Update_statistics+0x48>
2008040: b8 60 80 1c subx %g2, %i4, %i4
2008044: 18 bf ff c6 bgu 2007f5c <_Rate_monotonic_Update_statistics+0xc8>
2008048: ba a0 c0 1d subcc %g3, %i5, %i5
200804c: 10 bf ff a4 b 2007edc <_Rate_monotonic_Update_statistics+0x48>
2008050: b8 60 80 1c subx %g2, %i4, %i4
0200b1d8 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
200b1d8: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200b1dc: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200b1e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b1e4: 80 a0 40 09 cmp %g1, %o1
200b1e8: 32 80 00 02 bne,a 200b1f0 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
200b1ec: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200b1f0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200b1f4: 80 a0 40 09 cmp %g1, %o1
200b1f8: 02 80 00 04 be 200b208 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
200b1fc: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200b200: 40 00 01 a0 call 200b880 <_Thread_Change_priority>
200b204: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200b208: f0 06 20 88 ld [ %i0 + 0x88 ], %i0
if ( sched_info->cbs_server->cbs_budget_overrun ) {
200b20c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b210: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200b214: 80 a0 a0 00 cmp %g2, 0
200b218: 02 80 00 09 be 200b23c <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
200b21c: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
200b220: d0 00 40 00 ld [ %g1 ], %o0
200b224: 7f ff ff d1 call 200b168 <_Scheduler_CBS_Get_server_id>
200b228: 92 07 bf fc add %fp, -4, %o1
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
200b22c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b230: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200b234: 9f c0 40 00 call %g1
200b238: d0 07 bf fc ld [ %fp + -4 ], %o0
200b23c: 81 c7 e0 08 ret
200b240: 81 e8 00 00 restore
0200ad40 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
200ad40: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ad44: 39 00 80 88 sethi %hi(0x2022000), %i4
200ad48: c2 07 20 64 ld [ %i4 + 0x64 ], %g1 ! 2022064 <_Scheduler_CBS_Maximum_servers>
200ad4c: 80 a0 60 00 cmp %g1, 0
200ad50: 02 80 00 18 be 200adb0 <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN
200ad54: 03 00 80 8c sethi %hi(0x2023000), %g1
200ad58: 37 00 80 8c sethi %hi(0x2023000), %i3
200ad5c: c4 06 e2 b8 ld [ %i3 + 0x2b8 ], %g2 ! 20232b8 <_Scheduler_CBS_Server_list>
200ad60: ba 10 20 00 clr %i5
200ad64: b8 17 20 64 or %i4, 0x64, %i4
if ( _Scheduler_CBS_Server_list[ i ] )
200ad68: 83 2f 60 02 sll %i5, 2, %g1
200ad6c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200ad70: 80 a0 60 00 cmp %g1, 0
200ad74: 02 80 00 05 be 200ad88 <_Scheduler_CBS_Cleanup+0x48>
200ad78: 90 10 00 1d mov %i5, %o0
_Scheduler_CBS_Destroy_server( i );
200ad7c: 40 00 00 45 call 200ae90 <_Scheduler_CBS_Destroy_server>
200ad80: 01 00 00 00 nop
200ad84: c4 06 e2 b8 ld [ %i3 + 0x2b8 ], %g2
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ad88: c2 07 00 00 ld [ %i4 ], %g1
200ad8c: ba 07 60 01 inc %i5
200ad90: 80 a0 40 1d cmp %g1, %i5
200ad94: 18 bf ff f6 bgu 200ad6c <_Scheduler_CBS_Cleanup+0x2c>
200ad98: 83 2f 60 02 sll %i5, 2, %g1
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
return SCHEDULER_CBS_OK;
}
200ad9c: b0 10 20 00 clr %i0
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
200ada0: 40 00 08 73 call 200cf6c <_Workspace_Free>
200ada4: 90 10 00 02 mov %g2, %o0
return SCHEDULER_CBS_OK;
}
200ada8: 81 c7 e0 08 ret
200adac: 81 e8 00 00 restore
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200adb0: 10 bf ff fb b 200ad9c <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED
200adb4: c4 00 62 b8 ld [ %g1 + 0x2b8 ], %g2 <== NOT EXECUTED
0200adb8 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200adb8: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200adbc: c2 06 20 04 ld [ %i0 + 4 ], %g1
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200adc0: ba 10 00 18 mov %i0, %i5
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200adc4: 80 a0 60 00 cmp %g1, 0
200adc8: 04 80 00 30 ble 200ae88 <_Scheduler_CBS_Create_server+0xd0>
200adcc: b0 10 3f ee mov -18, %i0
200add0: c2 07 40 00 ld [ %i5 ], %g1
200add4: 80 a0 60 00 cmp %g1, 0
200add8: 04 80 00 2c ble 200ae88 <_Scheduler_CBS_Create_server+0xd0>
200addc: 03 00 80 88 sethi %hi(0x2022000), %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ade0: c6 00 60 64 ld [ %g1 + 0x64 ], %g3 ! 2022064 <_Scheduler_CBS_Maximum_servers>
200ade4: 80 a0 e0 00 cmp %g3, 0
200ade8: 02 80 00 28 be 200ae88 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200adec: b0 10 3f e6 mov -26, %i0
if ( !_Scheduler_CBS_Server_list[i] )
200adf0: 37 00 80 8c sethi %hi(0x2023000), %i3
200adf4: f8 06 e2 b8 ld [ %i3 + 0x2b8 ], %i4 ! 20232b8 <_Scheduler_CBS_Server_list>
200adf8: c2 07 00 00 ld [ %i4 ], %g1
200adfc: 80 a0 60 00 cmp %g1, 0
200ae00: 02 80 00 0e be 200ae38 <_Scheduler_CBS_Create_server+0x80>
200ae04: 82 10 20 00 clr %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ae08: 10 80 00 07 b 200ae24 <_Scheduler_CBS_Create_server+0x6c>
200ae0c: 82 00 60 01 inc %g1
if ( !_Scheduler_CBS_Server_list[i] )
200ae10: c4 07 00 18 ld [ %i4 + %i0 ], %g2
200ae14: 80 a0 a0 00 cmp %g2, 0
200ae18: 22 80 00 0a be,a 200ae40 <_Scheduler_CBS_Create_server+0x88>
200ae1c: c2 26 80 00 st %g1, [ %i2 ]
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ae20: 82 00 60 01 inc %g1
200ae24: 80 a0 40 03 cmp %g1, %g3
200ae28: 12 bf ff fa bne 200ae10 <_Scheduler_CBS_Create_server+0x58>
200ae2c: b1 28 60 02 sll %g1, 2, %i0
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
200ae30: 81 c7 e0 08 ret
200ae34: 91 e8 3f e6 restore %g0, -26, %o0
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
200ae38: b0 10 20 00 clr %i0
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
200ae3c: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
200ae40: 40 00 08 43 call 200cf4c <_Workspace_Allocate>
200ae44: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
200ae48: c2 06 80 00 ld [ %i2 ], %g1
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
200ae4c: d0 27 00 18 st %o0, [ %i4 + %i0 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
200ae50: c4 06 e2 b8 ld [ %i3 + 0x2b8 ], %g2
200ae54: 83 28 60 02 sll %g1, 2, %g1
200ae58: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
200ae5c: 80 a0 60 00 cmp %g1, 0
200ae60: 02 80 00 0a be 200ae88 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200ae64: b0 10 3f ef mov -17, %i0
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200ae68: c4 07 40 00 ld [ %i5 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
200ae6c: b0 10 20 00 clr %i0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200ae70: c4 20 60 04 st %g2, [ %g1 + 4 ]
200ae74: c4 07 60 04 ld [ %i5 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
200ae78: f2 20 60 0c st %i1, [ %g1 + 0xc ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200ae7c: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
200ae80: 84 10 3f ff mov -1, %g2
200ae84: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
200ae88: 81 c7 e0 08 ret
200ae8c: 81 e8 00 00 restore
0200af00 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
200af00: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
200af04: 92 07 bf fc add %fp, -4, %o1
200af08: 40 00 03 a8 call 200bda8 <_Thread_Get>
200af0c: 90 10 00 19 mov %i1, %o0
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200af10: ba 92 20 00 orcc %o0, 0, %i5
200af14: 22 80 00 05 be,a 200af28 <_Scheduler_CBS_Detach_thread+0x28>
200af18: 03 00 80 88 sethi %hi(0x2022000), %g1
_Thread_Enable_dispatch();
200af1c: 40 00 03 96 call 200bd74 <_Thread_Enable_dispatch>
200af20: 01 00 00 00 nop
}
if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
200af24: 03 00 80 88 sethi %hi(0x2022000), %g1
200af28: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 2022064 <_Scheduler_CBS_Maximum_servers>
200af2c: 80 a0 80 18 cmp %g2, %i0
200af30: 08 80 00 1b bleu 200af9c <_Scheduler_CBS_Detach_thread+0x9c>
200af34: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
200af38: 80 a7 60 00 cmp %i5, 0
200af3c: 02 80 00 18 be 200af9c <_Scheduler_CBS_Detach_thread+0x9c>
200af40: 01 00 00 00 nop
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
200af44: 03 00 80 8c sethi %hi(0x2023000), %g1
200af48: c2 00 62 b8 ld [ %g1 + 0x2b8 ], %g1 ! 20232b8 <_Scheduler_CBS_Server_list>
200af4c: b1 2e 20 02 sll %i0, 2, %i0
200af50: c4 00 40 18 ld [ %g1 + %i0 ], %g2
200af54: 80 a0 a0 00 cmp %g2, 0
200af58: 02 80 00 11 be 200af9c <_Scheduler_CBS_Detach_thread+0x9c>
200af5c: 82 10 3f e7 mov -25, %g1
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
200af60: c6 00 80 00 ld [ %g2 ], %g3
200af64: 80 a0 c0 19 cmp %g3, %i1
200af68: 12 80 00 0d bne 200af9c <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
200af6c: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
200af70: c8 07 60 88 ld [ %i5 + 0x88 ], %g4
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200af74: 82 10 3f ff mov -1, %g1
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200af78: c6 07 60 a0 ld [ %i5 + 0xa0 ], %g3
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200af7c: c2 20 80 00 st %g1, [ %g2 ]
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200af80: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200af84: c4 07 60 a4 ld [ %i5 + 0xa4 ], %g2
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
200af88: c0 21 20 18 clr [ %g4 + 0x18 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200af8c: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200af90: c6 27 60 78 st %g3, [ %i5 + 0x78 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
200af94: c4 27 60 7c st %g2, [ %i5 + 0x7c ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
200af98: 82 10 20 00 clr %g1
}
200af9c: 81 c7 e0 08 ret
200afa0: 91 e8 00 01 restore %g0, %g1, %o0
0200b168 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200b168: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b16c: 03 00 80 88 sethi %hi(0x2022000), %g1
200b170: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 2022064 <_Scheduler_CBS_Maximum_servers>
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200b174: 84 10 00 18 mov %i0, %g2
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b178: 80 a0 60 00 cmp %g1, 0
200b17c: 02 80 00 13 be 200b1c8 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN
200b180: b0 10 3f e7 mov -25, %i0
200b184: 07 00 80 8c sethi %hi(0x2023000), %g3
200b188: de 00 e2 b8 ld [ %g3 + 0x2b8 ], %o7 ! 20232b8 <_Scheduler_CBS_Server_list>
200b18c: 86 10 20 00 clr %g3
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Get_server_id (
200b190: 89 28 e0 02 sll %g3, 2, %g4
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
200b194: c8 03 c0 04 ld [ %o7 + %g4 ], %g4
200b198: 80 a1 20 00 cmp %g4, 0
200b19c: 22 80 00 07 be,a 200b1b8 <_Scheduler_CBS_Get_server_id+0x50>
200b1a0: 86 00 e0 01 inc %g3
200b1a4: c8 01 00 00 ld [ %g4 ], %g4
200b1a8: 80 a1 00 02 cmp %g4, %g2
200b1ac: 22 80 00 09 be,a 200b1d0 <_Scheduler_CBS_Get_server_id+0x68>
200b1b0: c6 26 40 00 st %g3, [ %i1 ]
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b1b4: 86 00 e0 01 inc %g3
200b1b8: 80 a0 c0 01 cmp %g3, %g1
200b1bc: 12 bf ff f6 bne 200b194 <_Scheduler_CBS_Get_server_id+0x2c>
200b1c0: 89 28 e0 02 sll %g3, 2, %g4
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
200b1c4: b0 10 3f e7 mov -25, %i0
}
200b1c8: 81 c7 e0 08 ret
200b1cc: 81 e8 00 00 restore
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
200b1d0: 81 c7 e0 08 ret
200b1d4: 91 e8 20 00 restore %g0, 0, %o0
0200b244 <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
200b244: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
200b248: 3b 00 80 88 sethi %hi(0x2022000), %i5
200b24c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 ! 2022064 <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
200b250: b0 10 3f ef mov -17, %i0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
200b254: 40 00 07 3e call 200cf4c <_Workspace_Allocate>
200b258: 91 2a 20 02 sll %o0, 2, %o0
200b25c: 09 00 80 8c sethi %hi(0x2023000), %g4
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
200b260: 80 a2 20 00 cmp %o0, 0
200b264: 02 80 00 0f be 200b2a0 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200b268: d0 21 22 b8 st %o0, [ %g4 + 0x2b8 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200b26c: c6 07 60 64 ld [ %i5 + 0x64 ], %g3
200b270: 80 a0 e0 00 cmp %g3, 0
200b274: 02 80 00 0b be 200b2a0 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200b278: b0 10 20 00 clr %i0
200b27c: 10 80 00 03 b 200b288 <_Scheduler_CBS_Initialize+0x44>
200b280: 82 10 20 00 clr %g1
200b284: d0 01 22 b8 ld [ %g4 + 0x2b8 ], %o0
_Scheduler_CBS_Server_list[i] = NULL;
200b288: 85 28 60 02 sll %g1, 2, %g2
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200b28c: 82 00 60 01 inc %g1
200b290: 80 a0 40 03 cmp %g1, %g3
200b294: 12 bf ff fc bne 200b284 <_Scheduler_CBS_Initialize+0x40>
200b298: c0 22 00 02 clr [ %o0 + %g2 ]
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
200b29c: b0 10 20 00 clr %i0
}
200b2a0: 81 c7 e0 08 ret
200b2a4: 81 e8 00 00 restore
02009cc8 <_Scheduler_CBS_Release_job>:
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
2009cc8: c2 02 20 88 ld [ %o0 + 0x88 ], %g1
if (deadline) {
2009ccc: 80 a2 60 00 cmp %o1, 0
2009cd0: 02 80 00 11 be 2009d14 <_Scheduler_CBS_Release_job+0x4c>
2009cd4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
2009cd8: 80 a0 60 00 cmp %g1, 0
2009cdc: 02 80 00 13 be 2009d28 <_Scheduler_CBS_Release_job+0x60>
2009ce0: 07 00 80 84 sethi %hi(0x2021000), %g3
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
2009ce4: c4 00 60 04 ld [ %g1 + 4 ], %g2
2009ce8: d2 00 e1 60 ld [ %g3 + 0x160 ], %o1
2009cec: 92 02 40 02 add %o1, %g2, %o1
2009cf0: 05 20 00 00 sethi %hi(0x80000000), %g2
2009cf4: 92 2a 40 02 andn %o1, %g2, %o1
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
2009cf8: c2 00 60 08 ld [ %g1 + 8 ], %g1
2009cfc: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
the_thread->real_priority = new_priority;
2009d00: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
2009d04: 94 10 20 01 mov 1, %o2
2009d08: 82 13 c0 00 mov %o7, %g1
2009d0c: 40 00 01 4c call 200a23c <_Thread_Change_priority>
2009d10: 9e 10 40 00 mov %g1, %o7
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
2009d14: 80 a0 60 00 cmp %g1, 0
2009d18: 12 bf ff f8 bne 2009cf8 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN
2009d1c: d2 02 20 ac ld [ %o0 + 0xac ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
the_thread->real_priority = new_priority;
2009d20: 10 bf ff f9 b 2009d04 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED
2009d24: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
2009d28: 03 00 80 84 sethi %hi(0x2021000), %g1
2009d2c: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 2021160 <_Watchdog_Ticks_since_boot>
2009d30: 92 02 40 01 add %o1, %g1, %o1
2009d34: 03 20 00 00 sethi %hi(0x80000000), %g1
2009d38: 10 bf ff f2 b 2009d00 <_Scheduler_CBS_Release_job+0x38>
2009d3c: 92 2a 40 01 andn %o1, %g1, %o1
02009d40 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
2009d40: 9d e3 bf a0 save %sp, -96, %sp
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
2009d44: 40 00 00 5b call 2009eb0 <_Scheduler_EDF_Enqueue>
2009d48: 90 10 00 18 mov %i0, %o0
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
2009d4c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
2009d50: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
2009d54: 80 a7 60 00 cmp %i5, 0
2009d58: 02 80 00 19 be 2009dbc <_Scheduler_CBS_Unblock+0x7c>
2009d5c: 03 00 80 84 sethi %hi(0x2021000), %g1
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
2009d60: d2 07 60 04 ld [ %i5 + 4 ], %o1
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
2009d64: d0 00 61 60 ld [ %g1 + 0x160 ], %o0
2009d68: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
2009d6c: 40 00 47 c1 call 201bc70 <.umul>
2009d70: 90 27 00 08 sub %i4, %o0, %o0
2009d74: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
2009d78: b6 10 00 08 mov %o0, %i3
2009d7c: 40 00 47 bd call 201bc70 <.umul>
2009d80: d0 07 60 08 ld [ %i5 + 8 ], %o0
2009d84: 80 a6 c0 08 cmp %i3, %o0
2009d88: 24 80 00 0e ble,a 2009dc0 <_Scheduler_CBS_Unblock+0x80>
2009d8c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
2009d90: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
2009d94: 80 a7 00 09 cmp %i4, %o1
2009d98: 32 80 00 02 bne,a 2009da0 <_Scheduler_CBS_Unblock+0x60>
2009d9c: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
2009da0: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
2009da4: 80 a2 00 09 cmp %o0, %o1
2009da8: 02 80 00 07 be 2009dc4 <_Scheduler_CBS_Unblock+0x84>
2009dac: 3b 00 80 85 sethi %hi(0x2021400), %i5
_Thread_Change_priority(the_thread, new_priority, true);
2009db0: 90 10 00 18 mov %i0, %o0
2009db4: 40 00 01 22 call 200a23c <_Thread_Change_priority>
2009db8: 94 10 20 01 mov 1, %o2
2009dbc: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
2009dc0: 3b 00 80 85 sethi %hi(0x2021400), %i5
2009dc4: ba 17 61 90 or %i5, 0x190, %i5 ! 2021590 <_Per_CPU_Information>
2009dc8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2009dcc: d2 00 60 14 ld [ %g1 + 0x14 ], %o1
2009dd0: 03 00 80 80 sethi %hi(0x2020000), %g1
2009dd4: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 ! 2020398 <_Scheduler+0x30>
2009dd8: 9f c0 40 00 call %g1
2009ddc: 01 00 00 00 nop
2009de0: 80 a2 20 00 cmp %o0, 0
2009de4: 04 80 00 0a ble 2009e0c <_Scheduler_CBS_Unblock+0xcc>
2009de8: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2009dec: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
2009df0: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
2009df4: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
2009df8: 80 a0 60 00 cmp %g1, 0
2009dfc: 22 80 00 06 be,a 2009e14 <_Scheduler_CBS_Unblock+0xd4>
2009e00: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
2009e04: 82 10 20 01 mov 1, %g1
2009e08: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
2009e0c: 81 c7 e0 08 ret
2009e10: 81 e8 00 00 restore
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2009e14: 80 a0 60 00 cmp %g1, 0
2009e18: 12 bf ff fd bne 2009e0c <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN
2009e1c: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
2009e20: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
2009e24: 30 bf ff fa b,a 2009e0c <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED
02009e28 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
2009e28: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
2009e2c: 40 00 06 e6 call 200b9c4 <_Workspace_Allocate>
2009e30: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
2009e34: 80 a2 20 00 cmp %o0, 0
2009e38: 02 80 00 05 be 2009e4c <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
2009e3c: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
2009e40: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
2009e44: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
2009e48: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
2009e4c: 81 c7 e0 08 ret
2009e50: 91 e8 00 08 restore %g0, %o0, %o0
02009ecc <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
2009ecc: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
2009ed0: 7f ff ff a0 call 2009d50 <_Scheduler_EDF_Enqueue>
2009ed4: 90 10 00 18 mov %i0, %o0
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
2009ed8: 3b 00 80 85 sethi %hi(0x2021400), %i5
2009edc: ba 17 60 f0 or %i5, 0xf0, %i5 ! 20214f0 <_Per_CPU_Information>
2009ee0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2009ee4: d0 00 60 14 ld [ %g1 + 0x14 ], %o0
2009ee8: 03 00 80 80 sethi %hi(0x2020000), %g1
2009eec: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 20202f8 <_Scheduler+0x30>
2009ef0: 9f c0 40 00 call %g1
2009ef4: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
2009ef8: 80 a2 20 00 cmp %o0, 0
2009efc: 26 80 00 04 bl,a 2009f0c <_Scheduler_EDF_Unblock+0x40>
2009f00: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2009f04: 81 c7 e0 08 ret
2009f08: 81 e8 00 00 restore
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
2009f0c: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
2009f10: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
2009f14: 80 a0 60 00 cmp %g1, 0
2009f18: 22 80 00 06 be,a 2009f30 <_Scheduler_EDF_Unblock+0x64>
2009f1c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
2009f20: 82 10 20 01 mov 1, %g1
2009f24: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
2009f28: 81 c7 e0 08 ret
2009f2c: 81 e8 00 00 restore
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2009f30: 80 a0 60 00 cmp %g1, 0
2009f34: 12 bf ff f4 bne 2009f04 <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN
2009f38: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
2009f3c: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
2009f40: 30 bf ff fa b,a 2009f28 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED
02009658 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
2009658: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
executing = _Thread_Executing;
200965c: 03 00 80 7e sethi %hi(0x201f800), %g1
2009660: d0 00 62 0c ld [ %g1 + 0x20c ], %o0 ! 201fa0c <_Per_CPU_Information+0xc>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
2009664: c2 0a 20 70 ldub [ %o0 + 0x70 ], %g1
2009668: 80 a0 60 00 cmp %g1, 0
200966c: 02 80 00 26 be 2009704 <_Scheduler_priority_Tick+0xac>
2009670: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
2009674: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2009678: 80 a0 60 00 cmp %g1, 0
200967c: 12 80 00 22 bne 2009704 <_Scheduler_priority_Tick+0xac>
2009680: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
2009684: c2 02 20 78 ld [ %o0 + 0x78 ], %g1
2009688: 80 a0 60 01 cmp %g1, 1
200968c: 0a 80 00 07 bcs 20096a8 <_Scheduler_priority_Tick+0x50>
2009690: 80 a0 60 02 cmp %g1, 2
2009694: 28 80 00 10 bleu,a 20096d4 <_Scheduler_priority_Tick+0x7c>
2009698: c2 02 20 74 ld [ %o0 + 0x74 ], %g1
200969c: 80 a0 60 03 cmp %g1, 3
20096a0: 22 80 00 04 be,a 20096b0 <_Scheduler_priority_Tick+0x58> <== ALWAYS TAKEN
20096a4: c2 02 20 74 ld [ %o0 + 0x74 ], %g1
20096a8: 81 c7 e0 08 ret
20096ac: 81 e8 00 00 restore
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
20096b0: 82 00 7f ff add %g1, -1, %g1
20096b4: 80 a0 60 00 cmp %g1, 0
20096b8: 12 bf ff fc bne 20096a8 <_Scheduler_priority_Tick+0x50>
20096bc: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
(*executing->budget_callout)( executing );
20096c0: c2 02 20 7c ld [ %o0 + 0x7c ], %g1
20096c4: 9f c0 40 00 call %g1
20096c8: 01 00 00 00 nop
20096cc: 81 c7 e0 08 ret
20096d0: 81 e8 00 00 restore
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
20096d4: 82 00 7f ff add %g1, -1, %g1
20096d8: 80 a0 60 00 cmp %g1, 0
20096dc: 14 bf ff f3 bg 20096a8 <_Scheduler_priority_Tick+0x50>
20096e0: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
20096e4: 03 00 80 7a sethi %hi(0x201e800), %g1
20096e8: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201e854 <_Scheduler+0xc>
20096ec: 9f c0 40 00 call %g1
20096f0: d0 27 bf fc st %o0, [ %fp + -4 ]
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
20096f4: 03 00 80 7d sethi %hi(0x201f400), %g1
20096f8: d0 07 bf fc ld [ %fp + -4 ], %o0
20096fc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
2009700: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
2009704: 81 c7 e0 08 ret
2009708: 81 e8 00 00 restore
02009ec4 <_Scheduler_simple_Ready_queue_enqueue_first>:
{
Chain_Control *ready;
Chain_Node *the_node;
Thread_Control *current;
ready = (Chain_Control *)_Scheduler.information;
2009ec4: 03 00 80 7e sethi %hi(0x201f800), %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2009ec8: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 201f808 <_Scheduler>
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
2009ecc: c6 02 20 14 ld [ %o0 + 0x14 ], %g3
2009ed0: c2 00 40 00 ld [ %g1 ], %g1
2009ed4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
2009ed8: 80 a0 80 03 cmp %g2, %g3
2009edc: 3a 80 00 08 bcc,a 2009efc <_Scheduler_simple_Ready_queue_enqueue_first+0x38>
2009ee0: c2 00 60 04 ld [ %g1 + 4 ], %g1
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
2009ee4: c2 00 40 00 ld [ %g1 ], %g1
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
2009ee8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
2009eec: 80 a0 80 03 cmp %g2, %g3
2009ef0: 2a bf ff fe bcs,a 2009ee8 <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN
2009ef4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
current = (Thread_Control *)current->Object.Node.previous;
2009ef8: c2 00 60 04 ld [ %g1 + 4 ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2009efc: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2009f00: c2 22 20 04 st %g1, [ %o0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
2009f04: d0 20 40 00 st %o0, [ %g1 ]
the_node->next = before_node;
2009f08: c4 22 00 00 st %g2, [ %o0 ]
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
2009f0c: 81 c3 e0 08 retl
2009f10: d0 20 a0 04 st %o0, [ %g2 + 4 ]
020082f0 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
20082f0: 9d e3 bf a0 save %sp, -96, %sp
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
20082f4: 09 00 80 7d sethi %hi(0x201f400), %g4
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
20082f8: 05 00 80 79 sethi %hi(0x201e400), %g2
20082fc: d8 19 21 40 ldd [ %g4 + 0x140 ], %o4
2008300: c6 00 a3 6c ld [ %g2 + 0x36c ], %g3
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008304: 03 00 80 7d sethi %hi(0x201f400), %g1
2008308: f8 18 61 50 ldd [ %g1 + 0x150 ], %i4 ! 201f550 <_TOD_Now>
200830c: 9f 28 e0 07 sll %g3, 7, %o7
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008310: 37 00 80 7d sethi %hi(0x201f400), %i3
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008314: 85 28 e0 02 sll %g3, 2, %g2
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008318: f4 06 e1 d0 ld [ %i3 + 0x1d0 ], %i2
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
200831c: 84 23 c0 02 sub %o7, %g2, %g2
2008320: 84 00 80 03 add %g2, %g3, %g2
2008324: 85 28 a0 03 sll %g2, 3, %g2
2008328: 86 10 00 02 mov %g2, %g3
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200832c: 9a 80 c0 0d addcc %g3, %o5, %o5
2008330: 84 10 20 00 clr %g2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008334: 92 10 00 1d mov %i5, %o1
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008338: 98 40 80 0c addx %g2, %o4, %o4
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
*_time += *_add;
200833c: ba 80 c0 1d addcc %g3, %i5, %i5
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008340: b4 06 a0 01 inc %i2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008344: 94 10 20 00 clr %o2
2008348: f4 26 e1 d0 st %i2, [ %i3 + 0x1d0 ]
200834c: 90 10 00 1c mov %i4, %o0
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008350: d8 39 21 40 std %o4, [ %g4 + 0x140 ]
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
*_time += *_add;
2008354: b8 40 80 1c addx %g2, %i4, %i4
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008358: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
*_time += *_add;
200835c: f8 38 61 50 std %i4, [ %g1 + 0x150 ]
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008360: 40 00 49 87 call 201a97c <__divdi3>
2008364: 96 12 e2 00 or %o3, 0x200, %o3
*_time += *_add;
if ( ((*_time) / 1000000000L) != _start ) {
2008368: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
200836c: b6 10 00 08 mov %o0, %i3
2008370: b4 10 00 09 mov %o1, %i2
*_time += *_add;
if ( ((*_time) / 1000000000L) != _start ) {
2008374: 90 10 00 1c mov %i4, %o0
2008378: 92 10 00 1d mov %i5, %o1
200837c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2008380: 40 00 49 7f call 201a97c <__divdi3>
2008384: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
2008388: 80 a6 c0 08 cmp %i3, %o0
200838c: 02 80 00 05 be 20083a0 <_TOD_Tickle_ticks+0xb0> <== ALWAYS TAKEN
2008390: 80 a6 80 09 cmp %i2, %o1
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
2008394: 31 00 80 7d sethi %hi(0x201f400), %i0 <== NOT EXECUTED
2008398: 40 00 0a cd call 200aecc <_Watchdog_Tickle>
200839c: 91 ee 21 74 restore %i0, 0x174, %o0
20083a0: 12 bf ff fe bne 2008398 <_TOD_Tickle_ticks+0xa8>
20083a4: 31 00 80 7d sethi %hi(0x201f400), %i0
20083a8: 81 c7 e0 08 ret
20083ac: 81 e8 00 00 restore
02007f78 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
2007f78: 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();
2007f7c: 03 00 80 83 sethi %hi(0x2020c00), %g1
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
2007f80: ba 10 20 00 clr %i5
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
2007f84: 80 a6 20 00 cmp %i0, 0
2007f88: 02 80 00 2c be 2008038 <_TOD_Validate+0xc0> <== NEVER TAKEN
2007f8c: d2 00 62 0c ld [ %g1 + 0x20c ], %o1
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
2007f90: 11 00 03 d0 sethi %hi(0xf4000), %o0
2007f94: 40 00 51 1d call 201c408 <.udiv>
2007f98: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
2007f9c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2007fa0: 80 a2 00 01 cmp %o0, %g1
2007fa4: 28 80 00 26 bleu,a 200803c <_TOD_Validate+0xc4>
2007fa8: b0 0f 60 01 and %i5, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
2007fac: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2007fb0: 80 a0 60 3b cmp %g1, 0x3b
2007fb4: 38 80 00 22 bgu,a 200803c <_TOD_Validate+0xc4>
2007fb8: b0 0f 60 01 and %i5, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
2007fbc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2007fc0: 80 a0 60 3b cmp %g1, 0x3b
2007fc4: 38 80 00 1e bgu,a 200803c <_TOD_Validate+0xc4>
2007fc8: b0 0f 60 01 and %i5, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
2007fcc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2007fd0: 80 a0 60 17 cmp %g1, 0x17
2007fd4: 38 80 00 1a bgu,a 200803c <_TOD_Validate+0xc4>
2007fd8: b0 0f 60 01 and %i5, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
2007fdc: c2 06 20 04 ld [ %i0 + 4 ], %g1
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
2007fe0: 80 a0 60 00 cmp %g1, 0
2007fe4: 02 80 00 15 be 2008038 <_TOD_Validate+0xc0> <== NEVER TAKEN
2007fe8: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
2007fec: 38 80 00 14 bgu,a 200803c <_TOD_Validate+0xc4>
2007ff0: b0 0f 60 01 and %i5, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
2007ff4: c4 06 00 00 ld [ %i0 ], %g2
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
2007ff8: 80 a0 a7 c3 cmp %g2, 0x7c3
2007ffc: 28 80 00 10 bleu,a 200803c <_TOD_Validate+0xc4>
2008000: b0 0f 60 01 and %i5, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
2008004: c6 06 20 08 ld [ %i0 + 8 ], %g3
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
2008008: 80 a0 e0 00 cmp %g3, 0
200800c: 02 80 00 0b be 2008038 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008010: 80 88 a0 03 btst 3, %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
2008014: 32 80 00 0c bne,a 2008044 <_TOD_Validate+0xcc>
2008018: 83 28 60 02 sll %g1, 2, %g1
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
200801c: 82 00 60 0d add %g1, 0xd, %g1
2008020: 05 00 80 7e sethi %hi(0x201f800), %g2
2008024: 83 28 60 02 sll %g1, 2, %g1
2008028: 84 10 a1 70 or %g2, 0x170, %g2
200802c: 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(
2008030: 80 a0 40 03 cmp %g1, %g3
2008034: ba 60 3f ff subx %g0, -1, %i5
if ( the_tod->day > days_in_month )
return false;
return true;
}
2008038: b0 0f 60 01 and %i5, 1, %i0
200803c: 81 c7 e0 08 ret
2008040: 81 e8 00 00 restore
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
2008044: 05 00 80 7e sethi %hi(0x201f800), %g2
2008048: 84 10 a1 70 or %g2, 0x170, %g2 ! 201f970 <_TOD_Days_per_month>
200804c: 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(
2008050: 80 a0 40 03 cmp %g1, %g3
2008054: 10 bf ff f9 b 2008038 <_TOD_Validate+0xc0>
2008058: ba 60 3f ff subx %g0, -1, %i5
02009930 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2009930: 9d e3 bf a0 save %sp, -96, %sp
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
2009934: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
2009938: 40 00 03 a9 call 200a7dc <_Thread_Set_transient>
200993c: 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 )
2009940: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2009944: 80 a0 40 19 cmp %g1, %i1
2009948: 02 80 00 05 be 200995c <_Thread_Change_priority+0x2c>
200994c: ba 10 00 18 mov %i0, %i5
_Thread_Set_priority( the_thread, new_priority );
2009950: 90 10 00 18 mov %i0, %o0
2009954: 40 00 03 88 call 200a774 <_Thread_Set_priority>
2009958: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
200995c: 7f ff e3 00 call 200255c <sparc_disable_interrupts>
2009960: 01 00 00 00 nop
2009964: b2 10 00 08 mov %o0, %i1
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
2009968: f6 07 60 10 ld [ %i5 + 0x10 ], %i3
if ( state != STATES_TRANSIENT ) {
200996c: 80 a6 e0 04 cmp %i3, 4
2009970: 02 80 00 18 be 20099d0 <_Thread_Change_priority+0xa0>
2009974: 80 8f 20 04 btst 4, %i4
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
2009978: 02 80 00 0b be 20099a4 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN
200997c: 82 0e ff fb and %i3, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
2009980: 7f ff e2 fb call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
2009984: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
2009988: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
200998c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2009990: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED
2009994: 32 80 00 0d bne,a 20099c8 <_Thread_Change_priority+0x98> <== NOT EXECUTED
2009998: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED
200999c: 81 c7 e0 08 ret
20099a0: 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 );
20099a4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
20099a8: 7f ff e2 f1 call 200256c <sparc_enable_interrupts>
20099ac: 90 10 00 19 mov %i1, %o0
20099b0: 03 00 00 ef sethi %hi(0x3bc00), %g1
20099b4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( state ) ) {
20099b8: 80 8e c0 01 btst %i3, %g1
20099bc: 02 bf ff f8 be 200999c <_Thread_Change_priority+0x6c>
20099c0: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
20099c4: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
20099c8: 40 00 03 3a call 200a6b0 <_Thread_queue_Requeue>
20099cc: 93 e8 00 1d restore %g0, %i5, %o1
20099d0: 39 00 80 7a sethi %hi(0x201e800), %i4
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
20099d4: 12 80 00 08 bne 20099f4 <_Thread_Change_priority+0xc4> <== NEVER TAKEN
20099d8: b8 17 20 48 or %i4, 0x48, %i4 ! 201e848 <_Scheduler>
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
if ( prepend_it )
20099dc: 80 a6 a0 00 cmp %i2, 0
20099e0: 02 80 00 1b be 2009a4c <_Thread_Change_priority+0x11c>
20099e4: c0 27 60 10 clr [ %i5 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
20099e8: c2 07 20 28 ld [ %i4 + 0x28 ], %g1
20099ec: 9f c0 40 00 call %g1
20099f0: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
20099f4: 7f ff e2 de call 200256c <sparc_enable_interrupts>
20099f8: 90 10 00 19 mov %i1, %o0
20099fc: 7f ff e2 d8 call 200255c <sparc_disable_interrupts>
2009a00: 01 00 00 00 nop
2009a04: b0 10 00 08 mov %o0, %i0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
2009a08: c2 07 20 08 ld [ %i4 + 8 ], %g1
2009a0c: 9f c0 40 00 call %g1
2009a10: 01 00 00 00 nop
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
2009a14: 03 00 80 7e sethi %hi(0x201f800), %g1
2009a18: 82 10 62 00 or %g1, 0x200, %g1 ! 201fa00 <_Per_CPU_Information>
2009a1c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
2009a20: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
2009a24: 80 a0 80 03 cmp %g2, %g3
2009a28: 02 80 00 07 be 2009a44 <_Thread_Change_priority+0x114>
2009a2c: 01 00 00 00 nop
2009a30: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
2009a34: 80 a0 a0 00 cmp %g2, 0
2009a38: 02 80 00 03 be 2009a44 <_Thread_Change_priority+0x114>
2009a3c: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
2009a40: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
_ISR_Enable( level );
2009a44: 7f ff e2 ca call 200256c <sparc_enable_interrupts>
2009a48: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
2009a4c: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
2009a50: 9f c0 40 00 call %g1
2009a54: 90 10 00 1d mov %i5, %o0
2009a58: 30 bf ff e7 b,a 20099f4 <_Thread_Change_priority+0xc4>
02009c74 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
2009c74: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2009c78: 90 10 00 18 mov %i0, %o0
2009c7c: 40 00 00 77 call 2009e58 <_Thread_Get>
2009c80: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2009c84: c2 07 bf fc ld [ %fp + -4 ], %g1
2009c88: 80 a0 60 00 cmp %g1, 0
2009c8c: 12 80 00 09 bne 2009cb0 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN
2009c90: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
2009c94: 7f ff ff 72 call 2009a5c <_Thread_Clear_state>
2009c98: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_END+0xdc00018>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2009c9c: 03 00 80 7d sethi %hi(0x201f400), %g1
2009ca0: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level>
2009ca4: 84 00 bf ff add %g2, -1, %g2
2009ca8: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
return _Thread_Dispatch_disable_level;
2009cac: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1
2009cb0: 81 c7 e0 08 ret
2009cb4: 81 e8 00 00 restore
02009cb8 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
2009cb8: 9d e3 bf 98 save %sp, -104, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2009cbc: 31 00 80 7d sethi %hi(0x201f400), %i0
2009cc0: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 ! 201f4c0 <_Thread_Dispatch_disable_level>
2009cc4: 82 00 60 01 inc %g1
2009cc8: c2 26 20 c0 st %g1, [ %i0 + 0xc0 ]
return _Thread_Dispatch_disable_level;
2009ccc: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
2009cd0: 39 00 80 7e sethi %hi(0x201f800), %i4
2009cd4: b8 17 22 00 or %i4, 0x200, %i4 ! 201fa00 <_Per_CPU_Information>
_ISR_Disable( level );
2009cd8: 7f ff e2 21 call 200255c <sparc_disable_interrupts>
2009cdc: fa 07 20 0c ld [ %i4 + 0xc ], %i5
while ( _Thread_Dispatch_necessary == true ) {
2009ce0: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
2009ce4: 80 a0 60 00 cmp %g1, 0
2009ce8: 02 80 00 45 be 2009dfc <_Thread_Dispatch+0x144>
2009cec: 01 00 00 00 nop
heir = _Thread_Heir;
2009cf0: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
2009cf4: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
2009cf8: 80 a7 40 1b cmp %i5, %i3
2009cfc: 02 80 00 40 be 2009dfc <_Thread_Dispatch+0x144>
2009d00: f6 27 20 0c st %i3, [ %i4 + 0xc ]
2009d04: 33 00 80 7d sethi %hi(0x201f400), %i1
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009d08: 21 00 80 7d sethi %hi(0x201f400), %l0
2009d0c: b2 16 61 4c or %i1, 0x14c, %i1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
2009d10: 10 80 00 35 b 2009de4 <_Thread_Dispatch+0x12c>
2009d14: 35 00 80 7d sethi %hi(0x201f400), %i2
_ISR_Enable( level );
2009d18: 7f ff e2 15 call 200256c <sparc_enable_interrupts>
2009d1c: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
2009d20: 40 00 12 37 call 200e5fc <_TOD_Get_uptime>
2009d24: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2009d28: c4 1f 20 20 ldd [ %i4 + 0x20 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2009d2c: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2
_Timestamp_Subtract(
2009d30: d8 1f bf f8 ldd [ %fp + -8 ], %o4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2009d34: c2 06 40 00 ld [ %i1 ], %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2009d38: 86 a3 40 03 subcc %o5, %g3, %g3
2009d3c: 84 63 00 02 subx %o4, %g2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2009d40: 86 82 c0 03 addcc %o3, %g3, %g3
2009d44: 84 42 80 02 addx %o2, %g2, %g2
2009d48: c4 3f 60 80 std %g2, [ %i5 + 0x80 ]
2009d4c: 80 a0 60 00 cmp %g1, 0
2009d50: 02 80 00 06 be 2009d68 <_Thread_Dispatch+0xb0> <== NEVER TAKEN
2009d54: d8 3f 20 20 std %o4, [ %i4 + 0x20 ]
executing->libc_reent = *_Thread_libc_reent;
2009d58: c4 00 40 00 ld [ %g1 ], %g2
2009d5c: c4 27 61 54 st %g2, [ %i5 + 0x154 ]
*_Thread_libc_reent = heir->libc_reent;
2009d60: c4 06 e1 54 ld [ %i3 + 0x154 ], %g2
2009d64: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
2009d68: 90 10 00 1d mov %i5, %o0
2009d6c: 40 00 03 ae call 200ac24 <_User_extensions_Thread_switch>
2009d70: 92 10 00 1b mov %i3, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
2009d74: 90 07 60 c8 add %i5, 0xc8, %o0
2009d78: 40 00 04 f8 call 200b158 <_CPU_Context_switch>
2009d7c: 92 06 e0 c8 add %i3, 0xc8, %o1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2009d80: c2 07 61 50 ld [ %i5 + 0x150 ], %g1
2009d84: 80 a0 60 00 cmp %g1, 0
2009d88: 02 80 00 0c be 2009db8 <_Thread_Dispatch+0x100>
2009d8c: d0 06 a1 48 ld [ %i2 + 0x148 ], %o0
2009d90: 80 a7 40 08 cmp %i5, %o0
2009d94: 02 80 00 09 be 2009db8 <_Thread_Dispatch+0x100>
2009d98: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
2009d9c: 02 80 00 04 be 2009dac <_Thread_Dispatch+0xf4>
2009da0: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
2009da4: 40 00 04 b3 call 200b070 <_CPU_Context_save_fp>
2009da8: 90 02 21 50 add %o0, 0x150, %o0
_Context_Restore_fp( &executing->fp_context );
2009dac: 40 00 04 ce call 200b0e4 <_CPU_Context_restore_fp>
2009db0: 90 07 61 50 add %i5, 0x150, %o0
_Thread_Allocated_fp = executing;
2009db4: fa 26 a1 48 st %i5, [ %i2 + 0x148 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
2009db8: 7f ff e1 e9 call 200255c <sparc_disable_interrupts>
2009dbc: fa 07 20 0c ld [ %i4 + 0xc ], %i5
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
2009dc0: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
2009dc4: 80 a0 60 00 cmp %g1, 0
2009dc8: 02 80 00 0d be 2009dfc <_Thread_Dispatch+0x144>
2009dcc: 01 00 00 00 nop
heir = _Thread_Heir;
2009dd0: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
2009dd4: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
2009dd8: 80 a6 c0 1d cmp %i3, %i5
2009ddc: 02 80 00 08 be 2009dfc <_Thread_Dispatch+0x144> <== NEVER TAKEN
2009de0: f6 27 20 0c st %i3, [ %i4 + 0xc ]
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
2009de4: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1
2009de8: 80 a0 60 01 cmp %g1, 1
2009dec: 12 bf ff cb bne 2009d18 <_Thread_Dispatch+0x60>
2009df0: c2 04 20 24 ld [ %l0 + 0x24 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009df4: 10 bf ff c9 b 2009d18 <_Thread_Dispatch+0x60>
2009df8: c2 26 e0 74 st %g1, [ %i3 + 0x74 ]
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
2009dfc: 7f ff e1 dc call 200256c <sparc_enable_interrupts>
2009e00: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2009e04: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1
2009e08: 82 00 7f ff add %g1, -1, %g1
2009e0c: c2 26 20 c0 st %g1, [ %i0 + 0xc0 ]
return _Thread_Dispatch_disable_level;
2009e10: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
2009e14: 7f ff f7 8f call 2007c50 <_API_extensions_Run_postswitch>
2009e18: 01 00 00 00 nop
}
2009e1c: 81 c7 e0 08 ret
2009e20: 81 e8 00 00 restore
02011368 <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
2011368: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
201136c: 03 00 80 7e sethi %hi(0x201f800), %g1
2011370: fa 00 62 0c ld [ %g1 + 0x20c ], %i5 ! 201fa0c <_Per_CPU_Information+0xc>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
2011374: 3f 00 80 44 sethi %hi(0x2011000), %i7
2011378: be 17 e3 68 or %i7, 0x368, %i7 ! 2011368 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
201137c: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0
_ISR_Set_level(level);
2011380: 7f ff c4 7b call 200256c <sparc_enable_interrupts>
2011384: 91 2a 20 08 sll %o0, 8, %o0
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2011388: c4 07 61 50 ld [ %i5 + 0x150 ], %g2
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
201138c: 03 00 80 7c sethi %hi(0x201f000), %g1
doneConstructors = true;
2011390: 86 10 20 01 mov 1, %g3
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
2011394: f6 08 61 98 ldub [ %g1 + 0x198 ], %i3
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2011398: 80 a0 a0 00 cmp %g2, 0
201139c: 02 80 00 0c be 20113cc <_Thread_Handler+0x64>
20113a0: c6 28 61 98 stb %g3, [ %g1 + 0x198 ]
#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 );
20113a4: 39 00 80 7d sethi %hi(0x201f400), %i4
20113a8: d0 07 21 48 ld [ %i4 + 0x148 ], %o0 ! 201f548 <_Thread_Allocated_fp>
20113ac: 80 a7 40 08 cmp %i5, %o0
20113b0: 02 80 00 07 be 20113cc <_Thread_Handler+0x64>
20113b4: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
20113b8: 22 80 00 05 be,a 20113cc <_Thread_Handler+0x64>
20113bc: fa 27 21 48 st %i5, [ %i4 + 0x148 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
20113c0: 7f ff e7 2c call 200b070 <_CPU_Context_save_fp>
20113c4: 90 02 21 50 add %o0, 0x150, %o0
_Thread_Allocated_fp = executing;
20113c8: fa 27 21 48 st %i5, [ %i4 + 0x148 ]
/*
* 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 );
20113cc: 7f ff e5 94 call 200aa1c <_User_extensions_Thread_begin>
20113d0: 90 10 00 1d mov %i5, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
20113d4: 7f ff e2 94 call 2009e24 <_Thread_Enable_dispatch>
20113d8: 01 00 00 00 nop
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
20113dc: 80 8e e0 ff btst 0xff, %i3
20113e0: 02 80 00 0e be 2011418 <_Thread_Handler+0xb0>
20113e4: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
20113e8: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
20113ec: 80 a0 60 00 cmp %g1, 0
20113f0: 02 80 00 0e be 2011428 <_Thread_Handler+0xc0>
20113f4: 80 a0 60 01 cmp %g1, 1
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
20113f8: 22 80 00 11 be,a 201143c <_Thread_Handler+0xd4> <== ALWAYS TAKEN
20113fc: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
2011400: 7f ff e5 9b call 200aa6c <_User_extensions_Thread_exitted>
2011404: 90 10 00 1d mov %i5, %o0
_Internal_error_Occurred(
2011408: 90 10 20 00 clr %o0
201140c: 92 10 20 01 mov 1, %o1
2011410: 7f ff dc ff call 200880c <_Internal_error_Occurred>
2011414: 94 10 20 05 mov 5, %o2
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
2011418: 40 00 34 c0 call 201e718 <_init>
201141c: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
2011420: 10 bf ff f3 b 20113ec <_Thread_Handler+0x84>
2011424: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
2011428: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
201142c: 9f c0 40 00 call %g1
2011430: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
2011434: 10 bf ff f3 b 2011400 <_Thread_Handler+0x98>
2011438: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
201143c: 9f c0 40 00 call %g1
2011440: d0 07 60 94 ld [ %i5 + 0x94 ], %o0
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
2011444: 10 bf ff ef b 2011400 <_Thread_Handler+0x98>
2011448: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
02009f08 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2009f08: 9d e3 bf a0 save %sp, -96, %sp
2009f0c: 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;
2009f10: c0 26 61 58 clr [ %i1 + 0x158 ]
2009f14: c0 26 61 5c clr [ %i1 + 0x15c ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
2009f18: c0 26 61 54 clr [ %i1 + 0x154 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2009f1c: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
2009f20: e4 00 40 00 ld [ %g1 ], %l2
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
2009f24: 80 a6 a0 00 cmp %i2, 0
2009f28: 02 80 00 6b be 200a0d4 <_Thread_Initialize+0x1cc>
2009f2c: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
2009f30: c0 2e 60 b0 clrb [ %i1 + 0xb0 ]
2009f34: 90 10 00 1b mov %i3, %o0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
2009f38: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ]
the_stack->size = size;
2009f3c: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2009f40: 80 a7 20 00 cmp %i4, 0
2009f44: 12 80 00 48 bne 200a064 <_Thread_Initialize+0x15c>
2009f48: b6 10 20 00 clr %i3
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2009f4c: 39 00 80 7d sethi %hi(0x201f400), %i4
2009f50: c2 07 21 58 ld [ %i4 + 0x158 ], %g1 ! 201f558 <_Thread_Maximum_extensions>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
2009f54: f6 26 61 50 st %i3, [ %i1 + 0x150 ]
the_thread->Start.fp_context = fp_area;
2009f58: f6 26 60 bc st %i3, [ %i1 + 0xbc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2009f5c: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
2009f60: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
2009f64: c0 26 60 68 clr [ %i1 + 0x68 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2009f68: 80 a0 60 00 cmp %g1, 0
2009f6c: 12 80 00 46 bne 200a084 <_Thread_Initialize+0x17c>
2009f70: c0 26 60 6c clr [ %i1 + 0x6c ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
2009f74: c0 26 61 60 clr [ %i1 + 0x160 ]
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
2009f78: b4 10 20 00 clr %i2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2009f7c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2009f80: e2 2e 60 9c stb %l1, [ %i1 + 0x9c ]
the_thread->Start.budget_algorithm = budget_algorithm;
2009f84: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ]
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
2009f88: 80 a4 20 02 cmp %l0, 2
2009f8c: 12 80 00 05 bne 2009fa0 <_Thread_Initialize+0x98>
2009f90: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ]
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009f94: 03 00 80 7d sethi %hi(0x201f400), %g1
2009f98: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 201f424 <_Thread_Ticks_per_timeslice>
2009f9c: c2 26 60 74 st %g1, [ %i1 + 0x74 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
2009fa0: c4 07 a0 68 ld [ %fp + 0x68 ], %g2
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
2009fa4: 03 00 80 7a sethi %hi(0x201e800), %g1
2009fa8: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201e860 <_Scheduler+0x18>
2009fac: c4 26 60 a8 st %g2, [ %i1 + 0xa8 ]
the_thread->current_state = STATES_DORMANT;
2009fb0: 84 10 20 01 mov 1, %g2
the_thread->Wait.queue = NULL;
2009fb4: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
2009fb8: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
2009fbc: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
2009fc0: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
2009fc4: fa 26 60 ac st %i5, [ %i1 + 0xac ]
2009fc8: 9f c0 40 00 call %g1
2009fcc: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
2009fd0: b8 92 20 00 orcc %o0, 0, %i4
2009fd4: 22 80 00 13 be,a 200a020 <_Thread_Initialize+0x118>
2009fd8: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
goto failed;
_Thread_Set_priority( the_thread, priority );
2009fdc: 90 10 00 19 mov %i1, %o0
2009fe0: 40 00 01 e5 call 200a774 <_Thread_Set_priority>
2009fe4: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2009fe8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2009fec: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
2009ff0: c0 26 60 80 clr [ %i1 + 0x80 ]
2009ff4: c0 26 60 84 clr [ %i1 + 0x84 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2009ff8: 83 28 60 02 sll %g1, 2, %g1
2009ffc: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200a000: e4 26 60 0c st %l2, [ %i1 + 0xc ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
200a004: 90 10 00 19 mov %i1, %o0
200a008: 40 00 02 c0 call 200ab08 <_User_extensions_Thread_create>
200a00c: b0 10 20 01 mov 1, %i0
if ( extension_status )
200a010: 80 8a 20 ff btst 0xff, %o0
200a014: 32 80 00 12 bne,a 200a05c <_Thread_Initialize+0x154>
200a018: b0 0e 20 01 and %i0, 1, %i0
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
200a01c: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
200a020: 40 00 03 ff call 200b01c <_Workspace_Free>
200a024: b0 10 20 00 clr %i0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
200a028: 40 00 03 fd call 200b01c <_Workspace_Free>
200a02c: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
200a030: 40 00 03 fb call 200b01c <_Workspace_Free>
200a034: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
_Workspace_Free( extensions_area );
200a038: 40 00 03 f9 call 200b01c <_Workspace_Free>
200a03c: 90 10 00 1a mov %i2, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
200a040: 40 00 03 f7 call 200b01c <_Workspace_Free>
200a044: 90 10 00 1b mov %i3, %o0
#endif
_Workspace_Free( sched );
200a048: 40 00 03 f5 call 200b01c <_Workspace_Free>
200a04c: 90 10 00 1c mov %i4, %o0
_Thread_Stack_Free( the_thread );
200a050: 40 00 02 0d call 200a884 <_Thread_Stack_Free>
200a054: 90 10 00 19 mov %i1, %o0
return false;
}
200a058: b0 0e 20 01 and %i0, 1, %i0
200a05c: 81 c7 e0 08 ret
200a060: 81 e8 00 00 restore
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
200a064: 40 00 03 e6 call 200affc <_Workspace_Allocate>
200a068: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
200a06c: b6 92 20 00 orcc %o0, 0, %i3
200a070: 32 bf ff b8 bne,a 2009f50 <_Thread_Initialize+0x48>
200a074: 39 00 80 7d sethi %hi(0x201f400), %i4
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
200a078: b4 10 20 00 clr %i2
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
200a07c: 10 bf ff e8 b 200a01c <_Thread_Initialize+0x114>
200a080: b8 10 20 00 clr %i4
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
200a084: 82 00 60 01 inc %g1
200a088: 40 00 03 dd call 200affc <_Workspace_Allocate>
200a08c: 91 28 60 02 sll %g1, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
200a090: b4 92 20 00 orcc %o0, 0, %i2
200a094: 02 80 00 1d be 200a108 <_Thread_Initialize+0x200>
200a098: 86 10 00 1a mov %i2, %g3
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200a09c: f4 26 61 60 st %i2, [ %i1 + 0x160 ]
200a0a0: c8 07 21 58 ld [ %i4 + 0x158 ], %g4
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
200a0a4: 84 10 20 00 clr %g2
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200a0a8: 10 80 00 03 b 200a0b4 <_Thread_Initialize+0x1ac>
200a0ac: 82 10 20 00 clr %g1
200a0b0: c6 06 61 60 ld [ %i1 + 0x160 ], %g3
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
200a0b4: 85 28 a0 02 sll %g2, 2, %g2
200a0b8: 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++ )
200a0bc: 82 00 60 01 inc %g1
200a0c0: 80 a0 40 04 cmp %g1, %g4
200a0c4: 08 bf ff fb bleu 200a0b0 <_Thread_Initialize+0x1a8>
200a0c8: 84 10 00 01 mov %g1, %g2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
200a0cc: 10 bf ff ad b 2009f80 <_Thread_Initialize+0x78>
200a0d0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200a0d4: 90 10 00 19 mov %i1, %o0
200a0d8: 40 00 01 d0 call 200a818 <_Thread_Stack_Allocate>
200a0dc: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
200a0e0: 80 a2 00 1b cmp %o0, %i3
200a0e4: 0a 80 00 07 bcs 200a100 <_Thread_Initialize+0x1f8>
200a0e8: 80 a2 20 00 cmp %o0, 0
200a0ec: 02 80 00 05 be 200a100 <_Thread_Initialize+0x1f8> <== NEVER TAKEN
200a0f0: 82 10 20 01 mov 1, %g1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
200a0f4: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2
the_thread->Start.core_allocated_stack = true;
200a0f8: 10 bf ff 90 b 2009f38 <_Thread_Initialize+0x30>
200a0fc: c2 2e 60 b0 stb %g1, [ %i1 + 0xb0 ]
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
200a100: 10 bf ff d6 b 200a058 <_Thread_Initialize+0x150>
200a104: b0 10 20 00 clr %i0
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
200a108: 10 bf ff c5 b 200a01c <_Thread_Initialize+0x114>
200a10c: b8 10 20 00 clr %i4
0200a884 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
200a884: 9d e3 bf a0 save %sp, -96, %sp
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
200a888: c2 0e 20 b0 ldub [ %i0 + 0xb0 ], %g1
200a88c: 80 a0 60 00 cmp %g1, 0
200a890: 02 80 00 0b be 200a8bc <_Thread_Stack_Free+0x38> <== NEVER TAKEN
200a894: 01 00 00 00 nop
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
200a898: 03 00 80 79 sethi %hi(0x201e400), %g1
200a89c: c2 00 63 84 ld [ %g1 + 0x384 ], %g1 ! 201e784 <Configuration+0x28>
200a8a0: 80 a0 60 00 cmp %g1, 0
200a8a4: 22 80 00 08 be,a 200a8c4 <_Thread_Stack_Free+0x40>
200a8a8: f0 06 20 b8 ld [ %i0 + 0xb8 ], %i0
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
200a8ac: 9f c0 40 00 call %g1
200a8b0: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0
200a8b4: 81 c7 e0 08 ret
200a8b8: 81 e8 00 00 restore
200a8bc: 81 c7 e0 08 ret <== NOT EXECUTED
200a8c0: 81 e8 00 00 restore <== NOT EXECUTED
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
200a8c4: 40 00 01 d6 call 200b01c <_Workspace_Free>
200a8c8: 81 e8 00 00 restore
0200a6b0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200a6b0: 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 )
200a6b4: 80 a6 20 00 cmp %i0, 0
200a6b8: 02 80 00 13 be 200a704 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
200a6bc: 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 ) {
200a6c0: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
200a6c4: 80 a7 20 01 cmp %i4, 1
200a6c8: 02 80 00 04 be 200a6d8 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
200a6cc: 01 00 00 00 nop
200a6d0: 81 c7 e0 08 ret <== NOT EXECUTED
200a6d4: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
200a6d8: 7f ff df a1 call 200255c <sparc_disable_interrupts>
200a6dc: 01 00 00 00 nop
200a6e0: ba 10 00 08 mov %o0, %i5
200a6e4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200a6e8: 03 00 00 ef sethi %hi(0x3bc00), %g1
200a6ec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200a6f0: 80 88 80 01 btst %g2, %g1
200a6f4: 12 80 00 06 bne 200a70c <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
200a6f8: 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 );
200a6fc: 7f ff df 9c call 200256c <sparc_enable_interrupts>
200a700: 90 10 00 1d mov %i5, %o0
200a704: 81 c7 e0 08 ret
200a708: 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 );
200a70c: 92 10 00 19 mov %i1, %o1
200a710: 94 10 20 01 mov 1, %o2
200a714: 40 00 11 9e call 200ed8c <_Thread_queue_Extract_priority_helper>
200a718: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
200a71c: 90 10 00 18 mov %i0, %o0
200a720: 92 10 00 19 mov %i1, %o1
200a724: 7f ff ff 35 call 200a3f8 <_Thread_queue_Enqueue_priority>
200a728: 94 07 bf fc add %fp, -4, %o2
200a72c: 30 bf ff f4 b,a 200a6fc <_Thread_queue_Requeue+0x4c>
0200a730 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200a730: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a734: 90 10 00 18 mov %i0, %o0
200a738: 7f ff fd c8 call 2009e58 <_Thread_Get>
200a73c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a740: c2 07 bf fc ld [ %fp + -4 ], %g1
200a744: 80 a0 60 00 cmp %g1, 0
200a748: 12 80 00 09 bne 200a76c <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN
200a74c: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200a750: 40 00 11 c8 call 200ee70 <_Thread_queue_Process_timeout>
200a754: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a758: 03 00 80 7d sethi %hi(0x201f400), %g1
200a75c: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level>
200a760: 84 00 bf ff add %g2, -1, %g2
200a764: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
return _Thread_Dispatch_disable_level;
200a768: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1
200a76c: 81 c7 e0 08 ret
200a770: 81 e8 00 00 restore
020173cc <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
20173cc: 9d e3 bf 78 save %sp, -136, %sp
20173d0: 21 00 80 f5 sethi %hi(0x203d400), %l0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
20173d4: a4 07 bf e8 add %fp, -24, %l2
20173d8: b4 07 bf ec add %fp, -20, %i2
20173dc: b8 07 bf f4 add %fp, -12, %i4
20173e0: a2 07 bf f8 add %fp, -8, %l1
20173e4: 33 00 80 f5 sethi %hi(0x203d400), %i1
20173e8: 2b 00 80 f5 sethi %hi(0x203d400), %l5
20173ec: 82 06 20 34 add %i0, 0x34, %g1
20173f0: f4 27 bf e8 st %i2, [ %fp + -24 ]
head->previous = NULL;
20173f4: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
20173f8: e4 27 bf f0 st %l2, [ %fp + -16 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
20173fc: e2 27 bf f4 st %l1, [ %fp + -12 ]
head->previous = NULL;
2017400: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
2017404: f8 27 bf fc st %i4, [ %fp + -4 ]
2017408: a0 14 23 40 or %l0, 0x340, %l0
201740c: ba 06 20 30 add %i0, 0x30, %i5
2017410: b2 16 62 c0 or %i1, 0x2c0, %i1
2017414: b6 06 20 68 add %i0, 0x68, %i3
2017418: aa 15 62 30 or %l5, 0x230, %l5
201741c: a8 06 20 08 add %i0, 8, %l4
2017420: c2 27 bf e4 st %g1, [ %fp + -28 ]
2017424: a6 06 20 40 add %i0, 0x40, %l3
2017428: ae 06 20 6c add %i0, 0x6c, %l7
_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;
201742c: ac 10 20 01 mov 1, %l6
{
/*
* 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;
2017430: e4 26 20 78 st %l2, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2017434: c2 04 00 00 ld [ %l0 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
2017438: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
201743c: 90 10 00 1d mov %i5, %o0
2017440: 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;
2017444: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2017448: 40 00 13 15 call 201c09c <_Watchdog_Adjust_to_chain>
201744c: 94 10 00 1c mov %i4, %o2
2017450: d0 1e 40 00 ldd [ %i1 ], %o0
2017454: 94 10 20 00 clr %o2
2017458: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
201745c: 40 00 58 0a call 202d484 <__divdi3>
2017460: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2017464: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
2017468: 80 a2 40 0a cmp %o1, %o2
201746c: 18 80 00 2d bgu 2017520 <_Timer_server_Body+0x154>
2017470: 82 10 00 09 mov %o1, %g1
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
2017474: 80 a2 40 0a cmp %o1, %o2
2017478: 0a 80 00 20 bcs 20174f8 <_Timer_server_Body+0x12c>
201747c: 94 22 80 01 sub %o2, %g1, %o2
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
2017480: c2 26 20 74 st %g1, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2017484: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2017488: 40 00 02 fa call 2018070 <_Chain_Get>
201748c: 01 00 00 00 nop
if ( timer == NULL ) {
2017490: 92 92 20 00 orcc %o0, 0, %o1
2017494: 02 80 00 10 be 20174d4 <_Timer_server_Body+0x108>
2017498: 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 ) {
201749c: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
20174a0: 80 a0 60 01 cmp %g1, 1
20174a4: 02 80 00 1b be 2017510 <_Timer_server_Body+0x144>
20174a8: 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 ) {
20174ac: 12 bf ff f6 bne 2017484 <_Timer_server_Body+0xb8> <== NEVER TAKEN
20174b0: 92 02 60 10 add %o1, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
20174b4: 40 00 13 2b call 201c160 <_Watchdog_Insert>
20174b8: 90 10 00 1b mov %i3, %o0
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
20174bc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
20174c0: 40 00 02 ec call 2018070 <_Chain_Get>
20174c4: 01 00 00 00 nop
if ( timer == NULL ) {
20174c8: 92 92 20 00 orcc %o0, 0, %o1
20174cc: 32 bf ff f5 bne,a 20174a0 <_Timer_server_Body+0xd4> <== NEVER TAKEN
20174d0: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
20174d4: 7f ff df 62 call 200f25c <sparc_disable_interrupts>
20174d8: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
20174dc: c2 07 bf e8 ld [ %fp + -24 ], %g1
20174e0: 80 a0 40 1a cmp %g1, %i2
20174e4: 02 80 00 16 be 201753c <_Timer_server_Body+0x170> <== ALWAYS TAKEN
20174e8: 01 00 00 00 nop
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
20174ec: 7f ff df 60 call 200f26c <sparc_enable_interrupts> <== NOT EXECUTED
20174f0: 01 00 00 00 nop <== NOT EXECUTED
20174f4: 30 bf ff d0 b,a 2017434 <_Timer_server_Body+0x68> <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
20174f8: c2 27 bf e0 st %g1, [ %fp + -32 ]
20174fc: 90 10 00 1b mov %i3, %o0
2017500: 40 00 12 b8 call 201bfe0 <_Watchdog_Adjust>
2017504: 92 10 20 01 mov 1, %o1
2017508: 10 bf ff de b 2017480 <_Timer_server_Body+0xb4>
201750c: c2 07 bf e0 ld [ %fp + -32 ], %g1
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2017510: 90 10 00 1d mov %i5, %o0
2017514: 40 00 13 13 call 201c160 <_Watchdog_Insert>
2017518: 92 02 60 10 add %o1, 0x10, %o1
201751c: 30 bf ff da b,a 2017484 <_Timer_server_Body+0xb8>
/*
* 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 );
2017520: 92 22 40 0a sub %o1, %o2, %o1
2017524: c2 27 bf e0 st %g1, [ %fp + -32 ]
2017528: 90 10 00 1b mov %i3, %o0
201752c: 40 00 12 dc call 201c09c <_Watchdog_Adjust_to_chain>
2017530: 94 10 00 1c mov %i4, %o2
2017534: 10 bf ff d3 b 2017480 <_Timer_server_Body+0xb4>
2017538: c2 07 bf e0 ld [ %fp + -32 ], %g1
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
201753c: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2017540: 7f ff df 4b call 200f26c <sparc_enable_interrupts>
2017544: 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 ) ) {
2017548: c2 07 bf f4 ld [ %fp + -12 ], %g1
201754c: 80 a0 40 11 cmp %g1, %l1
2017550: 12 80 00 0d bne 2017584 <_Timer_server_Body+0x1b8>
2017554: 01 00 00 00 nop
2017558: 30 80 00 14 b,a 20175a8 <_Timer_server_Body+0x1dc>
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
new_first->previous = head;
201755c: f8 20 60 04 st %i4, [ %g1 + 4 ]
* 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;
2017560: c0 20 a0 08 clr [ %g2 + 8 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
2017564: c2 27 bf f4 st %g1, [ %fp + -12 ]
_ISR_Enable( level );
2017568: 7f ff df 41 call 200f26c <sparc_enable_interrupts>
201756c: c4 27 bf dc st %g2, [ %fp + -36 ]
/*
* 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 );
2017570: c4 07 bf dc ld [ %fp + -36 ], %g2
2017574: d0 00 a0 20 ld [ %g2 + 0x20 ], %o0
2017578: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
201757c: 9f c0 40 00 call %g1
2017580: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
2017584: 7f ff df 36 call 200f25c <sparc_disable_interrupts>
2017588: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
201758c: c4 07 bf f4 ld [ %fp + -12 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2017590: 80 a0 80 11 cmp %g2, %l1
2017594: 32 bf ff f2 bne,a 201755c <_Timer_server_Body+0x190>
2017598: c2 00 80 00 ld [ %g2 ], %g1
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
201759c: 7f ff df 34 call 200f26c <sparc_enable_interrupts>
20175a0: 01 00 00 00 nop
20175a4: 30 bf ff a3 b,a 2017430 <_Timer_server_Body+0x64>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
20175a8: c0 2e 20 7c clrb [ %i0 + 0x7c ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20175ac: c2 05 40 00 ld [ %l5 ], %g1
20175b0: 82 00 60 01 inc %g1
20175b4: c2 25 40 00 st %g1, [ %l5 ]
return _Thread_Dispatch_disable_level;
20175b8: c2 05 40 00 ld [ %l5 ], %g1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
20175bc: d0 06 00 00 ld [ %i0 ], %o0
20175c0: 40 00 11 3d call 201bab4 <_Thread_Set_state>
20175c4: 92 10 20 08 mov 8, %o1
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
20175c8: 40 00 13 48 call 201c2e8 <_Watchdog_Remove>
20175cc: 90 10 00 14 mov %l4, %o0
{
ISR_Level level;
_Timer_server_Stop_interval_system_watchdog( ts );
_ISR_Disable( level );
20175d0: 7f ff df 23 call 200f25c <sparc_disable_interrupts>
20175d4: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20175d8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
20175dc: c4 07 bf e4 ld [ %fp + -28 ], %g2
20175e0: 80 a0 40 02 cmp %g1, %g2
20175e4: 02 80 00 25 be 2017678 <_Timer_server_Body+0x2ac>
20175e8: 01 00 00 00 nop
Watchdog_Interval delta_interval =
20175ec: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
_Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval;
_ISR_Enable( level );
20175f0: 7f ff df 1f call 200f26c <sparc_enable_interrupts>
20175f4: c2 27 bf e0 st %g1, [ %fp + -32 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20175f8: c2 07 bf e0 ld [ %fp + -32 ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20175fc: 92 10 00 14 mov %l4, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2017600: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2017604: 11 00 80 f5 sethi %hi(0x203d400), %o0
2017608: 40 00 12 d6 call 201c160 <_Watchdog_Insert>
201760c: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 203d6f0 <_Watchdog_Ticks_chain>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2017610: 40 00 13 36 call 201c2e8 <_Watchdog_Remove>
2017614: 90 10 00 13 mov %l3, %o0
{
ISR_Level level;
_Timer_server_Stop_tod_system_watchdog( ts );
_ISR_Disable( level );
2017618: 7f ff df 11 call 200f25c <sparc_disable_interrupts>
201761c: 01 00 00 00 nop
2017620: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2017624: 80 a0 40 17 cmp %g1, %l7
2017628: 02 80 00 1e be 20176a0 <_Timer_server_Body+0x2d4>
201762c: 01 00 00 00 nop
Watchdog_Interval delta_interval =
2017630: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
_Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval;
_ISR_Enable( level );
2017634: 7f ff df 0e call 200f26c <sparc_enable_interrupts>
2017638: c2 27 bf e0 st %g1, [ %fp + -32 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
201763c: c2 07 bf e0 ld [ %fp + -32 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2017640: 11 00 80 f5 sethi %hi(0x203d400), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2017644: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2017648: 90 12 22 e4 or %o0, 0x2e4, %o0
201764c: 40 00 12 c5 call 201c160 <_Watchdog_Insert>
2017650: 92 10 00 13 mov %l3, %o1
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
2017654: 40 00 0e 98 call 201b0b4 <_Thread_Enable_dispatch>
2017658: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
201765c: 90 10 00 14 mov %l4, %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;
2017660: ec 2e 20 7c stb %l6, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2017664: 40 00 13 21 call 201c2e8 <_Watchdog_Remove>
2017668: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
201766c: 40 00 13 1f call 201c2e8 <_Watchdog_Remove>
2017670: 90 10 00 13 mov %l3, %o0
2017674: 30 bf ff 6f b,a 2017430 <_Timer_server_Body+0x64>
_Watchdog_Insert_ticks(
&ts->Interval_watchdogs.System_watchdog,
delta_interval
);
} else {
_ISR_Enable( level );
2017678: 7f ff de fd call 200f26c <sparc_enable_interrupts>
201767c: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2017680: 40 00 13 1a call 201c2e8 <_Watchdog_Remove>
2017684: 90 10 00 13 mov %l3, %o0
{
ISR_Level level;
_Timer_server_Stop_tod_system_watchdog( ts );
_ISR_Disable( level );
2017688: 7f ff de f5 call 200f25c <sparc_disable_interrupts>
201768c: 01 00 00 00 nop
2017690: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2017694: 80 a0 40 17 cmp %g1, %l7
2017698: 32 bf ff e7 bne,a 2017634 <_Timer_server_Body+0x268>
201769c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
_Watchdog_Insert_seconds(
&ts->TOD_watchdogs.System_watchdog,
delta_interval
);
} else {
_ISR_Enable( level );
20176a0: 7f ff de f3 call 200f26c <sparc_enable_interrupts>
20176a4: 01 00 00 00 nop
20176a8: 30 bf ff eb b,a 2017654 <_Timer_server_Body+0x288>
020171e4 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
20171e4: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
20171e8: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
20171ec: 80 a0 60 00 cmp %g1, 0
20171f0: 02 80 00 05 be 2017204 <_Timer_server_Schedule_operation_method+0x20>
20171f4: ba 10 00 19 mov %i1, %i5
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
20171f8: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
20171fc: 40 00 03 89 call 2018020 <_Chain_Append>
2017200: 81 e8 00 00 restore
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2017204: 03 00 80 f5 sethi %hi(0x203d400), %g1
2017208: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 203d630 <_Thread_Dispatch_disable_level>
201720c: 84 00 a0 01 inc %g2
2017210: c4 20 62 30 st %g2, [ %g1 + 0x230 ]
return _Thread_Dispatch_disable_level;
2017214: c2 00 62 30 ld [ %g1 + 0x230 ], %g1
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2017218: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
201721c: 80 a0 60 01 cmp %g1, 1
2017220: 02 80 00 3b be 201730c <_Timer_server_Schedule_operation_method+0x128>
2017224: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2017228: 02 80 00 04 be 2017238 <_Timer_server_Schedule_operation_method+0x54>
201722c: 01 00 00 00 nop
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2017230: 40 00 0f a1 call 201b0b4 <_Thread_Enable_dispatch>
2017234: 81 e8 00 00 restore
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2017238: 7f ff e0 09 call 200f25c <sparc_disable_interrupts>
201723c: 01 00 00 00 nop
2017240: b8 10 00 08 mov %o0, %i4
2017244: 03 00 80 f5 sethi %hi(0x203d400), %g1
2017248: d0 18 62 c0 ldd [ %g1 + 0x2c0 ], %o0 ! 203d6c0 <_TOD_Now>
201724c: 94 10 20 00 clr %o2
2017250: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017254: 40 00 58 8c call 202d484 <__divdi3>
2017258: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
201725c: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
2017260: c4 06 20 74 ld [ %i0 + 0x74 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2017264: b6 06 20 6c add %i0, 0x6c, %i3
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2017268: 80 a0 40 1b cmp %g1, %i3
201726c: 02 80 00 0c be 201729c <_Timer_server_Schedule_operation_method+0xb8>
2017270: 80 a2 40 02 cmp %o1, %g2
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
2017274: c8 00 60 10 ld [ %g1 + 0x10 ], %g4
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
2017278: 86 01 00 02 add %g4, %g2, %g3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
201727c: 08 80 00 07 bleu 2017298 <_Timer_server_Schedule_operation_method+0xb4>
2017280: 86 20 c0 09 sub %g3, %o1, %g3
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
2017284: 84 22 40 02 sub %o1, %g2, %g2
if (delta_interval > delta) {
2017288: 80 a1 00 02 cmp %g4, %g2
201728c: 08 80 00 03 bleu 2017298 <_Timer_server_Schedule_operation_method+0xb4><== NEVER TAKEN
2017290: 86 10 20 00 clr %g3
delta_interval -= delta;
2017294: 86 21 00 02 sub %g4, %g2, %g3
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
2017298: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
201729c: d2 26 20 74 st %o1, [ %i0 + 0x74 ]
_ISR_Enable( level );
20172a0: 7f ff df f3 call 200f26c <sparc_enable_interrupts>
20172a4: 90 10 00 1c mov %i4, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
20172a8: 90 06 20 68 add %i0, 0x68, %o0
20172ac: 40 00 13 ad call 201c160 <_Watchdog_Insert>
20172b0: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
20172b4: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
20172b8: 80 a0 60 00 cmp %g1, 0
20172bc: 12 bf ff dd bne 2017230 <_Timer_server_Schedule_operation_method+0x4c>
20172c0: b8 06 20 40 add %i0, 0x40, %i4
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
20172c4: 40 00 14 09 call 201c2e8 <_Watchdog_Remove>
20172c8: 90 10 00 1c mov %i4, %o0
{
ISR_Level level;
_Timer_server_Stop_tod_system_watchdog( ts );
_ISR_Disable( level );
20172cc: 7f ff df e4 call 200f25c <sparc_disable_interrupts>
20172d0: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20172d4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
20172d8: 80 a6 c0 01 cmp %i3, %g1
20172dc: 02 80 00 38 be 20173bc <_Timer_server_Schedule_operation_method+0x1d8><== NEVER TAKEN
20172e0: 01 00 00 00 nop
Watchdog_Interval delta_interval =
20172e4: fa 00 60 10 ld [ %g1 + 0x10 ], %i5
_Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval;
_ISR_Enable( level );
20172e8: 7f ff df e1 call 200f26c <sparc_enable_interrupts>
20172ec: 01 00 00 00 nop
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20172f0: 92 10 00 1c mov %i4, %o1
20172f4: 11 00 80 f5 sethi %hi(0x203d400), %o0
20172f8: 90 12 22 e4 or %o0, 0x2e4, %o0 ! 203d6e4 <_Watchdog_Seconds_chain>
20172fc: 40 00 13 99 call 201c160 <_Watchdog_Insert>
2017300: fa 26 20 4c st %i5, [ %i0 + 0x4c ]
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2017304: 40 00 0f 6c call 201b0b4 <_Thread_Enable_dispatch>
2017308: 81 e8 00 00 restore
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
201730c: 7f ff df d4 call 200f25c <sparc_disable_interrupts>
2017310: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
2017314: 05 00 80 f5 sethi %hi(0x203d400), %g2
2017318: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
201731c: c4 00 a3 40 ld [ %g2 + 0x340 ], %g2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
2017320: c8 06 20 3c ld [ %i0 + 0x3c ], %g4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2017324: b8 06 20 34 add %i0, 0x34, %i4
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
2017328: 80 a0 40 1c cmp %g1, %i4
201732c: 02 80 00 08 be 201734c <_Timer_server_Schedule_operation_method+0x168>
2017330: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
2017334: f6 00 60 10 ld [ %g1 + 0x10 ], %i3
if (delta_interval > delta) {
2017338: 80 a1 00 1b cmp %g4, %i3
201733c: 1a 80 00 03 bcc 2017348 <_Timer_server_Schedule_operation_method+0x164>
2017340: 86 10 20 00 clr %g3
delta_interval -= delta;
2017344: 86 26 c0 04 sub %i3, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
2017348: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
201734c: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
2017350: 7f ff df c7 call 200f26c <sparc_enable_interrupts>
2017354: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2017358: 90 06 20 30 add %i0, 0x30, %o0
201735c: 40 00 13 81 call 201c160 <_Watchdog_Insert>
2017360: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2017364: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2017368: 80 a0 60 00 cmp %g1, 0
201736c: 12 bf ff b1 bne 2017230 <_Timer_server_Schedule_operation_method+0x4c>
2017370: b6 06 20 08 add %i0, 8, %i3
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2017374: 40 00 13 dd call 201c2e8 <_Watchdog_Remove>
2017378: 90 10 00 1b mov %i3, %o0
{
ISR_Level level;
_Timer_server_Stop_interval_system_watchdog( ts );
_ISR_Disable( level );
201737c: 7f ff df b8 call 200f25c <sparc_disable_interrupts>
2017380: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017384: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
2017388: 80 a7 00 01 cmp %i4, %g1
201738c: 02 80 00 0c be 20173bc <_Timer_server_Schedule_operation_method+0x1d8>
2017390: 01 00 00 00 nop
Watchdog_Interval delta_interval =
2017394: fa 00 60 10 ld [ %g1 + 0x10 ], %i5
_Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval;
_ISR_Enable( level );
2017398: 7f ff df b5 call 200f26c <sparc_enable_interrupts>
201739c: 01 00 00 00 nop
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20173a0: 92 10 00 1b mov %i3, %o1
20173a4: 11 00 80 f5 sethi %hi(0x203d400), %o0
20173a8: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 203d6f0 <_Watchdog_Ticks_chain>
20173ac: 40 00 13 6d call 201c160 <_Watchdog_Insert>
20173b0: fa 26 20 14 st %i5, [ %i0 + 0x14 ]
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
20173b4: 40 00 0f 40 call 201b0b4 <_Thread_Enable_dispatch>
20173b8: 81 e8 00 00 restore
_Watchdog_Insert_seconds(
&ts->TOD_watchdogs.System_watchdog,
delta_interval
);
} else {
_ISR_Enable( level );
20173bc: 7f ff df ac call 200f26c <sparc_enable_interrupts>
20173c0: 01 00 00 00 nop
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
20173c4: 40 00 0f 3c call 201b0b4 <_Thread_Enable_dispatch>
20173c8: 81 e8 00 00 restore
0200c810 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
200c810: 9d e3 bf a0 save %sp, -96, %sp
200c814: 82 10 00 18 mov %i0, %g1
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
200c818: c6 06 00 00 ld [ %i0 ], %g3
time->tv_nsec += add->tv_nsec;
200c81c: c8 00 60 04 ld [ %g1 + 4 ], %g4
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
200c820: f0 06 40 00 ld [ %i1 ], %i0
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
200c824: c4 06 60 04 ld [ %i1 + 4 ], %g2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
200c828: 86 00 c0 18 add %g3, %i0, %g3
time->tv_nsec += add->tv_nsec;
200c82c: 84 01 00 02 add %g4, %g2, %g2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
200c830: 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 ) {
200c834: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4
200c838: 88 11 21 ff or %g4, 0x1ff, %g4 ! 3b9ac9ff <RAM_END+0x395ac9ff>
200c83c: 80 a0 80 04 cmp %g2, %g4
200c840: 08 80 00 0b bleu 200c86c <_Timespec_Add_to+0x5c> <== ALWAYS TAKEN
200c844: c4 20 60 04 st %g2, [ %g1 + 4 ]
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
200c848: 1f 31 19 4d sethi %hi(0xc4653400), %o7 <== NOT EXECUTED
200c84c: 9e 13 e2 00 or %o7, 0x200, %o7 ! c4653600 <RAM_END+0xc2253600><== NOT EXECUTED
200c850: 84 00 80 0f add %g2, %o7, %g2 <== NOT EXECUTED
time->tv_sec++;
200c854: 86 00 e0 01 inc %g3 <== NOT EXECUTED
/* 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 ) {
200c858: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED
200c85c: 18 bf ff fd bgu 200c850 <_Timespec_Add_to+0x40> <== NOT EXECUTED
200c860: b0 06 20 01 inc %i0 <== NOT EXECUTED
200c864: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED
200c868: c6 20 40 00 st %g3, [ %g1 ] <== NOT EXECUTED
time->tv_sec++;
seconds++;
}
return seconds;
}
200c86c: 81 c7 e0 08 ret
200c870: 81 e8 00 00 restore
0200a2d0 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200a2d0: 9d e3 bf 88 save %sp, -120, %sp
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a2d4: da 06 40 00 ld [ %i1 ], %o5
right += rhs->tv_nsec;
200a2d8: ea 06 60 04 ld [ %i1 + 4 ], %l5
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a2dc: 99 3b 60 1f sra %o5, 0x1f, %o4
200a2e0: 83 2b 20 03 sll %o4, 3, %g1
200a2e4: 87 2b 60 03 sll %o5, 3, %g3
200a2e8: 89 33 60 1d srl %o5, 0x1d, %g4
200a2ec: 84 11 00 01 or %g4, %g1, %g2
200a2f0: 83 30 e0 1b srl %g3, 0x1b, %g1
200a2f4: 95 28 a0 05 sll %g2, 5, %o2
200a2f8: 97 28 e0 05 sll %g3, 5, %o3
200a2fc: 94 10 40 0a or %g1, %o2, %o2
200a300: 96 a2 c0 03 subcc %o3, %g3, %o3
200a304: 83 32 e0 1a srl %o3, 0x1a, %g1
200a308: 94 62 80 02 subx %o2, %g2, %o2
200a30c: 93 2a e0 06 sll %o3, 6, %o1
200a310: 91 2a a0 06 sll %o2, 6, %o0
200a314: 96 a2 40 0b subcc %o1, %o3, %o3
200a318: 90 10 40 08 or %g1, %o0, %o0
200a31c: 94 62 00 0a subx %o0, %o2, %o2
200a320: 96 82 c0 0d addcc %o3, %o5, %o3
200a324: 83 32 e0 1e srl %o3, 0x1e, %g1
200a328: 94 42 80 0c addx %o2, %o4, %o2
200a32c: bb 2a e0 02 sll %o3, 2, %i5
200a330: b9 2a a0 02 sll %o2, 2, %i4
200a334: 96 82 c0 1d addcc %o3, %i5, %o3
200a338: b8 10 40 1c or %g1, %i4, %i4
200a33c: 83 32 e0 1e srl %o3, 0x1e, %g1
200a340: 94 42 80 1c addx %o2, %i4, %o2
200a344: a3 2a e0 02 sll %o3, 2, %l1
200a348: a1 2a a0 02 sll %o2, 2, %l0
200a34c: 96 82 c0 11 addcc %o3, %l1, %o3
200a350: a0 10 40 10 or %g1, %l0, %l0
200a354: 83 32 e0 1e srl %o3, 0x1e, %g1
200a358: 94 42 80 10 addx %o2, %l0, %o2
200a35c: a7 2a e0 02 sll %o3, 2, %l3
200a360: a5 2a a0 02 sll %o2, 2, %l2
200a364: 96 82 c0 13 addcc %o3, %l3, %o3
200a368: a4 10 40 12 or %g1, %l2, %l2
200a36c: 83 2a e0 09 sll %o3, 9, %g1
200a370: 94 42 80 12 addx %o2, %l2, %o2
200a374: 87 32 e0 17 srl %o3, 0x17, %g3
200a378: 85 2a a0 09 sll %o2, 9, %g2
right += rhs->tv_nsec;
200a37c: 96 80 40 15 addcc %g1, %l5, %o3
200a380: a9 3d 60 1f sra %l5, 0x1f, %l4
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a384: 94 10 c0 02 or %g3, %g2, %o2
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a388: c8 06 00 00 ld [ %i0 ], %g4
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
200a38c: 94 42 80 14 addx %o2, %l4, %o2
if ( right == 0 ) {
200a390: 80 92 80 0b orcc %o2, %o3, %g0
200a394: 02 80 00 64 be 200a524 <_Timespec_Divide+0x254> <== ALWAYS TAKEN
200a398: c2 06 20 04 ld [ %i0 + 4 ], %g1
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
200a39c: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
200a3a0: 83 38 60 1f sra %g1, 0x1f, %g1 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a3a4: 9f 31 20 1d srl %g4, 0x1d, %o7 <== NOT EXECUTED
200a3a8: ba 10 00 04 mov %g4, %i5 <== NOT EXECUTED
200a3ac: b9 39 20 1f sra %g4, 0x1f, %i4 <== NOT EXECUTED
200a3b0: 9b 2f 60 03 sll %i5, 3, %o5 <== NOT EXECUTED
200a3b4: 89 2f 20 03 sll %i4, 3, %g4 <== NOT EXECUTED
left += lhs->tv_nsec;
200a3b8: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a3bc: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED
200a3c0: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED
200a3c4: 83 30 e0 1a srl %g3, 0x1a, %g1 <== NOT EXECUTED
200a3c8: 98 13 c0 04 or %o7, %g4, %o4 <== NOT EXECUTED
200a3cc: 93 28 e0 06 sll %g3, 6, %o1 <== NOT EXECUTED
200a3d0: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED
200a3d4: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED
200a3d8: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
200a3dc: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED
200a3e0: 86 a2 40 03 subcc %o1, %g3, %g3 <== NOT EXECUTED
200a3e4: 91 28 a0 06 sll %g2, 6, %o0 <== NOT EXECUTED
200a3e8: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
200a3ec: 84 62 00 02 subx %o0, %g2, %g2 <== NOT EXECUTED
200a3f0: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED
200a3f4: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200a3f8: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED
200a3fc: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED
200a400: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED
200a404: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED
200a408: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED
200a40c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200a410: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED
200a414: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED
200a418: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED
200a41c: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED
200a420: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED
200a424: b3 28 e0 02 sll %g3, 2, %i1 <== NOT EXECUTED
200a428: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED
200a42c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200a430: b1 28 a0 02 sll %g2, 2, %i0 <== NOT EXECUTED
200a434: 86 80 c0 19 addcc %g3, %i1, %g3 <== NOT EXECUTED
200a438: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED
200a43c: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED
200a440: 84 40 80 18 addx %g2, %i0, %g2 <== NOT EXECUTED
200a444: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED
200a448: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED
left += lhs->tv_nsec;
200a44c: f8 1f bf e8 ldd [ %fp + -24 ], %i4 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a450: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED
left += lhs->tv_nsec;
200a454: 9a 80 40 1d addcc %g1, %i5, %o5 <== NOT EXECUTED
200a458: 98 40 80 1c addx %g2, %i4, %o4 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a45c: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED
200a460: 83 2b 20 02 sll %o4, 2, %g1 <== NOT EXECUTED
200a464: af 2b 60 02 sll %o5, 2, %l7 <== NOT EXECUTED
200a468: ac 10 80 01 or %g2, %g1, %l6 <== NOT EXECUTED
200a46c: ab 2d e0 05 sll %l7, 5, %l5 <== NOT EXECUTED
200a470: 83 35 e0 1b srl %l7, 0x1b, %g1 <== NOT EXECUTED
200a474: 86 a5 40 17 subcc %l5, %l7, %g3 <== NOT EXECUTED
200a478: a9 2d a0 05 sll %l6, 5, %l4 <== NOT EXECUTED
200a47c: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED
200a480: 84 65 00 16 subx %l4, %l6, %g2 <== NOT EXECUTED
200a484: 86 80 c0 0d addcc %g3, %o5, %g3 <== NOT EXECUTED
200a488: 84 40 80 0c addx %g2, %o4, %g2 <== NOT EXECUTED
200a48c: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED
200a490: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED
200a494: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200a498: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED
200a49c: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED
200a4a0: c8 27 bf f8 st %g4, [ %fp + -8 ] <== NOT EXECUTED
200a4a4: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED
200a4a8: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED
200a4ac: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED
200a4b0: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED
200a4b4: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED
200a4b8: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200a4bc: f8 27 bf f4 st %i4, [ %fp + -12 ] <== NOT EXECUTED
200a4c0: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED
200a4c4: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED
200a4c8: f8 1f bf f0 ldd [ %fp + -16 ], %i4 <== NOT EXECUTED
200a4cc: 92 80 c0 1d addcc %g3, %i5, %o1 <== NOT EXECUTED
200a4d0: 90 40 80 1c addx %g2, %i4, %o0 <== NOT EXECUTED
200a4d4: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED
200a4d8: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
200a4dc: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED
200a4e0: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
200a4e4: 40 00 41 f4 call 201acb4 <__udivdi3> <== NOT EXECUTED
200a4e8: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200a4ec: 94 10 20 00 clr %o2 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a4f0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200a4f4: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200a4f8: 40 00 41 ef call 201acb4 <__udivdi3> <== NOT EXECUTED
200a4fc: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
*fval_percentage = answer % 1000;
200a500: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200a504: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED
*fval_percentage = answer % 1000;
200a508: 94 10 20 00 clr %o2 <== NOT EXECUTED
200a50c: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
200a510: 40 00 42 be call 201b008 <__umoddi3> <== NOT EXECUTED
200a514: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200a518: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
200a51c: 81 c7 e0 08 ret <== NOT EXECUTED
200a520: 81 e8 00 00 restore <== NOT EXECUTED
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
200a524: c0 26 80 00 clr [ %i2 ]
*fval_percentage = 0;
200a528: c0 26 c0 00 clr [ %i3 ]
return;
200a52c: 81 c7 e0 08 ret
200a530: 81 e8 00 00 restore
0200c250 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
200c250: 9d e3 bf a0 save %sp, -96, %sp
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
200c254: d4 1e 40 00 ldd [ %i1 ], %o2
200c258: 80 92 80 0b orcc %o2, %o3, %g0
200c25c: 22 80 00 2f be,a 200c318 <_Timestamp64_Divide+0xc8> <== NEVER TAKEN
200c260: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200c264: f8 1e 00 00 ldd [ %i0 ], %i4
200c268: 83 2f 20 02 sll %i4, 2, %g1
200c26c: 9b 2f 60 02 sll %i5, 2, %o5
200c270: 89 37 60 1e srl %i5, 0x1e, %g4
200c274: 98 11 00 01 or %g4, %g1, %o4
200c278: 83 33 60 1b srl %o5, 0x1b, %g1
200c27c: 85 2b 20 05 sll %o4, 5, %g2
200c280: 87 2b 60 05 sll %o5, 5, %g3
200c284: 84 10 40 02 or %g1, %g2, %g2
200c288: 86 a0 c0 0d subcc %g3, %o5, %g3
200c28c: 84 60 80 0c subx %g2, %o4, %g2
200c290: 86 80 c0 1d addcc %g3, %i5, %g3
200c294: 83 30 e0 1e srl %g3, 0x1e, %g1
200c298: 84 40 80 1c addx %g2, %i4, %g2
200c29c: 93 28 e0 02 sll %g3, 2, %o1
200c2a0: 91 28 a0 02 sll %g2, 2, %o0
200c2a4: 86 80 c0 09 addcc %g3, %o1, %g3
200c2a8: 90 10 40 08 or %g1, %o0, %o0
200c2ac: 83 30 e0 1e srl %g3, 0x1e, %g1
200c2b0: 84 40 80 08 addx %g2, %o0, %g2
200c2b4: b3 28 e0 02 sll %g3, 2, %i1
200c2b8: b1 28 a0 02 sll %g2, 2, %i0
200c2bc: 92 80 c0 19 addcc %g3, %i1, %o1
200c2c0: b0 10 40 18 or %g1, %i0, %i0
200c2c4: 87 32 60 1b srl %o1, 0x1b, %g3
200c2c8: 90 40 80 18 addx %g2, %i0, %o0
200c2cc: 83 2a 60 05 sll %o1, 5, %g1
200c2d0: 85 2a 20 05 sll %o0, 5, %g2
200c2d4: 92 10 00 01 mov %g1, %o1
200c2d8: 40 00 41 a4 call 201c968 <__divdi3>
200c2dc: 90 10 c0 02 or %g3, %g2, %o0
*_ival_percentage = answer / 1000;
200c2e0: 94 10 20 00 clr %o2
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200c2e4: b0 10 00 08 mov %o0, %i0
200c2e8: b8 10 00 09 mov %o1, %i4
*_ival_percentage = answer / 1000;
200c2ec: 40 00 41 9f call 201c968 <__divdi3>
200c2f0: 96 10 23 e8 mov 0x3e8, %o3
*_fval_percentage = answer % 1000;
200c2f4: 90 10 00 18 mov %i0, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
200c2f8: d2 26 80 00 st %o1, [ %i2 ]
*_fval_percentage = answer % 1000;
200c2fc: 94 10 20 00 clr %o2
200c300: 96 10 23 e8 mov 0x3e8, %o3
200c304: 40 00 42 7f call 201cd00 <__moddi3>
200c308: 92 10 00 1c mov %i4, %o1
200c30c: d2 26 c0 00 st %o1, [ %i3 ]
200c310: 81 c7 e0 08 ret
200c314: 81 e8 00 00 restore
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
*_fval_percentage = 0;
200c318: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
return;
200c31c: 81 c7 e0 08 ret <== NOT EXECUTED
200c320: 81 e8 00 00 restore <== NOT EXECUTED
0200aab8 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
200aab8: 9d e3 bf a0 save %sp, -96, %sp
200aabc: 39 00 80 7d sethi %hi(0x201f400), %i4
200aac0: b8 17 22 a8 or %i4, 0x2a8, %i4 ! 201f6a8 <_User_extensions_List>
200aac4: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200aac8: 80 a7 40 1c cmp %i5, %i4
200aacc: 02 80 00 0d be 200ab00 <_User_extensions_Fatal+0x48> <== NEVER TAKEN
200aad0: 01 00 00 00 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
200aad4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200aad8: 80 a0 60 00 cmp %g1, 0
200aadc: 02 80 00 05 be 200aaf0 <_User_extensions_Fatal+0x38>
200aae0: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
200aae4: 92 10 00 19 mov %i1, %o1
200aae8: 9f c0 40 00 call %g1
200aaec: 94 10 00 1a mov %i2, %o2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200aaf0: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200aaf4: 80 a7 40 1c cmp %i5, %i4
200aaf8: 32 bf ff f8 bne,a 200aad8 <_User_extensions_Fatal+0x20>
200aafc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200ab00: 81 c7 e0 08 ret
200ab04: 81 e8 00 00 restore
0200a964 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
200a964: 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;
200a968: 07 00 80 79 sethi %hi(0x201e400), %g3
200a96c: 86 10 e3 5c or %g3, 0x35c, %g3 ! 201e75c <Configuration>
initial_extensions = Configuration.User_extension_table;
200a970: f6 00 e0 40 ld [ %g3 + 0x40 ], %i3
200a974: 3b 00 80 7d sethi %hi(0x201f400), %i5
200a978: 09 00 80 7d sethi %hi(0x201f400), %g4
200a97c: 84 17 62 a8 or %i5, 0x2a8, %g2
200a980: 82 11 20 c4 or %g4, 0xc4, %g1
200a984: b4 00 a0 04 add %g2, 4, %i2
200a988: b8 00 60 04 add %g1, 4, %i4
200a98c: f4 27 62 a8 st %i2, [ %i5 + 0x2a8 ]
head->previous = NULL;
200a990: c0 20 a0 04 clr [ %g2 + 4 ]
tail->previous = head;
200a994: c4 20 a0 08 st %g2, [ %g2 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200a998: f8 21 20 c4 st %i4, [ %g4 + 0xc4 ]
head->previous = NULL;
200a99c: c0 20 60 04 clr [ %g1 + 4 ]
tail->previous = head;
200a9a0: c2 20 60 08 st %g1, [ %g1 + 8 ]
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
200a9a4: 80 a6 e0 00 cmp %i3, 0
200a9a8: 02 80 00 1b be 200aa14 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200a9ac: f4 00 e0 3c ld [ %g3 + 0x3c ], %i2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
200a9b0: 83 2e a0 02 sll %i2, 2, %g1
200a9b4: b9 2e a0 04 sll %i2, 4, %i4
200a9b8: b8 27 00 01 sub %i4, %g1, %i4
200a9bc: b8 07 00 1a add %i4, %i2, %i4
200a9c0: b9 2f 20 02 sll %i4, 2, %i4
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200a9c4: 40 00 01 9c call 200b034 <_Workspace_Allocate_or_fatal_error>
200a9c8: 90 10 00 1c mov %i4, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200a9cc: 92 10 20 00 clr %o1
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200a9d0: ba 10 00 08 mov %o0, %i5
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200a9d4: 40 00 1d 97 call 2012030 <memset>
200a9d8: 94 10 00 1c mov %i4, %o2
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200a9dc: 80 a6 a0 00 cmp %i2, 0
200a9e0: 02 80 00 0d be 200aa14 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200a9e4: b8 10 20 00 clr %i4
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
200a9e8: 92 10 00 1b mov %i3, %o1
200a9ec: 94 10 20 20 mov 0x20, %o2
200a9f0: 40 00 1d 54 call 2011f40 <memcpy>
200a9f4: 90 07 60 14 add %i5, 0x14, %o0
_User_extensions_Add_set( extension );
200a9f8: 40 00 11 62 call 200ef80 <_User_extensions_Add_set>
200a9fc: 90 10 00 1d mov %i5, %o0
200aa00: b8 07 20 01 inc %i4
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
200aa04: ba 07 60 34 add %i5, 0x34, %i5
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200aa08: 80 a7 00 1a cmp %i4, %i2
200aa0c: 12 bf ff f7 bne 200a9e8 <_User_extensions_Handler_initialization+0x84>
200aa10: b6 06 e0 20 add %i3, 0x20, %i3
200aa14: 81 c7 e0 08 ret
200aa18: 81 e8 00 00 restore
0200aa1c <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
200aa1c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200aa20: 39 00 80 7d sethi %hi(0x201f400), %i4
200aa24: fa 07 22 a8 ld [ %i4 + 0x2a8 ], %i5 ! 201f6a8 <_User_extensions_List>
200aa28: b8 17 22 a8 or %i4, 0x2a8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200aa2c: b8 07 20 04 add %i4, 4, %i4
200aa30: 80 a7 40 1c cmp %i5, %i4
200aa34: 02 80 00 0c be 200aa64 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
200aa38: 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 )
200aa3c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200aa40: 80 a0 60 00 cmp %g1, 0
200aa44: 02 80 00 04 be 200aa54 <_User_extensions_Thread_begin+0x38>
200aa48: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
200aa4c: 9f c0 40 00 call %g1
200aa50: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200aa54: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200aa58: 80 a7 40 1c cmp %i5, %i4
200aa5c: 32 bf ff f9 bne,a 200aa40 <_User_extensions_Thread_begin+0x24>
200aa60: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200aa64: 81 c7 e0 08 ret
200aa68: 81 e8 00 00 restore
0200ab08 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
200ab08: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200ab0c: 39 00 80 7d sethi %hi(0x201f400), %i4
200ab10: fa 07 22 a8 ld [ %i4 + 0x2a8 ], %i5 ! 201f6a8 <_User_extensions_List>
200ab14: b8 17 22 a8 or %i4, 0x2a8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200ab18: b8 07 20 04 add %i4, 4, %i4
200ab1c: 80 a7 40 1c cmp %i5, %i4
200ab20: 02 80 00 12 be 200ab68 <_User_extensions_Thread_create+0x60><== NEVER TAKEN
200ab24: 82 10 20 01 mov 1, %g1
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
200ab28: 37 00 80 7e sethi %hi(0x201f800), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
200ab2c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200ab30: 80 a0 60 00 cmp %g1, 0
200ab34: 02 80 00 08 be 200ab54 <_User_extensions_Thread_create+0x4c>
200ab38: 84 16 e2 00 or %i3, 0x200, %g2
status = (*the_extension->Callouts.thread_create)(
200ab3c: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200ab40: 9f c0 40 00 call %g1
200ab44: 92 10 00 18 mov %i0, %o1
_Thread_Executing,
the_thread
);
if ( !status )
200ab48: 80 8a 20 ff btst 0xff, %o0
200ab4c: 02 80 00 0a be 200ab74 <_User_extensions_Thread_create+0x6c>
200ab50: 82 10 20 00 clr %g1
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200ab54: fa 07 40 00 ld [ %i5 ], %i5
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200ab58: 80 a7 40 1c cmp %i5, %i4
200ab5c: 32 bf ff f5 bne,a 200ab30 <_User_extensions_Thread_create+0x28>
200ab60: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if ( !status )
return false;
}
}
return true;
200ab64: 82 10 20 01 mov 1, %g1
}
200ab68: b0 08 60 01 and %g1, 1, %i0
200ab6c: 81 c7 e0 08 ret
200ab70: 81 e8 00 00 restore
200ab74: b0 08 60 01 and %g1, 1, %i0
200ab78: 81 c7 e0 08 ret
200ab7c: 81 e8 00 00 restore
0200ab80 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
200ab80: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200ab84: 39 00 80 7d sethi %hi(0x201f400), %i4
200ab88: b8 17 22 a8 or %i4, 0x2a8, %i4 ! 201f6a8 <_User_extensions_List>
200ab8c: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200ab90: 80 a7 40 1c cmp %i5, %i4
200ab94: 02 80 00 0d be 200abc8 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN
200ab98: 37 00 80 7e sethi %hi(0x201f800), %i3
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
200ab9c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200aba0: 80 a0 60 00 cmp %g1, 0
200aba4: 02 80 00 05 be 200abb8 <_User_extensions_Thread_delete+0x38>
200aba8: 84 16 e2 00 or %i3, 0x200, %g2
(*the_extension->Callouts.thread_delete)(
200abac: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200abb0: 9f c0 40 00 call %g1
200abb4: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200abb8: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200abbc: 80 a7 40 1c cmp %i5, %i4
200abc0: 32 bf ff f8 bne,a 200aba0 <_User_extensions_Thread_delete+0x20>
200abc4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200abc8: 81 c7 e0 08 ret
200abcc: 81 e8 00 00 restore
0200aa6c <_User_extensions_Thread_exitted>:
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
200aa6c: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200aa70: 39 00 80 7d sethi %hi(0x201f400), %i4
200aa74: b8 17 22 a8 or %i4, 0x2a8, %i4 ! 201f6a8 <_User_extensions_List>
200aa78: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200aa7c: 80 a7 40 1c cmp %i5, %i4
200aa80: 02 80 00 0c be 200aab0 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
200aa84: 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 )
200aa88: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200aa8c: 80 a0 60 00 cmp %g1, 0
200aa90: 02 80 00 04 be 200aaa0 <_User_extensions_Thread_exitted+0x34>
200aa94: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
200aa98: 9f c0 40 00 call %g1
200aa9c: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200aaa0: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200aaa4: 80 a7 40 1c cmp %i5, %i4
200aaa8: 32 bf ff f9 bne,a 200aa8c <_User_extensions_Thread_exitted+0x20>
200aaac: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200aab0: 81 c7 e0 08 ret
200aab4: 81 e8 00 00 restore
0200b410 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
200b410: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b414: 39 00 80 80 sethi %hi(0x2020000), %i4
200b418: fa 07 21 b8 ld [ %i4 + 0x1b8 ], %i5 ! 20201b8 <_User_extensions_List>
200b41c: b8 17 21 b8 or %i4, 0x1b8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b420: b8 07 20 04 add %i4, 4, %i4
200b424: 80 a7 40 1c cmp %i5, %i4
200b428: 02 80 00 0d be 200b45c <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
200b42c: 37 00 80 81 sethi %hi(0x2020400), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
200b430: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200b434: 80 a0 60 00 cmp %g1, 0
200b438: 02 80 00 05 be 200b44c <_User_extensions_Thread_restart+0x3c>
200b43c: 84 16 e1 10 or %i3, 0x110, %g2
(*the_extension->Callouts.thread_restart)(
200b440: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b444: 9f c0 40 00 call %g1
200b448: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b44c: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b450: 80 a7 40 1c cmp %i5, %i4
200b454: 32 bf ff f8 bne,a 200b434 <_User_extensions_Thread_restart+0x24>
200b458: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200b45c: 81 c7 e0 08 ret
200b460: 81 e8 00 00 restore
0200abd0 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
200abd0: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200abd4: 39 00 80 7d sethi %hi(0x201f400), %i4
200abd8: fa 07 22 a8 ld [ %i4 + 0x2a8 ], %i5 ! 201f6a8 <_User_extensions_List>
200abdc: b8 17 22 a8 or %i4, 0x2a8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200abe0: b8 07 20 04 add %i4, 4, %i4
200abe4: 80 a7 40 1c cmp %i5, %i4
200abe8: 02 80 00 0d be 200ac1c <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
200abec: 37 00 80 7e sethi %hi(0x201f800), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
200abf0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200abf4: 80 a0 60 00 cmp %g1, 0
200abf8: 02 80 00 05 be 200ac0c <_User_extensions_Thread_start+0x3c>
200abfc: 84 16 e2 00 or %i3, 0x200, %g2
(*the_extension->Callouts.thread_start)(
200ac00: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200ac04: 9f c0 40 00 call %g1
200ac08: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200ac0c: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200ac10: 80 a7 40 1c cmp %i5, %i4
200ac14: 32 bf ff f8 bne,a 200abf4 <_User_extensions_Thread_start+0x24>
200ac18: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200ac1c: 81 c7 e0 08 ret
200ac20: 81 e8 00 00 restore
0200ac24 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
200ac24: 9d e3 bf a0 save %sp, -96, %sp
200ac28: 39 00 80 7d sethi %hi(0x201f400), %i4
200ac2c: fa 07 20 c4 ld [ %i4 + 0xc4 ], %i5 ! 201f4c4 <_User_extensions_Switches_list>
200ac30: b8 17 20 c4 or %i4, 0xc4, %i4
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200ac34: b8 07 20 04 add %i4, 4, %i4
200ac38: 80 a7 40 1c cmp %i5, %i4
200ac3c: 02 80 00 0a be 200ac64 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
200ac40: 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 );
200ac44: c2 07 60 08 ld [ %i5 + 8 ], %g1
200ac48: 90 10 00 18 mov %i0, %o0
200ac4c: 9f c0 40 00 call %g1
200ac50: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
200ac54: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200ac58: 80 a7 40 1c cmp %i5, %i4
200ac5c: 32 bf ff fb bne,a 200ac48 <_User_extensions_Thread_switch+0x24>
200ac60: c2 07 60 08 ld [ %i5 + 8 ], %g1
200ac64: 81 c7 e0 08 ret
200ac68: 81 e8 00 00 restore
0200c66c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200c66c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200c670: 7f ff db 0e call 20032a8 <sparc_disable_interrupts>
200c674: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c678: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c67c: b6 06 20 04 add %i0, 4, %i3
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200c680: 80 a0 40 1b cmp %g1, %i3
200c684: 02 80 00 1e be 200c6fc <_Watchdog_Adjust+0x90>
200c688: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200c68c: 12 80 00 1e bne 200c704 <_Watchdog_Adjust+0x98>
200c690: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200c694: 80 a6 a0 00 cmp %i2, 0
200c698: 02 80 00 19 be 200c6fc <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200c69c: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200c6a0: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200c6a4: 80 a6 80 1c cmp %i2, %i4
200c6a8: 1a 80 00 0a bcc 200c6d0 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN
200c6ac: b2 10 20 01 mov 1, %i1
_Watchdog_First( header )->delta_interval -= units;
200c6b0: 10 80 00 1c b 200c720 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED
200c6b4: b8 27 00 1a sub %i4, %i2, %i4 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200c6b8: 02 80 00 11 be 200c6fc <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200c6bc: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200c6c0: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200c6c4: 80 a7 00 1a cmp %i4, %i2
200c6c8: 38 80 00 16 bgu,a 200c720 <_Watchdog_Adjust+0xb4>
200c6cc: b8 27 00 1a sub %i4, %i2, %i4
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
200c6d0: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
_ISR_Enable( level );
200c6d4: 7f ff da f9 call 20032b8 <sparc_enable_interrupts>
200c6d8: 01 00 00 00 nop
_Watchdog_Tickle( header );
200c6dc: 40 00 00 ab call 200c988 <_Watchdog_Tickle>
200c6e0: 90 10 00 1d mov %i5, %o0
_ISR_Disable( level );
200c6e4: 7f ff da f1 call 20032a8 <sparc_disable_interrupts>
200c6e8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c6ec: c2 07 40 00 ld [ %i5 ], %g1
if ( _Chain_Is_empty( header ) )
200c6f0: 80 a6 c0 01 cmp %i3, %g1
200c6f4: 32 bf ff f1 bne,a 200c6b8 <_Watchdog_Adjust+0x4c>
200c6f8: b4 a6 80 1c subcc %i2, %i4, %i2
}
break;
}
}
_ISR_Enable( level );
200c6fc: 7f ff da ef call 20032b8 <sparc_enable_interrupts>
200c700: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
200c704: 12 bf ff fe bne 200c6fc <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200c708: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200c70c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200c710: b4 00 80 1a add %g2, %i2, %i2
200c714: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
200c718: 7f ff da e8 call 20032b8 <sparc_enable_interrupts>
200c71c: 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;
200c720: 10 bf ff f7 b 200c6fc <_Watchdog_Adjust+0x90>
200c724: f8 20 60 10 st %i4, [ %g1 + 0x10 ]
0200adf4 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
200adf4: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
200adf8: 7f ff dd d9 call 200255c <sparc_disable_interrupts>
200adfc: 01 00 00 00 nop
previous_state = the_watchdog->state;
200ae00: fa 06 20 08 ld [ %i0 + 8 ], %i5
switch ( previous_state ) {
200ae04: 80 a7 60 01 cmp %i5, 1
200ae08: 02 80 00 2a be 200aeb0 <_Watchdog_Remove+0xbc>
200ae0c: 03 00 80 7d sethi %hi(0x201f400), %g1
200ae10: 1a 80 00 09 bcc 200ae34 <_Watchdog_Remove+0x40>
200ae14: 80 a7 60 03 cmp %i5, 3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200ae18: 03 00 80 7d sethi %hi(0x201f400), %g1
200ae1c: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 201f5d0 <_Watchdog_Ticks_since_boot>
200ae20: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200ae24: 7f ff dd d2 call 200256c <sparc_enable_interrupts>
200ae28: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200ae2c: 81 c7 e0 08 ret
200ae30: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
200ae34: 18 bf ff fa bgu 200ae1c <_Watchdog_Remove+0x28> <== NEVER TAKEN
200ae38: 03 00 80 7d sethi %hi(0x201f400), %g1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
200ae3c: c2 06 00 00 ld [ %i0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
200ae40: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200ae44: c4 00 40 00 ld [ %g1 ], %g2
200ae48: 80 a0 a0 00 cmp %g2, 0
200ae4c: 02 80 00 07 be 200ae68 <_Watchdog_Remove+0x74>
200ae50: 05 00 80 7d sethi %hi(0x201f400), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200ae54: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200ae58: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
200ae5c: 84 00 c0 02 add %g3, %g2, %g2
200ae60: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200ae64: 05 00 80 7d sethi %hi(0x201f400), %g2
200ae68: c4 00 a1 cc ld [ %g2 + 0x1cc ], %g2 ! 201f5cc <_Watchdog_Sync_count>
200ae6c: 80 a0 a0 00 cmp %g2, 0
200ae70: 22 80 00 07 be,a 200ae8c <_Watchdog_Remove+0x98>
200ae74: c4 06 20 04 ld [ %i0 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
200ae78: 05 00 80 7e sethi %hi(0x201f800), %g2
200ae7c: c6 00 a2 08 ld [ %g2 + 0x208 ], %g3 ! 201fa08 <_Per_CPU_Information+0x8>
200ae80: 05 00 80 7d sethi %hi(0x201f400), %g2
200ae84: c6 20 a1 6c st %g3, [ %g2 + 0x16c ] ! 201f56c <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200ae88: c4 06 20 04 ld [ %i0 + 4 ], %g2
next->previous = previous;
200ae8c: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
200ae90: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200ae94: 03 00 80 7d sethi %hi(0x201f400), %g1
200ae98: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 201f5d0 <_Watchdog_Ticks_since_boot>
200ae9c: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200aea0: 7f ff dd b3 call 200256c <sparc_enable_interrupts>
200aea4: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200aea8: 81 c7 e0 08 ret
200aeac: 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;
200aeb0: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %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;
200aeb4: 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;
200aeb8: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200aebc: 7f ff dd ac call 200256c <sparc_enable_interrupts>
200aec0: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200aec4: 81 c7 e0 08 ret
200aec8: 81 e8 00 00 restore
0200c00c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200c00c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200c010: 7f ff db 87 call 2002e2c <sparc_disable_interrupts>
200c014: 01 00 00 00 nop
200c018: ba 10 00 08 mov %o0, %i5
printk( "Watchdog Chain: %s %p\n", name, header );
200c01c: 11 00 80 7c sethi %hi(0x201f000), %o0
200c020: 94 10 00 19 mov %i1, %o2
200c024: 92 10 00 18 mov %i0, %o1
200c028: 7f ff e3 22 call 2004cb0 <printk>
200c02c: 90 12 23 80 or %o0, 0x380, %o0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c030: f8 06 40 00 ld [ %i1 ], %i4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c034: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200c038: 80 a7 00 19 cmp %i4, %i1
200c03c: 02 80 00 0f be 200c078 <_Watchdog_Report_chain+0x6c>
200c040: 11 00 80 7c sethi %hi(0x201f000), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200c044: 92 10 00 1c mov %i4, %o1
200c048: 40 00 00 0f call 200c084 <_Watchdog_Report>
200c04c: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
200c050: f8 07 00 00 ld [ %i4 ], %i4
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
200c054: 80 a7 00 19 cmp %i4, %i1
200c058: 12 bf ff fc bne 200c048 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
200c05c: 92 10 00 1c mov %i4, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200c060: 11 00 80 7c sethi %hi(0x201f000), %o0
200c064: 92 10 00 18 mov %i0, %o1
200c068: 7f ff e3 12 call 2004cb0 <printk>
200c06c: 90 12 23 98 or %o0, 0x398, %o0
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
200c070: 7f ff db 73 call 2002e3c <sparc_enable_interrupts>
200c074: 91 e8 00 1d restore %g0, %i5, %o0
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200c078: 7f ff e3 0e call 2004cb0 <printk>
200c07c: 90 12 23 a8 or %o0, 0x3a8, %o0
200c080: 30 bf ff fc b,a 200c070 <_Watchdog_Report_chain+0x64>
0200af74 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
200af74: 9d e3 bf a0 save %sp, -96, %sp
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
200af78: 05 00 80 79 sethi %hi(0x201e400), %g2
200af7c: 82 10 a3 5c or %g2, 0x35c, %g1 ! 201e75c <Configuration>
uintptr_t size = rtems_configuration_get_work_space_size();
200af80: c6 08 60 2e ldub [ %g1 + 0x2e ], %g3
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
200af84: f8 00 a3 5c ld [ %g2 + 0x35c ], %i4
uintptr_t size = rtems_configuration_get_work_space_size();
200af88: fa 00 60 04 ld [ %g1 + 4 ], %i5
200af8c: 80 a0 e0 00 cmp %g3, 0
200af90: 12 80 00 03 bne 200af9c <_Workspace_Handler_initialization+0x28><== NEVER TAKEN
200af94: 84 10 20 00 clr %g2
200af98: c4 00 60 08 ld [ %g1 + 8 ], %g2
if ( rtems_configuration_get_do_zero_of_workspace() )
200af9c: c2 08 60 2c ldub [ %g1 + 0x2c ], %g1
200afa0: 80 a0 60 00 cmp %g1, 0
200afa4: 12 80 00 0d bne 200afd8 <_Workspace_Handler_initialization+0x64>
200afa8: ba 00 80 1d add %g2, %i5, %i5
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
200afac: 92 10 00 1c mov %i4, %o1
200afb0: 11 00 80 7d sethi %hi(0x201f400), %o0
200afb4: 94 10 00 1d mov %i5, %o2
200afb8: 90 12 20 e0 or %o0, 0xe0, %o0
200afbc: 7f ff f5 6b call 2008568 <_Heap_Initialize>
200afc0: 96 10 20 08 mov 8, %o3
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
200afc4: 80 a2 20 00 cmp %o0, 0
200afc8: 02 80 00 0a be 200aff0 <_Workspace_Handler_initialization+0x7c>
200afcc: 92 10 20 01 mov 1, %o1
200afd0: 81 c7 e0 08 ret
200afd4: 81 e8 00 00 restore
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
uintptr_t size = rtems_configuration_get_work_space_size();
if ( rtems_configuration_get_do_zero_of_workspace() )
memset( starting_address, 0, size );
200afd8: 90 10 00 1c mov %i4, %o0
200afdc: 92 10 20 00 clr %o1
200afe0: 40 00 1c 14 call 2012030 <memset>
200afe4: 94 10 00 1d mov %i5, %o2
memory_available = _Heap_Initialize(
200afe8: 10 bf ff f2 b 200afb0 <_Workspace_Handler_initialization+0x3c>
200afec: 92 10 00 1c mov %i4, %o1
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
200aff0: 7f ff f6 07 call 200880c <_Internal_error_Occurred>
200aff4: 94 10 20 02 mov 2, %o2
0200ce24 <_close_r>:
int _close_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
200ce24: 9d e3 bf a0 save %sp, -96, %sp
)
{
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
200ce28: 03 00 80 7a sethi %hi(0x201e800), %g1
200ce2c: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c <rtems_libio_number_iops>
200ce30: 80 a6 40 01 cmp %i1, %g1
200ce34: 1a 80 00 14 bcc 200ce84 <_close_r+0x60> <== NEVER TAKEN
200ce38: 03 00 80 7c sethi %hi(0x201f000), %g1
iop = rtems_libio_iop(fd);
200ce3c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 201f2f8 <rtems_libio_iops>
200ce40: b3 2e 60 06 sll %i1, 6, %i1
200ce44: b2 00 40 19 add %g1, %i1, %i1
rtems_libio_check_is_open(iop);
200ce48: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200ce4c: 80 88 61 00 btst 0x100, %g1
200ce50: 02 80 00 0d be 200ce84 <_close_r+0x60>
200ce54: 01 00 00 00 nop
rc = RTEMS_SUCCESSFUL;
rc = (*iop->pathinfo.handlers->close_h)( iop );
200ce58: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
200ce5c: c2 00 60 04 ld [ %g1 + 4 ], %g1
200ce60: 9f c0 40 00 call %g1
200ce64: 90 10 00 19 mov %i1, %o0
200ce68: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &iop->pathinfo );
200ce6c: 7f ff d9 1a call 20032d4 <rtems_filesystem_freenode>
200ce70: 90 06 60 1c add %i1, 0x1c, %o0
rtems_libio_free( iop );
200ce74: 40 00 00 96 call 200d0cc <rtems_libio_free>
200ce78: 90 10 00 19 mov %i1, %o0
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return close( fd );
}
200ce7c: 81 c7 e0 08 ret
200ce80: 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);
200ce84: 40 00 11 d3 call 20115d0 <__errno>
200ce88: b0 10 3f ff mov -1, %i0
200ce8c: 82 10 20 09 mov 9, %g1
200ce90: c2 22 00 00 st %g1, [ %o0 ]
200ce94: 81 c7 e0 08 ret
200ce98: 81 e8 00 00 restore
020152f8 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
20152f8: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
20152fc: c0 27 bf fc clr [ %fp + -4 ]
uint32_t count,
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2015300: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2015304: 80 a6 e0 00 cmp %i3, 0
2015308: 12 80 00 12 bne 2015350 <_fat_block_read+0x58> <== ALWAYS TAKEN
201530c: b0 10 20 00 clr %i0
2015310: 30 80 00 1a b,a 2015378 <_fat_block_read+0x80> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2015314: e0 17 40 00 lduh [ %i5 ], %l0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2015318: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
201531c: a0 24 00 1a sub %l0, %i2, %l0
2015320: 80 a4 00 1b cmp %l0, %i3
2015324: 08 80 00 03 bleu 2015330 <_fat_block_read+0x38>
2015328: b2 06 60 01 inc %i1
201532c: a0 10 00 1b mov %i3, %l0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2015330: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
2015334: 94 10 00 10 mov %l0, %o2
2015338: 40 00 30 4f call 2021474 <memcpy>
201533c: 92 02 40 1a add %o1, %i2, %o1
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2015340: b6 a6 c0 10 subcc %i3, %l0, %i3
2015344: 02 80 00 0d be 2015378 <_fat_block_read+0x80>
2015348: b0 04 00 18 add %l0, %i0, %i0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
ofs = 0;
201534c: b4 10 20 00 clr %i2
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2015350: 92 10 00 19 mov %i1, %o1
2015354: 94 10 20 01 mov 1, %o2
2015358: 96 07 bf fc add %fp, -4, %o3
201535c: 7f ff ff 57 call 20150b8 <fat_buf_access>
2015360: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
2015364: 80 a2 20 00 cmp %o0, 0
2015368: 02 bf ff eb be 2015314 <_fat_block_read+0x1c> <== ALWAYS TAKEN
201536c: 90 07 00 18 add %i4, %i0, %o0
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
2015370: 81 c7 e0 08 ret <== NOT EXECUTED
2015374: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
2015378: 81 c7 e0 08 ret
201537c: 81 e8 00 00 restore
0201543c <_fat_block_release>:
*/
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
201543c: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2015440: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED
2015444: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2015448: 02 80 00 05 be 201545c <_fat_block_release+0x20> <== NOT EXECUTED
201544c: 01 00 00 00 nop <== NOT EXECUTED
2015450: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2015454: 7f ff fe c2 call 2014f5c <fat_buf_release.part.1> <== NOT EXECUTED
2015458: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
}
201545c: 81 c3 e0 08 retl <== NOT EXECUTED
2015460: 90 10 20 00 clr %o0 <== NOT EXECUTED
02015380 <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
2015380: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
2015384: c0 27 bf fc clr [ %fp + -4 ]
uint32_t offset,
uint32_t count,
const void *buff)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2015388: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
201538c: a2 10 20 01 mov 1, %l1
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
2015390: 80 a6 e0 00 cmp %i3, 0
2015394: 12 80 00 14 bne 20153e4 <_fat_block_write+0x64> <== ALWAYS TAKEN
2015398: b0 10 20 00 clr %i0
201539c: 30 80 00 26 b,a 2015434 <_fat_block_write+0xb4> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
20153a0: 96 07 bf fc add %fp, -4, %o3
20153a4: 7f ff ff 45 call 20150b8 <fat_buf_access>
20153a8: 90 10 00 10 mov %l0, %o0
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
20153ac: 92 07 00 18 add %i4, %i0, %o1
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
20153b0: 80 a2 20 00 cmp %o0, 0
20153b4: 12 80 00 1e bne 201542c <_fat_block_write+0xac> <== NEVER TAKEN
20153b8: 94 10 00 1d mov %i5, %o2
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
20153bc: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
20153c0: b0 07 40 18 add %i5, %i0, %i0
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
20153c4: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
20153c8: b2 06 60 01 inc %i1
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
20153cc: 40 00 30 2a call 2021474 <memcpy>
20153d0: 90 02 00 1a add %o0, %i2, %o0
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
20153d4: b6 a6 c0 1d subcc %i3, %i5, %i3
20153d8: 02 80 00 17 be 2015434 <_fat_block_write+0xb4>
20153dc: e2 2c 20 84 stb %l1, [ %l0 + 0x84 ]
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
ofs = 0;
20153e0: b4 10 20 00 clr %i2
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
20153e4: c2 14 00 00 lduh [ %l0 ], %g1
20153e8: ba 20 40 1a sub %g1, %i2, %i5
20153ec: 80 a7 40 1b cmp %i5, %i3
20153f0: 08 80 00 03 bleu 20153fc <_fat_block_write+0x7c>
20153f4: 92 10 00 19 mov %i1, %o1
20153f8: ba 10 00 1b mov %i3, %i5
if (c == fs_info->vol.bps)
20153fc: 80 a0 40 1d cmp %g1, %i5
2015400: 32 bf ff e8 bne,a 20153a0 <_fat_block_write+0x20>
2015404: 94 10 20 01 mov 1, %o2
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
2015408: 92 10 00 19 mov %i1, %o1
201540c: 94 10 20 02 mov 2, %o2
2015410: 90 10 00 10 mov %l0, %o0
2015414: 7f ff ff 29 call 20150b8 <fat_buf_access>
2015418: 96 07 bf fc add %fp, -4, %o3
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
201541c: 92 07 00 18 add %i4, %i0, %o1
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
2015420: 80 a2 20 00 cmp %o0, 0
2015424: 02 bf ff e6 be 20153bc <_fat_block_write+0x3c> <== ALWAYS TAKEN
2015428: 94 10 00 1d mov %i5, %o2
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
201542c: 81 c7 e0 08 ret <== NOT EXECUTED
2015430: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
2015434: 81 c7 e0 08 ret
2015438: 81 e8 00 00 restore
0201bbb8 <_fstat_r>:
int _fstat_r(
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
201bbb8: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
201bbbc: 80 a6 a0 00 cmp %i2, 0
201bbc0: 02 80 00 1d be 201bc34 <_fstat_r+0x7c> <== NEVER TAKEN
201bbc4: 03 00 80 7a sethi %hi(0x201e800), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
201bbc8: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c <rtems_libio_number_iops>
201bbcc: 80 a6 40 01 cmp %i1, %g1
201bbd0: 1a 80 00 13 bcc 201bc1c <_fstat_r+0x64> <== NEVER TAKEN
201bbd4: 03 00 80 7c sethi %hi(0x201f000), %g1
201bbd8: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 201f2f8 <rtems_libio_iops>
201bbdc: b3 2e 60 06 sll %i1, 6, %i1
201bbe0: b2 00 40 19 add %g1, %i1, %i1
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
201bbe4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
201bbe8: 80 88 61 00 btst 0x100, %g1
201bbec: 02 80 00 0c be 201bc1c <_fstat_r+0x64> <== NEVER TAKEN
201bbf0: 94 10 20 48 mov 0x48, %o2
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
201bbf4: 92 10 20 00 clr %o1
201bbf8: 7f ff d9 0e call 2012030 <memset>
201bbfc: 90 10 00 1a mov %i2, %o0
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
201bc00: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
201bc04: 90 06 60 1c add %i1, 0x1c, %o0
201bc08: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
201bc0c: 9f c0 40 00 call %g1
201bc10: 92 10 00 1a mov %i2, %o1
int fd,
struct stat *buf
)
{
return fstat( fd, buf );
}
201bc14: 81 c7 e0 08 ret
201bc18: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
201bc1c: 7f ff d6 6d call 20115d0 <__errno> <== NOT EXECUTED
201bc20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bc24: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
201bc28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201bc2c: 81 c7 e0 08 ret <== NOT EXECUTED
201bc30: 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 );
201bc34: 7f ff d6 67 call 20115d0 <__errno> <== NOT EXECUTED
201bc38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bc3c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
201bc40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201bc44: 81 c7 e0 08 ret <== NOT EXECUTED
201bc48: 81 e8 00 00 restore <== NOT EXECUTED
020034c8 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
20034c8: 9d e3 bf 98 save %sp, -104, %sp
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
20034cc: b6 96 20 00 orcc %i0, 0, %i3
20034d0: 02 80 00 1e be 2003548 <_gettimeofday+0x80> <== ALWAYS TAKEN
20034d4: 01 00 00 00 nop
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
20034d8: 7f ff fc 21 call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
20034dc: 01 00 00 00 nop <== NOT EXECUTED
20034e0: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
20034e4: 40 00 13 66 call 200827c <_TOD_Get_as_timestamp> <== NOT EXECUTED
20034e8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
20034ec: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED
_TOD_Get( &now );
_ISR_Enable(level);
20034f0: 7f ff fc 1f call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
20034f4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
20034f8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20034fc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2003500: 94 10 20 00 clr %o2 <== NOT EXECUTED
2003504: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 <== NOT EXECUTED
2003508: 40 00 5d 1d call 201a97c <__divdi3> <== NOT EXECUTED
200350c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00><== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2003510: 94 10 20 00 clr %o2 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2003514: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2003518: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200351c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2003520: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 <== NOT EXECUTED
2003524: 40 00 5d fc call 201ad14 <__moddi3> <== NOT EXECUTED
2003528: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00><== NOT EXECUTED
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
200352c: b0 10 20 00 clr %i0 <== NOT EXECUTED
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
2003530: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2003534: 40 00 5b bc call 201a424 <.div> <== NOT EXECUTED
2003538: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
200353c: d0 26 e0 04 st %o0, [ %i3 + 4 ] <== NOT EXECUTED
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
}
2003540: 81 c7 e0 08 ret <== NOT EXECUTED
2003544: 81 e8 00 00 restore <== NOT EXECUTED
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
2003548: 40 00 38 22 call 20115d0 <__errno>
200354c: b0 10 3f ff mov -1, %i0
2003550: 82 10 20 0e mov 0xe, %g1
2003554: c2 22 00 00 st %g1, [ %o0 ]
2003558: 81 c7 e0 08 ret
200355c: 81 e8 00 00 restore
02003430 <_gettimeofday_r>:
int _gettimeofday_r(
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
struct timezone *tzp
)
{
2003430: 9d e3 bf 98 save %sp, -104, %sp
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
2003434: 80 a6 60 00 cmp %i1, 0
2003438: 02 80 00 1e be 20034b0 <_gettimeofday_r+0x80> <== NEVER TAKEN
200343c: 01 00 00 00 nop
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
2003440: 7f ff fc 47 call 200255c <sparc_disable_interrupts>
2003444: 01 00 00 00 nop
2003448: b6 10 00 08 mov %o0, %i3
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
200344c: 40 00 13 8c call 200827c <_TOD_Get_as_timestamp>
2003450: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2003454: f8 1f bf f8 ldd [ %fp + -8 ], %i4
_TOD_Get( &now );
_ISR_Enable(level);
2003458: 7f ff fc 45 call 200256c <sparc_enable_interrupts>
200345c: 90 10 00 1b mov %i3, %o0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2003460: 90 10 00 1c mov %i4, %o0
2003464: 92 10 00 1d mov %i5, %o1
2003468: 94 10 20 00 clr %o2
200346c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003470: 40 00 5d 43 call 201a97c <__divdi3>
2003474: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2003478: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
200347c: d2 26 40 00 st %o1, [ %i1 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2003480: 90 10 00 1c mov %i4, %o0
2003484: 92 10 00 1d mov %i5, %o1
2003488: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
200348c: 40 00 5e 22 call 201ad14 <__moddi3>
2003490: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
2003494: b0 10 20 00 clr %i0
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
2003498: 90 10 00 09 mov %o1, %o0
200349c: 40 00 5b e2 call 201a424 <.div>
20034a0: 92 10 23 e8 mov 0x3e8, %o1
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
20034a4: d0 26 60 04 st %o0, [ %i1 + 4 ]
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
}
20034a8: 81 c7 e0 08 ret
20034ac: 81 e8 00 00 restore
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
20034b0: 40 00 38 48 call 20115d0 <__errno> <== NOT EXECUTED
20034b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20034b8: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
20034bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20034c0: 81 c7 e0 08 ret <== NOT EXECUTED
20034c4: 81 e8 00 00 restore <== NOT EXECUTED
02005aec <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
2005aec: 9d e3 bf 88 save %sp, -120, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2005af0: 80 a6 a0 00 cmp %i2, 0
2005af4: 02 80 00 1b be 2005b60 <_lstat_r+0x74> <== ALWAYS TAKEN
2005af8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
2005afc: 40 00 3f 5c call 201586c <strlen> <== NOT EXECUTED
2005b00: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2005b04: 94 10 20 00 clr %o2 <== NOT EXECUTED
2005b08: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2005b0c: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED
2005b10: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2005b14: 98 10 20 00 clr %o4 <== NOT EXECUTED
2005b18: 7f ff fd 6e call 20050d0 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
2005b1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
2005b20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2005b24: 12 80 00 0d bne 2005b58 <_lstat_r+0x6c> <== NOT EXECUTED
2005b28: 92 10 20 00 clr %o1 <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
2005b2c: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED
2005b30: 40 00 3b ec call 2014ae0 <memset> <== NOT EXECUTED
2005b34: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
2005b38: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2005b3c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2005b40: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED
2005b44: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005b48: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
2005b4c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2005b50: 7f ff fe 08 call 2005370 <rtems_filesystem_freenode> <== NOT EXECUTED
2005b54: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
}
2005b58: 81 c7 e0 08 ret <== NOT EXECUTED
2005b5c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
2005b60: 40 00 39 48 call 2014080 <__errno>
2005b64: b0 10 3f ff mov -1, %i0
2005b68: 82 10 20 0e mov 0xe, %g1
2005b6c: c2 22 00 00 st %g1, [ %o0 ]
2005b70: 81 c7 e0 08 ret
2005b74: 81 e8 00 00 restore
020224ac <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
20224ac: 9d e3 bf 58 save %sp, -168, %sp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
20224b0: 7f ff 8b ea call 2005458 <rtems_filesystem_dirname>
20224b4: 90 10 00 19 mov %i1, %o0
if ( old_parent_pathlen == 0 )
20224b8: 80 a2 20 00 cmp %o0, 0
20224bc: 12 80 00 2b bne 2022568 <_rename_r+0xbc>
20224c0: b8 10 00 08 mov %o0, %i4
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
20224c4: ba 07 bf d0 add %fp, -48, %i5
20224c8: 90 10 00 19 mov %i1, %o0
20224cc: 92 07 bf f8 add %fp, -8, %o1
20224d0: 94 10 00 1d mov %i5, %o2
20224d4: 7f ff 93 58 call 2007234 <rtems_filesystem_get_start_loc>
20224d8: b8 10 20 00 clr %i4
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
20224dc: b6 10 20 00 clr %i3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
20224e0: c2 07 bf d0 ld [ %fp + -48 ], %g1
name = old + old_parent_pathlen;
20224e4: b2 06 40 1c add %i1, %i4, %i1
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
20224e8: c2 27 bf bc st %g1, [ %fp + -68 ]
20224ec: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = old + old_parent_pathlen;
20224f0: 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;
20224f4: c2 27 bf c0 st %g1, [ %fp + -64 ]
20224f8: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
20224fc: 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;
2022500: c2 27 bf c4 st %g1, [ %fp + -60 ]
2022504: c2 07 bf dc ld [ %fp + -36 ], %g1
2022508: c2 27 bf c8 st %g1, [ %fp + -56 ]
202250c: c2 07 bf e0 ld [ %fp + -32 ], %g1
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2022510: 7f ff cd 0b call 201593c <strlen>
2022514: c2 27 bf cc st %g1, [ %fp + -52 ]
2022518: 92 10 00 08 mov %o0, %o1
202251c: 7f ff 8b de call 2005494 <rtems_filesystem_prefix_separators>
2022520: 90 10 00 19 mov %i1, %o0
2022524: b2 06 40 08 add %i1, %o0, %i1
2022528: f2 27 bf fc st %i1, [ %fp + -4 ]
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
202252c: 7f ff cd 04 call 201593c <strlen>
2022530: 90 10 00 19 mov %i1, %o0
2022534: 94 10 20 00 clr %o2
2022538: 92 10 00 08 mov %o0, %o1
202253c: 96 07 bf bc add %fp, -68, %o3
2022540: 90 10 00 19 mov %i1, %o0
2022544: 7f ff 8b 85 call 2005358 <rtems_filesystem_evaluate_relative_path>
2022548: 98 10 20 00 clr %o4
0, &old_loc, false );
if ( result != 0 ) {
202254c: 80 a2 20 00 cmp %o0, 0
2022550: 02 80 00 17 be 20225ac <_rename_r+0x100>
2022554: 80 8e e0 ff btst 0xff, %i3
if ( free_old_parentloc )
2022558: 12 80 00 11 bne 202259c <_rename_r+0xf0>
202255c: b0 10 3f ff mov -1, %i0
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
2022560: 81 c7 e0 08 ret
2022564: 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,
2022568: ba 07 bf d0 add %fp, -48, %i5
202256c: 90 10 00 19 mov %i1, %o0
2022570: 92 10 00 1c mov %i4, %o1
2022574: 94 10 20 02 mov 2, %o2
2022578: 96 10 00 1d mov %i5, %o3
202257c: 98 10 20 00 clr %o4
2022580: 7f ff 8b 93 call 20053cc <rtems_filesystem_evaluate_path>
2022584: b0 10 3f ff mov -1, %i0
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
2022588: 80 a2 20 00 cmp %o0, 0
202258c: 12 bf ff f5 bne 2022560 <_rename_r+0xb4> <== NEVER TAKEN
2022590: b6 10 20 01 mov 1, %i3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
2022594: 10 bf ff d4 b 20224e4 <_rename_r+0x38>
2022598: c2 07 bf d0 ld [ %fp + -48 ], %g1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
202259c: 7f ff 8c 34 call 200566c <rtems_filesystem_freenode>
20225a0: 90 10 00 1d mov %i5, %o0
20225a4: 81 c7 e0 08 ret
20225a8: 81 e8 00 00 restore
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
20225ac: 90 10 00 1a mov %i2, %o0
20225b0: 92 07 bf f8 add %fp, -8, %o1
20225b4: 7f ff 93 20 call 2007234 <rtems_filesystem_get_start_loc>
20225b8: 94 07 bf e4 add %fp, -28, %o2
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
20225bc: c2 07 bf f0 ld [ %fp + -16 ], %g1
20225c0: d0 07 bf f8 ld [ %fp + -8 ], %o0
20225c4: c2 00 60 04 ld [ %g1 + 4 ], %g1
20225c8: 90 06 80 08 add %i2, %o0, %o0
20225cc: 92 07 bf e4 add %fp, -28, %o1
20225d0: 9f c0 40 00 call %g1
20225d4: 94 07 bf fc add %fp, -4, %o2
if ( result != 0 ) {
20225d8: 80 a2 20 00 cmp %o0, 0
20225dc: 12 80 00 29 bne 2022680 <_rename_r+0x1d4>
20225e0: c2 07 bf f4 ld [ %fp + -12 ], %g1
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
20225e4: c4 07 bf e0 ld [ %fp + -32 ], %g2
20225e8: 80 a0 80 01 cmp %g2, %g1
20225ec: 12 80 00 15 bne 2022640 <_rename_r+0x194>
20225f0: c2 07 bf f0 ld [ %fp + -16 ], %g1
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
20225f4: d6 07 bf fc ld [ %fp + -4 ], %o3
20225f8: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
20225fc: 92 07 bf bc add %fp, -68, %o1
2022600: 94 07 bf e4 add %fp, -28, %o2
2022604: 9f c0 40 00 call %g1
2022608: 90 10 00 1d mov %i5, %o0
202260c: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &new_parent_loc );
2022610: 7f ff 8c 17 call 200566c <rtems_filesystem_freenode>
2022614: 90 07 bf e4 add %fp, -28, %o0
if ( free_old_parentloc )
2022618: 80 8e e0 ff btst 0xff, %i3
202261c: 12 80 00 06 bne 2022634 <_rename_r+0x188>
2022620: 01 00 00 00 nop
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
2022624: 7f ff 8c 12 call 200566c <rtems_filesystem_freenode>
2022628: 90 07 bf bc add %fp, -68, %o0
return result;
}
202262c: 81 c7 e0 08 ret
2022630: 81 e8 00 00 restore
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
2022634: 7f ff 8c 0e call 200566c <rtems_filesystem_freenode>
2022638: 90 10 00 1d mov %i5, %o0
202263c: 30 bf ff fa b,a 2022624 <_rename_r+0x178>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
2022640: 7f ff 8c 0b call 200566c <rtems_filesystem_freenode>
2022644: 90 07 bf e4 add %fp, -28, %o0
if ( free_old_parentloc )
2022648: 80 8e e0 ff btst 0xff, %i3
202264c: 12 80 00 0a bne 2022674 <_rename_r+0x1c8>
2022650: 01 00 00 00 nop
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
2022654: 7f ff 8c 06 call 200566c <rtems_filesystem_freenode>
2022658: 90 07 bf bc add %fp, -68, %o0
rtems_set_errno_and_return_minus_one( EXDEV );
202265c: 7f ff c6 e7 call 20141f8 <__errno>
2022660: b0 10 3f ff mov -1, %i0
2022664: 82 10 20 12 mov 0x12, %g1
2022668: c2 22 00 00 st %g1, [ %o0 ]
202266c: 81 c7 e0 08 ret
2022670: 81 e8 00 00 restore
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
2022674: 7f ff 8b fe call 200566c <rtems_filesystem_freenode>
2022678: 90 10 00 1d mov %i5, %o0
202267c: 30 bf ff f6 b,a 2022654 <_rename_r+0x1a8>
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
2022680: 7f ff 8b fb call 200566c <rtems_filesystem_freenode>
2022684: 90 07 bf e4 add %fp, -28, %o0
if ( free_old_parentloc )
2022688: 80 8e e0 ff btst 0xff, %i3
202268c: 02 80 00 05 be 20226a0 <_rename_r+0x1f4>
2022690: 90 07 bf bc add %fp, -68, %o0
rtems_filesystem_freenode( &old_parent_loc );
2022694: 7f ff 8b f6 call 200566c <rtems_filesystem_freenode>
2022698: 90 10 00 1d mov %i5, %o0
rtems_filesystem_freenode( &old_loc );
202269c: 90 07 bf bc add %fp, -68, %o0
20226a0: 7f ff 8b f3 call 200566c <rtems_filesystem_freenode>
20226a4: b0 10 3f ff mov -1, %i0
return -1;
20226a8: 81 c7 e0 08 ret
20226ac: 81 e8 00 00 restore
02004210 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
2004210: 9d e3 bf 88 save %sp, -120, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2004214: 80 a6 a0 00 cmp %i2, 0
2004218: 02 80 00 1b be 2004284 <_stat_r+0x74> <== ALWAYS TAKEN
200421c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
2004220: 40 00 2d 91 call 200f864 <strlen> <== NOT EXECUTED
2004224: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2004228: 94 10 20 00 clr %o2 <== NOT EXECUTED
200422c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2004230: 96 07 bf ec add %fp, -20, %o3 <== NOT EXECUTED
2004234: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2004238: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
200423c: 7f ff fb 97 call 2003098 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
2004240: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
2004244: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004248: 12 80 00 0d bne 200427c <_stat_r+0x6c> <== NOT EXECUTED
200424c: 92 10 20 00 clr %o1 <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
2004250: 94 10 20 48 mov 0x48, %o2 <== NOT EXECUTED
2004254: 40 00 2a bc call 200ed44 <memset> <== NOT EXECUTED
2004258: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
200425c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2004260: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2004264: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED
2004268: 9f c0 40 00 call %g1 <== NOT EXECUTED
200426c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
2004270: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2004274: 7f ff fb d7 call 20031d0 <rtems_filesystem_freenode> <== NOT EXECUTED
2004278: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
}
200427c: 81 c7 e0 08 ret <== NOT EXECUTED
2004280: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
2004284: 40 00 28 18 call 200e2e4 <__errno>
2004288: b0 10 3f ff mov -1, %i0
200428c: 82 10 20 0e mov 0xe, %g1
2004290: c2 22 00 00 st %g1, [ %o0 ]
2004294: 81 c7 e0 08 ret
2004298: 81 e8 00 00 restore
020067f4 <_times>:
#endif
clock_t _times(
struct tms *ptms
)
{
20067f4: 9d e3 bf 90 save %sp, -112, %sp
rtems_interval ticks;
if ( !ptms )
20067f8: 80 a6 20 00 cmp %i0, 0
20067fc: 02 80 00 4c be 200692c <_times+0x138> <== NEVER TAKEN
2006800: 01 00 00 00 nop
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
2006804: 40 00 02 1c call 2007074 <rtems_clock_get_ticks_since_boot>
2006808: ac 10 20 00 clr %l6 ! 0 <PROM_START>
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
200680c: 03 00 80 7a sethi %hi(0x201e800), %g1
2006810: f4 00 63 ec ld [ %g1 + 0x3ec ], %i2 ! 201ebec <Configuration+0x10>
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
2006814: ba 10 00 08 mov %o0, %i5
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
2006818: 83 2e a0 02 sll %i2, 2, %g1
200681c: 91 2e a0 07 sll %i2, 7, %o0
2006820: 13 0e e6 b2 sethi %hi(0x3b9ac800), %o1
2006824: 90 22 00 01 sub %o0, %g1, %o0
2006828: 92 12 62 00 or %o1, 0x200, %o1
200682c: 90 02 00 1a add %o0, %i2, %o0
2006830: 40 00 50 ca call 201ab58 <.urem>
2006834: 91 2a 20 03 sll %o0, 3, %o0
2006838: 13 00 03 d0 sethi %hi(0xf4000), %o1
200683c: ae 10 00 08 mov %o0, %l7
2006840: 92 12 62 40 or %o1, 0x240, %o1
2006844: 40 00 50 19 call 201a8a8 <.udiv>
2006848: 90 10 00 1a mov %i2, %o0
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
200684c: 05 00 80 7f sethi %hi(0x201fc00), %g2
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
2006850: 82 10 00 08 mov %o0, %g1
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
2006854: 9b 28 60 03 sll %g1, 3, %o5
2006858: 89 33 60 1b srl %o5, 0x1b, %g4
200685c: 99 30 60 1d srl %g1, 0x1d, %o4
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
2006860: d0 00 a2 8c ld [ %g2 + 0x28c ], %o0
2006864: 87 2b 60 05 sll %o5, 5, %g3
2006868: 85 2b 20 05 sll %o4, 5, %g2
200686c: 86 a0 c0 0d subcc %g3, %o5, %g3
2006870: 84 11 00 02 or %g4, %g2, %g2
2006874: b7 28 e0 06 sll %g3, 6, %i3
2006878: 84 60 80 0c subx %g2, %o4, %g2
200687c: 89 30 e0 1a srl %g3, 0x1a, %g4
2006880: b5 28 a0 06 sll %g2, 6, %i2
2006884: 86 a6 c0 03 subcc %i3, %g3, %g3
2006888: b4 11 00 1a or %g4, %i2, %i2
200688c: 84 66 80 02 subx %i2, %g2, %g2
2006890: 86 80 c0 01 addcc %g3, %g1, %g3
2006894: 83 30 e0 1e srl %g3, 0x1e, %g1
2006898: 84 40 a0 00 addx %g2, 0, %g2
200689c: a3 28 e0 02 sll %g3, 2, %l1
20068a0: a1 28 a0 02 sll %g2, 2, %l0
20068a4: 86 80 c0 11 addcc %g3, %l1, %g3
20068a8: a0 10 40 10 or %g1, %l0, %l0
20068ac: 83 30 e0 1e srl %g3, 0x1e, %g1
20068b0: 84 40 80 10 addx %g2, %l0, %g2
20068b4: a7 28 e0 02 sll %g3, 2, %l3
20068b8: a5 28 a0 02 sll %g2, 2, %l2
20068bc: 86 80 c0 13 addcc %g3, %l3, %g3
20068c0: a4 10 40 12 or %g1, %l2, %l2
20068c4: ab 28 e0 02 sll %g3, 2, %l5
20068c8: 84 40 80 12 addx %g2, %l2, %g2
20068cc: 83 30 e0 1e srl %g3, 0x1e, %g1
20068d0: a9 28 a0 02 sll %g2, 2, %l4
20068d4: 86 80 c0 15 addcc %g3, %l5, %g3
20068d8: a8 10 40 14 or %g1, %l4, %l4
20068dc: 84 40 80 14 addx %g2, %l4, %g2
20068e0: 83 28 e0 09 sll %g3, 9, %g1
20068e4: b5 30 e0 17 srl %g3, 0x17, %i2
20068e8: 89 28 a0 09 sll %g2, 9, %g4
20068ec: 86 85 c0 01 addcc %l7, %g1, %g3
20068f0: 84 16 80 04 or %i2, %g4, %g2
20068f4: 84 45 80 02 addx %l6, %g2, %g2
20068f8: 90 02 20 80 add %o0, 0x80, %o0
20068fc: 92 07 bf f0 add %fp, -16, %o1
2006900: 94 07 bf f8 add %fp, -8, %o2
2006904: 96 07 bf fc add %fp, -4, %o3
2006908: 40 00 11 05 call 200ad1c <_Timestamp64_Divide>
200690c: c4 3f bf f0 std %g2, [ %fp + -16 ]
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
2006910: c2 07 bf f8 ld [ %fp + -8 ], %g1
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
2006914: fa 26 20 04 st %i5, [ %i0 + 4 ]
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
2006918: c2 26 00 00 st %g1, [ %i0 ]
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
200691c: c0 26 20 08 clr [ %i0 + 8 ]
ptms->tms_cstime = 0;
2006920: c0 26 20 0c clr [ %i0 + 0xc ]
return ticks;
}
2006924: 81 c7 e0 08 ret
2006928: 91 e8 00 1d restore %g0, %i5, %o0
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
200692c: 40 00 2c 4c call 2011a5c <__errno> <== NOT EXECUTED
2006930: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
2006934: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2006938: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
}
200693c: 81 c7 e0 08 ret <== NOT EXECUTED
2006940: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
02006a94 <_times_r>:
clock_t _times_r(
struct _reent *ptr __attribute__((unused)),
struct tms *ptms
)
{
2006a94: 9d e3 bf 90 save %sp, -112, %sp
struct tms *ptms
)
{
rtems_interval ticks;
if ( !ptms )
2006a98: 80 a6 60 00 cmp %i1, 0
2006a9c: 02 80 00 4c be 2006bcc <_times_r+0x138> <== ALWAYS TAKEN
2006aa0: 01 00 00 00 nop
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
2006aa4: 40 00 01 74 call 2007074 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
2006aa8: a8 10 20 00 clr %l4 ! 0 <PROM_START> <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
2006aac: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED
2006ab0: f8 00 63 ec ld [ %g1 + 0x3ec ], %i4 ! 201ebec <Configuration+0x10><== NOT EXECUTED
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
2006ab4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
2006ab8: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED
2006abc: 91 2f 20 07 sll %i4, 7, %o0 <== NOT EXECUTED
2006ac0: 13 0e e6 b2 sethi %hi(0x3b9ac800), %o1 <== NOT EXECUTED
2006ac4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
2006ac8: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED
2006acc: 90 02 00 1c add %o0, %i4, %o0 <== NOT EXECUTED
2006ad0: 40 00 50 22 call 201ab58 <.urem> <== NOT EXECUTED
2006ad4: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
2006ad8: 13 00 03 d0 sethi %hi(0xf4000), %o1 <== NOT EXECUTED
2006adc: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED
2006ae0: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED
2006ae4: 40 00 4f 71 call 201a8a8 <.udiv> <== NOT EXECUTED
2006ae8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
2006aec: 05 00 80 7f sethi %hi(0x201fc00), %g2 <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
2006af0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
2006af4: 9b 28 60 03 sll %g1, 3, %o5 <== NOT EXECUTED
2006af8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED
2006afc: 99 30 60 1d srl %g1, 0x1d, %o4 <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
2006b00: d0 00 a2 8c ld [ %g2 + 0x28c ], %o0 <== NOT EXECUTED
2006b04: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED
2006b08: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED
2006b0c: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED
2006b10: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
2006b14: bb 28 e0 06 sll %g3, 6, %i5 <== NOT EXECUTED
2006b18: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED
2006b1c: 89 30 e0 1a srl %g3, 0x1a, %g4 <== NOT EXECUTED
2006b20: b9 28 a0 06 sll %g2, 6, %i4 <== NOT EXECUTED
2006b24: 86 a7 40 03 subcc %i5, %g3, %g3 <== NOT EXECUTED
2006b28: b8 11 00 1c or %g4, %i4, %i4 <== NOT EXECUTED
2006b2c: 84 67 00 02 subx %i4, %g2, %g2 <== NOT EXECUTED
2006b30: 86 80 c0 01 addcc %g3, %g1, %g3 <== NOT EXECUTED
2006b34: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
2006b38: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED
2006b3c: b7 28 e0 02 sll %g3, 2, %i3 <== NOT EXECUTED
2006b40: b5 28 a0 02 sll %g2, 2, %i2 <== NOT EXECUTED
2006b44: 86 80 c0 1b addcc %g3, %i3, %g3 <== NOT EXECUTED
2006b48: b4 10 40 1a or %g1, %i2, %i2 <== NOT EXECUTED
2006b4c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
2006b50: 84 40 80 1a addx %g2, %i2, %g2 <== NOT EXECUTED
2006b54: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED
2006b58: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED
2006b5c: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED
2006b60: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED
2006b64: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED
2006b68: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED
2006b6c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
2006b70: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED
2006b74: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED
2006b78: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED
2006b7c: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED
2006b80: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED
2006b84: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED
2006b88: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED
2006b8c: 86 85 40 01 addcc %l5, %g1, %g3 <== NOT EXECUTED
2006b90: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED
2006b94: 84 45 00 02 addx %l4, %g2, %g2 <== NOT EXECUTED
2006b98: 90 02 20 80 add %o0, 0x80, %o0 <== NOT EXECUTED
2006b9c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2006ba0: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
2006ba4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
2006ba8: 40 00 10 5d call 200ad1c <_Timestamp64_Divide> <== NOT EXECUTED
2006bac: c4 3f bf f0 std %g2, [ %fp + -16 ] <== NOT EXECUTED
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
2006bb0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
2006bb4: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
2006bb8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
2006bbc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
ptms->tms_cstime = 0;
2006bc0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
struct tms *ptms
)
{
return _times( ptms );
}
2006bc4: 81 c7 e0 08 ret <== NOT EXECUTED
2006bc8: 81 e8 00 00 restore <== NOT EXECUTED
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
2006bcc: 40 00 2b a4 call 2011a5c <__errno>
2006bd0: b0 10 3f ff mov -1, %i0
2006bd4: 82 10 20 0e mov 0xe, %g1
2006bd8: c2 22 00 00 st %g1, [ %o0 ]
2006bdc: 81 c7 e0 08 ret
2006be0: 81 e8 00 00 restore
020070cc <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
20070cc: 9d e3 bf 98 save %sp, -104, %sp
long adjustment;
/*
* Simple validations
*/
if ( !delta )
20070d0: ba 96 20 00 orcc %i0, 0, %i5
20070d4: 02 80 00 89 be 20072f8 <adjtime+0x22c>
20070d8: 03 00 03 d0 sethi %hi(0xf4000), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
20070dc: c4 07 60 04 ld [ %i5 + 4 ], %g2
20070e0: 82 10 62 3f or %g1, 0x23f, %g1
20070e4: 80 a0 80 01 cmp %g2, %g1
20070e8: 18 80 00 84 bgu 20072f8 <adjtime+0x22c>
20070ec: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
20070f0: 22 80 00 06 be,a 2007108 <adjtime+0x3c>
20070f4: c2 07 40 00 ld [ %i5 ], %g1
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
20070f8: c0 26 60 04 clr [ %i1 + 4 ]
20070fc: c4 07 60 04 ld [ %i5 + 4 ], %g2
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
2007100: c0 26 40 00 clr [ %i1 ]
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
2007104: c2 07 40 00 ld [ %i5 ], %g1
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
2007108: 07 00 80 84 sethi %hi(0x2021000), %g3
200710c: c8 00 e3 3c ld [ %g3 + 0x33c ], %g4 ! 202133c <Configuration+0x10>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
2007110: b5 28 60 08 sll %g1, 8, %i2
2007114: 87 28 60 03 sll %g1, 3, %g3
2007118: 86 26 80 03 sub %i2, %g3, %g3
200711c: b5 28 e0 06 sll %g3, 6, %i2
2007120: 86 26 80 03 sub %i2, %g3, %g3
2007124: 82 00 c0 01 add %g3, %g1, %g1
2007128: 83 28 60 06 sll %g1, 6, %g1
adjustment += delta->tv_usec;
200712c: 84 00 40 02 add %g1, %g2, %g2
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
2007130: 80 a0 80 04 cmp %g2, %g4
2007134: 0a 80 00 6f bcs 20072f0 <adjtime+0x224>
2007138: b0 10 20 00 clr %i0
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200713c: 03 00 80 88 sethi %hi(0x2022000), %g1
2007140: c4 00 61 c0 ld [ %g1 + 0x1c0 ], %g2 ! 20221c0 <_Thread_Dispatch_disable_level>
2007144: 84 00 a0 01 inc %g2
2007148: c4 20 61 c0 st %g2, [ %g1 + 0x1c0 ]
return _Thread_Dispatch_disable_level;
200714c: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
2007150: 40 00 07 12 call 2008d98 <_TOD_Get_as_timestamp>
2007154: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2007158: f4 1f bf f8 ldd [ %fp + -8 ], %i2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
200715c: 94 10 20 00 clr %o2
2007160: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007164: 90 10 00 1a mov %i2, %o0
2007168: 96 12 e2 00 or %o3, 0x200, %o3
200716c: 40 00 58 34 call 201d23c <__divdi3>
2007170: 92 10 00 1b mov %i3, %o1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
2007174: e0 07 40 00 ld [ %i5 ], %l0
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007178: 94 10 20 00 clr %o2
200717c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007180: a0 04 00 09 add %l0, %o1, %l0
2007184: 96 12 e2 00 or %o3, 0x200, %o3
2007188: 90 10 00 1a mov %i2, %o0
200718c: 40 00 59 12 call 201d5d4 <__moddi3>
2007190: 92 10 00 1b mov %i3, %o1
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
2007194: c2 07 60 04 ld [ %i5 + 4 ], %g1
2007198: 87 28 60 07 sll %g1, 7, %g3
200719c: 85 28 60 02 sll %g1, 2, %g2
20071a0: 84 20 c0 02 sub %g3, %g2, %g2
20071a4: 82 00 80 01 add %g2, %g1, %g1
20071a8: 83 28 60 03 sll %g1, 3, %g1
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
20071ac: 05 0e e6 b2 sethi %hi(0x3b9ac800), %g2
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
20071b0: 92 02 40 01 add %o1, %g1, %o1
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
20071b4: 84 10 a1 ff or %g2, 0x1ff, %g2
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
20071b8: 07 31 19 4d sethi %hi(0xc4653400), %g3
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
20071bc: 82 10 00 09 mov %o1, %g1
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
20071c0: 80 a2 40 02 cmp %o1, %g2
20071c4: 08 80 00 07 bleu 20071e0 <adjtime+0x114>
20071c8: 86 10 e2 00 or %g3, 0x200, %g3
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
20071cc: 92 02 40 03 add %o1, %g3, %o1
ts.tv_sec++;
20071d0: a0 04 20 01 inc %l0
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
20071d4: 80 a2 40 02 cmp %o1, %g2
20071d8: 18 bf ff fd bgu 20071cc <adjtime+0x100> <== NEVER TAKEN
20071dc: 82 10 00 09 mov %o1, %g1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
20071e0: 07 31 19 4d sethi %hi(0xc4653400), %g3
20071e4: 86 10 e2 00 or %g3, 0x200, %g3 ! c4653600 <RAM_END+0xc2253600>
20071e8: 80 a2 40 03 cmp %o1, %g3
20071ec: 18 80 00 08 bgu 200720c <adjtime+0x140> <== NEVER TAKEN
20071f0: 05 0e e6 b2 sethi %hi(0x3b9ac800), %g2
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
20071f4: 84 10 a2 00 or %g2, 0x200, %g2 ! 3b9aca00 <RAM_END+0x395aca00>
20071f8: 92 02 40 02 add %o1, %g2, %o1
ts.tv_sec--;
20071fc: a0 04 3f ff add %l0, -1, %l0
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
2007200: 80 a2 40 03 cmp %o1, %g3
2007204: 08 bf ff fd bleu 20071f8 <adjtime+0x12c>
2007208: 82 10 00 09 mov %o1, %g1
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
200720c: 99 3c 20 1f sra %l0, 0x1f, %o4
2007210: ae 10 00 01 mov %g1, %l7
2007214: ad 38 60 1f sra %g1, 0x1f, %l6
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
2007218: 83 2b 20 03 sll %o4, 3, %g1
200721c: b7 2c 20 03 sll %l0, 3, %i3
2007220: 89 34 20 1d srl %l0, 0x1d, %g4
2007224: b4 11 00 01 or %g4, %g1, %i2
2007228: 83 36 e0 1b srl %i3, 0x1b, %g1
200722c: 85 2e a0 05 sll %i2, 5, %g2
2007230: 87 2e e0 05 sll %i3, 5, %g3
2007234: 84 10 40 02 or %g1, %g2, %g2
2007238: 86 a0 c0 1b subcc %g3, %i3, %g3
200723c: 83 30 e0 1a srl %g3, 0x1a, %g1
2007240: 84 60 80 1a subx %g2, %i2, %g2
2007244: 97 28 e0 06 sll %g3, 6, %o3
2007248: 95 28 a0 06 sll %g2, 6, %o2
200724c: 86 a2 c0 03 subcc %o3, %g3, %g3
2007250: 94 10 40 0a or %g1, %o2, %o2
2007254: 84 62 80 02 subx %o2, %g2, %g2
2007258: 86 80 c0 10 addcc %g3, %l0, %g3
200725c: 83 30 e0 1e srl %g3, 0x1e, %g1
2007260: 84 40 80 0c addx %g2, %o4, %g2
2007264: a3 28 e0 02 sll %g3, 2, %l1
2007268: a1 28 a0 02 sll %g2, 2, %l0
200726c: 86 80 c0 11 addcc %g3, %l1, %g3
2007270: a0 10 40 10 or %g1, %l0, %l0
2007274: 83 30 e0 1e srl %g3, 0x1e, %g1
2007278: 84 40 80 10 addx %g2, %l0, %g2
200727c: a7 28 e0 02 sll %g3, 2, %l3
2007280: a5 28 a0 02 sll %g2, 2, %l2
2007284: 86 80 c0 13 addcc %g3, %l3, %g3
2007288: a4 10 40 12 or %g1, %l2, %l2
200728c: ab 28 e0 02 sll %g3, 2, %l5
2007290: 84 40 80 12 addx %g2, %l2, %g2
2007294: 83 30 e0 1e srl %g3, 0x1e, %g1
2007298: a9 28 a0 02 sll %g2, 2, %l4
200729c: 86 80 c0 15 addcc %g3, %l5, %g3
20072a0: a8 10 40 14 or %g1, %l4, %l4
20072a4: 84 40 80 14 addx %g2, %l4, %g2
20072a8: 83 28 e0 09 sll %g3, 9, %g1
20072ac: 89 28 a0 09 sll %g2, 9, %g4
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
20072b0: 90 07 bf f8 add %fp, -8, %o0
20072b4: b5 30 e0 17 srl %g3, 0x17, %i2
20072b8: 86 85 c0 01 addcc %l7, %g1, %g3
20072bc: 84 16 80 04 or %i2, %g4, %g2
20072c0: 84 45 80 02 addx %l6, %g2, %g2
20072c4: 40 00 06 d2 call 2008e0c <_TOD_Set_with_timestamp>
20072c8: c4 3f bf f8 std %g2, [ %fp + -8 ]
ts.tv_sec--;
}
_TOD_Set( &ts );
_Thread_Enable_dispatch();
20072cc: 40 00 0d 9e call 200a944 <_Thread_Enable_dispatch>
20072d0: b0 10 20 00 clr %i0
/* set the user's output */
if ( olddelta )
20072d4: 80 a6 60 00 cmp %i1, 0
20072d8: 02 80 00 0c be 2007308 <adjtime+0x23c>
20072dc: 01 00 00 00 nop
*olddelta = *delta;
20072e0: c2 07 40 00 ld [ %i5 ], %g1
20072e4: c2 26 40 00 st %g1, [ %i1 ]
20072e8: c2 07 60 04 ld [ %i5 + 4 ], %g1
20072ec: c2 26 60 04 st %g1, [ %i1 + 4 ]
return 0;
}
20072f0: 81 c7 e0 08 ret
20072f4: 81 e8 00 00 restore
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
20072f8: 40 00 2b d5 call 201224c <__errno>
20072fc: b0 10 3f ff mov -1, %i0
2007300: 82 10 20 16 mov 0x16, %g1
2007304: c2 22 00 00 st %g1, [ %o0 ]
2007308: 81 c7 e0 08 ret
200730c: 81 e8 00 00 restore
020074b0 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
20074b0: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
20074b4: 3b 00 80 86 sethi %hi(0x2021800), %i5
20074b8: 40 00 04 f6 call 2008890 <pthread_mutex_lock>
20074bc: 90 17 63 4c or %i5, 0x34c, %o0 ! 2021b4c <aio_request_queue>
if (fcntl (fildes, F_GETFD) < 0) {
20074c0: 90 10 00 18 mov %i0, %o0
20074c4: 40 00 20 a0 call 200f744 <fcntl>
20074c8: 92 10 20 01 mov 1, %o1
20074cc: 80 a2 20 00 cmp %o0, 0
20074d0: 06 80 00 6c bl 2007680 <aio_cancel+0x1d0>
20074d4: 80 a6 60 00 cmp %i1, 0
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
20074d8: 02 80 00 3b be 20075c4 <aio_cancel+0x114>
20074dc: 92 10 00 18 mov %i0, %o1
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
20074e0: f8 06 40 00 ld [ %i1 ], %i4
20074e4: 80 a7 00 18 cmp %i4, %i0
20074e8: 12 80 00 2f bne 20075a4 <aio_cancel+0xf4>
20074ec: 90 17 63 4c or %i5, 0x34c, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
20074f0: 92 10 00 1c mov %i4, %o1
20074f4: 11 00 80 86 sethi %hi(0x2021800), %o0
20074f8: 94 10 20 00 clr %o2
20074fc: 40 00 01 77 call 2007ad8 <rtems_aio_search_fd>
2007500: 90 12 23 94 or %o0, 0x394, %o0
if (r_chain == NULL) {
2007504: b0 92 20 00 orcc %o0, 0, %i0
2007508: 22 80 00 0f be,a 2007544 <aio_cancel+0x94>
200750c: ba 17 63 4c or %i5, 0x34c, %i5
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
2007510: b8 06 20 1c add %i0, 0x1c, %i4
2007514: 40 00 04 df call 2008890 <pthread_mutex_lock>
2007518: 90 10 00 1c mov %i4, %o0
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
200751c: 92 10 00 19 mov %i1, %o1
2007520: 40 00 01 f4 call 2007cf0 <rtems_aio_remove_req>
2007524: 90 06 20 08 add %i0, 8, %o0
2007528: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&r_chain->mutex);
200752c: 40 00 04 f9 call 2008910 <pthread_mutex_unlock>
2007530: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007534: 40 00 04 f7 call 2008910 <pthread_mutex_unlock>
2007538: 90 17 63 4c or %i5, 0x34c, %o0
return result;
}
return AIO_ALLDONE;
}
200753c: 81 c7 e0 08 ret
2007540: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2007544: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
2007548: 82 07 60 58 add %i5, 0x58, %g1
200754c: 80 a0 80 01 cmp %g2, %g1
2007550: 02 80 00 0f be 200758c <aio_cancel+0xdc> <== NEVER TAKEN
2007554: 90 07 60 54 add %i5, 0x54, %o0
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
2007558: 92 10 00 1c mov %i4, %o1
200755c: 40 00 01 5f call 2007ad8 <rtems_aio_search_fd>
2007560: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2007564: 80 a2 20 00 cmp %o0, 0
2007568: 02 80 00 0e be 20075a0 <aio_cancel+0xf0>
200756c: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
2007570: 40 00 01 e0 call 2007cf0 <rtems_aio_remove_req>
2007574: 90 02 20 08 add %o0, 8, %o0
2007578: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&aio_request_queue.mutex);
200757c: 40 00 04 e5 call 2008910 <pthread_mutex_unlock>
2007580: 90 10 00 1d mov %i5, %o0
return result;
2007584: 81 c7 e0 08 ret
2007588: 81 e8 00 00 restore
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
200758c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2007590: 40 00 04 e0 call 2008910 <pthread_mutex_unlock>
2007594: b0 10 20 02 mov 2, %i0
return AIO_ALLDONE;
2007598: 81 c7 e0 08 ret
200759c: 81 e8 00 00 restore
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
20075a0: 90 10 00 1d mov %i5, %o0
20075a4: 40 00 04 db call 2008910 <pthread_mutex_unlock>
20075a8: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one (EINVAL);
20075ac: 40 00 31 56 call 2013b04 <__errno>
20075b0: 01 00 00 00 nop
20075b4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
20075b8: c2 22 00 00 st %g1, [ %o0 ]
20075bc: 81 c7 e0 08 ret
20075c0: 81 e8 00 00 restore
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
20075c4: 11 00 80 86 sethi %hi(0x2021800), %o0
20075c8: 94 10 20 00 clr %o2
20075cc: 40 00 01 43 call 2007ad8 <rtems_aio_search_fd>
20075d0: 90 12 23 94 or %o0, 0x394, %o0
if (r_chain == NULL) {
20075d4: b8 92 20 00 orcc %o0, 0, %i4
20075d8: 02 80 00 0f be 2007614 <aio_cancel+0x164>
20075dc: b2 07 20 1c add %i4, 0x1c, %i1
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
20075e0: 40 00 04 ac call 2008890 <pthread_mutex_lock>
20075e4: 90 10 00 19 mov %i1, %o0
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
20075e8: 40 00 0b 8b call 200a414 <_Chain_Extract>
20075ec: 90 10 00 1c mov %i4, %o0
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
20075f0: 40 00 01 ac call 2007ca0 <rtems_aio_remove_fd>
20075f4: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&r_chain->mutex);
20075f8: 40 00 04 c6 call 2008910 <pthread_mutex_unlock>
20075fc: 90 10 00 19 mov %i1, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007600: 90 17 63 4c or %i5, 0x34c, %o0
2007604: 40 00 04 c3 call 2008910 <pthread_mutex_unlock>
2007608: b0 10 20 00 clr %i0
return AIO_CANCELED;
200760c: 81 c7 e0 08 ret
2007610: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2007614: ba 17 63 4c or %i5, 0x34c, %i5
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2007618: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
200761c: 82 07 60 58 add %i5, 0x58, %g1
2007620: 80 a0 80 01 cmp %g2, %g1
2007624: 02 bf ff da be 200758c <aio_cancel+0xdc> <== NEVER TAKEN
2007628: 90 07 60 54 add %i5, 0x54, %o0
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
200762c: 92 10 00 18 mov %i0, %o1
2007630: 40 00 01 2a call 2007ad8 <rtems_aio_search_fd>
2007634: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2007638: b8 92 20 00 orcc %o0, 0, %i4
200763c: 22 bf ff d5 be,a 2007590 <aio_cancel+0xe0>
2007640: 90 10 00 1d mov %i5, %o0
2007644: 40 00 0b 74 call 200a414 <_Chain_Extract>
2007648: b2 07 20 1c add %i4, 0x1c, %i1
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
200764c: 40 00 01 95 call 2007ca0 <rtems_aio_remove_fd>
2007650: 90 10 00 1c mov %i4, %o0
pthread_mutex_destroy (&r_chain->mutex);
2007654: 40 00 03 e4 call 20085e4 <pthread_mutex_destroy>
2007658: 90 10 00 19 mov %i1, %o0
pthread_cond_destroy (&r_chain->mutex);
200765c: 40 00 03 03 call 2008268 <pthread_cond_destroy>
2007660: 90 10 00 19 mov %i1, %o0
free (r_chain);
2007664: 7f ff f0 8c call 2003894 <free>
2007668: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
200766c: b0 10 20 00 clr %i0
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
pthread_cond_destroy (&r_chain->mutex);
free (r_chain);
pthread_mutex_unlock (&aio_request_queue.mutex);
2007670: 40 00 04 a8 call 2008910 <pthread_mutex_unlock>
2007674: 90 10 00 1d mov %i5, %o0
return AIO_CANCELED;
2007678: 81 c7 e0 08 ret
200767c: 81 e8 00 00 restore
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
2007680: 40 00 04 a4 call 2008910 <pthread_mutex_unlock>
2007684: 90 17 63 4c or %i5, 0x34c, %o0
rtems_set_errno_and_return_minus_one (EBADF);
2007688: 40 00 31 1f call 2013b04 <__errno>
200768c: b0 10 3f ff mov -1, %i0
2007690: 82 10 20 09 mov 9, %g1
2007694: c2 22 00 00 st %g1, [ %o0 ]
2007698: 81 c7 e0 08 ret
200769c: 81 e8 00 00 restore
020076a8 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
20076a8: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
20076ac: 03 00 00 08 sethi %hi(0x2000), %g1
20076b0: 80 a6 00 01 cmp %i0, %g1
20076b4: 12 80 00 14 bne 2007704 <aio_fsync+0x5c>
20076b8: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
20076bc: d0 06 40 00 ld [ %i1 ], %o0
20076c0: 40 00 20 21 call 200f744 <fcntl>
20076c4: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
20076c8: 90 0a 20 03 and %o0, 3, %o0
20076cc: 90 02 3f ff add %o0, -1, %o0
20076d0: 80 a2 20 01 cmp %o0, 1
20076d4: 18 80 00 0c bgu 2007704 <aio_fsync+0x5c>
20076d8: ba 10 20 09 mov 9, %i5
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
20076dc: 7f ff f2 4a call 2004004 <malloc>
20076e0: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
20076e4: 80 a2 20 00 cmp %o0, 0
20076e8: 02 80 00 06 be 2007700 <aio_fsync+0x58> <== NEVER TAKEN
20076ec: 82 10 20 03 mov 3, %g1
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
20076f0: f2 22 20 14 st %i1, [ %o0 + 0x14 ]
req->aiocbp->aio_lio_opcode = LIO_SYNC;
20076f4: c2 26 60 30 st %g1, [ %i1 + 0x30 ]
return rtems_aio_enqueue (req);
20076f8: 40 00 01 9a call 2007d60 <rtems_aio_enqueue>
20076fc: 91 e8 00 08 restore %g0, %o0, %o0
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2007700: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
2007704: 82 10 3f ff mov -1, %g1
2007708: fa 26 60 34 st %i5, [ %i1 + 0x34 ]
200770c: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
2007710: 40 00 30 fd call 2013b04 <__errno>
2007714: b0 10 3f ff mov -1, %i0
2007718: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
200771c: 81 c7 e0 08 ret
2007720: 81 e8 00 00 restore
0200805c <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
200805c: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2008060: d0 06 00 00 ld [ %i0 ], %o0
2008064: 40 00 1d b8 call 200f744 <fcntl>
2008068: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
200806c: 90 0a 20 03 and %o0, 3, %o0
2008070: 80 a2 20 02 cmp %o0, 2
2008074: 12 80 00 1b bne 20080e0 <aio_read+0x84>
2008078: 80 a2 20 00 cmp %o0, 0
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
200807c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008080: 80 a0 60 00 cmp %g1, 0
2008084: 12 80 00 0f bne 20080c0 <aio_read+0x64>
2008088: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
200808c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2008090: 80 a0 60 00 cmp %g1, 0
2008094: 06 80 00 0c bl 20080c4 <aio_read+0x68>
2008098: 82 10 3f ff mov -1, %g1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
200809c: 7f ff ef da call 2004004 <malloc>
20080a0: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
20080a4: 80 a2 20 00 cmp %o0, 0
20080a8: 02 80 00 12 be 20080f0 <aio_read+0x94> <== NEVER TAKEN
20080ac: 82 10 20 01 mov 1, %g1
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
20080b0: f0 22 20 14 st %i0, [ %o0 + 0x14 ]
req->aiocbp->aio_lio_opcode = LIO_READ;
20080b4: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
return rtems_aio_enqueue (req);
20080b8: 7f ff ff 2a call 2007d60 <rtems_aio_enqueue>
20080bc: 91 e8 00 08 restore %g0, %o0, %o0
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
20080c0: 82 10 3f ff mov -1, %g1
20080c4: fa 26 20 34 st %i5, [ %i0 + 0x34 ]
20080c8: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
20080cc: 40 00 2e 8e call 2013b04 <__errno>
20080d0: b0 10 3f ff mov -1, %i0
20080d4: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
20080d8: 81 c7 e0 08 ret
20080dc: 81 e8 00 00 restore
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
20080e0: 02 bf ff e7 be 200807c <aio_read+0x20> <== NEVER TAKEN
20080e4: ba 10 20 09 mov 9, %i5
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
20080e8: 10 bf ff f7 b 20080c4 <aio_read+0x68>
20080ec: 82 10 3f ff mov -1, %g1
20080f0: 10 bf ff f4 b 20080c0 <aio_read+0x64> <== NOT EXECUTED
20080f4: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
02008100 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
2008100: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2008104: d0 06 00 00 ld [ %i0 ], %o0
2008108: 40 00 1d 8f call 200f744 <fcntl>
200810c: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
2008110: 90 0a 20 03 and %o0, 3, %o0
2008114: 90 02 3f ff add %o0, -1, %o0
2008118: 80 a2 20 01 cmp %o0, 1
200811c: 18 80 00 14 bgu 200816c <aio_write+0x6c>
2008120: ba 10 20 09 mov 9, %i5
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
2008124: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008128: 80 a0 60 00 cmp %g1, 0
200812c: 12 80 00 10 bne 200816c <aio_write+0x6c>
2008130: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
2008134: c2 06 20 08 ld [ %i0 + 8 ], %g1
2008138: 80 a0 60 00 cmp %g1, 0
200813c: 06 80 00 0d bl 2008170 <aio_write+0x70>
2008140: 82 10 3f ff mov -1, %g1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
2008144: 7f ff ef b0 call 2004004 <malloc>
2008148: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
200814c: 80 a2 20 00 cmp %o0, 0
2008150: 02 80 00 06 be 2008168 <aio_write+0x68> <== NEVER TAKEN
2008154: 82 10 20 02 mov 2, %g1
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
2008158: f0 22 20 14 st %i0, [ %o0 + 0x14 ]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
200815c: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
return rtems_aio_enqueue (req);
2008160: 7f ff ff 00 call 2007d60 <rtems_aio_enqueue>
2008164: 91 e8 00 08 restore %g0, %o0, %o0
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2008168: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
200816c: 82 10 3f ff mov -1, %g1
2008170: fa 26 20 34 st %i5, [ %i0 + 0x34 ]
2008174: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
2008178: 40 00 2e 63 call 2013b04 <__errno>
200817c: b0 10 3f ff mov -1, %i0
2008180: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
2008184: 81 c7 e0 08 ret
2008188: 81 e8 00 00 restore
02004f10 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
2004f10: 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) {
2004f14: 3b 00 80 95 sethi %hi(0x2025400), %i5
2004f18: f8 07 62 a0 ld [ %i5 + 0x2a0 ], %i4 ! 20256a0 <rtems_current_user_env>
2004f1c: 03 00 80 98 sethi %hi(0x2026000), %g1
2004f20: 82 10 60 7c or %g1, 0x7c, %g1 ! 202607c <rtems_global_user_env>
2004f24: 80 a7 00 01 cmp %i4, %g1
2004f28: 02 80 00 20 be 2004fa8 <chroot+0x98>
2004f2c: 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);
2004f30: 7f ff ff c3 call 2004e3c <chdir>
2004f34: 90 10 00 18 mov %i0, %o0
if (result) {
2004f38: 80 a2 20 00 cmp %o0, 0
2004f3c: 12 80 00 27 bne 2004fd8 <chroot+0xc8>
2004f40: 92 10 20 01 mov 1, %o1
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
2004f44: 11 00 80 8c sethi %hi(0x2023000), %o0
2004f48: 94 10 20 00 clr %o2
2004f4c: 90 12 21 58 or %o0, 0x158, %o0
2004f50: 96 07 bf ec add %fp, -20, %o3
2004f54: 40 00 01 1e call 20053cc <rtems_filesystem_evaluate_path>
2004f58: 98 10 20 00 clr %o4
2004f5c: 80 a2 20 00 cmp %o0, 0
2004f60: 12 80 00 1e bne 2004fd8 <chroot+0xc8> <== NEVER TAKEN
2004f64: d0 07 62 a0 ld [ %i5 + 0x2a0 ], %o0
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
2004f68: b0 10 20 00 clr %i0
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
2004f6c: 40 00 01 c0 call 200566c <rtems_filesystem_freenode>
2004f70: 90 02 20 18 add %o0, 0x18, %o0
rtems_filesystem_root = loc;
2004f74: c2 07 62 a0 ld [ %i5 + 0x2a0 ], %g1
2004f78: c4 07 bf ec ld [ %fp + -20 ], %g2
2004f7c: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
2004f80: c4 07 bf f0 ld [ %fp + -16 ], %g2
2004f84: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
2004f88: c4 07 bf f4 ld [ %fp + -12 ], %g2
2004f8c: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
2004f90: c4 07 bf f8 ld [ %fp + -8 ], %g2
2004f94: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2004f98: c4 07 bf fc ld [ %fp + -4 ], %g2
2004f9c: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
return 0;
}
2004fa0: 81 c7 e0 08 ret
2004fa4: 81 e8 00 00 restore
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
2004fa8: 40 00 06 fc call 2006b98 <rtems_libio_set_private_env>
2004fac: 01 00 00 00 nop
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
2004fb0: c2 07 62 a0 ld [ %i5 + 0x2a0 ], %g1
2004fb4: 80 a0 40 1c cmp %g1, %i4
2004fb8: 12 bf ff de bne 2004f30 <chroot+0x20>
2004fbc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004fc0: 40 00 3c 8e call 20141f8 <__errno>
2004fc4: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2004fc8: 82 10 20 86 mov 0x86, %g1
2004fcc: c2 22 00 00 st %g1, [ %o0 ]
2004fd0: 81 c7 e0 08 ret
2004fd4: 81 e8 00 00 restore
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
2004fd8: 40 00 3c 88 call 20141f8 <__errno>
2004fdc: b0 10 3f ff mov -1, %i0
2004fe0: 40 00 3c 86 call 20141f8 <__errno>
2004fe4: ba 10 00 08 mov %o0, %i5
2004fe8: c2 02 00 00 ld [ %o0 ], %g1
2004fec: c2 27 40 00 st %g1, [ %i5 ]
2004ff0: 81 c7 e0 08 ret
2004ff4: 81 e8 00 00 restore
02006f34 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
2006f34: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2006f38: 80 a6 60 00 cmp %i1, 0
2006f3c: 02 80 00 2f be 2006ff8 <clock_gettime+0xc4>
2006f40: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2006f44: 02 80 00 19 be 2006fa8 <clock_gettime+0x74>
2006f48: 80 a6 20 04 cmp %i0, 4
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
2006f4c: 02 80 00 12 be 2006f94 <clock_gettime+0x60> <== NEVER TAKEN
2006f50: 80 a6 20 02 cmp %i0, 2
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
2006f54: 02 80 00 10 be 2006f94 <clock_gettime+0x60>
2006f58: 80 a6 20 03 cmp %i0, 3
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
2006f5c: 02 80 00 08 be 2006f7c <clock_gettime+0x48>
2006f60: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
2006f64: 40 00 2e 1c call 20127d4 <__errno>
2006f68: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2006f6c: 82 10 20 16 mov 0x16, %g1
2006f70: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
2006f74: 81 c7 e0 08 ret
2006f78: 81 e8 00 00 restore
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
2006f7c: 40 00 2e 16 call 20127d4 <__errno>
2006f80: b0 10 3f ff mov -1, %i0
2006f84: 82 10 20 58 mov 0x58, %g1
2006f88: c2 22 00 00 st %g1, [ %o0 ]
2006f8c: 81 c7 e0 08 ret
2006f90: 81 e8 00 00 restore
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
2006f94: 90 10 00 19 mov %i1, %o0
2006f98: 40 00 08 a2 call 2009220 <_TOD_Get_uptime_as_timespec>
2006f9c: b0 10 20 00 clr %i0
return 0;
2006fa0: 81 c7 e0 08 ret
2006fa4: 81 e8 00 00 restore
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
2006fa8: 40 00 08 8c call 20091d8 <_TOD_Get_as_timestamp>
2006fac: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2006fb0: f8 1f bf f8 ldd [ %fp + -8 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2006fb4: 94 10 20 00 clr %o2
2006fb8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2006fbc: 90 10 00 1c mov %i4, %o0
2006fc0: 96 12 e2 00 or %o3, 0x200, %o3
2006fc4: 40 00 5b ff call 201dfc0 <__divdi3>
2006fc8: 92 10 00 1d mov %i5, %o1
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2006fcc: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2006fd0: d2 26 40 00 st %o1, [ %i1 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2006fd4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2006fd8: 90 10 00 1c mov %i4, %o0
2006fdc: 96 12 e2 00 or %o3, 0x200, %o3
2006fe0: 92 10 00 1d mov %i5, %o1
2006fe4: 40 00 5c dd call 201e358 <__moddi3>
2006fe8: b0 10 20 00 clr %i0
2006fec: d2 26 60 04 st %o1, [ %i1 + 4 ]
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
2006ff0: 81 c7 e0 08 ret
2006ff4: 81 e8 00 00 restore
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
2006ff8: 40 00 2d f7 call 20127d4 <__errno>
2006ffc: b0 10 3f ff mov -1, %i0
2007000: 82 10 20 16 mov 0x16, %g1
2007004: c2 22 00 00 st %g1, [ %o0 ]
2007008: 81 c7 e0 08 ret
200700c: 81 e8 00 00 restore
02007010 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
2007010: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2007014: 80 a6 60 00 cmp %i1, 0
2007018: 02 80 00 54 be 2007168 <clock_settime+0x158> <== NEVER TAKEN
200701c: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2007020: 02 80 00 0c be 2007050 <clock_settime+0x40>
2007024: 80 a6 20 02 cmp %i0, 2
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
2007028: 02 80 00 4a be 2007150 <clock_settime+0x140>
200702c: 80 a6 20 03 cmp %i0, 3
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
2007030: 02 80 00 48 be 2007150 <clock_settime+0x140>
2007034: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
2007038: 40 00 2d e7 call 20127d4 <__errno>
200703c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2007040: 82 10 20 16 mov 0x16, %g1
2007044: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
2007048: 81 c7 e0 08 ret
200704c: 81 e8 00 00 restore
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
2007050: c4 06 40 00 ld [ %i1 ], %g2
2007054: 03 08 76 b9 sethi %hi(0x21dae400), %g1
2007058: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff <RAM_END+0x1f9ae4ff>
200705c: 80 a0 80 01 cmp %g2, %g1
2007060: 08 80 00 42 bleu 2007168 <clock_settime+0x158>
2007064: 03 00 80 8a sethi %hi(0x2022800), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007068: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 2022a80 <_Thread_Dispatch_disable_level>
200706c: 84 00 a0 01 inc %g2
2007070: c4 20 62 80 st %g2, [ %g1 + 0x280 ]
return _Thread_Dispatch_disable_level;
2007074: c2 00 62 80 ld [ %g1 + 0x280 ], %g1
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
2007078: d6 06 40 00 ld [ %i1 ], %o3
200707c: e6 06 60 04 ld [ %i1 + 4 ], %l3
2007080: 95 3a e0 1f sra %o3, 0x1f, %o2
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
2007084: 83 2a a0 03 sll %o2, 3, %g1
2007088: 9b 2a e0 03 sll %o3, 3, %o5
200708c: 89 32 e0 1d srl %o3, 0x1d, %g4
2007090: 98 11 00 01 or %g4, %g1, %o4
2007094: 83 33 60 1b srl %o5, 0x1b, %g1
2007098: 85 2b 20 05 sll %o4, 5, %g2
200709c: 87 2b 60 05 sll %o5, 5, %g3
20070a0: 84 10 40 02 or %g1, %g2, %g2
20070a4: 86 a0 c0 0d subcc %g3, %o5, %g3
20070a8: 83 30 e0 1a srl %g3, 0x1a, %g1
20070ac: 84 60 80 0c subx %g2, %o4, %g2
20070b0: bb 28 e0 06 sll %g3, 6, %i5
20070b4: b9 28 a0 06 sll %g2, 6, %i4
20070b8: 86 a7 40 03 subcc %i5, %g3, %g3
20070bc: b8 10 40 1c or %g1, %i4, %i4
20070c0: 84 67 00 02 subx %i4, %g2, %g2
20070c4: 86 80 c0 0b addcc %g3, %o3, %g3
20070c8: 83 30 e0 1e srl %g3, 0x1e, %g1
20070cc: 84 40 80 0a addx %g2, %o2, %g2
20070d0: b7 28 e0 02 sll %g3, 2, %i3
20070d4: b5 28 a0 02 sll %g2, 2, %i2
20070d8: 86 80 c0 1b addcc %g3, %i3, %g3
20070dc: b4 10 40 1a or %g1, %i2, %i2
20070e0: 83 30 e0 1e srl %g3, 0x1e, %g1
20070e4: 84 40 80 1a addx %g2, %i2, %g2
20070e8: b3 28 e0 02 sll %g3, 2, %i1
20070ec: b1 28 a0 02 sll %g2, 2, %i0
20070f0: 86 80 c0 19 addcc %g3, %i1, %g3
20070f4: b0 10 40 18 or %g1, %i0, %i0
20070f8: a3 28 e0 02 sll %g3, 2, %l1
20070fc: 84 40 80 18 addx %g2, %i0, %g2
2007100: 83 30 e0 1e srl %g3, 0x1e, %g1
2007104: a1 28 a0 02 sll %g2, 2, %l0
2007108: 86 80 c0 11 addcc %g3, %l1, %g3
200710c: a0 10 40 10 or %g1, %l0, %l0
2007110: 84 40 80 10 addx %g2, %l0, %g2
2007114: 83 28 e0 09 sll %g3, 9, %g1
2007118: 89 28 a0 09 sll %g2, 9, %g4
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
200711c: 90 07 bf f8 add %fp, -8, %o0
2007120: b9 30 e0 17 srl %g3, 0x17, %i4
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
2007124: a5 3c e0 1f sra %l3, 0x1f, %l2
2007128: 86 84 c0 01 addcc %l3, %g1, %g3
200712c: 84 17 00 04 or %i4, %g4, %g2
2007130: 84 44 80 02 addx %l2, %g2, %g2
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
2007134: b0 10 20 00 clr %i0
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
2007138: 40 00 08 59 call 200929c <_TOD_Set_with_timestamp>
200713c: c4 3f bf f8 std %g2, [ %fp + -8 ]
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
2007140: 40 00 0f 25 call 200add4 <_Thread_Enable_dispatch>
2007144: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
2007148: 81 c7 e0 08 ret
200714c: 81 e8 00 00 restore
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
2007150: 40 00 2d a1 call 20127d4 <__errno>
2007154: b0 10 3f ff mov -1, %i0
2007158: 82 10 20 58 mov 0x58, %g1
200715c: c2 22 00 00 st %g1, [ %o0 ]
2007160: 81 c7 e0 08 ret
2007164: 81 e8 00 00 restore
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
2007168: 40 00 2d 9b call 20127d4 <__errno>
200716c: b0 10 3f ff mov -1, %i0
2007170: 82 10 20 16 mov 0x16, %g1
2007174: c2 22 00 00 st %g1, [ %o0 ]
2007178: 81 c7 e0 08 ret
200717c: 81 e8 00 00 restore
02002a84 <create_disk>:
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2002a84: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2002a88: 39 00 80 8d sethi %hi(0x2023400), %i4
2002a8c: e0 07 23 ec ld [ %i4 + 0x3ec ], %l0 ! 20237ec <disktab_size>
2002a90: 03 00 80 8d sethi %hi(0x2023400), %g1
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2002a94: ba 10 00 18 mov %i0, %i5
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2002a98: 80 a6 00 10 cmp %i0, %l0
2002a9c: 0a 80 00 16 bcs 2002af4 <create_disk+0x70>
2002aa0: e2 00 63 f0 ld [ %g1 + 0x3f0 ], %l1
rtems_disk_device_table *table = disktab;
2002aa4: 27 00 80 8d sethi %hi(0x2023400), %l3
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
2002aa8: a5 2c 20 01 sll %l0, 1, %l2
if (major >= new_size) {
2002aac: 80 a6 00 12 cmp %i0, %l2
2002ab0: 0a 80 00 03 bcs 2002abc <create_disk+0x38> <== NEVER TAKEN
2002ab4: d0 04 e3 f0 ld [ %l3 + 0x3f0 ], %o0
new_size = major + 1;
2002ab8: a4 06 20 01 add %i0, 1, %l2
}
table = realloc(table, new_size * sizeof(*table));
2002abc: 93 2c a0 03 sll %l2, 3, %o1
2002ac0: 40 00 0a 72 call 2005488 <realloc>
2002ac4: b0 10 20 1a mov 0x1a, %i0
if (table == NULL) {
2002ac8: 80 a2 20 00 cmp %o0, 0
2002acc: 02 80 00 1b be 2002b38 <create_disk+0xb4> <== ALWAYS TAKEN
2002ad0: a2 10 00 08 mov %o0, %l1
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2002ad4: 94 24 80 10 sub %l2, %l0, %o2 <== NOT EXECUTED
2002ad8: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED
2002adc: 92 10 20 00 clr %o1 <== NOT EXECUTED
2002ae0: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED
2002ae4: 40 00 4f 24 call 2016774 <memset> <== NOT EXECUTED
2002ae8: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED
disktab = table;
2002aec: e2 24 e3 f0 st %l1, [ %l3 + 0x3f0 ] <== NOT EXECUTED
disktab_size = new_size;
2002af0: e4 27 23 ec st %l2, [ %i4 + 0x3ec ] <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
2002af4: 83 2f 60 03 sll %i5, 3, %g1
2002af8: e0 04 40 01 ld [ %l1 + %g1 ], %l0
2002afc: a2 04 40 01 add %l1, %g1, %l1
2002b00: 80 a4 20 00 cmp %l0, 0
2002b04: 02 80 00 0f be 2002b40 <create_disk+0xbc>
2002b08: e4 04 60 04 ld [ %l1 + 4 ], %l2
2002b0c: 80 a6 40 12 cmp %i1, %l2
2002b10: 1a 80 00 0d bcc 2002b44 <create_disk+0xc0> <== NEVER TAKEN
2002b14: 80 a4 a0 00 cmp %l2, 0
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
disktab [major].size = new_size;
}
return disktab [major].minor + minor;
2002b18: 83 2e 60 02 sll %i1, 2, %g1
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
2002b1c: b8 84 00 01 addcc %l0, %g1, %i4
2002b20: 02 80 00 06 be 2002b38 <create_disk+0xb4> <== NEVER TAKEN
2002b24: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
2002b28: c2 04 00 01 ld [ %l0 + %g1 ], %g1
2002b2c: 80 a0 60 00 cmp %g1, 0
2002b30: 02 80 00 20 be 2002bb0 <create_disk+0x12c>
2002b34: b0 10 20 0c mov 0xc, %i0
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
2002b38: 81 c7 e0 08 ret
2002b3c: 81 e8 00 00 restore
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
2002b40: 80 a4 a0 00 cmp %l2, 0
2002b44: 12 80 00 15 bne 2002b98 <create_disk+0x114> <== NEVER TAKEN
2002b48: b8 10 20 08 mov 8, %i4
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
}
if (minor >= new_size) {
2002b4c: 80 a6 40 1c cmp %i1, %i4
2002b50: 3a 80 00 02 bcc,a 2002b58 <create_disk+0xd4>
2002b54: b8 06 60 01 add %i1, 1, %i4
new_size = minor + 1;
}
table = realloc(table, new_size * sizeof(*table));
2002b58: 90 10 00 10 mov %l0, %o0
2002b5c: 93 2f 20 02 sll %i4, 2, %o1
2002b60: 40 00 0a 4a call 2005488 <realloc>
2002b64: b0 10 20 1a mov 0x1a, %i0
if (table == NULL) {
2002b68: 80 a2 20 00 cmp %o0, 0
2002b6c: 02 bf ff f3 be 2002b38 <create_disk+0xb4>
2002b70: a0 10 00 08 mov %o0, %l0
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2002b74: 94 27 00 12 sub %i4, %l2, %o2
2002b78: 91 2c a0 02 sll %l2, 2, %o0
2002b7c: 92 10 20 00 clr %o1
2002b80: 90 04 00 08 add %l0, %o0, %o0
2002b84: 40 00 4e fc call 2016774 <memset>
2002b88: 95 2a a0 02 sll %o2, 2, %o2
disktab [major].minor = table;
2002b8c: e0 24 40 00 st %l0, [ %l1 ]
disktab [major].size = new_size;
2002b90: 10 bf ff e2 b 2002b18 <create_disk+0x94>
2002b94: f8 24 60 04 st %i4, [ %l1 + 4 ]
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
2002b98: b9 2c a0 01 sll %l2, 1, %i4 <== NOT EXECUTED
}
if (minor >= new_size) {
2002b9c: 80 a6 40 1c cmp %i1, %i4 <== NOT EXECUTED
2002ba0: 0a bf ff ef bcs 2002b5c <create_disk+0xd8> <== NOT EXECUTED
2002ba4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002ba8: 10 bf ff ed b 2002b5c <create_disk+0xd8> <== NOT EXECUTED
2002bac: b8 06 60 01 add %i1, 1, %i4 <== NOT EXECUTED
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
2002bb0: 90 10 20 38 mov 0x38, %o0
2002bb4: 40 00 07 21 call 2004838 <malloc>
2002bb8: b0 10 20 1a mov 0x1a, %i0
if (dd == NULL) {
2002bbc: 80 a2 20 00 cmp %o0, 0
2002bc0: 02 bf ff de be 2002b38 <create_disk+0xb4> <== NEVER TAKEN
2002bc4: a0 10 00 08 mov %o0, %l0
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
2002bc8: 80 a6 a0 00 cmp %i2, 0
2002bcc: 02 80 00 0f be 2002c08 <create_disk+0x184>
2002bd0: a2 10 20 00 clr %l1
alloc_name = strdup(name);
2002bd4: 40 00 50 48 call 2016cf4 <strdup>
2002bd8: 90 10 00 1a mov %i2, %o0
if (alloc_name == NULL) {
2002bdc: a2 92 20 00 orcc %o0, 0, %l1
2002be0: 02 80 00 15 be 2002c34 <create_disk+0x1b0> <== NEVER TAKEN
2002be4: b4 10 00 08 mov %o0, %i2
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
2002be8: 94 10 00 1d mov %i5, %o2
2002bec: 13 00 00 18 sethi %hi(0x6000), %o1
2002bf0: 96 10 00 19 mov %i1, %o3
2002bf4: 40 00 07 61 call 2004978 <mknod>
2002bf8: 92 12 61 ff or %o1, 0x1ff, %o1
2002bfc: 80 a2 20 00 cmp %o0, 0
2002c00: 06 80 00 0b bl 2002c2c <create_disk+0x1a8> <== NEVER TAKEN
2002c04: 90 10 00 1a mov %i2, %o0
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
2002c08: fa 24 00 00 st %i5, [ %l0 ]
2002c0c: f2 24 20 04 st %i1, [ %l0 + 4 ]
dd->name = alloc_name;
2002c10: e2 24 20 10 st %l1, [ %l0 + 0x10 ]
dd->uses = 0;
2002c14: c0 24 20 14 clr [ %l0 + 0x14 ]
dd->deleted = false;
2002c18: c0 2c 20 30 clrb [ %l0 + 0x30 ]
*dd_entry = dd;
2002c1c: e0 27 00 00 st %l0, [ %i4 ]
*dd_ptr = dd;
2002c20: e0 26 c0 00 st %l0, [ %i3 ]
return RTEMS_SUCCESSFUL;
}
2002c24: 81 c7 e0 08 ret
2002c28: 91 e8 20 00 restore %g0, 0, %o0
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
2002c2c: 40 00 05 cf call 2004368 <free> <== NOT EXECUTED
2002c30: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
free(dd);
2002c34: 40 00 05 cd call 2004368 <free> <== NOT EXECUTED
2002c38: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
2002c3c: 81 c7 e0 08 ret <== NOT EXECUTED
2002c40: 81 e8 00 00 restore <== NOT EXECUTED
0200b700 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
200b700: 9d e3 bf a0 save %sp, -96, %sp
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
200b704: 80 8e bf f8 btst -8, %i2
200b708: 12 80 00 33 bne 200b7d4 <devFS_evaluate_path+0xd4> <== NEVER TAKEN
200b70c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
200b710: f4 06 c0 00 ld [ %i3 ], %i2
if (!device_name_table)
200b714: 80 a6 a0 00 cmp %i2, 0
200b718: 02 80 00 35 be 200b7ec <devFS_evaluate_path+0xec>
200b71c: 03 00 80 6d sethi %hi(0x201b400), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
200b720: e0 00 60 90 ld [ %g1 + 0x90 ], %l0 ! 201b490 <rtems_device_table_size>
* handlers.
*/
extern rtems_filesystem_file_handlers_r devFS_file_handlers;
int devFS_evaluate_path(
200b724: ba 10 20 00 clr %i5
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
200b728: 80 a4 20 00 cmp %l0, 0
200b72c: 02 80 00 18 be 200b78c <devFS_evaluate_path+0x8c> <== NEVER TAKEN
200b730: 82 10 20 00 clr %g1
if (!device_name_table[i].device_name)
200b734: a3 28 60 02 sll %g1, 2, %l1
200b738: 83 28 60 04 sll %g1, 4, %g1
200b73c: a2 04 40 01 add %l1, %g1, %l1
200b740: f8 06 80 11 ld [ %i2 + %l1 ], %i4
200b744: 80 a7 20 00 cmp %i4, 0
200b748: 02 80 00 0d be 200b77c <devFS_evaluate_path+0x7c>
200b74c: a2 06 80 11 add %i2, %l1, %l1
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
200b750: 90 10 00 18 mov %i0, %o0
200b754: 92 10 00 1c mov %i4, %o1
200b758: 40 00 11 e4 call 200fee8 <strncmp>
200b75c: 94 10 00 19 mov %i1, %o2
200b760: 80 a2 20 00 cmp %o0, 0
200b764: 32 80 00 07 bne,a 200b780 <devFS_evaluate_path+0x80>
200b768: ba 07 60 01 inc %i5
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
200b76c: c2 4f 00 19 ldsb [ %i4 + %i1 ], %g1
200b770: 80 a0 60 00 cmp %g1, 0
200b774: 02 80 00 0c be 200b7a4 <devFS_evaluate_path+0xa4>
200b778: 03 00 80 6d sethi %hi(0x201b400), %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++) {
200b77c: ba 07 60 01 inc %i5
200b780: 80 a7 40 10 cmp %i5, %l0
200b784: 12 bf ff ec bne 200b734 <devFS_evaluate_path+0x34>
200b788: 82 10 00 1d mov %i5, %g1
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
200b78c: 40 00 0c 27 call 200e828 <__errno>
200b790: b0 10 3f ff mov -1, %i0
200b794: 82 10 20 02 mov 2, %g1
200b798: c2 22 00 00 st %g1, [ %o0 ]
}
200b79c: 81 c7 e0 08 ret
200b7a0: 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;
200b7a4: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
200b7a8: 05 00 80 6d sethi %hi(0x201b400), %g2
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
200b7ac: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
200b7b0: 84 10 a1 58 or %g2, 0x158, %g2
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
200b7b4: e2 26 c0 00 st %l1, [ %i3 ]
pathloc->handlers = &devFS_file_handlers;
200b7b8: c4 26 e0 08 st %g2, [ %i3 + 8 ]
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
200b7bc: c2 26 e0 10 st %g1, [ %i3 + 0x10 ]
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
200b7c0: 05 00 80 6d sethi %hi(0x201b400), %g2
200b7c4: 84 10 a1 90 or %g2, 0x190, %g2 ! 201b590 <devFS_ops>
200b7c8: c4 26 e0 0c st %g2, [ %i3 + 0xc ]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
200b7cc: 81 c7 e0 08 ret
200b7d0: 91 e8 20 00 restore %g0, 0, %o0
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
200b7d4: 40 00 0c 15 call 200e828 <__errno> <== NOT EXECUTED
200b7d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b7dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200b7e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b7e4: 81 c7 e0 08 ret <== NOT EXECUTED
200b7e8: 81 e8 00 00 restore <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
200b7ec: 40 00 0c 0f call 200e828 <__errno>
200b7f0: b0 10 3f ff mov -1, %i0
200b7f4: 82 10 20 0e mov 0xe, %g1
200b7f8: c2 22 00 00 st %g1, [ %o0 ]
200b7fc: 81 c7 e0 08 ret
200b800: 81 e8 00 00 restore
020030e0 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
20030e0: 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') &&
20030e4: c2 4e 00 00 ldsb [ %i0 ], %g1
20030e8: 80 a0 60 64 cmp %g1, 0x64
20030ec: 02 80 00 43 be 20031f8 <devFS_mknod+0x118>
20030f0: ba 10 00 18 mov %i0, %i5
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
20030f4: 03 00 00 3c sethi %hi(0xf000), %g1
20030f8: 05 00 00 08 sethi %hi(0x2000), %g2
20030fc: 82 0e 40 01 and %i1, %g1, %g1
2003100: 80 a0 40 02 cmp %g1, %g2
2003104: 12 80 00 4b bne 2003230 <devFS_mknod+0x150>
2003108: 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;
200310c: f0 07 00 00 ld [ %i4 ], %i0
if (!device_name_table)
2003110: 80 a6 20 00 cmp %i0, 0
2003114: 02 80 00 56 be 200326c <devFS_mknod+0x18c>
2003118: 03 00 80 6d sethi %hi(0x201b400), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
200311c: e0 00 60 90 ld [ %g1 + 0x90 ], %l0 ! 201b490 <rtems_device_table_size>
2003120: 80 a4 20 00 cmp %l0, 0
2003124: 02 80 00 4c be 2003254 <devFS_mknod+0x174>
2003128: 82 10 20 00 clr %g1
#include <stdlib.h>
#include <rtems/seterr.h>
#include "devfs.h"
int devFS_mknod(
200312c: a2 10 3f ff mov -1, %l1
2003130: 10 80 00 0a b 2003158 <devFS_mknod+0x78>
2003134: b8 10 20 00 clr %i4
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
2003138: 40 00 31 82 call 200f740 <strcmp>
200313c: 01 00 00 00 nop
2003140: 80 a2 20 00 cmp %o0, 0
2003144: 02 80 00 27 be 20031e0 <devFS_mknod+0x100>
2003148: b8 07 20 01 inc %i4
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
200314c: 80 a7 00 10 cmp %i4, %l0
2003150: 02 80 00 0e be 2003188 <devFS_mknod+0xa8>
2003154: 82 10 00 1c mov %i4, %g1
if (device_name_table[i].device_name == NULL)
2003158: 85 28 60 02 sll %g1, 2, %g2
200315c: 83 28 60 04 sll %g1, 4, %g1
2003160: 82 00 80 01 add %g2, %g1, %g1
2003164: d2 06 00 01 ld [ %i0 + %g1 ], %o1
2003168: 80 a2 60 00 cmp %o1, 0
200316c: 12 bf ff f3 bne 2003138 <devFS_mknod+0x58>
2003170: 90 10 00 1d mov %i5, %o0
2003174: a2 10 00 1c mov %i4, %l1
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
2003178: b8 07 20 01 inc %i4
200317c: 80 a7 00 10 cmp %i4, %l0
2003180: 12 bf ff f6 bne 2003158 <devFS_mknod+0x78>
2003184: 82 10 00 1c mov %i4, %g1
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
2003188: 80 a4 7f ff cmp %l1, -1
200318c: 02 80 00 32 be 2003254 <devFS_mknod+0x174> <== NEVER TAKEN
2003190: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
2003194: 7f ff ff 44 call 2002ea4 <sparc_disable_interrupts>
2003198: 01 00 00 00 nop
200319c: a0 10 00 08 mov %o0, %l0
device_name_table[slot].device_name = path;
20031a0: 83 2c 60 02 sll %l1, 2, %g1
device_name_table[slot].device_name_length = strlen(path);
20031a4: 90 10 00 1d mov %i5, %o0
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = path;
20031a8: a3 2c 60 04 sll %l1, 4, %l1
20031ac: a2 00 40 11 add %g1, %l1, %l1
20031b0: b8 06 00 11 add %i0, %l1, %i4
device_name_table[slot].device_name_length = strlen(path);
20031b4: 40 00 33 1c call 200fe24 <strlen>
20031b8: fa 26 00 11 st %i5, [ %i0 + %l1 ]
device_name_table[slot].major = major;
20031bc: f4 27 20 08 st %i2, [ %i4 + 8 ]
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = path;
device_name_table[slot].device_name_length = strlen(path);
20031c0: d0 27 20 04 st %o0, [ %i4 + 4 ]
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
20031c4: f6 27 20 0c st %i3, [ %i4 + 0xc ]
device_name_table[slot].mode = mode;
20031c8: f2 27 20 10 st %i1, [ %i4 + 0x10 ]
_ISR_Enable(level);
return 0;
20031cc: b0 10 20 00 clr %i0
device_name_table[slot].device_name = path;
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
20031d0: 7f ff ff 39 call 2002eb4 <sparc_enable_interrupts>
20031d4: 90 10 00 10 mov %l0, %o0
return 0;
}
20031d8: 81 c7 e0 08 ret
20031dc: 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 );
20031e0: 40 00 2d 92 call 200e828 <__errno>
20031e4: b0 10 3f ff mov -1, %i0
20031e8: 82 10 20 11 mov 0x11, %g1
20031ec: c2 22 00 00 st %g1, [ %o0 ]
20031f0: 81 c7 e0 08 ret
20031f4: 81 e8 00 00 restore
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
20031f8: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1
20031fc: 80 a0 60 65 cmp %g1, 0x65
2003200: 12 bf ff be bne 20030f8 <devFS_mknod+0x18> <== NEVER TAKEN
2003204: 03 00 00 3c sethi %hi(0xf000), %g1
2003208: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1
200320c: 80 a0 60 76 cmp %g1, 0x76
2003210: 12 bf ff ba bne 20030f8 <devFS_mknod+0x18> <== NEVER TAKEN
2003214: 03 00 00 3c sethi %hi(0xf000), %g1
(path[2] == 'v') && (path[3] == '\0'))
2003218: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1
200321c: 80 a0 60 00 cmp %g1, 0
2003220: 12 bf ff b5 bne 20030f4 <devFS_mknod+0x14>
2003224: b0 10 20 00 clr %i0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
2003228: 81 c7 e0 08 ret
200322c: 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))
2003230: 80 a0 40 02 cmp %g1, %g2
2003234: 22 bf ff b7 be,a 2003110 <devFS_mknod+0x30>
2003238: f0 07 00 00 ld [ %i4 ], %i0
rtems_set_errno_and_return_minus_one( EINVAL );
200323c: 40 00 2d 7b call 200e828 <__errno>
2003240: b0 10 3f ff mov -1, %i0
2003244: 82 10 20 16 mov 0x16, %g1
2003248: c2 22 00 00 st %g1, [ %o0 ]
200324c: 81 c7 e0 08 ret
2003250: 81 e8 00 00 restore
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
2003254: 40 00 2d 75 call 200e828 <__errno>
2003258: b0 10 3f ff mov -1, %i0
200325c: 82 10 20 0c mov 0xc, %g1
2003260: c2 22 00 00 st %g1, [ %o0 ]
2003264: 81 c7 e0 08 ret
2003268: 81 e8 00 00 restore
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
200326c: 40 00 2d 6f call 200e828 <__errno>
2003270: b0 10 3f ff mov -1, %i0
2003274: 82 10 20 0e mov 0xe, %g1
2003278: c2 22 00 00 st %g1, [ %o0 ]
200327c: 81 c7 e0 08 ret
2003280: 81 e8 00 00 restore
02002a48 <disk_unlock>:
}
}
static void
disk_unlock(void)
{
2002a48: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2002a4c: 03 00 80 8d sethi %hi(0x2023400), %g1
2002a50: d0 00 63 e8 ld [ %g1 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2002a54: 03 00 80 8d sethi %hi(0x2023400), %g1
2002a58: c0 28 63 e4 clrb [ %g1 + 0x3e4 ] ! 20237e4 <diskdevs_protected>
sc = rtems_semaphore_release(diskdevs_mutex);
2002a5c: 40 00 16 c7 call 2008578 <rtems_semaphore_release>
2002a60: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2002a64: 80 a2 20 00 cmp %o0, 0
2002a68: 12 80 00 04 bne 2002a78 <disk_unlock+0x30> <== NEVER TAKEN
2002a6c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
2002a70: 81 c7 e0 08 ret
2002a74: 81 e8 00 00 restore
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2002a78: 40 00 18 22 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002a7c: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
02005468 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2005468: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) &&
200546c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2005470: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2005474: 02 80 00 08 be 2005494 <echo+0x2c> <== NOT EXECUTED
2005478: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
200547c: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED
2005480: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED
2005484: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED
2005488: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
200548c: 12 80 00 07 bne 20054a8 <echo+0x40> <== NOT EXECUTED
2005490: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
2005494: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2005498: 7f ff ff 8d call 20052cc <oproc> <== NOT EXECUTED
200549c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20054a0: 81 c7 e0 08 ret <== NOT EXECUTED
20054a4: 81 e8 00 00 restore <== NOT EXECUTED
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
20054a8: 02 bf ff fc be 2005498 <echo+0x30> <== NOT EXECUTED
20054ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20054b0: 80 a6 20 0a cmp %i0, 0xa <== NOT EXECUTED
20054b4: 02 bf ff f9 be 2005498 <echo+0x30> <== NOT EXECUTED
20054b8: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
20054bc: b0 1e 20 40 xor %i0, 0x40, %i0 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
20054c0: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
20054c4: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
20054c8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
20054cc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20054d0: 7f ff ff 2f call 200518c <rtems_termios_puts> <== NOT EXECUTED
20054d4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += 2;
20054d8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
20054dc: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
20054e0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
20054e4: 81 c7 e0 08 ret <== NOT EXECUTED
20054e8: 81 e8 00 00 restore <== NOT EXECUTED
0200430c <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
200430c: 03 00 80 83 sethi %hi(0x2020c00), %g1
2004310: d0 00 61 58 ld [ %g1 + 0x158 ], %o0 ! 2020d58 <group_fp>
2004314: 80 a2 20 00 cmp %o0, 0
2004318: 02 80 00 05 be 200432c <endgrent+0x20> <== NEVER TAKEN
200431c: 01 00 00 00 nop
fclose(group_fp);
2004320: 82 13 c0 00 mov %o7, %g1
2004324: 40 00 38 b6 call 20125fc <fclose>
2004328: 9e 10 40 00 mov %g1, %o7
200432c: 81 c3 e0 08 retl <== NOT EXECUTED
02004164 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
2004164: 03 00 80 83 sethi %hi(0x2020c00), %g1
2004168: d0 00 60 78 ld [ %g1 + 0x78 ], %o0 ! 2020c78 <passwd_fp>
200416c: 80 a2 20 00 cmp %o0, 0
2004170: 02 80 00 05 be 2004184 <endpwent+0x20> <== NEVER TAKEN
2004174: 01 00 00 00 nop
fclose(passwd_fp);
2004178: 82 13 c0 00 mov %o7, %g1
200417c: 40 00 39 20 call 20125fc <fclose>
2004180: 9e 10 40 00 mov %g1, %o7
2004184: 81 c3 e0 08 retl <== NOT EXECUTED
020054ec <erase.part.2>:
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
20054ec: 9d e3 bf 98 save %sp, -104, %sp
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
20054f0: 35 00 80 74 sethi %hi(0x201d000), %i2
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
20054f4: 39 00 80 74 sethi %hi(0x201d000), %i4
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
20054f8: 37 00 80 7a sethi %hi(0x201e800), %i3
rtems_termios_puts ("\b \b", 3, tty);
20054fc: b4 16 a3 90 or %i2, 0x390, %i2
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
2005500: 10 80 00 07 b 200551c <erase.part.2+0x30>
2005504: b8 17 23 88 or %i4, 0x388, %i4
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2005508: 12 80 00 74 bne 20056d8 <erase.part.2+0x1ec> <== NOT EXECUTED
200550c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2005510: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2005514: 02 80 00 6f be 20056d0 <erase.part.2+0x1e4> <== NEVER TAKEN
2005518: 01 00 00 00 nop
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
200551c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
2005520: 80 a0 a0 00 cmp %g2, 0
2005524: 02 80 00 22 be 20055ac <erase.part.2+0xc0>
2005528: 84 00 bf ff add %g2, -1, %g2
unsigned char c = tty->cbuf[--tty->ccount];
200552c: c8 06 20 1c ld [ %i0 + 0x1c ], %g4
if (tty->termios.c_lflag & ECHO) {
2005530: c6 06 20 3c ld [ %i0 + 0x3c ], %g3
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
2005534: c4 26 20 20 st %g2, [ %i0 + 0x20 ]
if (tty->termios.c_lflag & ECHO) {
2005538: 80 88 e0 08 btst 8, %g3
200553c: 02 bf ff f5 be 2005510 <erase.part.2+0x24> <== NEVER TAKEN
2005540: fa 09 00 02 ldub [ %g4 + %g2 ], %i5
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2005544: 80 a6 60 00 cmp %i1, 0
2005548: 12 80 00 05 bne 200555c <erase.part.2+0x70>
200554c: ba 0f 60 ff and %i5, 0xff, %i5
2005550: 80 88 e0 10 btst 0x10, %g3
2005554: 22 80 00 42 be,a 200565c <erase.part.2+0x170> <== NEVER TAKEN
2005558: c2 0e 20 43 ldub [ %i0 + 0x43 ], %g1 <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
200555c: 80 a7 60 09 cmp %i5, 9
2005560: 02 80 00 15 be 20055b4 <erase.part.2+0xc8>
2005564: c2 06 e3 34 ld [ %i3 + 0x334 ], %g1
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2005568: ba 07 60 01 inc %i5
200556c: c2 08 40 1d ldub [ %g1 + %i5 ], %g1
2005570: 80 88 60 20 btst 0x20, %g1
2005574: 12 bf ff e5 bne 2005508 <erase.part.2+0x1c> <== NEVER TAKEN
2005578: 80 88 e2 00 btst 0x200, %g3
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
200557c: 11 00 80 74 sethi %hi(0x201d000), %o0
2005580: 92 10 20 03 mov 3, %o1
2005584: 90 12 23 90 or %o0, 0x390, %o0
2005588: 7f ff ff 01 call 200518c <rtems_termios_puts>
200558c: 94 10 00 18 mov %i0, %o2
if (tty->column)
2005590: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2005594: 80 a0 60 00 cmp %g1, 0
2005598: 02 bf ff df be 2005514 <erase.part.2+0x28> <== NEVER TAKEN
200559c: 80 a6 60 00 cmp %i1, 0
tty->column--;
20055a0: 82 00 7f ff add %g1, -1, %g1
}
}
}
if (!lineFlag)
20055a4: 12 bf ff de bne 200551c <erase.part.2+0x30>
20055a8: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
20055ac: 81 c7 e0 08 ret
20055b0: 81 e8 00 00 restore
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
20055b4: 80 a0 a0 00 cmp %g2, 0
20055b8: 02 80 00 17 be 2005614 <erase.part.2+0x128>
20055bc: fa 06 20 2c ld [ %i0 + 0x2c ], %i5
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
20055c0: da 06 e3 34 ld [ %i3 + 0x334 ], %o5
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
20055c4: 82 10 20 00 clr %g1
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
20055c8: 10 80 00 07 b 20055e4 <erase.part.2+0xf8>
20055cc: 98 08 e2 00 and %g3, 0x200, %o4
20055d0: 32 80 00 02 bne,a 20055d8 <erase.part.2+0xec> <== NOT EXECUTED
20055d4: ba 07 60 02 add %i5, 2, %i5 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
20055d8: 80 a0 80 01 cmp %g2, %g1
20055dc: 22 80 00 0f be,a 2005618 <erase.part.2+0x12c> <== NEVER TAKEN
20055e0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED
c = tty->cbuf[i++];
20055e4: c6 09 00 01 ldub [ %g4 + %g1 ], %g3
20055e8: 82 00 60 01 inc %g1
if (c == '\t') {
20055ec: 80 a0 e0 09 cmp %g3, 9
20055f0: 02 80 00 18 be 2005650 <erase.part.2+0x164>
20055f4: 9e 03 40 03 add %o5, %g3, %o7
col = (col | 7) + 1;
} else if (iscntrl (c)) {
20055f8: de 0b e0 01 ldub [ %o7 + 1 ], %o7
20055fc: 80 8b e0 20 btst 0x20, %o7
2005600: 12 bf ff f4 bne 20055d0 <erase.part.2+0xe4> <== NEVER TAKEN
2005604: 80 a3 20 00 cmp %o4, 0
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2005608: 80 a0 80 01 cmp %g2, %g1
200560c: 12 bf ff f6 bne 20055e4 <erase.part.2+0xf8>
2005610: ba 07 60 01 inc %i5
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2005614: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2005618: 80 a7 40 01 cmp %i5, %g1
200561c: 16 bf ff be bge 2005514 <erase.part.2+0x28> <== NEVER TAKEN
2005620: 80 a6 60 00 cmp %i1, 0
rtems_termios_puts ("\b", 1, tty);
2005624: 90 10 00 1c mov %i4, %o0
2005628: 92 10 20 01 mov 1, %o1
200562c: 7f ff fe d8 call 200518c <rtems_termios_puts>
2005630: 94 10 00 18 mov %i0, %o2
tty->column--;
2005634: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2005638: 82 00 7f ff add %g1, -1, %g1
}
/*
* Back up over the tab
*/
while (tty->column > col) {
200563c: 80 a0 40 1d cmp %g1, %i5
2005640: 14 bf ff f9 bg 2005624 <erase.part.2+0x138>
2005644: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2005648: 10 bf ff b3 b 2005514 <erase.part.2+0x28>
200564c: 80 a6 60 00 cmp %i1, 0
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
2005650: ba 17 60 07 or %i5, 7, %i5
2005654: 10 bf ff e1 b 20055d8 <erase.part.2+0xec>
2005658: ba 07 60 01 inc %i5
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
200565c: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED
2005660: 02 80 00 1a be 20056c8 <erase.part.2+0x1dc> <== NOT EXECUTED
2005664: 90 08 60 ff and %g1, 0xff, %o0 <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
2005668: 05 00 80 7a sethi %hi(0x201e800), %g2 <== NOT EXECUTED
200566c: c4 00 a3 34 ld [ %g2 + 0x334 ], %g2 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED
2005670: 90 08 60 ff and %g1, 0xff, %o0 <== NOT EXECUTED
2005674: 84 00 80 08 add %g2, %o0, %g2 <== NOT EXECUTED
2005678: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED
200567c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED
2005680: 02 80 00 12 be 20056c8 <erase.part.2+0x1dc> <== NOT EXECUTED
2005684: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED
2005688: 02 80 00 10 be 20056c8 <erase.part.2+0x1dc> <== NOT EXECUTED
200568c: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED
2005690: 02 80 00 0e be 20056c8 <erase.part.2+0x1dc> <== NOT EXECUTED
2005694: 82 18 60 40 xor %g1, 0x40, %g1 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2005698: c2 2f bf f9 stb %g1, [ %fp + -7 ] <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
200569c: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
20056a0: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
20056a4: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
20056a8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20056ac: 7f ff fe b8 call 200518c <rtems_termios_puts> <== NOT EXECUTED
20056b0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
tty->column += 2;
20056b4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED
20056b8: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
20056bc: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED
20056c0: 81 c7 e0 08 ret <== NOT EXECUTED
20056c4: 81 e8 00 00 restore <== NOT EXECUTED
} else {
oproc (c, tty);
20056c8: 7f ff ff 01 call 20052cc <oproc> <== NOT EXECUTED
20056cc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20056d0: 81 c7 e0 08 ret <== NOT EXECUTED
20056d4: 81 e8 00 00 restore <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
20056d8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
20056dc: 7f ff fe ac call 200518c <rtems_termios_puts> <== NOT EXECUTED
20056e0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->column)
20056e4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED
20056e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20056ec: 12 80 00 0d bne 2005720 <erase.part.2+0x234> <== NOT EXECUTED
20056f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
20056f4: c2 06 e3 34 ld [ %i3 + 0x334 ], %g1 <== NOT EXECUTED
20056f8: c2 08 40 1d ldub [ %g1 + %i5 ], %g1 <== NOT EXECUTED
20056fc: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2005700: 02 bf ff a0 be 2005580 <erase.part.2+0x94> <== NOT EXECUTED
2005704: 11 00 80 74 sethi %hi(0x201d000), %o0 <== NOT EXECUTED
2005708: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
200570c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2005710: 12 bf ff 9d bne 2005584 <erase.part.2+0x98> <== NOT EXECUTED
2005714: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2005718: 10 bf ff 7f b 2005514 <erase.part.2+0x28> <== NOT EXECUTED
200571c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
2005720: 10 bf ff f5 b 20056f4 <erase.part.2+0x208> <== NOT EXECUTED
2005724: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED
020150b8 <fat_buf_access>:
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
20150b8: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
20150bc: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1
20150c0: 80 a0 60 00 cmp %g1, 0
20150c4: 22 80 00 5c be,a 2015234 <fat_buf_access+0x17c>
20150c8: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0
20150cc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
20150d0: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
20150d4: 80 a0 80 01 cmp %g2, %g1
20150d8: 08 80 00 68 bleu 2015278 <fat_buf_access+0x1c0> <== ALWAYS TAKEN
20150dc: b8 10 20 00 clr %i4
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
20150e0: 80 a6 40 01 cmp %i1, %g1
20150e4: 22 80 00 51 be,a 2015228 <fat_buf_access+0x170>
20150e8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
{
if (fs_info->c.modified)
20150ec: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1
20150f0: 80 a0 60 00 cmp %g1, 0
20150f4: 02 80 00 3b be 20151e0 <fat_buf_access+0x128>
20150f8: b8 8f 20 ff andcc %i4, 0xff, %i4
{
if (sec_of_fat && !fs_info->vol.mirror)
20150fc: 02 80 00 06 be 2015114 <fat_buf_access+0x5c> <== ALWAYS TAKEN
2015100: 01 00 00 00 nop
2015104: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
2015108: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201510c: 22 80 00 63 be,a 2015298 <fat_buf_access+0x1e0> <== NOT EXECUTED
2015110: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
2015114: 7f ff f8 ed call 20134c8 <rtems_bdbuf_release_modified>
2015118: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
fs_info->c.state = FAT_CACHE_EMPTY;
201511c: c0 2e 20 85 clrb [ %i0 + 0x85 ]
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
2015120: 80 a2 20 00 cmp %o0, 0
2015124: 12 80 00 66 bne 20152bc <fat_buf_access+0x204> <== NEVER TAKEN
2015128: c0 2e 20 84 clrb [ %i0 + 0x84 ]
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
201512c: 80 a7 20 00 cmp %i4, 0
2015130: 22 80 00 32 be,a 20151f8 <fat_buf_access+0x140> <== ALWAYS TAKEN
2015134: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0
2015138: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
201513c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2015140: 32 80 00 2e bne,a 20151f8 <fat_buf_access+0x140> <== NOT EXECUTED
2015144: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2015148: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED
201514c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2015150: 08 80 00 29 bleu 20151f4 <fat_buf_access+0x13c> <== NOT EXECUTED
2015154: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
2015158: 10 80 00 10 b 2015198 <fat_buf_access+0xe0> <== NOT EXECUTED
201515c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
2015160: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED
2015164: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED
2015168: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED
201516c: 40 00 30 c2 call 2021474 <memcpy> <== NOT EXECUTED
2015170: a0 04 20 01 inc %l0 <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
2015174: 7f ff f8 d5 call 20134c8 <rtems_bdbuf_release_modified> <== NOT EXECUTED
2015178: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
201517c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2015180: 12 80 00 12 bne 20151c8 <fat_buf_access+0x110> <== NOT EXECUTED
2015184: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2015188: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED
201518c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2015190: 28 80 00 1a bleu,a 20151f8 <fat_buf_access+0x140> <== NOT EXECUTED
2015194: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
2015198: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED
201519c: 40 00 61 48 call 202d6bc <.umul> <== NOT EXECUTED
20151a0: f8 1e 20 58 ldd [ %i0 + 0x58 ], %i4 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
20151a4: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED
20151a8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
20151ac: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED
20151b0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20151b4: 7f ff f7 60 call 2012f34 <rtems_bdbuf_get> <== NOT EXECUTED
20151b8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
20151bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20151c0: 02 bf ff e8 be 2015160 <fat_buf_access+0xa8> <== NOT EXECUTED
20151c4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
20151c8: 40 00 2d dc call 2020938 <__errno> <== NOT EXECUTED
20151cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20151d0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
20151d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20151d8: 81 c7 e0 08 ret <== NOT EXECUTED
20151dc: 81 e8 00 00 restore <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
20151e0: 7f ff f8 64 call 2013370 <rtems_bdbuf_release>
20151e4: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
20151e8: 80 a2 20 00 cmp %o0, 0
20151ec: 12 80 00 34 bne 20152bc <fat_buf_access+0x204> <== NEVER TAKEN
20151f0: c0 2e 20 85 clrb [ %i0 + 0x85 ]
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
20151f4: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0
20151f8: 94 10 00 19 mov %i1, %o2
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
20151fc: 80 a6 a0 01 cmp %i2, 1
2015200: 02 80 00 2b be 20152ac <fat_buf_access+0x1f4>
2015204: 96 06 20 88 add %i0, 0x88, %o3
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
2015208: 7f ff f7 4b call 2012f34 <rtems_bdbuf_get>
201520c: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
2015210: 80 a2 20 00 cmp %o0, 0
2015214: 12 80 00 2a bne 20152bc <fat_buf_access+0x204> <== NEVER TAKEN
2015218: 82 10 20 01 mov 1, %g1
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
201521c: f2 26 20 80 st %i1, [ %i0 + 0x80 ]
fs_info->c.state = FAT_CACHE_ACTUAL;
2015220: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ]
}
*buf = fs_info->c.buf;
2015224: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
2015228: c2 26 c0 00 st %g1, [ %i3 ]
return RC_OK;
}
201522c: 81 c7 e0 08 ret
2015230: 91 e8 20 00 restore %g0, 0, %o0
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
2015234: 94 10 00 19 mov %i1, %o2
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
2015238: 80 a6 a0 01 cmp %i2, 1
201523c: 02 80 00 13 be 2015288 <fat_buf_access+0x1d0>
2015240: 96 06 20 88 add %i0, 0x88, %o3
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
2015244: 7f ff f7 3c call 2012f34 <rtems_bdbuf_get>
2015248: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
201524c: 80 a2 20 00 cmp %o0, 0
2015250: 12 80 00 1b bne 20152bc <fat_buf_access+0x204> <== NEVER TAKEN
2015254: 82 10 20 01 mov 1, %g1
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2015258: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
201525c: f2 26 20 80 st %i1, [ %i0 + 0x80 ]
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
2015260: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ]
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
2015264: c0 2e 20 84 clrb [ %i0 + 0x84 ]
fs_info->c.state = FAT_CACHE_ACTUAL;
2015268: 82 10 00 19 mov %i1, %g1
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
201526c: 80 a0 80 01 cmp %g2, %g1
2015270: 18 bf ff 9c bgu 20150e0 <fat_buf_access+0x28> <== NEVER TAKEN
2015274: b8 10 20 00 clr %i4
2015278: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
201527c: 80 a0 40 02 cmp %g1, %g2
2015280: 10 bf ff 98 b 20150e0 <fat_buf_access+0x28>
2015284: b8 40 20 00 addx %g0, 0, %i4
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
2015288: 7f ff f7 72 call 2013050 <rtems_bdbuf_read>
201528c: 01 00 00 00 nop
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
2015290: 10 bf ff f0 b 2015250 <fat_buf_access+0x198>
2015294: 80 a2 20 00 cmp %o0, 0
if (fs_info->c.blk_num != blk)
{
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
2015298: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
201529c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
20152a0: 40 00 30 75 call 2021474 <memcpy> <== NOT EXECUTED
20152a4: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED
20152a8: 30 bf ff 9b b,a 2015114 <fat_buf_access+0x5c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
20152ac: 7f ff f7 69 call 2013050 <rtems_bdbuf_read>
20152b0: 01 00 00 00 nop
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
20152b4: 10 bf ff d8 b 2015214 <fat_buf_access+0x15c>
20152b8: 80 a2 20 00 cmp %o0, 0
rtems_set_errno_and_return_minus_one(EIO);
20152bc: 40 00 2d 9f call 2020938 <__errno> <== NOT EXECUTED
20152c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20152c4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20152c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20152cc: 81 c7 e0 08 ret <== NOT EXECUTED
20152d0: 81 e8 00 00 restore <== NOT EXECUTED
02014f5c <fat_buf_release.part.1>:
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
2014f5c: 9d e3 bf 98 save %sp, -104, %sp
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2014f60: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2014f64: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
2014f68: 80 a0 40 02 cmp %g1, %g2
2014f6c: 0a 80 00 05 bcs 2014f80 <fat_buf_release.part.1+0x24> <== NEVER TAKEN
2014f70: b8 10 20 00 clr %i4
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
2014f74: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
2014f78: 80 a0 40 02 cmp %g1, %g2
2014f7c: b8 40 20 00 addx %g0, 0, %i4
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
2014f80: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1
2014f84: 80 a0 60 00 cmp %g1, 0
2014f88: 02 80 00 35 be 201505c <fat_buf_release.part.1+0x100>
2014f8c: b8 8f 20 ff andcc %i4, 0xff, %i4
{
if (sec_of_fat && !fs_info->vol.mirror)
2014f90: 32 80 00 3b bne,a 201507c <fat_buf_release.part.1+0x120>
2014f94: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
2014f98: 7f ff f9 4c call 20134c8 <rtems_bdbuf_release_modified>
2014f9c: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2014fa0: 80 a2 20 00 cmp %o0, 0
2014fa4: 12 80 00 3f bne 20150a0 <fat_buf_release.part.1+0x144> <== NEVER TAKEN
2014fa8: 80 a7 20 00 cmp %i4, 0
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
2014fac: 02 80 00 31 be 2015070 <fat_buf_release.part.1+0x114>
2014fb0: c0 2e 20 84 clrb [ %i0 + 0x84 ]
2014fb4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1
2014fb8: 80 a0 60 00 cmp %g1, 0
2014fbc: 32 80 00 2e bne,a 2015074 <fat_buf_release.part.1+0x118> <== NEVER TAKEN
2014fc0: c0 2e 20 85 clrb [ %i0 + 0x85 ] <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2014fc4: c2 0e 20 09 ldub [ %i0 + 9 ], %g1
2014fc8: 80 a0 60 01 cmp %g1, 1
2014fcc: 08 80 00 29 bleu 2015070 <fat_buf_release.part.1+0x114> <== NEVER TAKEN
2014fd0: b6 10 20 01 mov 1, %i3
2014fd4: 10 80 00 10 b 2015014 <fat_buf_release.part.1+0xb8>
2014fd8: 90 10 20 01 mov 1, %o0
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
2014fdc: d2 06 20 8c ld [ %i0 + 0x8c ], %o1
2014fe0: d4 16 00 00 lduh [ %i0 ], %o2
2014fe4: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
2014fe8: 40 00 31 23 call 2021474 <memcpy>
2014fec: b6 06 e0 01 inc %i3
sc = rtems_bdbuf_release_modified(b);
2014ff0: 7f ff f9 36 call 20134c8 <rtems_bdbuf_release_modified>
2014ff4: d0 07 bf fc ld [ %fp + -4 ], %o0
if ( sc != RTEMS_SUCCESSFUL)
2014ff8: 80 a2 20 00 cmp %o0, 0
2014ffc: 12 80 00 12 bne 2015044 <fat_buf_release.part.1+0xe8> <== NEVER TAKEN
2015000: 90 0e e0 ff and %i3, 0xff, %o0
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2015004: c2 0e 20 09 ldub [ %i0 + 9 ], %g1
2015008: 80 a2 00 01 cmp %o0, %g1
201500c: 3a 80 00 1a bcc,a 2015074 <fat_buf_release.part.1+0x118> <== ALWAYS TAKEN
2015010: c0 2e 20 85 clrb [ %i0 + 0x85 ]
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
2015014: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
2015018: 40 00 61 a9 call 202d6bc <.umul>
201501c: f8 1e 20 58 ldd [ %i0 + 0x58 ], %i4
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
2015020: d4 06 20 80 ld [ %i0 + 0x80 ], %o2
2015024: 96 07 bf fc add %fp, -4, %o3
2015028: 94 02 00 0a add %o0, %o2, %o2
201502c: 92 10 00 1d mov %i5, %o1
2015030: 7f ff f7 c1 call 2012f34 <rtems_bdbuf_get>
2015034: 90 10 00 1c mov %i4, %o0
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
2015038: 80 a2 20 00 cmp %o0, 0
201503c: 02 bf ff e8 be 2014fdc <fat_buf_release.part.1+0x80> <== ALWAYS TAKEN
2015040: c2 07 bf fc ld [ %fp + -4 ], %g1
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
2015044: 40 00 2e 3d call 2020938 <__errno> <== NOT EXECUTED
2015048: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201504c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2015050: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2015054: 81 c7 e0 08 ret <== NOT EXECUTED
2015058: 81 e8 00 00 restore <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
201505c: 7f ff f8 c5 call 2013370 <rtems_bdbuf_release>
2015060: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2015064: 80 a2 20 00 cmp %o0, 0
2015068: 12 80 00 0e bne 20150a0 <fat_buf_release.part.1+0x144> <== NEVER TAKEN
201506c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
2015070: c0 2e 20 85 clrb [ %i0 + 0x85 ]
return RC_OK;
}
2015074: 81 c7 e0 08 ret
2015078: 91 e8 20 00 restore %g0, 0, %o0
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
201507c: 80 a0 60 00 cmp %g1, 0
2015080: 12 bf ff c6 bne 2014f98 <fat_buf_release.part.1+0x3c> <== NEVER TAKEN
2015084: 01 00 00 00 nop
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
2015088: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
201508c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0
2015090: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
2015094: 40 00 30 f8 call 2021474 <memcpy>
2015098: d4 16 00 00 lduh [ %i0 ], %o2
201509c: 30 bf ff bf b,a 2014f98 <fat_buf_release.part.1+0x3c>
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20150a0: 40 00 2e 26 call 2020938 <__errno> <== NOT EXECUTED
20150a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20150a8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20150ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20150b0: 81 c7 e0 08 ret <== NOT EXECUTED
20150b4: 81 e8 00 00 restore <== NOT EXECUTED
02015464 <fat_cluster_read>:
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
2015464: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2015468: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201546c: 12 80 00 06 bne 2015484 <fat_cluster_read+0x20> <== NOT EXECUTED
2015470: f6 06 20 34 ld [ %i0 + 0x34 ], %i3 <== NOT EXECUTED
2015474: c2 0e e0 0a ldub [ %i3 + 0xa ], %g1 <== NOT EXECUTED
2015478: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201547c: 32 80 00 07 bne,a 2015498 <fat_cluster_read+0x34> <== NOT EXECUTED
2015480: f8 06 e0 1c ld [ %i3 + 0x1c ], %i4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2015484: c4 0e e0 05 ldub [ %i3 + 5 ], %g2 <== NOT EXECUTED
2015488: c2 06 e0 30 ld [ %i3 + 0x30 ], %g1 <== NOT EXECUTED
201548c: b8 06 7f fe add %i1, -2, %i4 <== NOT EXECUTED
2015490: b9 2f 00 02 sll %i4, %g2, %i4 <== NOT EXECUTED
2015494: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2015498: c2 0e e0 02 ldub [ %i3 + 2 ], %g1 <== NOT EXECUTED
201549c: fa 0e e0 04 ldub [ %i3 + 4 ], %i5 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
20154a0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
20154a4: bb 2f 40 01 sll %i5, %g1, %i5 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
20154a8: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED
20154ac: 12 80 00 10 bne 20154ec <fat_cluster_read+0x88> <== NOT EXECUTED
20154b0: b0 10 20 00 clr %i0 <== NOT EXECUTED
20154b4: 30 80 00 18 b,a 2015514 <fat_cluster_read+0xb0> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
20154b8: c2 16 c0 00 lduh [ %i3 ], %g1 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
20154bc: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
20154c0: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
20154c4: 08 80 00 03 bleu 20154d0 <fat_cluster_read+0x6c> <== NOT EXECUTED
20154c8: b2 10 00 1d mov %i5, %i1 <== NOT EXECUTED
20154cc: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
20154d0: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1 <== NOT EXECUTED
20154d4: 40 00 2f e8 call 2021474 <memcpy> <== NOT EXECUTED
20154d8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
count -= c;
cmpltd += c;
20154dc: b0 06 00 19 add %i0, %i1, %i0 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
20154e0: ba a7 40 19 subcc %i5, %i1, %i5 <== NOT EXECUTED
20154e4: 02 80 00 0c be 2015514 <fat_cluster_read+0xb0> <== NOT EXECUTED
20154e8: b8 07 20 01 inc %i4 <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
20154ec: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
20154f0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20154f4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
20154f8: 7f ff fe f0 call 20150b8 <fat_buf_access> <== NOT EXECUTED
20154fc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
if (rc != RC_OK)
2015500: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2015504: 02 bf ff ed be 20154b8 <fat_cluster_read+0x54> <== NOT EXECUTED
2015508: 90 06 80 18 add %i2, %i0, %o0 <== NOT EXECUTED
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
201550c: 81 c7 e0 08 ret <== NOT EXECUTED
2015510: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
2015514: 81 c7 e0 08 ret <== NOT EXECUTED
2015518: 81 e8 00 00 restore <== NOT EXECUTED
0201551c <fat_cluster_write>:
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
201551c: 98 10 00 0a mov %o2, %o4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2015520: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2015524: 12 80 00 06 bne 201553c <fat_cluster_write+0x20> <== NOT EXECUTED
2015528: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED
201552c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2015530: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2015534: 32 80 00 0e bne,a 201556c <fat_cluster_write+0x50> <== NOT EXECUTED
2015538: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201553c: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
2015540: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2015544: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
2015548: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201554c: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
2015550: 94 10 20 00 clr %o2 <== NOT EXECUTED
2015554: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2015558: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
201555c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2015560: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2015564: 7f ff ff 87 call 2015380 <_fat_block_write> <== NOT EXECUTED
2015568: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
201556c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2015570: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
2015574: 94 10 20 00 clr %o2 <== NOT EXECUTED
2015578: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
201557c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2015580: 7f ff ff 80 call 2015380 <_fat_block_write> <== NOT EXECUTED
2015584: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02015804 <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
2015804: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2015808: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201580c: 87 2e 60 18 sll %i1, 0x18, %g3 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
2015810: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2015814: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2015818: 83 36 60 08 srl %i1, 8, %g1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201581c: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2015820: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2015824: 87 2e a0 18 sll %i2, 0x18, %g3 <== NOT EXECUTED
2015828: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201582c: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2015830: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2015834: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2015838: 83 36 a0 18 srl %i2, 0x18, %g1 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201583c: b3 2e 60 08 sll %i1, 8, %i1 <== NOT EXECUTED
2015840: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED
2015844: 84 10 80 19 or %g2, %i1, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2015848: 89 36 a0 08 srl %i2, 8, %g4 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201584c: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
2015850: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2015854: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2015858: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
201585c: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
2015860: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
2015864: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
2015868: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED
201586c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
2015870: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_free_count = 0;
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
2015874: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
2015878: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
ret1 = _fat_block_write(mt_entry,
201587c: 7f ff fe c1 call 2015380 <_fat_block_write> <== NOT EXECUTED
2015880: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
2015884: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
2015888: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
201588c: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED
2015890: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2015894: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
2015898: 7f ff fe ba call 2015380 <_fat_block_write> <== NOT EXECUTED
201589c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
20158a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20158a4: 06 80 00 06 bl 20158bc <fat_fat32_update_fsinfo_sector+0xb8><== NOT EXECUTED
20158a8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20158ac: 06 80 00 04 bl 20158bc <fat_fat32_update_fsinfo_sector+0xb8><== NOT EXECUTED
20158b0: b0 10 20 00 clr %i0 <== NOT EXECUTED
return -1;
return RC_OK;
}
20158b4: 81 c7 e0 08 ret <== NOT EXECUTED
20158b8: 81 e8 00 00 restore <== NOT EXECUTED
20158bc: 81 c7 e0 08 ret <== NOT EXECUTED
20158c0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02014604 <fat_file_close>:
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2014604: 9d e3 bf a0 save %sp, -96, %sp
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
2014608: c2 06 60 08 ld [ %i1 + 8 ], %g1
201460c: 80 a0 60 01 cmp %g1, 1
2014610: 08 80 00 07 bleu 201462c <fat_file_close+0x28>
2014614: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
{
fat_fd->links_num--;
2014618: 82 00 7f ff add %g1, -1, %g1
return rc;
201461c: 90 10 20 00 clr %o0
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
{
fat_fd->links_num--;
2014620: c2 26 60 08 st %g1, [ %i1 + 8 ]
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
return rc;
}
2014624: 81 c7 e0 08 ret
2014628: 91 e8 00 08 restore %g0, %o0, %o0
return rc;
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
201462c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
2014630: 80 88 60 01 btst 1, %g1
2014634: 22 80 00 16 be,a 201468c <fat_file_close+0x88> <== ALWAYS TAKEN
2014638: d2 06 60 0c ld [ %i1 + 0xc ], %o1
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
201463c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2014640: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2014644: 7f ff ff 81 call 2014448 <fat_file_truncate> <== NOT EXECUTED
2014648: 94 10 20 00 clr %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201464c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014650: 12 bf ff f5 bne 2014624 <fat_file_close+0x20> <== NOT EXECUTED
2014654: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2014658: 7f ff de 20 call 200bed8 <_Chain_Extract> <== NOT EXECUTED
201465c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
2014660: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED
2014664: 40 00 04 63 call 20157f0 <fat_ino_is_unique> <== NOT EXECUTED
2014668: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201466c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2014670: 32 80 00 13 bne,a 20146bc <fat_file_close+0xb8> <== NOT EXECUTED
2014674: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
2014678: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
201467c: 7f ff c7 b7 call 2006558 <free>
2014680: b0 10 00 1d mov %i5, %i0
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
2014684: 40 00 03 14 call 20152d4 <fat_buf_release>
2014688: 81 e8 00 00 restore
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
201468c: 40 00 04 59 call 20157f0 <fat_ino_is_unique>
2014690: 90 10 00 18 mov %i0, %o0
2014694: 80 8a 20 ff btst 0xff, %o0
2014698: 02 80 00 05 be 20146ac <fat_file_close+0xa8> <== ALWAYS TAKEN
201469c: 01 00 00 00 nop
{
fat_fd->links_num = 0;
20146a0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
20146a4: 40 00 03 0c call 20152d4 <fat_buf_release> <== NOT EXECUTED
20146a8: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
20146ac: 7f ff de 0b call 200bed8 <_Chain_Extract>
20146b0: 90 10 00 19 mov %i1, %o0
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
20146b4: 10 bf ff f2 b 201467c <fat_file_close+0x78>
20146b8: 90 10 00 19 mov %i1, %o0
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
fat_free_unique_ino(mt_entry, fat_fd->ino);
20146bc: 40 00 04 3f call 20157b8 <fat_free_unique_ino> <== NOT EXECUTED
20146c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
20146c4: 10 bf ff ee b 201467c <fat_file_close+0x78> <== NOT EXECUTED
20146c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
02014d74 <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2014d74: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2014d78: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
2014d7c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2014d80: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
2014d84: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
return RC_OK;
2014d88: b4 10 20 00 clr %i2 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
2014d8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2014d90: 12 80 00 04 bne 2014da0 <fat_file_datasync+0x2c> <== NOT EXECUTED
2014d94: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
2014d98: 81 c7 e0 08 ret <== NOT EXECUTED
2014d9c: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
2014da0: 40 00 01 4d call 20152d4 <fat_buf_release> <== NOT EXECUTED
2014da4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rc != RC_OK)
2014da8: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2014dac: 12 bf ff fb bne 2014d98 <fat_file_datasync+0x24> <== NOT EXECUTED
2014db0: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2014db4: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
2014db8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED
2014dbc: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED
2014dc0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2014dc4: 1a bf ff f5 bcc 2014d98 <fat_file_datasync+0x24> <== NOT EXECUTED
2014dc8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014dcc: 02 80 00 23 be 2014e58 <fat_file_datasync+0xe4> <== NOT EXECUTED
2014dd0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2014dd4: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED
2014dd8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
2014ddc: b6 02 7f fe add %o1, -2, %i3 <== NOT EXECUTED
2014de0: b7 2e c0 02 sll %i3, %g2, %i3 <== NOT EXECUTED
2014de4: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
2014de8: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED
2014dec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2014df0: 02 80 00 20 be 2014e70 <fat_file_datasync+0xfc> <== NOT EXECUTED
2014df4: ba 10 20 00 clr %i5 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
2014df8: 10 80 00 0c b 2014e28 <fat_file_datasync+0xb4> <== NOT EXECUTED
2014dfc: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
2014e00: 7f ff f9 e1 call 2013584 <rtems_bdbuf_sync> <== NOT EXECUTED
2014e04: ba 07 60 01 inc %i5 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
2014e08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014e0c: 12 80 00 0d bne 2014e40 <fat_file_datasync+0xcc> <== NOT EXECUTED
2014e10: 01 00 00 00 nop <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
2014e14: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED
2014e18: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
2014e1c: 08 80 00 15 bleu 2014e70 <fat_file_datasync+0xfc> <== NOT EXECUTED
2014e20: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
2014e24: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED
2014e28: 94 07 40 1b add %i5, %i3, %o2 <== NOT EXECUTED
2014e2c: 7f ff f8 89 call 2013050 <rtems_bdbuf_read> <== NOT EXECUTED
2014e30: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2014e34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014e38: 02 bf ff f2 be 2014e00 <fat_file_datasync+0x8c> <== NOT EXECUTED
2014e3c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
2014e40: 40 00 2e be call 2020938 <__errno> <== NOT EXECUTED
2014e44: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED
2014e48: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2014e4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
2014e50: 81 c7 e0 08 ret <== NOT EXECUTED
2014e54: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014e58: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2014e5c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2014e60: 22 bf ff de be,a 2014dd8 <fat_file_datasync+0x64> <== NOT EXECUTED
2014e64: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2014e68: 10 bf ff e0 b 2014de8 <fat_file_datasync+0x74> <== NOT EXECUTED
2014e6c: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014e70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2014e74: 40 00 26 1c call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
2014e78: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2014e7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014e80: 02 bf ff cd be 2014db4 <fat_file_datasync+0x40> <== NOT EXECUTED
2014e84: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014e88: 10 bf ff c4 b 2014d98 <fat_file_datasync+0x24> <== NOT EXECUTED
2014e8c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
0201480c <fat_file_extend>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
201480c: 9d e3 bf 90 save %sp, -112, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2014810: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
uint32_t old_last_cl;
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
2014814: f4 26 c0 00 st %i2, [ %i3 ]
if (new_length <= fat_fd->fat_file_size)
2014818: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
uint32_t *a_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
201481c: c0 27 bf f0 clr [ %fp + -16 ]
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
2014820: c0 27 bf f8 clr [ %fp + -8 ]
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
2014824: ba 10 00 18 mov %i0, %i5
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
2014828: 80 a6 80 01 cmp %i2, %g1
201482c: 08 80 00 3d bleu 2014920 <fat_file_extend+0x114>
2014830: b0 10 20 00 clr %i0
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014834: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
2014838: 80 a0 a0 01 cmp %g2, 1
201483c: 22 80 00 3b be,a 2014928 <fat_file_extend+0x11c> <== NEVER TAKEN
2014840: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
2014844: c6 17 20 06 lduh [ %i4 + 6 ], %g3
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
2014848: a4 26 80 01 sub %i2, %g1, %l2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
201484c: 84 00 ff ff add %g3, -1, %g2
2014850: a0 08 80 01 and %g2, %g1, %l0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
2014854: a0 20 c0 10 sub %g3, %l0, %l0
2014858: a0 0c 00 02 and %l0, %g2, %l0
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
if (bytes2add > bytes_remain)
201485c: 80 a4 00 12 cmp %l0, %l2
2014860: 1a 80 00 30 bcc 2014920 <fat_file_extend+0x114>
2014864: b0 10 20 00 clr %i0
/*
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
2014868: a4 a4 80 10 subcc %l2, %l0, %l2
201486c: 02 80 00 2d be 2014920 <fat_file_extend+0x114> <== NEVER TAKEN
2014870: a2 04 bf ff add %l2, -1, %l1
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
2014874: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2014878: 90 10 00 1d mov %i5, %o0
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
201487c: a3 34 40 01 srl %l1, %g1, %l1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2014880: 92 07 bf f0 add %fp, -16, %o1
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
2014884: a2 04 60 01 inc %l1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2014888: 96 07 bf fc add %fp, -4, %o3
201488c: 94 10 00 11 mov %l1, %o2
2014890: 40 00 29 18 call 201ecf0 <fat_scan_fat_for_free_clusters>
2014894: 98 07 bf f8 add %fp, -8, %o4
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
2014898: b0 92 20 00 orcc %o0, 0, %i0
201489c: 12 80 00 21 bne 2014920 <fat_file_extend+0x114> <== NEVER TAKEN
20148a0: c2 07 bf fc ld [ %fp + -4 ], %g1
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
20148a4: 80 94 00 01 orcc %l0, %g1, %g0
20148a8: 02 80 00 27 be 2014944 <fat_file_extend+0x138> <== NEVER TAKEN
20148ac: 80 a4 40 01 cmp %l1, %g1
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
20148b0: 02 80 00 0b be 20148dc <fat_file_extend+0xd0> <== ALWAYS TAKEN
20148b4: 88 38 00 01 xnor %g0, %g1, %g4
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20148b8: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
20148bc: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
20148c0: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20148c4: a2 01 00 11 add %g4, %l1, %l1 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
20148c8: a4 0c 80 03 and %l2, %g3, %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20148cc: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
20148d0: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20148d4: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
20148d8: e4 26 c0 00 st %l2, [ %i3 ] <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
20148dc: d6 06 60 18 ld [ %i1 + 0x18 ], %o3
20148e0: 80 a2 e0 00 cmp %o3, 0
20148e4: 32 80 00 1e bne,a 201495c <fat_file_extend+0x150>
20148e8: d2 06 60 3c ld [ %i1 + 0x3c ], %o1
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
20148ec: c4 07 bf f0 ld [ %fp + -16 ], %g2
fat_fd->map.file_cln = 0;
20148f0: c0 26 60 34 clr [ %i1 + 0x34 ]
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
20148f4: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
20148f8: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
}
fat_buf_release(fs_info);
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
20148fc: 80 a0 60 00 cmp %g1, 0
2014900: 22 80 00 08 be,a 2014920 <fat_file_extend+0x114> <== NEVER TAKEN
2014904: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED
{
fat_fd->map.last_cln = last_cl;
2014908: c4 07 bf f8 ld [ %fp + -8 ], %g2
if (fat_fd->fat_file_type == FAT_DIRECTORY)
201490c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
2014910: 80 a0 60 01 cmp %g1, 1
2014914: 02 80 00 20 be 2014994 <fat_file_extend+0x188>
2014918: c4 26 60 3c st %g2, [ %i1 + 0x3c ]
return rc;
}
}
}
fat_fd->fat_file_size = new_length;
201491c: f4 26 60 18 st %i2, [ %i1 + 0x18 ]
return RC_OK;
}
2014920: 81 c7 e0 08 ret
2014924: 81 e8 00 00 restore
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014928: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201492c: 32 bf ff c7 bne,a 2014848 <fat_file_extend+0x3c> <== NOT EXECUTED
2014930: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2014934: c4 0f 20 0a ldub [ %i4 + 0xa ], %g2 <== NOT EXECUTED
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014938: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
201493c: 22 bf ff c3 be,a 2014848 <fat_file_extend+0x3c> <== NOT EXECUTED
2014940: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
2014944: 40 00 2f fd call 2020938 <__errno> <== NOT EXECUTED
2014948: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201494c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
2014950: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014954: 81 c7 e0 08 ret <== NOT EXECUTED
2014958: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
201495c: 80 a2 7f ff cmp %o1, -1
2014960: 22 80 00 19 be,a 20149c4 <fat_file_extend+0x1b8> <== NEVER TAKEN
2014964: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
2014968: d2 27 bf f4 st %o1, [ %fp + -12 ]
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
201496c: d4 07 bf f0 ld [ %fp + -16 ], %o2
2014970: 40 00 27 e5 call 201e904 <fat_set_fat_cluster>
2014974: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
2014978: 82 92 20 00 orcc %o0, 0, %g1
201497c: 12 80 00 0d bne 20149b0 <fat_file_extend+0x1a4> <== NEVER TAKEN
2014980: d2 07 bf f0 ld [ %fp + -16 ], %o1
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
2014984: 40 00 02 54 call 20152d4 <fat_buf_release>
2014988: 90 10 00 1c mov %i4, %o0
201498c: 10 bf ff dc b 20148fc <fat_file_extend+0xf0>
2014990: c2 07 bf fc ld [ %fp + -4 ], %g1
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
2014994: d2 07 bf f0 ld [ %fp + -16 ], %o1
2014998: 40 00 02 fc call 2015588 <fat_init_clusters_chain>
201499c: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
20149a0: 82 92 20 00 orcc %o0, 0, %g1
20149a4: 22 bf ff df be,a 2014920 <fat_file_extend+0x114> <== ALWAYS TAKEN
20149a8: f4 26 60 18 st %i2, [ %i1 + 0x18 ]
{
fat_free_fat_clusters_chain(mt_entry, chain);
20149ac: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED
20149b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20149b4: 40 00 28 96 call 201ec0c <fat_free_fat_clusters_chain> <== NOT EXECUTED
20149b8: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
20149bc: 81 c7 e0 08 ret <== NOT EXECUTED
20149c0: 81 e8 00 00 restore <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
20149c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20149c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20149cc: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED
20149d0: 7f ff ff 3f call 20146cc <fat_file_ioctl> <== NOT EXECUTED
20149d4: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
20149d8: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
20149dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20149e0: 02 bf ff e3 be 201496c <fat_file_extend+0x160> <== NOT EXECUTED
20149e4: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
20149e8: 10 bf ff f2 b 20149b0 <fat_file_extend+0x1a4> <== NOT EXECUTED
20149ec: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED
020146cc <fat_file_ioctl>:
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
20146cc: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
20146d0: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
20146d4: 82 07 a0 50 add %fp, 0x50, %g1
20146d8: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
20146dc: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
20146e0: c2 27 bf f8 st %g1, [ %fp + -8 ]
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
20146e4: ba 10 00 18 mov %i0, %i5
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
20146e8: 80 a6 a0 01 cmp %i2, 1
20146ec: 02 80 00 08 be 201470c <fat_file_ioctl+0x40> <== ALWAYS TAKEN
20146f0: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
*ret = cur_cln;
break;
default:
errno = EINVAL;
20146f4: 40 00 30 91 call 2020938 <__errno> <== NOT EXECUTED
20146f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20146fc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2014700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rc = -1;
break;
}
va_end(ap);
return rc;
}
2014704: 81 c7 e0 08 ret <== NOT EXECUTED
2014708: 81 e8 00 00 restore <== NOT EXECUTED
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
201470c: c8 06 60 18 ld [ %i1 + 0x18 ], %g4
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
2014710: b8 07 a0 58 add %fp, 0x58, %i4
2014714: f8 27 bf f8 st %i4, [ %fp + -8 ]
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
2014718: 86 10 00 1b mov %i3, %g3
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
201471c: 80 a6 c0 04 cmp %i3, %g4
2014720: 1a 80 00 35 bcc 20147f4 <fat_file_ioctl+0x128> <== NEVER TAKEN
2014724: e0 07 a0 54 ld [ %fp + 0x54 ], %l0
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014728: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
201472c: 80 a0 60 01 cmp %g1, 1
2014730: 22 80 00 1c be,a 20147a0 <fat_file_ioctl+0xd4>
2014734: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
2014738: f4 08 a0 08 ldub [ %g2 + 8 ], %i2
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
201473c: f6 06 60 34 ld [ %i1 + 0x34 ], %i3
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
2014740: b5 30 c0 1a srl %g3, %i2, %i2
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2014744: 80 a6 80 1b cmp %i2, %i3
2014748: 22 80 00 28 be,a 20147e8 <fat_file_ioctl+0x11c> <== ALWAYS TAKEN
201474c: d2 06 60 38 ld [ %i1 + 0x38 ], %o1
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
2014750: 28 80 00 23 bleu,a 20147dc <fat_file_ioctl+0x110> <== NOT EXECUTED
2014754: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
{
cur_cln = fat_fd->map.disk_cln;
2014758: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
201475c: b6 26 80 1b sub %i2, %i3, %i3 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
2014760: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2014764: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2014768: 02 80 00 18 be 20147c8 <fat_file_ioctl+0xfc> <== NOT EXECUTED
201476c: b8 10 20 00 clr %i4 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014770: 10 80 00 06 b 2014788 <fat_file_ioctl+0xbc> <== NOT EXECUTED
2014774: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2014778: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
201477c: 02 80 00 13 be 20147c8 <fat_file_ioctl+0xfc> <== NOT EXECUTED
2014780: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014784: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2014788: 40 00 27 d7 call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
201478c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2014790: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2014794: 22 bf ff f9 be,a 2014778 <fat_file_ioctl+0xac> <== NOT EXECUTED
2014798: b8 07 20 01 inc %i4 <== NOT EXECUTED
201479c: 30 80 00 1a b,a 2014804 <fat_file_ioctl+0x138> <== NOT EXECUTED
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20147a0: 80 a0 60 00 cmp %g1, 0
20147a4: 32 bf ff e6 bne,a 201473c <fat_file_ioctl+0x70> <== NEVER TAKEN
20147a8: f4 08 a0 08 ldub [ %g2 + 8 ], %i2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
20147ac: c2 08 a0 0a ldub [ %g2 + 0xa ], %g1
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20147b0: 80 88 60 03 btst 3, %g1
20147b4: 22 bf ff e2 be,a 201473c <fat_file_ioctl+0x70> <== NEVER TAKEN
20147b8: f4 08 a0 08 ldub [ %g2 + 8 ], %i2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
20147bc: c0 24 00 00 clr [ %l0 ]
rc = RC_OK;
break;
20147c0: 81 c7 e0 08 ret
20147c4: 91 e8 20 00 restore %g0, 0, %o0
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
20147c8: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
20147cc: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if ( rc != RC_OK )
break;
*ret = cur_cln;
20147d0: d2 24 00 00 st %o1, [ %l0 ] <== NOT EXECUTED
errno = EINVAL;
rc = -1;
break;
}
va_end(ap);
return rc;
20147d4: 81 c7 e0 08 ret <== NOT EXECUTED
20147d8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
20147dc: b6 10 00 1a mov %i2, %i3 <== NOT EXECUTED
20147e0: 10 bf ff e1 b 2014764 <fat_file_ioctl+0x98> <== NOT EXECUTED
20147e4: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if ( rc != RC_OK )
break;
*ret = cur_cln;
20147e8: d2 24 00 00 st %o1, [ %l0 ]
errno = EINVAL;
rc = -1;
break;
}
va_end(ap);
return rc;
20147ec: 81 c7 e0 08 ret
20147f0: 91 e8 20 00 restore %g0, 0, %o0
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
20147f4: 40 00 30 51 call 2020938 <__errno> <== NOT EXECUTED
20147f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20147fc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2014800: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014804: 81 c7 e0 08 ret <== NOT EXECUTED
2014808: 81 e8 00 00 restore <== NOT EXECUTED
02014cc8 <fat_file_mark_removed>:
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2014cc8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
2014ccc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
2014cd0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2014cd4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2014cd8: 02 80 00 0c be 2014d08 <fat_file_mark_removed+0x40> <== NOT EXECUTED
2014cdc: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014ce0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2014ce4: 32 80 00 1f bne,a 2014d60 <fat_file_mark_removed+0x98> <== NOT EXECUTED
2014ce8: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
2014cec: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 <== NOT EXECUTED
2014cf0: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2014cf4: 22 80 00 1b be,a 2014d60 <fat_file_mark_removed+0x98> <== NOT EXECUTED
2014cf8: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2014cfc: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2014d00: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED
2014d04: 87 28 c0 02 sll %g3, %g2, %g3 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2014d08: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED
2014d0c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2014d10: b9 30 a0 09 srl %g2, 9, %i4 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2014d14: 85 30 a0 05 srl %g2, 5, %g2 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2014d18: 86 00 c0 1c add %g3, %i4, %g3 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2014d1c: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2014d20: b9 28 e0 04 sll %g3, 4, %i4 <== NOT EXECUTED
2014d24: 7f ff dc 6d call 200bed8 <_Chain_Extract> <== NOT EXECUTED
2014d28: b8 07 00 02 add %i4, %g2, %i4 <== NOT EXECUTED
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
2014d2c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
2014d30: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED
2014d34: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2014d38: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2014d3c: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED
2014d40: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED
2014d44: 7f ff dc 5a call 200beac <_Chain_Append> <== NOT EXECUTED
2014d48: 90 02 00 1c add %o0, %i4, %o0 <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
2014d4c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED
2014d50: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
2014d54: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED
}
2014d58: 81 c7 e0 08 ret <== NOT EXECUTED
2014d5c: 81 e8 00 00 restore <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2014d60: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 <== NOT EXECUTED
2014d64: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED
2014d68: 87 28 40 03 sll %g1, %g3, %g3 <== NOT EXECUTED
2014d6c: 10 bf ff e5 b 2014d00 <fat_file_mark_removed+0x38> <== NOT EXECUTED
2014d70: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED
02013efc <fat_file_open>:
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
2013efc: 9d e3 bf a0 save %sp, -96, %sp
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2013f00: c2 06 40 00 ld [ %i1 ], %g1
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2013f04: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2013f08: 80 a0 60 01 cmp %g1, 1
2013f0c: 02 80 00 0c be 2013f3c <fat_file_open+0x40>
2013f10: 84 10 20 01 mov 1, %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2013f14: 80 a0 60 00 cmp %g1, 0
2013f18: 32 80 00 7d bne,a 201410c <fat_file_open+0x210>
2013f1c: c4 0f 60 05 ldub [ %i5 + 5 ], %g2
2013f20: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2
2013f24: 80 88 a0 03 btst 3, %g2
2013f28: 22 80 00 79 be,a 201410c <fat_file_open+0x210> <== NEVER TAKEN
2013f2c: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2013f30: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2013f34: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
2013f38: 85 28 80 03 sll %g2, %g3, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2013f3c: c2 06 60 04 ld [ %i1 + 4 ], %g1
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2013f40: de 07 60 68 ld [ %i5 + 0x68 ], %o7
2013f44: b9 30 60 09 srl %g1, 9, %i4
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2013f48: 83 30 60 05 srl %g1, 5, %g1
2013f4c: 82 08 60 0f and %g1, 0xf, %g1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2013f50: 84 00 80 1c add %g2, %i4, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2013f54: b9 28 a0 04 sll %g2, 4, %i4
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2013f58: b8 07 00 01 add %i4, %g1, %i4
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
2013f5c: 82 0f 20 01 and %i4, 1, %g1
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2013f60: 85 28 60 02 sll %g1, 2, %g2
2013f64: a1 28 60 04 sll %g1, 4, %l0
2013f68: a0 24 00 02 sub %l0, %g2, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2013f6c: c2 03 c0 10 ld [ %o7 + %l0 ], %g1
2013f70: 9e 03 c0 10 add %o7, %l0, %o7
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2013f74: 9e 03 e0 04 add %o7, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2013f78: 80 a0 40 0f cmp %g1, %o7
2013f7c: 22 80 00 1f be,a 2013ff8 <fat_file_open+0xfc>
2013f80: c4 07 60 6c ld [ %i5 + 0x6c ], %g2
2013f84: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2013f88: 80 a0 a0 01 cmp %g2, 1
2013f8c: 02 80 00 0c be 2013fbc <fat_file_open+0xc0>
2013f90: 88 10 20 01 mov 1, %g4
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2013f94: 80 a0 a0 00 cmp %g2, 0
2013f98: 32 80 00 62 bne,a 2014120 <fat_file_open+0x224>
2013f9c: c8 0f 60 05 ldub [ %i5 + 5 ], %g4
2013fa0: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3
2013fa4: 80 88 e0 03 btst 3, %g3
2013fa8: 22 80 00 5e be,a 2014120 <fat_file_open+0x224> <== NEVER TAKEN
2013fac: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2013fb0: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2013fb4: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
2013fb8: 89 29 00 03 sll %g4, %g3, %g4
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2013fbc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
2013fc0: b7 30 e0 09 srl %g3, 9, %i3
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2013fc4: 85 30 e0 05 srl %g3, 5, %g2
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2013fc8: 88 01 00 1b add %g4, %i3, %g4
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2013fcc: 84 08 a0 0f and %g2, 0xf, %g2
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2013fd0: 87 29 20 04 sll %g4, 4, %g3
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2013fd4: 86 00 c0 02 add %g3, %g2, %g3
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
2013fd8: 80 a7 00 03 cmp %i4, %g3
2013fdc: 22 80 00 56 be,a 2014134 <fat_file_open+0x238>
2013fe0: c4 00 60 08 ld [ %g1 + 8 ], %g2
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
2013fe4: c2 00 40 00 ld [ %g1 ], %g1
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2013fe8: 80 a0 40 0f cmp %g1, %o7
2013fec: 32 bf ff e7 bne,a 2013f88 <fat_file_open+0x8c>
2013ff0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2013ff4: c4 07 60 6c ld [ %i5 + 0x6c ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2013ff8: c2 00 80 10 ld [ %g2 + %l0 ], %g1
2013ffc: 84 00 80 10 add %g2, %l0, %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2014000: 9e 00 a0 04 add %g2, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2014004: 80 a0 40 0f cmp %g1, %o7
2014008: 02 80 00 1f be 2014084 <fat_file_open+0x188> <== ALWAYS TAKEN
201400c: a2 10 3f ff mov -1, %l1
2014010: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2014014: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED
2014018: 02 80 00 0c be 2014048 <fat_file_open+0x14c> <== NOT EXECUTED
201401c: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014020: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2014024: 32 80 00 49 bne,a 2014148 <fat_file_open+0x24c> <== NOT EXECUTED
2014028: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
201402c: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 <== NOT EXECUTED
2014030: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
2014034: 22 80 00 45 be,a 2014148 <fat_file_open+0x24c> <== NOT EXECUTED
2014038: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
201403c: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2014040: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED
2014044: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2014048: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
201404c: b7 30 e0 09 srl %g3, 9, %i3 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2014050: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2014054: 88 01 00 1b add %g4, %i3, %g4 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2014058: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
201405c: 87 29 20 04 sll %g4, 4, %g3 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2014060: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
2014064: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED
2014068: 02 80 00 3d be 201415c <fat_file_open+0x260> <== NOT EXECUTED
201406c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
2014070: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2014074: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED
2014078: 32 bf ff e7 bne,a 2014014 <fat_file_open+0x118> <== NOT EXECUTED
201407c: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
return 0;
}
}
the_node = the_node->next;
}
return -1;
2014080: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
2014084: 7f ff cb 57 call 2006de0 <malloc>
2014088: 90 10 20 44 mov 0x44, %o0
201408c: d0 26 80 00 st %o0, [ %i2 ]
if ( lfat_fd == NULL )
2014090: 80 a2 20 00 cmp %o0, 0
2014094: 02 80 00 40 be 2014194 <fat_file_open+0x298> <== NEVER TAKEN
2014098: b6 10 00 08 mov %o0, %i3
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
201409c: 92 10 20 00 clr %o1
20140a0: 40 00 35 31 call 2021564 <memset>
20140a4: 94 10 20 44 mov 0x44, %o2
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
20140a8: de 0e e0 30 ldub [ %i3 + 0x30 ], %o7
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
20140ac: c8 06 40 00 ld [ %i1 ], %g4
20140b0: c6 06 60 04 ld [ %i1 + 4 ], %g3
20140b4: c4 06 60 08 ld [ %i1 + 8 ], %g2
20140b8: c2 06 60 0c ld [ %i1 + 0xc ], %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
20140bc: b2 0b ff fe and %o7, -2, %i1
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
20140c0: c8 26 e0 20 st %g4, [ %i3 + 0x20 ]
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
20140c4: 9e 10 20 01 mov 1, %o7
lfat_fd->flags &= ~FAT_FILE_REMOVED;
20140c8: f2 2e e0 30 stb %i1, [ %i3 + 0x30 ]
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
20140cc: de 26 e0 08 st %o7, [ %i3 + 8 ]
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
20140d0: b2 10 3f ff mov -1, %i1
lfat_fd->dir_pos = *dir_pos;
20140d4: c6 26 e0 24 st %g3, [ %i3 + 0x24 ]
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
20140d8: f2 26 e0 3c st %i1, [ %i3 + 0x3c ]
lfat_fd->dir_pos = *dir_pos;
20140dc: c4 26 e0 28 st %g2, [ %i3 + 0x28 ]
if ( rc != RC_OK )
20140e0: 80 a4 60 00 cmp %l1, 0
20140e4: 02 80 00 25 be 2014178 <fat_file_open+0x27c> <== NEVER TAKEN
20140e8: c2 26 e0 2c st %g1, [ %i3 + 0x2c ]
lfat_fd->ino = key;
20140ec: f8 26 e0 0c st %i4, [ %i3 + 0xc ]
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
20140f0: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
20140f4: 92 10 00 1b mov %i3, %o1
20140f8: 90 02 00 10 add %o0, %l0, %o0
20140fc: 7f ff df 6c call 200beac <_Chain_Append>
2014100: b0 10 20 00 clr %i0
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
2014104: 81 c7 e0 08 ret
2014108: 81 e8 00 00 restore
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201410c: c6 07 60 30 ld [ %i5 + 0x30 ], %g3
2014110: 82 00 7f fe add %g1, -2, %g1
2014114: 85 28 40 02 sll %g1, %g2, %g2
2014118: 10 bf ff 87 b 2013f34 <fat_file_open+0x38>
201411c: 84 00 80 03 add %g2, %g3, %g2
2014120: c6 07 60 30 ld [ %i5 + 0x30 ], %g3
2014124: 84 00 bf fe add %g2, -2, %g2
2014128: 89 28 80 04 sll %g2, %g4, %g4
201412c: 10 bf ff a2 b 2013fb4 <fat_file_open+0xb8>
2014130: 88 01 00 03 add %g4, %g3, %g4
/* access "valid" hash table */
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
2014134: c2 26 80 00 st %g1, [ %i2 ]
lfat_fd->links_num++;
2014138: 84 00 a0 01 inc %g2
201413c: c4 20 60 08 st %g2, [ %g1 + 8 ]
return rc;
2014140: 81 c7 e0 08 ret
2014144: 91 e8 20 00 restore %g0, 0, %o0
2014148: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 <== NOT EXECUTED
201414c: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED
2014150: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED
2014154: 10 bf ff bb b 2014040 <fat_file_open+0x144> <== NOT EXECUTED
2014158: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
201415c: 02 bf ff ca be 2014084 <fat_file_open+0x188> <== NOT EXECUTED
2014160: a2 10 20 00 clr %l1 <== NOT EXECUTED
2014164: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
2014168: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED
201416c: 32 bf ff c2 bne,a 2014074 <fat_file_open+0x178> <== NOT EXECUTED
2014170: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2014174: 30 bf ff c4 b,a 2014084 <fat_file_open+0x188> <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
2014178: 40 00 05 50 call 20156b8 <fat_get_unique_ino> <== NOT EXECUTED
201417c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
2014180: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014184: 12 bf ff db bne 20140f0 <fat_file_open+0x1f4> <== NOT EXECUTED
2014188: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED
{
free((*fat_fd));
201418c: 7f ff c8 f3 call 2006558 <free> <== NOT EXECUTED
2014190: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
2014194: 40 00 31 e9 call 2020938 <__errno> <== NOT EXECUTED
2014198: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201419c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
20141a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20141a4: 81 c7 e0 08 ret <== NOT EXECUTED
20141a8: 81 e8 00 00 restore <== NOT EXECUTED
020141c4 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
20141c4: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
20141c8: c0 27 bf f8 clr [ %fp + -8 ]
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
20141cc: ba 10 00 18 mov %i0, %i5
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
20141d0: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
20141d4: 80 a6 e0 00 cmp %i3, 0
20141d8: 02 80 00 27 be 2014274 <fat_file_read+0xb0> <== NEVER TAKEN
20141dc: 90 10 20 00 clr %o0
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
20141e0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
20141e4: 80 a0 40 1a cmp %g1, %i2
20141e8: 08 80 00 23 bleu 2014274 <fat_file_read+0xb0> <== NEVER TAKEN
20141ec: 80 a6 c0 01 cmp %i3, %g1
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
20141f0: 08 80 00 23 bleu 201427c <fat_file_read+0xb8> <== ALWAYS TAKEN
20141f4: 84 20 40 1b sub %g1, %i3, %g2
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
20141f8: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20141fc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2014200: 80 a0 60 01 cmp %g1, 1
2014204: 22 80 00 23 be,a 2014290 <fat_file_read+0xcc>
2014208: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
201420c: e6 0c 60 08 ldub [ %l1 + 8 ], %l3
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2014210: e4 06 60 34 ld [ %i1 + 0x34 ], %l2
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2014214: a7 36 80 13 srl %i2, %l3, %l3
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2014218: 80 a4 c0 12 cmp %l3, %l2
201421c: 02 80 00 76 be 20143f4 <fat_file_read+0x230> <== ALWAYS TAKEN
2014220: e8 14 60 06 lduh [ %l1 + 6 ], %l4
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
2014224: 80 a4 c0 12 cmp %l3, %l2 <== NOT EXECUTED
2014228: 38 80 00 35 bgu,a 20142fc <fat_file_read+0x138> <== NOT EXECUTED
201422c: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
2014230: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
2014234: a4 10 00 13 mov %l3, %l2 <== NOT EXECUTED
2014238: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
201423c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2014240: 02 80 00 32 be 2014308 <fat_file_read+0x144> <== NOT EXECUTED
2014244: a0 10 20 00 clr %l0 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014248: 10 80 00 06 b 2014260 <fat_file_read+0x9c> <== NOT EXECUTED
201424c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2014250: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED
2014254: 02 80 00 2d be 2014308 <fat_file_read+0x144> <== NOT EXECUTED
2014258: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
201425c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2014260: 40 00 29 21 call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
2014264: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2014268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201426c: 02 bf ff f9 be 2014250 <fat_file_read+0x8c> <== NOT EXECUTED
2014270: a0 04 20 01 inc %l0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
2014274: 81 c7 e0 08 ret
2014278: 91 e8 00 08 restore %g0, %o0, %o0
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
201427c: 80 a6 80 02 cmp %i2, %g2
2014280: 28 bf ff e0 bleu,a 2014200 <fat_file_read+0x3c> <== ALWAYS TAKEN
2014284: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
2014288: 10 bf ff dd b 20141fc <fat_file_read+0x38> <== NOT EXECUTED
201428c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014290: 80 a0 60 00 cmp %g1, 0
2014294: 32 bf ff df bne,a 2014210 <fat_file_read+0x4c> <== NEVER TAKEN
2014298: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
201429c: c2 0c 60 0a ldub [ %l1 + 0xa ], %g1
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20142a0: 80 88 60 03 btst 3, %g1
20142a4: 22 bf ff db be,a 2014210 <fat_file_read+0x4c> <== NEVER TAKEN
20142a8: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
20142ac: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20142b0: 80 a0 60 00 cmp %g1, 0
20142b4: 32 80 00 53 bne,a 2014400 <fat_file_read+0x23c> <== NEVER TAKEN
20142b8: c6 0c 60 05 ldub [ %l1 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
20142bc: d2 04 60 1c ld [ %l1 + 0x1c ], %o1
sec += (start >> fs_info->vol.sec_log2);
20142c0: c2 0c 60 02 ldub [ %l1 + 2 ], %g1
byte = start & (fs_info->vol.bps - 1);
20142c4: d4 14 40 00 lduh [ %l1 ], %o2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
20142c8: 83 36 80 01 srl %i2, %g1, %g1
byte = start & (fs_info->vol.bps - 1);
20142cc: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
20142d0: 90 10 00 1d mov %i5, %o0
20142d4: 92 02 40 01 add %o1, %g1, %o1
20142d8: 94 0e 80 0a and %i2, %o2, %o2
20142dc: 96 10 00 1b mov %i3, %o3
20142e0: 40 00 04 06 call 20152f8 <_fat_block_read>
20142e4: 98 10 00 1c mov %i4, %o4
if ( ret < 0 )
20142e8: 80 a2 20 00 cmp %o0, 0
20142ec: 16 bf ff e2 bge 2014274 <fat_file_read+0xb0> <== ALWAYS TAKEN
20142f0: 01 00 00 00 nop
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
20142f4: 10 bf ff e0 b 2014274 <fat_file_read+0xb0> <== NOT EXECUTED
20142f8: 90 10 3f ff mov -1, %o0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
20142fc: a4 24 c0 12 sub %l3, %l2, %l2 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
2014300: 10 bf ff cf b 201423c <fat_file_read+0x78> <== NOT EXECUTED
2014304: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
2014308: e6 26 60 34 st %l3, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
201430c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED
*disk_cln = cur_cln;
2014310: d2 27 bf f8 st %o1, [ %fp + -8 ] <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2014314: a9 2d 20 10 sll %l4, 0x10, %l4
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014318: 80 a6 e0 00 cmp %i3, 0
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
201431c: a9 35 20 10 srl %l4, 0x10, %l4
2014320: a8 05 3f ff add %l4, -1, %l4
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014324: 02 80 00 45 be 2014438 <fat_file_read+0x274> <== NEVER TAKEN
2014328: b4 0e 80 14 and %i2, %l4, %i2
/* update cache */
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
201432c: c4 0c 60 02 ldub [ %l1 + 2 ], %g2
2014330: d4 14 40 00 lduh [ %l1 ], %o2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014334: 82 10 00 1a mov %i2, %g1
2014338: 10 80 00 20 b 20143b8 <fat_file_read+0x1f4>
201433c: a4 10 20 00 clr %l2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014340: de 08 e0 0a ldub [ %g3 + 0xa ], %o7 <== NOT EXECUTED
2014344: 80 8b e0 03 btst 3, %o7 <== NOT EXECUTED
2014348: 22 80 00 26 be,a 20143e0 <fat_file_read+0x21c> <== NOT EXECUTED
201434c: de 08 e0 05 ldub [ %g3 + 5 ], %o7 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2014350: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
2014354: 85 30 40 02 srl %g1, %g2, %g2
byte = ofs & (fs_info->vol.bps - 1);
2014358: 95 2a a0 10 sll %o2, 0x10, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
201435c: 98 07 00 12 add %i4, %l2, %o4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2014360: 95 32 a0 10 srl %o2, 0x10, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
2014364: 92 02 40 02 add %o1, %g2, %o1
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2014368: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
201436c: 96 10 00 10 mov %l0, %o3
2014370: 94 0a 80 01 and %o2, %g1, %o2
2014374: 40 00 03 e1 call 20152f8 <_fat_block_read>
2014378: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
201437c: 94 07 bf f8 add %fp, -8, %o2
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
2014380: 80 a2 20 00 cmp %o0, 0
2014384: 06 bf ff dc bl 20142f4 <fat_file_read+0x130> <== NEVER TAKEN
2014388: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
201438c: e8 07 bf f8 ld [ %fp + -8 ], %l4
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
2014390: a4 04 80 10 add %l2, %l0, %l2
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014394: 40 00 28 d4 call 201e6e4 <fat_get_fat_cluster>
2014398: 92 10 00 14 mov %l4, %o1
if ( rc != RC_OK )
201439c: 80 a2 20 00 cmp %o0, 0
20143a0: 12 bf ff b5 bne 2014274 <fat_file_read+0xb0> <== NEVER TAKEN
20143a4: b6 a6 c0 10 subcc %i3, %l0, %i3
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20143a8: 02 80 00 1b be 2014414 <fat_file_read+0x250> <== ALWAYS TAKEN
20143ac: 82 10 20 00 clr %g1
20143b0: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 <== NOT EXECUTED
20143b4: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
20143b8: e0 14 60 06 lduh [ %l1 + 6 ], %l0
20143bc: a0 24 00 01 sub %l0, %g1, %l0
20143c0: 80 a4 00 1b cmp %l0, %i3
20143c4: 08 80 00 03 bleu 20143d0 <fat_file_read+0x20c>
20143c8: c8 07 bf f8 ld [ %fp + -8 ], %g4
20143cc: a0 10 00 1b mov %i3, %l0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20143d0: 80 a1 20 00 cmp %g4, 0
20143d4: 02 bf ff db be 2014340 <fat_file_read+0x17c> <== NEVER TAKEN
20143d8: c6 07 60 34 ld [ %i5 + 0x34 ], %g3
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20143dc: de 08 e0 05 ldub [ %g3 + 5 ], %o7
20143e0: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3
20143e4: 92 01 3f fe add %g4, -2, %o1
20143e8: 93 2a 40 0f sll %o1, %o7, %o1
20143ec: 10 bf ff da b 2014354 <fat_file_read+0x190>
20143f0: 92 02 40 03 add %o1, %g3, %o1
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
20143f4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
20143f8: 10 bf ff c7 b 2014314 <fat_file_read+0x150>
20143fc: c2 27 bf f8 st %g1, [ %fp + -8 ]
2014400: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
2014404: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED
2014408: 93 28 40 03 sll %g1, %g3, %o1 <== NOT EXECUTED
201440c: 10 bf ff ad b 20142c0 <fat_file_read+0xfc> <== NOT EXECUTED
2014410: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
2014414: 90 10 00 12 mov %l2, %o0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2014418: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
201441c: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
2014420: e8 26 60 38 st %l4, [ %i1 + 0x38 ]
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2014424: a4 06 80 12 add %i2, %l2, %l2
2014428: 83 34 80 01 srl %l2, %g1, %g1
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
201442c: a6 00 40 13 add %g1, %l3, %l3
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
2014430: 10 bf ff 91 b 2014274 <fat_file_read+0xb0>
2014434: e6 26 60 34 st %l3, [ %i1 + 0x34 ]
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014438: 90 10 20 00 clr %o0 <== NOT EXECUTED
201443c: a8 10 20 00 clr %l4 <== NOT EXECUTED
2014440: 10 bf ff f6 b 2014418 <fat_file_read+0x254> <== NOT EXECUTED
2014444: a4 10 20 00 clr %l2 <== NOT EXECUTED
02014e90 <fat_file_size>:
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2014e90: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2014e94: fa 06 60 1c ld [ %i1 + 0x1c ], %i5
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014e98: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2014e9c: fa 27 bf fc st %i5, [ %fp + -4 ]
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2014ea0: b6 10 00 18 mov %i0, %i3
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014ea4: 80 a0 60 01 cmp %g1, 1
2014ea8: 02 80 00 21 be 2014f2c <fat_file_size+0x9c> <== NEVER TAKEN
2014eac: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2014eb0: c4 07 20 0c ld [ %i4 + 0xc ], %g2
2014eb4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
2014eb8: 84 0f 40 02 and %i5, %g2, %g2
2014ebc: 80 a0 80 01 cmp %g2, %g1
2014ec0: 0a 80 00 0e bcs 2014ef8 <fat_file_size+0x68> <== ALWAYS TAKEN
2014ec4: c0 26 60 18 clr [ %i1 + 0x18 ]
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
2014ec8: 10 80 00 15 b 2014f1c <fat_file_size+0x8c> <== NOT EXECUTED
2014ecc: ba 10 20 00 clr %i5 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
2014ed0: de 06 60 18 ld [ %i1 + 0x18 ], %o7
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2014ed4: c6 07 20 0c ld [ %i4 + 0xc ], %g3
2014ed8: c4 07 20 10 ld [ %i4 + 0x10 ], %g2
2014edc: c2 07 bf fc ld [ %fp + -4 ], %g1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
2014ee0: 88 03 c0 04 add %o7, %g4, %g4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2014ee4: 86 08 40 03 and %g1, %g3, %g3
2014ee8: 80 a0 c0 02 cmp %g3, %g2
2014eec: 1a 80 00 0c bcc 2014f1c <fat_file_size+0x8c> <== ALWAYS TAKEN
2014ef0: c8 26 60 18 st %g4, [ %i1 + 0x18 ]
2014ef4: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014ef8: 92 10 00 1d mov %i5, %o1
2014efc: 90 10 00 1b mov %i3, %o0
2014f00: 40 00 25 f9 call 201e6e4 <fat_get_fat_cluster>
2014f04: 94 07 bf fc add %fp, -4, %o2
if ( rc != RC_OK )
2014f08: 80 a2 20 00 cmp %o0, 0
2014f0c: 22 bf ff f1 be,a 2014ed0 <fat_file_size+0x40> <== ALWAYS TAKEN
2014f10: c8 17 20 06 lduh [ %i4 + 6 ], %g4
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
2014f14: 81 c7 e0 08 ret <== NOT EXECUTED
2014f18: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
2014f1c: 90 10 20 00 clr %o0
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
2014f20: fa 26 60 3c st %i5, [ %i1 + 0x3c ]
return rc;
}
2014f24: 81 c7 e0 08 ret
2014f28: 91 e8 00 08 restore %g0, %o0, %o0
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014f2c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED
2014f30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2014f34: 32 bf ff e0 bne,a 2014eb4 <fat_file_size+0x24> <== NOT EXECUTED
2014f38: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2014f3c: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014f40: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
2014f44: 22 bf ff dc be,a 2014eb4 <fat_file_size+0x24> <== NOT EXECUTED
2014f48: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
2014f4c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED
return rc;
2014f50: 90 10 20 00 clr %o0 <== NOT EXECUTED
2014f54: 10 bf ff f0 b 2014f14 <fat_file_size+0x84> <== NOT EXECUTED
2014f58: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED
02014448 <fat_file_truncate>:
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
2014448: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
201444c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
2014450: ba 10 00 18 mov %i0, %i5
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
2014454: 80 a0 40 1a cmp %g1, %i2
2014458: 08 80 00 2b bleu 2014504 <fat_file_truncate+0xbc> <== NEVER TAKEN
201445c: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
return rc;
assert(fat_fd->fat_file_size);
2014460: 80 a0 60 00 cmp %g1, 0
2014464: 02 80 00 60 be 20145e4 <fat_file_truncate+0x19c> <== NEVER TAKEN
2014468: 11 00 80 c4 sethi %hi(0x2031000), %o0
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
201446c: c6 08 a0 08 ldub [ %g2 + 8 ], %g3
2014470: c4 10 a0 06 lduh [ %g2 + 6 ], %g2
2014474: 84 00 bf ff add %g2, -1, %g2
2014478: b4 00 80 1a add %g2, %i2, %i2
201447c: b5 36 80 03 srl %i2, %g3, %i2
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
2014480: 87 2e 80 03 sll %i2, %g3, %g3
2014484: 80 a0 40 03 cmp %g1, %g3
2014488: 08 80 00 1d bleu 20144fc <fat_file_truncate+0xb4> <== NEVER TAKEN
201448c: 90 10 20 00 clr %o0
return RC_OK;
if (cl_start != 0)
2014490: 80 a6 a0 00 cmp %i2, 0
2014494: 32 80 00 1f bne,a 2014510 <fat_file_truncate+0xc8> <== NEVER TAKEN
2014498: e4 06 60 34 ld [ %i1 + 0x34 ], %l2 <== NOT EXECUTED
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
201449c: e2 06 60 34 ld [ %i1 + 0x34 ], %l1
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
20144a0: a0 10 3f ff mov -1, %l0
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
20144a4: 80 a6 80 11 cmp %i2, %l1
20144a8: 22 80 00 35 be,a 201457c <fat_file_truncate+0x134> <== ALWAYS TAKEN
20144ac: d2 06 60 38 ld [ %i1 + 0x38 ], %o1
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
20144b0: 28 80 00 44 bleu,a 20145c0 <fat_file_truncate+0x178> <== NOT EXECUTED
20144b4: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
{
cur_cln = fat_fd->map.disk_cln;
20144b8: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
20144bc: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
20144c0: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
20144c4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
20144c8: 02 80 00 2b be 2014574 <fat_file_truncate+0x12c> <== NOT EXECUTED
20144cc: b8 10 20 00 clr %i4 <== NOT EXECUTED
20144d0: 10 80 00 05 b 20144e4 <fat_file_truncate+0x9c> <== NOT EXECUTED
20144d4: b6 07 bf fc add %fp, -4, %i3 <== NOT EXECUTED
20144d8: 80 a7 00 11 cmp %i4, %l1 <== NOT EXECUTED
20144dc: 02 80 00 26 be 2014574 <fat_file_truncate+0x12c> <== NOT EXECUTED
20144e0: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20144e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20144e8: 40 00 28 7f call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
20144ec: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
20144f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20144f4: 02 bf ff f9 be 20144d8 <fat_file_truncate+0x90> <== NOT EXECUTED
20144f8: b8 07 20 01 inc %i4 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
20144fc: 81 c7 e0 08 ret
2014500: 91 e8 00 08 restore %g0, %o0, %o0
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
return rc;
2014504: 90 10 20 00 clr %o0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
2014508: 81 c7 e0 08 ret <== NOT EXECUTED
201450c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
return RC_OK;
if (cl_start != 0)
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
2014510: a2 06 bf ff add %i2, -1, %l1 <== NOT EXECUTED
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2014514: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED
2014518: 22 bf ff e3 be,a 20144a4 <fat_file_truncate+0x5c> <== NOT EXECUTED
201451c: e0 06 60 38 ld [ %i1 + 0x38 ], %l0 <== NOT EXECUTED
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
2014520: 28 80 00 2e bleu,a 20145d8 <fat_file_truncate+0x190> <== NOT EXECUTED
2014524: e0 06 60 1c ld [ %i1 + 0x1c ], %l0 <== NOT EXECUTED
{
cur_cln = fat_fd->map.disk_cln;
2014528: e0 06 60 38 ld [ %i1 + 0x38 ], %l0 <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
201452c: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
2014530: e0 27 bf fc st %l0, [ %fp + -4 ] <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2014534: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2014538: 02 80 00 25 be 20145cc <fat_file_truncate+0x184> <== NOT EXECUTED
201453c: b8 10 20 00 clr %i4 <== NOT EXECUTED
2014540: 10 80 00 05 b 2014554 <fat_file_truncate+0x10c> <== NOT EXECUTED
2014544: b6 07 bf fc add %fp, -4, %i3 <== NOT EXECUTED
2014548: 80 a7 00 12 cmp %i4, %l2 <== NOT EXECUTED
201454c: 02 80 00 20 be 20145cc <fat_file_truncate+0x184> <== NOT EXECUTED
2014550: e0 07 bf fc ld [ %fp + -4 ], %l0 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014554: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2014558: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201455c: 40 00 28 62 call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
2014560: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2014564: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014568: 22 bf ff f8 be,a 2014548 <fat_file_truncate+0x100> <== NOT EXECUTED
201456c: b8 07 20 01 inc %i4 <== NOT EXECUTED
2014570: 30 bf ff e3 b,a 20144fc <fat_file_truncate+0xb4> <== NOT EXECUTED
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
2014574: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
2014578: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
201457c: 40 00 29 a4 call 201ec0c <fat_free_fat_clusters_chain>
2014580: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
2014584: 80 a2 20 00 cmp %o0, 0
2014588: 12 bf ff dd bne 20144fc <fat_file_truncate+0xb4> <== NEVER TAKEN
201458c: 80 a6 a0 00 cmp %i2, 0
return rc;
if (cl_start != 0)
2014590: 02 bf ff db be 20144fc <fat_file_truncate+0xb4> <== ALWAYS TAKEN
2014594: 92 10 00 10 mov %l0, %o1
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
2014598: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201459c: 40 00 28 da call 201e904 <fat_set_fat_cluster> <== NOT EXECUTED
20145a0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
20145a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20145a8: 12 bf ff d5 bne 20144fc <fat_file_truncate+0xb4> <== NOT EXECUTED
20145ac: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
20145b0: e0 26 60 38 st %l0, [ %i1 + 0x38 ] <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
20145b4: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
20145b8: 10 bf ff d1 b 20144fc <fat_file_truncate+0xb4> <== NOT EXECUTED
20145bc: e0 26 60 3c st %l0, [ %i1 + 0x3c ] <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
20145c0: a2 10 00 1a mov %i2, %l1 <== NOT EXECUTED
20145c4: 10 bf ff c0 b 20144c4 <fat_file_truncate+0x7c> <== NOT EXECUTED
20145c8: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
20145cc: e2 26 60 34 st %l1, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
20145d0: 10 bf ff b5 b 20144a4 <fat_file_truncate+0x5c> <== NOT EXECUTED
20145d4: e0 26 60 38 st %l0, [ %i1 + 0x38 ] <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
20145d8: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED
20145dc: 10 bf ff d6 b 2014534 <fat_file_truncate+0xec> <== NOT EXECUTED
20145e0: e0 27 bf fc st %l0, [ %fp + -4 ] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
20145e4: 15 00 80 c4 sethi %hi(0x2031000), %o2 <== NOT EXECUTED
20145e8: 17 00 80 c4 sethi %hi(0x2031000), %o3 <== NOT EXECUTED
20145ec: 90 12 20 f8 or %o0, 0xf8, %o0 <== NOT EXECUTED
20145f0: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED
20145f4: 94 12 a1 58 or %o2, 0x158, %o2 <== NOT EXECUTED
20145f8: 40 00 0d 2e call 2017ab0 <__assert_func> <== NOT EXECUTED
20145fc: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED
020149f0 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
20149f0: 9d e3 bf 90 save %sp, -112, %sp
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
20149f4: c0 27 bf f4 clr [ %fp + -12 ]
uint32_t cl_start = 0;
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
20149f8: c0 27 bf f8 clr [ %fp + -8 ]
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
20149fc: ba 10 00 18 mov %i0, %i5
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2014a00: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
2014a04: 80 a6 e0 00 cmp %i3, 0
2014a08: 02 80 00 99 be 2014c6c <fat_file_write+0x27c> <== NEVER TAKEN
2014a0c: b0 10 20 00 clr %i0
return cmpltd;
if ( start > fat_fd->fat_file_size )
2014a10: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
2014a14: 80 a0 40 1a cmp %g1, %i2
2014a18: 0a 80 00 91 bcs 2014c5c <fat_file_write+0x26c> <== NEVER TAKEN
2014a1c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
2014a20: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
2014a24: 80 a6 c0 01 cmp %i3, %g1
2014a28: 18 80 00 8d bgu 2014c5c <fat_file_write+0x26c> <== NEVER TAKEN
2014a2c: 82 20 40 1b sub %g1, %i3, %g1
2014a30: 80 a6 80 01 cmp %i2, %g1
2014a34: 18 80 00 8a bgu 2014c5c <fat_file_write+0x26c> <== NEVER TAKEN
2014a38: a2 06 c0 1a add %i3, %i2, %l1
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
2014a3c: 90 10 00 1d mov %i5, %o0
2014a40: 92 10 00 19 mov %i1, %o1
2014a44: 94 10 00 11 mov %l1, %o2
2014a48: 7f ff ff 71 call 201480c <fat_file_extend>
2014a4c: 96 07 bf f8 add %fp, -8, %o3
if (rc != RC_OK)
2014a50: b0 92 20 00 orcc %o0, 0, %i0
2014a54: 12 80 00 86 bne 2014c6c <fat_file_write+0x27c> <== NEVER TAKEN
2014a58: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
2014a5c: 80 a4 40 01 cmp %l1, %g1
2014a60: 32 80 00 02 bne,a 2014a68 <fat_file_write+0x78> <== NEVER TAKEN
2014a64: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014a68: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2014a6c: 80 a0 60 01 cmp %g1, 1
2014a70: 22 80 00 20 be,a 2014af0 <fat_file_write+0x100>
2014a74: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2014a78: e4 0c 20 08 ldub [ %l0 + 8 ], %l2
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2014a7c: e6 06 60 34 ld [ %i1 + 0x34 ], %l3
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2014a80: a5 36 80 12 srl %i2, %l2, %l2
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2014a84: 80 a4 80 13 cmp %l2, %l3
2014a88: 02 80 00 7b be 2014c74 <fat_file_write+0x284> <== ALWAYS TAKEN
2014a8c: e8 14 20 06 lduh [ %l0 + 6 ], %l4
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
2014a90: 80 a4 80 13 cmp %l2, %l3 <== NOT EXECUTED
2014a94: 38 80 00 36 bgu,a 2014b6c <fat_file_write+0x17c> <== NOT EXECUTED
2014a98: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
2014a9c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
2014aa0: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED
2014aa4: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2014aa8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2014aac: 02 80 00 33 be 2014b78 <fat_file_write+0x188> <== NOT EXECUTED
2014ab0: a2 10 20 00 clr %l1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014ab4: 10 80 00 06 b 2014acc <fat_file_write+0xdc> <== NOT EXECUTED
2014ab8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2014abc: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED
2014ac0: 02 80 00 2e be 2014b78 <fat_file_write+0x188> <== NOT EXECUTED
2014ac4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014ac8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2014acc: 40 00 27 06 call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
2014ad0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2014ad4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014ad8: 02 bf ff f9 be 2014abc <fat_file_write+0xcc> <== NOT EXECUTED
2014adc: a2 04 60 01 inc %l1 <== NOT EXECUTED
2014ae0: 81 c7 e0 08 ret <== NOT EXECUTED
2014ae4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
2014ae8: 81 c7 e0 08 ret <== NOT EXECUTED
2014aec: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014af0: 80 a0 60 00 cmp %g1, 0
2014af4: 32 bf ff e2 bne,a 2014a7c <fat_file_write+0x8c> <== NEVER TAKEN
2014af8: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2014afc: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2014b00: 80 88 60 03 btst 3, %g1
2014b04: 22 bf ff de be,a 2014a7c <fat_file_write+0x8c> <== NEVER TAKEN
2014b08: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
2014b0c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014b10: 80 a0 a0 00 cmp %g2, 0
2014b14: 12 80 00 5b bne 2014c80 <fat_file_write+0x290> <== NEVER TAKEN
2014b18: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2014b1c: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
2014b20: 80 88 e0 03 btst 3, %g3
2014b24: 22 80 00 58 be,a 2014c84 <fat_file_write+0x294> <== NEVER TAKEN
2014b28: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2014b2c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
sec += (start >> fs_info->vol.sec_log2);
2014b30: c2 0c 20 02 ldub [ %l0 + 2 ], %g1
byte = start & (fs_info->vol.bps - 1);
2014b34: d4 14 00 00 lduh [ %l0 ], %o2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
2014b38: 83 36 80 01 srl %i2, %g1, %g1
byte = start & (fs_info->vol.bps - 1);
2014b3c: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
2014b40: 90 10 00 1d mov %i5, %o0
2014b44: 92 02 40 01 add %o1, %g1, %o1
2014b48: 94 0e 80 0a and %i2, %o2, %o2
2014b4c: 96 10 00 1b mov %i3, %o3
2014b50: 40 00 02 0c call 2015380 <_fat_block_write>
2014b54: 98 10 00 1c mov %i4, %o4
if ( ret < 0 )
2014b58: b0 92 20 00 orcc %o0, 0, %i0
2014b5c: 16 80 00 57 bge 2014cb8 <fat_file_write+0x2c8> <== ALWAYS TAKEN
2014b60: 01 00 00 00 nop
return -1;
2014b64: 81 c7 e0 08 ret <== NOT EXECUTED
2014b68: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
2014b6c: a6 24 80 13 sub %l2, %l3, %l3 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
2014b70: 10 bf ff ce b 2014aa8 <fat_file_write+0xb8> <== NOT EXECUTED
2014b74: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
2014b78: e4 26 60 34 st %l2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
2014b7c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED
*disk_cln = cur_cln;
2014b80: d2 27 bf f4 st %o1, [ %fp + -12 ] <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2014b84: a9 2d 20 10 sll %l4, 0x10, %l4
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014b88: a2 10 20 00 clr %l1
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2014b8c: a9 35 20 10 srl %l4, 0x10, %l4
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014b90: 80 a6 e0 00 cmp %i3, 0
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2014b94: a8 05 3f ff add %l4, -1, %l4
2014b98: b4 0e 80 14 and %i2, %l4, %i2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014b9c: 12 80 00 20 bne 2014c1c <fat_file_write+0x22c> <== ALWAYS TAKEN
2014ba0: 82 10 00 1a mov %i2, %g1
2014ba4: 10 80 00 47 b 2014cc0 <fat_file_write+0x2d0> <== NOT EXECUTED
2014ba8: a8 10 20 00 clr %l4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014bac: c8 08 a0 0a ldub [ %g2 + 0xa ], %g4 <== NOT EXECUTED
2014bb0: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED
2014bb4: 22 80 00 25 be,a 2014c48 <fat_file_write+0x258> <== NOT EXECUTED
2014bb8: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2014bbc: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
2014bc0: c4 0c 20 02 ldub [ %l0 + 2 ], %g2
byte = ofs & (fs_info->vol.bps - 1);
2014bc4: d4 14 00 00 lduh [ %l0 ], %o2
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
2014bc8: 85 30 40 02 srl %g1, %g2, %g2
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
2014bcc: 98 07 00 11 add %i4, %l1, %o4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2014bd0: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
2014bd4: 92 02 40 02 add %o1, %g2, %o1
2014bd8: 94 08 40 0a and %g1, %o2, %o2
2014bdc: 40 00 01 e9 call 2015380 <_fat_block_write>
2014be0: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014be4: 94 07 bf f4 add %fp, -12, %o2
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
2014be8: 80 a2 20 00 cmp %o0, 0
2014bec: 06 bf ff bf bl 2014ae8 <fat_file_write+0xf8> <== NEVER TAKEN
2014bf0: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
2014bf4: e8 07 bf f4 ld [ %fp + -12 ], %l4
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
2014bf8: e6 07 bf f8 ld [ %fp + -8 ], %l3
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2014bfc: 40 00 26 ba call 201e6e4 <fat_get_fat_cluster>
2014c00: 92 10 00 14 mov %l4, %o1
if ( rc != RC_OK )
2014c04: b0 92 20 00 orcc %o0, 0, %i0
2014c08: 12 80 00 19 bne 2014c6c <fat_file_write+0x27c> <== NEVER TAKEN
2014c0c: b6 a6 c0 13 subcc %i3, %l3, %i3
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014c10: 02 80 00 22 be 2014c98 <fat_file_write+0x2a8>
2014c14: a2 04 40 13 add %l1, %l3, %l1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
2014c18: 82 10 20 00 clr %g1
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
2014c1c: d6 14 20 06 lduh [ %l0 + 6 ], %o3
2014c20: 96 22 c0 01 sub %o3, %g1, %o3
2014c24: 80 a2 c0 1b cmp %o3, %i3
2014c28: 08 80 00 03 bleu 2014c34 <fat_file_write+0x244>
2014c2c: c6 07 bf f4 ld [ %fp + -12 ], %g3
2014c30: 96 10 00 1b mov %i3, %o3
2014c34: d6 27 bf f8 st %o3, [ %fp + -8 ]
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2014c38: 80 a0 e0 00 cmp %g3, 0
2014c3c: 02 bf ff dc be 2014bac <fat_file_write+0x1bc> <== NEVER TAKEN
2014c40: c4 07 60 34 ld [ %i5 + 0x34 ], %g2
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2014c44: c8 08 a0 05 ldub [ %g2 + 5 ], %g4
2014c48: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2
2014c4c: 92 00 ff fe add %g3, -2, %o1
2014c50: 93 2a 40 04 sll %o1, %g4, %o1
2014c54: 10 bf ff db b 2014bc0 <fat_file_write+0x1d0>
2014c58: 92 02 40 02 add %o1, %g2, %o1
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
2014c5c: 40 00 2f 37 call 2020938 <__errno> <== NOT EXECUTED
2014c60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2014c64: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2014c68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2014c6c: 81 c7 e0 08 ret <== NOT EXECUTED
2014c70: 81 e8 00 00 restore <== NOT EXECUTED
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
2014c74: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
2014c78: 10 bf ff c3 b 2014b84 <fat_file_write+0x194>
2014c7c: c2 27 bf f4 st %g1, [ %fp + -12 ]
2014c80: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
2014c84: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
2014c88: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED
2014c8c: 93 28 80 03 sll %g2, %g3, %o1 <== NOT EXECUTED
2014c90: 10 bf ff a8 b 2014b30 <fat_file_write+0x140> <== NOT EXECUTED
2014c94: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2014c98: b0 10 00 11 mov %l1, %i0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2014c9c: c2 0c 20 08 ldub [ %l0 + 8 ], %g1
2014ca0: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
2014ca4: e8 26 60 38 st %l4, [ %i1 + 0x38 ]
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2014ca8: a2 06 80 11 add %i2, %l1, %l1
2014cac: 83 34 40 01 srl %l1, %g1, %g1
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
2014cb0: a4 00 40 12 add %g1, %l2, %l2
2014cb4: e4 26 60 34 st %l2, [ %i1 + 0x34 ]
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
2014cb8: 81 c7 e0 08 ret
2014cbc: 81 e8 00 00 restore
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
2014cc0: 10 bf ff f8 b 2014ca0 <fat_file_write+0x2b0> <== NOT EXECUTED
2014cc4: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 <== NOT EXECUTED
0201ec0c <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
201ec0c: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
201ec10: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
201ec14: c0 27 bf fc clr [ %fp + -4 ]
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
201ec18: c4 07 60 0c ld [ %i5 + 0xc ], %g2
201ec1c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201ec20: 84 0e 40 02 and %i1, %g2, %g2
201ec24: 80 a0 80 01 cmp %g2, %g1
201ec28: 1a 80 00 25 bcc 201ecbc <fat_free_fat_clusters_chain+0xb0><== NEVER TAKEN
201ec2c: b8 10 00 18 mov %i0, %i4
201ec30: b6 10 00 19 mov %i1, %i3
201ec34: b4 10 20 00 clr %i2
201ec38: 10 80 00 0e b 201ec70 <fat_free_fat_clusters_chain+0x64>
201ec3c: a0 10 20 00 clr %l0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
201ec40: 7f ff ff 31 call 201e904 <fat_set_fat_cluster>
201ec44: 01 00 00 00 nop
if ( rc != RC_OK )
201ec48: 80 a2 20 00 cmp %o0, 0
201ec4c: 02 80 00 03 be 201ec58 <fat_free_fat_clusters_chain+0x4c> <== ALWAYS TAKEN
201ec50: f6 07 bf fc ld [ %fp + -4 ], %i3
201ec54: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
201ec58: c4 07 60 0c ld [ %i5 + 0xc ], %g2
201ec5c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201ec60: 84 0e c0 02 and %i3, %g2, %g2
201ec64: 80 a0 80 01 cmp %g2, %g1
201ec68: 1a 80 00 17 bcc 201ecc4 <fat_free_fat_clusters_chain+0xb8><== ALWAYS TAKEN
201ec6c: b4 06 a0 01 inc %i2
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
201ec70: 92 10 00 1b mov %i3, %o1
201ec74: 94 07 bf fc add %fp, -4, %o2
201ec78: 7f ff fe 9b call 201e6e4 <fat_get_fat_cluster>
201ec7c: 90 10 00 1c mov %i4, %o0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
201ec80: 92 10 00 1b mov %i3, %o1
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
201ec84: b0 10 00 08 mov %o0, %i0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
201ec88: 94 10 20 00 clr %o2
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
if ( rc != RC_OK )
201ec8c: 80 a6 20 00 cmp %i0, 0
201ec90: 02 bf ff ec be 201ec40 <fat_free_fat_clusters_chain+0x34> <== ALWAYS TAKEN
201ec94: 90 10 00 1c mov %i4, %o0
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
201ec98: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED
201ec9c: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201eca0: 02 80 00 03 be 201ecac <fat_free_fat_clusters_chain+0xa0> <== NOT EXECUTED
201eca4: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
201eca8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
fat_buf_release(fs_info);
201ecac: 7f ff d9 8a call 20152d4 <fat_buf_release> <== NOT EXECUTED
201ecb0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
201ecb4: 81 c7 e0 08 ret <== NOT EXECUTED
201ecb8: 81 e8 00 00 restore <== NOT EXECUTED
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
201ecbc: b4 10 20 00 clr %i2 <== NOT EXECUTED
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
201ecc0: a0 10 20 00 clr %l0 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
201ecc4: c2 07 60 40 ld [ %i5 + 0x40 ], %g1
201ecc8: 80 a0 7f ff cmp %g1, -1
201eccc: 02 80 00 04 be 201ecdc <fat_free_fat_clusters_chain+0xd0> <== ALWAYS TAKEN
201ecd0: f2 27 60 44 st %i1, [ %i5 + 0x44 ]
fs_info->vol.free_cls += freed_cls_cnt;
201ecd4: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED
201ecd8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
fat_buf_release(fs_info);
201ecdc: b0 10 00 10 mov %l0, %i0
201ece0: 7f ff d9 7d call 20152d4 <fat_buf_release>
201ece4: 90 10 00 1d mov %i5, %o0
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
201ece8: 81 c7 e0 08 ret
201ecec: 81 e8 00 00 restore
020157b8 <fat_free_unique_ino>:
void
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
20157b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
20157bc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
20157c0: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED
20157c4: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED
20157c8: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED
20157cc: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED
20157d0: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED
20157d4: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED
20157d8: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED
20157dc: 85 2b c0 02 sll %o7, %g2, %g2 <== NOT EXECUTED
20157e0: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED
20157e4: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED
}
20157e8: 81 c7 e0 08 ret <== NOT EXECUTED
20157ec: 81 e8 00 00 restore <== NOT EXECUTED
0201e6e4 <fat_get_fat_cluster>:
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
201e6e4: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
201e6e8: c0 27 bf fc clr [ %fp + -4 ]
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
201e6ec: 80 a6 60 01 cmp %i1, 1
201e6f0: 08 80 00 26 bleu 201e788 <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
201e6f4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
201e6f8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
201e6fc: 82 00 60 01 inc %g1
201e700: 80 a6 40 01 cmp %i1, %g1
201e704: 18 80 00 21 bgu 201e788 <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
201e708: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e70c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
201e710: 80 88 60 01 btst 1, %g1
201e714: 12 80 00 23 bne 201e7a0 <fat_get_fat_cluster+0xbc> <== ALWAYS TAKEN
201e718: f6 0f 60 02 ldub [ %i5 + 2 ], %i3
201e71c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
201e720: 02 80 00 30 be 201e7e0 <fat_get_fat_cluster+0xfc> <== NOT EXECUTED
201e724: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
201e728: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED
201e72c: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED
201e730: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201e734: e0 17 40 00 lduh [ %i5 ], %l0 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201e738: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e73c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201e740: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201e744: 7f ff da 5d call 20150b8 <fat_buf_access> <== NOT EXECUTED
201e748: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc != RC_OK)
201e74c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201e750: 12 80 00 5a bne 201e8b8 <fat_get_fat_cluster+0x1d4> <== NOT EXECUTED
201e754: 01 00 00 00 nop <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
201e758: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201e75c: a1 2c 20 10 sll %l0, 0x10, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
201e760: 80 a0 60 02 cmp %g1, 2
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201e764: a1 34 20 10 srl %l0, 0x10, %l0
201e768: a0 04 3f ff add %l0, -1, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
201e76c: 02 80 00 21 be 201e7f0 <fat_get_fat_cluster+0x10c> <== NEVER TAKEN
201e770: b8 0f 00 10 and %i4, %l0, %i4
201e774: 80 a0 60 04 cmp %g1, 4
201e778: 02 80 00 3e be 201e870 <fat_get_fat_cluster+0x18c> <== NEVER TAKEN
201e77c: 80 a0 60 01 cmp %g1, 1
201e780: 02 80 00 29 be 201e824 <fat_get_fat_cluster+0x140> <== ALWAYS TAKEN
201e784: c2 07 bf fc ld [ %fp + -4 ], %g1
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
201e788: 40 00 08 6c call 2020938 <__errno> <== NOT EXECUTED
201e78c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201e790: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201e794: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201e798: 81 c7 e0 08 ret <== NOT EXECUTED
201e79c: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e7a0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
201e7a4: b9 36 60 01 srl %i1, 1, %i4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201e7a8: e0 17 40 00 lduh [ %i5 ], %l0
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e7ac: b8 07 00 19 add %i4, %i1, %i4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201e7b0: 90 10 00 1d mov %i5, %o0
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e7b4: b7 37 00 1b srl %i4, %i3, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201e7b8: 94 10 20 01 mov 1, %o2
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e7bc: b6 06 c0 01 add %i3, %g1, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201e7c0: 96 07 bf fc add %fp, -4, %o3
201e7c4: 7f ff da 3d call 20150b8 <fat_buf_access>
201e7c8: 92 10 00 1b mov %i3, %o1
if (rc != RC_OK)
201e7cc: b0 92 20 00 orcc %o0, 0, %i0
201e7d0: 22 bf ff e3 be,a 201e75c <fat_get_fat_cluster+0x78> <== ALWAYS TAKEN
201e7d4: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
201e7d8: 81 c7 e0 08 ret <== NOT EXECUTED
201e7dc: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e7e0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED
201e7e4: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED
201e7e8: 10 bf ff d3 b 201e734 <fat_get_fat_cluster+0x50> <== NOT EXECUTED
201e7ec: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
201e7f0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
201e7f4: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
201e7f8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
201e7fc: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
201e800: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
201e804: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201e808: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
201e80c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED
201e810: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED
201e814: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
201e818: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
break;
201e81c: 81 c7 e0 08 ret <== NOT EXECUTED
201e820: 81 e8 00 00 restore <== NOT EXECUTED
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
201e824: c6 17 40 00 lduh [ %i5 ], %g3
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
201e828: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
if ( ofs == (fs_info->vol.bps - 1) )
201e82c: 86 00 ff ff add %g3, -1, %g3
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
201e830: c2 08 80 1c ldub [ %g2 + %i4 ], %g1
if ( ofs == (fs_info->vol.bps - 1) )
201e834: 80 a0 c0 1c cmp %g3, %i4
201e838: 02 80 00 22 be 201e8c0 <fat_get_fat_cluster+0x1dc> <== NEVER TAKEN
201e83c: c2 26 80 00 st %g1, [ %i2 ]
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
201e840: b8 00 80 1c add %g2, %i4, %i4
201e844: c4 0f 20 01 ldub [ %i4 + 1 ], %g2
201e848: 85 28 a0 08 sll %g2, 8, %g2
201e84c: 82 10 80 01 or %g2, %g1, %g1
201e850: c2 26 80 00 st %g1, [ %i2 ]
}
if ( FAT_CLUSTER_IS_ODD(cln) )
201e854: 80 8e 60 01 btst 1, %i1
201e858: 22 80 00 17 be,a 201e8b4 <fat_get_fat_cluster+0x1d0>
201e85c: 82 08 6f ff and %g1, 0xfff, %g1
*ret_val = (*ret_val) >> FAT12_SHIFT;
201e860: 83 30 60 04 srl %g1, 4, %g1
201e864: c2 26 80 00 st %g1, [ %i2 ]
201e868: 81 c7 e0 08 ret
201e86c: 81 e8 00 00 restore
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
201e870: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201e874: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e878: c2 00 40 1c ld [ %g1 + %i4 ], %g1 <== NOT EXECUTED
201e87c: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201e880: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201e884: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201e888: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201e88c: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201e890: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201e894: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201e898: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201e89c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
201e8a0: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201e8a4: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
*ret_val = CF_LE_L(*ret_val);
201e8a8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
break;
201e8ac: 81 c7 e0 08 ret <== NOT EXECUTED
201e8b0: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
201e8b4: c2 26 80 00 st %g1, [ %i2 ]
201e8b8: 81 c7 e0 08 ret
201e8bc: 81 e8 00 00 restore
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
201e8c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e8c4: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED
201e8c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201e8cc: 7f ff d9 fb call 20150b8 <fat_buf_access> <== NOT EXECUTED
201e8d0: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
201e8d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e8d8: 12 80 00 09 bne 201e8fc <fat_get_fat_cluster+0x218> <== NOT EXECUTED
201e8dc: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
201e8e0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
201e8e4: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2 <== NOT EXECUTED
201e8e8: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED
201e8ec: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
201e8f0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
201e8f4: 10 bf ff d8 b 201e854 <fat_get_fat_cluster+0x170> <== NOT EXECUTED
201e8f8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
201e8fc: 81 c7 e0 08 ret <== NOT EXECUTED
201e900: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020156b8 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
20156b8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
20156bc: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
20156c0: 39 03 ff ff sethi %hi(0xffffc00), %i4 <== NOT EXECUTED
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
20156c4: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
20156c8: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
20156cc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
20156d0: 22 80 00 20 be,a 2015750 <fat_get_unique_ino+0x98> <== NOT EXECUTED
20156d4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
20156d8: c6 07 60 70 ld [ %i5 + 0x70 ], %g3 <== NOT EXECUTED
20156dc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
20156e0: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED
20156e4: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED
20156e8: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED
20156ec: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED
20156f0: 89 39 00 0f sra %g4, %o7, %g4 <== NOT EXECUTED
20156f4: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED
20156f8: 02 80 00 1d be 201576c <fat_get_unique_ino+0xb4> <== NOT EXECUTED
20156fc: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
2015700: 10 80 00 0a b 2015728 <fat_get_unique_ino+0x70> <== NOT EXECUTED
2015704: 88 10 20 00 clr %g4 <== NOT EXECUTED
2015708: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED
201570c: da 48 c0 02 ldsb [ %g3 + %g2 ], %o5 <== NOT EXECUTED
2015710: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED
2015714: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED
2015718: 9b 3b 40 0f sra %o5, %o7, %o5 <== NOT EXECUTED
201571c: 80 8b 60 01 btst 1, %o5 <== NOT EXECUTED
2015720: 02 80 00 13 be 201576c <fat_get_unique_ino+0xb4> <== NOT EXECUTED
2015724: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
2015728: 82 00 60 01 inc %g1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
201572c: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
2015730: 0a 80 00 03 bcs 201573c <fat_get_unique_ino+0x84> <== NOT EXECUTED
2015734: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED
fs_info->index = 0;
2015738: c0 27 60 74 clr [ %i5 + 0x74 ] <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
201573c: 88 01 20 01 inc %g4 <== NOT EXECUTED
2015740: 80 a1 00 09 cmp %g4, %o1 <== NOT EXECUTED
2015744: 32 bf ff f1 bne,a 2015708 <fat_get_unique_ino+0x50> <== NOT EXECUTED
2015748: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
201574c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2015750: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED
2015754: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED
2015758: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
201575c: 0a 80 00 0c bcs 201578c <fat_get_unique_ino+0xd4> <== NOT EXECUTED
2015760: b0 10 20 00 clr %i0 <== NOT EXECUTED
2015764: 81 c7 e0 08 ret <== NOT EXECUTED
2015768: 81 e8 00 00 restore <== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
201576c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2015770: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED
2015774: 84 13 c0 02 or %o7, %g2, %g2 <== NOT EXECUTED
2015778: c4 2b 00 00 stb %g2, [ %o4 ] <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
201577c: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED
2015780: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2015784: 81 c7 e0 08 ret <== NOT EXECUTED
2015788: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
201578c: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
2015790: 7f ff c9 5e call 2007d08 <realloc> <== NOT EXECUTED
2015794: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED
if (fs_info->uino != NULL)
2015798: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201579c: 12 80 00 04 bne 20157ac <fat_get_unique_ino+0xf4> <== NOT EXECUTED
20157a0: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
20157a4: 81 c7 e0 08 ret <== NOT EXECUTED
20157a8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
if (fs_info->uino != NULL)
fs_info->index = fs_info->uino_pool_size;
20157ac: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 <== NOT EXECUTED
20157b0: 10 bf ff c7 b 20156cc <fat_get_unique_ino+0x14> <== NOT EXECUTED
20157b4: d2 27 60 74 st %o1, [ %i5 + 0x74 ] <== NOT EXECUTED
02015588 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
2015588: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
201558c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
uint32_t cur_cln = start_cln;
2015590: f2 27 bf fc st %i1, [ %fp + -4 ]
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
2015594: d0 17 20 06 lduh [ %i4 + 6 ], %o0
2015598: 92 10 20 01 mov 1, %o1
201559c: 7f ff c1 c7 call 2005cb8 <calloc>
20155a0: ba 10 00 18 mov %i0, %i5
if ( buf == NULL )
20155a4: b6 92 20 00 orcc %o0, 0, %i3
20155a8: 32 80 00 19 bne,a 201560c <fat_init_clusters_chain+0x84> <== ALWAYS TAKEN
20155ac: c4 07 20 0c ld [ %i4 + 0xc ], %g2
20155b0: 30 80 00 3c b,a 20156a0 <fat_init_clusters_chain+0x118> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20155b4: c6 08 60 05 ldub [ %g1 + 5 ], %g3
20155b8: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
20155bc: d6 08 60 04 ldub [ %g1 + 4 ], %o3
20155c0: c2 08 60 02 ldub [ %g1 + 2 ], %g1
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
20155c4: 94 10 20 00 clr %o2
20155c8: 92 06 7f fe add %i1, -2, %o1
20155cc: 97 2a c0 01 sll %o3, %g1, %o3
20155d0: 93 2a 40 03 sll %o1, %g3, %o1
20155d4: 98 10 00 1b mov %i3, %o4
20155d8: 92 02 40 02 add %o1, %g2, %o1
20155dc: 7f ff ff 69 call 2015380 <_fat_block_write>
20155e0: 90 10 00 1d mov %i5, %o0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20155e4: 94 07 bf fc add %fp, -4, %o2
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
20155e8: 80 a2 3f ff cmp %o0, -1
20155ec: 02 80 00 1f be 2015668 <fat_init_clusters_chain+0xe0> <== NEVER TAKEN
20155f0: 90 10 00 1d mov %i5, %o0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20155f4: 40 00 24 3c call 201e6e4 <fat_get_fat_cluster>
20155f8: d2 07 bf fc ld [ %fp + -4 ], %o1
if ( rc != RC_OK )
20155fc: b0 92 20 00 orcc %o0, 0, %i0
2015600: 12 80 00 1f bne 201567c <fat_init_clusters_chain+0xf4> <== NEVER TAKEN
2015604: f2 07 bf fc ld [ %fp + -4 ], %i1
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2015608: c4 07 20 0c ld [ %i4 + 0xc ], %g2
201560c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
2015610: 84 0e 40 02 and %i1, %g2, %g2
2015614: 80 a0 80 01 cmp %g2, %g1
2015618: 1a 80 00 1d bcc 201568c <fat_init_clusters_chain+0x104>
201561c: 80 a6 60 00 cmp %i1, 0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2015620: 12 bf ff e5 bne 20155b4 <fat_init_clusters_chain+0x2c> <== ALWAYS TAKEN
2015624: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2015628: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
201562c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2015630: 22 bf ff e2 be,a 20155b8 <fat_init_clusters_chain+0x30> <== NOT EXECUTED
2015634: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2015638: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
201563c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
2015640: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
2015644: 94 10 20 00 clr %o2 <== NOT EXECUTED
2015648: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
201564c: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
2015650: 7f ff ff 4c call 2015380 <_fat_block_write> <== NOT EXECUTED
2015654: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2015658: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
201565c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2015660: 12 bf ff e5 bne 20155f4 <fat_init_clusters_chain+0x6c> <== NOT EXECUTED
2015664: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
free(buf);
2015668: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201566c: 7f ff c3 bb call 2006558 <free> <== NOT EXECUTED
2015670: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
2015674: 81 c7 e0 08 ret <== NOT EXECUTED
2015678: 81 e8 00 00 restore <== NOT EXECUTED
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
{
free(buf);
201567c: 7f ff c3 b7 call 2006558 <free> <== NOT EXECUTED
2015680: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
return rc;
2015684: 81 c7 e0 08 ret <== NOT EXECUTED
2015688: 81 e8 00 00 restore <== NOT EXECUTED
}
}
free(buf);
return rc;
201568c: b0 10 20 00 clr %i0
free(buf);
return rc;
}
}
free(buf);
2015690: 7f ff c3 b2 call 2006558 <free>
2015694: 90 10 00 1b mov %i3, %o0
return rc;
}
2015698: 81 c7 e0 08 ret
201569c: 81 e8 00 00 restore
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
20156a0: 40 00 2c a6 call 2020938 <__errno> <== NOT EXECUTED
20156a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20156a8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20156ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20156b0: 81 c7 e0 08 ret <== NOT EXECUTED
20156b4: 81 e8 00 00 restore <== NOT EXECUTED
020159f8 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
20159f8: 9d e3 bf 10 save %sp, -240, %sp
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
20159fc: d0 06 20 70 ld [ %i0 + 0x70 ], %o0
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2015a00: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2015a04: b8 10 00 18 mov %i0, %i4
char boot_rec[FAT_MAX_BPB_SIZE];
char fs_info_sector[FAT_USEFUL_INFO_SIZE];
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
2015a08: c0 27 bf f8 clr [ %fp + -8 ]
rc = stat(mt_entry->dev, &stat_buf);
2015a0c: 7f ff c9 78 call 2007fec <stat>
2015a10: 92 07 bf a0 add %fp, -96, %o1
if (rc == -1)
2015a14: 80 a2 3f ff cmp %o0, -1
2015a18: 02 80 01 12 be 2015e60 <fat_init_volume_info+0x468> <== NEVER TAKEN
2015a1c: b0 10 00 08 mov %o0, %i0
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
2015a20: c4 07 bf ac ld [ %fp + -84 ], %g2
2015a24: 03 00 00 3c sethi %hi(0xf000), %g1
2015a28: 84 08 80 01 and %g2, %g1, %g2
2015a2c: 03 00 00 18 sethi %hi(0x6000), %g1
2015a30: 80 a0 80 01 cmp %g2, %g1
2015a34: 12 80 01 e6 bne 20161cc <fat_init_volume_info+0x7d4> <== NEVER TAKEN
2015a38: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
2015a3c: 7f ff bd 59 call 2004fa0 <rtems_disk_obtain>
2015a40: d0 1f bf b8 ldd [ %fp + -72 ], %o0
if (vol->dd == NULL)
2015a44: 80 a2 20 00 cmp %o0, 0
2015a48: 02 80 01 ff be 2016244 <fat_init_volume_info+0x84c> <== NEVER TAKEN
2015a4c: d0 27 60 60 st %o0, [ %i5 + 0x60 ]
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
2015a50: d0 1f bf b8 ldd [ %fp + -72 ], %o0
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
2015a54: 94 10 20 00 clr %o2
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
2015a58: d0 3f 60 58 std %o0, [ %i5 + 0x58 ]
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
2015a5c: 7f ff f5 7d call 2013050 <rtems_bdbuf_read>
2015a60: 96 07 bf f8 add %fp, -8, %o3
if (sc != RTEMS_SUCCESSFUL)
2015a64: 80 a2 20 00 cmp %o0, 0
2015a68: 12 80 01 ee bne 2016220 <fat_init_volume_info+0x828> <== NEVER TAKEN
2015a6c: d0 07 bf f8 ld [ %fp + -8 ], %o0
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
2015a70: c2 02 20 24 ld [ %o0 + 0x24 ], %g1
2015a74: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
2015a78: c6 08 60 0c ldub [ %g1 + 0xc ], %g3
2015a7c: c4 2f bf 9b stb %g2, [ %fp + -101 ]
2015a80: c4 08 60 11 ldub [ %g1 + 0x11 ], %g2
2015a84: c6 2f bf 9c stb %g3, [ %fp + -100 ]
2015a88: c6 08 60 12 ldub [ %g1 + 0x12 ], %g3
2015a8c: c4 2f bf 99 stb %g2, [ %fp + -103 ]
2015a90: c4 08 60 23 ldub [ %g1 + 0x23 ], %g2
2015a94: c6 2f bf 98 stb %g3, [ %fp + -104 ]
2015a98: c6 08 60 26 ldub [ %g1 + 0x26 ], %g3
2015a9c: c4 2f bf 8f stb %g2, [ %fp + -113 ]
2015aa0: c4 08 60 28 ldub [ %g1 + 0x28 ], %g2
2015aa4: f2 08 60 0e ldub [ %g1 + 0xe ], %i1
2015aa8: c6 2f bf 97 stb %g3, [ %fp + -105 ]
2015aac: c6 08 60 2c ldub [ %g1 + 0x2c ], %g3
2015ab0: c4 2f bf 87 stb %g2, [ %fp + -121 ]
2015ab4: c4 08 60 2d ldub [ %g1 + 0x2d ], %g2
2015ab8: f2 2f bf 9a stb %i1, [ %fp + -102 ]
2015abc: c6 2f bf 94 stb %g3, [ %fp + -108 ]
2015ac0: c8 08 60 0f ldub [ %g1 + 0xf ], %g4
2015ac4: f6 08 60 0d ldub [ %g1 + 0xd ], %i3
2015ac8: f4 08 60 10 ldub [ %g1 + 0x10 ], %i2
2015acc: f2 08 60 13 ldub [ %g1 + 0x13 ], %i1
2015ad0: f0 08 60 14 ldub [ %g1 + 0x14 ], %i0
2015ad4: e0 08 60 16 ldub [ %g1 + 0x16 ], %l0
2015ad8: e2 08 60 17 ldub [ %g1 + 0x17 ], %l1
2015adc: ea 08 60 20 ldub [ %g1 + 0x20 ], %l5
2015ae0: ec 08 60 21 ldub [ %g1 + 0x21 ], %l6
2015ae4: ee 08 60 22 ldub [ %g1 + 0x22 ], %l7
2015ae8: e6 08 60 24 ldub [ %g1 + 0x24 ], %l3
2015aec: e8 08 60 25 ldub [ %g1 + 0x25 ], %l4
2015af0: e4 08 60 27 ldub [ %g1 + 0x27 ], %l2
2015af4: c4 2f bf 93 stb %g2, [ %fp + -109 ]
2015af8: c6 08 60 2e ldub [ %g1 + 0x2e ], %g3
2015afc: c4 08 60 2f ldub [ %g1 + 0x2f ], %g2
2015b00: c6 2f bf 92 stb %g3, [ %fp + -110 ]
2015b04: c6 08 60 30 ldub [ %g1 + 0x30 ], %g3
2015b08: c2 08 60 31 ldub [ %g1 + 0x31 ], %g1
2015b0c: c4 2f bf 7f stb %g2, [ %fp + -129 ]
sc = rtems_bdbuf_release( block);
2015b10: c8 27 bf 70 st %g4, [ %fp + -144 ]
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
2015b14: c6 2f bf 96 stb %g3, [ %fp + -106 ]
sc = rtems_bdbuf_release( block);
2015b18: 7f ff f6 16 call 2013370 <rtems_bdbuf_release>
2015b1c: c2 2f bf 95 stb %g1, [ %fp + -107 ]
if (sc != RTEMS_SUCCESSFUL)
2015b20: 80 a2 20 00 cmp %o0, 0
2015b24: 12 80 01 bf bne 2016220 <fat_init_volume_info+0x828> <== NEVER TAKEN
2015b28: c8 07 bf 70 ld [ %fp + -144 ], %g4
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
2015b2c: c2 0f bf 9c ldub [ %fp + -100 ], %g1
2015b30: c4 0f bf 9b ldub [ %fp + -101 ], %g2
2015b34: 83 28 60 08 sll %g1, 8, %g1
2015b38: 92 10 40 02 or %g1, %g2, %o1
2015b3c: d2 37 40 00 sth %o1, [ %i5 ]
if ( (vol->bps != 512) &&
2015b40: 93 2a 60 10 sll %o1, 0x10, %o1
2015b44: 83 32 60 10 srl %o1, 0x10, %g1
2015b48: 80 a0 64 00 cmp %g1, 0x400
2015b4c: 12 80 00 c7 bne 2015e68 <fat_init_volume_info+0x470> <== ALWAYS TAKEN
2015b50: 80 a0 62 00 cmp %g1, 0x200
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2015b54: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
2015b58: 80 88 60 01 btst 1, %g1
2015b5c: 12 80 00 0a bne 2015b84 <fat_init_volume_info+0x18c> <== ALWAYS TAKEN
2015b60: c0 2f 60 03 clrb [ %i5 + 3 ]
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2015b64: 10 80 00 03 b 2015b70 <fat_init_volume_info+0x178> <== NOT EXECUTED
2015b68: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2015b6c: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
2015b70: 83 38 60 01 sra %g1, 1, %g1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2015b74: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2015b78: 02 bf ff fd be 2015b6c <fat_init_volume_info+0x174> <== NOT EXECUTED
2015b7c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED
2015b80: c4 2f 60 03 stb %g2, [ %i5 + 3 ] <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
2015b84: c0 2f 60 02 clrb [ %i5 + 2 ]
2015b88: 93 32 60 10 srl %o1, 0x10, %o1
2015b8c: 84 10 20 01 mov 1, %g2
2015b90: 80 8a 60 01 btst 1, %o1
2015b94: 02 80 00 05 be 2015ba8 <fat_init_volume_info+0x1b0> <== ALWAYS TAKEN
2015b98: 82 10 00 09 mov %o1, %g1
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
2015b9c: 10 80 00 09 b 2015bc0 <fat_init_volume_info+0x1c8> <== NOT EXECUTED
2015ba0: f6 2f 60 04 stb %i3, [ %i5 + 4 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
2015ba4: 84 10 00 03 mov %g3, %g2
i >>= 1, vol->sec_log2++);
2015ba8: 83 38 60 01 sra %g1, 1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
2015bac: 80 88 60 01 btst 1, %g1
2015bb0: 02 bf ff fd be 2015ba4 <fat_init_volume_info+0x1ac>
2015bb4: 86 00 a0 01 add %g2, 1, %g3
2015bb8: c4 2f 60 02 stb %g2, [ %i5 + 2 ]
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
2015bbc: f6 2f 60 04 stb %i3, [ %i5 + 4 ]
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
2015bc0: b6 8e e0 ff andcc %i3, 0xff, %i3
2015bc4: 02 80 01 77 be 20161a0 <fat_init_volume_info+0x7a8> <== NEVER TAKEN
2015bc8: 82 10 00 1b mov %i3, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
2015bcc: c0 2f 60 05 clrb [ %i5 + 5 ]
2015bd0: 80 8e e0 01 btst 1, %i3
2015bd4: 12 80 00 0b bne 2015c00 <fat_init_volume_info+0x208> <== NEVER TAKEN
2015bd8: 84 10 20 00 clr %g2
2015bdc: 10 80 00 03 b 2015be8 <fat_init_volume_info+0x1f0>
2015be0: 84 10 20 01 mov 1, %g2
2015be4: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
2015be8: 83 38 60 01 sra %g1, 1, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
2015bec: 80 88 60 01 btst 1, %g1
2015bf0: 02 bf ff fd be 2015be4 <fat_init_volume_info+0x1ec> <== NEVER TAKEN
2015bf4: 86 00 a0 01 add %g2, 1, %g3
2015bf8: c4 2f 60 05 stb %g2, [ %i5 + 5 ]
2015bfc: 84 08 a0 ff and %g2, 0xff, %g2
i >>= 1, vol->spc_log2++);
/*
* "bytes per cluster" value greater than 32K is invalid
*/
if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT)
2015c00: 85 2a 40 02 sll %o1, %g2, %g2
2015c04: c4 37 60 06 sth %g2, [ %i5 + 6 ]
2015c08: 83 28 a0 10 sll %g2, 0x10, %g1
2015c0c: 05 00 00 20 sethi %hi(0x8000), %g2
2015c10: 83 30 60 10 srl %g1, 0x10, %g1
2015c14: 80 a0 40 02 cmp %g1, %g2
2015c18: 18 80 01 62 bgu 20161a0 <fat_init_volume_info+0x7a8> <== NEVER TAKEN
2015c1c: 80 88 60 01 btst 1, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
2015c20: c0 2f 60 08 clrb [ %i5 + 8 ]
2015c24: 02 80 00 05 be 2015c38 <fat_init_volume_info+0x240> <== ALWAYS TAKEN
2015c28: 84 10 20 01 mov 1, %g2
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
2015c2c: 10 80 00 09 b 2015c50 <fat_init_volume_info+0x258> <== NOT EXECUTED
2015c30: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
2015c34: 84 10 00 03 mov %g3, %g2
i >>= 1, vol->bpc_log2++);
2015c38: 83 38 60 01 sra %g1, 1, %g1
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
2015c3c: 80 88 60 01 btst 1, %g1
2015c40: 02 bf ff fd be 2015c34 <fat_init_volume_info+0x23c>
2015c44: 86 00 a0 01 add %g2, 1, %g3
2015c48: c4 2f 60 08 stb %g2, [ %i5 + 8 ]
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
2015c4c: c6 0f bf 9a ldub [ %fp + -102 ], %g3
2015c50: 88 09 20 ff and %g4, 0xff, %g4
2015c54: 89 29 20 08 sll %g4, 8, %g4
2015c58: 86 11 00 03 or %g4, %g3, %g3
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2015c5c: c4 0f bf 98 ldub [ %fp + -104 ], %g2
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
2015c60: c6 27 bf 9c st %g3, [ %fp + -100 ]
2015c64: c6 37 60 14 sth %g3, [ %i5 + 0x14 ]
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2015c68: c6 0f bf 99 ldub [ %fp + -103 ], %g3
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2015c6c: 82 02 7f ff add %o1, -1, %g1
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2015c70: 85 28 a0 08 sll %g2, 8, %g2
2015c74: 84 10 80 03 or %g2, %g3, %g2
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2015c78: 87 28 a0 10 sll %g2, 0x10, %g3
2015c7c: 87 30 e0 0b srl %g3, 0xb, %g3
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2015c80: c4 37 60 20 sth %g2, [ %i5 + 0x20 ]
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2015c84: 90 00 c0 01 add %g3, %g1, %o0
2015c88: 40 00 5e c9 call 202d7ac <.div>
2015c8c: f4 2f 60 09 stb %i2, [ %i5 + 9 ]
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
2015c90: c4 0f 60 02 ldub [ %i5 + 2 ], %g2
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2015c94: d0 27 60 24 st %o0, [ %i5 + 0x24 ]
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
2015c98: 85 2a 00 02 sll %o0, %g2, %g2
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2015c9c: 82 10 00 08 mov %o0, %g1
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
2015ca0: a2 0c 60 ff and %l1, 0xff, %l1
2015ca4: a0 0c 20 ff and %l0, 0xff, %l0
2015ca8: 91 2c 60 08 sll %l1, 8, %o0
2015cac: 90 12 00 10 or %o0, %l0, %o0
2015cb0: 91 2a 20 10 sll %o0, 0x10, %o0
2015cb4: 80 a2 20 00 cmp %o0, 0
2015cb8: 02 80 01 22 be 2016140 <fat_init_volume_info+0x748> <== NEVER TAKEN
2015cbc: c4 27 60 28 st %g2, [ %i5 + 0x28 ]
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
2015cc0: 91 32 20 10 srl %o0, 0x10, %o0
2015cc4: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
2015cc8: c2 27 bf 74 st %g1, [ %fp + -140 ]
2015ccc: 40 00 5e 7c call 202d6bc <.umul>
2015cd0: 92 0e a0 ff and %i2, 0xff, %o1
2015cd4: c2 07 bf 74 ld [ %fp + -140 ], %g1
2015cd8: c6 07 bf 9c ld [ %fp + -100 ], %g3
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
2015cdc: b2 0e 60 ff and %i1, 0xff, %i1
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
2015ce0: 85 28 e0 10 sll %g3, 0x10, %g2
2015ce4: 85 30 a0 10 srl %g2, 0x10, %g2
2015ce8: 84 02 00 02 add %o0, %g2, %g2
2015cec: 82 00 80 01 add %g2, %g1, %g1
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
2015cf0: c4 27 60 1c st %g2, [ %i5 + 0x1c ]
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
2015cf4: 90 0e 20 ff and %i0, 0xff, %o0
2015cf8: 91 2a 20 08 sll %o0, 8, %o0
2015cfc: 90 12 00 19 or %o0, %i1, %o0
2015d00: 91 2a 20 10 sll %o0, 0x10, %o0
2015d04: 80 a2 20 00 cmp %o0, 0
2015d08: 02 80 00 63 be 2015e94 <fat_init_volume_info+0x49c> <== NEVER TAKEN
2015d0c: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
2015d10: 91 32 20 10 srl %o0, 0x10, %o0
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
2015d14: 92 10 00 1b mov %i3, %o1
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
2015d18: d0 27 60 2c st %o0, [ %i5 + 0x2c ]
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
2015d1c: 40 00 5e a2 call 202d7a4 <.udiv>
2015d20: 90 22 00 01 sub %o0, %g1, %o0
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
2015d24: 80 a2 2f f4 cmp %o0, 0xff4
2015d28: 18 80 00 6c bgu 2015ed8 <fat_init_volume_info+0x4e0> <== NEVER TAKEN
2015d2c: d0 27 60 34 st %o0, [ %i5 + 0x34 ]
{
vol->type = FAT_FAT12;
2015d30: 82 10 20 01 mov 1, %g1
2015d34: c2 2f 60 0a stb %g1, [ %i5 + 0xa ]
vol->mask = FAT_FAT12_MASK;
2015d38: 82 10 2f ff mov 0xfff, %g1
2015d3c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
vol->eoc_val = FAT_FAT12_EOC;
2015d40: 82 10 2f f8 mov 0xff8, %g1
2015d44: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
2015d48: 82 10 3f ff mov -1, %g1
}
}
}
else
{
vol->rdir_cl = 0;
2015d4c: c0 27 60 38 clr [ %i5 + 0x38 ]
vol->mirror = 0;
2015d50: c0 2f 60 48 clrb [ %i5 + 0x48 ]
vol->afat = 0;
2015d54: c0 2f 60 50 clrb [ %i5 + 0x50 ]
vol->free_cls = 0xFFFFFFFF;
2015d58: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
vol->next_cl = 0xFFFFFFFF;
2015d5c: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
*/
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
2015d60: d0 07 20 34 ld [ %i4 + 0x34 ], %o0
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2015d64: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1
2015d68: 80 a0 60 00 cmp %g1, 0
2015d6c: 22 80 00 05 be,a 2015d80 <fat_init_volume_info+0x388> <== ALWAYS TAKEN
2015d70: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
2015d74: 7f ff fc 7a call 2014f5c <fat_buf_release.part.1> <== NOT EXECUTED
2015d78: 01 00 00 00 nop <== NOT EXECUTED
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
2015d7c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 <== NOT EXECUTED
2015d80: 40 00 5e 4f call 202d6bc <.umul>
2015d84: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0
2015d88: c2 17 60 14 lduh [ %i5 + 0x14 ], %g1
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
2015d8c: 92 10 20 0c mov 0xc, %o1
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
2015d90: 82 02 00 01 add %o0, %g1, %g1
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
2015d94: 90 10 20 02 mov 2, %o0
2015d98: 7f ff bf c8 call 2005cb8 <calloc>
2015d9c: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
if ( fs_info->vhash == NULL )
2015da0: 80 a2 20 00 cmp %o0, 0
2015da4: 02 80 01 47 be 20162c0 <fat_init_volume_info+0x8c8> <== NEVER TAKEN
2015da8: d0 27 60 68 st %o0, [ %i5 + 0x68 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2015dac: 86 02 20 04 add %o0, 4, %g3
2015db0: 82 02 20 0c add %o0, 0xc, %g1
2015db4: 84 02 20 10 add %o0, 0x10, %g2
head->next = tail;
2015db8: c6 22 00 00 st %g3, [ %o0 ]
head->previous = NULL;
2015dbc: c0 22 20 04 clr [ %o0 + 4 ]
tail->previous = head;
2015dc0: d0 22 20 08 st %o0, [ %o0 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2015dc4: c4 22 20 0c st %g2, [ %o0 + 0xc ]
head->previous = NULL;
2015dc8: c0 22 20 10 clr [ %o0 + 0x10 ]
tail->previous = head;
2015dcc: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
2015dd0: 92 10 20 0c mov 0xc, %o1
2015dd4: 7f ff bf b9 call 2005cb8 <calloc>
2015dd8: 90 10 20 02 mov 2, %o0
if ( fs_info->rhash == NULL )
2015ddc: 80 a2 20 00 cmp %o0, 0
2015de0: 02 80 01 41 be 20162e4 <fat_init_volume_info+0x8ec> <== NEVER TAKEN
2015de4: d0 27 60 6c st %o0, [ %i5 + 0x6c ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2015de8: 82 02 20 0c add %o0, 0xc, %g1
2015dec: 84 02 20 04 add %o0, 4, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2015df0: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2015df4: 82 02 20 10 add %o0, 0x10, %g1
head->next = tail;
2015df8: c4 22 00 00 st %g2, [ %o0 ]
head->previous = NULL;
2015dfc: c0 22 20 04 clr [ %o0 + 4 ]
tail->previous = head;
2015e00: d0 22 20 08 st %o0, [ %o0 + 8 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
2015e04: c0 22 20 10 clr [ %o0 + 0x10 ]
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2015e08: c4 07 60 2c ld [ %i5 + 0x2c ], %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2015e0c: c2 22 20 0c st %g1, [ %o0 + 0xc ]
2015e10: c2 0f 60 03 ldub [ %i5 + 3 ], %g1
fs_info->index = 0;
2015e14: c0 27 60 74 clr [ %i5 + 0x74 ]
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2015e18: 83 28 80 01 sll %g2, %g1, %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
2015e1c: 84 10 21 00 mov 0x100, %g2
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2015e20: 83 28 60 04 sll %g1, 4, %g1
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
2015e24: c4 27 60 78 st %g2, [ %i5 + 0x78 ]
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2015e28: c2 27 60 7c st %g1, [ %i5 + 0x7c ]
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
2015e2c: 90 10 21 00 mov 0x100, %o0
2015e30: 7f ff bf a2 call 2005cb8 <calloc>
2015e34: 92 10 20 01 mov 1, %o1
if ( fs_info->uino == NULL )
2015e38: 80 a2 20 00 cmp %o0, 0
2015e3c: 02 80 01 08 be 201625c <fat_init_volume_info+0x864> <== NEVER TAKEN
2015e40: d0 27 60 70 st %o0, [ %i5 + 0x70 ]
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
2015e44: d0 17 40 00 lduh [ %i5 ], %o0
2015e48: 7f ff bf 9c call 2005cb8 <calloc>
2015e4c: 92 10 20 01 mov 1, %o1
2015e50: d0 27 60 8c st %o0, [ %i5 + 0x8c ]
if (fs_info->sec_buf == NULL)
2015e54: 80 a2 20 00 cmp %o0, 0
2015e58: 02 80 00 e3 be 20161e4 <fat_init_volume_info+0x7ec> <== NEVER TAKEN
2015e5c: b0 10 20 00 clr %i0
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
2015e60: 81 c7 e0 08 ret
2015e64: 81 e8 00 00 restore
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
if ( (vol->bps != 512) &&
2015e68: 22 bf ff 3c be,a 2015b58 <fat_init_volume_info+0x160> <== ALWAYS TAKEN
2015e6c: 83 32 60 19 srl %o1, 0x19, %g1
(vol->bps != 1024) &&
2015e70: 80 a0 68 00 cmp %g1, 0x800 <== NOT EXECUTED
2015e74: 22 bf ff 3c be,a 2015b64 <fat_init_volume_info+0x16c> <== NOT EXECUTED
2015e78: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
(vol->bps != 2048) &&
2015e7c: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED
2015e80: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2015e84: 12 80 00 c7 bne 20161a0 <fat_init_volume_info+0x7a8> <== NOT EXECUTED
2015e88: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
2015e8c: 10 bf ff 39 b 2015b70 <fat_init_volume_info+0x178> <== NOT EXECUTED
2015e90: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
2015e94: f2 0f bf 8f ldub [ %fp + -113 ], %i1 <== NOT EXECUTED
2015e98: 90 0d a0 ff and %l6, 0xff, %o0 <== NOT EXECUTED
2015e9c: 85 2e 60 18 sll %i1, 0x18, %g2 <== NOT EXECUTED
2015ea0: ae 0d e0 ff and %l7, 0xff, %l7 <== NOT EXECUTED
2015ea4: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED
2015ea8: af 2d e0 10 sll %l7, 0x10, %l7 <== NOT EXECUTED
2015eac: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED
2015eb0: 90 12 00 17 or %o0, %l7, %o0 <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
2015eb4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
2015eb8: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED
2015ebc: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
2015ec0: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
2015ec4: 40 00 5e 38 call 202d7a4 <.udiv> <== NOT EXECUTED
2015ec8: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
2015ecc: 80 a2 2f f4 cmp %o0, 0xff4 <== NOT EXECUTED
2015ed0: 08 bf ff 98 bleu 2015d30 <fat_init_volume_info+0x338> <== NOT EXECUTED
2015ed4: d0 27 60 34 st %o0, [ %i5 + 0x34 ] <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
2015ed8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED
2015edc: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <PROM_START+0xfff4> <== NOT EXECUTED
2015ee0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED
2015ee4: 08 80 00 a2 bleu 201616c <fat_init_volume_info+0x774> <== NOT EXECUTED
2015ee8: 84 10 63 ff or %g1, 0x3ff, %g2 <== NOT EXECUTED
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
2015eec: c6 0f bf 87 ldub [ %fp + -121 ], %g3 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015ef0: f6 0f bf 93 ldub [ %fp + -109 ], %i3 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
2015ef4: 82 08 ff 80 and %g3, -128, %g1 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015ef8: f4 0f bf 94 ldub [ %fp + -108 ], %i2 <== NOT EXECUTED
2015efc: c6 0f bf 92 ldub [ %fp + -110 ], %g3 <== NOT EXECUTED
2015f00: f2 0f bf 7f ldub [ %fp + -129 ], %i1 <== NOT EXECUTED
2015f04: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
2015f08: 05 03 ff ff sethi %hi(0xffffc00), %g2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015f0c: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
2015f10: 88 10 a3 ff or %g2, 0x3ff, %g4 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015f14: 86 16 c0 03 or %i3, %g3, %g3 <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
vol->eoc_val = FAT_FAT32_EOC;
2015f18: 84 10 a3 f8 or %g2, 0x3f8, %g2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015f1c: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED
2015f20: b7 2e 60 18 sll %i1, 0x18, %i3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
2015f24: b4 10 20 04 mov 4, %i2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015f28: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
2015f2c: f4 2f 60 0a stb %i2, [ %i5 + 0xa ] <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
2015f30: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
2015f34: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2015f38: c6 27 60 38 st %g3, [ %i5 + 0x38 ] <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
2015f3c: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED
2015f40: 02 80 00 a1 be 20161c4 <fat_init_volume_info+0x7cc> <== NOT EXECUTED
2015f44: c2 2f 60 48 stb %g1, [ %i5 + 0x48 ] <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
2015f48: c4 0f bf 87 ldub [ %fp + -121 ], %g2 <== NOT EXECUTED
2015f4c: 82 08 a0 0f and %g2, 0xf, %g1 <== NOT EXECUTED
2015f50: c2 2f 60 50 stb %g1, [ %i5 + 0x50 ] <== NOT EXECUTED
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
2015f54: c2 0f bf 95 ldub [ %fp + -107 ], %g1 <== NOT EXECUTED
2015f58: c4 0f bf 96 ldub [ %fp + -106 ], %g2 <== NOT EXECUTED
2015f5c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2015f60: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
if( vol->info_sec == 0 )
2015f64: b3 28 60 10 sll %g1, 0x10, %i1 <== NOT EXECUTED
2015f68: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED
2015f6c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2015f70: 02 80 00 8c be 20161a0 <fat_init_volume_info+0x7a8> <== NOT EXECUTED
2015f74: c2 37 60 3c sth %g1, [ %i5 + 0x3c ] <== NOT EXECUTED
uint32_t count,
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2015f78: f0 07 20 34 ld [ %i4 + 0x34 ], %i0 <== NOT EXECUTED
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
2015f7c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
2015f80: b4 10 20 00 clr %i2 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
2015f84: b6 10 20 04 mov 4, %i3 <== NOT EXECUTED
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2015f88: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2015f8c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2015f90: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
2015f94: 7f ff fc 49 call 20150b8 <fat_buf_access> <== NOT EXECUTED
2015f98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2015f9c: 86 07 bf e8 add %fp, -24, %g3 <== NOT EXECUTED
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
2015fa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2015fa4: 12 80 00 c2 bne 20162ac <fat_init_volume_info+0x8b4> <== NOT EXECUTED
2015fa8: 90 00 c0 1a add %g3, %i2, %o0 <== NOT EXECUTED
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2015fac: c2 16 00 00 lduh [ %i0 ], %g1 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2015fb0: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2015fb4: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED
2015fb8: 08 80 00 03 bleu 2015fc4 <fat_init_volume_info+0x5cc> <== NOT EXECUTED
2015fbc: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED
2015fc0: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2015fc4: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1 <== NOT EXECUTED
2015fc8: 40 00 2d 2b call 2021474 <memcpy> <== NOT EXECUTED
2015fcc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
count -= c;
cmpltd += c;
2015fd0: b4 06 80 10 add %i2, %l0, %i2 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2015fd4: b6 a6 c0 10 subcc %i3, %l0, %i3 <== NOT EXECUTED
2015fd8: 12 bf ff ec bne 2015f88 <fat_init_volume_info+0x590> <== NOT EXECUTED
2015fdc: b2 06 60 01 inc %i1 <== NOT EXECUTED
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
2015fe0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2015fe4: 06 80 00 b2 bl 20162ac <fat_init_volume_info+0x8b4> <== NOT EXECUTED
2015fe8: c2 0f bf eb ldub [ %fp + -21 ], %g1 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
2015fec: c4 0f bf e9 ldub [ %fp + -23 ], %g2 <== NOT EXECUTED
2015ff0: c8 0f bf ea ldub [ %fp + -22 ], %g4 <== NOT EXECUTED
2015ff4: c6 0f bf e8 ldub [ %fp + -24 ], %g3 <== NOT EXECUTED
2015ff8: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED
2015ffc: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2016000: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
2016004: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED
2016008: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
201600c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
2016010: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED
2016014: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <RAM_END+0x3f215252><== NOT EXECUTED
2016018: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201601c: 12 80 00 5a bne 2016184 <fat_init_volume_info+0x78c> <== NOT EXECUTED
2016020: b4 10 20 00 clr %i2 <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
2016024: f2 17 60 3c lduh [ %i5 + 0x3c ], %i1 <== NOT EXECUTED
uint32_t count,
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2016028: e0 07 20 34 ld [ %i4 + 0x34 ], %l0 <== NOT EXECUTED
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
201602c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2016030: b6 10 20 0c mov 0xc, %i3 <== NOT EXECUTED
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
2016034: 10 80 00 03 b 2016040 <fat_init_volume_info+0x648> <== NOT EXECUTED
2016038: b0 10 21 e4 mov 0x1e4, %i0 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
ofs = 0;
201603c: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2016040: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2016044: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2016048: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
201604c: 7f ff fc 1b call 20150b8 <fat_buf_access> <== NOT EXECUTED
2016050: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2016054: 82 07 bf e8 add %fp, -24, %g1 <== NOT EXECUTED
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
2016058: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201605c: 12 80 00 8d bne 2016290 <fat_init_volume_info+0x898> <== NOT EXECUTED
2016060: 90 00 40 1a add %g1, %i2, %o0 <== NOT EXECUTED
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2016064: e2 14 00 00 lduh [ %l0 ], %l1 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2016068: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
201606c: a2 24 40 18 sub %l1, %i0, %l1 <== NOT EXECUTED
2016070: 80 a4 40 1b cmp %l1, %i3 <== NOT EXECUTED
2016074: 08 80 00 03 bleu 2016080 <fat_init_volume_info+0x688> <== NOT EXECUTED
2016078: b2 06 60 01 inc %i1 <== NOT EXECUTED
201607c: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2016080: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
2016084: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2016088: 40 00 2c fb call 2021474 <memcpy> <== NOT EXECUTED
201608c: 92 02 40 18 add %o1, %i0, %o1 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2016090: b6 a6 c0 11 subcc %i3, %l1, %i3 <== NOT EXECUTED
2016094: 12 bf ff ea bne 201603c <fat_init_volume_info+0x644> <== NOT EXECUTED
2016098: b4 04 40 1a add %l1, %i2, %i2 <== NOT EXECUTED
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
201609c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
20160a0: 06 80 00 7c bl 2016290 <fat_init_volume_info+0x898> <== NOT EXECUTED
20160a4: c6 0f bf ed ldub [ %fp + -19 ], %g3 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20160a8: f0 0f bf ee ldub [ %fp + -18 ], %i0 <== NOT EXECUTED
20160ac: f2 0f bf ec ldub [ %fp + -20 ], %i1 <== NOT EXECUTED
20160b0: f4 0f bf ef ldub [ %fp + -17 ], %i2 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20160b4: f6 0f bf f1 ldub [ %fp + -15 ], %i3 <== NOT EXECUTED
20160b8: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED
20160bc: c8 0f bf f0 ldub [ %fp + -16 ], %g4 <== NOT EXECUTED
20160c0: c4 0f bf f3 ldub [ %fp + -13 ], %g2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20160c4: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20160c8: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20160cc: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
20160d0: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED
20160d4: 86 10 c0 18 or %g3, %i0, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20160d8: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20160dc: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20160e0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20160e4: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20160e8: 82 16 c0 01 or %i3, %g1, %g1 <== NOT EXECUTED
20160ec: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
20160f0: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
20160f4: c6 27 60 40 st %g3, [ %i5 + 0x40 ] <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
20160f8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
20160fc: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
2016100: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2016104: 7f ff fd c0 call 2015804 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
2016108: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
201610c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2016110: 02 bf ff 15 be 2015d64 <fat_init_volume_info+0x36c> <== NOT EXECUTED
2016114: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2016118: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED
201611c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2016120: 02 80 00 04 be 2016130 <fat_init_volume_info+0x738> <== NOT EXECUTED
2016124: 01 00 00 00 nop <== NOT EXECUTED
2016128: 7f ff fb 8d call 2014f5c <fat_buf_release.part.1> <== NOT EXECUTED
201612c: 01 00 00 00 nop <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
0xFFFFFFFF);
if ( rc != RC_OK )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
2016130: 7f ff bc 04 call 2005140 <rtems_disk_release> <== NOT EXECUTED
2016134: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
return rc;
2016138: 81 c7 e0 08 ret <== NOT EXECUTED
201613c: 81 e8 00 00 restore <== NOT EXECUTED
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
2016140: c4 0f bf 97 ldub [ %fp + -105 ], %g2 <== NOT EXECUTED
2016144: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED
2016148: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201614c: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED
2016150: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED
2016154: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
2016158: a5 2c a0 18 sll %l2, 0x18, %l2 <== NOT EXECUTED
201615c: 90 12 00 13 or %o0, %l3, %o0 <== NOT EXECUTED
2016160: 90 12 00 12 or %o0, %l2, %o0 <== NOT EXECUTED
2016164: 10 bf fe d9 b 2015cc8 <fat_init_volume_info+0x2d0> <== NOT EXECUTED
2016168: d0 27 60 18 st %o0, [ %i5 + 0x18 ] <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
201616c: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
2016170: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
2016174: c6 2f 60 0a stb %g3, [ %i5 + 0xa ] <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
2016178: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
201617c: 10 bf fe f3 b 2015d48 <fat_init_volume_info+0x350> <== NOT EXECUTED
2016180: c2 27 60 10 st %g1, [ %i5 + 0x10 ] <== NOT EXECUTED
*/
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
2016184: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2016188: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED
201618c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2016190: 22 80 00 05 be,a 20161a4 <fat_init_volume_info+0x7ac> <== NOT EXECUTED
2016194: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2016198: 7f ff fb 71 call 2014f5c <fat_buf_release.part.1> <== NOT EXECUTED
201619c: 01 00 00 00 nop <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
20161a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20161a4: 7f ff bb e7 call 2005140 <rtems_disk_release> <== NOT EXECUTED
20161a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
20161ac: 40 00 29 e3 call 2020938 <__errno> <== NOT EXECUTED
20161b0: 01 00 00 00 nop <== NOT EXECUTED
20161b4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
20161b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20161bc: 81 c7 e0 08 ret <== NOT EXECUTED
20161c0: 81 e8 00 00 restore <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
20161c4: 10 bf ff 64 b 2015f54 <fat_init_volume_info+0x55c> <== NOT EXECUTED
20161c8: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED
if (rc == -1)
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
20161cc: 40 00 29 db call 2020938 <__errno> <== NOT EXECUTED
20161d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20161d4: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED
20161d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20161dc: 81 c7 e0 08 ret <== NOT EXECUTED
20161e0: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
20161e4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20161e8: 7f ff bb d6 call 2005140 <rtems_disk_release> <== NOT EXECUTED
20161ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
20161f0: 7f ff c0 da call 2006558 <free> <== NOT EXECUTED
20161f4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
20161f8: 7f ff c0 d8 call 2006558 <free> <== NOT EXECUTED
20161fc: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
free(fs_info->uino);
2016200: 7f ff c0 d6 call 2006558 <free> <== NOT EXECUTED
2016204: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2016208: 40 00 29 cc call 2020938 <__errno> <== NOT EXECUTED
201620c: 01 00 00 00 nop <== NOT EXECUTED
2016210: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2016214: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return RC_OK;
}
2016218: 81 c7 e0 08 ret <== NOT EXECUTED
201621c: 81 e8 00 00 restore <== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
2016220: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2016224: 7f ff bb c7 call 2005140 <rtems_disk_release> <== NOT EXECUTED
2016228: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
201622c: 40 00 29 c3 call 2020938 <__errno> <== NOT EXECUTED
2016230: 01 00 00 00 nop <== NOT EXECUTED
2016234: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2016238: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201623c: 81 c7 e0 08 ret <== NOT EXECUTED
2016240: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
2016244: 40 00 29 bd call 2020938 <__errno> <== NOT EXECUTED
2016248: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201624c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2016250: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2016254: 81 c7 e0 08 ret <== NOT EXECUTED
2016258: 81 e8 00 00 restore <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
201625c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2016260: 7f ff bb b8 call 2005140 <rtems_disk_release> <== NOT EXECUTED
2016264: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
2016268: 7f ff c0 bc call 2006558 <free> <== NOT EXECUTED
201626c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
2016270: 7f ff c0 ba call 2006558 <free> <== NOT EXECUTED
2016274: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2016278: 40 00 29 b0 call 2020938 <__errno> <== NOT EXECUTED
201627c: 01 00 00 00 nop <== NOT EXECUTED
2016280: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2016284: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2016288: 81 c7 e0 08 ret <== NOT EXECUTED
201628c: 81 e8 00 00 restore <== NOT EXECUTED
*/
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
2016290: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2016294: c2 0a 20 85 ldub [ %o0 + 0x85 ], %g1 <== NOT EXECUTED
2016298: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201629c: 22 80 00 05 be,a 20162b0 <fat_init_volume_info+0x8b8> <== NOT EXECUTED
20162a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20162a4: 7f ff fb 2e call 2014f5c <fat_buf_release.part.1> <== NOT EXECUTED
20162a8: 01 00 00 00 nop <== NOT EXECUTED
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
20162ac: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20162b0: 7f ff bb a4 call 2005140 <rtems_disk_release> <== NOT EXECUTED
20162b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
20162b8: 81 c7 e0 08 ret <== NOT EXECUTED
20162bc: 81 e8 00 00 restore <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
20162c0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20162c4: 7f ff bb 9f call 2005140 <rtems_disk_release> <== NOT EXECUTED
20162c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
20162cc: 40 00 29 9b call 2020938 <__errno> <== NOT EXECUTED
20162d0: 01 00 00 00 nop <== NOT EXECUTED
20162d4: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
20162d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20162dc: 81 c7 e0 08 ret <== NOT EXECUTED
20162e0: 81 e8 00 00 restore <== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
20162e4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
20162e8: 7f ff bb 96 call 2005140 <rtems_disk_release> <== NOT EXECUTED
20162ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
20162f0: 7f ff c0 9a call 2006558 <free> <== NOT EXECUTED
20162f4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
20162f8: 40 00 29 90 call 2020938 <__errno> <== NOT EXECUTED
20162fc: 01 00 00 00 nop <== NOT EXECUTED
2016300: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2016304: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2016308: 81 c7 e0 08 ret <== NOT EXECUTED
201630c: 81 e8 00 00 restore <== NOT EXECUTED
0201ecf0 <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
201ecf0: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
201ecf4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
uint32_t cl4find = 2;
uint32_t next_cln = 0;
201ecf8: c0 27 bf fc clr [ %fp + -4 ]
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
201ecfc: e6 04 20 34 ld [ %l0 + 0x34 ], %l3
uint32_t i = 2;
*cls_added = 0;
201ed00: c0 26 c0 00 clr [ %i3 ]
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
201ed04: ba 10 00 18 mov %i0, %i5
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
201ed08: 80 a6 a0 00 cmp %i2, 0
201ed0c: 02 80 00 46 be 201ee24 <fat_scan_fat_for_free_clusters+0x134><== NEVER TAKEN
201ed10: b0 10 20 00 clr %i0
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
201ed14: e2 04 20 44 ld [ %l0 + 0x44 ], %l1
201ed18: 80 a4 7f ff cmp %l1, -1
201ed1c: 22 80 00 02 be,a 201ed24 <fat_scan_fat_for_free_clusters+0x34>
201ed20: a2 10 20 02 mov 2, %l1
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
201ed24: a6 04 e0 02 add %l3, 2, %l3
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
201ed28: 80 a4 e0 02 cmp %l3, 2
201ed2c: 08 80 00 40 bleu 201ee2c <fat_scan_fat_for_free_clusters+0x13c><== NEVER TAKEN
201ed30: a4 10 20 02 mov 2, %l2
201ed34: 10 80 00 17 b 201ed90 <fat_scan_fat_for_free_clusters+0xa0>
201ed38: a8 10 20 00 clr %l4
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
201ed3c: 90 10 00 1d mov %i5, %o0
201ed40: 92 10 00 11 mov %l1, %o1
201ed44: 7f ff fe f0 call 201e904 <fat_set_fat_cluster>
201ed48: 94 10 3f ff mov -1, %o2
if ( rc != RC_OK )
201ed4c: 80 a2 20 00 cmp %o0, 0
201ed50: 32 80 00 35 bne,a 201ee24 <fat_scan_fat_for_free_clusters+0x134><== NEVER TAKEN
201ed54: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
201ed58: c2 06 c0 00 ld [ %i3 ], %g1
201ed5c: 82 00 60 01 inc %g1
/* have we satisfied request ? */
if (*cls_added == count)
201ed60: 80 a6 80 01 cmp %i2, %g1
201ed64: 02 80 00 49 be 201ee88 <fat_scan_fat_for_free_clusters+0x198><== ALWAYS TAKEN
201ed68: c2 26 c0 00 st %g1, [ %i3 ]
201ed6c: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
}
i++;
cl4find++;
201ed70: a2 04 60 01 inc %l1 <== NOT EXECUTED
if (cl4find >= data_cls_val)
201ed74: 80 a4 c0 11 cmp %l3, %l1
201ed78: 18 80 00 03 bgu 201ed84 <fat_scan_fat_for_free_clusters+0x94><== ALWAYS TAKEN
201ed7c: a4 04 a0 01 inc %l2
cl4find = 2;
201ed80: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
201ed84: 80 a4 c0 12 cmp %l3, %l2
201ed88: 28 80 00 2b bleu,a 201ee34 <fat_scan_fat_for_free_clusters+0x144><== NEVER TAKEN
201ed8c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
201ed90: 90 10 00 1d mov %i5, %o0
201ed94: 92 10 00 11 mov %l1, %o1
201ed98: 7f ff fe 53 call 201e6e4 <fat_get_fat_cluster>
201ed9c: 94 07 bf fc add %fp, -4, %o2
if ( rc != RC_OK )
201eda0: b0 92 20 00 orcc %o0, 0, %i0
201eda4: 12 80 00 30 bne 201ee64 <fat_scan_fat_for_free_clusters+0x174><== NEVER TAKEN
201eda8: c2 07 bf fc ld [ %fp + -4 ], %g1
if (*cls_added != 0)
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
201edac: 80 a0 60 00 cmp %g1, 0
201edb0: 32 bf ff f1 bne,a 201ed74 <fat_scan_fat_for_free_clusters+0x84>
201edb4: a2 04 60 01 inc %l1
/*
* We are enforced to process allocation of the first free cluster
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
201edb8: c2 06 c0 00 ld [ %i3 ], %g1
201edbc: 80 a0 60 00 cmp %g1, 0
201edc0: 22 bf ff df be,a 201ed3c <fat_scan_fat_for_free_clusters+0x4c><== ALWAYS TAKEN
201edc4: e2 26 40 00 st %l1, [ %i1 ]
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
201edc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201edcc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201edd0: 7f ff fe cd call 201e904 <fat_set_fat_cluster> <== NOT EXECUTED
201edd4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201edd8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
201eddc: 12 80 00 37 bne 201eeb8 <fat_scan_fat_for_free_clusters+0x1c8><== NOT EXECUTED
201ede0: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
201ede4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ede8: 7f ff fe c7 call 201e904 <fat_set_fat_cluster> <== NOT EXECUTED
201edec: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201edf0: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED
201edf4: 22 bf ff da be,a 201ed5c <fat_scan_fat_for_free_clusters+0x6c><== NOT EXECUTED
201edf8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
201edfc: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
201ee00: 7f ff ff 83 call 201ec0c <fat_free_fat_clusters_chain> <== NOT EXECUTED
201ee04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
201ee08: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ee0c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201ee10: 7f ff fe bd call 201e904 <fat_set_fat_cluster> <== NOT EXECUTED
201ee14: 94 10 20 00 clr %o2 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
201ee18: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
201ee1c: 7f ff d9 2e call 20152d4 <fat_buf_release> <== NOT EXECUTED
201ee20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return rc;
201ee24: 81 c7 e0 08 ret <== NOT EXECUTED
201ee28: 81 e8 00 00 restore <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
201ee2c: a8 10 20 00 clr %l4 <== NOT EXECUTED
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
201ee30: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED
201ee34: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201ee38: 02 80 00 05 be 201ee4c <fat_scan_fat_for_free_clusters+0x15c><== NOT EXECUTED
201ee3c: e8 24 20 44 st %l4, [ %l0 + 0x44 ] <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
201ee40: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
201ee44: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
201ee48: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
*last_cl = save_cln;
201ee4c: e8 27 00 00 st %l4, [ %i4 ] <== NOT EXECUTED
fat_buf_release(fs_info);
201ee50: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
201ee54: 7f ff d9 20 call 20152d4 <fat_buf_release> <== NOT EXECUTED
201ee58: b0 10 20 00 clr %i0 <== NOT EXECUTED
return RC_OK;
201ee5c: 81 c7 e0 08 ret <== NOT EXECUTED
201ee60: 81 e8 00 00 restore <== NOT EXECUTED
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
{
if (*cls_added != 0)
201ee64: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
201ee68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ee6c: 02 80 00 17 be 201eec8 <fat_scan_fat_for_free_clusters+0x1d8><== NOT EXECUTED
201ee70: 01 00 00 00 nop <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
201ee74: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
201ee78: 7f ff ff 65 call 201ec0c <fat_free_fat_clusters_chain> <== NOT EXECUTED
201ee7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ee80: 81 c7 e0 08 ret <== NOT EXECUTED
201ee84: 81 e8 00 00 restore <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
201ee88: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
201ee8c: 80 a0 7f ff cmp %g1, -1
201ee90: 02 80 00 05 be 201eea4 <fat_scan_fat_for_free_clusters+0x1b4><== ALWAYS TAKEN
201ee94: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
fs_info->vol.free_cls -= (*cls_added);
201ee98: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
201ee9c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
201eea0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
*last_cl = save_cln;
201eea4: e2 27 00 00 st %l1, [ %i4 ]
fat_buf_release(fs_info);
201eea8: 7f ff d9 0b call 20152d4 <fat_buf_release>
201eeac: 90 10 00 10 mov %l0, %o0
return rc;
201eeb0: 81 c7 e0 08 ret
201eeb4: 81 e8 00 00 restore
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
201eeb8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
201eebc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201eec0: 7f ff ff 53 call 201ec0c <fat_free_fat_clusters_chain> <== NOT EXECUTED
201eec4: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
201eec8: 81 c7 e0 08 ret <== NOT EXECUTED
201eecc: 81 e8 00 00 restore <== NOT EXECUTED
0201e904 <fat_set_fat_cluster>:
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
201e904: 9d e3 bf 98 save %sp, -104, %sp
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
201e908: c0 27 bf fc clr [ %fp + -4 ]
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
201e90c: 80 a6 60 01 cmp %i1, 1
201e910: 08 80 00 90 bleu 201eb50 <fat_set_fat_cluster+0x24c> <== NEVER TAKEN
201e914: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
201e918: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
201e91c: 82 00 60 01 inc %g1
201e920: 80 a6 40 01 cmp %i1, %g1
201e924: 18 80 00 8b bgu 201eb50 <fat_set_fat_cluster+0x24c> <== NEVER TAKEN
201e928: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e92c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
201e930: 80 88 60 01 btst 1, %g1
201e934: 12 80 00 22 bne 201e9bc <fat_set_fat_cluster+0xb8> <== ALWAYS TAKEN
201e938: e0 0f 60 02 ldub [ %i5 + 2 ], %l0
201e93c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
201e940: 02 80 00 25 be 201e9d4 <fat_set_fat_cluster+0xd0> <== NOT EXECUTED
201e944: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
201e948: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED
201e94c: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED
201e950: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201e954: e2 17 40 00 lduh [ %i5 ], %l1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
201e958: 90 10 00 1d mov %i5, %o0
201e95c: 92 10 00 10 mov %l0, %o1
201e960: 94 10 20 01 mov 1, %o2
201e964: 7f ff d9 d5 call 20150b8 <fat_buf_access>
201e968: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
201e96c: b0 92 20 00 orcc %o0, 0, %i0
201e970: 12 80 00 11 bne 201e9b4 <fat_set_fat_cluster+0xb0> <== NEVER TAKEN
201e974: a3 2c 60 10 sll %l1, 0x10, %l1
return rc;
switch ( fs_info->vol.type )
201e978: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3
201e97c: 80 a6 e0 02 cmp %i3, 2
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
201e980: a3 34 60 10 srl %l1, 0x10, %l1
201e984: a2 04 7f ff add %l1, -1, %l1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
201e988: 02 80 00 17 be 201e9e4 <fat_set_fat_cluster+0xe0> <== NEVER TAKEN
201e98c: b8 0f 00 11 and %i4, %l1, %i4
201e990: 80 a6 e0 04 cmp %i3, 4
201e994: 02 80 00 3d be 201ea88 <fat_set_fat_cluster+0x184> <== NEVER TAKEN
201e998: 80 a6 e0 01 cmp %i3, 1
201e99c: 02 80 00 1d be 201ea10 <fat_set_fat_cluster+0x10c> <== ALWAYS TAKEN
201e9a0: 80 8e 60 01 btst 1, %i1
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
201e9a4: 40 00 07 e5 call 2020938 <__errno> <== NOT EXECUTED
201e9a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201e9ac: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201e9b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
break;
}
return RC_OK;
}
201e9b4: 81 c7 e0 08 ret <== NOT EXECUTED
201e9b8: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
201e9bc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
201e9c0: b9 36 60 01 srl %i1, 1, %i4
201e9c4: b8 07 00 19 add %i4, %i1, %i4
201e9c8: a1 37 00 10 srl %i4, %l0, %l0
201e9cc: 10 bf ff e2 b 201e954 <fat_set_fat_cluster+0x50>
201e9d0: a0 04 00 01 add %l0, %g1, %l0
201e9d4: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED
201e9d8: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED
201e9dc: 10 bf ff de b 201e954 <fat_set_fat_cluster+0x50> <== NOT EXECUTED
201e9e0: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
201e9e4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
201e9e8: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
201e9ec: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
201e9f0: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED
201e9f4: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED
201e9f8: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
201e9fc: f4 30 40 1c sth %i2, [ %g1 + %i4 ] <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
201ea00: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201ea04: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED
201ea08: 81 c7 e0 08 ret <== NOT EXECUTED
201ea0c: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
201ea10: 02 80 00 35 be 201eae4 <fat_set_fat_cluster+0x1e0>
201ea14: c2 07 bf fc ld [ %fp + -4 ], %g1
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
201ea18: 85 2e a0 04 sll %i2, 4, %g2
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
201ea1c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
201ea20: c6 08 40 1c ldub [ %g1 + %i4 ], %g3
201ea24: 86 08 e0 0f and %g3, 0xf, %g3
201ea28: c6 28 40 1c stb %g3, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
201ea2c: c2 07 bf fc ld [ %fp + -4 ], %g1
201ea30: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
201ea34: c6 08 40 1c ldub [ %g1 + %i4 ], %g3
201ea38: 84 10 c0 02 or %g3, %g2, %g2
201ea3c: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
201ea40: c2 17 40 00 lduh [ %i5 ], %g1
201ea44: 82 00 7f ff add %g1, -1, %g1
201ea48: 80 a0 40 1c cmp %g1, %i4
201ea4c: 02 80 00 5c be 201ebbc <fat_set_fat_cluster+0x2b8> <== NEVER TAKEN
201ea50: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ]
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
201ea54: c2 07 bf fc ld [ %fp + -4 ], %g1
201ea58: b8 07 20 01 inc %i4
201ea5c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201ea60: b5 2e a0 14 sll %i2, 0x14, %i2
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
201ea64: c0 28 40 1c clrb [ %g1 + %i4 ]
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
201ea68: c2 07 bf fc ld [ %fp + -4 ], %g1
(uint8_t )((fat16_clv & 0xFF00)>>8);
201ea6c: b5 36 a0 18 srl %i2, 0x18, %i2
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
201ea70: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
201ea74: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201ea78: 84 10 80 1a or %g2, %i2, %g2
201ea7c: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
201ea80: 81 c7 e0 08 ret
201ea84: 81 e8 00 00 restore
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
201ea88: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201ea8c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
201ea90: 03 3c 00 00 sethi %hi(0xf0000000), %g1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
201ea94: c6 00 80 1c ld [ %g2 + %i4 ], %g3 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
201ea98: 82 2e 80 01 andn %i2, %g1, %g1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201ea9c: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201eaa0: b7 30 60 08 srl %g1, 8, %i3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201eaa4: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201eaa8: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201eaac: b4 16 80 04 or %i2, %g4, %i2 <== NOT EXECUTED
201eab0: b7 2e e0 10 sll %i3, 0x10, %i3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201eab4: 89 30 60 10 srl %g1, 0x10, %g4 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
201eab8: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED
201eabc: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201eac0: 82 16 80 1b or %i2, %i3, %g1 <== NOT EXECUTED
201eac4: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED
201eac8: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
fat32_clv | (*((uint32_t *)(block0->buffer + ofs)));
201eacc: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
201ead0: c2 20 80 1c st %g1, [ %g2 + %i4 ] <== NOT EXECUTED
201ead4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201ead8: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED
201eadc: 81 c7 e0 08 ret <== NOT EXECUTED
201eae0: 81 e8 00 00 restore <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
201eae4: b4 0e af ff and %i2, 0xfff, %i2
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
201eae8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
201eaec: c0 28 40 1c clrb [ %g1 + %i4 ]
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
201eaf0: c2 07 bf fc ld [ %fp + -4 ], %g1
201eaf4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
201eaf8: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201eafc: 84 16 80 02 or %i2, %g2, %g2
201eb00: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
201eb04: c2 17 40 00 lduh [ %i5 ], %g1
201eb08: 82 00 7f ff add %g1, -1, %g1
201eb0c: 80 a0 40 1c cmp %g1, %i4
201eb10: 02 80 00 16 be 201eb68 <fat_set_fat_cluster+0x264> <== NEVER TAKEN
201eb14: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ]
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
201eb18: c2 07 bf fc ld [ %fp + -4 ], %g1
201eb1c: b8 07 20 01 inc %i4
201eb20: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201eb24: b5 36 a0 08 srl %i2, 8, %i2
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
201eb28: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201eb2c: 84 08 bf f0 and %g2, -16, %g2
201eb30: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
201eb34: c2 07 bf fc ld [ %fp + -4 ], %g1
201eb38: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
201eb3c: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
201eb40: b4 10 80 1a or %g2, %i2, %i2
201eb44: f4 28 40 1c stb %i2, [ %g1 + %i4 ]
201eb48: 81 c7 e0 08 ret
201eb4c: 81 e8 00 00 restore
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
201eb50: 40 00 07 7a call 2020938 <__errno> <== NOT EXECUTED
201eb54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201eb58: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201eb5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201eb60: 81 c7 e0 08 ret <== NOT EXECUTED
201eb64: 81 e8 00 00 restore <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
201eb68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201eb6c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED
201eb70: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201eb74: 7f ff d9 51 call 20150b8 <fat_buf_access> <== NOT EXECUTED
201eb78: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
201eb7c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201eb80: 12 bf ff 8d bne 201e9b4 <fat_set_fat_cluster+0xb0> <== NOT EXECUTED
201eb84: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201eb88: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
201eb8c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
201eb90: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
201eb94: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED
201eb98: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
201eb9c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201eba0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
201eba4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
201eba8: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED
201ebac: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
201ebb0: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] <== NOT EXECUTED
201ebb4: 81 c7 e0 08 ret <== NOT EXECUTED
201ebb8: 81 e8 00 00 restore <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
201ebbc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ebc0: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED
201ebc4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201ebc8: 7f ff d9 3c call 20150b8 <fat_buf_access> <== NOT EXECUTED
201ebcc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
201ebd0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201ebd4: 12 bf ff 78 bne 201e9b4 <fat_set_fat_cluster+0xb0> <== NOT EXECUTED
201ebd8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201ebdc: 87 2e a0 14 sll %i2, 0x14, %g3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
201ebe0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
201ebe4: 87 30 e0 18 srl %g3, 0x18, %g3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
201ebe8: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
201ebec: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201ebf0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
201ebf4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
201ebf8: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
201ebfc: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
201ec00: f6 2f 60 84 stb %i3, [ %i5 + 0x84 ] <== NOT EXECUTED
201ec04: 81 c7 e0 08 ret <== NOT EXECUTED
201ec08: 81 e8 00 00 restore <== NOT EXECUTED
020158c4 <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
20158c4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
20158c8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
20158cc: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
20158d0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
20158d4: 12 80 00 3e bne 20159cc <fat_shutdown_drive+0x108> <== NOT EXECUTED
20158d8: b8 10 20 00 clr %i4 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
20158dc: c2 0f 60 85 ldub [ %i5 + 0x85 ], %g1 <== NOT EXECUTED
20158e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20158e4: 02 80 00 04 be 20158f4 <fat_shutdown_drive+0x30> <== NOT EXECUTED
20158e8: 01 00 00 00 nop <== NOT EXECUTED
20158ec: 7f ff fd 9c call 2014f5c <fat_buf_release.part.1> <== NOT EXECUTED
20158f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = -1;
}
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
20158f4: 7f ff f7 b4 call 20137c4 <rtems_bdbuf_syncdev> <== NOT EXECUTED
20158f8: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED
20158fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2015900: 32 80 00 3c bne,a 20159f0 <fat_shutdown_drive+0x12c> <== NOT EXECUTED
2015904: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
rc = -1;
2015908: b4 10 20 00 clr %i2 <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
201590c: f6 07 60 68 ld [ %i5 + 0x68 ], %i3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
2015910: 10 80 00 04 b 2015920 <fat_shutdown_drive+0x5c> <== NOT EXECUTED
2015914: b6 06 c0 1a add %i3, %i2, %i3 <== NOT EXECUTED
free(node);
2015918: 7f ff c3 10 call 2006558 <free> <== NOT EXECUTED
201591c: 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 );
2015920: 7f ff d9 77 call 200befc <_Chain_Get> <== NOT EXECUTED
2015924: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
2015928: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201592c: 12 bf ff fb bne 2015918 <fat_shutdown_drive+0x54> <== NOT EXECUTED
2015930: 01 00 00 00 nop <== NOT EXECUTED
2015934: b4 06 a0 0c add %i2, 0xc, %i2 <== NOT EXECUTED
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
2015938: 80 a6 a0 18 cmp %i2, 0x18 <== NOT EXECUTED
201593c: 32 bf ff f5 bne,a 2015910 <fat_shutdown_drive+0x4c> <== NOT EXECUTED
2015940: f6 07 60 68 ld [ %i5 + 0x68 ], %i3 <== NOT EXECUTED
2015944: b4 10 20 00 clr %i2 <== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
2015948: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
201594c: 10 80 00 04 b 201595c <fat_shutdown_drive+0x98> <== NOT EXECUTED
2015950: b6 06 c0 1a add %i3, %i2, %i3 <== NOT EXECUTED
free(node);
2015954: 7f ff c3 01 call 2006558 <free> <== NOT EXECUTED
2015958: 01 00 00 00 nop <== NOT EXECUTED
201595c: 7f ff d9 68 call 200befc <_Chain_Get> <== NOT EXECUTED
2015960: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
2015964: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2015968: 12 bf ff fb bne 2015954 <fat_shutdown_drive+0x90> <== NOT EXECUTED
201596c: 01 00 00 00 nop <== NOT EXECUTED
2015970: b4 06 a0 0c add %i2, 0xc, %i2 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
2015974: 80 a6 a0 18 cmp %i2, 0x18 <== NOT EXECUTED
2015978: 32 bf ff f5 bne,a 201594c <fat_shutdown_drive+0x88> <== NOT EXECUTED
201597c: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
2015980: 7f ff c2 f6 call 2006558 <free> <== NOT EXECUTED
2015984: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
2015988: 7f ff c2 f4 call 2006558 <free> <== NOT EXECUTED
201598c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED
free(fs_info->uino);
2015990: 7f ff c2 f2 call 2006558 <free> <== NOT EXECUTED
2015994: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
free(fs_info->sec_buf);
2015998: 7f ff c2 f0 call 2006558 <free> <== NOT EXECUTED
201599c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
rtems_disk_release(fs_info->vol.dd);
20159a0: 7f ff bd e8 call 2005140 <rtems_disk_release> <== NOT EXECUTED
20159a4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
if (rc)
20159a8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20159ac: 02 80 00 06 be 20159c4 <fat_shutdown_drive+0x100> <== NOT EXECUTED
20159b0: 01 00 00 00 nop <== NOT EXECUTED
errno = EIO;
20159b4: 40 00 2b e1 call 2020938 <__errno> <== NOT EXECUTED
20159b8: 01 00 00 00 nop <== NOT EXECUTED
20159bc: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
20159c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return rc;
}
20159c4: 81 c7 e0 08 ret <== NOT EXECUTED
20159c8: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
20159cc: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED
20159d0: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED
20159d4: 7f ff ff 8c call 2015804 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
20159d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
20159dc: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20159e0: 32 bf ff bf bne,a 20158dc <fat_shutdown_drive+0x18> <== NOT EXECUTED
20159e4: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
20159e8: 10 bf ff be b 20158e0 <fat_shutdown_drive+0x1c> <== NOT EXECUTED
20159ec: c2 0f 60 85 ldub [ %i5 + 0x85 ], %g1 <== NOT EXECUTED
}
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
20159f0: 10 bf ff c7 b 201590c <fat_shutdown_drive+0x48> <== NOT EXECUTED
20159f4: b4 10 20 00 clr %i2 <== NOT EXECUTED
0201d368 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
201d368: 9d e3 bf 90 save %sp, -112, %sp
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
201d36c: 03 00 80 81 sethi %hi(0x2020400), %g1
201d370: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 202071c <rtems_libio_number_iops>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
201d374: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
201d378: 82 07 a0 4c add %fp, 0x4c, %g1
201d37c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
201d380: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
201d384: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
201d388: 80 a6 00 02 cmp %i0, %g2
201d38c: 1a 80 00 65 bcc 201d520 <fcntl+0x1b8>
201d390: c2 27 bf fc st %g1, [ %fp + -4 ]
iop = rtems_libio_iop( fd );
201d394: 3b 00 80 84 sethi %hi(0x2021000), %i5
201d398: c6 07 62 18 ld [ %i5 + 0x218 ], %g3 ! 2021218 <rtems_libio_iops>
201d39c: 93 2e 20 06 sll %i0, 6, %o1
201d3a0: 92 00 c0 09 add %g3, %o1, %o1
rtems_libio_check_is_open(iop);
201d3a4: d0 02 60 18 ld [ %o1 + 0x18 ], %o0
201d3a8: 80 8a 21 00 btst 0x100, %o0
201d3ac: 02 80 00 5d be 201d520 <fcntl+0x1b8>
201d3b0: 80 a6 60 09 cmp %i1, 9
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
201d3b4: 08 80 00 08 bleu 201d3d4 <fcntl+0x6c>
201d3b8: 89 2e 60 02 sll %i1, 2, %g4
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
201d3bc: 7f ff d4 7e call 20125b4 <__errno>
201d3c0: b0 10 3f ff mov -1, %i0
201d3c4: 82 10 20 16 mov 0x16, %g1
201d3c8: c2 22 00 00 st %g1, [ %o0 ]
201d3cc: 81 c7 e0 08 ret
201d3d0: 81 e8 00 00 restore
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
201d3d4: 31 00 80 74 sethi %hi(0x201d000), %i0
201d3d8: b0 16 23 40 or %i0, 0x340, %i0 ! 201d340 <_calloc_r+0x14>
201d3dc: c8 06 00 04 ld [ %i0 + %g4 ], %g4
201d3e0: 81 c1 00 00 jmp %g4
201d3e4: 01 00 00 00 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
201d3e8: 7f ff d4 73 call 20125b4 <__errno>
201d3ec: 01 00 00 00 nop
201d3f0: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
201d3f4: c2 22 00 00 st %g1, [ %o0 ]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
201d3f8: 81 c7 e0 08 ret
201d3fc: 91 e8 3f ff restore %g0, -1, %o0
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
201d400: d0 00 40 00 ld [ %g1 ], %o0
201d404: 7f ff 9b 18 call 2004064 <rtems_libio_fcntl_flags>
201d408: 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);
201d40c: d2 07 bf f4 ld [ %fp + -12 ], %o1
201d410: 90 0a 22 01 and %o0, 0x201, %o0
201d414: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
201d418: b0 10 20 00 clr %i0
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
201d41c: 82 08 7d fe and %g1, -514, %g1
201d420: 82 12 00 01 or %o0, %g1, %g1
201d424: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
201d428: c2 02 60 24 ld [ %o1 + 0x24 ], %g1
201d42c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
201d430: 9f c0 40 00 call %g1
201d434: 90 10 00 19 mov %i1, %o0
if (err) {
201d438: b2 92 20 00 orcc %o0, 0, %i1
201d43c: 12 80 00 04 bne 201d44c <fcntl+0xe4> <== NEVER TAKEN
201d440: 01 00 00 00 nop
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
201d444: 81 c7 e0 08 ret
201d448: 81 e8 00 00 restore
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
201d44c: 7f ff d4 5a call 20125b4 <__errno> <== NOT EXECUTED
201d450: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201d454: 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;
}
201d458: 81 c7 e0 08 ret <== NOT EXECUTED
201d45c: 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 );
201d460: 7f ff 9b 0e call 2004098 <rtems_libio_to_fcntl_flags>
201d464: d2 27 bf f4 st %o1, [ %fp + -12 ]
201d468: d2 07 bf f4 ld [ %fp + -12 ], %o1
201d46c: 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) {
201d470: 80 a6 20 00 cmp %i0, 0
201d474: 36 bf ff ee bge,a 201d42c <fcntl+0xc4> <== ALWAYS TAKEN
201d478: c2 02 60 24 ld [ %o1 + 0x24 ], %g1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
201d47c: 81 c7 e0 08 ret <== NOT EXECUTED
201d480: 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 ) )
201d484: c2 00 40 00 ld [ %g1 ], %g1
201d488: 80 a0 60 00 cmp %g1, 0
201d48c: 22 80 00 22 be,a 201d514 <fcntl+0x1ac>
201d490: 90 0a 37 ff and %o0, -2049, %o0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
201d494: 90 12 28 00 or %o0, 0x800, %o0
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
201d498: b0 10 20 00 clr %i0
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
201d49c: 10 bf ff e3 b 201d428 <fcntl+0xc0>
201d4a0: 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);
201d4a4: 90 0a 28 00 and %o0, 0x800, %o0
201d4a8: 80 a0 00 08 cmp %g0, %o0
201d4ac: 10 bf ff df b 201d428 <fcntl+0xc0>
201d4b0: b0 40 20 00 addx %g0, 0, %i0
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
201d4b4: c8 00 40 00 ld [ %g1 ], %g4
if ( fd2 )
201d4b8: 80 a1 20 00 cmp %g4, 0
201d4bc: 02 80 00 1f be 201d538 <fcntl+0x1d0>
201d4c0: b0 10 20 00 clr %i0
diop = rtems_libio_iop( fd2 );
201d4c4: 80 a0 80 04 cmp %g2, %g4
201d4c8: 08 80 00 05 bleu 201d4dc <fcntl+0x174> <== NEVER TAKEN
201d4cc: 82 10 20 00 clr %g1
201d4d0: 83 29 20 06 sll %g4, 6, %g1
201d4d4: 82 00 c0 01 add %g3, %g1, %g1
201d4d8: b0 10 00 01 mov %g1, %i0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
201d4dc: c4 02 60 1c ld [ %o1 + 0x1c ], %g2
ret = (int) (diop - rtems_libio_iops);
201d4e0: b0 26 00 03 sub %i0, %g3, %i0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
201d4e4: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
201d4e8: c4 02 60 20 ld [ %o1 + 0x20 ], %g2
ret = -1;
break;
}
}
diop->flags = iop->flags;
201d4ec: d0 20 60 18 st %o0, [ %g1 + 0x18 ]
diop->pathinfo = iop->pathinfo;
201d4f0: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
201d4f4: c4 02 60 24 ld [ %o1 + 0x24 ], %g2
ret = (int) (diop - rtems_libio_iops);
201d4f8: b1 3e 20 06 sra %i0, 6, %i0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
201d4fc: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
201d500: c4 02 60 28 ld [ %o1 + 0x28 ], %g2
201d504: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
201d508: c4 02 60 2c ld [ %o1 + 0x2c ], %g2
201d50c: 10 bf ff d9 b 201d470 <fcntl+0x108>
201d510: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
201d514: b0 10 20 00 clr %i0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
201d518: 10 bf ff c4 b 201d428 <fcntl+0xc0>
201d51c: d0 22 60 18 st %o0, [ %o1 + 0x18 ]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
201d520: 7f ff d4 25 call 20125b4 <__errno>
201d524: b0 10 3f ff mov -1, %i0
201d528: 82 10 20 09 mov 9, %g1
201d52c: c2 22 00 00 st %g1, [ %o0 ]
201d530: 81 c7 e0 08 ret
201d534: 81 e8 00 00 restore
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
201d538: 7f ff 9a ef call 20040f4 <rtems_libio_allocate>
201d53c: d2 27 bf f4 st %o1, [ %fp + -12 ]
if ( diop == 0 ) {
201d540: 82 92 20 00 orcc %o0, 0, %g1
201d544: 02 bf ff ad be 201d3f8 <fcntl+0x90> <== NEVER TAKEN
201d548: d2 07 bf f4 ld [ %fp + -12 ], %o1
201d54c: d0 02 60 18 ld [ %o1 + 0x18 ], %o0
201d550: c6 07 62 18 ld [ %i5 + 0x218 ], %g3
201d554: 10 bf ff e2 b 201d4dc <fcntl+0x174>
201d558: b0 10 00 01 mov %g1, %i0
0200f9a4 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200f9a4: 9d e3 bf 98 save %sp, -104, %sp
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
200f9a8: 3b 00 80 96 sethi %hi(0x2025800), %i5
200f9ac: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 ! 2025838 <pipe_semaphore>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200f9b0: b8 10 00 18 mov %i0, %i4
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
200f9b4: 80 a2 20 00 cmp %o0, 0
200f9b8: 02 80 00 54 be 200fb08 <fifo_open+0x164>
200f9bc: b4 17 60 38 or %i5, 0x38, %i2
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200f9c0: 92 10 20 00 clr %o1
200f9c4: 94 10 20 00 clr %o2
200f9c8: 7f ff e9 aa call 200a070 <rtems_semaphore_obtain>
200f9cc: b0 10 3f f4 mov -12, %i0
}
if (sc == RTEMS_SUCCESSFUL) {
200f9d0: 80 a2 20 00 cmp %o0, 0
200f9d4: 12 80 01 18 bne 200fe34 <fifo_open+0x490> <== NEVER TAKEN
200f9d8: 01 00 00 00 nop
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
200f9dc: f6 07 00 00 ld [ %i4 ], %i3
if (pipe == NULL) {
200f9e0: 80 a6 e0 00 cmp %i3, 0
200f9e4: 02 80 00 91 be 200fc28 <fifo_open+0x284>
200f9e8: 01 00 00 00 nop
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200f9ec: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
200f9f0: 92 10 20 00 clr %o1
200f9f4: 7f ff e9 9f call 200a070 <rtems_semaphore_obtain>
200f9f8: 94 10 20 00 clr %o2
err = -EINTR;
if (*pipep == NULL) {
200f9fc: c2 07 00 00 ld [ %i4 ], %g1
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200fa00: 80 a0 00 08 cmp %g0, %o0
200fa04: b0 60 20 00 subx %g0, 0, %i0
err = -EINTR;
if (*pipep == NULL) {
200fa08: 80 a0 60 00 cmp %g1, 0
200fa0c: 02 80 00 d9 be 200fd70 <fifo_open+0x3cc>
200fa10: b0 0e 3f fc and %i0, -4, %i0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200fa14: 7f ff e9 e1 call 200a198 <rtems_semaphore_release>
200fa18: d0 07 60 38 ld [ %i5 + 0x38 ], %o0
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
200fa1c: 80 a6 20 00 cmp %i0, 0
200fa20: 12 80 01 05 bne 200fe34 <fifo_open+0x490> <== NEVER TAKEN
200fa24: 01 00 00 00 nop
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200fa28: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200fa2c: 82 08 60 06 and %g1, 6, %g1
200fa30: 80 a0 60 04 cmp %g1, 4
200fa34: 02 80 00 42 be 200fb3c <fifo_open+0x198>
200fa38: fa 07 00 00 ld [ %i4 ], %i5
200fa3c: 80 a0 60 06 cmp %g1, 6
200fa40: 02 80 00 65 be 200fbd4 <fifo_open+0x230>
200fa44: 80 a0 60 02 cmp %g1, 2
200fa48: 22 80 00 07 be,a 200fa64 <fifo_open+0xc0> <== ALWAYS TAKEN
200fa4c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
200fa50: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200fa54: 7f ff e9 d1 call 200a198 <rtems_semaphore_release>
200fa58: b0 10 20 00 clr %i0
return 0;
200fa5c: 81 c7 e0 08 ret
200fa60: 81 e8 00 00 restore
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200fa64: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
if (pipe->Readers ++ == 0)
200fa68: 86 00 60 01 add %g1, 1, %g3
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200fa6c: 84 00 a0 01 inc %g2
if (pipe->Readers ++ == 0)
200fa70: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200fa74: 80 a0 60 00 cmp %g1, 0
200fa78: 02 80 00 d4 be 200fdc8 <fifo_open+0x424> <== ALWAYS TAKEN
200fa7c: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
200fa80: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
200fa84: 80 a0 60 00 cmp %g1, 0
200fa88: 32 bf ff f3 bne,a 200fa54 <fifo_open+0xb0>
200fa8c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
/* Not an error */
if (LIBIO_NODELAY(iop))
200fa90: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200fa94: 80 88 60 01 btst 1, %g1
200fa98: 32 bf ff ef bne,a 200fa54 <fifo_open+0xb0>
200fa9c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
break;
prevCounter = pipe->writerCounter;
200faa0: 10 80 00 0c b 200fad0 <fifo_open+0x12c>
200faa4: f6 07 60 24 ld [ %i5 + 0x24 ], %i3
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200faa8: 92 10 20 00 clr %o1
200faac: 7f ff e9 71 call 200a070 <rtems_semaphore_obtain>
200fab0: 94 10 20 00 clr %o2
200fab4: 80 a2 20 00 cmp %o0, 0
200fab8: 12 80 00 0f bne 200faf4 <fifo_open+0x150> <== NEVER TAKEN
200fabc: b0 10 3f fc mov -4, %i0
goto out_error;
} while (prevCounter == pipe->writerCounter);
200fac0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
200fac4: 80 a0 40 1b cmp %g1, %i3
200fac8: 32 bf ff e3 bne,a 200fa54 <fifo_open+0xb0> <== ALWAYS TAKEN
200facc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
200fad0: 7f ff e9 b2 call 200a198 <rtems_semaphore_release>
200fad4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (! PIPE_READWAIT(pipe))
200fad8: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200fadc: 40 00 07 ef call 2011a98 <rtems_barrier_wait>
200fae0: 92 10 20 00 clr %o1
200fae4: 80 a2 20 00 cmp %o0, 0
200fae8: 22 bf ff f0 be,a 200faa8 <fifo_open+0x104> <== ALWAYS TAKEN
200faec: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
200faf0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
200faf4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200faf8: 7f ff ff 68 call 200f898 <pipe_release>
200fafc: 92 10 00 19 mov %i1, %o1
return err;
}
200fb00: 81 c7 e0 08 ret
200fb04: 81 e8 00 00 restore
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200fb08: 37 00 80 96 sethi %hi(0x2025800), %i3
200fb0c: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0 ! 20259a4 <rtems_libio_semaphore>
200fb10: 92 10 20 00 clr %o1
200fb14: 7f ff e9 57 call 200a070 <rtems_semaphore_obtain>
200fb18: 94 10 20 00 clr %o2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
200fb1c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
200fb20: 80 a0 60 00 cmp %g1, 0
200fb24: 02 80 00 9a be 200fd8c <fifo_open+0x3e8> <== ALWAYS TAKEN
200fb28: 98 10 00 1a mov %i2, %o4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200fb2c: 7f ff e9 9b call 200a198 <rtems_semaphore_release> <== NOT EXECUTED
200fb30: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0 <== NOT EXECUTED
200fb34: 10 bf ff a3 b 200f9c0 <fifo_open+0x1c> <== NOT EXECUTED
200fb38: d0 07 60 38 ld [ %i5 + 0x38 ], %o0 <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200fb3c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
200fb40: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
if (pipe->Writers ++ == 0)
200fb44: 86 00 60 01 add %g1, 1, %g3
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
200fb48: 84 00 a0 01 inc %g2
if (pipe->Writers ++ == 0)
200fb4c: c6 27 60 14 st %g3, [ %i5 + 0x14 ]
200fb50: 80 a0 60 00 cmp %g1, 0
200fb54: 02 80 00 a7 be 200fdf0 <fifo_open+0x44c> <== ALWAYS TAKEN
200fb58: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200fb5c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
200fb60: 80 a0 60 00 cmp %g1, 0
200fb64: 32 bf ff bc bne,a 200fa54 <fifo_open+0xb0>
200fb68: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200fb6c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200fb70: 80 88 60 01 btst 1, %g1
200fb74: 32 80 00 b2 bne,a 200fe3c <fifo_open+0x498>
200fb78: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
200fb7c: 10 80 00 0c b 200fbac <fifo_open+0x208>
200fb80: f6 07 60 20 ld [ %i5 + 0x20 ], %i3
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200fb84: 92 10 20 00 clr %o1
200fb88: 7f ff e9 3a call 200a070 <rtems_semaphore_obtain>
200fb8c: 94 10 20 00 clr %o2
200fb90: 80 a2 20 00 cmp %o0, 0
200fb94: 12 bf ff d8 bne 200faf4 <fifo_open+0x150> <== NEVER TAKEN
200fb98: b0 10 3f fc mov -4, %i0
goto out_error;
} while (prevCounter == pipe->readerCounter);
200fb9c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200fba0: 80 a0 40 1b cmp %g1, %i3
200fba4: 32 bf ff ac bne,a 200fa54 <fifo_open+0xb0> <== ALWAYS TAKEN
200fba8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
200fbac: 7f ff e9 7b call 200a198 <rtems_semaphore_release>
200fbb0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (! PIPE_WRITEWAIT(pipe))
200fbb4: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200fbb8: 40 00 07 b8 call 2011a98 <rtems_barrier_wait>
200fbbc: 92 10 20 00 clr %o1
200fbc0: 80 a2 20 00 cmp %o0, 0
200fbc4: 22 bf ff f0 be,a 200fb84 <fifo_open+0x1e0> <== ALWAYS TAKEN
200fbc8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
200fbcc: 10 bf ff ca b 200faf4 <fifo_open+0x150> <== NOT EXECUTED
200fbd0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
200fbd4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200fbd8: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
if (pipe->Readers ++ == 0)
200fbdc: 86 00 60 01 add %g1, 1, %g3
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200fbe0: 84 00 a0 01 inc %g2
if (pipe->Readers ++ == 0)
200fbe4: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200fbe8: 80 a0 60 00 cmp %g1, 0
200fbec: 02 80 00 7c be 200fddc <fifo_open+0x438> <== ALWAYS TAKEN
200fbf0: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200fbf4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200fbf8: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
if (pipe->Writers ++ == 0)
200fbfc: 86 00 60 01 add %g1, 1, %g3
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200fc00: 84 00 a0 01 inc %g2
if (pipe->Writers ++ == 0)
200fc04: c6 27 60 14 st %g3, [ %i5 + 0x14 ]
200fc08: 80 a0 60 00 cmp %g1, 0
200fc0c: 12 bf ff 91 bne 200fa50 <fifo_open+0xac> <== NEVER TAKEN
200fc10: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
PIPE_WAKEUPREADERS(pipe);
200fc14: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200fc18: 40 00 07 89 call 2011a3c <rtems_barrier_release>
200fc1c: 92 07 bf f8 add %fp, -8, %o1
break;
}
PIPE_UNLOCK(pipe);
200fc20: 10 bf ff 8d b 200fa54 <fifo_open+0xb0>
200fc24: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
200fc28: 7f ff da 13 call 2006474 <malloc>
200fc2c: 90 10 20 34 mov 0x34, %o0
if (pipe == NULL)
200fc30: b6 92 20 00 orcc %o0, 0, %i3
200fc34: 02 80 00 8e be 200fe6c <fifo_open+0x4c8>
200fc38: 82 10 22 00 mov 0x200, %g1
return err;
memset(pipe, 0, sizeof(pipe_control_t));
200fc3c: c0 26 c0 00 clr [ %i3 ]
200fc40: c0 26 e0 08 clr [ %i3 + 8 ]
200fc44: c0 26 e0 0c clr [ %i3 + 0xc ]
200fc48: c0 26 e0 10 clr [ %i3 + 0x10 ]
200fc4c: c0 26 e0 14 clr [ %i3 + 0x14 ]
200fc50: c0 26 e0 18 clr [ %i3 + 0x18 ]
200fc54: c0 26 e0 1c clr [ %i3 + 0x1c ]
200fc58: c0 26 e0 20 clr [ %i3 + 0x20 ]
200fc5c: c0 26 e0 24 clr [ %i3 + 0x24 ]
200fc60: c0 26 e0 28 clr [ %i3 + 0x28 ]
200fc64: c0 26 e0 2c clr [ %i3 + 0x2c ]
200fc68: c0 26 e0 30 clr [ %i3 + 0x30 ]
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
200fc6c: 90 10 22 00 mov 0x200, %o0
200fc70: 7f ff da 01 call 2006474 <malloc>
200fc74: c2 26 e0 04 st %g1, [ %i3 + 4 ]
if (! pipe->Buffer)
200fc78: 80 a2 20 00 cmp %o0, 0
200fc7c: 02 80 00 7a be 200fe64 <fifo_open+0x4c0> <== NEVER TAKEN
200fc80: d0 26 c0 00 st %o0, [ %i3 ]
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
200fc84: 35 00 80 94 sethi %hi(0x2025000), %i2
200fc88: d0 4e a0 08 ldsb [ %i2 + 8 ], %o0 ! 2025008 <c.6705>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
200fc8c: 31 14 12 5c sethi %hi(0x50497000), %i0
200fc90: 82 16 22 00 or %i0, 0x200, %g1 ! 50497200 <RAM_END+0x4e097200>
200fc94: 92 10 20 00 clr %o1
200fc98: 94 10 20 00 clr %o2
200fc9c: 90 12 00 01 or %o0, %g1, %o0
200fca0: 40 00 07 0d call 20118d4 <rtems_barrier_create>
200fca4: 96 06 e0 2c add %i3, 0x2c, %o3
200fca8: 80 a2 20 00 cmp %o0, 0
200fcac: 12 80 00 6c bne 200fe5c <fifo_open+0x4b8>
200fcb0: d0 4e a0 08 ldsb [ %i2 + 8 ], %o0
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
200fcb4: 03 14 12 5d sethi %hi(0x50497400), %g1
200fcb8: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <RAM_END+0x4e097700>
200fcbc: 92 10 20 00 clr %o1
200fcc0: 94 10 20 00 clr %o2
200fcc4: 90 12 00 01 or %o0, %g1, %o0
200fcc8: 40 00 07 03 call 20118d4 <rtems_barrier_create>
200fccc: 96 06 e0 30 add %i3, 0x30, %o3
200fcd0: 80 a2 20 00 cmp %o0, 0
200fcd4: 12 80 00 60 bne 200fe54 <fifo_open+0x4b0>
200fcd8: d0 4e a0 08 ldsb [ %i2 + 8 ], %o0
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
200fcdc: b0 16 23 00 or %i0, 0x300, %i0
200fce0: 92 10 20 01 mov 1, %o1
200fce4: 90 12 00 18 or %o0, %i0, %o0
200fce8: 94 10 20 10 mov 0x10, %o2
200fcec: 96 10 20 00 clr %o3
200fcf0: 7f ff e8 39 call 2009dd4 <rtems_semaphore_create>
200fcf4: 98 06 e0 28 add %i3, 0x28, %o4
200fcf8: 80 a2 20 00 cmp %o0, 0
200fcfc: 12 80 00 54 bne 200fe4c <fifo_open+0x4a8>
200fd00: 94 07 bf fc add %fp, -4, %o2
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
200fd04: d2 06 e0 2c ld [ %i3 + 0x2c ], %o1
200fd08: 21 00 80 99 sethi %hi(0x2026400), %l0
200fd0c: 7f ff ef 8c call 200bb3c <_Objects_Get>
200fd10: 90 14 20 a0 or %l0, 0xa0, %o0 ! 20264a0 <_Barrier_Information>
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
200fd14: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200fd18: 31 04 00 00 sethi %hi(0x10000000), %i0
200fd1c: 82 10 40 18 or %g1, %i0, %g1
_Thread_Enable_dispatch();
200fd20: 7f ff f3 75 call 200caf4 <_Thread_Enable_dispatch>
200fd24: c2 22 20 4c st %g1, [ %o0 + 0x4c ]
200fd28: d2 06 e0 30 ld [ %i3 + 0x30 ], %o1
200fd2c: 94 07 bf fc add %fp, -4, %o2
200fd30: 7f ff ef 83 call 200bb3c <_Objects_Get>
200fd34: 90 14 20 a0 or %l0, 0xa0, %o0
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
200fd38: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200fd3c: b0 10 40 18 or %g1, %i0, %i0
_Thread_Enable_dispatch();
200fd40: 7f ff f3 6d call 200caf4 <_Thread_Enable_dispatch>
200fd44: f0 22 20 4c st %i0, [ %o0 + 0x4c ]
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
200fd48: c2 0e a0 08 ldub [ %i2 + 8 ], %g1
200fd4c: 84 00 60 01 add %g1, 1, %g2
200fd50: 83 28 60 18 sll %g1, 0x18, %g1
200fd54: 83 38 60 18 sra %g1, 0x18, %g1
200fd58: 80 a0 60 7a cmp %g1, 0x7a
200fd5c: 12 bf ff 24 bne 200f9ec <fifo_open+0x48>
200fd60: c4 2e a0 08 stb %g2, [ %i2 + 8 ]
c = 'a';
200fd64: 82 10 20 61 mov 0x61, %g1
200fd68: 10 bf ff 21 b 200f9ec <fifo_open+0x48>
200fd6c: c2 2e a0 08 stb %g1, [ %i2 + 8 ]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
200fd70: 80 a6 20 00 cmp %i0, 0
200fd74: 12 80 00 24 bne 200fe04 <fifo_open+0x460> <== NEVER TAKEN
200fd78: d0 07 60 38 ld [ %i5 + 0x38 ], %o0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200fd7c: 7f ff e9 07 call 200a198 <rtems_semaphore_release>
200fd80: f6 27 00 00 st %i3, [ %i4 ]
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200fd84: 10 bf ff 2a b 200fa2c <fifo_open+0x88>
200fd88: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
200fd8c: 92 10 20 01 mov 1, %o1
200fd90: 94 10 20 54 mov 0x54, %o2
200fd94: 96 10 20 00 clr %o3
200fd98: 11 14 12 54 sethi %hi(0x50495000), %o0
200fd9c: 7f ff e8 0e call 2009dd4 <rtems_semaphore_create>
200fda0: 90 12 20 45 or %o0, 0x45, %o0 ! 50495045 <RAM_END+0x4e095045>
200fda4: b4 10 00 08 mov %o0, %i2
200fda8: d0 06 e1 a4 ld [ %i3 + 0x1a4 ], %o0
200fdac: 7f ff e8 fb call 200a198 <rtems_semaphore_release>
200fdb0: b0 10 3f f4 mov -12, %i0
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
200fdb4: 80 a6 a0 00 cmp %i2, 0
200fdb8: 12 bf ff 29 bne 200fa5c <fifo_open+0xb8>
200fdbc: d0 07 60 38 ld [ %i5 + 0x38 ], %o0
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200fdc0: 10 bf ff 01 b 200f9c4 <fifo_open+0x20>
200fdc4: 92 10 20 00 clr %o1
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200fdc8: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200fdcc: 40 00 07 1c call 2011a3c <rtems_barrier_release>
200fdd0: 92 07 bf f8 add %fp, -8, %o1
if (pipe->Writers == 0) {
200fdd4: 10 bf ff 2c b 200fa84 <fifo_open+0xe0>
200fdd8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200fddc: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200fde0: 40 00 07 17 call 2011a3c <rtems_barrier_release>
200fde4: 92 07 bf f8 add %fp, -8, %o1
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200fde8: 10 bf ff 84 b 200fbf8 <fifo_open+0x254>
200fdec: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
200fdf0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200fdf4: 40 00 07 12 call 2011a3c <rtems_barrier_release>
200fdf8: 92 07 bf f8 add %fp, -8, %o1
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200fdfc: 10 bf ff 59 b 200fb60 <fifo_open+0x1bc>
200fe00: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200fe04: 40 00 06 e5 call 2011998 <rtems_barrier_delete> <== NOT EXECUTED
200fe08: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
200fe0c: 40 00 06 e3 call 2011998 <rtems_barrier_delete> <== NOT EXECUTED
200fe10: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
200fe14: 7f ff e8 60 call 2009f94 <rtems_semaphore_delete> <== NOT EXECUTED
200fe18: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
free(pipe->Buffer);
200fe1c: 7f ff d7 27 call 2005ab8 <free> <== NOT EXECUTED
200fe20: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free(pipe);
200fe24: 7f ff d7 25 call 2005ab8 <free> <== NOT EXECUTED
200fe28: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200fe2c: 7f ff e8 db call 200a198 <rtems_semaphore_release>
200fe30: d0 07 60 38 ld [ %i5 + 0x38 ], %o0
200fe34: 81 c7 e0 08 ret
200fe38: 81 e8 00 00 restore
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
200fe3c: 7f ff e8 d7 call 200a198 <rtems_semaphore_release>
200fe40: b0 10 3f fa mov -6, %i0
err = -ENXIO;
goto out_error;
200fe44: 10 bf ff 2d b 200faf8 <fifo_open+0x154>
200fe48: 90 10 00 1c mov %i4, %o0
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
200fe4c: 40 00 06 d3 call 2011998 <rtems_barrier_delete>
200fe50: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
200fe54: 40 00 06 d1 call 2011998 <rtems_barrier_delete>
200fe58: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0
err_rbar:
free(pipe->Buffer);
200fe5c: 7f ff d7 17 call 2005ab8 <free>
200fe60: d0 06 c0 00 ld [ %i3 ], %o0
err_buf:
free(pipe);
200fe64: 7f ff d7 15 call 2005ab8 <free>
200fe68: 90 10 00 1b mov %i3, %o0
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
200fe6c: 10 bf ff f0 b 200fe2c <fifo_open+0x488>
200fe70: b0 10 3f f4 mov -12, %i0
0200d23c <find_handler>:
const char *type;
rtems_filesystem_fsmount_me_t mount_h;
} find_arg;
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
200d23c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d240: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
200d244: 40 00 14 8a call 201246c <strcmp> <== NOT EXECUTED
200d248: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
200d24c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d250: 12 80 00 05 bne 200d264 <find_handler+0x28> <== NOT EXECUTED
200d254: 82 10 20 00 clr %g1 <== NOT EXECUTED
return false;
} else {
fa->mount_h = entry->mount_h;
200d258: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED
return true;
200d25c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
return false;
} else {
fa->mount_h = entry->mount_h;
200d260: c4 26 60 04 st %g2, [ %i1 + 4 ] <== NOT EXECUTED
return true;
}
}
200d264: b0 08 60 01 and %g1, 1, %i0 <== NOT EXECUTED
200d268: 81 c7 e0 08 ret <== NOT EXECUTED
200d26c: 81 e8 00 00 restore <== NOT EXECUTED
02003de8 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
2003de8: 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);
2003dec: 03 00 80 80 sethi %hi(0x2020000), %g1
2003df0: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 20202fc <rtems_libio_number_iops>
2003df4: 80 a6 00 01 cmp %i0, %g1
2003df8: 1a 80 00 3b bcc 2003ee4 <fpathconf+0xfc>
2003dfc: 03 00 80 83 sethi %hi(0x2020c00), %g1
iop = rtems_libio_iop(fd);
2003e00: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 2020d68 <rtems_libio_iops>
2003e04: b1 2e 20 06 sll %i0, 6, %i0
2003e08: b0 00 40 18 add %g1, %i0, %i0
rtems_libio_check_is_open(iop);
2003e0c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2003e10: 80 88 61 00 btst 0x100, %g1
2003e14: 02 80 00 34 be 2003ee4 <fpathconf+0xfc> <== NEVER TAKEN
2003e18: 80 a6 60 0b cmp %i1, 0xb
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2003e1c: 08 80 00 08 bleu 2003e3c <fpathconf+0x54>
2003e20: 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 );
2003e24: 40 00 39 ed call 20125d8 <__errno>
2003e28: b0 10 3f ff mov -1, %i0
2003e2c: 82 10 20 16 mov 0x16, %g1
2003e30: c2 22 00 00 st %g1, [ %o0 ]
break;
}
return return_value;
}
2003e34: 81 c7 e0 08 ret
2003e38: 81 e8 00 00 restore
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2003e3c: b3 2e 60 02 sll %i1, 2, %i1
2003e40: 05 00 80 0f sethi %hi(0x2003c00), %g2
2003e44: 84 10 a1 b8 or %g2, 0x1b8, %g2 ! 2003db8 <fdatasync+0x6c>
2003e48: c4 00 80 19 ld [ %g2 + %i1 ], %g2
2003e4c: 81 c0 80 00 jmp %g2
2003e50: 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;
2003e54: f0 00 60 5c ld [ %g1 + 0x5c ], %i0
break;
2003e58: 81 c7 e0 08 ret
2003e5c: 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;
2003e60: f0 00 60 50 ld [ %g1 + 0x50 ], %i0
break;
2003e64: 81 c7 e0 08 ret
2003e68: 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;
2003e6c: f0 00 60 64 ld [ %g1 + 0x64 ], %i0
break;
2003e70: 81 c7 e0 08 ret
2003e74: 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;
2003e78: f0 00 60 58 ld [ %g1 + 0x58 ], %i0
break;
2003e7c: 81 c7 e0 08 ret
2003e80: 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;
2003e84: f0 00 60 54 ld [ %g1 + 0x54 ], %i0
break;
2003e88: 81 c7 e0 08 ret
2003e8c: 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;
2003e90: f0 00 60 4c ld [ %g1 + 0x4c ], %i0
break;
2003e94: 81 c7 e0 08 ret
2003e98: 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;
2003e9c: f0 00 60 48 ld [ %g1 + 0x48 ], %i0
break;
2003ea0: 81 c7 e0 08 ret
2003ea4: 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;
2003ea8: f0 00 60 44 ld [ %g1 + 0x44 ], %i0
break;
2003eac: 81 c7 e0 08 ret
2003eb0: 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;
2003eb4: f0 00 60 40 ld [ %g1 + 0x40 ], %i0
break;
2003eb8: 81 c7 e0 08 ret
2003ebc: 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;
2003ec0: f0 00 60 3c ld [ %g1 + 0x3c ], %i0
break;
2003ec4: 81 c7 e0 08 ret
2003ec8: 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;
2003ecc: f0 00 60 38 ld [ %g1 + 0x38 ], %i0
break;
2003ed0: 81 c7 e0 08 ret
2003ed4: 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;
2003ed8: f0 00 60 60 ld [ %g1 + 0x60 ], %i0
break;
2003edc: 81 c7 e0 08 ret
2003ee0: 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);
2003ee4: 40 00 39 bd call 20125d8 <__errno>
2003ee8: b0 10 3f ff mov -1, %i0
2003eec: 82 10 20 09 mov 9, %g1
2003ef0: c2 22 00 00 st %g1, [ %o0 ]
2003ef4: 81 c7 e0 08 ret
2003ef8: 81 e8 00 00 restore
020032f0 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
20032f0: 9d e3 bf a0 save %sp, -96, %sp
MSBUMP(free_calls, 1);
20032f4: 03 00 80 7c sethi %hi(0x201f000), %g1
20032f8: 82 10 63 10 or %g1, 0x310, %g1 ! 201f310 <rtems_malloc_statistics>
20032fc: c4 00 60 0c ld [ %g1 + 0xc ], %g2
#include <stdlib.h>
void free(
void *ptr
)
{
2003300: b2 10 00 18 mov %i0, %i1
MSBUMP(free_calls, 1);
2003304: 84 00 a0 01 inc %g2
if ( !ptr )
2003308: 80 a6 20 00 cmp %i0, 0
200330c: 02 80 00 15 be 2003360 <free+0x70>
2003310: c4 20 60 0c st %g2, [ %g1 + 0xc ]
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2003314: 03 00 80 7d sethi %hi(0x201f400), %g1
2003318: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current>
200331c: 80 a0 60 03 cmp %g1, 3
2003320: 02 80 00 17 be 200337c <free+0x8c> <== ALWAYS TAKEN
2003324: 03 00 80 7c sethi %hi(0x201f000), %g1
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2003328: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 201f064 <rtems_malloc_statistics_helpers>
200332c: 80 a0 60 00 cmp %g1, 0
2003330: 02 80 00 06 be 2003348 <free+0x58>
2003334: 3b 00 80 7a sethi %hi(0x201e800), %i5
(*rtems_malloc_statistics_helpers->at_free)(ptr);
2003338: c2 00 60 08 ld [ %g1 + 8 ], %g1
200333c: 9f c0 40 00 call %g1
2003340: 90 10 00 19 mov %i1, %o0
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
2003344: 3b 00 80 7a sethi %hi(0x201e800), %i5
2003348: d0 07 60 44 ld [ %i5 + 0x44 ], %o0 ! 201e844 <RTEMS_Malloc_Heap>
200334c: 40 00 17 7f call 2009148 <_Protected_heap_Free>
2003350: 92 10 00 19 mov %i1, %o1
2003354: 80 8a 20 ff btst 0xff, %o0
2003358: 22 80 00 04 be,a 2003368 <free+0x78>
200335c: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
2003360: 81 c7 e0 08 ret
2003364: 81 e8 00 00 restore
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
2003368: 31 00 80 74 sethi %hi(0x201d000), %i0
200336c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2
2003370: f6 00 60 1c ld [ %g1 + 0x1c ], %i3
2003374: 40 00 04 1b call 20043e0 <printk>
2003378: 91 ee 22 f0 restore %i0, 0x2f0, %o0
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
200337c: 40 00 00 ad call 2003630 <malloc_is_system_state_OK>
2003380: 01 00 00 00 nop
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2003384: 80 8a 20 ff btst 0xff, %o0
2003388: 12 bf ff e8 bne 2003328 <free+0x38>
200338c: 03 00 80 7c sethi %hi(0x201f000), %g1
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
2003390: 40 00 00 c7 call 20036ac <malloc_deferred_free>
2003394: 81 e8 00 00 restore
02006b60 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2006b60: 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
2006b64: 03 00 80 98 sethi %hi(0x2026000), %g1 <== NOT EXECUTED
2006b68: 82 10 60 7c or %g1, 0x7c, %g1 ! 202607c <rtems_global_user_env><== NOT EXECUTED
2006b6c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
2006b70: 02 80 00 08 be 2006b90 <free_user_env+0x30> <== NOT EXECUTED
2006b74: 01 00 00 00 nop <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2006b78: 7f ff fa bd call 200566c <rtems_filesystem_freenode> <== NOT EXECUTED
2006b7c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
2006b80: 7f ff fa bb call 200566c <rtems_filesystem_freenode> <== NOT EXECUTED
2006b84: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED
free(env);
2006b88: 7f ff fa c0 call 2005688 <free> <== NOT EXECUTED
2006b8c: 81 e8 00 00 restore <== NOT EXECUTED
2006b90: 81 c7 e0 08 ret <== NOT EXECUTED
2006b94: 81 e8 00 00 restore <== NOT EXECUTED
0201d6ac <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
201d6ac: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
201d6b0: 03 00 80 81 sethi %hi(0x2020400), %g1
201d6b4: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 202071c <rtems_libio_number_iops>
201d6b8: 80 a6 00 01 cmp %i0, %g1
201d6bc: 1a 80 00 06 bcc 201d6d4 <getdents+0x28> <== NEVER TAKEN
201d6c0: ba 10 20 00 clr %i5
201d6c4: 03 00 80 84 sethi %hi(0x2021000), %g1
201d6c8: fa 00 62 18 ld [ %g1 + 0x218 ], %i5 ! 2021218 <rtems_libio_iops>
201d6cc: b1 2e 20 06 sll %i0, 6, %i0
201d6d0: ba 07 40 18 add %i5, %i0, %i5
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
201d6d4: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
201d6d8: de 07 60 1c ld [ %i5 + 0x1c ], %o7
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
201d6dc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
201d6e0: f0 07 60 20 ld [ %i5 + 0x20 ], %i0
201d6e4: c8 07 60 24 ld [ %i5 + 0x24 ], %g4
201d6e8: c6 07 60 2c ld [ %i5 + 0x2c ], %g3
201d6ec: de 27 bf ec st %o7, [ %fp + -20 ]
201d6f0: f0 27 bf f0 st %i0, [ %fp + -16 ]
201d6f4: c8 27 bf f4 st %g4, [ %fp + -12 ]
201d6f8: c4 27 bf f8 st %g2, [ %fp + -8 ]
201d6fc: c6 27 bf fc st %g3, [ %fp + -4 ]
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
201d700: 9f c0 40 00 call %g1
201d704: 90 07 bf ec add %fp, -20, %o0
201d708: 80 a2 20 01 cmp %o0, 1
201d70c: 12 80 00 09 bne 201d730 <getdents+0x84>
201d710: 90 10 00 1d mov %i5, %o0
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
201d714: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
201d718: c2 00 60 08 ld [ %g1 + 8 ], %g1
201d71c: 92 10 00 19 mov %i1, %o1
201d720: 9f c0 40 00 call %g1
201d724: 94 10 00 1a mov %i2, %o2
}
201d728: 81 c7 e0 08 ret
201d72c: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
201d730: 7f ff d3 a1 call 20125b4 <__errno>
201d734: b0 10 3f ff mov -1, %i0
201d738: 82 10 20 14 mov 0x14, %g1
201d73c: c2 22 00 00 st %g1, [ %o0 ]
201d740: 81 c7 e0 08 ret
201d744: 81 e8 00 00 restore
02003dd4 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
2003dd4: 9d e3 bf a0 save %sp, -96, %sp
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
2003dd8: 03 00 80 82 sethi %hi(0x2020800), %g1
2003ddc: c2 48 63 90 ldsb [ %g1 + 0x390 ], %g1 ! 2020b90 <etc_passwd_initted.6596>
2003de0: 80 a0 60 00 cmp %g1, 0
2003de4: 12 80 00 05 bne 2003df8 <getgr_r+0x24> <== ALWAYS TAKEN
2003de8: 11 00 80 7b sethi %hi(0x201ec00), %o0
2003dec: 7f ff ff c2 call 2003cf4 <init_etc_passwd_group.part.0> <== NOT EXECUTED
2003df0: 01 00 00 00 nop <== NOT EXECUTED
FILE *fp;
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
2003df4: 11 00 80 7b sethi %hi(0x201ec00), %o0 <== NOT EXECUTED
2003df8: 13 00 80 7d sethi %hi(0x201f400), %o1
2003dfc: 90 12 22 08 or %o0, 0x208, %o0
2003e00: 40 00 3b de call 2012d78 <fopen>
2003e04: 92 12 63 f8 or %o1, 0x3f8, %o1
2003e08: a0 92 20 00 orcc %o0, 0, %l0
2003e0c: 12 80 00 0b bne 2003e38 <getgr_r+0x64>
2003e10: 92 10 00 1a mov %i2, %o1
2003e14: 30 80 00 27 b,a 2003eb0 <getgr_r+0xdc>
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
2003e18: 40 00 40 3f call 2013f14 <strcmp>
2003e1c: 92 10 00 18 mov %i0, %o1
2003e20: 80 a0 00 08 cmp %g0, %o0
2003e24: 82 60 3f ff subx %g0, -1, %g1
} else {
match = (grp->gr_gid == gid);
}
if (match) {
2003e28: 80 a0 60 00 cmp %g1, 0
2003e2c: 12 80 00 14 bne 2003e7c <getgr_r+0xa8>
2003e30: 90 10 00 10 mov %l0, %o0
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
2003e34: 92 10 00 1a mov %i2, %o1
2003e38: 94 10 00 1b mov %i3, %o2
2003e3c: 96 10 00 1c mov %i4, %o3
2003e40: 7f ff ff 06 call 2003a58 <scangr>
2003e44: 90 10 00 10 mov %l0, %o0
2003e48: 80 a2 20 00 cmp %o0, 0
2003e4c: 02 80 00 11 be 2003e90 <getgr_r+0xbc>
2003e50: 80 a6 20 00 cmp %i0, 0
goto error_einval;
if (name) {
2003e54: 32 bf ff f1 bne,a 2003e18 <getgr_r+0x44>
2003e58: d0 06 80 00 ld [ %i2 ], %o0
match = (strcmp(grp->gr_name, name) == 0);
} else {
match = (grp->gr_gid == gid);
2003e5c: c2 16 a0 08 lduh [ %i2 + 8 ], %g1
2003e60: 82 18 40 19 xor %g1, %i1, %g1
2003e64: 80 a0 00 01 cmp %g0, %g1
2003e68: 82 60 3f ff subx %g0, -1, %g1
}
if (match) {
2003e6c: 80 a0 60 00 cmp %g1, 0
2003e70: 02 bf ff f2 be 2003e38 <getgr_r+0x64>
2003e74: 92 10 00 1a mov %i2, %o1
fclose(fp);
2003e78: 90 10 00 10 mov %l0, %o0
2003e7c: 40 00 39 e0 call 20125fc <fclose>
2003e80: b0 10 20 00 clr %i0
*result = grp;
2003e84: f4 27 40 00 st %i2, [ %i5 ]
return 0;
2003e88: 81 c7 e0 08 ret
2003e8c: 81 e8 00 00 restore
}
}
error_einval:
fclose(fp);
2003e90: 40 00 39 db call 20125fc <fclose>
2003e94: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
2003e98: 40 00 39 87 call 20124b4 <__errno>
2003e9c: b0 10 3f ff mov -1, %i0
2003ea0: 82 10 20 16 mov 0x16, %g1
2003ea4: c2 22 00 00 st %g1, [ %o0 ]
}
2003ea8: 81 c7 e0 08 ret
2003eac: 81 e8 00 00 restore
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
2003eb0: 40 00 39 81 call 20124b4 <__errno>
2003eb4: b0 10 3f ff mov -1, %i0
2003eb8: 82 10 20 16 mov 0x16, %g1
2003ebc: c2 22 00 00 st %g1, [ %o0 ]
2003ec0: 81 c7 e0 08 ret
2003ec4: 81 e8 00 00 restore
020041f8 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
20041f8: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED
20041fc: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
2004200: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED
2004204: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
2004208: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
200420c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2004210: 92 10 00 04 mov %g4, %o1 <== NOT EXECUTED
2004214: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
2004218: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
200421c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
2004220: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2004224: 7f ff fe ec call 2003dd4 <getgr_r> <== NOT EXECUTED
2004228: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200418c <getgrnam_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
200418c: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
2004190: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED
2004194: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
2004198: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED
return getgr_r(name, 0, grp, buffer, bufsize, result);
200419c: 92 10 20 00 clr %o1 <== NOT EXECUTED
20041a0: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
20041a4: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
20041a8: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
20041ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20041b0: 7f ff ff 09 call 2003dd4 <getgr_r> <== NOT EXECUTED
20041b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02003744 <getlogin>:
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
*
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
*/
char *getlogin( void )
{
2003744: 9d e3 bf a0 save %sp, -96, %sp
(void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX );
2003748: 3b 00 80 81 sethi %hi(0x2020400), %i5
200374c: f0 07 60 70 ld [ %i5 + 0x70 ], %i0 ! 2020470 <rtems_current_user_env>
)
{
struct passwd *pw;
char *pname;
if ( !name )
2003750: b0 86 20 3a addcc %i0, 0x3a, %i0
2003754: 02 80 00 11 be 2003798 <getlogin+0x54> <== NEVER TAKEN
2003758: 01 00 00 00 nop
return ERANGE;
/* Set the pointer to a default name */
pname = "";
pw = getpwuid(getuid());
200375c: 40 00 03 68 call 20044fc <getuid>
2003760: 01 00 00 00 nop
2003764: 91 2a 20 10 sll %o0, 0x10, %o0
2003768: 40 00 02 47 call 2004084 <getpwuid>
200376c: 91 32 20 10 srl %o0, 0x10, %o0
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
/* Set the pointer to a default name */
pname = "";
2003770: 13 00 80 79 sethi %hi(0x201e400), %o1
pw = getpwuid(getuid());
if ( pw )
2003774: 80 a2 20 00 cmp %o0, 0
2003778: 02 80 00 03 be 2003784 <getlogin+0x40>
200377c: 92 12 63 b8 or %o1, 0x3b8, %o1
pname = pw->pw_name;
2003780: d2 02 00 00 ld [ %o0 ], %o1
strncpy( name, pname, LOGIN_NAME_MAX );
2003784: 90 10 00 18 mov %i0, %o0
2003788: 40 00 44 05 call 201479c <strncpy>
200378c: 94 10 20 09 mov 9, %o2
2003790: f0 07 60 70 ld [ %i5 + 0x70 ], %i0
2003794: b0 06 20 3a add %i0, 0x3a, %i0
*/
char *getlogin( void )
{
(void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX );
return _POSIX_types_Getlogin_buffer;
}
2003798: 81 c7 e0 08 ret
200379c: 81 e8 00 00 restore
020037a0 <getlogin_r>:
*/
int getlogin_r(
char *name,
size_t namesize
)
{
20037a0: 9d e3 bf a0 save %sp, -96, %sp
20037a4: ba 10 00 18 mov %i0, %i5
struct passwd *pw;
char *pname;
if ( !name )
20037a8: 80 a7 60 00 cmp %i5, 0
20037ac: 02 80 00 13 be 20037f8 <getlogin_r+0x58>
20037b0: b0 10 20 0e mov 0xe, %i0
return EFAULT;
if ( namesize < LOGIN_NAME_MAX )
20037b4: 80 a6 60 08 cmp %i1, 8
20037b8: 08 80 00 10 bleu 20037f8 <getlogin_r+0x58> <== ALWAYS TAKEN
20037bc: b0 10 20 22 mov 0x22, %i0
return ERANGE;
/* Set the pointer to a default name */
pname = "";
pw = getpwuid(getuid());
20037c0: 40 00 03 4f call 20044fc <getuid> <== NOT EXECUTED
20037c4: 01 00 00 00 nop <== NOT EXECUTED
20037c8: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED
20037cc: 40 00 02 2e call 2004084 <getpwuid> <== NOT EXECUTED
20037d0: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
/* Set the pointer to a default name */
pname = "";
20037d4: 13 00 80 79 sethi %hi(0x201e400), %o1 <== NOT EXECUTED
pw = getpwuid(getuid());
if ( pw )
20037d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20037dc: 02 80 00 03 be 20037e8 <getlogin_r+0x48> <== NOT EXECUTED
20037e0: 92 12 63 b8 or %o1, 0x3b8, %o1 <== NOT EXECUTED
pname = pw->pw_name;
20037e4: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED
strncpy( name, pname, LOGIN_NAME_MAX );
20037e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20037ec: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
20037f0: 40 00 43 eb call 201479c <strncpy> <== NOT EXECUTED
20037f4: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
20037f8: 81 c7 e0 08 ret
20037fc: 81 e8 00 00 restore
02003fe4 <getpwnam_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
2003fe4: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
2003fe8: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED
2003fec: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
2003ff0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED
return getpw_r(name, 0, pwd, buffer, bufsize, result);
2003ff4: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003ff8: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
2003ffc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
2004000: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
2004004: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2004008: 7f ff ff b0 call 2003ec8 <getpw_r> <== NOT EXECUTED
200400c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02004050 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
2004050: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED
2004054: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
2004058: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED
200405c: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
2004060: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
2004064: 90 10 20 00 clr %o0 <== NOT EXECUTED
2004068: 92 10 00 04 mov %g4, %o1 <== NOT EXECUTED
200406c: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
2004070: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
2004074: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
2004078: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200407c: 7f ff ff 93 call 2003ec8 <getpw_r> <== NOT EXECUTED
2004080: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02010684 <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
2010684: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
2010688: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2
201068c: 80 a0 a0 01 cmp %g2, 1
2010690: 12 80 00 05 bne 20106a4 <imfs_dir_open+0x20> <== NEVER TAKEN
2010694: 82 10 3f ff mov -1, %g1
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
2010698: c0 22 20 10 clr [ %o0 + 0x10 ]
201069c: c0 22 20 14 clr [ %o0 + 0x14 ]
return 0;
20106a0: 82 10 20 00 clr %g1
}
20106a4: 81 c3 e0 08 retl
20106a8: 90 10 00 01 mov %g1, %o0
020106ac <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
20106ac: 9d e3 be 88 save %sp, -376, %sp
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
20106b0: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
20106b4: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20106b8: f8 06 e0 50 ld [ %i3 + 0x50 ], %i4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
20106bc: b6 06 e0 54 add %i3, 0x54, %i3
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
20106c0: 80 a7 00 1b cmp %i4, %i3
20106c4: 02 80 00 34 be 2010794 <imfs_dir_read+0xe8>
20106c8: b0 10 20 00 clr %i0
/* Move to the first of the desired directory entries */
the_node = rtems_chain_first( the_chain );
bytes_transferred = 0;
first_entry = iop->offset;
20106cc: e0 07 60 14 ld [ %i5 + 0x14 ], %l0
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
20106d0: 90 10 00 1a mov %i2, %o0
20106d4: 40 00 27 52 call 201a41c <.udiv>
20106d8: 92 10 21 18 mov 0x118, %o1
for (
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
20106dc: b4 10 20 00 clr %i2
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
20106e0: 83 2a 20 03 sll %o0, 3, %g1
20106e4: 91 2a 20 05 sll %o0, 5, %o0
20106e8: 82 00 40 08 add %g1, %o0, %g1
20106ec: a3 28 60 03 sll %g1, 3, %l1
20106f0: a2 24 40 01 sub %l1, %g1, %l1
20106f4: a2 04 40 10 add %l1, %l0, %l1
/* The directory was not empty so try to move to the desired entry in chain*/
for (
20106f8: 80 a4 60 00 cmp %l1, 0
20106fc: 14 80 00 09 bg 2010720 <imfs_dir_read+0x74> <== ALWAYS TAKEN
2010700: a4 10 21 18 mov 0x118, %l2
2010704: 30 80 00 24 b,a 2010794 <imfs_dir_read+0xe8> <== NOT EXECUTED
2010708: 80 a4 40 1a cmp %l1, %i2
201070c: 04 80 00 22 ble 2010794 <imfs_dir_read+0xe8> <== NEVER TAKEN
2010710: f8 07 00 00 ld [ %i4 ], %i4
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
2010714: 80 a7 00 1b cmp %i4, %i3
2010718: 02 80 00 1f be 2010794 <imfs_dir_read+0xe8>
201071c: 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 ) {
2010720: 80 a4 00 1a cmp %l0, %i2
2010724: 34 bf ff f9 bg,a 2010708 <imfs_dir_read+0x5c>
2010728: b4 06 a1 18 add %i2, 0x118, %i2
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
201072c: c2 07 20 38 ld [ %i4 + 0x38 ], %g1
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
2010730: 85 3e a0 1f sra %i2, 0x1f, %g2
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
2010734: a6 07 20 0c add %i4, 0xc, %l3
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
2010738: c4 27 be f0 st %g2, [ %fp + -272 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
201073c: 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;
2010740: f4 27 be f4 st %i2, [ %fp + -268 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
2010744: e4 37 be f8 sth %l2, [ %fp + -264 ]
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
2010748: 40 00 09 3a call 2012c30 <strlen>
201074c: 90 10 00 13 mov %l3, %o0
strcpy( tmp_dirent.d_name, the_jnode->name );
2010750: 92 10 00 13 mov %l3, %o1
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
2010754: d0 37 be fa sth %o0, [ %fp + -262 ]
strcpy( tmp_dirent.d_name, the_jnode->name );
2010758: 40 00 07 72 call 2012520 <strcpy>
201075c: 90 07 be fc add %fp, -260, %o0
memcpy(
2010760: 90 06 40 18 add %i1, %i0, %o0
2010764: 92 07 be e8 add %fp, -280, %o1
2010768: 40 00 05 f6 call 2011f40 <memcpy>
201076c: 94 10 21 18 mov 0x118, %o2
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
2010770: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
2010774: b4 06 a1 18 add %i2, 0x118, %i2
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
2010778: 86 80 e1 18 addcc %g3, 0x118, %g3
201077c: 84 40 a0 00 addx %g2, 0, %g2
2010780: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
bytes_transferred = bytes_transferred + sizeof( struct dirent );
2010784: 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 (
2010788: 80 a4 40 1a cmp %l1, %i2
201078c: 14 bf ff e2 bg 2010714 <imfs_dir_read+0x68> <== NEVER TAKEN
2010790: f8 07 00 00 ld [ %i4 ], %i4
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
2010794: 81 c7 e0 08 ret
2010798: 81 e8 00 00 restore
020108f4 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
20108f4: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
20108f8: fa 06 40 00 ld [ %i1 ], %i5
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
20108fc: c4 07 60 50 ld [ %i5 + 0x50 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2010900: 82 07 60 54 add %i5, 0x54, %g1
2010904: 80 a0 80 01 cmp %g2, %g1
2010908: 12 80 00 18 bne 2010968 <imfs_dir_rmnod+0x74>
201090c: 01 00 00 00 nop
2010910: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
/*
* You cannot remove the file system root node.
*/
if ( rtems_filesystem_is_root_location(pathloc) )
2010914: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2010918: 80 a7 40 01 cmp %i5, %g1
201091c: 02 80 00 0d be 2010950 <imfs_dir_rmnod+0x5c>
2010920: 01 00 00 00 nop
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
2010924: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
2010928: 80 a0 60 00 cmp %g1, 0
201092c: 12 80 00 09 bne 2010950 <imfs_dir_rmnod+0x5c> <== NEVER TAKEN
2010930: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
2010934: 7f ff f0 45 call 200ca48 <IMFS_create_orphan>
2010938: 90 10 00 1d mov %i5, %o0
IMFS_check_node_remove( the_jnode );
201093c: 90 10 00 1d mov %i5, %o0
2010940: 7f ff f0 54 call 200ca90 <IMFS_check_node_remove>
2010944: b0 10 20 00 clr %i0
return 0;
}
2010948: 81 c7 e0 08 ret
201094c: 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 );
2010950: 40 00 03 20 call 20115d0 <__errno>
2010954: b0 10 3f ff mov -1, %i0
2010958: 82 10 20 10 mov 0x10, %g1
201095c: c2 22 00 00 st %g1, [ %o0 ]
2010960: 81 c7 e0 08 ret
2010964: 81 e8 00 00 restore
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
2010968: 40 00 03 1a call 20115d0 <__errno>
201096c: b0 10 3f ff mov -1, %i0
2010970: 82 10 20 5a mov 0x5a, %g1
2010974: c2 22 00 00 st %g1, [ %o0 ]
2010978: 81 c7 e0 08 ret
201097c: 81 e8 00 00 restore
02003fbc <init_etc_passwd_group>:
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
2003fbc: 03 00 80 82 sethi %hi(0x2020800), %g1 <== NOT EXECUTED
2003fc0: c2 48 63 90 ldsb [ %g1 + 0x390 ], %g1 ! 2020b90 <etc_passwd_initted.6596><== NOT EXECUTED
2003fc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003fc8: 02 80 00 04 be 2003fd8 <init_etc_passwd_group+0x1c> <== NOT EXECUTED
2003fcc: 01 00 00 00 nop <== NOT EXECUTED
2003fd0: 81 c3 e0 08 retl <== NOT EXECUTED
2003fd4: 01 00 00 00 nop <== NOT EXECUTED
2003fd8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003fdc: 7f ff ff 46 call 2003cf4 <init_etc_passwd_group.part.0> <== NOT EXECUTED
2003fe0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02003cf4 <init_etc_passwd_group.part.0>:
static struct group grent;
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
2003cf4: 9d e3 bf a0 save %sp, -96, %sp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
2003cf8: 84 10 20 01 mov 1, %g2
2003cfc: 03 00 80 82 sethi %hi(0x2020800), %g1
mkdir("/etc", 0777);
2003d00: 92 10 21 ff mov 0x1ff, %o1
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
2003d04: c4 28 63 90 stb %g2, [ %g1 + 0x390 ]
mkdir("/etc", 0777);
2003d08: 11 00 80 7b sethi %hi(0x201ec00), %o0
2003d0c: 40 00 02 e3 call 2004898 <mkdir>
2003d10: 90 12 21 80 or %o0, 0x180, %o0 ! 201ed80 <rtems_status_assoc+0x1a0>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
2003d14: 39 00 80 7b sethi %hi(0x201ec00), %i4
2003d18: 3b 00 80 7d sethi %hi(0x201f400), %i5
2003d1c: 90 17 21 88 or %i4, 0x188, %o0
2003d20: 40 00 3c 16 call 2012d78 <fopen>
2003d24: 92 17 63 f8 or %i5, 0x3f8, %o1
2003d28: 80 a2 20 00 cmp %o0, 0
2003d2c: 22 80 00 1b be,a 2003d98 <init_etc_passwd_group.part.0+0xa4>
2003d30: 90 17 21 88 or %i4, 0x188, %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);
2003d34: 40 00 3a 32 call 20125fc <fclose>
2003d38: 01 00 00 00 nop
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
2003d3c: 39 00 80 7b sethi %hi(0x201ec00), %i4
2003d40: 92 17 63 f8 or %i5, 0x3f8, %o1
2003d44: 40 00 3c 0d call 2012d78 <fopen>
2003d48: 90 17 22 08 or %i4, 0x208, %o0
2003d4c: 80 a2 20 00 cmp %o0, 0
2003d50: 22 80 00 04 be,a 2003d60 <init_etc_passwd_group.part.0+0x6c>
2003d54: 90 17 22 08 or %i4, 0x208, %o0
fclose(fp);
2003d58: 40 00 3a 29 call 20125fc <fclose>
2003d5c: 91 e8 00 08 restore %g0, %o0, %o0
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
2003d60: 13 00 80 7b sethi %hi(0x201ec00), %o1
2003d64: 40 00 3c 05 call 2012d78 <fopen>
2003d68: 92 12 61 98 or %o1, 0x198, %o1 ! 201ed98 <rtems_status_assoc+0x1b8>
2003d6c: b0 92 20 00 orcc %o0, 0, %i0
2003d70: 02 80 00 17 be 2003dcc <init_etc_passwd_group.part.0+0xd8><== NEVER TAKEN
2003d74: 01 00 00 00 nop
fprintf( fp, "root:x:0:root\n"
2003d78: 92 10 20 01 mov 1, %o1 ! 1 <PROM_START+0x1>
2003d7c: 11 00 80 7b sethi %hi(0x201ec00), %o0
2003d80: 94 10 20 2a mov 0x2a, %o2
2003d84: 96 10 00 18 mov %i0, %o3
2003d88: 40 00 3e 00 call 2013588 <fwrite>
2003d8c: 90 12 22 18 or %o0, 0x218, %o0
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
2003d90: 40 00 3a 1b call 20125fc <fclose>
2003d94: 81 e8 00 00 restore
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
2003d98: 13 00 80 7b sethi %hi(0x201ec00), %o1
2003d9c: 40 00 3b f7 call 2012d78 <fopen>
2003da0: 92 12 61 98 or %o1, 0x198, %o1 ! 201ed98 <rtems_status_assoc+0x1b8>
2003da4: b0 92 20 00 orcc %o0, 0, %i0
2003da8: 02 bf ff e5 be 2003d3c <init_etc_passwd_group.part.0+0x48><== NEVER TAKEN
2003dac: 92 10 20 01 mov 1, %o1
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
2003db0: 94 10 20 66 mov 0x66, %o2
2003db4: 96 10 00 18 mov %i0, %o3
2003db8: 11 00 80 7b sethi %hi(0x201ec00), %o0
2003dbc: 40 00 3d f3 call 2013588 <fwrite>
2003dc0: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 201eda0 <rtems_status_assoc+0x1c0>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
2003dc4: 10 bf ff dc b 2003d34 <init_etc_passwd_group.part.0+0x40>
2003dc8: 90 10 00 18 mov %i0, %o0
2003dcc: 81 c7 e0 08 ret <== NOT EXECUTED
2003dd0: 81 e8 00 00 restore <== NOT EXECUTED
02005728 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2005728: 9d e3 bf 98 save %sp, -104, %sp
if (tty->termios.c_iflag & ISTRIP)
200572c: c2 06 60 30 ld [ %i1 + 0x30 ], %g1
2005730: 80 88 60 20 btst 0x20, %g1
2005734: 02 80 00 03 be 2005740 <iproc+0x18> <== ALWAYS TAKEN
2005738: ba 10 00 18 mov %i0, %i5
c &= 0x7f;
200573c: ba 0e 20 7f and %i0, 0x7f, %i5 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
2005740: 80 88 62 00 btst 0x200, %g1
2005744: 02 80 00 0d be 2005778 <iproc+0x50>
2005748: 80 a7 60 0d cmp %i5, 0xd
c = tolower (c);
200574c: 05 00 80 7a sethi %hi(0x201e800), %g2
2005750: c6 00 a3 34 ld [ %g2 + 0x334 ], %g3 ! 201eb34 <__ctype_ptr__>
2005754: 84 10 00 1d mov %i5, %g2
2005758: ba 00 c0 1d add %g3, %i5, %i5
200575c: c6 0f 60 01 ldub [ %i5 + 1 ], %g3
2005760: 86 08 e0 03 and %g3, 3, %g3
2005764: 80 a0 e0 01 cmp %g3, 1
2005768: 22 80 00 02 be,a 2005770 <iproc+0x48>
200576c: 84 00 a0 20 add %g2, 0x20, %g2
2005770: ba 08 a0 ff and %g2, 0xff, %i5
if (c == '\r') {
2005774: 80 a7 60 0d cmp %i5, 0xd
2005778: 02 80 00 17 be 20057d4 <iproc+0xac>
200577c: 80 a7 60 0a cmp %i5, 0xa
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
2005780: 02 80 00 41 be 2005884 <iproc+0x15c>
2005784: 80 a7 60 00 cmp %i5, 0
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2005788: 32 80 00 1a bne,a 20057f0 <iproc+0xc8> <== ALWAYS TAKEN
200578c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
2005790: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2005794: 05 00 80 7a sethi %hi(0x201e800), %g2
2005798: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2 ! 201e968 <rtems_termios_cbufsize>
200579c: 84 00 bf ff add %g2, -1, %g2
20057a0: 80 a0 40 02 cmp %g1, %g2
20057a4: 1a 80 00 7b bcc 2005990 <iproc+0x268> <== NEVER TAKEN
20057a8: b0 10 20 00 clr %i0
if (tty->termios.c_lflag & ECHO)
20057ac: c4 06 60 3c ld [ %i1 + 0x3c ], %g2
20057b0: 80 88 a0 08 btst 8, %g2
20057b4: 12 80 00 39 bne 2005898 <iproc+0x170> <== ALWAYS TAKEN
20057b8: 80 88 a2 00 btst 0x200, %g2
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
20057bc: c6 06 60 1c ld [ %i1 + 0x1c ], %g3
20057c0: 84 00 60 01 add %g1, 1, %g2
20057c4: fa 28 c0 01 stb %i5, [ %g3 + %g1 ]
20057c8: c4 26 60 20 st %g2, [ %i1 + 0x20 ]
}
return 0;
}
20057cc: 81 c7 e0 08 ret
20057d0: 91 e8 20 00 restore %g0, 0, %o0
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
20057d4: 80 88 60 80 btst 0x80, %g1
20057d8: 12 80 00 6e bne 2005990 <iproc+0x268> <== NEVER TAKEN
20057dc: b0 10 20 00 clr %i0
return 0;
if (tty->termios.c_iflag & ICRNL)
20057e0: 80 88 61 00 btst 0x100, %g1
20057e4: 32 80 00 02 bne,a 20057ec <iproc+0xc4> <== ALWAYS TAKEN
20057e8: ba 10 20 0a mov 0xa, %i5
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
20057ec: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
20057f0: 80 88 60 02 btst 2, %g1
20057f4: 22 bf ff e8 be,a 2005794 <iproc+0x6c>
20057f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
if (c == tty->termios.c_cc[VERASE]) {
20057fc: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2
2005800: 80 a0 80 1d cmp %g2, %i5
2005804: 22 80 00 72 be,a 20059cc <iproc+0x2a4>
2005808: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
200580c: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2
2005810: 90 08 a0 ff and %g2, 0xff, %o0
2005814: 80 a2 00 1d cmp %o0, %i5
2005818: 22 80 00 53 be,a 2005964 <iproc+0x23c>
200581c: c6 06 60 20 ld [ %i1 + 0x20 ], %g3
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
2005820: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2
2005824: 80 a0 80 1d cmp %g2, %i5
2005828: 02 80 00 5a be 2005990 <iproc+0x268> <== NEVER TAKEN
200582c: b0 10 20 01 mov 1, %i0
return 1;
} else if (c == '\n') {
2005830: 80 a7 60 0a cmp %i5, 0xa
2005834: 02 80 00 59 be 2005998 <iproc+0x270>
2005838: 80 88 60 48 btst 0x48, %g1
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
200583c: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2
2005840: 80 a0 80 1d cmp %g2, %i5
2005844: 02 80 00 07 be 2005860 <iproc+0x138> <== NEVER TAKEN
2005848: 80 88 60 08 btst 8, %g1
200584c: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2
2005850: 80 a0 80 1d cmp %g2, %i5
2005854: 32 bf ff d0 bne,a 2005794 <iproc+0x6c> <== ALWAYS TAKEN
2005858: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
200585c: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2005860: 12 80 00 2b bne 200590c <iproc+0x1e4> <== NOT EXECUTED
2005864: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2005868: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
200586c: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
2005870: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
2005874: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] <== NOT EXECUTED
2005878: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
return 1;
200587c: 81 c7 e0 08 ret <== NOT EXECUTED
2005880: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
2005884: 80 88 60 40 btst 0x40, %g1
2005888: 32 bf ff d9 bne,a 20057ec <iproc+0xc4> <== NEVER TAKEN
200588c: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2005890: 10 bf ff d8 b 20057f0 <iproc+0xc8>
2005894: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
2005898: 02 80 00 19 be 20058fc <iproc+0x1d4> <== NEVER TAKEN
200589c: 90 10 00 1d mov %i5, %o0
iscntrl(c) && (c != '\t') && (c != '\n')) {
20058a0: 03 00 80 7a sethi %hi(0x201e800), %g1
20058a4: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__>
20058a8: 82 00 40 1d add %g1, %i5, %g1
20058ac: c2 08 60 01 ldub [ %g1 + 1 ], %g1
20058b0: 80 88 60 20 btst 0x20, %g1
20058b4: 02 80 00 12 be 20058fc <iproc+0x1d4>
20058b8: 80 a7 60 09 cmp %i5, 9
20058bc: 02 80 00 10 be 20058fc <iproc+0x1d4>
20058c0: 80 a7 60 0a cmp %i5, 0xa
20058c4: 02 80 00 0e be 20058fc <iproc+0x1d4> <== NEVER TAKEN
20058c8: 84 10 20 5e mov 0x5e, %g2
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
20058cc: 82 1f 60 40 xor %i5, 0x40, %g1
20058d0: c2 2f bf f9 stb %g1, [ %fp + -7 ]
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
20058d4: c4 2f bf f8 stb %g2, [ %fp + -8 ]
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
20058d8: 90 07 bf f8 add %fp, -8, %o0
20058dc: 92 10 20 02 mov 2, %o1
20058e0: 7f ff fe 2b call 200518c <rtems_termios_puts>
20058e4: 94 10 00 19 mov %i1, %o2
tty->column += 2;
20058e8: c4 06 60 28 ld [ %i1 + 0x28 ], %g2
20058ec: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
20058f0: 84 00 a0 02 add %g2, 2, %g2
20058f4: 10 bf ff b2 b 20057bc <iproc+0x94>
20058f8: c4 26 60 28 st %g2, [ %i1 + 0x28 ]
} else {
oproc (c, tty);
20058fc: 7f ff fe 74 call 20052cc <oproc>
2005900: 92 10 00 19 mov %i1, %o1
2005904: 10 bf ff ae b 20057bc <iproc+0x94>
2005908: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
200590c: 02 80 00 38 be 20059ec <iproc+0x2c4> <== NOT EXECUTED
2005910: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
2005914: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED
2005918: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED
200591c: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED
2005920: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED
2005924: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2005928: 02 80 00 31 be 20059ec <iproc+0x2c4> <== NOT EXECUTED
200592c: 80 a7 60 09 cmp %i5, 9 <== NOT EXECUTED
2005930: 02 80 00 2f be 20059ec <iproc+0x2c4> <== NOT EXECUTED
2005934: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2005938: 82 1f 60 40 xor %i5, 0x40, %g1 <== NOT EXECUTED
200593c: c2 2f bf f9 stb %g1, [ %fp + -7 ] <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2005940: c4 2f bf f8 stb %g2, [ %fp + -8 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
2005944: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
2005948: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200594c: 7f ff fe 10 call 200518c <rtems_termios_puts> <== NOT EXECUTED
2005950: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += 2;
2005954: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2005958: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
200595c: 10 bf ff c3 b 2005868 <iproc+0x140> <== NOT EXECUTED
2005960: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
2005964: 80 a0 e0 00 cmp %g3, 0
2005968: 02 80 00 0a be 2005990 <iproc+0x268> <== NEVER TAKEN
200596c: b0 10 20 00 clr %i0
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2005970: 80 88 60 08 btst 8, %g1
2005974: 02 80 00 22 be 20059fc <iproc+0x2d4> <== NEVER TAKEN
2005978: 80 88 60 10 btst 0x10, %g1
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
200597c: 02 80 00 23 be 2005a08 <iproc+0x2e0> <== NEVER TAKEN
2005980: 80 88 62 00 btst 0x200, %g1
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
2005984: 90 10 00 19 mov %i1, %o0
2005988: 7f ff fe d9 call 20054ec <erase.part.2>
200598c: 92 10 20 01 mov 1, %o1
2005990: 81 c7 e0 08 ret
2005994: 81 e8 00 00 restore
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
2005998: 22 80 00 06 be,a 20059b0 <iproc+0x288> <== NEVER TAKEN
200599c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
20059a0: 90 10 20 0a mov 0xa, %o0
20059a4: 7f ff fe 4a call 20052cc <oproc>
20059a8: 92 10 00 19 mov %i1, %o1
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
20059ac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
20059b0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
20059b4: 86 10 20 0a mov 0xa, %g3
20059b8: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
20059bc: 82 00 60 01 inc %g1
20059c0: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
return 1;
20059c4: 81 c7 e0 08 ret
20059c8: 91 e8 20 01 restore %g0, 1, %o0
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
20059cc: 80 a0 60 00 cmp %g1, 0
20059d0: 02 bf ff f0 be 2005990 <iproc+0x268>
20059d4: b0 10 20 00 clr %i0
20059d8: 90 10 00 19 mov %i1, %o0
20059dc: 7f ff fe c4 call 20054ec <erase.part.2>
20059e0: 92 10 20 00 clr %o1
20059e4: 81 c7 e0 08 ret
20059e8: 81 e8 00 00 restore
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
20059ec: 7f ff fe 38 call 20052cc <oproc> <== NOT EXECUTED
20059f0: 92 10 00 19 mov %i1, %o1 <== 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);
tty->cbuf[tty->ccount++] = c;
20059f4: 10 bf ff 9e b 200586c <iproc+0x144> <== NOT EXECUTED
20059f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
20059fc: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
2005a00: 81 c7 e0 08 ret <== NOT EXECUTED
2005a04: 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) &&
2005a08: 02 80 00 0d be 2005a3c <iproc+0x314> <== NOT EXECUTED
2005a0c: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
2005a10: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED
2005a14: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__><== NOT EXECUTED
2005a18: 82 00 40 1d add %g1, %i5, %g1 <== NOT EXECUTED
2005a1c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED
2005a20: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2005a24: 02 80 00 06 be 2005a3c <iproc+0x314> <== NOT EXECUTED
2005a28: 80 a7 60 09 cmp %i5, 9 <== NOT EXECUTED
2005a2c: 02 80 00 04 be 2005a3c <iproc+0x314> <== NOT EXECUTED
2005a30: 80 a7 60 0a cmp %i5, 0xa <== NOT EXECUTED
2005a34: 12 80 00 0d bne 2005a68 <iproc+0x340> <== NOT EXECUTED
2005a38: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
2005a3c: 7f ff fe 24 call 20052cc <oproc> <== NOT EXECUTED
2005a40: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
2005a44: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2005a48: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2005a4c: 02 bf ff d1 be 2005990 <iproc+0x268> <== NOT EXECUTED
2005a50: b0 10 20 00 clr %i0 <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
2005a54: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
2005a58: 7f ff fe 1d call 20052cc <oproc> <== NOT EXECUTED
2005a5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2005a60: 81 c7 e0 08 ret <== NOT EXECUTED
2005a64: 81 e8 00 00 restore <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2005a68: 84 18 a0 40 xor %g2, 0x40, %g2 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2005a6c: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
2005a70: c4 2f bf f9 stb %g2, [ %fp + -7 ] <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
2005a74: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
2005a78: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2005a7c: 7f ff fd c4 call 200518c <rtems_termios_puts> <== NOT EXECUTED
2005a80: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += 2;
2005a84: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2005a88: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
2005a8c: 10 bf ff ee b 2005a44 <iproc+0x31c> <== NOT EXECUTED
2005a90: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
020039dc <is_node_fs_root>:
static bool is_node_fs_root(
const rtems_filesystem_mount_table_entry_t *mt_entry,
void *arg
)
{
return arg == mt_entry->mt_fs_root.node_access;
20039dc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED
20039e0: 82 18 40 09 xor %g1, %o1, %g1 <== NOT EXECUTED
}
20039e4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
20039e8: 81 c3 e0 08 retl <== NOT EXECUTED
20039ec: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
0201bf60 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
201bf60: 9d e3 bf 90 save %sp, -112, %sp
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
201bf64: 7f ff ff 3a call 201bc4c <getpid>
201bf68: 01 00 00 00 nop
201bf6c: 80 a2 00 18 cmp %o0, %i0
201bf70: 12 80 00 af bne 201c22c <killinfo+0x2cc>
201bf74: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
201bf78: 02 80 00 b3 be 201c244 <killinfo+0x2e4>
201bf7c: 82 06 7f ff add %i1, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201bf80: 80 a0 60 1f cmp %g1, 0x1f
201bf84: 18 80 00 b0 bgu 201c244 <killinfo+0x2e4>
201bf88: b7 2e 60 02 sll %i1, 2, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
201bf8c: 39 00 80 7e sethi %hi(0x201f800), %i4
201bf90: a1 2e 60 04 sll %i1, 4, %l0
201bf94: b8 17 22 60 or %i4, 0x260, %i4
201bf98: 84 24 00 1b sub %l0, %i3, %g2
201bf9c: 84 07 00 02 add %i4, %g2, %g2
201bfa0: c4 00 a0 08 ld [ %g2 + 8 ], %g2
201bfa4: 80 a0 a0 01 cmp %g2, 1
201bfa8: 02 80 00 3f be 201c0a4 <killinfo+0x144>
201bfac: b0 10 20 00 clr %i0
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
201bfb0: 80 a6 60 04 cmp %i1, 4
201bfb4: 02 80 00 3e be 201c0ac <killinfo+0x14c>
201bfb8: 80 a6 60 08 cmp %i1, 8
201bfbc: 02 80 00 3c be 201c0ac <killinfo+0x14c>
201bfc0: 80 a6 60 0b cmp %i1, 0xb
201bfc4: 02 80 00 3a be 201c0ac <killinfo+0x14c>
201bfc8: ba 10 20 01 mov 1, %i5
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
201bfcc: f2 27 bf f4 st %i1, [ %fp + -12 ]
siginfo->si_code = SI_USER;
201bfd0: fa 27 bf f8 st %i5, [ %fp + -8 ]
if ( !value ) {
201bfd4: 80 a6 a0 00 cmp %i2, 0
201bfd8: 02 80 00 3b be 201c0c4 <killinfo+0x164>
201bfdc: bb 2f 40 01 sll %i5, %g1, %i5
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
201bfe0: c2 06 80 00 ld [ %i2 ], %g1
201bfe4: c2 27 bf fc st %g1, [ %fp + -4 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
201bfe8: 03 00 80 7d sethi %hi(0x201f400), %g1
201bfec: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201f4c0 <_Thread_Dispatch_disable_level>
201bff0: 84 00 a0 01 inc %g2
201bff4: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
return _Thread_Dispatch_disable_level;
201bff8: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
201bffc: 03 00 80 7e sethi %hi(0x201f800), %g1
201c000: d0 00 62 0c ld [ %g1 + 0x20c ], %o0 ! 201fa0c <_Per_CPU_Information+0xc>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
201c004: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
201c008: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1
201c00c: 80 af 40 01 andncc %i5, %g1, %g0
201c010: 12 80 00 16 bne 201c068 <killinfo+0x108>
201c014: 07 00 80 7e sethi %hi(0x201f800), %g3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
201c018: d0 00 e3 ec ld [ %g3 + 0x3ec ], %o0 ! 201fbec <_POSIX_signals_Wait_queue>
201c01c: 86 10 e3 ec or %g3, 0x3ec, %g3
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
201c020: 86 00 e0 04 add %g3, 4, %g3
201c024: 80 a2 00 03 cmp %o0, %g3
201c028: 32 80 00 0d bne,a 201c05c <killinfo+0xfc>
201c02c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201c030: 10 80 00 27 b 201c0cc <killinfo+0x16c>
201c034: 03 00 80 79 sethi %hi(0x201e400), %g1
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
201c038: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1
201c03c: 80 af 40 01 andncc %i5, %g1, %g0
201c040: 12 80 00 0b bne 201c06c <killinfo+0x10c>
201c044: 92 10 00 19 mov %i1, %o1
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
201c048: d0 02 00 00 ld [ %o0 ], %o0
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
201c04c: 80 a2 00 03 cmp %o0, %g3
201c050: 02 80 00 1f be 201c0cc <killinfo+0x16c> <== ALWAYS TAKEN
201c054: 03 00 80 79 sethi %hi(0x201e400), %g1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
201c058: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 <== NOT EXECUTED
201c05c: 80 8f 40 01 btst %i5, %g1
201c060: 02 bf ff f6 be 201c038 <killinfo+0xd8>
201c064: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
201c068: 92 10 00 19 mov %i1, %o1
201c06c: 40 00 00 8d call 201c2a0 <_POSIX_signals_Unblock_thread>
201c070: 94 07 bf f4 add %fp, -12, %o2
201c074: 80 8a 20 ff btst 0xff, %o0
201c078: 12 80 00 5a bne 201c1e0 <killinfo+0x280>
201c07c: 01 00 00 00 nop
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
201c080: 40 00 00 7f call 201c27c <_POSIX_signals_Set_process_signals>
201c084: 90 10 00 1d mov %i5, %o0
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
201c088: b6 24 00 1b sub %l0, %i3, %i3
201c08c: c2 07 00 1b ld [ %i4 + %i3 ], %g1
201c090: 80 a0 60 02 cmp %g1, 2
201c094: 02 80 00 57 be 201c1f0 <killinfo+0x290>
201c098: 11 00 80 7e sethi %hi(0x201f800), %o0
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
201c09c: 7f ff b7 62 call 2009e24 <_Thread_Enable_dispatch>
201c0a0: b0 10 20 00 clr %i0
return 0;
}
201c0a4: 81 c7 e0 08 ret
201c0a8: 81 e8 00 00 restore
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
201c0ac: 40 00 01 0f call 201c4e8 <pthread_self>
201c0b0: 01 00 00 00 nop
201c0b4: 40 00 00 d2 call 201c3fc <pthread_kill>
201c0b8: 92 10 00 19 mov %i1, %o1
201c0bc: 81 c7 e0 08 ret
201c0c0: 91 e8 00 08 restore %g0, %o0, %o0
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
201c0c4: 10 bf ff c9 b 201bfe8 <killinfo+0x88>
201c0c8: c0 27 bf fc clr [ %fp + -4 ]
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201c0cc: c8 08 63 a0 ldub [ %g1 + 0x3a0 ], %g4
201c0d0: 1b 00 80 7d sethi %hi(0x201f400), %o5
201c0d4: 88 01 20 01 inc %g4
201c0d8: 9a 13 60 30 or %o5, 0x30, %o5
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
201c0dc: 90 10 20 00 clr %o0
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
201c0e0: 98 03 60 08 add %o5, 8, %o4
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
201c0e4: 15 04 00 00 sethi %hi(0x10000000), %o2
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
201c0e8: c2 03 40 00 ld [ %o5 ], %g1
201c0ec: 80 a0 60 00 cmp %g1, 0
201c0f0: 22 80 00 31 be,a 201c1b4 <killinfo+0x254> <== NEVER TAKEN
201c0f4: 9a 03 60 04 add %o5, 4, %o5 <== NOT EXECUTED
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
201c0f8: c2 00 60 04 ld [ %g1 + 4 ], %g1
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
201c0fc: f4 10 60 10 lduh [ %g1 + 0x10 ], %i2
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201c100: 80 a6 a0 00 cmp %i2, 0
201c104: 02 80 00 2b be 201c1b0 <killinfo+0x250>
201c108: f0 00 60 1c ld [ %g1 + 0x1c ], %i0
201c10c: 82 10 20 01 mov 1, %g1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
201c110: 85 28 60 02 sll %g1, 2, %g2
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
the_thread = (Thread_Control *) object_table[ index ];
201c114: c4 06 00 02 ld [ %i0 + %g2 ], %g2
if ( !the_thread )
201c118: 80 a0 a0 00 cmp %g2, 0
201c11c: 22 80 00 22 be,a 201c1a4 <killinfo+0x244>
201c120: 82 00 60 01 inc %g1
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
201c124: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3
201c128: 80 a0 c0 04 cmp %g3, %g4
201c12c: 38 80 00 1e bgu,a 201c1a4 <killinfo+0x244>
201c130: 82 00 60 01 inc %g1
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
201c134: de 00 a1 5c ld [ %g2 + 0x15c ], %o7
201c138: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7
201c13c: 80 af 40 0f andncc %i5, %o7, %g0
201c140: 22 80 00 19 be,a 201c1a4 <killinfo+0x244>
201c144: 82 00 60 01 inc %g1
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
201c148: 80 a0 c0 04 cmp %g3, %g4
201c14c: 2a 80 00 14 bcs,a 201c19c <killinfo+0x23c>
201c150: 88 10 00 03 mov %g3, %g4
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
201c154: 80 a2 20 00 cmp %o0, 0
201c158: 22 80 00 13 be,a 201c1a4 <killinfo+0x244> <== NEVER TAKEN
201c15c: 82 00 60 01 inc %g1 <== NOT EXECUTED
201c160: de 02 20 10 ld [ %o0 + 0x10 ], %o7
201c164: 80 a3 e0 00 cmp %o7, 0
201c168: 22 80 00 0f be,a 201c1a4 <killinfo+0x244> <== NEVER TAKEN
201c16c: 82 00 60 01 inc %g1 <== NOT EXECUTED
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201c170: d6 00 a0 10 ld [ %g2 + 0x10 ], %o3
201c174: 80 a2 e0 00 cmp %o3, 0
201c178: 22 80 00 09 be,a 201c19c <killinfo+0x23c>
201c17c: 88 10 00 03 mov %g3, %g4
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
201c180: 80 8b c0 0a btst %o7, %o2
201c184: 32 80 00 08 bne,a 201c1a4 <killinfo+0x244>
201c188: 82 00 60 01 inc %g1
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
201c18c: 80 8a c0 0a btst %o3, %o2
201c190: 22 80 00 05 be,a 201c1a4 <killinfo+0x244>
201c194: 82 00 60 01 inc %g1
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201c198: 88 10 00 03 mov %g3, %g4
201c19c: 90 10 00 02 mov %g2, %o0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201c1a0: 82 00 60 01 inc %g1
201c1a4: 80 a6 80 01 cmp %i2, %g1
201c1a8: 1a bf ff db bcc 201c114 <killinfo+0x1b4>
201c1ac: 85 28 60 02 sll %g1, 2, %g2
201c1b0: 9a 03 60 04 add %o5, 4, %o5
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
201c1b4: 80 a3 40 0c cmp %o5, %o4
201c1b8: 32 bf ff cd bne,a 201c0ec <killinfo+0x18c>
201c1bc: c2 03 40 00 ld [ %o5 ], %g1
}
}
}
}
if ( interested ) {
201c1c0: 80 a2 20 00 cmp %o0, 0
201c1c4: 02 bf ff af be 201c080 <killinfo+0x120>
201c1c8: 92 10 00 19 mov %i1, %o1
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
201c1cc: 40 00 00 35 call 201c2a0 <_POSIX_signals_Unblock_thread>
201c1d0: 94 07 bf f4 add %fp, -12, %o2
201c1d4: 80 8a 20 ff btst 0xff, %o0
201c1d8: 02 bf ff aa be 201c080 <killinfo+0x120> <== ALWAYS TAKEN
201c1dc: 01 00 00 00 nop
_Thread_Enable_dispatch();
201c1e0: 7f ff b7 11 call 2009e24 <_Thread_Enable_dispatch>
201c1e4: b0 10 20 00 clr %i0 ! 0 <PROM_START>
return 0;
201c1e8: 81 c7 e0 08 ret
201c1ec: 81 e8 00 00 restore
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
201c1f0: 7f ff ae f7 call 2007dcc <_Chain_Get>
201c1f4: 90 12 23 e0 or %o0, 0x3e0, %o0
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
201c1f8: 92 92 20 00 orcc %o0, 0, %o1
201c1fc: 02 80 00 18 be 201c25c <killinfo+0x2fc>
201c200: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201c204: 11 00 80 7f sethi %hi(0x201fc00), %o0
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
201c208: c2 22 60 08 st %g1, [ %o1 + 8 ]
201c20c: c2 07 bf f8 ld [ %fp + -8 ], %g1
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201c210: 90 12 20 58 or %o0, 0x58, %o0
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
201c214: c2 22 60 0c st %g1, [ %o1 + 0xc ]
201c218: c2 07 bf fc ld [ %fp + -4 ], %g1
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201c21c: 90 02 00 1b add %o0, %i3, %o0
201c220: 7f ff ae d7 call 2007d7c <_Chain_Append>
201c224: c2 22 60 10 st %g1, [ %o1 + 0x10 ]
201c228: 30 bf ff 9d b,a 201c09c <killinfo+0x13c>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
201c22c: 7f ff d4 e9 call 20115d0 <__errno>
201c230: b0 10 3f ff mov -1, %i0
201c234: 82 10 20 03 mov 3, %g1
201c238: c2 22 00 00 st %g1, [ %o0 ]
201c23c: 81 c7 e0 08 ret
201c240: 81 e8 00 00 restore
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
201c244: 7f ff d4 e3 call 20115d0 <__errno>
201c248: b0 10 3f ff mov -1, %i0
201c24c: 82 10 20 16 mov 0x16, %g1
201c250: c2 22 00 00 st %g1, [ %o0 ]
201c254: 81 c7 e0 08 ret
201c258: 81 e8 00 00 restore
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
201c25c: 7f ff b6 f2 call 2009e24 <_Thread_Enable_dispatch>
201c260: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EAGAIN );
201c264: 7f ff d4 db call 20115d0 <__errno>
201c268: 01 00 00 00 nop
201c26c: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
201c270: c2 22 00 00 st %g1, [ %o0 ]
201c274: 81 c7 e0 08 ret
201c278: 81 e8 00 00 restore
02003dd8 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
2003dd8: 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()))
2003ddc: 03 00 80 7d sethi %hi(0x201f400), %g1
2003de0: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current>
2003de4: 80 a0 60 03 cmp %g1, 3
2003de8: 02 80 00 04 be 2003df8 <libc_wrapup+0x20> <== ALWAYS TAKEN
2003dec: 3b 00 80 7a sethi %hi(0x201e800), %i5
2003df0: 81 c7 e0 08 ret <== NOT EXECUTED
2003df4: 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) {
2003df8: 05 00 80 77 sethi %hi(0x201dc00), %g2
2003dfc: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
2003e00: f8 00 a0 d8 ld [ %g2 + 0xd8 ], %i4
2003e04: 80 a0 40 1c cmp %g1, %i4
2003e08: 02 80 00 05 be 2003e1c <libc_wrapup+0x44>
2003e0c: 01 00 00 00 nop
_wrapup_reent(_global_impure_ptr);
2003e10: 40 00 39 2c call 20122c0 <_wrapup_reent>
2003e14: 90 10 00 1c mov %i4, %o0
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
2003e18: f8 27 63 38 st %i4, [ %i5 + 0x338 ]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
2003e1c: 40 00 36 3f call 2011718 <fclose>
2003e20: d0 07 20 04 ld [ %i4 + 4 ], %o0
fclose (stdout);
2003e24: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
2003e28: 40 00 36 3c call 2011718 <fclose>
2003e2c: d0 00 60 08 ld [ %g1 + 8 ], %o0
fclose (stderr);
2003e30: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
2003e34: f0 00 60 0c ld [ %g1 + 0xc ], %i0
2003e38: 40 00 36 38 call 2011718 <fclose>
2003e3c: 81 e8 00 00 restore
02005a60 <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
2005a60: 9d e3 bf 88 save %sp, -120, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2005a64: 80 a6 60 00 cmp %i1, 0
2005a68: 02 80 00 1b be 2005ad4 <lstat+0x74> <== NEVER TAKEN
2005a6c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
2005a70: 40 00 3f 7f call 201586c <strlen>
2005a74: 90 10 00 18 mov %i0, %o0
2005a78: 94 10 20 00 clr %o2
2005a7c: 92 10 00 08 mov %o0, %o1
2005a80: 96 07 bf ec add %fp, -20, %o3
2005a84: 90 10 00 18 mov %i0, %o0
2005a88: 98 10 20 00 clr %o4
2005a8c: 7f ff fd 91 call 20050d0 <rtems_filesystem_evaluate_path>
2005a90: b0 10 3f ff mov -1, %i0
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
2005a94: 80 a2 20 00 cmp %o0, 0
2005a98: 12 80 00 0d bne 2005acc <lstat+0x6c>
2005a9c: 92 10 20 00 clr %o1
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
2005aa0: 94 10 20 48 mov 0x48, %o2
2005aa4: 40 00 3c 0f call 2014ae0 <memset>
2005aa8: 90 10 00 19 mov %i1, %o0
status = (*loc.handlers->fstat_h)( &loc, buf );
2005aac: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005ab0: 92 10 00 19 mov %i1, %o1
2005ab4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2005ab8: 9f c0 40 00 call %g1
2005abc: 90 07 bf ec add %fp, -20, %o0
2005ac0: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2005ac4: 7f ff fe 2b call 2005370 <rtems_filesystem_freenode>
2005ac8: 90 07 bf ec add %fp, -20, %o0
return status;
}
2005acc: 81 c7 e0 08 ret
2005ad0: 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 );
2005ad4: 40 00 39 6b call 2014080 <__errno> <== NOT EXECUTED
2005ad8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005adc: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2005ae0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2005ae4: 81 c7 e0 08 ret <== NOT EXECUTED
2005ae8: 81 e8 00 00 restore <== NOT EXECUTED
020037c0 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
20037c0: 9d e3 bf a0 save %sp, -96, %sp
void *return_this;
MSBUMP(malloc_calls, 1);
20037c4: 03 00 80 7c sethi %hi(0x201f000), %g1
20037c8: 82 10 63 10 or %g1, 0x310, %g1 ! 201f310 <rtems_malloc_statistics>
20037cc: c4 00 60 04 ld [ %g1 + 4 ], %g2
#include "malloc_p.h"
void *malloc(
size_t size
)
{
20037d0: ba 10 00 18 mov %i0, %i5
void *return_this;
MSBUMP(malloc_calls, 1);
20037d4: 84 00 a0 01 inc %g2
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
20037d8: 7f ff ff a8 call 2003678 <malloc_deferred_frees_process>
20037dc: c4 20 60 04 st %g2, [ %g1 + 4 ]
/*
* Validate the parameters
*/
if ( !size )
20037e0: 80 a7 60 00 cmp %i5, 0
20037e4: 02 80 00 1e be 200385c <malloc+0x9c>
20037e8: b0 10 20 00 clr %i0
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
20037ec: 03 00 80 7d sethi %hi(0x201f400), %g1
20037f0: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current>
20037f4: 80 a0 60 03 cmp %g1, 3
20037f8: 02 80 00 1b be 2003864 <malloc+0xa4>
20037fc: 03 00 80 7a sethi %hi(0x201e800), %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 );
2003800: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201e844 <RTEMS_Malloc_Heap>
2003804: 92 10 00 1d mov %i5, %o1
2003808: 94 10 20 00 clr %o2
200380c: 40 00 16 41 call 2009110 <_Protected_heap_Allocate_aligned_with_boundary>
2003810: 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 ) {
2003814: b0 92 20 00 orcc %o0, 0, %i0
2003818: 02 80 00 21 be 200389c <malloc+0xdc> <== NEVER TAKEN
200381c: 03 00 80 7c sethi %hi(0x201f000), %g1
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
2003820: 03 00 80 7c sethi %hi(0x201f000), %g1
2003824: c2 00 60 5c ld [ %g1 + 0x5c ], %g1 ! 201f05c <rtems_malloc_dirty_helper>
2003828: 80 a0 60 00 cmp %g1, 0
200382c: 02 80 00 04 be 200383c <malloc+0x7c>
2003830: 90 10 00 18 mov %i0, %o0
(*rtems_malloc_dirty_helper)( return_this, size );
2003834: 9f c0 40 00 call %g1
2003838: 92 10 00 1d mov %i5, %o1
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200383c: 03 00 80 7c sethi %hi(0x201f000), %g1
2003840: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 201f064 <rtems_malloc_statistics_helpers>
2003844: 80 a0 60 00 cmp %g1, 0
2003848: 02 80 00 25 be 20038dc <malloc+0x11c>
200384c: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
2003850: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003854: 9f c0 40 00 call %g1
2003858: 90 10 00 18 mov %i0, %o0
return return_this;
}
200385c: 81 c7 e0 08 ret
2003860: 81 e8 00 00 restore
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
2003864: 7f ff ff 73 call 2003630 <malloc_is_system_state_OK>
2003868: 01 00 00 00 nop
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200386c: 80 8a 20 ff btst 0xff, %o0
2003870: 02 bf ff fb be 200385c <malloc+0x9c> <== NEVER TAKEN
2003874: 03 00 80 7a sethi %hi(0x201e800), %g1
2003878: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201e844 <RTEMS_Malloc_Heap>
200387c: 92 10 00 1d mov %i5, %o1
2003880: 94 10 20 00 clr %o2
2003884: 40 00 16 23 call 2009110 <_Protected_heap_Allocate_aligned_with_boundary>
2003888: 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 ) {
200388c: b0 92 20 00 orcc %o0, 0, %i0
2003890: 12 bf ff e5 bne 2003824 <malloc+0x64>
2003894: 03 00 80 7c sethi %hi(0x201f000), %g1
if (rtems_malloc_sbrk_helpers)
2003898: 03 00 80 7c sethi %hi(0x201f000), %g1
200389c: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201f060 <rtems_malloc_sbrk_helpers>
20038a0: 80 a0 60 00 cmp %g1, 0
20038a4: 02 80 00 0a be 20038cc <malloc+0x10c>
20038a8: 01 00 00 00 nop
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
20038ac: c2 00 60 04 ld [ %g1 + 4 ], %g1
20038b0: 9f c0 40 00 call %g1
20038b4: 90 10 00 1d mov %i5, %o0
if ( !return_this ) {
20038b8: 80 a2 20 00 cmp %o0, 0
20038bc: 02 80 00 04 be 20038cc <malloc+0x10c>
20038c0: 01 00 00 00 nop
20038c4: 10 bf ff d7 b 2003820 <malloc+0x60>
20038c8: b0 10 00 08 mov %o0, %i0
errno = ENOMEM;
20038cc: 40 00 37 41 call 20115d0 <__errno>
20038d0: 01 00 00 00 nop
20038d4: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
20038d8: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
20038dc: 81 c7 e0 08 ret
20038e0: 81 e8 00 00 restore
020038ac <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
20038ac: 9d e3 bf a0 save %sp, -96, %sp
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
20038b0: 03 00 80 7d sethi %hi(0x201f400), %g1
20038b4: fa 00 63 38 ld [ %g1 + 0x338 ], %i5 ! 201f738 <RTEMS_Malloc_Sbrk_amount>
if ( sbrk_amount == 0 )
20038b8: 80 a7 60 00 cmp %i5, 0
20038bc: 02 80 00 20 be 200393c <malloc_sbrk_extend_and_allocate+0x90><== NEVER TAKEN
20038c0: b2 10 00 18 mov %i0, %i1
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
20038c4: 92 10 00 1d mov %i5, %o1
20038c8: 40 00 5b a5 call 201a75c <.udiv>
20038cc: 90 06 00 1d add %i0, %i5, %o0
20038d0: 40 00 5b 69 call 201a674 <.umul>
20038d4: 92 10 00 1d mov %i5, %o1
starting_address = (void *) sbrk(the_size);
20038d8: 7f ff f6 d3 call 2001424 <sbrk>
20038dc: ba 10 00 08 mov %o0, %i5
if ( starting_address == (void*) -1 )
20038e0: 80 a2 3f ff cmp %o0, -1
20038e4: 02 80 00 16 be 200393c <malloc_sbrk_extend_and_allocate+0x90>
20038e8: 92 10 00 08 mov %o0, %o1
return (void *) 0;
if ( !_Protected_heap_Extend(
20038ec: 39 00 80 7a sethi %hi(0x201e800), %i4
20038f0: d0 07 22 d4 ld [ %i4 + 0x2d4 ], %o0 ! 201ead4 <RTEMS_Malloc_Heap>
20038f4: 40 00 16 01 call 20090f8 <_Protected_heap_Extend>
20038f8: 94 10 00 1d mov %i5, %o2
20038fc: 80 8a 20 ff btst 0xff, %o0
2003900: 02 80 00 09 be 2003924 <malloc_sbrk_extend_and_allocate+0x78>
2003904: 03 00 80 7d sethi %hi(0x201f400), %g1
2003908: f0 07 22 d4 ld [ %i4 + 0x2d4 ], %i0
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
200390c: c4 00 63 08 ld [ %g1 + 0x308 ], %g2
2003910: b4 10 20 00 clr %i2
2003914: ba 07 40 02 add %i5, %g2, %i5
2003918: fa 20 63 08 st %i5, [ %g1 + 0x308 ]
200391c: 40 00 15 e9 call 20090c0 <_Protected_heap_Allocate_aligned_with_boundary>
2003920: 97 e8 20 00 restore %g0, 0, %o3
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
2003924: 7f ff f6 c0 call 2001424 <sbrk>
2003928: 90 20 00 1d neg %i5, %o0
errno = ENOMEM;
200392c: 40 00 37 f9 call 2011910 <__errno>
2003930: 01 00 00 00 nop
2003934: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
2003938: c2 22 00 00 st %g1, [ %o0 ]
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
200393c: 81 c7 e0 08 ret
2003940: 91 e8 20 00 restore %g0, 0, %o0
02003944 <malloc_sbrk_initialize>:
void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
2003944: 9d e3 bf a0 save %sp, -96, %sp
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
2003948: 03 00 80 7d sethi %hi(0x201f400), %g1
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
200394c: 80 a6 20 00 cmp %i0, 0
2003950: 02 80 00 04 be 2003960 <malloc_sbrk_initialize+0x1c>
2003954: f2 20 63 38 st %i1, [ %g1 + 0x338 ]
}
starting_address = (void *)uaddress;
}
return starting_address;
}
2003958: 81 c7 e0 08 ret
200395c: 81 e8 00 00 restore
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
2003960: 7f ff f6 b1 call 2001424 <sbrk>
2003964: 90 10 00 19 mov %i1, %o0
if (uaddress == (uintptr_t) -1) {
2003968: 80 a2 3f ff cmp %o0, -1
200396c: 02 80 00 08 be 200398c <malloc_sbrk_initialize+0x48> <== ALWAYS TAKEN
2003970: 80 8a 20 07 btst 7, %o0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
2003974: 02 80 00 04 be 2003984 <malloc_sbrk_initialize+0x40> <== NOT EXECUTED
2003978: 01 00 00 00 nop <== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
200397c: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED
2003980: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
2003984: 81 c7 e0 08 ret <== NOT EXECUTED
2003988: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
if (uaddress == (uintptr_t) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
200398c: 40 00 10 29 call 2007a30 <rtems_fatal_error_occurred>
2003990: 90 10 20 1a mov 0x1a, %o0
020103fc <memfile_alloc_block>:
* Allocate a block for an in-memory file.
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
20103fc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
2010400: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
2010404: d2 00 60 84 ld [ %g1 + 0x84 ], %o1 ! 201f084 <imfs_memfile_bytes_per_block><== NOT EXECUTED
2010408: 7f ff ca 97 call 2002e64 <calloc> <== NOT EXECUTED
201040c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
if ( memory )
2010410: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2010414: 02 80 00 05 be 2010428 <memfile_alloc_block+0x2c> <== NOT EXECUTED
2010418: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
memfile_blocks_allocated++;
201041c: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
2010420: 84 00 a0 01 inc %g2 <== NOT EXECUTED
2010424: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
return memory;
}
2010428: 81 c7 e0 08 ret <== NOT EXECUTED
201042c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02010430 <memfile_free_block>:
* Free a block from an in-memory file.
*/
void memfile_free_block(
void *memory
)
{
2010430: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
free(memory);
2010434: 7f ff cb af call 20032f0 <free> <== NOT EXECUTED
2010438: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
memfile_blocks_allocated--;
201043c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED
2010440: c4 00 61 94 ld [ %g1 + 0x194 ], %g2 ! 201f194 <memfile_blocks_allocated><== NOT EXECUTED
2010444: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
2010448: c4 20 61 94 st %g2, [ %g1 + 0x194 ] <== NOT EXECUTED
}
201044c: 81 c7 e0 08 ret <== NOT EXECUTED
2010450: 81 e8 00 00 restore <== NOT EXECUTED
0200f8d4 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
200f8d4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
200f8d8: 37 00 80 7c sethi %hi(0x201f000), %i3 <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200f8dc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
200f8e0: 04 80 00 12 ble 200f928 <memfile_free_blocks_in_table+0x54><== NOT EXECUTED
200f8e4: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
200f8e8: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
200f8ec: b8 10 20 00 clr %i4 <== NOT EXECUTED
if ( b[i] ) {
200f8f0: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
200f8f4: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED
200f8f8: 02 80 00 08 be 200f918 <memfile_free_blocks_in_table+0x44><== NOT EXECUTED
200f8fc: b8 07 20 01 inc %i4 <== NOT EXECUTED
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f900: 7f ff ce 7c call 20032f0 <free> <== NOT EXECUTED
200f904: 01 00 00 00 nop <== NOT EXECUTED
memfile_blocks_allocated--;
200f908: c2 06 e1 94 ld [ %i3 + 0x194 ], %g1 <== NOT EXECUTED
200f90c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200f910: c2 26 e1 94 st %g1, [ %i3 + 0x194 ] <== NOT EXECUTED
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
200f914: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200f918: 80 a7 00 19 cmp %i4, %i1 <== NOT EXECUTED
200f91c: 12 bf ff f5 bne 200f8f0 <memfile_free_blocks_in_table+0x1c><== NOT EXECUTED
200f920: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED
200f924: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
*/
void memfile_free_block(
void *memory
)
{
free(memory);
200f928: 7f ff ce 72 call 20032f0 <free> <== NOT EXECUTED
200f92c: 01 00 00 00 nop <== NOT EXECUTED
memfile_blocks_allocated--;
200f930: c2 06 e1 94 ld [ %i3 + 0x194 ], %g1 <== NOT EXECUTED
200f934: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200f938: c2 26 e1 94 st %g1, [ %i3 + 0x194 ] <== NOT EXECUTED
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
*block_table = 0;
200f93c: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED
}
200f940: 81 c7 e0 08 ret <== NOT EXECUTED
200f944: 81 e8 00 00 restore <== NOT EXECUTED
0200f5f0 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
200f5f0: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
200f5f4: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
200f5f8: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
200f5fc: 80 a0 40 19 cmp %g1, %i1
200f600: 06 80 00 13 bl 200f64c <memfile_ftruncate+0x5c> <== NEVER TAKEN
200f604: 03 00 80 7c sethi %hi(0x201f000), %g1
200f608: 22 80 00 0d be,a 200f63c <memfile_ftruncate+0x4c>
200f60c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
/*
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
200f610: f2 27 60 50 st %i1, [ %i5 + 0x50 ]
200f614: f4 27 60 54 st %i2, [ %i5 + 0x54 ]
iop->size = the_jnode->info.file.size;
200f618: f2 26 20 08 st %i1, [ %i0 + 8 ]
200f61c: f4 26 20 0c st %i2, [ %i0 + 0xc ]
IMFS_update_atime( the_jnode );
200f620: 90 07 bf f8 add %fp, -8, %o0
200f624: 7f ff cf 5d call 2003398 <gettimeofday>
200f628: 92 10 20 00 clr %o1
200f62c: c2 07 bf f8 ld [ %fp + -8 ], %g1
200f630: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return 0;
}
200f634: 81 c7 e0 08 ret
200f638: 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 )
200f63c: 80 a0 40 1a cmp %g1, %i2
200f640: 3a bf ff f5 bcc,a 200f614 <memfile_ftruncate+0x24>
200f644: f2 27 60 50 st %i1, [ %i5 + 0x50 ]
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f648: 03 00 80 7c sethi %hi(0x201f000), %g1
200f64c: f6 00 60 84 ld [ %g1 + 0x84 ], %i3 ! 201f084 <imfs_memfile_bytes_per_block>
200f650: b9 36 e0 02 srl %i3, 2, %i4
200f654: 92 10 00 1c mov %i4, %o1
200f658: 40 00 2b 37 call 201a334 <.umul>
200f65c: 90 07 20 01 add %i4, 1, %o0
200f660: 92 10 00 1c mov %i4, %o1
200f664: 40 00 2b 34 call 201a334 <.umul>
200f668: 90 02 20 01 inc %o0
200f66c: 92 10 00 1b mov %i3, %o1
200f670: 40 00 2b 31 call 201a334 <.umul>
200f674: 90 02 3f ff add %o0, -1, %o0
200f678: 82 10 20 00 clr %g1
200f67c: 80 a0 40 19 cmp %g1, %i1
200f680: 04 80 00 08 ble 200f6a0 <memfile_ftruncate+0xb0> <== ALWAYS TAKEN
200f684: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
200f688: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200f68c: 92 10 00 19 mov %i1, %o1
200f690: 7f ff fe ee call 200f248 <IMFS_memfile_extend.part.1>
200f694: 94 10 00 1a mov %i2, %o2
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
return IMFS_memfile_extend( the_jnode, length );
200f698: 81 c7 e0 08 ret
200f69c: 91 e8 00 08 restore %g0, %o0, %o0
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f6a0: 12 80 00 04 bne 200f6b0 <memfile_ftruncate+0xc0> <== NEVER TAKEN
200f6a4: 80 a2 00 1a cmp %o0, %i2
200f6a8: 18 bf ff f9 bgu 200f68c <memfile_ftruncate+0x9c> <== ALWAYS TAKEN
200f6ac: 90 10 00 1d mov %i5, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
200f6b0: 40 00 07 c8 call 20115d0 <__errno> <== NOT EXECUTED
200f6b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f6b8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200f6bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f6c0: 81 c7 e0 08 ret <== NOT EXECUTED
200f6c4: 81 e8 00 00 restore <== NOT EXECUTED
0200f4b0 <memfile_lseek>:
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
200f4b0: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
200f4b4: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
if (the_jnode->type == IMFS_LINEAR_FILE) {
200f4b8: c2 06 e0 4c ld [ %i3 + 0x4c ], %g1
200f4bc: 80 a0 60 06 cmp %g1, 6
200f4c0: 02 80 00 25 be 200f554 <memfile_lseek+0xa4>
200f4c4: 03 00 80 7c sethi %hi(0x201f000), %g1
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f4c8: f2 00 60 84 ld [ %g1 + 0x84 ], %i1 ! 201f084 <imfs_memfile_bytes_per_block>
if (the_jnode->type == IMFS_LINEAR_FILE) {
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 ))
200f4cc: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f4d0: b5 36 60 02 srl %i1, 2, %i2
200f4d4: 92 10 00 1a mov %i2, %o1
200f4d8: 40 00 2b 97 call 201a334 <.umul>
200f4dc: 90 06 a0 01 add %i2, 1, %o0
200f4e0: 92 10 00 1a mov %i2, %o1
200f4e4: 40 00 2b 94 call 201a334 <.umul>
200f4e8: 90 02 20 01 inc %o0
200f4ec: 92 10 00 19 mov %i1, %o1
200f4f0: 40 00 2b 91 call 201a334 <.umul>
200f4f4: 90 02 3f ff add %o0, -1, %o0
200f4f8: 82 10 20 00 clr %g1
200f4fc: 80 a0 40 1c cmp %g1, %i4
200f500: 04 80 00 2d ble 200f5b4 <memfile_lseek+0x104>
200f504: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200f508: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1
200f50c: 80 a7 00 01 cmp %i4, %g1
200f510: 04 80 00 23 ble 200f59c <memfile_lseek+0xec> <== ALWAYS TAKEN
200f514: c4 06 e0 54 ld [ %i3 + 0x54 ], %g2
200f518: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f51c: 92 10 00 1c mov %i4, %o1
200f520: 7f ff ff 4a call 200f248 <IMFS_memfile_extend.part.1>
200f524: 94 10 00 1d mov %i5, %o2
if (the_jnode->type == IMFS_LINEAR_FILE) {
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 ))
200f528: 80 a2 20 00 cmp %o0, 0
200f52c: 12 80 00 2a bne 200f5d4 <memfile_lseek+0x124>
200f530: 01 00 00 00 nop
200f534: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1
200f538: c4 06 e0 54 ld [ %i3 + 0x54 ], %g2
200f53c: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
200f540: c2 26 20 08 st %g1, [ %i0 + 8 ]
200f544: c4 26 20 0c st %g2, [ %i0 + 0xc ]
}
return iop->offset;
}
200f548: b0 10 00 1c mov %i4, %i0
200f54c: 81 c7 e0 08 ret
200f550: 93 e8 00 1d restore %g0, %i5, %o1
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
200f554: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
200f558: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1
200f55c: 80 a7 00 01 cmp %i4, %g1
200f560: 14 80 00 08 bg 200f580 <memfile_lseek+0xd0> <== NEVER TAKEN
200f564: c4 06 e0 54 ld [ %i3 + 0x54 ], %g2
200f568: 80 a7 00 01 cmp %i4, %g1
200f56c: 32 bf ff f8 bne,a 200f54c <memfile_lseek+0x9c> <== NEVER TAKEN
200f570: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
200f574: 80 a7 40 02 cmp %i5, %g2
200f578: 28 bf ff f5 bleu,a 200f54c <memfile_lseek+0x9c> <== ALWAYS TAKEN
200f57c: b0 10 00 1c mov %i4, %i0
iop->offset = the_jnode->info.linearfile.size;
200f580: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED
200f584: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED
200f588: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED
200f58c: ba 10 00 02 mov %g2, %i5 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
200f590: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
200f594: 81 c7 e0 08 ret <== NOT EXECUTED
200f598: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200f59c: 12 bf ff e9 bne 200f540 <memfile_lseek+0x90>
200f5a0: 80 a7 40 02 cmp %i5, %g2
200f5a4: 18 bf ff de bgu 200f51c <memfile_lseek+0x6c>
200f5a8: 90 10 00 1b mov %i3, %o0
}
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 );
iop->size = the_jnode->info.file.size;
200f5ac: 10 bf ff e6 b 200f544 <memfile_lseek+0x94>
200f5b0: c2 26 20 08 st %g1, [ %i0 + 8 ]
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200f5b4: 12 80 00 04 bne 200f5c4 <memfile_lseek+0x114> <== NEVER TAKEN
200f5b8: 80 a2 00 1d cmp %o0, %i5
200f5bc: 38 bf ff d4 bgu,a 200f50c <memfile_lseek+0x5c>
200f5c0: c2 06 e0 50 ld [ %i3 + 0x50 ], %g1
rtems_set_errno_and_return_minus_one( EINVAL );
200f5c4: 40 00 08 03 call 20115d0 <__errno>
200f5c8: 01 00 00 00 nop
200f5cc: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
200f5d0: c2 22 00 00 st %g1, [ %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 ))
rtems_set_errno_and_return_minus_one( ENOSPC );
200f5d4: 40 00 07 ff call 20115d0 <__errno>
200f5d8: 39 3f ff ff sethi %hi(0xfffffc00), %i4
200f5dc: 82 10 20 1c mov 0x1c, %g1
200f5e0: b8 17 23 ff or %i4, 0x3ff, %i4
200f5e4: c2 22 00 00 st %g1, [ %o0 ]
200f5e8: 10 bf ff d8 b 200f548 <memfile_lseek+0x98>
200f5ec: ba 10 00 1c mov %i4, %i5
020102b8 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
20102b8: 9d e3 bf a0 save %sp, -96, %sp
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
20102bc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
20102c0: ba 10 00 18 mov %i0, %i5
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
20102c4: 80 88 62 04 btst 0x204, %g1
20102c8: 02 80 00 06 be 20102e0 <memfile_open+0x28>
20102cc: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
20102d0: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
20102d4: 80 a0 a0 06 cmp %g2, 6
20102d8: 22 80 00 0c be,a 2010308 <memfile_open+0x50> <== NEVER TAKEN
20102dc: d8 07 20 54 ld [ %i4 + 0x54 ], %o4 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
20102e0: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
20102e4: 80 88 62 00 btst 0x200, %g1
20102e8: 22 80 00 05 be,a 20102fc <memfile_open+0x44>
20102ec: c4 3f 60 08 std %g2, [ %i5 + 8 ]
iop->offset = the_jnode->info.file.size;
20102f0: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
20102f4: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2
iop->size = the_jnode->info.file.size;
20102f8: c4 3f 60 08 std %g2, [ %i5 + 8 ]
return 0;
20102fc: b0 10 20 00 clr %i0
}
2010300: 81 c7 e0 08 ret
2010304: 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;
2010308: d6 07 20 58 ld [ %i4 + 0x58 ], %o3 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
201030c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
2010310: c0 27 20 50 clr [ %i4 + 0x50 ] <== NOT EXECUTED
2010314: c0 27 20 54 clr [ %i4 + 0x54 ] <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
2010318: c2 27 20 4c st %g1, [ %i4 + 0x4c ] <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
201031c: c0 27 20 58 clr [ %i4 + 0x58 ] <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
2010320: c0 27 20 5c clr [ %i4 + 0x5c ] <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
2010324: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED
2010328: 12 80 00 06 bne 2010340 <memfile_open+0x88> <== NOT EXECUTED
201032c: c0 27 20 60 clr [ %i4 + 0x60 ] <== NOT EXECUTED
2010330: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
2010334: 84 10 20 00 clr %g2 <== NOT EXECUTED
2010338: 10 bf ff eb b 20102e4 <memfile_open+0x2c> <== NOT EXECUTED
201033c: 86 10 20 00 clr %g3 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
2010340: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2010344: 92 10 20 00 clr %o1 <== NOT EXECUTED
2010348: 94 10 20 00 clr %o2 <== NOT EXECUTED
201034c: 7f ff ff 1f call 200ffc8 <IMFS_memfile_write> <== NOT EXECUTED
2010350: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2010354: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2010358: 02 bf ff ea be 2010300 <memfile_open+0x48> <== NOT EXECUTED
201035c: 01 00 00 00 nop <== NOT EXECUTED
2010360: 10 bf ff e0 b 20102e0 <memfile_open+0x28> <== NOT EXECUTED
2010364: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED
02003900 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2003900: 9d e3 bf 80 save %sp, -128, %sp
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2003904: 05 00 00 10 sethi %hi(0x4000), %g2
2003908: 03 00 00 3c sethi %hi(0xf000), %g1
200390c: 82 0e 40 01 and %i1, %g1, %g1
2003910: 80 a0 40 02 cmp %g1, %g2
2003914: 02 80 00 18 be 2003974 <mknod+0x74>
2003918: 90 10 00 18 mov %i0, %o0
200391c: 08 80 00 0f bleu 2003958 <mknod+0x58>
2003920: 05 00 00 04 sethi %hi(0x1000), %g2
2003924: 05 00 00 18 sethi %hi(0x6000), %g2
2003928: 80 a0 40 02 cmp %g1, %g2
200392c: 02 80 00 12 be 2003974 <mknod+0x74>
2003930: 05 00 00 20 sethi %hi(0x8000), %g2
2003934: 80 a0 40 02 cmp %g1, %g2
2003938: 02 80 00 10 be 2003978 <mknod+0x78> <== ALWAYS TAKEN
200393c: 92 07 bf f8 add %fp, -8, %o1
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2003940: 40 00 37 24 call 20115d0 <__errno>
2003944: b0 10 3f ff mov -1, %i0
2003948: 82 10 20 16 mov 0x16, %g1
200394c: c2 22 00 00 st %g1, [ %o0 ]
2003950: 81 c7 e0 08 ret
2003954: 81 e8 00 00 restore
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2003958: 80 a0 40 02 cmp %g1, %g2
200395c: 02 80 00 05 be 2003970 <mknod+0x70>
2003960: 05 00 00 08 sethi %hi(0x2000), %g2
2003964: 80 a0 40 02 cmp %g1, %g2
2003968: 12 bf ff f6 bne 2003940 <mknod+0x40>
200396c: 01 00 00 00 nop
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2003970: 90 10 00 18 mov %i0, %o0
2003974: 92 07 bf f8 add %fp, -8, %o1
2003978: 40 00 02 fe call 2004570 <rtems_filesystem_get_start_loc>
200397c: 94 07 bf e4 add %fp, -28, %o2
result = (*temp_loc.ops->evalformake_h)(
2003980: c2 07 bf f0 ld [ %fp + -16 ], %g1
2003984: d0 07 bf f8 ld [ %fp + -8 ], %o0
2003988: c2 00 60 04 ld [ %g1 + 4 ], %g1
200398c: 90 06 00 08 add %i0, %o0, %o0
2003990: 92 07 bf e4 add %fp, -28, %o1
2003994: 94 07 bf fc add %fp, -4, %o2
2003998: 9f c0 40 00 call %g1
200399c: b0 10 3f ff mov -1, %i0
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
20039a0: 80 a2 20 00 cmp %o0, 0
20039a4: 12 bf ff eb bne 2003950 <mknod+0x50>
20039a8: c2 07 bf f0 ld [ %fp + -16 ], %g1
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
20039ac: d0 07 bf fc ld [ %fp + -4 ], %o0
20039b0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
20039b4: 92 10 00 19 mov %i1, %o1
20039b8: 94 10 00 1a mov %i2, %o2
20039bc: 96 10 00 1b mov %i3, %o3
20039c0: 9f c0 40 00 call %g1
20039c4: 98 07 bf e4 add %fp, -28, %o4
20039c8: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &temp_loc );
20039cc: 7f ff fe 42 call 20032d4 <rtems_filesystem_freenode>
20039d0: 90 07 bf e4 add %fp, -28, %o0
return result;
}
20039d4: 81 c7 e0 08 ret
20039d8: 81 e8 00 00 restore
020039f0 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
20039f0: 9d e3 bf 88 save %sp, -120, %sp
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
20039f4: 80 a6 e0 01 cmp %i3, 1
20039f8: 18 80 00 85 bgu 2003c0c <mount+0x21c>
20039fc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
2003a00: 40 00 26 51 call 200d344 <rtems_filesystem_get_mount_handler>
2003a04: 90 10 00 1a mov %i2, %o0
if ( !mount_h )
2003a08: a2 92 20 00 orcc %o0, 0, %l1
2003a0c: 02 80 00 80 be 2003c0c <mount+0x21c>
2003a10: 80 a0 00 19 cmp %g0, %i1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2003a14: a0 40 20 00 addx %g0, 0, %l0
2003a18: 80 a4 20 00 cmp %l0, 0
2003a1c: 02 80 00 77 be 2003bf8 <mount+0x208>
2003a20: 90 10 00 19 mov %i1, %o0
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
2003a24: 40 00 3c 83 call 2012c30 <strlen>
2003a28: ae 10 00 19 mov %i1, %l7
2003a2c: ac 10 00 08 mov %o0, %l6
2003a30: a8 02 20 01 add %o0, 1, %l4
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2003a34: 40 00 3c 7f call 2012c30 <strlen>
2003a38: 90 10 00 1a mov %i2, %o0
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2003a3c: a4 10 20 00 clr %l2
2003a40: 80 a6 20 00 cmp %i0, 0
2003a44: 02 80 00 05 be 2003a58 <mount+0x68>
2003a48: aa 10 00 08 mov %o0, %l5
2003a4c: 40 00 3c 79 call 2012c30 <strlen>
2003a50: 90 10 00 18 mov %i0, %o0
2003a54: a4 02 20 01 add %o0, 1, %l2
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
2003a58: 92 05 40 14 add %l5, %l4, %o1
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
2003a5c: 90 10 20 01 mov 1, %o0
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
2003a60: 92 02 60 75 add %o1, 0x75, %o1
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
2003a64: 7f ff fd 00 call 2002e64 <calloc>
2003a68: 92 02 40 12 add %o1, %l2, %o1
if ( mt_entry != NULL ) {
2003a6c: ba 92 20 00 orcc %o0, 0, %i5
2003a70: 02 80 00 5c be 2003be0 <mount+0x1f0> <== NEVER TAKEN
2003a74: a6 07 60 74 add %i5, 0x74, %l3
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
2003a78: 92 10 00 1a mov %i2, %o1
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2003a7c: aa 05 60 01 inc %l5
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
2003a80: 90 10 00 13 mov %l3, %o0
2003a84: 40 00 39 2f call 2011f40 <memcpy>
2003a88: 94 10 00 15 mov %l5, %o2
mt_entry->type = str;
str += filesystemtype_size;
2003a8c: b4 04 c0 15 add %l3, %l5, %i2
memcpy( str, source_or_null, source_size );
2003a90: 94 10 00 12 mov %l2, %o2
2003a94: 92 10 00 18 mov %i0, %o1
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
2003a98: e6 27 60 6c st %l3, [ %i5 + 0x6c ]
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
2003a9c: 40 00 39 29 call 2011f40 <memcpy>
2003aa0: 90 10 00 1a mov %i2, %o0
mt_entry->dev = str;
str += source_size;
2003aa4: a4 06 80 12 add %i2, %l2, %l2
memcpy( str, target, target_size );
2003aa8: 92 10 00 17 mov %l7, %o1
2003aac: 94 10 00 14 mov %l4, %o2
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
2003ab0: f4 27 60 70 st %i2, [ %i5 + 0x70 ]
str += source_size;
memcpy( str, target, target_size );
2003ab4: 40 00 39 23 call 2011f40 <memcpy>
2003ab8: 90 10 00 12 mov %l2, %o0
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2003abc: 90 07 60 38 add %i5, 0x38, %o0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
2003ac0: e4 27 60 68 st %l2, [ %i5 + 0x68 ]
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
2003ac4: fa 27 60 2c st %i5, [ %i5 + 0x2c ]
mt_entry->options = options;
2003ac8: f6 27 60 30 st %i3, [ %i5 + 0x30 ]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2003acc: 94 10 20 30 mov 0x30, %o2
2003ad0: 13 00 80 74 sethi %hi(0x201d000), %o1
2003ad4: 40 00 39 1b call 2011f40 <memcpy>
2003ad8: 92 12 63 28 or %o1, 0x328, %o1 ! 201d328 <rtems_filesystem_default_pathconf>
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
2003adc: 80 a4 20 00 cmp %l0, 0
2003ae0: 12 80 00 11 bne 2003b24 <mount+0x134>
2003ae4: 37 00 80 7a sethi %hi(0x201e800), %i3
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
2003ae8: c4 06 e1 50 ld [ %i3 + 0x150 ], %g2 ! 201e950 <mount_chain>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2003aec: 82 16 e1 50 or %i3, 0x150, %g1
2003af0: 82 00 60 04 add %g1, 4, %g1
2003af4: 80 a0 80 01 cmp %g2, %g1
2003af8: 02 80 00 26 be 2003b90 <mount+0x1a0> <== ALWAYS TAKEN
2003afc: b4 10 20 00 clr %i2
errno = EINVAL;
2003b00: 40 00 36 b4 call 20115d0 <__errno> <== NOT EXECUTED
2003b04: 01 00 00 00 nop <== NOT EXECUTED
2003b08: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2003b0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
2003b10: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2003b14: 7f ff fd f7 call 20032f0 <free> <== NOT EXECUTED
2003b18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003b1c: 81 c7 e0 08 ret
2003b20: 81 e8 00 00 restore
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
2003b24: 90 10 00 19 mov %i1, %o0
2003b28: 92 10 00 16 mov %l6, %o1
2003b2c: 94 10 20 07 mov 7, %o2
2003b30: 96 07 bf ec add %fp, -20, %o3
2003b34: 7f ff fd 9a call 200319c <rtems_filesystem_evaluate_path>
2003b38: 98 10 20 01 mov 1, %o4
2003b3c: 80 a2 3f ff cmp %o0, -1
2003b40: 02 bf ff f4 be 2003b10 <mount+0x120> <== NEVER TAKEN
2003b44: c2 07 bf f8 ld [ %fp + -8 ], %g1
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
2003b48: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2003b4c: 9f c0 40 00 call %g1
2003b50: 90 07 bf ec add %fp, -20, %o0
2003b54: 80 a2 20 01 cmp %o0, 1
2003b58: 02 80 00 4d be 2003c8c <mount+0x29c>
2003b5c: 33 00 80 7c sethi %hi(0x201f000), %i1
errno = ENOTDIR;
2003b60: 40 00 36 9c call 20115d0 <__errno>
2003b64: 01 00 00 00 nop
2003b68: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
2003b6c: c2 22 00 00 st %g1, [ %o0 ]
return 0;
cleanup_and_bail:
free( mt_entry );
2003b70: 7f ff fd e0 call 20032f0 <free>
2003b74: 90 10 00 1d mov %i5, %o0
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
2003b78: b4 07 bf ec add %fp, -20, %i2
free( mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
2003b7c: b0 10 3f ff mov -1, %i0
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
2003b80: 7f ff fd d5 call 20032d4 <rtems_filesystem_freenode>
2003b84: 90 10 00 1a mov %i2, %o0
return -1;
}
2003b88: 81 c7 e0 08 ret
2003b8c: 81 e8 00 00 restore
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
2003b90: 90 10 00 1d mov %i5, %o0
2003b94: 9f c4 40 00 call %l1
2003b98: 92 10 00 1c mov %i4, %o1
2003b9c: 80 a2 20 00 cmp %o0, 0
2003ba0: 22 80 00 21 be,a 2003c24 <mount+0x234>
2003ba4: 39 00 80 7c sethi %hi(0x201f000), %i4
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
2003ba8: c2 07 bf f8 ld [ %fp + -8 ], %g1
2003bac: 90 10 00 1d mov %i5, %o0
2003bb0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2003bb4: 9f c0 40 00 call %g1
2003bb8: b0 10 3f ff mov -1, %i0
return 0;
cleanup_and_bail:
free( mt_entry );
2003bbc: 7f ff fd cd call 20032f0 <free>
2003bc0: 90 10 00 1d mov %i5, %o0
if ( loc_to_free )
2003bc4: 80 a6 a0 00 cmp %i2, 0
2003bc8: 02 bf ff d5 be 2003b1c <mount+0x12c> <== NEVER TAKEN
2003bcc: 90 10 00 1a mov %i2, %o0
rtems_filesystem_freenode( loc_to_free );
2003bd0: 7f ff fd c1 call 20032d4 <rtems_filesystem_freenode>
2003bd4: b0 10 3f ff mov -1, %i0
return -1;
}
2003bd8: 81 c7 e0 08 ret
2003bdc: 81 e8 00 00 restore
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
2003be0: 40 00 36 7c call 20115d0 <__errno> <== NOT EXECUTED
2003be4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003be8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2003bec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003bf0: 81 c7 e0 08 ret <== NOT EXECUTED
2003bf4: 81 e8 00 00 restore <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2003bf8: 2f 00 80 73 sethi %hi(0x201cc00), %l7
2003bfc: a8 10 20 02 mov 2, %l4
2003c00: ac 10 20 01 mov 1, %l6
2003c04: 10 bf ff 8c b 2003a34 <mount+0x44>
2003c08: ae 15 e1 f8 or %l7, 0x1f8, %l7
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
2003c0c: 40 00 36 71 call 20115d0 <__errno>
2003c10: b0 10 3f ff mov -1, %i0
2003c14: 82 10 20 16 mov 0x16, %g1
2003c18: c2 22 00 00 st %g1, [ %o0 ]
2003c1c: 81 c7 e0 08 ret
2003c20: 81 e8 00 00 restore
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
2003c24: d0 07 23 00 ld [ %i4 + 0x300 ], %o0
2003c28: 94 10 20 00 clr %o2
2003c2c: 40 00 0d a5 call 20072c0 <rtems_semaphore_obtain>
2003c30: 92 10 20 00 clr %o1
2003c34: 90 16 e1 50 or %i3, 0x150, %o0
2003c38: 40 00 10 51 call 2007d7c <_Chain_Append>
2003c3c: 92 10 00 1d mov %i5, %o1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2003c40: d0 07 23 00 ld [ %i4 + 0x300 ], %o0
2003c44: 40 00 0d e9 call 20073e8 <rtems_semaphore_release>
2003c48: b0 10 20 00 clr %i0
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
2003c4c: 80 a4 20 00 cmp %l0, 0
2003c50: 12 bf ff b3 bne 2003b1c <mount+0x12c>
2003c54: 03 00 80 7a sethi %hi(0x201e800), %g1
rtems_filesystem_root = mt_entry->mt_fs_root;
2003c58: f6 07 60 1c ld [ %i5 + 0x1c ], %i3
2003c5c: f8 07 60 20 ld [ %i5 + 0x20 ], %i4
2003c60: c8 07 60 24 ld [ %i5 + 0x24 ], %g4
2003c64: c6 07 60 28 ld [ %i5 + 0x28 ], %g3
2003c68: c4 07 60 2c ld [ %i5 + 0x2c ], %g2
2003c6c: c2 00 61 70 ld [ %g1 + 0x170 ], %g1
2003c70: f6 20 60 18 st %i3, [ %g1 + 0x18 ]
2003c74: f8 20 60 1c st %i4, [ %g1 + 0x1c ]
2003c78: c8 20 60 20 st %g4, [ %g1 + 0x20 ]
2003c7c: c6 20 60 24 st %g3, [ %g1 + 0x24 ]
2003c80: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
2003c84: 81 c7 e0 08 ret
2003c88: 81 e8 00 00 restore
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
2003c8c: d0 06 63 00 ld [ %i1 + 0x300 ], %o0
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
2003c90: f4 07 bf ec ld [ %fp + -20 ], %i2
2003c94: 92 10 20 00 clr %o1
2003c98: 40 00 0d 8a call 20072c0 <rtems_semaphore_obtain>
2003c9c: 94 10 20 00 clr %o2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2003ca0: 37 00 80 7a sethi %hi(0x201e800), %i3
2003ca4: c2 06 e1 50 ld [ %i3 + 0x150 ], %g1 ! 201e950 <mount_chain>
2003ca8: 86 16 e1 50 or %i3, 0x150, %g3
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
2003cac: 86 00 e0 04 add %g3, 4, %g3
2003cb0: 80 a0 40 03 cmp %g1, %g3
2003cb4: 32 80 00 06 bne,a 2003ccc <mount+0x2dc> <== ALWAYS TAKEN
2003cb8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
2003cbc: 30 80 00 26 b,a 2003d54 <mount+0x364> <== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
2003cc0: 12 80 00 1e bne 2003d38 <mount+0x348> <== NEVER TAKEN
2003cc4: 01 00 00 00 nop
static bool is_node_fs_root(
const rtems_filesystem_mount_table_entry_t *mt_entry,
void *arg
)
{
return arg == mt_entry->mt_fs_root.node_access;
2003cc8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2003ccc: c2 00 40 00 ld [ %g1 ], %g1
2003cd0: 84 1e 80 02 xor %i2, %g2, %g2
2003cd4: 80 a0 00 02 cmp %g0, %g2
2003cd8: b0 60 3f ff subx %g0, -1, %i0
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
2003cdc: 80 a0 40 03 cmp %g1, %g3
2003ce0: 12 bf ff f8 bne 2003cc0 <mount+0x2d0>
2003ce4: 80 8e 20 ff btst 0xff, %i0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2003ce8: 40 00 0d c0 call 20073e8 <rtems_semaphore_release>
2003cec: d0 06 63 00 ld [ %i1 + 0x300 ], %o0
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
2003cf0: 80 8e 20 ff btst 0xff, %i0
2003cf4: 12 80 00 13 bne 2003d40 <mount+0x350>
2003cf8: c4 07 bf f8 ld [ %fp + -8 ], %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.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
2003cfc: c6 07 bf ec ld [ %fp + -20 ], %g3
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
2003d00: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
2003d04: c6 27 60 08 st %g3, [ %i5 + 8 ]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
2003d08: c4 27 60 14 st %g2, [ %i5 + 0x14 ]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
2003d0c: c6 07 bf f4 ld [ %fp + -12 ], %g3
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2003d10: c4 07 bf fc ld [ %fp + -4 ], %g2
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
2003d14: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2003d18: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
2003d1c: 90 10 00 1d mov %i5, %o0
2003d20: 9f c0 40 00 call %g1
2003d24: b4 07 bf ec add %fp, -20, %i2
2003d28: 80 a2 20 00 cmp %o0, 0
2003d2c: 02 bf ff 9a be 2003b94 <mount+0x1a4> <== ALWAYS TAKEN
2003d30: 90 10 00 1d mov %i5, %o0
2003d34: 30 bf ff 8f b,a 2003b70 <mount+0x180> <== NOT EXECUTED
2003d38: 40 00 0d ac call 20073e8 <rtems_semaphore_release> <== NOT EXECUTED
2003d3c: d0 06 63 00 ld [ %i1 + 0x300 ], %o0 <== NOT EXECUTED
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
2003d40: 40 00 36 24 call 20115d0 <__errno>
2003d44: 01 00 00 00 nop
2003d48: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10>
goto cleanup_and_bail;
2003d4c: 10 bf ff 89 b 2003b70 <mount+0x180>
2003d50: c2 22 00 00 st %g1, [ %o0 ]
2003d54: 40 00 0d a5 call 20073e8 <rtems_semaphore_release> <== NOT EXECUTED
2003d58: d0 06 63 00 ld [ %i1 + 0x300 ], %o0 <== NOT EXECUTED
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
2003d5c: 10 bf ff e8 b 2003cfc <mount+0x30c> <== NOT EXECUTED
2003d60: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
02003f94 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2003f94: 9d e3 bf a0 save %sp, -96, %sp
int rv = -1;
if (target != NULL) {
2003f98: 90 96 60 00 orcc %i1, 0, %o0
2003f9c: 02 80 00 0b be 2003fc8 <mount_and_make_target_path+0x34>
2003fa0: 01 00 00 00 nop
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
2003fa4: 40 00 02 f4 call 2004b74 <rtems_mkdir>
2003fa8: 92 10 21 ff mov 0x1ff, %o1 ! 1ff <PROM_START+0x1ff>
if (rv == 0) {
2003fac: 82 92 20 00 orcc %o0, 0, %g1
2003fb0: 02 80 00 04 be 2003fc0 <mount_and_make_target_path+0x2c> <== ALWAYS TAKEN
2003fb4: 01 00 00 00 nop
} else {
errno = EINVAL;
}
return rv;
}
2003fb8: 81 c7 e0 08 ret
2003fbc: 91 e8 00 01 restore %g0, %g1, %o0
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
2003fc0: 40 00 00 0d call 2003ff4 <mount>
2003fc4: 81 e8 00 00 restore
options,
data
);
}
} else {
errno = EINVAL;
2003fc8: 40 00 36 15 call 201181c <__errno>
2003fcc: 01 00 00 00 nop
2003fd0: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
2003fd4: 82 10 3f ff mov -1, %g1
options,
data
);
}
} else {
errno = EINVAL;
2003fd8: 10 bf ff f8 b 2003fb8 <mount_and_make_target_path+0x24>
2003fdc: c4 22 00 00 st %g2, [ %o0 ]
0200c560 <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
200c560: 9d e3 bf 90 save %sp, -112, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200c564: 03 00 80 b2 sethi %hi(0x202c800), %g1
200c568: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 202cb60 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
200c56c: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200c570: 84 00 a0 01 inc %g2
200c574: c4 20 63 60 st %g2, [ %g1 + 0x360 ]
return _Thread_Dispatch_disable_level;
200c578: c2 00 63 60 ld [ %g1 + 0x360 ], %g1
200c57c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200c580: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200c584: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
200c588: a0 8e 62 00 andcc %i1, 0x200, %l0
200c58c: 12 80 00 34 bne 200c65c <mq_open+0xfc>
200c590: b4 10 20 00 clr %i2
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
200c594: 39 00 80 b4 sethi %hi(0x202d000), %i4
200c598: 40 00 0c e2 call 200f920 <_Objects_Allocate>
200c59c: 90 17 20 2c or %i4, 0x2c, %o0 ! 202d02c <_POSIX_Message_queue_Information_fds>
attr = va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
200c5a0: ba 92 20 00 orcc %o0, 0, %i5
200c5a4: 02 80 00 37 be 200c680 <mq_open+0x120> <== NEVER TAKEN
200c5a8: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
200c5ac: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
200c5b0: 90 10 00 18 mov %i0, %o0
200c5b4: 40 00 21 a9 call 2014c58 <_POSIX_Message_queue_Name_to_id>
200c5b8: 92 07 bf f4 add %fp, -12, %o1
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
200c5bc: b6 92 20 00 orcc %o0, 0, %i3
200c5c0: 22 80 00 0f be,a 200c5fc <mq_open+0x9c>
200c5c4: b2 0e 6a 00 and %i1, 0xa00, %i1
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
200c5c8: 80 a6 e0 02 cmp %i3, 2
200c5cc: 02 80 00 40 be 200c6cc <mq_open+0x16c>
200c5d0: 80 a4 20 00 cmp %l0, 0
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
200c5d4: 90 17 20 2c or %i4, 0x2c, %o0
200c5d8: 40 00 0d bc call 200fcc8 <_Objects_Free>
200c5dc: 92 10 00 1d mov %i5, %o1
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
200c5e0: 40 00 12 1c call 2010e50 <_Thread_Enable_dispatch>
200c5e4: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
200c5e8: 40 00 32 81 call 2018fec <__errno>
200c5ec: 01 00 00 00 nop
200c5f0: f6 22 00 00 st %i3, [ %o0 ]
200c5f4: 81 c7 e0 08 ret
200c5f8: 81 e8 00 00 restore
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
200c5fc: 80 a6 6a 00 cmp %i1, 0xa00
200c600: 02 80 00 28 be 200c6a0 <mq_open+0x140>
200c604: d2 07 bf f4 ld [ %fp + -12 ], %o1
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
200c608: 94 07 bf fc add %fp, -4, %o2
200c60c: 11 00 80 b3 sethi %hi(0x202cc00), %o0
200c610: 40 00 0e 0f call 200fe4c <_Objects_Get>
200c614: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 202cea0 <_POSIX_Message_queue_Information>
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
200c618: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
200c61c: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
200c620: 84 00 a0 01 inc %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200c624: b8 17 20 2c or %i4, 0x2c, %i4
200c628: c4 22 20 18 st %g2, [ %o0 + 0x18 ]
200c62c: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
200c630: d0 27 bf f8 st %o0, [ %fp + -8 ]
the_mq->open_count += 1;
the_mq_fd->Queue = the_mq;
200c634: d0 27 60 10 st %o0, [ %i5 + 0x10 ]
200c638: 83 28 60 02 sll %g1, 2, %g1
200c63c: fa 20 80 01 st %i5, [ %g2 + %g1 ]
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
200c640: 40 00 12 04 call 2010e50 <_Thread_Enable_dispatch>
200c644: c0 27 60 0c clr [ %i5 + 0xc ]
_Thread_Enable_dispatch();
200c648: 40 00 12 02 call 2010e50 <_Thread_Enable_dispatch>
200c64c: 01 00 00 00 nop
return (mqd_t)the_mq_fd->Object.id;
200c650: f0 07 60 08 ld [ %i5 + 8 ], %i0
200c654: 81 c7 e0 08 ret
200c658: 81 e8 00 00 restore
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
attr = va_arg( arg, struct mq_attr * );
200c65c: 82 07 a0 54 add %fp, 0x54, %g1
200c660: f4 07 a0 50 ld [ %fp + 0x50 ], %i2
200c664: c2 27 bf f0 st %g1, [ %fp + -16 ]
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
200c668: 39 00 80 b4 sethi %hi(0x202d000), %i4
200c66c: 40 00 0c ad call 200f920 <_Objects_Allocate>
200c670: 90 17 20 2c or %i4, 0x2c, %o0 ! 202d02c <_POSIX_Message_queue_Information_fds>
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
200c674: ba 92 20 00 orcc %o0, 0, %i5
200c678: 32 bf ff ce bne,a 200c5b0 <mq_open+0x50>
200c67c: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_Thread_Enable_dispatch();
200c680: 40 00 11 f4 call 2010e50 <_Thread_Enable_dispatch>
200c684: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( ENFILE );
200c688: 40 00 32 59 call 2018fec <__errno>
200c68c: 01 00 00 00 nop
200c690: 82 10 20 17 mov 0x17, %g1 ! 17 <PROM_START+0x17>
200c694: c2 22 00 00 st %g1, [ %o0 ]
200c698: 81 c7 e0 08 ret
200c69c: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
200c6a0: 90 17 20 2c or %i4, 0x2c, %o0
200c6a4: 40 00 0d 89 call 200fcc8 <_Objects_Free>
200c6a8: 92 10 00 1d mov %i5, %o1
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
200c6ac: 40 00 11 e9 call 2010e50 <_Thread_Enable_dispatch>
200c6b0: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
200c6b4: 40 00 32 4e call 2018fec <__errno>
200c6b8: 01 00 00 00 nop
200c6bc: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
200c6c0: c2 22 00 00 st %g1, [ %o0 ]
200c6c4: 81 c7 e0 08 ret
200c6c8: 81 e8 00 00 restore
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
200c6cc: 02 bf ff c3 be 200c5d8 <mq_open+0x78>
200c6d0: 90 17 20 2c or %i4, 0x2c, %o0
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
200c6d4: 90 10 00 18 mov %i0, %o0
200c6d8: 92 10 20 01 mov 1, %o1
200c6dc: 94 10 00 1a mov %i2, %o2
200c6e0: 40 00 20 f9 call 2014ac4 <_POSIX_Message_queue_Create_support>
200c6e4: 96 07 bf f8 add %fp, -8, %o3
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
200c6e8: 80 a2 3f ff cmp %o0, -1
200c6ec: 02 80 00 0d be 200c720 <mq_open+0x1c0>
200c6f0: c6 07 bf f8 ld [ %fp + -8 ], %g3
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
200c6f4: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200c6f8: b8 17 20 2c or %i4, 0x2c, %i4
200c6fc: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
200c700: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200c704: 83 28 60 02 sll %g1, 2, %g1
200c708: fa 20 80 01 st %i5, [ %g2 + %g1 ]
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
200c70c: 40 00 11 d1 call 2010e50 <_Thread_Enable_dispatch>
200c710: c0 27 60 0c clr [ %i5 + 0xc ]
return (mqd_t) the_mq_fd->Object.id;
200c714: f0 07 60 08 ld [ %i5 + 8 ], %i0
}
200c718: 81 c7 e0 08 ret
200c71c: 81 e8 00 00 restore
200c720: 90 17 20 2c or %i4, 0x2c, %o0
200c724: 92 10 00 1d mov %i5, %o1
200c728: 40 00 0d 68 call 200fcc8 <_Objects_Free>
200c72c: b0 10 3f ff mov -1, %i0
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
200c730: 40 00 11 c8 call 2010e50 <_Thread_Enable_dispatch>
200c734: 01 00 00 00 nop
return (mqd_t) -1;
200c738: 81 c7 e0 08 ret
200c73c: 81 e8 00 00 restore
0201b640 <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
201b640: 9d e3 bf 00 save %sp, -256, %sp
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
201b644: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
201b648: c0 27 bf f8 clr [ %fp + -8 ]
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
201b64c: e0 00 60 34 ld [ %g1 + 0x34 ], %l0
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
201b650: c0 37 bf fc clrh [ %fp + -4 ]
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201b654: 82 10 3f ff mov -1, %g1
uint16_t date = 0;
201b658: c0 37 bf fe clrh [ %fp + -2 ]
201b65c: c2 27 bf f0 st %g1, [ %fp + -16 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201b660: c2 27 bf f4 st %g1, [ %fp + -12 ]
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
201b664: c0 27 bf e8 clr [ %fp + -24 ]
dir_pos->sname.ofs = 0;
201b668: c0 27 bf ec clr [ %fp + -20 ]
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201b66c: c0 27 bf a8 clr [ %fp + -88 ]
201b670: c0 27 bf ac clr [ %fp + -84 ]
201b674: c0 27 bf b0 clr [ %fp + -80 ]
201b678: c0 27 bf b4 clr [ %fp + -76 ]
201b67c: c0 27 bf b8 clr [ %fp + -72 ]
201b680: c0 27 bf bc clr [ %fp + -68 ]
201b684: c0 27 bf c0 clr [ %fp + -64 ]
201b688: c0 27 bf c4 clr [ %fp + -60 ]
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
201b68c: c0 27 bf 68 clr [ %fp + -152 ]
201b690: c0 27 bf 6c clr [ %fp + -148 ]
201b694: c0 27 bf 70 clr [ %fp + -144 ]
201b698: c0 27 bf 74 clr [ %fp + -140 ]
201b69c: c0 27 bf 78 clr [ %fp + -136 ]
201b6a0: c0 27 bf 7c clr [ %fp + -132 ]
201b6a4: c0 27 bf 80 clr [ %fp + -128 ]
201b6a8: c0 27 bf 84 clr [ %fp + -124 ]
201b6ac: c0 27 bf 88 clr [ %fp + -120 ]
201b6b0: c0 27 bf 8c clr [ %fp + -116 ]
201b6b4: c0 27 bf 90 clr [ %fp + -112 ]
201b6b8: c0 27 bf 94 clr [ %fp + -108 ]
201b6bc: c0 27 bf 98 clr [ %fp + -104 ]
201b6c0: c0 27 bf 9c clr [ %fp + -100 ]
201b6c4: c0 27 bf a0 clr [ %fp + -96 ]
name_type = msdos_long_to_short (name, name_len,
201b6c8: 94 07 bf a8 add %fp, -88, %o2
201b6cc: 96 10 20 0b mov 0xb, %o3
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
201b6d0: e2 06 00 00 ld [ %i0 ], %l1
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
name_type = msdos_long_to_short (name, name_len,
201b6d4: 92 10 00 1b mov %i3, %o1
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
201b6d8: c0 27 bf a4 clr [ %fp + -92 ]
name_type = msdos_long_to_short (name, name_len,
201b6dc: 40 00 04 6f call 201c898 <msdos_long_to_short>
201b6e0: 90 10 00 1a mov %i2, %o0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
201b6e4: b8 10 00 18 mov %i0, %i4
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
name_type = msdos_long_to_short (name, name_len,
201b6e8: a4 10 00 08 mov %o0, %l2
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
201b6ec: c0 2f bf b4 clrb [ %fp + -76 ]
/* set up last write date and time */
time_ret = time(NULL);
201b6f0: 90 10 20 00 clr %o0
201b6f4: 40 00 25 f6 call 2024ecc <time>
201b6f8: b0 10 3f ff mov -1, %i0
if ( time_ret == -1 )
201b6fc: 80 a2 3f ff cmp %o0, -1
201b700: 02 80 00 29 be 201b7a4 <msdos_creat_node+0x164> <== NEVER TAKEN
201b704: 92 07 bf fe add %fp, -2, %o1
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
201b708: 40 00 10 d6 call 201fa60 <msdos_date_unix2dos>
201b70c: 94 07 bf fc add %fp, -4, %o2
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
201b710: c8 17 bf fc lduh [ %fp + -4 ], %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
201b714: c6 17 bf fe lduh [ %fp + -2 ], %g3
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
201b718: 89 29 20 10 sll %g4, 0x10, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
201b71c: 87 28 e0 10 sll %g3, 0x10, %g3
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
201b720: 85 31 20 08 srl %g4, 8, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
201b724: 83 30 e0 08 srl %g3, 8, %g1
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
201b728: 89 31 20 18 srl %g4, 0x18, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
201b72c: 87 30 e0 18 srl %g3, 0x18, %g3
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
201b730: 84 10 80 04 or %g2, %g4, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
201b734: 82 10 40 03 or %g1, %g3, %g1
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
201b738: c4 37 bf b6 sth %g2, [ %fp + -74 ]
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
201b73c: c4 37 bf be sth %g2, [ %fp + -66 ]
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
201b740: c2 37 bf b8 sth %g1, [ %fp + -72 ]
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
201b744: c2 37 bf c0 sth %g1, [ %fp + -64 ]
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
201b748: c2 37 bf ba sth %g1, [ %fp + -70 ]
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
201b74c: 80 a6 60 01 cmp %i1, 1
201b750: 02 80 00 17 be 201b7ac <msdos_creat_node+0x16c>
201b754: c0 27 bf c4 clr [ %fp + -60 ]
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
201b758: 80 a6 60 03 cmp %i1, 3
201b75c: 02 80 00 18 be 201b7bc <msdos_creat_node+0x17c> <== NEVER TAKEN
201b760: c2 0f bf b3 ldub [ %fp + -77 ], %g1
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
201b764: 82 10 60 20 or %g1, 0x20, %g1
201b768: c2 2f bf b3 stb %g1, [ %fp + -77 ]
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
201b76c: 82 07 bf a8 add %fp, -88, %g1
201b770: 90 10 00 1c mov %i4, %o0
201b774: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
201b778: 92 10 20 01 mov 1, %o1
201b77c: 94 10 00 1a mov %i2, %o2
201b780: 96 10 00 1b mov %i3, %o3
201b784: 98 10 00 12 mov %l2, %o4
201b788: 40 00 09 e4 call 201df18 <msdos_get_name_node>
201b78c: 9a 07 bf e8 add %fp, -24, %o5
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
201b790: b0 92 20 00 orcc %o0, 0, %i0
201b794: 12 80 00 04 bne 201b7a4 <msdos_creat_node+0x164> <== NEVER TAKEN
201b798: 80 a6 60 01 cmp %i1, 1
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
201b79c: 22 80 00 33 be,a 201b868 <msdos_creat_node+0x228>
201b7a0: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
201b7a4: 81 c7 e0 08 ret
201b7a8: 81 e8 00 00 restore
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
201b7ac: c2 0f bf b3 ldub [ %fp + -77 ], %g1
201b7b0: 82 10 60 10 or %g1, 0x10, %g1
201b7b4: 10 bf ff ee b 201b76c <msdos_creat_node+0x12c>
201b7b8: c2 2f bf b3 stb %g1, [ %fp + -77 ]
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
201b7bc: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
201b7c0: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201b7c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201b7c8: 12 80 00 06 bne 201b7e0 <msdos_creat_node+0x1a0> <== NOT EXECUTED
201b7cc: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED
201b7d0: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 <== NOT EXECUTED
201b7d4: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
201b7d8: 32 80 00 07 bne,a 201b7f4 <msdos_creat_node+0x1b4> <== NOT EXECUTED
201b7dc: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201b7e0: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
201b7e4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
201b7e8: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED
201b7ec: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
201b7f0: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201b7f4: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 <== NOT EXECUTED
201b7f8: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
201b7fc: d4 14 00 00 lduh [ %l0 ], %o2 <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201b800: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
201b804: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_read(parent_loc->mt_entry,
201b808: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
201b80c: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
201b810: 96 10 20 20 mov 0x20, %o3 <== NOT EXECUTED
201b814: 98 07 bf c8 add %fp, -56, %o4 <== NOT EXECUTED
201b818: 7f ff e6 b8 call 20152f8 <_fat_block_read> <== NOT EXECUTED
201b81c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
201b820: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201b824: 06 bf ff e0 bl 201b7a4 <msdos_creat_node+0x164> <== NOT EXECUTED
201b828: c2 0f bf d3 ldub [ %fp + -45 ], %g1 <== NOT EXECUTED
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
201b82c: de 0f bf d5 ldub [ %fp + -43 ], %o7 <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
201b830: f0 17 bf d6 lduh [ %fp + -42 ], %i0 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
201b834: fa 17 bf d8 lduh [ %fp + -40 ], %i5 <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
201b838: c8 07 bf e4 ld [ %fp + -28 ], %g4 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
201b83c: c6 17 bf e2 lduh [ %fp + -30 ], %g3 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
201b840: c4 17 bf dc lduh [ %fp + -36 ], %g2 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
201b844: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
201b848: de 2f bf b5 stb %o7, [ %fp + -75 ] <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
201b84c: f0 37 bf b6 sth %i0, [ %fp + -74 ] <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
201b850: fa 37 bf b8 sth %i5, [ %fp + -72 ] <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
201b854: c8 27 bf c4 st %g4, [ %fp + -60 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
201b858: c6 37 bf c2 sth %g3, [ %fp + -62 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
201b85c: c4 37 bf bc sth %g2, [ %fp + -68 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
201b860: 10 bf ff c3 b 201b76c <msdos_creat_node+0x12c> <== NOT EXECUTED
201b864: c2 2f bf b3 stb %g1, [ %fp + -77 ] <== NOT EXECUTED
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
201b868: 92 07 bf e8 add %fp, -24, %o1
201b86c: 7f ff e1 a4 call 2013efc <fat_file_open>
201b870: 94 07 bf f8 add %fp, -8, %o2
if (rc != RC_OK)
201b874: b0 92 20 00 orcc %o0, 0, %i0
201b878: 32 80 00 58 bne,a 201b9d8 <msdos_creat_node+0x398> <== NEVER TAKEN
201b87c: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
201b880: fa 07 bf f8 ld [ %fp + -8 ], %i5
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201b884: 03 00 08 00 sethi %hi(0x200000), %g1
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
201b888: c0 27 60 18 clr [ %i5 + 0x18 ]
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201b88c: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
201b890: f2 27 60 10 st %i1, [ %i5 + 0x10 ]
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
201b894: 03 00 80 c5 sethi %hi(0x2031400), %g1
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
201b898: c4 1f bf a8 ldd [ %fp + -88 ], %g2
201b89c: d8 1f bf b0 ldd [ %fp + -80 ], %o4
201b8a0: f4 1f bf b8 ldd [ %fp + -72 ], %i2
201b8a4: f0 1f bf c0 ldd [ %fp + -64 ], %i0
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
201b8a8: d2 00 61 ec ld [ %g1 + 0x1ec ], %o1
201b8ac: 94 10 20 0b mov 0xb, %o2
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
201b8b0: c4 3f bf 68 std %g2, [ %fp + -152 ]
201b8b4: d8 3f bf 70 std %o4, [ %fp + -144 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
201b8b8: c4 3f bf 88 std %g2, [ %fp + -120 ]
201b8bc: d8 3f bf 90 std %o4, [ %fp + -112 ]
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
201b8c0: f4 3f bf 78 std %i2, [ %fp + -136 ]
201b8c4: f0 3f bf 80 std %i0, [ %fp + -128 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
201b8c8: f4 3f bf 98 std %i2, [ %fp + -104 ]
201b8cc: f0 3f bf a0 std %i0, [ %fp + -96 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
201b8d0: 40 00 16 e9 call 2021474 <memcpy>
201b8d4: 90 07 bf 68 add %fp, -152, %o0
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
201b8d8: 03 00 80 c5 sethi %hi(0x2031400), %g1
201b8dc: d2 00 61 e8 ld [ %g1 + 0x1e8 ], %o1 ! 20315e8 <MSDOS_DOTDOT_NAME>
201b8e0: 90 07 bf 88 add %fp, -120, %o0
201b8e4: 40 00 16 e4 call 2021474 <memcpy>
201b8e8: 94 10 20 0b mov 0xb, %o2
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
201b8ec: c2 04 60 20 ld [ %l1 + 0x20 ], %g1
201b8f0: 80 a0 60 01 cmp %g1, 1
201b8f4: 22 80 00 3e be,a 201b9ec <msdos_creat_node+0x3ac>
201b8f8: c2 04 60 24 ld [ %l1 + 0x24 ], %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
201b8fc: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
201b900: 85 28 60 10 sll %g1, 0x10, %g2
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
201b904: 83 30 60 10 srl %g1, 0x10, %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
201b908: 89 30 a0 08 srl %g2, 8, %g4
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
201b90c: 83 28 60 10 sll %g1, 0x10, %g1
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
201b910: 85 30 a0 18 srl %g2, 0x18, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
201b914: 87 30 60 08 srl %g1, 8, %g3
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
201b918: 84 11 00 02 or %g4, %g2, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
201b91c: 83 30 60 18 srl %g1, 0x18, %g1
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
201b920: c4 37 bf a2 sth %g2, [ %fp + -94 ]
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
201b924: 82 10 c0 01 or %g3, %g1, %g1
201b928: c2 37 bf 9c sth %g1, [ %fp + -100 ]
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
201b92c: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
201b930: 92 10 00 1d mov %i5, %o1
201b934: 94 10 20 00 clr %o2
201b938: 96 10 20 40 mov 0x40, %o3
201b93c: 7f ff e4 2d call 20149f0 <fat_file_write>
201b940: 98 07 bf 68 add %fp, -152, %o4
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
201b944: 80 a2 20 00 cmp %o0, 0
201b948: 06 80 00 33 bl 201ba14 <msdos_creat_node+0x3d4> <== NEVER TAKEN
201b94c: d2 07 bf f8 ld [ %fp + -8 ], %o1
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
201b950: c2 14 20 06 lduh [ %l0 + 6 ], %g1
201b954: c6 02 60 18 ld [ %o1 + 0x18 ], %g3
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
201b958: c4 02 60 1c ld [ %o1 + 0x1c ], %g2
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
201b95c: 82 00 c0 01 add %g3, %g1, %g1
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
201b960: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
201b964: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
201b968: 83 28 a0 10 sll %g2, 0x10, %g1
201b96c: 89 30 60 08 srl %g1, 8, %g4
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
201b970: 83 30 60 18 srl %g1, 0x18, %g1
201b974: 82 11 00 01 or %g4, %g1, %g1
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
201b978: 85 30 a0 10 srl %g2, 0x10, %g2
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
201b97c: c2 37 bf 82 sth %g1, [ %fp + -126 ]
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
201b980: 85 28 a0 10 sll %g2, 0x10, %g2
201b984: 87 30 a0 08 srl %g2, 8, %g3
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
201b988: 85 30 a0 18 srl %g2, 0x18, %g2
201b98c: 82 10 c0 02 or %g3, %g2, %g1
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
201b990: 94 10 20 00 clr %o2
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
201b994: c2 37 bf 7c sth %g1, [ %fp + -132 ]
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
201b998: 96 10 20 20 mov 0x20, %o3
201b99c: 7f ff e4 15 call 20149f0 <fat_file_write>
201b9a0: 98 07 bf 68 add %fp, -152, %o4
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
201b9a4: 80 a2 20 00 cmp %o0, 0
201b9a8: 06 80 00 08 bl 201b9c8 <msdos_creat_node+0x388> <== NEVER TAKEN
201b9ac: b0 10 3f ff mov -1, %i0
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
201b9b0: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
201b9b4: 40 00 04 9c call 201cc24 <msdos_set_first_cluster_num>
201b9b8: d2 07 bf f8 ld [ %fp + -8 ], %o1
if (rc != RC_OK)
201b9bc: b0 92 20 00 orcc %o0, 0, %i0
201b9c0: 22 80 00 17 be,a 201ba1c <msdos_creat_node+0x3dc> <== ALWAYS TAKEN
201b9c4: d0 07 20 10 ld [ %i4 + 0x10 ], %o0
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
201b9c8: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
201b9cc: 7f ff e3 0e call 2014604 <fat_file_close> <== NOT EXECUTED
201b9d0: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
201b9d4: d0 07 20 10 ld [ %i4 + 0x10 ], %o0 <== NOT EXECUTED
201b9d8: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
201b9dc: 40 00 04 f4 call 201cdac <msdos_set_first_char4file_name> <== NOT EXECUTED
201b9e0: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
return rc;
}
201b9e4: 81 c7 e0 08 ret <== NOT EXECUTED
201b9e8: 81 e8 00 00 restore <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
201b9ec: 80 a0 60 00 cmp %g1, 0
201b9f0: 32 bf ff c4 bne,a 201b900 <msdos_creat_node+0x2c0> <== NEVER TAKEN
201b9f4: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
201b9f8: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
201b9fc: 80 88 60 04 btst 4, %g1
201ba00: 22 bf ff c0 be,a 201b900 <msdos_creat_node+0x2c0> <== ALWAYS TAKEN
201ba04: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
201ba08: c0 37 bf a2 clrh [ %fp + -94 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
201ba0c: 10 bf ff c8 b 201b92c <msdos_creat_node+0x2ec> <== NOT EXECUTED
201ba10: c0 37 bf 9c clrh [ %fp + -100 ] <== NOT EXECUTED
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
{
rc = -1;
201ba14: 10 bf ff ed b 201b9c8 <msdos_creat_node+0x388> <== NOT EXECUTED
201ba18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
201ba1c: 7f ff e2 fa call 2014604 <fat_file_close>
201ba20: d2 07 bf f8 ld [ %fp + -8 ], %o1
201ba24: 81 c7 e0 08 ret
201ba28: 81 e8 00 00 restore
0201fbdc <msdos_date_dos2unix>:
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
201fbdc: 9d e3 bf a0 save %sp, -96, %sp
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201fbe0: 03 00 80 cc sethi %hi(0x2033000), %g1
201fbe4: c4 10 61 46 lduh [ %g1 + 0x146 ], %g2 ! 2033146 <lastdosdate>
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
201fbe8: 9e 0e 67 e0 and %i1, 0x7e0, %o7
201fbec: 87 33 e0 04 srl %o7, 4, %g3
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201fbf0: 89 36 60 0b srl %i1, 0xb, %g4
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
201fbf4: 9e 23 c0 03 sub %o7, %g3, %o7
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201fbf8: 88 09 20 1f and %g4, 0x1f, %g4
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
201fbfc: b2 0e 60 1f and %i1, 0x1f, %i1
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201fc00: 9b 29 20 03 sll %g4, 3, %o5
201fc04: 87 29 20 07 sll %g4, 7, %g3
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201fc08: 80 a0 80 18 cmp %g2, %i0
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
201fc0c: 86 20 c0 0d sub %g3, %o5, %g3
201fc10: 85 28 e0 04 sll %g3, 4, %g2
201fc14: 86 20 80 03 sub %g2, %g3, %g3
201fc18: 86 00 c0 0f add %g3, %o7, %g3
201fc1c: b2 00 c0 19 add %g3, %i1, %i1
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201fc20: 02 80 00 37 be 201fcfc <msdos_date_dos2unix+0x120>
201fc24: b3 2e 60 01 sll %i1, 1, %i1
lastdosdate = dd;
201fc28: f0 30 61 46 sth %i0, [ %g1 + 0x146 ]
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
201fc2c: 89 36 20 09 srl %i0, 9, %g4
for (y = 0; y < year; y++)
201fc30: 88 89 20 7f andcc %g4, 0x7f, %g4
201fc34: 02 80 00 36 be 201fd0c <msdos_date_dos2unix+0x130> <== NEVER TAKEN
201fc38: 82 10 20 00 clr %g1
201fc3c: 84 10 20 00 clr %g2
201fc40: 10 80 00 06 b 201fc58 <msdos_date_dos2unix+0x7c>
201fc44: 86 10 21 6e mov 0x16e, %g3
days += y & 0x03 ? 365 : 366;
201fc48: 86 08 a0 03 and %g2, 3, %g3
201fc4c: 80 a0 00 03 cmp %g0, %g3
201fc50: 86 60 3f ff subx %g0, -1, %g3
201fc54: 86 00 e1 6d add %g3, 0x16d, %g3
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
201fc58: 84 00 a0 01 inc %g2
201fc5c: 80 a0 80 04 cmp %g2, %g4
201fc60: 12 bf ff fa bne 201fc48 <msdos_date_dos2unix+0x6c>
201fc64: 82 00 40 03 add %g1, %g3, %g1
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
201fc68: 09 00 80 ca sethi %hi(0x2032800), %g4
201fc6c: 80 88 a0 03 btst 3, %g2
201fc70: 02 80 00 04 be 201fc80 <msdos_date_dos2unix+0xa4> <== ALWAYS TAKEN
201fc74: 88 11 22 04 or %g4, 0x204, %g4
201fc78: 09 00 80 ca sethi %hi(0x2032800), %g4 <== NOT EXECUTED
201fc7c: 88 11 21 ec or %g4, 0x1ec, %g4 ! 20329ec <regyear> <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
201fc80: 9e 0e 21 e0 and %i0, 0x1e0, %o7
201fc84: 9f 33 e0 05 srl %o7, 5, %o7
if (month == 0) {
201fc88: 80 a3 e0 00 cmp %o7, 0
201fc8c: 22 80 00 0c be,a 201fcbc <msdos_date_dos2unix+0xe0> <== NEVER TAKEN
201fc90: b0 0e 20 1f and %i0, 0x1f, %i0 <== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
201fc94: 9e 83 ff ff addcc %o7, -1, %o7
201fc98: 02 80 00 08 be 201fcb8 <msdos_date_dos2unix+0xdc> <== ALWAYS TAKEN
201fc9c: 84 10 20 00 clr %g2
* Convert from dos' idea of time to unix'. This will probably only be
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
201fca0: 87 28 a0 01 sll %g2, 1, %g3 <== NOT EXECUTED
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
days += months[m];
201fca4: c6 11 00 03 lduh [ %g4 + %g3 ], %g3 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
201fca8: 84 00 a0 01 inc %g2 <== NOT EXECUTED
201fcac: 80 a0 80 0f cmp %g2, %o7 <== NOT EXECUTED
201fcb0: 0a bf ff fc bcs 201fca0 <msdos_date_dos2unix+0xc4> <== NOT EXECUTED
201fcb4: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
201fcb8: b0 0e 20 1f and %i0, 0x1f, %i0
201fcbc: b0 06 3f ff add %i0, -1, %i0
201fcc0: 82 06 00 01 add %i0, %g1, %g1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
201fcc4: 85 28 60 07 sll %g1, 7, %g2
201fcc8: 83 28 60 09 sll %g1, 9, %g1
201fccc: 82 20 40 02 sub %g1, %g2, %g1
201fcd0: 85 28 60 04 sll %g1, 4, %g2
201fcd4: 82 20 80 01 sub %g2, %g1, %g1
201fcd8: 85 28 60 04 sll %g1, 4, %g2
201fcdc: 82 20 80 01 sub %g2, %g1, %g1
201fce0: 05 04 b3 a9 sethi %hi(0x12cea400), %g2
201fce4: 84 10 a2 00 or %g2, 0x200, %g2 ! 12cea600 <RAM_END+0x108ea600>
201fce8: 82 00 40 02 add %g1, %g2, %g1
201fcec: 05 00 80 cc sethi %hi(0x2033000), %g2
201fcf0: c2 20 a1 48 st %g1, [ %g2 + 0x148 ] ! 2033148 <lastseconds>
}
return seconds + lastseconds;
}
201fcf4: 81 c7 e0 08 ret
201fcf8: 91 e8 40 19 restore %g1, %i1, %o0
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
201fcfc: 03 00 80 cc sethi %hi(0x2033000), %g1
201fd00: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 2033148 <lastseconds>
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
}
return seconds + lastseconds;
}
201fd04: 81 c7 e0 08 ret
201fd08: 91 e8 40 19 restore %g1, %i1, %o0
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
201fd0c: 09 00 80 ca sethi %hi(0x2032800), %g4 <== NOT EXECUTED
201fd10: 10 bf ff dc b 201fc80 <msdos_date_dos2unix+0xa4> <== NOT EXECUTED
201fd14: 88 11 22 04 or %g4, 0x204, %g4 ! 2032a04 <leapyear> <== NOT EXECUTED
0201fa60 <msdos_date_unix2dos>:
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
uint16_t *dtp)
{
201fa60: 9d e3 bf a0 save %sp, -96, %sp
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
201fa64: 03 00 80 cc sethi %hi(0x2033000), %g1
201fa68: c4 00 61 38 ld [ %g1 + 0x138 ], %g2 ! 2033138 <lasttime>
201fa6c: 80 a0 80 18 cmp %g2, %i0
201fa70: 02 80 00 4d be 201fba4 <msdos_date_unix2dos+0x144>
201fa74: 92 10 20 3c mov 0x3c, %o1
lasttime = t;
201fa78: f0 20 61 38 st %i0, [ %g1 + 0x138 ]
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
201fa7c: 40 00 37 4a call 202d7a4 <.udiv>
201fa80: 90 10 00 18 mov %i0, %o0
201fa84: 40 00 37 f4 call 202da54 <.urem>
201fa88: 92 10 20 3c mov 0x3c, %o1
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
201fa8c: 92 10 2e 10 mov 0xe10, %o1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
201fa90: bb 2a 20 05 sll %o0, 5, %i5
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
201fa94: 40 00 37 44 call 202d7a4 <.udiv>
201fa98: 90 10 00 18 mov %i0, %o0
201fa9c: 40 00 37 ee call 202da54 <.urem>
201faa0: 92 10 20 18 mov 0x18, %o1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
201faa4: 83 2a 20 0b sll %o0, 0xb, %g1
201faa8: 92 10 20 3c mov 0x3c, %o1
201faac: ba 07 40 01 add %i5, %g1, %i5
201fab0: 40 00 37 e9 call 202da54 <.urem>
201fab4: 90 10 00 18 mov %i0, %o0
201fab8: 03 00 80 cc sethi %hi(0x2033000), %g1
201fabc: 91 32 20 01 srl %o0, 1, %o0
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
201fac0: 13 00 00 54 sethi %hi(0x15000), %o1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
201fac4: ba 07 40 08 add %i5, %o0, %i5
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
201fac8: 92 12 61 80 or %o1, 0x180, %o1
201facc: 90 10 00 18 mov %i0, %o0
201fad0: 40 00 37 35 call 202d7a4 <.udiv>
201fad4: fa 30 61 3c sth %i5, [ %g1 + 0x13c ]
if (days != lastday) {
201fad8: 03 00 80 cc sethi %hi(0x2033000), %g1
201fadc: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2033140 <lastday>
201fae0: 80 a2 00 02 cmp %o0, %g2
201fae4: 02 80 00 38 be 201fbc4 <msdos_date_unix2dos+0x164>
201fae8: b0 10 00 1d mov %i5, %i0
lastday = days;
201faec: d0 20 61 40 st %o0, [ %g1 + 0x140 ]
for (year = 1970;; year++) {
201faf0: 10 80 00 03 b 201fafc <msdos_date_unix2dos+0x9c>
201faf4: 82 10 27 b2 mov 0x7b2, %g1
201faf8: 82 00 60 01 inc %g1
inc = year & 0x03 ? 365 : 366;
201fafc: 86 08 60 03 and %g1, 3, %g3
201fb00: 80 a0 00 03 cmp %g0, %g3
201fb04: 84 60 3f ff subx %g0, -1, %g2
201fb08: 84 00 a1 6d add %g2, 0x16d, %g2
if (days < inc)
201fb0c: 80 a2 00 02 cmp %o0, %g2
201fb10: 3a bf ff fa bcc,a 201faf8 <msdos_date_unix2dos+0x98>
201fb14: 90 22 00 02 sub %o0, %g2, %o0
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
201fb18: 09 00 80 ca sethi %hi(0x2032800), %g4
201fb1c: 80 a0 e0 00 cmp %g3, 0
201fb20: 12 80 00 1c bne 201fb90 <msdos_date_unix2dos+0x130> <== NEVER TAKEN
201fb24: 88 11 22 04 or %g4, 0x204, %g4
for (month = 0; month < 12; month++) {
201fb28: 84 10 20 00 clr %g2
/*
* Convert the unix version of time to dos's idea of time to be used in
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
201fb2c: 87 28 a0 01 sll %g2, 1, %g3
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
if (days < months[month])
201fb30: c6 11 00 03 lduh [ %g4 + %g3 ], %g3
201fb34: 80 a0 c0 08 cmp %g3, %o0
201fb38: 18 80 00 19 bgu 201fb9c <msdos_date_unix2dos+0x13c> <== ALWAYS TAKEN
201fb3c: 84 00 a0 01 inc %g2
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
201fb40: 80 a0 a0 0c cmp %g2, 0xc <== NOT EXECUTED
201fb44: 12 bf ff fa bne 201fb2c <msdos_date_unix2dos+0xcc> <== NOT EXECUTED
201fb48: 90 22 00 03 sub %o0, %g3, %o0 <== NOT EXECUTED
201fb4c: 84 10 21 a0 mov 0x1a0, %g2 <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
201fb50: 84 00 a0 01 inc %g2
201fb54: 07 00 80 cc sethi %hi(0x2033000), %g3
201fb58: 90 00 80 08 add %g2, %o0, %o0
201fb5c: d0 30 e1 44 sth %o0, [ %g3 + 0x144 ]
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
201fb60: 80 a0 67 bc cmp %g1, 0x7bc
201fb64: 08 80 00 07 bleu 201fb80 <msdos_date_unix2dos+0x120> <== NEVER TAKEN
201fb68: 84 10 00 08 mov %o0, %g2
lastddate += (year - 1980) <<
201fb6c: 82 00 78 44 add %g1, -1980, %g1
201fb70: 83 28 60 09 sll %g1, 9, %g1
201fb74: 90 02 00 01 add %o0, %g1, %o0
201fb78: 84 10 00 08 mov %o0, %g2
201fb7c: d0 30 e1 44 sth %o0, [ %g3 + 0x144 ]
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
201fb80: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
201fb84: c4 36 40 00 sth %g2, [ %i1 ]
}
201fb88: 81 c7 e0 08 ret
201fb8c: 81 e8 00 00 restore
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
201fb90: 09 00 80 ca sethi %hi(0x2032800), %g4 <== NOT EXECUTED
201fb94: 10 bf ff e5 b 201fb28 <msdos_date_unix2dos+0xc8> <== NOT EXECUTED
201fb98: 88 11 21 ec or %g4, 0x1ec, %g4 ! 20329ec <regyear> <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
201fb9c: 10 bf ff ed b 201fb50 <msdos_date_unix2dos+0xf0>
201fba0: 85 28 a0 05 sll %g2, 5, %g2
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
201fba4: 03 00 80 cc sethi %hi(0x2033000), %g1
201fba8: f0 10 61 3c lduh [ %g1 + 0x13c ], %i0 ! 203313c <lastdtime>
201fbac: 03 00 80 cc sethi %hi(0x2033000), %g1
201fbb0: c4 10 61 44 lduh [ %g1 + 0x144 ], %g2 ! 2033144 <lastddate>
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
201fbb4: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
201fbb8: c4 36 40 00 sth %g2, [ %i1 ]
}
201fbbc: 81 c7 e0 08 ret
201fbc0: 81 e8 00 00 restore
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
201fbc4: 03 00 80 cc sethi %hi(0x2033000), %g1
201fbc8: c4 10 61 44 lduh [ %g1 + 0x144 ], %g2 ! 2033144 <lastddate>
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
201fbcc: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
201fbd0: c4 36 40 00 sth %g2, [ %i1 ]
}
201fbd4: 81 c7 e0 08 ret
201fbd8: 81 e8 00 00 restore
02020710 <msdos_dir_chmod>:
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
2020710: 81 c3 e0 08 retl <== NOT EXECUTED
2020714: 90 10 20 00 clr %o0 <== NOT EXECUTED
0201ffc8 <msdos_dir_close>:
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
201ffc8: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201ffcc: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201ffd0: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
int
msdos_dir_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201ffd4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201ffd8: 92 10 20 00 clr %o1
201ffdc: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201ffe0: 7f ff ac a4 call 200b270 <rtems_semaphore_obtain>
201ffe4: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201ffe8: 80 a2 20 00 cmp %o0, 0
201ffec: 12 80 00 11 bne 2020030 <msdos_dir_close+0x68> <== NEVER TAKEN
201fff0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
201fff4: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
201fff8: 7f ff d1 83 call 2014604 <fat_file_close>
201fffc: 92 10 00 1c mov %i4, %o1
2020000: b0 10 00 08 mov %o0, %i0
if (rc != RC_OK)
2020004: 80 a6 20 00 cmp %i0, 0
2020008: 12 80 00 06 bne 2020020 <msdos_dir_close+0x58> <== NEVER TAKEN
202000c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
2020010: 7f ff ac e2 call 200b398 <rtems_semaphore_release>
2020014: 01 00 00 00 nop
return RC_OK;
}
2020018: 81 c7 e0 08 ret
202001c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2020020: 7f ff ac de call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2020024: 01 00 00 00 nop <== NOT EXECUTED
return rc;
2020028: 81 c7 e0 08 ret <== NOT EXECUTED
202002c: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
2020030: 40 00 02 42 call 2020938 <__errno> <== NOT EXECUTED
2020034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020038: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
202003c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2020040: 81 c7 e0 08 ret <== NOT EXECUTED
2020044: 81 e8 00 00 restore <== NOT EXECUTED
0201cf68 <msdos_dir_is_empty>:
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
201cf68: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201cf6c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
201cf70: 39 00 80 c5 sethi %hi(0x2031400), %i4 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
201cf74: ec 17 40 00 lduh [ %i5 ], %l6 <== NOT EXECUTED
201cf78: e2 07 60 9c ld [ %i5 + 0x9c ], %l1 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
201cf7c: 21 00 80 c5 sethi %hi(0x2031400), %l0 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
201cf80: c0 2e 80 00 clrb [ %i2 ] <== NOT EXECUTED
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
201cf84: b6 10 20 00 clr %i3 <== NOT EXECUTED
201cf88: ad 2d a0 10 sll %l6, 0x10, %l6 <== NOT EXECUTED
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
201cf8c: b8 17 21 a8 or %i4, 0x1a8, %i4 <== NOT EXECUTED
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
201cf90: a0 14 21 b8 or %l0, 0x1b8, %l0 <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
201cf94: ad 35 a0 10 srl %l6, 0x10, %l6 <== NOT EXECUTED
201cf98: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201cf9c: 40 00 41 c8 call 202d6bc <.umul> <== NOT EXECUTED
201cfa0: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
201cfa4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201cfa8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201cfac: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
201cfb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201cfb4: 7f ff dc 84 call 20141c4 <fat_file_read> <== NOT EXECUTED
201cfb8: 98 10 00 11 mov %l1, %o4 <== NOT EXECUTED
201cfbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201cfc0: 02 80 00 34 be 201d090 <msdos_dir_is_empty+0x128> <== NOT EXECUTED
201cfc4: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201cfc8: 24 80 00 27 ble,a 201d064 <msdos_dir_is_empty+0xfc> <== NOT EXECUTED
201cfcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
201cfd0: ec 17 40 00 lduh [ %i5 ], %l6 <== NOT EXECUTED
201cfd4: ad 2d a0 10 sll %l6, 0x10, %l6 <== NOT EXECUTED
201cfd8: ab 35 a0 10 srl %l6, 0x10, %l5 <== NOT EXECUTED
201cfdc: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED
201cfe0: 12 80 00 2e bne 201d098 <msdos_dir_is_empty+0x130> <== NOT EXECUTED
201cfe4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
201cfe8: 02 80 00 27 be 201d084 <msdos_dir_is_empty+0x11c> <== NOT EXECUTED
201cfec: a6 10 20 00 clr %l3 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
201cff0: e2 07 60 9c ld [ %i5 + 0x9c ], %l1 <== NOT EXECUTED
201cff4: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
201cff8: e8 0c 80 00 ldub [ %l2 ], %l4 <== NOT EXECUTED
201cffc: 80 a5 20 e5 cmp %l4, 0xe5 <== NOT EXECUTED
201d000: 22 80 00 1c be,a 201d070 <msdos_dir_is_empty+0x108> <== NOT EXECUTED
201d004: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
201d008: c2 0c a0 0b ldub [ %l2 + 0xb ], %g1 <== NOT EXECUTED
201d00c: 82 08 60 3f and %g1, 0x3f, %g1 <== NOT EXECUTED
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
201d010: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED
201d014: 02 80 00 16 be 201d06c <msdos_dir_is_empty+0x104> <== NOT EXECUTED
201d018: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
201d01c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201d020: 40 00 15 43 call 202252c <strncmp> <== NOT EXECUTED
201d024: 94 10 20 0b mov 0xb, %o2 <== NOT EXECUTED
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
201d028: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d02c: 22 80 00 11 be,a 201d070 <msdos_dir_is_empty+0x108> <== NOT EXECUTED
201d030: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
201d034: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
201d038: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201d03c: 40 00 15 3c call 202252c <strncmp> <== NOT EXECUTED
201d040: 94 10 20 0b mov 0xb, %o2 <== NOT EXECUTED
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
201d044: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d048: 22 80 00 0a be,a 201d070 <msdos_dir_is_empty+0x108> <== NOT EXECUTED
201d04c: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
201d050: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
201d054: 12 80 00 04 bne 201d064 <msdos_dir_is_empty+0xfc> <== NOT EXECUTED
201d058: b0 10 20 00 clr %i0 <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
201d05c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201d060: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
return RC_OK;
201d064: 81 c7 e0 08 ret <== NOT EXECUTED
201d068: 81 e8 00 00 restore <== NOT EXECUTED
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d06c: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
201d070: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED
201d074: 0a bf ff e1 bcs 201cff8 <msdos_dir_is_empty+0x90> <== NOT EXECUTED
201d078: a4 04 a0 20 add %l2, 0x20, %l2 <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
201d07c: 10 bf ff c6 b 201cf94 <msdos_dir_is_empty+0x2c> <== NOT EXECUTED
201d080: b6 06 e0 01 inc %i3 <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
201d084: e2 07 60 9c ld [ %i5 + 0x9c ], %l1 <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
201d088: 10 bf ff c3 b 201cf94 <msdos_dir_is_empty+0x2c> <== NOT EXECUTED
201d08c: b6 06 e0 01 inc %i3 <== NOT EXECUTED
}
*ret_val = true;
return RC_OK;
201d090: 10 bf ff f3 b 201d05c <msdos_dir_is_empty+0xf4> <== NOT EXECUTED
201d094: b0 10 20 00 clr %i0 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
201d098: 11 00 80 c5 sethi %hi(0x2031400), %o0 <== NOT EXECUTED
201d09c: 15 00 80 c5 sethi %hi(0x2031400), %o2 <== NOT EXECUTED
201d0a0: 17 00 80 c5 sethi %hi(0x2031400), %o3 <== NOT EXECUTED
201d0a4: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
201d0a8: 92 10 23 b5 mov 0x3b5, %o1 <== NOT EXECUTED
201d0ac: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED
201d0b0: 7f ff ea 80 call 2017ab0 <__assert_func> <== NOT EXECUTED
201d0b4: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED
020205d8 <msdos_dir_lseek>:
* RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
off_t
msdos_dir_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
20205d8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
switch (whence)
20205dc: 80 a6 e0 01 cmp %i3, 1 <== NOT EXECUTED
20205e0: 28 80 00 09 bleu,a 2020604 <msdos_dir_lseek+0x2c> <== NOT EXECUTED
20205e4: b0 10 20 00 clr %i0 <== NOT EXECUTED
* Movement past the end of the directory via lseek is not a
* permitted operation
*/
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
20205e8: 40 00 00 d4 call 2020938 <__errno> <== NOT EXECUTED
20205ec: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
20205f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20205f4: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
20205f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20205fc: 81 c7 e0 08 ret <== NOT EXECUTED
2020600: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
break;
}
return RC_OK;
}
2020604: 81 c7 e0 08 ret <== NOT EXECUTED
2020608: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
0201ff44 <msdos_dir_open>:
* set apropriately)
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
201ff44: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201ff48: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201ff4c: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201ff50: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201ff54: 92 10 20 00 clr %o1
201ff58: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
201ff5c: 94 10 20 00 clr %o2
201ff60: 7f ff ac c4 call 200b270 <rtems_semaphore_obtain>
201ff64: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201ff68: 80 a2 20 00 cmp %o0, 0
201ff6c: 12 80 00 11 bne 201ffb0 <msdos_dir_open+0x6c> <== NEVER TAKEN
201ff70: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
201ff74: 7f ff d0 8e call 20141ac <fat_file_reopen>
201ff78: 90 10 00 1b mov %i3, %o0
201ff7c: b0 10 00 08 mov %o0, %i0
if (rc != RC_OK)
201ff80: 80 a6 20 00 cmp %i0, 0
201ff84: 12 80 00 07 bne 201ffa0 <msdos_dir_open+0x5c> <== NEVER TAKEN
201ff88: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
201ff8c: c0 27 60 10 clr [ %i5 + 0x10 ]
rtems_semaphore_release(fs_info->vol_sema);
201ff90: 7f ff ad 02 call 200b398 <rtems_semaphore_release>
201ff94: c0 27 60 14 clr [ %i5 + 0x14 ]
return RC_OK;
}
201ff98: 81 c7 e0 08 ret
201ff9c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201ffa0: 7f ff ac fe call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201ffa4: 01 00 00 00 nop <== NOT EXECUTED
return rc;
201ffa8: 81 c7 e0 08 ret <== NOT EXECUTED
201ffac: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
201ffb0: 40 00 02 62 call 2020938 <__errno> <== NOT EXECUTED
201ffb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201ffb8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201ffbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201ffc0: 81 c7 e0 08 ret <== NOT EXECUTED
201ffc4: 81 e8 00 00 restore <== NOT EXECUTED
02020048 <msdos_dir_read>:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
2020048: 9d e3 be 68 save %sp, -408, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
202004c: e8 06 20 1c ld [ %i0 + 0x1c ], %l4 <== NOT EXECUTED
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2020050: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
2020054: c2 05 20 20 ld [ %l4 + 0x20 ], %g1 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
fat_file_fd_t *tmp_fat_fd = NULL;
2020058: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
202005c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
2020060: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
2020064: ac 10 00 19 mov %i1, %l6 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2020068: f6 00 a0 34 ld [ %g2 + 0x34 ], %i3 <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
202006c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2020070: 02 80 00 f8 be 2020450 <msdos_dir_read+0x408> <== NOT EXECUTED
2020074: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
2020078: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
202007c: c4 27 be cc st %g2, [ %fp + -308 ] <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2020080: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
2020084: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020088: 7f ff ac 7a call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
202008c: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2020090: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2020094: 12 80 01 4b bne 20205c0 <msdos_dir_read+0x578> <== NOT EXECUTED
2020098: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
202009c: 40 00 35 c2 call 202d7a4 <.udiv> <== NOT EXECUTED
20200a0: 92 10 21 18 mov 0x118, %o1 <== NOT EXECUTED
20200a4: 83 2a 20 03 sll %o0, 3, %g1 <== NOT EXECUTED
20200a8: 91 2a 20 05 sll %o0, 5, %o0 <== NOT EXECUTED
20200ac: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED
20200b0: a5 28 60 03 sll %g1, 3, %l2 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
20200b4: a4 a4 80 01 subcc %l2, %g1, %l2 <== NOT EXECUTED
20200b8: 02 80 01 40 be 20205b8 <msdos_dir_read+0x570> <== NOT EXECUTED
20200bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
20200c0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20200c4: 94 10 20 00 clr %o2 <== NOT EXECUTED
20200c8: 96 10 21 18 mov 0x118, %o3 <== NOT EXECUTED
20200cc: 40 00 37 40 call 202ddcc <__divdi3> <== NOT EXECUTED
20200d0: a6 10 20 00 clr %l3 <== NOT EXECUTED
20200d4: aa 10 20 00 clr %l5 <== NOT EXECUTED
20200d8: b2 10 00 09 mov %o1, %i1 <== NOT EXECUTED
20200dc: b0 10 20 00 clr %i0 <== NOT EXECUTED
20200e0: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
20200e4: a2 10 20 00 clr %l1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
20200e8: ae 10 00 16 mov %l6, %l7 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
20200ec: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
20200f0: d8 06 e0 9c ld [ %i3 + 0x9c ], %o4 <== NOT EXECUTED
20200f4: d6 07 be cc ld [ %fp + -308 ], %o3 <== NOT EXECUTED
20200f8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20200fc: 7f ff d0 32 call 20141c4 <fat_file_read> <== NOT EXECUTED
2020100: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
2020104: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
2020108: 04 80 01 22 ble 2020590 <msdos_dir_read+0x548> <== NOT EXECUTED
202010c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
2020110: ec 06 e0 9c ld [ %i3 + 0x9c ], %l6 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
2020114: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
2020118: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
202011c: 02 80 00 c7 be 2020438 <msdos_dir_read+0x3f0> <== NOT EXECUTED
2020120: b8 10 20 00 clr %i4 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
2020124: 10 80 00 0f b 2020160 <msdos_dir_read+0x118> <== NOT EXECUTED
2020128: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
202012c: 80 a0 a0 0f cmp %g2, 0xf <== NOT EXECUTED
2020130: 02 80 00 27 be 20201cc <msdos_dir_read+0x184> <== NOT EXECUTED
2020134: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
2020138: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
202013c: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
2020140: 1a 80 00 19 bcc 20201a4 <msdos_dir_read+0x15c> <== NOT EXECUTED
2020144: c8 07 be cc ld [ %fp + -308 ], %g4 <== NOT EXECUTED
{
char* entry = (char*) fs_info->cl_buf + i;
2020148: ec 06 e0 9c ld [ %i3 + 0x9c ], %l6 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
202014c: c2 0d 80 1c ldub [ %l6 + %i4 ], %g1 <== NOT EXECUTED
2020150: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2020154: 02 80 00 b9 be 2020438 <msdos_dir_read+0x3f0> <== NOT EXECUTED
2020158: ac 05 80 1c add %l6, %i4, %l6 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
202015c: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
2020160: 22 bf ff f7 be,a 202013c <msdos_dir_read+0xf4> <== NOT EXECUTED
2020164: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
2020168: c4 0d a0 0b ldub [ %l6 + 0xb ], %g2 <== NOT EXECUTED
202016c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
2020170: 12 bf ff ef bne 202012c <msdos_dir_read+0xe4> <== NOT EXECUTED
2020174: 84 08 a0 3f and %g2, 0x3f, %g2 <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long file
* name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
2020178: 80 a0 a0 0f cmp %g2, 0xf <== NOT EXECUTED
202017c: 02 80 00 13 be 20201c8 <msdos_dir_read+0x180> <== NOT EXECUTED
2020180: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
2020184: 22 80 00 3c be,a 2020274 <msdos_dir_read+0x22c> <== NOT EXECUTED
2020188: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
202018c: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
* Skip active entries until get the entry to start from.
*/
if (start)
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
2020190: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
2020194: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
2020198: 0a bf ff ec bcs 2020148 <msdos_dir_read+0x100> <== NOT EXECUTED
202019c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
20201a0: c8 07 be cc ld [ %fp + -308 ], %g4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
20201a4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
20201a8: 12 bf ff d1 bne 20200ec <msdos_dir_read+0xa4> <== NOT EXECUTED
20201ac: a6 04 c0 04 add %l3, %g4, %l3 <== NOT EXECUTED
20201b0: 82 10 00 11 mov %l1, %g1 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
20201b4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
20201b8: 7f ff ac 78 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20201bc: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
return cmpltd;
20201c0: 10 80 00 a2 b 2020448 <msdos_dir_read+0x400> <== NOT EXECUTED
20201c4: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
20201c8: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
20201cc: 02 80 00 8f be 2020408 <msdos_dir_read+0x3c0> <== NOT EXECUTED
20201d0: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
20201d4: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
20201d8: 82 08 60 3f and %g1, 0x3f, %g1 <== NOT EXECUTED
20201dc: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
20201e0: 22 80 00 04 be,a 20201f0 <msdos_dir_read+0x1a8> <== NOT EXECUTED
20201e4: da 0d a0 0d ldub [ %l6 + 0xd ], %o5 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
lfn_start = FAT_FILE_SHORT_NAME;
20201e8: 10 bf ff d4 b 2020138 <msdos_dir_read+0xf0> <== NOT EXECUTED
20201ec: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
20201f0: 82 0e 20 ff and %i0, 0xff, %g1 <== NOT EXECUTED
20201f4: 84 0b 60 ff and %o5, 0xff, %g2 <== NOT EXECUTED
20201f8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20201fc: 32 bf ff cf bne,a 2020138 <msdos_dir_read+0xf0> <== NOT EXECUTED
2020200: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
* The DOS maximum length is 255 characters without the
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
2020204: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
2020208: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
202020c: 9f 2d 60 04 sll %l5, 4, %o7 <== NOT EXECUTED
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
2020210: ac 05 a0 01 inc %l6 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
2020214: 9e 23 c0 01 sub %o7, %g1, %o7 <== NOT EXECUTED
2020218: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
202021c: 9e 03 c0 15 add %o7, %l5, %o7 <== NOT EXECUTED
2020220: 82 10 00 0f mov %o7, %g1 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
2020224: 84 07 be d0 add %fp, -304, %g2 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
2020228: 80 a0 60 fe cmp %g1, 0xfe <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
202022c: 88 00 80 01 add %g2, %g1, %g4 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
2020230: 18 80 00 99 bgu 2020494 <msdos_dir_read+0x44c> <== NOT EXECUTED
2020234: 84 20 40 0f sub %g1, %o7, %g2 <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
2020238: f0 0d 80 00 ldub [ %l6 ], %i0 <== NOT EXECUTED
202023c: f0 29 20 14 stb %i0, [ %g4 + 0x14 ] <== NOT EXECUTED
if (*p == '\0')
2020240: c8 4d 80 00 ldsb [ %l6 ], %g4 <== NOT EXECUTED
2020244: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
2020248: 02 80 00 93 be 2020494 <msdos_dir_read+0x44c> <== NOT EXECUTED
202024c: 82 00 60 01 inc %g1 <== NOT EXECUTED
break;
switch (q)
2020250: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED
2020254: 02 80 00 8d be 2020488 <msdos_dir_read+0x440> <== NOT EXECUTED
2020258: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
202025c: 02 80 00 88 be 202047c <msdos_dir_read+0x434> <== NOT EXECUTED
2020260: 80 a0 e0 0d cmp %g3, 0xd <== NOT EXECUTED
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
2020264: 02 80 00 8c be 2020494 <msdos_dir_read+0x44c> <== NOT EXECUTED
2020268: 86 00 e0 01 inc %g3 <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
202026c: 10 bf ff ee b 2020224 <msdos_dir_read+0x1dc> <== NOT EXECUTED
2020270: ac 05 a0 02 add %l6, 2, %l6 <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(iop->pathinfo.mt_entry, fat_fd, F_CLU_NUM,
2020274: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
2020278: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
202027c: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
2020280: 7f ff d1 13 call 20146cc <fat_file_ioctl> <== NOT EXECUTED
2020284: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
2020288: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202028c: 12 80 00 84 bne 202049c <msdos_dir_read+0x454> <== NOT EXECUTED
2020290: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
2020294: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2020298: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
202029c: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED
20202a0: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
20202a4: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED
dir_pos.sname.ofs = i;
20202a8: f8 27 bf ec st %i4, [ %fp + -20 ] <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
20202ac: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
20202b0: 7f ff cf 13 call 2013efc <fat_file_open> <== NOT EXECUTED
20202b4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if (rc != RC_OK)
20202b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20202bc: 12 80 00 78 bne 202049c <msdos_dir_read+0x454> <== NOT EXECUTED
20202c0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
20202c4: 86 10 21 18 mov 0x118, %g3 <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
20202c8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
20202cc: c0 27 be d8 clr [ %fp + -296 ] <== NOT EXECUTED
20202d0: e2 27 be dc st %l1, [ %fp + -292 ] <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
20202d4: c6 37 be e0 sth %g3, [ %fp + -288 ] <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
20202d8: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
20202dc: 02 80 00 31 be 20203a0 <msdos_dir_read+0x358> <== NOT EXECUTED
20202e0: c2 27 be d0 st %g1, [ %fp + -304 ] <== NOT EXECUTED
20202e4: 82 10 20 00 clr %g1 <== NOT EXECUTED
20202e8: 84 10 20 00 clr %g2 <== NOT EXECUTED
20202ec: 10 80 00 06 b 2020304 <msdos_dir_read+0x2bc> <== NOT EXECUTED
20202f0: 86 10 20 00 clr %g3 <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
20202f4: 80 a0 00 04 cmp %g0, %g4 <== NOT EXECUTED
20202f8: 84 40 3f ff addx %g0, -1, %g2 <== NOT EXECUTED
20202fc: 84 08 a0 80 and %g2, 0x80, %g2 <== NOT EXECUTED
2020300: 84 00 bf 80 add %g2, -128, %g2 <== NOT EXECUTED
2020304: c8 0d 80 01 ldub [ %l6 + %g1 ], %g4 <== NOT EXECUTED
2020308: 87 30 e0 01 srl %g3, 1, %g3 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
202030c: 82 00 60 01 inc %g1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
2020310: 84 00 c0 02 add %g3, %g2, %g2 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
2020314: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
2020318: 84 00 80 04 add %g2, %g4, %g2 <== NOT EXECUTED
202031c: 86 08 a0 ff and %g2, 0xff, %g3 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
2020320: 12 bf ff f5 bne 20202f4 <msdos_dir_read+0x2ac> <== NOT EXECUTED
2020324: 88 08 e0 01 and %g3, 1, %g4 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
2020328: 84 1e 00 02 xor %i0, %g2, %g2 <== NOT EXECUTED
202032c: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
2020330: 12 80 00 1d bne 20203a4 <msdos_dir_read+0x35c> <== NOT EXECUTED
2020334: 84 10 20 08 mov 8, %g2 <== NOT EXECUTED
2020338: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
202033c: 12 80 00 1b bne 20203a8 <msdos_dir_read+0x360> <== NOT EXECUTED
2020340: 82 05 80 02 add %l6, %g2, %g1 <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
2020344: 40 00 08 49 call 2022468 <strlen> <== NOT EXECUTED
2020348: 90 07 be e4 add %fp, -284, %o0 <== NOT EXECUTED
202034c: d0 37 be e2 sth %o0, [ %fp + -286 ] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
2020350: 92 07 be d0 add %fp, -304, %o1 <== NOT EXECUTED
2020354: 94 10 21 18 mov 0x118, %o2 <== NOT EXECUTED
2020358: 40 00 04 47 call 2021474 <memcpy> <== NOT EXECUTED
202035c: 90 05 c0 11 add %l7, %l1, %o0 <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
2020360: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
2020364: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
2020368: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
202036c: 86 80 e1 18 addcc %g3, 0x118, %g3 <== NOT EXECUTED
2020370: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
2020374: 7f ff d0 a4 call 2014604 <fat_file_close> <== NOT EXECUTED
2020378: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
if (rc != RC_OK)
202037c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2020380: 12 80 00 47 bne 202049c <msdos_dir_read+0x454> <== NOT EXECUTED
2020384: a2 04 61 18 add %l1, 0x118, %l1 <== NOT EXECUTED
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
2020388: a4 04 be e8 add %l2, -280, %l2 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
202038c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2020390: 32 bf ff 6b bne,a 202013c <msdos_dir_read+0xf4> <== NOT EXECUTED
2020394: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
2020398: 10 bf ff 87 b 20201b4 <msdos_dir_read+0x16c> <== NOT EXECUTED
202039c: 82 10 00 11 mov %l1, %g1 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
20203a0: 84 10 20 08 mov 8, %g2 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
20203a4: 82 05 80 02 add %l6, %g2, %g1 <== NOT EXECUTED
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
20203a8: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 <== NOT EXECUTED
20203ac: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
20203b0: 12 80 00 42 bne 20204b8 <msdos_dir_read+0x470> <== NOT EXECUTED
20203b4: 09 00 80 ca sethi %hi(0x2032800), %g4 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
20203b8: 84 80 bf ff addcc %g2, -1, %g2 <== NOT EXECUTED
20203bc: 12 bf ff fb bne 20203a8 <msdos_dir_read+0x360> <== NOT EXECUTED
20203c0: 82 05 80 02 add %l6, %g2, %g1 <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
20203c4: 82 07 be e4 add %fp, -284, %g1 <== NOT EXECUTED
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
20203c8: c6 4d a0 0a ldsb [ %l6 + 0xa ], %g3 <== NOT EXECUTED
20203cc: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
20203d0: 12 80 00 51 bne 2020514 <msdos_dir_read+0x4cc> <== NOT EXECUTED
20203d4: 98 10 20 03 mov 3, %o4 <== NOT EXECUTED
20203d8: c6 4d a0 09 ldsb [ %l6 + 9 ], %g3 <== NOT EXECUTED
20203dc: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
20203e0: 12 80 00 4d bne 2020514 <msdos_dir_read+0x4cc> <== NOT EXECUTED
20203e4: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
20203e8: c6 4d a0 08 ldsb [ %l6 + 8 ], %g3 <== NOT EXECUTED
20203ec: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
20203f0: 12 80 00 49 bne 2020514 <msdos_dir_read+0x4cc> <== NOT EXECUTED
20203f4: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
20203f8: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
20203fc: c4 37 be e2 sth %g2, [ %fp + -286 ] <== NOT EXECUTED
2020400: 10 bf ff d4 b 2020350 <msdos_dir_read+0x308> <== NOT EXECUTED
2020404: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
if (lfn_start == FAT_FILE_SHORT_NAME)
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
2020408: 22 bf ff 4d be,a 202013c <msdos_dir_read+0xf4> <== NOT EXECUTED
202040c: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
/*
* Remember the start location of the long file name.
*/
lfn_start =
((j * bts2rd) + i) / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
2020410: a0 04 c0 1c add %l3, %i4, %l0 <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
2020414: aa 08 60 3f and %g1, 0x3f, %l5 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
2020418: a1 34 20 05 srl %l0, 5, %l0 <== NOT EXECUTED
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
202041c: f0 0d a0 0d ldub [ %l6 + 0xd ], %i0 <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
2020420: 90 07 be e4 add %fp, -284, %o0 <== NOT EXECUTED
2020424: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020428: 40 00 04 4f call 2021564 <memset> <== NOT EXECUTED
202042c: 94 10 21 00 mov 0x100, %o2 <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
2020430: 10 bf ff 6a b 20201d8 <msdos_dir_read+0x190> <== NOT EXECUTED
2020434: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
2020438: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
202043c: 7f ff ab d7 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2020440: e2 27 be c8 st %l1, [ %fp + -312 ] <== NOT EXECUTED
return cmpltd;
2020444: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
2020448: 81 c7 e0 08 ret <== NOT EXECUTED
202044c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
2020450: c2 05 20 24 ld [ %l4 + 0x24 ], %g1 <== NOT EXECUTED
2020454: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2020458: 32 bf ff 09 bne,a 202007c <msdos_dir_read+0x34> <== NOT EXECUTED
202045c: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
2020460: c2 0e e0 0a ldub [ %i3 + 0xa ], %g1 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
2020464: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
2020468: 22 bf ff 05 be,a 202007c <msdos_dir_read+0x34> <== NOT EXECUTED
202046c: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
2020470: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 <== NOT EXECUTED
2020474: 10 bf ff 03 b 2020080 <msdos_dir_read+0x38> <== NOT EXECUTED
2020478: c2 27 be cc st %g1, [ %fp + -308 ] <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
202047c: ac 05 a0 04 add %l6, 4, %l6 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
2020480: 10 bf ff 69 b 2020224 <msdos_dir_read+0x1dc> <== NOT EXECUTED
2020484: 86 00 e0 01 inc %g3 <== NOT EXECUTED
break;
switch (q)
{
case 4:
p += 5;
2020488: ac 05 a0 05 add %l6, 5, %l6 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
202048c: 10 bf ff 66 b 2020224 <msdos_dir_read+0x1dc> <== NOT EXECUTED
2020490: 86 00 e0 01 inc %g3 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
2020494: 10 bf ff be b 202038c <msdos_dir_read+0x344> <== NOT EXECUTED
2020498: b0 10 00 0d mov %o5, %i0 <== NOT EXECUTED
202049c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
20204a0: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
20204a4: 7f ff ab bd call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20204a8: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
return rc;
20204ac: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
20204b0: 81 c7 e0 08 ret <== NOT EXECUTED
20204b4: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
20204b8: 82 10 20 00 clr %g1 <== NOT EXECUTED
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
20204bc: 10 80 00 05 b 20204d0 <msdos_dir_read+0x488> <== NOT EXECUTED
20204c0: da 01 22 1c ld [ %g4 + 0x21c ], %o5 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
20204c4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20204c8: 02 80 00 0f be 2020504 <msdos_dir_read+0x4bc> <== NOT EXECUTED
20204cc: c6 29 20 14 stb %g3, [ %g4 + 0x14 ] <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
20204d0: c6 0d 80 01 ldub [ %l6 + %g1 ], %g3 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
20204d4: 9e 07 be d0 add %fp, -304, %o7 <== NOT EXECUTED
20204d8: 88 03 c0 01 add %o7, %g1, %g4 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
20204dc: 9e 03 40 03 add %o5, %g3, %o7 <== NOT EXECUTED
20204e0: de 0b e0 01 ldub [ %o7 + 1 ], %o7 <== NOT EXECUTED
20204e4: 9e 0b e0 03 and %o7, 3, %o7 <== NOT EXECUTED
20204e8: 80 a3 e0 01 cmp %o7, 1 <== NOT EXECUTED
20204ec: 12 bf ff f6 bne 20204c4 <msdos_dir_read+0x47c> <== NOT EXECUTED
20204f0: 82 00 60 01 inc %g1 <== NOT EXECUTED
20204f4: 86 00 e0 20 add %g3, 0x20, %g3 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
20204f8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20204fc: 12 bf ff f5 bne 20204d0 <msdos_dir_read+0x488> <== NOT EXECUTED
2020500: c6 29 20 14 stb %g3, [ %g4 + 0x14 ] <== NOT EXECUTED
2020504: 86 07 be d0 add %fp, -304, %g3 <== NOT EXECUTED
2020508: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
202050c: 10 bf ff af b 20203c8 <msdos_dir_read+0x380> <== NOT EXECUTED
2020510: 82 00 60 14 add %g1, 0x14, %g1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
2020514: 96 00 60 01 add %g1, 1, %o3 <== NOT EXECUTED
2020518: 9e 10 20 2e mov 0x2e, %o7 <== NOT EXECUTED
202051c: de 28 40 00 stb %o7, [ %g1 ] <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2020520: 03 00 80 ca sethi %hi(0x2032800), %g1 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
2020524: 86 03 20 01 add %o4, 1, %g3 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2020528: da 00 62 1c ld [ %g1 + 0x21c ], %o5 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
202052c: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2020530: 94 03 3f ff add %o4, -1, %o2 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
2020534: 9e 05 80 0c add %l6, %o4, %o7 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
2020538: 10 80 00 06 b 2020550 <msdos_dir_read+0x508> <== NOT EXECUTED
202053c: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
2020540: c6 28 40 00 stb %g3, [ %g1 ] <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2020544: 80 a5 80 0f cmp %l6, %o7 <== NOT EXECUTED
2020548: 02 80 00 0e be 2020580 <msdos_dir_read+0x538> <== NOT EXECUTED
202054c: 82 00 60 01 inc %g1 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
2020550: c6 0d a0 08 ldub [ %l6 + 8 ], %g3 <== NOT EXECUTED
2020554: 88 03 40 03 add %o5, %g3, %g4 <== NOT EXECUTED
2020558: c8 09 20 01 ldub [ %g4 + 1 ], %g4 <== NOT EXECUTED
202055c: 88 09 20 03 and %g4, 3, %g4 <== NOT EXECUTED
2020560: 80 a1 20 01 cmp %g4, 1 <== NOT EXECUTED
2020564: 12 bf ff f7 bne 2020540 <msdos_dir_read+0x4f8> <== NOT EXECUTED
2020568: ac 05 a0 01 inc %l6 <== NOT EXECUTED
202056c: 86 00 e0 20 add %g3, 0x20, %g3 <== NOT EXECUTED
2020570: c6 28 40 00 stb %g3, [ %g1 ] <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2020574: 80 a5 80 0f cmp %l6, %o7 <== NOT EXECUTED
2020578: 12 bf ff f6 bne 2020550 <msdos_dir_read+0x508> <== NOT EXECUTED
202057c: 82 00 60 01 inc %g1 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
2020580: 84 00 a0 01 inc %g2 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2020584: 82 02 c0 0c add %o3, %o4, %g1 <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
2020588: 10 bf ff 9c b 20203f8 <msdos_dir_read+0x3b0> <== NOT EXECUTED
202058c: 84 00 80 0a add %g2, %o2, %g2 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
2020590: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
2020594: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
2020598: 7f ff ab 80 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
202059c: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
20205a0: 40 00 00 e6 call 2020938 <__errno> <== NOT EXECUTED
20205a4: 01 00 00 00 nop <== NOT EXECUTED
20205a8: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
20205ac: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
20205b0: 10 bf ff a6 b 2020448 <msdos_dir_read+0x400> <== NOT EXECUTED
20205b4: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
20205b8: 10 bf fe ff b 20201b4 <msdos_dir_read+0x16c> <== NOT EXECUTED
20205bc: 82 10 20 00 clr %g1 <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20205c0: 40 00 00 de call 2020938 <__errno> <== NOT EXECUTED
20205c4: 01 00 00 00 nop <== NOT EXECUTED
20205c8: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
20205cc: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
20205d0: 10 bf ff 9e b 2020448 <msdos_dir_read+0x400> <== NOT EXECUTED
20205d4: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED
02020718 <msdos_dir_rmnod>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
2020718: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
202071c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
2020720: fa 06 40 00 ld [ %i1 ], %i5 <== NOT EXECUTED
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2020724: f8 00 60 34 ld [ %g1 + 0x34 ], %i4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
2020728: c0 2f bf ff clrb [ %fp + -1 ] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
202072c: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
2020730: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020734: 7f ff aa cf call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
2020738: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
202073c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2020740: 12 80 00 2e bne 20207f8 <msdos_dir_rmnod+0xe0> <== NOT EXECUTED
2020744: 01 00 00 00 nop <== NOT EXECUTED
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
2020748: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
202074c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2020750: 18 80 00 21 bgu 20207d4 <msdos_dir_rmnod+0xbc> <== NOT EXECUTED
2020754: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
2020758: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
202075c: 7f ff f2 03 call 201cf68 <msdos_dir_is_empty> <== NOT EXECUTED
2020760: 94 07 bf ff add %fp, -1, %o2 <== NOT EXECUTED
if (rc != RC_OK)
2020764: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2020768: 12 80 00 17 bne 20207c4 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
202076c: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (!is_empty)
2020770: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2020774: 22 80 00 27 be,a 2020810 <msdos_dir_rmnod+0xf8> <== NOT EXECUTED
2020778: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
202077c: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
}
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
2020780: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
2020784: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 <== NOT EXECUTED
2020788: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
202078c: 02 80 00 12 be 20207d4 <msdos_dir_rmnod+0xbc> <== NOT EXECUTED
2020790: 92 07 60 20 add %i5, 0x20, %o1 <== NOT EXECUTED
* You cannot remove a mountpoint.
* not used - mount() not implemenetd yet.
*/
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
2020794: 7f ff f1 86 call 201cdac <msdos_set_first_char4file_name> <== NOT EXECUTED
2020798: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
202079c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20207a0: 12 80 00 09 bne 20207c4 <msdos_dir_rmnod+0xac> <== NOT EXECUTED
20207a4: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
20207a8: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
20207ac: 7f ff d1 47 call 2014cc8 <fat_file_mark_removed> <== NOT EXECUTED
20207b0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
20207b4: 7f ff aa f9 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20207b8: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
20207bc: 81 c7 e0 08 ret <== NOT EXECUTED
20207c0: 81 e8 00 00 restore <== NOT EXECUTED
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
20207c4: 7f ff aa f5 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20207c8: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
20207cc: 81 c7 e0 08 ret <== NOT EXECUTED
20207d0: 81 e8 00 00 restore <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
{
rtems_semaphore_release(fs_info->vol_sema);
20207d4: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
20207d8: 7f ff aa f0 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20207dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
20207e0: 40 00 00 56 call 2020938 <__errno> <== NOT EXECUTED
20207e4: 01 00 00 00 nop <== NOT EXECUTED
20207e8: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10> <== NOT EXECUTED
20207ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20207f0: 81 c7 e0 08 ret <== NOT EXECUTED
20207f4: 81 e8 00 00 restore <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20207f8: 40 00 00 50 call 2020938 <__errno> <== NOT EXECUTED
20207fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020800: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2020804: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2020808: 81 c7 e0 08 ret <== NOT EXECUTED
202080c: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
2020810: 7f ff aa e2 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2020814: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
2020818: 40 00 00 48 call 2020938 <__errno> <== NOT EXECUTED
202081c: 01 00 00 00 nop <== NOT EXECUTED
2020820: 82 10 20 5a mov 0x5a, %g1 ! 5a <PROM_START+0x5a> <== NOT EXECUTED
2020824: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2020828: 81 c7 e0 08 ret <== NOT EXECUTED
202082c: 81 e8 00 00 restore <== NOT EXECUTED
0202060c <msdos_dir_stat>:
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
202060c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
2020610: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
2020614: f8 06 00 00 ld [ %i0 ], %i4
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
2020618: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
202061c: 92 10 20 00 clr %o1
2020620: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
2020624: 7f ff ab 13 call 200b270 <rtems_semaphore_obtain>
2020628: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
202062c: 80 a2 20 00 cmp %o0, 0
2020630: 12 80 00 19 bne 2020694 <msdos_dir_stat+0x88> <== NEVER TAKEN
2020634: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
2020638: c4 1f 60 58 ldd [ %i5 + 0x58 ], %g2
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
202063c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
2020640: f0 17 40 00 lduh [ %i5 ], %i0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
2020644: de 07 20 0c ld [ %i4 + 0xc ], %o7
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
2020648: c8 07 20 40 ld [ %i4 + 0x40 ], %g4
rtems_semaphore_release(fs_info->vol_sema);
202064c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
2020650: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
2020654: 05 00 00 10 sethi %hi(0x4000), %g2
2020658: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 41ff <PROM_START+0x41ff>
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
202065c: bb 30 60 09 srl %g1, 9, %i5
buf->st_blksize = fs_info->fat.vol.bps;
2020660: f0 26 60 40 st %i0, [ %i1 + 0x40 ]
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
2020664: de 26 60 08 st %o7, [ %i1 + 8 ]
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
2020668: c0 26 60 18 clr [ %i1 + 0x18 ]
202066c: c0 26 60 1c clr [ %i1 + 0x1c ]
buf->st_size = fat_fd->fat_file_size;
2020670: c0 26 60 20 clr [ %i1 + 0x20 ]
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
2020674: c4 26 60 0c st %g2, [ %i1 + 0xc ]
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
2020678: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
202067c: fa 26 60 44 st %i5, [ %i1 + 0x44 ]
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
2020680: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
rtems_semaphore_release(fs_info->vol_sema);
2020684: 7f ff ab 45 call 200b398 <rtems_semaphore_release>
2020688: b0 10 20 00 clr %i0
return RC_OK;
}
202068c: 81 c7 e0 08 ret
2020690: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2020694: 40 00 00 a9 call 2020938 <__errno> <== NOT EXECUTED
2020698: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202069c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20206a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20206a4: 81 c7 e0 08 ret <== NOT EXECUTED
20206a8: 81 e8 00 00 restore <== NOT EXECUTED
020206ac <msdos_dir_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
20206ac: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20206b0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
int
msdos_dir_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
20206b4: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20206b8: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
20206bc: 92 10 20 00 clr %o1 <== NOT EXECUTED
20206c0: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
20206c4: 7f ff aa eb call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
20206c8: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20206cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20206d0: 12 80 00 0a bne 20206f8 <msdos_dir_sync+0x4c> <== NOT EXECUTED
20206d4: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
20206d8: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
20206dc: 7f ff d1 a6 call 2014d74 <fat_file_datasync> <== NOT EXECUTED
20206e0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
20206e4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
20206e8: 7f ff ab 2c call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20206ec: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
20206f0: 81 c7 e0 08 ret <== NOT EXECUTED
20206f4: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20206f8: 40 00 00 90 call 2020938 <__errno> <== NOT EXECUTED
20206fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2020700: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2020704: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2020708: 81 c7 e0 08 ret <== NOT EXECUTED
202070c: 81 e8 00 00 restore <== NOT EXECUTED
0201bcc0 <msdos_eval4make>:
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
201bcc0: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201bcc4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201bcc8: 92 10 20 00 clr %o1
const char **name
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201bccc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201bcd0: 94 10 20 00 clr %o2
201bcd4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201bcd8: 7f ff bd 66 call 200b270 <rtems_semaphore_obtain>
201bcdc: b8 10 00 18 mov %i0, %i4
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201bce0: 80 a2 20 00 cmp %o0, 0
201bce4: 12 80 00 9d bne 201bf58 <msdos_eval4make+0x298> <== NEVER TAKEN
201bce8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
201bcec: d0 06 40 00 ld [ %i1 ], %o0
201bcf0: 80 a2 20 00 cmp %o0, 0
201bcf4: 02 80 00 71 be 201beb8 <msdos_eval4make+0x1f8> <== NEVER TAKEN
201bcf8: 01 00 00 00 nop
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
201bcfc: 7f ff e1 2c call 20141ac <fat_file_reopen>
201bd00: 01 00 00 00 nop
if (rc != RC_OK)
201bd04: b0 92 20 00 orcc %o0, 0, %i0
201bd08: 12 80 00 1f bne 201bd84 <msdos_eval4make+0xc4> <== NEVER TAKEN
201bd0c: 01 00 00 00 nop
201bd10: b6 10 20 00 clr %i3 ! 0 <PROM_START>
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
201bd14: 21 00 80 c9 sethi %hi(0x2032400), %l0
if (rc != RC_OK)
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
201bd18: a2 07 00 1b add %i4, %i3, %l1
201bd1c: 40 00 19 d3 call 2022468 <strlen>
201bd20: 90 10 00 11 mov %l1, %o0
201bd24: 94 07 bf fc add %fp, -4, %o2
201bd28: 92 10 00 08 mov %o0, %o1
201bd2c: 96 07 bf f8 add %fp, -8, %o3
201bd30: 40 00 03 25 call 201c9c4 <msdos_get_token>
201bd34: 90 10 00 11 mov %l1, %o0
i += token_len;
201bd38: d4 07 bf f8 ld [ %fp + -8 ], %o2
if (rc != RC_OK)
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
201bd3c: a2 10 00 08 mov %o0, %l1
i += token_len;
fat_fd = pathloc->node_access;
201bd40: e4 06 40 00 ld [ %i1 ], %l2
switch (type)
201bd44: 80 a2 20 02 cmp %o0, 2
201bd48: 02 80 00 45 be 201be5c <msdos_eval4make+0x19c>
201bd4c: b6 06 c0 0a add %i3, %o2, %i3
201bd50: 80 a2 20 02 cmp %o0, 2
201bd54: 18 80 00 10 bgu 201bd94 <msdos_eval4make+0xd4>
201bd58: 80 a2 20 03 cmp %o0, 3
201bd5c: 80 a2 20 00 cmp %o0, 0
201bd60: 32 bf ff ef bne,a 201bd1c <msdos_eval4make+0x5c>
201bd64: a2 07 00 1b add %i4, %i3, %l1
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
201bd68: 40 00 12 f4 call 2020938 <__errno>
201bd6c: b0 10 3f ff mov -1, %i0
201bd70: 82 10 20 11 mov 0x11, %g1
201bd74: c2 22 00 00 st %g1, [ %o0 ]
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
201bd78: d0 06 60 10 ld [ %i1 + 0x10 ], %o0
201bd7c: 7f ff e2 22 call 2014604 <fat_file_close>
201bd80: 92 10 00 12 mov %l2, %o1
err:
rtems_semaphore_release(fs_info->vol_sema);
201bd84: 7f ff bd 85 call 200b398 <rtems_semaphore_release>
201bd88: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
201bd8c: 81 c7 e0 08 ret
201bd90: 81 e8 00 00 restore
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
201bd94: 02 80 00 09 be 201bdb8 <msdos_eval4make+0xf8> <== ALWAYS TAKEN
201bd98: 80 a2 20 04 cmp %o0, 4
201bd9c: 32 bf ff e0 bne,a 201bd1c <msdos_eval4make+0x5c> <== NOT EXECUTED
201bda0: a2 07 00 1b add %i4, %i3, %l1 <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
201bda4: 40 00 12 e5 call 2020938 <__errno> <== NOT EXECUTED
201bda8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bdac: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
rc = -1;
goto error;
201bdb0: 10 bf ff f2 b 201bd78 <msdos_eval4make+0xb8> <== NOT EXECUTED
201bdb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
201bdb8: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
201bdbc: 80 a0 60 01 cmp %g1, 1
201bdc0: 12 80 00 6c bne 201bf70 <msdos_eval4make+0x2b0>
201bdc4: d2 07 bf fc ld [ %fp + -4 ], %o1
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
201bdc8: 40 00 08 99 call 201e02c <msdos_find_name>
201bdcc: 90 10 00 19 mov %i1, %o0
if (rc)
201bdd0: 80 a2 20 00 cmp %o0, 0
201bdd4: 02 bf ff d2 be 201bd1c <msdos_eval4make+0x5c>
201bdd8: a2 07 00 1b add %i4, %i3, %l1
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
201bddc: 03 00 00 1f sethi %hi(0x7c00), %g1
201bde0: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
201bde4: 80 a2 00 01 cmp %o0, %g1
201bde8: 12 80 00 67 bne 201bf84 <msdos_eval4make+0x2c4> <== NEVER TAKEN
201bdec: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
}
}
*name = &path[i - token_len];
201bdf0: 82 26 c0 01 sub %i3, %g1, %g1
201bdf4: 82 07 00 01 add %i4, %g1, %g1
201bdf8: 10 80 00 07 b 201be14 <msdos_eval4make+0x154>
201bdfc: c2 26 80 00 st %g1, [ %i2 ]
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++)
{
if (!msdos_is_separator(path[i]))
201be00: 7f ff b0 e3 call 200818c <rtems_filesystem_is_separator>
201be04: b6 06 e0 01 inc %i3
201be08: 80 a2 20 00 cmp %o0, 0
201be0c: 02 80 00 5e be 201bf84 <msdos_eval4make+0x2c4>
201be10: 01 00 00 00 nop
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++)
201be14: d0 0f 00 1b ldub [ %i4 + %i3 ], %o0
201be18: 91 2a 20 18 sll %o0, 0x18, %o0
201be1c: 80 a2 20 00 cmp %o0, 0
201be20: 32 bf ff f8 bne,a 201be00 <msdos_eval4make+0x140>
201be24: 91 3a 20 18 sra %o0, 0x18, %o0
rc = -1;
goto error;
}
}
fat_fd = pathloc->node_access;
201be28: e4 06 40 00 ld [ %i1 ], %l2
if (fat_fd->fat_file_type != FAT_DIRECTORY)
201be2c: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
201be30: 80 a0 60 01 cmp %g1, 1
201be34: 12 80 00 4f bne 201bf70 <msdos_eval4make+0x2b0> <== NEVER TAKEN
201be38: 01 00 00 00 nop
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
201be3c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
201be40: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
201be44: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
201be48: c2 00 60 90 ld [ %g1 + 0x90 ], %g1
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
201be4c: 7f ff bd 53 call 200b398 <rtems_semaphore_release>
201be50: c2 26 60 08 st %g1, [ %i1 + 8 ]
return RC_OK;
201be54: 81 c7 e0 08 ret
201be58: 81 e8 00 00 restore
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
201be5c: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1
201be60: 80 a0 60 01 cmp %g1, 1
201be64: 12 80 00 43 bne 201bf70 <msdos_eval4make+0x2b0> <== NEVER TAKEN
201be68: 01 00 00 00 nop
201be6c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
}
/*
* Am I at the root of this mounted filesystem?
*/
if (rtems_filesystem_is_root_location(pathloc))
201be70: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
201be74: 80 a4 80 02 cmp %l2, %g2
201be78: 02 80 00 18 be 201bed8 <msdos_eval4make+0x218> <== ALWAYS TAKEN
201be7c: d2 07 bf fc ld [ %fp + -4 ], %o1
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
201be80: 40 00 08 6b call 201e02c <msdos_find_name> <== NOT EXECUTED
201be84: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
if (rc != RC_OK)
201be88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201be8c: 22 bf ff a4 be,a 201bd1c <msdos_eval4make+0x5c> <== NOT EXECUTED
201be90: a2 07 00 1b add %i4, %i3, %l1 <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
201be94: 03 00 00 1f sethi %hi(0x7c00), %g1 <== NOT EXECUTED
201be98: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
201be9c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
201bea0: 12 bf ff b6 bne 201bd78 <msdos_eval4make+0xb8> <== NOT EXECUTED
201bea4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
errno = ENOENT;
201bea8: 40 00 12 a4 call 2020938 <__errno> <== NOT EXECUTED
201beac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201beb0: 10 bf ff b2 b 201bd78 <msdos_eval4make+0xb8> <== NOT EXECUTED
201beb4: e2 22 00 00 st %l1, [ %o0 ] <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
201beb8: 40 00 12 a0 call 2020938 <__errno> <== NOT EXECUTED
201bebc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bec0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
201bec4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
201bec8: 7f ff bd 34 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201becc: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
201bed0: 81 c7 e0 08 ret <== NOT EXECUTED
201bed4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
201bed8: c4 04 23 f0 ld [ %l0 + 0x3f0 ], %g2
{
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
201bedc: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
201bee0: 80 a4 80 02 cmp %l2, %g2
201bee4: 02 bf ff 8e be 201bd1c <msdos_eval4make+0x5c> <== ALWAYS TAKEN
201bee8: a2 07 00 1b add %i4, %i3, %l1
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
201beec: d0 00 60 18 ld [ %g1 + 0x18 ], %o0 <== NOT EXECUTED
201bef0: c8 00 60 08 ld [ %g1 + 8 ], %g4 <== NOT EXECUTED
201bef4: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
201bef8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
201befc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
*pathloc = newloc;
201bf00: c8 26 40 00 st %g4, [ %i1 ] <== NOT EXECUTED
201bf04: c6 26 60 04 st %g3, [ %i1 + 4 ] <== NOT EXECUTED
201bf08: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED
201bf0c: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED
201bf10: d0 26 60 10 st %o0, [ %i1 + 0x10 ] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
201bf14: 7f ff e1 bc call 2014604 <fat_file_close> <== NOT EXECUTED
201bf18: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
if (rc != RC_OK)
201bf1c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201bf20: 12 bf ff 99 bne 201bd84 <msdos_eval4make+0xc4> <== NOT EXECUTED
201bf24: 01 00 00 00 nop <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
201bf28: 7f ff bd 1c call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201bf2c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(&path[i-token_len],
201bf30: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201bf34: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
201bf38: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
201bf3c: b6 26 c0 02 sub %i3, %g2, %i3 <== NOT EXECUTED
201bf40: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201bf44: 90 07 00 1b add %i4, %i3, %o0 <== NOT EXECUTED
201bf48: 9f c0 40 00 call %g1 <== NOT EXECUTED
201bf4c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201bf50: 81 c7 e0 08 ret <== NOT EXECUTED
201bf54: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201bf58: 40 00 12 78 call 2020938 <__errno> <== NOT EXECUTED
201bf5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bf60: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201bf64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201bf68: 81 c7 e0 08 ret <== NOT EXECUTED
201bf6c: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTDIR;
201bf70: 40 00 12 72 call 2020938 <__errno>
201bf74: b0 10 3f ff mov -1, %i0
201bf78: 82 10 20 14 mov 0x14, %g1
rc = -1;
goto error;
201bf7c: 10 bf ff 7f b 201bd78 <msdos_eval4make+0xb8>
201bf80: c2 22 00 00 st %g1, [ %o0 ]
*/
for( ; path[i] != '\0'; i++)
{
if (!msdos_is_separator(path[i]))
{
errno = ENOENT;
201bf84: 40 00 12 6d call 2020938 <__errno>
201bf88: b0 10 3f ff mov -1, %i0
201bf8c: 82 10 20 02 mov 2, %g1
rc = -1;
goto error;
201bf90: 10 bf ff 7a b 201bd78 <msdos_eval4make+0xb8>
201bf94: c2 22 00 00 st %g1, [ %o0 ]
0201ba2c <msdos_eval_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
201ba2c: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201ba30: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
int token_len = 0;
201ba34: c0 27 bf f8 clr [ %fp + -8 ]
rtems_filesystem_location_info_t *pathloc
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201ba38: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
int i = 0;
int token_len = 0;
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201ba3c: 92 10 20 00 clr %o1
201ba40: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201ba44: 94 10 20 00 clr %o2
201ba48: 7f ff be 0a call 200b270 <rtems_semaphore_obtain>
201ba4c: b8 10 00 18 mov %i0, %i4
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201ba50: 80 a2 20 00 cmp %o0, 0
201ba54: 12 80 00 8d bne 201bc88 <msdos_eval_path+0x25c> <== NEVER TAKEN
201ba58: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
201ba5c: d0 06 c0 00 ld [ %i3 ], %o0
201ba60: 80 a2 20 00 cmp %o0, 0
201ba64: 02 80 00 60 be 201bbe4 <msdos_eval_path+0x1b8> <== NEVER TAKEN
201ba68: 01 00 00 00 nop
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
201ba6c: 7f ff e1 d0 call 20141ac <fat_file_reopen>
201ba70: 01 00 00 00 nop
if (rc != RC_OK)
201ba74: b0 92 20 00 orcc %o0, 0, %i0
201ba78: 12 80 00 2d bne 201bb2c <msdos_eval_path+0x100> <== NEVER TAKEN
201ba7c: a0 10 20 00 clr %l0
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
201ba80: 23 00 80 c9 sethi %hi(0x2032400), %l1
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
201ba84: 90 07 00 10 add %i4, %l0, %o0
201ba88: 92 10 00 19 mov %i1, %o1
201ba8c: 94 07 bf fc add %fp, -4, %o2
201ba90: 40 00 03 cd call 201c9c4 <msdos_get_token>
201ba94: 96 07 bf f8 add %fp, -8, %o3
pathnamelen -= token_len;
201ba98: d4 07 bf f8 ld [ %fp + -8 ], %o2
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
201ba9c: a4 10 00 08 mov %o0, %l2
pathnamelen -= token_len;
i += token_len;
fat_fd = pathloc->node_access;
201baa0: e6 06 c0 00 ld [ %i3 ], %l3
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
pathnamelen -= token_len;
201baa4: b2 26 40 0a sub %i1, %o2, %i1
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
201baa8: 80 a2 20 03 cmp %o0, 3
201baac: 02 80 00 24 be 201bb3c <msdos_eval_path+0x110>
201bab0: a0 04 00 0a add %l0, %o2, %l0
201bab4: 80 a2 20 04 cmp %o0, 4
201bab8: 02 80 00 16 be 201bb10 <msdos_eval_path+0xe4> <== NEVER TAKEN
201babc: 80 a2 20 02 cmp %o0, 2
201bac0: 02 80 00 32 be 201bb88 <msdos_eval_path+0x15c>
201bac4: 82 1a 20 04 xor %o0, 4, %g1
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
rc = -1;
goto error;
201bac8: 80 a0 00 01 cmp %g0, %g1
201bacc: 82 40 20 00 addx %g0, 0, %g1
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
201bad0: 80 a2 20 00 cmp %o0, 0
201bad4: 02 80 00 04 be 201bae4 <msdos_eval_path+0xb8>
201bad8: 80 88 60 ff btst 0xff, %g1
201badc: 12 bf ff eb bne 201ba88 <msdos_eval_path+0x5c> <== ALWAYS TAKEN
201bae0: 90 07 00 10 add %i4, %l0, %o0
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
201bae4: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
201bae8: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
201baec: 80 a0 60 01 cmp %g1, 1
201baf0: 02 80 00 71 be 201bcb4 <msdos_eval_path+0x288>
201baf4: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2
loc->handlers = fs_info->directory_handlers;
else
loc->handlers = fs_info->file_handlers;
201baf8: c2 00 a0 94 ld [ %g2 + 0x94 ], %g1
201bafc: c2 26 e0 08 st %g1, [ %i3 + 8 ]
*/
fat_fd = pathloc->node_access;
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
201bb00: 7f ff be 26 call 200b398 <rtems_semaphore_release>
201bb04: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return RC_OK;
201bb08: 81 c7 e0 08 ret
201bb0c: 81 e8 00 00 restore
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
201bb10: 40 00 13 8a call 2020938 <__errno> <== NOT EXECUTED
201bb14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bb18: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
201bb1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
201bb20: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
201bb24: 7f ff e2 b8 call 2014604 <fat_file_close>
201bb28: 92 10 00 13 mov %l3, %o1
err:
rtems_semaphore_release(fs_info->vol_sema);
201bb2c: 7f ff be 1b call 200b398 <rtems_semaphore_release>
201bb30: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
201bb34: 81 c7 e0 08 ret
201bb38: 81 e8 00 00 restore
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
201bb3c: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
201bb40: 80 a0 60 01 cmp %g1, 1
201bb44: 12 80 00 57 bne 201bca0 <msdos_eval_path+0x274>
201bb48: d2 07 bf fc ld [ %fp + -4 ], %o1
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
201bb4c: 40 00 09 38 call 201e02c <msdos_find_name>
201bb50: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
201bb54: 80 a2 20 00 cmp %o0, 0
201bb58: 22 bf ff cc be,a 201ba88 <msdos_eval_path+0x5c>
201bb5c: 90 07 00 10 add %i4, %l0, %o0
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
201bb60: 03 00 00 1f sethi %hi(0x7c00), %g1
201bb64: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
201bb68: 80 a2 00 01 cmp %o0, %g1
201bb6c: 12 bf ff ed bne 201bb20 <msdos_eval_path+0xf4> <== NEVER TAKEN
201bb70: b0 10 00 08 mov %o0, %i0
{
errno = ENOENT;
201bb74: 40 00 13 71 call 2020938 <__errno>
201bb78: b0 10 3f ff mov -1, %i0
201bb7c: 82 10 20 02 mov 2, %g1
201bb80: 10 bf ff e8 b 201bb20 <msdos_eval_path+0xf4>
201bb84: c2 22 00 00 st %g1, [ %o0 ]
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
201bb88: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
201bb8c: 80 a0 60 01 cmp %g1, 1
201bb90: 12 80 00 44 bne 201bca0 <msdos_eval_path+0x274> <== NEVER TAKEN
201bb94: 01 00 00 00 nop
201bb98: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
}
/*
* Am I at the root of this mounted filesystem?
*/
if (rtems_filesystem_is_root_location(pathloc))
201bb9c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
201bba0: 80 a4 c0 02 cmp %l3, %g2
201bba4: 02 80 00 18 be 201bc04 <msdos_eval_path+0x1d8> <== NEVER TAKEN
201bba8: d2 07 bf fc ld [ %fp + -4 ], %o1
flags, pathloc);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
201bbac: 40 00 09 20 call 201e02c <msdos_find_name>
201bbb0: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
201bbb4: 80 a2 20 00 cmp %o0, 0
201bbb8: 22 bf ff b4 be,a 201ba88 <msdos_eval_path+0x5c> <== ALWAYS TAKEN
201bbbc: 90 07 00 10 add %i4, %l0, %o0
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
201bbc0: 03 00 00 1f sethi %hi(0x7c00), %g1 <== NOT EXECUTED
201bbc4: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
201bbc8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
201bbcc: 12 bf ff d5 bne 201bb20 <msdos_eval_path+0xf4> <== NOT EXECUTED
201bbd0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
errno = ENOENT;
201bbd4: 40 00 13 59 call 2020938 <__errno> <== NOT EXECUTED
201bbd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bbdc: 10 bf ff d1 b 201bb20 <msdos_eval_path+0xf4> <== NOT EXECUTED
201bbe0: e4 22 00 00 st %l2, [ %o0 ] <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
201bbe4: 40 00 13 55 call 2020938 <__errno> <== NOT EXECUTED
201bbe8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bbec: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
201bbf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
201bbf4: 7f ff bd e9 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201bbf8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
201bbfc: 81 c7 e0 08 ret <== NOT EXECUTED
201bc00: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
201bc04: c4 04 63 f0 ld [ %l1 + 0x3f0 ], %g2 <== NOT EXECUTED
{
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
201bc08: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
201bc0c: 80 a4 c0 02 cmp %l3, %g2 <== NOT EXECUTED
201bc10: 02 bf ff 9e be 201ba88 <msdos_eval_path+0x5c> <== NOT EXECUTED
201bc14: 90 07 00 10 add %i4, %l0, %o0 <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
201bc18: d0 00 60 18 ld [ %g1 + 0x18 ], %o0 <== NOT EXECUTED
201bc1c: c8 00 60 08 ld [ %g1 + 8 ], %g4 <== NOT EXECUTED
201bc20: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
201bc24: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
201bc28: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
*pathloc = newloc;
201bc2c: c8 26 c0 00 st %g4, [ %i3 ] <== NOT EXECUTED
201bc30: c6 26 e0 04 st %g3, [ %i3 + 4 ] <== NOT EXECUTED
201bc34: c4 26 e0 08 st %g2, [ %i3 + 8 ] <== NOT EXECUTED
201bc38: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED
201bc3c: d0 26 e0 10 st %o0, [ %i3 + 0x10 ] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
201bc40: 7f ff e2 71 call 2014604 <fat_file_close> <== NOT EXECUTED
201bc44: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
if (rc != RC_OK)
201bc48: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201bc4c: 12 bf ff b8 bne 201bb2c <msdos_eval_path+0x100> <== NOT EXECUTED
201bc50: 01 00 00 00 nop <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
201bc54: 7f ff bd d1 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201bc58: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
201bc5c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 <== NOT EXECUTED
201bc60: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
201bc64: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
201bc68: 90 24 00 09 sub %l0, %o1, %o0 <== NOT EXECUTED
201bc6c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201bc70: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED
201bc74: 90 07 00 08 add %i4, %o0, %o0 <== NOT EXECUTED
201bc78: 9f c0 40 00 call %g1 <== NOT EXECUTED
201bc7c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201bc80: 81 c7 e0 08 ret <== NOT EXECUTED
201bc84: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201bc88: 40 00 13 2c call 2020938 <__errno> <== NOT EXECUTED
201bc8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bc90: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201bc94: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201bc98: 81 c7 e0 08 ret <== NOT EXECUTED
201bc9c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTSUP;
201bca0: 40 00 13 26 call 2020938 <__errno>
201bca4: b0 10 3f ff mov -1, %i0
201bca8: 82 10 20 86 mov 0x86, %g1
rc = -1;
goto error;
201bcac: 10 bf ff 9d b 201bb20 <msdos_eval_path+0xf4>
201bcb0: c2 22 00 00 st %g1, [ %o0 ]
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
201bcb4: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1
201bcb8: 10 bf ff 92 b 201bb00 <msdos_eval_path+0xd4>
201bcbc: c2 26 e0 08 st %g1, [ %i3 + 8 ]
0201c5dc <msdos_file_chmod>:
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
201c5dc: 81 c3 e0 08 retl <== NOT EXECUTED
201c5e0: 90 10 20 00 clr %o0 <== NOT EXECUTED
0201c034 <msdos_file_close>:
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
201c034: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c038: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c03c: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
int
msdos_file_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c040: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c044: 92 10 20 00 clr %o1
201c048: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
201c04c: 94 10 20 00 clr %o2
201c050: 7f ff bc 88 call 200b270 <rtems_semaphore_obtain>
201c054: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c058: 80 a2 20 00 cmp %o0, 0
201c05c: 12 80 00 24 bne 201c0ec <msdos_file_close+0xb8> <== NEVER TAKEN
201c060: 01 00 00 00 nop
/*
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
201c064: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
201c068: 80 88 60 01 btst 1, %g1
201c06c: 32 80 00 15 bne,a 201c0c0 <msdos_file_close+0x8c> <== NEVER TAKEN
201c070: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
201c074: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
201c078: 40 00 02 eb call 201cc24 <msdos_set_first_cluster_num>
201c07c: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
201c080: b0 92 20 00 orcc %o0, 0, %i0
201c084: 12 80 00 16 bne 201c0dc <msdos_file_close+0xa8> <== NEVER TAKEN
201c088: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
201c08c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
201c090: 40 00 03 1d call 201cd04 <msdos_set_file_size>
201c094: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
201c098: b0 92 20 00 orcc %o0, 0, %i0
201c09c: 12 80 00 10 bne 201c0dc <msdos_file_close+0xa8> <== NEVER TAKEN
201c0a0: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
201c0a4: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
201c0a8: 40 00 02 9b call 201cb14 <msdos_set_dir_wrt_time_and_date>
201c0ac: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
201c0b0: b0 92 20 00 orcc %o0, 0, %i0
201c0b4: 12 80 00 0a bne 201c0dc <msdos_file_close+0xa8> <== NEVER TAKEN
201c0b8: 01 00 00 00 nop
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
201c0bc: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
201c0c0: 7f ff e1 51 call 2014604 <fat_file_close>
201c0c4: 92 10 00 1c mov %i4, %o1
201c0c8: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
201c0cc: 7f ff bc b3 call 200b398 <rtems_semaphore_release>
201c0d0: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
return rc;
}
201c0d4: 81 c7 e0 08 ret
201c0d8: 81 e8 00 00 restore
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201c0dc: 7f ff bc af call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c0e0: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
201c0e4: 81 c7 e0 08 ret <== NOT EXECUTED
201c0e8: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c0ec: 40 00 12 13 call 2020938 <__errno> <== NOT EXECUTED
201c0f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c0f4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c0f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c0fc: 81 c7 e0 08 ret <== NOT EXECUTED
201c100: 81 e8 00 00 restore <== NOT EXECUTED
0201c570 <msdos_file_datasync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
201c570: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c574: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c578: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c57c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c580: 92 10 20 00 clr %o1 <== NOT EXECUTED
201c584: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
201c588: 7f ff bb 3a call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
201c58c: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c590: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201c594: 12 80 00 0a bne 201c5bc <msdos_file_datasync+0x4c> <== NOT EXECUTED
201c598: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
201c59c: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
201c5a0: 7f ff e1 f5 call 2014d74 <fat_file_datasync> <== NOT EXECUTED
201c5a4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
201c5a8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
201c5ac: 7f ff bb 7b call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c5b0: b0 10 20 00 clr %i0 <== NOT EXECUTED
return RC_OK;
}
201c5b4: 81 c7 e0 08 ret <== NOT EXECUTED
201c5b8: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c5bc: 40 00 10 df call 2020938 <__errno> <== NOT EXECUTED
201c5c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c5c4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c5c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c5cc: 81 c7 e0 08 ret <== NOT EXECUTED
201c5d0: 81 e8 00 00 restore <== NOT EXECUTED
0201c3c4 <msdos_file_ftruncate>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
201c3c4: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c3c8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c3cc: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
if (length >= fat_fd->fat_file_size)
201c3d0: 84 10 20 00 clr %g2
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c3d4: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
201c3d8: ba 10 00 18 mov %i0, %i5
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
201c3dc: 80 a0 80 19 cmp %g2, %i1
201c3e0: 14 80 00 09 bg 201c404 <msdos_file_ftruncate+0x40> <== NEVER TAKEN
201c3e4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
201c3e8: 80 a0 80 19 cmp %g2, %i1
201c3ec: 02 80 00 04 be 201c3fc <msdos_file_ftruncate+0x38> <== ALWAYS TAKEN
201c3f0: 80 a0 40 1a cmp %g1, %i2
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
201c3f4: 81 c7 e0 08 ret
201c3f8: 91 e8 20 00 restore %g0, 0, %o0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
201c3fc: 08 bf ff fe bleu 201c3f4 <msdos_file_ftruncate+0x30>
201c400: 01 00 00 00 nop
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c404: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
201c408: 92 10 20 00 clr %o1
201c40c: 7f ff bb 99 call 200b270 <rtems_semaphore_obtain>
201c410: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c414: 80 a2 20 00 cmp %o0, 0
201c418: 12 80 00 16 bne 201c470 <msdos_file_ftruncate+0xac> <== NEVER TAKEN
201c41c: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
201c420: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
201c424: 7f ff e0 09 call 2014448 <fat_file_truncate>
201c428: 94 10 00 1a mov %i2, %o2
if (rc != RC_OK)
201c42c: b0 92 20 00 orcc %o0, 0, %i0
201c430: 12 80 00 0c bne 201c460 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
201c434: 80 a6 00 19 cmp %i0, %i1
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
201c438: 14 80 00 07 bg 201c454 <msdos_file_ftruncate+0x90> <== NEVER TAKEN
201c43c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
201c440: 80 a6 00 19 cmp %i0, %i1
201c444: 12 80 00 07 bne 201c460 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
201c448: 80 a0 40 1a cmp %g1, %i2
201c44c: 08 80 00 05 bleu 201c460 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
201c450: 01 00 00 00 nop
iop->size = fat_fd->fat_file_size = length;
201c454: f4 27 20 18 st %i2, [ %i4 + 0x18 ]
201c458: c0 27 60 08 clr [ %i5 + 8 ]
201c45c: f4 27 60 0c st %i2, [ %i5 + 0xc ]
rtems_semaphore_release(fs_info->vol_sema);
201c460: 7f ff bb ce call 200b398 <rtems_semaphore_release>
201c464: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
return RC_OK;
201c468: 81 c7 e0 08 ret
201c46c: 81 e8 00 00 restore
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c470: 40 00 11 32 call 2020938 <__errno> <== NOT EXECUTED
201c474: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c478: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c47c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c480: 81 c7 e0 08 ret <== NOT EXECUTED
201c484: 81 e8 00 00 restore <== NOT EXECUTED
0201c5d4 <msdos_file_ioctl>:
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
int rc = RC_OK;
return rc;
}
201c5d4: 81 c3 e0 08 retl <== NOT EXECUTED
201c5d8: 90 10 20 00 clr %o0 <== NOT EXECUTED
0201c250 <msdos_file_lseek>:
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
off_t
msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
201c250: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c254: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c258: fa 06 20 1c ld [ %i0 + 0x1c ], %i5
off_t
msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c25c: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
201c260: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c264: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
201c268: 92 10 20 00 clr %o1
201c26c: 7f ff bc 01 call 200b270 <rtems_semaphore_obtain>
201c270: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c274: 80 a2 20 00 cmp %o0, 0
201c278: 12 80 00 24 bne 201c308 <msdos_file_lseek+0xb8> <== NEVER TAKEN
201c27c: 92 10 00 1d mov %i5, %o1
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
201c280: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
201c284: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
201c288: 7f ff e1 61 call 201480c <fat_file_extend>
201c28c: 96 07 bf fc add %fp, -4, %o3
&real_size);
if (rc != RC_OK)
201c290: b6 92 20 00 orcc %o0, 0, %i3
201c294: 12 80 00 17 bne 201c2f0 <msdos_file_lseek+0xa0> <== NEVER TAKEN
201c298: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
201c29c: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
201c2a0: 80 a0 80 01 cmp %g2, %g1
201c2a4: 2a 80 00 0a bcs,a 201c2cc <msdos_file_lseek+0x7c> <== NEVER TAKEN
201c2a8: c2 26 20 14 st %g1, [ %i0 + 0x14 ] <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201c2ac: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
201c2b0: 82 10 00 02 mov %g2, %g1
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
201c2b4: c0 26 20 08 clr [ %i0 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
201c2b8: 7f ff bc 38 call 200b398 <rtems_semaphore_release>
201c2bc: c2 26 20 0c st %g1, [ %i0 + 0xc ]
return iop->offset;
201c2c0: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0
}
201c2c4: 81 c7 e0 08 ret
201c2c8: 81 e8 00 00 restore
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201c2cc: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
201c2d0: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
201c2d4: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
201c2d8: c2 26 20 0c st %g1, [ %i0 + 0xc ] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
201c2dc: 7f ff bc 2f call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c2e0: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED
return iop->offset;
201c2e4: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
}
201c2e8: 81 c7 e0 08 ret <== NOT EXECUTED
201c2ec: 81 e8 00 00 restore <== NOT EXECUTED
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
&real_size);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201c2f0: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
201c2f4: 7f ff bc 29 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c2f8: b2 10 00 1b mov %i3, %i1 <== NOT EXECUTED
return rc;
201c2fc: b1 3e e0 1f sra %i3, 0x1f, %i0 <== NOT EXECUTED
201c300: 81 c7 e0 08 ret <== NOT EXECUTED
201c304: 81 e8 00 00 restore <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c308: 40 00 11 8c call 2020938 <__errno> <== NOT EXECUTED
201c30c: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
201c310: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c314: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
201c318: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c31c: 81 c7 e0 08 ret <== NOT EXECUTED
201c320: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
0201bf98 <msdos_file_open>:
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
201bf98: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201bf9c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201bfa0: f6 06 20 1c ld [ %i0 + 0x1c ], %i3
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201bfa4: f8 00 60 34 ld [ %g1 + 0x34 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201bfa8: 92 10 20 00 clr %o1
201bfac: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
201bfb0: 94 10 20 00 clr %o2
201bfb4: 7f ff bc af call 200b270 <rtems_semaphore_obtain>
201bfb8: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201bfbc: 80 a2 20 00 cmp %o0, 0
201bfc0: 12 80 00 17 bne 201c01c <msdos_file_open+0x84> <== NEVER TAKEN
201bfc4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
201bfc8: 7f ff e0 79 call 20141ac <fat_file_reopen>
201bfcc: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
201bfd0: b0 92 20 00 orcc %o0, 0, %i0
201bfd4: 12 80 00 0e bne 201c00c <msdos_file_open+0x74> <== NEVER TAKEN
201bfd8: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
201bfdc: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201bfe0: 80 88 62 00 btst 0x200, %g1
201bfe4: 02 80 00 04 be 201bff4 <msdos_file_open+0x5c>
201bfe8: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
iop->offset = fat_fd->fat_file_size;
201bfec: c0 27 60 10 clr [ %i5 + 0x10 ]
201bff0: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201bff4: d0 07 20 98 ld [ %i4 + 0x98 ], %o0
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
201bff8: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
201bffc: 7f ff bc e7 call 200b398 <rtems_semaphore_release>
201c000: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return RC_OK;
}
201c004: 81 c7 e0 08 ret
201c008: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201c00c: 7f ff bc e3 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c010: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
201c014: 81 c7 e0 08 ret <== NOT EXECUTED
201c018: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c01c: 40 00 12 47 call 2020938 <__errno> <== NOT EXECUTED
201c020: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c024: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c028: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c02c: 81 c7 e0 08 ret <== NOT EXECUTED
201c030: 81 e8 00 00 restore <== NOT EXECUTED
0201c104 <msdos_file_read>:
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
201c104: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c108: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c10c: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c110: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c114: 92 10 20 00 clr %o1
201c118: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201c11c: 7f ff bc 55 call 200b270 <rtems_semaphore_obtain>
201c120: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c124: 80 a2 20 00 cmp %o0, 0
201c128: 12 80 00 0c bne 201c158 <msdos_file_read+0x54> <== NEVER TAKEN
201c12c: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
201c130: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
201c134: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
201c138: 96 10 00 1a mov %i2, %o3
201c13c: 7f ff e0 22 call 20141c4 <fat_file_read>
201c140: 98 10 00 19 mov %i1, %o4
201c144: b0 10 00 08 mov %o0, %i0
buffer);
rtems_semaphore_release(fs_info->vol_sema);
201c148: 7f ff bc 94 call 200b398 <rtems_semaphore_release>
201c14c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return ret;
}
201c150: 81 c7 e0 08 ret
201c154: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c158: 40 00 11 f8 call 2020938 <__errno> <== NOT EXECUTED
201c15c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c160: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c164: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c168: 81 c7 e0 08 ret <== NOT EXECUTED
201c16c: 81 e8 00 00 restore <== NOT EXECUTED
0201c5e4 <msdos_file_rmnod>:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
201c5e4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201c5e8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
201c5ec: f8 06 40 00 ld [ %i1 ], %i4 <== NOT EXECUTED
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201c5f0: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c5f4: 92 10 20 00 clr %o1 <== NOT EXECUTED
201c5f8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
201c5fc: 7f ff bb 1d call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
201c600: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c604: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201c608: 12 80 00 13 bne 201c654 <msdos_file_rmnod+0x70> <== NOT EXECUTED
201c60c: 92 07 20 20 add %i4, 0x20, %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
201c610: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
201c614: 40 00 01 e6 call 201cdac <msdos_set_first_char4file_name> <== NOT EXECUTED
201c618: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
201c61c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201c620: 12 80 00 09 bne 201c644 <msdos_file_rmnod+0x60> <== NOT EXECUTED
201c624: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
201c628: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
201c62c: 7f ff e1 a7 call 2014cc8 <fat_file_mark_removed> <== NOT EXECUTED
201c630: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
201c634: 7f ff bb 59 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c638: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return RC_OK;
}
201c63c: 81 c7 e0 08 ret <== NOT EXECUTED
201c640: 81 e8 00 00 restore <== NOT EXECUTED
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201c644: 7f ff bb 55 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c648: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
201c64c: 81 c7 e0 08 ret <== NOT EXECUTED
201c650: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c654: 40 00 10 b9 call 2020938 <__errno> <== NOT EXECUTED
201c658: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c65c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c664: 81 c7 e0 08 ret <== NOT EXECUTED
201c668: 81 e8 00 00 restore <== NOT EXECUTED
0201c324 <msdos_file_stat>:
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
201c324: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
201c328: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
201c32c: f8 06 00 00 ld [ %i0 ], %i4
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
201c330: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c334: 92 10 20 00 clr %o1
201c338: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201c33c: 7f ff bb cd call 200b270 <rtems_semaphore_obtain>
201c340: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c344: 80 a2 20 00 cmp %o0, 0
201c348: 12 80 00 19 bne 201c3ac <msdos_file_stat+0x88> <== NEVER TAKEN
201c34c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
201c350: c4 1f 60 58 ldd [ %i5 + 0x58 ], %g2
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
201c354: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
201c358: f0 17 40 00 lduh [ %i5 ], %i0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
201c35c: de 07 20 0c ld [ %i4 + 0xc ], %o7
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
201c360: c8 07 20 40 ld [ %i4 + 0x40 ], %g4
rtems_semaphore_release(fs_info->vol_sema);
201c364: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
201c368: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
201c36c: 05 00 00 20 sethi %hi(0x8000), %g2
201c370: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 81ff <PROM_START+0x81ff>
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
201c374: bb 30 60 09 srl %g1, 9, %i5
buf->st_blksize = fs_info->fat.vol.bps;
201c378: f0 26 60 40 st %i0, [ %i1 + 0x40 ]
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
201c37c: de 26 60 08 st %o7, [ %i1 + 8 ]
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
201c380: c0 26 60 18 clr [ %i1 + 0x18 ]
201c384: c0 26 60 1c clr [ %i1 + 0x1c ]
buf->st_size = fat_fd->fat_file_size;
201c388: c0 26 60 20 clr [ %i1 + 0x20 ]
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
201c38c: c4 26 60 0c st %g2, [ %i1 + 0xc ]
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
201c390: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
201c394: fa 26 60 44 st %i5, [ %i1 + 0x44 ]
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
201c398: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
rtems_semaphore_release(fs_info->vol_sema);
201c39c: 7f ff bb ff call 200b398 <rtems_semaphore_release>
201c3a0: b0 10 20 00 clr %i0
return RC_OK;
}
201c3a4: 81 c7 e0 08 ret
201c3a8: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c3ac: 40 00 11 63 call 2020938 <__errno> <== NOT EXECUTED
201c3b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c3b4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c3b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c3bc: 81 c7 e0 08 ret <== NOT EXECUTED
201c3c0: 81 e8 00 00 restore <== NOT EXECUTED
0201c488 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
201c488: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c48c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
int
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c490: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c494: f6 00 60 34 ld [ %g1 + 0x34 ], %i3 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c498: 92 10 20 00 clr %o1 <== NOT EXECUTED
201c49c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201c4a0: 94 10 20 00 clr %o2 <== NOT EXECUTED
201c4a4: 7f ff bb 73 call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
201c4a8: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c4ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201c4b0: 12 80 00 2a bne 201c558 <msdos_file_sync+0xd0> <== NOT EXECUTED
201c4b4: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
201c4b8: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
201c4bc: 7f ff e2 2e call 2014d74 <fat_file_datasync> <== NOT EXECUTED
201c4c0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
201c4c4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201c4c8: 12 80 00 20 bne 201c548 <msdos_file_sync+0xc0> <== NOT EXECUTED
201c4cc: 01 00 00 00 nop <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
201c4d0: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1 <== NOT EXECUTED
201c4d4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
201c4d8: 12 80 00 14 bne 201c528 <msdos_file_sync+0xa0> <== NOT EXECUTED
201c4dc: 01 00 00 00 nop <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
201c4e0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
201c4e4: 40 00 01 d0 call 201cc24 <msdos_set_first_cluster_num> <== NOT EXECUTED
201c4e8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
201c4ec: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
201c4f0: 32 80 00 12 bne,a 201c538 <msdos_file_sync+0xb0> <== NOT EXECUTED
201c4f4: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
201c4f8: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
201c4fc: 40 00 02 02 call 201cd04 <msdos_set_file_size> <== NOT EXECUTED
201c500: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
201c504: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
201c508: 32 80 00 0c bne,a 201c538 <msdos_file_sync+0xb0> <== NOT EXECUTED
201c50c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
201c510: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
201c514: 40 00 01 80 call 201cb14 <msdos_set_dir_wrt_time_and_date><== NOT EXECUTED
201c518: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
201c51c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
201c520: 32 80 00 06 bne,a 201c538 <msdos_file_sync+0xb0> <== NOT EXECUTED
201c524: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rtems_semaphore_release(fs_info->vol_sema);
201c528: 7f ff bb 9c call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c52c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
return RC_OK;
}
201c530: 81 c7 e0 08 ret <== NOT EXECUTED
201c534: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201c538: 7f ff bb 98 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c53c: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
201c540: 81 c7 e0 08 ret <== NOT EXECUTED
201c544: 81 e8 00 00 restore <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
201c548: 7f ff bb 94 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c54c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
201c550: 81 c7 e0 08 ret <== NOT EXECUTED
201c554: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c558: 40 00 10 f8 call 2020938 <__errno> <== NOT EXECUTED
201c55c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c560: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c564: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c568: 81 c7 e0 08 ret <== NOT EXECUTED
201c56c: 81 e8 00 00 restore <== NOT EXECUTED
0201c170 <msdos_file_write>:
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
201c170: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c174: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
201c178: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
201c17c: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c180: 92 10 20 00 clr %o1
201c184: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
201c188: 94 10 20 00 clr %o2
201c18c: 7f ff bc 39 call 200b270 <rtems_semaphore_obtain>
201c190: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c194: 80 a2 20 00 cmp %o0, 0
201c198: 12 80 00 23 bne 201c224 <msdos_file_write+0xb4> <== NEVER TAKEN
201c19c: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
201c1a0: d0 06 20 2c ld [ %i0 + 0x2c ], %o0
201c1a4: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
201c1a8: 96 10 00 1a mov %i2, %o3
201c1ac: 7f ff e2 11 call 20149f0 <fat_file_write>
201c1b0: 98 10 00 19 mov %i1, %o4
buffer);
if (ret < 0)
201c1b4: b0 92 20 00 orcc %o0, 0, %i0
201c1b8: 06 80 00 21 bl 201c23c <msdos_file_write+0xcc> <== NEVER TAKEN
201c1bc: 85 3e 20 1f sra %i0, 0x1f, %g2
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
201c1c0: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201c1c4: 86 83 40 18 addcc %o5, %i0, %g3
201c1c8: 84 43 00 02 addx %o4, %g2, %g2
201c1cc: 80 a0 a0 00 cmp %g2, 0
201c1d0: 04 80 00 0a ble 201c1f8 <msdos_file_write+0x88> <== ALWAYS TAKEN
201c1d4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
fat_fd->fat_file_size = iop->offset + ret;
201c1d8: 82 06 00 0d add %i0, %o5, %g1 <== NOT EXECUTED
201c1dc: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201c1e0: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
201c1e4: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
201c1e8: 7f ff bc 6c call 200b398 <rtems_semaphore_release>
201c1ec: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return ret;
}
201c1f0: 81 c7 e0 08 ret
201c1f4: 81 e8 00 00 restore
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
201c1f8: 32 bf ff fb bne,a 201c1e4 <msdos_file_write+0x74> <== NEVER TAKEN
201c1fc: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201c200: 80 a0 c0 01 cmp %g3, %g1
201c204: 38 bf ff f6 bgu,a 201c1dc <msdos_file_write+0x6c>
201c208: 82 06 00 0d add %i0, %o5, %g1
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
201c20c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
201c210: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
201c214: 7f ff bc 61 call 200b398 <rtems_semaphore_release>
201c218: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return ret;
}
201c21c: 81 c7 e0 08 ret
201c220: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c224: 40 00 11 c5 call 2020938 <__errno> <== NOT EXECUTED
201c228: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c22c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c230: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c234: 81 c7 e0 08 ret <== NOT EXECUTED
201c238: 81 e8 00 00 restore <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
201c23c: d0 06 e0 98 ld [ %i3 + 0x98 ], %o0 <== NOT EXECUTED
201c240: 7f ff bc 56 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201c244: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
201c248: 81 c7 e0 08 ret <== NOT EXECUTED
201c24c: 81 e8 00 00 restore <== NOT EXECUTED
0201fd18 <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
201fd18: 82 10 20 00 clr %g1
dn[i] = ' ';
201fd1c: 84 10 20 20 mov 0x20, %g2
201fd20: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
201fd24: 82 00 60 01 inc %g1
201fd28: 80 a0 60 0b cmp %g1, 0xb
201fd2c: 32 bf ff fe bne,a 201fd24 <msdos_filename_unix2dos+0xc>
201fd30: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
201fd34: c2 4a 00 00 ldsb [ %o0 ], %g1
201fd38: 82 18 60 2e xor %g1, 0x2e, %g1
201fd3c: 80 a0 00 01 cmp %g0, %g1
201fd40: 82 60 3f ff subx %g0, -1, %g1
201fd44: 80 a2 60 01 cmp %o1, 1
201fd48: 02 80 00 6d be 201fefc <msdos_filename_unix2dos+0x1e4> <== NEVER TAKEN
201fd4c: c4 0a 00 00 ldub [ %o0 ], %g2
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
201fd50: 80 a0 60 00 cmp %g1, 0
201fd54: 12 80 00 72 bne 201ff1c <msdos_filename_unix2dos+0x204> <== NEVER TAKEN
201fd58: 80 a2 60 02 cmp %o1, 2
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
201fd5c: 80 a2 60 00 cmp %o1, 0
201fd60: 02 80 00 5c be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
201fd64: 80 a0 60 00 cmp %g1, 0
201fd68: 32 80 00 61 bne,a 201feec <msdos_filename_unix2dos+0x1d4><== NEVER TAKEN
201fd6c: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
201fd70: 84 88 a0 ff andcc %g2, 0xff, %g2
201fd74: 02 80 00 25 be 201fe08 <msdos_filename_unix2dos+0xf0> <== NEVER TAKEN
201fd78: 80 a0 a0 2e cmp %g2, 0x2e
201fd7c: 22 80 00 24 be,a 201fe0c <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
201fd80: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
if (msdos_map[c] == 0)
201fd84: 07 00 80 c5 sethi %hi(0x2031400), %g3
201fd88: 86 10 e2 f8 or %g3, 0x2f8, %g3 ! 20316f8 <msdos_map>
201fd8c: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
201fd90: 80 88 a0 ff btst 0xff, %g2
201fd94: 12 80 00 15 bne 201fde8 <msdos_filename_unix2dos+0xd0> <== ALWAYS TAKEN
201fd98: 82 10 20 00 clr %g1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
201fd9c: 10 80 00 1c b 201fe0c <msdos_filename_unix2dos+0xf4> <== NOT EXECUTED
201fda0: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
201fda4: 80 a0 60 07 cmp %g1, 7
201fda8: 04 80 00 03 ble 201fdb4 <msdos_filename_unix2dos+0x9c>
201fdac: 84 10 20 01 mov 1, %g2
201fdb0: 84 10 20 00 clr %g2
201fdb4: 80 88 a0 ff btst 0xff, %g2
201fdb8: 02 80 00 12 be 201fe00 <msdos_filename_unix2dos+0xe8>
201fdbc: 80 a2 60 00 cmp %o1, 0
201fdc0: c4 0a 00 00 ldub [ %o0 ], %g2
201fdc4: 80 a0 a0 00 cmp %g2, 0
201fdc8: 02 80 00 10 be 201fe08 <msdos_filename_unix2dos+0xf0> <== NEVER TAKEN
201fdcc: 80 a0 a0 2e cmp %g2, 0x2e
201fdd0: 22 80 00 0f be,a 201fe0c <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
201fdd4: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
if (msdos_map[c] == 0)
201fdd8: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
201fddc: 80 88 a0 ff btst 0xff, %g2
201fde0: 22 80 00 0b be,a 201fe0c <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
201fde4: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
201fde8: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
un++;
201fdec: 90 02 20 01 inc %o0
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
201fdf0: 92 82 7f ff addcc %o1, -1, %o1
201fdf4: 12 bf ff ec bne 201fda4 <msdos_filename_unix2dos+0x8c>
201fdf8: 82 00 60 01 inc %g1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
201fdfc: 80 a2 60 00 cmp %o1, 0
201fe00: 02 80 00 34 be 201fed0 <msdos_filename_unix2dos+0x1b8>
201fe04: 01 00 00 00 nop
201fe08: c2 0a 00 00 ldub [ %o0 ], %g1
201fe0c: 80 a0 60 00 cmp %g1, 0
201fe10: 02 80 00 30 be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
201fe14: 80 a0 60 2e cmp %g1, 0x2e
un++;
201fe18: 90 02 20 01 inc %o0
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
201fe1c: 02 80 00 0c be 201fe4c <msdos_filename_unix2dos+0x134> <== NEVER TAKEN
201fe20: 92 02 7f ff add %o1, -1, %o1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
201fe24: 80 a2 60 00 cmp %o1, 0
201fe28: 02 80 00 2a be 201fed0 <msdos_filename_unix2dos+0x1b8>
201fe2c: 01 00 00 00 nop
201fe30: c2 0a 00 00 ldub [ %o0 ], %g1
201fe34: 80 a0 60 00 cmp %g1, 0
201fe38: 02 80 00 26 be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
201fe3c: 92 02 7f ff add %o1, -1, %o1
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
201fe40: 80 a0 60 2e cmp %g1, 0x2e
201fe44: 12 bf ff f8 bne 201fe24 <msdos_filename_unix2dos+0x10c> <== ALWAYS TAKEN
201fe48: 90 02 20 01 inc %o0
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
201fe4c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201fe50: 02 80 00 20 be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201fe54: 01 00 00 00 nop <== NOT EXECUTED
201fe58: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
201fe5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201fe60: 02 80 00 1c be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201fe64: 07 00 80 c5 sethi %hi(0x2031400), %g3 <== NOT EXECUTED
if (msdos_map[c] == 0)
201fe68: 86 10 e2 f8 or %g3, 0x2f8, %g3 ! 20316f8 <msdos_map> <== NOT EXECUTED
201fe6c: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 <== NOT EXECUTED
201fe70: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201fe74: 12 80 00 13 bne 201fec0 <msdos_filename_unix2dos+0x1a8> <== NOT EXECUTED
201fe78: 82 10 20 08 mov 8, %g1 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201fe7c: 81 c3 e0 08 retl <== NOT EXECUTED
201fe80: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
201fe84: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED
201fe88: 04 80 00 03 ble 201fe94 <msdos_filename_unix2dos+0x17c> <== NOT EXECUTED
201fe8c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201fe90: 84 10 20 00 clr %g2 <== NOT EXECUTED
201fe94: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201fe98: 02 80 00 0e be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201fe9c: 01 00 00 00 nop <== NOT EXECUTED
201fea0: c4 0a 20 01 ldub [ %o0 + 1 ], %g2 <== NOT EXECUTED
201fea4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201fea8: 02 80 00 0a be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201feac: 90 02 20 01 inc %o0 <== NOT EXECUTED
if (msdos_map[c] == 0)
201feb0: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
201feb4: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201feb8: 02 80 00 06 be 201fed0 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201febc: 01 00 00 00 nop <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
201fec0: c4 2a 80 01 stb %g2, [ %o2 + %g1 ] <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
201fec4: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
201fec8: 12 bf ff ef bne 201fe84 <msdos_filename_unix2dos+0x16c> <== NOT EXECUTED
201fecc: 82 00 60 01 inc %g1 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201fed0: 81 c3 e0 08 retl
201fed4: 90 10 20 00 clr %o0
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
201fed8: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED
201fedc: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED
201fee0: 12 bf ff a4 bne 201fd70 <msdos_filename_unix2dos+0x58> <== NOT EXECUTED
201fee4: c4 0a 00 00 ldub [ %o0 ], %g2 <== NOT EXECUTED
201fee8: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
201feec: 12 bf ff fb bne 201fed8 <msdos_filename_unix2dos+0x1c0> <== NOT EXECUTED
201fef0: 90 02 20 01 inc %o0 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201fef4: 81 c3 e0 08 retl <== NOT EXECUTED
201fef8: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
201fefc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ff00: 02 bf ff 95 be 201fd54 <msdos_filename_unix2dos+0x3c> <== NOT EXECUTED
201ff04: 01 00 00 00 nop <== NOT EXECUTED
dn[0] = '.';
201ff08: 82 10 20 2e mov 0x2e, %g1 ! 2e <PROM_START+0x2e> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201ff0c: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
201ff10: c2 2a 80 00 stb %g1, [ %o2 ] <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
201ff14: 81 c3 e0 08 retl <== NOT EXECUTED
201ff18: 01 00 00 00 nop <== NOT EXECUTED
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
201ff1c: 12 bf ff 91 bne 201fd60 <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
201ff20: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201ff24: c6 4a 20 01 ldsb [ %o0 + 1 ], %g3 <== NOT EXECUTED
201ff28: 80 a0 e0 2e cmp %g3, 0x2e <== NOT EXECUTED
201ff2c: 12 bf ff 8d bne 201fd60 <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
201ff30: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
dn[0] = '.';
201ff34: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED
201ff38: c2 2a 80 00 stb %g1, [ %o2 ] <== NOT EXECUTED
dn[1] = '.';
return 0;
201ff3c: 10 bf ff e5 b 201fed0 <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
201ff40: c2 2a a0 01 stb %g1, [ %o2 + 1 ] <== NOT EXECUTED
0201e02c <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
201e02c: 9d e3 bf 58 save %sp, -168, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
201e030: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
201e034: c2 0e 40 00 ldub [ %i1 ], %g1
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
201e038: f6 00 a0 34 ld [ %g2 + 0x34 ], %i3
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
201e03c: 83 28 60 18 sll %g1, 0x18, %g1
201e040: 85 38 60 18 sra %g1, 0x18, %g2
201e044: 84 18 a0 2e xor %g2, 0x2e, %g2
201e048: 80 a0 00 02 cmp %g0, %g2
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201e04c: 05 08 08 08 sethi %hi(0x20202000), %g2
201e050: 84 10 a0 20 or %g2, 0x20, %g2 ! 20202020 <RAM_END+0x1de02020>
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201e054: b8 07 bf c8 add %fp, -56, %i4
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201e058: 86 10 00 02 mov %g2, %g3
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201e05c: c0 27 20 08 clr [ %i4 + 8 ]
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201e060: c4 3f bf c8 std %g2, [ %fp + -56 ]
201e064: 05 00 00 08 sethi %hi(0x2000), %g2
201e068: 84 10 a0 20 or %g2, 0x20, %g2 ! 2020 <PROM_START+0x2020>
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201e06c: c0 27 20 0c clr [ %i4 + 0xc ]
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201e070: c4 37 20 08 sth %g2, [ %i4 + 8 ]
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
201e074: c0 27 bf fc clr [ %fp + -4 ]
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201e078: 84 10 20 20 mov 0x20, %g2
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201e07c: c0 27 20 10 clr [ %i4 + 0x10 ]
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201e080: c4 2f 20 0a stb %g2, [ %i4 + 0xa ]
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201e084: c0 27 20 14 clr [ %i4 + 0x14 ]
201e088: c0 27 20 18 clr [ %i4 + 0x18 ]
201e08c: c0 27 20 1c clr [ %i4 + 0x1c ]
201e090: 84 60 3f ff subx %g0, -1, %g2
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
201e094: 80 a6 a0 01 cmp %i2, 1
201e098: 02 80 00 42 be 201e1a0 <msdos_find_name+0x174> <== NEVER TAKEN
201e09c: ba 10 00 18 mov %i0, %i5
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
201e0a0: 80 a0 a0 00 cmp %g2, 0
201e0a4: 12 80 00 54 bne 201e1f4 <msdos_find_name+0x1c8>
201e0a8: 80 a6 a0 02 cmp %i2, 2
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
201e0ac: 80 a6 a0 00 cmp %i2, 0
201e0b0: 04 80 00 60 ble 201e230 <msdos_find_name+0x204> <== NEVER TAKEN
201e0b4: 83 38 60 18 sra %g1, 0x18, %g1
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201e0b8: 80 a0 60 20 cmp %g1, 0x20
201e0bc: 12 80 00 59 bne 201e220 <msdos_find_name+0x1f4> <== ALWAYS TAKEN
201e0c0: 80 a0 60 2e cmp %g1, 0x2e
201e0c4: 10 80 00 05 b 201e0d8 <msdos_find_name+0xac> <== NOT EXECUTED
201e0c8: 82 10 20 00 clr %g1 <== NOT EXECUTED
201e0cc: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
201e0d0: 12 80 00 3a bne 201e1b8 <msdos_find_name+0x18c> <== NOT EXECUTED
201e0d4: 80 a0 a0 20 cmp %g2, 0x20 <== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
201e0d8: 82 00 60 01 inc %g1 <== NOT EXECUTED
201e0dc: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
201e0e0: 32 bf ff fb bne,a 201e0cc <msdos_find_name+0xa0> <== NOT EXECUTED
201e0e4: c4 4e 40 01 ldsb [ %i1 + %g1 ], %g2 <== NOT EXECUTED
if (i == lfn_len)
{
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: INVALID[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
201e0e8: 98 10 20 00 clr %o4 <== NOT EXECUTED
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
201e0ec: f8 23 a0 5c st %i4, [ %sp + 0x5c ]
201e0f0: 90 10 00 1d mov %i5, %o0
201e0f4: 92 10 20 00 clr %o1
201e0f8: 94 10 00 19 mov %i1, %o2
201e0fc: 96 10 00 1a mov %i2, %o3
201e100: 7f ff ff 86 call 201df18 <msdos_get_name_node>
201e104: 9a 07 bf ec add %fp, -20, %o5
&dir_pos, node_entry);
if (rc != RC_OK)
201e108: b0 92 20 00 orcc %o0, 0, %i0
201e10c: 12 80 00 90 bne 201e34c <msdos_find_name+0x320>
201e110: 01 00 00 00 nop
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
201e114: c2 0f 20 0b ldub [ %i4 + 0xb ], %g1
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
201e118: 31 00 00 1f sethi %hi(0x7c00), %i0
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
201e11c: 80 88 60 08 btst 8, %g1
201e120: 12 80 00 1e bne 201e198 <msdos_find_name+0x16c> <== NEVER TAKEN
201e124: b0 16 21 01 or %i0, 0x101, %i0
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
201e128: 82 08 60 3f and %g1, 0x3f, %g1
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
201e12c: 80 a0 60 0f cmp %g1, 0xf
201e130: 02 80 00 1a be 201e198 <msdos_find_name+0x16c> <== NEVER TAKEN
201e134: 92 07 bf ec add %fp, -20, %o1
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
201e138: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
201e13c: 7f ff d7 70 call 2013efc <fat_file_open>
201e140: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
201e144: b0 92 20 00 orcc %o0, 0, %i0
201e148: 12 80 00 14 bne 201e198 <msdos_find_name+0x16c> <== NEVER TAKEN
201e14c: f4 07 bf fc ld [ %fp + -4 ], %i2
return rc;
fat_fd->dir_pos = dir_pos;
201e150: c2 07 bf ec ld [ %fp + -20 ], %g1
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
201e154: f2 06 a0 08 ld [ %i2 + 8 ], %i1
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
201e158: c2 26 a0 20 st %g1, [ %i2 + 0x20 ]
201e15c: c2 07 bf f0 ld [ %fp + -16 ], %g1
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
201e160: 80 a6 60 01 cmp %i1, 1
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
201e164: c2 26 a0 24 st %g1, [ %i2 + 0x24 ]
201e168: c2 07 bf f4 ld [ %fp + -12 ], %g1
201e16c: c2 26 a0 28 st %g1, [ %i2 + 0x28 ]
201e170: c2 07 bf f8 ld [ %fp + -8 ], %g1
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
201e174: 02 80 00 34 be 201e244 <msdos_find_name+0x218>
201e178: c2 26 a0 2c st %g1, [ %i2 + 0x2c ]
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
201e17c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
201e180: 7f ff d9 21 call 2014604 <fat_file_close>
201e184: d2 07 40 00 ld [ %i5 ], %o1
if (rc != RC_OK)
201e188: b0 92 20 00 orcc %o0, 0, %i0
201e18c: 12 80 00 6d bne 201e340 <msdos_find_name+0x314> <== NEVER TAKEN
201e190: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
201e194: c2 27 40 00 st %g1, [ %i5 ]
return rc;
}
201e198: 81 c7 e0 08 ret
201e19c: 81 e8 00 00 restore
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
201e1a0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201e1a4: 02 bf ff c0 be 201e0a4 <msdos_find_name+0x78> <== NOT EXECUTED
201e1a8: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
{
sfn[0] = '.';
201e1ac: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED
201e1b0: 10 bf ff cf b 201e0ec <msdos_find_name+0xc0> <== NOT EXECUTED
201e1b4: c2 2f bf c8 stb %g1, [ %fp + -56 ] <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201e1b8: 02 bf ff c9 be 201e0dc <msdos_find_name+0xb0> <== NOT EXECUTED
201e1bc: 82 00 60 01 inc %g1 <== NOT EXECUTED
/*
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
201e1c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
201e1c4: 7f ff f9 57 call 201c720 <msdos_name_type>
201e1c8: 92 10 00 1a mov %i2, %o1
if (type == MSDOS_NAME_INVALID)
201e1cc: 98 92 20 00 orcc %o0, 0, %o4
201e1d0: 22 bf ff c8 be,a 201e0f0 <msdos_find_name+0xc4> <== NEVER TAKEN
201e1d4: f8 23 a0 5c st %i4, [ %sp + 0x5c ] <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
201e1d8: d8 27 bf c4 st %o4, [ %fp + -60 ]
201e1dc: 90 10 00 19 mov %i1, %o0
201e1e0: 92 10 00 1a mov %i2, %o1
201e1e4: 40 00 06 cd call 201fd18 <msdos_filename_unix2dos>
201e1e8: 94 10 00 1c mov %i4, %o2
201e1ec: 10 bf ff c0 b 201e0ec <msdos_find_name+0xc0>
201e1f0: d8 07 bf c4 ld [ %fp + -60 ], %o4
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
201e1f4: 12 bf ff af bne 201e0b0 <msdos_find_name+0x84> <== NEVER TAKEN
201e1f8: 80 a6 a0 00 cmp %i2, 0
201e1fc: c4 4e 60 01 ldsb [ %i1 + 1 ], %g2
201e200: 80 a0 a0 2e cmp %g2, 0x2e
201e204: 12 bf ff ab bne 201e0b0 <msdos_find_name+0x84> <== NEVER TAKEN
201e208: 80 a6 a0 00 cmp %i2, 0
{
sfn[0] = sfn[1] = '.';
201e20c: 82 10 20 2e mov 0x2e, %g1
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
201e210: 98 10 20 01 mov 1, %o4
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
{
sfn[0] = sfn[1] = '.';
201e214: c2 2f bf c9 stb %g1, [ %fp + -55 ]
201e218: 10 bf ff b5 b 201e0ec <msdos_find_name+0xc0>
201e21c: c2 2f bf c8 stb %g1, [ %fp + -56 ]
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201e220: 02 bf ff ae be 201e0d8 <msdos_find_name+0xac> <== NEVER TAKEN
201e224: 82 10 20 00 clr %g1
/*
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
201e228: 10 bf ff e7 b 201e1c4 <msdos_find_name+0x198>
201e22c: 90 10 00 19 mov %i1, %o0
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
201e230: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201e234: 12 bf ff e3 bne 201e1c0 <msdos_find_name+0x194> <== NOT EXECUTED
201e238: 98 10 20 00 clr %o4 <== NOT EXECUTED
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
201e23c: 10 bf ff ad b 201e0f0 <msdos_find_name+0xc4> <== NOT EXECUTED
201e240: f8 23 a0 5c st %i4, [ %sp + 0x5c ] <== NOT EXECUTED
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
201e244: c2 17 20 16 lduh [ %i4 + 0x16 ], %g1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e248: c6 17 20 1a lduh [ %i4 + 0x1a ], %g3
201e24c: c8 17 20 14 lduh [ %i4 + 0x14 ], %g4
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
201e250: c4 17 20 18 lduh [ %i4 + 0x18 ], %g2
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e254: 83 28 60 10 sll %g1, 0x10, %g1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e258: 89 29 20 10 sll %g4, 0x10, %g4
201e25c: 87 28 e0 10 sll %g3, 0x10, %g3
201e260: 9b 31 20 18 srl %g4, 0x18, %o5
201e264: 9f 30 e0 18 srl %g3, 0x18, %o7
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e268: 85 28 a0 10 sll %g2, 0x10, %g2
201e26c: 93 30 60 18 srl %g1, 0x18, %o1
201e270: 91 30 a0 18 srl %g2, 0x18, %o0
201e274: b1 30 60 08 srl %g1, 8, %i0
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e278: 89 31 20 08 srl %g4, 8, %g4
201e27c: 87 30 e0 08 srl %g3, 8, %g3
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e280: 85 30 a0 08 srl %g2, 8, %g2
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e284: 03 00 00 3f sethi %hi(0xfc00), %g1
201e288: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e28c: 84 08 80 01 and %g2, %g1, %g2
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e290: 88 09 00 01 and %g4, %g1, %g4
201e294: 86 08 c0 01 and %g3, %g1, %g3
201e298: 88 13 40 04 or %o5, %g4, %g4
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e29c: 82 0e 00 01 and %i0, %g1, %g1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e2a0: 86 13 c0 03 or %o7, %g3, %g3
201e2a4: 89 29 20 10 sll %g4, 0x10, %g4
201e2a8: 86 11 00 03 or %g4, %g3, %g3
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e2ac: 92 12 40 01 or %o1, %g1, %o1
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
201e2b0: c6 26 a0 1c st %g3, [ %i2 + 0x1c ]
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
201e2b4: 40 00 06 4a call 201fbdc <msdos_date_dos2unix>
201e2b8: 90 12 00 02 or %o0, %g2, %o0
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
201e2bc: c2 0f 20 0b ldub [ %i4 + 0xb ], %g1
201e2c0: 80 88 60 10 btst 0x10, %g1
201e2c4: 12 80 00 27 bne 201e360 <msdos_find_name+0x334>
201e2c8: d0 26 a0 40 st %o0, [ %i2 + 0x40 ]
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
201e2cc: c4 07 20 1c ld [ %i4 + 0x1c ], %g2
201e2d0: c2 07 bf fc ld [ %fp + -4 ], %g1
201e2d4: b9 28 a0 18 sll %g2, 0x18, %i4
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201e2d8: 89 30 a0 18 srl %g2, 0x18, %g4
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201e2dc: 87 30 a0 08 srl %g2, 8, %g3
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201e2e0: 88 17 00 04 or %i4, %g4, %g4
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201e2e4: 86 08 e0 ff and %g3, 0xff, %g3
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201e2e8: 87 28 e0 10 sll %g3, 0x10, %g3
201e2ec: 86 11 00 03 or %g4, %g3, %g3
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201e2f0: 85 30 a0 10 srl %g2, 0x10, %g2
201e2f4: 84 08 a0 ff and %g2, 0xff, %g2
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201e2f8: 85 28 a0 08 sll %g2, 8, %g2
201e2fc: 84 10 c0 02 or %g3, %g2, %g2
fat_fd->fat_file_type = FAT_FILE;
201e300: 86 10 20 05 mov 5, %g3
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
201e304: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
fat_fd->fat_file_type = FAT_FILE;
201e308: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
201e30c: 86 10 3f ff mov -1, %g3
201e310: c6 20 60 14 st %g3, [ %g1 + 0x14 ]
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201e314: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
201e318: c0 20 60 34 clr [ %g1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
201e31c: 80 a0 a0 00 cmp %g2, 0
201e320: 02 80 00 0d be 201e354 <msdos_find_name+0x328>
201e324: c6 20 60 38 st %g3, [ %g1 + 0x38 ]
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
201e328: c8 16 e0 06 lduh [ %i3 + 6 ], %g4
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
201e32c: 80 a1 00 02 cmp %g4, %g2
201e330: 0a 80 00 0a bcs 201e358 <msdos_find_name+0x32c> <== NEVER TAKEN
201e334: 84 10 3f ff mov -1, %g2
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
201e338: 10 bf ff 91 b 201e17c <msdos_find_name+0x150>
201e33c: c6 20 60 3c st %g3, [ %g1 + 0x3c ]
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
if (rc != RC_OK)
{
fat_file_close(parent_loc->mt_entry, fat_fd);
201e340: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
201e344: 7f ff d8 b0 call 2014604 <fat_file_close> <== NOT EXECUTED
201e348: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
return rc;
201e34c: 81 c7 e0 08 ret
201e350: 81 e8 00 00 restore
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
201e354: 84 10 3f ff mov -1, %g2
201e358: 10 bf ff 89 b 201e17c <msdos_find_name+0x150>
201e35c: c4 20 60 3c st %g2, [ %g1 + 0x3c ]
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
201e360: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
201e364: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201e368: 05 00 08 00 sethi %hi(0x200000), %g2
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
201e36c: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
201e370: 92 10 00 01 mov %g1, %o1
201e374: 7f ff da c7 call 2014e90 <fat_file_size>
201e378: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
if (rc != RC_OK)
201e37c: b0 92 20 00 orcc %o0, 0, %i0
201e380: 12 bf ff f0 bne 201e340 <msdos_find_name+0x314> <== NEVER TAKEN
201e384: c2 07 bf fc ld [ %fp + -4 ], %g1
201e388: 10 bf ff e3 b 201e314 <msdos_find_name+0x2e8>
201e38c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
0201d0bc <msdos_find_name_in_fat_file>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201d0bc: 9d e3 bf 78 save %sp, -136, %sp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201d0c0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201d0c4: f0 27 a0 44 st %i0, [ %fp + 0x44 ]
201d0c8: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
201d0cc: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201d0d0: c2 27 bf e8 st %g1, [ %fp + -24 ]
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
201d0d4: 80 a7 20 00 cmp %i4, 0
201d0d8: 04 80 02 5a ble 201da40 <msdos_find_name_in_fat_file+0x984><== NEVER TAKEN
201d0dc: ae 10 00 1d mov %i5, %l7
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
201d0e0: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201d0e4: 82 10 3f ff mov -1, %g1
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
201d0e8: c0 20 80 00 clr [ %g2 ]
dir_pos->sname.ofs = 0;
201d0ec: c0 20 a0 04 clr [ %g2 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201d0f0: c2 20 a0 08 st %g1, [ %g2 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201d0f4: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
201d0f8: c2 27 bf f8 st %g1, [ %fp + -8 ]
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
201d0fc: 80 a6 a0 00 cmp %i2, 0
201d100: 02 80 00 05 be 201d114 <msdos_find_name_in_fat_file+0x58>
201d104: c2 27 bf f4 st %g1, [ %fp + -12 ]
201d108: 80 a7 60 01 cmp %i5, 1
201d10c: 02 80 00 06 be 201d124 <msdos_find_name_in_fat_file+0x68>
201d110: c0 27 bf e4 clr [ %fp + -28 ]
lfn_entries = 0;
else
lfn_entries =
201d114: 90 07 20 0c add %i4, 0xc, %o0
201d118: 40 00 41 a5 call 202d7ac <.div>
201d11c: 92 10 20 0d mov 0xd, %o1
201d120: d0 27 bf e4 st %o0, [ %fp + -28 ]
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201d124: c6 07 a0 48 ld [ %fp + 0x48 ], %g3
201d128: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1
201d12c: 80 a0 60 01 cmp %g1, 1
201d130: 22 80 01 6e be,a 201d6e8 <msdos_find_name_in_fat_file+0x62c>
201d134: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
201d138: c2 07 bf e8 ld [ %fp + -24 ], %g1
201d13c: f2 10 60 06 lduh [ %g1 + 6 ], %i1
201d140: c4 07 bf e8 ld [ %fp + -24 ], %g2
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
201d144: c6 07 bf e4 ld [ %fp + -28 ], %g3
201d148: d8 00 a0 9c ld [ %g2 + 0x9c ], %o4
201d14c: 82 00 e0 01 add %g3, 1, %g1
201d150: ba 10 00 1c mov %i4, %i5
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
201d154: c0 27 bf ec clr [ %fp + -20 ]
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
201d158: a8 10 20 00 clr %l4
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
201d15c: b6 10 20 00 clr %i3
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
201d160: a0 10 20 00 clr %l0
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
201d164: a6 10 20 00 clr %l3
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
201d168: aa 10 20 00 clr %l5
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
201d16c: ac 10 20 00 clr %l6
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
201d170: b0 10 20 00 clr %i0
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
201d174: a4 10 20 00 clr %l2
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
201d178: a2 10 3f ff mov -1, %l1
201d17c: b8 10 00 01 mov %g1, %i4
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
201d180: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
201d184: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
201d188: d4 07 bf ec ld [ %fp + -20 ], %o2
201d18c: 7f ff dc 0e call 20141c4 <fat_file_read>
201d190: 96 10 00 19 mov %i1, %o3
201d194: 80 a2 20 00 cmp %o0, 0
201d198: 02 80 00 55 be 201d2ec <msdos_find_name_in_fat_file+0x230><== NEVER TAKEN
201d19c: 80 a2 20 1f cmp %o0, 0x1f
bool remainder_empty = false;
#if MSDOS_FIND_PRINT
printf ("MSFS:[2] dir_offset:%li\n", dir_offset);
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d1a0: 04 80 01 89 ble 201d7c4 <msdos_find_name_in_fat_file+0x708><== NEVER TAKEN
201d1a4: 80 a2 00 19 cmp %o0, %i1
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
201d1a8: 12 80 02 2e bne 201da60 <msdos_find_name_in_fat_file+0x9a4><== NEVER TAKEN
201d1ac: c2 07 bf e8 ld [ %fp + -24 ], %g1
201d1b0: d8 00 60 9c ld [ %g1 + 0x9c ], %o4
201d1b4: 82 10 20 00 clr %g1
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201d1b8: 84 03 00 01 add %o4, %g1, %g2
* to here and write the long file name if this is the start of
* a series of empty entries. If empty_space_count is 0 then
* we are currently not inside an empty series of entries. It
* is a count of empty entries.
*/
if (empty_space_count == 0)
201d1bc: 80 a6 e0 00 cmp %i3, 0
201d1c0: 12 80 00 04 bne 201d1d0 <msdos_find_name_in_fat_file+0x114><== NEVER TAKEN
201d1c4: de 0b 00 01 ldub [ %o4 + %g1 ], %o7
201d1c8: a0 10 00 01 mov %g1, %l0
201d1cc: a6 10 00 12 mov %l2, %l3
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
201d1d0: 88 8b e0 ff andcc %o7, 0xff, %g4
201d1d4: 02 80 00 c6 be 201d4ec <msdos_find_name_in_fat_file+0x430>
201d1d8: 80 a1 20 e5 cmp %g4, 0xe5
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
201d1dc: 02 80 00 4a be 201d304 <msdos_find_name_in_fat_file+0x248><== NEVER TAKEN
201d1e0: 80 a6 a0 00 cmp %i2, 0
* A valid entry so handle it.
*
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
201d1e4: 02 80 00 07 be 201d200 <msdos_find_name_in_fat_file+0x144>
201d1e8: c6 08 a0 0b ldub [ %g2 + 0xb ], %g3
201d1ec: 80 8d 20 ff btst 0xff, %l4
201d1f0: 12 80 00 04 bne 201d200 <msdos_find_name_in_fat_file+0x144><== NEVER TAKEN
201d1f4: 01 00 00 00 nop
{
empty_space_entry = 0;
empty_space_count = 0;
201d1f8: b6 10 20 00 clr %i3 ! 0 <PROM_START>
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
201d1fc: a0 10 20 00 clr %l0
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
201d200: 86 08 e0 3f and %g3, 0x3f, %g3
201d204: 80 a0 e0 0f cmp %g3, 0xf
201d208: 02 80 00 65 be 201d39c <msdos_find_name_in_fat_file+0x2e0>
201d20c: 80 8e 20 ff btst 0xff, %i0
* If a LFN has been found and it matched check the
* entries have all been found and the checksum is
* correct. If this is the case return the short file
* name entry.
*/
if (lfn_matched)
201d210: 02 80 00 4c be 201d340 <msdos_find_name_in_fat_file+0x284>
201d214: 80 a5 e0 01 cmp %l7, 1
201d218: 88 10 00 02 mov %g2, %g4
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d21c: 9a 00 a0 0a add %g2, 0xa, %o5
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
201d220: 86 10 20 00 clr %g3
201d224: 10 80 00 0a b 201d24c <msdos_find_name_in_fat_file+0x190>
201d228: b0 10 20 00 clr %i0
201d22c: b0 0e 20 ff and %i0, 0xff, %i0
201d230: 86 0e 20 01 and %i0, 1, %g3
201d234: de 09 20 01 ldub [ %g4 + 1 ], %o7
201d238: 80 a0 00 03 cmp %g0, %g3
201d23c: 88 01 20 01 inc %g4
201d240: 86 40 3f ff addx %g0, -1, %g3
201d244: 86 08 e0 80 and %g3, 0x80, %g3
201d248: 86 00 ff 80 add %g3, -128, %g3
201d24c: b1 36 20 01 srl %i0, 1, %i0
201d250: 86 03 c0 03 add %o7, %g3, %g3
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
201d254: 80 a1 00 0d cmp %g4, %o5
201d258: 12 bf ff f5 bne 201d22c <msdos_find_name_in_fat_file+0x170>
201d25c: b0 00 c0 18 add %g3, %i0, %i0
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
201d260: b0 1d 80 18 xor %l6, %i0, %i0
201d264: 80 8e 20 ff btst 0xff, %i0
201d268: 12 80 00 36 bne 201d340 <msdos_find_name_in_fat_file+0x284><== NEVER TAKEN
201d26c: 80 a5 e0 01 cmp %l7, 1
201d270: 80 a5 60 00 cmp %l5, 0
201d274: 12 80 00 33 bne 201d340 <msdos_find_name_in_fat_file+0x284><== NEVER TAKEN
201d278: 80 a5 e0 01 cmp %l7, 1
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201d27c: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
201d280: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
201d284: d6 07 bf ec ld [ %fp + -20 ], %o3
201d288: d8 07 a0 5c ld [ %fp + 0x5c ], %o4
201d28c: b8 10 00 02 mov %g2, %i4
201d290: ba 10 00 01 mov %g1, %i5
201d294: 7f ff dd 0e call 20146cc <fat_file_ioctl>
201d298: 94 10 20 01 mov 1, %o2
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
201d29c: b0 92 20 00 orcc %o0, 0, %i0
201d2a0: 12 80 00 17 bne 201d2fc <msdos_find_name_in_fat_file+0x240><== NEVER TAKEN
201d2a4: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201d2a8: d2 07 bf f4 ld [ %fp + -12 ], %o1
201d2ac: 80 a2 7f ff cmp %o1, -1
201d2b0: 02 80 01 18 be 201d710 <msdos_find_name_in_fat_file+0x654>
201d2b4: fa 20 e0 04 st %i5, [ %g3 + 4 ]
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201d2b8: 40 00 41 01 call 202d6bc <.umul>
201d2bc: 90 10 00 19 mov %i1, %o0
201d2c0: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
201d2c4: 96 10 00 08 mov %o0, %o3
201d2c8: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
201d2cc: 94 10 20 01 mov 1, %o2
201d2d0: 7f ff dc ff call 20146cc <fat_file_ioctl>
201d2d4: 98 07 bf f4 add %fp, -12, %o4
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
201d2d8: 80 a2 20 00 cmp %o0, 0
201d2dc: 02 80 01 0e be 201d714 <msdos_find_name_in_fat_file+0x658><== ALWAYS TAKEN
201d2e0: c2 07 bf f4 ld [ %fp + -12 ], %g1
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201d2e4: 81 c7 e0 08 ret <== NOT EXECUTED
201d2e8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
201d2ec: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
201d2f0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201d2f4: 12 80 00 8a bne 201d51c <msdos_find_name_in_fat_file+0x460><== NOT EXECUTED
201d2f8: b0 16 21 01 or %i0, 0x101, %i0 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
201d2fc: 81 c7 e0 08 ret
201d300: 81 e8 00 00 restore
}
break;
}
else if (entry_empty)
{
if (create_node)
201d304: 22 80 00 07 be,a 201d320 <msdos_find_name_in_fat_file+0x264><== NOT EXECUTED
201d308: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
201d30c: b6 06 e0 01 inc %i3 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
201d310: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
201d314: 22 80 00 02 be,a 201d31c <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
201d318: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d31c: 82 00 60 20 add %g1, 0x20, %g1
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
201d320: 80 a6 40 01 cmp %i1, %g1
201d324: 18 bf ff a6 bgu 201d1bc <msdos_find_name_in_fat_file+0x100><== ALWAYS TAKEN
201d328: 84 03 00 01 add %o4, %g1, %g2
201d32c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
201d330: a4 04 a0 01 inc %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
201d334: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED
201d338: 10 bf ff 92 b 201d180 <msdos_find_name_in_fat_file+0xc4> <== NOT EXECUTED
201d33c: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
201d340: 02 80 00 05 be 201d354 <msdos_find_name_in_fat_file+0x298>
201d344: c6 07 bf f4 ld [ %fp + -12 ], %g3
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
201d348: e2 27 bf f4 st %l1, [ %fp + -12 ]
lfn_matched = false;
201d34c: 10 bf ff f4 b 201d31c <msdos_find_name_in_fat_file+0x260>
201d350: b0 10 20 00 clr %i0
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
201d354: 80 a0 ff ff cmp %g3, -1
201d358: 32 bf ff fd bne,a 201d34c <msdos_find_name_in_fat_file+0x290><== NEVER TAKEN
201d35c: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
201d360: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
201d364: 90 10 00 02 mov %g2, %o0
201d368: c2 27 bf e0 st %g1, [ %fp + -32 ]
201d36c: c4 27 bf dc st %g2, [ %fp + -36 ]
201d370: d8 27 bf d8 st %o4, [ %fp + -40 ]
201d374: 40 00 10 12 call 20213bc <memcmp>
201d378: 94 10 20 0b mov 0xb, %o2
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
201d37c: c2 07 bf e0 ld [ %fp + -32 ], %g1
201d380: 80 a2 20 00 cmp %o0, 0
201d384: c4 07 bf dc ld [ %fp + -36 ], %g2
201d388: 02 bf ff bd be 201d27c <msdos_find_name_in_fat_file+0x1c0>
201d38c: d8 07 bf d8 ld [ %fp + -40 ], %o4
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
201d390: e2 27 bf f4 st %l1, [ %fp + -12 ]
lfn_matched = false;
201d394: 10 bf ff e2 b 201d31c <msdos_find_name_in_fat_file+0x260>
201d398: b0 10 20 00 clr %i0
#endif
/*
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
201d39c: c6 07 bf f4 ld [ %fp + -12 ], %g3
201d3a0: 80 a0 ff ff cmp %g3, -1
201d3a4: 02 80 00 3d be 201d498 <msdos_find_name_in_fat_file+0x3dc>
201d3a8: 80 89 20 40 btst 0x40, %g4
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
201d3ac: 88 09 20 3f and %g4, 0x3f, %g4
201d3b0: 80 a1 00 15 cmp %g4, %l5
201d3b4: 22 80 00 04 be,a 201d3c4 <msdos_find_name_in_fat_file+0x308><== ALWAYS TAKEN
201d3b8: de 08 a0 0d ldub [ %g2 + 0xd ], %o7
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
201d3bc: 10 bf ff d8 b 201d31c <msdos_find_name_in_fat_file+0x260> <== NOT EXECUTED
201d3c0: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
201d3c4: 86 0d a0 ff and %l6, 0xff, %g3
201d3c8: 80 a3 c0 03 cmp %o7, %g3
201d3cc: 32 bf ff d4 bne,a 201d31c <msdos_find_name_in_fat_file+0x260><== NEVER TAKEN
201d3d0: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
201d3d4: aa 05 7f ff add %l5, -1, %l5
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
201d3d8: 9f 2d 60 04 sll %l5, 4, %o7
p = entry + 1;
201d3dc: 84 00 a0 01 inc %g2
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
201d3e0: 87 2d 60 02 sll %l5, 2, %g3
201d3e4: 86 23 c0 03 sub %o7, %g3, %g3
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
201d3e8: de 48 80 00 ldsb [ %g2 ], %o7
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201d3ec: b0 10 20 01 mov 1, %i0
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
201d3f0: 94 00 c0 15 add %g3, %l5, %o2
201d3f4: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
p = entry + 1;
201d3f8: 86 10 00 0a mov %o2, %g3
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
201d3fc: 80 a3 e0 00 cmp %o7, 0
201d400: 02 80 00 15 be 201d454 <msdos_find_name_in_fat_file+0x398><== NEVER TAKEN
201d404: 9a 06 3f ff add %i0, -1, %o5
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
201d408: 80 a7 40 03 cmp %i5, %g3
201d40c: 24 80 00 1b ble,a 201d478 <msdos_find_name_in_fat_file+0x3bc>
201d410: e2 27 bf f4 st %l1, [ %fp + -12 ]
201d414: d6 4a 40 03 ldsb [ %o1 + %g3 ], %o3
201d418: 80 a3 c0 0b cmp %o7, %o3
201d41c: 12 80 00 16 bne 201d474 <msdos_find_name_in_fat_file+0x3b8>
201d420: 80 a3 60 04 cmp %o5, 4
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
201d424: 02 80 00 2a be 201d4cc <msdos_find_name_in_fat_file+0x410>
201d428: 80 a3 60 0a cmp %o5, 0xa
201d42c: 02 80 00 2c be 201d4dc <msdos_find_name_in_fat_file+0x420>
201d430: 80 a6 20 0d cmp %i0, 0xd
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
201d434: 02 80 00 11 be 201d478 <msdos_find_name_in_fat_file+0x3bc>
201d438: 84 00 a0 02 add %g2, 2, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201d43c: b0 06 20 01 inc %i0
201d440: 86 00 e0 01 inc %g3
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
201d444: de 48 80 00 ldsb [ %g2 ], %o7
201d448: 80 a3 e0 00 cmp %o7, 0
201d44c: 12 bf ff ef bne 201d408 <msdos_find_name_in_fat_file+0x34c>
201d450: 9a 06 3f ff add %i0, -1, %o5
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
201d454: c4 07 bf e4 ld [ %fp + -28 ], %g2
201d458: 80 a0 80 04 cmp %g2, %g4
201d45c: 12 80 00 08 bne 201d47c <msdos_find_name_in_fat_file+0x3c0><== NEVER TAKEN
201d460: 80 a5 60 00 cmp %l5, 0
((o + i) != name_len))
201d464: 9a 02 80 0d add %o2, %o5, %o5
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
201d468: 80 a3 40 1d cmp %o5, %i5
201d46c: 02 80 00 04 be 201d47c <msdos_find_name_in_fat_file+0x3c0><== ALWAYS TAKEN
201d470: 80 a5 60 00 cmp %l5, 0
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
201d474: e2 27 bf f4 st %l1, [ %fp + -12 ]
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
201d478: 80 a5 60 00 cmp %l5, 0
201d47c: 12 bf ff a8 bne 201d31c <msdos_find_name_in_fat_file+0x260>
201d480: b0 10 20 00 clr %i0
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d484: c4 07 bf f4 ld [ %fp + -12 ], %g2
201d488: 84 38 00 02 xnor %g0, %g2, %g2
201d48c: 80 a0 00 02 cmp %g0, %g2
201d490: 10 bf ff a3 b 201d31c <msdos_find_name_in_fat_file+0x260>
201d494: b0 40 20 00 addx %g0, 0, %i0
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
201d498: 02 bf ff a1 be 201d31c <msdos_find_name_in_fat_file+0x260>
201d49c: b0 10 20 00 clr %i0
* entry match the number we expect for this
* file name. Note we do not know the number of
* characters in the entry so this is check further
* on when the characters are checked.
*/
if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
201d4a0: c6 07 bf e4 ld [ %fp + -28 ], %g3
201d4a4: 88 09 20 3f and %g4, 0x3f, %g4
201d4a8: 80 a1 00 03 cmp %g4, %g3
201d4ac: 32 bf ff 9d bne,a 201d320 <msdos_find_name_in_fat_file+0x264>
201d4b0: 82 00 60 20 add %g1, 0x20, %g1
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
201d4b4: e4 27 bf f4 st %l2, [ %fp + -12 ]
lfn_start.ofs = dir_entry;
201d4b8: c2 27 bf f8 st %g1, [ %fp + -8 ]
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
201d4bc: ec 08 a0 0d ldub [ %g2 + 0xd ], %l6
201d4c0: c8 08 80 00 ldub [ %g2 ], %g4
201d4c4: 10 bf ff ba b 201d3ac <msdos_find_name_in_fat_file+0x2f0>
201d4c8: aa 10 00 03 mov %g3, %l5
}
switch (i)
{
case 4:
p += 5;
201d4cc: 84 00 a0 05 add %g2, 5, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201d4d0: b0 06 20 01 inc %i0
201d4d4: 10 bf ff dc b 201d444 <msdos_find_name_in_fat_file+0x388>
201d4d8: 86 00 e0 01 inc %g3
{
case 4:
p += 5;
break;
case 10:
p += 4;
201d4dc: 84 00 a0 04 add %g2, 4, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
201d4e0: b0 06 20 01 inc %i0
201d4e4: 10 bf ff d8 b 201d444 <msdos_find_name_in_fat_file+0x388>
201d4e8: 86 00 e0 01 inc %g3
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
201d4ec: 31 00 00 1f sethi %hi(0x7c00), %i0
201d4f0: ba 10 00 01 mov %g1, %i5
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
201d4f4: 80 a6 a0 00 cmp %i2, 0
201d4f8: 02 bf ff 81 be 201d2fc <msdos_find_name_in_fat_file+0x240>
201d4fc: b0 16 21 01 or %i0, 0x101, %i0
* Lets go and write the directory entries. If we have not found
* any available space add the remaining number of entries to any that
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
201d500: 80 8d 20 ff btst 0xff, %l4
201d504: 12 80 00 07 bne 201d520 <msdos_find_name_in_fat_file+0x464><== NEVER TAKEN
201d508: 80 a5 e0 02 cmp %l7, 2
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
entries_per_block = bts2rd / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201d50c: 83 36 60 05 srl %i1, 5, %g1
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201d510: bb 37 60 05 srl %i5, 5, %i5
201d514: b6 06 c0 01 add %i3, %g1, %i3
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
201d518: b6 26 c0 1d sub %i3, %i5, %i3
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
201d51c: 80 a5 e0 02 cmp %l7, 2
201d520: 02 80 00 b2 be 201d7e8 <msdos_find_name_in_fat_file+0x72c>
201d524: 90 10 00 13 mov %l3, %o0
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
201d528: c6 07 bf e4 ld [ %fp + -28 ], %g3
201d52c: 80 a0 e0 00 cmp %g3, 0
201d530: 02 80 00 14 be 201d580 <msdos_find_name_in_fat_file+0x4c4>
201d534: b4 10 20 00 clr %i2
201d538: 84 10 20 00 clr %g2
201d53c: 82 10 20 00 clr %g1
201d540: 10 80 00 08 b 201d560 <msdos_find_name_in_fat_file+0x4a4>
201d544: 86 10 20 00 clr %g3
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
((lfn_checksum & 1) ? 0x80 : 0) + (lfn_checksum >> 1) + *p;
201d548: 86 0e a0 ff and %i2, 0xff, %g3
201d54c: 82 08 e0 01 and %g3, 1, %g1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
201d550: 80 a0 00 01 cmp %g0, %g1
201d554: 82 40 3f ff addx %g0, -1, %g1
201d558: 82 08 60 80 and %g1, 0x80, %g1
201d55c: 82 00 7f 80 add %g1, -128, %g1
201d560: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
201d564: 87 30 e0 01 srl %g3, 1, %g3
201d568: c8 0f 40 02 ldub [ %i5 + %g2 ], %g4
201d56c: 82 00 c0 01 add %g3, %g1, %g1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
201d570: 84 00 a0 01 inc %g2
201d574: 80 a0 a0 0b cmp %g2, 0xb
201d578: 12 bf ff f4 bne 201d548 <msdos_find_name_in_fat_file+0x48c>
201d57c: b4 00 40 04 add %g1, %g4, %i2
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
201d580: 80 a6 e0 00 cmp %i3, 0
201d584: 22 80 00 96 be,a 201d7dc <msdos_find_name_in_fat_file+0x720><== NEVER TAKEN
201d588: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
201d58c: a4 1c c0 12 xor %l3, %l2, %l2
201d590: 80 a0 00 12 cmp %g0, %l2
201d594: ba 40 20 00 addx %g0, 0, %i5
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
201d598: 82 10 3f ff mov -1, %g1
201d59c: c2 27 bf f8 st %g1, [ %fp + -8 ]
201d5a0: c2 27 bf f4 st %g1, [ %fp + -12 ]
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
201d5a4: c2 07 bf e4 ld [ %fp + -28 ], %g1
201d5a8: 80 a0 60 00 cmp %g1, 0
201d5ac: 06 bf ff 54 bl 201d2fc <msdos_find_name_in_fat_file+0x240><== NEVER TAKEN
201d5b0: b0 10 20 00 clr %i0
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201d5b4: a4 00 60 01 add %g1, 1, %l2
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
201d5b8: 90 10 00 13 mov %l3, %o0
201d5bc: 40 00 40 40 call 202d6bc <.umul>
201d5c0: 92 10 00 19 mov %i1, %o1
201d5c4: e2 07 bf e8 ld [ %fp + -24 ], %l1
201d5c8: ee 07 a0 44 ld [ %fp + 0x44 ], %l7
201d5cc: ec 07 a0 48 ld [ %fp + 0x48 ], %l6
201d5d0: aa 10 00 08 mov %o0, %l5
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
201d5d4: b6 10 20 00 clr %i3
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
201d5d8: a8 10 00 12 mov %l2, %l4
*/
while (lfn_entry < (lfn_entries + 1))
{
int length = 0;
if (read_cluster)
201d5dc: 80 8f 60 ff btst 0xff, %i5
201d5e0: 32 80 00 57 bne,a 201d73c <msdos_find_name_in_fat_file+0x680><== NEVER TAKEN
201d5e4: d8 04 60 9c ld [ %l1 + 0x9c ], %o4 <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201d5e8: 80 a6 40 10 cmp %i1, %l0
201d5ec: 08 80 01 10 bleu 201da2c <msdos_find_name_in_fat_file+0x970><== NEVER TAKEN
201d5f0: b8 06 e0 01 add %i3, 1, %i4
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201d5f4: fa 04 60 9c ld [ %l1 + 0x9c ], %i5
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201d5f8: 80 a4 80 1c cmp %l2, %i4
201d5fc: 02 80 01 09 be 201da20 <msdos_find_name_in_fat_file+0x964>
201d600: ba 07 40 10 add %i5, %l0, %i5
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d604: c4 07 bf e4 ld [ %fp + -28 ], %g2
201d608: 82 38 00 1b xnor %g0, %i3, %g1
201d60c: 82 00 40 02 add %g1, %g2, %g1
201d610: 87 28 60 04 sll %g1, 4, %g3
201d614: 85 28 60 02 sll %g1, 2, %g2
201d618: 84 20 c0 02 sub %g3, %g2, %g2
201d61c: c6 07 a0 50 ld [ %fp + 0x50 ], %g3
201d620: b6 10 00 10 mov %l0, %i3
201d624: 82 00 80 01 add %g2, %g1, %g1
201d628: ec 27 bf ec st %l6, [ %fp + -20 ]
201d62c: 82 00 c0 01 add %g3, %g1, %g1
201d630: ac 10 00 15 mov %l5, %l6
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201d634: b0 10 20 20 mov 0x20, %i0
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d638: aa 10 00 10 mov %l0, %l5
201d63c: a0 10 00 1a mov %i2, %l0
201d640: b4 10 00 01 mov %g1, %i2
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
201d644: c2 07 bf f4 ld [ %fp + -12 ], %g1
201d648: 80 a0 7f ff cmp %g1, -1
201d64c: 22 80 00 e2 be,a 201d9d4 <msdos_find_name_in_fat_file+0x918>
201d650: e6 27 bf f4 st %l3, [ %fp + -12 ]
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201d654: 90 10 00 1d mov %i5, %o0
201d658: 92 10 20 00 clr %o1
201d65c: 40 00 0f c2 call 2021564 <memset>
201d660: 94 10 20 20 mov 0x20, %o2
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201d664: 86 10 00 1a mov %i2, %g3
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
201d668: e0 2f 60 0d stb %l0, [ %i5 + 0xd ]
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201d66c: de 48 c0 00 ldsb [ %g3 ], %o7
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201d670: 84 10 20 01 mov 1, %g2
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
201d674: 82 07 60 01 add %i5, 1, %g1
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
201d678: 9a 10 20 00 clr %o5
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d67c: 88 00 bf ff add %g2, -1, %g4
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201d680: 80 a3 e0 00 cmp %o7, 0
201d684: 02 80 00 11 be 201d6c8 <msdos_find_name_in_fat_file+0x60c><== NEVER TAKEN
201d688: d8 08 c0 00 ldub [ %g3 ], %o4
{
*p = *n;
201d68c: d8 28 40 00 stb %o4, [ %g1 ]
p [0] = fill;
p [1] = fill;
fill = 0xff;
}
switch (i)
201d690: 80 a1 20 04 cmp %g4, 4
201d694: 02 80 00 12 be 201d6dc <msdos_find_name_in_fat_file+0x620>
201d698: 86 00 e0 01 inc %g3
201d69c: 80 a1 20 0a cmp %g4, 0xa
201d6a0: 02 80 00 81 be 201d8a4 <msdos_find_name_in_fat_file+0x7e8>
201d6a4: 80 a0 a0 0d cmp %g2, 0xd
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
201d6a8: 02 80 00 82 be 201d8b0 <msdos_find_name_in_fat_file+0x7f4>
201d6ac: 82 00 60 02 add %g1, 2, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201d6b0: 84 00 a0 01 inc %g2
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201d6b4: de 48 c0 00 ldsb [ %g3 ], %o7
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d6b8: 88 00 bf ff add %g2, -1, %g4
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
201d6bc: 80 a3 e0 00 cmp %o7, 0
201d6c0: 12 bf ff f3 bne 201d68c <msdos_find_name_in_fat_file+0x5d0>
201d6c4: d8 08 c0 00 ldub [ %g3 ], %o4
*p = *n;
n++;
}
else
{
p [0] = fill;
201d6c8: da 28 40 00 stb %o5, [ %g1 ]
p [1] = fill;
201d6cc: da 28 60 01 stb %o5, [ %g1 + 1 ]
fill = 0xff;
}
switch (i)
201d6d0: 80 a1 20 04 cmp %g4, 4
201d6d4: 12 bf ff f2 bne 201d69c <msdos_find_name_in_fat_file+0x5e0>
201d6d8: 9a 10 3f ff mov -1, %o5
{
case 4:
p += 5;
201d6dc: 82 00 60 05 add %g1, 5, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201d6e0: 10 bf ff f5 b 201d6b4 <msdos_find_name_in_fat_file+0x5f8>
201d6e4: 84 00 a0 01 inc %g2
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201d6e8: 80 a0 60 00 cmp %g1, 0
201d6ec: 12 bf fe 94 bne 201d13c <msdos_find_name_in_fat_file+0x80><== NEVER TAKEN
201d6f0: c2 07 bf e8 ld [ %fp + -24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201d6f4: fa 07 bf e8 ld [ %fp + -24 ], %i5
201d6f8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201d6fc: 80 88 60 03 btst 3, %g1
201d700: 02 bf fe 8f be 201d13c <msdos_find_name_in_fat_file+0x80> <== NEVER TAKEN
201d704: c2 07 bf e8 ld [ %fp + -24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
201d708: 10 bf fe 8e b 201d140 <msdos_find_name_in_fat_file+0x84>
201d70c: f2 00 e0 18 ld [ %g3 + 0x18 ], %i1
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201d710: 82 10 3f ff mov -1, %g1
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201d714: fa 07 a0 5c ld [ %fp + 0x5c ], %i5
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
201d718: d0 07 a0 60 ld [ %fp + 0x60 ], %o0
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201d71c: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = lfn_start.ofs;
201d720: c2 07 bf f8 ld [ %fp + -8 ], %g1
memcpy(name_dir_entry, entry,
201d724: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
201d728: c2 27 60 0c st %g1, [ %i5 + 0xc ]
memcpy(name_dir_entry, entry,
201d72c: 40 00 0f 52 call 2021474 <memcpy>
201d730: 94 10 20 20 mov 0x20, %o2
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
201d734: 81 c7 e0 08 ret
201d738: 81 e8 00 00 restore
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(mt_entry, fat_fd,
201d73c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
201d740: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
201d744: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201d748: 7f ff da 9f call 20141c4 <fat_file_read> <== NOT EXECUTED
201d74c: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
201d750: 80 a2 00 19 cmp %o0, %i1 <== NOT EXECUTED
201d754: 02 bf ff a5 be 201d5e8 <msdos_find_name_in_fat_file+0x52c><== NOT EXECUTED
201d758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
{
if (ret != FAT_EOF)
201d75c: 12 80 00 1a bne 201d7c4 <msdos_find_name_in_fat_file+0x708><== NOT EXECUTED
201d760: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (mt_entry, fat_fd, empty_space_offset * bts2rd,
201d764: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
201d768: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201d76c: 7f ff dc 28 call 201480c <fat_file_extend> <== NOT EXECUTED
201d770: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
201d774: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d778: 12 bf fe db bne 201d2e4 <msdos_find_name_in_fat_file+0x228><== NOT EXECUTED
201d77c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
201d780: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
201d784: 12 80 00 10 bne 201d7c4 <msdos_find_name_in_fat_file+0x708><== NOT EXECUTED
201d788: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
201d78c: d0 04 60 9c ld [ %l1 + 0x9c ], %o0 <== NOT EXECUTED
201d790: 40 00 0f 75 call 2021564 <memset> <== NOT EXECUTED
201d794: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
201d798: d8 04 60 9c ld [ %l1 + 0x9c ], %o4 <== NOT EXECUTED
201d79c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
201d7a0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
201d7a4: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201d7a8: 7f ff dc 92 call 20149f0 <fat_file_write> <== NOT EXECUTED
201d7ac: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
201d7b0: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
201d7b4: 02 80 00 b5 be 201da88 <msdos_find_name_in_fat_file+0x9cc><== NOT EXECUTED
201d7b8: 80 a2 00 19 cmp %o0, %i1 <== NOT EXECUTED
return ret;
else if (ret != bts2rd)
201d7bc: 02 bf ff 8c be 201d5ec <msdos_find_name_in_fat_file+0x530><== NOT EXECUTED
201d7c0: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
201d7c4: 40 00 0c 5d call 2020938 <__errno> <== NOT EXECUTED
201d7c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201d7cc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201d7d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201d7d4: 81 c7 e0 08 ret <== NOT EXECUTED
201d7d8: 81 e8 00 00 restore <== NOT EXECUTED
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
{
read_cluster = true;
201d7dc: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
empty_space_offset = dir_offset;
empty_space_entry = 0;
201d7e0: 10 bf ff 6e b 201d598 <msdos_find_name_in_fat_file+0x4dc> <== NOT EXECUTED
201d7e4: a0 10 20 00 clr %l0 <== NOT EXECUTED
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
201d7e8: 40 00 3f b5 call 202d6bc <.umul>
201d7ec: 92 10 00 19 mov %i1, %o1
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201d7f0: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
201d7f4: c6 07 bf e4 ld [ %fp + -28 ], %g3
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201d7f8: c2 48 80 00 ldsb [ %g2 ], %g1
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
201d7fc: 84 00 e0 01 add %g3, 1, %g2
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201d800: 80 a0 60 2e cmp %g1, 0x2e
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
201d804: 86 02 00 10 add %o0, %l0, %g3
201d808: 87 30 e0 05 srl %g3, 5, %g3
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201d80c: 02 80 00 05 be 201d820 <msdos_find_name_in_fat_file+0x764><== NEVER TAKEN
201d810: 84 00 80 03 add %g2, %g3, %g2
201d814: 80 a0 60 20 cmp %g1, 0x20
201d818: 12 80 00 06 bne 201d830 <msdos_find_name_in_fat_file+0x774><== ALWAYS TAKEN
201d81c: c6 07 a0 60 ld [ %fp + 0x60 ], %g3
*c = '_';
201d820: fa 07 a0 60 ld [ %fp + 0x60 ], %i5 <== NOT EXECUTED
201d824: 82 10 20 5f mov 0x5f, %g1 <== NOT EXECUTED
201d828: c2 2f 40 00 stb %g1, [ %i5 ] <== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
201d82c: c6 07 a0 60 ld [ %fp + 0x60 ], %g3 <== NOT EXECUTED
201d830: c2 48 e0 01 ldsb [ %g3 + 1 ], %g1
201d834: 80 a0 60 2e cmp %g1, 0x2e
201d838: 02 80 00 06 be 201d850 <msdos_find_name_in_fat_file+0x794><== NEVER TAKEN
201d83c: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
201d840: 80 a0 60 20 cmp %g1, 0x20
201d844: 12 80 00 06 bne 201d85c <msdos_find_name_in_fat_file+0x7a0><== ALWAYS TAKEN
201d848: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
*c = '_';
201d84c: fa 07 a0 60 ld [ %fp + 0x60 ], %i5 <== NOT EXECUTED
201d850: 82 10 20 5f mov 0x5f, %g1 <== NOT EXECUTED
201d854: c2 2f 60 01 stb %g1, [ %i5 + 1 ] <== NOT EXECUTED
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
201d858: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 <== NOT EXECUTED
201d85c: 09 00 80 c3 sethi %hi(0x2030c00), %g4
201d860: 86 00 60 02 add %g1, 2, %g3
201d864: 88 11 21 50 or %g4, 0x150, %g4
201d868: 82 10 20 0c mov 0xc, %g1
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
201d86c: bb 38 80 01 sra %g2, %g1, %i5
201d870: ba 0f 60 0f and %i5, 0xf, %i5
201d874: fa 09 00 1d ldub [ %g4 + %i5 ], %i5
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
201d878: 82 00 7f fc add %g1, -4, %g1
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
201d87c: fa 28 c0 00 stb %i5, [ %g3 ]
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
201d880: 80 a0 7f fc cmp %g1, -4
201d884: 12 bf ff fa bne 201d86c <msdos_find_name_in_fat_file+0x7b0>
201d888: 86 00 e0 01 inc %g3
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
201d88c: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
201d890: 82 10 20 7e mov 0x7e, %g1
201d894: c2 28 a0 06 stb %g1, [ %g2 + 6 ]
*c++ = '1';
201d898: 82 10 20 31 mov 0x31, %g1
201d89c: 10 bf ff 23 b 201d528 <msdos_find_name_in_fat_file+0x46c>
201d8a0: c2 28 a0 07 stb %g1, [ %g2 + 7 ]
{
case 4:
p += 5;
break;
case 10:
p += 4;
201d8a4: 82 00 60 04 add %g1, 4, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
201d8a8: 10 bf ff 83 b 201d6b4 <msdos_find_name_in_fat_file+0x5f8>
201d8ac: 84 00 a0 01 inc %g2
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
201d8b0: 82 25 00 1c sub %l4, %i4, %g1
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
201d8b4: 80 a7 20 01 cmp %i4, 1
201d8b8: 02 80 00 49 be 201d9dc <msdos_find_name_in_fat_file+0x920>
201d8bc: c2 2f 40 00 stb %g1, [ %i5 ]
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201d8c0: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d8c4: b6 06 e0 20 add %i3, 0x20, %i3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201d8c8: 82 10 60 0f or %g1, 0xf, %g1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201d8cc: 80 a6 40 1b cmp %i1, %i3
201d8d0: 08 80 00 4b bleu 201d9fc <msdos_find_name_in_fat_file+0x940><== NEVER TAKEN
201d8d4: c2 2f 60 0b stb %g1, [ %i5 + 0xb ]
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201d8d8: fa 04 60 9c ld [ %l1 + 0x9c ], %i5
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
201d8dc: b8 07 20 01 inc %i4
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
201d8e0: ba 07 40 1b add %i5, %i3, %i5
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201d8e4: b0 06 20 20 add %i0, 0x20, %i0
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201d8e8: 80 a4 80 1c cmp %l2, %i4
201d8ec: 12 bf ff 56 bne 201d644 <msdos_find_name_in_fat_file+0x588>
201d8f0: b4 06 bf f3 add %i2, -13, %i2
201d8f4: b4 10 00 10 mov %l0, %i2
201d8f8: a0 10 00 15 mov %l5, %l0
201d8fc: aa 10 00 16 mov %l6, %l5
201d900: ec 07 bf ec ld [ %fp + -20 ], %l6
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201d904: d8 07 a0 5c ld [ %fp + 0x5c ], %o4
201d908: 90 10 00 17 mov %l7, %o0
201d90c: 92 10 00 16 mov %l6, %o1
201d910: 94 10 20 01 mov 1, %o2
201d914: 7f ff db 6e call 20146cc <fat_file_ioctl>
201d918: 96 10 00 15 mov %l5, %o3
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
201d91c: 80 a2 20 00 cmp %o0, 0
201d920: 12 bf fe 71 bne 201d2e4 <msdos_find_name_in_fat_file+0x228><== NEVER TAKEN
201d924: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201d928: d2 07 bf f4 ld [ %fp + -12 ], %o1
201d92c: 80 a2 7f ff cmp %o1, -1
201d930: 02 80 00 3a be 201da18 <msdos_find_name_in_fat_file+0x95c>
201d934: f6 20 a0 04 st %i3, [ %g2 + 4 ]
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
201d938: 40 00 3f 61 call 202d6bc <.umul>
201d93c: 90 10 00 19 mov %i1, %o0
201d940: 92 10 00 16 mov %l6, %o1
201d944: 96 10 00 08 mov %o0, %o3
201d948: 94 10 20 01 mov 1, %o2
201d94c: 90 10 00 17 mov %l7, %o0
201d950: 7f ff db 5f call 20146cc <fat_file_ioctl>
201d954: 98 07 bf f4 add %fp, -12, %o4
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
201d958: 80 a2 20 00 cmp %o0, 0
201d95c: 12 bf fe 62 bne 201d2e4 <msdos_find_name_in_fat_file+0x228><== NEVER TAKEN
201d960: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201d964: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201d968: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
201d96c: c2 20 e0 08 st %g1, [ %g3 + 8 ]
dir_pos->lname.ofs = lfn_start.ofs;
201d970: c2 07 bf f8 ld [ %fp + -8 ], %g1
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201d974: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
201d978: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201d97c: 40 00 0e be call 2021474 <memcpy>
201d980: 94 10 20 20 mov 0x20, %o2
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
201d984: b6 10 00 1c mov %i4, %i3
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
201d988: 96 10 00 18 mov %i0, %o3
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(mt_entry, fat_fd,
201d98c: d8 04 60 9c ld [ %l1 + 0x9c ], %o4
201d990: 90 10 00 17 mov %l7, %o0
201d994: 92 10 00 16 mov %l6, %o1
201d998: 94 05 40 10 add %l5, %l0, %o2
201d99c: 7f ff dc 15 call 20149f0 <fat_file_write>
201d9a0: 98 03 00 10 add %o4, %l0, %o4
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
201d9a4: 80 a2 3f ff cmp %o0, -1
201d9a8: 02 80 00 36 be 201da80 <msdos_find_name_in_fat_file+0x9c4><== NEVER TAKEN
201d9ac: 80 a2 00 18 cmp %o0, %i0
return ret;
else if (ret != length)
201d9b0: 12 bf ff 85 bne 201d7c4 <msdos_find_name_in_fat_file+0x708><== NEVER TAKEN
201d9b4: fa 07 bf e4 ld [ %fp + -28 ], %i5
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
201d9b8: a6 04 e0 01 inc %l3
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
201d9bc: 80 a7 40 1b cmp %i5, %i3
201d9c0: 06 80 00 1e bl 201da38 <msdos_find_name_in_fat_file+0x97c><== ALWAYS TAKEN
201d9c4: aa 05 40 19 add %l5, %i1, %l5
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
201d9c8: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
201d9cc: 10 bf ff 04 b 201d5dc <msdos_find_name_in_fat_file+0x520> <== NOT EXECUTED
201d9d0: a0 10 20 00 clr %l0 <== NOT EXECUTED
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
lfn_start.ofs = dir_entry;
201d9d4: 10 bf ff 20 b 201d654 <msdos_find_name_in_fat_file+0x598>
201d9d8: f6 27 bf f8 st %i3, [ %fp + -8 ]
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
201d9dc: 82 10 60 40 or %g1, 0x40, %g1
201d9e0: c2 2f 40 00 stb %g1, [ %i5 ]
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201d9e4: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201d9e8: b6 06 e0 20 add %i3, 0x20, %i3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
201d9ec: 82 10 60 0f or %g1, 0xf, %g1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201d9f0: 80 a6 40 1b cmp %i1, %i3
201d9f4: 18 bf ff b9 bgu 201d8d8 <msdos_find_name_in_fat_file+0x81c><== ALWAYS TAKEN
201d9f8: c2 2f 60 0b stb %g1, [ %i5 + 0xb ]
201d9fc: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED
201da00: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201da04: a0 10 00 15 mov %l5, %l0 <== NOT EXECUTED
201da08: b6 10 00 1c mov %i4, %i3 <== NOT EXECUTED
201da0c: aa 10 00 16 mov %l6, %l5 <== NOT EXECUTED
201da10: 10 bf ff df b 201d98c <msdos_find_name_in_fat_file+0x8d0> <== NOT EXECUTED
201da14: ec 07 bf ec ld [ %fp + -20 ], %l6 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
201da18: 10 bf ff d3 b 201d964 <msdos_find_name_in_fat_file+0x8a8>
201da1c: 82 10 3f ff mov -1, %g1
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
201da20: b6 10 00 10 mov %l0, %i3
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201da24: 10 bf ff b8 b 201d904 <msdos_find_name_in_fat_file+0x848>
201da28: b0 10 20 20 mov 0x20, %i0
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
201da2c: 96 10 20 00 clr %o3 <== NOT EXECUTED
201da30: 10 bf ff d7 b 201d98c <msdos_find_name_in_fat_file+0x8d0> <== NOT EXECUTED
201da34: b0 10 20 00 clr %i0 <== NOT EXECUTED
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
201da38: 81 c7 e0 08 ret
201da3c: 91 e8 20 00 restore %g0, 0, %o0
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
201da40: 11 00 80 c5 sethi %hi(0x2031400), %o0 <== NOT EXECUTED
201da44: 15 00 80 c5 sethi %hi(0x2031400), %o2 <== NOT EXECUTED
201da48: 17 00 80 c5 sethi %hi(0x2031400), %o3 <== NOT EXECUTED
201da4c: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
201da50: 92 10 24 19 mov 0x419, %o1 <== NOT EXECUTED
201da54: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
201da58: 7f ff e8 16 call 2017ab0 <__assert_func> <== NOT EXECUTED
201da5c: 96 12 e1 c8 or %o3, 0x1c8, %o3 <== NOT EXECUTED
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
201da60: 11 00 80 c5 sethi %hi(0x2031400), %o0 <== NOT EXECUTED
201da64: 15 00 80 c5 sethi %hi(0x2031400), %o2 <== NOT EXECUTED
201da68: 17 00 80 c5 sethi %hi(0x2031400), %o3 <== NOT EXECUTED
201da6c: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
201da70: 92 10 24 49 mov 0x449, %o1 <== NOT EXECUTED
201da74: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
201da78: 7f ff e8 0e call 2017ab0 <__assert_func> <== NOT EXECUTED
201da7c: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
201da80: 81 c7 e0 08 ret <== NOT EXECUTED
201da84: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
201da88: 81 c7 e0 08 ret <== NOT EXECUTED
201da8c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0201da90 <msdos_find_node_by_cluster_num_in_fat_file>:
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
201da90: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201da94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
201da98: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
201da9c: 02 80 00 36 be 201db74 <msdos_find_node_by_cluster_num_in_fat_file+0xe4><== NOT EXECUTED
201daa0: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
201daa4: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
201daa8: d8 04 e0 9c ld [ %l3 + 0x9c ], %o4 <== NOT EXECUTED
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
201daac: 23 00 00 3f sethi %hi(0xfc00), %l1 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
201dab0: a8 10 20 00 clr %l4 <== NOT EXECUTED
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
201dab4: a2 14 63 ff or %l1, 0x3ff, %l1 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
201dab8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201dabc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201dac0: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201dac4: 7f ff d9 c0 call 20141c4 <fat_file_read> <== NOT EXECUTED
201dac8: 96 10 00 12 mov %l2, %o3 <== NOT EXECUTED
201dacc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201dad0: 02 80 00 44 be 201dbe0 <msdos_find_node_by_cluster_num_in_fat_file+0x150><== NOT EXECUTED
201dad4: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
201dad8: 04 80 00 46 ble 201dbf0 <msdos_find_node_by_cluster_num_in_fat_file+0x160><== NOT EXECUTED
201dadc: 80 a2 00 12 cmp %o0, %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
201dae0: 12 80 00 4a bne 201dc08 <msdos_find_node_by_cluster_num_in_fat_file+0x178><== NOT EXECUTED
201dae4: a0 10 20 00 clr %l0 <== NOT EXECUTED
201dae8: d8 04 e0 9c ld [ %l3 + 0x9c ], %o4 <== NOT EXECUTED
201daec: ba 10 00 0c mov %o4, %i5 <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
201daf0: c2 0f 40 00 ldub [ %i5 ], %g1 <== NOT EXECUTED
201daf4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201daf8: 02 80 00 1b be 201db64 <msdos_find_node_by_cluster_num_in_fat_file+0xd4><== NOT EXECUTED
201dafc: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
/* if this entry is empty - skip it */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
201db00: 22 80 00 14 be,a 201db50 <msdos_find_node_by_cluster_num_in_fat_file+0xc0><== NOT EXECUTED
201db04: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
201db08: c2 17 60 1a lduh [ %i5 + 0x1a ], %g1 <== NOT EXECUTED
201db0c: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
201db10: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201db14: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201db18: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED
201db1c: 9f 30 a0 18 srl %g2, 0x18, %o7 <== NOT EXECUTED
201db20: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
201db24: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201db28: 86 08 c0 11 and %g3, %l1, %g3 <== NOT EXECUTED
201db2c: 84 08 80 11 and %g2, %l1, %g2 <== NOT EXECUTED
201db30: 86 11 00 03 or %g4, %g3, %g3 <== NOT EXECUTED
201db34: 82 13 c0 02 or %o7, %g2, %g1 <== NOT EXECUTED
201db38: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201db3c: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
201db40: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
201db44: 22 80 00 16 be,a 201db9c <msdos_find_node_by_cluster_num_in_fat_file+0x10c><== NOT EXECUTED
201db48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
201db4c: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED
201db50: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED
201db54: 0a bf ff e7 bcs 201daf0 <msdos_find_node_by_cluster_num_in_fat_file+0x60><== NOT EXECUTED
201db58: ba 07 60 20 add %i5, 0x20, %i5 <== NOT EXECUTED
201db5c: 10 bf ff d7 b 201dab8 <msdos_find_node_by_cluster_num_in_fat_file+0x28><== NOT EXECUTED
201db60: a8 05 00 12 add %l4, %l2, %l4 <== NOT EXECUTED
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
201db64: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
201db68: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
201db6c: 81 c7 e0 08 ret <== NOT EXECUTED
201db70: 81 e8 00 00 restore <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201db74: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED
201db78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201db7c: 32 bf ff cb bne,a 201daa8 <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
201db80: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201db84: c2 0c e0 0a ldub [ %l3 + 0xa ], %g1 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
201db88: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201db8c: 22 bf ff c7 be,a 201daa8 <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
201db90: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
201db94: 10 bf ff c5 b 201daa8 <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
201db98: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
201db9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201dba0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
201dba4: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED
201dba8: 7f ff da c9 call 20146cc <fat_file_ioctl> <== NOT EXECUTED
201dbac: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
201dbb0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dbb4: 12 bf ff ee bne 201db6c <msdos_find_node_by_cluster_num_in_fat_file+0xdc><== NOT EXECUTED
201dbb8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
201dbbc: e0 26 e0 04 st %l0, [ %i3 + 4 ] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201dbc0: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201dbc4: c2 26 e0 0c st %g1, [ %i3 + 0xc ] <== NOT EXECUTED
memcpy(dir_entry, entry,
201dbc8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201dbcc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201dbd0: 40 00 0e 29 call 2021474 <memcpy> <== NOT EXECUTED
201dbd4: 94 10 20 20 mov 0x20, %o2 <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
201dbd8: 81 c7 e0 08 ret <== NOT EXECUTED
201dbdc: 81 e8 00 00 restore <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
201dbe0: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
201dbe4: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
201dbe8: 81 c7 e0 08 ret <== NOT EXECUTED
201dbec: 81 e8 00 00 restore <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
201dbf0: 40 00 0b 52 call 2020938 <__errno> <== NOT EXECUTED
201dbf4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201dbf8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201dbfc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201dc00: 81 c7 e0 08 ret <== NOT EXECUTED
201dc04: 81 e8 00 00 restore <== NOT EXECUTED
assert(ret == bts2rd);
201dc08: 11 00 80 c5 sethi %hi(0x2031400), %o0 <== NOT EXECUTED
201dc0c: 15 00 80 c5 sethi %hi(0x2031400), %o2 <== NOT EXECUTED
201dc10: 17 00 80 c5 sethi %hi(0x2031400), %o3 <== NOT EXECUTED
201dc14: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
201dc18: 92 10 26 9e mov 0x69e, %o1 <== NOT EXECUTED
201dc1c: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED
201dc20: 7f ff e7 a4 call 2017ab0 <__assert_func> <== NOT EXECUTED
201dc24: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED
0200f6c0 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200f6c0: 9d e3 bc e0 save %sp, -800, %sp
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
200f6c4: 92 10 20 02 mov 2, %o1
200f6c8: 90 10 00 19 mov %i1, %o0
200f6cc: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200f6d0: 7f ff ff 87 call 200f4ec <msdos_format_printf>
200f6d4: 94 12 a3 48 or %o2, 0x348, %o2 ! 2030f48 <_CPU_Trap_slot_template+0x60>
fd = open(devname, O_RDWR);
200f6d8: 90 10 00 18 mov %i0, %o0
200f6dc: 7f ff e0 25 call 2007770 <open>
200f6e0: 92 10 20 02 mov 2, %o1
if (fd == -1) {
200f6e4: 80 a2 3f ff cmp %o0, -1
200f6e8: 02 80 01 ac be 200fd98 <msdos_format+0x6d8> <== NEVER TAKEN
200f6ec: ba 10 00 08 mov %o0, %i5
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f6f0: 96 10 00 18 mov %i0, %o3
200f6f4: 92 10 20 02 mov 2, %o1
200f6f8: 90 10 00 19 mov %i1, %o0
200f6fc: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200f700: 7f ff ff 7b call 200f4ec <msdos_format_printf>
200f704: 94 12 a3 58 or %o2, 0x358, %o2 ! 2030f58 <_CPU_Trap_slot_template+0x70>
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
200f708: 92 07 bf a8 add %fp, -88, %o1
200f70c: 40 00 21 75 call 2017ce0 <fstat>
200f710: 90 10 00 1d mov %i5, %o0
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200f714: 92 10 20 01 mov 1, %o1
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
200f718: b8 10 00 08 mov %o0, %i4
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200f71c: 96 10 00 18 mov %i0, %o3
200f720: 90 10 00 19 mov %i1, %o0
200f724: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200f728: 7f ff ff 71 call 200f4ec <msdos_format_printf>
200f72c: 94 12 a3 68 or %o2, 0x368, %o2 ! 2030f68 <_CPU_Trap_slot_template+0x80>
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
200f730: 80 a7 20 00 cmp %i4, 0
200f734: 12 80 03 b7 bne 2010610 <msdos_format+0xf50> <== NEVER TAKEN
200f738: c4 07 bf b4 ld [ %fp + -76 ], %g2
200f73c: 03 00 00 3c sethi %hi(0xf000), %g1
200f740: 84 08 80 01 and %g2, %g1, %g2
200f744: 03 00 00 18 sethi %hi(0x6000), %g1
200f748: 80 a0 80 01 cmp %g2, %g1
200f74c: 02 80 00 16 be 200f7a4 <msdos_format+0xe4> <== ALWAYS TAKEN
200f750: 01 00 00 00 nop
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
200f754: 40 00 44 79 call 2020938 <__errno> <== NOT EXECUTED
200f758: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200f75c: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED
200f760: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200f764: b8 10 20 00 clr %i4 <== NOT EXECUTED
}
/*
* create master boot record
*/
if (ret_val == 0) {
200f768: 80 a6 20 00 cmp %i0, 0
200f76c: 02 80 00 66 be 200f904 <msdos_format+0x244> <== ALWAYS TAKEN
200f770: 90 10 00 19 mov %i1, %o0
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
200f774: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
200f778: 02 80 00 05 be 200f78c <msdos_format+0xcc> <== NEVER TAKEN
200f77c: 80 a7 20 00 cmp %i4, 0
close(fd);
200f780: 7f ff d9 d2 call 2005ec8 <close>
200f784: 90 10 00 1d mov %i5, %o0
}
if (dd != NULL) {
200f788: 80 a7 20 00 cmp %i4, 0
200f78c: 02 80 00 04 be 200f79c <msdos_format+0xdc> <== NEVER TAKEN
200f790: 01 00 00 00 nop
rtems_disk_release(dd);
200f794: 7f ff d6 6b call 2005140 <rtems_disk_release>
200f798: 90 10 00 1c mov %i4, %o0
}
return ret_val;
}
200f79c: 81 c7 e0 08 ret
200f7a0: 81 e8 00 00 restore
ret_val = -1;
}
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
200f7a4: 7f ff d5 ff call 2004fa0 <rtems_disk_obtain>
200f7a8: d0 1f bf c0 ldd [ %fp + -64 ], %o0
if (dd == NULL) {
200f7ac: b8 92 20 00 orcc %o0, 0, %i4
200f7b0: 02 bf ff e9 be 200f754 <msdos_format+0x94> <== NEVER TAKEN
200f7b4: 01 00 00 00 nop
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
200f7b8: e0 07 20 20 ld [ %i4 + 0x20 ], %l0
fmt_params->totl_sector_cnt = dd->size;
200f7bc: f0 07 20 1c ld [ %i4 + 0x1c ], %i0
total_size = dd->block_size * dd->size;
200f7c0: 92 10 00 10 mov %l0, %o1
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
200f7c4: c0 27 bf 60 clr [ %fp + -160 ]
200f7c8: c0 27 bf 64 clr [ %fp + -156 ]
200f7cc: c0 27 bf 68 clr [ %fp + -152 ]
200f7d0: c0 27 bf 6c clr [ %fp + -148 ]
200f7d4: c0 27 bf 70 clr [ %fp + -144 ]
200f7d8: c0 27 bf 74 clr [ %fp + -140 ]
200f7dc: c0 27 bf 78 clr [ %fp + -136 ]
200f7e0: c0 27 bf 7c clr [ %fp + -132 ]
200f7e4: c0 27 bf 80 clr [ %fp + -128 ]
200f7e8: c0 27 bf 84 clr [ %fp + -124 ]
200f7ec: c0 27 bf 88 clr [ %fp + -120 ]
200f7f0: c0 27 bf 8c clr [ %fp + -116 ]
200f7f4: c0 27 bf 90 clr [ %fp + -112 ]
200f7f8: c0 27 bf 94 clr [ %fp + -108 ]
200f7fc: c0 27 bf 98 clr [ %fp + -104 ]
200f800: c0 27 bf 9c clr [ %fp + -100 ]
200f804: c0 27 bf a0 clr [ %fp + -96 ]
200f808: c0 27 bf a4 clr [ %fp + -92 ]
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
200f80c: e0 27 bf 58 st %l0, [ %fp + -168 ]
fmt_params->totl_sector_cnt = dd->size;
200f810: f0 27 bf 5c st %i0, [ %fp + -164 ]
total_size = dd->block_size * dd->size;
200f814: 40 00 77 aa call 202d6bc <.umul>
200f818: 90 10 00 18 mov %i0, %o0
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f81c: 9a 10 20 00 clr %o5
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
200f820: b6 10 00 08 mov %o0, %i3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f824: d0 23 a0 5c st %o0, [ %sp + 0x5c ]
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
200f828: b4 10 20 00 clr %i2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f82c: 92 10 20 02 mov 2, %o1
200f830: f4 3f bd 50 std %i2, [ %fp + -688 ]
200f834: 90 10 00 19 mov %i1, %o0
200f838: 96 10 00 10 mov %l0, %o3
200f83c: 15 00 80 c4 sethi %hi(0x2031000), %o2
200f840: 98 10 00 18 mov %i0, %o4
200f844: 7f ff ff 2a call 200f4ec <msdos_format_printf>
200f848: 94 12 a0 00 mov %o2, %o2
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200f84c: 80 a6 60 00 cmp %i1, 0
200f850: 02 80 02 d9 be 20103b4 <msdos_format+0xcf4> <== NEVER TAKEN
200f854: 82 10 20 02 mov 2, %g1
(rqdata->fat_num == 0)) {
200f858: d6 06 60 0c ld [ %i1 + 0xc ], %o3
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200f85c: 80 a2 e0 00 cmp %o3, 0
200f860: 02 80 01 5d be 200fdd4 <msdos_format+0x714> <== ALWAYS TAKEN
200f864: 90 10 00 19 mov %i1, %o0
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
200f868: 82 10 20 00 clr %g1 <== NOT EXECUTED
200f86c: 80 a2 e0 06 cmp %o3, 6 <== NOT EXECUTED
200f870: 18 80 01 5d bgu 200fde4 <msdos_format+0x724> <== NOT EXECUTED
200f874: a0 10 20 16 mov 0x16, %l0 <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
200f878: d6 2f bf 88 stb %o3, [ %fp + -120 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f87c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200f880: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200f884: 96 0a e0 ff and %o3, 0xff, %o3 <== NOT EXECUTED
200f888: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200f88c: 7f ff ff 18 call 200f4ec <msdos_format_printf>
200f890: 94 12 a3 78 or %o2, 0x378, %o2 ! 2030f78 <_CPU_Trap_slot_template+0x90>
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
200f894: 82 10 20 01 mov 1, %g1
200f898: c2 27 bf 64 st %g1, [ %fp + -156 ]
if ((rqdata != NULL) &&
200f89c: c2 0e 60 14 ldub [ %i1 + 0x14 ], %g1
200f8a0: 80 a0 60 01 cmp %g1, 1
200f8a4: 02 80 01 b2 be 200ff6c <msdos_format+0x8ac> <== NEVER TAKEN
200f8a8: 80 a0 60 02 cmp %g1, 2
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
200f8ac: 02 80 01 b0 be 200ff6c <msdos_format+0x8ac> <== NEVER TAKEN
200f8b0: 80 a0 60 03 cmp %g1, 3
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
200f8b4: 02 80 03 30 be 2010574 <msdos_format+0xeb4> <== NEVER TAKEN
200f8b8: 80 a0 60 00 cmp %g1, 0
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
200f8bc: 12 80 02 7b bne 20102a8 <msdos_format+0xbe8> <== NEVER TAKEN
200f8c0: f0 07 bf 5c ld [ %fp + -164 ], %i0
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
200f8c4: 03 00 00 1f sethi %hi(0x7c00), %g1
200f8c8: 82 10 63 a7 or %g1, 0x3a7, %g1 ! 7fa7 <PROM_START+0x7fa7>
200f8cc: 80 a6 00 01 cmp %i0, %g1
200f8d0: 18 80 02 ea bgu 2010478 <msdos_format+0xdb8> <== NEVER TAKEN
200f8d4: 03 00 07 ff sethi %hi(0x1ffc00), %g1
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
200f8d8: 82 10 20 01 mov 1, %g1
200f8dc: c2 2f bf 8a stb %g1, [ %fp + -118 ]
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
200f8e0: 82 10 20 02 mov 2, %g1
200f8e4: c2 27 bf 64 st %g1, [ %fp + -156 ]
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
200f8e8: 80 a6 60 00 cmp %i1, 0
200f8ec: 12 80 01 a2 bne 200ff74 <msdos_format+0x8b4> <== ALWAYS TAKEN
200f8f0: a0 10 20 00 clr %l0
200f8f4: c4 07 bf 64 ld [ %fp + -156 ], %g2 <== NOT EXECUTED
200f8f8: a0 10 00 19 mov %i1, %l0 <== NOT EXECUTED
200f8fc: 10 80 01 a4 b 200ff8c <msdos_format+0x8cc> <== NOT EXECUTED
200f900: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f904: 92 10 20 02 mov 2, %o1
200f908: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200f90c: 7f ff fe f8 call 200f4ec <msdos_format_printf>
200f910: 94 12 a3 b0 or %o2, 0x3b0, %o2 ! 2030fb0 <_CPU_Trap_slot_template+0xc8>
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200f914: 90 10 00 1d mov %i5, %o0
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
200f918: f4 07 bf 58 ld [ %fp + -168 ], %i2
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200f91c: 92 10 20 00 clr %o1
200f920: 94 10 20 00 clr %o2
200f924: 7f ff dc 85 call 2006b38 <lseek>
200f928: 96 10 20 00 clr %o3
200f92c: 80 a2 20 00 cmp %o0, 0
200f930: 06 80 01 18 bl 200fd90 <msdos_format+0x6d0> <== NEVER TAKEN
200f934: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
200f938: 92 07 bd 58 add %fp, -680, %o1
200f93c: 7f ff e0 bf call 2007c38 <read>
200f940: 94 10 00 1a mov %i2, %o2
200f944: 80 a2 20 00 cmp %o0, 0
200f948: 06 80 01 12 bl 200fd90 <msdos_format+0x6d0> <== NEVER TAKEN
200f94c: 90 10 00 19 mov %i1, %o0
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f950: 92 10 20 02 mov 2, %o1
200f954: 15 00 80 c4 sethi %hi(0x2031000), %o2
200f958: 7f ff fe e5 call 200f4ec <msdos_format_printf>
200f95c: 94 12 a0 38 or %o2, 0x38, %o2 ! 2031038 <_CPU_Trap_slot_template+0x150>
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
200f960: e4 07 bf 5c ld [ %fp + -164 ], %l2
200f964: 21 00 00 3f sethi %hi(0xfc00), %l0
200f968: a0 14 23 ff or %l0, 0x3ff, %l0 ! ffff <PROM_START+0xffff>
200f96c: 80 a4 80 10 cmp %l2, %l0
200f970: 08 80 02 13 bleu 20101bc <msdos_format+0xafc> <== ALWAYS TAKEN
200f974: a8 10 00 12 mov %l2, %l4
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
200f978: a0 0c 80 10 and %l2, %l0, %l0 <== NOT EXECUTED
200f97c: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED
200f980: a3 34 a0 10 srl %l2, 0x10, %l1 <== NOT EXECUTED
200f984: a1 34 20 08 srl %l0, 8, %l0 <== NOT EXECUTED
200f988: a5 34 a0 18 srl %l2, 0x18, %l2 <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
200f98c: a6 10 20 00 clr %l3 <== NOT EXECUTED
200f990: a8 10 20 00 clr %l4 <== NOT EXECUTED
* finally we are there: let's fill in the values into the MBR
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
200f994: 92 10 20 00 clr %o1
200f998: 94 10 21 be mov 0x1be, %o2
200f99c: 40 00 46 f2 call 2021564 <memset>
200f9a0: 90 07 bd 58 add %fp, -680, %o0
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
200f9a4: 90 07 bd 5b add %fp, -677, %o0
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
200f9a8: c0 37 bf 56 clrh [ %fp + -170 ]
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
200f9ac: 92 07 bf 8b add %fp, -117, %o1
200f9b0: 40 00 46 b1 call 2021474 <memcpy>
200f9b4: 94 10 20 08 mov 8, %o2
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
200f9b8: c2 07 bf 70 ld [ %fp + -144 ], %g1
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
200f9bc: 99 36 a0 08 srl %i2, 8, %o4
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
200f9c0: 9f 30 60 08 srl %g1, 8, %o7
200f9c4: c2 2f bd 69 stb %g1, [ %fp + -663 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
200f9c8: c2 0f bf 89 ldub [ %fp + -119 ], %g1
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
200f9cc: c4 07 bf 60 ld [ %fp + -160 ], %g2
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
200f9d0: d8 2f bd 64 stb %o4, [ %fp + -668 ]
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
200f9d4: d8 07 bf 64 ld [ %fp + -156 ], %o4
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
200f9d8: f6 0f bf 8a ldub [ %fp + -118 ], %i3
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
200f9dc: c2 2f bd 6d stb %g1, [ %fp + -659 ]
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
200f9e0: 82 10 3f ff mov -1, %g1
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
200f9e4: 9b 30 a0 08 srl %g2, 8, %o5
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
200f9e8: 88 10 20 02 mov 2, %g4
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
200f9ec: 86 10 20 01 mov 1, %g3
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
200f9f0: c2 2f bd 70 stb %g1, [ %fp + -656 ]
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
200f9f4: f4 2f bd 63 stb %i2, [ %fp + -669 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
200f9f8: 82 10 20 06 mov 6, %g1
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
200f9fc: d8 2f bd 65 stb %o4, [ %fp + -667 ]
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
200fa00: c4 2f bd 66 stb %g2, [ %fp + -666 ]
200fa04: da 2f bd 67 stb %o5, [ %fp + -665 ]
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
200fa08: c8 2f bd 68 stb %g4, [ %fp + -664 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
200fa0c: de 2f bd 6a stb %o7, [ %fp + -662 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
200fa10: e8 2f bd 6b stb %l4, [ %fp + -661 ]
200fa14: e6 2f bd 6c stb %l3, [ %fp + -660 ]
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
200fa18: c2 2f bd 72 stb %g1, [ %fp + -654 ]
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
200fa1c: c6 2f bd 74 stb %g3, [ %fp + -652 ]
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
200fa20: f0 2f bd 78 stb %i0, [ %fp + -648 ]
200fa24: e0 2f bd 79 stb %l0, [ %fp + -647 ]
200fa28: e2 2f bd 7a stb %l1, [ %fp + -646 ]
if (fmt_params->fattype != FAT_FAT32) {
200fa2c: 80 a6 e0 04 cmp %i3, 4
200fa30: 02 80 02 a6 be 20104c8 <msdos_format+0xe08> <== NEVER TAKEN
200fa34: e4 2f bd 7b stb %l2, [ %fp + -645 ]
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200fa38: c2 07 bf a4 ld [ %fp + -92 ], %g1
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200fa3c: c4 07 bf 68 ld [ %fp + -152 ], %g2
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200fa40: 89 30 60 10 srl %g1, 0x10, %g4
200fa44: 87 30 60 18 srl %g1, 0x18, %g3
200fa48: b1 30 60 08 srl %g1, 8, %i0
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200fa4c: 9f 30 a0 08 srl %g2, 8, %o7
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200fa50: c2 2f bd 7f stb %g1, [ %fp + -641 ]
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
200fa54: 82 10 20 29 mov 0x29, %g1
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200fa58: c4 2f bd 6e stb %g2, [ %fp + -658 ]
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
200fa5c: c2 2f bd 7e stb %g1, [ %fp + -642 ]
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
200fa60: de 2f bd 6f stb %o7, [ %fp + -657 ]
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
200fa64: f0 2f bd 80 stb %i0, [ %fp + -640 ]
200fa68: c8 2f bd 81 stb %g4, [ %fp + -639 ]
200fa6c: c6 2f bd 82 stb %g3, [ %fp + -638 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
200fa70: 90 07 bd 83 add %fp, -637, %o0
200fa74: 92 07 bf 94 add %fp, -108, %o1
200fa78: 40 00 46 7f call 2021474 <memcpy>
200fa7c: 94 10 20 0b mov 0xb, %o2
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
200fa80: 03 00 80 c3 sethi %hi(0x2030c00), %g1
200fa84: 80 a6 e0 01 cmp %i3, 1
200fa88: 02 80 02 bf be 2010584 <msdos_format+0xec4> <== ALWAYS TAKEN
200fa8c: 82 10 63 38 or %g1, 0x338, %g1
200fa90: c4 10 40 00 lduh [ %g1 ], %g2
200fa94: c4 37 bd 8e sth %g2, [ %fp + -626 ]
200fa98: c4 10 60 02 lduh [ %g1 + 2 ], %g2
200fa9c: c4 37 bd 90 sth %g2, [ %fp + -624 ]
200faa0: c4 10 60 04 lduh [ %g1 + 4 ], %g2
200faa4: c4 37 bd 92 sth %g2, [ %fp + -622 ]
200faa8: c2 10 60 06 lduh [ %g1 + 6 ], %g1
200faac: c2 37 bd 94 sth %g1, [ %fp + -620 ]
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
200fab0: 82 10 20 55 mov 0x55, %g1
200fab4: c2 2f bf 56 stb %g1, [ %fp + -170 ]
200fab8: 82 10 3f aa mov -86, %g1
200fabc: c2 2f bf 57 stb %g1, [ %fp + -169 ]
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
200fac0: 82 10 3f eb mov -21, %g1
200fac4: c2 2f bd 58 stb %g1, [ %fp + -680 ]
FAT_SET_VAL8(mbr,1,0x3c);
200fac8: 82 10 20 3c mov 0x3c, %g1
200facc: c2 2f bd 59 stb %g1, [ %fp + -679 ]
FAT_SET_VAL8(mbr,2,0x90);
200fad0: 82 10 3f 90 mov -112, %g1
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200fad4: 92 10 20 02 mov 2, %o1
200fad8: 90 10 00 19 mov %i1, %o0
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
FAT_SET_VAL8(mbr,2,0x90);
200fadc: c2 2f bd 5a stb %g1, [ %fp + -678 ]
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200fae0: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200fae4: 7f ff fe 82 call 200f4ec <msdos_format_printf>
200fae8: 94 12 a3 c8 or %o2, 0x3c8, %o2 ! 2030fc8 <_CPU_Trap_slot_template+0xe0>
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200faec: 90 10 00 1d mov %i5, %o0
200faf0: 92 10 20 00 clr %o1
200faf4: 94 10 20 00 clr %o2
200faf8: 7f ff dc 10 call 2006b38 <lseek>
200fafc: 96 10 20 00 clr %o3
200fb00: 80 a2 20 00 cmp %o0, 0
200fb04: 06 80 00 a3 bl 200fd90 <msdos_format+0x6d0> <== NEVER TAKEN
200fb08: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
200fb0c: 92 07 bd 58 add %fp, -680, %o1
200fb10: 7f ff eb dd call 200aa84 <write>
200fb14: 94 10 00 1a mov %i2, %o2
200fb18: 80 a2 20 00 cmp %o0, 0
200fb1c: 06 bf ff 16 bl 200f774 <msdos_format+0xb4> <== NEVER TAKEN
200fb20: b0 10 3f ff mov -1, %i0
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
200fb24: f6 07 bf 80 ld [ %fp + -128 ], %i3
ret_val = msdos_format_write_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
200fb28: 80 a6 e0 00 cmp %i3, 0
200fb2c: 12 80 00 80 bne 200fd2c <msdos_format+0x66c> <== NEVER TAKEN
200fb30: 90 10 00 19 mov %i1, %o0
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
200fb34: f6 07 bf 84 ld [ %fp + -124 ], %i3
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
200fb38: 80 a6 e0 00 cmp %i3, 0
200fb3c: 12 80 01 e2 bne 20102c4 <msdos_format+0xc04> <== NEVER TAKEN
200fb40: 92 10 20 00 clr %o1
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
(rqdata,
200fb44: d2 07 bf 68 ld [ %fp + -152 ], %o1
200fb48: f6 0f bf 88 ldub [ %fp + -120 ], %i3
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
200fb4c: f0 07 bf 60 ld [ %fp + -160 ], %i0
(rqdata,
200fb50: 40 00 76 db call 202d6bc <.umul>
200fb54: 90 10 00 1b mov %i3, %o0
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
200fb58: 94 10 00 18 mov %i0, %o2
(rqdata,
200fb5c: 96 10 00 08 mov %o0, %o3
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
200fb60: 92 10 00 1d mov %i5, %o1
200fb64: 90 10 00 19 mov %i1, %o0
200fb68: 98 10 00 1a mov %i2, %o4
200fb6c: 7f ff fe 75 call 200f540 <msdos_format_fill_sectors>
200fb70: 9a 10 20 00 clr %o5
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
200fb74: b0 92 20 00 orcc %o0, 0, %i0
200fb78: 12 bf fe ff bne 200f774 <msdos_format+0xb4> <== NEVER TAKEN
200fb7c: e0 07 bf 78 ld [ %fp + -136 ], %l0
ret_val = msdos_format_fill_sectors
200fb80: d6 07 bf 7c ld [ %fp + -132 ], %o3
200fb84: 90 10 00 19 mov %i1, %o0
200fb88: 92 10 00 1d mov %i5, %o1
200fb8c: 94 10 00 10 mov %l0, %o2
200fb90: 98 10 00 1a mov %i2, %o4
200fb94: 7f ff fe 6b call 200f540 <msdos_format_fill_sectors>
200fb98: 9a 10 20 00 clr %o5
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
200fb9c: b0 92 20 00 orcc %o0, 0, %i0
200fba0: 12 bf fe f5 bne 200f774 <msdos_format+0xb4> <== NEVER TAKEN
200fba4: c2 0f bf a0 ldub [ %fp + -96 ], %g1
200fba8: 80 a0 60 00 cmp %g1, 0
200fbac: 02 bf fe f3 be 200f778 <msdos_format+0xb8> <== NEVER TAKEN
200fbb0: 80 a7 7f ff cmp %i5, -1
memset(tmp_sec,0,sizeof(tmp_sec));
200fbb4: 92 10 20 00 clr %o1
200fbb8: 94 10 22 00 mov 0x200, %o2
200fbbc: 40 00 46 6a call 2021564 <memset>
200fbc0: 90 07 bd 58 add %fp, -680, %o0
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
200fbc4: c2 0f bf 9e ldub [ %fp + -98 ], %g1
200fbc8: c6 07 bf 98 ld [ %fp + -104 ], %g3
200fbcc: c4 17 bf 9c lduh [ %fp + -100 ], %g2
200fbd0: c8 07 bf 94 ld [ %fp + -108 ], %g4
200fbd4: c2 2f bd 62 stb %g1, [ %fp + -670 ]
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
200fbd8: 82 10 20 08 mov 8, %g1
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200fbdc: 96 10 00 1a mov %i2, %o3
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
200fbe0: c8 27 bd 58 st %g4, [ %fp + -680 ]
200fbe4: c6 27 bd 5c st %g3, [ %fp + -676 ]
200fbe8: c4 37 bd 60 sth %g2, [ %fp + -672 ]
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
200fbec: c2 2f bd 63 stb %g1, [ %fp + -669 ]
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200fbf0: 94 10 20 00 clr %o2
200fbf4: 90 10 20 00 clr %o0
200fbf8: 40 00 78 43 call 202dd04 <__muldi3>
200fbfc: 92 10 00 10 mov %l0, %o1
200fc00: 84 10 00 08 mov %o0, %g2
200fc04: 86 10 00 09 mov %o1, %g3
200fc08: 90 10 00 1d mov %i5, %o0
200fc0c: 92 10 00 02 mov %g2, %o1
200fc10: 94 10 00 03 mov %g3, %o2
200fc14: 7f ff db c9 call 2006b38 <lseek>
200fc18: 96 10 20 00 clr %o3
200fc1c: 80 a2 20 00 cmp %o0, 0
200fc20: 06 80 00 5c bl 200fd90 <msdos_format+0x6d0> <== NEVER TAKEN
200fc24: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
200fc28: 92 07 bd 58 add %fp, -680, %o1
200fc2c: 7f ff eb 96 call 200aa84 <write>
200fc30: 94 10 00 1a mov %i2, %o2
200fc34: 80 a2 20 00 cmp %o0, 0
200fc38: 06 80 00 56 bl 200fd90 <msdos_format+0x6d0> <== NEVER TAKEN
200fc3c: 90 07 bd 58 add %fp, -680, %o0
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
200fc40: 92 10 20 00 clr %o1
200fc44: 40 00 46 48 call 2021564 <memset>
200fc48: 94 10 22 00 mov 0x200, %o2
switch(fmt_params.fattype) {
200fc4c: f4 0f bf 8a ldub [ %fp + -118 ], %i2
200fc50: 80 a6 a0 02 cmp %i2, 2
200fc54: 02 80 01 fa be 201043c <msdos_format+0xd7c> <== NEVER TAKEN
200fc58: 80 a6 a0 04 cmp %i2, 4
200fc5c: 02 80 01 e8 be 20103fc <msdos_format+0xd3c> <== NEVER TAKEN
200fc60: 80 a6 a0 01 cmp %i2, 1
200fc64: 02 80 01 dd be 20103d8 <msdos_format+0xd18> <== ALWAYS TAKEN
200fc68: c4 0f bf 89 ldub [ %fp + -119 ], %g2
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
200fc6c: 40 00 43 33 call 2020938 <__errno> <== NOT EXECUTED
200fc70: 01 00 00 00 nop <== NOT EXECUTED
200fc74: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
200fc78: 80 a6 a0 04 cmp %i2, 4 <== NOT EXECUTED
200fc7c: 12 80 00 45 bne 200fd90 <msdos_format+0x6d0> <== NOT EXECUTED
200fc80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200fc84: 82 10 20 00 clr %g1 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
200fc88: 86 10 3f ff mov -1, %g3 <== NOT EXECUTED
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
200fc8c: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
200fc90: 88 10 3f f8 mov -8, %g4 <== NOT EXECUTED
200fc94: c4 2f bd 61 stb %g2, [ %fp + -671 ] <== NOT EXECUTED
200fc98: c4 2f bd 62 stb %g2, [ %fp + -670 ] <== NOT EXECUTED
200fc9c: c8 2f bd 60 stb %g4, [ %fp + -672 ] <== NOT EXECUTED
200fca0: 84 10 20 0f mov 0xf, %g2 <== NOT EXECUTED
200fca4: c4 2f bd 63 stb %g2, [ %fp + -669 ] <== NOT EXECUTED
}
for (i = 0;
200fca8: 80 88 60 ff btst 0xff, %g1
200fcac: 02 80 02 5d be 2010620 <msdos_format+0xf60> <== NEVER TAKEN
200fcb0: f4 07 bf 60 ld [ %fp + -160 ], %i2
200fcb4: e2 07 bf 68 ld [ %fp + -152 ], %l1
200fcb8: e0 07 bf 58 ld [ %fp + -168 ], %l0
200fcbc: b2 10 20 00 clr %i1
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200fcc0: 96 10 00 10 mov %l0, %o3
200fcc4: 94 10 20 00 clr %o2
200fcc8: 92 10 00 1a mov %i2, %o1
200fccc: 40 00 78 0e call 202dd04 <__muldi3>
200fcd0: 90 10 20 00 clr %o0
200fcd4: 84 10 00 08 mov %o0, %g2
200fcd8: 86 10 00 09 mov %o1, %g3
200fcdc: 90 10 00 1d mov %i5, %o0
200fce0: 92 10 00 02 mov %g2, %o1
200fce4: 94 10 00 03 mov %g3, %o2
200fce8: 7f ff db 94 call 2006b38 <lseek>
200fcec: 96 10 20 00 clr %o3
200fcf0: 80 a2 20 00 cmp %o0, 0
200fcf4: 06 80 00 27 bl 200fd90 <msdos_format+0x6d0> <== NEVER TAKEN
200fcf8: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
200fcfc: 92 07 bd 58 add %fp, -680, %o1
200fd00: 7f ff eb 61 call 200aa84 <write>
200fd04: 94 10 00 10 mov %l0, %o2
200fd08: 80 a2 20 00 cmp %o0, 0
200fd0c: 26 bf fe 9a bl,a 200f774 <msdos_format+0xb4> <== NEVER TAKEN
200fd10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
200fd14: b2 06 60 01 inc %i1
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
200fd18: 80 a6 40 1b cmp %i1, %i3
200fd1c: 06 bf ff e9 bl 200fcc0 <msdos_format+0x600>
200fd20: b4 06 80 11 add %i2, %l1, %i2
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
200fd24: 10 bf fe 95 b 200f778 <msdos_format+0xb8>
200fd28: 80 a7 7f ff cmp %i5, -1
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200fd2c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200fd30: 15 00 80 c3 sethi %hi(0x2030c00), %o2 <== NOT EXECUTED
200fd34: 7f ff fd ee call 200f4ec <msdos_format_printf> <== NOT EXECUTED
200fd38: 94 12 a3 e0 or %o2, 0x3e0, %o2 ! 2030fe0 <_CPU_Trap_slot_template+0xf8><== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200fd3c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
200fd40: 94 10 20 00 clr %o2 <== NOT EXECUTED
200fd44: 90 10 20 00 clr %o0 <== NOT EXECUTED
200fd48: 40 00 77 ef call 202dd04 <__muldi3> <== NOT EXECUTED
200fd4c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200fd50: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
200fd54: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
200fd58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200fd5c: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
200fd60: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
200fd64: 7f ff db 75 call 2006b38 <lseek> <== NOT EXECUTED
200fd68: 96 10 20 00 clr %o3 <== NOT EXECUTED
200fd6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200fd70: 06 80 00 08 bl 200fd90 <msdos_format+0x6d0> <== NOT EXECUTED
200fd74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
200fd78: 92 07 bd 58 add %fp, -680, %o1 <== NOT EXECUTED
200fd7c: 7f ff eb 42 call 200aa84 <write> <== NOT EXECUTED
200fd80: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
200fd84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200fd88: 36 bf ff 6c bge,a 200fb38 <msdos_format+0x478> <== NOT EXECUTED
200fd8c: f6 07 bf 84 ld [ %fp + -124 ], %i3 <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
200fd90: 10 bf fe 79 b 200f774 <msdos_format+0xb4> <== NOT EXECUTED
200fd94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200fd98: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
200fd9c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200fda0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200fda4: 15 00 80 c3 sethi %hi(0x2030c00), %o2 <== NOT EXECUTED
200fda8: 7f ff fd d1 call 200f4ec <msdos_format_printf> <== NOT EXECUTED
200fdac: 94 12 a3 58 or %o2, 0x358, %o2 ! 2030f58 <_CPU_Trap_slot_template+0x70><== NOT EXECUTED
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200fdb0: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
200fdb4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200fdb8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200fdbc: 15 00 80 c3 sethi %hi(0x2030c00), %o2 <== NOT EXECUTED
200fdc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200fdc4: 7f ff fd ca call 200f4ec <msdos_format_printf> <== NOT EXECUTED
200fdc8: 94 12 a3 68 or %o2, 0x368, %o2 <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200fdcc: 10 bf fe 67 b 200f768 <msdos_format+0xa8> <== NOT EXECUTED
200fdd0: b8 10 20 00 clr %i4 <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
200fdd4: c2 2f bf 88 stb %g1, [ %fp + -120 ]
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200fdd8: 92 10 20 02 mov 2, %o1
200fddc: 10 bf fe ab b 200f888 <msdos_format+0x1c8>
200fde0: 96 10 20 02 mov 2, %o3
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
200fde4: c2 27 bf 78 st %g1, [ %fp + -136 ] <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
200fde8: c2 07 bf 64 ld [ %fp + -156 ], %g1 <== NOT EXECUTED
200fdec: c2 27 bf 7c st %g1, [ %fp + -132 ] <== NOT EXECUTED
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
200fdf0: 80 a4 20 00 cmp %l0, 0
200fdf4: 02 80 00 15 be 200fe48 <msdos_format+0x788> <== ALWAYS TAKEN
200fdf8: 03 00 80 c0 sethi %hi(0x2030000), %g1
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
200fdfc: 40 00 42 cf call 2020938 <__errno> <== NOT EXECUTED
200fe00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200fe04: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
200fe08: 82 10 20 00 clr %g1 <== NOT EXECUTED
ret_val = msdos_format_determine_fmt_params(dd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
200fe0c: 80 88 60 ff btst 0xff, %g1
200fe10: 02 bf fe 57 be 200f76c <msdos_format+0xac> <== NEVER TAKEN
200fe14: 80 a6 20 00 cmp %i0, 0
(rqdata != NULL) &&
200fe18: c2 0e 60 16 ldub [ %i1 + 0x16 ], %g1
200fe1c: 80 a0 60 00 cmp %g1, 0
200fe20: 12 bf fe b9 bne 200f904 <msdos_format+0x244> <== NEVER TAKEN
200fe24: 90 10 00 19 mov %i1, %o0
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
200fe28: d6 07 bf 5c ld [ %fp + -164 ], %o3
200fe2c: d8 07 bf 58 ld [ %fp + -168 ], %o4
200fe30: 92 10 00 1d mov %i5, %o1
200fe34: 94 10 20 00 clr %o2
200fe38: 7f ff fd c2 call 200f540 <msdos_format_fill_sectors>
200fe3c: 9a 10 3f e5 mov -27, %o5
200fe40: 10 bf fe 4a b 200f768 <msdos_format+0xa8>
200fe44: b0 10 00 08 mov %o0, %i0
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
200fe48: 80 a6 60 00 cmp %i1, 0
200fe4c: 02 80 00 06 be 200fe64 <msdos_format+0x7a4> <== NEVER TAKEN
200fe50: 88 10 61 30 or %g1, 0x130, %g4
(rqdata->OEMName != NULL)) {
200fe54: c8 06 40 00 ld [ %i1 ], %g4
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
200fe58: 80 a1 20 00 cmp %g4, 0
200fe5c: 22 80 00 02 be,a 200fe64 <msdos_format+0x7a4> <== NEVER TAKEN
200fe60: 88 10 61 30 or %g1, 0x130, %g4 <== NOT EXECUTED
200fe64: 03 00 80 ca sethi %hi(0x2032800), %g1
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
200fe68: 84 10 20 08 mov 8, %g2
if ((rqdata != NULL) &&
200fe6c: f4 00 62 1c ld [ %g1 + 0x21c ], %i2
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200fe70: b0 10 20 20 mov 0x20, %i0
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
200fe74: 10 80 00 07 b 200fe90 <msdos_format+0x7d0>
200fe78: 82 07 bf 8b add %fp, -117, %g1
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
200fe7c: 82 00 60 01 inc %g1
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
200fe80: c0 28 40 00 clrb [ %g1 ]
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
200fe84: 84 80 bf ff addcc %g2, -1, %g2
200fe88: 02 80 00 0e be 200fec0 <msdos_format+0x800> <== NEVER TAKEN
200fe8c: 88 01 20 01 inc %g4
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
200fe90: c6 09 00 00 ldub [ %g4 ], %g3
200fe94: b6 08 e0 ff and %g3, 0xff, %i3
200fe98: b6 06 80 1b add %i2, %i3, %i3
200fe9c: f6 4e e0 01 ldsb [ %i3 + 1 ], %i3
200fea0: 80 8e e0 97 btst 0x97, %i3
200fea4: 32 bf ff f6 bne,a 200fe7c <msdos_format+0x7bc>
200fea8: c6 28 40 00 stb %g3, [ %g1 ]
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200feac: f0 28 40 00 stb %i0, [ %g1 ]
200feb0: 82 00 60 01 inc %g1
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
200feb4: 84 80 bf ff addcc %g2, -1, %g2
200feb8: 12 bf ff f6 bne 200fe90 <msdos_format+0x7d0>
200febc: c0 28 40 00 clrb [ %g1 ]
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
200fec0: 03 00 80 c1 sethi %hi(0x2030400), %g1
if ((rqdata != NULL) &&
200fec4: 80 a6 60 00 cmp %i1, 0
200fec8: 02 80 00 08 be 200fee8 <msdos_format+0x828> <== NEVER TAKEN
200fecc: 88 10 62 80 or %g1, 0x280, %g4
(rqdata->VolLabel != NULL)) {
200fed0: c8 06 60 04 ld [ %i1 + 4 ], %g4
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
200fed4: 80 a1 20 00 cmp %g4, 0
200fed8: 22 80 00 04 be,a 200fee8 <msdos_format+0x828> <== NEVER TAKEN
200fedc: 88 10 62 80 or %g1, 0x280, %g4 <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
200fee0: 82 10 20 01 mov 1, %g1
200fee4: c2 2f bf a0 stb %g1, [ %fp + -96 ]
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
200fee8: 84 10 20 0b mov 0xb, %g2
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
200feec: 82 07 bf 94 add %fp, -108, %g1
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200fef0: 10 80 00 07 b 200ff0c <msdos_format+0x84c>
200fef4: b0 10 20 20 mov 0x20, %i0
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
200fef8: 82 00 60 01 inc %g1
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
200fefc: c0 28 40 00 clrb [ %g1 ]
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
200ff00: 84 80 bf ff addcc %g2, -1, %g2
200ff04: 02 80 00 0e be 200ff3c <msdos_format+0x87c> <== NEVER TAKEN
200ff08: 88 01 20 01 inc %g4
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
200ff0c: c6 09 00 00 ldub [ %g4 ], %g3
200ff10: b6 08 e0 ff and %g3, 0xff, %i3
200ff14: b6 06 80 1b add %i2, %i3, %i3
200ff18: f6 4e e0 01 ldsb [ %i3 + 1 ], %i3
200ff1c: 80 8e e0 97 btst 0x97, %i3
200ff20: 32 bf ff f6 bne,a 200fef8 <msdos_format+0x838>
200ff24: c6 28 40 00 stb %g3, [ %g1 ]
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
200ff28: f0 28 40 00 stb %i0, [ %g1 ]
200ff2c: 82 00 60 01 inc %g1
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
200ff30: 84 80 bf ff addcc %g2, -1, %g2
200ff34: 12 bf ff f6 bne 200ff0c <msdos_format+0x84c>
200ff38: c0 28 40 00 clrb [ %g1 ]
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
200ff3c: 40 00 23 5c call 2018cac <rtems_clock_get_tod_timeval>
200ff40: 90 07 bf f0 add %fp, -16, %o0
if (rc == RTEMS_SUCCESSFUL) {
200ff44: 80 a2 20 00 cmp %o0, 0
200ff48: 12 80 01 48 bne 2010468 <msdos_format+0xda8> <== ALWAYS TAKEN
200ff4c: 01 00 00 00 nop
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
200ff50: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
200ff54: 83 28 60 01 sll %g1, 1, %g1 <== NOT EXECUTED
200ff58: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200ff5c: 80 a0 00 19 cmp %g0, %i1
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
return 0;
200ff60: b0 10 20 00 clr %i0
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
200ff64: 10 bf ff aa b 200fe0c <msdos_format+0x74c>
200ff68: 82 40 20 00 addx %g0, 0, %g1
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
200ff6c: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
200ff70: a0 10 20 00 clr %l0 <== NOT EXECUTED
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
(rqdata->sectors_per_cluster > 0)) {
200ff74: c2 06 60 08 ld [ %i1 + 8 ], %g1
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
200ff78: 84 90 60 00 orcc %g1, 0, %g2
200ff7c: 12 80 00 05 bne 200ff90 <msdos_format+0x8d0> <== NEVER TAKEN
200ff80: f0 07 bf 58 ld [ %fp + -168 ], %i0
200ff84: c4 07 bf 64 ld [ %fp + -156 ], %g2
200ff88: 82 10 00 02 mov %g2, %g1
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
200ff8c: f0 07 bf 58 ld [ %fp + -168 ], %i0
200ff90: b4 10 20 08 mov 8, %i2
200ff94: b6 10 20 80 mov 0x80, %i3
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
200ff98: 80 a6 c0 01 cmp %i3, %g1
200ff9c: 38 80 00 79 bgu,a 2010180 <msdos_format+0xac0>
200ffa0: b4 86 bf ff addcc %i2, -1, %i2
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
200ffa4: 11 00 00 20 sethi %hi(0x8000), %o0
200ffa8: 40 00 75 ff call 202d7a4 <.udiv>
200ffac: 92 10 00 18 mov %i0, %o1
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
200ffb0: 80 a2 00 1b cmp %o0, %i3
200ffb4: 0a 80 00 72 bcs 201017c <msdos_format+0xabc> <== NEVER TAKEN
200ffb8: 84 10 00 1b mov %i3, %g2
200ffbc: f6 27 bf 64 st %i3, [ %fp + -156 ]
}
}
}
}
if (ret_val == 0) {
200ffc0: 80 a4 20 00 cmp %l0, 0
200ffc4: 12 80 00 73 bne 2010190 <msdos_format+0xad0> <== NEVER TAKEN
200ffc8: f6 07 bf 64 ld [ %fp + -156 ], %i3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200ffcc: 90 10 00 19 mov %i1, %o0
200ffd0: 92 10 20 02 mov 2, %o1
200ffd4: 96 10 00 1b mov %i3, %o3
200ffd8: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200ffdc: 7f ff fd 44 call 200f4ec <msdos_format_printf>
200ffe0: 94 12 a3 90 or %o2, 0x390, %o2 ! 2030f90 <_CPU_Trap_slot_template+0xa8>
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
200ffe4: f0 0f bf 8a ldub [ %fp + -118 ], %i0
200ffe8: 80 a6 20 04 cmp %i0, 4
200ffec: 02 80 01 2c be 201049c <msdos_format+0xddc> <== NEVER TAKEN
200fff0: 82 10 20 01 mov 1, %g1
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
200fff4: 80 a6 60 00 cmp %i1, 0
200fff8: 02 80 00 06 be 2010010 <msdos_format+0x950> <== NEVER TAKEN
200fffc: c2 27 bf 60 st %g1, [ %fp + -160 ]
(rqdata->files_per_root_dir > 0)) {
2010000: f4 06 60 10 ld [ %i1 + 0x10 ], %i2
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
2010004: 80 a6 a0 00 cmp %i2, 0
2010008: 12 80 00 07 bne 2010024 <msdos_format+0x964> <== NEVER TAKEN
201000c: b4 06 bf ff add %i2, -1, %i2
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
2010010: 82 1e 20 02 xor %i0, 2, %g1
2010014: 80 a0 00 01 cmp %g0, %g1
2010018: b4 40 3f ff addx %g0, -1, %i2
201001c: b4 0e a1 c0 and %i2, 0x1c0, %i2
2010020: b4 06 a0 3f add %i2, 0x3f, %i2
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
2010024: e2 07 bf 58 ld [ %fp + -168 ], %l1
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
2010028: a4 10 20 01 mov 1, %l2
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
201002c: 93 2c 60 01 sll %l1, 1, %o1
2010030: 93 32 60 05 srl %o1, 5, %o1
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
2010034: b4 06 80 09 add %i2, %o1, %i2
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
2010038: 40 00 76 87 call 202da54 <.urem>
201003c: 90 10 00 1a mov %i2, %o0
2010040: 90 26 80 08 sub %i2, %o0, %o0
2010044: d0 27 bf 70 st %o0, [ %fp + -144 ]
2010048: 91 2a 20 05 sll %o0, 5, %o0
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
201004c: 92 10 00 11 mov %l1, %o1
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
2010050: a8 04 7f ff add %l1, -1, %l4
/ fmt_params->bytes_per_sector);
2010054: 40 00 75 d4 call 202d7a4 <.udiv>
2010058: 90 05 00 08 add %l4, %o0, %o0
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
201005c: ea 07 bf 5c ld [ %fp + -164 ], %l5
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
2010060: 82 10 00 08 mov %o0, %g1
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
2010064: d0 27 bf 74 st %o0, [ %fp + -140 ]
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
2010068: a4 25 40 12 sub %l5, %l2, %l2
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
201006c: 11 00 00 20 sethi %hi(0x8000), %o0
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
2010070: aa 24 80 01 sub %l2, %g1, %l5
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
2010074: 40 00 75 cc call 202d7a4 <.udiv>
2010078: 92 10 00 11 mov %l1, %o1
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
201007c: c2 0f bf 88 ldub [ %fp + -120 ], %g1
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
2010080: 80 a6 c0 08 cmp %i3, %o0
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
2010084: c2 2f bd 4b stb %g1, [ %fp + -693 ]
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
2010088: 08 80 00 07 bleu 20100a4 <msdos_format+0x9e4> <== ALWAYS TAKEN
201008c: ac 08 60 ff and %g1, 0xff, %l6
sectors_per_cluster /= 2;
2010090: b7 36 e0 01 srl %i3, 1, %i3 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
2010094: 80 a6 c0 08 cmp %i3, %o0 <== NOT EXECUTED
2010098: 38 bf ff ff bgu,a 2010094 <msdos_format+0x9d4> <== NOT EXECUTED
201009c: b7 36 e0 01 srl %i3, 1, %i3 <== NOT EXECUTED
20100a0: ec 0f bd 4b ldub [ %fp + -693 ], %l6 <== NOT EXECUTED
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
20100a4: 82 1e 20 02 xor %i0, 2, %g1
20100a8: 27 00 00 3f sethi %hi(0xfc00), %l3
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
20100ac: 80 a0 00 01 cmp %g0, %g1
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
20100b0: a6 14 e3 f5 or %l3, 0x3f5, %l3
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
20100b4: 82 60 3f ff subx %g0, -1, %g1
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
20100b8: 25 00 00 20 sethi %hi(0x8000), %l2
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
20100bc: c2 27 bd 4c st %g1, [ %fp + -692 ]
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
20100c0: 90 10 00 15 mov %l5, %o0
20100c4: 40 00 75 b8 call 202d7a4 <.udiv>
20100c8: 92 10 00 1b mov %i3, %o1
if (fattype == FAT_FAT12) {
20100cc: 80 a6 20 01 cmp %i0, 1
20100d0: 02 80 00 41 be 20101d4 <msdos_format+0xb14> <== ALWAYS TAKEN
20100d4: b4 10 00 08 mov %o0, %i2
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
20100d8: 80 a6 20 02 cmp %i0, 2 <== NOT EXECUTED
20100dc: 02 80 00 78 be 20102bc <msdos_format+0xbfc> <== NOT EXECUTED
20100e0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
20100e4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
20100e8: 40 00 75 af call 202d7a4 <.udiv> <== NOT EXECUTED
20100ec: 90 02 00 14 add %o0, %l4, %o0 <== NOT EXECUTED
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
20100f0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
20100f4: 40 00 75 72 call 202d6bc <.umul> <== NOT EXECUTED
20100f8: ae 10 00 08 mov %o0, %l7 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
20100fc: 82 06 ff ff add %i3, -1, %g1 <== NOT EXECUTED
/ sectors_per_cluster));
2010100: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2010104: 40 00 75 a8 call 202d7a4 <.udiv> <== NOT EXECUTED
2010108: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
201010c: b4 26 80 08 sub %i2, %o0, %i2 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
2010110: 80 a4 c0 1a cmp %l3, %i2 <== NOT EXECUTED
2010114: 1a 80 00 42 bcc 201021c <msdos_format+0xb5c> <== NOT EXECUTED
2010118: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201011c: c2 07 bd 4c ld [ %fp + -692 ], %g1 <== NOT EXECUTED
2010120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2010124: 02 80 00 3f be 2010220 <msdos_format+0xb60> <== NOT EXECUTED
2010128: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
201012c: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
2010130: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
2010134: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2010138: 40 00 75 61 call 202d6bc <.umul> <== NOT EXECUTED
201013c: b4 10 20 00 clr %i2 <== NOT EXECUTED
2010140: 80 a2 00 12 cmp %o0, %l2 <== NOT EXECUTED
2010144: 08 80 00 3c bleu 2010234 <msdos_format+0xb74> <== NOT EXECUTED
2010148: 80 8e a0 ff btst 0xff, %i2 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
201014c: 40 00 41 fb call 2020938 <__errno> <== NOT EXECUTED
2010150: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
2010154: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
2010158: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
201015c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
2010160: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
2010164: 40 00 75 56 call 202d6bc <.umul> <== NOT EXECUTED
2010168: c0 27 bf 64 clr [ %fp + -156 ] <== NOT EXECUTED
201016c: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
2010170: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
2010174: 10 80 00 0d b 20101a8 <msdos_format+0xae8> <== NOT EXECUTED
2010178: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
201017c: b4 86 bf ff addcc %i2, -1, %i2 <== NOT EXECUTED
2010180: 02 80 01 26 be 2010618 <msdos_format+0xf58> <== NEVER TAKEN
2010184: b7 36 e0 01 srl %i3, 1, %i3
2010188: 10 bf ff 84 b 200ff98 <msdos_format+0x8d8>
201018c: 82 10 00 02 mov %g2, %g1
}
}
}
}
if (ret_val == 0) {
2010190: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
2010194: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
2010198: 40 00 75 49 call 202d6bc <.umul> <== NOT EXECUTED
201019c: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
20101a0: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
20101a4: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
20101a8: 80 a6 e0 00 cmp %i3, 0
20101ac: 02 bf ff 0f be 200fde8 <msdos_format+0x728> <== NEVER TAKEN
20101b0: c2 27 bf 78 st %g1, [ %fp + -136 ]
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
20101b4: 10 bf ff 0f b 200fdf0 <msdos_format+0x730>
20101b8: f6 27 bf 7c st %i3, [ %fp + -132 ]
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
20101bc: a7 34 a0 08 srl %l2, 8, %l3
20101c0: a2 10 20 00 clr %l1
20101c4: a4 10 20 00 clr %l2
20101c8: a0 10 20 00 clr %l0
20101cc: 10 bf fd f2 b 200f994 <msdos_format+0x2d4>
20101d0: b0 10 20 00 clr %i0
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
20101d4: 92 10 00 11 mov %l1, %o1
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
20101d8: 91 2a 20 01 sll %o0, 1, %o0
20101dc: 90 02 00 1a add %o0, %i2, %o0
20101e0: 91 32 20 01 srl %o0, 1, %o0
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
20101e4: 40 00 75 70 call 202d7a4 <.udiv>
20101e8: 90 02 00 14 add %o0, %l4, %o0
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
20101ec: 92 10 00 16 mov %l6, %o1
20101f0: 40 00 75 33 call 202d6bc <.umul>
20101f4: ae 10 00 08 mov %o0, %l7
+ (sectors_per_cluster - 1))
20101f8: 82 06 ff ff add %i3, -1, %g1
/ sectors_per_cluster));
20101fc: 92 10 00 1b mov %i3, %o1
2010200: 40 00 75 69 call 202d7a4 <.udiv>
2010204: 90 00 40 08 add %g1, %o0, %o0
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
2010208: b4 26 80 08 sub %i2, %o0, %i2
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
201020c: 80 a6 af f5 cmp %i2, 0xff5
2010210: 38 bf ff c8 bgu,a 2010130 <msdos_format+0xa70> <== NEVER TAKEN
2010214: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
2010218: 90 10 00 1b mov %i3, %o0
201021c: 92 10 00 11 mov %l1, %o1
2010220: 40 00 75 27 call 202d6bc <.umul>
2010224: b4 10 20 01 mov 1, %i2
2010228: 80 a2 00 12 cmp %o0, %l2
201022c: 18 bf ff c8 bgu 201014c <msdos_format+0xa8c> <== NEVER TAKEN
2010230: 80 8e a0 ff btst 0xff, %i2
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
2010234: 02 bf ff a4 be 20100c4 <msdos_format+0xa04> <== NEVER TAKEN
2010238: 90 10 00 15 mov %l5, %o0
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
201023c: ee 27 bf 68 st %l7, [ %fp + -152 ]
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
2010240: 80 a6 60 00 cmp %i1, 0
2010244: 02 80 00 53 be 2010390 <msdos_format+0xcd0> <== NEVER TAKEN
2010248: f6 27 bf 64 st %i3, [ %fp + -156 ]
(rqdata->media != 0)) {
201024c: f6 0e 60 15 ldub [ %i1 + 0x15 ], %i3
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
2010250: b4 8e e0 ff andcc %i3, 0xff, %i2
2010254: 22 80 00 50 be,a 2010394 <msdos_format+0xcd4> <== ALWAYS TAKEN
2010258: d2 07 bf 68 ld [ %fp + -152 ], %o1
(rqdata->media != 0)) {
const char valid_media_codes[] =
201025c: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
2010260: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
2010264: 13 00 80 c4 sethi %hi(0x2031000), %o1 <== NOT EXECUTED
2010268: 40 00 44 83 call 2021474 <memcpy> <== NOT EXECUTED
201026c: 92 12 60 50 or %o1, 0x50, %o1 ! 2031050 <_CPU_Trap_slot_template+0x168><== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
2010270: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
2010274: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2010278: 40 00 44 0c call 20212a8 <memchr> <== NOT EXECUTED
201027c: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
2010280: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2010284: 02 80 00 d8 be 20105e4 <msdos_format+0xf24> <== NOT EXECUTED
2010288: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
201028c: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
2010290: 40 00 75 0b call 202d6bc <.umul> <== NOT EXECUTED
2010294: f6 2f bf 89 stb %i3, [ %fp + -119 ] <== NOT EXECUTED
2010298: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
201029c: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
20102a0: 10 bf ff c2 b 20101a8 <msdos_format+0xae8> <== NOT EXECUTED
20102a4: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
20102a8: 40 00 41 a4 call 2020938 <__errno> <== NOT EXECUTED
20102ac: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
20102b0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20102b4: 10 bf ff 30 b 200ff74 <msdos_format+0x8b4> <== NOT EXECUTED
20102b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
fat_capacity = fatdata_cluster_cnt * 2;
20102bc: 10 bf ff 8a b 20100e4 <msdos_format+0xa24> <== NOT EXECUTED
20102c0: 91 2e a0 01 sll %i2, 1, %o0 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
20102c4: 94 10 22 00 mov 0x200, %o2 <== NOT EXECUTED
20102c8: 40 00 44 a7 call 2021564 <memset> <== NOT EXECUTED
20102cc: 90 07 bd 58 add %fp, -680, %o0 <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
20102d0: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED
20102d4: c4 2f bd 5a stb %g2, [ %fp + -678 ] <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
20102d8: c4 2f bf 3f stb %g2, [ %fp + -193 ] <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
20102dc: 84 10 20 55 mov 0x55, %g2 <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
20102e0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
20102e4: 86 10 20 41 mov 0x41, %g3 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
20102e8: 88 10 20 72 mov 0x72, %g4 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
20102ec: c4 2f bf 56 stb %g2, [ %fp + -170 ] <== NOT EXECUTED
20102f0: 84 10 3f aa mov -86, %g2 <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
20102f4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
20102f8: b0 10 20 52 mov 0x52, %i0 <== NOT EXECUTED
20102fc: c6 2f bd 5b stb %g3, [ %fp + -677 ] <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
2010300: c8 2f bf 3c stb %g4, [ %fp + -196 ] <== NOT EXECUTED
2010304: c8 2f bf 3d stb %g4, [ %fp + -195 ] <== NOT EXECUTED
2010308: c6 2f bf 3e stb %g3, [ %fp + -194 ] <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
201030c: c4 2f bf 57 stb %g2, [ %fp + -169 ] <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
2010310: c2 2f bf 40 stb %g1, [ %fp + -192 ] <== NOT EXECUTED
2010314: c2 2f bf 41 stb %g1, [ %fp + -191 ] <== NOT EXECUTED
2010318: c2 2f bf 42 stb %g1, [ %fp + -190 ] <== NOT EXECUTED
201031c: c2 2f bf 43 stb %g1, [ %fp + -189 ] <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
2010320: c2 2f bf 44 stb %g1, [ %fp + -188 ] <== NOT EXECUTED
2010324: c2 2f bf 45 stb %g1, [ %fp + -187 ] <== NOT EXECUTED
2010328: c2 2f bf 46 stb %g1, [ %fp + -186 ] <== NOT EXECUTED
201032c: c2 2f bf 47 stb %g1, [ %fp + -185 ] <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
2010330: 94 10 20 00 clr %o2 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
2010334: f0 2f bd 58 stb %i0, [ %fp + -680 ] <== NOT EXECUTED
2010338: f0 2f bd 59 stb %i0, [ %fp + -679 ] <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
201033c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2010340: 40 00 76 71 call 202dd04 <__muldi3> <== NOT EXECUTED
2010344: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2010348: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
201034c: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
2010350: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010354: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
2010358: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
201035c: 7f ff d9 f7 call 2006b38 <lseek> <== NOT EXECUTED
2010360: 96 10 20 00 clr %o3 <== NOT EXECUTED
2010364: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2010368: 06 bf fe 8a bl 200fd90 <msdos_format+0x6d0> <== NOT EXECUTED
201036c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
2010370: 92 07 bd 58 add %fp, -680, %o1 <== NOT EXECUTED
2010374: 7f ff e9 c4 call 200aa84 <write> <== NOT EXECUTED
2010378: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201037c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2010380: 16 bf fd f2 bge 200fb48 <msdos_format+0x488> <== NOT EXECUTED
2010384: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
2010388: 10 bf fc fb b 200f774 <msdos_format+0xb4> <== NOT EXECUTED
201038c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
2010390: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
2010394: d0 0f bd 4b ldub [ %fp + -693 ], %o0
2010398: 82 10 3f f8 mov -8, %g1
201039c: 40 00 74 c8 call 202d6bc <.umul>
20103a0: c2 2f bf 89 stb %g1, [ %fp + -119 ]
20103a4: c2 07 bf 60 ld [ %fp + -160 ], %g1
20103a8: f6 07 bf 74 ld [ %fp + -140 ], %i3
20103ac: 10 bf ff 7f b 20101a8 <msdos_format+0xae8>
20103b0: 82 02 00 01 add %o0, %g1, %g1
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
20103b4: 90 10 20 00 clr %o0 <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
20103b8: c2 2f bf 88 stb %g1, [ %fp + -120 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
20103bc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20103c0: 15 00 80 c3 sethi %hi(0x2030c00), %o2 <== NOT EXECUTED
20103c4: 96 10 20 02 mov 2, %o3 <== NOT EXECUTED
20103c8: 7f ff fc 49 call 200f4ec <msdos_format_printf> <== NOT EXECUTED
20103cc: 94 12 a3 78 or %o2, 0x378, %o2 <== NOT EXECUTED
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
20103d0: 10 bf fd 3e b 200f8c8 <msdos_format+0x208> <== NOT EXECUTED
20103d4: 03 00 00 1f sethi %hi(0x7c00), %g1 <== NOT EXECUTED
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
20103d8: 82 20 00 1b neg %i3, %g1
memset(tmp_sec,0,sizeof(tmp_sec));
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
20103dc: c4 2f bd 58 stb %g2, [ %fp + -680 ]
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
20103e0: 84 10 3f 8f mov -113, %g2
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
20103e4: 83 30 60 1f srl %g1, 0x1f, %g1
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
20103e8: c4 2f bd 59 stb %g2, [ %fp + -679 ]
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
20103ec: 86 10 20 00 clr %g3
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
20103f0: 84 10 3f ff mov -1, %g2
20103f4: 10 bf fe 2d b 200fca8 <msdos_format+0x5e8>
20103f8: c4 2f bd 5a stb %g2, [ %fp + -678 ]
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
20103fc: c6 0f bf 89 ldub [ %fp + -119 ], %g3 <== NOT EXECUTED
2010400: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
2010404: c6 2f bd 58 stb %g3, [ %fp + -680 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
2010408: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
201040c: 82 20 00 1b neg %i3, %g1 <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
2010410: c4 2f bd 59 stb %g2, [ %fp + -679 ] <== NOT EXECUTED
2010414: c4 2f bd 5a stb %g2, [ %fp + -678 ] <== NOT EXECUTED
2010418: c4 2f bd 5b stb %g2, [ %fp + -677 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
201041c: c6 2f bd 5c stb %g3, [ %fp + -676 ] <== NOT EXECUTED
2010420: c4 2f bd 5d stb %g2, [ %fp + -675 ] <== NOT EXECUTED
2010424: c4 2f bd 5e stb %g2, [ %fp + -674 ] <== NOT EXECUTED
2010428: 83 30 60 1f srl %g1, 0x1f, %g1 <== NOT EXECUTED
201042c: 84 10 20 0f mov 0xf, %g2 <== NOT EXECUTED
2010430: 86 10 20 00 clr %g3 <== NOT EXECUTED
2010434: 10 bf fe 16 b 200fc8c <msdos_format+0x5cc> <== NOT EXECUTED
2010438: c4 2f bd 5f stb %g2, [ %fp + -673 ] <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
201043c: c6 0f bf 89 ldub [ %fp + -119 ], %g3 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
2010440: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
2010444: c6 2f bd 58 stb %g3, [ %fp + -680 ] <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
2010448: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
201044c: 82 20 00 1b neg %i3, %g1 <== NOT EXECUTED
2010450: c6 2f bd 5a stb %g3, [ %fp + -678 ] <== NOT EXECUTED
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
FAT_SET_VAL8(tmp_sec,1,0xff);
2010454: c4 2f bd 59 stb %g2, [ %fp + -679 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
2010458: c4 2f bd 5b stb %g2, [ %fp + -677 ] <== NOT EXECUTED
201045c: 83 30 60 1f srl %g1, 0x1f, %g1 <== NOT EXECUTED
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
2010460: 10 bf fe 12 b 200fca8 <msdos_format+0x5e8> <== NOT EXECUTED
2010464: 86 10 20 00 clr %g3 <== NOT EXECUTED
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
2010468: 40 00 44 95 call 20216bc <rand>
201046c: 01 00 00 00 nop
2010470: 10 bf fe bb b 200ff5c <msdos_format+0x89c>
2010474: d0 27 bf a4 st %o0, [ %fp + -92 ]
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
2010478: 82 10 62 9f or %g1, 0x29f, %g1 <== NOT EXECUTED
201047c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
2010480: 18 80 00 44 bgu 2010590 <msdos_format+0xed0> <== NOT EXECUTED
2010484: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
2010488: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
201048c: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
2010490: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
2010494: 10 bf fd 15 b 200f8e8 <msdos_format+0x228> <== NOT EXECUTED
2010498: c2 27 bf 64 st %g1, [ %fp + -156 ] <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
201049c: 82 10 20 20 mov 0x20, %g1 <== NOT EXECUTED
20104a0: c2 27 bf 60 st %g1, [ %fp + -160 ] <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
20104a4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
20104a8: c0 27 bf 70 clr [ %fp + -144 ] <== NOT EXECUTED
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
20104ac: c2 27 bf 80 st %g1, [ %fp + -128 ] <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
20104b0: e2 07 bf 58 ld [ %fp + -168 ], %l1 <== NOT EXECUTED
20104b4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
20104b8: a4 10 20 20 mov 0x20, %l2 <== NOT EXECUTED
20104bc: c2 27 bf 84 st %g1, [ %fp + -124 ] <== NOT EXECUTED
20104c0: 10 bf fe e3 b 201004c <msdos_format+0x98c> <== NOT EXECUTED
20104c4: 90 10 20 00 clr %o0 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
20104c8: c2 07 bf 68 ld [ %fp + -152 ], %g1 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
20104cc: c4 07 bf 80 ld [ %fp + -128 ], %g2 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
20104d0: 9b 30 60 08 srl %g1, 8, %o5 <== NOT EXECUTED
20104d4: 9f 30 60 10 srl %g1, 0x10, %o7 <== NOT EXECUTED
20104d8: b1 30 60 18 srl %g1, 0x18, %i0 <== NOT EXECUTED
20104dc: c2 2f bd 7c stb %g1, [ %fp + -644 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
20104e0: 82 10 20 29 mov 0x29, %g1 <== NOT EXECUTED
20104e4: c2 2f bd 9a stb %g1, [ %fp + -614 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
20104e8: 03 00 00 11 sethi %hi(0x4400), %g1 <== NOT EXECUTED
20104ec: 82 10 62 41 or %g1, 0x241, %g1 ! 4641 <PROM_START+0x4641> <== NOT EXECUTED
20104f0: c2 37 bd aa sth %g1, [ %fp + -598 ] <== NOT EXECUTED
20104f4: 03 00 00 15 sethi %hi(0x5400), %g1 <== NOT EXECUTED
20104f8: 82 10 60 33 or %g1, 0x33, %g1 ! 5433 <PROM_START+0x5433> <== NOT EXECUTED
20104fc: c2 37 bd ac sth %g1, [ %fp + -596 ] <== NOT EXECUTED
2010500: 03 00 00 0c sethi %hi(0x3000), %g1 <== NOT EXECUTED
2010504: 82 10 62 20 or %g1, 0x220, %g1 ! 3220 <PROM_START+0x3220> <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
2010508: b7 30 a0 08 srl %g2, 8, %i3 <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
201050c: c2 37 bd ae sth %g1, [ %fp + -594 ] <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2010510: da 2f bd 7d stb %o5, [ %fp + -643 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
2010514: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2010518: de 2f bd 7e stb %o7, [ %fp + -642 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
201051c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2010520: f0 2f bd 7f stb %i0, [ %fp + -641 ] <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
2010524: c8 2f bd 84 stb %g4, [ %fp + -636 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
2010528: c6 2f bd 88 stb %g3, [ %fp + -632 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
201052c: c4 2f bd 8a stb %g2, [ %fp + -630 ] <== NOT EXECUTED
2010530: f6 2f bd 8b stb %i3, [ %fp + -629 ] <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
2010534: c0 27 bd 8c clr [ %fp + -628 ] <== NOT EXECUTED
2010538: c0 27 bd 90 clr [ %fp + -624 ] <== NOT EXECUTED
201053c: c0 27 bd 94 clr [ %fp + -620 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
2010540: c0 2f bd 9f clrb [ %fp + -609 ] <== NOT EXECUTED
2010544: c0 2f bd a0 clrb [ %fp + -608 ] <== NOT EXECUTED
2010548: c0 2f bd a1 clrb [ %fp + -607 ] <== NOT EXECUTED
201054c: c0 2f bd a2 clrb [ %fp + -606 ] <== NOT EXECUTED
2010550: c0 2f bd a3 clrb [ %fp + -605 ] <== NOT EXECUTED
2010554: c0 2f bd a4 clrb [ %fp + -604 ] <== NOT EXECUTED
2010558: c0 2f bd a5 clrb [ %fp + -603 ] <== NOT EXECUTED
201055c: c0 2f bd a6 clrb [ %fp + -602 ] <== NOT EXECUTED
2010560: c0 2f bd a7 clrb [ %fp + -601 ] <== NOT EXECUTED
2010564: c0 2f bd a8 clrb [ %fp + -600 ] <== NOT EXECUTED
2010568: c0 2f bd a9 clrb [ %fp + -599 ] <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
201056c: 10 bf fd 51 b 200fab0 <msdos_format+0x3f0> <== NOT EXECUTED
2010570: c2 37 bd b0 sth %g1, [ %fp + -592 ] <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
2010574: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
2010578: a0 10 20 00 clr %l0 <== NOT EXECUTED
201057c: 10 bf fe 7e b 200ff74 <msdos_format+0x8b4> <== NOT EXECUTED
2010580: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
2010584: 03 00 80 c3 sethi %hi(0x2030c00), %g1
2010588: 10 bf fd 42 b 200fa90 <msdos_format+0x3d0>
201058c: 82 10 63 28 or %g1, 0x328, %g1 ! 2030f28 <_CPU_Trap_slot_template+0x40>
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
2010590: 84 10 20 00 clr %g2 <== NOT EXECUTED
2010594: 07 10 00 00 sethi %hi(0x40000000), %g3 <== NOT EXECUTED
2010598: 86 86 c0 03 addcc %i3, %g3, %g3 <== NOT EXECUTED
201059c: 84 46 80 02 addx %i2, %g2, %g2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
20105a0: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
20105a4: 89 28 a0 02 sll %g2, 2, %g4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
20105a8: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
20105ac: 85 30 e0 1e srl %g3, 0x1e, %g2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
20105b0: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
20105b4: 10 80 00 04 b 20105c4 <msdos_format+0xf04> <== NOT EXECUTED
20105b8: 88 11 00 02 or %g4, %g2, %g4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
20105bc: 02 80 00 08 be 20105dc <msdos_format+0xf1c> <== NOT EXECUTED
20105c0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
20105c4: 85 28 c0 01 sll %g3, %g1, %g2 <== NOT EXECUTED
20105c8: 80 88 80 04 btst %g2, %g4 <== NOT EXECUTED
20105cc: 02 bf ff fc be 20105bc <msdos_format+0xefc> <== NOT EXECUTED
20105d0: 82 80 7f ff addcc %g1, -1, %g1 <== NOT EXECUTED
break;
fmt_params->sectors_per_cluster = 1 << b;
20105d4: 10 bf fc c5 b 200f8e8 <msdos_format+0x228> <== NOT EXECUTED
20105d8: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
20105dc: 10 bf fc c3 b 200f8e8 <msdos_format+0x228> <== NOT EXECUTED
20105e0: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
20105e4: 40 00 40 d5 call 2020938 <__errno> <== NOT EXECUTED
20105e8: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
20105ec: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20105f0: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
20105f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20105f8: d0 0f bf 88 ldub [ %fp + -120 ], %o0 <== NOT EXECUTED
20105fc: 40 00 74 30 call 202d6bc <.umul> <== NOT EXECUTED
2010600: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
2010604: c2 07 bf 60 ld [ %fp + -160 ], %g1 <== NOT EXECUTED
2010608: 10 bf fe e8 b 20101a8 <msdos_format+0xae8> <== NOT EXECUTED
201060c: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
2010610: 10 bf fc 55 b 200f764 <msdos_format+0xa4> <== NOT EXECUTED
2010614: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
2010618: 10 bf fe 6a b 200ffc0 <msdos_format+0x900> <== NOT EXECUTED
201061c: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
2010620: 10 bf fc 55 b 200f774 <msdos_format+0xb4> <== NOT EXECUTED
2010624: b0 10 00 03 mov %g3, %i0 <== NOT EXECUTED
0200f540 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200f540: 9d e3 bf a0 save %sp, -96, %sp
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
200f544: 7f ff de 27 call 2006de0 <malloc>
200f548: 90 10 00 1c mov %i4, %o0
if (fill_buffer == NULL) {
200f54c: a0 92 20 00 orcc %o0, 0, %l0
200f550: 02 80 00 3b be 200f63c <msdos_format_fill_sectors+0xfc> <== NEVER TAKEN
200f554: 92 10 00 1d mov %i5, %o1
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
200f558: 40 00 48 03 call 2021564 <memset>
200f55c: 94 10 00 1c mov %i4, %o2
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f560: 90 10 00 18 mov %i0, %o0
200f564: 92 10 20 02 mov 2, %o1
200f568: 15 00 80 c3 sethi %hi(0x2030c00), %o2
200f56c: 7f ff ff e0 call 200f4ec <msdos_format_printf>
200f570: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 2030ef8 <_CPU_Trap_slot_template+0x10>
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200f574: 80 a6 e0 00 cmp %i3, 0
200f578: 02 80 00 2a be 200f620 <msdos_format_fill_sectors+0xe0> <== NEVER TAKEN
200f57c: 83 2e e0 04 sll %i3, 4, %g1
200f580: bb 2e e0 02 sll %i3, 2, %i5
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
200f584: 27 00 80 bf sethi %hi(0x202fc00), %l3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200f588: ba 07 40 01 add %i5, %g1, %i5
200f58c: a4 10 00 1b mov %i3, %l2
200f590: 83 2f 60 02 sll %i5, 2, %g1
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
200f594: a2 10 3f ff mov -1, %l1
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200f598: ba 07 40 01 add %i5, %g1, %i5
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
200f59c: a6 14 e0 70 or %l3, 0x70, %l3
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
200f5a0: 92 10 00 1b mov %i3, %o1
200f5a4: 40 00 78 80 call 202d7a4 <.udiv>
200f5a8: 90 10 00 1d mov %i5, %o0
if (percent != last_percent) {
200f5ac: 80 a2 00 11 cmp %o0, %l1
200f5b0: 02 80 00 04 be 200f5c0 <msdos_format_fill_sectors+0x80>
200f5b4: 80 8a 20 01 btst 1, %o0
if ((percent & 1) == 0)
200f5b8: 02 80 00 3c be 200f6a8 <msdos_format_fill_sectors+0x168>
200f5bc: a2 10 00 08 mov %o0, %l1
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200f5c0: 92 10 00 1a mov %i2, %o1
200f5c4: 96 10 00 1c mov %i4, %o3
200f5c8: 94 10 20 00 clr %o2
200f5cc: 40 00 79 ce call 202dd04 <__muldi3>
200f5d0: 90 10 20 00 clr %o0
200f5d4: 84 10 00 08 mov %o0, %g2
200f5d8: 86 10 00 09 mov %o1, %g3
200f5dc: 90 10 00 19 mov %i1, %o0
200f5e0: 92 10 00 02 mov %g2, %o1
200f5e4: 94 10 00 03 mov %g3, %o2
200f5e8: 96 10 20 00 clr %o3
200f5ec: 7f ff dd 53 call 2006b38 <lseek>
200f5f0: b4 06 a0 01 inc %i2
200f5f4: 80 a2 20 00 cmp %o0, 0
200f5f8: 06 80 00 1a bl 200f660 <msdos_format_fill_sectors+0x120> <== NEVER TAKEN
200f5fc: 90 10 00 19 mov %i1, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
200f600: 92 10 00 10 mov %l0, %o1
200f604: 7f ff ed 20 call 200aa84 <write>
200f608: 94 10 00 1c mov %i4, %o2
200f60c: 80 a2 20 00 cmp %o0, 0
200f610: 06 80 00 14 bl 200f660 <msdos_format_fill_sectors+0x120> <== NEVER TAKEN
200f614: a4 84 bf ff addcc %l2, -1, %l2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
200f618: 12 bf ff e2 bne 200f5a0 <msdos_format_fill_sectors+0x60>
200f61c: ba 07 7f 9c add %i5, -100, %i5
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
200f620: 90 10 00 18 mov %i0, %o0
200f624: 92 10 20 02 mov 2, %o1
200f628: b0 10 20 00 clr %i0
200f62c: 15 00 80 c1 sethi %hi(0x2030400), %o2
200f630: 7f ff ff af call 200f4ec <msdos_format_printf>
200f634: 94 12 a1 d0 or %o2, 0x1d0, %o2 ! 20305d0 <rtems_filesystem_table+0x450>
200f638: 30 80 00 18 b,a 200f698 <msdos_format_fill_sectors+0x158>
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
200f63c: 40 00 44 bf call 2020938 <__errno> <== NOT EXECUTED
200f640: 01 00 00 00 nop <== NOT EXECUTED
200f644: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f648: 15 00 80 c3 sethi %hi(0x2030c00), %o2 <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
200f64c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
200f650: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200f654: 94 12 a2 f8 or %o2, 0x2f8, %o2 <== NOT EXECUTED
200f658: 7f ff ff a5 call 200f4ec <msdos_format_printf> <== NOT EXECUTED
200f65c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
200f660: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200f664: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200f668: 15 00 80 c1 sethi %hi(0x2030400), %o2 <== NOT EXECUTED
200f66c: 7f ff ff a0 call 200f4ec <msdos_format_printf> <== NOT EXECUTED
200f670: 94 12 a1 d0 or %o2, 0x1d0, %o2 ! 20305d0 <rtems_filesystem_table+0x450><== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
200f674: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200f678: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200f67c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
200f680: 15 00 80 c3 sethi %hi(0x2030c00), %o2 <== NOT EXECUTED
200f684: 7f ff ff 9a call 200f4ec <msdos_format_printf> <== NOT EXECUTED
200f688: 94 12 a3 08 or %o2, 0x308, %o2 ! 2030f08 <_CPU_Trap_slot_template+0x20><== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
200f68c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
200f690: 02 80 00 04 be 200f6a0 <msdos_format_fill_sectors+0x160> <== NOT EXECUTED
200f694: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fill_buffer);
200f698: 7f ff db b0 call 2006558 <free>
200f69c: 90 10 00 10 mov %l0, %o0
fill_buffer = NULL;
}
return ret_val;
}
200f6a0: 81 c7 e0 08 ret
200f6a4: 81 e8 00 00 restore
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
200f6a8: 90 10 00 18 mov %i0, %o0
200f6ac: 92 10 20 02 mov 2, %o1
200f6b0: 7f ff ff 8f call 200f4ec <msdos_format_printf>
200f6b4: 94 10 00 13 mov %l3, %o2
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
200f6b8: 10 bf ff c3 b 200f5c4 <msdos_format_fill_sectors+0x84>
200f6bc: 92 10 00 1a mov %i2, %o1
0200f4ec <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
200f4ec: 9d e3 bf 98 save %sp, -104, %sp
va_list args;
va_start (args, format);
200f4f0: 94 07 a0 50 add %fp, 0x50, %o2
200f4f4: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200f4f8: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200f4fc: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
if (rqdata != NULL && rqdata->info_level >= info_level)
200f500: 80 a6 20 00 cmp %i0, 0
200f504: 02 80 00 0d be 200f538 <msdos_format_printf+0x4c> <== NEVER TAKEN
200f508: d4 27 bf fc st %o2, [ %fp + -4 ]
200f50c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200f510: 80 a0 40 19 cmp %g1, %i1
200f514: 06 80 00 09 bl 200f538 <msdos_format_printf+0x4c> <== ALWAYS TAKEN
200f518: 3b 00 80 ca sethi %hi(0x2032800), %i5
{
vfprintf (stdout, format, args);
200f51c: c2 07 62 20 ld [ %i5 + 0x220 ], %g1 ! 2032a20 <_impure_ptr><== NOT EXECUTED
200f520: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200f524: 40 00 65 93 call 2028b70 <vfprintf> <== NOT EXECUTED
200f528: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
fflush (stdout);
200f52c: c2 07 62 20 ld [ %i5 + 0x220 ], %g1 <== NOT EXECUTED
200f530: 40 00 46 12 call 2020d78 <fflush> <== NOT EXECUTED
200f534: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
200f538: 81 c7 e0 08 ret
200f53c: 81 e8 00 00 restore
0201c66c <msdos_free_node_info>:
* RC_OK on success, or -1 code if error occured
*
*/
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
201c66c: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201c670: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c674: 92 10 20 00 clr %o1
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201c678: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
201c67c: 94 10 20 00 clr %o2
201c680: 7f ff ba fc call 200b270 <rtems_semaphore_obtain>
201c684: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
201c688: 80 a2 20 00 cmp %o0, 0
201c68c: 12 80 00 0a bne 201c6b4 <msdos_free_node_info+0x48> <== NEVER TAKEN
201c690: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
201c694: d2 06 00 00 ld [ %i0 ], %o1
201c698: 7f ff df db call 2014604 <fat_file_close>
201c69c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
201c6a0: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
201c6a4: 7f ff bb 3d call 200b398 <rtems_semaphore_release>
201c6a8: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
201c6ac: 81 c7 e0 08 ret
201c6b0: 81 e8 00 00 restore
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201c6b4: 40 00 10 a1 call 2020938 <__errno> <== NOT EXECUTED
201c6b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c6bc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
201c6c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201c6c4: 81 c7 e0 08 ret <== NOT EXECUTED
201c6c8: 81 e8 00 00 restore <== NOT EXECUTED
0201dc2c <msdos_get_dotdot_dir_info_cluster_num_and_offset>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
201dc2c: 9d e3 bf 50 save %sp, -176, %sp <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201dc30: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
201dc34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
201dc38: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
201dc3c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
201dc40: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201dc44: 7f ff d8 ae call 2013efc <fat_file_open> <== NOT EXECUTED
201dc48: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc != RC_OK)
201dc4c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dc50: 12 80 00 a6 bne 201dee8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2bc><== NOT EXECUTED
201dc54: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201dc58: 03 00 08 00 sethi %hi(0x200000), %g1 <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
201dc5c: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
201dc60: f2 22 60 1c st %i1, [ %o1 + 0x1c ] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
201dc64: e2 22 60 10 st %l1, [ %o1 + 0x10 ] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
201dc68: c0 22 60 34 clr [ %o1 + 0x34 ] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201dc6c: c2 22 60 14 st %g1, [ %o1 + 0x14 ] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201dc70: f2 22 60 38 st %i1, [ %o1 + 0x38 ] <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
201dc74: 7f ff dc 87 call 2014e90 <fat_file_size> <== NOT EXECUTED
201dc78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc != RC_OK)
201dc7c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dc80: 12 80 00 97 bne 201dedc <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b0><== NOT EXECUTED
201dc84: b2 07 bf b8 add %fp, -72, %i1 <== NOT EXECUTED
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
201dc88: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201dc8c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
201dc90: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
201dc94: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED
201dc98: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED
201dc9c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
201dca0: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201dca4: 2d 08 08 08 sethi %hi(0x20202000), %l6 <== NOT EXECUTED
201dca8: a8 10 20 20 mov 0x20, %l4 <== NOT EXECUTED
201dcac: ac 15 a0 20 or %l6, 0x20, %l6 <== NOT EXECUTED
201dcb0: e8 2e 60 0a stb %l4, [ %i1 + 0xa ] <== NOT EXECUTED
201dcb4: ae 10 00 16 mov %l6, %l7 <== NOT EXECUTED
201dcb8: 27 00 00 08 sethi %hi(0x2000), %l3 <== NOT EXECUTED
201dcbc: ec 3f bf b8 std %l6, [ %fp + -72 ] <== NOT EXECUTED
201dcc0: a6 14 e0 20 or %l3, 0x20, %l3 <== NOT EXECUTED
201dcc4: e6 36 60 08 sth %l3, [ %i1 + 8 ] <== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
{
sfn[0] = '.';
201dcc8: a4 10 20 2e mov 0x2e, %l2 <== NOT EXECUTED
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
201dccc: f4 23 a0 5c st %i2, [ %sp + 0x5c ] <== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
{
sfn[0] = '.';
201dcd0: e4 2f bf b8 stb %l2, [ %fp + -72 ] <== NOT EXECUTED
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
201dcd4: f2 23 a0 60 st %i1, [ %sp + 0x60 ] <== NOT EXECUTED
201dcd8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dcdc: 94 10 20 00 clr %o2 <== NOT EXECUTED
201dce0: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
201dce4: 17 00 80 bf sethi %hi(0x202fc00), %o3 <== NOT EXECUTED
201dce8: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
201dcec: 7f ff fc f4 call 201d0bc <msdos_find_name_in_fat_file> <== NOT EXECUTED
201dcf0: 96 12 e0 70 or %o3, 0x70, %o3 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
201dcf4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dcf8: 12 80 00 79 bne 201dedc <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b0><== NOT EXECUTED
201dcfc: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201dd00: a0 07 bf d8 add %fp, -40, %l0 <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201dd04: ec 3f bf d8 std %l6, [ %fp + -40 ] <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
201dd08: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
201dd0c: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
201dd10: c0 24 20 10 clr [ %l0 + 0x10 ] <== NOT EXECUTED
201dd14: c0 24 20 14 clr [ %l0 + 0x14 ] <== NOT EXECUTED
201dd18: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED
201dd1c: c0 24 20 1c clr [ %l0 + 0x1c ] <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201dd20: e6 34 20 08 sth %l3, [ %l0 + 8 ] <== NOT EXECUTED
201dd24: e8 2c 20 0a stb %l4, [ %l0 + 0xa ] <== NOT EXECUTED
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
{
sfn[0] = sfn[1] = '.';
201dd28: e4 2f bf d9 stb %l2, [ %fp + -39 ] <== NOT EXECUTED
201dd2c: e4 2f bf d8 stb %l2, [ %fp + -40 ] <== NOT EXECUTED
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
201dd30: f4 23 a0 5c st %i2, [ %sp + 0x5c ] <== NOT EXECUTED
201dd34: e0 23 a0 60 st %l0, [ %sp + 0x60 ] <== NOT EXECUTED
201dd38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dd3c: 94 10 20 00 clr %o2 <== NOT EXECUTED
201dd40: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
201dd44: 17 00 80 be sethi %hi(0x202f800), %o3 <== NOT EXECUTED
201dd48: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
201dd4c: 7f ff fc dc call 201d0bc <msdos_find_name_in_fat_file> <== NOT EXECUTED
201dd50: 96 12 e2 f8 or %o3, 0x2f8, %o3 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201dd54: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
201dd58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201dd5c: 12 80 00 65 bne 201def0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c4><== NOT EXECUTED
201dd60: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
201dd64: e4 16 60 1a lduh [ %i1 + 0x1a ], %l2 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
201dd68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dd6c: 7f ff da 26 call 2014604 <fat_file_close> <== NOT EXECUTED
201dd70: f2 16 60 14 lduh [ %i1 + 0x14 ], %i1 <== NOT EXECUTED
if ( rc != RC_OK )
201dd74: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dd78: 12 80 00 5c bne 201dee8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2bc><== NOT EXECUTED
201dd7c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
201dd80: c4 14 20 1a lduh [ %l0 + 0x1a ], %g2 <== NOT EXECUTED
201dd84: c6 14 20 14 lduh [ %l0 + 0x14 ], %g3 <== NOT EXECUTED
201dd88: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201dd8c: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201dd90: 89 30 a0 18 srl %g2, 0x18, %g4 <== NOT EXECUTED
201dd94: b1 30 e0 18 srl %g3, 0x18, %i0 <== NOT EXECUTED
201dd98: 87 30 e0 08 srl %g3, 8, %g3 <== NOT EXECUTED
201dd9c: 82 10 63 ff or %g1, 0x3ff, %g1 <== NOT EXECUTED
201dda0: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201dda4: 86 08 c0 01 and %g3, %g1, %g3 <== NOT EXECUTED
201dda8: 82 08 80 01 and %g2, %g1, %g1 <== NOT EXECUTED
201ddac: 86 16 00 03 or %i0, %g3, %g3 <== NOT EXECUTED
201ddb0: 82 11 00 01 or %g4, %g1, %g1 <== NOT EXECUTED
201ddb4: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201ddb8: 80 90 c0 01 orcc %g3, %g1, %g0 <== NOT EXECUTED
201ddbc: 12 80 00 07 bne 201ddd8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1ac><== NOT EXECUTED
201ddc0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201ddc4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
201ddc8: c0 26 a0 04 clr [ %i2 + 4 ] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201ddcc: c2 26 a0 08 st %g1, [ %i2 + 8 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201ddd0: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
/*
* we handle root dir for all FAT types in the same way with the
* ordinary directories ( through fat_file_* calls )
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
201ddd4: e2 26 80 00 st %l1, [ %i2 ] <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
201ddd8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201dddc: 7f ff d8 48 call 2013efc <fat_file_open> <== NOT EXECUTED
201dde0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc != RC_OK)
201dde4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201dde8: 12 80 00 40 bne 201dee8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2bc><== NOT EXECUTED
201ddec: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
201ddf0: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1 <== NOT EXECUTED
201ddf4: c8 14 20 1a lduh [ %l0 + 0x1a ], %g4 <== NOT EXECUTED
201ddf8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
201ddfc: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
201de00: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED
201de04: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED
201de08: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED
201de0c: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
201de10: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
201de14: b1 31 20 18 srl %g4, 0x18, %i0 <== NOT EXECUTED
201de18: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201de1c: 89 31 20 08 srl %g4, 8, %g4 <== NOT EXECUTED
201de20: 86 09 00 03 and %g4, %g3, %g3 <== NOT EXECUTED
201de24: 82 16 00 03 or %i0, %g3, %g1 <== NOT EXECUTED
201de28: 82 90 80 01 orcc %g2, %g1, %g1 <== NOT EXECUTED
201de2c: 12 80 00 35 bne 201df00 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2d4><== NOT EXECUTED
201de30: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
201de34: c2 07 20 38 ld [ %i4 + 0x38 ], %g1 <== NOT EXECUTED
201de38: c2 22 60 1c st %g1, [ %o1 + 0x1c ] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201de3c: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 <== NOT EXECUTED
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
201de40: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201de44: c4 22 60 10 st %g2, [ %o1 + 0x10 ] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201de48: 05 00 08 00 sethi %hi(0x200000), %g2 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
201de4c: c0 22 60 34 clr [ %o1 + 0x34 ] <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
201de50: c4 22 60 14 st %g2, [ %o1 + 0x14 ] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
201de54: c2 22 60 38 st %g1, [ %o1 + 0x38 ] <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
201de58: 7f ff dc 0e call 2014e90 <fat_file_size> <== NOT EXECUTED
201de5c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201de60: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
201de64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201de68: 12 80 00 22 bne 201def0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c4><== NOT EXECUTED
201de6c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
201de70: 87 2e 60 10 sll %i1, 0x10, %g3 <== NOT EXECUTED
201de74: 89 2c a0 10 sll %l2, 0x10, %g4 <== NOT EXECUTED
201de78: 95 30 e0 18 srl %g3, 0x18, %o2 <== NOT EXECUTED
201de7c: 83 31 20 18 srl %g4, 0x18, %g1 <== NOT EXECUTED
201de80: 87 30 e0 08 srl %g3, 8, %g3 <== NOT EXECUTED
201de84: 89 31 20 08 srl %g4, 8, %g4 <== NOT EXECUTED
201de88: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED
201de8c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff> <== NOT EXECUTED
201de90: 86 08 c0 02 and %g3, %g2, %g3 <== NOT EXECUTED
201de94: 84 09 00 02 and %g4, %g2, %g2 <== NOT EXECUTED
201de98: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
201de9c: 94 12 80 03 or %o2, %g3, %o2 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
201dea0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dea4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
201dea8: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
201deac: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
201deb0: 7f ff fe f8 call 201da90 <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
201deb4: 94 12 80 01 or %o2, %g1, %o2 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201deb8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
201debc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
201dec0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201dec4: 12 80 00 11 bne 201df08 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2dc><== NOT EXECUTED
201dec8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
201decc: 7f ff d9 ce call 2014604 <fat_file_close> <== NOT EXECUTED
201ded0: 01 00 00 00 nop <== NOT EXECUTED
return rc;
}
201ded4: 81 c7 e0 08 ret <== NOT EXECUTED
201ded8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201dedc: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
201dee0: 7f ff d9 c9 call 2014604 <fat_file_close> <== NOT EXECUTED
201dee4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
201dee8: 81 c7 e0 08 ret <== NOT EXECUTED
201deec: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201def0: 7f ff d9 c5 call 2014604 <fat_file_close> <== NOT EXECUTED
201def4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
201def8: 81 c7 e0 08 ret <== NOT EXECUTED
201defc: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
201df00: 10 bf ff cf b 201de3c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x210><== NOT EXECUTED
201df04: c2 22 60 1c st %g1, [ %o1 + 0x1c ] <== NOT EXECUTED
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
201df08: 7f ff d9 bf call 2014604 <fat_file_close> <== NOT EXECUTED
201df0c: 01 00 00 00 nop <== NOT EXECUTED
return rc;
201df10: 81 c7 e0 08 ret <== NOT EXECUTED
201df14: 81 e8 00 00 restore <== NOT EXECUTED
0201df18 <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201df18: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
201df1c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
201df20: d2 06 00 00 ld [ %i0 ], %o1
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
201df24: e0 07 a0 5c ld [ %fp + 0x5c ], %l0
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
201df28: 9a 10 00 1c mov %i4, %o5
201df2c: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
201df30: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
201df34: 94 10 00 19 mov %i1, %o2
201df38: 96 10 00 1a mov %i2, %o3
201df3c: 7f ff fc 60 call 201d0bc <msdos_find_name_in_fat_file>
201df40: 98 10 00 1b mov %i3, %o4
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
201df44: 03 00 00 1f sethi %hi(0x7c00), %g1
201df48: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
201df4c: 80 a2 00 01 cmp %o0, %g1
201df50: 12 80 00 2e bne 201e008 <msdos_get_name_node+0xf0>
201df54: b8 10 00 08 mov %o0, %i4
return rc;
if (!create_node)
201df58: 80 a6 60 00 cmp %i1, 0
201df5c: 12 80 00 29 bne 201e000 <msdos_get_name_node+0xe8>
201df60: 01 00 00 00 nop
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
201df64: 03 00 00 1f sethi %hi(0x7c00), %g1
201df68: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
201df6c: 80 a7 00 01 cmp %i4, %g1
201df70: 02 80 00 24 be 201e000 <msdos_get_name_node+0xe8>
201df74: 01 00 00 00 nop
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
201df78: 80 a7 20 00 cmp %i4, 0
201df7c: 12 80 00 21 bne 201e000 <msdos_get_name_node+0xe8> <== NEVER TAKEN
201df80: 01 00 00 00 nop
{
if (strncmp(name, "..", 2) == 0)
201df84: 90 10 00 1a mov %i2, %o0
201df88: 94 10 20 02 mov 2, %o2
201df8c: 13 00 80 be sethi %hi(0x202f800), %o1
201df90: 40 00 11 67 call 202252c <strncmp>
201df94: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 202faf8 <_rodata_start+0x228>
201df98: 80 a2 20 00 cmp %o0, 0
201df9c: 12 80 00 19 bne 201e000 <msdos_get_name_node+0xe8>
201dfa0: 01 00 00 00 nop
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
201dfa4: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1
201dfa8: c6 14 20 1a lduh [ %l0 + 0x1a ], %g3
201dfac: 83 28 60 10 sll %g1, 0x10, %g1
201dfb0: 05 00 00 3f sethi %hi(0xfc00), %g2
201dfb4: b3 30 60 18 srl %g1, 0x18, %i1
201dfb8: 84 10 a3 ff or %g2, 0x3ff, %g2
201dfbc: 83 30 60 08 srl %g1, 8, %g1
201dfc0: 82 08 40 02 and %g1, %g2, %g1
201dfc4: 87 28 e0 10 sll %g3, 0x10, %g3
201dfc8: b2 16 40 01 or %i1, %g1, %i1
201dfcc: 89 30 e0 18 srl %g3, 0x18, %g4
201dfd0: b3 2e 60 10 sll %i1, 0x10, %i1
201dfd4: 87 30 e0 08 srl %g3, 8, %g3
201dfd8: 84 08 c0 02 and %g3, %g2, %g2
201dfdc: 82 11 00 02 or %g4, %g2, %g1
/* are we right under root dir ? */
if (dotdot_cln == 0)
201dfe0: b2 96 40 01 orcc %i1, %g1, %i1
201dfe4: 12 80 00 0e bne 201e01c <msdos_get_name_node+0x104> <== NEVER TAKEN
201dfe8: 82 10 3f ff mov -1, %g1
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
201dfec: c0 27 60 04 clr [ %i5 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
201dff0: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
201dff4: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
201dff8: 82 10 20 01 mov 1, %g1
201dffc: c2 27 40 00 st %g1, [ %i5 ]
}
}
}
}
return rc;
}
201e000: 81 c7 e0 08 ret
201e004: 91 e8 00 1c restore %g0, %i4, %o0
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
201e008: 80 a2 20 00 cmp %o0, 0
201e00c: 22 bf ff d4 be,a 201df5c <msdos_get_name_node+0x44> <== ALWAYS TAKEN
201e010: 80 a6 60 00 cmp %i1, 0
}
}
}
}
return rc;
}
201e014: 81 c7 e0 08 ret <== NOT EXECUTED
201e018: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
201e01c: f0 06 20 10 ld [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
201e020: b4 10 00 1d mov %i5, %i2 <== NOT EXECUTED
201e024: 7f ff ff 02 call 201dc2c <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
201e028: 97 e8 00 10 restore %g0, %l0, %o3 <== NOT EXECUTED
0201c9c4 <msdos_get_token>:
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
201c9c4: 9d e3 bf a0 save %sp, -96, %sp
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
201c9c8: c0 26 80 00 clr [ %i2 ]
*ret_token_len = 0;
201c9cc: c0 26 c0 00 clr [ %i3 ]
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
201c9d0: b8 10 00 18 mov %i0, %i4
int i = 0;
*ret_token = NULL;
*ret_token_len = 0;
if (pathlen == 0)
201c9d4: 80 a6 60 00 cmp %i1, 0
201c9d8: 02 80 00 2a be 201ca80 <msdos_get_token+0xbc>
201c9dc: b0 10 20 00 clr %i0
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
201c9e0: 23 00 80 c5 sethi %hi(0x2031400), %l1
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201c9e4: 25 00 80 c5 sethi %hi(0x2031400), %l2
int i = 0;
*ret_token = NULL;
*ret_token_len = 0;
if (pathlen == 0)
201c9e8: ba 10 20 00 clr %i5
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
201c9ec: a2 14 61 18 or %l1, 0x118, %l1
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
201c9f0: 27 00 80 ca sethi %hi(0x2032800), %l3
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201c9f4: 10 80 00 06 b 201ca0c <msdos_get_token+0x48>
201c9f8: a4 14 a1 20 or %l2, 0x120, %l2
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
return MSDOS_INVALID_TOKEN;
++i;
201c9fc: ba 07 60 01 inc %i5
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
201ca00: 80 a7 61 04 cmp %i5, 0x104
201ca04: 02 80 00 1f be 201ca80 <msdos_get_token+0xbc> <== NEVER TAKEN
201ca08: b0 10 20 04 mov 4, %i0
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
201ca0c: 7f ff ad e0 call 200818c <rtems_filesystem_is_separator>
201ca10: d0 4f 00 1d ldsb [ %i4 + %i5 ], %o0
201ca14: 80 a2 20 00 cmp %o0, 0
201ca18: 12 80 00 1c bne 201ca88 <msdos_get_token+0xc4>
201ca1c: 80 a7 40 19 cmp %i5, %i1
201ca20: 16 80 00 1a bge 201ca88 <msdos_get_token+0xc4> <== NEVER TAKEN
201ca24: 90 10 00 11 mov %l1, %o0
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
201ca28: f0 4f 00 1d ldsb [ %i4 + %i5 ], %i0
201ca2c: 92 10 00 18 mov %i0, %o1
201ca30: 40 00 14 2a call 2021ad8 <strchr>
201ca34: e0 0f 00 1d ldub [ %i4 + %i5 ], %l0
201ca38: 80 a2 20 00 cmp %o0, 0
201ca3c: 32 bf ff f1 bne,a 201ca00 <msdos_get_token+0x3c> <== NEVER TAKEN
201ca40: ba 07 60 01 inc %i5 <== NOT EXECUTED
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
201ca44: 80 a6 20 2e cmp %i0, 0x2e
201ca48: 02 bf ff ed be 201c9fc <msdos_get_token+0x38>
201ca4c: a0 0c 20 ff and %l0, 0xff, %l0
201ca50: c2 04 e2 1c ld [ %l3 + 0x21c ], %g1
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201ca54: 90 10 00 12 mov %l2, %o0
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
201ca58: a0 00 40 10 add %g1, %l0, %l0
201ca5c: c2 0c 20 01 ldub [ %l0 + 1 ], %g1
201ca60: 80 88 60 07 btst 7, %g1
201ca64: 12 bf ff e6 bne 201c9fc <msdos_get_token+0x38>
201ca68: 92 10 00 18 mov %i0, %o1
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201ca6c: 40 00 14 1b call 2021ad8 <strchr>
201ca70: 01 00 00 00 nop
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
201ca74: 80 a2 20 00 cmp %o0, 0
201ca78: 12 bf ff e1 bne 201c9fc <msdos_get_token+0x38> <== ALWAYS TAKEN
201ca7c: b0 10 20 04 mov 4, %i0
201ca80: 81 c7 e0 08 ret
201ca84: 81 e8 00 00 restore
*ret_token = path;
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
201ca88: 80 a7 60 00 cmp %i5, 0
201ca8c: 12 80 00 0b bne 201cab8 <msdos_get_token+0xf4>
201ca90: f8 26 80 00 st %i4, [ %i2 ]
{
if ( (*path != '\0') && pathlen )
201ca94: c2 4f 00 00 ldsb [ %i4 ], %g1
201ca98: 80 a0 60 00 cmp %g1, 0
201ca9c: 22 80 00 04 be,a 201caac <msdos_get_token+0xe8>
201caa0: b0 10 20 00 clr %i0
{
i++;
201caa4: ba 10 20 01 mov 1, %i5
type = MSDOS_CURRENT_DIR;
201caa8: b0 10 20 01 mov 1, %i0
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
201caac: fa 26 c0 00 st %i5, [ %i3 ]
type = MSDOS_CURRENT_DIR;
return type;
}
}
return type;
201cab0: 81 c7 e0 08 ret
201cab4: 81 e8 00 00 restore
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
201cab8: 80 a7 60 02 cmp %i5, 2
201cabc: 02 80 00 0c be 201caec <msdos_get_token+0x128>
201cac0: fa 26 c0 00 st %i5, [ %i3 ]
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
201cac4: 80 a7 60 01 cmp %i5, 1
201cac8: 12 bf ff ee bne 201ca80 <msdos_get_token+0xbc>
201cacc: b0 10 20 03 mov 3, %i0
201cad0: c2 4f 00 00 ldsb [ %i4 ], %g1
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
msdos_token_types_t type = MSDOS_NAME;
201cad4: 82 18 60 2e xor %g1, 0x2e, %g1
201cad8: 80 a0 00 01 cmp %g0, %g1
201cadc: b0 40 3f ff addx %g0, -1, %i0
201cae0: b0 0e 3f fe and %i0, -2, %i0
201cae4: 81 c7 e0 08 ret
201cae8: 91 ee 20 03 restore %i0, 3, %o0
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
201caec: c2 4f 00 00 ldsb [ %i4 ], %g1
201caf0: 80 a0 60 2e cmp %g1, 0x2e
201caf4: 12 bf ff e3 bne 201ca80 <msdos_get_token+0xbc> <== NEVER TAKEN
201caf8: b0 10 20 03 mov 3, %i0
201cafc: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
msdos_token_types_t type = MSDOS_NAME;
201cb00: 82 18 60 2e xor %g1, 0x2e, %g1
201cb04: 80 a0 00 01 cmp %g0, %g1
201cb08: b0 46 3f ff addx %i0, -1, %i0
201cb0c: 81 c7 e0 08 ret
201cb10: 81 e8 00 00 restore
0201064c <msdos_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
201064c: 9d e3 bf 88 save %sp, -120, %sp
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
2010650: 90 10 20 01 mov 1, %o0
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
2010654: c0 27 bf fc clr [ %fp + -4 ]
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
2010658: 92 10 20 a0 mov 0xa0, %o1
201065c: 7f ff d5 97 call 2005cb8 <calloc>
2010660: b8 10 00 18 mov %i0, %i4
if (!fs_info)
2010664: 80 a2 20 00 cmp %o0, 0
2010668: 02 80 00 56 be 20107c0 <msdos_initialize_support+0x174> <== NEVER TAKEN
201066c: ba 10 00 08 mov %o0, %i5
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
2010670: d0 27 20 34 st %o0, [ %i4 + 0x34 ]
rc = fat_init_volume_info(temp_mt_entry);
2010674: 40 00 14 e1 call 20159f8 <fat_init_volume_info>
2010678: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
201067c: b0 92 20 00 orcc %o0, 0, %i0
2010680: 12 80 00 36 bne 2010758 <msdos_initialize_support+0x10c> <== NEVER TAKEN
2010684: 82 10 3f ff mov -1, %g1
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
2010688: f4 27 60 94 st %i2, [ %i5 + 0x94 ]
fs_info->directory_handlers = directory_handlers;
201068c: f6 27 60 90 st %i3, [ %i5 + 0x90 ]
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
2010690: c0 27 bf f0 clr [ %fp + -16 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2010694: c2 27 bf f4 st %g1, [ %fp + -12 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2010698: c2 27 bf f8 st %g1, [ %fp + -8 ]
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
201069c: b4 10 20 01 mov 1, %i2
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
20106a0: 90 10 00 1c mov %i4, %o0
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
20106a4: f4 27 bf ec st %i2, [ %fp + -20 ]
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
20106a8: 92 07 bf ec add %fp, -20, %o1
20106ac: 40 00 0e 14 call 2013efc <fat_file_open>
20106b0: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
20106b4: b0 92 20 00 orcc %o0, 0, %i0
20106b8: 12 80 00 2e bne 2010770 <msdos_initialize_support+0x124> <== NEVER TAKEN
20106bc: d2 07 bf fc ld [ %fp + -4 ], %o1
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
20106c0: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
20106c4: 05 00 08 00 sethi %hi(0x200000), %g2
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
20106c8: f4 22 60 10 st %i2, [ %o1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
20106cc: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
fat_fd->cln = fs_info->fat.vol.rdir_cl;
20106d0: c2 22 60 1c st %g1, [ %o1 + 0x1c ]
fat_fd->map.file_cln = 0;
20106d4: c0 22 60 34 clr [ %o1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
20106d8: 80 a0 60 00 cmp %g1, 0
20106dc: 12 80 00 2b bne 2010788 <msdos_initialize_support+0x13c> <== NEVER TAKEN
20106e0: c2 22 60 38 st %g1, [ %o1 + 0x38 ]
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
20106e4: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
20106e8: d0 17 60 06 lduh [ %i5 + 6 ], %o0
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
20106ec: 80 a2 00 01 cmp %o0, %g1
20106f0: 0a 80 00 1e bcs 2010768 <msdos_initialize_support+0x11c> <== ALWAYS TAKEN
20106f4: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
20106f8: 7f ff d5 70 call 2005cb8 <calloc>
20106fc: 92 10 20 01 mov 1, %o1
if (fs_info->cl_buf == NULL)
2010700: 80 a2 20 00 cmp %o0, 0
2010704: 02 80 00 28 be 20107a4 <msdos_initialize_support+0x158> <== NEVER TAKEN
2010708: d0 27 60 9c st %o0, [ %i5 + 0x9c ]
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
sc = rtems_semaphore_create(3,
201070c: 90 10 20 03 mov 3, %o0
2010710: 92 10 20 01 mov 1, %o1
2010714: 94 10 20 10 mov 0x10, %o2
2010718: 96 10 20 00 clr %o3
201071c: 7f ff ea 2e call 200afd4 <rtems_semaphore_create>
2010720: 98 07 60 98 add %i5, 0x98, %o4
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
2010724: 80 a2 20 00 cmp %o0, 0
2010728: 12 80 00 2c bne 20107d8 <msdos_initialize_support+0x18c> <== NEVER TAKEN
201072c: c2 07 bf fc ld [ %fp + -4 ], %g1
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
2010730: f6 27 20 24 st %i3, [ %i4 + 0x24 ]
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
2010734: c2 27 20 1c st %g1, [ %i4 + 0x1c ]
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
2010738: f2 27 20 28 st %i1, [ %i4 + 0x28 ]
return rc;
}
201073c: 81 c7 e0 08 ret
2010740: 81 e8 00 00 restore
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
2010744: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2010748: 40 00 0f af call 2014604 <fat_file_close> <== NOT EXECUTED
201074c: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
2010750: 40 00 14 5d call 20158c4 <fat_shutdown_drive> <== NOT EXECUTED
2010754: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
2010758: 7f ff d7 80 call 2006558 <free> <== NOT EXECUTED
201075c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2010760: 81 c7 e0 08 ret <== NOT EXECUTED
2010764: 81 e8 00 00 restore <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
2010768: 10 bf ff e4 b 20106f8 <msdos_initialize_support+0xac>
201076c: 90 10 00 01 mov %g1, %o0
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
if (rc != RC_OK)
{
fat_shutdown_drive(temp_mt_entry);
2010770: 40 00 14 55 call 20158c4 <fat_shutdown_drive> <== NOT EXECUTED
2010774: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
2010778: 7f ff d7 78 call 2006558 <free> <== NOT EXECUTED
201077c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2010780: 81 c7 e0 08 ret <== NOT EXECUTED
2010784: 81 e8 00 00 restore <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
2010788: 40 00 11 c2 call 2014e90 <fat_file_size> <== NOT EXECUTED
201078c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if ( rc != RC_OK )
2010790: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2010794: 12 bf ff ec bne 2010744 <msdos_initialize_support+0xf8> <== NOT EXECUTED
2010798: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
201079c: 10 bf ff d7 b 20106f8 <msdos_initialize_support+0xac> <== NOT EXECUTED
20107a0: d0 17 60 06 lduh [ %i5 + 6 ], %o0 <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
20107a4: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
20107a8: 40 00 0f 97 call 2014604 <fat_file_close> <== NOT EXECUTED
20107ac: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
20107b0: 40 00 14 45 call 20158c4 <fat_shutdown_drive> <== NOT EXECUTED
20107b4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
20107b8: 7f ff d7 68 call 2006558 <free> <== NOT EXECUTED
20107bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
20107c0: 40 00 40 5e call 2020938 <__errno> <== NOT EXECUTED
20107c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20107c8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
20107cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20107d0: 81 c7 e0 08 ret <== NOT EXECUTED
20107d4: 81 e8 00 00 restore <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
20107d8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
20107dc: 40 00 0f 8a call 2014604 <fat_file_close> <== NOT EXECUTED
20107e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
20107e4: 40 00 14 38 call 20158c4 <fat_shutdown_drive> <== NOT EXECUTED
20107e8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info->cl_buf);
20107ec: d0 07 60 9c ld [ %i5 + 0x9c ], %o0 <== NOT EXECUTED
20107f0: 7f ff d7 5a call 2006558 <free> <== NOT EXECUTED
20107f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info);
20107f8: 7f ff d7 58 call 2006558 <free> <== NOT EXECUTED
20107fc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
2010800: 40 00 40 4e call 2020938 <__errno> <== NOT EXECUTED
2010804: 01 00 00 00 nop <== NOT EXECUTED
2010808: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
201080c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2010810: 81 c7 e0 08 ret <== NOT EXECUTED
2010814: 81 e8 00 00 restore <== NOT EXECUTED
0201c898 <msdos_long_to_short>:
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
201c898: 9d e3 bf a0 save %sp, -96, %sp
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
201c89c: 92 10 20 20 mov 0x20, %o1
201c8a0: 90 10 00 1a mov %i2, %o0
201c8a4: 40 00 13 30 call 2021564 <memset>
201c8a8: 94 10 00 1b mov %i3, %o2
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
201c8ac: c2 0e 00 00 ldub [ %i0 ], %g1
201c8b0: 83 28 60 18 sll %g1, 0x18, %g1
201c8b4: 85 38 60 18 sra %g1, 0x18, %g2
201c8b8: 84 18 a0 2e xor %g2, 0x2e, %g2
201c8bc: 80 a0 00 02 cmp %g0, %g2
201c8c0: 84 60 3f ff subx %g0, -1, %g2
201c8c4: 80 a6 60 01 cmp %i1, 1
201c8c8: 02 80 00 16 be 201c920 <msdos_long_to_short+0x88> <== NEVER TAKEN
201c8cc: ba 10 00 18 mov %i0, %i5
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
201c8d0: 80 a0 a0 00 cmp %g2, 0
201c8d4: 12 80 00 24 bne 201c964 <msdos_long_to_short+0xcc> <== NEVER TAKEN
201c8d8: 80 a6 60 02 cmp %i1, 2
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
201c8dc: 80 a6 60 00 cmp %i1, 0
201c8e0: 04 80 00 35 ble 201c9b4 <msdos_long_to_short+0x11c> <== NEVER TAKEN
201c8e4: 83 38 60 18 sra %g1, 0x18, %g1
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201c8e8: 80 a0 60 20 cmp %g1, 0x20
201c8ec: 12 80 00 2e bne 201c9a4 <msdos_long_to_short+0x10c> <== ALWAYS TAKEN
201c8f0: 80 a0 60 2e cmp %g1, 0x2e
201c8f4: 10 80 00 05 b 201c908 <msdos_long_to_short+0x70> <== NOT EXECUTED
201c8f8: 82 10 20 00 clr %g1 <== NOT EXECUTED
201c8fc: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
201c900: 12 80 00 0f bne 201c93c <msdos_long_to_short+0xa4> <== NOT EXECUTED
201c904: 80 a0 a0 20 cmp %g2, 0x20 <== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
201c908: 82 00 60 01 inc %g1 <== NOT EXECUTED
201c90c: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED
201c910: 32 bf ff fb bne,a 201c8fc <msdos_long_to_short+0x64> <== NOT EXECUTED
201c914: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 <== NOT EXECUTED
if (i == lfn_len)
{
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: INVALID[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
201c918: 81 c7 e0 08 ret <== NOT EXECUTED
201c91c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
201c920: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201c924: 02 bf ff ec be 201c8d4 <msdos_long_to_short+0x3c> <== NOT EXECUTED
201c928: 01 00 00 00 nop <== NOT EXECUTED
{
sfn[0] = '.';
201c92c: 82 10 20 2e mov 0x2e, %g1 ! 2e <PROM_START+0x2e> <== NOT EXECUTED
201c930: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
201c934: 81 c7 e0 08 ret <== NOT EXECUTED
201c938: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201c93c: 02 bf ff f4 be 201c90c <msdos_long_to_short+0x74> <== NOT EXECUTED
201c940: 82 00 60 01 inc %g1 <== NOT EXECUTED
/*
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
201c944: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201c948: 7f ff ff 76 call 201c720 <msdos_name_type>
201c94c: 92 10 00 19 mov %i1, %o1
if (type == MSDOS_NAME_INVALID)
201c950: b0 92 20 00 orcc %o0, 0, %i0
201c954: 12 80 00 0f bne 201c990 <msdos_long_to_short+0xf8>
201c958: 90 10 00 1d mov %i5, %o0
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
201c95c: 81 c7 e0 08 ret
201c960: 81 e8 00 00 restore
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
201c964: 12 bf ff df bne 201c8e0 <msdos_long_to_short+0x48> <== NOT EXECUTED
201c968: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201c96c: c4 4f 60 01 ldsb [ %i5 + 1 ], %g2 <== NOT EXECUTED
201c970: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
201c974: 32 bf ff db bne,a 201c8e0 <msdos_long_to_short+0x48> <== NOT EXECUTED
201c978: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
201c97c: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED
201c980: c2 2e a0 01 stb %g1, [ %i2 + 1 ] <== NOT EXECUTED
201c984: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
201c988: 81 c7 e0 08 ret <== NOT EXECUTED
201c98c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
201c990: 92 10 00 19 mov %i1, %o1
201c994: 40 00 0c e1 call 201fd18 <msdos_filename_unix2dos>
201c998: 94 10 00 1a mov %i2, %o2
201c99c: 81 c7 e0 08 ret
201c9a0: 81 e8 00 00 restore
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
201c9a4: 02 bf ff d9 be 201c908 <msdos_long_to_short+0x70> <== NEVER TAKEN
201c9a8: 82 10 20 00 clr %g1
/*
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
201c9ac: 10 bf ff e7 b 201c948 <msdos_long_to_short+0xb0>
201c9b0: 90 10 00 1d mov %i5, %o0
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
201c9b4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201c9b8: 12 bf ff e3 bne 201c944 <msdos_long_to_short+0xac> <== NOT EXECUTED
201c9bc: b0 10 20 00 clr %i0 <== NOT EXECUTED
201c9c0: 30 bf ff f7 b,a 201c99c <msdos_long_to_short+0x104> <== NOT EXECUTED
02010818 <msdos_mknod>:
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
2010818: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
201081c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
2010820: 05 00 00 3c sethi %hi(0xf000), %g2
rtems_filesystem_location_info_t *pathloc
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
2010824: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
2010828: 84 0e 40 02 and %i1, %g2, %g2
201082c: 03 00 00 10 sethi %hi(0x4000), %g1
2010830: 80 a0 80 01 cmp %g2, %g1
2010834: 02 80 00 1a be 201089c <msdos_mknod+0x84>
2010838: 03 00 00 20 sethi %hi(0x8000), %g1
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
201083c: 80 a0 80 01 cmp %g2, %g1
2010840: 12 80 00 1f bne 20108bc <msdos_mknod+0xa4> <== NEVER TAKEN
2010844: b6 10 20 05 mov 5, %i3
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2010848: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
201084c: 92 10 20 00 clr %o1
2010850: 7f ff ea 88 call 200b270 <rtems_semaphore_obtain>
2010854: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2010858: 80 a2 20 00 cmp %o0, 0
201085c: 12 80 00 12 bne 20108a4 <msdos_mknod+0x8c> <== NEVER TAKEN
2010860: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
2010864: 40 00 47 01 call 2022468 <strlen>
2010868: 90 10 00 18 mov %i0, %o0
201086c: 94 10 00 18 mov %i0, %o2
2010870: 96 10 00 08 mov %o0, %o3
2010874: 92 10 00 1b mov %i3, %o1
2010878: 90 10 00 1c mov %i4, %o0
201087c: 98 10 00 19 mov %i1, %o4
2010880: 40 00 2b 70 call 201b640 <msdos_creat_node>
2010884: 9a 10 20 00 clr %o5
2010888: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
201088c: 7f ff ea c3 call 200b398 <rtems_semaphore_release>
2010890: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
return rc;
}
2010894: 81 c7 e0 08 ret
2010898: 81 e8 00 00 restore
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
201089c: 10 bf ff eb b 2010848 <msdos_mknod+0x30>
20108a0: b6 10 20 01 mov 1, %i3
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
20108a4: 40 00 40 25 call 2020938 <__errno> <== NOT EXECUTED
20108a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20108ac: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20108b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20108b4: 81 c7 e0 08 ret <== NOT EXECUTED
20108b8: 81 e8 00 00 restore <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
20108bc: 40 00 40 1f call 2020938 <__errno> <== NOT EXECUTED
20108c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20108c4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20108c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20108cc: 81 c7 e0 08 ret <== NOT EXECUTED
20108d0: 81 e8 00 00 restore <== NOT EXECUTED
0201c720 <msdos_name_type>:
*
*/
#define MSDOS_NAME_TYPE_PRINT 0
static msdos_name_type_t
msdos_name_type(const char *name, int name_len)
{
201c720: 9d e3 bf a0 save %sp, -96, %sp
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
201c724: 80 a6 60 00 cmp %i1, 0
201c728: 04 80 00 5a ble 201c890 <msdos_name_type+0x170> <== NEVER TAKEN
201c72c: f6 0e 00 00 ldub [ %i0 ], %i3
201c730: b5 2e e0 18 sll %i3, 0x18, %i2
201c734: 80 a6 a0 00 cmp %i2, 0
201c738: 02 80 00 56 be 201c890 <msdos_name_type+0x170> <== NEVER TAKEN
201c73c: 25 00 80 c5 sethi %hi(0x2031400), %l2
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201c740: 2d 00 80 c5 sethi %hi(0x2031400), %l6
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
201c744: b8 10 00 18 mov %i0, %i4
msdos_name_type(const char *name, int name_len)
{
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
201c748: ba 10 20 00 clr %i5
static msdos_name_type_t
msdos_name_type(const char *name, int name_len)
{
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
201c74c: a0 10 3f ff mov -1, %l0
#define MSDOS_NAME_TYPE_PRINT 0
static msdos_name_type_t
msdos_name_type(const char *name, int name_len)
{
bool lowercase = false;
bool uppercase = false;
201c750: a6 10 20 00 clr %l3
*/
#define MSDOS_NAME_TYPE_PRINT 0
static msdos_name_type_t
msdos_name_type(const char *name, int name_len)
{
bool lowercase = false;
201c754: a8 10 20 00 clr %l4
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
201c758: a4 14 a1 18 or %l2, 0x118, %l2
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
201c75c: 2b 00 80 ca sethi %hi(0x2032800), %l5
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201c760: ac 15 a1 20 or %l6, 0x120, %l6
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
201c764: b5 3e a0 18 sra %i2, 0x18, %i2
201c768: 90 10 00 12 mov %l2, %o0
201c76c: 40 00 14 db call 2021ad8 <strchr>
201c770: 92 10 00 1a mov %i2, %o1
201c774: 80 a2 20 00 cmp %o0, 0
201c778: 02 80 00 04 be 201c788 <msdos_name_type+0x68> <== ALWAYS TAKEN
201c77c: 82 1e a0 2e xor %i2, 0x2e, %g1
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[1]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
201c780: 81 c7 e0 08 ret <== NOT EXECUTED
201c784: 91 e8 20 02 restore %g0, 2, %o0 <== NOT EXECUTED
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
201c788: 80 a0 00 01 cmp %g0, %g1
201c78c: a2 60 3f ff subx %g0, -1, %l1
201c790: 80 a4 60 00 cmp %l1, 0
201c794: 12 80 00 0f bne 201c7d0 <msdos_name_type+0xb0> <== NEVER TAKEN
201c798: c4 05 62 1c ld [ %l5 + 0x21c ], %g2
201c79c: 82 0e e0 ff and %i3, 0xff, %g1
201c7a0: 82 00 80 01 add %g2, %g1, %g1
201c7a4: c2 08 60 01 ldub [ %g1 + 1 ], %g1
201c7a8: 80 88 60 07 btst 7, %g1
201c7ac: 12 80 00 09 bne 201c7d0 <msdos_name_type+0xb0>
201c7b0: 90 10 00 16 mov %l6, %o0
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
201c7b4: 40 00 14 c9 call 2021ad8 <strchr>
201c7b8: 92 10 00 1a mov %i2, %o1
return MSDOS_NAME_SHORT;
201c7bc: 80 a0 00 08 cmp %g0, %o0
201c7c0: b0 40 20 00 addx %g0, 0, %i0
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
201c7c4: 80 a6 20 00 cmp %i0, 0
201c7c8: 02 80 00 30 be 201c888 <msdos_name_type+0x168>
201c7cc: 01 00 00 00 nop
return type;
if (dot_at >= 0)
201c7d0: 80 a4 3f ff cmp %l0, -1
201c7d4: 02 80 00 23 be 201c860 <msdos_name_type+0x140> <== ALWAYS TAKEN
201c7d8: 80 a4 60 00 cmp %l1, 0
{
if (is_dot || ((count - dot_at) > 3))
201c7dc: 12 bf ff e9 bne 201c780 <msdos_name_type+0x60> <== NOT EXECUTED
201c7e0: 82 27 40 10 sub %i5, %l0, %g1 <== NOT EXECUTED
201c7e4: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
201c7e8: 14 bf ff e6 bg 201c780 <msdos_name_type+0x60> <== NOT EXECUTED
201c7ec: 82 06 ff bf add %i3, -65, %g1 <== NOT EXECUTED
}
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
201c7f0: 82 08 60 ff and %g1, 0xff, %g1
201c7f4: 80 a0 60 19 cmp %g1, 0x19
201c7f8: 28 80 00 07 bleu,a 201c814 <msdos_name_type+0xf4> <== NEVER TAKEN
201c7fc: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
201c800: b6 06 ff 9f add %i3, -97, %i3
201c804: b6 0e e0 ff and %i3, 0xff, %i3
201c808: 80 a6 e0 19 cmp %i3, 0x19
201c80c: 28 80 00 02 bleu,a 201c814 <msdos_name_type+0xf4>
201c810: a8 10 20 01 mov 1, %l4
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
201c814: f6 0f 20 01 ldub [ %i4 + 1 ], %i3
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
count++;
201c818: ba 07 60 01 inc %i5
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
201c81c: b5 2e e0 18 sll %i3, 0x18, %i2
201c820: 80 a6 a0 00 cmp %i2, 0
201c824: 02 80 00 09 be 201c848 <msdos_name_type+0x128>
201c828: b8 07 20 01 inc %i4
201c82c: 80 a6 40 1d cmp %i1, %i5
201c830: 14 80 00 03 bg 201c83c <msdos_name_type+0x11c>
201c834: 82 10 20 01 mov 1, %g1
201c838: 82 10 20 00 clr %g1
201c83c: 80 88 60 ff btst 0xff, %g1
201c840: 32 bf ff ca bne,a 201c768 <msdos_name_type+0x48>
201c844: b5 3e a0 18 sra %i2, 0x18, %i2
count++;
name++;
}
if (lowercase && uppercase)
201c848: 80 8d 20 ff btst 0xff, %l4
201c84c: 02 80 00 0f be 201c888 <msdos_name_type+0x168> <== NEVER TAKEN
201c850: b0 10 20 01 mov 1, %i0
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
201c854: b0 0c e0 01 and %l3, 1, %i0
201c858: 81 c7 e0 08 ret
201c85c: 91 ee 20 01 restore %i0, 1, %o0
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
201c860: 80 a7 60 08 cmp %i5, 8
201c864: 02 80 00 06 be 201c87c <msdos_name_type+0x15c>
201c868: 80 a4 60 00 cmp %l1, 0
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
201c86c: 02 bf ff e1 be 201c7f0 <msdos_name_type+0xd0> <== ALWAYS TAKEN
201c870: 82 06 ff bf add %i3, -65, %g1
201c874: 10 bf ff e8 b 201c814 <msdos_name_type+0xf4> <== NOT EXECUTED
201c878: a0 10 00 1d mov %i5, %l0 <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
201c87c: 12 bf ff e6 bne 201c814 <msdos_name_type+0xf4> <== NEVER TAKEN
201c880: a0 10 20 08 mov 8, %l0
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[2]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
201c884: b0 10 20 02 mov 2, %i0
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
}
201c888: 81 c7 e0 08 ret
201c88c: 81 e8 00 00 restore
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
201c890: 81 c7 e0 08 ret <== NOT EXECUTED
201c894: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
020108e0 <msdos_rename>:
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
20108e0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
20108e4: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
20108e8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20108ec: 40 00 46 df call 2022468 <strlen> <== NOT EXECUTED
20108f0: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
20108f4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
20108f8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
const char *new_name)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
20108fc: f8 06 40 00 ld [ %i1 ], %i4 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
2010900: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2010904: 40 00 30 30 call 201c9c4 <msdos_get_token> <== NOT EXECUTED
2010908: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
201090c: 80 a2 20 03 cmp %o0, 3 <== NOT EXECUTED
2010910: 12 80 00 1d bne 2010984 <msdos_rename+0xa4> <== NOT EXECUTED
2010914: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
/*
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2010918: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
201091c: 7f ff ea 55 call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
2010920: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2010924: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2010928: 12 80 00 1d bne 201099c <msdos_rename+0xbc> <== NOT EXECUTED
201092c: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
2010930: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2010934: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2010938: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
201093c: 19 00 00 20 sethi %hi(0x8000), %o4 <== NOT EXECUTED
2010940: 40 00 2b 40 call 201b640 <msdos_creat_node> <== NOT EXECUTED
2010944: 9a 10 00 1c mov %i4, %o5 <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
2010948: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201094c: 12 80 00 0a bne 2010974 <msdos_rename+0x94> <== NOT EXECUTED
2010950: 92 07 20 20 add %i4, 0x20, %o1 <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
2010954: d0 06 60 10 ld [ %i1 + 0x10 ], %o0 <== NOT EXECUTED
2010958: 40 00 31 15 call 201cdac <msdos_set_first_char4file_name> <== NOT EXECUTED
201095c: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
2010960: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
2010964: 7f ff ea 8d call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2010968: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
}
201096c: 81 c7 e0 08 ret <== NOT EXECUTED
2010970: 81 e8 00 00 restore <== NOT EXECUTED
rc = msdos_creat_node(new_parent_loc,
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2010974: 7f ff ea 89 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2010978: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 <== NOT EXECUTED
return rc;
201097c: 81 c7 e0 08 ret <== NOT EXECUTED
2010980: 81 e8 00 00 restore <== NOT EXECUTED
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
2010984: 40 00 3f ed call 2020938 <__errno> <== NOT EXECUTED
2010988: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201098c: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
2010990: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2010994: 81 c7 e0 08 ret <== NOT EXECUTED
2010998: 81 e8 00 00 restore <== NOT EXECUTED
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
201099c: 40 00 3f e7 call 2020938 <__errno> <== NOT EXECUTED
20109a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20109a4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20109a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20109ac: 81 c7 e0 08 ret <== NOT EXECUTED
20109b0: 81 e8 00 00 restore <== NOT EXECUTED
0201cb14 <msdos_set_dir_wrt_time_and_date>:
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201cb14: 9d e3 bf 98 save %sp, -104, %sp
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
201cb18: d0 06 60 40 ld [ %i1 + 0x40 ], %o0
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201cb1c: f6 06 20 34 ld [ %i0 + 0x34 ], %i3
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
201cb20: 92 07 bf fe add %fp, -2, %o1
201cb24: 40 00 0b cf call 201fa60 <msdos_date_unix2dos>
201cb28: 94 07 bf fc add %fp, -4, %o2
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
201cb2c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201cb30: 80 a0 a0 00 cmp %g2, 0
201cb34: 12 80 00 06 bne 201cb4c <msdos_set_dir_wrt_time_and_date+0x38><== ALWAYS TAKEN
201cb38: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
201cb3c: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 <== NOT EXECUTED
201cb40: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
201cb44: 32 80 00 07 bne,a 201cb60 <msdos_set_dir_wrt_time_and_date+0x4c><== NOT EXECUTED
201cb48: f8 00 60 1c ld [ %g1 + 0x1c ], %i4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201cb4c: c6 08 60 05 ldub [ %g1 + 5 ], %g3
201cb50: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
201cb54: b8 00 bf fe add %g2, -2, %i4
201cb58: b9 2f 00 03 sll %i4, %g3, %i4
201cb5c: b8 07 00 01 add %i4, %g1, %i4
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cb60: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201cb64: fa 16 c0 00 lduh [ %i3 ], %i5
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cb68: c6 0e e0 02 ldub [ %i3 + 2 ], %g3
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
201cb6c: c2 17 bf fc lduh [ %fp + -4 ], %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cb70: 87 30 80 03 srl %g2, %g3, %g3
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
201cb74: 83 28 60 10 sll %g1, 0x10, %g1
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201cb78: ba 07 7f ff add %i5, -1, %i5
201cb7c: ba 0f 40 02 and %i5, %g2, %i5
time_val = CT_LE_W(time_val);
201cb80: 85 30 60 08 srl %g1, 8, %g2
201cb84: 83 30 60 18 srl %g1, 0x18, %g1
201cb88: 82 10 80 01 or %g2, %g1, %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cb8c: b8 07 00 03 add %i4, %g3, %i4
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
201cb90: 94 07 60 16 add %i5, 0x16, %o2
201cb94: 92 10 00 1c mov %i4, %o1
201cb98: 96 10 20 02 mov 2, %o3
201cb9c: 98 07 bf fc add %fp, -4, %o4
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
201cba0: c2 37 bf fc sth %g1, [ %fp + -4 ]
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
201cba4: 7f ff e1 f7 call 2015380 <_fat_block_write>
201cba8: 90 10 00 18 mov %i0, %o0
2, (char *)(&time_val));
date = CT_LE_W(date);
201cbac: c2 17 bf fe lduh [ %fp + -2 ], %g1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201cbb0: 94 07 60 18 add %i5, 0x18, %o2
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
201cbb4: 83 28 60 10 sll %g1, 0x10, %g1
201cbb8: 85 30 60 08 srl %g1, 8, %g2
201cbbc: 83 30 60 18 srl %g1, 0x18, %g1
201cbc0: 82 10 80 01 or %g2, %g1, %g1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201cbc4: 96 10 20 02 mov 2, %o3
201cbc8: 98 07 bf fe add %fp, -2, %o4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
201cbcc: c2 37 bf fe sth %g1, [ %fp + -2 ]
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201cbd0: 92 10 00 1c mov %i4, %o1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
201cbd4: b4 10 00 08 mov %o0, %i2
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201cbd8: 7f ff e1 ea call 2015380 <_fat_block_write>
201cbdc: 90 10 00 18 mov %i0, %o0
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
201cbe0: 92 10 00 1c mov %i4, %o1
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
201cbe4: b6 10 00 08 mov %o0, %i3
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
201cbe8: 94 07 60 12 add %i5, 0x12, %o2
201cbec: 90 10 00 18 mov %i0, %o0
201cbf0: 96 10 20 02 mov 2, %o3
201cbf4: 7f ff e1 e3 call 2015380 <_fat_block_write>
201cbf8: 98 07 bf fe add %fp, -2, %o4
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
201cbfc: 80 a6 e0 00 cmp %i3, 0
201cc00: 06 80 00 07 bl 201cc1c <msdos_set_dir_wrt_time_and_date+0x108><== NEVER TAKEN
201cc04: 80 a6 a0 00 cmp %i2, 0
201cc08: 06 80 00 05 bl 201cc1c <msdos_set_dir_wrt_time_and_date+0x108><== NEVER TAKEN
201cc0c: 01 00 00 00 nop
return -1;
201cc10: b1 3a 20 1f sra %o0, 0x1f, %i0
201cc14: 81 c7 e0 08 ret
201cc18: 81 e8 00 00 restore
return RC_OK;
}
201cc1c: 81 c7 e0 08 ret <== NOT EXECUTED
201cc20: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0201cd04 <msdos_set_file_size>:
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201cd04: 9d e3 bf 98 save %sp, -104, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
201cd08: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201cd0c: 90 10 00 18 mov %i0, %o0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201cd10: 80 a0 60 00 cmp %g1, 0
201cd14: 12 80 00 06 bne 201cd2c <msdos_set_file_size+0x28> <== ALWAYS TAKEN
201cd18: c8 06 20 34 ld [ %i0 + 0x34 ], %g4
201cd1c: c4 09 20 0a ldub [ %g4 + 0xa ], %g2 <== NOT EXECUTED
201cd20: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
201cd24: 32 80 00 07 bne,a 201cd40 <msdos_set_file_size+0x3c> <== NOT EXECUTED
201cd28: d2 01 20 1c ld [ %g4 + 0x1c ], %o1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201cd2c: c6 09 20 05 ldub [ %g4 + 5 ], %g3
201cd30: c4 01 20 30 ld [ %g4 + 0x30 ], %g2
201cd34: 92 00 7f fe add %g1, -2, %o1
201cd38: 93 2a 40 03 sll %o1, %g3, %o1
201cd3c: 92 02 40 02 add %o1, %g2, %o1
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
201cd40: c6 06 60 18 ld [ %i1 + 0x18 ], %g3
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cd44: c4 09 20 02 ldub [ %g4 + 2 ], %g2
201cd48: f2 06 60 24 ld [ %i1 + 0x24 ], %i1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
201cd4c: d4 11 00 00 lduh [ %g4 ], %o2
201cd50: 9f 28 e0 18 sll %g3, 0x18, %o7
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cd54: 85 36 40 02 srl %i1, %g2, %g2
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
201cd58: 83 30 e0 18 srl %g3, 0x18, %g1
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201cd5c: 89 30 e0 08 srl %g3, 8, %g4
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201cd60: 82 13 c0 01 or %o7, %g1, %g1
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
201cd64: 88 09 20 ff and %g4, 0xff, %g4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201cd68: 87 30 e0 10 srl %g3, 0x10, %g3
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201cd6c: 89 29 20 10 sll %g4, 0x10, %g4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
201cd70: 86 08 e0 ff and %g3, 0xff, %g3
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
201cd74: 82 10 40 04 or %g1, %g4, %g1
201cd78: 87 28 e0 08 sll %g3, 8, %g3
201cd7c: 82 10 40 03 or %g1, %g3, %g1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
201cd80: 92 02 40 02 add %o1, %g2, %o1
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
201cd84: c2 27 bf fc st %g1, [ %fp + -4 ]
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
201cd88: 96 10 20 04 mov 4, %o3
201cd8c: 98 07 bf fc add %fp, -4, %o4
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
201cd90: 94 02 bf ff add %o2, -1, %o2
201cd94: 94 0a 80 19 and %o2, %i1, %o2
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
201cd98: 7f ff e1 7a call 2015380 <_fat_block_write>
201cd9c: 94 02 a0 1c add %o2, 0x1c, %o2
(char *)(&le_new_length));
if ( ret < 0 )
return -1;
return RC_OK;
}
201cda0: b1 3a 20 1f sra %o0, 0x1f, %i0
201cda4: 81 c7 e0 08 ret
201cda8: 81 e8 00 00 restore
0201cdac <msdos_set_first_char4file_name>:
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201cdac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
201cdb0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
201cdb4: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED
201cdb8: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
201cdbc: f6 06 40 00 ld [ %i1 ], %i3 <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201cdc0: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201cdc4: f4 2f a0 4c stb %i2, [ %fp + 0x4c ] <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
201cdc8: c6 27 bf f8 st %g3, [ %fp + -8 ] <== NOT EXECUTED
201cdcc: c4 27 bf fc st %g2, [ %fp + -4 ] <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201cdd0: b8 10 00 18 mov %i0, %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201cdd4: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201cdd8: 02 80 00 58 be 201cf38 <msdos_set_first_char4file_name+0x18c><== NOT EXECUTED
201cddc: e0 06 60 04 ld [ %i1 + 4 ], %l0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
201cde0: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
201cde4: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201cde8: 02 80 00 5b be 201cf54 <msdos_set_first_char4file_name+0x1a8><== NOT EXECUTED
201cdec: f4 17 60 06 lduh [ %i5 + 6 ], %i2 <== NOT EXECUTED
start = dir_pos->sname;
201cdf0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201cdf4: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
201cdf8: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
201cdfc: 86 10 00 1d mov %i5, %g3 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
201ce00: 10 80 00 1e b 201ce78 <msdos_set_first_char4file_name+0xcc><== NOT EXECUTED
201ce04: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201ce08: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED
201ce0c: 22 80 00 1f be,a 201ce88 <msdos_set_first_char4file_name+0xdc><== NOT EXECUTED
201ce10: c8 08 e0 05 ldub [ %g3 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
201ce14: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
201ce18: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201ce1c: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201ce20: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201ce24: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201ce28: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201ce2c: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201ce30: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201ce34: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
201ce38: 7f ff e1 52 call 2015380 <_fat_block_write> <== NOT EXECUTED
201ce3c: 98 07 a0 4c add %fp, 0x4c, %o4 <== NOT EXECUTED
&fchar);
if (ret < 0)
201ce40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201ce44: 06 80 00 23 bl 201ced0 <msdos_set_first_char4file_name+0x124><== NOT EXECUTED
201ce48: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
201ce4c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
201ce50: 80 a2 40 1b cmp %o1, %i3 <== NOT EXECUTED
201ce54: 02 80 00 21 be 201ced8 <msdos_set_first_char4file_name+0x12c><== NOT EXECUTED
201ce58: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
201ce5c: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
if (start.ofs >= dir_block_size)
201ce60: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
201ce64: 08 80 00 23 bleu 201cef0 <msdos_set_first_char4file_name+0x144><== NOT EXECUTED
201ce68: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
201ce6c: c6 07 20 34 ld [ %i4 + 0x34 ], %g3 <== NOT EXECUTED
201ce70: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
201ce74: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201ce78: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201ce7c: 22 bf ff e3 be,a 201ce08 <msdos_set_first_char4file_name+0x5c><== NOT EXECUTED
201ce80: c8 08 e0 0a ldub [ %g3 + 0xa ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201ce84: c8 08 e0 05 ldub [ %g3 + 5 ], %g4 <== NOT EXECUTED
201ce88: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
201ce8c: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
201ce90: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201ce94: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
201ce98: 93 2a 40 04 sll %o1, %g4, %o1 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201ce9c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201cea0: 92 02 40 03 add %o1, %g3, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201cea4: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201cea8: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
201ceac: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
201ceb0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201ceb4: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
201ceb8: 7f ff e1 32 call 2015380 <_fat_block_write> <== NOT EXECUTED
201cebc: 98 07 a0 4c add %fp, 0x4c, %o4 <== NOT EXECUTED
&fchar);
if (ret < 0)
201cec0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201cec4: 16 bf ff e3 bge 201ce50 <msdos_set_first_char4file_name+0xa4><== NOT EXECUTED
201cec8: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
return -1;
201cecc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
201ced0: 81 c7 e0 08 ret <== NOT EXECUTED
201ced4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
&fchar);
if (ret < 0)
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
201ced8: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
201cedc: 32 bf ff e1 bne,a 201ce60 <msdos_set_first_char4file_name+0xb4><== NOT EXECUTED
201cee0: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
return rc;
start.ofs = 0;
}
}
return RC_OK;
201cee4: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
201cee8: 81 c7 e0 08 ret <== NOT EXECUTED
201ceec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201cef0: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
201cef4: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201cef8: 12 80 00 06 bne 201cf10 <msdos_set_first_char4file_name+0x164><== NOT EXECUTED
201cefc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201cf00: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201cf04: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201cf08: 32 bf ff f8 bne,a 201cee8 <msdos_set_first_char4file_name+0x13c><== NOT EXECUTED
201cf0c: 90 10 20 00 clr %o0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
201cf10: 40 00 05 f5 call 201e6e4 <fat_get_fat_cluster> <== NOT EXECUTED
201cf14: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
201cf18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201cf1c: 12 bf ff ed bne 201ced0 <msdos_set_first_char4file_name+0x124><== NOT EXECUTED
201cf20: 82 10 20 00 clr %g1 <== NOT EXECUTED
return rc;
start.ofs = 0;
201cf24: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
201cf28: c6 07 20 34 ld [ %i4 + 0x34 ], %g3 <== NOT EXECUTED
201cf2c: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
201cf30: 10 bf ff b4 b 201ce00 <msdos_set_first_char4file_name+0x54><== NOT EXECUTED
201cf34: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
201cf38: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
201cf3c: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
201cf40: 02 bf ff a9 be 201cde4 <msdos_set_first_char4file_name+0x38><== NOT EXECUTED
201cf44: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
201cf48: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
201cf4c: 12 bf ff a9 bne 201cdf0 <msdos_set_first_char4file_name+0x44><== NOT EXECUTED
201cf50: f4 07 60 28 ld [ %i5 + 0x28 ], %i2 <== NOT EXECUTED
start = dir_pos->sname;
201cf54: c4 06 40 00 ld [ %i1 ], %g2 <== NOT EXECUTED
201cf58: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED
201cf5c: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
201cf60: 10 bf ff a4 b 201cdf0 <msdos_set_first_char4file_name+0x44><== NOT EXECUTED
201cf64: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
0201cc24 <msdos_set_first_cluster_num>:
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
201cc24: 9d e3 bf 98 save %sp, -104, %sp
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
201cc28: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
201cc2c: c0 37 bf fe clrh [ %fp + -2 ]
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
201cc30: f6 06 60 1c ld [ %i1 + 0x1c ], %i3
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
201cc34: 80 a0 60 00 cmp %g1, 0
201cc38: 12 80 00 06 bne 201cc50 <msdos_set_first_cluster_num+0x2c>
201cc3c: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
201cc40: c6 08 a0 0a ldub [ %g2 + 0xa ], %g3
201cc44: 80 88 e0 03 btst 3, %g3
201cc48: 32 80 00 07 bne,a 201cc64 <msdos_set_first_cluster_num+0x40><== ALWAYS TAKEN
201cc4c: f8 00 a0 1c ld [ %g2 + 0x1c ], %i4
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
201cc50: c8 08 a0 05 ldub [ %g2 + 5 ], %g4
201cc54: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3
201cc58: b8 00 7f fe add %g1, -2, %i4
201cc5c: b9 2f 00 04 sll %i4, %g4, %i4
201cc60: b8 07 00 03 add %i4, %g3, %i4
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cc64: c6 06 60 24 ld [ %i1 + 0x24 ], %g3
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201cc68: fa 10 80 00 lduh [ %g2 ], %i5
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cc6c: c4 08 a0 02 ldub [ %g2 + 2 ], %g2
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
201cc70: 83 2e e0 10 sll %i3, 0x10, %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
201cc74: 85 30 c0 02 srl %g3, %g2, %g2
201cc78: b8 07 00 02 add %i4, %g2, %i4
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
201cc7c: 85 30 60 08 srl %g1, 8, %g2
201cc80: 83 30 60 18 srl %g1, 0x18, %g1
201cc84: 82 10 80 01 or %g2, %g1, %g1
ret1 = _fat_block_write(mt_entry, sec,
201cc88: 92 10 00 1c mov %i4, %o1
201cc8c: 96 10 20 02 mov 2, %o3
201cc90: 98 07 bf fc add %fp, -4, %o4
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
201cc94: c2 37 bf fc sth %g1, [ %fp + -4 ]
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201cc98: ba 07 7f ff add %i5, -1, %i5
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
201cc9c: 90 10 00 18 mov %i0, %o0
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
201cca0: ba 0f 40 03 and %i5, %g3, %i5
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
201cca4: 7f ff e1 b7 call 2015380 <_fat_block_write>
201cca8: 94 07 60 1a add %i5, 0x1a, %o2
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201ccac: b7 36 e0 10 srl %i3, 0x10, %i3
201ccb0: b7 2e e0 10 sll %i3, 0x10, %i3
201ccb4: 83 36 e0 08 srl %i3, 8, %g1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
201ccb8: b4 10 00 08 mov %o0, %i2
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
201ccbc: 92 10 00 1c mov %i4, %o1
201ccc0: 90 10 00 18 mov %i0, %o0
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201ccc4: b7 36 e0 18 srl %i3, 0x18, %i3
ret2 = _fat_block_write(mt_entry, sec,
201ccc8: 94 07 60 14 add %i5, 0x14, %o2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201cccc: b6 10 40 1b or %g1, %i3, %i3
ret2 = _fat_block_write(mt_entry, sec,
201ccd0: 96 10 20 02 mov 2, %o3
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
201ccd4: f6 37 bf fe sth %i3, [ %fp + -2 ]
ret2 = _fat_block_write(mt_entry, sec,
201ccd8: 7f ff e1 aa call 2015380 <_fat_block_write>
201ccdc: 98 07 bf fe add %fp, -2, %o4
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
201cce0: 80 a2 20 00 cmp %o0, 0
201cce4: 06 80 00 06 bl 201ccfc <msdos_set_first_cluster_num+0xd8> <== NEVER TAKEN
201cce8: 80 a6 a0 00 cmp %i2, 0
201ccec: 06 80 00 04 bl 201ccfc <msdos_set_first_cluster_num+0xd8> <== NEVER TAKEN
201ccf0: b0 10 20 00 clr %i0
return -1;
return RC_OK;
}
201ccf4: 81 c7 e0 08 ret
201ccf8: 81 e8 00 00 restore
201ccfc: 81 c7 e0 08 ret <== NOT EXECUTED
201cd00: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0201c6cc <msdos_shut_down>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
201c6cc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
201c6d0: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
201c6d4: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
201c6d8: 7f ff df cb call 2014604 <fat_file_close> <== NOT EXECUTED
201c6dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
201c6e0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
201c6e4: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
201c6e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201c6ec: 7f ff e4 76 call 20158c4 <fat_shutdown_drive> <== NOT EXECUTED
201c6f0: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED
201c6f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201c6f8: 32 80 00 02 bne,a 201c700 <msdos_shut_down+0x34> <== NOT EXECUTED
201c6fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
201c700: 7f ff ba a5 call 200b194 <rtems_semaphore_delete> <== NOT EXECUTED
201c704: d0 07 20 98 ld [ %i4 + 0x98 ], %o0 <== NOT EXECUTED
free(fs_info->cl_buf);
201c708: 7f ff a7 94 call 2006558 <free> <== NOT EXECUTED
201c70c: d0 07 20 9c ld [ %i4 + 0x9c ], %o0 <== NOT EXECUTED
free(temp_mt_entry->fs_info);
201c710: 7f ff a7 92 call 2006558 <free> <== NOT EXECUTED
201c714: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
return rc;
}
201c718: 81 c7 e0 08 ret <== NOT EXECUTED
201c71c: 81 e8 00 00 restore <== NOT EXECUTED
02004078 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
2004078: 9d e3 bf a0 save %sp, -96, %sp
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
200407c: 03 00 80 7a sethi %hi(0x201e800), %g1
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
2004080: 80 a6 00 19 cmp %i0, %i1
2004084: 02 80 00 03 be 2004090 <newlib_delete_hook+0x18>
2004088: fa 00 63 38 ld [ %g1 + 0x338 ], %i5
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
200408c: fa 06 61 54 ld [ %i1 + 0x154 ], %i5
}
if (ptr && ptr != _global_impure_ptr) {
2004090: 80 a7 60 00 cmp %i5, 0
2004094: 02 80 00 0b be 20040c0 <newlib_delete_hook+0x48> <== NEVER TAKEN
2004098: 03 00 80 77 sethi %hi(0x201dc00), %g1
200409c: c2 00 60 d8 ld [ %g1 + 0xd8 ], %g1 ! 201dcd8 <_global_impure_ptr>
20040a0: 80 a7 40 01 cmp %i5, %g1
20040a4: 02 80 00 07 be 20040c0 <newlib_delete_hook+0x48>
20040a8: 13 00 80 0f sethi %hi(0x2003c00), %o1
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
20040ac: 90 10 00 1d mov %i5, %o0
20040b0: 40 00 37 5f call 2011e2c <_fwalk>
20040b4: 92 12 62 68 or %o1, 0x268, %o1
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
20040b8: 40 00 1b d9 call 200b01c <_Workspace_Free>
20040bc: 90 10 00 1d mov %i5, %o0
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
20040c0: 80 a6 00 19 cmp %i0, %i1
20040c4: 12 80 00 04 bne 20040d4 <newlib_delete_hook+0x5c>
20040c8: c0 26 61 54 clr [ %i1 + 0x154 ]
_REENT = 0;
20040cc: 03 00 80 7a sethi %hi(0x201e800), %g1
20040d0: c0 20 63 38 clr [ %g1 + 0x338 ] ! 201eb38 <_impure_ptr>
20040d4: 81 c7 e0 08 ret
20040d8: 81 e8 00 00 restore
02003e68 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
2003e68: 9d e3 bf a0 save %sp, -96, %sp
switch ( fileno(fp) ) {
2003e6c: 40 00 36 f8 call 2011a4c <fileno>
2003e70: 90 10 00 18 mov %i0, %o0
2003e74: 80 a2 20 02 cmp %o0, 2
2003e78: 28 80 00 06 bleu,a 2003e90 <newlib_free_buffers+0x28> <== ALWAYS TAKEN
2003e7c: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
2003e80: 40 00 36 26 call 2011718 <fclose> <== NOT EXECUTED
2003e84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
return 0;
}
2003e88: 81 c7 e0 08 ret
2003e8c: 91 e8 20 00 restore %g0, 0, %o0
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
2003e90: 80 88 60 80 btst 0x80, %g1
2003e94: 02 bf ff fd be 2003e88 <newlib_free_buffers+0x20> <== ALWAYS TAKEN
2003e98: 01 00 00 00 nop
free( fp->_bf._base );
2003e9c: 7f ff fd 15 call 20032f0 <free> <== NOT EXECUTED
2003ea0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2003ea4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2003ea8: 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;
2003eac: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2003eb0: 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;
2003eb4: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
2003eb8: 81 c7 e0 08 ret <== NOT EXECUTED
2003ebc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02004150 <open>:
int open(
const char *pathname,
int flags,
...
)
{
2004150: 9d e3 bf 88 save %sp, -120, %sp
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
2004154: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2004158: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200415c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2004160: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2004164: 82 06 60 01 add %i1, 1, %g1
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
2004168: b6 08 60 01 and %g1, 1, %i3
if ( ( status & _FWRITE ) == _FWRITE )
200416c: 80 88 60 02 btst 2, %g1
2004170: 02 80 00 03 be 200417c <open+0x2c>
2004174: b7 2e e0 02 sll %i3, 2, %i3
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
2004178: b6 16 e0 02 or %i3, 2, %i3
va_start(ap, flags);
mode = va_arg( ap, mode_t );
200417c: 82 07 a0 50 add %fp, 0x50, %g1
2004180: f8 07 a0 4c ld [ %fp + 0x4c ], %i4
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
2004184: 40 00 23 aa call 200d02c <rtems_libio_allocate>
2004188: c2 27 bf fc st %g1, [ %fp + -4 ]
if ( iop == 0 ) {
200418c: ba 92 20 00 orcc %o0, 0, %i5
2004190: 22 80 00 2f be,a 200424c <open+0xfc>
2004194: b6 10 20 17 mov 0x17, %i3
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2004198: 40 00 3a a6 call 2012c30 <strlen>
200419c: 90 10 00 18 mov %i0, %o0
20041a0: 94 10 00 1b mov %i3, %o2
20041a4: 92 10 00 08 mov %o0, %o1
20041a8: 96 07 bf e8 add %fp, -24, %o3
20041ac: 90 10 00 18 mov %i0, %o0
20041b0: 7f ff fb fb call 200319c <rtems_filesystem_evaluate_path>
20041b4: 98 10 20 01 mov 1, %o4
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
20041b8: 80 a2 3f ff cmp %o0, -1
20041bc: 02 80 00 40 be 20042bc <open+0x16c>
20041c0: 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)) {
20041c4: 80 a0 6a 00 cmp %g1, 0xa00
20041c8: 02 80 00 26 be 2004260 <open+0x110>
20041cc: b4 07 bf e8 add %fp, -24, %i2
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
20041d0: f6 07 60 18 ld [ %i5 + 0x18 ], %i3
20041d4: 40 00 23 72 call 200cf9c <rtems_libio_fcntl_flags>
20041d8: 90 10 00 19 mov %i1, %o0
iop->pathinfo = loc;
20041dc: c4 07 bf f0 ld [ %fp + -16 ], %g2
20041e0: c6 07 bf e8 ld [ %fp + -24 ], %g3
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
20041e4: c2 00 80 00 ld [ %g2 ], %g1
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
20041e8: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
20041ec: c4 07 bf f4 ld [ %fp + -12 ], %g2
20041f0: c6 27 60 1c st %g3, [ %i5 + 0x1c ]
20041f4: c4 27 60 28 st %g2, [ %i5 + 0x28 ]
20041f8: c6 07 bf ec ld [ %fp + -20 ], %g3
20041fc: c4 07 bf f8 ld [ %fp + -8 ], %g2
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
2004200: b6 12 00 1b or %o0, %i3, %i3
iop->pathinfo = loc;
2004204: c6 27 60 20 st %g3, [ %i5 + 0x20 ]
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
2004208: f6 27 60 18 st %i3, [ %i5 + 0x18 ]
iop->pathinfo = loc;
200420c: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
2004210: 90 10 00 1d mov %i5, %o0
2004214: 92 10 00 18 mov %i0, %o1
2004218: 94 10 00 19 mov %i1, %o2
200421c: 9f c0 40 00 call %g1
2004220: 96 10 00 1c mov %i4, %o3
if ( rc ) {
2004224: 80 a2 20 00 cmp %o0, 0
2004228: 12 80 00 1a bne 2004290 <open+0x140>
200422c: 80 8e 64 00 btst 0x400, %i1
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
2004230: 12 80 00 2d bne 20042e4 <open+0x194>
2004234: 39 00 80 7c sethi %hi(0x201f000), %i4
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2004238: f0 07 22 f8 ld [ %i4 + 0x2f8 ], %i0 ! 201f2f8 <rtems_libio_iops>
200423c: ba 27 40 18 sub %i5, %i0, %i5
2004240: b1 3f 60 06 sra %i5, 6, %i0
}
2004244: 81 c7 e0 08 ret
2004248: 81 e8 00 00 restore
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
200424c: 40 00 34 e1 call 20115d0 <__errno>
2004250: b0 10 3f ff mov -1, %i0
2004254: f6 22 00 00 st %i3, [ %o0 ]
2004258: 81 c7 e0 08 ret
200425c: 81 e8 00 00 restore
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
2004260: b6 10 20 11 mov 0x11, %i3
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
2004264: 80 a7 60 00 cmp %i5, 0
2004268: 02 80 00 05 be 200427c <open+0x12c>
200426c: 80 a6 a0 00 cmp %i2, 0
rtems_libio_free( iop );
2004270: 40 00 23 97 call 200d0cc <rtems_libio_free>
2004274: 90 10 00 1d mov %i5, %o0
if ( loc_to_free )
2004278: 80 a6 a0 00 cmp %i2, 0
200427c: 02 bf ff f4 be 200424c <open+0xfc>
2004280: 01 00 00 00 nop
rtems_filesystem_freenode( loc_to_free );
2004284: 7f ff fc 14 call 20032d4 <rtems_filesystem_freenode>
2004288: 90 10 00 1a mov %i2, %o0
200428c: 30 bf ff f0 b,a 200424c <open+0xfc>
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
2004290: 40 00 34 d0 call 20115d0 <__errno>
2004294: b4 07 bf e8 add %fp, -24, %i2
2004298: f6 02 00 00 ld [ %o0 ], %i3
200429c: 39 00 80 7c sethi %hi(0x201f000), %i4
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
20042a0: 80 a6 e0 00 cmp %i3, 0
20042a4: 12 bf ff f0 bne 2004264 <open+0x114> <== ALWAYS TAKEN
20042a8: f0 07 22 f8 ld [ %i4 + 0x2f8 ], %i0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
20042ac: ba 27 40 18 sub %i5, %i0, %i5 <== NOT EXECUTED
20042b0: b1 3f 60 06 sra %i5, 6, %i0 <== NOT EXECUTED
}
20042b4: 81 c7 e0 08 ret <== NOT EXECUTED
20042b8: 81 e8 00 00 restore <== NOT EXECUTED
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
20042bc: 40 00 34 c5 call 20115d0 <__errno>
20042c0: 01 00 00 00 nop
20042c4: c2 02 00 00 ld [ %o0 ], %g1
20042c8: 80 a0 60 02 cmp %g1, 2
20042cc: 02 80 00 1d be 2004340 <open+0x1f0>
20042d0: b4 10 20 00 clr %i2
rc = errno;
20042d4: 40 00 34 bf call 20115d0 <__errno>
20042d8: 01 00 00 00 nop
goto done;
20042dc: 10 bf ff f0 b 200429c <open+0x14c>
20042e0: f6 02 00 00 ld [ %o0 ], %i3
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
20042e4: d0 07 22 f8 ld [ %i4 + 0x2f8 ], %o0
20042e8: 92 10 20 00 clr %o1
20042ec: 94 10 20 00 clr %o2
20042f0: 90 27 40 08 sub %i5, %o0, %o0
20042f4: 40 00 22 ea call 200ce9c <ftruncate>
20042f8: 91 3a 20 06 sra %o0, 6, %o0
if ( rc ) {
20042fc: b6 92 20 00 orcc %o0, 0, %i3
2004300: 02 bf ff cf be 200423c <open+0xec>
2004304: f0 07 22 f8 ld [ %i4 + 0x2f8 ], %i0
if(errno) rc = errno;
2004308: 40 00 34 b2 call 20115d0 <__errno>
200430c: 01 00 00 00 nop
2004310: c2 02 00 00 ld [ %o0 ], %g1
2004314: 80 a0 60 00 cmp %g1, 0
2004318: 12 80 00 1a bne 2004380 <open+0x230> <== ALWAYS TAKEN
200431c: 01 00 00 00 nop
close( iop - rtems_libio_iops );
2004320: d0 07 22 f8 ld [ %i4 + 0x2f8 ], %o0
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
2004324: b4 10 20 00 clr %i2
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
2004328: 90 27 40 08 sub %i5, %o0, %o0
/* those are released by close(): */
iop = 0;
200432c: ba 10 20 00 clr %i5
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
2004330: 40 00 22 9f call 200cdac <close>
2004334: 91 3a 20 06 sra %o0, 6, %o0
2004338: 10 bf ff da b 20042a0 <open+0x150>
200433c: 39 00 80 7c sethi %hi(0x201f000), %i4
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2004340: 80 8e 62 00 btst 0x200, %i1
2004344: 02 bf ff c8 be 2004264 <open+0x114>
2004348: b6 10 20 02 mov 2, %i3
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
200434c: 90 10 00 18 mov %i0, %o0
2004350: 13 00 00 20 sethi %hi(0x8000), %o1
2004354: 94 10 20 00 clr %o2
2004358: 92 17 00 09 or %i4, %o1, %o1
200435c: 7f ff fd 69 call 2003900 <mknod>
2004360: 96 10 20 00 clr %o3
if ( rc ) {
2004364: 80 a2 20 00 cmp %o0, 0
2004368: 02 80 00 0a be 2004390 <open+0x240> <== ALWAYS TAKEN
200436c: 01 00 00 00 nop
rc = errno;
2004370: 40 00 34 98 call 20115d0 <__errno> <== NOT EXECUTED
2004374: 39 00 80 7c sethi %hi(0x201f000), %i4 <== NOT EXECUTED
goto done;
2004378: 10 bf ff ca b 20042a0 <open+0x150> <== NOT EXECUTED
200437c: f6 02 00 00 ld [ %o0 ], %i3 <== NOT EXECUTED
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
2004380: 40 00 34 94 call 20115d0 <__errno>
2004384: 01 00 00 00 nop
2004388: 10 bf ff e6 b 2004320 <open+0x1d0>
200438c: f6 02 00 00 ld [ %o0 ], %i3
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
2004390: 40 00 3a 28 call 2012c30 <strlen>
2004394: 90 10 00 18 mov %i0, %o0
2004398: 94 10 20 00 clr %o2
200439c: 92 10 00 08 mov %o0, %o1
20043a0: 96 07 bf e8 add %fp, -24, %o3
20043a4: 90 10 00 18 mov %i0, %o0
20043a8: 98 10 20 01 mov 1, %o4
20043ac: 7f ff fb 7c call 200319c <rtems_filesystem_evaluate_path>
20043b0: b6 10 20 0d mov 0xd, %i3
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
20043b4: 80 a2 20 00 cmp %o0, 0
20043b8: 12 bf ff ac bne 2004268 <open+0x118> <== NEVER TAKEN
20043bc: 80 a7 60 00 cmp %i5, 0
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
20043c0: 10 bf ff 85 b 20041d4 <open+0x84>
20043c4: f6 07 60 18 ld [ %i5 + 0x18 ], %i3
020052cc <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
20052cc: 9d e3 bf a0 save %sp, -96, %sp
int i;
if (tty->termios.c_oflag & OPOST) {
20052d0: c2 06 60 34 ld [ %i1 + 0x34 ], %g1
20052d4: 80 88 60 01 btst 1, %g1
20052d8: 02 80 00 21 be 200535c <oproc+0x90> <== NEVER TAKEN
20052dc: f0 2f a0 44 stb %i0, [ %fp + 0x44 ]
switch (c) {
20052e0: 80 a6 20 09 cmp %i0, 9
20052e4: 22 80 00 3d be,a 20053d8 <oproc+0x10c>
20052e8: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
20052ec: 08 80 00 22 bleu 2005374 <oproc+0xa8> <== NEVER TAKEN
20052f0: 80 a6 20 08 cmp %i0, 8
20052f4: 80 a6 20 0a cmp %i0, 0xa
20052f8: 02 80 00 2b be 20053a4 <oproc+0xd8>
20052fc: 80 a6 20 0d cmp %i0, 0xd
2005300: 02 80 00 44 be 2005410 <oproc+0x144> <== NEVER TAKEN
2005304: 80 88 60 10 btst 0x10, %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2005308: 80 88 60 02 btst 2, %g1
c = toupper(c);
200530c: 03 00 80 7a sethi %hi(0x201e800), %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2005310: 02 80 00 0b be 200533c <oproc+0x70> <== ALWAYS TAKEN
2005314: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201eb34 <__ctype_ptr__>
c = toupper(c);
2005318: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED
200531c: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
2005320: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED
2005324: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED
2005328: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED
200532c: 22 80 00 02 be,a 2005334 <oproc+0x68> <== NOT EXECUTED
2005330: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED
2005334: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
2005338: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED
if (!iscntrl(c))
200533c: b0 00 40 18 add %g1, %i0, %i0
2005340: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2005344: 80 88 60 20 btst 0x20, %g1
2005348: 12 80 00 06 bne 2005360 <oproc+0x94> <== NEVER TAKEN
200534c: 90 07 a0 44 add %fp, 0x44, %o0
tty->column++;
2005350: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2005354: 82 00 60 01 inc %g1
2005358: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
break;
}
}
rtems_termios_puts (&c, 1, tty);
200535c: 90 07 a0 44 add %fp, 0x44, %o0
2005360: 92 10 20 01 mov 1, %o1
2005364: 7f ff ff 8a call 200518c <rtems_termios_puts>
2005368: 94 10 00 19 mov %i1, %o2
200536c: 81 c7 e0 08 ret
2005370: 81 e8 00 00 restore
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
2005374: 12 bf ff e6 bne 200530c <oproc+0x40> <== NOT EXECUTED
2005378: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
200537c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2005380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005384: 04 bf ff f6 ble 200535c <oproc+0x90> <== NOT EXECUTED
2005388: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
200538c: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
tty->column += i;
break;
case '\b':
if (tty->column > 0)
tty->column--;
2005390: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2005394: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005398: 7f ff ff 7d call 200518c <rtems_termios_puts> <== NOT EXECUTED
200539c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
20053a0: 30 80 00 30 b,a 2005460 <oproc+0x194> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
20053a4: 80 88 60 20 btst 0x20, %g1
20053a8: 32 80 00 02 bne,a 20053b0 <oproc+0xe4> <== NEVER TAKEN
20053ac: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
tty->column = 0;
if (tty->termios.c_oflag & ONLCR) {
20053b0: 80 88 60 04 btst 4, %g1
20053b4: 22 bf ff eb be,a 2005360 <oproc+0x94> <== NEVER TAKEN
20053b8: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
rtems_termios_puts ("\r", 1, tty);
20053bc: 92 10 20 01 mov 1, %o1
20053c0: 11 00 80 74 sethi %hi(0x201d000), %o0
20053c4: 94 10 00 19 mov %i1, %o2
20053c8: 7f ff ff 71 call 200518c <rtems_termios_puts>
20053cc: 90 12 23 70 or %o0, 0x370, %o0
tty->column = 0;
20053d0: 10 bf ff e3 b 200535c <oproc+0x90>
20053d4: c0 26 60 28 clr [ %i1 + 0x28 ]
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
20053d8: 05 00 00 06 sethi %hi(0x1800), %g2
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
20053dc: 88 08 e0 07 and %g3, 7, %g4
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
20053e0: 82 08 40 02 and %g1, %g2, %g1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
20053e4: 92 10 20 08 mov 8, %o1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
20053e8: 80 a0 40 02 cmp %g1, %g2
20053ec: 02 80 00 17 be 2005448 <oproc+0x17c> <== ALWAYS TAKEN
20053f0: 92 22 40 04 sub %o1, %g4, %o1
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
20053f4: 92 00 c0 09 add %g3, %o1, %o1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
20053f8: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
20053fc: d2 26 60 28 st %o1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2005400: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2005404: 7f ff ff 62 call 200518c <rtems_termios_puts> <== NOT EXECUTED
2005408: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200540c: 30 80 00 15 b,a 2005460 <oproc+0x194> <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2005410: 02 80 00 06 be 2005428 <oproc+0x15c> <== NOT EXECUTED
2005414: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2005418: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED
200541c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2005420: 02 bf ff d3 be 200536c <oproc+0xa0> <== NOT EXECUTED
2005424: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
2005428: 22 bf ff cd be,a 200535c <oproc+0x90> <== NOT EXECUTED
200542c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
c = '\n';
2005430: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2005434: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2005438: 02 bf ff c9 be 200535c <oproc+0x90> <== NOT EXECUTED
200543c: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
break;
2005440: 10 bf ff c7 b 200535c <oproc+0x90> <== NOT EXECUTED
2005444: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
2005448: 86 00 c0 09 add %g3, %o1, %g3
rtems_termios_puts ( " ", i, tty);
200544c: 11 00 80 74 sethi %hi(0x201d000), %o0
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
2005450: c6 26 60 28 st %g3, [ %i1 + 0x28 ]
rtems_termios_puts ( " ", i, tty);
2005454: 90 12 23 78 or %o0, 0x378, %o0
2005458: 7f ff ff 4d call 200518c <rtems_termios_puts>
200545c: 94 10 00 19 mov %i1, %o2
return;
2005460: 81 c7 e0 08 ret
2005464: 81 e8 00 00 restore
0200e6e8 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
200e6e8: 9d e3 bf 90 save %sp, -112, %sp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
200e6ec: 92 10 21 ff mov 0x1ff, %o1
200e6f0: 11 00 80 8a sethi %hi(0x2022800), %o0
return -1;
200e6f4: ba 10 3f ff mov -1, %i5
)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
200e6f8: 40 00 06 da call 2010260 <rtems_mkdir>
200e6fc: 90 12 21 98 or %o0, 0x198, %o0
200e700: 80 a2 20 00 cmp %o0, 0
200e704: 12 80 00 33 bne 200e7d0 <pipe_create+0xe8> <== NEVER TAKEN
200e708: 03 00 80 91 sethi %hi(0x2024400), %g1
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e70c: d4 10 60 98 lduh [ %g1 + 0x98 ], %o2 ! 2024498 <rtems_pipe_no>
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e710: 05 0b dd 1b sethi %hi(0x2f746c00), %g2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e714: 88 02 a0 01 add %o2, 1, %g4
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e718: 84 10 a1 70 or %g2, 0x170, %g2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e71c: c8 30 60 98 sth %g4, [ %g1 + 0x98 ]
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200e720: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3
200e724: 03 00 00 19 sethi %hi(0x6400), %g1
200e728: 86 10 e2 69 or %g3, 0x269, %g3
200e72c: 82 10 62 6f or %g1, 0x26f, %g1
200e730: c4 3f bf f0 std %g2, [ %fp + -16 ]
200e734: c2 37 bf f8 sth %g1, [ %fp + -8 ]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200e738: 95 2a a0 10 sll %o2, 0x10, %o2
200e73c: 90 07 bf fa add %fp, -6, %o0
200e740: 95 32 a0 10 srl %o2, 0x10, %o2
200e744: 13 00 80 8a sethi %hi(0x2022800), %o1
200e748: 40 00 16 2f call 2014004 <sprintf>
200e74c: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 20229a0 <_CPU_Trap_slot_template+0x18>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
200e750: 90 07 bf f0 add %fp, -16, %o0
200e754: 40 00 05 a0 call 200fdd4 <mkfifo>
200e758: 92 10 21 80 mov 0x180, %o1
200e75c: 80 a2 20 00 cmp %o0, 0
200e760: 12 80 00 31 bne 200e824 <pipe_create+0x13c>
200e764: 90 07 bf f0 add %fp, -16, %o0
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
200e768: 7f ff dd a3 call 2005df4 <open>
200e76c: 13 00 00 10 sethi %hi(0x4000), %o1
if (filsdes[0] < 0) {
200e770: 80 a2 20 00 cmp %o0, 0
200e774: 06 80 00 1f bl 200e7f0 <pipe_create+0x108>
200e778: 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]);
200e77c: 03 00 80 8e sethi %hi(0x2023800), %g1
200e780: c4 00 63 7c ld [ %g1 + 0x37c ], %g2 ! 2023b7c <rtems_libio_number_iops>
200e784: 80 a2 00 02 cmp %o0, %g2
200e788: 0a 80 00 15 bcs 200e7dc <pipe_create+0xf4> <== ALWAYS TAKEN
200e78c: 82 10 20 00 clr %g1
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200e790: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
filsdes[1] = open(fifopath, O_WRONLY);
200e794: 90 07 bf f0 add %fp, -16, %o0
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200e798: 84 08 bf fe and %g2, -2, %g2
filsdes[1] = open(fifopath, O_WRONLY);
200e79c: 92 10 20 01 mov 1, %o1
200e7a0: 7f ff dd 95 call 2005df4 <open>
200e7a4: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
200e7a8: d0 26 20 04 st %o0, [ %i0 + 4 ]
if (filsdes[1] < 0) {
200e7ac: 80 a2 20 00 cmp %o0, 0
200e7b0: 06 80 00 17 bl 200e80c <pipe_create+0x124>
200e7b4: b8 10 20 00 clr %i4
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
200e7b8: 7f ff e7 26 call 2008450 <unlink>
200e7bc: 90 07 bf f0 add %fp, -16, %o0
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
200e7c0: ba 10 20 00 clr %i5
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
200e7c4: 80 a7 20 00 cmp %i4, 0
200e7c8: 12 80 00 1a bne 200e830 <pipe_create+0x148>
200e7cc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(err);
return 0;
}
200e7d0: b0 10 00 1d mov %i5, %i0
200e7d4: 81 c7 e0 08 ret
200e7d8: 81 e8 00 00 restore
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
200e7dc: 03 00 80 91 sethi %hi(0x2024400), %g1
200e7e0: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 2024600 <rtems_libio_iops>
200e7e4: 91 2a 20 06 sll %o0, 6, %o0
200e7e8: 10 bf ff ea b 200e790 <pipe_create+0xa8>
200e7ec: 82 00 40 08 add %g1, %o0, %g1
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
200e7f0: 40 00 12 8e call 2013228 <__errno>
200e7f4: ba 10 20 00 clr %i5
200e7f8: f8 02 00 00 ld [ %o0 ], %i4
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
200e7fc: 7f ff e7 15 call 2008450 <unlink>
200e800: 90 07 bf f0 add %fp, -16, %o0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
200e804: 10 bf ff f1 b 200e7c8 <pipe_create+0xe0>
200e808: 80 a7 20 00 cmp %i4, 0
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
200e80c: 40 00 12 87 call 2013228 <__errno>
200e810: 01 00 00 00 nop
200e814: f8 02 00 00 ld [ %o0 ], %i4
close(filsdes[0]);
200e818: 7f ff d7 dd call 200478c <close>
200e81c: d0 06 00 00 ld [ %i0 ], %o0
200e820: 30 bf ff e6 b,a 200e7b8 <pipe_create+0xd0>
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
200e824: 40 00 12 81 call 2013228 <__errno>
200e828: b0 10 00 1d mov %i5, %i0
200e82c: 30 bf ff ea b,a 200e7d4 <pipe_create+0xec>
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
200e830: 40 00 12 7e call 2013228 <__errno>
200e834: ba 10 3f ff mov -1, %i5
200e838: 10 bf ff e6 b 200e7d0 <pipe_create+0xe8>
200e83c: f8 22 00 00 st %i4, [ %o0 ]
02010234 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
2010234: 9d e3 bf a0 save %sp, -96, %sp
if (cmd == FIONREAD) {
2010238: 03 10 01 19 sethi %hi(0x40046400), %g1
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
201023c: ba 10 00 18 mov %i0, %i5
if (cmd == FIONREAD) {
2010240: 82 10 62 7f or %g1, 0x27f, %g1
2010244: 80 a6 40 01 cmp %i1, %g1
2010248: 12 80 00 12 bne 2010290 <pipe_ioctl+0x5c>
201024c: b0 10 3f ea mov -22, %i0
if (buffer == NULL)
2010250: 80 a6 a0 00 cmp %i2, 0
2010254: 02 80 00 0f be 2010290 <pipe_ioctl+0x5c>
2010258: b0 10 3f f2 mov -14, %i0
return -EFAULT;
if (! PIPE_LOCK(pipe))
201025c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
2010260: 92 10 20 00 clr %o1
2010264: 94 10 20 00 clr %o2
2010268: 7f ff e7 82 call 200a070 <rtems_semaphore_obtain>
201026c: b0 10 3f fc mov -4, %i0
2010270: 80 a2 20 00 cmp %o0, 0
2010274: 12 80 00 07 bne 2010290 <pipe_ioctl+0x5c> <== NEVER TAKEN
2010278: 01 00 00 00 nop
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
201027c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
PIPE_UNLOCK(pipe);
2010280: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
return 0;
2010284: b0 10 20 00 clr %i0
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
2010288: 7f ff e7 c4 call 200a198 <rtems_semaphore_release>
201028c: c2 26 80 00 st %g1, [ %i2 ]
return 0;
}
return -EINVAL;
}
2010290: 81 c7 e0 08 ret
2010294: 81 e8 00 00 restore
0200fe74 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200fe74: 9d e3 bf 98 save %sp, -104, %sp
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200fe78: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200fe7c: ba 10 00 18 mov %i0, %i5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200fe80: 92 10 20 00 clr %o1
200fe84: 94 10 20 00 clr %o2
200fe88: 7f ff e8 7a call 200a070 <rtems_semaphore_obtain>
200fe8c: b0 10 3f fc mov -4, %i0
200fe90: 80 a2 20 00 cmp %o0, 0
200fe94: 12 80 00 2c bne 200ff44 <pipe_read+0xd0> <== NEVER TAKEN
200fe98: a0 10 20 00 clr %l0
return -EINTR;
while (read < count) {
200fe9c: 80 a6 a0 00 cmp %i2, 0
200fea0: 02 80 00 52 be 200ffe8 <pipe_read+0x174> <== NEVER TAKEN
200fea4: b0 10 20 00 clr %i0
while (PIPE_EMPTY(pipe)) {
200fea8: f8 07 60 0c ld [ %i5 + 0xc ], %i4
200feac: 80 a7 20 00 cmp %i4, 0
200feb0: 12 80 00 29 bne 200ff54 <pipe_read+0xe0>
200feb4: 82 26 80 10 sub %i2, %l0, %g1
/* Not an error */
if (pipe->Writers == 0)
200feb8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200febc: 80 a0 60 00 cmp %g1, 0
200fec0: 22 80 00 1c be,a 200ff30 <pipe_read+0xbc>
200fec4: b8 10 20 00 clr %i4
goto out_locked;
if (LIBIO_NODELAY(iop)) {
200fec8: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
200fecc: 80 88 60 01 btst 1, %g1
200fed0: 32 80 00 18 bne,a 200ff30 <pipe_read+0xbc>
200fed4: b8 10 3f f5 mov -11, %i4
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200fed8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
PIPE_UNLOCK(pipe);
200fedc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200fee0: 82 00 60 01 inc %g1
PIPE_UNLOCK(pipe);
200fee4: 7f ff e8 ad call 200a198 <rtems_semaphore_release>
200fee8: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
if (! PIPE_READWAIT(pipe))
200feec: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200fef0: 40 00 06 ea call 2011a98 <rtems_barrier_wait>
200fef4: 92 10 20 00 clr %o1
200fef8: 80 a0 00 08 cmp %g0, %o0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200fefc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
200ff00: b8 60 20 00 subx %g0, 0, %i4
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200ff04: 92 10 20 00 clr %o1
200ff08: 94 10 20 00 clr %o2
200ff0c: 7f ff e8 59 call 200a070 <rtems_semaphore_obtain>
200ff10: b8 0f 3f fc and %i4, -4, %i4
200ff14: 80 a2 20 00 cmp %o0, 0
200ff18: 12 80 00 36 bne 200fff0 <pipe_read+0x17c> <== NEVER TAKEN
200ff1c: 80 a7 20 00 cmp %i4, 0
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
200ff20: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200ff24: 82 00 7f ff add %g1, -1, %g1
if (ret != 0)
200ff28: 02 bf ff e0 be 200fea8 <pipe_read+0x34> <== ALWAYS TAKEN
200ff2c: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
200ff30: 7f ff e8 9a call 200a198 <rtems_semaphore_release>
200ff34: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
out_nolock:
if (read > 0)
200ff38: 80 a6 20 00 cmp %i0, 0
200ff3c: 04 80 00 04 ble 200ff4c <pipe_read+0xd8>
200ff40: 01 00 00 00 nop
return read;
return ret;
}
200ff44: 81 c7 e0 08 ret
200ff48: 81 e8 00 00 restore
200ff4c: 81 c7 e0 08 ret
200ff50: 91 e8 00 1c restore %g0, %i4, %o0
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
200ff54: 80 a7 00 01 cmp %i4, %g1
200ff58: 38 80 00 02 bgu,a 200ff60 <pipe_read+0xec>
200ff5c: b8 10 00 01 mov %g1, %i4
chunk1 = pipe->Size - pipe->Start;
200ff60: c2 07 60 08 ld [ %i5 + 8 ], %g1
200ff64: e2 07 60 04 ld [ %i5 + 4 ], %l1
200ff68: a2 24 40 01 sub %l1, %g1, %l1
if (chunk > chunk1) {
200ff6c: 80 a7 00 11 cmp %i4, %l1
200ff70: 04 80 00 22 ble 200fff8 <pipe_read+0x184>
200ff74: d2 07 40 00 ld [ %i5 ], %o1
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
200ff78: 94 10 00 11 mov %l1, %o2
200ff7c: 92 02 40 01 add %o1, %g1, %o1
200ff80: 40 00 13 d4 call 2014ed0 <memcpy>
200ff84: 90 06 40 10 add %i1, %l0, %o0
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
200ff88: d2 07 40 00 ld [ %i5 ], %o1
200ff8c: 90 04 00 11 add %l0, %l1, %o0
200ff90: 94 27 00 11 sub %i4, %l1, %o2
200ff94: 40 00 13 cf call 2014ed0 <memcpy>
200ff98: 90 06 40 08 add %i1, %o0, %o0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
200ff9c: d0 07 60 08 ld [ %i5 + 8 ], %o0
pipe->Start %= pipe->Size;
200ffa0: d2 07 60 04 ld [ %i5 + 4 ], %o1
200ffa4: 40 00 43 ae call 2020e5c <.urem>
200ffa8: 90 07 00 08 add %i4, %o0, %o0
pipe->Length -= chunk;
200ffac: c2 07 60 0c ld [ %i5 + 0xc ], %g1
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
200ffb0: d0 27 60 08 st %o0, [ %i5 + 8 ]
pipe->Length -= chunk;
200ffb4: 82 20 40 1c sub %g1, %i4, %g1
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
200ffb8: 80 a0 60 00 cmp %g1, 0
200ffbc: 12 80 00 03 bne 200ffc8 <pipe_read+0x154>
200ffc0: c2 27 60 0c st %g1, [ %i5 + 0xc ]
pipe->Start = 0;
200ffc4: c0 27 60 08 clr [ %i5 + 8 ]
if (pipe->waitingWriters > 0)
200ffc8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200ffcc: 80 a0 60 00 cmp %g1, 0
200ffd0: 32 80 00 10 bne,a 2010010 <pipe_read+0x19c>
200ffd4: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
200ffd8: b0 06 00 1c add %i0, %i4, %i0
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
200ffdc: 80 a6 00 1a cmp %i0, %i2
200ffe0: 0a bf ff b2 bcs 200fea8 <pipe_read+0x34> <== NEVER TAKEN
200ffe4: a0 10 00 18 mov %i0, %l0
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
200ffe8: 10 bf ff d2 b 200ff30 <pipe_read+0xbc>
200ffec: b8 10 20 00 clr %i4
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
200fff0: 10 bf ff d2 b 200ff38 <pipe_read+0xc4> <== NOT EXECUTED
200fff4: b8 10 3f fc mov -4, %i4 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
200fff8: 90 06 40 10 add %i1, %l0, %o0
200fffc: 92 02 40 01 add %o1, %g1, %o1
2010000: 40 00 13 b4 call 2014ed0 <memcpy>
2010004: 94 10 00 1c mov %i4, %o2
pipe->Start += chunk;
2010008: 10 bf ff e6 b 200ffa0 <pipe_read+0x12c>
201000c: d0 07 60 08 ld [ %i5 + 8 ], %o0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
2010010: 40 00 06 8b call 2011a3c <rtems_barrier_release>
2010014: 92 07 bf fc add %fp, -4, %o1
read += chunk;
2010018: 10 bf ff f1 b 200ffdc <pipe_read+0x168>
201001c: b0 06 00 1c add %i0, %i4, %i0
0200f898 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200f898: 9d e3 bf 98 save %sp, -104, %sp
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
200f89c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
200f8a0: fa 06 00 00 ld [ %i0 ], %i5
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
200f8a4: 80 88 60 02 btst 2, %g1
200f8a8: 02 80 00 05 be 200f8bc <pipe_release+0x24>
200f8ac: b8 08 60 06 and %g1, 6, %i4
pipe->Readers --;
200f8b0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200f8b4: 82 00 7f ff add %g1, -1, %g1
200f8b8: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
if (mode & LIBIO_FLAGS_WRITE)
200f8bc: 80 8f 20 04 btst 4, %i4
200f8c0: 02 80 00 05 be 200f8d4 <pipe_release+0x3c>
200f8c4: 01 00 00 00 nop
pipe->Writers --;
200f8c8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200f8cc: 82 00 7f ff add %g1, -1, %g1
200f8d0: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
PIPE_UNLOCK(pipe);
200f8d4: 7f ff ea 31 call 200a198 <rtems_semaphore_release>
200f8d8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (pipe->Readers == 0 && pipe->Writers == 0) {
200f8dc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200f8e0: 80 a0 60 00 cmp %g1, 0
200f8e4: 12 80 00 0c bne 200f914 <pipe_release+0x7c>
200f8e8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200f8ec: 80 a0 60 00 cmp %g1, 0
200f8f0: 02 80 00 1d be 200f964 <pipe_release+0xcc>
200f8f4: 80 a7 20 04 cmp %i4, 4
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
200f8f8: 32 80 00 14 bne,a 200f948 <pipe_release+0xb0> <== ALWAYS TAKEN
200f8fc: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200f900: 03 00 80 96 sethi %hi(0x2025800), %g1 <== NOT EXECUTED
200f904: 7f ff ea 25 call 200a198 <rtems_semaphore_release> <== NOT EXECUTED
200f908: d0 00 60 38 ld [ %g1 + 0x38 ], %o0 ! 2025838 <pipe_semaphore><== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200f90c: 81 c7 e0 08 ret <== NOT EXECUTED
200f910: 81 e8 00 00 restore <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
200f914: 80 a0 60 00 cmp %g1, 0
200f918: 12 bf ff fa bne 200f900 <pipe_release+0x68> <== NEVER TAKEN
200f91c: 80 a7 20 02 cmp %i4, 2
200f920: 02 bf ff f9 be 200f904 <pipe_release+0x6c> <== NEVER TAKEN
200f924: 03 00 80 96 sethi %hi(0x2025800), %g1
PIPE_WAKEUPREADERS(pipe);
200f928: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200f92c: 40 00 08 44 call 2011a3c <rtems_barrier_release>
200f930: 92 07 bf fc add %fp, -4, %o1
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200f934: 03 00 80 96 sethi %hi(0x2025800), %g1
200f938: 7f ff ea 18 call 200a198 <rtems_semaphore_release>
200f93c: d0 00 60 38 ld [ %g1 + 0x38 ], %o0 ! 2025838 <pipe_semaphore>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200f940: 81 c7 e0 08 ret
200f944: 81 e8 00 00 restore
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
200f948: 40 00 08 3d call 2011a3c <rtems_barrier_release>
200f94c: 92 07 bf fc add %fp, -4, %o1
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200f950: 03 00 80 96 sethi %hi(0x2025800), %g1
200f954: 7f ff ea 11 call 200a198 <rtems_semaphore_release>
200f958: d0 00 60 38 ld [ %g1 + 0x38 ], %o0 ! 2025838 <pipe_semaphore>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200f95c: 81 c7 e0 08 ret
200f960: 81 e8 00 00 restore
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200f964: 40 00 08 0d call 2011998 <rtems_barrier_delete>
200f968: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
rtems_barrier_delete(pipe->writeBarrier);
200f96c: 40 00 08 0b call 2011998 <rtems_barrier_delete>
200f970: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
rtems_semaphore_delete(pipe->Semaphore);
200f974: 7f ff e9 88 call 2009f94 <rtems_semaphore_delete>
200f978: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
free(pipe->Buffer);
200f97c: 7f ff d8 4f call 2005ab8 <free>
200f980: d0 07 40 00 ld [ %i5 ], %o0
free(pipe);
200f984: 7f ff d8 4d call 2005ab8 <free>
200f988: 90 10 00 1d mov %i5, %o0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200f98c: 03 00 80 96 sethi %hi(0x2025800), %g1
200f990: d0 00 60 38 ld [ %g1 + 0x38 ], %o0 ! 2025838 <pipe_semaphore>
200f994: 7f ff ea 01 call 200a198 <rtems_semaphore_release>
200f998: c0 26 00 00 clr [ %i0 ]
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200f99c: 81 c7 e0 08 ret
200f9a0: 81 e8 00 00 restore
02010020 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
2010020: 9d e3 bf 98 save %sp, -104, %sp
2010024: ba 10 00 18 mov %i0, %i5
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
2010028: 80 a6 a0 00 cmp %i2, 0
201002c: 12 80 00 04 bne 201003c <pipe_write+0x1c> <== ALWAYS TAKEN
2010030: b0 10 20 00 clr %i0
#endif
if (written > 0)
return written;
return ret;
}
2010034: 81 c7 e0 08 ret
2010038: 81 e8 00 00 restore
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
201003c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
2010040: 92 10 20 00 clr %o1
2010044: 94 10 20 00 clr %o2
2010048: 7f ff e8 0a call 200a070 <rtems_semaphore_obtain>
201004c: b0 10 3f fc mov -4, %i0
2010050: 80 a2 20 00 cmp %o0, 0
2010054: 12 bf ff f8 bne 2010034 <pipe_write+0x14> <== NEVER TAKEN
2010058: 01 00 00 00 nop
return -EINTR;
if (pipe->Readers == 0) {
201005c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2010060: 80 a0 60 00 cmp %g1, 0
2010064: 02 80 00 60 be 20101e4 <pipe_write+0x1c4>
2010068: b8 10 3f e0 mov -32, %i4
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
201006c: e4 07 60 04 ld [ %i5 + 4 ], %l2
2010070: 80 a6 80 12 cmp %i2, %l2
2010074: 08 80 00 5a bleu 20101dc <pipe_write+0x1bc> <== ALWAYS TAKEN
2010078: a0 10 20 01 mov 1, %l0
201007c: a2 10 20 00 clr %l1
2010080: b0 10 20 00 clr %i0
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
2010084: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010088: b8 24 80 01 sub %l2, %g1, %i4
201008c: 80 a7 00 10 cmp %i4, %l0
2010090: 1a 80 00 27 bcc 201012c <pipe_write+0x10c>
2010094: 84 26 80 11 sub %i2, %l1, %g2
if (LIBIO_NODELAY(iop)) {
2010098: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
201009c: 80 88 60 01 btst 1, %g1
20100a0: 32 80 00 45 bne,a 20101b4 <pipe_write+0x194>
20100a4: b8 10 3f f5 mov -11, %i4
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
20100a8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
PIPE_UNLOCK(pipe);
20100ac: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
20100b0: 82 00 60 01 inc %g1
PIPE_UNLOCK(pipe);
20100b4: 7f ff e8 39 call 200a198 <rtems_semaphore_release>
20100b8: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
if (! PIPE_WRITEWAIT(pipe))
20100bc: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
20100c0: 40 00 06 76 call 2011a98 <rtems_barrier_wait>
20100c4: 92 10 20 00 clr %o1
20100c8: 80 a0 00 08 cmp %g0, %o0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
20100cc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
20100d0: b8 60 20 00 subx %g0, 0, %i4
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
20100d4: 92 10 20 00 clr %o1
20100d8: 94 10 20 00 clr %o2
20100dc: 7f ff e7 e5 call 200a070 <rtems_semaphore_obtain>
20100e0: b8 0f 3f fc and %i4, -4, %i4
20100e4: 80 a2 20 00 cmp %o0, 0
20100e8: 12 80 00 47 bne 2010204 <pipe_write+0x1e4> <== NEVER TAKEN
20100ec: 80 a7 20 00 cmp %i4, 0
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
20100f0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20100f4: 82 00 7f ff add %g1, -1, %g1
if (ret != 0)
20100f8: 12 80 00 2f bne 20101b4 <pipe_write+0x194> <== NEVER TAKEN
20100fc: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
goto out_locked;
if (pipe->Readers == 0) {
2010100: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2010104: 80 a0 60 00 cmp %g1, 0
2010108: 02 80 00 2b be 20101b4 <pipe_write+0x194> <== NEVER TAKEN
201010c: b8 10 3f e0 mov -32, %i4
2010110: e4 07 60 04 ld [ %i5 + 4 ], %l2
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
2010114: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010118: b8 24 80 01 sub %l2, %g1, %i4
201011c: 80 a7 00 10 cmp %i4, %l0
2010120: 2a bf ff df bcs,a 201009c <pipe_write+0x7c> <== NEVER TAKEN
2010124: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
2010128: 84 26 80 11 sub %i2, %l1, %g2
201012c: 80 a7 00 02 cmp %i4, %g2
2010130: 38 80 00 02 bgu,a 2010138 <pipe_write+0x118>
2010134: b8 10 00 02 mov %g2, %i4
chunk1 = pipe->Size - PIPE_WSTART(pipe);
2010138: d0 07 60 08 ld [ %i5 + 8 ], %o0
201013c: 92 10 00 12 mov %l2, %o1
2010140: 40 00 43 47 call 2020e5c <.urem>
2010144: 90 00 40 08 add %g1, %o0, %o0
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
2010148: c2 07 40 00 ld [ %i5 ], %g1
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
201014c: a0 24 80 08 sub %l2, %o0, %l0
if (chunk > chunk1) {
2010150: 80 a7 00 10 cmp %i4, %l0
2010154: 04 80 00 2e ble 201020c <pipe_write+0x1ec>
2010158: 92 06 40 11 add %i1, %l1, %o1
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
201015c: 94 10 00 10 mov %l0, %o2
2010160: 40 00 13 5c call 2014ed0 <memcpy>
2010164: 90 00 40 08 add %g1, %o0, %o0
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
2010168: d0 07 40 00 ld [ %i5 ], %o0
201016c: 92 04 00 11 add %l0, %l1, %o1
2010170: 94 27 00 10 sub %i4, %l0, %o2
2010174: 40 00 13 57 call 2014ed0 <memcpy>
2010178: 92 06 40 09 add %i1, %o1, %o1
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
201017c: c4 07 60 0c ld [ %i5 + 0xc ], %g2
if (pipe->waitingReaders > 0)
2010180: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
2010184: 84 00 80 1c add %g2, %i4, %g2
if (pipe->waitingReaders > 0)
2010188: 80 a0 60 00 cmp %g1, 0
201018c: 12 80 00 25 bne 2010220 <pipe_write+0x200>
2010190: c4 27 60 0c st %g2, [ %i5 + 0xc ]
PIPE_WAKEUPREADERS(pipe);
written += chunk;
2010194: b0 06 00 1c add %i0, %i4, %i0
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
2010198: 80 a6 80 18 cmp %i2, %i0
201019c: 08 80 00 05 bleu 20101b0 <pipe_write+0x190> <== ALWAYS TAKEN
20101a0: a2 10 00 18 mov %i0, %l1
20101a4: e4 07 60 04 ld [ %i5 + 4 ], %l2 <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
20101a8: 10 bf ff b7 b 2010084 <pipe_write+0x64> <== NOT EXECUTED
20101ac: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
20101b0: b8 10 20 00 clr %i4
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
20101b4: 7f ff e7 f9 call 200a198 <rtems_semaphore_release>
20101b8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
20101bc: 80 a7 3f e0 cmp %i4, -32
20101c0: 02 80 00 0b be 20101ec <pipe_write+0x1cc>
20101c4: 01 00 00 00 nop
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
20101c8: 80 a6 20 00 cmp %i0, 0
20101cc: 14 bf ff 9a bg 2010034 <pipe_write+0x14>
20101d0: 01 00 00 00 nop
return written;
return ret;
}
20101d4: 81 c7 e0 08 ret
20101d8: 91 e8 00 1c restore %g0, %i4, %o0
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
20101dc: 10 bf ff a8 b 201007c <pipe_write+0x5c>
20101e0: a0 10 00 1a mov %i2, %l0
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
20101e4: 10 bf ff f4 b 20101b4 <pipe_write+0x194>
20101e8: b0 10 20 00 clr %i0
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
20101ec: 40 00 02 96 call 2010c44 <getpid>
20101f0: 01 00 00 00 nop
20101f4: 40 00 03 dd call 2011168 <kill>
20101f8: 92 10 20 0d mov 0xd, %o1 ! d <PROM_START+0xd>
#endif
if (written > 0)
20101fc: 10 bf ff f4 b 20101cc <pipe_write+0x1ac>
2010200: 80 a6 20 00 cmp %i0, 0
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
2010204: 10 bf ff f1 b 20101c8 <pipe_write+0x1a8> <== NOT EXECUTED
2010208: b8 10 3f fc mov -4, %i4 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
201020c: 90 00 40 08 add %g1, %o0, %o0
2010210: 40 00 13 30 call 2014ed0 <memcpy>
2010214: 94 10 00 1c mov %i4, %o2
pipe->Length += chunk;
2010218: 10 bf ff da b 2010180 <pipe_write+0x160>
201021c: c4 07 60 0c ld [ %i5 + 0xc ], %g2
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
2010220: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
2010224: 40 00 06 06 call 2011a3c <rtems_barrier_release>
2010228: 92 07 bf fc add %fp, -4, %o1
written += chunk;
201022c: 10 bf ff db b 2010198 <pipe_write+0x178>
2010230: b0 06 00 1c add %i0, %i4, %i0
02008a44 <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
2008a44: 05 00 80 9c sethi %hi(0x2027000), %g2
2008a48: 84 10 a0 40 or %g2, 0x40, %g2 ! 2027040 <rtems_malloc_statistics>
2008a4c: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2008a50: 86 00 e0 01 inc %g3
2008a54: c6 20 a0 08 st %g3, [ %g2 + 8 ]
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2008a58: 84 02 7f ff add %o1, -1, %g2
2008a5c: 80 88 80 09 btst %g2, %o1
2008a60: 22 80 00 04 be,a 2008a70 <posix_memalign+0x2c> <== ALWAYS TAKEN
2008a64: 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 );
}
2008a68: 81 c3 e0 08 retl
2008a6c: 90 10 20 16 mov 0x16, %o0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2008a70: 08 bf ff fe bleu 2008a68 <posix_memalign+0x24>
2008a74: 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 );
2008a78: 82 13 c0 00 mov %o7, %g1
2008a7c: 40 00 00 8c call 2008cac <rtems_memalign>
2008a80: 9e 10 40 00 mov %g1, %o7
0200c4c8 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
200c4c8: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
200c4cc: 80 a0 60 00 cmp %g1, 0
200c4d0: 02 80 00 06 be 200c4e8 <pthread_attr_setschedpolicy+0x20>
200c4d4: 90 10 20 16 mov 0x16, %o0
200c4d8: c4 00 40 00 ld [ %g1 ], %g2
200c4dc: 80 a0 a0 00 cmp %g2, 0
200c4e0: 12 80 00 04 bne 200c4f0 <pthread_attr_setschedpolicy+0x28>
200c4e4: 80 a2 60 04 cmp %o1, 4
return 0;
default:
return ENOTSUP;
}
}
200c4e8: 81 c3 e0 08 retl
200c4ec: 01 00 00 00 nop
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
200c4f0: 18 80 00 09 bgu 200c514 <pthread_attr_setschedpolicy+0x4c>
200c4f4: 84 10 20 01 mov 1, %g2 ! 1 <PROM_START+0x1>
200c4f8: 85 28 80 09 sll %g2, %o1, %g2
200c4fc: 80 88 a0 17 btst 0x17, %g2
200c500: 02 80 00 05 be 200c514 <pthread_attr_setschedpolicy+0x4c> <== NEVER TAKEN
200c504: 01 00 00 00 nop
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
200c508: d2 20 60 14 st %o1, [ %g1 + 0x14 ]
return 0;
200c50c: 81 c3 e0 08 retl
200c510: 90 10 20 00 clr %o0
default:
return ENOTSUP;
}
}
200c514: 81 c3 e0 08 retl
200c518: 90 10 20 86 mov 0x86, %o0
020074e0 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
20074e0: 9d e3 bf 90 save %sp, -112, %sp
20074e4: ba 10 00 18 mov %i0, %i5
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
20074e8: 80 a7 60 00 cmp %i5, 0
20074ec: 02 80 00 27 be 2007588 <pthread_barrier_init+0xa8>
20074f0: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( count == 0 )
20074f4: 80 a6 a0 00 cmp %i2, 0
20074f8: 02 80 00 24 be 2007588 <pthread_barrier_init+0xa8>
20074fc: 80 a6 60 00 cmp %i1, 0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2007500: 02 80 00 24 be 2007590 <pthread_barrier_init+0xb0>
2007504: 90 07 bf f8 add %fp, -8, %o0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2007508: c2 06 40 00 ld [ %i1 ], %g1
200750c: 80 a0 60 00 cmp %g1, 0
2007510: 02 80 00 1e be 2007588 <pthread_barrier_init+0xa8>
2007514: b0 10 20 16 mov 0x16, %i0
return EINVAL;
switch ( the_attr->process_shared ) {
2007518: c2 06 60 04 ld [ %i1 + 4 ], %g1
200751c: 80 a0 60 00 cmp %g1, 0
2007520: 12 80 00 1a bne 2007588 <pthread_barrier_init+0xa8> <== NEVER TAKEN
2007524: 03 00 80 82 sethi %hi(0x2020800), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007528: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 2020b00 <_Thread_Dispatch_disable_level>
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
200752c: c0 27 bf f0 clr [ %fp + -16 ]
2007530: 84 00 a0 01 inc %g2
the_attributes.maximum_count = count;
2007534: f4 27 bf f4 st %i2, [ %fp + -12 ]
2007538: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
return _Thread_Dispatch_disable_level;
200753c: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
2007540: 37 00 80 83 sethi %hi(0x2020c00), %i3
2007544: 40 00 08 fc call 2009934 <_Objects_Allocate>
2007548: 90 16 e2 c0 or %i3, 0x2c0, %o0 ! 2020ec0 <_POSIX_Barrier_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
200754c: b8 92 20 00 orcc %o0, 0, %i4
2007550: 02 80 00 14 be 20075a0 <pthread_barrier_init+0xc0>
2007554: 90 07 20 10 add %i4, 0x10, %o0
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
2007558: 40 00 06 1c call 2008dc8 <_CORE_barrier_Initialize>
200755c: 92 07 bf f0 add %fp, -16, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007560: c4 17 20 0a lduh [ %i4 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007564: b6 16 e2 c0 or %i3, 0x2c0, %i3
2007568: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
200756c: c2 07 20 08 ld [ %i4 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007570: 85 28 a0 02 sll %g2, 2, %g2
2007574: f8 20 c0 02 st %i4, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2007578: c0 27 20 0c clr [ %i4 + 0xc ]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
200757c: c2 27 40 00 st %g1, [ %i5 ]
_Thread_Enable_dispatch();
2007580: 40 00 0e 1a call 200ade8 <_Thread_Enable_dispatch>
2007584: b0 10 20 00 clr %i0
return 0;
}
2007588: 81 c7 e0 08 ret
200758c: 81 e8 00 00 restore
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
2007590: 7f ff ff 9c call 2007400 <pthread_barrierattr_init>
2007594: b2 07 bf f8 add %fp, -8, %i1
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2007598: 10 bf ff dd b 200750c <pthread_barrier_init+0x2c>
200759c: c2 06 40 00 ld [ %i1 ], %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
20075a0: 40 00 0e 12 call 200ade8 <_Thread_Enable_dispatch>
20075a4: b0 10 20 0b mov 0xb, %i0
return EAGAIN;
20075a8: 81 c7 e0 08 ret
20075ac: 81 e8 00 00 restore
02006d7c <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
2006d7c: 9d e3 bf a0 save %sp, -96, %sp
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
2006d80: 80 a6 20 00 cmp %i0, 0
2006d84: 02 80 00 16 be 2006ddc <pthread_cleanup_push+0x60>
2006d88: 01 00 00 00 nop
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2006d8c: 03 00 80 80 sethi %hi(0x2020000), %g1
2006d90: c4 00 63 40 ld [ %g1 + 0x340 ], %g2 ! 2020340 <_Thread_Dispatch_disable_level>
2006d94: 84 00 a0 01 inc %g2
2006d98: c4 20 63 40 st %g2, [ %g1 + 0x340 ]
return _Thread_Dispatch_disable_level;
2006d9c: c2 00 63 40 ld [ %g1 + 0x340 ], %g1
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
2006da0: 40 00 13 12 call 200b9e8 <_Workspace_Allocate>
2006da4: 90 10 20 10 mov 0x10, %o0
if ( handler ) {
2006da8: 80 a2 20 00 cmp %o0, 0
2006dac: 02 80 00 0a be 2006dd4 <pthread_cleanup_push+0x58> <== NEVER TAKEN
2006db0: 01 00 00 00 nop
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2006db4: 03 00 80 82 sethi %hi(0x2020800), %g1
2006db8: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 202088c <_Per_CPU_Information+0xc>
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
2006dbc: 92 10 00 08 mov %o0, %o1
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
2006dc0: c2 00 61 5c ld [ %g1 + 0x15c ], %g1
handler->routine = routine;
2006dc4: f0 22 20 08 st %i0, [ %o0 + 8 ]
handler->arg = arg;
2006dc8: f2 22 20 0c st %i1, [ %o0 + 0xc ]
_Chain_Append( handler_stack, &handler->Node );
2006dcc: 40 00 06 62 call 2008754 <_Chain_Append>
2006dd0: 90 00 60 e4 add %g1, 0xe4, %o0
}
_Thread_Enable_dispatch();
2006dd4: 40 00 0e 5e call 200a74c <_Thread_Enable_dispatch>
2006dd8: 81 e8 00 00 restore
2006ddc: 81 c7 e0 08 ret
2006de0: 81 e8 00 00 restore
02007d24 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
2007d24: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
2007d28: 80 a6 60 00 cmp %i1, 0
2007d2c: 02 80 00 27 be 2007dc8 <pthread_cond_init+0xa4>
2007d30: ba 10 00 18 mov %i0, %i5
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
2007d34: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007d38: 80 a0 60 01 cmp %g1, 1
2007d3c: 02 80 00 21 be 2007dc0 <pthread_cond_init+0x9c> <== NEVER TAKEN
2007d40: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !the_attr->is_initialized )
2007d44: c2 06 40 00 ld [ %i1 ], %g1
2007d48: 80 a0 60 00 cmp %g1, 0
2007d4c: 02 80 00 1d be 2007dc0 <pthread_cond_init+0x9c>
2007d50: 03 00 80 87 sethi %hi(0x2021c00), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007d54: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 2021d20 <_Thread_Dispatch_disable_level>
2007d58: 84 00 a0 01 inc %g2
2007d5c: c4 20 61 20 st %g2, [ %g1 + 0x120 ]
return _Thread_Dispatch_disable_level;
2007d60: c2 00 61 20 ld [ %g1 + 0x120 ], %g1
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
2007d64: 37 00 80 88 sethi %hi(0x2022000), %i3
2007d68: 40 00 0a af call 200a824 <_Objects_Allocate>
2007d6c: 90 16 e1 78 or %i3, 0x178, %o0 ! 2022178 <_POSIX_Condition_variables_Information>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
2007d70: b8 92 20 00 orcc %o0, 0, %i4
2007d74: 02 80 00 18 be 2007dd4 <pthread_cond_init+0xb0>
2007d78: 90 07 20 18 add %i4, 0x18, %o0
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
2007d7c: c2 06 60 04 ld [ %i1 + 4 ], %g1
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
2007d80: 92 10 20 00 clr %o1
2007d84: 15 04 00 02 sethi %hi(0x10000800), %o2
2007d88: 96 10 20 74 mov 0x74, %o3
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
2007d8c: c2 27 20 10 st %g1, [ %i4 + 0x10 ]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
2007d90: 40 00 11 fd call 200c584 <_Thread_queue_Initialize>
2007d94: c0 27 20 14 clr [ %i4 + 0x14 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007d98: c4 17 20 0a lduh [ %i4 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007d9c: b6 16 e1 78 or %i3, 0x178, %i3
2007da0: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007da4: c2 07 20 08 ld [ %i4 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007da8: 85 28 a0 02 sll %g2, 2, %g2
2007dac: f8 20 c0 02 st %i4, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2007db0: c0 27 20 0c clr [ %i4 + 0xc ]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
2007db4: c2 27 40 00 st %g1, [ %i5 ]
_Thread_Enable_dispatch();
2007db8: 40 00 0f c8 call 200bcd8 <_Thread_Enable_dispatch>
2007dbc: b0 10 20 00 clr %i0
return 0;
}
2007dc0: 81 c7 e0 08 ret
2007dc4: 81 e8 00 00 restore
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
2007dc8: 33 00 80 7f sethi %hi(0x201fc00), %i1
2007dcc: 10 bf ff da b 2007d34 <pthread_cond_init+0x10>
2007dd0: b2 16 60 04 or %i1, 4, %i1 ! 201fc04 <_POSIX_Condition_variables_Default_attributes>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
2007dd4: 40 00 0f c1 call 200bcd8 <_Thread_Enable_dispatch>
2007dd8: b0 10 20 0c mov 0xc, %i0
return ENOMEM;
2007ddc: 81 c7 e0 08 ret
2007de0: 81 e8 00 00 restore
02007b88 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
2007b88: 82 10 00 08 mov %o0, %g1
if ( !attr || attr->is_initialized == false )
2007b8c: 80 a0 60 00 cmp %g1, 0
2007b90: 02 80 00 06 be 2007ba8 <pthread_condattr_destroy+0x20>
2007b94: 90 10 20 16 mov 0x16, %o0
2007b98: c4 00 40 00 ld [ %g1 ], %g2
2007b9c: 80 a0 a0 00 cmp %g2, 0
2007ba0: 32 80 00 04 bne,a 2007bb0 <pthread_condattr_destroy+0x28><== ALWAYS TAKEN
2007ba4: c0 20 40 00 clr [ %g1 ]
return EINVAL;
attr->is_initialized = false;
return 0;
}
2007ba8: 81 c3 e0 08 retl
2007bac: 01 00 00 00 nop
2007bb0: 81 c3 e0 08 retl
2007bb4: 90 10 20 00 clr %o0 ! 0 <PROM_START>
02007224 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
2007224: 9d e3 bf 58 save %sp, -168, %sp
2007228: ba 10 00 18 mov %i0, %i5
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
200722c: 80 a6 a0 00 cmp %i2, 0
2007230: 02 80 00 63 be 20073bc <pthread_create+0x198>
2007234: b0 10 20 0e mov 0xe, %i0
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
2007238: 80 a6 60 00 cmp %i1, 0
200723c: 22 80 00 62 be,a 20073c4 <pthread_create+0x1a0>
2007240: 33 00 80 88 sethi %hi(0x2022000), %i1
if ( !the_attr->is_initialized )
2007244: c2 06 40 00 ld [ %i1 ], %g1
2007248: 80 a0 60 00 cmp %g1, 0
200724c: 02 80 00 5c be 20073bc <pthread_create+0x198>
2007250: b0 10 20 16 mov 0x16, %i0
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
2007254: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007258: 80 a0 60 00 cmp %g1, 0
200725c: 02 80 00 07 be 2007278 <pthread_create+0x54>
2007260: 03 00 80 8d sethi %hi(0x2023400), %g1
2007264: c4 06 60 08 ld [ %i1 + 8 ], %g2
2007268: c2 00 61 44 ld [ %g1 + 0x144 ], %g1
200726c: 80 a0 80 01 cmp %g2, %g1
2007270: 0a 80 00 83 bcs 200747c <pthread_create+0x258>
2007274: 01 00 00 00 nop
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
2007278: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200727c: 80 a0 60 01 cmp %g1, 1
2007280: 02 80 00 53 be 20073cc <pthread_create+0x1a8>
2007284: 80 a0 60 02 cmp %g1, 2
2007288: 12 80 00 4d bne 20073bc <pthread_create+0x198>
200728c: b0 10 20 16 mov 0x16, %i0
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
2007290: da 06 60 18 ld [ %i1 + 0x18 ], %o5
2007294: de 06 60 1c ld [ %i1 + 0x1c ], %o7
2007298: f0 06 60 20 ld [ %i1 + 0x20 ], %i0
200729c: c8 06 60 24 ld [ %i1 + 0x24 ], %g4
20072a0: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
20072a4: c4 06 60 2c ld [ %i1 + 0x2c ], %g2
20072a8: c2 06 60 30 ld [ %i1 + 0x30 ], %g1
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
20072ac: f8 06 60 14 ld [ %i1 + 0x14 ], %i4
schedparam = the_attr->schedparam;
20072b0: da 27 bf dc st %o5, [ %fp + -36 ]
20072b4: de 27 bf e0 st %o7, [ %fp + -32 ]
20072b8: f0 27 bf e4 st %i0, [ %fp + -28 ]
20072bc: c8 27 bf e8 st %g4, [ %fp + -24 ]
20072c0: c6 27 bf ec st %g3, [ %fp + -20 ]
20072c4: c4 27 bf f0 st %g2, [ %fp + -16 ]
20072c8: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
20072cc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
20072d0: 80 a0 60 00 cmp %g1, 0
20072d4: 12 80 00 3a bne 20073bc <pthread_create+0x198>
20072d8: b0 10 20 86 mov 0x86, %i0
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
20072dc: d0 07 bf dc ld [ %fp + -36 ], %o0
20072e0: 40 00 1e a0 call 200ed60 <_POSIX_Priority_Is_valid>
20072e4: b0 10 20 16 mov 0x16, %i0
20072e8: 80 8a 20 ff btst 0xff, %o0
20072ec: 02 80 00 34 be 20073bc <pthread_create+0x198> <== NEVER TAKEN
20072f0: 03 00 80 8d sethi %hi(0x2023400), %g1
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
20072f4: e4 07 bf dc ld [ %fp + -36 ], %l2
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
20072f8: e6 08 61 40 ldub [ %g1 + 0x140 ], %l3
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
20072fc: 90 10 00 1c mov %i4, %o0
2007300: 92 07 bf dc add %fp, -36, %o1
2007304: 94 07 bf f8 add %fp, -8, %o2
2007308: 40 00 1e a3 call 200ed94 <_POSIX_Thread_Translate_sched_param>
200730c: 96 07 bf fc add %fp, -4, %o3
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
2007310: b0 92 20 00 orcc %o0, 0, %i0
2007314: 12 80 00 2a bne 20073bc <pthread_create+0x198>
2007318: 23 00 80 90 sethi %hi(0x2024000), %l1
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
200731c: d0 04 62 f8 ld [ %l1 + 0x2f8 ], %o0 ! 20242f8 <_RTEMS_Allocator_Mutex>
2007320: 40 00 06 93 call 2008d6c <_API_Mutex_Lock>
2007324: 29 00 80 91 sethi %hi(0x2024400), %l4
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
2007328: 40 00 09 83 call 2009934 <_Objects_Allocate>
200732c: 90 15 20 90 or %l4, 0x90, %o0 ! 2024490 <_POSIX_Threads_Information>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
2007330: a0 92 20 00 orcc %o0, 0, %l0
2007334: 02 80 00 1f be 20073b0 <pthread_create+0x18c>
2007338: 05 00 80 8d sethi %hi(0x2023400), %g2
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
200733c: c2 06 60 08 ld [ %i1 + 8 ], %g1
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
2007340: d6 00 a1 44 ld [ %g2 + 0x144 ], %o3
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
2007344: c0 27 bf d4 clr [ %fp + -44 ]
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
2007348: 97 2a e0 01 sll %o3, 1, %o3
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
200734c: 80 a2 c0 01 cmp %o3, %g1
2007350: 1a 80 00 03 bcc 200735c <pthread_create+0x138>
2007354: d4 06 60 04 ld [ %i1 + 4 ], %o2
2007358: 96 10 00 01 mov %g1, %o3
200735c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2007360: 9a 0c e0 ff and %l3, 0xff, %o5
2007364: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
2007368: 82 10 20 01 mov 1, %g1
200736c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2007370: c2 07 bf fc ld [ %fp + -4 ], %g1
2007374: c0 23 a0 68 clr [ %sp + 0x68 ]
2007378: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
200737c: 82 07 bf d4 add %fp, -44, %g1
2007380: 90 15 20 90 or %l4, 0x90, %o0
2007384: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2007388: 92 10 00 10 mov %l0, %o1
200738c: 98 10 20 01 mov 1, %o4
2007390: 40 00 0e cf call 200aecc <_Thread_Initialize>
2007394: 9a 23 40 12 sub %o5, %l2, %o5
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
2007398: 80 8a 20 ff btst 0xff, %o0
200739c: 12 80 00 1f bne 2007418 <pthread_create+0x1f4>
20073a0: 11 00 80 91 sethi %hi(0x2024400), %o0
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
20073a4: 92 10 00 10 mov %l0, %o1
20073a8: 40 00 0a 4d call 2009cdc <_Objects_Free>
20073ac: 90 12 20 90 or %o0, 0x90, %o0
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
20073b0: d0 04 62 f8 ld [ %l1 + 0x2f8 ], %o0
20073b4: 40 00 06 83 call 2008dc0 <_API_Mutex_Unlock>
20073b8: b0 10 20 0b mov 0xb, %i0
return EAGAIN;
20073bc: 81 c7 e0 08 ret
20073c0: 81 e8 00 00 restore
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
20073c4: 10 bf ff a0 b 2007244 <pthread_create+0x20>
20073c8: b2 16 61 2c or %i1, 0x12c, %i1
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20073cc: 03 00 80 91 sethi %hi(0x2024400), %g1
20073d0: c2 00 63 9c ld [ %g1 + 0x39c ], %g1 ! 202479c <_Per_CPU_Information+0xc>
20073d4: c2 00 61 5c ld [ %g1 + 0x15c ], %g1
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
20073d8: d8 00 60 88 ld [ %g1 + 0x88 ], %o4
20073dc: da 00 60 8c ld [ %g1 + 0x8c ], %o5
20073e0: de 00 60 90 ld [ %g1 + 0x90 ], %o7
20073e4: f0 00 60 94 ld [ %g1 + 0x94 ], %i0
20073e8: c8 00 60 98 ld [ %g1 + 0x98 ], %g4
20073ec: c6 00 60 9c ld [ %g1 + 0x9c ], %g3
20073f0: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
20073f4: f8 00 60 84 ld [ %g1 + 0x84 ], %i4
schedparam = api->schedparam;
20073f8: d8 27 bf dc st %o4, [ %fp + -36 ]
20073fc: da 27 bf e0 st %o5, [ %fp + -32 ]
2007400: de 27 bf e4 st %o7, [ %fp + -28 ]
2007404: f0 27 bf e8 st %i0, [ %fp + -24 ]
2007408: c8 27 bf ec st %g4, [ %fp + -20 ]
200740c: c6 27 bf f0 st %g3, [ %fp + -16 ]
break;
2007410: 10 bf ff af b 20072cc <pthread_create+0xa8>
2007414: c4 27 bf f4 st %g2, [ %fp + -12 ]
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
2007418: e4 04 21 5c ld [ %l0 + 0x15c ], %l2
api->Attributes = *the_attr;
200741c: 92 10 00 19 mov %i1, %o1
2007420: 94 10 20 40 mov 0x40, %o2
2007424: 40 00 2d d0 call 2012b64 <memcpy>
2007428: 90 10 00 12 mov %l2, %o0
api->detachstate = the_attr->detachstate;
200742c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
2007430: 92 07 bf dc add %fp, -36, %o1
2007434: 94 10 20 1c mov 0x1c, %o2
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
2007438: c2 24 a0 40 st %g1, [ %l2 + 0x40 ]
api->schedpolicy = schedpolicy;
200743c: f8 24 a0 84 st %i4, [ %l2 + 0x84 ]
api->schedparam = schedparam;
2007440: 40 00 2d c9 call 2012b64 <memcpy>
2007444: 90 04 a0 88 add %l2, 0x88, %o0
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2007448: 90 10 00 10 mov %l0, %o0
200744c: 92 10 20 01 mov 1, %o1
2007450: 94 10 00 1a mov %i2, %o2
2007454: 96 10 00 1b mov %i3, %o3
2007458: 40 00 11 21 call 200b8dc <_Thread_Start>
200745c: 98 10 20 00 clr %o4
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
2007460: 80 a7 20 04 cmp %i4, 4
2007464: 02 80 00 08 be 2007484 <pthread_create+0x260>
2007468: 01 00 00 00 nop
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
200746c: c2 04 20 08 ld [ %l0 + 8 ], %g1
_RTEMS_Unlock_allocator();
2007470: d0 04 62 f8 ld [ %l1 + 0x2f8 ], %o0
2007474: 40 00 06 53 call 2008dc0 <_API_Mutex_Unlock>
2007478: c2 27 40 00 st %g1, [ %i5 ]
return 0;
200747c: 81 c7 e0 08 ret
2007480: 81 e8 00 00 restore
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
2007484: 40 00 11 3e call 200b97c <_Timespec_To_ticks>
2007488: 90 04 a0 90 add %l2, 0x90, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200748c: 92 04 a0 a8 add %l2, 0xa8, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007490: d0 24 a0 b4 st %o0, [ %l2 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007494: 11 00 80 90 sethi %hi(0x2024000), %o0
2007498: 40 00 12 2c call 200bd48 <_Watchdog_Insert>
200749c: 90 12 23 10 or %o0, 0x310, %o0 ! 2024310 <_Watchdog_Ticks_chain>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
20074a0: 10 bf ff f4 b 2007470 <pthread_create+0x24c>
20074a4: c2 04 20 08 ld [ %l0 + 8 ], %g1
0201c3fc <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
201c3fc: 9d e3 bf 98 save %sp, -104, %sp
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
201c400: 80 a6 60 00 cmp %i1, 0
201c404: 02 80 00 2d be 201c4b8 <pthread_kill+0xbc>
201c408: b6 06 7f ff add %i1, -1, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201c40c: 80 a6 e0 1f cmp %i3, 0x1f
201c410: 18 80 00 2a bgu 201c4b8 <pthread_kill+0xbc>
201c414: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
201c418: 7f ff b6 90 call 2009e58 <_Thread_Get>
201c41c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
201c420: c2 07 bf fc ld [ %fp + -4 ], %g1
201c424: 80 a0 60 00 cmp %g1, 0
201c428: 12 80 00 2a bne 201c4d0 <pthread_kill+0xd4> <== NEVER TAKEN
201c42c: ba 10 00 08 mov %o0, %i5
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
201c430: 83 2e 60 02 sll %i1, 2, %g1
201c434: 85 2e 60 04 sll %i1, 4, %g2
201c438: 84 20 80 01 sub %g2, %g1, %g2
201c43c: 03 00 80 7e sethi %hi(0x201f800), %g1
201c440: 82 10 62 60 or %g1, 0x260, %g1 ! 201fa60 <_POSIX_signals_Vectors>
201c444: 82 00 40 02 add %g1, %g2, %g1
201c448: c4 00 60 08 ld [ %g1 + 8 ], %g2
201c44c: 80 a0 a0 01 cmp %g2, 1
201c450: 02 80 00 14 be 201c4a0 <pthread_kill+0xa4>
201c454: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201c458: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2
201c45c: b8 10 20 01 mov 1, %i4
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201c460: 92 10 00 19 mov %i1, %o1
201c464: b7 2f 00 1b sll %i4, %i3, %i3
201c468: 94 10 20 00 clr %o2
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201c46c: b6 10 80 1b or %g2, %i3, %i3
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201c470: 7f ff ff 8c call 201c2a0 <_POSIX_signals_Unblock_thread>
201c474: f6 20 60 d4 st %i3, [ %g1 + 0xd4 ]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201c478: 03 00 80 7e sethi %hi(0x201f800), %g1
201c47c: 82 10 62 00 or %g1, 0x200, %g1 ! 201fa00 <_Per_CPU_Information>
201c480: c4 00 60 08 ld [ %g1 + 8 ], %g2
201c484: 80 a0 a0 00 cmp %g2, 0
201c488: 02 80 00 06 be 201c4a0 <pthread_kill+0xa4>
201c48c: 01 00 00 00 nop
201c490: c4 00 60 0c ld [ %g1 + 0xc ], %g2
201c494: 80 a7 40 02 cmp %i5, %g2
201c498: 02 80 00 06 be 201c4b0 <pthread_kill+0xb4>
201c49c: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
}
_Thread_Enable_dispatch();
201c4a0: 7f ff b6 61 call 2009e24 <_Thread_Enable_dispatch>
201c4a4: b0 10 20 00 clr %i0 ! 0 <PROM_START>
return 0;
201c4a8: 81 c7 e0 08 ret
201c4ac: 81 e8 00 00 restore
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
201c4b0: f8 28 60 18 stb %i4, [ %g1 + 0x18 ]
201c4b4: 30 bf ff fb b,a 201c4a0 <pthread_kill+0xa4>
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
201c4b8: 7f ff d4 46 call 20115d0 <__errno>
201c4bc: b0 10 3f ff mov -1, %i0
201c4c0: 82 10 20 16 mov 0x16, %g1
201c4c4: c2 22 00 00 st %g1, [ %o0 ]
201c4c8: 81 c7 e0 08 ret
201c4cc: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
201c4d0: 7f ff d4 40 call 20115d0 <__errno> <== NOT EXECUTED
201c4d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201c4d8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
201c4dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
201c4e0: 81 c7 e0 08 ret <== NOT EXECUTED
201c4e4: 81 e8 00 00 restore <== NOT EXECUTED
0200926c <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
200926c: 9d e3 bf 98 save %sp, -104, %sp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2009270: 90 10 00 19 mov %i1, %o0
2009274: 40 00 00 37 call 2009350 <_POSIX_Absolute_timeout_to_ticks>
2009278: 92 07 bf fc add %fp, -4, %o1
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
200927c: d4 07 bf fc ld [ %fp + -4 ], %o2
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2009280: ba 10 00 08 mov %o0, %i5
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
2009284: 80 a7 60 03 cmp %i5, 3
2009288: 02 80 00 09 be 20092ac <pthread_mutex_timedlock+0x40>
200928c: 90 10 00 18 mov %i0, %o0
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2009290: 7f ff ff be call 2009188 <_POSIX_Mutex_Lock_support>
2009294: 92 10 20 00 clr %o1
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
2009298: 80 a2 20 10 cmp %o0, 0x10
200929c: 02 80 00 08 be 20092bc <pthread_mutex_timedlock+0x50>
20092a0: 80 a7 60 00 cmp %i5, 0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
20092a4: 81 c7 e0 08 ret
20092a8: 91 e8 00 08 restore %g0, %o0, %o0
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
20092ac: 7f ff ff b7 call 2009188 <_POSIX_Mutex_Lock_support>
20092b0: 92 10 20 01 mov 1, %o1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
20092b4: 81 c7 e0 08 ret
20092b8: 91 e8 00 08 restore %g0, %o0, %o0
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
20092bc: 32 80 00 04 bne,a 20092cc <pthread_mutex_timedlock+0x60> <== ALWAYS TAKEN
20092c0: ba 07 7f ff add %i5, -1, %i5
return EINVAL;
20092c4: 10 bf ff f8 b 20092a4 <pthread_mutex_timedlock+0x38> <== NOT EXECUTED
20092c8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
20092cc: 80 a7 60 01 cmp %i5, 1
20092d0: 28 bf ff f5 bleu,a 20092a4 <pthread_mutex_timedlock+0x38><== ALWAYS TAKEN
20092d4: 90 10 20 74 mov 0x74, %o0
20092d8: 30 bf ff f3 b,a 20092a4 <pthread_mutex_timedlock+0x38> <== NOT EXECUTED
02006aa4 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
2006aa4: 82 10 00 08 mov %o0, %g1
if ( !attr )
2006aa8: 80 a0 60 00 cmp %g1, 0
2006aac: 02 80 00 06 be 2006ac4 <pthread_mutexattr_gettype+0x20>
2006ab0: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2006ab4: c4 00 40 00 ld [ %g1 ], %g2
2006ab8: 80 a0 a0 00 cmp %g2, 0
2006abc: 12 80 00 04 bne 2006acc <pthread_mutexattr_gettype+0x28>
2006ac0: 80 a2 60 00 cmp %o1, 0
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
}
2006ac4: 81 c3 e0 08 retl
2006ac8: 01 00 00 00 nop
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
2006acc: 02 bf ff fe be 2006ac4 <pthread_mutexattr_gettype+0x20> <== NEVER TAKEN
2006ad0: 01 00 00 00 nop
return EINVAL;
*type = attr->type;
2006ad4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
return 0;
2006ad8: 90 10 20 00 clr %o0
}
2006adc: 81 c3 e0 08 retl
2006ae0: c2 22 40 00 st %g1, [ %o1 ]
02008e40 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
2008e40: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
2008e44: 80 a0 60 00 cmp %g1, 0
2008e48: 02 80 00 06 be 2008e60 <pthread_mutexattr_setpshared+0x20>
2008e4c: 90 10 20 16 mov 0x16, %o0
2008e50: c4 00 40 00 ld [ %g1 ], %g2
2008e54: 80 a0 a0 00 cmp %g2, 0
2008e58: 12 80 00 04 bne 2008e68 <pthread_mutexattr_setpshared+0x28>
2008e5c: 80 a2 60 01 cmp %o1, 1
return 0;
default:
return EINVAL;
}
}
2008e60: 81 c3 e0 08 retl
2008e64: 01 00 00 00 nop
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
2008e68: 18 bf ff fe bgu 2008e60 <pthread_mutexattr_setpshared+0x20><== NEVER TAKEN
2008e6c: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2008e70: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
default:
return EINVAL;
}
}
2008e74: 81 c3 e0 08 retl
2008e78: 90 10 20 00 clr %o0
02006b38 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
2006b38: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
2006b3c: 80 a0 60 00 cmp %g1, 0
2006b40: 02 80 00 06 be 2006b58 <pthread_mutexattr_settype+0x20>
2006b44: 90 10 20 16 mov 0x16, %o0
2006b48: c4 00 40 00 ld [ %g1 ], %g2
2006b4c: 80 a0 a0 00 cmp %g2, 0
2006b50: 12 80 00 04 bne 2006b60 <pthread_mutexattr_settype+0x28> <== ALWAYS TAKEN
2006b54: 80 a2 60 03 cmp %o1, 3
return 0;
default:
return EINVAL;
}
}
2006b58: 81 c3 e0 08 retl
2006b5c: 01 00 00 00 nop
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( type ) {
2006b60: 18 bf ff fe bgu 2006b58 <pthread_mutexattr_settype+0x20>
2006b64: 01 00 00 00 nop
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
2006b68: d2 20 60 10 st %o1, [ %g1 + 0x10 ]
return 0;
default:
return EINVAL;
}
}
2006b6c: 81 c3 e0 08 retl
2006b70: 90 10 20 00 clr %o0
02007974 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
2007974: 9d e3 bf 98 save %sp, -104, %sp
if ( !once_control || !init_routine )
2007978: 80 a6 60 00 cmp %i1, 0
200797c: 12 80 00 04 bne 200798c <pthread_once+0x18>
2007980: ba 10 00 18 mov %i0, %i5
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
2007984: 81 c7 e0 08 ret
2007988: 91 e8 20 16 restore %g0, 0x16, %o0
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
200798c: 80 a6 20 00 cmp %i0, 0
2007990: 22 80 00 13 be,a 20079dc <pthread_once+0x68>
2007994: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !once_control->init_executed ) {
2007998: c2 06 20 04 ld [ %i0 + 4 ], %g1
200799c: 80 a0 60 00 cmp %g1, 0
20079a0: 12 80 00 0f bne 20079dc <pthread_once+0x68>
20079a4: b0 10 20 00 clr %i0
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
20079a8: 90 10 21 00 mov 0x100, %o0
20079ac: 92 10 21 00 mov 0x100, %o1
20079b0: 40 00 03 0e call 20085e8 <rtems_task_mode>
20079b4: 94 07 bf fc add %fp, -4, %o2
if ( !once_control->init_executed ) {
20079b8: c2 07 60 04 ld [ %i5 + 4 ], %g1
20079bc: 80 a0 60 00 cmp %g1, 0
20079c0: 02 80 00 09 be 20079e4 <pthread_once+0x70> <== ALWAYS TAKEN
20079c4: 82 10 20 01 mov 1, %g1
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
20079c8: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
20079cc: 92 10 21 00 mov 0x100, %o1
20079d0: 94 07 bf fc add %fp, -4, %o2
20079d4: 40 00 03 05 call 20085e8 <rtems_task_mode>
20079d8: b0 10 20 00 clr %i0
20079dc: 81 c7 e0 08 ret
20079e0: 81 e8 00 00 restore
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
20079e4: c2 27 40 00 st %g1, [ %i5 ]
once_control->init_executed = true;
(*init_routine)();
20079e8: 9f c6 40 00 call %i1
20079ec: c2 27 60 04 st %g1, [ %i5 + 4 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
20079f0: 10 bf ff f7 b 20079cc <pthread_once+0x58>
20079f4: d0 07 bf fc ld [ %fp + -4 ], %o0
0200808c <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
200808c: 9d e3 bf 90 save %sp, -112, %sp
2008090: ba 10 00 18 mov %i0, %i5
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
2008094: 80 a7 60 00 cmp %i5, 0
2008098: 02 80 00 24 be 2008128 <pthread_rwlock_init+0x9c>
200809c: b0 10 20 16 mov 0x16, %i0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
20080a0: 80 a6 60 00 cmp %i1, 0
20080a4: 02 80 00 23 be 2008130 <pthread_rwlock_init+0xa4>
20080a8: 90 07 bf f4 add %fp, -12, %o0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
20080ac: c2 06 40 00 ld [ %i1 ], %g1
20080b0: 80 a0 60 00 cmp %g1, 0
20080b4: 02 80 00 1d be 2008128 <pthread_rwlock_init+0x9c> <== NEVER TAKEN
20080b8: b0 10 20 16 mov 0x16, %i0
return EINVAL;
switch ( the_attr->process_shared ) {
20080bc: c2 06 60 04 ld [ %i1 + 4 ], %g1
20080c0: 80 a0 60 00 cmp %g1, 0
20080c4: 12 80 00 19 bne 2008128 <pthread_rwlock_init+0x9c> <== NEVER TAKEN
20080c8: 03 00 80 89 sethi %hi(0x2022400), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20080cc: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 20224d0 <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
20080d0: c0 27 bf fc clr [ %fp + -4 ]
20080d4: 84 00 a0 01 inc %g2
20080d8: c4 20 60 d0 st %g2, [ %g1 + 0xd0 ]
return _Thread_Dispatch_disable_level;
20080dc: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
20080e0: 37 00 80 89 sethi %hi(0x2022400), %i3
20080e4: 40 00 0a a4 call 200ab74 <_Objects_Allocate>
20080e8: 90 16 e2 d0 or %i3, 0x2d0, %o0 ! 20226d0 <_POSIX_RWLock_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
20080ec: b8 92 20 00 orcc %o0, 0, %i4
20080f0: 02 80 00 14 be 2008140 <pthread_rwlock_init+0xb4>
20080f4: 90 07 20 10 add %i4, 0x10, %o0
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
20080f8: 40 00 08 22 call 200a180 <_CORE_RWLock_Initialize>
20080fc: 92 07 bf fc add %fp, -4, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2008100: c4 17 20 0a lduh [ %i4 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008104: b6 16 e2 d0 or %i3, 0x2d0, %i3
2008108: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
200810c: c2 07 20 08 ld [ %i4 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008110: 85 28 a0 02 sll %g2, 2, %g2
2008114: f8 20 c0 02 st %i4, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2008118: c0 27 20 0c clr [ %i4 + 0xc ]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
200811c: c2 27 40 00 st %g1, [ %i5 ]
_Thread_Enable_dispatch();
2008120: 40 00 0f c2 call 200c028 <_Thread_Enable_dispatch>
2008124: b0 10 20 00 clr %i0
return 0;
}
2008128: 81 c7 e0 08 ret
200812c: 81 e8 00 00 restore
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
2008130: 40 00 02 80 call 2008b30 <pthread_rwlockattr_init>
2008134: b2 07 bf f4 add %fp, -12, %i1
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2008138: 10 bf ff de b 20080b0 <pthread_rwlock_init+0x24>
200813c: c2 06 40 00 ld [ %i1 ], %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
2008140: 40 00 0f ba call 200c028 <_Thread_Enable_dispatch>
2008144: b0 10 20 0b mov 0xb, %i0
return EAGAIN;
2008148: 81 c7 e0 08 ret
200814c: 81 e8 00 00 restore
020081c0 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
20081c0: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
20081c4: 80 a6 20 00 cmp %i0, 0
20081c8: 02 80 00 24 be 2008258 <pthread_rwlock_timedrdlock+0x98>
20081cc: ba 10 20 16 mov 0x16, %i5
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
20081d0: 92 07 bf fc add %fp, -4, %o1
20081d4: 40 00 1f 30 call 200fe94 <_POSIX_Absolute_timeout_to_ticks>
20081d8: 90 10 00 19 mov %i1, %o0
20081dc: d2 06 00 00 ld [ %i0 ], %o1
20081e0: b8 10 00 08 mov %o0, %i4
20081e4: 94 07 bf f8 add %fp, -8, %o2
20081e8: 11 00 80 89 sethi %hi(0x2022400), %o0
20081ec: 40 00 0b ad call 200b0a0 <_Objects_Get>
20081f0: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 20226d0 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
20081f4: c2 07 bf f8 ld [ %fp + -8 ], %g1
20081f8: 80 a0 60 00 cmp %g1, 0
20081fc: 12 80 00 17 bne 2008258 <pthread_rwlock_timedrdlock+0x98>
2008200: d6 07 bf fc ld [ %fp + -4 ], %o3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
2008204: d2 06 00 00 ld [ %i0 ], %o1
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
2008208: 82 1f 20 03 xor %i4, 3, %g1
200820c: 90 02 20 10 add %o0, 0x10, %o0
2008210: 80 a0 00 01 cmp %g0, %g1
2008214: 98 10 20 00 clr %o4
2008218: b6 60 3f ff subx %g0, -1, %i3
200821c: 40 00 07 e3 call 200a1a8 <_CORE_RWLock_Obtain_for_reading>
2008220: 94 10 00 1b mov %i3, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2008224: 40 00 0f 81 call 200c028 <_Thread_Enable_dispatch>
2008228: 01 00 00 00 nop
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
200822c: 03 00 80 8a sethi %hi(0x2022800), %g1
2008230: c2 00 62 1c ld [ %g1 + 0x21c ], %g1 ! 2022a1c <_Per_CPU_Information+0xc>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
2008234: 80 a6 e0 00 cmp %i3, 0
2008238: 12 80 00 05 bne 200824c <pthread_rwlock_timedrdlock+0x8c>
200823c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
2008240: 80 a2 20 02 cmp %o0, 2
2008244: 02 80 00 07 be 2008260 <pthread_rwlock_timedrdlock+0xa0>
2008248: 80 a7 20 00 cmp %i4, 0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
200824c: 40 00 00 39 call 2008330 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2008250: 01 00 00 00 nop
2008254: ba 10 00 08 mov %o0, %i5
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2008258: 81 c7 e0 08 ret
200825c: 91 e8 00 1d restore %g0, %i5, %o0
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
2008260: 02 bf ff fe be 2008258 <pthread_rwlock_timedrdlock+0x98> <== NEVER TAKEN
2008264: b8 07 3f ff add %i4, -1, %i4
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2008268: 80 a7 20 01 cmp %i4, 1
200826c: 18 bf ff f8 bgu 200824c <pthread_rwlock_timedrdlock+0x8c> <== NEVER TAKEN
2008270: ba 10 20 74 mov 0x74, %i5
2008274: 30 bf ff f9 b,a 2008258 <pthread_rwlock_timedrdlock+0x98>
02008278 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2008278: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
200827c: 80 a6 20 00 cmp %i0, 0
2008280: 02 80 00 24 be 2008310 <pthread_rwlock_timedwrlock+0x98>
2008284: ba 10 20 16 mov 0x16, %i5
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2008288: 92 07 bf fc add %fp, -4, %o1
200828c: 40 00 1f 02 call 200fe94 <_POSIX_Absolute_timeout_to_ticks>
2008290: 90 10 00 19 mov %i1, %o0
2008294: d2 06 00 00 ld [ %i0 ], %o1
2008298: b8 10 00 08 mov %o0, %i4
200829c: 94 07 bf f8 add %fp, -8, %o2
20082a0: 11 00 80 89 sethi %hi(0x2022400), %o0
20082a4: 40 00 0b 7f call 200b0a0 <_Objects_Get>
20082a8: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 20226d0 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
20082ac: c2 07 bf f8 ld [ %fp + -8 ], %g1
20082b0: 80 a0 60 00 cmp %g1, 0
20082b4: 12 80 00 17 bne 2008310 <pthread_rwlock_timedwrlock+0x98>
20082b8: d6 07 bf fc ld [ %fp + -4 ], %o3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
20082bc: d2 06 00 00 ld [ %i0 ], %o1
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
20082c0: 82 1f 20 03 xor %i4, 3, %g1
20082c4: 90 02 20 10 add %o0, 0x10, %o0
20082c8: 80 a0 00 01 cmp %g0, %g1
20082cc: 98 10 20 00 clr %o4
20082d0: b6 60 3f ff subx %g0, -1, %i3
20082d4: 40 00 07 eb call 200a280 <_CORE_RWLock_Obtain_for_writing>
20082d8: 94 10 00 1b mov %i3, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
20082dc: 40 00 0f 53 call 200c028 <_Thread_Enable_dispatch>
20082e0: 01 00 00 00 nop
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
20082e4: 03 00 80 8a sethi %hi(0x2022800), %g1
20082e8: c2 00 62 1c ld [ %g1 + 0x21c ], %g1 ! 2022a1c <_Per_CPU_Information+0xc>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
20082ec: 80 a6 e0 00 cmp %i3, 0
20082f0: 12 80 00 05 bne 2008304 <pthread_rwlock_timedwrlock+0x8c>
20082f4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
20082f8: 80 a2 20 02 cmp %o0, 2
20082fc: 02 80 00 07 be 2008318 <pthread_rwlock_timedwrlock+0xa0>
2008300: 80 a7 20 00 cmp %i4, 0
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
2008304: 40 00 00 0b call 2008330 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2008308: 01 00 00 00 nop
200830c: ba 10 00 08 mov %o0, %i5
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2008310: 81 c7 e0 08 ret
2008314: 91 e8 00 1d restore %g0, %i5, %o0
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
2008318: 02 bf ff fe be 2008310 <pthread_rwlock_timedwrlock+0x98> <== NEVER TAKEN
200831c: b8 07 3f ff add %i4, -1, %i4
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2008320: 80 a7 20 01 cmp %i4, 1
2008324: 18 bf ff f8 bgu 2008304 <pthread_rwlock_timedwrlock+0x8c> <== NEVER TAKEN
2008328: ba 10 20 74 mov 0x74, %i5
200832c: 30 bf ff f9 b,a 2008310 <pthread_rwlock_timedwrlock+0x98>
02008b58 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
2008b58: 82 10 00 08 mov %o0, %g1
if ( !attr )
2008b5c: 80 a0 60 00 cmp %g1, 0
2008b60: 02 80 00 06 be 2008b78 <pthread_rwlockattr_setpshared+0x20>
2008b64: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2008b68: c4 00 40 00 ld [ %g1 ], %g2
2008b6c: 80 a0 a0 00 cmp %g2, 0
2008b70: 12 80 00 04 bne 2008b80 <pthread_rwlockattr_setpshared+0x28>
2008b74: 80 a2 60 01 cmp %o1, 1
return 0;
default:
return EINVAL;
}
}
2008b78: 81 c3 e0 08 retl
2008b7c: 01 00 00 00 nop
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
2008b80: 18 bf ff fe bgu 2008b78 <pthread_rwlockattr_setpshared+0x20><== NEVER TAKEN
2008b84: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2008b88: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
default:
return EINVAL;
}
}
2008b8c: 81 c3 e0 08 retl
2008b90: 90 10 20 00 clr %o0
02009c2c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
2009c2c: 9d e3 bf 90 save %sp, -112, %sp
2009c30: ba 10 00 18 mov %i0, %i5
int rc;
/*
* Check all the parameters
*/
if ( !param )
2009c34: 80 a6 a0 00 cmp %i2, 0
2009c38: 02 80 00 38 be 2009d18 <pthread_setschedparam+0xec>
2009c3c: b0 10 20 16 mov 0x16, %i0
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
2009c40: 90 10 00 19 mov %i1, %o0
2009c44: 92 10 00 1a mov %i2, %o1
2009c48: 94 07 bf f4 add %fp, -12, %o2
2009c4c: 40 00 1c f1 call 2011010 <_POSIX_Thread_Translate_sched_param>
2009c50: 96 07 bf f8 add %fp, -8, %o3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
2009c54: b0 92 20 00 orcc %o0, 0, %i0
2009c58: 12 80 00 30 bne 2009d18 <pthread_setschedparam+0xec>
2009c5c: 90 10 00 1d mov %i5, %o0
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
2009c60: 40 00 0c ca call 200cf88 <_Thread_Get>
2009c64: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2009c68: c2 07 bf fc ld [ %fp + -4 ], %g1
2009c6c: 80 a0 60 00 cmp %g1, 0
2009c70: 12 80 00 2c bne 2009d20 <pthread_setschedparam+0xf4>
2009c74: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
2009c78: fa 02 21 5c ld [ %o0 + 0x15c ], %i5
if ( api->schedpolicy == SCHED_SPORADIC )
2009c7c: c2 07 60 84 ld [ %i5 + 0x84 ], %g1
2009c80: 80 a0 60 04 cmp %g1, 4
2009c84: 02 80 00 33 be 2009d50 <pthread_setschedparam+0x124>
2009c88: 01 00 00 00 nop
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
2009c8c: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
api->schedparam = *param;
2009c90: c2 06 80 00 ld [ %i2 ], %g1
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
2009c94: 80 a6 60 00 cmp %i1, 0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
2009c98: c2 27 60 88 st %g1, [ %i5 + 0x88 ]
2009c9c: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2009ca0: c4 27 60 8c st %g2, [ %i5 + 0x8c ]
2009ca4: c4 06 a0 08 ld [ %i2 + 8 ], %g2
2009ca8: c4 27 60 90 st %g2, [ %i5 + 0x90 ]
2009cac: c4 06 a0 0c ld [ %i2 + 0xc ], %g2
2009cb0: c4 27 60 94 st %g2, [ %i5 + 0x94 ]
2009cb4: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2
2009cb8: c4 27 60 98 st %g2, [ %i5 + 0x98 ]
2009cbc: c4 06 a0 14 ld [ %i2 + 0x14 ], %g2
2009cc0: c4 27 60 9c st %g2, [ %i5 + 0x9c ]
2009cc4: c4 06 a0 18 ld [ %i2 + 0x18 ], %g2
2009cc8: c4 27 60 a0 st %g2, [ %i5 + 0xa0 ]
the_thread->budget_algorithm = budget_algorithm;
2009ccc: c4 07 bf f4 ld [ %fp + -12 ], %g2
2009cd0: c4 27 20 78 st %g2, [ %i4 + 0x78 ]
the_thread->budget_callout = budget_callout;
2009cd4: c4 07 bf f8 ld [ %fp + -8 ], %g2
switch ( api->schedpolicy ) {
2009cd8: 06 80 00 0e bl 2009d10 <pthread_setschedparam+0xe4> <== NEVER TAKEN
2009cdc: c4 27 20 7c st %g2, [ %i4 + 0x7c ]
2009ce0: 80 a6 60 02 cmp %i1, 2
2009ce4: 04 80 00 11 ble 2009d28 <pthread_setschedparam+0xfc>
2009ce8: 07 00 80 8e sethi %hi(0x2023800), %g3
2009cec: 80 a6 60 04 cmp %i1, 4
2009cf0: 12 80 00 08 bne 2009d10 <pthread_setschedparam+0xe4> <== NEVER TAKEN
2009cf4: 01 00 00 00 nop
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
2009cf8: c2 27 60 a4 st %g1, [ %i5 + 0xa4 ]
_Watchdog_Remove( &api->Sporadic_timer );
2009cfc: 40 00 11 21 call 200e180 <_Watchdog_Remove>
2009d00: 90 07 60 a8 add %i5, 0xa8, %o0
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
2009d04: 90 10 20 00 clr %o0
2009d08: 7f ff ff 7e call 2009b00 <_POSIX_Threads_Sporadic_budget_TSR>
2009d0c: 92 10 00 1c mov %i4, %o1
break;
}
_Thread_Enable_dispatch();
2009d10: 40 00 0c 91 call 200cf54 <_Thread_Enable_dispatch>
2009d14: 01 00 00 00 nop
return 0;
2009d18: 81 c7 e0 08 ret
2009d1c: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
2009d20: 81 c7 e0 08 ret
2009d24: 91 e8 20 03 restore %g0, 3, %o0
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009d28: 05 00 80 92 sethi %hi(0x2024800), %g2
2009d2c: d2 08 e3 b0 ldub [ %g3 + 0x3b0 ], %o1
2009d30: c4 00 a0 94 ld [ %g2 + 0x94 ], %g2
2009d34: 92 22 40 01 sub %o1, %g1, %o1
2009d38: c4 27 20 74 st %g2, [ %i4 + 0x74 ]
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
2009d3c: 90 10 00 1c mov %i4, %o0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
the_thread->real_priority =
2009d40: d2 27 20 18 st %o1, [ %i4 + 0x18 ]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
2009d44: 40 00 0b 47 call 200ca60 <_Thread_Change_priority>
2009d48: 94 10 20 01 mov 1, %o2
the_thread,
the_thread->real_priority,
true
);
break;
2009d4c: 30 bf ff f1 b,a 2009d10 <pthread_setschedparam+0xe4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
2009d50: 40 00 11 0c call 200e180 <_Watchdog_Remove>
2009d54: 90 07 60 a8 add %i5, 0xa8, %o0
api->schedpolicy = policy;
2009d58: 10 bf ff ce b 2009c90 <pthread_setschedparam+0x64>
2009d5c: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
020075d4 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
20075d4: 9d e3 bf a0 save %sp, -96, %sp
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
20075d8: 3b 00 80 82 sethi %hi(0x2020800), %i5
20075dc: ba 17 60 80 or %i5, 0x80, %i5 ! 2020880 <_Per_CPU_Information>
20075e0: c2 07 60 08 ld [ %i5 + 8 ], %g1
20075e4: 80 a0 60 00 cmp %g1, 0
20075e8: 12 80 00 16 bne 2007640 <pthread_testcancel+0x6c> <== NEVER TAKEN
20075ec: 01 00 00 00 nop
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20075f0: 03 00 80 80 sethi %hi(0x2020000), %g1
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20075f4: c4 07 60 0c ld [ %i5 + 0xc ], %g2
20075f8: c6 00 63 40 ld [ %g1 + 0x340 ], %g3
20075fc: c4 00 a1 5c ld [ %g2 + 0x15c ], %g2
2007600: 86 00 e0 01 inc %g3
2007604: c6 20 63 40 st %g3, [ %g1 + 0x340 ]
return _Thread_Dispatch_disable_level;
2007608: c2 00 63 40 ld [ %g1 + 0x340 ], %g1
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
200760c: c2 00 a0 d8 ld [ %g2 + 0xd8 ], %g1
2007610: 80 a0 60 00 cmp %g1, 0
2007614: 12 80 00 0d bne 2007648 <pthread_testcancel+0x74> <== NEVER TAKEN
2007618: 01 00 00 00 nop
200761c: c2 00 a0 e0 ld [ %g2 + 0xe0 ], %g1
2007620: 80 a0 60 00 cmp %g1, 0
2007624: 02 80 00 09 be 2007648 <pthread_testcancel+0x74>
2007628: 01 00 00 00 nop
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
200762c: 40 00 0c 48 call 200a74c <_Thread_Enable_dispatch>
2007630: b2 10 3f ff mov -1, %i1 ! ffffffff <RAM_END+0xfdbfffff>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
2007634: f0 07 60 0c ld [ %i5 + 0xc ], %i0
2007638: 40 00 1c a1 call 200e8bc <_POSIX_Thread_Exit>
200763c: 81 e8 00 00 restore
2007640: 81 c7 e0 08 ret <== NOT EXECUTED
2007644: 81 e8 00 00 restore <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2007648: 40 00 0c 41 call 200a74c <_Thread_Enable_dispatch>
200764c: 81 e8 00 00 restore
0200c510 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
200c510: 9d e3 bf a0 save %sp, -96, %sp
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
200c514: 7f ff e0 c9 call 2004838 <malloc>
200c518: 90 10 20 10 mov 0x10, %o0
if (rd == NULL) {
200c51c: ba 92 20 00 orcc %o0, 0, %i5
200c520: 02 80 00 0b be 200c54c <ramdisk_allocate+0x3c> <== NEVER TAKEN
200c524: 80 a6 20 00 cmp %i0, 0
return NULL;
}
if (area_begin == NULL) {
200c528: 02 80 00 0b be 200c554 <ramdisk_allocate+0x44> <== ALWAYS TAKEN
200c52c: 90 10 00 1a mov %i2, %o0
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
200c530: c0 2f 60 0d clrb [ %i5 + 0xd ] <== NOT EXECUTED
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
200c534: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
200c538: f2 27 40 00 st %i1, [ %i5 ]
rd->block_num = block_count;
200c53c: f4 27 60 04 st %i2, [ %i5 + 4 ]
rd->area = area_begin;
200c540: f0 27 60 08 st %i0, [ %i5 + 8 ]
rd->trace = trace;
200c544: f6 2f 60 0e stb %i3, [ %i5 + 0xe ]
rd->initialized = true;
200c548: c2 2f 60 0c stb %g1, [ %i5 + 0xc ]
return rd;
}
200c54c: 81 c7 e0 08 ret
200c550: 91 e8 00 1d restore %g0, %i5, %o0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
200c554: 7f ff de 62 call 2003edc <calloc>
200c558: 92 10 00 19 mov %i1, %o1
if (area_begin == NULL) {
200c55c: b0 92 20 00 orcc %o0, 0, %i0
200c560: 02 80 00 04 be 200c570 <ramdisk_allocate+0x60> <== NEVER TAKEN
200c564: 82 10 20 01 mov 1, %g1
free(rd);
return NULL;
}
rd->malloced = true;
200c568: 10 bf ff f4 b 200c538 <ramdisk_allocate+0x28>
200c56c: c2 2f 60 0d stb %g1, [ %i5 + 0xd ]
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
free(rd);
200c570: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200c574: 7f ff df 7d call 2004368 <free> <== NOT EXECUTED
200c578: ba 10 20 00 clr %i5 <== NOT EXECUTED
return NULL;
200c57c: 30 bf ff f4 b,a 200c54c <ramdisk_allocate+0x3c> <== NOT EXECUTED
0200c580 <ramdisk_free>:
return rd;
}
void ramdisk_free(ramdisk *rd)
{
200c580: 9d e3 bf a0 save %sp, -96, %sp
if (rd != NULL) {
200c584: 80 a6 20 00 cmp %i0, 0
200c588: 02 80 00 0c be 200c5b8 <ramdisk_free+0x38> <== NEVER TAKEN
200c58c: 01 00 00 00 nop
if (rd->malloced) {
200c590: c2 0e 20 0d ldub [ %i0 + 0xd ], %g1
200c594: 80 a0 60 00 cmp %g1, 0
200c598: 12 80 00 04 bne 200c5a8 <ramdisk_free+0x28> <== ALWAYS TAKEN
200c59c: 01 00 00 00 nop
free(rd->area);
}
free(rd);
200c5a0: 7f ff df 72 call 2004368 <free> <== NOT EXECUTED
200c5a4: 81 e8 00 00 restore <== NOT EXECUTED
void ramdisk_free(ramdisk *rd)
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
200c5a8: 7f ff df 70 call 2004368 <free>
200c5ac: d0 06 20 08 ld [ %i0 + 8 ], %o0
}
free(rd);
200c5b0: 7f ff df 6e call 2004368 <free>
200c5b4: 81 e8 00 00 restore
200c5b8: 81 c7 e0 08 ret <== NOT EXECUTED
200c5bc: 81 e8 00 00 restore <== NOT EXECUTED
0200c3ec <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200c3ec: 9d e3 bf a0 save %sp, -96, %sp
switch (req)
200c3f0: 03 30 06 10 sethi %hi(0xc0184000), %g1
200c3f4: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201>
200c3f8: 80 a6 40 01 cmp %i1, %g1
200c3fc: 02 80 00 04 be 200c40c <ramdisk_ioctl+0x20>
200c400: ba 10 00 1a mov %i2, %i5
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
200c404: 40 00 0d 08 call 200f824 <rtems_blkdev_ioctl>
200c408: 81 e8 00 00 restore
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
200c40c: c2 06 80 00 ld [ %i2 ], %g1
200c410: 80 a0 60 00 cmp %g1, 0
200c414: 12 80 00 1d bne 200c488 <ramdisk_ioctl+0x9c>
200c418: f4 06 20 2c ld [ %i0 + 0x2c ], %i2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200c41c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200c420: 80 a0 60 00 cmp %g1, 0
200c424: 02 80 00 11 be 200c468 <ramdisk_ioctl+0x7c> <== NEVER TAKEN
200c428: f0 06 a0 08 ld [ %i2 + 8 ], %i0
200c42c: b8 07 60 18 add %i5, 0x18, %i4
200c430: b6 10 20 00 clr %i3
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
200c434: d0 07 00 00 ld [ %i4 ], %o0
200c438: d2 06 80 00 ld [ %i2 ], %o1
200c43c: 40 00 49 53 call 201e988 <.umul>
200c440: f2 07 20 08 ld [ %i4 + 8 ], %i1
200c444: d4 07 20 04 ld [ %i4 + 4 ], %o2
200c448: 92 06 00 08 add %i0, %o0, %o1
200c44c: 40 00 28 8e call 2016684 <memcpy>
200c450: 90 10 00 19 mov %i1, %o0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200c454: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200c458: b6 06 e0 01 inc %i3
200c45c: 80 a6 c0 01 cmp %i3, %g1
200c460: 0a bf ff f5 bcs 200c434 <ramdisk_ioctl+0x48> <== NEVER TAKEN
200c464: b8 07 20 10 add %i4, 0x10, %i4
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200c468: c2 07 60 04 ld [ %i5 + 4 ], %g1
200c46c: d0 07 60 08 ld [ %i5 + 8 ], %o0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
200c470: c0 27 60 0c clr [ %i5 + 0xc ]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200c474: 92 10 20 00 clr %o1
200c478: 9f c0 40 00 call %g1
200c47c: b0 10 20 00 clr %i0
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
200c480: 81 c7 e0 08 ret
200c484: 81 e8 00 00 restore
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
200c488: 80 a0 60 01 cmp %g1, 1
200c48c: 22 80 00 08 be,a 200c4ac <ramdisk_ioctl+0xc0> <== ALWAYS TAKEN
200c490: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
200c494: 40 00 26 20 call 2015d14 <__errno> <== NOT EXECUTED
200c498: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200c49c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200c4a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
200c4a4: 81 c7 e0 08 ret <== NOT EXECUTED
200c4a8: 81 e8 00 00 restore <== NOT EXECUTED
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200c4ac: 80 a0 60 00 cmp %g1, 0
200c4b0: 02 bf ff ee be 200c468 <ramdisk_ioctl+0x7c> <== NEVER TAKEN
200c4b4: f2 06 a0 08 ld [ %i2 + 8 ], %i1
200c4b8: b8 07 60 18 add %i5, 0x18, %i4
200c4bc: b6 10 20 00 clr %i3
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
200c4c0: d0 07 00 00 ld [ %i4 ], %o0
200c4c4: d2 06 80 00 ld [ %i2 ], %o1
200c4c8: 40 00 49 30 call 201e988 <.umul>
200c4cc: b6 06 e0 01 inc %i3
200c4d0: d2 07 20 08 ld [ %i4 + 8 ], %o1
200c4d4: d4 07 20 04 ld [ %i4 + 4 ], %o2
200c4d8: 40 00 28 6b call 2016684 <memcpy>
200c4dc: 90 06 40 08 add %i1, %o0, %o0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
200c4e0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200c4e4: 80 a6 c0 01 cmp %i3, %g1
200c4e8: 0a bf ff f6 bcs 200c4c0 <ramdisk_ioctl+0xd4>
200c4ec: b8 07 20 10 add %i4, 0x10, %i4
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200c4f0: c2 07 60 04 ld [ %i5 + 4 ], %g1
200c4f4: d0 07 60 08 ld [ %i5 + 8 ], %o0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
200c4f8: c0 27 60 0c clr [ %i5 + 0xc ]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200c4fc: 92 10 20 00 clr %o1
200c500: 9f c0 40 00 call %g1
200c504: b0 10 20 00 clr %i0
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
200c508: 81 c7 e0 08 ret
200c50c: 81 e8 00 00 restore
0200c5c0 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
200c5c0: 9d e3 bf 90 save %sp, -112, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200c5c4: 90 10 20 00 clr %o0
const char *disk,
dev_t *dev_ptr
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
200c5c8: c0 27 bf fc clr [ %fp + -4 ]
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200c5cc: 94 07 bf fc add %fp, -4, %o2
200c5d0: 13 00 80 87 sethi %hi(0x2021c00), %o1
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
200c5d4: ba 10 00 18 mov %i0, %i5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200c5d8: 92 12 60 80 or %o1, 0x80, %o1
200c5dc: 7f ff f1 97 call 2008c38 <rtems_io_register_driver>
200c5e0: b0 10 20 0d mov 0xd, %i0
if (sc != RTEMS_SUCCESSFUL) {
200c5e4: 80 a2 20 00 cmp %o0, 0
200c5e8: 02 80 00 04 be 200c5f8 <ramdisk_register+0x38> <== ALWAYS TAKEN
200c5ec: 01 00 00 00 nop
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
200c5f0: 81 c7 e0 08 ret <== NOT EXECUTED
200c5f4: 81 e8 00 00 restore <== NOT EXECUTED
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
200c5f8: 7f ff e0 90 call 2004838 <malloc>
200c5fc: 90 10 20 10 mov 0x10, %o0
if (rd == NULL) {
200c600: b0 92 20 00 orcc %o0, 0, %i0
200c604: 02 80 00 25 be 200c698 <ramdisk_register+0xd8> <== NEVER TAKEN
200c608: 90 10 00 19 mov %i1, %o0
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
200c60c: 7f ff de 34 call 2003edc <calloc>
200c610: 92 10 00 1d mov %i5, %o1
if (area_begin == NULL) {
200c614: 80 a2 20 00 cmp %o0, 0
200c618: 02 80 00 1e be 200c690 <ramdisk_register+0xd0> <== NEVER TAKEN
200c61c: e0 07 bf fc ld [ %fp + -4 ], %l0
free(rd);
return NULL;
}
rd->malloced = true;
200c620: 82 10 20 01 mov 1, %g1
} else {
rd->malloced = false;
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
200c624: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
200c628: fa 26 00 00 st %i5, [ %i0 ]
if (area_begin == NULL) {
free(rd);
return NULL;
}
rd->malloced = true;
200c62c: c2 2e 20 0d stb %g1, [ %i0 + 0xd ]
} else {
rd->malloced = false;
}
rd->block_size = block_size;
rd->block_num = block_count;
200c630: f2 26 20 04 st %i1, [ %i0 + 4 ]
rd->area = area_begin;
rd->trace = trace;
200c634: f4 2e 20 0e stb %i2, [ %i0 + 0xe ]
rd->initialized = true;
200c638: c2 2e 20 0c stb %g1, [ %i0 + 0xc ]
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
200c63c: f6 23 a0 5c st %i3, [ %sp + 0x5c ]
200c640: 90 10 00 10 mov %l0, %o0
200c644: 92 10 20 00 clr %o1
200c648: 94 10 00 1d mov %i5, %o2
200c64c: 96 10 00 19 mov %i1, %o3
200c650: 9a 10 00 18 mov %i0, %o5
200c654: 19 00 80 30 sethi %hi(0x200c000), %o4
200c658: 7f ff d9 7b call 2002c44 <rtems_disk_create_phys>
200c65c: 98 13 23 ec or %o4, 0x3ec, %o4 ! 200c3ec <ramdisk_ioctl>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
200c660: 80 a2 20 00 cmp %o0, 0
200c664: 32 80 00 06 bne,a 200c67c <ramdisk_register+0xbc> <== NEVER TAKEN
200c668: c2 0e 20 0d ldub [ %i0 + 0xd ], %g1 <== NOT EXECUTED
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
200c66c: e0 27 00 00 st %l0, [ %i4 ]
200c670: c0 27 20 04 clr [ %i4 + 4 ]
return RTEMS_SUCCESSFUL;
}
200c674: 81 c7 e0 08 ret
200c678: 91 e8 20 00 restore %g0, 0, %o0
}
void ramdisk_free(ramdisk *rd)
{
if (rd != NULL) {
if (rd->malloced) {
200c67c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200c680: 02 80 00 04 be 200c690 <ramdisk_register+0xd0> <== NOT EXECUTED
200c684: 01 00 00 00 nop <== NOT EXECUTED
free(rd->area);
200c688: 7f ff df 38 call 2004368 <free> <== NOT EXECUTED
200c68c: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED
}
free(rd);
200c690: 7f ff df 36 call 2004368 <free> <== NOT EXECUTED
200c694: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
ramdisk_free(rd);
rtems_io_unregister_driver(major);
200c698: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
200c69c: 7f ff f1 cf call 2008dd8 <rtems_io_unregister_driver> <== NOT EXECUTED
200c6a0: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
200c6a4: 81 c7 e0 08 ret <== NOT EXECUTED
200c6a8: 81 e8 00 00 restore <== NOT EXECUTED
0201bd94 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
201bd94: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201bd98: 03 00 80 7a sethi %hi(0x201e800), %g1
201bd9c: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c <rtems_libio_number_iops>
201bda0: 80 a6 00 01 cmp %i0, %g1
201bda4: 1a 80 00 1e bcc 201be1c <read+0x88>
201bda8: 03 00 80 7c sethi %hi(0x201f000), %g1
iop = rtems_libio_iop( fd );
201bdac: fa 00 62 f8 ld [ %g1 + 0x2f8 ], %i5 ! 201f2f8 <rtems_libio_iops>
201bdb0: b1 2e 20 06 sll %i0, 6, %i0
201bdb4: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
201bdb8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201bdbc: 80 88 61 00 btst 0x100, %g1
201bdc0: 02 80 00 17 be 201be1c <read+0x88>
201bdc4: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201bdc8: 02 80 00 1b be 201be34 <read+0xa0> <== NEVER TAKEN
201bdcc: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201bdd0: 02 80 00 11 be 201be14 <read+0x80>
201bdd4: b0 10 20 00 clr %i0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
201bdd8: 80 88 60 02 btst 2, %g1
201bddc: 02 80 00 10 be 201be1c <read+0x88>
201bde0: 90 10 00 1d mov %i5, %o0
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
201bde4: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
201bde8: c2 00 60 08 ld [ %g1 + 8 ], %g1
201bdec: 92 10 00 19 mov %i1, %o1
201bdf0: 9f c0 40 00 call %g1
201bdf4: 94 10 00 1a mov %i2, %o2
if ( rc > 0 )
201bdf8: b0 92 20 00 orcc %o0, 0, %i0
201bdfc: 04 80 00 06 ble 201be14 <read+0x80>
201be00: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
201be04: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201be08: 86 83 40 18 addcc %o5, %i0, %g3
201be0c: 84 43 00 02 addx %o4, %g2, %g2
201be10: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
return rc;
}
201be14: 81 c7 e0 08 ret
201be18: 81 e8 00 00 restore
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
201be1c: 7f ff d5 ed call 20115d0 <__errno>
201be20: b0 10 3f ff mov -1, %i0
201be24: 82 10 20 09 mov 9, %g1
201be28: c2 22 00 00 st %g1, [ %o0 ]
201be2c: 81 c7 e0 08 ret
201be30: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
201be34: 7f ff d5 e7 call 20115d0 <__errno> <== NOT EXECUTED
201be38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201be3c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201be40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201be44: 81 c7 e0 08 ret <== NOT EXECUTED
201be48: 81 e8 00 00 restore <== NOT EXECUTED
02005a48 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
2005a48: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
2005a4c: 80 a6 60 00 cmp %i1, 0
2005a50: 02 80 00 26 be 2005ae8 <readlink+0xa0>
2005a54: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
2005a58: 40 00 3a a6 call 20144f0 <strlen>
2005a5c: 90 10 00 18 mov %i0, %o0
2005a60: 94 10 20 00 clr %o2
2005a64: 92 10 00 08 mov %o0, %o1
2005a68: 96 07 bf ec add %fp, -20, %o3
2005a6c: 90 10 00 18 mov %i0, %o0
2005a70: 98 10 20 00 clr %o4
2005a74: 7f ff f9 8e call 20040ac <rtems_filesystem_evaluate_path>
2005a78: b0 10 3f ff mov -1, %i0
0, &loc, false );
if ( result != 0 )
2005a7c: 80 a2 20 00 cmp %o0, 0
2005a80: 12 80 00 10 bne 2005ac0 <readlink+0x78> <== NEVER TAKEN
2005a84: c2 07 bf f8 ld [ %fp + -8 ], %g1
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
2005a88: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2005a8c: 9f c0 40 00 call %g1
2005a90: 90 07 bf ec add %fp, -20, %o0
2005a94: 80 a2 20 04 cmp %o0, 4
2005a98: 12 80 00 0c bne 2005ac8 <readlink+0x80>
2005a9c: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
2005aa0: 92 10 00 19 mov %i1, %o1
2005aa4: c2 00 60 3c ld [ %g1 + 0x3c ], %g1
2005aa8: 94 10 00 1a mov %i2, %o2
2005aac: 9f c0 40 00 call %g1
2005ab0: 90 07 bf ec add %fp, -20, %o0
2005ab4: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2005ab8: 7f ff fa 25 call 200434c <rtems_filesystem_freenode>
2005abc: 90 07 bf ec add %fp, -20, %o0
return result;
}
2005ac0: 81 c7 e0 08 ret
2005ac4: 81 e8 00 00 restore
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
2005ac8: 7f ff fa 21 call 200434c <rtems_filesystem_freenode>
2005acc: 90 07 bf ec add %fp, -20, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
2005ad0: 40 00 34 e9 call 2012e74 <__errno>
2005ad4: 01 00 00 00 nop
2005ad8: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2005adc: c2 22 00 00 st %g1, [ %o0 ]
2005ae0: 81 c7 e0 08 ret
2005ae4: 81 e8 00 00 restore
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
2005ae8: 40 00 34 e3 call 2012e74 <__errno>
2005aec: b0 10 3f ff mov -1, %i0
2005af0: 82 10 20 0e mov 0xe, %g1
2005af4: c2 22 00 00 st %g1, [ %o0 ]
2005af8: 81 c7 e0 08 ret
2005afc: 81 e8 00 00 restore
020053b8 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
20053b8: 9d e3 bf a0 save %sp, -96, %sp
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
20053bc: 03 00 80 7c sethi %hi(0x201f000), %g1
20053c0: c2 00 63 4c ld [ %g1 + 0x34c ], %g1 ! 201f34c <rtems_libio_number_iops>
20053c4: 80 a6 00 01 cmp %i0, %g1
20053c8: 1a 80 00 48 bcc 20054e8 <readv+0x130>
20053cc: 03 00 80 7f sethi %hi(0x201fc00), %g1
iop = rtems_libio_iop( fd );
20053d0: f8 00 61 b8 ld [ %g1 + 0x1b8 ], %i4 ! 201fdb8 <rtems_libio_iops>
20053d4: b1 2e 20 06 sll %i0, 6, %i0
20053d8: b8 07 00 18 add %i4, %i0, %i4
rtems_libio_check_is_open( iop );
20053dc: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
20053e0: 80 88 61 00 btst 0x100, %g1
20053e4: 02 80 00 41 be 20054e8 <readv+0x130>
20053e8: 80 88 60 02 btst 2, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
20053ec: 02 80 00 3f be 20054e8 <readv+0x130> <== NEVER TAKEN
20053f0: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
20053f4: 02 80 00 37 be 20054d0 <readv+0x118>
20053f8: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
20053fc: 04 80 00 35 ble 20054d0 <readv+0x118>
2005400: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2005404: 14 80 00 33 bg 20054d0 <readv+0x118> <== NEVER TAKEN
2005408: b5 2e a0 03 sll %i2, 3, %i2
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
200540c: 82 10 20 00 clr %g1
2005410: ba 10 20 01 mov 1, %i5
2005414: 10 80 00 03 b 2005420 <readv+0x68>
2005418: 84 10 20 00 clr %g2
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
200541c: 84 10 00 04 mov %g4, %g2
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
2005420: c6 06 40 01 ld [ %i1 + %g1 ], %g3
2005424: 80 a0 e0 00 cmp %g3, 0
2005428: 02 80 00 2a be 20054d0 <readv+0x118>
200542c: 88 06 40 01 add %i1, %g1, %g4
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
2005430: c6 01 20 04 ld [ %g4 + 4 ], %g3
2005434: 88 00 c0 02 add %g3, %g2, %g4
if ( total < old )
2005438: 80 a1 00 02 cmp %g4, %g2
200543c: 06 80 00 25 bl 20054d0 <readv+0x118>
2005440: 82 00 60 08 add %g1, 8, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
2005444: 80 a0 00 03 cmp %g0, %g3
2005448: 84 40 3f ff addx %g0, -1, %g2
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
200544c: 80 a0 40 1a cmp %g1, %i2
2005450: 12 bf ff f3 bne 200541c <readv+0x64>
2005454: ba 0f 40 02 and %i5, %g2, %i5
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
2005458: 80 8f 60 ff btst 0xff, %i5
200545c: 12 80 00 1b bne 20054c8 <readv+0x110>
2005460: b0 10 20 00 clr %i0
2005464: ba 10 20 00 clr %i5
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
2005468: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
200546c: b6 06 40 1d add %i1, %i5, %i3
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
2005470: d2 06 40 1d ld [ %i1 + %i5 ], %o1
2005474: c2 00 60 08 ld [ %g1 + 8 ], %g1
2005478: d4 06 e0 04 ld [ %i3 + 4 ], %o2
200547c: 9f c0 40 00 call %g1
2005480: 90 10 00 1c mov %i4, %o0
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
2005484: 80 a2 20 00 cmp %o0, 0
2005488: 26 80 00 10 bl,a 20054c8 <readv+0x110> <== NEVER TAKEN
200548c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
2005490: 02 80 00 07 be 20054ac <readv+0xf4> <== NEVER TAKEN
2005494: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
2005498: c4 1f 20 10 ldd [ %i4 + 0x10 ], %g2
200549c: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
20054a0: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
20054a4: 84 40 80 10 addx %g2, %l0, %g2
20054a8: c4 3f 20 10 std %g2, [ %i4 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
20054ac: c2 06 e0 04 ld [ %i3 + 4 ], %g1
20054b0: 80 a2 00 01 cmp %o0, %g1
20054b4: 12 80 00 05 bne 20054c8 <readv+0x110> <== NEVER TAKEN
20054b8: ba 07 60 08 add %i5, 8, %i5
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
20054bc: 80 a7 40 1a cmp %i5, %i2
20054c0: 32 bf ff eb bne,a 200546c <readv+0xb4>
20054c4: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
20054c8: 81 c7 e0 08 ret
20054cc: 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 );
20054d0: 40 00 33 a6 call 2012368 <__errno>
20054d4: b0 10 3f ff mov -1, %i0
20054d8: 82 10 20 16 mov 0x16, %g1
20054dc: c2 22 00 00 st %g1, [ %o0 ]
20054e0: 81 c7 e0 08 ret
20054e4: 81 e8 00 00 restore
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
20054e8: 40 00 33 a0 call 2012368 <__errno>
20054ec: b0 10 3f ff mov -1, %i0
20054f0: 82 10 20 09 mov 9, %g1
20054f4: c2 22 00 00 st %g1, [ %o0 ]
20054f8: 81 c7 e0 08 ret
20054fc: 81 e8 00 00 restore
02004410 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
2004410: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
2004414: 3b 00 80 7c sethi %hi(0x201f000), %i5
2004418: ba 17 63 10 or %i5, 0x310, %i5 ! 201f310 <rtems_malloc_statistics>
200441c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
2004420: 03 00 80 7d sethi %hi(0x201f400), %g1
2004424: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 201f618 <_System_state_Current>
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
2004428: 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())) {
200442c: 80 a0 60 03 cmp %g1, 3
2004430: 02 80 00 2c be 20044e0 <realloc+0xd0> <== ALWAYS TAKEN
2004434: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
}
/*
* Continue with realloc().
*/
if ( !ptr )
2004438: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200443c: 02 80 00 49 be 2004560 <realloc+0x150>
2004440: 01 00 00 00 nop
return malloc( size );
if ( !size ) {
2004444: 80 a6 60 00 cmp %i1, 0
2004448: 02 80 00 3b be 2004534 <realloc+0x124> <== NEVER TAKEN
200444c: 39 00 80 7a sethi %hi(0x201e800), %i4
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
2004450: d0 07 20 44 ld [ %i4 + 0x44 ], %o0 ! 201e844 <RTEMS_Malloc_Heap>
2004454: 92 10 00 18 mov %i0, %o1
2004458: 40 00 13 49 call 200917c <_Protected_heap_Get_block_size>
200445c: 94 07 bf fc add %fp, -4, %o2
2004460: 80 8a 20 ff btst 0xff, %o0
2004464: 02 80 00 39 be 2004548 <realloc+0x138>
2004468: 01 00 00 00 nop
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
200446c: d0 07 20 44 ld [ %i4 + 0x44 ], %o0
2004470: 92 10 00 18 mov %i0, %o1
2004474: 40 00 13 52 call 20091bc <_Protected_heap_Resize_block>
2004478: 94 10 00 19 mov %i1, %o2
200447c: 80 8a 20 ff btst 0xff, %o0
2004480: 02 80 00 04 be 2004490 <realloc+0x80>
2004484: 01 00 00 00 nop
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
2004488: 81 c7 e0 08 ret
200448c: 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 );
2004490: 7f ff fc cc call 20037c0 <malloc>
2004494: 90 10 00 19 mov %i1, %o0
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
2004498: c2 07 60 04 ld [ %i5 + 4 ], %g1
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
200449c: b8 10 00 08 mov %o0, %i4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
20044a0: 82 00 7f ff add %g1, -1, %g1
if ( !new_area ) {
20044a4: 80 a2 20 00 cmp %o0, 0
20044a8: 02 80 00 30 be 2004568 <realloc+0x158>
20044ac: c2 27 60 04 st %g1, [ %i5 + 4 ]
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
20044b0: c2 07 bf fc ld [ %fp + -4 ], %g1
20044b4: 80 a6 40 01 cmp %i1, %g1
20044b8: 18 80 00 16 bgu 2004510 <realloc+0x100> <== ALWAYS TAKEN
20044bc: 94 10 00 19 mov %i1, %o2
20044c0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20044c4: 40 00 36 9f call 2011f40 <memcpy> <== NOT EXECUTED
20044c8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free( ptr );
20044cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20044d0: 7f ff fb 88 call 20032f0 <free> <== NOT EXECUTED
20044d4: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
return new_area;
20044d8: 81 c7 e0 08 ret <== NOT EXECUTED
20044dc: 81 e8 00 00 restore <== NOT EXECUTED
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
20044e0: 03 00 80 7d sethi %hi(0x201f400), %g1
20044e4: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201f4c0 <_Thread_Dispatch_disable_level>
20044e8: 80 a0 60 00 cmp %g1, 0
20044ec: 12 80 00 07 bne 2004508 <realloc+0xf8> <== NEVER TAKEN
20044f0: 01 00 00 00 nop
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
20044f4: 03 00 80 7e sethi %hi(0x201f800), %g1
20044f8: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 201fa08 <_Per_CPU_Information+0x8>
20044fc: 80 a0 60 00 cmp %g1, 0
2004500: 22 bf ff cf be,a 200443c <realloc+0x2c> <== ALWAYS TAKEN
2004504: 80 a6 20 00 cmp %i0, 0
return (void *) 0;
2004508: 81 c7 e0 08 ret <== NOT EXECUTED
200450c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
2004510: 92 10 00 18 mov %i0, %o1
2004514: 94 10 00 01 mov %g1, %o2
2004518: 40 00 36 8a call 2011f40 <memcpy>
200451c: 90 10 00 1c mov %i4, %o0
free( ptr );
2004520: 90 10 00 18 mov %i0, %o0
2004524: 7f ff fb 73 call 20032f0 <free>
2004528: b0 10 00 1c mov %i4, %i0
return new_area;
200452c: 81 c7 e0 08 ret
2004530: 81 e8 00 00 restore
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
2004534: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2004538: 7f ff fb 6e call 20032f0 <free> <== NOT EXECUTED
200453c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return (void *) 0;
2004540: 81 c7 e0 08 ret <== NOT EXECUTED
2004544: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
2004548: 40 00 34 22 call 20115d0 <__errno>
200454c: b0 10 20 00 clr %i0
2004550: 82 10 20 16 mov 0x16, %g1
2004554: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
2004558: 81 c7 e0 08 ret
200455c: 81 e8 00 00 restore
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
2004560: 7f ff fc 98 call 20037c0 <malloc>
2004564: 91 e8 00 19 restore %g0, %i1, %o0
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
2004568: 81 c7 e0 08 ret
200456c: 91 e8 20 00 restore %g0, 0, %o0
02004828 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
2004828: 9d e3 bf 70 save %sp, -144, %sp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
200482c: 90 10 00 18 mov %i0, %o0
2004830: 7f ff fb 2c call 20034e0 <rtems_filesystem_dirname>
2004834: ba 10 00 18 mov %i0, %i5
if ( parentpathlen == 0 )
2004838: 80 a2 20 00 cmp %o0, 0
200483c: 12 80 00 29 bne 20048e0 <rmdir+0xb8>
2004840: b6 10 00 08 mov %o0, %i3
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
2004844: b8 07 bf d4 add %fp, -44, %i4
2004848: 90 10 00 18 mov %i0, %o0
200484c: 92 07 bf fc add %fp, -4, %o1
2004850: 94 10 00 1c mov %i4, %o2
2004854: 40 00 00 56 call 20049ac <rtems_filesystem_get_start_loc>
2004858: b6 10 20 00 clr %i3
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
200485c: b4 10 20 00 clr %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2004860: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = pathname + parentpathlen;
2004864: ba 07 40 1b add %i5, %i3, %i5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2004868: c2 27 bf e8 st %g1, [ %fp + -24 ]
200486c: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2004870: 90 10 00 1d mov %i5, %o0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2004874: c2 27 bf ec st %g1, [ %fp + -20 ]
2004878: c2 07 bf dc ld [ %fp + -36 ], %g1
200487c: c2 27 bf f0 st %g1, [ %fp + -16 ]
2004880: c2 07 bf e0 ld [ %fp + -32 ], %g1
2004884: c2 27 bf f4 st %g1, [ %fp + -12 ]
2004888: c2 07 bf e4 ld [ %fp + -28 ], %g1
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
200488c: 40 00 3a 9e call 2013304 <strlen>
2004890: c2 27 bf f8 st %g1, [ %fp + -8 ]
2004894: 92 10 00 08 mov %o0, %o1
2004898: 7f ff fb 21 call 200351c <rtems_filesystem_prefix_separators>
200489c: 90 10 00 1d mov %i5, %o0
20048a0: ba 07 40 08 add %i5, %o0, %i5
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
20048a4: 40 00 3a 98 call 2013304 <strlen>
20048a8: 90 10 00 1d mov %i5, %o0
20048ac: 94 10 20 00 clr %o2
20048b0: 92 10 00 08 mov %o0, %o1
20048b4: 96 07 bf e8 add %fp, -24, %o3
20048b8: 90 10 00 1d mov %i5, %o0
20048bc: 7f ff fa c9 call 20033e0 <rtems_filesystem_evaluate_relative_path>
20048c0: 98 10 20 00 clr %o4
0, &loc, false );
if ( result != 0 ) {
20048c4: 80 a2 20 00 cmp %o0, 0
20048c8: 02 80 00 17 be 2004924 <rmdir+0xfc>
20048cc: 80 8e a0 ff btst 0xff, %i2
if ( free_parentloc )
20048d0: 12 80 00 11 bne 2004914 <rmdir+0xec>
20048d4: b0 10 3f ff mov -1, %i0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
20048d8: 81 c7 e0 08 ret
20048dc: 81 e8 00 00 restore
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
20048e0: b8 07 bf d4 add %fp, -44, %i4
20048e4: 90 10 00 18 mov %i0, %o0
20048e8: 92 10 00 1b mov %i3, %o1
20048ec: 94 10 20 02 mov 2, %o2
20048f0: 96 10 00 1c mov %i4, %o3
20048f4: 98 10 20 00 clr %o4
20048f8: 7f ff fa d7 call 2003454 <rtems_filesystem_evaluate_path>
20048fc: b0 10 3f ff mov -1, %i0
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
2004900: 80 a2 20 00 cmp %o0, 0
2004904: 12 bf ff f5 bne 20048d8 <rmdir+0xb0> <== NEVER TAKEN
2004908: b4 10 20 01 mov 1, %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
200490c: 10 bf ff d6 b 2004864 <rmdir+0x3c>
2004910: c2 07 bf d4 ld [ %fp + -44 ], %g1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
2004914: 7f ff fb 1e call 200358c <rtems_filesystem_freenode>
2004918: 90 10 00 1c mov %i4, %o0
200491c: 81 c7 e0 08 ret
2004920: 81 e8 00 00 restore
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
2004924: c2 07 bf f4 ld [ %fp + -12 ], %g1
2004928: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200492c: 9f c0 40 00 call %g1
2004930: 90 07 bf e8 add %fp, -24, %o0
2004934: 80 a2 20 01 cmp %o0, 1
2004938: 12 80 00 10 bne 2004978 <rmdir+0x150>
200493c: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
2004940: 92 07 bf e8 add %fp, -24, %o1
2004944: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2004948: 9f c0 40 00 call %g1
200494c: 90 10 00 1c mov %i4, %o0
2004950: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2004954: 7f ff fb 0e call 200358c <rtems_filesystem_freenode>
2004958: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
200495c: 80 8e a0 ff btst 0xff, %i2
2004960: 02 80 00 11 be 20049a4 <rmdir+0x17c>
2004964: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
2004968: 7f ff fb 09 call 200358c <rtems_filesystem_freenode>
200496c: 90 10 00 1c mov %i4, %o0
return result;
}
2004970: 81 c7 e0 08 ret
2004974: 81 e8 00 00 restore
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
2004978: 7f ff fb 05 call 200358c <rtems_filesystem_freenode>
200497c: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
2004980: 80 8e a0 ff btst 0xff, %i2
2004984: 02 80 00 04 be 2004994 <rmdir+0x16c> <== NEVER TAKEN
2004988: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
200498c: 7f ff fb 00 call 200358c <rtems_filesystem_freenode>
2004990: 90 10 00 1c mov %i4, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
2004994: 40 00 34 c4 call 2011ca4 <__errno>
2004998: b0 10 3f ff mov -1, %i0
200499c: 82 10 20 14 mov 0x14, %g1
20049a0: c2 22 00 00 st %g1, [ %o0 ]
20049a4: 81 c7 e0 08 ret
20049a8: 81 e8 00 00 restore
02007d60 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
2007d60: 9d e3 bf 78 save %sp, -136, %sp
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
2007d64: 3b 00 80 86 sethi %hi(0x2021800), %i5
2007d68: 40 00 02 ca call 2008890 <pthread_mutex_lock>
2007d6c: 90 17 63 4c or %i5, 0x34c, %o0 ! 2021b4c <aio_request_queue>
if (result != 0) {
2007d70: b8 92 20 00 orcc %o0, 0, %i4
2007d74: 12 80 00 46 bne 2007e8c <rtems_aio_enqueue+0x12c> <== NEVER TAKEN
2007d78: 90 10 00 18 mov %i0, %o0
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
2007d7c: 40 00 05 09 call 20091a0 <pthread_self>
2007d80: b6 17 63 4c or %i5, 0x34c, %i3
2007d84: 92 07 bf fc add %fp, -4, %o1
2007d88: 40 00 03 f7 call 2008d64 <pthread_getschedparam>
2007d8c: 94 07 bf dc add %fp, -36, %o2
req->caller_thread = pthread_self ();
2007d90: 40 00 05 04 call 20091a0 <pthread_self>
2007d94: 01 00 00 00 nop
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007d98: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
req->policy = policy;
2007d9c: c6 07 bf fc ld [ %fp + -4 ], %g3
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007da0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
req->policy = policy;
2007da4: c6 26 20 08 st %g3, [ %i0 + 8 ]
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007da8: c6 07 bf dc ld [ %fp + -36 ], %g3
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
2007dac: d0 26 20 10 st %o0, [ %i0 + 0x10 ]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007db0: 84 20 c0 02 sub %g3, %g2, %g2
2007db4: c4 26 20 0c st %g2, [ %i0 + 0xc ]
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
2007db8: c4 06 e0 68 ld [ %i3 + 0x68 ], %g2
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
2007dbc: 86 10 20 77 mov 0x77, %g3
req->aiocbp->return_value = 0;
2007dc0: c0 20 60 38 clr [ %g1 + 0x38 ]
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
2007dc4: c6 20 60 34 st %g3, [ %g1 + 0x34 ]
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
2007dc8: 80 a0 a0 00 cmp %g2, 0
2007dcc: 12 80 00 06 bne 2007de4 <rtems_aio_enqueue+0x84> <== NEVER TAKEN
2007dd0: d2 00 40 00 ld [ %g1 ], %o1
2007dd4: c4 06 e0 64 ld [ %i3 + 0x64 ], %g2
2007dd8: 80 a0 a0 04 cmp %g2, 4
2007ddc: 24 80 00 30 ble,a 2007e9c <rtems_aio_enqueue+0x13c>
2007de0: 90 06 e0 48 add %i3, 0x48, %o0
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
2007de4: 94 10 20 00 clr %o2
2007de8: 11 00 80 86 sethi %hi(0x2021800), %o0
2007dec: 7f ff ff 3b call 2007ad8 <rtems_aio_search_fd>
2007df0: 90 12 23 94 or %o0, 0x394, %o0 ! 2021b94 <aio_request_queue+0x48>
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
2007df4: b4 92 20 00 orcc %o0, 0, %i2
2007df8: 22 80 00 4a be,a 2007f20 <rtems_aio_enqueue+0x1c0>
2007dfc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
{
pthread_mutex_lock (&r_chain->mutex);
2007e00: b6 06 a0 1c add %i2, 0x1c, %i3
2007e04: 40 00 02 a3 call 2008890 <pthread_mutex_lock>
2007e08: 90 10 00 1b mov %i3, %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007e0c: c2 06 a0 08 ld [ %i2 + 8 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007e10: 86 06 a0 0c add %i2, 0xc, %g3
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
2007e14: 80 a0 40 03 cmp %g1, %g3
2007e18: 02 80 00 13 be 2007e64 <rtems_aio_enqueue+0x104> <== NEVER TAKEN
2007e1c: 90 06 a0 08 add %i2, 8, %o0
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007e20: c8 06 20 14 ld [ %i0 + 0x14 ], %g4
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007e24: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
while (req->aiocbp->aio_reqprio > prio &&
2007e28: c8 01 20 18 ld [ %g4 + 0x18 ], %g4
2007e2c: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
2007e30: 80 a0 80 04 cmp %g2, %g4
2007e34: 06 80 00 09 bl 2007e58 <rtems_aio_enqueue+0xf8> <== NEVER TAKEN
2007e38: 80 a0 c0 01 cmp %g3, %g1
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
2007e3c: 10 80 00 0a b 2007e64 <rtems_aio_enqueue+0x104>
2007e40: d0 00 60 04 ld [ %g1 + 4 ], %o0
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007e44: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007e48: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
2007e4c: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED
2007e50: 16 80 00 04 bge 2007e60 <rtems_aio_enqueue+0x100> <== NOT EXECUTED
2007e54: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
2007e58: 32 bf ff fb bne,a 2007e44 <rtems_aio_enqueue+0xe4> <== NOT EXECUTED
2007e5c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2007e60: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
2007e64: 40 00 09 84 call 200a474 <_Chain_Insert>
2007e68: 92 10 00 18 mov %i0, %o1
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
{
pthread_mutex_lock (&r_chain->mutex);
rtems_aio_insert_prio (&r_chain->perfd, req);
pthread_cond_signal (&r_chain->cond);
2007e6c: 40 00 01 65 call 2008400 <pthread_cond_signal>
2007e70: 90 06 a0 20 add %i2, 0x20, %o0
pthread_mutex_unlock (&r_chain->mutex);
2007e74: 40 00 02 a7 call 2008910 <pthread_mutex_unlock>
2007e78: 90 10 00 1b mov %i3, %o0
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
2007e7c: 40 00 02 a5 call 2008910 <pthread_mutex_unlock>
2007e80: 90 17 63 4c or %i5, 0x34c, %o0
return 0;
}
2007e84: 81 c7 e0 08 ret
2007e88: 91 e8 00 1c restore %g0, %i4, %o0
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
2007e8c: 7f ff ee 82 call 2003894 <free> <== NOT EXECUTED
2007e90: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
2007e94: 81 c7 e0 08 ret <== NOT EXECUTED
2007e98: 81 e8 00 00 restore <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
2007e9c: 7f ff ff 0f call 2007ad8 <rtems_aio_search_fd>
2007ea0: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2007ea4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
2007ea8: 80 a0 60 01 cmp %g1, 1
2007eac: 02 80 00 46 be 2007fc4 <rtems_aio_enqueue+0x264>
2007eb0: b4 10 00 08 mov %o0, %i2
}
++aio_request_queue.active_threads;
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
2007eb4: b6 02 20 1c add %o0, 0x1c, %i3
2007eb8: 40 00 02 76 call 2008890 <pthread_mutex_lock>
2007ebc: 90 10 00 1b mov %i3, %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007ec0: c2 06 a0 08 ld [ %i2 + 8 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007ec4: 88 06 a0 0c add %i2, 0xc, %g4
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
2007ec8: 80 a0 40 04 cmp %g1, %g4
2007ecc: 02 bf ff e6 be 2007e64 <rtems_aio_enqueue+0x104> <== NEVER TAKEN
2007ed0: 90 06 a0 08 add %i2, 8, %o0
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007ed4: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007ed8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
while (req->aiocbp->aio_reqprio > prio &&
2007edc: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3
2007ee0: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
2007ee4: 80 a0 80 03 cmp %g2, %g3
2007ee8: 26 80 00 07 bl,a 2007f04 <rtems_aio_enqueue+0x1a4> <== NEVER TAKEN
2007eec: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2007ef0: 10 bf ff dd b 2007e64 <rtems_aio_enqueue+0x104>
2007ef4: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007ef8: 22 bf ff db be,a 2007e64 <rtems_aio_enqueue+0x104> <== NOT EXECUTED
2007efc: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2007f00: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007f04: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007f08: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
2007f0c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
2007f10: 06 bf ff fa bl 2007ef8 <rtems_aio_enqueue+0x198> <== NOT EXECUTED
2007f14: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED
2007f18: 10 bf ff d3 b 2007e64 <rtems_aio_enqueue+0x104> <== NOT EXECUTED
2007f1c: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
2007f20: 11 00 80 86 sethi %hi(0x2021800), %o0
2007f24: d2 00 40 00 ld [ %g1 ], %o1
2007f28: 90 12 23 a0 or %o0, 0x3a0, %o0
2007f2c: 7f ff fe eb call 2007ad8 <rtems_aio_search_fd>
2007f30: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2007f34: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
2007f38: 80 a0 60 01 cmp %g1, 1
2007f3c: 02 80 00 39 be 2008020 <rtems_aio_enqueue+0x2c0>
2007f40: b4 10 00 08 mov %o0, %i2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007f44: c2 02 20 08 ld [ %o0 + 8 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007f48: 88 02 20 0c add %o0, 0xc, %g4
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
2007f4c: 80 a0 40 04 cmp %g1, %g4
2007f50: 02 80 00 0a be 2007f78 <rtems_aio_enqueue+0x218> <== NEVER TAKEN
2007f54: 90 02 20 08 add %o0, 8, %o0
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007f58: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007f5c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
while (req->aiocbp->aio_reqprio > prio &&
2007f60: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3
2007f64: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
2007f68: 80 a0 80 03 cmp %g2, %g3
2007f6c: 26 80 00 0f bl,a 2007fa8 <rtems_aio_enqueue+0x248> <== NEVER TAKEN
2007f70: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2007f74: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007f78: 40 00 09 3f call 200a474 <_Chain_Insert>
2007f7c: 92 10 00 18 mov %i0, %o1
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
if (aio_request_queue.idle_threads > 0)
2007f80: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
2007f84: 80 a0 60 00 cmp %g1, 0
2007f88: 04 bf ff bd ble 2007e7c <rtems_aio_enqueue+0x11c> <== ALWAYS TAKEN
2007f8c: 01 00 00 00 nop
pthread_cond_signal (&aio_request_queue.new_req);
2007f90: 40 00 01 1c call 2008400 <pthread_cond_signal> <== NOT EXECUTED
2007f94: 90 06 e0 04 add %i3, 4, %o0 <== NOT EXECUTED
2007f98: 30 bf ff b9 b,a 2007e7c <rtems_aio_enqueue+0x11c> <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007f9c: 22 bf ff f7 be,a 2007f78 <rtems_aio_enqueue+0x218> <== NOT EXECUTED
2007fa0: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2007fa4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007fa8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007fac: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
2007fb0: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
2007fb4: 06 bf ff fa bl 2007f9c <rtems_aio_enqueue+0x23c> <== NOT EXECUTED
2007fb8: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED
2007fbc: 10 bf ff ef b 2007f78 <rtems_aio_enqueue+0x218> <== NOT EXECUTED
2007fc0: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
2007fc4: 90 02 20 08 add %o0, 8, %o0
2007fc8: 40 00 09 2b call 200a474 <_Chain_Insert>
2007fcc: 92 10 00 18 mov %i0, %o1
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
if (r_chain->new_fd == 1) {
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
2007fd0: 92 10 20 00 clr %o1
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
if (r_chain->new_fd == 1) {
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
2007fd4: c0 26 a0 18 clr [ %i2 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
2007fd8: 40 00 01 d6 call 2008730 <pthread_mutex_init>
2007fdc: 90 06 a0 1c add %i2, 0x1c, %o0
pthread_cond_init (&r_chain->cond, NULL);
2007fe0: 92 10 20 00 clr %o1
2007fe4: 40 00 00 d7 call 2008340 <pthread_cond_init>
2007fe8: 90 06 a0 20 add %i2, 0x20, %o0
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
2007fec: 90 07 bf f8 add %fp, -8, %o0
2007ff0: 92 06 e0 08 add %i3, 8, %o1
2007ff4: 96 10 00 1a mov %i2, %o3
2007ff8: 15 00 80 1d sethi %hi(0x2007400), %o2
2007ffc: 40 00 02 b9 call 2008ae0 <pthread_create>
2008000: 94 12 a3 24 or %o2, 0x324, %o2 ! 2007724 <rtems_aio_handle>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
2008004: 82 92 20 00 orcc %o0, 0, %g1
2008008: 12 80 00 12 bne 2008050 <rtems_aio_enqueue+0x2f0> <== NEVER TAKEN
200800c: 90 10 00 1b mov %i3, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
2008010: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
2008014: 82 00 60 01 inc %g1
2008018: 10 bf ff 99 b 2007e7c <rtems_aio_enqueue+0x11c>
200801c: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
2008020: 92 10 00 18 mov %i0, %o1
2008024: 40 00 09 14 call 200a474 <_Chain_Insert>
2008028: 90 02 20 08 add %o0, 8, %o0
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
200802c: 90 06 a0 1c add %i2, 0x1c, %o0
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
2008030: c0 26 a0 18 clr [ %i2 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
2008034: 40 00 01 bf call 2008730 <pthread_mutex_init>
2008038: 92 10 20 00 clr %o1
pthread_cond_init (&r_chain->cond, NULL);
200803c: 90 06 a0 20 add %i2, 0x20, %o0
2008040: 40 00 00 c0 call 2008340 <pthread_cond_init>
2008044: 92 10 20 00 clr %o1
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
if (aio_request_queue.idle_threads > 0)
2008048: 10 bf ff cf b 2007f84 <rtems_aio_enqueue+0x224>
200804c: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
2008050: 40 00 02 30 call 2008910 <pthread_mutex_unlock> <== NOT EXECUTED
2008054: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED
return result;
2008058: 30 bf ff 8b b,a 2007e84 <rtems_aio_enqueue+0x124> <== NOT EXECUTED
02007724 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
2007724: 9d e3 bf 78 save %sp, -136, %sp
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
2007728: 37 00 80 86 sethi %hi(0x2021800), %i3
200772c: b8 06 20 1c add %i0, 0x1c, %i4
2007730: b6 16 e3 4c or %i3, 0x34c, %i3
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007734: b2 10 00 1b mov %i3, %i1
2007738: a0 10 00 1b mov %i3, %l0
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
200773c: a2 06 e0 58 add %i3, 0x58, %l1
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
2007740: b4 06 e0 4c add %i3, 0x4c, %i2
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
2007744: 40 00 04 53 call 2008890 <pthread_mutex_lock>
2007748: 90 10 00 1c mov %i4, %o0
if (result != 0)
200774c: 80 a2 20 00 cmp %o0, 0
2007750: 12 80 00 2b bne 20077fc <rtems_aio_handle+0xd8> <== NEVER TAKEN
2007754: 01 00 00 00 nop
2007758: fa 06 20 08 ld [ %i0 + 8 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200775c: 82 06 20 0c add %i0, 0xc, %g1
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
2007760: 80 a7 40 01 cmp %i5, %g1
2007764: 02 80 00 41 be 2007868 <rtems_aio_handle+0x144>
2007768: 01 00 00 00 nop
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
200776c: 40 00 06 8d call 20091a0 <pthread_self>
2007770: 01 00 00 00 nop
2007774: 92 07 bf fc add %fp, -4, %o1
2007778: 40 00 05 7b call 2008d64 <pthread_getschedparam>
200777c: 94 07 bf d8 add %fp, -40, %o2
param.sched_priority = req->priority;
2007780: c2 07 60 0c ld [ %i5 + 0xc ], %g1
pthread_setschedparam (pthread_self(), req->policy, ¶m);
2007784: 40 00 06 87 call 20091a0 <pthread_self>
2007788: c2 27 bf d8 st %g1, [ %fp + -40 ]
200778c: d2 07 60 08 ld [ %i5 + 8 ], %o1
2007790: 40 00 06 88 call 20091b0 <pthread_setschedparam>
2007794: 94 07 bf d8 add %fp, -40, %o2
2007798: 40 00 0b 1f call 200a414 <_Chain_Extract>
200779c: 90 10 00 1d mov %i5, %o0
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
20077a0: 40 00 04 5c call 2008910 <pthread_mutex_unlock>
20077a4: 90 10 00 1c mov %i4, %o0
switch (req->aiocbp->aio_lio_opcode) {
20077a8: e4 07 60 14 ld [ %i5 + 0x14 ], %l2
20077ac: c2 04 a0 30 ld [ %l2 + 0x30 ], %g1
20077b0: 80 a0 60 02 cmp %g1, 2
20077b4: 22 80 00 25 be,a 2007848 <rtems_aio_handle+0x124>
20077b8: c4 1c a0 08 ldd [ %l2 + 8 ], %g2
20077bc: 80 a0 60 03 cmp %g1, 3
20077c0: 02 80 00 1e be 2007838 <rtems_aio_handle+0x114> <== NEVER TAKEN
20077c4: 01 00 00 00 nop
20077c8: 80 a0 60 01 cmp %g1, 1
20077cc: 22 80 00 0e be,a 2007804 <rtems_aio_handle+0xe0> <== ALWAYS TAKEN
20077d0: c4 1c a0 08 ldd [ %l2 + 8 ], %g2
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
20077d4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
req->aiocbp->error_code = errno;
20077d8: 40 00 30 cb call 2013b04 <__errno> <== NOT EXECUTED
20077dc: c2 24 a0 38 st %g1, [ %l2 + 0x38 ] <== NOT EXECUTED
20077e0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
20077e4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20077e8: 40 00 04 2a call 2008890 <pthread_mutex_lock> <== NOT EXECUTED
20077ec: c2 24 a0 34 st %g1, [ %l2 + 0x34 ] <== NOT EXECUTED
if (result != 0)
20077f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20077f4: 22 bf ff da be,a 200775c <rtems_aio_handle+0x38> <== NOT EXECUTED
20077f8: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
20077fc: 81 c7 e0 08 ret
2007800: 91 e8 20 00 restore %g0, 0, %o0
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
2007804: d0 04 80 00 ld [ %l2 ], %o0
2007808: d2 04 a0 10 ld [ %l2 + 0x10 ], %o1
200780c: d4 04 a0 14 ld [ %l2 + 0x14 ], %o2
2007810: 96 10 00 02 mov %g2, %o3
2007814: 40 00 33 cb call 2014740 <pread>
2007818: 98 10 00 03 mov %g3, %o4
break;
default:
result = -1;
}
if (result == -1) {
200781c: 80 a2 3f ff cmp %o0, -1
2007820: 22 bf ff ed be,a 20077d4 <rtems_aio_handle+0xb0> <== NEVER TAKEN
2007824: e4 07 60 14 ld [ %i5 + 0x14 ], %l2 <== NOT EXECUTED
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
2007828: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200782c: d0 20 60 38 st %o0, [ %g1 + 0x38 ]
req->aiocbp->error_code = 0;
2007830: 10 bf ff c5 b 2007744 <rtems_aio_handle+0x20>
2007834: c0 20 60 34 clr [ %g1 + 0x34 ]
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
2007838: 40 00 20 46 call 200f950 <fsync> <== NOT EXECUTED
200783c: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED
break;
2007840: 10 bf ff f8 b 2007820 <rtems_aio_handle+0xfc> <== NOT EXECUTED
2007844: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
2007848: d0 04 80 00 ld [ %l2 ], %o0
200784c: d2 04 a0 10 ld [ %l2 + 0x10 ], %o1
2007850: d4 04 a0 14 ld [ %l2 + 0x14 ], %o2
2007854: 96 10 00 02 mov %g2, %o3
2007858: 40 00 33 f8 call 2014838 <pwrite>
200785c: 98 10 00 03 mov %g3, %o4
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
2007860: 10 bf ff f0 b 2007820 <rtems_aio_handle+0xfc>
2007864: 80 a2 3f ff cmp %o0, -1
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
2007868: 40 00 04 2a call 2008910 <pthread_mutex_unlock>
200786c: 90 10 00 1c mov %i4, %o0
pthread_mutex_lock (&aio_request_queue.mutex);
2007870: 40 00 04 08 call 2008890 <pthread_mutex_lock>
2007874: 90 10 00 1b mov %i3, %o0
if (rtems_chain_is_empty (chain))
2007878: c2 06 20 08 ld [ %i0 + 8 ], %g1
200787c: 80 a7 40 01 cmp %i5, %g1
2007880: 02 80 00 05 be 2007894 <rtems_aio_handle+0x170> <== ALWAYS TAKEN
2007884: 92 07 bf f4 add %fp, -12, %o1
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
2007888: 40 00 04 22 call 2008910 <pthread_mutex_unlock>
200788c: 90 10 00 1b mov %i3, %o0
2007890: 30 bf ff ad b,a 2007744 <rtems_aio_handle+0x20>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
2007894: 40 00 02 3e call 200818c <clock_gettime>
2007898: 90 10 20 01 mov 1, %o0
timeout.tv_sec += 3;
200789c: c2 07 bf f4 ld [ %fp + -12 ], %g1
timeout.tv_nsec = 0;
20078a0: c0 27 bf f8 clr [ %fp + -8 ]
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
20078a4: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
20078a8: ba 06 20 20 add %i0, 0x20, %i5
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
20078ac: c2 27 bf f4 st %g1, [ %fp + -12 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
20078b0: 90 10 00 1d mov %i5, %o0
20078b4: 92 10 00 19 mov %i1, %o1
20078b8: 40 00 02 f1 call 200847c <pthread_cond_timedwait>
20078bc: 94 07 bf f4 add %fp, -12, %o2
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
20078c0: 80 a2 20 74 cmp %o0, 0x74
20078c4: 12 bf ff f1 bne 2007888 <rtems_aio_handle+0x164> <== NEVER TAKEN
20078c8: 01 00 00 00 nop
20078cc: 40 00 0a d2 call 200a414 <_Chain_Extract>
20078d0: 90 10 00 18 mov %i0, %o0
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
20078d4: 40 00 03 44 call 20085e4 <pthread_mutex_destroy>
20078d8: 90 10 00 1c mov %i4, %o0
pthread_cond_destroy (&r_chain->cond);
20078dc: 40 00 02 63 call 2008268 <pthread_cond_destroy>
20078e0: 90 10 00 1d mov %i5, %o0
free (r_chain);
20078e4: 7f ff ef ec call 2003894 <free>
20078e8: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20078ec: f0 06 e0 54 ld [ %i3 + 0x54 ], %i0
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
20078f0: 80 a6 00 11 cmp %i0, %l1
20078f4: 22 80 00 1d be,a 2007968 <rtems_aio_handle+0x244>
20078f8: c4 06 e0 68 ld [ %i3 + 0x68 ], %g2
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
20078fc: c4 04 20 68 ld [ %l0 + 0x68 ], %g2
++aio_request_queue.active_threads;
2007900: c2 04 20 64 ld [ %l0 + 0x64 ], %g1
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
2007904: 84 00 bf ff add %g2, -1, %g2
++aio_request_queue.active_threads;
2007908: 82 00 60 01 inc %g1
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
200790c: c4 24 20 68 st %g2, [ %l0 + 0x68 ]
++aio_request_queue.active_threads;
2007910: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
2007914: 40 00 0a c0 call 200a414 <_Chain_Extract>
2007918: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200791c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
2007920: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
2007924: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
2007928: 80 a0 80 03 cmp %g2, %g3
200792c: 06 80 00 08 bl 200794c <rtems_aio_handle+0x228> <== ALWAYS TAKEN
2007930: 80 a0 40 1a cmp %g1, %i2
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
2007934: 10 80 00 09 b 2007958 <rtems_aio_handle+0x234> <== NOT EXECUTED
2007938: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
200793c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
2007940: 80 a0 c0 02 cmp %g3, %g2
2007944: 04 80 00 04 ble 2007954 <rtems_aio_handle+0x230>
2007948: 80 a0 40 1a cmp %g1, %i2
200794c: 32 bf ff fc bne,a 200793c <rtems_aio_handle+0x218> <== ALWAYS TAKEN
2007950: c2 00 40 00 ld [ %g1 ], %g1
2007954: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007958: 92 10 00 18 mov %i0, %o1
200795c: 40 00 0a c6 call 200a474 <_Chain_Insert>
2007960: b8 06 20 1c add %i0, 0x1c, %i4
2007964: 30 bf ff c9 b,a 2007888 <rtems_aio_handle+0x164>
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
2007968: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
200796c: 84 00 a0 01 inc %g2
--aio_request_queue.active_threads;
2007970: 82 00 7f ff add %g1, -1, %g1
clock_gettime (CLOCK_REALTIME, &timeout);
2007974: 92 07 bf f4 add %fp, -12, %o1
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
2007978: c4 26 e0 68 st %g2, [ %i3 + 0x68 ]
--aio_request_queue.active_threads;
200797c: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
clock_gettime (CLOCK_REALTIME, &timeout);
2007980: 40 00 02 03 call 200818c <clock_gettime>
2007984: 90 10 20 01 mov 1, %o0
timeout.tv_sec += 3;
2007988: c2 07 bf f4 ld [ %fp + -12 ], %g1
timeout.tv_nsec = 0;
200798c: c0 27 bf f8 clr [ %fp + -8 ]
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007990: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
2007994: 90 06 e0 04 add %i3, 4, %o0
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007998: c2 27 bf f4 st %g1, [ %fp + -12 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
200799c: 92 10 00 1b mov %i3, %o1
20079a0: 40 00 02 b7 call 200847c <pthread_cond_timedwait>
20079a4: 94 07 bf f4 add %fp, -12, %o2
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
20079a8: 80 a2 20 74 cmp %o0, 0x74
20079ac: 22 80 00 04 be,a 20079bc <rtems_aio_handle+0x298> <== ALWAYS TAKEN
20079b0: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
20079b4: 10 bf ff d2 b 20078fc <rtems_aio_handle+0x1d8> <== NOT EXECUTED
20079b8: f0 06 e0 54 ld [ %i3 + 0x54 ], %i0 <== NOT EXECUTED
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
pthread_mutex_unlock (&aio_request_queue.mutex);
20079bc: 90 10 00 1b mov %i3, %o0
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
20079c0: 82 00 7f ff add %g1, -1, %g1
pthread_mutex_unlock (&aio_request_queue.mutex);
20079c4: 40 00 03 d3 call 2008910 <pthread_mutex_unlock>
20079c8: c2 26 e0 68 st %g1, [ %i3 + 0x68 ]
return NULL;
20079cc: 30 bf ff 8c b,a 20077fc <rtems_aio_handle+0xd8>
020079d0 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
20079d0: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
20079d4: 3b 00 80 86 sethi %hi(0x2021800), %i5
20079d8: 40 00 04 27 call 2008a74 <pthread_attr_init>
20079dc: 90 17 63 54 or %i5, 0x354, %o0 ! 2021b54 <aio_request_queue+0x8>
if (result != 0)
20079e0: b0 92 20 00 orcc %o0, 0, %i0
20079e4: 12 80 00 23 bne 2007a70 <rtems_aio_init+0xa0> <== NEVER TAKEN
20079e8: 90 17 63 54 or %i5, 0x354, %o0
return result;
result =
20079ec: 40 00 04 2e call 2008aa4 <pthread_attr_setdetachstate>
20079f0: 92 10 20 00 clr %o1
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
20079f4: 80 a2 20 00 cmp %o0, 0
20079f8: 12 80 00 20 bne 2007a78 <rtems_aio_init+0xa8> <== NEVER TAKEN
20079fc: 39 00 80 86 sethi %hi(0x2021800), %i4
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
2007a00: 92 10 20 00 clr %o1
2007a04: 40 00 03 4b call 2008730 <pthread_mutex_init>
2007a08: 90 17 23 4c or %i4, 0x34c, %o0
if (result != 0)
2007a0c: 80 a2 20 00 cmp %o0, 0
2007a10: 12 80 00 23 bne 2007a9c <rtems_aio_init+0xcc> <== NEVER TAKEN
2007a14: 92 10 20 00 clr %o1
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
2007a18: 11 00 80 86 sethi %hi(0x2021800), %o0
2007a1c: 40 00 02 49 call 2008340 <pthread_cond_init>
2007a20: 90 12 23 50 or %o0, 0x350, %o0 ! 2021b50 <aio_request_queue+0x4>
if (result != 0) {
2007a24: b0 92 20 00 orcc %o0, 0, %i0
2007a28: 12 80 00 26 bne 2007ac0 <rtems_aio_init+0xf0> <== NEVER TAKEN
2007a2c: 01 00 00 00 nop
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007a30: b8 17 23 4c or %i4, 0x34c, %i4
head->previous = NULL;
tail->previous = head;
2007a34: 82 07 20 54 add %i4, 0x54, %g1
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007a38: 88 07 20 4c add %i4, 0x4c, %g4
head->previous = NULL;
tail->previous = head;
2007a3c: 86 07 20 48 add %i4, 0x48, %g3
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007a40: 84 07 20 58 add %i4, 0x58, %g2
head->previous = NULL;
tail->previous = head;
2007a44: c2 27 20 5c st %g1, [ %i4 + 0x5c ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007a48: c8 27 20 48 st %g4, [ %i4 + 0x48 ]
head->previous = NULL;
2007a4c: c0 27 20 4c clr [ %i4 + 0x4c ]
tail->previous = head;
2007a50: c6 27 20 50 st %g3, [ %i4 + 0x50 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007a54: c4 27 20 54 st %g2, [ %i4 + 0x54 ]
head->previous = NULL;
2007a58: c0 27 20 58 clr [ %i4 + 0x58 ]
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
2007a5c: c0 27 20 64 clr [ %i4 + 0x64 ]
aio_request_queue.idle_threads = 0;
2007a60: c0 27 20 68 clr [ %i4 + 0x68 ]
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2007a64: 03 00 00 2c sethi %hi(0xb000), %g1
2007a68: 82 10 60 0b or %g1, 0xb, %g1 ! b00b <PROM_START+0xb00b>
2007a6c: c2 27 20 60 st %g1, [ %i4 + 0x60 ]
return result;
}
2007a70: 81 c7 e0 08 ret
2007a74: 81 e8 00 00 restore
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
2007a78: 40 00 03 f3 call 2008a44 <pthread_attr_destroy> <== NOT EXECUTED
2007a7c: 90 17 63 54 or %i5, 0x354, %o0 <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
2007a80: 39 00 80 86 sethi %hi(0x2021800), %i4 <== NOT EXECUTED
2007a84: 92 10 20 00 clr %o1 <== NOT EXECUTED
2007a88: 40 00 03 2a call 2008730 <pthread_mutex_init> <== NOT EXECUTED
2007a8c: 90 17 23 4c or %i4, 0x34c, %o0 <== NOT EXECUTED
if (result != 0)
2007a90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2007a94: 02 bf ff e1 be 2007a18 <rtems_aio_init+0x48> <== NOT EXECUTED
2007a98: 92 10 20 00 clr %o1 <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
2007a9c: 40 00 03 ea call 2008a44 <pthread_attr_destroy> <== NOT EXECUTED
2007aa0: 90 17 63 54 or %i5, 0x354, %o0 <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
2007aa4: 92 10 20 00 clr %o1 <== NOT EXECUTED
2007aa8: 11 00 80 86 sethi %hi(0x2021800), %o0 <== NOT EXECUTED
2007aac: 40 00 02 25 call 2008340 <pthread_cond_init> <== NOT EXECUTED
2007ab0: 90 12 23 50 or %o0, 0x350, %o0 ! 2021b50 <aio_request_queue+0x4><== NOT EXECUTED
if (result != 0) {
2007ab4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2007ab8: 22 bf ff df be,a 2007a34 <rtems_aio_init+0x64> <== NOT EXECUTED
2007abc: b8 17 23 4c or %i4, 0x34c, %i4 <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
2007ac0: 40 00 02 c9 call 20085e4 <pthread_mutex_destroy> <== NOT EXECUTED
2007ac4: 90 17 23 4c or %i4, 0x34c, %o0 <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
2007ac8: 40 00 03 df call 2008a44 <pthread_attr_destroy> <== NOT EXECUTED
2007acc: 90 17 63 54 or %i5, 0x354, %o0 <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007ad0: 10 bf ff d9 b 2007a34 <rtems_aio_init+0x64> <== NOT EXECUTED
2007ad4: b8 17 23 4c or %i4, 0x34c, %i4 <== NOT EXECUTED
02007c34 <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
2007c34: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007c38: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007c3c: 84 06 20 04 add %i0, 4, %g2 <== NOT EXECUTED
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
2007c40: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2007c44: 02 80 00 15 be 2007c98 <rtems_aio_insert_prio+0x64> <== NOT EXECUTED
2007c48: 86 10 00 19 mov %i1, %g3 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007c4c: de 06 60 14 ld [ %i1 + 0x14 ], %o7 <== NOT EXECUTED
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007c50: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 <== NOT EXECUTED
while (req->aiocbp->aio_reqprio > prio &&
2007c54: de 03 e0 18 ld [ %o7 + 0x18 ], %o7 <== NOT EXECUTED
2007c58: c8 01 20 18 ld [ %g4 + 0x18 ], %g4 <== NOT EXECUTED
2007c5c: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED
2007c60: 26 80 00 07 bl,a 2007c7c <rtems_aio_insert_prio+0x48> <== NOT EXECUTED
2007c64: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2007c68: 10 80 00 0b b 2007c94 <rtems_aio_insert_prio+0x60> <== NOT EXECUTED
2007c6c: f0 00 60 04 ld [ %g1 + 4 ], %i0 <== NOT EXECUTED
2007c70: 22 80 00 09 be,a 2007c94 <rtems_aio_insert_prio+0x60> <== NOT EXECUTED
2007c74: f0 00 60 04 ld [ %g1 + 4 ], %i0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2007c78: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007c7c: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007c80: c8 01 20 18 ld [ %g4 + 0x18 ], %g4 <== NOT EXECUTED
2007c84: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED
2007c88: 06 bf ff fa bl 2007c70 <rtems_aio_insert_prio+0x3c> <== NOT EXECUTED
2007c8c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2007c90: f0 00 60 04 ld [ %g1 + 4 ], %i0 <== NOT EXECUTED
2007c94: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED
2007c98: 40 00 09 f7 call 200a474 <_Chain_Insert> <== NOT EXECUTED
2007c9c: 81 e8 00 00 restore <== NOT EXECUTED
02007bbc <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
2007bbc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007bc0: 05 00 80 86 sethi %hi(0x2021800), %g2 <== NOT EXECUTED
2007bc4: 84 10 a3 4c or %g2, 0x34c, %g2 ! 2021b4c <aio_request_queue><== NOT EXECUTED
2007bc8: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 <== NOT EXECUTED
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
2007bcc: de 06 20 14 ld [ %i0 + 0x14 ], %o7 <== NOT EXECUTED
2007bd0: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 <== NOT EXECUTED
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
2007bd4: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
2007bd8: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED
2007bdc: 16 80 00 10 bge 2007c1c <rtems_aio_move_to_work+0x60> <== NOT EXECUTED
2007be0: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
2007be4: 84 00 a0 4c add %g2, 0x4c, %g2 <== NOT EXECUTED
2007be8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2007bec: 32 80 00 08 bne,a 2007c0c <rtems_aio_move_to_work+0x50> <== NOT EXECUTED
2007bf0: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED
2007bf4: 10 80 00 0b b 2007c20 <rtems_aio_move_to_work+0x64> <== NOT EXECUTED
2007bf8: f0 00 e0 04 ld [ %g3 + 4 ], %i0 <== NOT EXECUTED
2007bfc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2007c00: 02 80 00 0a be 2007c28 <rtems_aio_move_to_work+0x6c> <== NOT EXECUTED
2007c04: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2007c08: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED
2007c0c: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 <== NOT EXECUTED
2007c10: 80 a1 00 0f cmp %g4, %o7 <== NOT EXECUTED
2007c14: 06 bf ff fa bl 2007bfc <rtems_aio_move_to_work+0x40> <== NOT EXECUTED
2007c18: 82 10 00 03 mov %g3, %g1 <== NOT EXECUTED
2007c1c: f0 00 e0 04 ld [ %g3 + 4 ], %i0 <== NOT EXECUTED
2007c20: 40 00 0a 15 call 200a474 <_Chain_Insert> <== NOT EXECUTED
2007c24: 81 e8 00 00 restore <== NOT EXECUTED
2007c28: f0 00 e0 04 ld [ %g3 + 4 ], %i0 <== NOT EXECUTED
2007c2c: 40 00 0a 12 call 200a474 <_Chain_Insert> <== NOT EXECUTED
2007c30: 81 e8 00 00 restore <== NOT EXECUTED
02007ca0 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
2007ca0: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007ca4: fa 06 20 08 ld [ %i0 + 8 ], %i5
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
2007ca8: b4 10 20 8c mov 0x8c, %i2
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2007cac: b0 06 20 0c add %i0, 0xc, %i0
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
2007cb0: 80 a7 40 18 cmp %i5, %i0
2007cb4: 02 80 00 0d be 2007ce8 <rtems_aio_remove_fd+0x48> <== NEVER TAKEN
2007cb8: b6 10 3f ff mov -1, %i3
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2007cbc: 40 00 09 d6 call 200a414 <_Chain_Extract>
2007cc0: 90 10 00 1d mov %i5, %o0
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
2007cc4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2007cc8: f8 07 40 00 ld [ %i5 ], %i4
req->aiocbp->return_value = -1;
free (req);
2007ccc: 90 10 00 1d mov %i5, %o0
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
2007cd0: f4 20 60 34 st %i2, [ %g1 + 0x34 ]
req->aiocbp->return_value = -1;
free (req);
2007cd4: 7f ff ee f0 call 2003894 <free>
2007cd8: f6 20 60 38 st %i3, [ %g1 + 0x38 ]
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
2007cdc: 80 a7 00 18 cmp %i4, %i0
2007ce0: 12 bf ff f7 bne 2007cbc <rtems_aio_remove_fd+0x1c>
2007ce4: ba 10 00 1c mov %i4, %i5
2007ce8: 81 c7 e0 08 ret
2007cec: 81 e8 00 00 restore
02007cf0 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
2007cf0: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2007cf4: fa 06 00 00 ld [ %i0 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007cf8: 82 06 20 04 add %i0, 4, %g1
if (rtems_chain_is_empty (chain))
2007cfc: 80 a7 40 01 cmp %i5, %g1
2007d00: 12 80 00 06 bne 2007d18 <rtems_aio_remove_req+0x28>
2007d04: b0 10 20 02 mov 2, %i0
2007d08: 30 80 00 14 b,a 2007d58 <rtems_aio_remove_req+0x68>
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
2007d0c: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
2007d10: 02 80 00 10 be 2007d50 <rtems_aio_remove_req+0x60> <== NOT EXECUTED
2007d14: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2007d18: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
2007d1c: 80 a0 80 19 cmp %g2, %i1
2007d20: 32 bf ff fb bne,a 2007d0c <rtems_aio_remove_req+0x1c> <== NEVER TAKEN
2007d24: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
2007d28: 40 00 09 bb call 200a414 <_Chain_Extract>
2007d2c: 90 10 00 1d mov %i5, %o0
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
2007d30: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2007d34: 84 10 20 8c mov 0x8c, %g2
2007d38: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
current->aiocbp->return_value = -1;
2007d3c: 84 10 3f ff mov -1, %g2
free (current);
2007d40: 90 10 00 1d mov %i5, %o0
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
2007d44: c4 20 60 38 st %g2, [ %g1 + 0x38 ]
free (current);
2007d48: 7f ff ee d3 call 2003894 <free>
2007d4c: b0 10 20 00 clr %i0
}
return AIO_CANCELED;
2007d50: 81 c7 e0 08 ret
2007d54: 81 e8 00 00 restore
}
2007d58: 81 c7 e0 08 ret
2007d5c: 81 e8 00 00 restore
020109fc <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
20109fc: 9d e3 bf a0 save %sp, -96, %sp
2010a00: b6 10 20 20 mov 0x20, %i3
2010a04: ba 10 00 18 mov %i0, %i5
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
2010a08: b8 10 20 01 mov 1, %i4
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
uint32_t b;
uint32_t local_value = 0;
2010a0c: 10 80 00 04 b 2010a1c <rtems_assoc_local_by_remote_bitfield+0x20>
2010a10: b0 10 20 00 clr %i0
for (b = 1; b; b <<= 1) {
2010a14: 02 80 00 0c be 2010a44 <rtems_assoc_local_by_remote_bitfield+0x48>
2010a18: b9 2f 20 01 sll %i4, 1, %i4
if (b & remote_value)
2010a1c: 80 8f 00 19 btst %i4, %i1
2010a20: 22 bf ff fd be,a 2010a14 <rtems_assoc_local_by_remote_bitfield+0x18>
2010a24: b6 86 ff ff addcc %i3, -1, %i3
local_value |= rtems_assoc_local_by_remote(ap, b);
2010a28: 92 10 00 1c mov %i4, %o1
2010a2c: 40 00 00 08 call 2010a4c <rtems_assoc_local_by_remote>
2010a30: 90 10 00 1d mov %i5, %o0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
2010a34: b9 2f 20 01 sll %i4, 1, %i4
2010a38: b6 86 ff ff addcc %i3, -1, %i3
2010a3c: 12 bf ff f8 bne 2010a1c <rtems_assoc_local_by_remote_bitfield+0x20><== ALWAYS TAKEN
2010a40: b0 16 00 08 or %i0, %o0, %i0
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
2010a44: 81 c7 e0 08 ret
2010a48: 81 e8 00 00 restore
0200cd0c <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200cd0c: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200cd10: d0 06 00 00 ld [ %i0 ], %o0
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200cd14: ba 10 00 18 mov %i0, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200cd18: 80 a2 20 00 cmp %o0, 0
200cd1c: 02 80 00 1b be 200cd88 <rtems_assoc_ptr_by_local+0x7c>
200cd20: b0 10 20 00 clr %i0
200cd24: 13 00 80 75 sethi %hi(0x201d400), %o1
200cd28: 40 00 15 d1 call 201246c <strcmp>
200cd2c: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 201d6a8 <IMFS_memfile_handlers+0x3c>
200cd30: 80 a2 20 00 cmp %o0, 0
200cd34: 02 80 00 17 be 200cd90 <rtems_assoc_ptr_by_local+0x84>
200cd38: 82 10 20 00 clr %g1
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
200cd3c: c4 07 60 04 ld [ %i5 + 4 ], %g2
200cd40: 80 a0 80 19 cmp %g2, %i1
200cd44: 02 80 00 11 be 200cd88 <rtems_assoc_ptr_by_local+0x7c>
200cd48: b0 10 00 1d mov %i5, %i0
200cd4c: 86 07 60 0c add %i5, 0xc, %g3
200cd50: 10 80 00 06 b 200cd68 <rtems_assoc_ptr_by_local+0x5c>
200cd54: 84 20 00 1d neg %i5, %g2
200cd58: c8 07 7f f8 ld [ %i5 + -8 ], %g4
200cd5c: 80 a1 00 19 cmp %g4, %i1
200cd60: 02 80 00 0a be 200cd88 <rtems_assoc_ptr_by_local+0x7c>
200cd64: 01 00 00 00 nop
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
200cd68: 88 06 00 02 add %i0, %g2, %g4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200cd6c: c8 00 c0 04 ld [ %g3 + %g4 ], %g4
200cd70: b0 06 20 0c add %i0, 0xc, %i0
200cd74: 80 a1 20 00 cmp %g4, 0
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
200cd78: ba 06 00 02 add %i0, %g2, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200cd7c: 12 bf ff f7 bne 200cd58 <rtems_assoc_ptr_by_local+0x4c>
200cd80: ba 00 c0 1d add %g3, %i5, %i5
200cd84: b0 10 00 01 mov %g1, %i0
if (ap->local_value == local_value)
return ap;
return default_ap;
}
200cd88: 81 c7 e0 08 ret
200cd8c: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200cd90: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200cd94: 80 a0 60 00 cmp %g1, 0
200cd98: 02 bf ff fc be 200cd88 <rtems_assoc_ptr_by_local+0x7c> <== NEVER TAKEN
200cd9c: b0 10 00 1d mov %i5, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
200cda0: 82 10 00 1d mov %i5, %g1
200cda4: 10 bf ff e6 b 200cd3c <rtems_assoc_ptr_by_local+0x30>
200cda8: ba 07 60 0c add %i5, 0xc, %i5
020038c4 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
20038c4: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
20038c8: fa 06 00 00 ld [ %i0 ], %i5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
20038cc: b8 10 00 18 mov %i0, %i4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
20038d0: 80 a7 60 00 cmp %i5, 0
20038d4: 02 80 00 1a be 200393c <rtems_assoc_ptr_by_name+0x78>
20038d8: b0 10 20 00 clr %i0
20038dc: 90 10 00 1d mov %i5, %o0
20038e0: 13 00 80 76 sethi %hi(0x201d800), %o1
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
20038e4: b4 10 20 00 clr %i2
if (rtems_assoc_is_default(ap))
20038e8: 40 00 3d 9b call 2012f54 <strcmp>
20038ec: 92 12 60 b0 or %o1, 0xb0, %o1
20038f0: 80 a2 20 00 cmp %o0, 0
20038f4: 22 80 00 14 be,a 2003944 <rtems_assoc_ptr_by_name+0x80>
20038f8: fa 07 20 0c ld [ %i4 + 0xc ], %i5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
20038fc: 82 10 00 1c mov %i4, %g1
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
2003900: 10 80 00 06 b 2003918 <rtems_assoc_ptr_by_name+0x54>
2003904: b6 07 20 0c add %i4, 0xc, %i3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2003908: fa 00 bf f4 ld [ %g2 + -12 ], %i5
200390c: 80 a7 60 00 cmp %i5, 0
2003910: 02 80 00 14 be 2003960 <rtems_assoc_ptr_by_name+0x9c>
2003914: 01 00 00 00 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
2003918: b0 10 00 01 mov %g1, %i0
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
200391c: 90 10 00 1d mov %i5, %o0
2003920: 40 00 3d 8d call 2012f54 <strcmp>
2003924: 92 10 00 19 mov %i1, %o1
2003928: 82 06 20 0c add %i0, 0xc, %g1
200392c: 80 a2 20 00 cmp %o0, 0
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
2003930: 84 20 40 1c sub %g1, %i4, %g2
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
2003934: 12 bf ff f5 bne 2003908 <rtems_assoc_ptr_by_name+0x44>
2003938: 84 00 80 1b add %g2, %i3, %g2
return ap;
return default_ap;
}
200393c: 81 c7 e0 08 ret
2003940: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2003944: b0 10 00 1c mov %i4, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
2003948: b4 10 00 1c mov %i4, %i2
for ( ; ap->name; ap++)
200394c: 80 a7 60 00 cmp %i5, 0
2003950: 12 bf ff eb bne 20038fc <rtems_assoc_ptr_by_name+0x38> <== ALWAYS TAKEN
2003954: b8 07 20 0c add %i4, 0xc, %i4
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
2003958: 81 c7 e0 08 ret <== NOT EXECUTED
200395c: 81 e8 00 00 restore <== NOT EXECUTED
2003960: 81 c7 e0 08 ret
2003964: 91 e8 00 1a restore %g0, %i2, %o0
02010a80 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
2010a80: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
2010a84: d0 06 00 00 ld [ %i0 ], %o0
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
2010a88: ba 10 00 18 mov %i0, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
2010a8c: 80 a2 20 00 cmp %o0, 0
2010a90: 02 80 00 1b be 2010afc <rtems_assoc_ptr_by_remote+0x7c>
2010a94: b0 10 20 00 clr %i0
2010a98: 13 00 80 75 sethi %hi(0x201d400), %o1
2010a9c: 40 00 06 74 call 201246c <strcmp>
2010aa0: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 201d6a8 <IMFS_memfile_handlers+0x3c>
2010aa4: 80 a2 20 00 cmp %o0, 0
2010aa8: 02 80 00 17 be 2010b04 <rtems_assoc_ptr_by_remote+0x84>
2010aac: 82 10 20 00 clr %g1
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
2010ab0: c4 07 60 08 ld [ %i5 + 8 ], %g2
2010ab4: 80 a0 80 19 cmp %g2, %i1
2010ab8: 02 80 00 11 be 2010afc <rtems_assoc_ptr_by_remote+0x7c>
2010abc: b0 10 00 1d mov %i5, %i0
2010ac0: 86 07 60 0c add %i5, 0xc, %g3
2010ac4: 10 80 00 06 b 2010adc <rtems_assoc_ptr_by_remote+0x5c>
2010ac8: 84 20 00 1d neg %i5, %g2
2010acc: c8 07 7f fc ld [ %i5 + -4 ], %g4
2010ad0: 80 a1 00 19 cmp %g4, %i1
2010ad4: 02 80 00 0a be 2010afc <rtems_assoc_ptr_by_remote+0x7c>
2010ad8: 01 00 00 00 nop
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
2010adc: 88 06 00 02 add %i0, %g2, %g4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2010ae0: c8 00 c0 04 ld [ %g3 + %g4 ], %g4
2010ae4: b0 06 20 0c add %i0, 0xc, %i0
2010ae8: 80 a1 20 00 cmp %g4, 0
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
2010aec: ba 06 00 02 add %i0, %g2, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2010af0: 12 bf ff f7 bne 2010acc <rtems_assoc_ptr_by_remote+0x4c>
2010af4: ba 00 c0 1d add %g3, %i5, %i5
2010af8: b0 10 00 01 mov %g1, %i0
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
2010afc: 81 c7 e0 08 ret
2010b00: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2010b04: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2010b08: 80 a0 60 00 cmp %g1, 0
2010b0c: 02 bf ff fc be 2010afc <rtems_assoc_ptr_by_remote+0x7c> <== NEVER TAKEN
2010b10: b0 10 00 1d mov %i5, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
2010b14: 82 10 00 1d mov %i5, %g1
2010b18: 10 bf ff e6 b 2010ab0 <rtems_assoc_ptr_by_remote+0x30>
2010b1c: ba 07 60 0c add %i5, 0xc, %i5
02003a08 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
2003a08: 9d e3 bf a0 save %sp, -96, %sp
2003a0c: b6 10 20 20 mov 0x20, %i3
2003a10: ba 10 00 18 mov %i0, %i5
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
2003a14: b8 10 20 01 mov 1, %i4
const rtems_assoc_t *ap,
uint32_t local_value
)
{
uint32_t b;
uint32_t remote_value = 0;
2003a18: 10 80 00 04 b 2003a28 <rtems_assoc_remote_by_local_bitfield+0x20>
2003a1c: b0 10 20 00 clr %i0
for (b = 1; b; b <<= 1)
2003a20: 02 80 00 0c be 2003a50 <rtems_assoc_remote_by_local_bitfield+0x48>
2003a24: b9 2f 20 01 sll %i4, 1, %i4
if (b & local_value)
2003a28: 80 8f 00 19 btst %i4, %i1
2003a2c: 22 bf ff fd be,a 2003a20 <rtems_assoc_remote_by_local_bitfield+0x18>
2003a30: b6 86 ff ff addcc %i3, -1, %i3
remote_value |= rtems_assoc_remote_by_local(ap, b);
2003a34: 92 10 00 1c mov %i4, %o1
2003a38: 40 00 00 08 call 2003a58 <rtems_assoc_remote_by_local>
2003a3c: 90 10 00 1d mov %i5, %o0
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
2003a40: b9 2f 20 01 sll %i4, 1, %i4
2003a44: b6 86 ff ff addcc %i3, -1, %i3
2003a48: 12 bf ff f8 bne 2003a28 <rtems_assoc_remote_by_local_bitfield+0x20><== ALWAYS TAKEN
2003a4c: b0 16 00 08 or %i0, %o0, %i0
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
2003a50: 81 c7 e0 08 ret
2003a54: 81 e8 00 00 restore
0200e464 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
200e464: 9d e3 bf a0 save %sp, -96, %sp
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
200e468: 3b 00 80 8e sethi %hi(0x2023800), %i5
200e46c: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
200e470: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
200e474: 80 a0 60 00 cmp %g1, 0
200e478: 02 80 00 07 be 200e494 <rtems_bdbuf_add_to_modified_list_after_access+0x30><== ALWAYS TAKEN
200e47c: 01 00 00 00 nop
200e480: c4 1f 60 38 ldd [ %i5 + 0x38 ], %g2 <== NOT EXECUTED
200e484: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
200e488: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
200e48c: 22 80 00 39 be,a 200e570 <rtems_bdbuf_add_to_modified_list_after_access+0x10c><== NOT EXECUTED
200e490: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
* difficult question. Is a snapshot of a block that is changing better than
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
200e494: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200e498: 80 a0 60 03 cmp %g1, 3
200e49c: 02 80 00 1e be 200e514 <rtems_bdbuf_add_to_modified_list_after_access+0xb0>
200e4a0: 03 00 80 83 sethi %hi(0x2020c00), %g1
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
200e4a4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200e4a8: 80 a0 60 05 cmp %g1, 5
200e4ac: 02 80 00 19 be 200e510 <rtems_bdbuf_add_to_modified_list_after_access+0xac>
200e4b0: 82 10 20 07 mov 7, %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200e4b4: 11 00 80 8e sethi %hi(0x2023800), %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200e4b8: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200e4bc: 90 12 21 58 or %o0, 0x158, %o0
200e4c0: 7f ff eb 02 call 20090c8 <_Chain_Append>
200e4c4: 92 10 00 18 mov %i0, %o1
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
200e4c8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200e4cc: 80 a0 60 00 cmp %g1, 0
200e4d0: 12 80 00 1d bne 200e544 <rtems_bdbuf_add_to_modified_list_after_access+0xe0>
200e4d4: 01 00 00 00 nop
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200e4d8: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
200e4dc: 80 a0 60 00 cmp %g1, 0
200e4e0: 12 80 00 04 bne 200e4f0 <rtems_bdbuf_add_to_modified_list_after_access+0x8c>
200e4e4: 03 00 80 8e sethi %hi(0x2023800), %g1
200e4e8: 81 c7 e0 08 ret
200e4ec: 81 e8 00 00 restore
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200e4f0: d0 00 61 08 ld [ %g1 + 0x108 ], %o0
200e4f4: 7f ff e6 98 call 2007f54 <rtems_event_send>
200e4f8: 92 10 20 04 mov 4, %o1
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200e4fc: 80 a2 20 00 cmp %o0, 0
200e500: 02 bf ff fa be 200e4e8 <rtems_bdbuf_add_to_modified_list_after_access+0x84><== ALWAYS TAKEN
200e504: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200e508: 7f ff e9 7e call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e50c: 90 12 20 14 or %o0, 0x14, %o0 ! 42000014 <RAM_END+0x3fc00014><== NOT EXECUTED
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
200e510: 03 00 80 83 sethi %hi(0x2020c00), %g1
200e514: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 2020f78 <rtems_bdbuf_configuration+0x10>
200e518: 11 00 80 8e sethi %hi(0x2023800), %o0
200e51c: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200e520: 82 10 20 07 mov 7, %g1
200e524: 90 12 21 58 or %o0, 0x158, %o0
200e528: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200e52c: 7f ff ea e7 call 20090c8 <_Chain_Append>
200e530: 92 10 00 18 mov %i0, %o1
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
200e534: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200e538: 80 a0 60 00 cmp %g1, 0
200e53c: 02 bf ff e7 be 200e4d8 <rtems_bdbuf_add_to_modified_list_after_access+0x74>
200e540: 01 00 00 00 nop
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200e544: c2 07 60 68 ld [ %i5 + 0x68 ], %g1
200e548: 80 a0 60 00 cmp %g1, 0
200e54c: 02 bf ff e7 be 200e4e8 <rtems_bdbuf_add_to_modified_list_after_access+0x84>
200e550: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
200e554: 40 00 10 16 call 20125ac <rtems_semaphore_flush>
200e558: d0 07 60 6c ld [ %i5 + 0x6c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200e55c: 80 a2 20 00 cmp %o0, 0
200e560: 02 bf ff e2 be 200e4e8 <rtems_bdbuf_add_to_modified_list_after_access+0x84><== ALWAYS TAKEN
200e564: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200e568: 7f ff e9 66 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e56c: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
200e570: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
200e574: 12 bf ff c8 bne 200e494 <rtems_bdbuf_add_to_modified_list_after_access+0x30><== NOT EXECUTED
200e578: 01 00 00 00 nop <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e57c: 7f ff e7 ff call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
200e580: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200e584: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e588: 12 80 00 1a bne 200e5f0 <rtems_bdbuf_add_to_modified_list_after_access+0x18c><== NOT EXECUTED
200e58c: 92 10 20 00 clr %o1 <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e590: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
200e594: 7f ff e7 af call 2008450 <rtems_semaphore_obtain> <== NOT EXECUTED
200e598: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e59c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e5a0: 12 80 00 12 bne 200e5e8 <rtems_bdbuf_add_to_modified_list_after_access+0x184><== NOT EXECUTED
200e5a4: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e5a8: 7f ff e7 f4 call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
200e5ac: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200e5b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e5b4: 12 80 00 0a bne 200e5dc <rtems_bdbuf_add_to_modified_list_after_access+0x178><== NOT EXECUTED
200e5b8: 92 10 20 00 clr %o1 <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e5bc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200e5c0: 7f ff e7 a4 call 2008450 <rtems_semaphore_obtain> <== NOT EXECUTED
200e5c4: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e5c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e5cc: 02 bf ff b2 be 200e494 <rtems_bdbuf_add_to_modified_list_after_access+0x30><== NOT EXECUTED
200e5d0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (fatal_error_code);
200e5d4: 7f ff e9 4b call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e5d8: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200e5dc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e5e0: 7f ff e9 48 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e5e4: 90 12 20 0c or %o0, 0xc, %o0 ! 4200000c <RAM_END+0x3fc0000c><== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200e5e8: 7f ff e9 46 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e5ec: 90 12 20 0b or %o0, 0xb, %o0 <== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200e5f0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e5f4: 7f ff e9 43 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e5f8: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
0200db74 <rtems_bdbuf_anonymous_wait>:
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
200db74: 9d e3 bf 98 save %sp, -104, %sp
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
200db78: c2 06 00 00 ld [ %i0 ], %g1
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
200db7c: c0 27 bf fc clr [ %fp + -4 ]
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
200db80: 82 00 60 01 inc %g1
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200db84: 90 10 21 00 mov 0x100, %o0
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
200db88: c2 26 00 00 st %g1, [ %i0 ]
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200db8c: 92 10 21 00 mov 0x100, %o1
200db90: 40 00 12 b4 call 2012660 <rtems_task_mode>
200db94: 94 07 bf fc add %fp, -4, %o2
if (sc != RTEMS_SUCCESSFUL)
200db98: 80 a2 20 00 cmp %o0, 0
200db9c: 12 80 00 24 bne 200dc2c <rtems_bdbuf_anonymous_wait+0xb8> <== NEVER TAKEN
200dba0: 3b 00 80 8e sethi %hi(0x2023800), %i5
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
rtems_bdbuf_unlock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_UNLOCK);
200dba4: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200dba8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200dbac: 7f ff ea 73 call 2008578 <rtems_semaphore_release>
200dbb0: f8 07 bf fc ld [ %fp + -4 ], %i4
if (sc != RTEMS_SUCCESSFUL)
200dbb4: 80 a2 20 00 cmp %o0, 0
200dbb8: 12 80 00 2b bne 200dc64 <rtems_bdbuf_anonymous_wait+0xf0> <== NEVER TAKEN
200dbbc: 92 10 20 00 clr %o1
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
200dbc0: d0 06 20 04 ld [ %i0 + 4 ], %o0
200dbc4: 7f ff ea 23 call 2008450 <rtems_semaphore_obtain>
200dbc8: 94 10 20 00 clr %o2
if (sc == RTEMS_TIMEOUT)
200dbcc: 80 a2 20 06 cmp %o0, 6
200dbd0: 02 80 00 22 be 200dc58 <rtems_bdbuf_anonymous_wait+0xe4> <== NEVER TAKEN
200dbd4: 80 a2 20 0d cmp %o0, 0xd
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
200dbd8: 12 80 00 1d bne 200dc4c <rtems_bdbuf_anonymous_wait+0xd8> <== NEVER TAKEN
200dbdc: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200dbe0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200dbe4: 7f ff ea 1b call 2008450 <rtems_semaphore_obtain>
200dbe8: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200dbec: 80 a2 20 00 cmp %o0, 0
200dbf0: 12 80 00 14 bne 200dc40 <rtems_bdbuf_anonymous_wait+0xcc> <== NEVER TAKEN
200dbf4: 94 07 bf fc add %fp, -4, %o2
rtems_fatal_error_occurred (fatal_error_code);
200dbf8: f8 27 bf fc st %i4, [ %fp + -4 ]
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200dbfc: 90 10 00 1c mov %i4, %o0
200dc00: 13 00 00 3f sethi %hi(0xfc00), %o1
200dc04: 40 00 12 97 call 2012660 <rtems_task_mode>
200dc08: 92 12 63 ff or %o1, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
if (sc != RTEMS_SUCCESSFUL)
200dc0c: 80 a2 20 00 cmp %o0, 0
200dc10: 32 80 00 0a bne,a 200dc38 <rtems_bdbuf_anonymous_wait+0xc4><== NEVER TAKEN
200dc14: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_bdbuf_restore_preemption (prev_mode);
--waiters->count;
200dc18: c2 06 00 00 ld [ %i0 ], %g1
200dc1c: 82 00 7f ff add %g1, -1, %g1
200dc20: c2 26 00 00 st %g1, [ %i0 ]
}
200dc24: 81 c7 e0 08 ret
200dc28: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
200dc2c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dc30: 7f ff eb b4 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dc34: 90 12 20 0f or %o0, 0xf, %o0 ! 4200000f <RAM_END+0x3fc0000f><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
200dc38: 7f ff eb b2 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dc3c: 90 12 20 11 or %o0, 0x11, %o0 <== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200dc40: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dc44: 7f ff eb af call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dc48: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
200dc4c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dc50: 7f ff eb ac call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dc54: 90 12 20 10 or %o0, 0x10, %o0 ! 42000010 <RAM_END+0x3fc00010><== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
200dc58: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dc5c: 7f ff eb a9 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dc60: 90 12 20 12 or %o0, 0x12, %o0 ! 42000012 <RAM_END+0x3fc00012><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200dc64: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dc68: 7f ff eb a6 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dc6c: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
0200ca48 <rtems_bdbuf_avl_remove.constprop.7>:
* @param node Pointer to the node to remove
* @retval 0 Item removed
* @retval -1 No such item found
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
200ca48: 9d e3 bf 20 save %sp, -224, %sp
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
200ca4c: 39 00 80 8e sethi %hi(0x2023800), %i4
200ca50: b8 17 21 08 or %i4, 0x108, %i4 ! 2023908 <bdbuf_cache>
200ca54: fa 07 20 40 ld [ %i4 + 0x40 ], %i5
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
200ca58: f6 06 20 18 ld [ %i0 + 0x18 ], %i3
200ca5c: f4 06 20 1c ld [ %i0 + 0x1c ], %i2
rtems_blkdev_bnum block = node->block;
200ca60: f2 06 20 20 ld [ %i0 + 0x20 ], %i1
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
200ca64: a0 07 bf 80 add %fp, -128, %l0
200ca68: 92 10 20 00 clr %o1
200ca6c: 90 10 00 10 mov %l0, %o0
200ca70: 40 00 27 41 call 2016774 <memset>
200ca74: 94 10 20 80 mov 0x80, %o2
while (p != NULL)
200ca78: 80 a7 60 00 cmp %i5, 0
200ca7c: 02 80 00 7d be 200cc70 <rtems_bdbuf_avl_remove.constprop.7+0x228><== NEVER TAKEN
200ca80: b0 10 3f ff mov -1, %i0
rtems_bdbuf_buffer* r;
rtems_bdbuf_buffer* s;
rtems_bdbuf_buffer* p1;
rtems_bdbuf_buffer* p2;
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
200ca84: 82 10 00 10 mov %l0, %g1
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
200ca88: 9e 10 20 01 mov 1, %o7
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
200ca8c: 9a 10 3f ff mov -1, %o5
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200ca90: c6 07 60 18 ld [ %i5 + 0x18 ], %g3
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200ca94: fa 20 40 00 st %i5, [ %g1 ]
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200ca98: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
200ca9c: 80 a6 c0 03 cmp %i3, %g3
200caa0: 18 80 00 70 bgu 200cc60 <rtems_bdbuf_avl_remove.constprop.7+0x218><== NEVER TAKEN
200caa4: 84 00 60 04 add %g1, 4, %g2
200caa8: 80 a6 c0 03 cmp %i3, %g3
200caac: 32 80 00 09 bne,a 200cad0 <rtems_bdbuf_avl_remove.constprop.7+0x88><== NEVER TAKEN
200cab0: da 2f 60 10 stb %o5, [ %i5 + 0x10 ] <== NOT EXECUTED
200cab4: 80 a6 80 04 cmp %i2, %g4
200cab8: 38 80 00 6b bgu,a 200cc64 <rtems_bdbuf_avl_remove.constprop.7+0x21c><== NEVER TAKEN
200cabc: de 2f 60 10 stb %o7, [ %i5 + 0x10 ] <== NOT EXECUTED
200cac0: 80 a6 80 04 cmp %i2, %g4
200cac4: 22 80 00 09 be,a 200cae8 <rtems_bdbuf_avl_remove.constprop.7+0xa0><== ALWAYS TAKEN
200cac8: c6 07 60 20 ld [ %i5 + 0x20 ], %g3
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
200cacc: da 2f 60 10 stb %o5, [ %i5 + 0x10 ] <== NOT EXECUTED
p = p->avl.left;
200cad0: fa 07 60 08 ld [ %i5 + 8 ], %i5
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
200cad4: 80 a7 60 00 cmp %i5, 0
200cad8: 12 bf ff ee bne 200ca90 <rtems_bdbuf_avl_remove.constprop.7+0x48><== ALWAYS TAKEN
200cadc: 82 10 00 02 mov %g2, %g1
}
if (p == NULL)
{
/* there is no such node */
return -1;
200cae0: 81 c7 e0 08 ret <== NOT EXECUTED
200cae4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200cae8: 80 a6 40 03 cmp %i1, %g3
200caec: 38 80 00 5e bgu,a 200cc64 <rtems_bdbuf_avl_remove.constprop.7+0x21c>
200caf0: de 2f 60 10 stb %o7, [ %i5 + 0x10 ]
{
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
200caf4: 80 a6 40 03 cmp %i1, %g3
200caf8: 32 bf ff f6 bne,a 200cad0 <rtems_bdbuf_avl_remove.constprop.7+0x88>
200cafc: da 2f 60 10 stb %o5, [ %i5 + 0x10 ]
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200cb00: 9e 10 00 02 mov %g2, %o7
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
200cb04: 80 a0 40 10 cmp %g1, %l0
200cb08: 08 80 00 03 bleu 200cb14 <rtems_bdbuf_avl_remove.constprop.7+0xcc>
200cb0c: b2 10 20 00 clr %i1
{
p = *(buf_prev - 1);
200cb10: f2 00 bf f8 ld [ %g2 + -8 ], %i1
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
200cb14: f4 07 60 0c ld [ %i5 + 0xc ], %i2
200cb18: 80 a6 a0 00 cmp %i2, 0
200cb1c: 22 80 00 b0 be,a 200cddc <rtems_bdbuf_avl_remove.constprop.7+0x394>
200cb20: c6 07 60 08 ld [ %i5 + 8 ], %g3
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
200cb24: c6 06 a0 08 ld [ %i2 + 8 ], %g3
200cb28: 82 10 00 1a mov %i2, %g1
200cb2c: 80 a0 e0 00 cmp %g3, 0
200cb30: 12 80 00 06 bne 200cb48 <rtems_bdbuf_avl_remove.constprop.7+0x100>
200cb34: b6 10 3f ff mov -1, %i3
{
r->avl.left = q->avl.left;
200cb38: 10 80 00 ae b 200cdf0 <rtems_bdbuf_avl_remove.constprop.7+0x3a8>
200cb3c: c6 07 60 08 ld [ %i5 + 8 ], %g3
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
200cb40: 82 10 00 03 mov %g3, %g1
200cb44: 86 10 00 04 mov %g4, %g3
200cb48: c8 00 e0 08 ld [ %g3 + 8 ], %g4
{
*buf_prev++ = r = s;
200cb4c: c2 20 80 00 st %g1, [ %g2 ]
s = r->avl.left;
r->avl.cache = -1;
200cb50: f6 28 60 10 stb %i3, [ %g1 + 0x10 ]
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
200cb54: 80 a1 20 00 cmp %g4, 0
200cb58: 12 bf ff fa bne 200cb40 <rtems_bdbuf_avl_remove.constprop.7+0xf8>
200cb5c: 84 00 a0 04 add %g2, 4, %g2
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
200cb60: f0 07 60 08 ld [ %i5 + 8 ], %i0
r->avl.left = s->avl.right;
200cb64: f6 00 e0 0c ld [ %g3 + 0xc ], %i3
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
200cb68: c8 0f 60 11 ldub [ %i5 + 0x11 ], %g4
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
200cb6c: f0 20 e0 08 st %i0, [ %g3 + 8 ]
r->avl.left = s->avl.right;
200cb70: f6 20 60 08 st %i3, [ %g1 + 8 ]
s->avl.right = q->avl.right;
200cb74: f4 20 e0 0c st %i2, [ %g3 + 0xc ]
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
200cb78: 82 10 20 01 mov 1, %g1
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
200cb7c: c8 28 e0 11 stb %g4, [ %g3 + 0x11 ]
s->avl.cache = 1;
200cb80: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
*t = q = s;
200cb84: c6 23 ff fc st %g3, [ %o7 + -4 ]
}
}
if (p != NULL)
200cb88: 80 a6 60 00 cmp %i1, 0
200cb8c: 22 80 00 07 be,a 200cba8 <rtems_bdbuf_avl_remove.constprop.7+0x160>
200cb90: c6 27 20 40 st %g3, [ %i4 + 0x40 ]
{
if (p->avl.cache == -1)
200cb94: c2 4e 60 10 ldsb [ %i1 + 0x10 ], %g1
200cb98: 80 a0 7f ff cmp %g1, -1
200cb9c: 22 80 00 03 be,a 200cba8 <rtems_bdbuf_avl_remove.constprop.7+0x160>
200cba0: c6 26 60 08 st %g3, [ %i1 + 8 ]
{
p->avl.left = q;
}
else
{
p->avl.right = q;
200cba4: c6 26 60 0c st %g3, [ %i1 + 0xc ]
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
200cba8: 80 a0 80 10 cmp %g2, %l0
200cbac: 08 80 00 2b bleu 200cc58 <rtems_bdbuf_avl_remove.constprop.7+0x210>
200cbb0: b4 38 00 10 xnor %g0, %l0, %i2
p->avl.right = q;
}
}
else
{
*root = q;
200cbb4: c2 00 bf fc ld [ %g2 + -4 ], %g1
200cbb8: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
* @param node Pointer to the node to remove
* @retval 0 Item removed
* @retval -1 No such item found
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
200cbbc: b4 06 80 02 add %i2, %g2, %i2
200cbc0: 89 29 20 18 sll %g4, 0x18, %g4
200cbc4: b4 0e bf fc and %i2, -4, %i2
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
200cbc8: b2 10 3f ff mov -1, %i1
* @param node Pointer to the node to remove
* @retval 0 Item removed
* @retval -1 No such item found
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
200cbcc: 10 80 00 12 b 200cc14 <rtems_bdbuf_avl_remove.constprop.7+0x1cc>
200cbd0: b4 20 80 1a sub %g2, %i2, %i2
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
200cbd4: 86 10 00 01 mov %g1, %g3
modified = false;
200cbd8: ba 10 20 00 clr %i5
default:
break;
}
}
if (buf_prev > buf_stack)
200cbdc: 80 a0 80 1a cmp %g2, %i2
200cbe0: 22 80 00 1e be,a 200cc58 <rtems_bdbuf_avl_remove.constprop.7+0x210>
200cbe4: c6 27 20 40 st %g3, [ %i4 + 0x40 ]
{
q = *(buf_prev - 1);
200cbe8: c2 00 bf f8 ld [ %g2 + -8 ], %g1
if (q->avl.cache == -1)
200cbec: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
200cbf0: 89 29 20 18 sll %g4, 0x18, %g4
200cbf4: b7 39 20 18 sra %g4, 0x18, %i3
200cbf8: 80 a6 ff ff cmp %i3, -1
200cbfc: 22 80 00 03 be,a 200cc08 <rtems_bdbuf_avl_remove.constprop.7+0x1c0>
200cc00: c6 20 60 08 st %g3, [ %g1 + 8 ]
{
q->avl.left = p;
}
else
{
q->avl.right = p;
200cc04: c6 20 60 0c st %g3, [ %g1 + 0xc ]
*root = q;
}
modified = true;
while (modified)
200cc08: 80 8f 60 ff btst 0xff, %i5
200cc0c: 02 80 00 18 be 200cc6c <rtems_bdbuf_avl_remove.constprop.7+0x224>
200cc10: 84 00 bf fc add %g2, -4, %g2
else
{
break;
}
if (p->avl.cache == -1)
200cc14: 89 39 20 18 sra %g4, 0x18, %g4
200cc18: 80 a1 3f ff cmp %g4, -1
200cc1c: 02 80 00 2e be 200ccd4 <rtems_bdbuf_avl_remove.constprop.7+0x28c>
200cc20: c6 48 60 11 ldsb [ %g1 + 0x11 ], %g3
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
200cc24: 80 a0 e0 00 cmp %g3, 0
200cc28: 22 bf ff eb be,a 200cbd4 <rtems_bdbuf_avl_remove.constprop.7+0x18c>
200cc2c: f2 28 60 11 stb %i1, [ %g1 + 0x11 ]
200cc30: 80 a0 e0 01 cmp %g3, 1
200cc34: 02 80 00 34 be 200cd04 <rtems_bdbuf_avl_remove.constprop.7+0x2bc>
200cc38: 80 a0 ff ff cmp %g3, -1
200cc3c: 22 80 00 0f be,a 200cc78 <rtems_bdbuf_avl_remove.constprop.7+0x230><== ALWAYS TAKEN
200cc40: c8 00 60 08 ld [ %g1 + 8 ], %g4
200cc44: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
200cc48: 80 a0 80 1a cmp %g2, %i2 <== NOT EXECUTED
200cc4c: 12 bf ff e7 bne 200cbe8 <rtems_bdbuf_avl_remove.constprop.7+0x1a0><== NOT EXECUTED
200cc50: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
q->avl.right = p;
}
}
else
{
*root = p;
200cc54: c6 27 20 40 st %g3, [ %i4 + 0x40 ] <== NOT EXECUTED
break;
}
}
return 0;
200cc58: 81 c7 e0 08 ret
200cc5c: 91 e8 20 00 restore %g0, 0, %o0
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
200cc60: de 2f 60 10 stb %o7, [ %i5 + 0x10 ] <== NOT EXECUTED
p = p->avl.right;
200cc64: 10 bf ff 9c b 200cad4 <rtems_bdbuf_avl_remove.constprop.7+0x8c>
200cc68: fa 07 60 0c ld [ %i5 + 0xc ], %i5
break;
}
}
return 0;
200cc6c: b0 10 20 00 clr %i0
}
200cc70: 81 c7 e0 08 ret
200cc74: 81 e8 00 00 restore
break;
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
200cc78: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200cc7c: 80 a0 e0 00 cmp %g3, 0
200cc80: 04 80 00 30 ble 200cd40 <rtems_bdbuf_avl_remove.constprop.7+0x2f8><== NEVER TAKEN
200cc84: ba 10 20 01 mov 1, %i5
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
200cc88: c6 01 20 0c ld [ %g4 + 0xc ], %g3
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
200cc8c: f0 48 e0 11 ldsb [ %g3 + 0x11 ], %i0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200cc90: f6 00 e0 08 ld [ %g3 + 8 ], %i3
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
200cc94: b0 38 00 18 xnor %g0, %i0, %i0
200cc98: 80 a0 00 18 cmp %g0, %i0
200cc9c: b0 60 3f ff subx %g0, -1, %i0
200cca0: f0 28 60 11 stb %i0, [ %g1 + 0x11 ]
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200cca4: f0 48 e0 11 ldsb [ %g3 + 0x11 ], %i0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200cca8: f6 21 20 0c st %i3, [ %g4 + 0xc ]
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200ccac: b0 1e 20 01 xor %i0, 1, %i0
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200ccb0: f6 00 e0 0c ld [ %g3 + 0xc ], %i3
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
200ccb4: c8 20 e0 08 st %g4, [ %g3 + 8 ]
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200ccb8: 80 a0 00 18 cmp %g0, %i0
200ccbc: b0 40 3f ff addx %g0, -1, %i0
200ccc0: f0 29 20 11 stb %i0, [ %g4 + 0x11 ]
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200ccc4: f6 20 60 08 st %i3, [ %g1 + 8 ]
p2->avl.right = p;
200ccc8: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
200cccc: 10 bf ff c4 b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194>
200ccd0: c0 28 e0 11 clrb [ %g3 + 0x11 ]
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
200ccd4: 80 a0 e0 00 cmp %g3, 0
200ccd8: 12 80 00 07 bne 200ccf4 <rtems_bdbuf_avl_remove.constprop.7+0x2ac>
200ccdc: 80 a0 e0 01 cmp %g3, 1
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
200cce0: 88 10 20 01 mov 1, %g4
200cce4: 86 10 00 01 mov %g1, %g3
200cce8: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
modified = false;
200ccec: 10 bf ff bc b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194>
200ccf0: ba 10 20 00 clr %i5
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
200ccf4: 02 80 00 08 be 200cd14 <rtems_bdbuf_avl_remove.constprop.7+0x2cc>
200ccf8: 80 a0 ff ff cmp %g3, -1
200ccfc: 32 bf ff d3 bne,a 200cc48 <rtems_bdbuf_avl_remove.constprop.7+0x200><== NEVER TAKEN
200cd00: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
{
/* rebalance right branch */
switch (p->avl.bal)
{
case +1:
p->avl.bal = 0;
200cd04: c0 28 60 11 clrb [ %g1 + 0x11 ]
200cd08: 86 10 00 01 mov %g1, %g3
200cd0c: 10 bf ff b4 b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194>
200cd10: ba 10 20 01 mov 1, %i5
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
200cd14: c6 00 60 0c ld [ %g1 + 0xc ], %g3
if (p1->avl.bal >= 0) /* simple RR-turn */
200cd18: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5
200cd1c: 80 a7 60 00 cmp %i5, 0
200cd20: 26 80 00 1b bl,a 200cd8c <rtems_bdbuf_avl_remove.constprop.7+0x344><== NEVER TAKEN
200cd24: c8 00 e0 08 ld [ %g3 + 8 ], %g4 <== NOT EXECUTED
{
p->avl.right = p1->avl.left;
200cd28: f6 00 e0 08 ld [ %g3 + 8 ], %i3
p1->avl.left = p;
200cd2c: c2 20 e0 08 st %g1, [ %g3 + 8 ]
if (p1->avl.bal == 0)
200cd30: 12 80 00 0e bne 200cd68 <rtems_bdbuf_avl_remove.constprop.7+0x320>
200cd34: f6 20 60 0c st %i3, [ %g1 + 0xc ]
{
p1->avl.bal = -1;
200cd38: 10 bf ff a9 b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194>
200cd3c: c8 28 e0 11 stb %g4, [ %g3 + 0x11 ]
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
200cd40: fa 01 20 0c ld [ %g4 + 0xc ], %i5 <== NOT EXECUTED
p1->avl.right = p;
200cd44: c2 21 20 0c st %g1, [ %g4 + 0xc ] <== NOT EXECUTED
if (p1->avl.bal == 0)
200cd48: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
200cd4c: 12 80 00 0b bne 200cd78 <rtems_bdbuf_avl_remove.constprop.7+0x330><== NOT EXECUTED
200cd50: fa 20 60 08 st %i5, [ %g1 + 8 ] <== NOT EXECUTED
{
p1->avl.bal = 1;
200cd54: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
200cd58: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
200cd5c: c2 29 20 11 stb %g1, [ %g4 + 0x11 ] <== NOT EXECUTED
modified = false;
200cd60: 10 bf ff 9f b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194><== NOT EXECUTED
200cd64: ba 10 20 00 clr %i5 <== NOT EXECUTED
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
200cd68: c0 28 60 11 clrb [ %g1 + 0x11 ]
p1->avl.bal = 0;
200cd6c: c0 28 e0 11 clrb [ %g3 + 0x11 ]
200cd70: 10 bf ff 9b b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194>
200cd74: ba 10 20 01 mov 1, %i5
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
200cd78: c0 28 60 11 clrb [ %g1 + 0x11 ] <== NOT EXECUTED
p1->avl.bal = 0;
200cd7c: c0 29 20 11 clrb [ %g4 + 0x11 ] <== NOT EXECUTED
200cd80: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
200cd84: 10 bf ff 96 b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194><== NOT EXECUTED
200cd88: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
200cd8c: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200cd90: f0 49 20 11 ldsb [ %g4 + 0x11 ], %i0 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200cd94: f6 01 20 0c ld [ %g4 + 0xc ], %i3 <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200cd98: b0 1e 20 01 xor %i0, 1, %i0 <== NOT EXECUTED
200cd9c: 80 a0 00 18 cmp %g0, %i0 <== NOT EXECUTED
200cda0: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED
200cda4: f0 28 60 11 stb %i0, [ %g1 + 0x11 ] <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200cda8: f0 49 20 11 ldsb [ %g4 + 0x11 ], %i0 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200cdac: f6 20 e0 08 st %i3, [ %g3 + 8 ] <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200cdb0: b0 38 00 18 xnor %g0, %i0, %i0 <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200cdb4: f6 01 20 08 ld [ %g4 + 8 ], %i3 <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
200cdb8: c6 21 20 0c st %g3, [ %g4 + 0xc ] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200cdbc: 80 a0 00 18 cmp %g0, %i0 <== NOT EXECUTED
200cdc0: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED
200cdc4: f0 28 e0 11 stb %i0, [ %g3 + 0x11 ] <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200cdc8: f6 20 60 0c st %i3, [ %g1 + 0xc ] <== NOT EXECUTED
p2->avl.left = p;
200cdcc: c2 21 20 08 st %g1, [ %g4 + 8 ] <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
200cdd0: c0 29 20 11 clrb [ %g4 + 0x11 ] <== NOT EXECUTED
200cdd4: 10 bf ff 82 b 200cbdc <rtems_bdbuf_avl_remove.constprop.7+0x194><== NOT EXECUTED
200cdd8: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
{
r = q->avl.left;
if (r != NULL)
200cddc: 80 a0 e0 00 cmp %g3, 0
200cde0: 02 bf ff 6a be 200cb88 <rtems_bdbuf_avl_remove.constprop.7+0x140>
200cde4: 84 10 00 01 mov %g1, %g2
{
r->avl.bal = 0;
200cde8: 10 bf ff 68 b 200cb88 <rtems_bdbuf_avl_remove.constprop.7+0x140>
200cdec: c0 28 e0 11 clrb [ %g3 + 0x11 ]
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
200cdf0: c2 0f 60 11 ldub [ %i5 + 0x11 ], %g1
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
200cdf4: c6 26 a0 08 st %g3, [ %i2 + 8 ]
r->avl.bal = q->avl.bal;
200cdf8: c2 2e a0 11 stb %g1, [ %i2 + 0x11 ]
r->avl.cache = 1;
*buf_prev++ = q = r;
200cdfc: f4 20 bf fc st %i2, [ %g2 + -4 ]
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
200ce00: 82 10 20 01 mov 1, %g1
*buf_prev++ = q = r;
200ce04: 86 10 00 1a mov %i2, %g3
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
200ce08: 10 bf ff 60 b 200cb88 <rtems_bdbuf_avl_remove.constprop.7+0x140>
200ce0c: c2 2e a0 10 stb %g1, [ %i2 + 0x10 ]
0200ce10 <rtems_bdbuf_discard_buffer_after_access>:
return bdbuf_cache.max_bds_per_group / bds_per_size;
}
static void
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
200ce10: 9d e3 bf a0 save %sp, -96, %sp
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200ce14: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200ce18: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200ce1c: 84 00 bf ff add %g2, -1, %g2
200ce20: c4 20 60 0c st %g2, [ %g1 + 0xc ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ce24: 82 10 20 01 mov 1, %g1
200ce28: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200ce2c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200ce30: 80 a0 60 00 cmp %g1, 0
200ce34: 02 80 00 1f be 200ceb0 <rtems_bdbuf_discard_buffer_after_access+0xa0>
200ce38: 01 00 00 00 nop
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
200ce3c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200ce40: 80 a0 60 00 cmp %g1, 0
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200ce44: 03 00 80 8e sethi %hi(0x2023800), %g1
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
200ce48: 12 80 00 0f bne 200ce84 <rtems_bdbuf_discard_buffer_after_access+0x74>
200ce4c: 82 10 61 08 or %g1, 0x108, %g1 ! 2023908 <bdbuf_cache>
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200ce50: c4 00 60 78 ld [ %g1 + 0x78 ], %g2
200ce54: 80 a0 a0 00 cmp %g2, 0
200ce58: 12 80 00 04 bne 200ce68 <rtems_bdbuf_discard_buffer_after_access+0x58>
200ce5c: 01 00 00 00 nop
200ce60: 81 c7 e0 08 ret
200ce64: 81 e8 00 00 restore
{
sc = rtems_semaphore_flush (waiters->sema);
200ce68: 40 00 15 d1 call 20125ac <rtems_semaphore_flush>
200ce6c: d0 00 60 7c ld [ %g1 + 0x7c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200ce70: 80 a2 20 00 cmp %o0, 0
200ce74: 02 bf ff fb be 200ce60 <rtems_bdbuf_discard_buffer_after_access+0x50><== ALWAYS TAKEN
200ce78: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200ce7c: 7f ff ef 21 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200ce80: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200ce84: c4 00 60 68 ld [ %g1 + 0x68 ], %g2
200ce88: 80 a0 a0 00 cmp %g2, 0
200ce8c: 02 80 00 07 be 200cea8 <rtems_bdbuf_discard_buffer_after_access+0x98><== NEVER TAKEN
200ce90: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
200ce94: 40 00 15 c6 call 20125ac <rtems_semaphore_flush>
200ce98: d0 00 60 6c ld [ %g1 + 0x6c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200ce9c: 80 a2 20 00 cmp %o0, 0
200cea0: 12 bf ff f7 bne 200ce7c <rtems_bdbuf_discard_buffer_after_access+0x6c><== NEVER TAKEN
200cea4: 11 10 80 00 sethi %hi(0x42000000), %o0
200cea8: 81 c7 e0 08 ret
200ceac: 81 e8 00 00 restore
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200ceb0: 7f ff fe e6 call 200ca48 <rtems_bdbuf_avl_remove.constprop.7>
200ceb4: 90 10 00 18 mov %i0, %o0
200ceb8: 80 a2 20 00 cmp %o0, 0
200cebc: 12 80 00 08 bne 200cedc <rtems_bdbuf_discard_buffer_after_access+0xcc><== NEVER TAKEN
200cec0: 01 00 00 00 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200cec4: c0 26 20 28 clr [ %i0 + 0x28 ]
200cec8: 11 00 80 8e sethi %hi(0x2023800), %o0
200cecc: 92 10 00 18 mov %i0, %o1
200ced0: 40 00 17 25 call 2012b64 <_Chain_Insert>
200ced4: 90 12 21 4c or %o0, 0x14c, %o0
200ced8: 30 bf ff d9 b,a 200ce3c <rtems_bdbuf_discard_buffer_after_access+0x2c>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200cedc: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200cee0: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200cee4: 7f ff fe 1f call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200cee8: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
0200d654 <rtems_bdbuf_execute_transfer_request>:
static rtems_status_code
rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
rtems_blkdev_request *req,
bool cache_locked)
{
200d654: 9d e3 bf 98 save %sp, -104, %sp
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
200d658: 80 a6 a0 00 cmp %i2, 0
200d65c: 12 80 00 88 bne 200d87c <rtems_bdbuf_execute_transfer_request+0x228>
200d660: 03 00 80 8e sethi %hi(0x2023800), %g1
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200d664: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200d668: d0 06 20 08 ld [ %i0 + 8 ], %o0
200d66c: 94 10 00 19 mov %i1, %o2
200d670: 13 30 06 10 sethi %hi(0xc0184000), %o1
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
sc = req->status;
}
else
sc = RTEMS_IO_ERROR;
200d674: b0 10 20 1b mov 0x1b, %i0
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200d678: 9f c0 40 00 call %g1
200d67c: 92 12 62 01 or %o1, 0x201, %o1
if (result == 0)
200d680: 80 a2 20 00 cmp %o0, 0
200d684: 22 80 00 71 be,a 200d848 <rtems_bdbuf_execute_transfer_request+0x1f4>
200d688: c0 27 bf fc clr [ %fp + -4 ]
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200d68c: 3b 00 80 8e sethi %hi(0x2023800), %i5
200d690: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200d694: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200d698: 92 10 20 00 clr %o1
200d69c: 7f ff eb 6d call 2008450 <rtems_semaphore_obtain>
200d6a0: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200d6a4: 80 a2 20 00 cmp %o0, 0
200d6a8: 32 80 00 83 bne,a 200d8b4 <rtems_bdbuf_execute_transfer_request+0x260><== NEVER TAKEN
200d6ac: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200d6b0: c6 06 60 10 ld [ %i1 + 0x10 ], %g3
200d6b4: 80 a0 e0 00 cmp %g3, 0
200d6b8: 02 80 00 36 be 200d790 <rtems_bdbuf_execute_transfer_request+0x13c><== NEVER TAKEN
200d6bc: a2 10 20 00 clr %l1
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200d6c0: b8 10 00 19 mov %i1, %i4
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200d6c4: a4 10 20 00 clr %l2
200d6c8: b6 10 20 00 clr %i3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d6cc: a0 10 20 01 mov 1, %l0
200d6d0: a6 07 60 44 add %i5, 0x44, %l3
200d6d4: 10 80 00 15 b 200d728 <rtems_bdbuf_execute_transfer_request+0xd4>
200d6d8: a8 10 20 02 mov 2, %l4
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200d6dc: c2 05 60 30 ld [ %l5 + 0x30 ], %g1
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
200d6e0: 80 a6 20 00 cmp %i0, 0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200d6e4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200d6e8: 84 00 bf ff add %g2, -1, %g2
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
200d6ec: 12 80 00 06 bne 200d704 <rtems_bdbuf_execute_transfer_request+0xb0>
200d6f0: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200d6f4: c2 05 60 28 ld [ %l5 + 0x28 ], %g1
200d6f8: 80 a0 60 09 cmp %g1, 9
200d6fc: 02 80 00 2e be 200d7b4 <rtems_bdbuf_execute_transfer_request+0x160>
200d700: 01 00 00 00 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d704: e0 25 60 28 st %l0, [ %l5 + 0x28 ]
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200d708: c2 05 60 2c ld [ %l5 + 0x2c ], %g1
200d70c: 80 a0 60 00 cmp %g1, 0
200d710: 02 80 00 0d be 200d744 <rtems_bdbuf_execute_transfer_request+0xf0>
200d714: 01 00 00 00 nop
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200d718: b6 06 e0 01 inc %i3
200d71c: 80 a0 c0 1b cmp %g3, %i3
200d720: 08 80 00 17 bleu 200d77c <rtems_bdbuf_execute_transfer_request+0x128>
200d724: b8 07 20 10 add %i4, 0x10, %i4
{
rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
200d728: ea 07 20 24 ld [ %i4 + 0x24 ], %l5
bool waiters = bd->waiters;
200d72c: c2 05 60 2c ld [ %l5 + 0x2c ], %g1
if (waiters)
200d730: 80 a0 60 00 cmp %g1, 0
200d734: 32 bf ff ea bne,a 200d6dc <rtems_bdbuf_execute_transfer_request+0x88>
200d738: a4 10 20 01 mov 1, %l2
wake_transfer_waiters = true;
else
wake_buffer_waiters = true;
200d73c: 10 bf ff e8 b 200d6dc <rtems_bdbuf_execute_transfer_request+0x88>
200d740: a2 10 20 01 mov 1, %l1
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200d744: 7f ff fc c1 call 200ca48 <rtems_bdbuf_avl_remove.constprop.7>
200d748: 90 10 00 15 mov %l5, %o0
200d74c: 80 a2 20 00 cmp %o0, 0
200d750: 12 80 00 52 bne 200d898 <rtems_bdbuf_execute_transfer_request+0x244><== NEVER TAKEN
200d754: 01 00 00 00 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d758: c0 25 60 28 clr [ %l5 + 0x28 ]
200d75c: 90 10 00 13 mov %l3, %o0
200d760: 40 00 15 01 call 2012b64 <_Chain_Insert>
200d764: 92 10 00 15 mov %l5, %o1
200d768: c6 06 60 10 ld [ %i1 + 0x10 ], %g3
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200d76c: b6 06 e0 01 inc %i3
200d770: 80 a0 c0 1b cmp %g3, %i3
200d774: 18 bf ff ed bgu 200d728 <rtems_bdbuf_execute_transfer_request+0xd4><== NEVER TAKEN
200d778: b8 07 20 10 add %i4, 0x10, %i4
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
200d77c: 80 8c a0 ff btst 0xff, %l2
200d780: 12 80 00 1f bne 200d7fc <rtems_bdbuf_execute_transfer_request+0x1a8>
200d784: 80 8c 60 ff btst 0xff, %l1
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
200d788: 12 80 00 11 bne 200d7cc <rtems_bdbuf_execute_transfer_request+0x178>
200d78c: 01 00 00 00 nop
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
if (!cache_locked)
200d790: 80 a6 a0 00 cmp %i2, 0
200d794: 02 80 00 25 be 200d828 <rtems_bdbuf_execute_transfer_request+0x1d4>
200d798: 80 a6 20 0d cmp %i0, 0xd
rtems_bdbuf_unlock_cache ();
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
200d79c: 02 80 00 04 be 200d7ac <rtems_bdbuf_execute_transfer_request+0x158>
200d7a0: 80 a6 20 00 cmp %i0, 0
200d7a4: 32 80 00 02 bne,a 200d7ac <rtems_bdbuf_execute_transfer_request+0x158>
200d7a8: b0 10 20 1b mov 0x1b, %i0
return sc;
else
return RTEMS_IO_ERROR;
}
200d7ac: 81 c7 e0 08 ret
200d7b0: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d7b4: e8 25 60 28 st %l4, [ %l5 + 0x28 ]
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200d7b8: 90 10 00 13 mov %l3, %o0
200d7bc: 7f ff ee 43 call 20090c8 <_Chain_Append>
200d7c0: 92 10 00 15 mov %l5, %o1
200d7c4: 10 bf ff d5 b 200d718 <rtems_bdbuf_execute_transfer_request+0xc4>
200d7c8: c6 06 60 10 ld [ %i1 + 0x10 ], %g3
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200d7cc: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
200d7d0: 80 a0 60 00 cmp %g1, 0
200d7d4: 02 bf ff f0 be 200d794 <rtems_bdbuf_execute_transfer_request+0x140>
200d7d8: 80 a6 a0 00 cmp %i2, 0
{
sc = rtems_semaphore_flush (waiters->sema);
200d7dc: 40 00 13 74 call 20125ac <rtems_semaphore_flush>
200d7e0: d0 07 60 7c ld [ %i5 + 0x7c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d7e4: 80 a2 20 00 cmp %o0, 0
200d7e8: 02 bf ff eb be 200d794 <rtems_bdbuf_execute_transfer_request+0x140><== ALWAYS TAKEN
200d7ec: 80 a6 a0 00 cmp %i2, 0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200d7f0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d7f4: 7f ff ec c3 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d7f8: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200d7fc: c2 07 60 70 ld [ %i5 + 0x70 ], %g1
200d800: 80 a0 60 00 cmp %g1, 0
200d804: 02 bf ff e1 be 200d788 <rtems_bdbuf_execute_transfer_request+0x134>
200d808: 80 8c 60 ff btst 0xff, %l1
{
sc = rtems_semaphore_flush (waiters->sema);
200d80c: 40 00 13 68 call 20125ac <rtems_semaphore_flush>
200d810: d0 07 60 74 ld [ %i5 + 0x74 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d814: 80 a2 20 00 cmp %o0, 0
200d818: 02 bf ff dc be 200d788 <rtems_bdbuf_execute_transfer_request+0x134><== ALWAYS TAKEN
200d81c: 80 8c 60 ff btst 0xff, %l1
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200d820: 10 bf ff f5 b 200d7f4 <rtems_bdbuf_execute_transfer_request+0x1a0><== NOT EXECUTED
200d824: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200d828: 7f ff eb 54 call 2008578 <rtems_semaphore_release>
200d82c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d830: 80 a2 20 00 cmp %o0, 0
200d834: 02 bf ff da be 200d79c <rtems_bdbuf_execute_transfer_request+0x148><== ALWAYS TAKEN
200d838: 80 a6 20 0d cmp %i0, 0xd
rtems_fatal_error_occurred (fatal_error_code);
200d83c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d840: 7f ff ec b0 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d844: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
200d848: 90 10 20 02 mov 2, %o0
200d84c: 92 10 20 00 clr %o1
200d850: 94 10 20 00 clr %o2
200d854: 7f ff e9 5d call 2007dc8 <rtems_event_receive>
200d858: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
200d85c: 80 a2 20 00 cmp %o0, 0
200d860: 12 80 00 12 bne 200d8a8 <rtems_bdbuf_execute_transfer_request+0x254><== NEVER TAKEN
200d864: c2 07 bf fc ld [ %fp + -4 ], %g1
200d868: 80 a0 60 02 cmp %g1, 2
200d86c: 12 80 00 10 bne 200d8ac <rtems_bdbuf_execute_transfer_request+0x258><== NEVER TAKEN
200d870: 11 10 80 00 sethi %hi(0x42000000), %o0
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
if (result == 0)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
sc = req->status;
200d874: 10 bf ff 86 b 200d68c <rtems_bdbuf_execute_transfer_request+0x38>
200d878: f0 06 60 0c ld [ %i1 + 0xc ], %i0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200d87c: 7f ff eb 3f call 2008578 <rtems_semaphore_release>
200d880: d0 00 61 30 ld [ %g1 + 0x130 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d884: 80 a2 20 00 cmp %o0, 0
200d888: 22 bf ff 78 be,a 200d668 <rtems_bdbuf_execute_transfer_request+0x14><== ALWAYS TAKEN
200d88c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
rtems_fatal_error_occurred (fatal_error_code);
200d890: 10 bf ff ec b 200d840 <rtems_bdbuf_execute_transfer_request+0x1ec><== NOT EXECUTED
200d894: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200d898: d0 05 60 28 ld [ %l5 + 0x28 ], %o0 <== NOT EXECUTED
200d89c: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d8a0: 7f ff fb b0 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200d8a4: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
200d8a8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d8ac: 7f ff ec 95 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d8b0: 90 12 20 1a or %o0, 0x1a, %o0 ! 4200001a <RAM_END+0x3fc0001a><== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200d8b4: 7f ff ec 93 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d8b8: 90 12 20 0d or %o0, 0xd, %o0 <== NOT EXECUTED
0200c760 <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
200c760: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
200c764: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED
200c768: 7f ff f0 e6 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200c76c: 90 16 40 08 or %i1, %o0, %o0 <== NOT EXECUTED
0200ea90 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200ea90: 9d e3 bf 90 save %sp, -112, %sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200ea94: 3b 00 80 8e sethi %hi(0x2023800), %i5
200ea98: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
200ea9c: c2 0f 60 88 ldub [ %i5 + 0x88 ], %g1
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
200eaa0: c0 27 bf f4 clr [ %fp + -12 ]
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
200eaa4: c0 27 bf f8 clr [ %fp + -8 ]
size_t bds_per_group = 0;
200eaa8: c0 27 bf fc clr [ %fp + -4 ]
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200eaac: a0 10 00 18 mov %i0, %l0
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200eab0: 80 a0 60 00 cmp %g1, 0
200eab4: 02 80 00 2f be 200eb70 <rtems_bdbuf_get+0xe0> <== NEVER TAKEN
200eab8: b0 10 20 16 mov 0x16, %i0
200eabc: 90 10 00 10 mov %l0, %o0
200eac0: 92 10 00 19 mov %i1, %o1
200eac4: 94 10 00 1a mov %i2, %o2
200eac8: 96 07 bf f4 add %fp, -12, %o3
200eacc: 98 07 bf f8 add %fp, -8, %o4
200ead0: 7f ff f7 a2 call 200c958 <rtems_bdbuf_obtain_disk.part.6>
200ead4: 9a 07 bf fc add %fp, -4, %o5
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
200ead8: b0 92 20 00 orcc %o0, 0, %i0
200eadc: 12 80 00 25 bne 200eb70 <rtems_bdbuf_get+0xe0> <== NEVER TAKEN
200eae0: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200eae4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200eae8: 7f ff e6 5a call 2008450 <rtems_semaphore_obtain>
200eaec: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200eaf0: 80 a2 20 00 cmp %o0, 0
200eaf4: 12 80 00 26 bne 200eb8c <rtems_bdbuf_get+0xfc> <== NEVER TAKEN
200eaf8: d4 1f bf f8 ldd [ %fp + -8 ], %o2
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
200eafc: 90 10 00 10 mov %l0, %o0
200eb00: 7f ff fc 5d call 200dc74 <rtems_bdbuf_get_buffer_for_access>
200eb04: 92 10 00 19 mov %i1, %o1
switch (bd->state)
200eb08: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
200eb0c: 80 a0 60 02 cmp %g1, 2
200eb10: 02 80 00 1c be 200eb80 <rtems_bdbuf_get+0xf0>
200eb14: b4 10 00 08 mov %o0, %i2
200eb18: 80 a0 60 07 cmp %g1, 7
200eb1c: 02 80 00 08 be 200eb3c <rtems_bdbuf_get+0xac>
200eb20: 80 a0 60 01 cmp %g1, 1
200eb24: 02 80 00 15 be 200eb78 <rtems_bdbuf_get+0xe8> <== ALWAYS TAKEN
200eb28: 82 10 20 05 mov 5, %g1
* so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
200eb2c: d0 02 20 28 ld [ %o0 + 0x28 ], %o0 <== NOT EXECUTED
200eb30: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200eb34: 7f ff f7 0b call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200eb38: 92 12 60 1e or %o1, 0x1e, %o1 ! 4200001e <RAM_END+0x3fc0001e><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200eb3c: 82 10 20 04 mov 4, %g1
200eb40: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200eb44: 7f ff e6 8d call 2008578 <rtems_semaphore_release>
200eb48: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200eb4c: 80 a2 20 00 cmp %o0, 0
200eb50: 12 80 00 14 bne 200eba0 <rtems_bdbuf_get+0x110> <== NEVER TAKEN
200eb54: 11 10 80 00 sethi %hi(0x42000000), %o0
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
200eb58: 7f ff d2 03 call 2003364 <rtems_disk_release>
200eb5c: d0 07 bf f4 ld [ %fp + -12 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200eb60: 80 a2 20 00 cmp %o0, 0
200eb64: 32 80 00 0d bne,a 200eb98 <rtems_bdbuf_get+0x108> <== NEVER TAKEN
200eb68: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
200eb6c: f4 26 c0 00 st %i2, [ %i3 ]
return RTEMS_SUCCESSFUL;
}
200eb70: 81 c7 e0 08 ret
200eb74: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200eb78: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
200eb7c: 30 bf ff f2 b,a 200eb44 <rtems_bdbuf_get+0xb4>
200eb80: 82 10 20 03 mov 3, %g1
200eb84: c2 22 20 28 st %g1, [ %o0 + 0x28 ]
200eb88: 30 bf ff ef b,a 200eb44 <rtems_bdbuf_get+0xb4>
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200eb8c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200eb90: 7f ff e7 dc call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200eb94: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
200eb98: 7f ff e7 da call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200eb9c: 90 12 20 1f or %o0, 0x1f, %o0 <== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200eba0: 7f ff e7 d8 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200eba4: 90 12 20 0e or %o0, 0xe, %o0 <== NOT EXECUTED
0200dc74 <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
200dc74: 9d e3 bf a0 save %sp, -96, %sp
200dc78: 3b 00 80 8e sethi %hi(0x2023800), %i5
200dc7c: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
200dc80: a2 07 60 70 add %i5, 0x70, %l1
200dc84: a0 07 60 68 add %i5, 0x68, %l0
200dc88: b8 07 60 5c add %i5, 0x5c, %i4
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200dc8c: a4 07 60 44 add %i5, 0x44, %l2
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
200dc90: a6 07 60 54 add %i5, 0x54, %l3
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200dc94: e8 07 60 40 ld [ %i5 + 0x40 ], %l4
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200dc98: 80 a5 20 00 cmp %l4, 0
200dc9c: 02 80 00 0e be 200dcd4 <rtems_bdbuf_get_buffer_for_access+0x60>
200dca0: 90 10 00 18 mov %i0, %o0
200dca4: c2 05 20 18 ld [ %l4 + 0x18 ], %g1
200dca8: 80 a6 00 01 cmp %i0, %g1
200dcac: 02 80 00 23 be 200dd38 <rtems_bdbuf_get_buffer_for_access+0xc4>
200dcb0: c4 05 20 1c ld [ %l4 + 0x1c ], %g2
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200dcb4: 80 a6 00 01 cmp %i0, %g1
200dcb8: 08 80 00 1a bleu 200dd20 <rtems_bdbuf_get_buffer_for_access+0xac>
200dcbc: 01 00 00 00 nop
{
p = p->avl.right;
200dcc0: e8 05 20 0c ld [ %l4 + 0xc ], %l4
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200dcc4: 80 a5 20 00 cmp %l4, 0
200dcc8: 32 bf ff f8 bne,a 200dca8 <rtems_bdbuf_get_buffer_for_access+0x34>
200dccc: c2 05 20 18 ld [ %l4 + 0x18 ], %g1
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
200dcd0: 90 10 00 18 mov %i0, %o0
200dcd4: 92 10 00 19 mov %i1, %o1
200dcd8: 94 10 00 1a mov %i2, %o2
200dcdc: 7f ff fc 85 call 200cef0 <rtems_bdbuf_get_buffer_from_lru_list>
200dce0: 96 10 00 1b mov %i3, %o3
if (bd == NULL)
200dce4: a8 92 20 00 orcc %o0, 0, %l4
200dce8: 22 80 00 b1 be,a 200dfac <rtems_bdbuf_get_buffer_for_access+0x338>
200dcec: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
200dcf0: 3b 00 80 8e sethi %hi(0x2023800), %i5
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200dcf4: 39 00 80 31 sethi %hi(0x200c400), %i4
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
200dcf8: ba 17 61 78 or %i5, 0x178, %i5
200dcfc: b6 07 7f f8 add %i5, -8, %i3
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200dd00: c2 05 20 28 ld [ %l4 + 0x28 ], %g1
200dd04: 80 a0 60 0a cmp %g1, 0xa
200dd08: 08 80 00 24 bleu 200dd98 <rtems_bdbuf_get_buffer_for_access+0x124><== ALWAYS TAKEN
200dd0c: 84 17 23 04 or %i4, 0x304, %g2
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
200dd10: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 <== NOT EXECUTED
200dd14: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200dd18: 7f ff fa 92 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200dd1c: 92 12 60 05 or %o1, 5, %o1 ! 42000005 <RAM_END+0x3fc00005><== NOT EXECUTED
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200dd20: 12 80 00 04 bne 200dd30 <rtems_bdbuf_get_buffer_for_access+0xbc><== ALWAYS TAKEN
200dd24: 80 a6 40 02 cmp %i1, %g2
200dd28: 38 bf ff e7 bgu,a 200dcc4 <rtems_bdbuf_get_buffer_for_access+0x50><== NOT EXECUTED
200dd2c: e8 05 20 0c ld [ %l4 + 0xc ], %l4 <== NOT EXECUTED
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200dd30: 10 bf ff e5 b 200dcc4 <rtems_bdbuf_get_buffer_for_access+0x50>
200dd34: e8 05 20 08 ld [ %l4 + 8 ], %l4
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200dd38: 80 a6 40 02 cmp %i1, %g2
200dd3c: 12 bf ff df bne 200dcb8 <rtems_bdbuf_get_buffer_for_access+0x44><== NEVER TAKEN
200dd40: 80 a6 00 01 cmp %i0, %g1
200dd44: c2 05 20 20 ld [ %l4 + 0x20 ], %g1
200dd48: 80 a6 80 01 cmp %i2, %g1
200dd4c: 22 80 00 06 be,a 200dd64 <rtems_bdbuf_get_buffer_for_access+0xf0>
200dd50: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200dd54: 38 bf ff dc bgu,a 200dcc4 <rtems_bdbuf_get_buffer_for_access+0x50>
200dd58: e8 05 20 0c ld [ %l4 + 0xc ], %l4
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200dd5c: 10 bf ff da b 200dcc4 <rtems_bdbuf_get_buffer_for_access+0x50>
200dd60: e8 05 20 08 ld [ %l4 + 8 ], %l4
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
200dd64: c2 00 60 08 ld [ %g1 + 8 ], %g1
200dd68: 80 a0 40 1b cmp %g1, %i3
200dd6c: 02 bf ff e1 be 200dcf0 <rtems_bdbuf_get_buffer_for_access+0x7c>
200dd70: 2b 00 80 31 sethi %hi(0x200c400), %l5
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200dd74: ac 10 20 08 mov 8, %l6
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200dd78: c2 05 20 28 ld [ %l4 + 0x28 ], %g1
200dd7c: 80 a0 60 0a cmp %g1, 0xa
200dd80: 08 80 00 16 bleu 200ddd8 <rtems_bdbuf_get_buffer_for_access+0x164><== ALWAYS TAKEN
200dd84: 84 15 62 d8 or %l5, 0x2d8, %g2
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
200dd88: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 <== NOT EXECUTED
200dd8c: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200dd90: 7f ff fa 74 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200dd94: 92 12 60 06 or %o1, 6, %o1 ! 42000006 <RAM_END+0x3fc00006><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200dd98: 83 28 60 02 sll %g1, 2, %g1
200dd9c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200dda0: 81 c0 40 00 jmp %g1
200dda4: 01 00 00 00 nop
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200dda8: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
200ddac: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200ddb0: 84 00 bf ff add %g2, -1, %g2
200ddb4: c4 20 60 0c st %g2, [ %g1 + 0xc ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200ddb8: 7f ff ec cf call 20090f4 <_Chain_Extract>
200ddbc: 90 10 00 14 mov %l4, %o0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200ddc0: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
200ddc4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200ddc8: 84 00 a0 01 inc %g2
200ddcc: c4 20 60 0c st %g2, [ %g1 + 0xc ]
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
200ddd0: 81 c7 e0 08 ret
200ddd4: 91 e8 00 14 restore %g0, %l4, %o0
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200ddd8: 83 28 60 02 sll %g1, 2, %g1
200dddc: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200dde0: 81 c0 40 00 jmp %g1
200dde4: 01 00 00 00 nop
200dde8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ddec: ec 25 20 28 st %l6, [ %l4 + 0x28 ] <== NOT EXECUTED
200ddf0: 7f ff ec c1 call 20090f4 <_Chain_Extract> <== NOT EXECUTED
200ddf4: 01 00 00 00 nop <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200ddf8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200ddfc: 7f ff ec b3 call 20090c8 <_Chain_Append> <== NOT EXECUTED
200de00: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200de04: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
200de08: 7f ff e8 53 call 2007f54 <rtems_event_send> <== NOT EXECUTED
200de0c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200de10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200de14: 02 bf ff d9 be 200dd78 <rtems_bdbuf_get_buffer_for_access+0x104><== NOT EXECUTED
200de18: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200de1c: 30 80 00 6e b,a 200dfd4 <rtems_bdbuf_get_buffer_for_access+0x360><== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200de20: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200de24: c4 05 20 2c ld [ %l4 + 0x2c ], %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200de28: c6 00 60 0c ld [ %g1 + 0xc ], %g3
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200de2c: 84 00 a0 01 inc %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200de30: 86 00 e0 01 inc %g3
200de34: c6 20 60 0c st %g3, [ %g1 + 0xc ]
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200de38: c4 25 20 2c st %g2, [ %l4 + 0x2c ]
rtems_bdbuf_anonymous_wait (waiters);
200de3c: 90 10 00 10 mov %l0, %o0
200de40: 7f ff ff 4d call 200db74 <rtems_bdbuf_anonymous_wait>
200de44: 01 00 00 00 nop
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200de48: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
--bd->waiters;
200de4c: c6 05 20 2c ld [ %l4 + 0x2c ], %g3
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200de50: c4 00 60 0c ld [ %g1 + 0xc ], %g2
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
--bd->waiters;
200de54: 86 00 ff ff add %g3, -1, %g3
200de58: c6 25 20 2c st %g3, [ %l4 + 0x2c ]
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200de5c: 84 00 bf ff add %g2, -1, %g2
200de60: 10 bf ff c6 b 200dd78 <rtems_bdbuf_get_buffer_for_access+0x104>
200de64: c4 20 60 0c st %g2, [ %g1 + 0xc ]
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_request_sync_for_modified_buffer (bd);
break;
case RTEMS_BDBUF_STATE_CACHED:
case RTEMS_BDBUF_STATE_EMPTY:
if (bd->waiters == 0)
200de68: c2 05 20 2c ld [ %l4 + 0x2c ], %g1
200de6c: 80 a0 60 00 cmp %g1, 0
200de70: 12 80 00 4b bne 200df9c <rtems_bdbuf_get_buffer_for_access+0x328><== ALWAYS TAKEN
200de74: 11 00 80 8e sethi %hi(0x2023800), %o0
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
switch (bd->state)
200de78: c2 05 20 28 ld [ %l4 + 0x28 ], %g1 <== NOT EXECUTED
200de7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200de80: 12 80 00 1d bne 200def4 <rtems_bdbuf_get_buffer_for_access+0x280><== NOT EXECUTED
200de84: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200de88: 7f ff ec 9b call 20090f4 <_Chain_Extract> <== NOT EXECUTED
200de8c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
200de90: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200de94: c0 25 20 28 clr [ %l4 + 0x28 ] <== NOT EXECUTED
200de98: 40 00 13 33 call 2012b64 <_Chain_Insert> <== NOT EXECUTED
200de9c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200dea0: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 <== NOT EXECUTED
200dea4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200dea8: 22 bf ff 7c be,a 200dc98 <rtems_bdbuf_get_buffer_for_access+0x24><== NOT EXECUTED
200deac: e8 07 60 40 ld [ %i5 + 0x40 ], %l4 <== NOT EXECUTED
{
sc = rtems_semaphore_flush (waiters->sema);
200deb0: 40 00 11 bf call 20125ac <rtems_semaphore_flush> <== NOT EXECUTED
200deb4: d0 07 60 7c ld [ %i5 + 0x7c ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200deb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200debc: 22 bf ff 77 be,a 200dc98 <rtems_bdbuf_get_buffer_for_access+0x24><== NOT EXECUTED
200dec0: e8 07 60 40 ld [ %i5 + 0x40 ], %l4 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200dec4: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dec8: 7f ff eb 0e call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200decc: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200ded0: c2 05 20 30 ld [ %l4 + 0x30 ], %g1 <== NOT EXECUTED
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200ded4: c4 05 20 2c ld [ %l4 + 0x2c ], %g2 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200ded8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200dedc: 84 00 a0 01 inc %g2 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200dee0: 86 00 e0 01 inc %g3 <== NOT EXECUTED
200dee4: c6 20 60 0c st %g3, [ %g1 + 0xc ] <== NOT EXECUTED
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200dee8: c4 25 20 2c st %g2, [ %l4 + 0x2c ] <== NOT EXECUTED
rtems_bdbuf_anonymous_wait (waiters);
200deec: 10 bf ff d5 b 200de40 <rtems_bdbuf_get_buffer_for_access+0x1cc><== NOT EXECUTED
200def0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
switch (bd->state)
200def4: 02 80 00 06 be 200df0c <rtems_bdbuf_get_buffer_for_access+0x298><== NOT EXECUTED
200def8: 01 00 00 00 nop <== NOT EXECUTED
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
200defc: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 <== NOT EXECUTED
200df00: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200df04: 7f ff fa 17 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200df08: 92 12 60 08 or %o1, 8, %o1 ! 42000008 <RAM_END+0x3fc00008><== NOT EXECUTED
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200df0c: 7f ff fa cf call 200ca48 <rtems_bdbuf_avl_remove.constprop.7><== NOT EXECUTED
200df10: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
200df14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200df18: 02 bf ff dc be 200de88 <rtems_bdbuf_get_buffer_for_access+0x214><== NOT EXECUTED
200df1c: 01 00 00 00 nop <== NOT EXECUTED
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200df20: d0 05 20 28 ld [ %l4 + 0x28 ], %o0 <== NOT EXECUTED
200df24: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200df28: 7f ff fa 0e call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200df2c: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200df30: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200df34: c4 05 20 2c ld [ %l4 + 0x2c ], %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200df38: c6 00 60 0c ld [ %g1 + 0xc ], %g3
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200df3c: 84 00 a0 01 inc %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200df40: 86 00 e0 01 inc %g3
200df44: c6 20 60 0c st %g3, [ %g1 + 0xc ]
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200df48: c4 25 20 2c st %g2, [ %l4 + 0x2c ]
rtems_bdbuf_anonymous_wait (waiters);
200df4c: 90 10 00 1b mov %i3, %o0
200df50: 7f ff ff 09 call 200db74 <rtems_bdbuf_anonymous_wait>
200df54: 01 00 00 00 nop
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200df58: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
--bd->waiters;
200df5c: c6 05 20 2c ld [ %l4 + 0x2c ], %g3
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200df60: c4 00 60 0c ld [ %g1 + 0xc ], %g2
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
--bd->waiters;
200df64: 86 00 ff ff add %g3, -1, %g3
200df68: c6 25 20 2c st %g3, [ %l4 + 0x2c ]
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200df6c: 84 00 bf ff add %g2, -1, %g2
200df70: 10 bf ff 64 b 200dd00 <rtems_bdbuf_get_buffer_for_access+0x8c>
200df74: c4 20 60 0c st %g2, [ %g1 + 0xc ]
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200df78: c2 05 20 30 ld [ %l4 + 0x30 ], %g1
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200df7c: c4 05 20 2c ld [ %l4 + 0x2c ], %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200df80: c6 00 60 0c ld [ %g1 + 0xc ], %g3
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200df84: 84 00 a0 01 inc %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200df88: 86 00 e0 01 inc %g3
200df8c: c6 20 60 0c st %g3, [ %g1 + 0xc ]
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200df90: c4 25 20 2c st %g2, [ %l4 + 0x2c ]
rtems_bdbuf_anonymous_wait (waiters);
200df94: 10 bf ff ef b 200df50 <rtems_bdbuf_get_buffer_for_access+0x2dc>
200df98: 90 10 00 1d mov %i5, %o0
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
rtems_bdbuf_wake_swapper ();
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
200df9c: 7f ff fe f6 call 200db74 <rtems_bdbuf_anonymous_wait>
200dfa0: 90 12 21 80 or %o0, 0x180, %o0
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200dfa4: 10 bf ff 3d b 200dc98 <rtems_bdbuf_get_buffer_for_access+0x24>
200dfa8: e8 07 60 40 ld [ %i5 + 0x40 ], %l4
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
200dfac: 80 a0 40 13 cmp %g1, %l3
200dfb0: 02 bf ff fb be 200df9c <rtems_bdbuf_get_buffer_for_access+0x328>
200dfb4: 11 00 80 8e sethi %hi(0x2023800), %o0
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200dfb8: d0 07 40 00 ld [ %i5 ], %o0
200dfbc: 7f ff e7 e6 call 2007f54 <rtems_event_send>
200dfc0: 92 10 20 04 mov 4, %o1
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200dfc4: 80 a2 20 00 cmp %o0, 0
200dfc8: 02 bf ff f5 be 200df9c <rtems_bdbuf_get_buffer_for_access+0x328><== ALWAYS TAKEN
200dfcc: 11 00 80 8e sethi %hi(0x2023800), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200dfd0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200dfd4: 7f ff ea cb call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200dfd8: 90 12 20 14 or %o0, 0x14, %o0 ! 42000014 <RAM_END+0x3fc00014><== NOT EXECUTED
0200cef0 <rtems_bdbuf_get_buffer_from_lru_list>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
200cef0: 9d e3 bf 20 save %sp, -224, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200cef4: 39 00 80 8e sethi %hi(0x2023800), %i4
200cef8: b8 17 21 08 or %i4, 0x108, %i4 ! 2023908 <bdbuf_cache>
200cefc: fa 07 20 44 ld [ %i4 + 0x44 ], %i5
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
200cf00: a0 07 20 48 add %i4, 0x48, %l0
200cf04: 80 a7 40 10 cmp %i5, %l0
200cf08: 02 80 00 26 be 200cfa0 <rtems_bdbuf_get_buffer_from_lru_list+0xb0>
200cf0c: a2 10 20 00 clr %l1
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200cf10: a8 07 20 44 add %i4, 0x44, %l4
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
200cf14: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200cf18: 80 a0 60 00 cmp %g1, 0
200cf1c: 32 80 00 1e bne,a 200cf94 <rtems_bdbuf_get_buffer_from_lru_list+0xa4>
200cf20: fa 07 40 00 ld [ %i5 ], %i5
{
if (bd->group->bds_per_group == bds_per_group)
200cf24: e4 07 60 30 ld [ %i5 + 0x30 ], %l2
200cf28: e6 04 a0 08 ld [ %l2 + 8 ], %l3
200cf2c: 80 a4 c0 1b cmp %l3, %i3
200cf30: 02 80 00 47 be 200d04c <rtems_bdbuf_get_buffer_from_lru_list+0x15c>
200cf34: 01 00 00 00 nop
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
empty_bd = bd;
}
else if (bd->group->users == 0)
200cf38: c2 04 a0 0c ld [ %l2 + 0xc ], %g1
200cf3c: 80 a0 60 00 cmp %g1, 0
200cf40: 32 80 00 15 bne,a 200cf94 <rtems_bdbuf_get_buffer_from_lru_list+0xa4>
200cf44: fa 07 40 00 ld [ %i5 ], %i5
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
200cf48: ea 07 20 20 ld [ %i4 + 0x20 ], %l5
200cf4c: 92 10 00 13 mov %l3, %o1
200cf50: 40 00 46 c8 call 201ea70 <.udiv>
200cf54: 90 10 00 15 mov %l5, %o0
for (b = 0, bd = group->bdbuf;
200cf58: 80 a4 e0 00 cmp %l3, 0
200cf5c: 02 80 00 21 be 200cfe0 <rtems_bdbuf_get_buffer_from_lru_list+0xf0><== NEVER TAKEN
200cf60: e2 04 a0 10 ld [ %l2 + 0x10 ], %l1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200cf64: ab 2a 20 06 sll %o0, 6, %l5
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
200cf68: a6 10 20 00 clr %l3
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
switch (bd->state)
200cf6c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
200cf70: 80 a0 60 00 cmp %g1, 0
200cf74: 02 80 00 12 be 200cfbc <rtems_bdbuf_get_buffer_from_lru_list+0xcc>
200cf78: 80 a0 60 02 cmp %g1, 2
200cf7c: 02 80 00 0b be 200cfa8 <rtems_bdbuf_get_buffer_from_lru_list+0xb8><== ALWAYS TAKEN
200cf80: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
200cf84: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED
200cf88: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200cf8c: 7f ff fd f5 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200cf90: 92 12 60 08 or %o1, 8, %o1 ! 42000008 <RAM_END+0x3fc00008><== NOT EXECUTED
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
200cf94: 80 a7 40 10 cmp %i5, %l0
200cf98: 12 bf ff df bne 200cf14 <rtems_bdbuf_get_buffer_from_lru_list+0x24>
200cf9c: a2 10 20 00 clr %l1
node = rtems_chain_next (node);
}
return NULL;
}
200cfa0: 81 c7 e0 08 ret
200cfa4: 91 e8 00 11 restore %g0, %l1, %o0
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200cfa8: 7f ff fe a8 call 200ca48 <rtems_bdbuf_avl_remove.constprop.7>
200cfac: 90 10 00 11 mov %l1, %o0
200cfb0: 80 a2 20 00 cmp %o0, 0
200cfb4: 12 80 00 aa bne 200d25c <rtems_bdbuf_get_buffer_from_lru_list+0x36c><== NEVER TAKEN
200cfb8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200cfbc: 7f ff f0 4e call 20090f4 <_Chain_Extract>
200cfc0: 90 10 00 11 mov %l1, %o0
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
200cfc4: c2 04 a0 08 ld [ %l2 + 8 ], %g1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200cfc8: a6 04 e0 01 inc %l3
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
200cfcc: 80 a4 c0 01 cmp %l3, %g1
200cfd0: 0a bf ff e7 bcs 200cf6c <rtems_bdbuf_get_buffer_from_lru_list+0x7c>
200cfd4: a2 04 40 15 add %l1, %l5, %l1
200cfd8: ea 07 20 20 ld [ %i4 + 0x20 ], %l5
200cfdc: e2 04 a0 10 ld [ %l2 + 0x10 ], %l1
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200cfe0: 80 a6 e0 01 cmp %i3, 1
200cfe4: 08 80 00 21 bleu 200d068 <rtems_bdbuf_get_buffer_from_lru_list+0x178>
200cfe8: f6 24 a0 08 st %i3, [ %l2 + 8 ]
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
200cfec: 90 10 00 15 mov %l5, %o0
200cff0: 92 10 00 1b mov %i3, %o1
200cff4: 40 00 46 9f call 201ea70 <.udiv>
200cff8: a6 10 20 01 mov 1, %l3
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200cffc: ab 2a 20 06 sll %o0, 6, %l5
200d000: a2 04 40 15 add %l1, %l5, %l1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d004: c0 24 60 28 clr [ %l1 + 0x28 ]
200d008: 92 10 00 11 mov %l1, %o1
200d00c: 40 00 16 d6 call 2012b64 <_Chain_Insert>
200d010: 90 10 00 14 mov %l4, %o0
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200d014: c2 04 a0 08 ld [ %l2 + 8 ], %g1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200d018: a6 04 e0 01 inc %l3
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200d01c: 80 a4 c0 01 cmp %l3, %g1
200d020: 0a bf ff f9 bcs 200d004 <rtems_bdbuf_get_buffer_from_lru_list+0x114><== NEVER TAKEN
200d024: a2 04 40 15 add %l1, %l5, %l1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
200d028: 80 a4 e0 01 cmp %l3, 1
200d02c: 28 80 00 0f bleu,a 200d068 <rtems_bdbuf_get_buffer_from_lru_list+0x178><== NEVER TAKEN
200d030: e2 04 a0 10 ld [ %l2 + 0x10 ], %l1 <== NOT EXECUTED
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200d034: c2 07 20 78 ld [ %i4 + 0x78 ], %g1
200d038: 80 a0 60 00 cmp %g1, 0
200d03c: 12 80 00 79 bne 200d220 <rtems_bdbuf_get_buffer_from_lru_list+0x330>
200d040: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
if (sc != RTEMS_SUCCESSFUL)
200d044: 10 80 00 09 b 200d068 <rtems_bdbuf_get_buffer_from_lru_list+0x178>
200d048: e2 04 a0 10 ld [ %l2 + 0x10 ], %l1
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
switch (bd->state)
200d04c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200d050: 80 a0 60 00 cmp %g1, 0
200d054: 12 80 00 5b bne 200d1c0 <rtems_bdbuf_get_buffer_from_lru_list+0x2d0>
200d058: 80 a0 60 02 cmp %g1, 2
200d05c: 90 10 00 1d mov %i5, %o0
200d060: 7f ff f0 25 call 20090f4 <_Chain_Extract>
200d064: a2 10 00 1d mov %i5, %l1
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
200d068: 80 a4 60 00 cmp %l1, 0
200d06c: 22 bf ff ca be,a 200cf94 <rtems_bdbuf_get_buffer_from_lru_list+0xa4><== NEVER TAKEN
200d070: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
200d074: c0 24 60 08 clr [ %l1 + 8 ]
bd->avl.right = NULL;
200d078: c0 24 60 0c clr [ %l1 + 0xc ]
rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
200d07c: c2 07 20 40 ld [ %i4 + 0x40 ], %g1
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
200d080: f0 3c 60 18 std %i0, [ %l1 + 0x18 ]
bd->block = block;
200d084: f4 24 60 20 st %i2, [ %l1 + 0x20 ]
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
200d088: c0 24 60 2c clr [ %l1 + 0x2c ]
rtems_bdbuf_buffer* p = *root;
rtems_bdbuf_buffer* q;
rtems_bdbuf_buffer* p1;
rtems_bdbuf_buffer* p2;
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
200d08c: 9e 07 bf 80 add %fp, -128, %o7
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
200d090: b6 10 20 01 mov 1, %i3
rtems_bdbuf_buffer* p = *root;
rtems_bdbuf_buffer* q;
rtems_bdbuf_buffer* p1;
rtems_bdbuf_buffer* p2;
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
200d094: 84 10 00 0f mov %o7, %g2
bool modified = false;
if (p == NULL)
200d098: 80 a0 60 00 cmp %g1, 0
200d09c: 02 80 00 c2 be 200d3a4 <rtems_bdbuf_get_buffer_from_lru_list+0x4b4>
200d0a0: 9a 10 3f ff mov -1, %o5
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d0a4: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
200d0a8: c2 20 80 00 st %g1, [ %g2 ]
200d0ac: 88 00 a0 04 add %g2, 4, %g4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d0b0: 80 a6 00 03 cmp %i0, %g3
200d0b4: 18 80 00 17 bgu 200d110 <rtems_bdbuf_get_buffer_from_lru_list+0x220><== NEVER TAKEN
200d0b8: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
200d0bc: 80 a6 00 03 cmp %i0, %g3
200d0c0: 32 80 00 09 bne,a 200d0e4 <rtems_bdbuf_get_buffer_from_lru_list+0x1f4><== NEVER TAKEN
200d0c4: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED
200d0c8: 80 a6 40 1d cmp %i1, %i5
200d0cc: 38 80 00 12 bgu,a 200d114 <rtems_bdbuf_get_buffer_from_lru_list+0x224><== NEVER TAKEN
200d0d0: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
200d0d4: 80 a6 40 1d cmp %i1, %i5
200d0d8: 22 80 00 40 be,a 200d1d8 <rtems_bdbuf_get_buffer_from_lru_list+0x2e8><== ALWAYS TAKEN
200d0dc: c6 00 60 20 ld [ %g1 + 0x20 ], %g3
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
q = p->avl.left;
200d0e0: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED
if (q == NULL)
200d0e4: 80 a0 e0 00 cmp %g3, 0
200d0e8: 02 80 00 5a be 200d250 <rtems_bdbuf_get_buffer_from_lru_list+0x360>
200d0ec: da 28 60 10 stb %o5, [ %g1 + 0x10 ]
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
200d0f0: 82 10 00 03 mov %g3, %g1
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d0f4: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
200d0f8: 84 10 00 04 mov %g4, %g2
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
200d0fc: c2 20 80 00 st %g1, [ %g2 ]
200d100: 88 00 a0 04 add %g2, 4, %g4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d104: 80 a6 00 03 cmp %i0, %g3
200d108: 08 bf ff ee bleu 200d0c0 <rtems_bdbuf_get_buffer_from_lru_list+0x1d0><== ALWAYS TAKEN
200d10c: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
{
p->avl.cache = 1;
q = p->avl.right;
200d110: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
if (q == NULL)
200d114: 80 a0 e0 00 cmp %g3, 0
200d118: 12 bf ff f6 bne 200d0f0 <rtems_bdbuf_get_buffer_from_lru_list+0x200>
200d11c: f6 28 60 10 stb %i3, [ %g1 + 0x10 ]
{
q = node;
p->avl.right = q = node;
200d120: e2 20 60 0c st %l1, [ %g1 + 0xc ]
200d124: 88 10 20 01 mov 1, %g4
}
p = q;
}
q->avl.left = q->avl.right = NULL;
200d128: c0 24 60 0c clr [ %l1 + 0xc ]
200d12c: c0 24 60 08 clr [ %l1 + 8 ]
q->avl.bal = 0;
200d130: c0 2c 60 11 clrb [ %l1 + 0x11 ]
200d134: 89 29 20 18 sll %g4, 0x18, %g4
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
200d138: 10 80 00 12 b 200d180 <rtems_bdbuf_get_buffer_from_lru_list+0x290>
200d13c: b4 10 20 01 mov 1, %i2
200d140: 86 10 00 01 mov %g1, %g3
200d144: ba 10 20 01 mov 1, %i5
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
200d148: 80 a0 80 0f cmp %g2, %o7
200d14c: 28 80 00 8c bleu,a 200d37c <rtems_bdbuf_get_buffer_from_lru_list+0x48c>
200d150: c6 27 20 40 st %g3, [ %i4 + 0x40 ]
{
p = *--buf_prev;
200d154: c2 00 bf fc ld [ %g2 + -4 ], %g1
if (p->avl.cache == -1)
200d158: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
200d15c: 89 29 20 18 sll %g4, 0x18, %g4
200d160: b7 39 20 18 sra %g4, 0x18, %i3
200d164: 80 a6 ff ff cmp %i3, -1
200d168: 22 80 00 03 be,a 200d174 <rtems_bdbuf_get_buffer_from_lru_list+0x284>
200d16c: c6 20 60 08 st %g3, [ %g1 + 8 ]
{
p->avl.left = q;
}
else
{
p->avl.right = q;
200d170: c6 20 60 0c st %g3, [ %g1 + 0xc ]
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
200d174: 80 8f 60 ff btst 0xff, %i5
200d178: 02 80 00 81 be 200d37c <rtems_bdbuf_get_buffer_from_lru_list+0x48c>
200d17c: 84 00 bf fc add %g2, -4, %g2
{
if (p->avl.cache == -1)
200d180: 89 39 20 18 sra %g4, 0x18, %g4
200d184: 80 a1 3f ff cmp %g4, -1
200d188: 22 80 00 39 be,a 200d26c <rtems_bdbuf_get_buffer_from_lru_list+0x37c>
200d18c: fa 48 60 11 ldsb [ %g1 + 0x11 ], %i5
break;
}
}
else
{
switch (p->avl.bal)
200d190: c6 48 60 11 ldsb [ %g1 + 0x11 ], %g3
200d194: 80 a0 e0 00 cmp %g3, 0
200d198: 22 bf ff ea be,a 200d140 <rtems_bdbuf_get_buffer_from_lru_list+0x250>
200d19c: f4 28 60 11 stb %i2, [ %g1 + 0x11 ]
200d1a0: 80 a0 e0 01 cmp %g3, 1
200d1a4: 02 80 00 39 be 200d288 <rtems_bdbuf_get_buffer_from_lru_list+0x398>
200d1a8: 80 a0 ff ff cmp %g3, -1
200d1ac: 22 80 00 26 be,a 200d244 <rtems_bdbuf_get_buffer_from_lru_list+0x354><== ALWAYS TAKEN
200d1b0: c0 28 60 11 clrb [ %g1 + 0x11 ]
200d1b4: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
200d1b8: 10 bf ff e4 b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258><== NOT EXECUTED
200d1bc: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
switch (bd->state)
200d1c0: 02 80 00 0f be 200d1fc <rtems_bdbuf_get_buffer_from_lru_list+0x30c><== ALWAYS TAKEN
200d1c4: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
200d1c8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200d1cc: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d1d0: 7f ff fd 64 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200d1d4: 92 12 60 08 or %o1, 8, %o1 ! 42000008 <RAM_END+0x3fc00008><== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200d1d8: 80 a6 80 03 cmp %i2, %g3
200d1dc: 38 bf ff ce bgu,a 200d114 <rtems_bdbuf_get_buffer_from_lru_list+0x224>
200d1e0: c6 00 60 0c ld [ %g1 + 0xc ], %g3
q = node;
p->avl.right = q = node;
break;
}
}
else if ((p->dev != dev) || (p->block != block))
200d1e4: 80 a6 80 03 cmp %i2, %g3
200d1e8: 32 bf ff bf bne,a 200d0e4 <rtems_bdbuf_get_buffer_from_lru_list+0x1f4><== ALWAYS TAKEN
200d1ec: c6 00 60 08 ld [ %g1 + 8 ], %g3
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
200d1f0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d1f4: 7f ff ee 43 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d1f8: 90 12 20 1b or %o0, 0x1b, %o0 ! 4200001b <RAM_END+0x3fc0001b><== NOT EXECUTED
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200d1fc: 7f ff fe 13 call 200ca48 <rtems_bdbuf_avl_remove.constprop.7>
200d200: 90 10 00 1d mov %i5, %o0
200d204: 80 a2 20 00 cmp %o0, 0
200d208: 22 bf ff 96 be,a 200d060 <rtems_bdbuf_get_buffer_from_lru_list+0x170><== ALWAYS TAKEN
200d20c: 90 10 00 1d mov %i5, %o0
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200d210: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200d214: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d218: 7f ff fd 52 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200d21c: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
{
sc = rtems_semaphore_flush (waiters->sema);
200d220: 40 00 14 e3 call 20125ac <rtems_semaphore_flush>
200d224: d0 07 20 7c ld [ %i4 + 0x7c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d228: 80 a2 20 00 cmp %o0, 0
200d22c: 22 bf ff 8f be,a 200d068 <rtems_bdbuf_get_buffer_from_lru_list+0x178><== ALWAYS TAKEN
200d230: e2 04 a0 10 ld [ %l2 + 0x10 ], %l1
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200d234: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d238: 7f ff ee 32 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d23c: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
200d240: c0 28 60 11 clrb [ %g1 + 0x11 ]
200d244: 86 10 00 01 mov %g1, %g3
modified = false;
200d248: 10 bf ff c0 b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258>
200d24c: ba 10 20 00 clr %i5
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
200d250: e2 20 60 08 st %l1, [ %g1 + 8 ]
200d254: 10 bf ff b5 b 200d128 <rtems_bdbuf_get_buffer_from_lru_list+0x238>
200d258: 88 10 3f ff mov -1, %g4
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200d25c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED
200d260: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d264: 7f ff fd 3f call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200d268: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
200d26c: 80 a7 60 00 cmp %i5, 0
200d270: 12 80 00 21 bne 200d2f4 <rtems_bdbuf_get_buffer_from_lru_list+0x404>
200d274: 80 a7 60 01 cmp %i5, 1
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
200d278: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
200d27c: 86 10 00 01 mov %g1, %g3
200d280: 10 bf ff b2 b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258>
200d284: ba 10 20 01 mov 1, %i5
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
200d288: c8 00 60 0c ld [ %g1 + 0xc ], %g4
if (p1->avl.bal == 1) /* simple RR-turn */
200d28c: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200d290: 80 a0 e0 01 cmp %g3, 1
200d294: 02 80 00 33 be 200d360 <rtems_bdbuf_get_buffer_from_lru_list+0x470><== ALWAYS TAKEN
200d298: c6 01 20 08 ld [ %g4 + 8 ], %g3
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d29c: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5 <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200d2a0: f6 00 e0 0c ld [ %g3 + 0xc ], %i3 <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d2a4: ba 1f 60 01 xor %i5, 1, %i5 <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200d2a8: f6 21 20 08 st %i3, [ %g4 + 8 ] <== NOT EXECUTED
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d2ac: 80 a0 00 1d cmp %g0, %i5 <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200d2b0: f6 00 e0 08 ld [ %g3 + 8 ], %i3 <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d2b4: ba 40 3f ff addx %g0, -1, %i5 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
200d2b8: c8 20 e0 0c st %g4, [ %g3 + 0xc ] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200d2bc: fa 28 60 11 stb %i5, [ %g1 + 0x11 ] <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200d2c0: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5 <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200d2c4: f6 20 60 0c st %i3, [ %g1 + 0xc ] <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200d2c8: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
200d2cc: 02 80 00 06 be 200d2e4 <rtems_bdbuf_get_buffer_from_lru_list+0x3f4><== NOT EXECUTED
200d2d0: c2 20 e0 08 st %g1, [ %g3 + 8 ] <== NOT EXECUTED
200d2d4: c0 29 20 11 clrb [ %g4 + 0x11 ]
p = p2;
}
p->avl.bal = 0;
200d2d8: c0 28 e0 11 clrb [ %g3 + 0x11 ]
modified = false;
200d2dc: 10 bf ff 9b b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258>
200d2e0: ba 10 20 00 clr %i5
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200d2e4: f4 29 20 11 stb %i2, [ %g4 + 0x11 ] <== NOT EXECUTED
p = p2;
}
p->avl.bal = 0;
200d2e8: c0 28 e0 11 clrb [ %g3 + 0x11 ] <== NOT EXECUTED
modified = false;
200d2ec: 10 bf ff 97 b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258><== NOT EXECUTED
200d2f0: ba 10 20 00 clr %i5 <== NOT EXECUTED
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
200d2f4: 02 bf ff d3 be 200d240 <rtems_bdbuf_get_buffer_from_lru_list+0x350>
200d2f8: 80 a7 7f ff cmp %i5, -1
200d2fc: 32 bf ff af bne,a 200d1b8 <rtems_bdbuf_get_buffer_from_lru_list+0x2c8><== NEVER TAKEN
200d300: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
200d304: c8 00 60 08 ld [ %g1 + 8 ], %g4
if (p1->avl.bal == -1) /* simple LL-turn */
200d308: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200d30c: 80 a0 ff ff cmp %g3, -1
200d310: 02 80 00 1e be 200d388 <rtems_bdbuf_get_buffer_from_lru_list+0x498><== NEVER TAKEN
200d314: c6 01 20 0c ld [ %g4 + 0xc ], %g3
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d318: f6 48 e0 11 ldsb [ %g3 + 0x11 ], %i3
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200d31c: f2 00 e0 08 ld [ %g3 + 8 ], %i1
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d320: b6 38 00 1b xnor %g0, %i3, %i3
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200d324: f2 21 20 0c st %i1, [ %g4 + 0xc ]
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d328: 80 a0 00 1b cmp %g0, %i3
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200d32c: f2 00 e0 0c ld [ %g3 + 0xc ], %i1
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d330: b6 60 3f ff subx %g0, -1, %i3
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
200d334: c8 20 e0 08 st %g4, [ %g3 + 8 ]
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200d338: f6 28 60 11 stb %i3, [ %g1 + 0x11 ]
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200d33c: f6 48 e0 11 ldsb [ %g3 + 0x11 ], %i3
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200d340: f2 20 60 08 st %i1, [ %g1 + 8 ]
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200d344: 80 a6 e0 01 cmp %i3, 1
200d348: 12 bf ff e3 bne 200d2d4 <rtems_bdbuf_get_buffer_from_lru_list+0x3e4><== ALWAYS TAKEN
200d34c: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
200d350: fa 29 20 11 stb %i5, [ %g4 + 0x11 ] <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
200d354: c0 28 e0 11 clrb [ %g3 + 0x11 ] <== NOT EXECUTED
modified = false;
200d358: 10 bf ff 7c b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258><== NOT EXECUTED
200d35c: ba 10 20 00 clr %i5 <== NOT EXECUTED
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
200d360: c6 20 60 0c st %g3, [ %g1 + 0xc ]
p1->avl.left = p;
p->avl.bal = 0;
200d364: c0 28 60 11 clrb [ %g1 + 0x11 ]
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
200d368: c2 21 20 08 st %g1, [ %g4 + 8 ]
p->avl.bal = 0;
200d36c: 86 10 00 04 mov %g4, %g3
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
modified = false;
200d370: ba 10 20 00 clr %i5
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
200d374: 10 bf ff 75 b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258>
200d378: c0 28 e0 11 clrb [ %g3 + 0x11 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d37c: 82 10 20 01 mov 1, %g1
200d380: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
if (empty_bd != NULL)
{
rtems_bdbuf_setup_empty_buffer (empty_bd, dev, block);
return empty_bd;
200d384: 30 bf ff 07 b,a 200cfa0 <rtems_bdbuf_get_buffer_from_lru_list+0xb0>
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
200d388: c6 20 60 08 st %g3, [ %g1 + 8 ] <== NOT EXECUTED
p1->avl.right = p;
p->avl.bal = 0;
200d38c: c0 28 60 11 clrb [ %g1 + 0x11 ] <== NOT EXECUTED
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
200d390: c2 21 20 0c st %g1, [ %g4 + 0xc ] <== NOT EXECUTED
p->avl.bal = 0;
200d394: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
modified = false;
200d398: ba 10 20 00 clr %i5 <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
200d39c: 10 bf ff 6b b 200d148 <rtems_bdbuf_get_buffer_from_lru_list+0x258><== NOT EXECUTED
200d3a0: c0 28 e0 11 clrb [ %g3 + 0x11 ] <== NOT EXECUTED
bool modified = false;
if (p == NULL)
{
*root = node;
200d3a4: e2 27 20 40 st %l1, [ %i4 + 0x40 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d3a8: 82 10 20 01 mov 1, %g1
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
200d3ac: c0 24 60 08 clr [ %l1 + 8 ]
node->avl.right = NULL;
200d3b0: c0 24 60 0c clr [ %l1 + 0xc ]
node->avl.bal = 0;
200d3b4: c0 2c 60 11 clrb [ %l1 + 0x11 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d3b8: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
200d3bc: 30 bf fe f9 b,a 200cfa0 <rtems_bdbuf_get_buffer_from_lru_list+0xb0>
0200e600 <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
200e600: 9d e3 bf 98 save %sp, -104, %sp
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
200e604: 03 00 80 90 sethi %hi(0x2024000), %g1
200e608: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 2024208 <_Per_CPU_Information+0x8>
200e60c: 80 a0 60 00 cmp %g1, 0
200e610: 12 80 00 6c bne 200e7c0 <rtems_bdbuf_init+0x1c0> <== NEVER TAKEN
200e614: b0 10 20 12 mov 0x12, %i0
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
200e618: 33 00 80 83 sethi %hi(0x2020c00), %i1
200e61c: b2 16 63 68 or %i1, 0x368, %i1 ! 2020f68 <rtems_bdbuf_configuration>
200e620: f8 06 60 24 ld [ %i1 + 0x24 ], %i4
200e624: e0 06 60 20 ld [ %i1 + 0x20 ], %l0
200e628: 90 10 00 1c mov %i4, %o0
200e62c: 92 10 00 10 mov %l0, %o1
200e630: 40 00 41 bc call 201ed20 <.urem>
200e634: b0 10 20 0a mov 0xa, %i0
200e638: 80 a2 20 00 cmp %o0, 0
200e63c: 12 80 00 61 bne 200e7c0 <rtems_bdbuf_init+0x1c0> <== NEVER TAKEN
200e640: 90 10 21 00 mov 0x100, %o0
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
200e644: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200e648: 92 10 21 00 mov 0x100, %o1
200e64c: 40 00 10 05 call 2012660 <rtems_task_mode>
200e650: 94 07 bf fc add %fp, -4, %o2
if (sc != RTEMS_SUCCESSFUL)
200e654: 80 a2 20 00 cmp %o0, 0
200e658: 12 80 01 0a bne 200ea80 <rtems_bdbuf_init+0x480> <== NEVER TAKEN
200e65c: 35 00 80 8e sethi %hi(0x2023800), %i2
* We use a special variable to manage the initialisation incase we have
* completing threads doing this. You may get errors if the another thread
* makes a call and we have not finished initialisation.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
if (bdbuf_cache.initialised)
200e660: b6 16 a1 08 or %i2, 0x108, %i3 ! 2023908 <bdbuf_cache>
200e664: c2 0e e0 88 ldub [ %i3 + 0x88 ], %g1
200e668: 80 a0 60 00 cmp %g1, 0
200e66c: 02 80 00 0e be 200e6a4 <rtems_bdbuf_init+0xa4> <== ALWAYS TAKEN
200e670: fa 07 bf fc ld [ %fp + -4 ], %i5
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200e674: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200e678: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
200e67c: 13 00 00 3f sethi %hi(0xfc00), %o1 <== NOT EXECUTED
*/
prev_mode = rtems_bdbuf_disable_preemption ();
if (bdbuf_cache.initialised)
{
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
200e680: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200e684: 40 00 0f f7 call 2012660 <rtems_task_mode> <== NOT EXECUTED
200e688: 92 12 63 ff or %o1, 0x3ff, %o1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200e68c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e690: 02 80 00 4c be 200e7c0 <rtems_bdbuf_init+0x1c0> <== NOT EXECUTED
200e694: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
200e698: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e69c: 7f ff e9 19 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e6a0: 90 12 20 11 or %o0, 0x11, %o0 ! 42000011 <RAM_END+0x3fc00011><== NOT EXECUTED
{
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
200e6a4: 92 10 20 00 clr %o1
200e6a8: 94 10 20 90 mov 0x90, %o2
200e6ac: 40 00 20 32 call 2016774 <memset>
200e6b0: 90 10 00 1b mov %i3, %o0
bdbuf_cache.initialised = true;
200e6b4: 82 10 20 01 mov 1, %g1
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200e6b8: 90 10 00 1d mov %i5, %o0
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
200e6bc: fa 27 bf fc st %i5, [ %fp + -4 ]
200e6c0: c2 2e e0 88 stb %g1, [ %i3 + 0x88 ]
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200e6c4: 94 07 bf fc add %fp, -4, %o2
200e6c8: 13 00 00 3f sethi %hi(0xfc00), %o1
200e6cc: 40 00 0f e5 call 2012660 <rtems_task_mode>
200e6d0: 92 12 63 ff or %o1, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
if (sc != RTEMS_SUCCESSFUL)
200e6d4: 80 a2 20 00 cmp %o0, 0
200e6d8: 12 bf ff f0 bne 200e698 <rtems_bdbuf_init+0x98> <== NEVER TAKEN
200e6dc: 82 06 e0 0c add %i3, 0xc, %g1
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e6e0: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200e6e4: 82 06 e0 48 add %i3, 0x48, %g1
200e6e8: c2 26 e0 44 st %g1, [ %i3 + 0x44 ]
200e6ec: 82 06 e0 54 add %i3, 0x54, %g1
head->previous = NULL;
tail->previous = head;
200e6f0: 9e 06 e0 08 add %i3, 8, %o7
200e6f4: ba 06 e0 50 add %i3, 0x50, %i5
200e6f8: 88 06 e0 5c add %i3, 0x5c, %g4
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e6fc: c2 26 e0 50 st %g1, [ %i3 + 0x50 ]
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
200e700: 05 3f ff ff sethi %hi(0xfffffc00), %g2
200e704: 82 06 e0 60 add %i3, 0x60, %g1
200e708: 84 10 a3 ff or %g2, 0x3ff, %g2
200e70c: 86 10 00 02 mov %g2, %g3
head->previous = NULL;
tail->previous = head;
200e710: fa 26 e0 58 st %i5, [ %i3 + 0x58 ]
200e714: b0 06 e0 44 add %i3, 0x44, %i0
200e718: c4 3e e0 38 std %g2, [ %i3 + 0x38 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200e71c: c0 26 e0 0c clr [ %i3 + 0xc ]
tail->previous = head;
200e720: de 26 e0 10 st %o7, [ %i3 + 0x10 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200e724: c0 26 e0 48 clr [ %i3 + 0x48 ]
tail->previous = head;
200e728: f0 26 e0 4c st %i0, [ %i3 + 0x4c ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200e72c: c0 26 e0 54 clr [ %i3 + 0x54 ]
200e730: c0 26 e0 60 clr [ %i3 + 0x60 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e734: c2 26 e0 5c st %g1, [ %i3 + 0x5c ]
head->previous = NULL;
tail->previous = head;
200e738: c8 26 e0 64 st %g4, [ %i3 + 0x64 ]
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
200e73c: 3b 10 91 10 sethi %hi(0x42444000), %i5
200e740: 92 10 20 01 mov 1, %o1
200e744: 90 17 63 6c or %i5, 0x36c, %o0
200e748: 94 10 20 54 mov 0x54, %o2
200e74c: 96 10 20 00 clr %o3
200e750: 7f ff e6 99 call 20081b4 <rtems_semaphore_create>
200e754: 98 06 e0 28 add %i3, 0x28, %o4
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
200e758: 80 a2 20 00 cmp %o0, 0
200e75c: 22 80 00 29 be,a 200e800 <rtems_bdbuf_init+0x200> <== ALWAYS TAKEN
200e760: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
200e764: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0 <== NOT EXECUTED
200e768: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e76c: 12 80 00 22 bne 200e7f4 <rtems_bdbuf_init+0x1f4> <== NOT EXECUTED
200e770: 01 00 00 00 nop <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
200e774: 7f ff d6 fd call 2004368 <free> <== NOT EXECUTED
200e778: d0 06 e0 18 ld [ %i3 + 0x18 ], %o0 <== NOT EXECUTED
free (bdbuf_cache.groups);
200e77c: 7f ff d6 fb call 2004368 <free> <== NOT EXECUTED
200e780: d0 06 e0 84 ld [ %i3 + 0x84 ], %o0 <== NOT EXECUTED
free (bdbuf_cache.bds);
200e784: 7f ff d6 f9 call 2004368 <free> <== NOT EXECUTED
200e788: d0 06 e0 14 ld [ %i3 + 0x14 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
200e78c: 7f ff e6 fa call 2008374 <rtems_semaphore_delete> <== NOT EXECUTED
200e790: d0 06 e0 7c ld [ %i3 + 0x7c ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
200e794: 7f ff e6 f8 call 2008374 <rtems_semaphore_delete> <== NOT EXECUTED
200e798: d0 06 e0 6c ld [ %i3 + 0x6c ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
200e79c: 7f ff e6 f6 call 2008374 <rtems_semaphore_delete> <== NOT EXECUTED
200e7a0: d0 06 e0 74 ld [ %i3 + 0x74 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
200e7a4: 7f ff e6 f4 call 2008374 <rtems_semaphore_delete> <== NOT EXECUTED
200e7a8: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
200e7ac: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
200e7b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e7b4: 12 80 00 05 bne 200e7c8 <rtems_bdbuf_init+0x1c8> <== NOT EXECUTED
200e7b8: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
200e7bc: c0 2e e0 88 clrb [ %i3 + 0x88 ] <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
200e7c0: 81 c7 e0 08 ret
200e7c4: 81 e8 00 00 restore
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e7c8: 7f ff e7 6c call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
200e7cc: 01 00 00 00 nop <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200e7d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e7d4: 12 80 00 a9 bne 200ea78 <rtems_bdbuf_init+0x478> <== NOT EXECUTED
200e7d8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
200e7dc: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
200e7e0: 7f ff e6 e5 call 2008374 <rtems_semaphore_delete> <== NOT EXECUTED
200e7e4: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
200e7e8: c0 2e e0 88 clrb [ %i3 + 0x88 ] <== NOT EXECUTED
200e7ec: 81 c7 e0 08 ret <== NOT EXECUTED
200e7f0: 81 e8 00 00 restore <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
200e7f4: 7f ff e7 d6 call 200874c <rtems_task_delete> <== NOT EXECUTED
200e7f8: 01 00 00 00 nop <== NOT EXECUTED
200e7fc: 30 bf ff de b,a 200e774 <rtems_bdbuf_init+0x174> <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e800: 92 10 20 00 clr %o1 ! 0 <PROM_START>
200e804: 7f ff e7 13 call 2008450 <rtems_semaphore_obtain>
200e808: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e80c: 80 a2 20 00 cmp %o0, 0
200e810: 12 80 00 78 bne 200e9f0 <rtems_bdbuf_init+0x3f0> <== NEVER TAKEN
200e814: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
goto error;
rtems_bdbuf_lock_cache ();
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
200e818: 90 17 63 73 or %i5, 0x373, %o0
200e81c: 94 10 20 54 mov 0x54, %o2
200e820: 96 10 20 00 clr %o3
200e824: 7f ff e6 64 call 20081b4 <rtems_semaphore_create>
200e828: 98 06 e0 2c add %i3, 0x2c, %o4
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
200e82c: 80 a2 20 00 cmp %o0, 0
200e830: 12 bf ff ce bne 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200e834: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
200e838: 90 17 63 61 or %i5, 0x361, %o0
200e83c: 92 10 20 00 clr %o1
200e840: 94 10 20 24 mov 0x24, %o2
200e844: 96 10 20 00 clr %o3
200e848: 7f ff e6 5b call 20081b4 <rtems_semaphore_create>
200e84c: 98 06 e0 6c add %i3, 0x6c, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200e850: 80 a2 20 00 cmp %o0, 0
200e854: 12 bf ff c5 bne 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200e858: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
200e85c: 90 17 63 74 or %i5, 0x374, %o0
200e860: 92 10 20 00 clr %o1
200e864: 94 10 20 24 mov 0x24, %o2
200e868: 96 10 20 00 clr %o3
200e86c: 7f ff e6 52 call 20081b4 <rtems_semaphore_create>
200e870: 98 06 e0 74 add %i3, 0x74, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200e874: 80 a2 20 00 cmp %o0, 0
200e878: 12 bf ff bc bne 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200e87c: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
200e880: 92 10 20 00 clr %o1
200e884: 11 10 91 10 sethi %hi(0x42444000), %o0
200e888: 94 10 20 24 mov 0x24, %o2
200e88c: 90 12 23 62 or %o0, 0x362, %o0
200e890: 96 10 20 00 clr %o3
200e894: 19 00 80 8e sethi %hi(0x2023800), %o4
200e898: 7f ff e6 47 call 20081b4 <rtems_semaphore_create>
200e89c: 98 13 21 84 or %o4, 0x184, %o4 ! 2023984 <bdbuf_cache+0x7c>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200e8a0: 80 a2 20 00 cmp %o0, 0
200e8a4: 32 bf ff b1 bne,a 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200e8a8: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0 <== NOT EXECUTED
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
200e8ac: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
200e8b0: 40 00 40 70 call 201ea70 <.udiv>
200e8b4: 92 10 00 10 mov %l0, %o1
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
200e8b8: 92 10 00 10 mov %l0, %o1
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
200e8bc: ba 10 00 08 mov %o0, %i5
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
200e8c0: d0 26 e0 1c st %o0, [ %i3 + 0x1c ]
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
200e8c4: 40 00 40 6b call 201ea70 <.udiv>
200e8c8: 90 10 00 1c mov %i4, %o0
200e8cc: 82 10 00 08 mov %o0, %g1
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
200e8d0: 90 10 00 1d mov %i5, %o0
200e8d4: 92 10 00 01 mov %g1, %o1
200e8d8: 40 00 40 66 call 201ea70 <.udiv>
200e8dc: c2 26 e0 20 st %g1, [ %i3 + 0x20 ]
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
200e8e0: 92 10 00 1d mov %i5, %o1
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
200e8e4: d0 26 e0 80 st %o0, [ %i3 + 0x80 ]
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
200e8e8: b8 10 00 08 mov %o0, %i4
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
200e8ec: 7f ff d5 7c call 2003edc <calloc>
200e8f0: 90 10 20 40 mov 0x40, %o0
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
200e8f4: 80 a2 20 00 cmp %o0, 0
200e8f8: 02 bf ff 9b be 200e764 <rtems_bdbuf_init+0x164> <== NEVER TAKEN
200e8fc: d0 26 e0 14 st %o0, [ %i3 + 0x14 ]
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
200e900: 90 10 20 14 mov 0x14, %o0
200e904: 7f ff d5 76 call 2003edc <calloc>
200e908: 92 10 00 1c mov %i4, %o1
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
200e90c: 80 a2 20 00 cmp %o0, 0
200e910: 02 bf ff 95 be 200e764 <rtems_bdbuf_init+0x164> <== NEVER TAKEN
200e914: d0 26 e0 84 st %o0, [ %i3 + 0x84 ]
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
cache_aligment,
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
200e918: 92 10 00 10 mov %l0, %o1
200e91c: 40 00 40 1b call 201e988 <.umul>
200e920: 90 10 00 1d mov %i5, %o0
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
200e924: 92 10 20 20 mov 0x20, %o1
cache_aligment,
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
200e928: 94 10 00 08 mov %o0, %o2
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
200e92c: 40 00 0c 79 call 2011b10 <rtems_memalign>
200e930: 90 06 e0 18 add %i3, 0x18, %o0
200e934: 80 a2 20 00 cmp %o0, 0
200e938: 12 bf ff 8c bne 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200e93c: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
200e940: e8 06 e0 84 ld [ %i3 + 0x84 ], %l4
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
200e944: f0 06 e0 14 ld [ %i3 + 0x14 ], %i0
200e948: e6 06 e0 18 ld [ %i3 + 0x18 ], %l3
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200e94c: 39 3f ff ff sethi %hi(0xfffffc00), %i4
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
200e950: a4 10 20 00 clr %l2
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200e954: b8 17 23 ff or %i4, 0x3ff, %i4
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
200e958: a2 10 00 1b mov %i3, %l1
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200e95c: ba 10 00 1c mov %i4, %i5
200e960: ac 06 e0 44 add %i3, 0x44, %l6
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
200e964: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
200e968: 80 a4 80 01 cmp %l2, %g1
200e96c: 1a 80 00 13 bcc 200e9b8 <rtems_bdbuf_init+0x3b8>
200e970: 90 10 00 16 mov %l6, %o0
200e974: 92 10 00 18 mov %i0, %o1
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
200e978: f8 3e 20 18 std %i4, [ %i0 + 0x18 ]
bd->group = group;
200e97c: e8 26 20 30 st %l4, [ %i0 + 0x30 ]
200e980: 7f ff e9 d2 call 20090c8 <_Chain_Append>
200e984: e6 26 20 24 st %l3, [ %i0 + 0x24 ]
bd->buffer = buffer;
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
200e988: ea 04 60 20 ld [ %l1 + 0x20 ], %l5
200e98c: 90 10 00 12 mov %l2, %o0
200e990: 92 10 00 15 mov %l5, %o1
200e994: 40 00 40 e3 call 201ed20 <.urem>
200e998: aa 05 7f ff add %l5, -1, %l5
200e99c: 80 a2 00 15 cmp %o0, %l5
200e9a0: 22 80 00 02 be,a 200e9a8 <rtems_bdbuf_init+0x3a8>
200e9a4: a8 05 20 14 add %l4, 0x14, %l4
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
200e9a8: a4 04 a0 01 inc %l2
200e9ac: b0 06 20 40 add %i0, 0x40, %i0
200e9b0: 10 bf ff ed b 200e964 <rtems_bdbuf_init+0x364>
200e9b4: a6 04 c0 10 add %l3, %l0, %l3
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
200e9b8: c8 04 60 20 ld [ %l1 + 0x20 ], %g4
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
200e9bc: c2 04 60 84 ld [ %l1 + 0x84 ], %g1
bd = bdbuf_cache.bds;
200e9c0: c6 04 60 14 ld [ %l1 + 0x14 ], %g3
b < bdbuf_cache.group_count;
200e9c4: f8 04 60 80 ld [ %l1 + 0x80 ], %i4
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
200e9c8: bb 29 20 06 sll %g4, 6, %i5
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
200e9cc: 84 10 20 00 clr %g2
200e9d0: 80 a0 80 1c cmp %g2, %i4
200e9d4: 02 80 00 0a be 200e9fc <rtems_bdbuf_init+0x3fc>
200e9d8: 84 00 a0 01 inc %g2
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
200e9dc: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
200e9e0: c8 20 60 08 st %g4, [ %g1 + 8 ]
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
200e9e4: 82 00 60 14 add %g1, 0x14, %g1
bd += bdbuf_cache.max_bds_per_group)
200e9e8: 10 bf ff fa b 200e9d0 <rtems_bdbuf_init+0x3d0>
200e9ec: 86 00 c0 1d add %g3, %i5, %g3
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200e9f0: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e9f4: 7f ff e8 43 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e9f8: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
200e9fc: d2 06 60 08 ld [ %i1 + 8 ], %o1
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
200ea00: 82 10 20 01 mov 1, %g1
200ea04: c2 2e e0 04 stb %g1, [ %i3 + 4 ]
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
200ea08: 80 a2 60 00 cmp %o1, 0
200ea0c: 22 80 00 02 be,a 200ea14 <rtems_bdbuf_init+0x414> <== NEVER TAKEN
200ea10: 92 10 20 0f mov 0xf, %o1 <== NOT EXECUTED
200ea14: 11 10 94 d5 sethi %hi(0x42535400), %o0
200ea18: 15 00 00 08 sethi %hi(0x2000), %o2
200ea1c: 90 12 23 50 or %o0, 0x350, %o0
200ea20: 96 10 24 00 mov 0x400, %o3
200ea24: 98 10 20 00 clr %o4
200ea28: 7f ff e6 ff call 2008624 <rtems_task_create>
200ea2c: 9a 16 a1 08 or %i2, 0x108, %o5
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
200ea30: 80 a2 20 00 cmp %o0, 0
200ea34: 12 bf ff 4d bne 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200ea38: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
200ea3c: 03 00 80 8e sethi %hi(0x2023800), %g1
200ea40: d0 00 61 08 ld [ %g1 + 0x108 ], %o0 ! 2023908 <bdbuf_cache>
200ea44: 94 10 00 1b mov %i3, %o2
200ea48: 13 00 80 37 sethi %hi(0x200dc00), %o1
200ea4c: 7f ff e7 82 call 2008854 <rtems_task_start>
200ea50: 92 12 63 e0 or %o1, 0x3e0, %o1 ! 200dfe0 <rtems_bdbuf_swapout_task>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
200ea54: 80 a2 20 00 cmp %o0, 0
200ea58: 12 bf ff 44 bne 200e768 <rtems_bdbuf_init+0x168> <== NEVER TAKEN
200ea5c: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200ea60: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
200ea64: 7f ff e6 c5 call 2008578 <rtems_semaphore_release>
200ea68: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
200ea6c: 80 a2 20 00 cmp %o0, 0
200ea70: 02 bf ff 54 be 200e7c0 <rtems_bdbuf_init+0x1c0> <== ALWAYS TAKEN
200ea74: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (fatal_error_code);
200ea78: 7f ff e8 22 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200ea7c: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
200ea80: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200ea84: 7f ff e8 1f call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200ea88: 90 12 20 0f or %o0, 0xf, %o0 ! 4200000f <RAM_END+0x3fc0000f><== NOT EXECUTED
0200c958 <rtems_bdbuf_obtain_disk.part.6>:
return bd;
}
static rtems_status_code
rtems_bdbuf_obtain_disk (dev_t dev,
200c958: 9d e3 bf a0 save %sp, -96, %sp
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
200c95c: 90 10 00 18 mov %i0, %o0
200c960: 92 10 00 19 mov %i1, %o1
200c964: 7f ff da 18 call 20031c4 <rtems_disk_obtain>
200c968: b0 10 20 04 mov 4, %i0
if (dd == NULL)
200c96c: 80 a2 20 00 cmp %o0, 0
200c970: 02 80 00 34 be 200ca40 <rtems_bdbuf_obtain_disk.part.6+0xe8><== NEVER TAKEN
200c974: b2 10 00 08 mov %o0, %i1
return RTEMS_INVALID_ID;
*dd_ptr = dd;
if (media_block_ptr != NULL)
200c978: 80 a7 20 00 cmp %i4, 0
200c97c: 02 80 00 11 be 200c9c0 <rtems_bdbuf_obtain_disk.part.6+0x68>
200c980: d0 26 c0 00 st %o0, [ %i3 ]
rtems_bdbuf_media_block (rtems_blkdev_bnum block,
size_t block_size,
size_t media_block_size)
{
return (rtems_blkdev_bnum)
((((uint64_t) block) * block_size) / media_block_size);
200c984: d6 02 20 20 ld [ %o0 + 0x20 ], %o3
200c988: 94 10 20 00 clr %o2
200c98c: 90 10 20 00 clr %o0
200c990: 40 00 49 90 call 201efd0 <__muldi3>
200c994: 92 10 00 1a mov %i2, %o1
200c998: d6 06 60 24 ld [ %i1 + 0x24 ], %o3
200c99c: 40 00 4b 99 call 201f800 <__udivdi3>
200c9a0: 94 10 20 00 clr %o2
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
200c9a4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
200c9a8: 80 a2 40 01 cmp %o1, %g1
200c9ac: 1a 80 00 23 bcc 200ca38 <rtems_bdbuf_obtain_disk.part.6+0xe0><== NEVER TAKEN
200c9b0: 90 10 00 19 mov %i1, %o0
{
rtems_disk_release(dd);
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
200c9b4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200c9b8: 92 02 40 01 add %o1, %g1, %o1
200c9bc: d2 27 00 00 st %o1, [ %i4 ]
}
if (bds_per_group_ptr != NULL)
200c9c0: 80 a7 60 00 cmp %i5, 0
200c9c4: 02 80 00 1f be 200ca40 <rtems_bdbuf_obtain_disk.part.6+0xe8>
200c9c8: b0 10 20 00 clr %i0
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
200c9cc: d0 06 60 20 ld [ %i1 + 0x20 ], %o0
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
200c9d0: 03 00 80 83 sethi %hi(0x2020c00), %g1
200c9d4: 82 10 63 68 or %g1, 0x368, %g1 ! 2020f68 <rtems_bdbuf_configuration>
200c9d8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200c9dc: 80 a2 00 02 cmp %o0, %g2
200c9e0: 38 80 00 16 bgu,a 200ca38 <rtems_bdbuf_obtain_disk.part.6+0xe0><== NEVER TAKEN
200c9e4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
200c9e8: d2 00 60 20 ld [ %g1 + 0x20 ], %o1
200c9ec: 40 00 48 21 call 201ea70 <.udiv>
200c9f0: 90 02 3f ff add %o0, -1, %o0
200c9f4: 90 02 20 01 inc %o0
for (bds_per_size = 1;
200c9f8: 80 a2 20 01 cmp %o0, 1
200c9fc: 08 80 00 06 bleu 200ca14 <rtems_bdbuf_obtain_disk.part.6+0xbc>
200ca00: 92 10 20 01 mov 1, %o1
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
200ca04: 93 2a 60 01 sll %o1, 1, %o1
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
200ca08: 80 a2 00 09 cmp %o0, %o1
200ca0c: 38 bf ff ff bgu,a 200ca08 <rtems_bdbuf_obtain_disk.part.6+0xb0><== NEVER TAKEN
200ca10: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
200ca14: 03 00 80 8e sethi %hi(0x2023800), %g1
200ca18: 40 00 48 16 call 201ea70 <.udiv>
200ca1c: d0 00 61 28 ld [ %g1 + 0x128 ], %o0 ! 2023928 <bdbuf_cache+0x20>
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
200ca20: 80 a2 20 00 cmp %o0, 0
200ca24: 22 80 00 05 be,a 200ca38 <rtems_bdbuf_obtain_disk.part.6+0xe0><== NEVER TAKEN
200ca28: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
rtems_disk_release (dd);
return RTEMS_INVALID_NUMBER;
}
*bds_per_group_ptr = bds_per_group;
200ca2c: d0 27 40 00 st %o0, [ %i5 ]
}
return RTEMS_SUCCESSFUL;
}
200ca30: 81 c7 e0 08 ret
200ca34: 91 e8 20 00 restore %g0, 0, %o0
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
{
rtems_disk_release (dd);
200ca38: 7f ff da 4b call 2003364 <rtems_disk_release> <== NOT EXECUTED
200ca3c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
200ca40: 81 c7 e0 08 ret
200ca44: 81 e8 00 00 restore
0200d3c0 <rtems_bdbuf_purge>:
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
200d3c0: 9d e3 bf 10 save %sp, -240, %sp
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200d3c4: 21 00 80 8e sethi %hi(0x2023800), %l0
200d3c8: a0 14 21 08 or %l0, 0x108, %l0 ! 2023908 <bdbuf_cache>
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200d3cc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200d3d0: 82 07 bf f8 add %fp, -8, %g1
200d3d4: b6 07 bf f4 add %fp, -12, %i3
head->previous = NULL;
200d3d8: c0 27 bf f8 clr [ %fp + -8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200d3dc: c2 27 bf f4 st %g1, [ %fp + -12 ]
head->previous = NULL;
tail->previous = head;
200d3e0: f6 27 bf fc st %i3, [ %fp + -4 ]
200d3e4: 92 10 20 00 clr %o1
200d3e8: 94 10 20 00 clr %o2
200d3ec: 7f ff ec 19 call 2008450 <rtems_semaphore_obtain>
200d3f0: b8 10 00 19 mov %i1, %i4
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200d3f4: 80 a2 20 00 cmp %o0, 0
200d3f8: 12 80 00 93 bne 200d644 <rtems_bdbuf_purge+0x284> <== NEVER TAKEN
200d3fc: ba 10 00 1a mov %i2, %i5
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
200d400: f4 04 20 40 ld [ %l0 + 0x40 ], %i2
*prev = NULL;
200d404: c0 27 bf 74 clr [ %fp + -140 ]
rtems_bdbuf_gather_for_purge (rtems_chain_control *purge_list,
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
200d408: b2 07 bf 74 add %fp, -140, %i1
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
{
switch (cur->state)
200d40c: 23 00 80 31 sethi %hi(0x200c400), %l1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d410: a6 10 20 06 mov 6, %l3
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200d414: 80 a6 a0 00 cmp %i2, 0
200d418: 02 80 00 49 be 200d53c <rtems_bdbuf_purge+0x17c> <== NEVER TAKEN
200d41c: a4 10 20 0a mov 0xa, %l2
{
if ((*compare) (cur->dev, dev))
200d420: d0 1e a0 18 ldd [ %i2 + 0x18 ], %o0
200d424: 94 10 00 1c mov %i4, %o2
200d428: 9f c6 00 00 call %i0
200d42c: 96 10 00 1d mov %i5, %o3
200d430: 80 8a 20 ff btst 0xff, %o0
200d434: 22 80 00 0b be,a 200d460 <rtems_bdbuf_purge+0xa0> <== NEVER TAKEN
200d438: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
{
switch (cur->state)
200d43c: c2 06 a0 28 ld [ %i2 + 0x28 ], %g1
200d440: 80 a0 60 0a cmp %g1, 0xa
200d444: 08 80 00 0e bleu 200d47c <rtems_bdbuf_purge+0xbc> <== ALWAYS TAKEN
200d448: 84 14 62 ac or %l1, 0x2ac, %g2
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
200d44c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d450: 7f ff ed ac call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d454: 90 12 20 01 or %o0, 1, %o0 ! 42000001 <RAM_END+0x3fc00001><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d458: e4 26 a0 28 st %l2, [ %i2 + 0x28 ]
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200d45c: c2 06 a0 08 ld [ %i2 + 8 ], %g1
200d460: 80 a0 60 00 cmp %g1, 0
200d464: 22 80 00 21 be,a 200d4e8 <rtems_bdbuf_purge+0x128> <== ALWAYS TAKEN
200d468: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
*prev = cur;
200d46c: f4 26 60 04 st %i2, [ %i1 + 4 ] <== NOT EXECUTED
200d470: b4 10 00 01 mov %g1, %i2 <== NOT EXECUTED
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
200d474: 10 bf ff eb b 200d420 <rtems_bdbuf_purge+0x60> <== NOT EXECUTED
200d478: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
{
switch (cur->state)
200d47c: 83 28 60 02 sll %g1, 2, %g1
200d480: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200d484: 81 c0 40 00 jmp %g1
200d488: 01 00 00 00 nop
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200d48c: c2 04 20 70 ld [ %l0 + 0x70 ], %g1
200d490: 80 a0 60 00 cmp %g1, 0
200d494: 22 80 00 08 be,a 200d4b4 <rtems_bdbuf_purge+0xf4> <== NEVER TAKEN
200d498: c2 06 a0 30 ld [ %i2 + 0x30 ], %g1 <== NOT EXECUTED
{
sc = rtems_semaphore_flush (waiters->sema);
200d49c: 40 00 14 44 call 20125ac <rtems_semaphore_flush>
200d4a0: d0 04 20 74 ld [ %l0 + 0x74 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d4a4: 80 a2 20 00 cmp %o0, 0
200d4a8: 12 80 00 5a bne 200d610 <rtems_bdbuf_purge+0x250> <== NEVER TAKEN
200d4ac: 11 10 80 00 sethi %hi(0x42000000), %o0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200d4b0: c2 06 a0 30 ld [ %i2 + 0x30 ], %g1
200d4b4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200d4b8: 84 00 bf ff add %g2, -1, %g2
200d4bc: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200d4c0: 7f ff ef 0d call 20090f4 <_Chain_Extract>
200d4c4: 90 10 00 1a mov %i2, %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200d4c8: 90 10 00 1b mov %i3, %o0
200d4cc: 7f ff ee ff call 20090c8 <_Chain_Append>
200d4d0: 92 10 00 1a mov %i2, %o1
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200d4d4: c2 06 a0 08 ld [ %i2 + 8 ], %g1
200d4d8: 80 a0 60 00 cmp %g1, 0
200d4dc: 32 bf ff e5 bne,a 200d470 <rtems_bdbuf_purge+0xb0> <== NEVER TAKEN
200d4e0: f4 26 60 04 st %i2, [ %i1 + 4 ] <== NOT EXECUTED
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
200d4e4: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
200d4e8: 80 a0 60 00 cmp %g1, 0
200d4ec: 32 bf ff e1 bne,a 200d470 <rtems_bdbuf_purge+0xb0> <== NEVER TAKEN
200d4f0: f4 26 60 04 st %i2, [ %i1 + 4 ] <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
200d4f4: c6 06 40 00 ld [ %i1 ], %g3
200d4f8: 80 a0 e0 00 cmp %g3, 0
200d4fc: 22 80 00 11 be,a 200d540 <rtems_bdbuf_purge+0x180> <== ALWAYS TAKEN
200d500: 33 00 80 8e sethi %hi(0x2023800), %i1
200d504: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 <== NOT EXECUTED
200d508: 80 a6 80 02 cmp %i2, %g2 <== NOT EXECUTED
200d50c: 22 80 00 09 be,a 200d530 <rtems_bdbuf_purge+0x170> <== NOT EXECUTED
200d510: c2 06 7f fc ld [ %i1 + -4 ], %g1 <== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200d514: 10 80 00 42 b 200d61c <rtems_bdbuf_purge+0x25c> <== NOT EXECUTED
200d518: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
200d51c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
200d520: 12 80 00 3e bne 200d618 <rtems_bdbuf_purge+0x258> <== NOT EXECUTED
200d524: b2 06 7f fc add %i1, -4, %i1 <== NOT EXECUTED
200d528: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
200d52c: c2 06 7f fc ld [ %i1 + -4 ], %g1 <== NOT EXECUTED
200d530: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d534: 32 bf ff fa bne,a 200d51c <rtems_bdbuf_purge+0x15c> <== NOT EXECUTED
200d538: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200d53c: 33 00 80 8e sethi %hi(0x2023800), %i1 <== NOT EXECUTED
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
wake_buffer_waiters = true;
200d540: b4 10 20 00 clr %i2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d544: b8 10 20 01 mov 1, %i4
200d548: b2 16 61 4c or %i1, 0x14c, %i1
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200d54c: 7f ff ee f3 call 2009118 <_Chain_Get>
200d550: 90 10 00 1b mov %i3, %o0
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
200d554: b0 92 20 00 orcc %o0, 0, %i0
200d558: 02 80 00 19 be 200d5bc <rtems_bdbuf_purge+0x1fc>
200d55c: 80 8e a0 ff btst 0xff, %i2
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
200d560: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200d564: 80 a0 60 00 cmp %g1, 0
200d568: 22 80 00 02 be,a 200d570 <rtems_bdbuf_purge+0x1b0>
200d56c: b4 10 20 01 mov 1, %i2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d570: f8 26 20 28 st %i4, [ %i0 + 0x28 ]
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200d574: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200d578: 80 a0 60 00 cmp %g1, 0
200d57c: 12 bf ff f4 bne 200d54c <rtems_bdbuf_purge+0x18c>
200d580: 01 00 00 00 nop
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200d584: 7f ff fd 31 call 200ca48 <rtems_bdbuf_avl_remove.constprop.7>
200d588: 90 10 00 18 mov %i0, %o0
200d58c: 80 a2 20 00 cmp %o0, 0
200d590: 12 80 00 27 bne 200d62c <rtems_bdbuf_purge+0x26c> <== NEVER TAKEN
200d594: 01 00 00 00 nop
200d598: 92 10 00 18 mov %i0, %o1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d59c: c0 26 20 28 clr [ %i0 + 0x28 ]
200d5a0: 40 00 15 71 call 2012b64 <_Chain_Insert>
200d5a4: 90 10 00 19 mov %i1, %o0
200d5a8: 7f ff ee dc call 2009118 <_Chain_Get>
200d5ac: 90 10 00 1b mov %i3, %o0
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
200d5b0: b0 92 20 00 orcc %o0, 0, %i0
200d5b4: 12 bf ff eb bne 200d560 <rtems_bdbuf_purge+0x1a0> <== NEVER TAKEN
200d5b8: 80 8e a0 ff btst 0xff, %i2
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
200d5bc: 12 80 00 0c bne 200d5ec <rtems_bdbuf_purge+0x22c>
200d5c0: 01 00 00 00 nop
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200d5c4: 7f ff eb ed call 2008578 <rtems_semaphore_release>
200d5c8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d5cc: 80 a2 20 00 cmp %o0, 0
200d5d0: 12 80 00 1b bne 200d63c <rtems_bdbuf_purge+0x27c> <== NEVER TAKEN
200d5d4: 11 10 80 00 sethi %hi(0x42000000), %o0
200d5d8: 81 c7 e0 08 ret
200d5dc: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d5e0: e6 26 a0 28 st %l3, [ %i2 + 0x28 ]
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200d5e4: 10 bf ff 9f b 200d460 <rtems_bdbuf_purge+0xa0>
200d5e8: c2 06 a0 08 ld [ %i2 + 8 ], %g1
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200d5ec: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
200d5f0: 80 a0 60 00 cmp %g1, 0
200d5f4: 02 bf ff f4 be 200d5c4 <rtems_bdbuf_purge+0x204> <== ALWAYS TAKEN
200d5f8: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
200d5fc: 40 00 13 ec call 20125ac <rtems_semaphore_flush> <== NOT EXECUTED
200d600: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200d604: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d608: 02 bf ff ef be 200d5c4 <rtems_bdbuf_purge+0x204> <== NOT EXECUTED
200d60c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200d610: 7f ff ed 3c call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d614: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200d618: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200d61c: 22 bf ff c9 be,a 200d540 <rtems_bdbuf_purge+0x180> <== NOT EXECUTED
200d620: 33 00 80 8e sethi %hi(0x2023800), %i1 <== NOT EXECUTED
200d624: 10 bf ff 7f b 200d420 <rtems_bdbuf_purge+0x60> <== NOT EXECUTED
200d628: b4 10 00 02 mov %g2, %i2 <== NOT EXECUTED
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200d62c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200d630: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200d634: 7f ff fc 4b call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200d638: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200d63c: 7f ff ed 31 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d640: 90 12 20 0e or %o0, 0xe, %o0 <== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200d644: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d648: 7f ff ed 2e call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d64c: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
0200c750 <rtems_bdbuf_purge_compare_major>:
}
static bool
rtems_bdbuf_purge_compare_major (dev_t a, dev_t b)
{
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
200c750: 94 1a 00 0a xor %o0, %o2, %o2 <== NOT EXECUTED
}
200c754: 80 a0 00 0a cmp %g0, %o2 <== NOT EXECUTED
200c758: 81 c3 e0 08 retl <== NOT EXECUTED
200c75c: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
0200f4a8 <rtems_bdbuf_purge_major>:
void
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
200f4a8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200f4ac: 94 10 20 00 clr %o2 <== NOT EXECUTED
200f4b0: 11 00 80 31 sethi %hi(0x200c400), %o0 <== NOT EXECUTED
200f4b4: 90 12 23 50 or %o0, 0x350, %o0 ! 200c750 <rtems_bdbuf_purge_compare_major><== NOT EXECUTED
200f4b8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200f4bc: 7f ff f7 c1 call 200d3c0 <rtems_bdbuf_purge> <== NOT EXECUTED
200f4c0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200ebac <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200ebac: 9d e3 bf 88 save %sp, -120, %sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200ebb0: 3b 00 80 8e sethi %hi(0x2023800), %i5
200ebb4: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
200ebb8: c2 0f 60 88 ldub [ %i5 + 0x88 ], %g1
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
200ebbc: c0 27 bf f4 clr [ %fp + -12 ]
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
200ebc0: c0 27 bf f8 clr [ %fp + -8 ]
size_t bds_per_group = 0;
200ebc4: c0 27 bf fc clr [ %fp + -4 ]
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200ebc8: 84 10 00 18 mov %i0, %g2
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200ebcc: 80 a0 60 00 cmp %g1, 0
200ebd0: 12 80 00 04 bne 200ebe0 <rtems_bdbuf_read+0x34> <== ALWAYS TAKEN
200ebd4: b0 10 20 16 mov 0x16, %i0
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
return sc;
}
200ebd8: 81 c7 e0 08 ret
200ebdc: 81 e8 00 00 restore
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200ebe0: 90 10 00 02 mov %g2, %o0
200ebe4: 92 10 00 19 mov %i1, %o1
200ebe8: 94 10 00 1a mov %i2, %o2
200ebec: 96 07 bf f4 add %fp, -12, %o3
200ebf0: 98 07 bf f8 add %fp, -8, %o4
200ebf4: 7f ff f7 59 call 200c958 <rtems_bdbuf_obtain_disk.part.6>
200ebf8: 9a 07 bf fc add %fp, -4, %o5
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
200ebfc: b0 92 20 00 orcc %o0, 0, %i0
200ec00: 12 bf ff f6 bne 200ebd8 <rtems_bdbuf_read+0x2c> <== NEVER TAKEN
200ec04: 03 00 80 83 sethi %hi(0x2020c00), %g1
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
200ec08: e8 00 63 68 ld [ %g1 + 0x368 ], %l4 ! 2020f68 <rtems_bdbuf_configuration>
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200ec0c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
200ec10: a8 05 20 01 inc %l4
200ec14: 83 2d 20 04 sll %l4, 4, %g1
200ec18: 82 00 60 20 add %g1, 0x20, %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200ec1c: 92 10 20 00 clr %o1
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
200ec20: 9c 23 80 01 sub %sp, %g1, %sp
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200ec24: 94 10 20 00 clr %o2
200ec28: 7f ff e6 0a call 2008450 <rtems_semaphore_obtain>
200ec2c: a0 03 a0 60 add %sp, 0x60, %l0
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200ec30: 80 a2 20 00 cmp %o0, 0
200ec34: 12 80 00 a2 bne 200eebc <rtems_bdbuf_read+0x310> <== NEVER TAKEN
200ec38: e2 07 bf f4 ld [ %fp + -12 ], %l1
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
200ec3c: f4 07 bf f8 ld [ %fp + -8 ], %i2
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200ec40: e6 04 60 20 ld [ %l1 + 0x20 ], %l3
200ec44: d2 04 60 24 ld [ %l1 + 0x24 ], %o1
200ec48: 40 00 3f 8a call 201ea70 <.udiv>
200ec4c: 90 10 00 13 mov %l3, %o0
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
200ec50: 03 00 80 32 sethi %hi(0x200c800), %g1
200ec54: 82 10 61 3c or %g1, 0x13c, %g1 ! 200c93c <rtems_bdbuf_transfer_done>
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
dev_t dev = dd->dev;
200ec58: f8 04 40 00 ld [ %l1 ], %i4
200ec5c: f2 04 60 04 ld [ %l1 + 4 ], %i1
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
200ec60: ec 1c 60 18 ldd [ %l1 + 0x18 ], %l6
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
200ec64: ea 07 bf fc ld [ %fp + -4 ], %l5
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
200ec68: c2 24 20 04 st %g1, [ %l0 + 4 ]
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200ec6c: a4 10 00 08 mov %o0, %l2
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
200ec70: c0 24 00 00 clr [ %l0 ]
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
200ec74: 40 00 0e e7 call 2012810 <rtems_task_self>
200ec78: e0 24 20 08 st %l0, [ %l0 + 8 ]
req->status = RTEMS_RESOURCE_IN_USE;
200ec7c: 82 10 20 0c mov 0xc, %g1
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
200ec80: d0 24 20 14 st %o0, [ %l0 + 0x14 ]
req->status = RTEMS_RESOURCE_IN_USE;
200ec84: c2 24 20 0c st %g1, [ %l0 + 0xc ]
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
200ec88: 92 10 00 19 mov %i1, %o1
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
200ec8c: c0 24 20 10 clr [ %l0 + 0x10 ]
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
200ec90: 90 10 00 1c mov %i4, %o0
200ec94: 94 10 00 1a mov %i2, %o2
200ec98: 7f ff fb f7 call 200dc74 <rtems_bdbuf_get_buffer_for_access>
200ec9c: 96 10 00 15 mov %l5, %o3
*bd_ptr = bd;
req->bufs [0].user = bd;
200eca0: d0 24 20 24 st %o0, [ %l0 + 0x24 ]
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
200eca4: c4 02 20 24 ld [ %o0 + 0x24 ], %g2
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200eca8: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
200ecac: f4 24 20 18 st %i2, [ %l0 + 0x18 ]
req->bufs [0].length = block_size;
200ecb0: e6 24 20 1c st %l3, [ %l0 + 0x1c ]
req->bufs [0].buffer = bd->buffer;
200ecb4: c4 24 20 20 st %g2, [ %l0 + 0x20 ]
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200ecb8: 80 a0 60 02 cmp %g1, 2
200ecbc: 02 80 00 0b be 200ece8 <rtems_bdbuf_read+0x13c>
200ecc0: a2 10 00 08 mov %o0, %l1
200ecc4: 80 a0 60 07 cmp %g1, 7
200ecc8: 02 80 00 08 be 200ece8 <rtems_bdbuf_read+0x13c>
200eccc: 80 a0 60 01 cmp %g1, 1
200ecd0: 22 80 00 14 be,a 200ed20 <rtems_bdbuf_read+0x174> <== ALWAYS TAKEN
200ecd4: ae 05 c0 16 add %l7, %l6, %l7
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
200ecd8: d0 02 20 28 ld [ %o0 + 0x28 ], %o0 <== NOT EXECUTED
200ecdc: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ece0: 7f ff f6 a0 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200ece4: 92 12 60 1d or %o1, 0x1d, %o1 ! 4200001d <RAM_END+0x3fc0001d><== NOT EXECUTED
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200ece8: e8 04 20 10 ld [ %l0 + 0x10 ], %l4
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
200ecec: 80 a5 20 00 cmp %l4, 0
200ecf0: 12 80 00 4f bne 200ee2c <rtems_bdbuf_read+0x280>
200ecf4: d0 07 bf f4 ld [ %fp + -12 ], %o0
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
200ecf8: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
200ecfc: 80 a0 60 02 cmp %g1, 2
200ed00: 02 80 00 62 be 200ee88 <rtems_bdbuf_read+0x2dc>
200ed04: 80 a0 60 07 cmp %g1, 7
200ed08: 02 80 00 5d be 200ee7c <rtems_bdbuf_read+0x2d0> <== ALWAYS TAKEN
200ed0c: 82 10 20 04 mov 4, %g1
break;
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
200ed10: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED
200ed14: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ed18: 7f ff f6 92 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200ed1c: 92 12 60 02 or %o1, 2, %o1 ! 42000002 <RAM_END+0x3fc00002><== NOT EXECUTED
dev_t dev = dd->dev;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
200ed20: ae 25 c0 1a sub %l7, %i2, %l7
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200ed24: 80 a5 c0 14 cmp %l7, %l4
200ed28: 38 80 00 02 bgu,a 200ed30 <rtems_bdbuf_read+0x184>
200ed2c: ae 10 00 14 mov %l4, %l7
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ed30: 82 10 20 09 mov 9, %g1
200ed34: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
200ed38: ac 10 00 10 mov %l0, %l6
break;
}
while (transfer_index < transfer_count)
200ed3c: 80 a5 e0 01 cmp %l7, 1
200ed40: 08 80 00 28 bleu 200ede0 <rtems_bdbuf_read+0x234>
200ed44: a8 10 20 01 mov 1, %l4
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
200ed48: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200ed4c: 80 a0 a0 00 cmp %g2, 0
200ed50: 02 80 00 0d be 200ed84 <rtems_bdbuf_read+0x1d8> <== NEVER TAKEN
200ed54: b4 06 80 12 add %i2, %l2, %i2
200ed58: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3
200ed5c: 80 a7 00 03 cmp %i4, %g3
200ed60: 02 80 00 28 be 200ee00 <rtems_bdbuf_read+0x254> <== ALWAYS TAKEN
200ed64: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200ed68: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED
200ed6c: 08 80 00 1f bleu 200ede8 <rtems_bdbuf_read+0x23c> <== NOT EXECUTED
200ed70: 01 00 00 00 nop <== NOT EXECUTED
{
p = p->avl.right;
200ed74: c4 00 a0 0c ld [ %g2 + 0xc ], %g2 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200ed78: 80 a0 a0 00 cmp %g2, 0
200ed7c: 32 bf ff f8 bne,a 200ed5c <rtems_bdbuf_read+0x1b0> <== NEVER TAKEN
200ed80: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 <== NOT EXECUTED
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
200ed84: c2 27 bf ec st %g1, [ %fp + -20 ]
200ed88: 90 10 00 1c mov %i4, %o0
200ed8c: 92 10 00 19 mov %i1, %o1
200ed90: 94 10 00 1a mov %i2, %o2
200ed94: 7f ff f8 57 call 200cef0 <rtems_bdbuf_get_buffer_from_lru_list>
200ed98: 96 10 00 15 mov %l5, %o3
if (bd != NULL)
200ed9c: 80 a2 20 00 cmp %o0, 0
200eda0: 02 80 00 10 be 200ede0 <rtems_bdbuf_read+0x234> <== ALWAYS TAKEN
200eda4: c2 07 bf ec ld [ %fp + -20 ], %g1
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200eda8: c4 02 20 30 ld [ %o0 + 0x30 ], %g2 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
200edac: a8 05 20 01 inc %l4 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200edb0: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200edb4: 80 a5 00 17 cmp %l4, %l7 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200edb8: 86 00 e0 01 inc %g3 <== NOT EXECUTED
200edbc: c6 20 a0 0c st %g3, [ %g2 + 0xc ] <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200edc0: c2 22 20 28 st %g1, [ %o0 + 0x28 ] <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
200edc4: d0 25 a0 34 st %o0, [ %l6 + 0x34 ] <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
200edc8: f4 25 a0 28 st %i2, [ %l6 + 0x28 ] <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
200edcc: e6 25 a0 2c st %l3, [ %l6 + 0x2c ] <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
200edd0: c4 02 20 24 ld [ %o0 + 0x24 ], %g2 <== NOT EXECUTED
200edd4: c4 25 a0 30 st %g2, [ %l6 + 0x30 ] <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200edd8: 12 bf ff dc bne 200ed48 <rtems_bdbuf_read+0x19c> <== NOT EXECUTED
200eddc: ac 05 a0 10 add %l6, 0x10, %l6 <== NOT EXECUTED
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
200ede0: 10 bf ff c3 b 200ecec <rtems_bdbuf_read+0x140>
200ede4: e8 24 20 10 st %l4, [ %l0 + 0x10 ]
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200ede8: 12 80 00 04 bne 200edf8 <rtems_bdbuf_read+0x24c> <== NOT EXECUTED
200edec: 80 a6 40 04 cmp %i1, %g4 <== NOT EXECUTED
200edf0: 38 bf ff e2 bgu,a 200ed78 <rtems_bdbuf_read+0x1cc> <== NOT EXECUTED
200edf4: c4 00 a0 0c ld [ %g2 + 0xc ], %g2 <== NOT EXECUTED
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200edf8: 10 bf ff e0 b 200ed78 <rtems_bdbuf_read+0x1cc> <== NOT EXECUTED
200edfc: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
200ee00: 80 a6 40 04 cmp %i1, %g4
200ee04: 12 bf ff da bne 200ed6c <rtems_bdbuf_read+0x1c0> <== NEVER TAKEN
200ee08: 80 a7 00 03 cmp %i4, %g3
200ee0c: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3
200ee10: 80 a6 80 03 cmp %i2, %g3
200ee14: 22 bf ff b6 be,a 200ecec <rtems_bdbuf_read+0x140> <== NEVER TAKEN
200ee18: e8 24 20 10 st %l4, [ %l0 + 0x10 ] <== NOT EXECUTED
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
200ee1c: 38 bf ff d7 bgu,a 200ed78 <rtems_bdbuf_read+0x1cc> <== ALWAYS TAKEN
200ee20: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200ee24: 10 bf ff d5 b 200ed78 <rtems_bdbuf_read+0x1cc> <== NOT EXECUTED
200ee28: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
200ee2c: 92 10 00 10 mov %l0, %o1
200ee30: 7f ff fa 09 call 200d654 <rtems_bdbuf_execute_transfer_request>
200ee34: 94 10 20 01 mov 1, %o2
if (sc == RTEMS_SUCCESSFUL)
200ee38: 80 a2 20 00 cmp %o0, 0
200ee3c: 02 80 00 17 be 200ee98 <rtems_bdbuf_read+0x2ec>
200ee40: 01 00 00 00 nop
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
200ee44: c0 26 c0 00 clr [ %i3 ]
200ee48: b0 10 00 08 mov %o0, %i0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200ee4c: 7f ff e5 cb call 2008578 <rtems_semaphore_release>
200ee50: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200ee54: 80 a2 20 00 cmp %o0, 0
200ee58: 12 80 00 17 bne 200eeb4 <rtems_bdbuf_read+0x308> <== NEVER TAKEN
200ee5c: 11 10 80 00 sethi %hi(0x42000000), %o0
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
200ee60: 7f ff d1 41 call 2003364 <rtems_disk_release>
200ee64: d0 07 bf f4 ld [ %fp + -12 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200ee68: 80 a2 20 00 cmp %o0, 0
200ee6c: 02 bf ff 5b be 200ebd8 <rtems_bdbuf_read+0x2c> <== ALWAYS TAKEN
200ee70: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
200ee74: 7f ff e7 23 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200ee78: 90 12 20 1f or %o0, 0x1f, %o0 ! 4200001f <RAM_END+0x3fc0001f><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ee7c: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
200ee80: 10 bf ff f3 b 200ee4c <rtems_bdbuf_read+0x2a0>
200ee84: e2 26 c0 00 st %l1, [ %i3 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ee88: 82 10 20 03 mov 3, %g1
200ee8c: c2 24 60 28 st %g1, [ %l1 + 0x28 ]
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
200ee90: 10 bf ff ef b 200ee4c <rtems_bdbuf_read+0x2a0>
200ee94: e2 26 c0 00 st %l1, [ %i3 ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200ee98: 7f ff e8 97 call 20090f4 <_Chain_Extract>
200ee9c: 90 10 00 11 mov %l1, %o0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200eea0: c2 04 60 30 ld [ %l1 + 0x30 ], %g1
200eea4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200eea8: 84 00 a0 01 inc %g2
200eeac: 10 bf ff 93 b 200ecf8 <rtems_bdbuf_read+0x14c>
200eeb0: c4 20 60 0c st %g2, [ %g1 + 0xc ]
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200eeb4: 7f ff e7 13 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200eeb8: 90 12 20 0e or %o0, 0xe, %o0 <== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200eebc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200eec0: 7f ff e7 10 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200eec4: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
0200eecc <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
200eecc: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200eed0: 3b 00 80 8e sethi %hi(0x2023800), %i5
200eed4: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
200eed8: c4 0f 60 88 ldub [ %i5 + 0x88 ], %g2
200eedc: 80 a0 a0 00 cmp %g2, 0
200eee0: 02 80 00 1b be 200ef4c <rtems_bdbuf_release+0x80> <== NEVER TAKEN
200eee4: 82 10 20 16 mov 0x16, %g1
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200eee8: 80 a6 20 00 cmp %i0, 0
200eeec: 02 80 00 1a be 200ef54 <rtems_bdbuf_release+0x88> <== NEVER TAKEN
200eef0: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200eef4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200eef8: 7f ff e5 56 call 2008450 <rtems_semaphore_obtain>
200eefc: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200ef00: 80 a2 20 00 cmp %o0, 0
200ef04: 32 80 00 45 bne,a 200f018 <rtems_bdbuf_release+0x14c> <== NEVER TAKEN
200ef08: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200ef0c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200ef10: 80 a0 60 04 cmp %g1, 4
200ef14: 02 80 00 30 be 200efd4 <rtems_bdbuf_release+0x108>
200ef18: 01 00 00 00 nop
200ef1c: 08 80 00 11 bleu 200ef60 <rtems_bdbuf_release+0x94>
200ef20: 80 a0 60 03 cmp %g1, 3
200ef24: 80 a0 60 06 cmp %g1, 6
200ef28: 18 80 00 10 bgu 200ef68 <rtems_bdbuf_release+0x9c> <== NEVER TAKEN
200ef2c: 01 00 00 00 nop
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
rtems_bdbuf_add_to_lru_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
200ef30: 7f ff f7 b8 call 200ce10 <rtems_bdbuf_discard_buffer_after_access>
200ef34: 90 10 00 18 mov %i0, %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200ef38: 7f ff e5 90 call 2008578 <rtems_semaphore_release>
200ef3c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200ef40: 80 a2 20 00 cmp %o0, 0
200ef44: 12 80 00 32 bne 200f00c <rtems_bdbuf_release+0x140> <== NEVER TAKEN
200ef48: 82 10 20 00 clr %g1
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
200ef4c: 81 c7 e0 08 ret
200ef50: 91 e8 00 01 restore %g0, %g1, %o0
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
200ef54: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
200ef58: 81 c7 e0 08 ret <== NOT EXECUTED
200ef5c: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200ef60: 22 80 00 06 be,a 200ef78 <rtems_bdbuf_release+0xac> <== ALWAYS TAKEN
200ef64: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
200ef68: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200ef6c: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ef70: 7f ff f5 fc call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200ef74: 92 12 60 1c or %o1, 0x1c, %o1 ! 4200001c <RAM_END+0x3fc0001c><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200ef78: 90 07 60 44 add %i5, 0x44, %o0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200ef7c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200ef80: 92 10 00 18 mov %i0, %o1
200ef84: 84 00 bf ff add %g2, -1, %g2
200ef88: c4 20 60 0c st %g2, [ %g1 + 0xc ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ef8c: 82 10 20 02 mov 2, %g1
200ef90: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200ef94: 7f ff e8 4d call 20090c8 <_Chain_Append>
200ef98: 01 00 00 00 nop
rtems_bdbuf_add_to_lru_list_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
200ef9c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200efa0: 80 a0 60 00 cmp %g1, 0
200efa4: 02 80 00 0f be 200efe0 <rtems_bdbuf_release+0x114>
200efa8: 01 00 00 00 nop
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200efac: c2 07 60 68 ld [ %i5 + 0x68 ], %g1
200efb0: 80 a0 60 00 cmp %g1, 0
200efb4: 02 bf ff e1 be 200ef38 <rtems_bdbuf_release+0x6c>
200efb8: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
200efbc: 40 00 0d 7c call 20125ac <rtems_semaphore_flush>
200efc0: d0 07 60 6c ld [ %i5 + 0x6c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200efc4: 80 a2 20 00 cmp %o0, 0
200efc8: 02 bf ff dc be 200ef38 <rtems_bdbuf_release+0x6c> <== ALWAYS TAKEN
200efcc: 11 10 80 00 sethi %hi(0x42000000), %o0
200efd0: 30 80 00 0d b,a 200f004 <rtems_bdbuf_release+0x138> <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
200efd4: 7f ff fd 24 call 200e464 <rtems_bdbuf_add_to_modified_list_after_access>
200efd8: 90 10 00 18 mov %i0, %o0
break;
200efdc: 30 bf ff d7 b,a 200ef38 <rtems_bdbuf_release+0x6c>
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200efe0: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
200efe4: 80 a0 60 00 cmp %g1, 0
200efe8: 02 bf ff d4 be 200ef38 <rtems_bdbuf_release+0x6c>
200efec: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
200eff0: 40 00 0d 6f call 20125ac <rtems_semaphore_flush>
200eff4: d0 07 60 7c ld [ %i5 + 0x7c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200eff8: 80 a2 20 00 cmp %o0, 0
200effc: 02 bf ff cf be 200ef38 <rtems_bdbuf_release+0x6c> <== ALWAYS TAKEN
200f000: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200f004: 7f ff e6 bf call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f008: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f00c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f010: 7f ff e6 bc call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f014: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f018: 7f ff e6 ba call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f01c: 90 12 20 0d or %o0, 0xd, %o0 <== NOT EXECUTED
0200f024 <rtems_bdbuf_release_modified>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
200f024: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200f028: 3b 00 80 8e sethi %hi(0x2023800), %i5
200f02c: ba 17 61 08 or %i5, 0x108, %i5 ! 2023908 <bdbuf_cache>
200f030: c4 0f 60 88 ldub [ %i5 + 0x88 ], %g2
200f034: 80 a0 a0 00 cmp %g2, 0
200f038: 02 80 00 18 be 200f098 <rtems_bdbuf_release_modified+0x74><== NEVER TAKEN
200f03c: 82 10 20 16 mov 0x16, %g1
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200f040: 80 a6 20 00 cmp %i0, 0
200f044: 02 80 00 14 be 200f094 <rtems_bdbuf_release_modified+0x70><== NEVER TAKEN
200f048: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200f04c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200f050: 7f ff e5 00 call 2008450 <rtems_semaphore_obtain>
200f054: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200f058: 80 a2 20 00 cmp %o0, 0
200f05c: 32 80 00 1e bne,a 200f0d4 <rtems_bdbuf_release_modified+0xb0><== NEVER TAKEN
200f060: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200f064: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200f068: 80 a0 60 03 cmp %g1, 3
200f06c: 0a 80 00 06 bcs 200f084 <rtems_bdbuf_release_modified+0x60><== NEVER TAKEN
200f070: 80 a0 60 05 cmp %g1, 5
200f074: 08 80 00 15 bleu 200f0c8 <rtems_bdbuf_release_modified+0xa4>
200f078: 80 a0 60 06 cmp %g1, 6
200f07c: 02 80 00 09 be 200f0a0 <rtems_bdbuf_release_modified+0x7c><== ALWAYS TAKEN
200f080: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
200f084: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200f088: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200f08c: 7f ff f5 b5 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200f090: 92 12 60 04 or %o1, 4, %o1 ! 42000004 <RAM_END+0x3fc00004><== NOT EXECUTED
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
200f094: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
200f098: 81 c7 e0 08 ret
200f09c: 91 e8 00 01 restore %g0, %g1, %o0
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
200f0a0: 7f ff f7 5c call 200ce10 <rtems_bdbuf_discard_buffer_after_access>
200f0a4: 90 10 00 18 mov %i0, %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200f0a8: 7f ff e5 34 call 2008578 <rtems_semaphore_release>
200f0ac: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f0b0: 80 a2 20 00 cmp %o0, 0
200f0b4: 02 bf ff f9 be 200f098 <rtems_bdbuf_release_modified+0x74><== ALWAYS TAKEN
200f0b8: 82 10 20 00 clr %g1
rtems_fatal_error_occurred (fatal_error_code);
200f0bc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f0c0: 7f ff e6 90 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f0c4: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
200f0c8: 7f ff fc e7 call 200e464 <rtems_bdbuf_add_to_modified_list_after_access>
200f0cc: 90 10 00 18 mov %i0, %o0
break;
200f0d0: 30 bf ff f6 b,a 200f0a8 <rtems_bdbuf_release_modified+0x84>
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f0d4: 7f ff e6 8b call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f0d8: 90 12 20 0d or %o0, 0xd, %o0 <== NOT EXECUTED
0200c774 <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
200c774: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c778: e0 06 40 00 ld [ %i1 ], %l0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c77c: b2 06 60 04 add %i1, 4, %i1
if (!rtems_chain_is_empty (chain))
200c780: 80 a4 00 19 cmp %l0, %i1
200c784: 02 80 00 36 be 200c85c <rtems_bdbuf_swapout_modified_processing+0xe8>
200c788: 80 a6 e0 00 cmp %i3, 0
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dev == BDBUF_INVALID_DEV))
200c78c: 12 80 00 65 bne 200c920 <rtems_bdbuf_swapout_modified_processing+0x1ac>
200c790: a2 10 20 00 clr %l1
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
200c794: a2 0c 60 ff and %l1, 0xff, %l1
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200c798: 25 00 80 8e sethi %hi(0x2023800), %l2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c79c: a8 10 20 09 mov 9, %l4
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200c7a0: 80 a4 00 19 cmp %l0, %i1
200c7a4: 02 80 00 2e be 200c85c <rtems_bdbuf_swapout_modified_processing+0xe8>
200c7a8: 80 a4 60 00 cmp %l1, 0
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
200c7ac: 12 80 00 32 bne 200c874 <rtems_bdbuf_swapout_modified_processing+0x100>
200c7b0: 80 a6 e0 00 cmp %i3, 0
200c7b4: 02 80 00 08 be 200c7d4 <rtems_bdbuf_swapout_modified_processing+0x60>
200c7b8: 82 14 a1 08 or %l2, 0x108, %g1
200c7bc: c4 06 00 00 ld [ %i0 ], %g2
200c7c0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
200c7c4: 80 a0 80 01 cmp %g2, %g1
200c7c8: 22 80 00 27 be,a 200c864 <rtems_bdbuf_swapout_modified_processing+0xf0>
200c7cc: c4 06 20 04 ld [ %i0 + 4 ], %g2
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200c7d0: 82 14 a1 08 or %l2, 0x108, %g1
200c7d4: c2 00 60 78 ld [ %g1 + 0x78 ], %g1
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
|| rtems_bdbuf_has_buffer_waiters ())
200c7d8: 80 a0 60 00 cmp %g1, 0
200c7dc: 12 80 00 26 bne 200c874 <rtems_bdbuf_swapout_modified_processing+0x100>
200c7e0: 01 00 00 00 nop
bd->hold_timer = 0;
if (bd->hold_timer)
200c7e4: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200c7e8: 80 a0 60 00 cmp %g1, 0
200c7ec: 22 80 00 11 be,a 200c830 <rtems_bdbuf_swapout_modified_processing+0xbc>
200c7f0: c2 06 00 00 ld [ %i0 ], %g1
{
if (update_timers)
200c7f4: 80 a7 20 00 cmp %i4, 0
200c7f8: 02 80 00 09 be 200c81c <rtems_bdbuf_swapout_modified_processing+0xa8>
200c7fc: 01 00 00 00 nop
{
if (bd->hold_timer > timer_delta)
200c800: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200c804: 80 a0 40 1d cmp %g1, %i5
200c808: 08 80 00 44 bleu 200c918 <rtems_bdbuf_swapout_modified_processing+0x1a4>
200c80c: 01 00 00 00 nop
bd->hold_timer -= timer_delta;
200c810: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200c814: 82 20 40 1d sub %g1, %i5, %g1
200c818: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
else
bd->hold_timer = 0;
}
if (bd->hold_timer)
200c81c: c2 04 20 34 ld [ %l0 + 0x34 ], %g1
200c820: 80 a0 60 00 cmp %g1, 0
200c824: 32 80 00 0b bne,a 200c850 <rtems_bdbuf_swapout_modified_processing+0xdc>
200c828: e0 04 00 00 ld [ %l0 ], %l0
/*
* This assumes we can set dev_t to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
200c82c: c2 06 00 00 ld [ %i0 ], %g1
200c830: 80 a0 7f ff cmp %g1, -1
200c834: 02 80 00 31 be 200c8f8 <rtems_bdbuf_swapout_modified_processing+0x184>
200c838: c6 06 20 04 ld [ %i0 + 4 ], %g3
*dev = bd->dev;
if (bd->dev == *dev)
200c83c: c4 04 20 18 ld [ %l0 + 0x18 ], %g2
200c840: 80 a0 80 01 cmp %g2, %g1
200c844: 22 80 00 0e be,a 200c87c <rtems_bdbuf_swapout_modified_processing+0x108><== ALWAYS TAKEN
200c848: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
node = next_node;
}
else
{
node = node->next;
200c84c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200c850: 80 a4 00 19 cmp %l0, %i1
200c854: 12 bf ff d6 bne 200c7ac <rtems_bdbuf_swapout_modified_processing+0x38>
200c858: 80 a4 60 00 cmp %l1, 0
200c85c: 81 c7 e0 08 ret
200c860: 81 e8 00 00 restore
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
200c864: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
200c868: 80 a0 80 01 cmp %g2, %g1
200c86c: 12 bf ff da bne 200c7d4 <rtems_bdbuf_swapout_modified_processing+0x60><== NEVER TAKEN
200c870: 82 14 a1 08 or %l2, 0x108, %g1
|| rtems_bdbuf_has_buffer_waiters ())
bd->hold_timer = 0;
200c874: c0 24 20 34 clr [ %l0 + 0x34 ]
200c878: 30 bf ff db b,a 200c7e4 <rtems_bdbuf_swapout_modified_processing+0x70>
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
*dev = bd->dev;
if (bd->dev == *dev)
200c87c: 80 a0 40 03 cmp %g1, %g3
200c880: 32 bf ff f4 bne,a 200c850 <rtems_bdbuf_swapout_modified_processing+0xdc><== NEVER TAKEN
200c884: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200c888: 90 10 00 10 mov %l0, %o0
{
rtems_chain_node* next_node = node->next;
200c88c: e6 04 00 00 ld [ %l0 ], %l3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200c890: e8 24 20 28 st %l4, [ %l0 + 0x28 ]
200c894: 7f ff f2 18 call 20090f4 <_Chain_Extract>
200c898: 01 00 00 00 nop
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract (node);
tnode = tnode->previous;
200c89c: d0 06 a0 08 ld [ %i2 + 8 ], %o0
while (node && !rtems_chain_is_head (transfer, tnode))
200c8a0: 80 a6 80 08 cmp %i2, %o0
200c8a4: 02 80 00 0c be 200c8d4 <rtems_bdbuf_swapout_modified_processing+0x160>
200c8a8: 92 10 00 10 mov %l0, %o1
200c8ac: c4 04 20 20 ld [ %l0 + 0x20 ], %g2
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
200c8b0: c2 02 20 20 ld [ %o0 + 0x20 ], %g1
200c8b4: 80 a0 80 01 cmp %g2, %g1
200c8b8: 18 80 00 0c bgu 200c8e8 <rtems_bdbuf_swapout_modified_processing+0x174>
200c8bc: 92 10 00 10 mov %l0, %o1
{
rtems_chain_insert (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
200c8c0: d0 02 20 04 ld [ %o0 + 4 ], %o0
rtems_chain_extract (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
200c8c4: 80 a6 80 08 cmp %i2, %o0
200c8c8: 32 bf ff fb bne,a 200c8b4 <rtems_bdbuf_swapout_modified_processing+0x140>
200c8cc: c2 02 20 20 ld [ %o0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200c8d0: 92 10 00 10 mov %l0, %o1
200c8d4: 90 10 00 1a mov %i2, %o0
200c8d8: 40 00 18 a3 call 2012b64 <_Chain_Insert>
200c8dc: a0 10 00 13 mov %l3, %l0
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200c8e0: 10 bf ff b1 b 200c7a4 <rtems_bdbuf_swapout_modified_processing+0x30>
200c8e4: 80 a4 00 19 cmp %l0, %i1
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
200c8e8: 40 00 18 9f call 2012b64 <_Chain_Insert>
200c8ec: a0 10 00 13 mov %l3, %l0
200c8f0: 10 bf ff ad b 200c7a4 <rtems_bdbuf_swapout_modified_processing+0x30>
200c8f4: 80 a4 00 19 cmp %l0, %i1
/*
* This assumes we can set dev_t to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
200c8f8: 80 a0 ff ff cmp %g3, -1
200c8fc: 32 bf ff d1 bne,a 200c840 <rtems_bdbuf_swapout_modified_processing+0xcc><== NEVER TAKEN
200c900: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 <== NOT EXECUTED
*dev = bd->dev;
200c904: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
200c908: c6 04 20 1c ld [ %l0 + 0x1c ], %g3
200c90c: c2 26 00 00 st %g1, [ %i0 ]
200c910: 10 bf ff cb b 200c83c <rtems_bdbuf_swapout_modified_processing+0xc8>
200c914: c6 26 20 04 st %g3, [ %i0 + 4 ]
if (update_timers)
{
if (bd->hold_timer > timer_delta)
bd->hold_timer -= timer_delta;
else
bd->hold_timer = 0;
200c918: c0 24 20 34 clr [ %l0 + 0x34 ]
200c91c: 30 bf ff c0 b,a 200c81c <rtems_bdbuf_swapout_modified_processing+0xa8>
* @param update_timers If true update the timers.
* @param timer_delta It update_timers is true update the timers by this
* amount.
*/
static void
rtems_bdbuf_swapout_modified_processing (dev_t* dev,
200c920: c4 06 00 00 ld [ %i0 ], %g2
200c924: c2 06 20 04 ld [ %i0 + 4 ], %g1
200c928: 82 08 80 01 and %g2, %g1, %g1
200c92c: 82 38 00 01 xnor %g0, %g1, %g1
200c930: 80 a0 00 01 cmp %g0, %g1
200c934: 10 bf ff 98 b 200c794 <rtems_bdbuf_swapout_modified_processing+0x20>
200c938: a2 60 3f ff subx %g0, -1, %l1
0200dfe0 <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
200dfe0: 9d e3 bf 68 save %sp, -152, %sp
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
200dfe4: 33 00 80 83 sethi %hi(0x2020c00), %i1
200dfe8: b2 16 63 68 or %i1, 0x368, %i1 ! 2020f68 <rtems_bdbuf_configuration>
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
200dfec: ee 06 60 04 ld [ %i1 + 4 ], %l7
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
200dff0: f6 06 60 0c ld [ %i1 + 0xc ], %i3
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
200dff4: af 2d e0 04 sll %l7, 4, %l7
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
200dff8: ae 05 e0 18 add %l7, 0x18, %l7
* @note chrisj The rtems_blkdev_request and the array at the end is a hack.
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
200dffc: 7f ff da 0f call 2004838 <malloc>
200e000: 90 10 00 17 mov %l7, %o0
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
200e004: ba 92 20 00 orcc %o0, 0, %i5
200e008: 02 80 01 0d be 200e43c <rtems_bdbuf_swapout_task+0x45c> <== NEVER TAKEN
200e00c: 82 10 20 01 mov 1, %g1
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->req_done = rtems_bdbuf_transfer_done;
200e010: 2d 00 80 32 sethi %hi(0x200c800), %l6
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
200e014: c2 27 40 00 st %g1, [ %i5 ]
write_req->req_done = rtems_bdbuf_transfer_done;
200e018: ac 15 a1 3c or %l6, 0x13c, %l6
write_req->done_arg = write_req;
200e01c: fa 27 60 08 st %i5, [ %i5 + 8 ]
write_req->io_task = rtems_task_self ();
200e020: 40 00 11 fc call 2012810 <rtems_task_self>
200e024: ec 27 60 04 st %l6, [ %i5 + 4 ]
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200e028: 03 00 80 8b sethi %hi(0x2022c00), %g1
200e02c: d2 00 62 ac ld [ %g1 + 0x2ac ], %o1 ! 2022eac <Configuration+0x10>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e030: 82 07 bf d4 add %fp, -44, %g1
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
200e034: 05 3f ff ff sethi %hi(0xfffffc00), %g2
200e038: c2 27 bf d0 st %g1, [ %fp + -48 ]
200e03c: 84 10 a3 ff or %g2, 0x3ff, %g2
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200e040: 83 2e e0 02 sll %i3, 2, %g1
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
200e044: 86 10 00 02 mov %g2, %g3
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->req_done = rtems_bdbuf_transfer_done;
write_req->done_arg = write_req;
write_req->io_task = rtems_task_self ();
200e048: d0 27 60 14 st %o0, [ %i5 + 0x14 ]
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
200e04c: c4 3f bf e0 std %g2, [ %fp + -32 ]
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200e050: fa 27 bf ec st %i5, [ %fp + -20 ]
200e054: a2 07 bf d0 add %fp, -48, %l1
head->previous = NULL;
200e058: c0 27 bf d4 clr [ %fp + -44 ]
tail->previous = head;
200e05c: e2 27 bf d8 st %l1, [ %fp + -40 ]
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
transfer.syncing = false;
200e060: c0 2f bf e8 clrb [ %fp + -24 ]
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200e064: 91 2e e0 07 sll %i3, 7, %o0
200e068: 90 22 00 01 sub %o0, %g1, %o0
200e06c: 90 02 00 1b add %o0, %i3, %o0
200e070: 40 00 42 80 call 201ea70 <.udiv>
200e074: 91 2a 20 03 sll %o0, 3, %o0
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200e078: 39 00 80 8e sethi %hi(0x2023800), %i4
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200e07c: d0 27 bf cc st %o0, [ %fp + -52 ]
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200e080: b8 17 21 08 or %i4, 0x108, %i4
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e084: d0 07 20 28 ld [ %i4 + 0x28 ], %o0
200e088: 92 10 20 00 clr %o1
200e08c: 7f ff e8 f1 call 2008450 <rtems_semaphore_obtain>
200e090: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e094: 80 a2 20 00 cmp %o0, 0
200e098: 12 80 00 e0 bne 200e418 <rtems_bdbuf_swapout_task+0x438> <== NEVER TAKEN
200e09c: b4 10 20 61 mov 0x61, %i2
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
200e0a0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200e0a4: 80 a0 60 00 cmp %g1, 0
200e0a8: 02 80 00 3f be 200e1a4 <rtems_bdbuf_swapout_task+0x1c4> <== ALWAYS TAKEN
200e0ac: a4 00 60 61 add %g1, 0x61, %l2
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200e0b0: 29 10 91 1b sethi %hi(0x42446c00), %l4 <== NOT EXECUTED
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200e0b4: 2b 00 80 36 sethi %hi(0x200d800), %l5 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200e0b8: a0 07 20 08 add %i4, 8, %l0 <== NOT EXECUTED
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
200e0bc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
200e0c0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200e0c4: a8 15 23 00 or %l4, 0x300, %l4 <== NOT EXECUTED
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200e0c8: aa 15 62 7c or %l5, 0x27c, %l5 <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
200e0cc: 7f ff d9 db call 2004838 <malloc> <== NOT EXECUTED
200e0d0: 90 10 20 38 mov 0x38, %o0 <== NOT EXECUTED
if (!worker)
200e0d4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
200e0d8: 02 80 00 da be 200e440 <rtems_bdbuf_swapout_task+0x460> <== NOT EXECUTED
200e0dc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e0e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200e0e4: 7f ff eb f9 call 20090c8 <_Chain_Append> <== NOT EXECUTED
200e0e8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
* @note chrisj The rtems_blkdev_request and the array at the end is a hack.
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
200e0ec: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
200e0f0: f0 2f 60 0c stb %i0, [ %i5 + 0xc ] <== NOT EXECUTED
* @note chrisj The rtems_blkdev_request and the array at the end is a hack.
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
200e0f4: 7f ff d9 d1 call 2004838 <malloc> <== NOT EXECUTED
200e0f8: 01 00 00 00 nop <== NOT EXECUTED
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
200e0fc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
200e100: 22 80 00 d0 be,a 200e440 <rtems_bdbuf_swapout_task+0x460><== NOT EXECUTED
200e104: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
200e108: e6 20 40 00 st %l3, [ %g1 ] <== NOT EXECUTED
write_req->req_done = rtems_bdbuf_transfer_done;
200e10c: ec 20 60 04 st %l6, [ %g1 + 4 ] <== NOT EXECUTED
write_req->done_arg = write_req;
200e110: c2 20 60 08 st %g1, [ %g1 + 8 ] <== NOT EXECUTED
write_req->io_task = rtems_task_self ();
200e114: 40 00 11 bf call 2012810 <rtems_task_self> <== NOT EXECUTED
200e118: c2 27 bf c8 st %g1, [ %fp + -56 ] <== NOT EXECUTED
200e11c: c2 07 bf c8 ld [ %fp + -56 ], %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200e120: 84 07 60 10 add %i5, 0x10, %g2 <== NOT EXECUTED
200e124: 86 07 60 14 add %i5, 0x14, %g3 <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
(bdbuf_config.swapout_priority ?
200e128: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->req_done = rtems_bdbuf_transfer_done;
write_req->done_arg = write_req;
write_req->io_task = rtems_task_self ();
200e12c: d0 20 60 14 st %o0, [ %g1 + 0x14 ] <== NOT EXECUTED
head->next = tail;
200e130: c6 27 60 10 st %g3, [ %i5 + 0x10 ] <== NOT EXECUTED
head->previous = NULL;
tail->previous = head;
200e134: c4 27 60 18 st %g2, [ %i5 + 0x18 ] <== NOT EXECUTED
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200e138: c2 27 60 2c st %g1, [ %i5 + 0x2c ] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200e13c: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200e140: c0 27 60 14 clr [ %i5 + 0x14 ] <== NOT EXECUTED
200e144: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
200e148: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
200e14c: c4 3f 60 20 std %g2, [ %i5 + 0x20 ] <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200e150: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
200e154: 12 80 00 03 bne 200e160 <rtems_bdbuf_swapout_task+0x180> <== NOT EXECUTED
200e158: 90 16 80 14 or %i2, %l4, %o0 <== NOT EXECUTED
200e15c: 92 10 20 0f mov 0xf, %o1 <== NOT EXECUTED
200e160: 15 00 00 08 sethi %hi(0x2000), %o2 <== NOT EXECUTED
200e164: 96 10 24 00 mov 0x400, %o3 <== NOT EXECUTED
200e168: 98 10 20 00 clr %o4 <== NOT EXECUTED
200e16c: 7f ff e9 2e call 2008624 <rtems_task_create> <== NOT EXECUTED
200e170: 9a 07 60 08 add %i5, 8, %o5 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT),
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
200e174: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e178: 12 80 00 b7 bne 200e454 <rtems_bdbuf_swapout_task+0x474> <== NOT EXECUTED
200e17c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200e180: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
200e184: 7f ff e9 b4 call 2008854 <rtems_task_start> <== NOT EXECUTED
200e188: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
200e18c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e190: 12 80 00 ae bne 200e448 <rtems_bdbuf_swapout_task+0x468> <== NOT EXECUTED
200e194: b4 06 a0 01 inc %i2 <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
200e198: 80 a6 80 12 cmp %i2, %l2 <== NOT EXECUTED
200e19c: 12 bf ff cc bne 200e0cc <rtems_bdbuf_swapout_task+0xec> <== NOT EXECUTED
200e1a0: 01 00 00 00 nop <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e1a4: 7f ff e8 f5 call 2008578 <rtems_semaphore_release>
200e1a8: d0 07 20 28 ld [ %i4 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200e1ac: 80 a2 20 00 cmp %o0, 0
200e1b0: 12 80 00 9d bne 200e424 <rtems_bdbuf_swapout_task+0x444> <== NEVER TAKEN
200e1b4: 2d 3f ff ff sethi %hi(0xfffffc00), %l6
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200e1b8: b0 10 00 1c mov %i4, %i0
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
200e1bc: ac 15 a3 ff or %l6, 0x3ff, %l6
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200e1c0: aa 07 20 08 add %i4, 8, %l5
200e1c4: ae 10 00 16 mov %l6, %l7
/*
* If we have any buffers in the sync queue move them to the modified
* list. The first sync buffer will select the device we use.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
200e1c8: a6 07 20 5c add %i4, 0x5c, %l3
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
200e1cc: a8 07 20 50 add %i4, 0x50, %l4
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200e1d0: c2 0f 20 04 ldub [ %i4 + 4 ], %g1
200e1d4: 80 a0 60 00 cmp %g1, 0
200e1d8: 02 80 00 71 be 200e39c <rtems_bdbuf_swapout_task+0x3bc> <== NEVER TAKEN
200e1dc: a0 10 20 01 mov 1, %l0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e1e0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0
200e1e4: 92 10 20 00 clr %o1
200e1e8: 7f ff e8 9a call 2008450 <rtems_semaphore_obtain>
200e1ec: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e1f0: 80 a2 20 00 cmp %o0, 0
200e1f4: 32 80 00 8a bne,a 200e41c <rtems_bdbuf_swapout_task+0x43c><== NEVER TAKEN
200e1f8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
200e1fc: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1
worker = NULL;
200e200: b4 10 20 00 clr %i2
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
200e204: 80 a0 60 00 cmp %g1, 0
200e208: 02 80 00 59 be 200e36c <rtems_bdbuf_swapout_task+0x38c>
200e20c: ba 10 00 11 mov %l1, %i5
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
200e210: c4 0f 20 30 ldub [ %i4 + 0x30 ], %g2
/*
* When the sync is for a device limit the sync to that device. If the sync
* is for a buffer handle process the devices in the order on the sync
* list. This means the dev is BDBUF_INVALID_DEV.
*/
if (bdbuf_cache.sync_active)
200e214: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200e218: b2 07 60 04 add %i5, 4, %i1
head->next = tail;
head->previous = NULL;
200e21c: c0 27 60 04 clr [ %i5 + 4 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e220: f2 27 40 00 st %i1, [ %i5 ]
head->previous = NULL;
tail->previous = head;
200e224: fa 27 60 08 st %i5, [ %i5 + 8 ]
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
200e228: ec 3f 60 10 std %l6, [ %i5 + 0x10 ]
/*
* When the sync is for a device limit the sync to that device. If the sync
* is for a buffer handle process the devices in the order on the sync
* list. This means the dev is BDBUF_INVALID_DEV.
*/
if (bdbuf_cache.sync_active)
200e22c: 80 a0 60 00 cmp %g1, 0
200e230: 02 80 00 04 be 200e240 <rtems_bdbuf_swapout_task+0x260>
200e234: c4 2f 60 18 stb %g2, [ %i5 + 0x18 ]
transfer->dev = bdbuf_cache.sync_device;
200e238: c4 1e 20 38 ldd [ %i0 + 0x38 ], %g2
200e23c: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
/*
* If we have any buffers in the sync queue move them to the modified
* list. The first sync buffer will select the device we use.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
200e240: a4 07 60 10 add %i5, 0x10, %l2
200e244: 96 10 20 01 mov 1, %o3
200e248: 98 10 20 00 clr %o4
200e24c: 9a 10 00 1b mov %i3, %o5
200e250: 90 10 00 12 mov %l2, %o0
200e254: 92 10 00 13 mov %l3, %o1
200e258: 7f ff f9 47 call 200c774 <rtems_bdbuf_swapout_modified_processing>
200e25c: 94 10 00 1d mov %i5, %o2
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
200e260: d6 0f 20 30 ldub [ %i4 + 0x30 ], %o3
200e264: 90 10 00 12 mov %l2, %o0
200e268: 92 10 00 14 mov %l4, %o1
200e26c: 94 10 00 1d mov %i5, %o2
200e270: 98 0c 20 01 and %l0, 1, %o4
200e274: 7f ff f9 40 call 200c774 <rtems_bdbuf_swapout_modified_processing>
200e278: 9a 10 00 1b mov %i3, %o5
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e27c: 7f ff e8 bf call 2008578 <rtems_semaphore_release>
200e280: d0 07 20 28 ld [ %i4 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200e284: 80 a2 20 00 cmp %o0, 0
200e288: 32 80 00 68 bne,a 200e428 <rtems_bdbuf_swapout_task+0x448><== NEVER TAKEN
200e28c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
200e290: c2 07 40 00 ld [ %i5 ], %g1
200e294: 80 a0 40 19 cmp %g1, %i1
200e298: 02 80 00 3b be 200e384 <rtems_bdbuf_swapout_task+0x3a4>
200e29c: 80 a6 a0 00 cmp %i2, 0
{
if (worker)
200e2a0: 02 80 00 3b be 200e38c <rtems_bdbuf_swapout_task+0x3ac> <== ALWAYS TAKEN
200e2a4: 01 00 00 00 nop
{
rtems_status_code sc = rtems_event_send (worker->id,
200e2a8: d0 06 a0 08 ld [ %i2 + 8 ], %o0 <== NOT EXECUTED
200e2ac: 7f ff e7 2a call 2007f54 <rtems_event_send> <== NOT EXECUTED
200e2b0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200e2b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e2b8: 12 80 00 5e bne 200e430 <rtems_bdbuf_swapout_task+0x450> <== NOT EXECUTED
200e2bc: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
}
transfered_buffers = true;
}
if (bdbuf_cache.sync_active && !transfered_buffers)
200e2c0: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
200e2c4: 80 a0 60 00 cmp %g1, 0
200e2c8: 02 80 00 25 be 200e35c <rtems_bdbuf_swapout_task+0x37c>
200e2cc: 80 88 a0 ff btst 0xff, %g2
200e2d0: 12 bf ff c4 bne 200e1e0 <rtems_bdbuf_swapout_task+0x200>
200e2d4: a0 10 20 00 clr %l0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e2d8: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
200e2dc: 92 10 20 00 clr %o1
200e2e0: 7f ff e8 5c call 2008450 <rtems_semaphore_obtain>
200e2e4: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e2e8: 80 a2 20 00 cmp %o0, 0
200e2ec: 12 80 00 4c bne 200e41c <rtems_bdbuf_swapout_task+0x43c> <== NEVER TAKEN
200e2f0: 11 10 80 00 sethi %hi(0x42000000), %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e2f4: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
if (bdbuf_cache.sync_active && !transfered_buffers)
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
sync_requester = bdbuf_cache.sync_requester;
200e2f8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
bdbuf_cache.sync_active = false;
200e2fc: c0 2e 20 30 clrb [ %i0 + 0x30 ]
bdbuf_cache.sync_requester = 0;
200e300: c0 26 20 34 clr [ %i0 + 0x34 ]
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e304: 7f ff e8 9d call 2008578 <rtems_semaphore_release>
200e308: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
200e30c: 80 a2 20 00 cmp %o0, 0
200e310: 12 80 00 45 bne 200e424 <rtems_bdbuf_swapout_task+0x444> <== NEVER TAKEN
200e314: 80 a7 60 00 cmp %i5, 0
rtems_bdbuf_lock_cache ();
sync_requester = bdbuf_cache.sync_requester;
bdbuf_cache.sync_active = false;
bdbuf_cache.sync_requester = 0;
rtems_bdbuf_unlock_cache ();
if (sync_requester)
200e318: 02 80 00 06 be 200e330 <rtems_bdbuf_swapout_task+0x350> <== NEVER TAKEN
200e31c: d4 07 bf cc ld [ %fp + -52 ], %o2
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
200e320: 90 10 00 1d mov %i5, %o0
200e324: 7f ff e7 0c call 2007f54 <rtems_event_send>
200e328: 92 10 20 02 mov 2, %o1
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
200e32c: d4 07 bf cc ld [ %fp + -52 ], %o2
200e330: 90 10 20 04 mov 4, %o0
200e334: 92 10 20 00 clr %o1
200e338: 7f ff e6 a4 call 2007dc8 <rtems_event_receive>
200e33c: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
200e340: 80 a2 20 06 cmp %o0, 6
200e344: 02 bf ff a3 be 200e1d0 <rtems_bdbuf_swapout_task+0x1f0>
200e348: 80 a2 20 00 cmp %o0, 0
200e34c: 02 bf ff a1 be 200e1d0 <rtems_bdbuf_swapout_task+0x1f0> <== ALWAYS TAKEN
200e350: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
200e354: 7f ff e9 eb call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e358: 90 12 20 18 or %o0, 0x18, %o0 ! 42000018 <RAM_END+0x3fc00018><== NOT EXECUTED
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
200e35c: 02 bf ff f5 be 200e330 <rtems_bdbuf_swapout_task+0x350>
200e360: d4 07 bf cc ld [ %fp + -52 ], %o2
200e364: 10 bf ff 9f b 200e1e0 <rtems_bdbuf_swapout_task+0x200>
200e368: a0 10 20 00 clr %l0
200e36c: 7f ff eb 6b call 2009118 <_Chain_Get>
200e370: 90 10 00 15 mov %l5, %o0
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
200e374: b4 92 20 00 orcc %o0, 0, %i2
200e378: 32 bf ff a6 bne,a 200e210 <rtems_bdbuf_swapout_task+0x230><== NEVER TAKEN
200e37c: ba 06 a0 10 add %i2, 0x10, %i5 <== NOT EXECUTED
200e380: 30 bf ff a4 b,a 200e210 <rtems_bdbuf_swapout_task+0x230>
rtems_bdbuf_swapout_processing (unsigned long timer_delta,
bool update_timers,
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
200e384: 10 bf ff cf b 200e2c0 <rtems_bdbuf_swapout_task+0x2e0>
200e388: 84 10 20 00 clr %g2
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
200e38c: 7f ff fd 4d call 200d8c0 <rtems_bdbuf_swapout_write>
200e390: 90 10 00 1d mov %i5, %o0
}
transfered_buffers = true;
200e394: 10 bf ff cb b 200e2c0 <rtems_bdbuf_swapout_task+0x2e0>
200e398: 84 10 20 01 mov 1, %g2
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200e39c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200e3a0: 92 10 20 00 clr %o1 <== NOT EXECUTED
200e3a4: 7f ff e8 2b call 2008450 <rtems_semaphore_obtain> <== NOT EXECUTED
200e3a8: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200e3ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e3b0: 12 80 00 1b bne 200e41c <rtems_bdbuf_swapout_task+0x43c> <== NOT EXECUTED
200e3b4: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200e3b8: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
200e3bc: b0 06 20 0c add %i0, 0xc, %i0 <== NOT EXECUTED
200e3c0: 80 a7 40 18 cmp %i5, %i0 <== NOT EXECUTED
200e3c4: 02 80 00 0a be 200e3ec <rtems_bdbuf_swapout_task+0x40c> <== NOT EXECUTED
200e3c8: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
200e3cc: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
200e3d0: c0 2f 60 0c clrb [ %i5 + 0xc ] <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
200e3d4: 7f ff e6 e0 call 2007f54 <rtems_event_send> <== NOT EXECUTED
200e3d8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200e3dc: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
200e3e0: 80 a7 40 18 cmp %i5, %i0 <== NOT EXECUTED
200e3e4: 32 bf ff fb bne,a 200e3d0 <rtems_bdbuf_swapout_task+0x3f0><== NOT EXECUTED
200e3e8: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200e3ec: 7f ff e8 63 call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
200e3f0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200e3f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e3f8: 12 80 00 0c bne 200e428 <rtems_bdbuf_swapout_task+0x448> <== NOT EXECUTED
200e3fc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
200e400: 7f ff d7 da call 2004368 <free> <== NOT EXECUTED
200e404: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
200e408: 7f ff e8 d1 call 200874c <rtems_task_delete> <== NOT EXECUTED
200e40c: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
200e410: 81 c7 e0 08 ret <== NOT EXECUTED
200e414: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200e418: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e41c: 7f ff e9 b9 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e420: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200e424: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e428: 7f ff e9 b6 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e42c: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200e430: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e434: 7f ff e9 b3 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e438: 90 12 20 14 or %o0, 0x14, %o0 ! 42000014 <RAM_END+0x3fc00014><== NOT EXECUTED
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
200e43c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e440: 7f ff e9 b0 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e444: 90 12 20 15 or %o0, 0x15, %o0 ! 42000015 <RAM_END+0x3fc00015><== NOT EXECUTED
sc = rtems_task_start (worker->id,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
200e448: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e44c: 7f ff e9 ad call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e450: 90 12 20 17 or %o0, 0x17, %o0 ! 42000017 <RAM_END+0x3fc00017><== NOT EXECUTED
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
200e454: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e458: 7f ff e9 aa call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e45c: 90 12 20 16 or %o0, 0x16, %o0 ! 42000016 <RAM_END+0x3fc00016><== NOT EXECUTED
0200da7c <rtems_bdbuf_swapout_worker_task>:
* @param arg A pointer to the worker thread's private data.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
200da7c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200da80: 37 00 80 8e sethi %hi(0x2023800), %i3 <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
rtems_bdbuf_lock_cache ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200da84: 39 3f ff ff sethi %hi(0xfffffc00), %i4 <== NOT EXECUTED
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200da88: b6 16 e1 08 or %i3, 0x108, %i3 <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
rtems_bdbuf_lock_cache ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200da8c: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
200da90: b4 06 20 10 add %i0, 0x10, %i2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
200da94: a0 06 20 14 add %i0, 0x14, %l0 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
200da98: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
200da9c: 10 80 00 21 b 200db20 <rtems_bdbuf_swapout_worker_task+0xa4><== NOT EXECUTED
200daa0: b2 06 e0 08 add %i3, 8, %i1 <== NOT EXECUTED
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
200daa4: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED
200daa8: 92 10 20 00 clr %o1 <== NOT EXECUTED
200daac: 94 10 20 00 clr %o2 <== NOT EXECUTED
200dab0: 7f ff e8 c6 call 2007dc8 <rtems_event_receive> <== NOT EXECUTED
200dab4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
200dab8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200dabc: 12 80 00 25 bne 200db50 <rtems_bdbuf_swapout_worker_task+0xd4><== NOT EXECUTED
200dac0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
200dac4: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED
200dac8: 12 80 00 23 bne 200db54 <rtems_bdbuf_swapout_worker_task+0xd8><== NOT EXECUTED
200dacc: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
200dad0: 7f ff ff 7c call 200d8c0 <rtems_bdbuf_swapout_write> <== NOT EXECUTED
200dad4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200dad8: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
200dadc: 92 10 20 00 clr %o1 <== NOT EXECUTED
200dae0: 7f ff ea 5c call 2008450 <rtems_semaphore_obtain> <== NOT EXECUTED
200dae4: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200dae8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200daec: 12 80 00 1e bne 200db64 <rtems_bdbuf_swapout_worker_task+0xe8><== NOT EXECUTED
200daf0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200daf4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
head->next = tail;
200daf8: e0 26 20 10 st %l0, [ %i0 + 0x10 ] <== NOT EXECUTED
head->previous = NULL;
200dafc: c0 26 20 14 clr [ %i0 + 0x14 ] <== NOT EXECUTED
tail->previous = head;
200db00: f4 26 20 18 st %i2, [ %i0 + 0x18 ] <== NOT EXECUTED
200db04: 7f ff ed 71 call 20090c8 <_Chain_Append> <== NOT EXECUTED
200db08: f8 3e 20 20 std %i4, [ %i0 + 0x20 ] <== NOT EXECUTED
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200db0c: 7f ff ea 9b call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
200db10: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
200db14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200db18: 12 80 00 11 bne 200db5c <rtems_bdbuf_swapout_worker_task+0xe0><== NOT EXECUTED
200db1c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
200db20: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 <== NOT EXECUTED
200db24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200db28: 32 bf ff df bne,a 200daa4 <rtems_bdbuf_swapout_worker_task+0x28><== NOT EXECUTED
200db2c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
200db30: 7f ff da 0e call 2004368 <free> <== NOT EXECUTED
200db34: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED
free (worker);
200db38: 7f ff da 0c call 2004368 <free> <== NOT EXECUTED
200db3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
200db40: 7f ff eb 03 call 200874c <rtems_task_delete> <== NOT EXECUTED
200db44: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
200db48: 81 c7 e0 08 ret <== NOT EXECUTED
200db4c: 81 e8 00 00 restore <== NOT EXECUTED
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
200db50: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200db54: 7f ff eb eb call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200db58: 90 12 20 1a or %o0, 0x1a, %o0 ! 4200001a <RAM_END+0x3fc0001a><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200db5c: 7f ff eb e9 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200db60: 90 12 20 0e or %o0, 0xe, %o0 <== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200db64: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200db68: 7f ff eb e6 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200db6c: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
0200d8c0 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
200d8c0: 9d e3 bf a0 save %sp, -96, %sp
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
200d8c4: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200d8c8: b6 06 20 04 add %i0, 4, %i3
200d8cc: 80 a0 40 1b cmp %g1, %i3
200d8d0: 02 80 00 62 be 200da58 <rtems_bdbuf_swapout_write+0x198> <== NEVER TAKEN
200d8d4: 01 00 00 00 nop
/*
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
200d8d8: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0
200d8dc: 7f ff d6 3a call 20031c4 <rtems_disk_obtain>
200d8e0: 23 00 80 8c sethi %hi(0x2023000), %l1
if (dd == NULL)
dd = &null_disk;
200d8e4: a2 14 60 a0 or %l1, 0xa0, %l1 ! 20230a0 <null_disk.7152>
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
200d8e8: 80 a2 20 00 cmp %o0, 0
200d8ec: 02 80 00 62 be 200da74 <rtems_bdbuf_swapout_write+0x1b4>
200d8f0: ba 10 00 08 mov %o0, %i5
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
200d8f4: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
200d8f8: 35 00 80 83 sethi %hi(0x2020c00), %i2
200d8fc: b4 16 a3 68 or %i2, 0x368, %i2 ! 2020f68 <rtems_bdbuf_configuration>
200d900: d2 06 a0 20 ld [ %i2 + 0x20 ], %o1
200d904: 40 00 44 5b call 201ea70 <.udiv>
200d908: b8 10 20 00 clr %i4
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200d90c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200d910: 84 10 20 0c mov 0xc, %g2
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
200d914: a0 10 00 08 mov %o0, %l0
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
200d918: c0 20 60 10 clr [ %g1 + 0x10 ]
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200d91c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200d920: b2 10 20 0c mov 0xc, %i1
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200d924: 7f ff ed fd call 2009118 <_Chain_Get>
200d928: 90 10 00 18 mov %i0, %o0
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
200d92c: 82 92 20 00 orcc %o0, 0, %g1
200d930: 02 80 00 2d be 200d9e4 <rtems_bdbuf_swapout_write+0x124> <== NEVER TAKEN
200d934: 80 a7 40 11 cmp %i5, %l1
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
200d938: c4 07 60 08 ld [ %i5 + 8 ], %g2
200d93c: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
200d940: 80 88 a0 01 btst 1, %g2
200d944: 02 80 00 35 be 200da18 <rtems_bdbuf_swapout_write+0x158> <== ALWAYS TAKEN
200d948: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
transfer->write_req->bufnum &&
200d94c: c4 02 60 10 ld [ %o1 + 0x10 ], %g2 <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
200d950: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200d954: 32 80 00 37 bne,a 200da30 <rtems_bdbuf_swapout_write+0x170><== NOT EXECUTED
200d958: c6 00 60 20 ld [ %g1 + 0x20 ], %g3 <== NOT EXECUTED
200d95c: f8 00 60 20 ld [ %g1 + 0x20 ], %i4 <== NOT EXECUTED
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
200d960: de 07 60 20 ld [ %i5 + 0x20 ], %o7
buf->buffer = bd->buffer;
200d964: c8 00 60 24 ld [ %g1 + 0x24 ], %g4
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
200d968: 86 00 a0 01 add %g2, 1, %g3
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
200d96c: 85 28 a0 04 sll %g2, 4, %g2
transfer->write_req->bufnum++;
200d970: c6 22 60 10 st %g3, [ %o1 + 0x10 ]
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
200d974: 9a 10 20 00 clr %o5
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
200d978: 86 00 a0 18 add %g2, 0x18, %g3
200d97c: 84 02 40 03 add %o1, %g3, %g2
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
200d980: f8 22 40 03 st %i4, [ %o1 + %g3 ]
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
200d984: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
buf->block = bd->block;
buf->length = dd->block_size;
200d988: de 20 a0 04 st %o7, [ %g2 + 4 ]
buf->buffer = bd->buffer;
200d98c: c8 20 a0 08 st %g4, [ %g2 + 8 ]
/*
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
200d990: c2 06 00 00 ld [ %i0 ], %g1
200d994: 80 a6 c0 01 cmp %i3, %g1
200d998: 02 80 00 08 be 200d9b8 <rtems_bdbuf_swapout_write+0xf8>
200d99c: 94 10 20 00 clr %o2
200d9a0: c4 02 60 10 ld [ %o1 + 0x10 ], %g2
200d9a4: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200d9a8: 80 a0 80 01 cmp %g2, %g1
200d9ac: 0a 80 00 1e bcs 200da24 <rtems_bdbuf_swapout_write+0x164>
200d9b0: 80 8b 60 ff btst 0xff, %o5
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
200d9b4: 94 10 20 00 clr %o2
200d9b8: 7f ff ff 27 call 200d654 <rtems_bdbuf_execute_transfer_request>
200d9bc: 90 10 00 1d mov %i5, %o0
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200d9c0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200d9c4: 90 10 00 18 mov %i0, %o0
200d9c8: f2 20 60 0c st %i1, [ %g1 + 0xc ]
200d9cc: 7f ff ed d3 call 2009118 <_Chain_Get>
200d9d0: c0 20 60 10 clr [ %g1 + 0x10 ]
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
200d9d4: 82 92 20 00 orcc %o0, 0, %g1
200d9d8: 32 bf ff d9 bne,a 200d93c <rtems_bdbuf_swapout_write+0x7c>
200d9dc: c4 07 60 08 ld [ %i5 + 8 ], %g2
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
}
}
if (dd != &null_disk)
200d9e0: 80 a7 40 11 cmp %i5, %l1
200d9e4: 02 80 00 1d be 200da58 <rtems_bdbuf_swapout_write+0x198> <== NEVER TAKEN
200d9e8: 01 00 00 00 nop
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
200d9ec: c2 0e 20 18 ldub [ %i0 + 0x18 ], %g1
200d9f0: 80 a0 60 00 cmp %g1, 0
200d9f4: 02 80 00 07 be 200da10 <rtems_bdbuf_swapout_write+0x150>
200d9f8: 01 00 00 00 nop
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
200d9fc: d0 07 60 08 ld [ %i5 + 8 ], %o0
200da00: c2 02 20 0c ld [ %o0 + 0xc ], %g1
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
200da04: 80 88 60 02 btst 2, %g1
200da08: 32 80 00 16 bne,a 200da60 <rtems_bdbuf_swapout_write+0x1a0><== NEVER TAKEN
200da0c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
200da10: 7f ff d6 55 call 2003364 <rtems_disk_release>
200da14: 91 e8 00 1d restore %g0, %i5, %o0
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
200da18: f8 00 60 20 ld [ %g1 + 0x20 ], %i4
200da1c: 10 bf ff d1 b 200d960 <rtems_bdbuf_swapout_write+0xa0>
200da20: c4 02 60 10 ld [ %o1 + 0x10 ], %g2
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
200da24: 02 bf ff c0 be 200d924 <rtems_bdbuf_swapout_write+0x64> <== ALWAYS TAKEN
200da28: 94 10 20 00 clr %o2
200da2c: 30 bf ff e3 b,a 200d9b8 <rtems_bdbuf_swapout_write+0xf8> <== NOT EXECUTED
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
200da30: 88 07 00 10 add %i4, %l0, %g4 <== NOT EXECUTED
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
200da34: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED
200da38: 22 bf ff ca be,a 200d960 <rtems_bdbuf_swapout_write+0xa0><== NOT EXECUTED
200da3c: b8 10 00 03 mov %g3, %i4 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200da40: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
200da44: 40 00 14 48 call 2012b64 <_Chain_Insert> <== NOT EXECUTED
200da48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200da4c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
200da50: 10 bf ff d0 b 200d990 <rtems_bdbuf_swapout_write+0xd0> <== NOT EXECUTED
200da54: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
200da58: 81 c7 e0 08 ret <== NOT EXECUTED
200da5c: 81 e8 00 00 restore <== NOT EXECUTED
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
200da60: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200da64: 9f c0 40 00 call %g1 <== NOT EXECUTED
200da68: 94 10 20 00 clr %o2 <== NOT EXECUTED
/* How should the error be handled ? */
}
rtems_disk_release (dd);
200da6c: 7f ff d6 3e call 2003364 <rtems_disk_release> <== NOT EXECUTED
200da70: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
200da74: 10 bf ff a0 b 200d8f4 <rtems_bdbuf_swapout_write+0x34>
200da78: ba 10 00 11 mov %l1, %i5
0200f0e0 <rtems_bdbuf_sync>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
200f0e0: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200f0e4: 39 00 80 8e sethi %hi(0x2023800), %i4
200f0e8: ba 17 21 08 or %i4, 0x108, %i5 ! 2023908 <bdbuf_cache>
200f0ec: c4 0f 60 88 ldub [ %i5 + 0x88 ], %g2
200f0f0: 80 a0 a0 00 cmp %g2, 0
200f0f4: 02 80 00 19 be 200f158 <rtems_bdbuf_sync+0x78> <== NEVER TAKEN
200f0f8: 82 10 20 16 mov 0x16, %g1
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200f0fc: 80 a6 20 00 cmp %i0, 0
200f100: 02 80 00 15 be 200f154 <rtems_bdbuf_sync+0x74> <== NEVER TAKEN
200f104: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200f108: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200f10c: 7f ff e4 d1 call 2008450 <rtems_semaphore_obtain>
200f110: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200f114: 80 a2 20 00 cmp %o0, 0
200f118: 32 80 00 7b bne,a 200f304 <rtems_bdbuf_sync+0x224> <== NEVER TAKEN
200f11c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200f120: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200f124: 80 a0 60 03 cmp %g1, 3
200f128: 0a 80 00 07 bcs 200f144 <rtems_bdbuf_sync+0x64> <== NEVER TAKEN
200f12c: 80 a0 60 05 cmp %g1, 5
200f130: 28 80 00 16 bleu,a 200f188 <rtems_bdbuf_sync+0xa8>
200f134: 82 10 20 08 mov 8, %g1
200f138: 80 a0 60 06 cmp %g1, 6
200f13c: 02 80 00 09 be 200f160 <rtems_bdbuf_sync+0x80> <== ALWAYS TAKEN
200f140: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
200f144: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200f148: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200f14c: 7f ff f5 85 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200f150: 92 12 60 03 or %o1, 3, %o1 ! 42000003 <RAM_END+0x3fc00003><== NOT EXECUTED
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
200f154: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
200f158: 81 c7 e0 08 ret
200f15c: 91 e8 00 01 restore %g0, %g1, %o0
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_sync_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
200f160: 7f ff f7 2c call 200ce10 <rtems_bdbuf_discard_buffer_after_access>
200f164: 90 10 00 18 mov %i0, %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200f168: 7f ff e5 04 call 2008578 <rtems_semaphore_release>
200f16c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f170: 80 a2 20 00 cmp %o0, 0
200f174: 02 bf ff f9 be 200f158 <rtems_bdbuf_sync+0x78> <== ALWAYS TAKEN
200f178: 82 10 20 00 clr %g1
rtems_fatal_error_occurred (fatal_error_code);
200f17c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f180: 7f ff e6 60 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f184: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
200f188: 90 07 60 5c add %i5, 0x5c, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f18c: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
200f190: 7f ff e7 ce call 20090c8 <_Chain_Append>
200f194: 92 10 00 18 mov %i0, %o1
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
200f198: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200f19c: 80 a0 60 00 cmp %g1, 0
200f1a0: 12 80 00 40 bne 200f2a0 <rtems_bdbuf_sync+0x1c0>
200f1a4: d0 07 21 08 ld [ %i4 + 0x108 ], %o0
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200f1a8: 92 10 20 04 mov 4, %o1
200f1ac: 7f ff e3 6a call 2007f54 <rtems_event_send>
200f1b0: 39 00 80 8e sethi %hi(0x2023800), %i4
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200f1b4: 80 a2 20 00 cmp %o0, 0
200f1b8: 12 80 00 50 bne 200f2f8 <rtems_bdbuf_sync+0x218> <== NEVER TAKEN
200f1bc: b8 17 21 78 or %i4, 0x178, %i4
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200f1c0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200f1c4: 80 a0 60 01 cmp %g1, 1
200f1c8: 1a 80 00 06 bcc 200f1e0 <rtems_bdbuf_sync+0x100> <== ALWAYS TAKEN
200f1cc: 80 a0 60 07 cmp %g1, 7
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
200f1d0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200f1d4: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200f1d8: 7f ff f5 62 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200f1dc: 92 12 60 07 or %o1, 7, %o1 ! 42000007 <RAM_END+0x3fc00007><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200f1e0: 08 80 00 15 bleu 200f234 <rtems_bdbuf_sync+0x154>
200f1e4: 80 a0 60 0a cmp %g1, 0xa
200f1e8: 18 bf ff fa bgu 200f1d0 <rtems_bdbuf_sync+0xf0> <== NEVER TAKEN
200f1ec: 01 00 00 00 nop
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f1f0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200f1f4: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f1f8: c6 00 60 0c ld [ %g1 + 0xc ], %g3
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200f1fc: 84 00 a0 01 inc %g2
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f200: 86 00 e0 01 inc %g3
200f204: c6 20 60 0c st %g3, [ %g1 + 0xc ]
static void
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
200f208: c4 26 20 2c st %g2, [ %i0 + 0x2c ]
rtems_bdbuf_anonymous_wait (waiters);
200f20c: 7f ff fa 5a call 200db74 <rtems_bdbuf_anonymous_wait>
200f210: 90 10 00 1c mov %i4, %o0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200f214: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
--bd->waiters;
200f218: c6 06 20 2c ld [ %i0 + 0x2c ], %g3
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200f21c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
rtems_bdbuf_wait (rtems_bdbuf_buffer *bd, rtems_bdbuf_waiters *waiters)
{
rtems_bdbuf_group_obtain (bd);
++bd->waiters;
rtems_bdbuf_anonymous_wait (waiters);
--bd->waiters;
200f220: 86 00 ff ff add %g3, -1, %g3
200f224: c6 26 20 2c st %g3, [ %i0 + 0x2c ]
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200f228: 84 00 bf ff add %g2, -1, %g2
200f22c: 10 bf ff e5 b 200f1c0 <rtems_bdbuf_sync+0xe0>
200f230: c4 20 60 0c st %g2, [ %g1 + 0xc ]
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
200f234: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200f238: 80 a0 60 00 cmp %g1, 0
200f23c: 12 bf ff cb bne 200f168 <rtems_bdbuf_sync+0x88>
200f240: 01 00 00 00 nop
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
200f244: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200f248: 80 a0 60 02 cmp %g1, 2
200f24c: 02 80 00 06 be 200f264 <rtems_bdbuf_sync+0x184>
200f250: 01 00 00 00 nop
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
200f254: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200f258: 80 a0 60 01 cmp %g1, 1
200f25c: 12 bf ff c3 bne 200f168 <rtems_bdbuf_sync+0x88> <== NEVER TAKEN
200f260: 01 00 00 00 nop
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
200f264: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200f268: 80 a0 60 01 cmp %g1, 1
200f26c: 02 80 00 18 be 200f2cc <rtems_bdbuf_sync+0x1ec>
200f270: 01 00 00 00 nop
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200f274: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
200f278: 80 a0 60 00 cmp %g1, 0
200f27c: 02 bf ff bb be 200f168 <rtems_bdbuf_sync+0x88>
200f280: 01 00 00 00 nop
{
sc = rtems_semaphore_flush (waiters->sema);
200f284: 40 00 0c ca call 20125ac <rtems_semaphore_flush>
200f288: d0 07 60 7c ld [ %i5 + 0x7c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f28c: 80 a2 20 00 cmp %o0, 0
200f290: 02 bf ff b6 be 200f168 <rtems_bdbuf_sync+0x88> <== ALWAYS TAKEN
200f294: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200f298: 7f ff e6 1a call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f29c: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200f2a0: c2 07 60 68 ld [ %i5 + 0x68 ], %g1
200f2a4: 80 a0 60 00 cmp %g1, 0
200f2a8: 02 bf ff c0 be 200f1a8 <rtems_bdbuf_sync+0xc8>
200f2ac: d0 07 21 08 ld [ %i4 + 0x108 ], %o0
{
sc = rtems_semaphore_flush (waiters->sema);
200f2b0: 40 00 0c bf call 20125ac <rtems_semaphore_flush>
200f2b4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f2b8: 80 a2 20 00 cmp %o0, 0
200f2bc: 22 bf ff bb be,a 200f1a8 <rtems_bdbuf_sync+0xc8> <== ALWAYS TAKEN
200f2c0: d0 07 21 08 ld [ %i4 + 0x108 ], %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200f2c4: 10 bf ff f5 b 200f298 <rtems_bdbuf_sync+0x1b8> <== NOT EXECUTED
200f2c8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
200f2cc: 7f ff f5 df call 200ca48 <rtems_bdbuf_avl_remove.constprop.7>
200f2d0: 90 10 00 18 mov %i0, %o0
200f2d4: 80 a2 20 00 cmp %o0, 0
200f2d8: 12 80 00 0d bne 200f30c <rtems_bdbuf_sync+0x22c> <== NEVER TAKEN
200f2dc: 01 00 00 00 nop
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f2e0: c0 26 20 28 clr [ %i0 + 0x28 ]
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200f2e4: 11 00 80 8e sethi %hi(0x2023800), %o0
200f2e8: 92 10 00 18 mov %i0, %o1
200f2ec: 40 00 0e 1e call 2012b64 <_Chain_Insert>
200f2f0: 90 12 21 4c or %o0, 0x14c, %o0
200f2f4: 30 bf ff e0 b,a 200f274 <rtems_bdbuf_sync+0x194>
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200f2f8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f2fc: 7f ff e6 01 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f300: 90 12 20 14 or %o0, 0x14, %o0 ! 42000014 <RAM_END+0x3fc00014><== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f304: 7f ff e5 ff call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f308: 90 12 20 0d or %o0, 0xd, %o0 <== NOT EXECUTED
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200f30c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED
200f310: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200f314: 7f ff f5 13 call 200c760 <rtems_bdbuf_fatal> <== NOT EXECUTED
200f318: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
0200f320 <rtems_bdbuf_syncdev>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
200f320: 9d e3 bf 98 save %sp, -104, %sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200f324: 35 00 80 8e sethi %hi(0x2023800), %i2
200f328: b6 16 a1 08 or %i2, 0x108, %i3 ! 2023908 <bdbuf_cache>
200f32c: c2 0e e0 88 ldub [ %i3 + 0x88 ], %g1
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
200f330: c0 27 bf f8 clr [ %fp + -8 ]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
200f334: b8 10 00 18 mov %i0, %i4
200f338: ba 10 00 19 mov %i1, %i5
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200f33c: 80 a0 60 00 cmp %g1, 0
200f340: 12 80 00 04 bne 200f350 <rtems_bdbuf_syncdev+0x30> <== ALWAYS TAKEN
200f344: b0 10 20 16 mov 0x16, %i0
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
rtems_bdbuf_unlock_sync ();
rtems_bdbuf_release_disk (dd);
return RTEMS_SUCCESSFUL;
}
200f348: 81 c7 e0 08 ret
200f34c: 81 e8 00 00 restore
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
200f350: 90 10 00 1c mov %i4, %o0
200f354: 92 10 00 19 mov %i1, %o1
200f358: 94 10 20 00 clr %o2
200f35c: 96 07 bf f8 add %fp, -8, %o3
200f360: 98 10 20 00 clr %o4
200f364: 7f ff f5 7d call 200c958 <rtems_bdbuf_obtain_disk.part.6>
200f368: 9a 10 20 00 clr %o5
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dev);
sc = rtems_bdbuf_obtain_disk (dev, 0, &dd, NULL, NULL);
if (sc != RTEMS_SUCCESSFUL)
200f36c: b0 92 20 00 orcc %o0, 0, %i0
200f370: 12 bf ff f6 bne 200f348 <rtems_bdbuf_syncdev+0x28> <== NEVER TAKEN
200f374: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200f378: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0
200f37c: 7f ff e4 35 call 2008450 <rtems_semaphore_obtain>
200f380: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200f384: 80 a2 20 00 cmp %o0, 0
200f388: 12 80 00 35 bne 200f45c <rtems_bdbuf_syncdev+0x13c> <== NEVER TAKEN
200f38c: 92 10 20 00 clr %o1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200f390: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
200f394: 7f ff e4 2f call 2008450 <rtems_semaphore_obtain>
200f398: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200f39c: 80 a2 20 00 cmp %o0, 0
200f3a0: 12 80 00 32 bne 200f468 <rtems_bdbuf_syncdev+0x148> <== NEVER TAKEN
200f3a4: 82 10 20 01 mov 1, %g1
* out task know the id of the requester to wake when done.
*
* The swap out task will negate the sync active flag when no more buffers
* for the device are held on the "modified for sync" queues.
*/
bdbuf_cache.sync_active = true;
200f3a8: c2 2e e0 30 stb %g1, [ %i3 + 0x30 ]
bdbuf_cache.sync_requester = rtems_task_self ();
200f3ac: 40 00 0d 19 call 2012810 <rtems_task_self>
200f3b0: 01 00 00 00 nop
200f3b4: 82 10 00 08 mov %o0, %g1
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200f3b8: d0 06 a1 08 ld [ %i2 + 0x108 ], %o0
*
* The swap out task will negate the sync active flag when no more buffers
* for the device are held on the "modified for sync" queues.
*/
bdbuf_cache.sync_active = true;
bdbuf_cache.sync_requester = rtems_task_self ();
200f3bc: c2 26 e0 34 st %g1, [ %i3 + 0x34 ]
bdbuf_cache.sync_device = dev;
200f3c0: f8 3e e0 38 std %i4, [ %i3 + 0x38 ]
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200f3c4: 7f ff e2 e4 call 2007f54 <rtems_event_send>
200f3c8: 92 10 20 04 mov 4, %o1
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200f3cc: 80 a2 20 00 cmp %o0, 0
200f3d0: 12 80 00 29 bne 200f474 <rtems_bdbuf_syncdev+0x154> <== NEVER TAKEN
200f3d4: 11 10 80 00 sethi %hi(0x42000000), %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200f3d8: 7f ff e4 68 call 2008578 <rtems_semaphore_release>
200f3dc: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f3e0: 80 a2 20 00 cmp %o0, 0
200f3e4: 12 80 00 26 bne 200f47c <rtems_bdbuf_syncdev+0x15c> <== NEVER TAKEN
200f3e8: 92 10 20 00 clr %o1
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
200f3ec: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_event_receive (event,
200f3f0: 90 10 20 02 mov 2, %o0
200f3f4: 94 10 20 00 clr %o2
200f3f8: 7f ff e2 74 call 2007dc8 <rtems_event_receive>
200f3fc: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
200f400: 80 a2 20 00 cmp %o0, 0
200f404: 12 80 00 11 bne 200f448 <rtems_bdbuf_syncdev+0x128> <== NEVER TAKEN
200f408: c2 07 bf fc ld [ %fp + -4 ], %g1
200f40c: 80 a0 60 02 cmp %g1, 2
200f410: 12 80 00 0f bne 200f44c <rtems_bdbuf_syncdev+0x12c> <== NEVER TAKEN
200f414: 11 10 80 00 sethi %hi(0x42000000), %o0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200f418: 7f ff e4 58 call 2008578 <rtems_semaphore_release>
200f41c: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f420: 80 a2 20 00 cmp %o0, 0
200f424: 12 80 00 0c bne 200f454 <rtems_bdbuf_syncdev+0x134> <== NEVER TAKEN
200f428: 11 10 80 00 sethi %hi(0x42000000), %o0
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
200f42c: 7f ff cf ce call 2003364 <rtems_disk_release>
200f430: d0 07 bf f8 ld [ %fp + -8 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200f434: 80 a2 20 00 cmp %o0, 0
200f438: 02 bf ff c4 be 200f348 <rtems_bdbuf_syncdev+0x28> <== ALWAYS TAKEN
200f43c: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
200f440: 7f ff e5 b0 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f444: 90 12 20 1f or %o0, 0x1f, %o0 ! 4200001f <RAM_END+0x3fc0001f><== NOT EXECUTED
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
200f448: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f44c: 7f ff e5 ad call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f450: 90 12 20 1a or %o0, 0x1a, %o0 ! 4200001a <RAM_END+0x3fc0001a><== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f454: 7f ff e5 ab call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f458: 90 12 20 0c or %o0, 0xc, %o0 <== NOT EXECUTED
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f45c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f460: 7f ff e5 a8 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f464: 90 12 20 0b or %o0, 0xb, %o0 ! 4200000b <RAM_END+0x3fc0000b><== NOT EXECUTED
200f468: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f46c: 7f ff e5 a5 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f470: 90 12 20 0d or %o0, 0xd, %o0 ! 4200000d <RAM_END+0x3fc0000d><== NOT EXECUTED
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200f474: 7f ff e5 a3 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f478: 90 12 20 14 or %o0, 0x14, %o0 <== NOT EXECUTED
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
200f47c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f480: 7f ff e5 a0 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f484: 90 12 20 0e or %o0, 0xe, %o0 ! 4200000e <RAM_END+0x3fc0000e><== NOT EXECUTED
0200f704 <rtems_blkdev_generic_ioctl>:
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
200f704: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200f708: c2 06 80 00 ld [ %i2 ], %g1
int rc;
switch (args->command)
200f70c: d2 06 a0 04 ld [ %i2 + 4 ], %o1
200f710: 05 10 01 10 sethi %hi(0x40044000), %g2
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200f714: c6 00 60 38 ld [ %g1 + 0x38 ], %g3
int rc;
switch (args->command)
200f718: 82 10 a2 03 or %g2, 0x203, %g1
200f71c: 80 a2 40 01 cmp %o1, %g1
200f720: 22 80 00 3c be,a 200f810 <rtems_blkdev_generic_ioctl+0x10c><== NEVER TAKEN
200f724: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 <== NOT EXECUTED
200f728: 08 80 00 16 bleu 200f780 <rtems_blkdev_generic_ioctl+0x7c><== NEVER TAKEN
200f72c: 03 08 00 10 sethi %hi(0x20004000), %g1
200f730: 03 20 01 10 sethi %hi(0x80044000), %g1
200f734: 82 10 62 04 or %g1, 0x204, %g1 ! 80044204 <RAM_END+0x7dc44204>
200f738: 80 a2 40 01 cmp %o1, %g1
200f73c: 02 80 00 22 be 200f7c4 <rtems_blkdev_generic_ioctl+0xc0> <== ALWAYS TAKEN
200f740: 03 30 06 10 sethi %hi(0xc0184000), %g1
200f744: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201><== NOT EXECUTED
200f748: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
200f74c: 02 80 00 1a be 200f7b4 <rtems_blkdev_generic_ioctl+0xb0> <== NOT EXECUTED
200f750: 84 10 a2 05 or %g2, 0x205, %g2 <== NOT EXECUTED
200f754: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED
200f758: 22 80 00 21 be,a 200f7dc <rtems_blkdev_generic_ioctl+0xd8><== NOT EXECUTED
200f75c: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 <== NOT EXECUTED
*/
args->ioctl_return = (uint32_t) -1;
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
200f760: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 <== NOT EXECUTED
200f764: d0 00 e0 08 ld [ %g3 + 8 ], %o0 <== NOT EXECUTED
200f768: d4 06 a0 08 ld [ %i2 + 8 ], %o2 <== NOT EXECUTED
200f76c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200f770: b0 10 20 00 clr %i0 <== NOT EXECUTED
200f774: d0 26 a0 0c st %o0, [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f778: 81 c7 e0 08 ret <== NOT EXECUTED
200f77c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
200f780: 82 10 62 06 or %g1, 0x206, %g1 <== NOT EXECUTED
200f784: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
200f788: 02 80 00 1a be 200f7f0 <rtems_blkdev_generic_ioctl+0xec> <== NOT EXECUTED
200f78c: 84 10 a2 02 or %g2, 0x202, %g2 <== NOT EXECUTED
200f790: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED
200f794: 32 bf ff f4 bne,a 200f764 <rtems_blkdev_generic_ioctl+0x60><== NOT EXECUTED
200f798: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 <== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
200f79c: c4 00 e0 24 ld [ %g3 + 0x24 ], %g2 <== NOT EXECUTED
200f7a0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
200f7a4: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
args->ioctl_return = 0;
200f7a8: c0 26 a0 0c clr [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f7ac: 81 c7 e0 08 ret <== NOT EXECUTED
200f7b0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
case RTEMS_BLKIO_REQUEST:
/*
* It is not allowed to directly access the driver circumventing
* the cache.
*/
args->ioctl_return = (uint32_t) -1;
200f7b4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
200f7b8: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f7bc: 81 c7 e0 08 ret <== NOT EXECUTED
200f7c0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
200f7c4: c2 06 a0 08 ld [ %i2 + 8 ], %g1
200f7c8: c2 00 40 00 ld [ %g1 ], %g1
200f7cc: c2 20 e0 20 st %g1, [ %g3 + 0x20 ]
args->ioctl_return = 0;
200f7d0: c0 26 a0 0c clr [ %i2 + 0xc ]
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f7d4: 81 c7 e0 08 ret
200f7d8: 91 e8 20 00 restore %g0, 0, %o0
dd->block_size = *((uint32_t *) args->buffer);
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
200f7dc: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
200f7e0: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
args->ioctl_return = 0;
200f7e4: c0 26 a0 0c clr [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f7e8: 81 c7 e0 08 ret <== NOT EXECUTED
200f7ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
200f7f0: d0 18 c0 00 ldd [ %g3 ], %o0 <== NOT EXECUTED
200f7f4: 7f ff fe cb call 200f320 <rtems_bdbuf_syncdev> <== NOT EXECUTED
200f7f8: b0 10 20 00 clr %i0 <== NOT EXECUTED
args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1);
200f7fc: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
200f800: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED
200f804: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f808: 81 c7 e0 08 ret <== NOT EXECUTED
200f80c: 81 e8 00 00 restore <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->media_block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
200f810: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
200f814: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
args->ioctl_return = 0;
200f818: c0 26 a0 0c clr [ %i2 + 0xc ] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
200f81c: 81 c7 e0 08 ret <== NOT EXECUTED
200f820: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200f4c4 <rtems_blkdev_generic_read>:
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
200f4c4: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200f4c8: c2 06 80 00 ld [ %i2 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
200f4cc: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3
void * arg)
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200f4d0: c2 00 60 38 ld [ %g1 + 0x38 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
200f4d4: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
200f4d8: e6 00 60 20 ld [ %g1 + 0x20 ], %l3
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
200f4dc: f8 18 40 00 ldd [ %g1 ], %i4
args->bytes_moved = 0;
200f4e0: c0 26 a0 1c clr [ %i2 + 0x1c ]
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200f4e4: e0 1e a0 08 ldd [ %i2 + 8 ], %l0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200f4e8: 80 a6 e0 00 cmp %i3, 0
200f4ec: 02 80 00 2e be 200f5a4 <rtems_blkdev_generic_read+0xe0> <== NEVER TAKEN
200f4f0: b0 10 20 00 clr %i0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200f4f4: 94 10 20 00 clr %o2
200f4f8: 96 10 00 13 mov %l3, %o3
200f4fc: 90 10 00 10 mov %l0, %o0
200f500: 40 00 3e e6 call 201f098 <__divdi3>
200f504: 92 10 00 11 mov %l1, %o1
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f508: 90 10 00 10 mov %l0, %o0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200f50c: a4 10 00 09 mov %o1, %l2
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f510: 94 10 20 00 clr %o2
200f514: 92 10 00 11 mov %l1, %o1
200f518: 40 00 3f c6 call 201f430 <__moddi3>
200f51c: 96 10 00 13 mov %l3, %o3
200f520: 10 80 00 18 b 200f580 <rtems_blkdev_generic_read+0xbc>
200f524: a0 10 00 09 mov %o1, %l0
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
200f528: a2 24 c0 10 sub %l3, %l0, %l1
200f52c: 80 a4 40 1b cmp %l1, %i3
200f530: 08 80 00 03 bleu 200f53c <rtems_blkdev_generic_read+0x78> <== ALWAYS TAKEN
200f534: c2 07 bf fc ld [ %fp + -4 ], %g1
200f538: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
200f53c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
200f540: 94 10 00 11 mov %l1, %o2
200f544: 40 00 1c 50 call 2016684 <memcpy>
200f548: 92 02 40 10 add %o1, %l0, %o1
rc = rtems_bdbuf_release(diskbuf);
200f54c: d0 07 bf fc ld [ %fp + -4 ], %o0
200f550: 7f ff fe 5f call 200eecc <rtems_bdbuf_release>
200f554: b2 06 40 11 add %i1, %l1, %i1
args->bytes_moved += copy;
200f558: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
200f55c: b0 10 00 08 mov %o0, %i0
args->bytes_moved += copy;
200f560: 82 00 40 11 add %g1, %l1, %g1
if (rc != RTEMS_SUCCESSFUL)
200f564: 80 a2 20 00 cmp %o0, 0
200f568: 12 80 00 0f bne 200f5a4 <rtems_blkdev_generic_read+0xe0> <== NEVER TAKEN
200f56c: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200f570: b6 a6 c0 11 subcc %i3, %l1, %i3
200f574: 02 80 00 0c be 200f5a4 <rtems_blkdev_generic_read+0xe0> <== ALWAYS TAKEN
200f578: a4 04 a0 01 inc %l2
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
200f57c: a0 10 20 00 clr %l0 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
200f580: 94 10 00 12 mov %l2, %o2
200f584: 96 07 bf fc add %fp, -4, %o3
200f588: 90 10 00 1c mov %i4, %o0
200f58c: 7f ff fd 88 call 200ebac <rtems_bdbuf_read>
200f590: 92 10 00 1d mov %i5, %o1
200f594: b0 10 00 08 mov %o0, %i0
if (rc != RTEMS_SUCCESSFUL)
200f598: 80 a6 20 00 cmp %i0, 0
200f59c: 02 bf ff e3 be 200f528 <rtems_blkdev_generic_read+0x64> <== ALWAYS TAKEN
200f5a0: 90 10 00 19 mov %i1, %o0
blkofs = 0;
block++;
}
return rc;
}
200f5a4: 81 c7 e0 08 ret
200f5a8: 81 e8 00 00 restore
0200f5ac <rtems_blkdev_generic_write>:
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
200f5ac: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200f5b0: c2 06 80 00 ld [ %i2 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
200f5b4: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3
void * arg)
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200f5b8: c2 00 60 38 ld [ %g1 + 0x38 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
200f5bc: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
200f5c0: e6 00 60 20 ld [ %g1 + 0x20 ], %l3
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
200f5c4: f8 18 40 00 ldd [ %g1 ], %i4
args->bytes_moved = 0;
200f5c8: c0 26 a0 1c clr [ %i2 + 0x1c ]
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200f5cc: e0 1e a0 08 ldd [ %i2 + 8 ], %l0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200f5d0: 80 a6 e0 00 cmp %i3, 0
200f5d4: 02 80 00 38 be 200f6b4 <rtems_blkdev_generic_write+0x108> <== NEVER TAKEN
200f5d8: 90 10 20 00 clr %o0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200f5dc: 94 10 20 00 clr %o2
200f5e0: 96 10 00 13 mov %l3, %o3
200f5e4: 90 10 00 10 mov %l0, %o0
200f5e8: 40 00 3e ac call 201f098 <__divdi3>
200f5ec: 92 10 00 11 mov %l1, %o1
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f5f0: 90 10 00 10 mov %l0, %o0
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
200f5f4: a4 10 00 09 mov %o1, %l2
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f5f8: 94 10 20 00 clr %o2
200f5fc: 92 10 00 11 mov %l1, %o1
200f600: 40 00 3f 8c call 201f430 <__moddi3>
200f604: 96 10 00 13 mov %l3, %o3
200f608: 10 80 00 20 b 200f688 <rtems_blkdev_generic_write+0xdc>
200f60c: a0 10 00 09 mov %o1, %l0
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
200f610: 12 80 00 22 bne 200f698 <rtems_blkdev_generic_write+0xec> <== NEVER TAKEN
200f614: 92 10 00 1d mov %i5, %o1
rc = rtems_bdbuf_get(dev, block, &diskbuf);
200f618: 90 10 00 1c mov %i4, %o0
200f61c: 94 10 00 12 mov %l2, %o2
200f620: 7f ff fd 1c call 200ea90 <rtems_bdbuf_get>
200f624: 96 07 bf fc add %fp, -4, %o3
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
200f628: 80 a2 20 00 cmp %o0, 0
200f62c: 12 80 00 22 bne 200f6b4 <rtems_blkdev_generic_write+0x108><== NEVER TAKEN
200f630: 92 10 00 19 mov %i1, %o1
break;
copy = block_size - blkofs;
200f634: a2 24 c0 10 sub %l3, %l0, %l1
200f638: 80 a4 40 1b cmp %l1, %i3
200f63c: 08 80 00 03 bleu 200f648 <rtems_blkdev_generic_write+0x9c><== ALWAYS TAKEN
200f640: c2 07 bf fc ld [ %fp + -4 ], %g1
200f644: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
200f648: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
200f64c: 94 10 00 11 mov %l1, %o2
200f650: 40 00 1c 0d call 2016684 <memcpy>
200f654: 90 02 00 10 add %o0, %l0, %o0
args->bytes_moved += copy;
200f658: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
rc = rtems_bdbuf_release_modified(diskbuf);
200f65c: d0 07 bf fc ld [ %fp + -4 ], %o0
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
200f660: 82 00 40 11 add %g1, %l1, %g1
rc = rtems_bdbuf_release_modified(diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
200f664: b2 06 40 11 add %i1, %l1, %i1
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
rc = rtems_bdbuf_release_modified(diskbuf);
200f668: 7f ff fe 6f call 200f024 <rtems_bdbuf_release_modified>
200f66c: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
if (rc != RTEMS_SUCCESSFUL)
200f670: 80 a2 20 00 cmp %o0, 0
200f674: 12 80 00 10 bne 200f6b4 <rtems_blkdev_generic_write+0x108><== NEVER TAKEN
200f678: b6 a6 c0 11 subcc %i3, %l1, %i3
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
200f67c: 02 80 00 0e be 200f6b4 <rtems_blkdev_generic_write+0x108> <== ALWAYS TAKEN
200f680: a4 04 a0 01 inc %l2
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
200f684: a0 10 20 00 clr %l0 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
200f688: 80 a6 c0 13 cmp %i3, %l3
200f68c: 1a bf ff e1 bcc 200f610 <rtems_blkdev_generic_write+0x64> <== ALWAYS TAKEN
200f690: 80 a4 20 00 cmp %l0, 0
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
200f694: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f698: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
200f69c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
200f6a0: 7f ff fd 43 call 200ebac <rtems_bdbuf_read> <== NOT EXECUTED
200f6a4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
200f6a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200f6ac: 02 bf ff e2 be 200f634 <rtems_blkdev_generic_write+0x88> <== NOT EXECUTED
200f6b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
200f6b4: 81 c7 e0 08 ret
200f6b8: 91 e8 00 08 restore %g0, %o0, %o0
0200f824 <rtems_blkdev_ioctl>:
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200f824: 9d e3 bf a0 save %sp, -96, %sp
size_t *arg_size = argp;
int rc = 0;
switch (req)
200f828: 03 10 01 10 sethi %hi(0x40044000), %g1
200f82c: 84 10 62 03 or %g1, 0x203, %g2 ! 40044203 <RAM_END+0x3dc44203>
200f830: 80 a6 40 02 cmp %i1, %g2
200f834: 22 80 00 1f be,a 200f8b0 <rtems_blkdev_ioctl+0x8c> <== NEVER TAKEN
200f838: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED
200f83c: 38 80 00 0d bgu,a 200f870 <rtems_blkdev_ioctl+0x4c>
200f840: 82 10 62 05 or %g1, 0x205, %g1
200f844: 82 10 62 02 or %g1, 0x202, %g1
200f848: 80 a6 40 01 cmp %i1, %g1
200f84c: 22 80 00 1d be,a 200f8c0 <rtems_blkdev_ioctl+0x9c> <== NEVER TAKEN
200f850: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
200f854: 40 00 19 30 call 2015d14 <__errno>
200f858: 01 00 00 00 nop
rc = -1;
200f85c: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
200f860: 84 10 20 16 mov 0x16, %g2
200f864: c4 22 00 00 st %g2, [ %o0 ]
rc = -1;
break;
}
return rc;
}
200f868: 81 c7 e0 08 ret
200f86c: 91 e8 00 01 restore %g0, %g1, %o0
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
200f870: 80 a6 40 01 cmp %i1, %g1
200f874: 02 80 00 0a be 200f89c <rtems_blkdev_ioctl+0x78> <== NEVER TAKEN
200f878: 03 20 01 10 sethi %hi(0x80044000), %g1
200f87c: 82 10 62 04 or %g1, 0x204, %g1 ! 80044204 <RAM_END+0x7dc44204>
200f880: 80 a6 40 01 cmp %i1, %g1
200f884: 12 bf ff f4 bne 200f854 <rtems_blkdev_ioctl+0x30> <== NEVER TAKEN
200f888: 82 10 20 00 clr %g1
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
200f88c: c4 06 80 00 ld [ %i2 ], %g2
200f890: c4 26 20 20 st %g2, [ %i0 + 0x20 ]
rc = -1;
break;
}
return rc;
}
200f894: 81 c7 e0 08 ret
200f898: 91 e8 00 01 restore %g0, %g1, %o0
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
200f89c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f8a0: 82 10 20 00 clr %g1 <== NOT EXECUTED
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
200f8a4: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
200f8a8: 81 c7 e0 08 ret <== NOT EXECUTED
200f8ac: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f8b0: 82 10 20 00 clr %g1 <== NOT EXECUTED
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
200f8b4: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
200f8b8: 81 c7 e0 08 ret <== NOT EXECUTED
200f8bc: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f8c0: 82 10 20 00 clr %g1 <== NOT EXECUTED
switch (req)
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
200f8c4: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
200f8c8: 81 c7 e0 08 ret <== NOT EXECUTED
200f8cc: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
02002868 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
2002868: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
if ( !name )
200286c: 80 a6 20 00 cmp %i0, 0
2002870: 02 80 00 35 be 2002944 <rtems_bsp_cmdline_get_param+0xdc>
2002874: 80 a6 60 00 cmp %i1, 0
return NULL;
if ( !value )
2002878: 02 80 00 31 be 200293c <rtems_bsp_cmdline_get_param+0xd4>
200287c: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( !length )
2002880: 22 80 00 32 be,a 2002948 <rtems_bsp_cmdline_get_param+0xe0>
2002884: b2 10 20 00 clr %i1
return NULL;
value[0] = '\0';
2002888: c0 2e 40 00 clrb [ %i1 ]
p = rtems_bsp_cmdline_get_param_raw( name );
200288c: 40 00 00 31 call 2002950 <rtems_bsp_cmdline_get_param_raw>
2002890: 90 10 00 18 mov %i0, %o0
if ( !p )
2002894: 80 a2 20 00 cmp %o0, 0
2002898: 22 80 00 2c be,a 2002948 <rtems_bsp_cmdline_get_param+0xe0>
200289c: b2 10 20 00 clr %i1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20028a0: c6 0a 00 00 ldub [ %o0 ], %g3
20028a4: 85 28 e0 18 sll %g3, 0x18, %g2
20028a8: 80 a0 a0 00 cmp %g2, 0
20028ac: 02 80 00 24 be 200293c <rtems_bsp_cmdline_get_param+0xd4> <== NEVER TAKEN
20028b0: b4 86 bf ff addcc %i2, -1, %i2
20028b4: 02 80 00 22 be 200293c <rtems_bsp_cmdline_get_param+0xd4> <== NEVER TAKEN
20028b8: 88 10 20 00 clr %g4
20028bc: 82 10 20 00 clr %g1
20028c0: 10 80 00 12 b 2002908 <rtems_bsp_cmdline_get_param+0xa0>
20028c4: b0 10 20 00 clr %i0
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
20028c8: 32 80 00 06 bne,a 20028e0 <rtems_bsp_cmdline_get_param+0x78>
20028cc: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
20028d0: 80 a0 a0 20 cmp %g2, 0x20
20028d4: 02 80 00 1a be 200293c <rtems_bsp_cmdline_get_param+0xd4>
20028d8: 01 00 00 00 nop
break;
value[i++] = *p++;
20028dc: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
20028e0: 82 00 60 01 inc %g1
value[i] = '\0';
20028e4: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20028e8: c6 0a 20 01 ldub [ %o0 + 1 ], %g3
20028ec: 85 28 e0 18 sll %g3, 0x18, %g2
20028f0: 80 a0 a0 00 cmp %g2, 0
20028f4: 02 80 00 12 be 200293c <rtems_bsp_cmdline_get_param+0xd4>
20028f8: 88 10 00 01 mov %g1, %g4
20028fc: 80 a6 80 01 cmp %i2, %g1
2002900: 08 80 00 0f bleu 200293c <rtems_bsp_cmdline_get_param+0xd4>
2002904: 90 02 20 01 inc %o0
if ( *p == '\"' ) {
2002908: 85 38 a0 18 sra %g2, 0x18, %g2
200290c: 80 a0 a0 22 cmp %g2, 0x22
2002910: 12 bf ff ee bne 20028c8 <rtems_bsp_cmdline_get_param+0x60>
2002914: 80 8e 20 01 btst 1, %i0
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
2002918: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
200291c: 82 00 60 01 inc %g1
value[i] = '\0';
2002920: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2002924: c6 0a 20 01 ldub [ %o0 + 1 ], %g3
if ( *p == '\"' ) {
quotes++;
2002928: b0 06 20 01 inc %i0
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
200292c: 85 28 e0 18 sll %g3, 0x18, %g2
2002930: 80 a0 a0 00 cmp %g2, 0
2002934: 12 bf ff f2 bne 20028fc <rtems_bsp_cmdline_get_param+0x94><== ALWAYS TAKEN
2002938: 88 10 00 01 mov %g1, %g4
return NULL;
copy_string( p, value, length );
return value;
}
200293c: 81 c7 e0 08 ret
2002940: 91 e8 00 19 restore %g0, %i1, %o0
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
2002944: b2 10 20 00 clr %i1
copy_string( p, value, length );
return value;
}
2002948: 81 c7 e0 08 ret
200294c: 91 e8 00 19 restore %g0, %i1, %o0
02007ec8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
2007ec8: 9d e3 bf 98 save %sp, -104, %sp
2007ecc: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
2007ed0: 40 00 01 b2 call 2008598 <_Chain_Get>
2007ed4: 90 10 00 1d mov %i5, %o0
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
2007ed8: 92 10 20 00 clr %o1
2007edc: b8 10 00 08 mov %o0, %i4
2007ee0: 94 10 00 1a mov %i2, %o2
2007ee4: 90 10 00 19 mov %i1, %o0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2007ee8: 80 a7 20 00 cmp %i4, 0
2007eec: 12 80 00 0a bne 2007f14 <rtems_chain_get_with_wait+0x4c>
2007ef0: 96 07 bf fc add %fp, -4, %o3
) {
rtems_event_set out;
sc = rtems_event_receive(
2007ef4: 7f ff fc f4 call 20072c4 <rtems_event_receive>
2007ef8: 01 00 00 00 nop
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
2007efc: 80 a2 20 00 cmp %o0, 0
2007f00: 02 bf ff f4 be 2007ed0 <rtems_chain_get_with_wait+0x8> <== NEVER TAKEN
2007f04: b0 10 00 08 mov %o0, %i0
timeout,
&out
);
}
*node_ptr = node;
2007f08: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
2007f0c: 81 c7 e0 08 ret
2007f10: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2007f14: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
2007f18: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
2007f1c: 81 c7 e0 08 ret
2007f20: 91 e8 00 08 restore %g0, %o0, %o0
020033e4 <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
20033e4: 9d e3 bf 70 save %sp, -144, %sp
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
20033e8: 80 a6 60 00 cmp %i1, 0
20033ec: 02 80 00 81 be 20035f0 <rtems_cpu_usage_report_with_plugin+0x20c><== NEVER TAKEN
20033f0: 03 00 80 89 sethi %hi(0x2022400), %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
20033f4: c0 27 bf e8 clr [ %fp + -24 ]
20033f8: c0 27 bf ec clr [ %fp + -20 ]
}
}
}
#endif
(*print)(
20033fc: 90 10 00 18 mov %i0, %o0
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
2003400: e8 18 61 10 ldd [ %g1 + 0x110 ], %l4
}
}
}
#endif
(*print)(
2003404: 13 00 80 7c sethi %hi(0x201f000), %o1
2003408: 25 00 80 87 sethi %hi(0x2021c00), %l2
200340c: 92 12 60 a0 or %o1, 0xa0, %o1
2003410: a4 14 a2 9c or %l2, 0x29c, %l2
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2003414: 21 00 80 7c sethi %hi(0x201f000), %l0
}
}
}
#endif
(*print)(
2003418: 9f c6 40 00 call %i1
200341c: 23 00 80 7c sethi %hi(0x201f000), %l1
#endif
/*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
2003420: ac 04 a0 0c add %l2, 0xc, %l6
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2003424: a0 14 22 18 or %l0, 0x218, %l0
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
2003428: a2 14 62 30 or %l1, 0x230, %l1
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
200342c: c2 04 80 00 ld [ %l2 ], %g1
2003430: f4 00 60 04 ld [ %g1 + 4 ], %i2
if ( information ) {
2003434: 80 a6 a0 00 cmp %i2, 0
2003438: 22 80 00 54 be,a 2003588 <rtems_cpu_usage_report_with_plugin+0x1a4><== NEVER TAKEN
200343c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
2003440: c2 16 a0 10 lduh [ %i2 + 0x10 ], %g1
2003444: 86 90 60 00 orcc %g1, 0, %g3
2003448: 02 80 00 4f be 2003584 <rtems_cpu_usage_report_with_plugin+0x1a0>
200344c: b6 10 20 01 mov 1, %i3
the_thread = (Thread_Control *)information->local_table[ i ];
2003450: 10 80 00 2c b 2003500 <rtems_cpu_usage_report_with_plugin+0x11c>
2003454: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
2003458: 40 00 19 53 call 20099a4 <_TOD_Get_uptime>
200345c: 01 00 00 00 nop
2003460: d4 1f bf e0 ldd [ %fp + -32 ], %o2
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2003464: 86 a2 c0 15 subcc %o3, %l5, %g3
2003468: 84 62 80 14 subx %o2, %l4, %g2
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
200346c: 90 07 bf f0 add %fp, -16, %o0
2003470: c4 3f bf e8 std %g2, [ %fp + -24 ]
2003474: 92 07 bf e8 add %fp, -24, %o1
2003478: 94 07 bf f8 add %fp, -8, %o2
200347c: 40 00 23 75 call 200c250 <_Timestamp64_Divide>
2003480: 96 07 bf fc add %fp, -4, %o3
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
2003484: f8 1f bf f0 ldd [ %fp + -16 ], %i4
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
2003488: 94 10 20 00 clr %o2
200348c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003490: 90 10 00 1c mov %i4, %o0
2003494: 96 12 e2 00 or %o3, 0x200, %o3
2003498: 40 00 65 34 call 201c968 <__divdi3>
200349c: 92 10 00 1d mov %i5, %o1
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
20034a0: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
20034a4: a6 10 00 09 mov %o1, %l3
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
20034a8: 90 10 00 1c mov %i4, %o0
20034ac: 92 10 00 1d mov %i5, %o1
20034b0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20034b4: 40 00 66 13 call 201cd00 <__moddi3>
20034b8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
20034bc: 90 10 00 09 mov %o1, %o0
20034c0: 40 00 63 d2 call 201c408 <.udiv>
20034c4: 92 10 23 e8 mov 0x3e8, %o1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
20034c8: d8 1f bf f8 ldd [ %fp + -8 ], %o4
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
20034cc: 96 10 00 08 mov %o0, %o3
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
20034d0: 92 10 00 11 mov %l1, %o1
20034d4: 90 10 00 18 mov %i0, %o0
20034d8: 9f c6 40 00 call %i1
20034dc: 94 10 00 13 mov %l3, %o2
20034e0: c6 16 a0 10 lduh [ %i2 + 0x10 ], %g3
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
20034e4: b6 06 e0 01 inc %i3
20034e8: 83 28 e0 10 sll %g3, 0x10, %g1
20034ec: 83 30 60 10 srl %g1, 0x10, %g1
20034f0: 80 a0 40 1b cmp %g1, %i3
20034f4: 2a 80 00 25 bcs,a 2003588 <rtems_cpu_usage_report_with_plugin+0x1a4>
20034f8: a4 04 a0 04 add %l2, 4, %l2
the_thread = (Thread_Control *)information->local_table[ i ];
20034fc: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2
2003500: 83 2e e0 02 sll %i3, 2, %g1
2003504: f8 00 80 01 ld [ %g2 + %g1 ], %i4
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2003508: 94 07 bf d0 add %fp, -48, %o2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
200350c: 80 a7 20 00 cmp %i4, 0
2003510: 02 bf ff f5 be 20034e4 <rtems_cpu_usage_report_with_plugin+0x100><== NEVER TAKEN
2003514: 92 10 20 0d mov 0xd, %o1
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2003518: 40 00 13 cc call 2008448 <rtems_object_get_name>
200351c: d0 07 20 08 ld [ %i4 + 8 ], %o0
(*print)(
2003520: d4 07 20 08 ld [ %i4 + 8 ], %o2
2003524: 90 10 00 18 mov %i0, %o0
2003528: 92 10 00 10 mov %l0, %o1
200352c: 9f c6 40 00 call %i1
2003530: 96 07 bf d0 add %fp, -48, %o3
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003534: 03 00 80 89 sethi %hi(0x2022400), %g1
2003538: 82 10 60 b0 or %g1, 0xb0, %g1 ! 20224b0 <_Per_CPU_Information>
200353c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2003540: c4 1f 20 80 ldd [ %i4 + 0x80 ], %g2
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003544: de 01 20 08 ld [ %g4 + 8 ], %o7
2003548: c8 07 20 08 ld [ %i4 + 8 ], %g4
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
200354c: c4 3f bf f0 std %g2, [ %fp + -16 ]
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003550: 80 a3 c0 04 cmp %o7, %g4
2003554: 12 bf ff c1 bne 2003458 <rtems_cpu_usage_report_with_plugin+0x74>
2003558: 90 07 bf e0 add %fp, -32, %o0
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
200355c: 40 00 19 12 call 20099a4 <_TOD_Get_uptime>
2003560: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2003564: d8 1f bf f0 ldd [ %fp + -16 ], %o4
_Timestamp_Subtract( &last, &uptime, &used );
2003568: d4 1f bf e0 ldd [ %fp + -32 ], %o2
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200356c: 86 a2 c0 1d subcc %o3, %i5, %g3
2003570: 84 62 80 1c subx %o2, %i4, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2003574: 86 83 40 03 addcc %o5, %g3, %g3
2003578: 84 43 00 02 addx %o4, %g2, %g2
200357c: 10 bf ff ba b 2003464 <rtems_cpu_usage_report_with_plugin+0x80>
2003580: c4 3f bf f0 std %g2, [ %fp + -16 ]
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2003584: a4 04 a0 04 add %l2, 4, %l2
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
2003588: 80 a4 80 16 cmp %l2, %l6
200358c: 32 bf ff a9 bne,a 2003430 <rtems_cpu_usage_report_with_plugin+0x4c>
2003590: c2 04 80 00 ld [ %l2 ], %g1
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
2003594: f8 1f bf e8 ldd [ %fp + -24 ], %i4
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
2003598: 94 10 20 00 clr %o2
200359c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20035a0: 90 10 00 1c mov %i4, %o0
20035a4: 96 12 e2 00 or %o3, 0x200, %o3
20035a8: 40 00 64 f0 call 201c968 <__divdi3>
20035ac: 92 10 00 1d mov %i5, %o1
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
20035b0: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
20035b4: b6 10 00 09 mov %o1, %i3
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
20035b8: 90 10 00 1c mov %i4, %o0
20035bc: 92 10 00 1d mov %i5, %o1
20035c0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20035c4: 40 00 65 cf call 201cd00 <__moddi3>
20035c8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
20035cc: 90 10 00 09 mov %o1, %o0
20035d0: 40 00 63 8e call 201c408 <.udiv>
20035d4: 92 10 23 e8 mov 0x3e8, %o1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
20035d8: 13 00 80 7c sethi %hi(0x201f000), %o1
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
20035dc: 96 10 00 08 mov %o0, %o3
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
20035e0: 94 10 00 1b mov %i3, %o2
20035e4: 90 10 00 18 mov %i0, %o0
20035e8: 9f c6 40 00 call %i1
20035ec: 92 12 62 48 or %o1, 0x248, %o1
20035f0: 81 c7 e0 08 ret
20035f4: 81 e8 00 00 restore
020114dc <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
20114dc: 9d e3 bf a0 save %sp, -96, %sp
if (sc == RTEMS_SUCCESSFUL) {
20114e0: 80 a6 20 00 cmp %i0, 0
20114e4: 12 80 00 04 bne 20114f4 <rtems_deviceio_errno+0x18>
20114e8: 82 10 20 00 clr %g1
errno = eno;
return -1;
}
}
20114ec: 81 c7 e0 08 ret
20114f0: 91 e8 00 01 restore %g0, %g1, %o0
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
20114f4: 80 a6 20 1c cmp %i0, 0x1c
20114f8: 18 80 00 06 bgu 2011510 <rtems_deviceio_errno+0x34> <== NEVER TAKEN
20114fc: ba 10 20 16 mov 0x16, %i5
eno = status_code_to_errno [sc];
2011500: b1 2e 20 02 sll %i0, 2, %i0
2011504: 03 00 80 76 sethi %hi(0x201d800), %g1
2011508: 82 10 61 d8 or %g1, 0x1d8, %g1 ! 201d9d8 <status_code_to_errno>
201150c: fa 00 40 18 ld [ %g1 + %i0 ], %i5
}
errno = eno;
2011510: 40 00 00 30 call 20115d0 <__errno>
2011514: 01 00 00 00 nop
return -1;
2011518: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
201151c: 10 bf ff f4 b 20114ec <rtems_deviceio_errno+0x10>
2011520: fa 22 00 00 st %i5, [ %o0 ]
02002d28 <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum begin_block,
rtems_blkdev_bnum block_count,
const char *name
)
{
2002d28: 9d e3 bf 98 save %sp, -104, %sp
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2002d2c: 25 00 80 8d sethi %hi(0x2023400), %l2
2002d30: d0 04 a3 e8 ld [ %l2 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
const char *name
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *physical_disk = NULL;
rtems_disk_device *dd = NULL;
2002d34: c0 27 bf fc clr [ %fp + -4 ]
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2002d38: 92 10 20 00 clr %o1
2002d3c: 94 10 20 00 clr %o2
2002d40: 40 00 15 c4 call 2008450 <rtems_semaphore_obtain>
2002d44: a0 10 00 18 mov %i0, %l0
if (sc == RTEMS_SUCCESSFUL) {
2002d48: 80 a2 20 00 cmp %o0, 0
2002d4c: 12 80 00 38 bne 2002e2c <rtems_disk_create_log+0x104> <== NEVER TAKEN
2002d50: b0 10 20 16 mov 0x16, %i0
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
2002d54: 03 00 80 8d sethi %hi(0x2023400), %g1
2002d58: c4 00 63 ec ld [ %g1 + 0x3ec ], %g2 ! 20237ec <disktab_size>
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
2002d5c: 86 10 20 01 mov 1, %g3
2002d60: 03 00 80 8d sethi %hi(0x2023400), %g1
2002d64: c6 28 63 e4 stb %g3, [ %g1 + 0x3e4 ] ! 20237e4 <diskdevs_protected>
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
2002d68: 80 a6 80 02 cmp %i2, %g2
2002d6c: 1a 80 00 18 bcc 2002dcc <rtems_disk_create_log+0xa4> <== NEVER TAKEN
2002d70: 05 00 80 8d sethi %hi(0x2023400), %g2
2002d74: c4 00 a3 f0 ld [ %g2 + 0x3f0 ], %g2 ! 20237f0 <disktab>
2002d78: 80 a0 a0 00 cmp %g2, 0
2002d7c: 02 80 00 14 be 2002dcc <rtems_disk_create_log+0xa4> <== NEVER TAKEN
2002d80: b5 2e a0 03 sll %i2, 3, %i2
rtems_disk_device_table *dtab = disktab + major;
2002d84: 86 00 80 1a add %g2, %i2, %g3
if (minor < dtab->size && dtab->minor != NULL) {
2002d88: c6 00 e0 04 ld [ %g3 + 4 ], %g3
2002d8c: 80 a6 c0 03 cmp %i3, %g3
2002d90: 1a 80 00 10 bcc 2002dd0 <rtems_disk_create_log+0xa8> <== NEVER TAKEN
2002d94: d0 04 a3 e8 ld [ %l2 + 0x3e8 ], %o0
2002d98: c4 00 80 1a ld [ %g2 + %i2 ], %g2
2002d9c: 80 a0 a0 00 cmp %g2, 0
2002da0: 02 80 00 0c be 2002dd0 <rtems_disk_create_log+0xa8> <== NEVER TAKEN
2002da4: 01 00 00 00 nop
rtems_disk_device *dd = dtab->minor [minor];
2002da8: b7 2e e0 02 sll %i3, 2, %i3
2002dac: c4 00 80 1b ld [ %g2 + %i3 ], %g2
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
2002db0: 80 a0 a0 00 cmp %g2, 0
2002db4: 02 80 00 07 be 2002dd0 <rtems_disk_create_log+0xa8>
2002db8: 01 00 00 00 nop
}
static bool
is_physical_disk(const rtems_disk_device *dd)
{
return dd->phys_dev == dd;
2002dbc: f6 00 a0 08 ld [ %g2 + 8 ], %i3
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
2002dc0: 80 a6 c0 02 cmp %i3, %g2
2002dc4: 02 80 00 0b be 2002df0 <rtems_disk_create_log+0xc8>
2002dc8: 84 07 40 1c add %i5, %i4, %g2
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2002dcc: d0 04 a3 e8 ld [ %l2 + 0x3e8 ], %o0
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2002dd0: c0 28 63 e4 clrb [ %g1 + 0x3e4 ]
sc = rtems_semaphore_release(diskdevs_mutex);
2002dd4: 40 00 15 e9 call 2008578 <rtems_semaphore_release>
2002dd8: b0 10 20 04 mov 4, %i0
if (sc != RTEMS_SUCCESSFUL) {
2002ddc: 80 a2 20 00 cmp %o0, 0
2002de0: 02 80 00 13 be 2002e2c <rtems_disk_create_log+0x104> <== ALWAYS TAKEN
2002de4: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2002de8: 40 00 17 46 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002dec: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <RAM_END+0xdc6dbeef><== NOT EXECUTED
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
2002df0: 80 a7 00 02 cmp %i4, %g2
2002df4: 1a 80 00 07 bcc 2002e10 <rtems_disk_create_log+0xe8>
2002df8: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3
2002dfc: 80 a7 00 03 cmp %i4, %g3
2002e00: 1a 80 00 04 bcc 2002e10 <rtems_disk_create_log+0xe8> <== NEVER TAKEN
2002e04: 80 a0 80 03 cmp %g2, %g3
begin_block >= physical_disk->size
|| end_block <= begin_block
|| end_block > physical_disk->size
2002e08: 08 80 00 0b bleu 2002e34 <rtems_disk_create_log+0x10c>
2002e0c: d4 07 a0 5c ld [ %fp + 0x5c ], %o2
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2002e10: d0 04 a3 e8 ld [ %l2 + 0x3e8 ], %o0
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2002e14: c0 28 63 e4 clrb [ %g1 + 0x3e4 ]
sc = rtems_semaphore_release(diskdevs_mutex);
2002e18: 40 00 15 d8 call 2008578 <rtems_semaphore_release>
2002e1c: b0 10 20 0a mov 0xa, %i0
if (sc != RTEMS_SUCCESSFUL) {
2002e20: 80 a2 20 00 cmp %o0, 0
2002e24: 12 bf ff f1 bne 2002de8 <rtems_disk_create_log+0xc0> <== NEVER TAKEN
2002e28: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2002e2c: 81 c7 e0 08 ret
2002e30: 81 e8 00 00 restore
disk_unlock();
return RTEMS_INVALID_NUMBER;
}
sc = create_disk(dev, name, &dd);
2002e34: 90 10 00 10 mov %l0, %o0
2002e38: 92 10 00 19 mov %i1, %o1
2002e3c: 7f ff ff 12 call 2002a84 <create_disk>
2002e40: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2002e44: b0 92 20 00 orcc %o0, 0, %i0
2002e48: 12 80 00 11 bne 2002e8c <rtems_disk_create_log+0x164>
2002e4c: c2 07 bf fc ld [ %fp + -4 ], %g1
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
2002e50: c6 06 e0 14 ld [ %i3 + 0x14 ], %g3
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
2002e54: c4 06 e0 20 ld [ %i3 + 0x20 ], %g2
dd->ioctl = physical_disk->ioctl;
2002e58: f4 06 e0 28 ld [ %i3 + 0x28 ], %i2
dd->driver_data = physical_disk->driver_data;
2002e5c: c8 06 e0 2c ld [ %i3 + 0x2c ], %g4
++physical_disk->uses;
2002e60: 86 00 e0 01 inc %g3
return sc;
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
2002e64: f8 38 60 18 std %i4, [ %g1 + 0x18 ]
disk_unlock();
return sc;
}
dd->phys_dev = physical_disk;
2002e68: f6 20 60 08 st %i3, [ %g1 + 8 ]
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
2002e6c: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2002e70: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
dd->ioctl = physical_disk->ioctl;
2002e74: f4 20 60 28 st %i2, [ %g1 + 0x28 ]
dd->driver_data = physical_disk->driver_data;
2002e78: c8 20 60 2c st %g4, [ %g1 + 0x2c ]
++physical_disk->uses;
disk_unlock();
2002e7c: 7f ff fe f3 call 2002a48 <disk_unlock>
2002e80: c6 26 e0 14 st %g3, [ %i3 + 0x14 ]
return RTEMS_SUCCESSFUL;
}
2002e84: 81 c7 e0 08 ret
2002e88: 81 e8 00 00 restore
return RTEMS_INVALID_NUMBER;
}
sc = create_disk(dev, name, &dd);
if (sc != RTEMS_SUCCESSFUL) {
disk_unlock();
2002e8c: 7f ff fe ef call 2002a48 <disk_unlock>
2002e90: 01 00 00 00 nop
return sc;
2002e94: 81 c7 e0 08 ret
2002e98: 81 e8 00 00 restore
02002c44 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
2002c44: 9d e3 bf 98 save %sp, -104, %sp
rtems_disk_device *dd = NULL;
2002c48: c0 27 bf fc clr [ %fp + -4 ]
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
2002c4c: a0 10 00 18 mov %i0, %l0
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
2002c50: 80 a7 20 00 cmp %i4, 0
2002c54: 02 80 00 07 be 2002c70 <rtems_disk_create_phys+0x2c>
2002c58: a2 10 00 19 mov %i1, %l1
return RTEMS_INVALID_ADDRESS;
}
if (block_size == 0) {
2002c5c: 80 a6 a0 00 cmp %i2, 0
2002c60: 12 80 00 06 bne 2002c78 <rtems_disk_create_phys+0x34>
2002c64: b0 10 20 0a mov 0xa, %i0
}
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2002c68: 81 c7 e0 08 ret
2002c6c: 81 e8 00 00 restore
2002c70: 81 c7 e0 08 ret
2002c74: 91 e8 20 09 restore %g0, 9, %o0
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2002c78: 33 00 80 8d sethi %hi(0x2023400), %i1
2002c7c: d0 06 63 e8 ld [ %i1 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
2002c80: 92 10 20 00 clr %o1
2002c84: 94 10 20 00 clr %o2
2002c88: 40 00 15 f2 call 2008450 <rtems_semaphore_obtain>
2002c8c: b0 10 20 16 mov 0x16, %i0
if (sc == RTEMS_SUCCESSFUL) {
2002c90: 80 a2 20 00 cmp %o0, 0
2002c94: 12 bf ff f5 bne 2002c68 <rtems_disk_create_phys+0x24> <== NEVER TAKEN
2002c98: d4 07 a0 5c ld [ %fp + 0x5c ], %o2
diskdevs_protected = true;
2002c9c: 82 10 20 01 mov 1, %g1
2002ca0: 25 00 80 8d sethi %hi(0x2023400), %l2
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
sc = create_disk(dev, name, &dd);
2002ca4: 90 10 00 10 mov %l0, %o0
2002ca8: 92 10 00 11 mov %l1, %o1
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
2002cac: c2 2c a3 e4 stb %g1, [ %l2 + 0x3e4 ]
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
sc = create_disk(dev, name, &dd);
2002cb0: 7f ff ff 75 call 2002a84 <create_disk>
2002cb4: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2002cb8: b0 92 20 00 orcc %o0, 0, %i0
2002cbc: 12 80 00 10 bne 2002cfc <rtems_disk_create_phys+0xb8>
2002cc0: c2 07 bf fc ld [ %fp + -4 ], %g1
dd->size = block_count;
dd->block_size = dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
2002cc4: 13 08 00 10 sethi %hi(0x20004000), %o1
2002cc8: 90 10 00 01 mov %g1, %o0
disk_unlock();
return sc;
}
dd->phys_dev = dd;
2002ccc: c2 20 60 08 st %g1, [ %g1 + 8 ]
dd->start = 0;
2002cd0: c0 20 60 18 clr [ %g1 + 0x18 ]
dd->size = block_count;
2002cd4: f6 20 60 1c st %i3, [ %g1 + 0x1c ]
dd->block_size = dd->media_block_size = block_size;
2002cd8: f4 20 60 24 st %i2, [ %g1 + 0x24 ]
2002cdc: f4 20 60 20 st %i2, [ %g1 + 0x20 ]
dd->ioctl = handler;
dd->driver_data = driver_data;
2002ce0: f8 38 60 28 std %i4, [ %g1 + 0x28 ]
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
2002ce4: 92 12 62 08 or %o1, 0x208, %o1
2002ce8: 9f c7 00 00 call %i4
2002cec: 94 00 60 0c add %g1, 0xc, %o2
2002cf0: 80 a2 20 00 cmp %o0, 0
2002cf4: 06 80 00 0b bl 2002d20 <rtems_disk_create_phys+0xdc> <== ALWAYS TAKEN
2002cf8: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2002cfc: d0 06 63 e8 ld [ %i1 + 0x3e8 ], %o0
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2002d00: c0 2c a3 e4 clrb [ %l2 + 0x3e4 ]
sc = rtems_semaphore_release(diskdevs_mutex);
2002d04: 40 00 16 1d call 2008578 <rtems_semaphore_release>
2002d08: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2002d0c: 80 a2 20 00 cmp %o0, 0
2002d10: 02 bf ff d6 be 2002c68 <rtems_disk_create_phys+0x24> <== ALWAYS TAKEN
2002d14: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2002d18: 40 00 17 7a call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002d1c: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <RAM_END+0xdc6dbeef><== NOT EXECUTED
dd->block_size = dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
dd->capabilities = 0;
2002d20: 10 bf ff f7 b 2002cfc <rtems_disk_create_phys+0xb8>
2002d24: c0 20 60 0c clr [ %g1 + 0xc ]
02002e9c <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
2002e9c: 9d e3 bf a0 save %sp, -96, %sp
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2002ea0: 29 00 80 8d sethi %hi(0x2023400), %l4
2002ea4: d0 05 23 e8 ld [ %l4 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
2002ea8: 92 10 20 00 clr %o1
2002eac: 94 10 20 00 clr %o2
2002eb0: 40 00 15 68 call 2008450 <rtems_semaphore_obtain>
2002eb4: ba 10 00 18 mov %i0, %i5
if (sc == RTEMS_SUCCESSFUL) {
2002eb8: 80 a2 20 00 cmp %o0, 0
2002ebc: 12 80 00 9a bne 2003124 <rtems_disk_delete+0x288> <== NEVER TAKEN
2002ec0: b0 10 20 16 mov 0x16, %i0
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
2002ec4: 23 00 80 8d sethi %hi(0x2023400), %l1
2002ec8: c8 04 63 ec ld [ %l1 + 0x3ec ], %g4 ! 20237ec <disktab_size>
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
2002ecc: 2d 00 80 8d sethi %hi(0x2023400), %l6
2002ed0: 84 10 20 01 mov 1, %g2
2002ed4: c4 2d a3 e4 stb %g2, [ %l6 + 0x3e4 ]
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
2002ed8: 80 a7 40 04 cmp %i5, %g4
2002edc: 1a 80 00 8b bcc 2003108 <rtems_disk_delete+0x26c> <== NEVER TAKEN
2002ee0: 2b 00 80 8d sethi %hi(0x2023400), %l5
2002ee4: c2 05 63 f0 ld [ %l5 + 0x3f0 ], %g1 ! 20237f0 <disktab>
2002ee8: 80 a0 60 00 cmp %g1, 0
2002eec: 02 80 00 87 be 2003108 <rtems_disk_delete+0x26c> <== NEVER TAKEN
2002ef0: bb 2f 60 03 sll %i5, 3, %i5
rtems_disk_device_table *dtab = disktab + major;
2002ef4: 86 00 40 1d add %g1, %i5, %g3
if (minor < dtab->size && dtab->minor != NULL) {
2002ef8: c6 00 e0 04 ld [ %g3 + 4 ], %g3
2002efc: 80 a6 40 03 cmp %i1, %g3
2002f00: 1a 80 00 83 bcc 200310c <rtems_disk_delete+0x270> <== NEVER TAKEN
2002f04: d0 05 23 e8 ld [ %l4 + 0x3e8 ], %o0
2002f08: c6 00 40 1d ld [ %g1 + %i5 ], %g3
2002f0c: 80 a0 e0 00 cmp %g3, 0
2002f10: 02 80 00 7f be 200310c <rtems_disk_delete+0x270> <== NEVER TAKEN
2002f14: b3 2e 60 02 sll %i1, 2, %i1
rtems_disk_device *dd = dtab->minor [minor];
2002f18: fa 00 c0 19 ld [ %g3 + %i1 ], %i5
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
if (dd == NULL) {
2002f1c: 80 a7 60 00 cmp %i5, 0
2002f20: 02 80 00 7b be 200310c <rtems_disk_delete+0x270> <== NEVER TAKEN
2002f24: 01 00 00 00 nop
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
2002f28: f4 07 60 08 ld [ %i5 + 8 ], %i2
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
2002f2c: c4 2f 60 30 stb %g2, [ %i5 + 0x30 ]
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
2002f30: c4 0e a0 30 ldub [ %i2 + 0x30 ], %g2
2002f34: 80 a0 a0 00 cmp %g2, 0
2002f38: 22 80 00 45 be,a 200304c <rtems_disk_delete+0x1b0>
2002f3c: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
dev_t dev = physical_disk->dev;
2002f40: e4 1e 80 00 ldd [ %i2 ], %l2
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2002f44: 80 a1 20 00 cmp %g4, 0
2002f48: 02 80 00 4d be 200307c <rtems_disk_delete+0x1e0> <== NEVER TAKEN
2002f4c: a0 10 20 00 clr %l0
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
2002f50: 2f 08 00 10 sethi %hi(0x20004000), %l7
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2002f54: b2 10 20 00 clr %i1
2002f58: a2 14 63 ec or %l1, 0x3ec, %l1
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
2002f5c: b0 10 20 01 mov 1, %i0
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
2002f60: ae 15 e2 07 or %l7, 0x207, %l7
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
2002f64: b7 2e 60 03 sll %i1, 3, %i3
2002f68: b6 00 40 1b add %g1, %i3, %i3
for (minor = 0; minor < dtab->size; ++minor) {
2002f6c: de 06 e0 04 ld [ %i3 + 4 ], %o7
2002f70: 80 a3 e0 00 cmp %o7, 0
2002f74: 22 80 00 30 be,a 2003034 <rtems_disk_delete+0x198>
2002f78: c2 04 40 00 ld [ %l1 ], %g1
2002f7c: 10 80 00 06 b 2002f94 <rtems_disk_delete+0xf8>
2002f80: b8 10 20 00 clr %i4
2002f84: b8 07 20 01 inc %i4
2002f88: 80 a7 00 0f cmp %i4, %o7
2002f8c: 3a 80 00 2a bcc,a 2003034 <rtems_disk_delete+0x198>
2002f90: c2 04 40 00 ld [ %l1 ], %g1
rtems_disk_device *dd = dtab->minor [minor];
2002f94: c8 06 c0 00 ld [ %i3 ], %g4
2002f98: 83 2f 20 02 sll %i4, 2, %g1
2002f9c: fa 01 00 01 ld [ %g4 + %g1 ], %i5
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
2002fa0: 80 a7 60 00 cmp %i5, 0
2002fa4: 02 bf ff f8 be 2002f84 <rtems_disk_delete+0xe8>
2002fa8: 80 a6 80 1d cmp %i2, %i5
2002fac: 22 bf ff f7 be,a 2002f88 <rtems_disk_delete+0xec>
2002fb0: b8 07 20 01 inc %i4
2002fb4: c4 07 60 08 ld [ %i5 + 8 ], %g2
2002fb8: c4 18 80 00 ldd [ %g2 ], %g2
2002fbc: 84 1c 80 02 xor %l2, %g2, %g2
2002fc0: 86 1c c0 03 xor %l3, %g3, %g3
2002fc4: 80 90 80 03 orcc %g2, %g3, %g0
2002fc8: 32 bf ff f0 bne,a 2002f88 <rtems_disk_delete+0xec> <== NEVER TAKEN
2002fcc: b8 07 20 01 inc %i4 <== NOT EXECUTED
if (dd->uses == 0) {
2002fd0: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
2002fd4: 80 a0 a0 00 cmp %g2, 0
2002fd8: 32 bf ff eb bne,a 2002f84 <rtems_disk_delete+0xe8>
2002fdc: f0 2f 60 30 stb %i0, [ %i5 + 0x30 ]
++deleted_count;
dtab->minor [minor] = NULL;
2002fe0: c0 21 00 01 clr [ %g4 + %g1 ]
}
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
2002fe4: c2 07 60 08 ld [ %i5 + 8 ], %g1
2002fe8: 80 a7 40 01 cmp %i5, %g1
2002fec: 02 80 00 40 be 20030ec <rtems_disk_delete+0x250> <== NEVER TAKEN
2002ff0: a0 04 20 01 inc %l0
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
}
if (dd->name != NULL) {
2002ff4: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
2002ff8: 80 a2 20 00 cmp %o0, 0
2002ffc: 02 80 00 06 be 2003014 <rtems_disk_delete+0x178> <== NEVER TAKEN
2003000: 01 00 00 00 nop
unlink(dd->name);
2003004: 40 00 11 e4 call 2007794 <unlink>
2003008: 01 00 00 00 nop
free(dd->name);
200300c: 40 00 04 d7 call 2004368 <free>
2003010: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
}
free(dd);
2003014: 40 00 04 d5 call 2004368 <free>
2003018: 90 10 00 1d mov %i5, %o0
200301c: de 06 e0 04 ld [ %i3 + 4 ], %o7
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2003020: b8 07 20 01 inc %i4
2003024: 80 a7 00 0f cmp %i4, %o7
2003028: 2a bf ff dc bcs,a 2002f98 <rtems_disk_delete+0xfc> <== ALWAYS TAKEN
200302c: c8 06 c0 00 ld [ %i3 ], %g4
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2003030: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
2003034: b2 06 60 01 inc %i1
2003038: 80 a6 40 01 cmp %i1, %g1
200303c: 1a 80 00 10 bcc 200307c <rtems_disk_delete+0x1e0>
2003040: c2 05 63 f0 ld [ %l5 + 0x3f0 ], %g1
rtems_disk_device_table *dtab = disktab + major;
2003044: 10 bf ff c9 b 2002f68 <rtems_disk_delete+0xcc>
2003048: b7 2e 60 03 sll %i1, 3, %i3
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
200304c: 80 a0 a0 00 cmp %g2, 0
2003050: 22 80 00 37 be,a 200312c <rtems_disk_delete+0x290> <== ALWAYS TAKEN
2003054: c8 06 a0 14 ld [ %i2 + 0x14 ], %g4
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2003058: d0 05 23 e8 ld [ %l4 + 0x3e8 ], %o0
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
200305c: c0 2d a3 e4 clrb [ %l6 + 0x3e4 ]
sc = rtems_semaphore_release(diskdevs_mutex);
2003060: 40 00 15 46 call 2008578 <rtems_semaphore_release>
2003064: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL) {
2003068: 80 a2 20 00 cmp %o0, 0
200306c: 02 80 00 2e be 2003124 <rtems_disk_delete+0x288> <== ALWAYS TAKEN
2003070: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2003074: 40 00 16 a3 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003078: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <RAM_END+0xdc6dbeef><== NOT EXECUTED
}
}
}
}
physical_disk->uses -= deleted_count;
200307c: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1
2003080: a0 20 40 10 sub %g1, %l0, %l0
if (physical_disk->uses == 0) {
2003084: 80 a4 20 00 cmp %l0, 0
2003088: 12 bf ff f4 bne 2003058 <rtems_disk_delete+0x1bc>
200308c: e0 26 a0 14 st %l0, [ %i2 + 0x14 ]
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2003090: c4 06 80 00 ld [ %i2 ], %g2
disktab [major].minor [minor] = NULL;
2003094: c6 05 63 f0 ld [ %l5 + 0x3f0 ], %g3
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2003098: c2 06 a0 04 ld [ %i2 + 4 ], %g1
disktab [major].minor [minor] = NULL;
200309c: 85 28 a0 03 sll %g2, 3, %g2
20030a0: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
20030a4: 83 28 60 02 sll %g1, 2, %g1
20030a8: c0 20 80 01 clr [ %g2 + %g1 ]
}
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
20030ac: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20030b0: 80 a6 80 01 cmp %i2, %g1
20030b4: 22 80 00 36 be,a 200318c <rtems_disk_delete+0x2f0> <== ALWAYS TAKEN
20030b8: c2 06 a0 28 ld [ %i2 + 0x28 ], %g1
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
}
if (dd->name != NULL) {
20030bc: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED
20030c0: 80 a2 20 00 cmp %o0, 0
20030c4: 02 80 00 06 be 20030dc <rtems_disk_delete+0x240>
20030c8: 01 00 00 00 nop
unlink(dd->name);
20030cc: 40 00 11 b2 call 2007794 <unlink>
20030d0: 01 00 00 00 nop
free(dd->name);
20030d4: 40 00 04 a5 call 2004368 <free>
20030d8: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
}
free(dd);
20030dc: 40 00 04 a3 call 2004368 <free>
20030e0: 90 10 00 1a mov %i2, %o0
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
20030e4: 10 bf ff de b 200305c <rtems_disk_delete+0x1c0>
20030e8: d0 05 23 e8 ld [ %l4 + 0x3e8 ], %o0
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
20030ec: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
20030f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20030f4: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED
20030f8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20030fc: 94 10 20 00 clr %o2 <== NOT EXECUTED
}
if (dd->name != NULL) {
2003100: 10 bf ff be b 2002ff8 <rtems_disk_delete+0x15c> <== NOT EXECUTED
2003104: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2003108: d0 05 23 e8 ld [ %l4 + 0x3e8 ], %o0 <== NOT EXECUTED
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
200310c: c0 2d a3 e4 clrb [ %l6 + 0x3e4 ] <== NOT EXECUTED
sc = rtems_semaphore_release(diskdevs_mutex);
2003110: 40 00 15 1a call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
2003114: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2003118: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200311c: 12 bf ff d6 bne 2003074 <rtems_disk_delete+0x1d8> <== NOT EXECUTED
2003120: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2003124: 81 c7 e0 08 ret
2003128: 81 e8 00 00 restore
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
200312c: c4 07 40 00 ld [ %i5 ], %g2
2003130: c6 07 60 04 ld [ %i5 + 4 ], %g3
disktab [major].minor [minor] = NULL;
2003134: 85 28 a0 03 sll %g2, 3, %g2
2003138: c4 00 40 02 ld [ %g1 + %g2 ], %g2
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
200313c: 82 01 3f ff add %g4, -1, %g1
2003140: c2 26 a0 14 st %g1, [ %i2 + 0x14 ]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2003144: 83 28 e0 02 sll %g3, 2, %g1
2003148: c0 20 80 01 clr [ %g2 + %g1 ]
}
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
200314c: c2 07 60 08 ld [ %i5 + 8 ], %g1
2003150: 80 a7 40 01 cmp %i5, %g1
2003154: 22 80 00 15 be,a 20031a8 <rtems_disk_delete+0x30c> <== NEVER TAKEN
2003158: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
}
if (dd->name != NULL) {
200315c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
2003160: 80 a2 20 00 cmp %o0, 0
2003164: 02 80 00 06 be 200317c <rtems_disk_delete+0x2e0> <== NEVER TAKEN
2003168: 01 00 00 00 nop
unlink(dd->name);
200316c: 40 00 11 8a call 2007794 <unlink>
2003170: 01 00 00 00 nop
free(dd->name);
2003174: 40 00 04 7d call 2004368 <free>
2003178: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
}
free(dd);
200317c: 40 00 04 7b call 2004368 <free>
2003180: 90 10 00 1d mov %i5, %o0
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2003184: 10 bf ff b6 b 200305c <rtems_disk_delete+0x1c0>
2003188: d0 05 23 e8 ld [ %l4 + 0x3e8 ], %o0
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
200318c: 90 10 00 1a mov %i2, %o0
2003190: 13 08 00 10 sethi %hi(0x20004000), %o1
2003194: 94 10 20 00 clr %o2
2003198: 9f c0 40 00 call %g1
200319c: 92 12 62 07 or %o1, 0x207, %o1
}
if (dd->name != NULL) {
20031a0: 10 bf ff c8 b 20030c0 <rtems_disk_delete+0x224>
20031a4: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
20031a8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20031ac: 13 08 00 10 sethi %hi(0x20004000), %o1 <== NOT EXECUTED
20031b0: 94 10 20 00 clr %o2 <== NOT EXECUTED
20031b4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20031b8: 92 12 62 07 or %o1, 0x207, %o1 <== NOT EXECUTED
}
if (dd->name != NULL) {
20031bc: 10 bf ff e9 b 2003160 <rtems_disk_delete+0x2c4> <== NOT EXECUTED
20031c0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
02003608 <rtems_disk_io_done>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
{
2003608: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
200360c: 39 00 80 8d sethi %hi(0x2023400), %i4
2003610: c2 07 23 ec ld [ %i4 + 0x3ec ], %g1 ! 20237ec <disktab_size>
2003614: 3b 00 80 8d sethi %hi(0x2023400), %i5
2003618: 80 a0 60 00 cmp %g1, 0
200361c: 02 80 00 2c be 20036cc <rtems_disk_io_done+0xc4> <== NEVER TAKEN
2003620: f6 07 63 f0 ld [ %i5 + 0x3f0 ], %i3
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
2003624: 23 08 00 10 sethi %hi(0x20004000), %l1
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
2003628: b0 10 20 00 clr %i0
200362c: a0 17 23 ec or %i4, 0x3ec, %l0
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
2003630: a2 14 62 07 or %l1, 0x207, %l1
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
2003634: 83 2e 20 03 sll %i0, 3, %g1
2003638: b2 06 c0 01 add %i3, %g1, %i1
for (minor = 0; minor < dtab->size; ++minor) {
200363c: c4 06 60 04 ld [ %i1 + 4 ], %g2
2003640: d0 06 c0 01 ld [ %i3 + %g1 ], %o0
2003644: 80 a0 a0 00 cmp %g2, 0
2003648: 02 80 00 1b be 20036b4 <rtems_disk_io_done+0xac>
200364c: b4 10 20 00 clr %i2
rtems_disk_device *dd = dtab->minor [minor];
2003650: 83 2e a0 02 sll %i2, 2, %g1
2003654: f6 02 00 01 ld [ %o0 + %g1 ], %i3
if (dd != NULL) {
2003658: 80 a6 e0 00 cmp %i3, 0
200365c: 02 80 00 12 be 20036a4 <rtems_disk_io_done+0x9c>
2003660: b4 06 a0 01 inc %i2
}
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
2003664: c2 06 e0 08 ld [ %i3 + 8 ], %g1
2003668: 80 a6 c0 01 cmp %i3, %g1
200366c: 22 80 00 23 be,a 20036f8 <rtems_disk_io_done+0xf0> <== ALWAYS TAKEN
2003670: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
}
if (dd->name != NULL) {
2003674: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1 <== NOT EXECUTED
2003678: 90 90 60 00 orcc %g1, 0, %o0
200367c: 02 80 00 06 be 2003694 <rtems_disk_io_done+0x8c> <== NEVER TAKEN
2003680: 01 00 00 00 nop
unlink(dd->name);
2003684: 40 00 10 44 call 2007794 <unlink>
2003688: 01 00 00 00 nop
free(dd->name);
200368c: 40 00 03 37 call 2004368 <free>
2003690: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
}
free(dd);
2003694: 40 00 03 35 call 2004368 <free>
2003698: 90 10 00 1b mov %i3, %o0
200369c: c4 06 60 04 ld [ %i1 + 4 ], %g2
20036a0: d0 06 40 00 ld [ %i1 ], %o0
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
20036a4: 80 a0 80 1a cmp %g2, %i2
20036a8: 18 bf ff eb bgu 2003654 <rtems_disk_io_done+0x4c>
20036ac: 83 2e a0 02 sll %i2, 2, %g1
20036b0: f6 07 63 f0 ld [ %i5 + 0x3f0 ], %i3
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
20036b4: 40 00 03 2d call 2004368 <free>
20036b8: b0 06 20 01 inc %i0
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
20036bc: c2 04 00 00 ld [ %l0 ], %g1
20036c0: 80 a0 40 18 cmp %g1, %i0
20036c4: 18 bf ff dd bgu 2003638 <rtems_disk_io_done+0x30>
20036c8: 83 2e 20 03 sll %i0, 3, %g1
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
20036cc: 40 00 03 27 call 2004368 <free>
20036d0: 90 10 00 1b mov %i3, %o0
rtems_semaphore_delete(diskdevs_mutex);
20036d4: 37 00 80 8d sethi %hi(0x2023400), %i3
20036d8: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
20036dc: 40 00 13 26 call 2008374 <rtems_semaphore_delete>
20036e0: b0 10 20 00 clr %i0
diskdevs_mutex = RTEMS_ID_NONE;
20036e4: c0 26 e3 e8 clr [ %i3 + 0x3e8 ]
disktab = NULL;
20036e8: c0 27 63 f0 clr [ %i5 + 0x3f0 ]
disktab_size = 0;
20036ec: c0 27 23 ec clr [ %i4 + 0x3ec ]
return RTEMS_SUCCESSFUL;
}
20036f0: 81 c7 e0 08 ret
20036f4: 81 e8 00 00 restore
static void
free_disk_device(rtems_disk_device *dd)
{
if (is_physical_disk(dd)) {
(*dd->ioctl)(dd, RTEMS_BLKIO_DELETED, NULL);
20036f8: 92 10 00 11 mov %l1, %o1
20036fc: 94 10 20 00 clr %o2
2003700: 9f c0 40 00 call %g1
2003704: 90 10 00 1b mov %i3, %o0
}
if (dd->name != NULL) {
2003708: 10 bf ff dc b 2003678 <rtems_disk_io_done+0x70>
200370c: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
0200355c <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
200355c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
2003560: 3b 00 80 8d sethi %hi(0x2023400), %i5
2003564: c2 07 63 ec ld [ %i5 + 0x3ec ], %g1 ! 20237ec <disktab_size>
2003568: 80 a0 60 00 cmp %g1, 0
200356c: 12 80 00 19 bne 20035d0 <rtems_disk_io_initialize+0x74> <== NEVER TAKEN
2003570: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
2003574: 90 10 20 08 mov 8, %o0
2003578: 92 10 20 08 mov 8, %o1
200357c: 40 00 02 58 call 2003edc <calloc>
2003580: 39 00 80 8d sethi %hi(0x2023400), %i4
2003584: d0 27 23 f0 st %o0, [ %i4 + 0x3f0 ] ! 20237f0 <disktab>
if (disktab == NULL) {
2003588: 80 a2 20 00 cmp %o0, 0
200358c: 02 80 00 11 be 20035d0 <rtems_disk_io_initialize+0x74> <== NEVER TAKEN
2003590: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
2003594: 03 00 80 8d sethi %hi(0x2023400), %g1
sc = rtems_semaphore_create(
2003598: 11 11 11 11 sethi %hi(0x44444400), %o0
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
200359c: c0 28 63 e4 clrb [ %g1 + 0x3e4 ]
sc = rtems_semaphore_create(
20035a0: 90 12 21 56 or %o0, 0x156, %o0
20035a4: 92 10 20 01 mov 1, %o1
20035a8: 94 10 20 10 mov 0x10, %o2
20035ac: 96 10 20 00 clr %o3
20035b0: 37 00 80 8d sethi %hi(0x2023400), %i3
20035b4: 40 00 13 00 call 20081b4 <rtems_semaphore_create>
20035b8: 98 16 e3 e8 or %i3, 0x3e8, %o4 ! 20237e8 <diskdevs_mutex>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
20035bc: 80 a2 20 00 cmp %o0, 0
20035c0: 02 80 00 06 be 20035d8 <rtems_disk_io_initialize+0x7c> <== ALWAYS TAKEN
20035c4: 01 00 00 00 nop
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
free(disktab);
20035c8: 40 00 03 68 call 2004368 <free> <== NOT EXECUTED
20035cc: d0 07 23 f0 ld [ %i4 + 0x3f0 ], %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
20035d0: 81 c7 e0 08 ret <== NOT EXECUTED
20035d4: 81 e8 00 00 restore <== NOT EXECUTED
free(disktab);
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
20035d8: 40 00 2c 0a call 200e600 <rtems_bdbuf_init>
20035dc: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
20035e0: 80 a2 20 00 cmp %o0, 0
20035e4: 12 80 00 05 bne 20035f8 <rtems_disk_io_initialize+0x9c> <== NEVER TAKEN
20035e8: 82 10 20 08 mov 8, %g1
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
20035ec: c2 27 63 ec st %g1, [ %i5 + 0x3ec ]
return RTEMS_SUCCESSFUL;
}
20035f0: 81 c7 e0 08 ret
20035f4: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
20035f8: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 <== NOT EXECUTED
20035fc: 40 00 13 5e call 2008374 <rtems_semaphore_delete> <== NOT EXECUTED
2003600: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
2003604: 30 bf ff f1 b,a 20035c8 <rtems_disk_io_initialize+0x6c> <== NOT EXECUTED
020033b8 <rtems_disk_next>:
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
20033b8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
20033bc: 80 a6 3f ff cmp %i0, -1
20033c0: 02 80 00 4c be 20034f0 <rtems_disk_next+0x138>
20033c4: 80 a6 7f ff cmp %i1, -1
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
20033c8: ba 06 60 01 add %i1, 1, %i5
20033cc: 80 a7 40 19 cmp %i5, %i1
20033d0: 1a 80 00 07 bcc 20033ec <rtems_disk_next+0x34> <== ALWAYS TAKEN
20033d4: b8 10 00 18 mov %i0, %i4
/* If major wraps around */
if ((major + 1) < major) {
20033d8: 82 06 20 01 add %i0, 1, %g1 <== NOT EXECUTED
20033dc: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED
20033e0: 0a 80 00 53 bcs 200352c <rtems_disk_next+0x174> <== NOT EXECUTED
20033e4: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
20033e8: ba 10 20 00 clr %i5 <== NOT EXECUTED
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20033ec: 37 00 80 8d sethi %hi(0x2023400), %i3
20033f0: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
20033f4: 92 10 20 00 clr %o1
20033f8: 94 10 20 00 clr %o2
20033fc: 40 00 14 15 call 2008450 <rtems_semaphore_obtain>
2003400: b0 10 20 00 clr %i0
if (sc == RTEMS_SUCCESSFUL) {
2003404: 80 a2 20 00 cmp %o0, 0
2003408: 12 80 00 2b bne 20034b4 <rtems_disk_next+0xfc> <== NEVER TAKEN
200340c: b4 10 00 08 mov %o0, %i2
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
2003410: 03 00 80 8d sethi %hi(0x2023400), %g1
2003414: f0 00 63 ec ld [ %g1 + 0x3ec ], %i0 ! 20237ec <disktab_size>
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
2003418: 05 00 80 8d sethi %hi(0x2023400), %g2
200341c: 82 10 20 01 mov 1, %g1
2003420: c2 28 a3 e4 stb %g1, [ %g2 + 0x3e4 ]
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
2003424: 80 a7 00 18 cmp %i4, %i0
2003428: 1a 80 00 43 bcc 2003534 <rtems_disk_next+0x17c> <== NEVER TAKEN
200342c: 03 00 80 8d sethi %hi(0x2023400), %g1
disk_unlock();
return NULL;
}
dtab = disktab + major;
2003430: c8 00 63 f0 ld [ %g1 + 0x3f0 ], %g4 ! 20237f0 <disktab>
2003434: b5 2f 20 03 sll %i4, 3, %i2
2003438: c6 01 00 1a ld [ %g4 + %i2 ], %g3
200343c: b4 01 00 1a add %g4, %i2, %i2
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
2003440: 80 a0 e0 00 cmp %g3, 0
2003444: 22 80 00 0e be,a 200347c <rtems_disk_next+0xc4>
2003448: b8 07 20 01 inc %i4
200344c: c2 06 a0 04 ld [ %i2 + 4 ], %g1
2003450: 80 a7 40 01 cmp %i5, %g1
2003454: 3a 80 00 0a bcc,a 200347c <rtems_disk_next+0xc4>
2003458: b8 07 20 01 inc %i4
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
200345c: b3 2f 60 02 sll %i5, 2, %i1
2003460: c2 00 c0 19 ld [ %g3 + %i1 ], %g1
2003464: 80 a0 60 00 cmp %g1, 0
2003468: 12 80 00 15 bne 20034bc <rtems_disk_next+0x104>
200346c: 80 a0 e0 00 cmp %g3, 0
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
2003470: 12 bf ff f7 bne 200344c <rtems_disk_next+0x94> <== ALWAYS TAKEN
2003474: ba 07 60 01 inc %i5
minor = 0;
++major;
2003478: b8 07 20 01 inc %i4 <== NOT EXECUTED
if (major >= disktab_size) {
200347c: 80 a6 00 1c cmp %i0, %i4
2003480: 08 80 00 06 bleu 2003498 <rtems_disk_next+0xe0>
2003484: 83 2f 20 03 sll %i4, 3, %g1
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
2003488: ba 10 20 00 clr %i5
if (major >= disktab_size) {
disk_unlock();
return NULL;
}
dtab = disktab + major;
200348c: b4 01 00 01 add %g4, %g1, %i2
2003490: 10 bf ff ec b 2003440 <rtems_disk_next+0x88>
2003494: c6 01 00 01 ld [ %g4 + %g1 ], %g3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2003498: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
200349c: c0 28 a3 e4 clrb [ %g2 + 0x3e4 ]
sc = rtems_semaphore_release(diskdevs_mutex);
20034a0: 40 00 14 36 call 2008578 <rtems_semaphore_release>
20034a4: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL) {
20034a8: 80 a2 20 00 cmp %o0, 0
20034ac: 12 80 00 29 bne 2003550 <rtems_disk_next+0x198> <== NEVER TAKEN
20034b0: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
disk_unlock();
return dtab->minor [minor];
}
}
}
20034b4: 81 c7 e0 08 ret
20034b8: 81 e8 00 00 restore
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
++minor;
} else {
++dtab->minor [minor]->uses;
20034bc: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
20034c0: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
++minor;
} else {
++dtab->minor [minor]->uses;
20034c4: 86 00 e0 01 inc %g3
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
20034c8: c0 28 a3 e4 clrb [ %g2 + 0x3e4 ]
sc = rtems_semaphore_release(diskdevs_mutex);
20034cc: 40 00 14 2b call 2008578 <rtems_semaphore_release>
20034d0: c6 20 60 14 st %g3, [ %g1 + 0x14 ]
if (sc != RTEMS_SUCCESSFUL) {
20034d4: 80 a2 20 00 cmp %o0, 0
20034d8: 32 80 00 1e bne,a 2003550 <rtems_disk_next+0x198> <== NEVER TAKEN
20034dc: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED
++minor;
} else {
++dtab->minor [minor]->uses;
disk_unlock();
return dtab->minor [minor];
20034e0: c2 06 80 00 ld [ %i2 ], %g1
20034e4: f0 00 40 19 ld [ %g1 + %i1 ], %i0
20034e8: 81 c7 e0 08 ret
20034ec: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
20034f0: 12 bf ff b7 bne 20033cc <rtems_disk_next+0x14> <== NEVER TAKEN
20034f4: ba 06 60 01 add %i1, 1, %i5
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20034f8: 37 00 80 8d sethi %hi(0x2023400), %i3
20034fc: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex>
2003500: 92 10 20 00 clr %o1
2003504: 94 10 20 00 clr %o2
2003508: 40 00 13 d2 call 2008450 <rtems_semaphore_obtain>
200350c: ba 10 20 00 clr %i5
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
2003510: b8 10 20 00 clr %i4
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003514: b4 10 00 08 mov %o0, %i2
if (sc == RTEMS_SUCCESSFUL) {
2003518: 80 a2 20 00 cmp %o0, 0
200351c: 12 bf ff e6 bne 20034b4 <rtems_disk_next+0xfc> <== NEVER TAKEN
2003520: b0 10 20 00 clr %i0
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
2003524: 10 bf ff bc b 2003414 <rtems_disk_next+0x5c>
2003528: 03 00 80 8d sethi %hi(0x2023400), %g1
disk_unlock();
return dtab->minor [minor];
}
}
}
200352c: 81 c7 e0 08 ret <== NOT EXECUTED
2003530: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2003534: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 <== NOT EXECUTED
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2003538: c0 28 a3 e4 clrb [ %g2 + 0x3e4 ] <== NOT EXECUTED
sc = rtems_semaphore_release(diskdevs_mutex);
200353c: 40 00 14 0f call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
2003540: b0 10 00 1a mov %i2, %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2003544: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003548: 02 bf ff db be 20034b4 <rtems_disk_next+0xfc> <== NOT EXECUTED
200354c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2003550: 40 00 15 6c call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003554: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <RAM_END+0xdc6dbeef><== NOT EXECUTED
020031c4 <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
20031c4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
20031c8: 7f ff fd af call 2002884 <sparc_disable_interrupts>
20031cc: 01 00 00 00 nop
20031d0: 82 10 00 08 mov %o0, %g1
if (!diskdevs_protected) {
20031d4: 39 00 80 8d sethi %hi(0x2023400), %i4
20031d8: c4 0f 23 e4 ldub [ %i4 + 0x3e4 ], %g2 ! 20237e4 <diskdevs_protected>
20031dc: 80 a0 a0 00 cmp %g2, 0
20031e0: 02 80 00 35 be 20032b4 <rtems_disk_obtain+0xf0> <== ALWAYS TAKEN
20031e4: 05 00 80 8d sethi %hi(0x2023400), %g2
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
20031e8: 7f ff fd ab call 2002894 <sparc_enable_interrupts> <== NOT EXECUTED
20031ec: 37 00 80 8d sethi %hi(0x2023400), %i3 <== NOT EXECUTED
static rtems_status_code
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20031f0: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 ! 20237e8 <diskdevs_mutex><== NOT EXECUTED
20031f4: 92 10 20 00 clr %o1 <== NOT EXECUTED
20031f8: 94 10 20 00 clr %o2 <== NOT EXECUTED
20031fc: 40 00 14 95 call 2008450 <rtems_semaphore_obtain> <== NOT EXECUTED
2003200: ba 10 20 00 clr %i5 <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
2003204: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003208: 02 80 00 04 be 2003218 <rtems_disk_obtain+0x54> <== NOT EXECUTED
200320c: 03 00 80 8d sethi %hi(0x2023400), %g1 <== NOT EXECUTED
disk_unlock();
}
}
return dd;
}
2003210: 81 c7 e0 08 ret <== NOT EXECUTED
2003214: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
2003218: c2 00 63 ec ld [ %g1 + 0x3ec ], %g1 <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
200321c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
2003220: c4 2f 23 e4 stb %g2, [ %i4 + 0x3e4 ] <== NOT EXECUTED
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
2003224: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
2003228: 1a 80 00 1a bcc 2003290 <rtems_disk_obtain+0xcc> <== NOT EXECUTED
200322c: 03 00 80 8d sethi %hi(0x2023400), %g1 <== NOT EXECUTED
2003230: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 20237f0 <disktab> <== NOT EXECUTED
2003234: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003238: 02 80 00 16 be 2003290 <rtems_disk_obtain+0xcc> <== NOT EXECUTED
200323c: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED
rtems_disk_device_table *dtab = disktab + major;
2003240: 84 00 40 18 add %g1, %i0, %g2 <== NOT EXECUTED
if (minor < dtab->size && dtab->minor != NULL) {
2003244: c4 00 a0 04 ld [ %g2 + 4 ], %g2 <== NOT EXECUTED
2003248: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED
200324c: 1a 80 00 12 bcc 2003294 <rtems_disk_obtain+0xd0> <== NOT EXECUTED
2003250: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 <== NOT EXECUTED
2003254: c2 00 40 18 ld [ %g1 + %i0 ], %g1 <== NOT EXECUTED
2003258: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200325c: 02 80 00 0e be 2003294 <rtems_disk_obtain+0xd0> <== NOT EXECUTED
2003260: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
rtems_disk_device *dd = dtab->minor [minor];
2003264: fa 00 40 19 ld [ %g1 + %i1 ], %i5 <== NOT EXECUTED
if (dd != NULL && !lookup_only) {
2003268: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED
200326c: 02 80 00 0a be 2003294 <rtems_disk_obtain+0xd0> <== NOT EXECUTED
2003270: 01 00 00 00 nop <== NOT EXECUTED
if (!dd->deleted) {
2003274: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
2003278: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200327c: 12 80 00 30 bne 200333c <rtems_disk_obtain+0x178> <== NOT EXECUTED
2003280: 01 00 00 00 nop <== NOT EXECUTED
++dd->uses;
2003284: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
2003288: 82 00 60 01 inc %g1 <== NOT EXECUTED
200328c: c2 27 60 14 st %g1, [ %i5 + 0x14 ] <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
2003290: d0 06 e3 e8 ld [ %i3 + 0x3e8 ], %o0 <== NOT EXECUTED
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
2003294: c0 2f 23 e4 clrb [ %i4 + 0x3e4 ] <== NOT EXECUTED
sc = rtems_semaphore_release(diskdevs_mutex);
2003298: 40 00 14 b8 call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
200329c: 01 00 00 00 nop <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
20032a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20032a4: 02 bf ff db be 2003210 <rtems_disk_obtain+0x4c> <== NOT EXECUTED
20032a8: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
20032ac: 40 00 16 15 call 2008b00 <rtems_fatal_error_occurred> <== NOT EXECUTED
20032b0: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <RAM_END+0xdc6dbeef><== NOT EXECUTED
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
20032b4: c4 00 a3 ec ld [ %g2 + 0x3ec ], %g2
20032b8: 80 a6 00 02 cmp %i0, %g2
20032bc: 1a 80 00 1c bcc 200332c <rtems_disk_obtain+0x168> <== NEVER TAKEN
20032c0: ba 10 20 00 clr %i5
20032c4: 05 00 80 8d sethi %hi(0x2023400), %g2
20032c8: c4 00 a3 f0 ld [ %g2 + 0x3f0 ], %g2 ! 20237f0 <disktab>
20032cc: 80 a0 a0 00 cmp %g2, 0
20032d0: 02 80 00 17 be 200332c <rtems_disk_obtain+0x168> <== NEVER TAKEN
20032d4: 01 00 00 00 nop
rtems_disk_device_table *dtab = disktab + major;
20032d8: b1 2e 20 03 sll %i0, 3, %i0
20032dc: 86 00 80 18 add %g2, %i0, %g3
if (minor < dtab->size && dtab->minor != NULL) {
20032e0: c6 00 e0 04 ld [ %g3 + 4 ], %g3
20032e4: 80 a6 40 03 cmp %i1, %g3
20032e8: 1a 80 00 11 bcc 200332c <rtems_disk_obtain+0x168> <== NEVER TAKEN
20032ec: 01 00 00 00 nop
20032f0: c4 00 80 18 ld [ %g2 + %i0 ], %g2
20032f4: 80 a0 a0 00 cmp %g2, 0
20032f8: 02 80 00 0d be 200332c <rtems_disk_obtain+0x168> <== NEVER TAKEN
20032fc: b3 2e 60 02 sll %i1, 2, %i1
rtems_disk_device *dd = dtab->minor [minor];
2003300: fa 00 80 19 ld [ %g2 + %i1 ], %i5
if (dd != NULL && !lookup_only) {
2003304: 80 a7 60 00 cmp %i5, 0
2003308: 02 80 00 09 be 200332c <rtems_disk_obtain+0x168>
200330c: 01 00 00 00 nop
if (!dd->deleted) {
2003310: c4 0f 60 30 ldub [ %i5 + 0x30 ], %g2
2003314: 80 a0 a0 00 cmp %g2, 0
2003318: 32 80 00 10 bne,a 2003358 <rtems_disk_obtain+0x194>
200331c: ba 10 20 00 clr %i5
++dd->uses;
2003320: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
2003324: 84 00 a0 01 inc %g2
2003328: c4 27 60 14 st %g2, [ %i5 + 0x14 ]
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
200332c: 7f ff fd 5a call 2002894 <sparc_enable_interrupts>
2003330: 90 10 00 01 mov %g1, %o0
disk_unlock();
}
}
return dd;
}
2003334: 81 c7 e0 08 ret
2003338: 91 e8 00 1d restore %g0, %i5, %o0
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
200333c: c0 2f 23 e4 clrb [ %i4 + 0x3e4 ] <== NOT EXECUTED
sc = rtems_semaphore_release(diskdevs_mutex);
2003340: 40 00 14 8e call 2008578 <rtems_semaphore_release> <== NOT EXECUTED
2003344: ba 10 20 00 clr %i5 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2003348: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200334c: 02 bf ff b1 be 2003210 <rtems_disk_obtain+0x4c> <== NOT EXECUTED
2003350: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED
2003354: 30 bf ff d6 b,a 20032ac <rtems_disk_obtain+0xe8> <== NOT EXECUTED
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
2003358: 7f ff fd 4f call 2002894 <sparc_enable_interrupts>
200335c: 90 10 00 01 mov %g1, %o0
2003360: 30 bf ff f5 b,a 2003334 <rtems_disk_obtain+0x170>
02003128 <rtems_filesystem_evaluate_relative_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2003128: 9d e3 bf a0 save %sp, -96, %sp
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO );
#endif
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
200312c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1
2003130: 90 10 00 18 mov %i0, %o0
2003134: c2 00 40 00 ld [ %g1 ], %g1
2003138: 92 10 00 19 mov %i1, %o1
200313c: 94 10 00 1a mov %i2, %o2
2003140: 9f c0 40 00 call %g1
2003144: 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 ) {
2003148: b0 92 20 00 orcc %o0, 0, %i0
200314c: 02 80 00 04 be 200315c <rtems_filesystem_evaluate_relative_path+0x34>
2003150: 80 a7 20 00 cmp %i4, 0
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
2003154: 81 c7 e0 08 ret
2003158: 81 e8 00 00 restore
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
200315c: 02 bf ff fe be 2003154 <rtems_filesystem_evaluate_relative_path+0x2c><== ALWAYS TAKEN
2003160: 01 00 00 00 nop
type = (*pathloc->ops->node_type_h)( pathloc );
2003164: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 <== NOT EXECUTED
2003168: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200316c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003170: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
2003174: 90 02 3f fd add %o0, -3, %o0 <== NOT EXECUTED
2003178: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED
200317c: 18 bf ff f6 bgu 2003154 <rtems_filesystem_evaluate_relative_path+0x2c><== NOT EXECUTED
2003180: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
* 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 );
2003184: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 <== NOT EXECUTED
2003188: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED
200318c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003190: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
}
}
return result;
}
2003194: 81 c7 e0 08 ret <== NOT EXECUTED
2003198: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200d344 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
200d344: 9d e3 bf a0 save %sp, -96, %sp
200d348: ba 10 00 18 mov %i0, %i5
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
200d34c: 80 a7 60 00 cmp %i5, 0
200d350: 02 80 00 39 be 200d434 <rtems_filesystem_get_mount_handler+0xf0><== NEVER TAKEN
200d354: b0 10 20 00 clr %i0
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d358: 37 00 80 71 sethi %hi(0x201c400), %i3
200d35c: d0 06 e3 8c ld [ %i3 + 0x38c ], %o0 ! 201c78c <rtems_filesystem_table>
200d360: 80 a2 20 00 cmp %o0, 0
200d364: 02 80 00 17 be 200d3c0 <rtems_filesystem_get_mount_handler+0x7c><== NEVER TAKEN
200d368: b6 16 e3 8c or %i3, 0x38c, %i3
200d36c: b8 10 00 1b mov %i3, %i4
200d370: 10 80 00 05 b 200d384 <rtems_filesystem_get_mount_handler+0x40>
200d374: b4 06 e0 08 add %i3, 8, %i2
200d378: 80 88 60 ff btst 0xff, %g1
200d37c: 12 80 00 30 bne 200d43c <rtems_filesystem_get_mount_handler+0xf8>
200d380: 01 00 00 00 nop
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d384: 40 00 14 3a call 201246c <strcmp>
200d388: 92 10 00 1d mov %i5, %o1
return true;
}
}
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
200d38c: 84 27 00 1b sub %i4, %i3, %g2
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d390: 80 a2 20 00 cmp %o0, 0
200d394: 12 80 00 04 bne 200d3a4 <rtems_filesystem_get_mount_handler+0x60>
200d398: 82 10 20 00 clr %g1
return false;
} else {
fa->mount_h = entry->mount_h;
200d39c: f0 07 20 04 ld [ %i4 + 4 ], %i0
return true;
200d3a0: 82 10 20 01 mov 1, %g1
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d3a4: d0 06 80 02 ld [ %i2 + %g2 ], %o0
200d3a8: 80 a2 20 00 cmp %o0, 0
200d3ac: 12 bf ff f3 bne 200d378 <rtems_filesystem_get_mount_handler+0x34>
200d3b0: b8 07 20 08 add %i4, 8, %i4
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
200d3b4: 80 88 60 ff btst 0xff, %g1
200d3b8: 12 80 00 21 bne 200d43c <rtems_filesystem_get_mount_handler+0xf8>
200d3bc: 01 00 00 00 nop
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200d3c0: 39 00 80 7c sethi %hi(0x201f000), %i4
200d3c4: d0 07 23 00 ld [ %i4 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200d3c8: 35 00 80 7a sethi %hi(0x201e800), %i2
200d3cc: 92 10 20 00 clr %o1
200d3d0: 7f ff e7 bc call 20072c0 <rtems_semaphore_obtain>
200d3d4: 94 10 20 00 clr %o2
200d3d8: f6 06 a1 78 ld [ %i2 + 0x178 ], %i3
200d3dc: b4 16 a1 78 or %i2, 0x178, %i2
rtems_libio_lock();
for (
200d3e0: b4 06 a0 04 add %i2, 4, %i2
200d3e4: 80 a6 c0 1a cmp %i3, %i2
200d3e8: 32 80 00 06 bne,a 200d400 <rtems_filesystem_get_mount_handler+0xbc><== NEVER TAKEN
200d3ec: d0 06 e0 08 ld [ %i3 + 8 ], %o0 <== NOT EXECUTED
200d3f0: 30 80 00 0f b,a 200d42c <rtems_filesystem_get_mount_handler+0xe8>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
200d3f4: 12 80 00 0e bne 200d42c <rtems_filesystem_get_mount_handler+0xe8><== NOT EXECUTED
200d3f8: 01 00 00 00 nop <== NOT EXECUTED
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d3fc: d0 06 e0 08 ld [ %i3 + 8 ], %o0 <== NOT EXECUTED
200d400: 40 00 14 1b call 201246c <strcmp> <== NOT EXECUTED
200d404: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200d408: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d40c: 12 80 00 04 bne 200d41c <rtems_filesystem_get_mount_handler+0xd8><== NOT EXECUTED
200d410: 82 10 20 00 clr %g1 <== NOT EXECUTED
return false;
} else {
fa->mount_h = entry->mount_h;
200d414: f0 06 e0 0c ld [ %i3 + 0xc ], %i0 <== NOT EXECUTED
return true;
200d418: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200d41c: f6 06 c0 00 ld [ %i3 ], %i3 <== NOT EXECUTED
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
200d420: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
200d424: 12 bf ff f4 bne 200d3f4 <rtems_filesystem_get_mount_handler+0xb0><== NOT EXECUTED
200d428: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d42c: 7f ff e7 ef call 20073e8 <rtems_semaphore_release>
200d430: d0 07 23 00 ld [ %i4 + 0x300 ], %o0
if ( type != NULL ) {
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
200d434: 81 c7 e0 08 ret
200d438: 81 e8 00 00 restore
200d43c: 81 c7 e0 08 ret
200d440: 81 e8 00 00 restore
02002d3c <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 )
{
2002d3c: 9d e3 bf 88 save %sp, -120, %sp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
2002d40: 3b 00 80 7a sethi %hi(0x201e800), %i5
2002d44: c2 07 61 70 ld [ %i5 + 0x170 ], %g1 ! 201e970 <rtems_current_user_env>
2002d48: 84 10 20 12 mov 0x12, %g2
2002d4c: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
2002d50: 03 00 80 71 sethi %hi(0x201c400), %g1
2002d54: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 ! 201c778 <rtems_filesystem_mount_table_size>
2002d58: 80 a0 60 00 cmp %g1, 0
2002d5c: 02 80 00 39 be 2002e40 <rtems_filesystem_initialize+0x104><== NEVER TAKEN
2002d60: 03 00 80 7a sethi %hi(0x201e800), %g1
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
2002d64: c2 00 60 84 ld [ %g1 + 0x84 ], %g1 ! 201e884 <rtems_filesystem_mount_table>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
2002d68: 98 10 20 00 clr %o4
2002d6c: d0 00 60 08 ld [ %g1 + 8 ], %o0
2002d70: d2 00 60 0c ld [ %g1 + 0xc ], %o1
2002d74: d4 00 40 00 ld [ %g1 ], %o2
2002d78: 40 00 03 1e call 20039f0 <mount>
2002d7c: d6 00 60 04 ld [ %g1 + 4 ], %o3
if ( status == -1 )
2002d80: 80 a2 3f ff cmp %o0, -1
2002d84: 02 80 00 34 be 2002e54 <rtems_filesystem_initialize+0x118><== NEVER TAKEN
2002d88: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002d8c: 39 00 80 73 sethi %hi(0x201cc00), %i4
2002d90: 92 10 20 01 mov 1, %o1
2002d94: 94 10 20 00 clr %o2
2002d98: 96 07 bf ec add %fp, -20, %o3
2002d9c: 98 10 20 00 clr %o4
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
2002da0: c0 30 60 30 clrh [ %g1 + 0x30 ]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002da4: 40 00 00 fe call 200319c <rtems_filesystem_evaluate_path>
2002da8: 90 17 21 f8 or %i4, 0x1f8, %o0
rtems_filesystem_root = loc;
2002dac: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
2002db0: c4 07 bf ec ld [ %fp + -20 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002db4: 92 10 20 01 mov 1, %o1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002db8: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
2002dbc: c4 07 bf f0 ld [ %fp + -16 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002dc0: 94 10 20 00 clr %o2
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002dc4: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
2002dc8: c4 07 bf f4 ld [ %fp + -12 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002dcc: 96 07 bf ec add %fp, -20, %o3
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002dd0: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
2002dd4: c4 07 bf f8 ld [ %fp + -8 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002dd8: 98 10 20 00 clr %o4
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
2002ddc: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2002de0: c4 07 bf fc ld [ %fp + -4 ], %g2
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2002de4: 90 17 21 f8 or %i4, 0x1f8, %o0
2002de8: 40 00 00 ed call 200319c <rtems_filesystem_evaluate_path>
2002dec: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
rtems_filesystem_current = loc;
2002df0: c2 07 61 70 ld [ %i5 + 0x170 ], %g1
2002df4: 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);
2002df8: 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;
2002dfc: c4 20 60 04 st %g2, [ %g1 + 4 ]
2002e00: 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);
2002e04: 11 00 80 73 sethi %hi(0x201cc00), %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;
2002e08: c4 20 60 08 st %g2, [ %g1 + 8 ]
2002e0c: c4 07 bf f4 ld [ %fp + -12 ], %g2
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
2002e10: 90 12 22 00 or %o0, 0x200, %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;
2002e14: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2002e18: c4 07 bf f8 ld [ %fp + -8 ], %g2
2002e1c: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
2002e20: c4 07 bf fc ld [ %fp + -4 ], %g2
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
2002e24: 40 00 02 b0 call 20038e4 <mkdir>
2002e28: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
if ( status != 0 )
2002e2c: 80 a2 20 00 cmp %o0, 0
2002e30: 12 80 00 07 bne 2002e4c <rtems_filesystem_initialize+0x110><== NEVER TAKEN
2002e34: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
2002e38: 81 c7 e0 08 ret
2002e3c: 81 e8 00 00 restore
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
2002e40: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
2002e44: 40 00 12 e3 call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002e48: 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 );
2002e4c: 40 00 12 e1 call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002e50: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
2002e54: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
2002e58: 40 00 12 de call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2002e5c: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <RAM_END+0xa98d0002><== NOT EXECUTED
0200d270 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
200d270: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d274: 37 00 80 71 sethi %hi(0x201c400), %i3 <== NOT EXECUTED
200d278: c2 06 e3 8c ld [ %i3 + 0x38c ], %g1 ! 201c78c <rtems_filesystem_table><== NOT EXECUTED
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
200d27c: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d280: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d284: 02 80 00 13 be 200d2d0 <rtems_filesystem_iterate+0x60> <== NOT EXECUTED
200d288: b6 16 e3 8c or %i3, 0x38c, %i3 <== NOT EXECUTED
200d28c: b8 10 00 1b mov %i3, %i4 <== NOT EXECUTED
200d290: 10 80 00 05 b 200d2a4 <rtems_filesystem_iterate+0x34> <== NOT EXECUTED
200d294: b4 06 e0 08 add %i3, 8, %i2 <== NOT EXECUTED
200d298: b0 8a 20 ff andcc %o0, 0xff, %i0 <== NOT EXECUTED
200d29c: 12 80 00 28 bne 200d33c <rtems_filesystem_iterate+0xcc> <== NOT EXECUTED
200d2a0: 01 00 00 00 nop <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
200d2a4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200d2a8: 9f c7 40 00 call %i5 <== NOT EXECUTED
200d2ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
rtems_filesystem_table_t entry;
} filesystem_node;
static RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain);
bool rtems_filesystem_iterate(
200d2b0: 82 27 00 1b sub %i4, %i3, %g1 <== NOT EXECUTED
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d2b4: c2 06 80 01 ld [ %i2 + %g1 ], %g1 <== NOT EXECUTED
200d2b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d2bc: 12 bf ff f7 bne 200d298 <rtems_filesystem_iterate+0x28> <== NOT EXECUTED
200d2c0: b8 07 20 08 add %i4, 8, %i4 <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
200d2c4: b0 8a 20 ff andcc %o0, 0xff, %i0 <== NOT EXECUTED
200d2c8: 12 80 00 1d bne 200d33c <rtems_filesystem_iterate+0xcc> <== NOT EXECUTED
200d2cc: 01 00 00 00 nop <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200d2d0: 39 00 80 7c sethi %hi(0x201f000), %i4 <== NOT EXECUTED
200d2d4: d0 07 23 00 ld [ %i4 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200d2d8: 35 00 80 7a sethi %hi(0x201e800), %i2 <== NOT EXECUTED
200d2dc: 92 10 20 00 clr %o1 <== NOT EXECUTED
200d2e0: 7f ff e7 f8 call 20072c0 <rtems_semaphore_obtain> <== NOT EXECUTED
200d2e4: 94 10 20 00 clr %o2 <== NOT EXECUTED
200d2e8: f6 06 a1 78 ld [ %i2 + 0x178 ], %i3 <== NOT EXECUTED
200d2ec: b4 16 a1 78 or %i2, 0x178, %i2 <== NOT EXECUTED
rtems_libio_lock();
for (
200d2f0: b4 06 a0 04 add %i2, 4, %i2 <== NOT EXECUTED
200d2f4: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
200d2f8: 12 80 00 05 bne 200d30c <rtems_filesystem_iterate+0x9c> <== NOT EXECUTED
200d2fc: b0 10 20 00 clr %i0 <== NOT EXECUTED
200d300: 30 80 00 0b b,a 200d32c <rtems_filesystem_iterate+0xbc> <== NOT EXECUTED
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
200d304: 12 80 00 0a bne 200d32c <rtems_filesystem_iterate+0xbc> <== NOT EXECUTED
200d308: 01 00 00 00 nop <== NOT EXECUTED
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
200d30c: 90 06 e0 08 add %i3, 8, %o0 <== NOT EXECUTED
200d310: 9f c7 40 00 call %i5 <== NOT EXECUTED
200d314: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200d318: f6 06 c0 00 ld [ %i3 ], %i3 <== NOT EXECUTED
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
200d31c: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
200d320: 32 bf ff f9 bne,a 200d304 <rtems_filesystem_iterate+0x94><== NOT EXECUTED
200d324: b0 8a 20 ff andcc %o0, 0xff, %i0 <== NOT EXECUTED
200d328: b0 0a 20 ff and %o0, 0xff, %i0 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d32c: 7f ff e8 2f call 20073e8 <rtems_semaphore_release> <== NOT EXECUTED
200d330: d0 07 23 00 ld [ %i4 + 0x300 ], %o0 <== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
200d334: 81 c7 e0 08 ret <== NOT EXECUTED
200d338: 81 e8 00 00 restore <== NOT EXECUTED
200d33c: 81 c7 e0 08 ret <== NOT EXECUTED
200d340: 81 e8 00 00 restore <== NOT EXECUTED
02003d64 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
2003d64: 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 );
2003d68: 3b 00 80 7c sethi %hi(0x201f000), %i5
2003d6c: d0 07 63 00 ld [ %i5 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2003d70: 37 00 80 7a sethi %hi(0x201e800), %i3
2003d74: 92 10 20 00 clr %o1
2003d78: 40 00 0d 52 call 20072c0 <rtems_semaphore_obtain>
2003d7c: 94 10 20 00 clr %o2
2003d80: f8 06 e1 50 ld [ %i3 + 0x150 ], %i4
2003d84: b4 10 00 18 mov %i0, %i2
2003d88: b6 16 e1 50 or %i3, 0x150, %i3
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
2003d8c: b6 06 e0 04 add %i3, 4, %i3
2003d90: 80 a7 00 1b cmp %i4, %i3
2003d94: 12 80 00 05 bne 2003da8 <rtems_filesystem_mount_iterate+0x44><== ALWAYS TAKEN
2003d98: b0 10 20 00 clr %i0
2003d9c: 30 80 00 0b b,a 2003dc8 <rtems_filesystem_mount_iterate+0x64><== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
2003da0: 12 80 00 0a bne 2003dc8 <rtems_filesystem_mount_iterate+0x64><== NEVER TAKEN
2003da4: 01 00 00 00 nop
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
2003da8: 90 10 00 1c mov %i4, %o0
2003dac: 9f c6 80 00 call %i2
2003db0: 92 10 00 19 mov %i1, %o1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2003db4: f8 07 00 00 ld [ %i4 ], %i4
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
2003db8: 80 a7 00 1b cmp %i4, %i3
2003dbc: 32 bf ff f9 bne,a 2003da0 <rtems_filesystem_mount_iterate+0x3c>
2003dc0: b0 8a 20 ff andcc %o0, 0xff, %i0
2003dc4: b0 0a 20 ff and %o0, 0xff, %i0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2003dc8: 40 00 0d 88 call 20073e8 <rtems_semaphore_release>
2003dcc: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
2003dd0: 81 c7 e0 08 ret
2003dd4: 81 e8 00 00 restore
02003264 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
2003264: 9d e3 bf a0 save %sp, -96, %sp
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
2003268: 80 a6 60 00 cmp %i1, 0
200326c: 02 80 00 17 be 20032c8 <rtems_filesystem_prefix_separators+0x64>
2003270: d0 0e 00 00 ldub [ %i0 ], %o0
2003274: 91 2a 20 18 sll %o0, 0x18, %o0
2003278: ba 10 00 18 mov %i0, %i5
200327c: 80 a2 20 00 cmp %o0, 0
2003280: 12 80 00 0b bne 20032ac <rtems_filesystem_prefix_separators+0x48>
2003284: b0 10 20 00 clr %i0
2003288: 30 80 00 11 b,a 20032cc <rtems_filesystem_prefix_separators+0x68>
{
pathname++;
pathnamelen--;
stripped++;
200328c: b0 06 20 01 inc %i0
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
2003290: 80 a6 40 18 cmp %i1, %i0
2003294: 02 80 00 0b be 20032c0 <rtems_filesystem_prefix_separators+0x5c>
2003298: ba 07 60 01 inc %i5
200329c: 91 2a 20 18 sll %o0, 0x18, %o0
20032a0: 80 a2 20 00 cmp %o0, 0
20032a4: 02 80 00 0a be 20032cc <rtems_filesystem_prefix_separators+0x68><== NEVER TAKEN
20032a8: 01 00 00 00 nop
20032ac: 40 00 04 d3 call 20045f8 <rtems_filesystem_is_separator>
20032b0: 91 3a 20 18 sra %o0, 0x18, %o0
20032b4: 80 a2 20 00 cmp %o0, 0
20032b8: 32 bf ff f5 bne,a 200328c <rtems_filesystem_prefix_separators+0x28>
20032bc: d0 0f 60 01 ldub [ %i5 + 1 ], %o0
20032c0: 81 c7 e0 08 ret
20032c4: 81 e8 00 00 restore
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
20032c8: b0 10 20 00 clr %i0
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
20032cc: 81 c7 e0 08 ret
20032d0: 81 e8 00 00 restore
0200d444 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
200d444: 9d e3 bf a0 save %sp, -96, %sp
size_t type_size = strlen(type) + 1;
200d448: 40 00 15 fa call 2012c30 <strlen>
200d44c: 90 10 00 18 mov %i0, %o0
200d450: b8 10 00 08 mov %o0, %i4
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
200d454: 7f ff d8 db call 20037c0 <malloc>
200d458: 90 02 20 11 add %o0, 0x11, %o0
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
200d45c: ba 92 20 00 orcc %o0, 0, %i5
200d460: 02 80 00 5c be 200d5d0 <rtems_filesystem_register+0x18c>
200d464: b4 07 60 10 add %i5, 0x10, %i2
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
200d468: 92 10 00 18 mov %i0, %o1
200d46c: 94 07 20 01 add %i4, 1, %o2
200d470: 40 00 12 b4 call 2011f40 <memcpy>
200d474: 90 10 00 1a mov %i2, %o0
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 );
200d478: 37 00 80 7c sethi %hi(0x201f000), %i3
200d47c: d0 06 e3 00 ld [ %i3 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
fsn->entry.type = type_storage;
200d480: f4 27 60 08 st %i2, [ %i5 + 8 ]
fsn->entry.mount_h = mount_h;
200d484: f2 27 60 0c st %i1, [ %i5 + 0xc ]
200d488: 92 10 20 00 clr %o1
200d48c: 7f ff e7 8d call 20072c0 <rtems_semaphore_obtain>
200d490: 94 10 20 00 clr %o2
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
200d494: 80 a6 20 00 cmp %i0, 0
200d498: 02 80 00 3b be 200d584 <rtems_filesystem_register+0x140> <== NEVER TAKEN
200d49c: b8 10 20 00 clr %i4
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d4a0: 33 00 80 71 sethi %hi(0x201c400), %i1
200d4a4: d0 06 63 8c ld [ %i1 + 0x38c ], %o0 ! 201c78c <rtems_filesystem_table>
200d4a8: 80 a2 20 00 cmp %o0, 0
200d4ac: 02 80 00 17 be 200d508 <rtems_filesystem_register+0xc4> <== NEVER TAKEN
200d4b0: b2 16 63 8c or %i1, 0x38c, %i1
200d4b4: b4 10 00 19 mov %i1, %i2
200d4b8: 10 80 00 05 b 200d4cc <rtems_filesystem_register+0x88>
200d4bc: a0 06 60 08 add %i1, 8, %l0
200d4c0: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
200d4c4: 12 80 00 2e bne 200d57c <rtems_filesystem_register+0x138> <== NOT EXECUTED
200d4c8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d4cc: 40 00 13 e8 call 201246c <strcmp>
200d4d0: 92 10 00 18 mov %i0, %o1
return fa.mount_h;
}
int
rtems_filesystem_register(
200d4d4: 84 26 80 19 sub %i2, %i1, %g2
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d4d8: 80 a2 20 00 cmp %o0, 0
200d4dc: 12 80 00 04 bne 200d4ec <rtems_filesystem_register+0xa8> <== ALWAYS TAKEN
200d4e0: 82 10 20 00 clr %g1
return false;
} else {
fa->mount_h = entry->mount_h;
200d4e4: f8 06 a0 04 ld [ %i2 + 4 ], %i4 <== NOT EXECUTED
return true;
200d4e8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200d4ec: d0 04 00 02 ld [ %l0 + %g2 ], %o0
200d4f0: 80 a2 20 00 cmp %o0, 0
200d4f4: 12 bf ff f3 bne 200d4c0 <rtems_filesystem_register+0x7c> <== NEVER TAKEN
200d4f8: b4 06 a0 08 add %i2, 8, %i2
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
200d4fc: 80 88 60 ff btst 0xff, %g1
200d500: 12 80 00 1f bne 200d57c <rtems_filesystem_register+0x138> <== NEVER TAKEN
200d504: 80 a7 20 00 cmp %i4, 0
200d508: d0 06 e3 00 ld [ %i3 + 0x300 ], %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200d50c: 33 00 80 7a sethi %hi(0x201e800), %i1
200d510: 92 10 20 00 clr %o1
200d514: 7f ff e7 6b call 20072c0 <rtems_semaphore_obtain>
200d518: 94 10 20 00 clr %o2
200d51c: f4 06 61 78 ld [ %i1 + 0x178 ], %i2
200d520: b2 16 61 78 or %i1, 0x178, %i1
rtems_libio_lock();
for (
200d524: b2 06 60 04 add %i1, 4, %i1
200d528: 80 a6 80 19 cmp %i2, %i1
200d52c: 32 80 00 06 bne,a 200d544 <rtems_filesystem_register+0x100>
200d530: d0 06 a0 08 ld [ %i2 + 8 ], %o0
200d534: 30 80 00 0f b,a 200d570 <rtems_filesystem_register+0x12c>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
200d538: 12 80 00 0e bne 200d570 <rtems_filesystem_register+0x12c> <== NEVER TAKEN
200d53c: 01 00 00 00 nop
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
200d540: d0 06 a0 08 ld [ %i2 + 8 ], %o0
200d544: 40 00 13 ca call 201246c <strcmp>
200d548: 92 10 00 18 mov %i0, %o1
200d54c: 80 a2 20 00 cmp %o0, 0
200d550: 12 80 00 04 bne 200d560 <rtems_filesystem_register+0x11c>
200d554: 82 10 20 00 clr %g1
return false;
} else {
fa->mount_h = entry->mount_h;
200d558: f8 06 a0 0c ld [ %i2 + 0xc ], %i4
return true;
200d55c: 82 10 20 01 mov 1, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200d560: f4 06 80 00 ld [ %i2 ], %i2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
200d564: 80 a6 80 19 cmp %i2, %i1
200d568: 12 bf ff f4 bne 200d538 <rtems_filesystem_register+0xf4>
200d56c: 80 88 60 ff btst 0xff, %g1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d570: 7f ff e7 9e call 20073e8 <rtems_semaphore_release>
200d574: d0 06 e3 00 ld [ %i3 + 0x300 ], %o0
memcpy(type_storage, type, type_size);
fsn->entry.type = type_storage;
fsn->entry.mount_h = mount_h;
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
200d578: 80 a7 20 00 cmp %i4, 0
200d57c: 32 80 00 0b bne,a 200d5a8 <rtems_filesystem_register+0x164>
200d580: d0 06 e3 00 ld [ %i3 + 0x300 ], %o0
200d584: 92 10 00 1d mov %i5, %o1
200d588: 11 00 80 7a sethi %hi(0x201e800), %o0
200d58c: 7f ff e9 fc call 2007d7c <_Chain_Append>
200d590: 90 12 21 78 or %o0, 0x178, %o0 ! 201e978 <filesystem_chain>
200d594: d0 06 e3 00 ld [ %i3 + 0x300 ], %o0
200d598: 7f ff e7 94 call 20073e8 <rtems_semaphore_release>
200d59c: b0 10 20 00 clr %i0
200d5a0: 81 c7 e0 08 ret
200d5a4: 81 e8 00 00 restore
200d5a8: 7f ff e7 90 call 20073e8 <rtems_semaphore_release>
200d5ac: b0 10 3f ff mov -1, %i0
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
200d5b0: 7f ff d7 50 call 20032f0 <free>
200d5b4: 90 10 00 1d mov %i5, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
200d5b8: 40 00 10 06 call 20115d0 <__errno>
200d5bc: 01 00 00 00 nop
200d5c0: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
200d5c4: c2 22 00 00 st %g1, [ %o0 ]
}
rtems_libio_unlock();
return 0;
}
200d5c8: 81 c7 e0 08 ret
200d5cc: 81 e8 00 00 restore
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
200d5d0: 40 00 10 00 call 20115d0 <__errno>
200d5d4: b0 10 3f ff mov -1, %i0
200d5d8: 82 10 20 0c mov 0xc, %g1
200d5dc: c2 22 00 00 st %g1, [ %o0 ]
200d5e0: 81 c7 e0 08 ret
200d5e4: 81 e8 00 00 restore
0200d5e8 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
200d5e8: 9d e3 bf a0 save %sp, -96, %sp
rtems_chain_node *node = NULL;
if ( type == NULL ) {
200d5ec: 80 a6 20 00 cmp %i0, 0
200d5f0: 02 80 00 29 be 200d694 <rtems_filesystem_unregister+0xac>
200d5f4: 3b 00 80 7c sethi %hi(0x201f000), %i5
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200d5f8: d0 07 63 00 ld [ %i5 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200d5fc: 37 00 80 7a sethi %hi(0x201e800), %i3
200d600: 92 10 20 00 clr %o1
200d604: 7f ff e7 2f call 20072c0 <rtems_semaphore_obtain>
200d608: 94 10 20 00 clr %o2
200d60c: f8 06 e1 78 ld [ %i3 + 0x178 ], %i4
200d610: b6 16 e1 78 or %i3, 0x178, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
200d614: b6 06 e0 04 add %i3, 4, %i3
200d618: 80 a7 00 1b cmp %i4, %i3
200d61c: 32 80 00 08 bne,a 200d63c <rtems_filesystem_unregister+0x54>
200d620: d0 07 20 08 ld [ %i4 + 8 ], %o0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d624: 10 80 00 14 b 200d674 <rtems_filesystem_unregister+0x8c>
200d628: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
200d62c: 80 a7 00 1b cmp %i4, %i3
200d630: 02 80 00 11 be 200d674 <rtems_filesystem_unregister+0x8c> <== ALWAYS TAKEN
200d634: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
200d638: d0 07 20 08 ld [ %i4 + 8 ], %o0 <== NOT EXECUTED
200d63c: 40 00 13 8c call 201246c <strcmp>
200d640: 92 10 00 18 mov %i0, %o1
200d644: 80 a2 20 00 cmp %o0, 0
200d648: 32 bf ff f9 bne,a 200d62c <rtems_filesystem_unregister+0x44>
200d64c: f8 07 00 00 ld [ %i4 ], %i4
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200d650: 7f ff e9 d6 call 2007da8 <_Chain_Extract>
200d654: 90 10 00 1c mov %i4, %o0
rtems_chain_extract( node );
free( fsn );
200d658: 7f ff d7 26 call 20032f0 <free>
200d65c: 90 10 00 1c mov %i4, %o0
200d660: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
200d664: 7f ff e7 61 call 20073e8 <rtems_semaphore_release>
200d668: b0 10 20 00 clr %i0
200d66c: 81 c7 e0 08 ret
200d670: 81 e8 00 00 restore
200d674: 7f ff e7 5d call 20073e8 <rtems_semaphore_release>
200d678: b0 10 3f ff mov -1, %i0
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
200d67c: 40 00 0f d5 call 20115d0 <__errno>
200d680: 01 00 00 00 nop
200d684: 82 10 20 02 mov 2, %g1 ! 2 <PROM_START+0x2>
200d688: c2 22 00 00 st %g1, [ %o0 ]
}
200d68c: 81 c7 e0 08 ret
200d690: 81 e8 00 00 restore
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
200d694: 40 00 0f cf call 20115d0 <__errno>
200d698: b0 10 3f ff mov -1, %i0
200d69c: 82 10 20 16 mov 0x16, %g1
200d6a0: c2 22 00 00 st %g1, [ %o0 ]
200d6a4: 81 c7 e0 08 ret
200d6a8: 81 e8 00 00 restore
02003c40 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
2003c40: 9d e3 bf a0 save %sp, -96, %sp
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
2003c44: 40 00 01 3d call 2004138 <malloc>
2003c48: 90 10 20 08 mov 8, %o0
*key = new_key;
new_key->val = NULL;
2003c4c: c0 22 00 00 clr [ %o0 ]
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
2003c50: d0 26 00 00 st %o0, [ %i0 ]
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
2003c54: ba 10 00 08 mov %o0, %i5
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
2003c58: 94 10 00 19 mov %i1, %o2
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
new_key->dtor = dtor;
2003c5c: f2 27 60 04 st %i1, [ %i5 + 4 ]
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
2003c60: 90 10 20 00 clr %o0
2003c64: 92 10 00 1d mov %i5, %o1
2003c68: 40 00 11 7c call 2008258 <rtems_task_variable_add>
2003c6c: b0 10 20 00 clr %i0
if ( status == RTEMS_SUCCESSFUL )
2003c70: 80 a2 20 00 cmp %o0, 0
2003c74: 02 80 00 04 be 2003c84 <rtems_gxx_key_create+0x44> <== ALWAYS TAKEN
2003c78: 90 10 00 1d mov %i5, %o0
return 0;
free( new_key );
2003c7c: 7f ff ff 39 call 2003960 <free> <== NOT EXECUTED
2003c80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
2003c84: 81 c7 e0 08 ret
2003c88: 81 e8 00 00 restore
02003c98 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
2003c98: 9d e3 bf a0 save %sp, -96, %sp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
2003c9c: 90 10 20 00 clr %o0
2003ca0: 40 00 11 9f call 200831c <rtems_task_variable_delete>
2003ca4: 92 10 00 18 mov %i0, %o1
if ( status == RTEMS_SUCCESSFUL ) {
2003ca8: 80 a2 20 00 cmp %o0, 0
2003cac: 12 80 00 06 bne 2003cc4 <rtems_gxx_key_delete+0x2c> <== NEVER TAKEN
2003cb0: 80 a6 20 00 cmp %i0, 0
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
2003cb4: 02 80 00 04 be 2003cc4 <rtems_gxx_key_delete+0x2c> <== NEVER TAKEN
2003cb8: 01 00 00 00 nop
2003cbc: 7f ff ff 29 call 2003960 <free>
2003cc0: d0 06 00 00 ld [ %i0 ], %o0
return 0;
}
key = NULL;
return 0;
}
2003cc4: 81 c7 e0 08 ret
2003cc8: 91 e8 20 00 restore %g0, 0, %o0
02003bd0 <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
2003bd0: 9d e3 bf 98 save %sp, -104, %sp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
2003bd4: c2 06 00 00 ld [ %i0 ], %g1
2003bd8: 80 a0 60 00 cmp %g1, 0
2003bdc: 02 80 00 04 be 2003bec <rtems_gxx_once+0x1c>
2003be0: 92 10 21 00 mov 0x100, %o1
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
2003be4: 81 c7 e0 08 ret
2003be8: 91 e8 20 00 restore %g0, 0, %o0
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2003bec: 94 07 bf fc add %fp, -4, %o2
2003bf0: 40 00 11 13 call 200803c <rtems_task_mode>
2003bf4: 90 10 21 00 mov 0x100, %o0
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
2003bf8: c2 06 00 00 ld [ %i0 ], %g1
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2003bfc: d0 07 bf fc ld [ %fp + -4 ], %o0
2003c00: 92 10 21 00 mov 0x100, %o1
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
2003c04: 80 a0 60 00 cmp %g1, 0
2003c08: 12 80 00 0a bne 2003c30 <rtems_gxx_once+0x60> <== NEVER TAKEN
2003c0c: 94 07 bf fc add %fp, -4, %o2
*(volatile __gthread_once_t *)once = 1;
2003c10: 82 10 20 01 mov 1, %g1
2003c14: c2 26 00 00 st %g1, [ %i0 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2003c18: 40 00 11 09 call 200803c <rtems_task_mode>
2003c1c: b0 10 20 00 clr %i0
if ( o == 0 )
(*func)();
2003c20: 9f c6 40 00 call %i1
2003c24: 01 00 00 00 nop
}
return 0;
}
2003c28: 81 c7 e0 08 ret
2003c2c: 81 e8 00 00 restore
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2003c30: 40 00 11 03 call 200803c <rtems_task_mode> <== NOT EXECUTED
2003c34: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
2003c38: 81 c7 e0 08 ret <== NOT EXECUTED
2003c3c: 81 e8 00 00 restore <== NOT EXECUTED
02003e30 <rtems_gxx_recursive_mutex_init>:
void rtems_gxx_recursive_mutex_init(__gthread_recursive_mutex_t *mutex)
{
2003e30: 9d e3 bf a0 save %sp, -96, %sp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init =%X\n", *mutex );
#endif
status = rtems_semaphore_create(
2003e34: 92 10 20 01 mov 1, %o1
2003e38: 11 11 d0 d0 sethi %hi(0x47434000), %o0
2003e3c: 94 10 20 54 mov 0x54, %o2
2003e40: 90 12 23 32 or %o0, 0x332, %o0
2003e44: 96 10 20 00 clr %o3
2003e48: 40 00 0e d5 call 200799c <rtems_semaphore_create>
2003e4c: 98 10 00 18 mov %i0, %o4
RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
0,
(rtems_id *)mutex
);
if ( status != RTEMS_SUCCESSFUL ) {
2003e50: 80 a2 20 00 cmp %o0, 0
2003e54: 12 80 00 04 bne 2003e64 <rtems_gxx_recursive_mutex_init+0x34><== NEVER TAKEN
2003e58: 90 10 20 00 clr %o0
2003e5c: 81 c7 e0 08 ret
2003e60: 81 e8 00 00 restore
"gxx_wrappers: mutex init failed %s (%d)\n",
rtems_status_text(status),
status
);
#endif
_Internal_error_Occurred(
2003e64: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003e68: 40 00 15 b1 call 200952c <_Internal_error_Occurred> <== NOT EXECUTED
2003e6c: 94 10 20 16 mov 0x16, %o2 <== NOT EXECUTED
02003d34 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
2003d34: 9d e3 bf a0 save %sp, -96, %sp
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
2003d38: d4 06 20 04 ld [ %i0 + 4 ], %o2
2003d3c: 92 10 00 18 mov %i0, %o1
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
2003d40: ba 10 00 18 mov %i0, %i5
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
2003d44: 90 10 20 00 clr %o0
2003d48: 40 00 11 44 call 2008258 <rtems_task_variable_add>
2003d4c: b0 10 3f ff mov -1, %i0
if ( status == RTEMS_SUCCESSFUL ) {
2003d50: 80 a2 20 00 cmp %o0, 0
2003d54: 12 80 00 04 bne 2003d64 <rtems_gxx_setspecific+0x30> <== NEVER TAKEN
2003d58: 01 00 00 00 nop
/* now let's set the proper value */
key->val = (void *)ptr;
2003d5c: f2 27 40 00 st %i1, [ %i5 ]
return 0;
2003d60: b0 10 20 00 clr %i0
}
return -1;
}
2003d64: 81 c7 e0 08 ret
2003d68: 81 e8 00 00 restore
02008c58 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
2008c58: 9d e3 bf a0 save %sp, -96, %sp
if (
2008c5c: 03 00 80 9c sethi %hi(0x2027000), %g1
2008c60: c2 00 63 48 ld [ %g1 + 0x348 ], %g1 ! 2027348 <_System_state_Current>
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
2008c64: b8 10 00 18 mov %i0, %i4
2008c68: ba 10 00 19 mov %i1, %i5
if (
2008c6c: 80 a0 60 03 cmp %g1, 3
2008c70: 02 80 00 08 be 2008c90 <rtems_heap_allocate_aligned_with_boundary+0x38><== ALWAYS TAKEN
2008c74: b6 10 00 1a mov %i2, %i3
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
2008c78: 7f ff fb 82 call 2007a80 <malloc_deferred_frees_process>
2008c7c: b2 10 00 1c mov %i4, %i1
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
2008c80: 03 00 80 97 sethi %hi(0x2025c00), %g1
2008c84: f0 00 60 88 ld [ %g1 + 0x88 ], %i0 ! 2025c88 <RTEMS_Malloc_Heap>
2008c88: 40 00 17 1e call 200e900 <_Protected_heap_Allocate_aligned_with_boundary>
2008c8c: 95 e8 00 1d restore %g0, %i5, %o2
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
2008c90: 7f ff fb 6a call 2007a38 <malloc_is_system_state_OK>
2008c94: 01 00 00 00 nop
2008c98: 80 8a 20 ff btst 0xff, %o0
2008c9c: 12 bf ff f7 bne 2008c78 <rtems_heap_allocate_aligned_with_boundary+0x20>
2008ca0: b0 10 20 00 clr %i0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
2008ca4: 81 c7 e0 08 ret
2008ca8: 81 e8 00 00 restore
02002ca4 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
2002ca4: 9d e3 bf 88 save %sp, -120, %sp
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
2002ca8: 40 00 3f e2 call 2012c30 <strlen>
2002cac: 90 10 00 18 mov %i0, %o0
2002cb0: 94 10 20 00 clr %o2
2002cb4: 92 10 00 08 mov %o0, %o1
2002cb8: 96 07 bf ec add %fp, -20, %o3
2002cbc: 98 10 20 01 mov 1, %o4
2002cc0: 40 00 01 37 call 200319c <rtems_filesystem_evaluate_path>
2002cc4: 90 10 00 18 mov %i0, %o0
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
2002cc8: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
2002ccc: b8 10 00 08 mov %o0, %i4
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
2002cd0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
2002cd4: fa 07 bf ec ld [ %fp + -20 ], %i5
node_type = (*loc.ops->node_type_h)( &loc );
2002cd8: 9f c0 40 00 call %g1
2002cdc: 90 07 bf ec add %fp, -20, %o0
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2002ce0: 80 a2 20 02 cmp %o0, 2
2002ce4: 02 80 00 07 be 2002d00 <rtems_io_lookup_name+0x5c>
2002ce8: 80 a7 20 00 cmp %i4, 0
rtems_filesystem_freenode( &loc );
2002cec: 90 07 bf ec add %fp, -20, %o0
2002cf0: 40 00 01 79 call 20032d4 <rtems_filesystem_freenode>
2002cf4: b0 10 20 0d mov 0xd, %i0
return RTEMS_UNSATISFIED;
2002cf8: 81 c7 e0 08 ret
2002cfc: 81 e8 00 00 restore
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2002d00: 12 bf ff fc bne 2002cf0 <rtems_io_lookup_name+0x4c> <== NEVER TAKEN
2002d04: 90 07 bf ec add %fp, -20, %o0
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = name;
2002d08: f0 26 40 00 st %i0, [ %i1 ]
device_info->device_name_length = strlen( name );
2002d0c: 40 00 3f c9 call 2012c30 <strlen>
2002d10: 90 10 00 18 mov %i0, %o0
2002d14: d0 26 60 04 st %o0, [ %i1 + 4 ]
device_info->major = the_jnode->info.device.major;
2002d18: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
2002d1c: 90 07 bf ec add %fp, -20, %o0
return RTEMS_UNSATISFIED;
}
device_info->device_name = name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
2002d20: c2 26 60 08 st %g1, [ %i1 + 8 ]
device_info->minor = the_jnode->info.device.minor;
2002d24: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
2002d28: b0 10 20 00 clr %i0
device_info->device_name = name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
2002d2c: 40 00 01 6a call 20032d4 <rtems_filesystem_freenode>
2002d30: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return RTEMS_SUCCESSFUL;
}
2002d34: 81 c7 e0 08 ret
2002d38: 81 e8 00 00 restore
02008c38 <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
)
{
2008c38: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2008c3c: 03 00 80 90 sethi %hi(0x2024000), %g1
2008c40: c4 00 62 08 ld [ %g1 + 0x208 ], %g2 ! 2024208 <_Per_CPU_Information+0x8>
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2008c44: 86 10 00 19 mov %i1, %g3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
2008c48: 03 00 80 91 sethi %hi(0x2024400), %g1
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
2008c4c: 88 10 20 12 mov 0x12, %g4
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2008c50: 80 a0 a0 00 cmp %g2, 0
2008c54: 02 80 00 04 be 2008c64 <rtems_io_register_driver+0x2c>
2008c58: de 00 62 44 ld [ %g1 + 0x244 ], %o7
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2008c5c: 81 c7 e0 08 ret
2008c60: 91 e8 00 04 restore %g0, %g4, %o0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
2008c64: 80 a6 a0 00 cmp %i2, 0
2008c68: 02 80 00 40 be 2008d68 <rtems_io_register_driver+0x130>
2008c6c: 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 )
2008c70: 02 80 00 3e be 2008d68 <rtems_io_register_driver+0x130>
2008c74: de 26 80 00 st %o7, [ %i2 ]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008c78: c4 06 40 00 ld [ %i1 ], %g2
2008c7c: 80 a0 a0 00 cmp %g2, 0
2008c80: 22 80 00 37 be,a 2008d5c <rtems_io_register_driver+0x124>
2008c84: 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 )
2008c88: 80 a3 c0 18 cmp %o7, %i0
2008c8c: 08 bf ff f4 bleu 2008c5c <rtems_io_register_driver+0x24>
2008c90: 88 10 20 0a mov 0xa, %g4
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2008c94: 05 00 80 8f sethi %hi(0x2023c00), %g2
2008c98: c8 00 a0 c0 ld [ %g2 + 0xc0 ], %g4 ! 2023cc0 <_Thread_Dispatch_disable_level>
2008c9c: 88 01 20 01 inc %g4
2008ca0: c8 20 a0 c0 st %g4, [ %g2 + 0xc0 ]
return _Thread_Dispatch_disable_level;
2008ca4: c4 00 a0 c0 ld [ %g2 + 0xc0 ], %g2
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
2008ca8: 80 a6 20 00 cmp %i0, 0
2008cac: 12 80 00 32 bne 2008d74 <rtems_io_register_driver+0x13c>
2008cb0: 1f 00 80 91 sethi %hi(0x2024400), %o7
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
2008cb4: c8 00 62 44 ld [ %g1 + 0x244 ], %g4
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
2008cb8: 80 a1 20 00 cmp %g4, 0
2008cbc: 02 80 00 45 be 2008dd0 <rtems_io_register_driver+0x198> <== NEVER TAKEN
2008cc0: c2 03 e2 48 ld [ %o7 + 0x248 ], %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008cc4: 10 80 00 06 b 2008cdc <rtems_io_register_driver+0xa4>
2008cc8: c4 00 40 00 ld [ %g1 ], %g2
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
2008ccc: 80 a6 00 04 cmp %i0, %g4
2008cd0: 02 80 00 35 be 2008da4 <rtems_io_register_driver+0x16c>
2008cd4: 82 00 60 18 add %g1, 0x18, %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008cd8: c4 00 40 00 ld [ %g1 ], %g2
2008cdc: 80 a0 a0 00 cmp %g2, 0
2008ce0: 32 bf ff fb bne,a 2008ccc <rtems_io_register_driver+0x94>
2008ce4: b0 06 20 01 inc %i0
2008ce8: c4 00 60 04 ld [ %g1 + 4 ], %g2
2008cec: 80 a0 a0 00 cmp %g2, 0
2008cf0: 32 bf ff f7 bne,a 2008ccc <rtems_io_register_driver+0x94>
2008cf4: b0 06 20 01 inc %i0
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2008cf8: f0 26 80 00 st %i0, [ %i2 ]
2008cfc: 83 2e 20 03 sll %i0, 3, %g1
if ( m != n )
2008d00: 80 a1 00 18 cmp %g4, %i0
2008d04: 02 80 00 29 be 2008da8 <rtems_io_register_driver+0x170> <== NEVER TAKEN
2008d08: 9b 2e 20 05 sll %i0, 5, %o5
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2008d0c: c8 00 c0 00 ld [ %g3 ], %g4
2008d10: c4 03 e2 48 ld [ %o7 + 0x248 ], %g2
2008d14: 82 23 40 01 sub %o5, %g1, %g1
2008d18: c8 20 80 01 st %g4, [ %g2 + %g1 ]
2008d1c: c8 00 e0 04 ld [ %g3 + 4 ], %g4
2008d20: 82 00 80 01 add %g2, %g1, %g1
2008d24: c8 20 60 04 st %g4, [ %g1 + 4 ]
2008d28: c4 00 e0 08 ld [ %g3 + 8 ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2008d2c: b2 10 20 00 clr %i1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2008d30: c4 20 60 08 st %g2, [ %g1 + 8 ]
2008d34: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2008d38: b4 10 20 00 clr %i2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2008d3c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2008d40: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2008d44: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
2008d48: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
_Thread_Enable_dispatch();
2008d4c: 40 00 08 52 call 200ae94 <_Thread_Enable_dispatch>
2008d50: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
return rtems_io_initialize( major, 0, NULL );
2008d54: 40 00 27 6c call 2012b04 <rtems_io_initialize>
2008d58: 81 e8 00 00 restore
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008d5c: 80 a0 a0 00 cmp %g2, 0
2008d60: 12 bf ff cb bne 2008c8c <rtems_io_register_driver+0x54>
2008d64: 80 a3 c0 18 cmp %o7, %i0
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
2008d68: 88 10 20 09 mov 9, %g4
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2008d6c: 81 c7 e0 08 ret
2008d70: 91 e8 00 04 restore %g0, %g4, %o0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
2008d74: c8 03 e2 48 ld [ %o7 + 0x248 ], %g4
2008d78: 83 2e 20 03 sll %i0, 3, %g1
2008d7c: 9b 2e 20 05 sll %i0, 5, %o5
2008d80: 84 23 40 01 sub %o5, %g1, %g2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008d84: d8 01 00 02 ld [ %g4 + %g2 ], %o4
2008d88: 80 a3 20 00 cmp %o4, 0
2008d8c: 02 80 00 0b be 2008db8 <rtems_io_register_driver+0x180>
2008d90: 84 01 00 02 add %g4, %g2, %g2
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
2008d94: 40 00 08 40 call 200ae94 <_Thread_Enable_dispatch>
2008d98: 01 00 00 00 nop
return RTEMS_RESOURCE_IN_USE;
2008d9c: 10 bf ff b0 b 2008c5c <rtems_io_register_driver+0x24>
2008da0: 88 10 20 0c mov 0xc, %g4 ! c <PROM_START+0xc>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2008da4: f0 26 80 00 st %i0, [ %i2 ]
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
2008da8: 40 00 08 3b call 200ae94 <_Thread_Enable_dispatch>
2008dac: 01 00 00 00 nop
return sc;
2008db0: 10 bf ff ab b 2008c5c <rtems_io_register_driver+0x24>
2008db4: 88 10 20 05 mov 5, %g4 ! 5 <PROM_START+0x5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2008db8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
2008dbc: 80 a0 a0 00 cmp %g2, 0
2008dc0: 12 bf ff f5 bne 2008d94 <rtems_io_register_driver+0x15c>
2008dc4: 01 00 00 00 nop
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
2008dc8: 10 bf ff d1 b 2008d0c <rtems_io_register_driver+0xd4>
2008dcc: f0 26 80 00 st %i0, [ %i2 ]
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2008dd0: 10 bf ff f6 b 2008da8 <rtems_io_register_driver+0x170> <== NOT EXECUTED
2008dd4: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
0200a09c <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)
{
200a09c: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
200a0a0: 80 a6 20 00 cmp %i0, 0
200a0a4: 02 80 00 20 be 200a124 <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
200a0a8: 37 00 80 87 sethi %hi(0x2021c00), %i3
200a0ac: b6 16 e2 9c or %i3, 0x29c, %i3 ! 2021e9c <_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)
200a0b0: b4 06 e0 0c add %i3, 0xc, %i2
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
200a0b4: c2 06 c0 00 ld [ %i3 ], %g1
200a0b8: f8 00 60 04 ld [ %g1 + 4 ], %i4
if ( !information )
200a0bc: 80 a7 20 00 cmp %i4, 0
200a0c0: 22 80 00 16 be,a 200a118 <rtems_iterate_over_all_threads+0x7c>
200a0c4: b6 06 e0 04 add %i3, 4, %i3
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200a0c8: c2 17 20 10 lduh [ %i4 + 0x10 ], %g1
200a0cc: 84 90 60 00 orcc %g1, 0, %g2
200a0d0: 22 80 00 12 be,a 200a118 <rtems_iterate_over_all_threads+0x7c>
200a0d4: b6 06 e0 04 add %i3, 4, %i3
200a0d8: ba 10 20 01 mov 1, %i5
the_thread = (Thread_Control *)information->local_table[ i ];
200a0dc: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
200a0e0: 83 2f 60 02 sll %i5, 2, %g1
200a0e4: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if ( !the_thread )
200a0e8: 90 90 60 00 orcc %g1, 0, %o0
200a0ec: 02 80 00 05 be 200a100 <rtems_iterate_over_all_threads+0x64>
200a0f0: ba 07 60 01 inc %i5
continue;
(*routine)(the_thread);
200a0f4: 9f c6 00 00 call %i0
200a0f8: 01 00 00 00 nop
200a0fc: c4 17 20 10 lduh [ %i4 + 0x10 ], %g2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200a100: 83 28 a0 10 sll %g2, 0x10, %g1
200a104: 83 30 60 10 srl %g1, 0x10, %g1
200a108: 80 a0 40 1d cmp %g1, %i5
200a10c: 3a bf ff f5 bcc,a 200a0e0 <rtems_iterate_over_all_threads+0x44>
200a110: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
200a114: b6 06 e0 04 add %i3, 4, %i3
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
200a118: 80 a6 c0 1a cmp %i3, %i2
200a11c: 32 bf ff e7 bne,a 200a0b8 <rtems_iterate_over_all_threads+0x1c>
200a120: c2 06 c0 00 ld [ %i3 ], %g1
200a124: 81 c7 e0 08 ret
200a128: 81 e8 00 00 restore
0200d0cc <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
200d0cc: 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 );
200d0d0: 39 00 80 7c sethi %hi(0x201f000), %i4
200d0d4: d0 07 23 00 ld [ %i4 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
200d0d8: 92 10 20 00 clr %o1
200d0dc: 7f ff e8 79 call 20072c0 <rtems_semaphore_obtain>
200d0e0: 94 10 20 00 clr %o2
rtems_libio_lock();
if (iop->sem)
200d0e4: d0 06 20 30 ld [ %i0 + 0x30 ], %o0
200d0e8: 80 a2 20 00 cmp %o0, 0
200d0ec: 02 80 00 04 be 200d0fc <rtems_libio_free+0x30> <== NEVER TAKEN
200d0f0: ba 10 00 18 mov %i0, %i5
rtems_semaphore_delete(iop->sem);
200d0f4: 7f ff e8 3c call 20071e4 <rtems_semaphore_delete>
200d0f8: 01 00 00 00 nop
iop->flags &= ~LIBIO_FLAGS_OPEN;
200d0fc: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
iop->data1 = rtems_libio_iop_freelist;
200d100: 03 00 80 7c sethi %hi(0x201f000), %g1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d104: f0 07 23 00 ld [ %i4 + 0x300 ], %i0
200d108: c6 00 62 fc ld [ %g1 + 0x2fc ], %g3
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200d10c: 84 08 be ff and %g2, -257, %g2
iop->data1 = rtems_libio_iop_freelist;
200d110: c6 27 60 38 st %g3, [ %i5 + 0x38 ]
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200d114: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
200d118: fa 20 62 fc st %i5, [ %g1 + 0x2fc ]
200d11c: 7f ff e8 b3 call 20073e8 <rtems_semaphore_release>
200d120: 81 e8 00 00 restore
02003560 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
2003560: 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)
2003564: 03 00 80 7a sethi %hi(0x201e800), %g1
2003568: fa 00 60 8c ld [ %g1 + 0x8c ], %i5 ! 201e88c <rtems_libio_number_iops>
200356c: 80 a7 60 00 cmp %i5, 0
2003570: 02 80 00 19 be 20035d4 <rtems_libio_init+0x74> <== NEVER TAKEN
2003574: 92 10 20 01 mov 1, %o1
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
2003578: 90 10 00 1d mov %i5, %o0
200357c: 7f ff fe 3a call 2002e64 <calloc>
2003580: 92 10 20 40 mov 0x40, %o1
2003584: 03 00 80 7c sethi %hi(0x201f000), %g1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
2003588: 80 a2 20 00 cmp %o0, 0
200358c: 02 80 00 26 be 2003624 <rtems_libio_init+0xc4>
2003590: d0 20 62 f8 st %o0, [ %g1 + 0x2f8 ]
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
2003594: 03 00 80 7c sethi %hi(0x201f000), %g1
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2003598: 80 a7 60 01 cmp %i5, 1
200359c: 08 80 00 0c bleu 20035cc <rtems_libio_init+0x6c> <== NEVER TAKEN
20035a0: d0 20 62 fc st %o0, [ %g1 + 0x2fc ]
20035a4: 82 10 00 08 mov %o0, %g1
20035a8: 84 10 20 01 mov 1, %g2
iop->data1 = iop + 1;
20035ac: 82 00 60 40 add %g1, 0x40, %g1
20035b0: 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++)
20035b4: 80 a0 80 1d cmp %g2, %i5
20035b8: 12 bf ff fd bne 20035ac <rtems_libio_init+0x4c>
20035bc: c2 20 7f f8 st %g1, [ %g1 + -8 ]
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
20035c0: 84 00 bf ff add %g2, -1, %g2
20035c4: 85 28 a0 06 sll %g2, 6, %g2
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
20035c8: 90 02 00 02 add %o0, %g2, %o0
iop->data1 = iop + 1;
iop->data1 = NULL;
20035cc: c0 22 20 38 clr [ %o0 + 0x38 ]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
20035d0: 92 10 20 01 mov 1, %o1
20035d4: 11 13 10 92 sethi %hi(0x4c424800), %o0
20035d8: 94 10 20 54 mov 0x54, %o2
20035dc: 90 12 21 4f or %o0, 0x14f, %o0
20035e0: 96 10 20 00 clr %o3
20035e4: 19 00 80 7c sethi %hi(0x201f000), %o4
20035e8: 40 00 0e 8f call 2007024 <rtems_semaphore_create>
20035ec: 98 13 23 00 or %o4, 0x300, %o4 ! 201f300 <rtems_libio_semaphore>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
20035f0: 80 a2 20 00 cmp %o0, 0
20035f4: 12 80 00 0a bne 200361c <rtems_libio_init+0xbc> <== NEVER TAKEN
20035f8: 03 00 80 7a sethi %hi(0x201e800), %g1
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
20035fc: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 201e890 <rtems_fs_init_helper>
2003600: 80 a0 60 00 cmp %g1, 0
2003604: 02 80 00 04 be 2003614 <rtems_libio_init+0xb4> <== NEVER TAKEN
2003608: 01 00 00 00 nop
(* rtems_fs_init_helper)();
200360c: 9f c0 40 00 call %g1
2003610: 01 00 00 00 nop
2003614: 81 c7 e0 08 ret
2003618: 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 );
200361c: 40 00 10 ed call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003620: 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);
2003624: 40 00 10 eb call 20079d0 <rtems_fatal_error_occurred>
2003628: 90 10 20 1a mov 0x1a, %o0 ! 1a <PROM_START+0x1a>
0200d1b0 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
200d1b0: 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 );
200d1b4: 3b 00 80 7c sethi %hi(0x201f000), %i5
200d1b8: d0 07 63 00 ld [ %i5 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
200d1bc: 92 10 20 00 clr %o1
200d1c0: 7f ff e8 40 call 20072c0 <rtems_semaphore_obtain>
200d1c4: 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++){
200d1c8: 03 00 80 7a sethi %hi(0x201e800), %g1
200d1cc: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c <rtems_libio_number_iops>
200d1d0: 05 00 80 7c sethi %hi(0x201f000), %g2
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
200d1d4: b8 10 20 00 clr %i4
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200d1d8: 80 a0 60 00 cmp %g1, 0
200d1dc: 02 80 00 0f be 200d218 <rtems_libio_is_file_open+0x68> <== NEVER TAKEN
200d1e0: c4 00 a2 f8 ld [ %g2 + 0x2f8 ], %g2
200d1e4: 86 10 20 00 clr %g3
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200d1e8: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
200d1ec: 80 89 21 00 btst 0x100, %g4
200d1f0: 02 80 00 06 be 200d208 <rtems_libio_is_file_open+0x58>
200d1f4: 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 ) {
200d1f8: c8 00 a0 1c ld [ %g2 + 0x1c ], %g4
200d1fc: 80 a1 00 18 cmp %g4, %i0
200d200: 02 80 00 0b be 200d22c <rtems_libio_is_file_open+0x7c>
200d204: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200d208: 80 a0 c0 01 cmp %g3, %g1
200d20c: 12 bf ff f7 bne 200d1e8 <rtems_libio_is_file_open+0x38>
200d210: 84 00 a0 40 add %g2, 0x40, %g2
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
200d214: b8 10 20 00 clr %i4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d218: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
200d21c: 7f ff e8 73 call 20073e8 <rtems_semaphore_release>
200d220: b0 10 00 1c mov %i4, %i0
}
rtems_libio_unlock();
return result;
}
200d224: 81 c7 e0 08 ret
200d228: 81 e8 00 00 restore
200d22c: 7f ff e8 6f call 20073e8 <rtems_semaphore_release>
200d230: b8 10 20 01 mov 1, %i4
200d234: 81 c7 e0 08 ret
200d238: 91 e8 00 1c restore %g0, %i4, %o0
0200d124 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
200d124: 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 );
200d128: 3b 00 80 7c sethi %hi(0x201f000), %i5
200d12c: d0 07 63 00 ld [ %i5 + 0x300 ], %o0 ! 201f300 <rtems_libio_semaphore>
200d130: 92 10 20 00 clr %o1
200d134: 7f ff e8 63 call 20072c0 <rtems_semaphore_obtain>
200d138: 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++){
200d13c: 03 00 80 7a sethi %hi(0x201e800), %g1
200d140: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c <rtems_libio_number_iops>
200d144: 05 00 80 7c sethi %hi(0x201f000), %g2
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
200d148: b8 10 20 00 clr %i4
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200d14c: 80 a0 60 00 cmp %g1, 0
200d150: 02 80 00 0f be 200d18c <rtems_libio_is_open_files_in_fs+0x68><== NEVER TAKEN
200d154: c4 00 a2 f8 ld [ %g2 + 0x2f8 ], %g2
200d158: 86 10 20 00 clr %g3
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200d15c: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
200d160: 80 89 21 00 btst 0x100, %g4
200d164: 02 80 00 06 be 200d17c <rtems_libio_is_open_files_in_fs+0x58>
200d168: 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 ) {
200d16c: c8 00 a0 2c ld [ %g2 + 0x2c ], %g4
200d170: 80 a1 00 18 cmp %g4, %i0
200d174: 02 80 00 0b be 200d1a0 <rtems_libio_is_open_files_in_fs+0x7c>
200d178: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200d17c: 80 a0 c0 01 cmp %g3, %g1
200d180: 12 bf ff f7 bne 200d15c <rtems_libio_is_open_files_in_fs+0x38>
200d184: 84 00 a0 40 add %g2, 0x40, %g2
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
200d188: b8 10 20 00 clr %i4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200d18c: d0 07 63 00 ld [ %i5 + 0x300 ], %o0
200d190: 7f ff e8 96 call 20073e8 <rtems_semaphore_release>
200d194: b0 10 00 1c mov %i4, %i0
}
rtems_libio_unlock();
return result;
}
200d198: 81 c7 e0 08 ret
200d19c: 81 e8 00 00 restore
200d1a0: 7f ff e8 92 call 20073e8 <rtems_semaphore_release>
200d1a4: b8 10 20 01 mov 1, %i4
200d1a8: 81 c7 e0 08 ret
200d1ac: 91 e8 00 1c restore %g0, %i4, %o0
02006b98 <rtems_libio_set_private_env>:
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
2006b98: 9d e3 bf 78 save %sp, -136, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
2006b9c: 40 00 0e 9e call 200a614 <rtems_task_self>
2006ba0: 3b 00 80 8c sethi %hi(0x2023000), %i5
2006ba4: b8 10 00 08 mov %o0, %i4
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
2006ba8: 92 10 20 01 mov 1, %o1
2006bac: 90 17 63 18 or %i5, 0x318, %o0
2006bb0: 94 10 20 00 clr %o2
2006bb4: 96 07 bf d8 add %fp, -40, %o3
2006bb8: 98 10 20 00 clr %o4
2006bbc: 7f ff fa 04 call 20053cc <rtems_filesystem_evaluate_path>
2006bc0: b0 10 20 1a mov 0x1a, %i0
if (rv != 0)
2006bc4: 80 a2 20 00 cmp %o0, 0
2006bc8: 12 80 00 43 bne 2006cd4 <rtems_libio_set_private_env+0x13c><== NEVER TAKEN
2006bcc: 90 17 63 18 or %i5, 0x318, %o0
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
2006bd0: 92 10 20 01 mov 1, %o1
2006bd4: 94 10 20 00 clr %o2
2006bd8: 96 07 bf ec add %fp, -20, %o3
2006bdc: 7f ff f9 fc call 20053cc <rtems_filesystem_evaluate_path>
2006be0: 98 10 20 00 clr %o4
if (rv != 0)
2006be4: 80 a2 20 00 cmp %o0, 0
2006be8: 12 80 00 38 bne 2006cc8 <rtems_libio_set_private_env+0x130><== NEVER TAKEN
2006bec: 35 00 80 95 sethi %hi(0x2025400), %i2
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
2006bf0: fa 06 a2 a0 ld [ %i2 + 0x2a0 ], %i5 ! 20256a0 <rtems_current_user_env>
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
2006bf4: 37 00 80 98 sethi %hi(0x2026000), %i3
2006bf8: b6 16 e0 7c or %i3, 0x7c, %i3 ! 202607c <rtems_global_user_env>
2006bfc: 80 a7 40 1b cmp %i5, %i3
2006c00: 02 80 00 06 be 2006c18 <rtems_libio_set_private_env+0x80>
2006c04: 01 00 00 00 nop
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
2006c08: c2 07 40 00 ld [ %i5 ], %g1
2006c0c: 80 a0 40 1c cmp %g1, %i4
2006c10: 02 80 00 10 be 2006c50 <rtems_libio_set_private_env+0xb8>
2006c14: 90 10 00 1d mov %i5, %o0
) {
new_env = malloc(sizeof(rtems_user_env_t));
2006c18: 7f ff fc be call 2005f10 <malloc>
2006c1c: 90 10 20 48 mov 0x48, %o0
if (new_env == NULL)
2006c20: ba 92 20 00 orcc %o0, 0, %i5
2006c24: 02 80 00 27 be 2006cc0 <rtems_libio_set_private_env+0x128>
2006c28: 90 10 20 00 clr %o0
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
2006c2c: 92 16 a2 a0 or %i2, 0x2a0, %o1
2006c30: 15 00 80 1a sethi %hi(0x2006800), %o2
2006c34: 40 00 0e 97 call 200a690 <rtems_task_variable_add>
2006c38: 94 12 a3 60 or %o2, 0x360, %o2 ! 2006b60 <free_user_env>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
2006c3c: 80 a2 20 00 cmp %o0, 0
2006c40: 12 80 00 1e bne 2006cb8 <rtems_libio_set_private_env+0x120>
2006c44: 03 00 80 95 sethi %hi(0x2025400), %g1
goto error_3;
rtems_current_user_env = new_env;
2006c48: fa 20 62 a0 st %i5, [ %g1 + 0x2a0 ] ! 20256a0 <rtems_current_user_env>
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
2006c4c: 90 10 00 1d mov %i5, %o0
2006c50: 92 10 00 1b mov %i3, %o1
2006c54: 40 00 37 c5 call 2014b68 <memcpy>
2006c58: 94 10 20 48 mov 0x48, %o2
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
2006c5c: c2 07 bf d8 ld [ %fp + -40 ], %g1
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
rtems_current_user_env->task_id = task_id;
2006c60: f8 27 40 00 st %i4, [ %i5 ]
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
2006c64: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
2006c68: c2 07 bf dc ld [ %fp + -36 ], %g1
2006c6c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
2006c70: c2 07 bf e0 ld [ %fp + -32 ], %g1
2006c74: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
2006c78: c2 07 bf e4 ld [ %fp + -28 ], %g1
2006c7c: c2 27 60 24 st %g1, [ %i5 + 0x24 ]
2006c80: c2 07 bf e8 ld [ %fp + -24 ], %g1
2006c84: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
rtems_filesystem_current = current_loc;
2006c88: c2 07 bf ec ld [ %fp + -20 ], %g1
2006c8c: c2 27 60 04 st %g1, [ %i5 + 4 ]
2006c90: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006c94: c2 27 60 08 st %g1, [ %i5 + 8 ]
2006c98: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006c9c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
2006ca0: c2 07 bf f8 ld [ %fp + -8 ], %g1
2006ca4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
2006ca8: c2 07 bf fc ld [ %fp + -4 ], %g1
2006cac: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
return RTEMS_SUCCESSFUL;
2006cb0: 81 c7 e0 08 ret
2006cb4: 91 e8 20 00 restore %g0, 0, %o0
error_3:
free(new_env);
2006cb8: 7f ff fa 74 call 2005688 <free>
2006cbc: 90 10 00 1d mov %i5, %o0
error_2:
rtems_filesystem_freenode(¤t_loc);
2006cc0: 7f ff fa 6b call 200566c <rtems_filesystem_freenode>
2006cc4: 90 07 bf ec add %fp, -20, %o0
error_1:
rtems_filesystem_freenode(&root_loc);
2006cc8: 90 07 bf d8 add %fp, -40, %o0
2006ccc: 7f ff fa 68 call 200566c <rtems_filesystem_freenode>
2006cd0: b0 10 20 1a mov 0x1a, %i0
error_0:
return RTEMS_NO_MEMORY;
}
2006cd4: 81 c7 e0 08 ret
2006cd8: 81 e8 00 00 restore
02006cdc <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
2006cdc: 9d e3 bf 98 save %sp, -104, %sp
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
2006ce0: 40 00 0e 4d call 200a614 <rtems_task_self>
2006ce4: b6 10 20 00 clr %i3
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
2006ce8: 80 a6 00 08 cmp %i0, %o0
2006cec: 02 80 00 10 be 2006d2c <rtems_libio_share_private_env+0x50><== NEVER TAKEN
2006cf0: ba 10 00 08 mov %o0, %i5
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
2006cf4: 90 10 00 18 mov %i0, %o0
2006cf8: 39 00 80 95 sethi %hi(0x2025400), %i4
2006cfc: 94 07 bf fc add %fp, -4, %o2
2006d00: 40 00 0e 95 call 200a754 <rtems_task_variable_get>
2006d04: 92 17 22 a0 or %i4, 0x2a0, %o1
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
2006d08: b6 92 20 00 orcc %o0, 0, %i3
2006d0c: 12 80 00 08 bne 2006d2c <rtems_libio_share_private_env+0x50>
2006d10: f4 07 22 a0 ld [ %i4 + 0x2a0 ], %i2
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
2006d14: c2 06 80 00 ld [ %i2 ], %g1
2006d18: 80 a0 40 1d cmp %g1, %i5
2006d1c: 02 80 00 06 be 2006d34 <rtems_libio_share_private_env+0x58>
2006d20: 03 00 80 98 sethi %hi(0x2026000), %g1
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2006d24: c2 07 bf fc ld [ %fp + -4 ], %g1
2006d28: c2 27 22 a0 st %g1, [ %i4 + 0x2a0 ]
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
2006d2c: 81 c7 e0 08 ret
2006d30: 91 e8 00 1b restore %g0, %i3, %o0
static void
free_user_env(void *venv)
{
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
2006d34: 82 10 60 7c or %g1, 0x7c, %g1
2006d38: 80 a6 80 01 cmp %i2, %g1
2006d3c: 02 bf ff fb be 2006d28 <rtems_libio_share_private_env+0x4c><== NEVER TAKEN
2006d40: c2 07 bf fc ld [ %fp + -4 ], %g1
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2006d44: 7f ff fa 4a call 200566c <rtems_filesystem_freenode>
2006d48: 90 06 a0 04 add %i2, 4, %o0
rtems_filesystem_freenode( &env->root_directory);
2006d4c: 7f ff fa 48 call 200566c <rtems_filesystem_freenode>
2006d50: 90 06 a0 18 add %i2, 0x18, %o0
free(env);
2006d54: 7f ff fa 4d call 2005688 <free>
2006d58: 90 10 00 1a mov %i2, %o0
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2006d5c: c2 07 bf fc ld [ %fp + -4 ], %g1
2006d60: 10 bf ff f3 b 2006d2c <rtems_libio_share_private_env+0x50>
2006d64: c2 27 22 a0 st %g1, [ %i4 + 0x2a0 ]
0200cfd0 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
200cfd0: 84 0a 20 06 and %o0, 6, %g2
200cfd4: 80 a0 a0 06 cmp %g2, 6
200cfd8: 02 80 00 05 be 200cfec <rtems_libio_to_fcntl_flags+0x1c>
200cfdc: 82 10 20 02 mov 2, %g1
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
200cfe0: 80 8a 20 02 btst 2, %o0
200cfe4: 02 80 00 0e be 200d01c <rtems_libio_to_fcntl_flags+0x4c> <== NEVER TAKEN
200cfe8: 82 10 20 00 clr %g1
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
200cfec: 80 8a 20 01 btst 1, %o0
200cff0: 02 80 00 04 be 200d000 <rtems_libio_to_fcntl_flags+0x30>
200cff4: 80 8a 22 00 btst 0x200, %o0
fcntl_flags |= O_NONBLOCK;
200cff8: 05 00 00 10 sethi %hi(0x4000), %g2
200cffc: 82 10 40 02 or %g1, %g2, %g1
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
200d000: 32 80 00 02 bne,a 200d008 <rtems_libio_to_fcntl_flags+0x38>
200d004: 82 10 60 08 or %g1, 8, %g1
fcntl_flags |= O_APPEND;
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
200d008: 80 8a 24 00 btst 0x400, %o0
200d00c: 32 80 00 02 bne,a 200d014 <rtems_libio_to_fcntl_flags+0x44>
200d010: 82 10 62 00 or %g1, 0x200, %g1
fcntl_flags |= O_CREAT;
}
return fcntl_flags;
}
200d014: 81 c3 e0 08 retl
200d018: 90 10 00 01 mov %g1, %o0
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
200d01c: 82 0a 20 04 and %o0, 4, %g1 <== NOT EXECUTED
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
200d020: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
200d024: 10 bf ff f2 b 200cfec <rtems_libio_to_fcntl_flags+0x1c> <== NOT EXECUTED
200d028: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED
02007e44 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
2007e44: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
2007e48: 03 00 80 97 sethi %hi(0x2025c00), %g1
2007e4c: d0 00 60 88 ld [ %g1 + 0x88 ], %o0 ! 2025c88 <RTEMS_Malloc_Heap>
2007e50: 92 10 00 18 mov %i0, %o1
2007e54: 40 00 1a d5 call 200e9a8 <_Protected_heap_Get_block_size>
2007e58: 94 07 bf fc add %fp, -4, %o2
2007e5c: 80 8a 20 ff btst 0xff, %o0
2007e60: 02 80 00 08 be 2007e80 <rtems_malloc_statistics_at_free+0x3c><== NEVER TAKEN
2007e64: c4 07 bf fc ld [ %fp + -4 ], %g2
MSBUMP(lifetime_freed, size);
2007e68: 03 00 80 9c sethi %hi(0x2027000), %g1
2007e6c: 82 10 60 40 or %g1, 0x40, %g1 ! 2027040 <rtems_malloc_statistics>
2007e70: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4
2007e74: 86 83 40 02 addcc %o5, %g2, %g3
2007e78: 84 43 20 00 addx %o4, 0, %g2
2007e7c: c4 38 60 28 std %g2, [ %g1 + 0x28 ]
2007e80: 81 c7 e0 08 ret
2007e84: 81 e8 00 00 restore
02007e88 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
2007e88: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
2007e8c: 80 a6 20 00 cmp %i0, 0
2007e90: 02 80 00 14 be 2007ee0 <rtems_malloc_statistics_at_malloc+0x58><== NEVER TAKEN
2007e94: c0 27 bf fc clr [ %fp + -4 ]
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
2007e98: 03 00 80 97 sethi %hi(0x2025c00), %g1
2007e9c: d0 00 60 88 ld [ %g1 + 0x88 ], %o0 ! 2025c88 <RTEMS_Malloc_Heap>
2007ea0: 92 10 00 18 mov %i0, %o1
2007ea4: 40 00 1a c1 call 200e9a8 <_Protected_heap_Get_block_size>
2007ea8: 94 07 bf fc add %fp, -4, %o2
MSBUMP(lifetime_allocated, actual_size);
2007eac: c4 07 bf fc ld [ %fp + -4 ], %g2
2007eb0: 03 00 80 9c sethi %hi(0x2027000), %g1
2007eb4: 82 10 60 40 or %g1, 0x40, %g1 ! 2027040 <rtems_malloc_statistics>
2007eb8: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
2007ebc: f0 00 60 2c ld [ %g1 + 0x2c ], %i0
if (current_depth > s->max_depth)
2007ec0: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
2007ec4: 86 83 40 02 addcc %o5, %g2, %g3
2007ec8: 84 43 20 00 addx %o4, 0, %g2
2007ecc: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
2007ed0: 84 20 c0 18 sub %g3, %i0, %g2
if (current_depth > s->max_depth)
2007ed4: 80 a0 80 04 cmp %g2, %g4
2007ed8: 38 80 00 02 bgu,a 2007ee0 <rtems_malloc_statistics_at_malloc+0x58>
2007edc: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
2007ee0: 81 c7 e0 08 ret
2007ee4: 81 e8 00 00 restore
02011b10 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
2011b10: 9d e3 bf a0 save %sp, -96, %sp
2011b14: ba 10 00 18 mov %i0, %i5
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
2011b18: 80 a7 60 00 cmp %i5, 0
2011b1c: 02 80 00 22 be 2011ba4 <rtems_memalign+0x94>
2011b20: b0 10 20 16 mov 0x16, %i0
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2011b24: 03 00 80 8f sethi %hi(0x2023c00), %g1
2011b28: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 2023e18 <_System_state_Current>
2011b2c: 80 a0 60 03 cmp %g1, 3
2011b30: 02 80 00 18 be 2011b90 <rtems_memalign+0x80> <== ALWAYS TAKEN
2011b34: c0 27 40 00 clr [ %i5 ]
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2011b38: 7f ff ca ee call 20046f0 <malloc_deferred_frees_process>
2011b3c: b0 10 20 0c mov 0xc, %i0
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
2011b40: 03 00 80 8b sethi %hi(0x2022c00), %g1
2011b44: d0 00 63 6c ld [ %g1 + 0x36c ], %o0 ! 2022f6c <RTEMS_Malloc_Heap>
2011b48: 94 10 00 19 mov %i1, %o2
2011b4c: 92 10 00 1a mov %i2, %o1
2011b50: 7f ff e1 e7 call 200a2ec <_Protected_heap_Allocate_aligned_with_boundary>
2011b54: 96 10 20 00 clr %o3
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
2011b58: 80 a2 20 00 cmp %o0, 0
2011b5c: 02 80 00 12 be 2011ba4 <rtems_memalign+0x94>
2011b60: b2 10 00 08 mov %o0, %i1
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
2011b64: 03 00 80 8d sethi %hi(0x2023400), %g1
2011b68: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 20237c4 <rtems_malloc_statistics_helpers>
2011b6c: 80 a0 60 00 cmp %g1, 0
2011b70: 22 80 00 06 be,a 2011b88 <rtems_memalign+0x78>
2011b74: f2 27 40 00 st %i1, [ %i5 ]
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
2011b78: c2 00 60 04 ld [ %g1 + 4 ], %g1
2011b7c: 9f c0 40 00 call %g1
2011b80: 90 10 00 1d mov %i5, %o0
*pointer = return_this;
2011b84: f2 27 40 00 st %i1, [ %i5 ]
return 0;
}
2011b88: 81 c7 e0 08 ret
2011b8c: 91 e8 20 00 restore %g0, 0, %o0
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
2011b90: 7f ff ca c6 call 20046a8 <malloc_is_system_state_OK>
2011b94: 01 00 00 00 nop
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2011b98: 80 8a 20 ff btst 0xff, %o0
2011b9c: 12 bf ff e7 bne 2011b38 <rtems_memalign+0x28> <== ALWAYS TAKEN
2011ba0: 01 00 00 00 nop
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
2011ba4: 81 c7 e0 08 ret
2011ba8: 81 e8 00 00 restore
02010260 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
2010260: 9d e3 bf 58 save %sp, -168, %sp
int success = 0;
char *dup_path = strdup(path);
2010264: 90 10 00 18 mov %i0, %o0
2010268: 40 00 10 1a call 20142d0 <strdup>
201026c: b0 10 3f ff mov -1, %i0
if (dup_path != NULL) {
2010270: 80 a2 20 00 cmp %o0, 0
2010274: 02 80 00 2e be 201032c <rtems_mkdir+0xcc> <== NEVER TAKEN
2010278: ba 10 00 08 mov %o0, %i5
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
201027c: c2 0a 00 00 ldub [ %o0 ], %g1
2010280: 83 28 60 18 sll %g1, 0x18, %g1
2010284: 85 38 60 18 sra %g1, 0x18, %g2
2010288: 80 a0 a0 2f cmp %g2, 0x2f
201028c: 02 80 00 58 be 20103ec <rtems_mkdir+0x18c>
2010290: b8 10 00 08 mov %o0, %i4
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
2010294: 83 38 60 18 sra %g1, 0x18, %g1
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
2010298: b4 10 20 00 clr %i2
201029c: 84 10 20 01 mov 1, %g2
retval = 0;
break;
}
}
if (!last)
*p = '/';
20102a0: b0 10 20 2f mov 0x2f, %i0
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
20102a4: 23 00 00 3c sethi %hi(0xf000), %l1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
20102a8: 80 a0 60 00 cmp %g1, 0
20102ac: 02 80 00 0b be 20102d8 <rtems_mkdir+0x78> <== NEVER TAKEN
20102b0: 21 00 00 10 sethi %hi(0x4000), %l0
last = 1;
else if (p[0] != '/')
20102b4: 80 a0 60 2f cmp %g1, 0x2f
20102b8: 22 80 00 49 be,a 20103dc <rtems_mkdir+0x17c>
20102bc: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1
retval = 0;
break;
}
}
if (!last)
*p = '/';
20102c0: c2 0f 20 01 ldub [ %i4 + 1 ], %g1
20102c4: 83 28 60 18 sll %g1, 0x18, %g1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
20102c8: 83 38 60 18 sra %g1, 0x18, %g1
20102cc: 80 a0 60 00 cmp %g1, 0
20102d0: 12 bf ff f9 bne 20102b4 <rtems_mkdir+0x54>
20102d4: b8 07 20 01 inc %i4
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
20102d8: c0 2f 00 00 clrb [ %i4 ]
20102dc: b6 10 20 01 mov 1, %i3
if (!last && p[1] == '\0')
last = 1;
if (first) {
20102e0: 80 a0 a0 00 cmp %g2, 0
20102e4: 12 80 00 37 bne 20103c0 <rtems_mkdir+0x160>
20102e8: 01 00 00 00 nop
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
20102ec: 80 a6 e0 00 cmp %i3, 0
20102f0: 12 80 00 13 bne 201033c <rtems_mkdir+0xdc>
20102f4: 92 10 21 ff mov 0x1ff, %o1
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
20102f8: 7f ff d4 a4 call 2005588 <mkdir>
20102fc: 90 10 00 1d mov %i5, %o0
2010300: 80 a2 20 00 cmp %o0, 0
2010304: 06 80 00 16 bl 201035c <rtems_mkdir+0xfc>
2010308: 80 a6 e0 00 cmp %i3, 0
} else {
retval = 0;
break;
}
}
if (!last)
201030c: 22 80 00 0a be,a 2010334 <rtems_mkdir+0xd4>
2010310: f0 2f 00 00 stb %i0, [ %i4 ]
2010314: b8 10 20 01 mov 1, %i4
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
2010318: 7f ff d2 67 call 2004cb4 <free>
201031c: 90 10 00 1d mov %i5, %o0
}
return success != 0 ? 0 : -1;
2010320: 80 a7 20 00 cmp %i4, 0
2010324: 02 80 00 48 be 2010444 <rtems_mkdir+0x1e4> <== NEVER TAKEN
2010328: b0 10 20 00 clr %i0
}
201032c: 81 c7 e0 08 ret
2010330: 81 e8 00 00 restore
retval = 0;
break;
}
}
if (!last)
*p = '/';
2010334: 10 bf ff e3 b 20102c0 <rtems_mkdir+0x60>
2010338: 84 10 20 00 clr %g2
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
201033c: 40 00 00 9b call 20105a8 <umask>
2010340: 90 10 00 1a mov %i2, %o0
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
2010344: 92 10 00 19 mov %i1, %o1
2010348: 7f ff d4 90 call 2005588 <mkdir>
201034c: 90 10 00 1d mov %i5, %o0
2010350: 80 a2 20 00 cmp %o0, 0
2010354: 16 bf ff ee bge 201030c <rtems_mkdir+0xac>
2010358: 80 a6 e0 00 cmp %i3, 0
if (errno == EEXIST || errno == EISDIR) {
201035c: 40 00 0b b3 call 2013228 <__errno>
2010360: 01 00 00 00 nop
2010364: c2 02 00 00 ld [ %o0 ], %g1
2010368: 80 a0 60 11 cmp %g1, 0x11
201036c: 02 80 00 08 be 201038c <rtems_mkdir+0x12c>
2010370: 90 10 00 1d mov %i5, %o0
2010374: 40 00 0b ad call 2013228 <__errno>
2010378: 01 00 00 00 nop
201037c: c2 02 00 00 ld [ %o0 ], %g1
2010380: 80 a0 60 15 cmp %g1, 0x15
2010384: 12 80 00 32 bne 201044c <rtems_mkdir+0x1ec> <== ALWAYS TAKEN
2010388: 90 10 00 1d mov %i5, %o0
if (stat(path, &sb) < 0) {
201038c: 40 00 00 34 call 201045c <stat>
2010390: 92 07 bf b8 add %fp, -72, %o1
2010394: 80 a2 20 00 cmp %o0, 0
2010398: 06 80 00 2d bl 201044c <rtems_mkdir+0x1ec> <== NEVER TAKEN
201039c: c2 07 bf c4 ld [ %fp + -60 ], %g1
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
20103a0: 82 08 40 11 and %g1, %l1, %g1
20103a4: 80 a0 40 10 cmp %g1, %l0
20103a8: 12 80 00 15 bne 20103fc <rtems_mkdir+0x19c>
20103ac: 80 a6 e0 00 cmp %i3, 0
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
20103b0: 22 bf ff e1 be,a 2010334 <rtems_mkdir+0xd4>
20103b4: f0 2f 00 00 stb %i0, [ %i4 ]
retval = 2;
20103b8: 10 bf ff d8 b 2010318 <rtems_mkdir+0xb8>
20103bc: b8 10 20 02 mov 2, %i4
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
20103c0: 40 00 00 7a call 20105a8 <umask>
20103c4: 90 10 20 00 clr %o0
20103c8: b4 10 00 08 mov %o0, %i2
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
20103cc: 40 00 00 77 call 20105a8 <umask>
20103d0: 90 0a 3f 3f and %o0, -193, %o0
first = 0;
}
if (last)
20103d4: 10 bf ff c7 b 20102f0 <rtems_mkdir+0x90>
20103d8: 80 a6 e0 00 cmp %i3, 0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
20103dc: c0 2f 00 00 clrb [ %i4 ]
if (!last && p[1] == '\0')
20103e0: 80 a0 00 01 cmp %g0, %g1
20103e4: 10 bf ff bf b 20102e0 <rtems_mkdir+0x80>
20103e8: b6 60 3f ff subx %g0, -1, %i3
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
20103ec: c2 0a 20 01 ldub [ %o0 + 1 ], %g1
20103f0: b8 02 20 01 add %o0, 1, %i4
20103f4: 10 bf ff a8 b 2010294 <rtems_mkdir+0x34>
20103f8: 83 28 60 18 sll %g1, 0x18, %g1
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
20103fc: 02 80 00 0a be 2010424 <rtems_mkdir+0x1c4>
2010400: 01 00 00 00 nop
errno = EEXIST;
2010404: 40 00 0b 89 call 2013228 <__errno>
2010408: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
201040c: 82 10 20 11 mov 0x11, %g1
2010410: c2 22 00 00 st %g1, [ %o0 ]
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
2010414: 7f ff d2 28 call 2004cb4 <free>
2010418: 90 10 00 1d mov %i5, %o0
201041c: 81 c7 e0 08 ret
2010420: 81 e8 00 00 restore
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
2010424: 40 00 0b 81 call 2013228 <__errno>
2010428: 01 00 00 00 nop
201042c: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
2010430: c2 22 00 00 st %g1, [ %o0 ]
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
2010434: 40 00 00 5d call 20105a8 <umask>
2010438: 90 10 00 1a mov %i2, %o0
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
201043c: 7f ff d2 1e call 2004cb4 <free>
2010440: 90 10 00 1d mov %i5, %o0
}
return success != 0 ? 0 : -1;
}
2010444: 81 c7 e0 08 ret
2010448: 91 e8 3f ff restore %g0, -1, %o0
}
}
if (!last)
*p = '/';
}
if (!first && !last)
201044c: 80 a6 e0 00 cmp %i3, 0
2010450: 02 bf ff f9 be 2010434 <rtems_mkdir+0x1d4> <== NEVER TAKEN
2010454: 01 00 00 00 nop
2010458: 30 bf ff f9 b,a 201043c <rtems_mkdir+0x1dc>
02008b38 <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
)
{
2008b38: 9d e3 bf a0 save %sp, -96, %sp
2008b3c: 90 10 00 18 mov %i0, %o0
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
2008b40: 80 a6 a0 00 cmp %i2, 0
2008b44: 02 80 00 21 be 2008bc8 <rtems_object_get_class_information+0x90>
2008b48: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
2008b4c: 93 2e 60 10 sll %i1, 0x10, %o1
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
2008b50: b0 10 20 0a mov 0xa, %i0
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
2008b54: 40 00 07 a4 call 200a9e4 <_Objects_Get_information>
2008b58: 93 32 60 10 srl %o1, 0x10, %o1
if ( !obj_info )
2008b5c: 80 a2 20 00 cmp %o0, 0
2008b60: 02 80 00 1a be 2008bc8 <rtems_object_get_class_information+0x90>
2008b64: 01 00 00 00 nop
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
2008b68: c4 02 20 0c ld [ %o0 + 0xc ], %g2
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
2008b6c: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2008b70: c6 02 20 08 ld [ %o0 + 8 ], %g3
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
2008b74: c2 0a 20 12 ldub [ %o0 + 0x12 ], %g1
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
2008b78: c4 26 a0 04 st %g2, [ %i2 + 4 ]
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2008b7c: c6 26 80 00 st %g3, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
2008b80: c2 2e a0 0c stb %g1, [ %i2 + 0xc ]
info->maximum = obj_info->maximum;
2008b84: c8 26 a0 08 st %g4, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2008b88: 80 a1 20 00 cmp %g4, 0
2008b8c: 02 80 00 0d be 2008bc0 <rtems_object_get_class_information+0x88><== NEVER TAKEN
2008b90: 84 10 20 00 clr %g2
2008b94: de 02 20 1c ld [ %o0 + 0x1c ], %o7
2008b98: 86 10 20 01 mov 1, %g3
2008b9c: 82 10 20 01 mov 1, %g1
if ( !obj_info->local_table[i] )
2008ba0: 87 28 e0 02 sll %g3, 2, %g3
2008ba4: c6 03 c0 03 ld [ %o7 + %g3 ], %g3
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2008ba8: 82 00 60 01 inc %g1
if ( !obj_info->local_table[i] )
unallocated++;
2008bac: 80 a0 00 03 cmp %g0, %g3
2008bb0: 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++ )
2008bb4: 80 a1 00 01 cmp %g4, %g1
2008bb8: 1a bf ff fa bcc 2008ba0 <rtems_object_get_class_information+0x68>
2008bbc: 86 10 00 01 mov %g1, %g3
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
2008bc0: c4 26 a0 10 st %g2, [ %i2 + 0x10 ]
return RTEMS_SUCCESSFUL;
2008bc4: b0 10 20 00 clr %i0
}
2008bc8: 81 c7 e0 08 ret
2008bcc: 81 e8 00 00 restore
02014880 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
2014880: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
2014884: 80 a6 20 00 cmp %i0, 0
2014888: 12 80 00 04 bne 2014898 <rtems_partition_create+0x18>
201488c: 82 10 20 03 mov 3, %g1
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
2014890: 81 c7 e0 08 ret
2014894: 91 e8 00 01 restore %g0, %g1, %o0
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
2014898: 80 a6 60 00 cmp %i1, 0
201489c: 02 bf ff fd be 2014890 <rtems_partition_create+0x10>
20148a0: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
20148a4: 80 a7 60 00 cmp %i5, 0
20148a8: 02 bf ff fa be 2014890 <rtems_partition_create+0x10> <== NEVER TAKEN
20148ac: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
20148b0: 02 bf ff f8 be 2014890 <rtems_partition_create+0x10>
20148b4: 82 10 20 08 mov 8, %g1
20148b8: 80 a6 a0 00 cmp %i2, 0
20148bc: 02 bf ff f5 be 2014890 <rtems_partition_create+0x10>
20148c0: 80 a6 80 1b cmp %i2, %i3
20148c4: 0a bf ff f3 bcs 2014890 <rtems_partition_create+0x10>
20148c8: 80 8e e0 07 btst 7, %i3
20148cc: 12 bf ff f1 bne 2014890 <rtems_partition_create+0x10>
20148d0: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
20148d4: 12 bf ff ef bne 2014890 <rtems_partition_create+0x10>
20148d8: 82 10 20 09 mov 9, %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20148dc: 03 00 80 f5 sethi %hi(0x203d400), %g1
20148e0: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 203d630 <_Thread_Dispatch_disable_level>
20148e4: 84 00 a0 01 inc %g2
20148e8: c4 20 62 30 st %g2, [ %g1 + 0x230 ]
return _Thread_Dispatch_disable_level;
20148ec: c2 00 62 30 ld [ %g1 + 0x230 ], %g1
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
20148f0: 23 00 80 f5 sethi %hi(0x203d400), %l1
20148f4: 40 00 14 87 call 2019b10 <_Objects_Allocate>
20148f8: 90 14 60 4c or %l1, 0x4c, %o0 ! 203d44c <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
20148fc: a0 92 20 00 orcc %o0, 0, %l0
2014900: 02 80 00 1a be 2014968 <rtems_partition_create+0xe8>
2014904: 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;
2014908: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
201490c: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
2014910: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
2014914: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2014918: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
201491c: 40 00 61 50 call 202ce5c <.udiv>
2014920: 90 10 00 1a mov %i2, %o0
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2014924: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
2014928: 94 10 00 08 mov %o0, %o2
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
201492c: 96 10 00 1b mov %i3, %o3
2014930: b8 04 20 24 add %l0, 0x24, %i4
2014934: 40 00 0d de call 20180ac <_Chain_Initialize>
2014938: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
201493c: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2014940: a2 14 60 4c or %l1, 0x4c, %l1
2014944: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2014948: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
201494c: 85 28 a0 02 sll %g2, 2, %g2
2014950: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2014954: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
2014958: 40 00 19 d7 call 201b0b4 <_Thread_Enable_dispatch>
201495c: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
2014960: 10 bf ff cc b 2014890 <rtems_partition_create+0x10>
2014964: 82 10 20 00 clr %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
2014968: 40 00 19 d3 call 201b0b4 <_Thread_Enable_dispatch>
201496c: 01 00 00 00 nop
return RTEMS_TOO_MANY;
2014970: 10 bf ff c8 b 2014890 <rtems_partition_create+0x10>
2014974: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5>
02008054 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2008054: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
2008058: 11 00 80 84 sethi %hi(0x2021000), %o0
200805c: 92 10 00 18 mov %i0, %o1
2008060: 90 12 23 d4 or %o0, 0x3d4, %o0
2008064: 40 00 09 af call 200a720 <_Objects_Get>
2008068: 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 ) {
200806c: c2 07 bf fc ld [ %fp + -4 ], %g1
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2008070: ba 10 00 18 mov %i0, %i5
2008074: b8 10 00 08 mov %o0, %i4
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
2008078: 80 a0 60 00 cmp %g1, 0
200807c: 12 80 00 0b bne 20080a8 <rtems_rate_monotonic_period+0x54>
2008080: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2008084: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
2008088: 31 00 80 86 sethi %hi(0x2021800), %i0
200808c: b0 16 22 80 or %i0, 0x280, %i0 ! 2021a80 <_Per_CPU_Information>
2008090: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2008094: 80 a0 80 01 cmp %g2, %g1
2008098: 02 80 00 06 be 20080b0 <rtems_rate_monotonic_period+0x5c>
200809c: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
20080a0: 40 00 0d ae call 200b758 <_Thread_Enable_dispatch>
20080a4: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
20080a8: 81 c7 e0 08 ret
20080ac: 81 e8 00 00 restore
}
if ( length == RTEMS_PERIOD_STATUS ) {
20080b0: 12 80 00 0e bne 20080e8 <rtems_rate_monotonic_period+0x94>
20080b4: 01 00 00 00 nop
switch ( the_period->state ) {
20080b8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
20080bc: 80 a0 60 04 cmp %g1, 4
20080c0: 18 80 00 06 bgu 20080d8 <rtems_rate_monotonic_period+0x84><== NEVER TAKEN
20080c4: b0 10 20 00 clr %i0
20080c8: 83 28 60 02 sll %g1, 2, %g1
20080cc: 05 00 80 7c sethi %hi(0x201f000), %g2
20080d0: 84 10 a1 cc or %g2, 0x1cc, %g2 ! 201f1cc <CSWTCH.11>
20080d4: f0 00 80 01 ld [ %g2 + %g1 ], %i0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
20080d8: 40 00 0d a0 call 200b758 <_Thread_Enable_dispatch>
20080dc: 01 00 00 00 nop
return RTEMS_TIMEOUT;
20080e0: 81 c7 e0 08 ret
20080e4: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
20080e8: 7f ff ec 2d call 200319c <sparc_disable_interrupts>
20080ec: 01 00 00 00 nop
20080f0: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
20080f4: f6 07 20 38 ld [ %i4 + 0x38 ], %i3
20080f8: 80 a6 e0 00 cmp %i3, 0
20080fc: 02 80 00 19 be 2008160 <rtems_rate_monotonic_period+0x10c>
2008100: 80 a6 e0 02 cmp %i3, 2
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
2008104: 02 80 00 3b be 20081f0 <rtems_rate_monotonic_period+0x19c>
2008108: 80 a6 e0 04 cmp %i3, 4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
200810c: 12 bf ff e7 bne 20080a8 <rtems_rate_monotonic_period+0x54><== NEVER TAKEN
2008110: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2008114: 7f ff ff 60 call 2007e94 <_Rate_monotonic_Update_statistics>
2008118: 90 10 00 1c mov %i4, %o0
_ISR_Enable( level );
200811c: 7f ff ec 24 call 20031ac <sparc_enable_interrupts>
2008120: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2008124: 82 10 20 02 mov 2, %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2008128: 92 07 20 10 add %i4, 0x10, %o1
200812c: c2 27 20 38 st %g1, [ %i4 + 0x38 ]
the_period->next_length = length;
2008130: f2 27 20 3c st %i1, [ %i4 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2008134: f2 27 20 1c st %i1, [ %i4 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2008138: 11 00 80 85 sethi %hi(0x2021400), %o0
200813c: 40 00 11 5b call 200c6a8 <_Watchdog_Insert>
2008140: 90 12 22 00 or %o0, 0x200, %o0 ! 2021600 <_Watchdog_Ticks_chain>
2008144: d0 07 20 40 ld [ %i4 + 0x40 ], %o0
2008148: d2 07 20 3c ld [ %i4 + 0x3c ], %o1
200814c: 03 00 80 82 sethi %hi(0x2020800), %g1
2008150: c2 00 60 0c ld [ %g1 + 0xc ], %g1 ! 202080c <_Scheduler+0x34>
2008154: 9f c0 40 00 call %g1
2008158: b0 10 20 06 mov 6, %i0
200815c: 30 bf ff df b,a 20080d8 <rtems_rate_monotonic_period+0x84>
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
2008160: 7f ff ec 13 call 20031ac <sparc_enable_interrupts>
2008164: 01 00 00 00 nop
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
Thread_Control *owning_thread = the_period->owner;
2008168: f6 07 20 40 ld [ %i4 + 0x40 ], %i3
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
the_period->next_length = length;
200816c: f2 27 20 3c st %i1, [ %i4 + 0x3c ]
* If using nanosecond statistics, we need to obtain the uptime.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
_TOD_Get_uptime( &uptime );
2008170: 40 00 06 44 call 2009a80 <_TOD_Get_uptime>
2008174: 90 07 bf f0 add %fp, -16, %o0
the_period->time_period_initiated = uptime;
#else
the_period->time_period_initiated = _Watchdog_Ticks_since_boot;
#endif
the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used;
2008178: d4 1e e0 80 ldd [ %i3 + 0x80 ], %o2
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
200817c: c4 1f bf f0 ldd [ %fp + -16 ], %g2
* routine is invoked from rtems_rate_monotonic_period, the owner will
* be the executing thread. When this routine is invoked from
* _Rate_monotonic_Timeout, it will not.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2008180: c2 06 20 0c ld [ %i0 + 0xc ], %g1
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
2008184: c4 3f 20 50 std %g2, [ %i4 + 0x50 ]
* routine is invoked from rtems_rate_monotonic_period, the owner will
* be the executing thread. When this routine is invoked from
* _Rate_monotonic_Timeout, it will not.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2008188: 80 a6 c0 01 cmp %i3, %g1
200818c: 02 80 00 33 be 2008258 <rtems_rate_monotonic_period+0x204><== ALWAYS TAKEN
2008190: d4 3f 20 48 std %o2, [ %i4 + 0x48 ]
2008194: d0 07 20 40 ld [ %i4 + 0x40 ], %o0
2008198: d2 07 20 3c ld [ %i4 + 0x3c ], %o1
200819c: 03 00 80 82 sethi %hi(0x2020800), %g1
20081a0: c2 00 60 0c ld [ %g1 + 0xc ], %g1 ! 202080c <_Scheduler+0x34>
20081a4: 9f c0 40 00 call %g1
20081a8: b0 10 20 00 clr %i0
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
20081ac: 82 10 20 02 mov 2, %g1
20081b0: 92 07 20 10 add %i4, 0x10, %o1
20081b4: c2 27 20 38 st %g1, [ %i4 + 0x38 ]
20081b8: 11 00 80 85 sethi %hi(0x2021400), %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20081bc: 03 00 80 21 sethi %hi(0x2008400), %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20081c0: 90 12 22 00 or %o0, 0x200, %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20081c4: 82 10 61 60 or %g1, 0x160, %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20081c8: c0 27 20 18 clr [ %i4 + 0x18 ]
the_watchdog->routine = routine;
20081cc: c2 27 20 2c st %g1, [ %i4 + 0x2c ]
the_watchdog->id = id;
20081d0: fa 27 20 30 st %i5, [ %i4 + 0x30 ]
the_watchdog->user_data = user_data;
20081d4: c0 27 20 34 clr [ %i4 + 0x34 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20081d8: 40 00 11 34 call 200c6a8 <_Watchdog_Insert>
20081dc: f2 27 20 1c st %i1, [ %i4 + 0x1c ]
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
20081e0: 40 00 0d 5e call 200b758 <_Thread_Enable_dispatch>
20081e4: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20081e8: 81 c7 e0 08 ret
20081ec: 81 e8 00 00 restore
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
20081f0: 7f ff ff 29 call 2007e94 <_Rate_monotonic_Update_statistics>
20081f4: 90 10 00 1c mov %i4, %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;
20081f8: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
20081fc: f2 27 20 3c st %i1, [ %i4 + 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;
2008200: c2 27 20 38 st %g1, [ %i4 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2008204: 7f ff eb ea call 20031ac <sparc_enable_interrupts>
2008208: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
200820c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2008210: c4 07 20 08 ld [ %i4 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2008214: 90 10 00 01 mov %g1, %o0
2008218: 13 00 00 10 sethi %hi(0x4000), %o1
200821c: 40 00 0f ab call 200c0c8 <_Thread_Set_state>
2008220: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2008224: 7f ff eb de call 200319c <sparc_disable_interrupts>
2008228: 01 00 00 00 nop
local_state = the_period->state;
200822c: fa 07 20 38 ld [ %i4 + 0x38 ], %i5
the_period->state = RATE_MONOTONIC_ACTIVE;
2008230: f6 27 20 38 st %i3, [ %i4 + 0x38 ]
_ISR_Enable( level );
2008234: 7f ff eb de call 20031ac <sparc_enable_interrupts>
2008238: 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 )
200823c: 80 a7 60 03 cmp %i5, 3
2008240: 22 80 00 0d be,a 2008274 <rtems_rate_monotonic_period+0x220>
2008244: d0 06 20 0c ld [ %i0 + 0xc ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
2008248: 40 00 0d 44 call 200b758 <_Thread_Enable_dispatch>
200824c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2008250: 81 c7 e0 08 ret
2008254: 81 e8 00 00 restore
2008258: d8 1e 20 20 ldd [ %i0 + 0x20 ], %o4
200825c: 86 a0 c0 0d subcc %g3, %o5, %g3
2008260: 84 60 80 0c subx %g2, %o4, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008264: 86 82 c0 03 addcc %o3, %g3, %g3
2008268: 84 42 80 02 addx %o2, %g2, %g2
200826c: 10 bf ff ca b 2008194 <rtems_rate_monotonic_period+0x140>
2008270: c4 3f 20 48 std %g2, [ %i4 + 0x48 ]
/*
* 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 );
2008274: 40 00 0c 47 call 200b390 <_Thread_Clear_state>
2008278: 13 00 00 10 sethi %hi(0x4000), %o1
200827c: 30 bf ff f3 b,a 2008248 <rtems_rate_monotonic_period+0x1f4>
02008280 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2008280: 9d e3 bf 38 save %sp, -200, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
2008284: 80 a6 60 00 cmp %i1, 0
2008288: 02 80 00 48 be 20083a8 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
200828c: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
2008290: 13 00 80 7c sethi %hi(0x201f000), %o1
2008294: 9f c6 40 00 call %i1
2008298: 92 12 61 e0 or %o1, 0x1e0, %o1 ! 201f1e0 <CSWTCH.11+0x14>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
200829c: 90 10 00 18 mov %i0, %o0
20082a0: 13 00 80 7c sethi %hi(0x201f000), %o1
20082a4: 9f c6 40 00 call %i1
20082a8: 92 12 62 00 or %o1, 0x200, %o1 ! 201f200 <CSWTCH.11+0x34>
(*print)( context, "--- Wall times are in seconds ---\n" );
20082ac: 90 10 00 18 mov %i0, %o0
20082b0: 13 00 80 7c sethi %hi(0x201f000), %o1
20082b4: 9f c6 40 00 call %i1
20082b8: 92 12 62 28 or %o1, 0x228, %o1 ! 201f228 <CSWTCH.11+0x5c>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
20082bc: 90 10 00 18 mov %i0, %o0
20082c0: 13 00 80 7c sethi %hi(0x201f000), %o1
20082c4: 9f c6 40 00 call %i1
20082c8: 92 12 62 50 or %o1, 0x250, %o1 ! 201f250 <CSWTCH.11+0x84>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
20082cc: 90 10 00 18 mov %i0, %o0
20082d0: 13 00 80 7c sethi %hi(0x201f000), %o1
20082d4: 9f c6 40 00 call %i1
20082d8: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 201f2a0 <CSWTCH.11+0xd4>
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20082dc: 39 00 80 84 sethi %hi(0x2021000), %i4
20082e0: b8 17 23 d4 or %i4, 0x3d4, %i4 ! 20213d4 <_Rate_monotonic_Information>
20082e4: fa 07 20 08 ld [ %i4 + 8 ], %i5
20082e8: c2 07 20 0c ld [ %i4 + 0xc ], %g1
20082ec: 80 a7 40 01 cmp %i5, %g1
20082f0: 18 80 00 2e bgu 20083a8 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
20082f4: 35 00 80 7c sethi %hi(0x201f000), %i2
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
20082f8: 23 00 80 7c sethi %hi(0x201f000), %l1
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
20082fc: 21 00 80 7c sethi %hi(0x201f000), %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
2008300: 37 00 80 78 sethi %hi(0x201e000), %i3
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2008304: b4 16 a2 f0 or %i2, 0x2f0, %i2
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
2008308: a2 14 63 08 or %l1, 0x308, %l1
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
200830c: a0 14 23 28 or %l0, 0x328, %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
2008310: 10 80 00 06 b 2008328 <rtems_rate_monotonic_report_statistics_with_plugin+0xa8>
2008314: b6 16 e2 f8 or %i3, 0x2f8, %i3
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2008318: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
200831c: 80 a0 40 1d cmp %g1, %i5
2008320: 0a 80 00 22 bcs 20083a8 <rtems_rate_monotonic_report_statistics_with_plugin+0x128>
2008324: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
2008328: 90 10 00 1d mov %i5, %o0
200832c: 40 00 1d cf call 200fa68 <rtems_rate_monotonic_get_statistics>
2008330: 92 07 bf a0 add %fp, -96, %o1
if ( status != RTEMS_SUCCESSFUL )
2008334: 80 a2 20 00 cmp %o0, 0
2008338: 32 bf ff f8 bne,a 2008318 <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
200833c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
2008340: 92 07 bf d8 add %fp, -40, %o1
2008344: 40 00 1e 3b call 200fc30 <rtems_rate_monotonic_get_status>
2008348: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
200834c: d0 07 bf d8 ld [ %fp + -40 ], %o0
2008350: 92 10 20 05 mov 5, %o1
2008354: 40 00 00 b4 call 2008624 <rtems_object_get_name>
2008358: 94 07 bf f8 add %fp, -8, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
200835c: d8 1f bf a0 ldd [ %fp + -96 ], %o4
2008360: 92 10 00 1a mov %i2, %o1
2008364: 94 10 00 1d mov %i5, %o2
2008368: 90 10 00 18 mov %i0, %o0
200836c: 9f c6 40 00 call %i1
2008370: 96 07 bf f8 add %fp, -8, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2008374: 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 );
2008378: 94 07 bf f0 add %fp, -16, %o2
200837c: 90 07 bf b8 add %fp, -72, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2008380: 80 a0 60 00 cmp %g1, 0
2008384: 12 80 00 0b bne 20083b0 <rtems_rate_monotonic_report_statistics_with_plugin+0x130>
2008388: 92 10 00 1b mov %i3, %o1
(*print)( context, "\n" );
200838c: 9f c6 40 00 call %i1
2008390: 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 ;
2008394: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2008398: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
200839c: 80 a0 40 1d cmp %g1, %i5
20083a0: 1a bf ff e3 bcc 200832c <rtems_rate_monotonic_report_statistics_with_plugin+0xac><== ALWAYS TAKEN
20083a4: 90 10 00 1d mov %i5, %o0
20083a8: 81 c7 e0 08 ret
20083ac: 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 );
20083b0: 40 00 0f ba call 200c298 <_Timespec_Divide_by_integer>
20083b4: 92 10 00 01 mov %g1, %o1
(*print)( context,
20083b8: d0 07 bf ac ld [ %fp + -84 ], %o0
20083bc: 40 00 4e f0 call 201bf7c <.div>
20083c0: 92 10 23 e8 mov 0x3e8, %o1
20083c4: aa 10 00 08 mov %o0, %l5
20083c8: d0 07 bf b4 ld [ %fp + -76 ], %o0
20083cc: 40 00 4e ec call 201bf7c <.div>
20083d0: 92 10 23 e8 mov 0x3e8, %o1
20083d4: c2 07 bf f0 ld [ %fp + -16 ], %g1
20083d8: a6 10 00 08 mov %o0, %l3
20083dc: d0 07 bf f4 ld [ %fp + -12 ], %o0
20083e0: e4 07 bf a8 ld [ %fp + -88 ], %l2
20083e4: e8 07 bf b0 ld [ %fp + -80 ], %l4
20083e8: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20083ec: 40 00 4e e4 call 201bf7c <.div>
20083f0: 92 10 23 e8 mov 0x3e8, %o1
20083f4: 96 10 00 15 mov %l5, %o3
20083f8: 98 10 00 14 mov %l4, %o4
20083fc: 9a 10 00 13 mov %l3, %o5
2008400: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2008404: 92 10 00 11 mov %l1, %o1
2008408: 94 10 00 12 mov %l2, %o2
200840c: 9f c6 40 00 call %i1
2008410: 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);
2008414: d2 07 bf a0 ld [ %fp + -96 ], %o1
2008418: 94 07 bf f0 add %fp, -16, %o2
200841c: 40 00 0f 9f call 200c298 <_Timespec_Divide_by_integer>
2008420: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
2008424: d0 07 bf c4 ld [ %fp + -60 ], %o0
2008428: 40 00 4e d5 call 201bf7c <.div>
200842c: 92 10 23 e8 mov 0x3e8, %o1
2008430: a8 10 00 08 mov %o0, %l4
2008434: d0 07 bf cc ld [ %fp + -52 ], %o0
2008438: 40 00 4e d1 call 201bf7c <.div>
200843c: 92 10 23 e8 mov 0x3e8, %o1
2008440: c2 07 bf f0 ld [ %fp + -16 ], %g1
2008444: a4 10 00 08 mov %o0, %l2
2008448: d0 07 bf f4 ld [ %fp + -12 ], %o0
200844c: ea 07 bf c0 ld [ %fp + -64 ], %l5
2008450: e6 07 bf c8 ld [ %fp + -56 ], %l3
2008454: 92 10 23 e8 mov 0x3e8, %o1
2008458: 40 00 4e c9 call 201bf7c <.div>
200845c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2008460: 92 10 00 10 mov %l0, %o1
2008464: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2008468: 94 10 00 15 mov %l5, %o2
200846c: 90 10 00 18 mov %i0, %o0
2008470: 96 10 00 14 mov %l4, %o3
2008474: 98 10 00 13 mov %l3, %o4
2008478: 9f c6 40 00 call %i1
200847c: 9a 10 00 12 mov %l2, %o5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2008480: 10 bf ff a6 b 2008318 <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
2008484: c2 07 20 0c ld [ %i4 + 0xc ], %g1
020084a0 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
20084a0: 9d e3 bf a0 save %sp, -96, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20084a4: 03 00 80 85 sethi %hi(0x2021400), %g1
20084a8: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2021540 <_Thread_Dispatch_disable_level>
20084ac: 84 00 a0 01 inc %g2
20084b0: c4 20 61 40 st %g2, [ %g1 + 0x140 ]
return _Thread_Dispatch_disable_level;
20084b4: c2 00 61 40 ld [ %g1 + 0x140 ], %g1
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20084b8: 39 00 80 84 sethi %hi(0x2021000), %i4
20084bc: b8 17 23 d4 or %i4, 0x3d4, %i4 ! 20213d4 <_Rate_monotonic_Information>
20084c0: fa 07 20 08 ld [ %i4 + 8 ], %i5
20084c4: c2 07 20 0c ld [ %i4 + 0xc ], %g1
20084c8: 80 a7 40 01 cmp %i5, %g1
20084cc: 18 80 00 09 bgu 20084f0 <rtems_rate_monotonic_reset_all_statistics+0x50><== NEVER TAKEN
20084d0: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
20084d4: 40 00 00 09 call 20084f8 <rtems_rate_monotonic_reset_statistics>
20084d8: 90 10 00 1d mov %i5, %o0
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20084dc: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
20084e0: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20084e4: 80 a0 40 1d cmp %g1, %i5
20084e8: 1a bf ff fb bcc 20084d4 <rtems_rate_monotonic_reset_all_statistics+0x34>
20084ec: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
20084f0: 40 00 0c 9a call 200b758 <_Thread_Enable_dispatch>
20084f4: 81 e8 00 00 restore
0201d320 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
201d320: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d324: d2 06 00 00 ld [ %i0 ], %o1
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
201d328: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d32c: 80 a2 60 00 cmp %o1, 0
201d330: 02 80 00 36 be 201d408 <rtems_rfs_bitmap_create_search+0xe8><== NEVER TAKEN
201d334: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201d338: d0 07 60 04 ld [ %i5 + 4 ], %o0
201d33c: d4 07 60 08 ld [ %i5 + 8 ], %o2
201d340: 40 00 05 63 call 201e8cc <rtems_rfs_buffer_handle_request>
201d344: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
201d348: b0 92 20 00 orcc %o0, 0, %i0
201d34c: 12 80 00 31 bne 201d410 <rtems_rfs_bitmap_create_search+0xf0><== NEVER TAKEN
201d350: 80 a6 20 00 cmp %i0, 0
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201d354: c2 07 40 00 ld [ %i5 ], %g1
201d358: c2 00 60 08 ld [ %g1 + 8 ], %g1
201d35c: d8 00 60 24 ld [ %g1 + 0x24 ], %o4
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
search_map = control->search_bits;
201d360: d2 07 60 14 ld [ %i5 + 0x14 ], %o1
size = control->size;
201d364: de 07 60 0c ld [ %i5 + 0xc ], %o7
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
201d368: c0 27 60 10 clr [ %i5 + 0x10 ]
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201d36c: 82 10 3f ff mov -1, %g1
201d370: c2 22 40 00 st %g1, [ %o1 ]
while (size)
201d374: 80 a3 e0 00 cmp %o7, 0
201d378: 02 80 00 24 be 201d408 <rtems_rfs_bitmap_create_search+0xe8><== NEVER TAKEN
201d37c: b0 10 20 00 clr %i0
201d380: 96 10 20 00 clr %o3
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201d384: b0 10 3f ff mov -1, %i0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201d388: 9a 10 20 01 mov 1, %o5
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
201d38c: 80 a3 e0 1f cmp %o7, 0x1f
201d390: 38 80 00 24 bgu,a 201d420 <rtems_rfs_bitmap_create_search+0x100>
201d394: c6 03 00 00 ld [ %o4 ], %g3
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
201d398: c2 03 00 00 ld [ %o4 ], %g1
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201d39c: 86 20 00 0f neg %o7, %g3
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
201d3a0: 88 10 00 0f mov %o7, %g4
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201d3a4: 87 36 00 03 srl %i0, %g3, %g3
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
201d3a8: 94 10 00 0f mov %o7, %o2
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
201d3ac: 86 08 c0 01 and %g3, %g1, %g3
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
201d3b0: 80 a0 e0 00 cmp %g3, 0
201d3b4: 02 80 00 0e be 201d3ec <rtems_rfs_bitmap_create_search+0xcc>
201d3b8: 80 a2 e0 20 cmp %o3, 0x20
201d3bc: 82 10 20 00 clr %g1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201d3c0: 85 2b 40 01 sll %o5, %g1, %g2
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
201d3c4: 80 88 80 03 btst %g2, %g3
201d3c8: 02 80 00 05 be 201d3dc <rtems_rfs_bitmap_create_search+0xbc>
201d3cc: 82 00 60 01 inc %g1
control->free++;
201d3d0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
201d3d4: 84 00 a0 01 inc %g2
201d3d8: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
201d3dc: 80 a1 00 01 cmp %g4, %g1
201d3e0: 14 bf ff f9 bg 201d3c4 <rtems_rfs_bitmap_create_search+0xa4>
201d3e4: 85 2b 40 01 sll %o5, %g1, %g2
control->free++;
}
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
201d3e8: 80 a2 e0 20 cmp %o3, 0x20
201d3ec: 02 80 00 10 be 201d42c <rtems_rfs_bitmap_create_search+0x10c><== NEVER TAKEN
201d3f0: 9e 23 c0 0a sub %o7, %o2, %o7
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
201d3f4: 96 02 e0 01 inc %o3
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
201d3f8: 80 a3 e0 00 cmp %o7, 0
201d3fc: 12 bf ff e4 bne 201d38c <rtems_rfs_bitmap_create_search+0x6c>
201d400: 98 03 20 04 add %o4, 4, %o4
else
bit++;
map++;
}
return 0;
201d404: b0 10 20 00 clr %i0
}
201d408: 81 c7 e0 08 ret
201d40c: 81 e8 00 00 restore
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201d410: 14 bf ff fe bg 201d408 <rtems_rfs_bitmap_create_search+0xe8><== NOT EXECUTED
201d414: 98 10 20 00 clr %o4 <== NOT EXECUTED
return rc;
control->free = 0;
search_map = control->search_bits;
201d418: 10 bf ff d3 b 201d364 <rtems_rfs_bitmap_create_search+0x44><== NOT EXECUTED
201d41c: d2 07 60 14 ld [ %i5 + 0x14 ], %o1 <== NOT EXECUTED
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
201d420: 94 10 20 20 mov 0x20, %o2
available = rtems_rfs_bitmap_element_bits ();
201d424: 10 bf ff e3 b 201d3b0 <rtems_rfs_bitmap_create_search+0x90>
201d428: 88 10 20 20 mov 0x20, %g4
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201d42c: f0 22 60 04 st %i0, [ %o1 + 4 ] <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
201d430: 96 10 20 00 clr %o3 <== NOT EXECUTED
search_map++;
201d434: 10 bf ff f1 b 201d3f8 <rtems_rfs_bitmap_create_search+0xd8><== NOT EXECUTED
201d438: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED
0201d238 <rtems_rfs_bitmap_map_alloc>:
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
201d238: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
201d23c: c0 2e 80 00 clrb [ %i2 ]
* of bits from the original seed above then below. That is search from the
* seed up then from the seed down a window number of bits, then repeat the
* process from the window distance from the seed, again above then
* below. Keep moving out until all bits have been searched.
*/
upper_seed = seed;
201d240: ba 10 00 19 mov %i1, %i5
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
201d244: 80 a7 60 00 cmp %i5, 0
201d248: 06 80 00 1f bl 201d2c4 <rtems_rfs_bitmap_map_alloc+0x8c> <== NEVER TAKEN
201d24c: 80 a6 60 00 cmp %i1, 0
201d250: c2 06 20 0c ld [ %i0 + 0xc ], %g1
201d254: 80 a7 40 01 cmp %i5, %g1
201d258: 1a 80 00 1b bcc 201d2c4 <rtems_rfs_bitmap_map_alloc+0x8c> <== NEVER TAKEN
201d25c: 80 a6 60 00 cmp %i1, 0
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
201d260: fa 26 c0 00 st %i5, [ %i3 ]
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
201d264: 90 10 00 18 mov %i0, %o0
201d268: 92 10 00 1b mov %i3, %o1
201d26c: 94 10 00 1a mov %i2, %o2
201d270: 7f ff fe 2b call 201cb1c <rtems_rfs_search_map_for_clear_bit.constprop.1>
201d274: 96 10 20 01 mov 1, %o3
window, 1);
if ((rc > 0) || *allocated)
201d278: 80 a2 20 00 cmp %o0, 0
201d27c: 14 80 00 27 bg 201d318 <rtems_rfs_bitmap_map_alloc+0xe0> <== NEVER TAKEN
201d280: 01 00 00 00 nop
201d284: c2 0e 80 00 ldub [ %i2 ], %g1
201d288: 80 a0 60 00 cmp %g1, 0
201d28c: 12 80 00 23 bne 201d318 <rtems_rfs_bitmap_map_alloc+0xe0> <== ALWAYS TAKEN
201d290: 80 a6 60 00 cmp %i1, 0
break;
}
if (lower_seed >= 0)
201d294: 36 80 00 15 bge,a 201d2e8 <rtems_rfs_bitmap_map_alloc+0xb0><== NOT EXECUTED
201d298: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
201d29c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
201d2a0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
201d2a4: 38 80 00 02 bgu,a 201d2ac <rtems_rfs_bitmap_map_alloc+0x74><== NOT EXECUTED
201d2a8: ba 07 68 00 add %i5, 0x800, %i5 <== NOT EXECUTED
upper_seed += window;
if (lower_seed >= 0)
201d2ac: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201d2b0: 06 bf ff e5 bl 201d244 <rtems_rfs_bitmap_map_alloc+0xc> <== NOT EXECUTED
201d2b4: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
201d2b8: 16 bf ff e6 bge 201d250 <rtems_rfs_bitmap_map_alloc+0x18> <== NOT EXECUTED
201d2bc: b2 06 78 00 add %i1, -2048, %i1 <== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
201d2c0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
201d2c4: 06 80 00 15 bl 201d318 <rtems_rfs_bitmap_map_alloc+0xe0> <== NOT EXECUTED
201d2c8: 01 00 00 00 nop <== NOT EXECUTED
201d2cc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
201d2d0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
201d2d4: 1a 80 00 11 bcc 201d318 <rtems_rfs_bitmap_map_alloc+0xe0> <== NOT EXECUTED
201d2d8: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
201d2dc: 38 bf ff e2 bgu,a 201d264 <rtems_rfs_bitmap_map_alloc+0x2c><== NOT EXECUTED
201d2e0: fa 26 c0 00 st %i5, [ %i3 ] <== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
201d2e4: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
201d2e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d2ec: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201d2f0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201d2f4: 7f ff fe 0a call 201cb1c <rtems_rfs_search_map_for_clear_bit.constprop.1><== NOT EXECUTED
201d2f8: 96 10 3f ff mov -1, %o3 <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
201d2fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201d300: 14 80 00 06 bg 201d318 <rtems_rfs_bitmap_map_alloc+0xe0> <== NOT EXECUTED
201d304: 01 00 00 00 nop <== NOT EXECUTED
201d308: c2 0e 80 00 ldub [ %i2 ], %g1 <== NOT EXECUTED
201d30c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201d310: 22 bf ff e4 be,a 201d2a0 <rtems_rfs_bitmap_map_alloc+0x68><== NOT EXECUTED
201d314: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
201d318: 81 c7 e0 08 ret
201d31c: 91 e8 20 00 restore %g0, 0, %o0
0201cf38 <rtems_rfs_bitmap_map_clear>:
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
201cf38: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201cf3c: d2 06 00 00 ld [ %i0 ], %o1
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
201cf40: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201cf44: 80 a2 60 00 cmp %o1, 0
201cf48: 02 80 00 10 be 201cf88 <rtems_rfs_bitmap_map_clear+0x50> <== NEVER TAKEN
201cf4c: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201cf50: d0 07 60 04 ld [ %i5 + 4 ], %o0
201cf54: d4 07 60 08 ld [ %i5 + 8 ], %o2
201cf58: 40 00 06 5d call 201e8cc <rtems_rfs_buffer_handle_request>
201cf5c: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
201cf60: b0 92 20 00 orcc %o0, 0, %i0
201cf64: 12 80 00 0b bne 201cf90 <rtems_rfs_bitmap_map_clear+0x58> <== NEVER TAKEN
201cf68: 80 a6 20 00 cmp %i0, 0
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201cf6c: c2 07 40 00 ld [ %i5 ], %g1
201cf70: c2 00 60 08 ld [ %g1 + 8 ], %g1
201cf74: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
201cf78: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201cf7c: 80 a6 40 01 cmp %i1, %g1
201cf80: 0a 80 00 08 bcs 201cfa0 <rtems_rfs_bitmap_map_clear+0x68> <== ALWAYS TAKEN
201cf84: b0 10 20 16 mov 0x16, %i0
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
return 0;
}
201cf88: 81 c7 e0 08 ret <== NOT EXECUTED
201cf8c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201cf90: 14 bf ff fe bg 201cf88 <rtems_rfs_bitmap_map_clear+0x50> <== NOT EXECUTED
201cf94: 84 10 20 00 clr %g2 <== NOT EXECUTED
return rc;
if (bit >= control->size)
201cf98: 10 bf ff f9 b 201cf7c <rtems_rfs_bitmap_map_clear+0x44> <== NOT EXECUTED
201cf9c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
201cfa0: c8 07 60 14 ld [ %i5 + 0x14 ], %g4
index = rtems_rfs_bitmap_map_index (bit);
201cfa4: b1 3e 60 05 sra %i1, 5, %i0
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201cfa8: 9f 2e 20 02 sll %i0, 2, %o7
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201cfac: da 00 80 0f ld [ %g2 + %o7 ], %o5
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201cfb0: 82 10 20 01 mov 1, %g1
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
201cfb4: 87 3e 60 0a sra %i1, 0xa, %g3
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201cfb8: b3 28 40 19 sll %g1, %i1, %i1
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
201cfbc: 87 28 e0 02 sll %g3, 2, %g3
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201cfc0: b2 13 40 19 or %o5, %i1, %i1
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
201cfc4: f2 20 80 0f st %i1, [ %g2 + %o7 ]
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201cfc8: de 01 00 03 ld [ %g4 + %g3 ], %o7
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
201cfcc: f2 07 40 00 ld [ %i5 ], %i1
control->free++;
201cfd0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
201cfd4: b1 28 40 18 sll %g1, %i0, %i0
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
201cfd8: b0 13 c0 18 or %o7, %i0, %i0
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
201cfdc: f0 21 00 03 st %i0, [ %g4 + %g3 ]
rtems_rfs_buffer_mark_dirty (control->buffer);
201cfe0: c2 2e 40 00 stb %g1, [ %i1 ]
control->free++;
201cfe4: 82 00 a0 01 add %g2, 1, %g1
201cfe8: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
return 0;
}
201cfec: 81 c7 e0 08 ret
201cff0: 91 e8 20 00 restore %g0, 0, %o0
0201d14c <rtems_rfs_bitmap_map_clear_all>:
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
201d14c: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d150: d2 06 00 00 ld [ %i0 ], %o1
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
201d154: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d158: 80 a2 60 00 cmp %o1, 0
201d15c: 02 80 00 31 be 201d220 <rtems_rfs_bitmap_map_clear_all+0xd4><== NEVER TAKEN
201d160: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201d164: d0 07 60 04 ld [ %i5 + 4 ], %o0
201d168: d4 07 60 08 ld [ %i5 + 8 ], %o2
201d16c: 40 00 05 d8 call 201e8cc <rtems_rfs_buffer_handle_request>
201d170: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
201d174: b0 92 20 00 orcc %o0, 0, %i0
201d178: 12 80 00 2c bne 201d228 <rtems_rfs_bitmap_map_clear_all+0xdc><== NEVER TAKEN
201d17c: 80 a6 20 00 cmp %i0, 0
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201d180: da 07 40 00 ld [ %i5 ], %o5
201d184: c2 03 60 08 ld [ %o5 + 8 ], %g1
201d188: de 00 60 24 ld [ %g1 + 0x24 ], %o7
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d18c: f0 07 60 0c ld [ %i5 + 0xc ], %i0
control->free = elements;
201d190: 84 10 20 00 clr %g2
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d194: b0 06 3f ff add %i0, -1, %i0
control->free = elements;
201d198: 82 10 20 00 clr %g1
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d19c: b1 36 20 05 srl %i0, 5, %i0
control->free = elements;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201d1a0: 88 10 3f ff mov -1, %g4
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d1a4: 86 06 20 01 add %i0, 1, %g3
control->free = elements;
201d1a8: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201d1ac: 85 28 a0 02 sll %g2, 2, %g2
201d1b0: c8 23 c0 02 st %g4, [ %o7 + %g2 ]
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
201d1b4: 82 00 60 01 inc %g1
201d1b8: 80 a0 c0 01 cmp %g3, %g1
201d1bc: 18 bf ff fc bgu 201d1ac <rtems_rfs_bitmap_map_clear_all+0x60>
201d1c0: 84 10 00 01 mov %g1, %g2
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
201d1c4: 86 88 e0 1f andcc %g3, 0x1f, %g3
201d1c8: 02 80 00 04 be 201d1d8 <rtems_rfs_bitmap_map_clear_all+0x8c><== ALWAYS TAKEN
201d1cc: 9e 10 3f ff mov -1, %o7
201d1d0: 86 20 00 03 neg %g3 <== NOT EXECUTED
201d1d4: 9f 33 c0 03 srl %o7, %g3, %o7 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
201d1d8: 87 36 20 05 srl %i0, 5, %g3
for (e = 0; e < (elements - 1); e++)
201d1dc: 80 a0 e0 00 cmp %g3, 0
201d1e0: 02 80 00 0b be 201d20c <rtems_rfs_bitmap_map_clear_all+0xc0><== ALWAYS TAKEN
201d1e4: c8 07 60 14 ld [ %i5 + 0x14 ], %g4
201d1e8: 84 10 20 00 clr %g2 <== NOT EXECUTED
201d1ec: 82 10 20 00 clr %g1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
201d1f0: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
201d1f4: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
201d1f8: fa 21 00 02 st %i5, [ %g4 + %g2 ] <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
201d1fc: 82 00 60 01 inc %g1 <== NOT EXECUTED
201d200: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
201d204: 12 bf ff fc bne 201d1f4 <rtems_rfs_bitmap_map_clear_all+0xa8><== NOT EXECUTED
201d208: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
201d20c: 87 28 e0 02 sll %g3, 2, %g3
201d210: de 21 00 03 st %o7, [ %g4 + %g3 ]
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
201d214: 82 10 20 01 mov 1, %g1
return 0;
201d218: b0 10 20 00 clr %i0
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
201d21c: c2 2b 40 00 stb %g1, [ %o5 ]
return 0;
}
201d220: 81 c7 e0 08 ret
201d224: 81 e8 00 00 restore
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201d228: 14 bf ff fe bg 201d220 <rtems_rfs_bitmap_map_clear_all+0xd4><== NOT EXECUTED
201d22c: 9e 10 20 00 clr %o7 <== NOT EXECUTED
201d230: 10 bf ff d7 b 201d18c <rtems_rfs_bitmap_map_clear_all+0x40><== NOT EXECUTED
201d234: da 07 40 00 ld [ %i5 ], %o5 <== NOT EXECUTED
0201ce70 <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
201ce70: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201ce74: d2 06 00 00 ld [ %i0 ], %o1
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
201ce78: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201ce7c: 80 a2 60 00 cmp %o1, 0
201ce80: 02 80 00 10 be 201cec0 <rtems_rfs_bitmap_map_set+0x50> <== NEVER TAKEN
201ce84: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201ce88: d0 07 60 04 ld [ %i5 + 4 ], %o0
201ce8c: d4 07 60 08 ld [ %i5 + 8 ], %o2
201ce90: 40 00 06 8f call 201e8cc <rtems_rfs_buffer_handle_request>
201ce94: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
201ce98: b0 92 20 00 orcc %o0, 0, %i0
201ce9c: 12 80 00 0b bne 201cec8 <rtems_rfs_bitmap_map_set+0x58> <== NEVER TAKEN
201cea0: 80 a6 20 00 cmp %i0, 0
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201cea4: c2 07 40 00 ld [ %i5 ], %g1
201cea8: c2 00 60 08 ld [ %g1 + 8 ], %g1
201ceac: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
201ceb0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201ceb4: 80 a6 40 01 cmp %i1, %g1
201ceb8: 0a 80 00 08 bcs 201ced8 <rtems_rfs_bitmap_map_set+0x68> <== ALWAYS TAKEN
201cebc: b0 10 20 16 mov 0x16, %i0
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
201cec0: 81 c7 e0 08 ret
201cec4: 81 e8 00 00 restore
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201cec8: 14 bf ff fe bg 201cec0 <rtems_rfs_bitmap_map_set+0x50> <== NOT EXECUTED
201cecc: 84 10 20 00 clr %g2 <== NOT EXECUTED
return rc;
if (bit >= control->size)
201ced0: 10 bf ff f9 b 201ceb4 <rtems_rfs_bitmap_map_set+0x44> <== NOT EXECUTED
201ced4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
201ced8: 9f 3e 60 05 sra %i1, 5, %o7
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201cedc: 89 2b e0 02 sll %o7, 2, %g4
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cee0: c6 00 80 04 ld [ %g2 + %g4 ], %g3
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
201cee4: da 07 60 14 ld [ %i5 + 0x14 ], %o5
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201cee8: 82 10 20 01 mov 1, %g1
201ceec: b1 28 40 19 sll %g1, %i1, %i0
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cef0: 86 28 c0 18 andn %g3, %i0, %g3
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
201cef4: c6 20 80 04 st %g3, [ %g2 + %g4 ]
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
201cef8: 80 a0 e0 00 cmp %g3, 0
201cefc: 12 bf ff f1 bne 201cec0 <rtems_rfs_bitmap_map_set+0x50> <== ALWAYS TAKEN
201cf00: b0 10 20 00 clr %i0
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
201cf04: b3 3e 60 0a sra %i1, 0xa, %i1 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
201cf08: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cf0c: c8 03 40 19 ld [ %o5 + %i1 ], %g4 <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
201cf10: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
201cf14: c4 07 40 00 ld [ %i5 ], %g2 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
201cf18: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cf1c: 9e 29 00 0f andn %g4, %o7, %o7 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
201cf20: de 23 40 19 st %o7, [ %o5 + %i1 ] <== NOT EXECUTED
control->free--;
201cf24: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
201cf28: c6 27 60 10 st %g3, [ %i5 + 0x10 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
201cf2c: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED
}
return 0;
}
201cf30: 81 c7 e0 08 ret <== NOT EXECUTED
201cf34: 81 e8 00 00 restore <== NOT EXECUTED
0201d088 <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
201d088: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d08c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
201d090: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d094: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201d098: 02 80 00 27 be 201d134 <rtems_rfs_bitmap_map_set_all+0xac><== NOT EXECUTED
201d09c: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201d0a0: d0 07 60 04 ld [ %i5 + 4 ], %o0 <== NOT EXECUTED
201d0a4: d4 07 60 08 ld [ %i5 + 8 ], %o2 <== NOT EXECUTED
201d0a8: 40 00 06 09 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201d0ac: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
control->buffer,
control->block,
true);
if (rc)
201d0b0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d0b4: 12 80 00 22 bne 201d13c <rtems_rfs_bitmap_map_set_all+0xb4><== NOT EXECUTED
201d0b8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201d0bc: de 07 40 00 ld [ %i5 ], %o7 <== NOT EXECUTED
201d0c0: c2 03 e0 08 ld [ %o7 + 8 ], %g1 <== NOT EXECUTED
201d0c4: c8 00 60 24 ld [ %g1 + 0x24 ], %g4 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d0c8: f0 07 60 0c ld [ %i5 + 0xc ], %i0 <== NOT EXECUTED
control->free = 0;
201d0cc: c0 27 60 10 clr [ %i5 + 0x10 ] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d0d0: b0 06 3f ff add %i0, -1, %i0 <== NOT EXECUTED
control->free = 0;
201d0d4: 84 10 20 00 clr %g2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d0d8: b1 36 20 05 srl %i0, 5, %i0 <== NOT EXECUTED
control->free = 0;
201d0dc: 82 10 20 00 clr %g1 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
201d0e0: 86 06 20 01 add %i0, 1, %g3 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
201d0e4: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
201d0e8: c0 21 00 02 clr [ %g4 + %g2 ] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
201d0ec: 82 00 60 01 inc %g1 <== NOT EXECUTED
201d0f0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
201d0f4: 18 bf ff fc bgu 201d0e4 <rtems_rfs_bitmap_map_set_all+0x5c><== NOT EXECUTED
201d0f8: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
201d0fc: c8 07 60 14 ld [ %i5 + 0x14 ], %g4 <== NOT EXECUTED
201d100: 87 36 20 05 srl %i0, 5, %g3 <== NOT EXECUTED
for (e = 0; e < elements; e++)
201d104: 84 10 20 00 clr %g2 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
201d108: 86 00 e0 01 inc %g3 <== NOT EXECUTED
for (e = 0; e < elements; e++)
201d10c: 82 10 20 00 clr %g1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
201d110: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
201d114: c0 21 00 02 clr [ %g4 + %g2 ] <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
201d118: 82 00 60 01 inc %g1 <== NOT EXECUTED
201d11c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
201d120: 18 bf ff fc bgu 201d110 <rtems_rfs_bitmap_map_set_all+0x88><== NOT EXECUTED
201d124: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
201d128: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
return 0;
201d12c: b0 10 20 00 clr %i0 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
201d130: c2 2b c0 00 stb %g1, [ %o7 ] <== NOT EXECUTED
return 0;
}
201d134: 81 c7 e0 08 ret <== NOT EXECUTED
201d138: 81 e8 00 00 restore <== NOT EXECUTED
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201d13c: 14 bf ff fe bg 201d134 <rtems_rfs_bitmap_map_set_all+0xac><== NOT EXECUTED
201d140: 88 10 20 00 clr %g4 <== NOT EXECUTED
201d144: 10 bf ff e1 b 201d0c8 <rtems_rfs_bitmap_map_set_all+0x40> <== NOT EXECUTED
201d148: de 07 40 00 ld [ %i5 ], %o7 <== NOT EXECUTED
0201cff4 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
201cff4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201cff8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
201cffc: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201d000: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
201d004: 02 80 00 10 be 201d044 <rtems_rfs_bitmap_map_test+0x50> <== NOT EXECUTED
201d008: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201d00c: d0 07 60 04 ld [ %i5 + 4 ], %o0 <== NOT EXECUTED
201d010: d4 07 60 08 ld [ %i5 + 8 ], %o2 <== NOT EXECUTED
201d014: 40 00 06 2e call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201d018: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
control->buffer,
control->block,
true);
if (rc)
201d01c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d020: 12 80 00 0b bne 201d04c <rtems_rfs_bitmap_map_test+0x58> <== NOT EXECUTED
201d024: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201d028: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
201d02c: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
201d030: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
201d034: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
201d038: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
201d03c: 0a 80 00 08 bcs 201d05c <rtems_rfs_bitmap_map_test+0x68> <== NOT EXECUTED
201d040: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
201d044: 81 c7 e0 08 ret <== NOT EXECUTED
201d048: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201d04c: 14 bf ff fe bg 201d044 <rtems_rfs_bitmap_map_test+0x50> <== NOT EXECUTED
201d050: 84 10 20 00 clr %g2 <== NOT EXECUTED
return rc;
if (bit >= control->size)
201d054: 10 bf ff f9 b 201d038 <rtems_rfs_bitmap_map_test+0x44> <== NOT EXECUTED
201d058: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
201d05c: 83 3e 60 05 sra %i1, 5, %g1 <== NOT EXECUTED
*state = rtems_rfs_bitmap_test (map[index], bit);
201d060: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201d064: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED
201d068: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201d06c: b3 28 80 19 sll %g2, %i1, %i1 <== NOT EXECUTED
201d070: b2 0e 40 01 and %i1, %g1, %i1 <== NOT EXECUTED
201d074: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
201d078: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
201d07c: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
201d080: 81 c7 e0 08 ret <== NOT EXECUTED
201d084: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0201ce38 <rtems_rfs_bitmap_mask>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201ce38: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
201ce3c: 90 20 00 08 neg %o0 <== NOT EXECUTED
return mask;
}
201ce40: 81 c3 e0 08 retl <== NOT EXECUTED
201ce44: 91 30 40 08 srl %g1, %o0, %o0 <== NOT EXECUTED
0201ce48 <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
201ce48: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
rtems_rfs_bitmap_element mask = 0;
if (end > start)
201ce4c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
201ce50: 08 80 00 06 bleu 201ce68 <rtems_rfs_bitmap_mask_section+0x20><== NOT EXECUTED
201ce54: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
201ce58: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED
201ce5c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
201ce60: 91 32 00 09 srl %o0, %o1, %o0 <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
201ce64: 91 2a 00 01 sll %o0, %g1, %o0 <== NOT EXECUTED
return mask;
}
201ce68: 81 c3 e0 08 retl <== NOT EXECUTED
0201d43c <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
201d43c: 9d e3 bf a0 save %sp, -96, %sp
size_t elements = rtems_rfs_bitmap_elements (size);
201d440: 82 06 ff ff add %i3, -1, %g1
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
201d444: 83 30 60 0a srl %g1, 0xa, %g1
201d448: 82 00 60 01 inc %g1
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
201d44c: f4 26 00 00 st %i2, [ %i0 ]
control->fs = fs;
201d450: f2 26 20 04 st %i1, [ %i0 + 4 ]
control->block = block;
201d454: f8 26 20 08 st %i4, [ %i0 + 8 ]
control->size = size;
201d458: f6 26 20 0c st %i3, [ %i0 + 0xc ]
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
201d45c: 7f ff a6 61 call 2006de0 <malloc>
201d460: 91 28 60 02 sll %g1, 2, %o0
if (!control->search_bits)
201d464: 80 a2 20 00 cmp %o0, 0
201d468: 02 80 00 04 be 201d478 <rtems_rfs_bitmap_open+0x3c> <== NEVER TAKEN
201d46c: d0 26 20 14 st %o0, [ %i0 + 0x14 ]
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
201d470: 7f ff ff ac call 201d320 <rtems_rfs_bitmap_create_search>
201d474: 81 e8 00 00 restore
}
201d478: 81 c7 e0 08 ret <== NOT EXECUTED
201d47c: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED
0201d690 <rtems_rfs_block_find_indirect.part.1>:
* a block number offset not a byte offset into the table.
* @param result Pointer to the result of the search.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
201d690: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
201d694: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
201d698: 85 2e e0 02 sll %i3, 2, %g2 <== NOT EXECUTED
201d69c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
201d6a0: de 06 20 04 ld [ %i0 + 4 ], %o7 <== NOT EXECUTED
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
201d6a4: c8 08 c0 02 ldub [ %g3 + %g2 ], %g4 <== NOT EXECUTED
201d6a8: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201d6ac: c4 08 60 03 ldub [ %g1 + 3 ], %g2 <== NOT EXECUTED
201d6b0: c6 08 60 01 ldub [ %g1 + 1 ], %g3 <== NOT EXECUTED
201d6b4: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201d6b8: 89 29 20 18 sll %g4, 0x18, %g4 <== NOT EXECUTED
201d6bc: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201d6c0: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED
201d6c4: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
201d6c8: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201d6cc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
201d6d0: 84 38 00 01 xnor %g0, %g1, %g2 <== NOT EXECUTED
201d6d4: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED
201d6d8: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED
201d6dc: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED
if (*result >= rtems_rfs_fs_blocks (fs))
201d6e0: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED
201d6e4: 1a 80 00 04 bcc 201d6f4 <rtems_rfs_block_find_indirect.part.1+0x64><== NOT EXECUTED
201d6e8: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
201d6ec: 81 c7 e0 08 ret <== NOT EXECUTED
201d6f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
201d6f4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d6f8: 7f ff da d1 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201d6fc: 13 00 00 04 sethi %hi(0x1000), %o1 <== NOT EXECUTED
201d700: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d704: 32 80 00 05 bne,a 201d718 <rtems_rfs_block_find_indirect.part.1+0x88><== NOT EXECUTED
201d708: d2 07 00 00 ld [ %i4 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
201d70c: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
rc = EIO;
}
return 0;
}
201d710: 81 c7 e0 08 ret <== NOT EXECUTED
201d714: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
201d718: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201d71c: 11 00 80 db sethi %hi(0x2036c00), %o0 <== NOT EXECUTED
201d720: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201d724: 40 00 21 8b call 2025d50 <printf> <== NOT EXECUTED
201d728: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
201d72c: 10 bf ff f9 b 201d710 <rtems_rfs_block_find_indirect.part.1+0x80><== NOT EXECUTED
201d730: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
0201d92c <rtems_rfs_block_get_block_size>:
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
201d92c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (pos == 0)
201d930: 80 96 40 1a orcc %i1, %i2, %g0 <== NOT EXECUTED
201d934: 02 80 00 11 be 201d978 <rtems_rfs_block_get_block_size+0x4c><== NOT EXECUTED
201d938: 94 10 20 00 clr %o2 <== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
201d93c: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED
201d940: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
201d944: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
201d948: 40 00 55 c8 call 2033068 <__udivdi3> <== NOT EXECUTED
201d94c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201d950: 92 02 60 01 inc %o1 <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
201d954: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
if (pos == 0)
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
201d958: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
201d95c: 94 10 20 00 clr %o2 <== NOT EXECUTED
201d960: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201d964: 40 00 56 96 call 20333bc <__umoddi3> <== NOT EXECUTED
201d968: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
201d96c: d2 26 e0 04 st %o1, [ %i3 + 4 ] <== NOT EXECUTED
201d970: 81 c7 e0 08 ret <== NOT EXECUTED
201d974: 81 e8 00 00 restore <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
201d978: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
size->offset = 0;
201d97c: c0 26 e0 04 clr [ %i3 + 4 ] <== NOT EXECUTED
201d980: 81 c7 e0 08 ret <== NOT EXECUTED
201d984: 81 e8 00 00 restore <== NOT EXECUTED
0201db70 <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
201db70: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
int brc;
if (map->dirty && map->inode)
201db74: c2 0e 40 00 ldub [ %i1 ], %g1
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
201db78: ba 10 00 18 mov %i0, %i5
int rc = 0;
int brc;
if (map->dirty && map->inode)
201db7c: 80 a0 60 00 cmp %g1, 0
201db80: 02 80 00 0b be 201dbac <rtems_rfs_block_map_close+0x3c>
201db84: b0 10 20 00 clr %i0
201db88: d2 06 60 04 ld [ %i1 + 4 ], %o1
201db8c: 80 a2 60 00 cmp %o1, 0
201db90: 22 80 00 08 be,a 201dbb0 <rtems_rfs_block_map_close+0x40><== NEVER TAKEN
201db94: 92 06 60 38 add %i1, 0x38, %o1 <== NOT EXECUTED
{
brc = rtems_rfs_inode_load (fs, map->inode);
201db98: 7f ff cc a1 call 2010e1c <rtems_rfs_inode_load>
201db9c: 90 10 00 1d mov %i5, %o0
if (brc > 0)
201dba0: b0 92 20 00 orcc %o0, 0, %i0
201dba4: 04 80 00 11 ble 201dbe8 <rtems_rfs_block_map_close+0x78> <== ALWAYS TAKEN
201dba8: 84 10 20 01 mov 1, %g2
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201dbac: 92 06 60 38 add %i1, 0x38, %o1
map->dirty = false;
}
}
map->inode = NULL;
201dbb0: c0 26 60 04 clr [ %i1 + 4 ]
201dbb4: 40 00 02 cb call 201e6e0 <rtems_rfs_buffer_handle_release>
201dbb8: 90 10 00 1d mov %i5, %o0
201dbbc: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
201dbc0: c0 2e 60 38 clrb [ %i1 + 0x38 ]
handle->bnum = 0;
201dbc4: c0 26 60 3c clr [ %i1 + 0x3c ]
handle->buffer = NULL;
201dbc8: c0 26 60 40 clr [ %i1 + 0x40 ]
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201dbcc: 40 00 02 c5 call 201e6e0 <rtems_rfs_buffer_handle_release>
201dbd0: 92 06 60 44 add %i1, 0x44, %o1
handle->dirty = false;
201dbd4: c0 2e 60 44 clrb [ %i1 + 0x44 ]
handle->bnum = 0;
201dbd8: c0 26 60 48 clr [ %i1 + 0x48 ]
handle->buffer = NULL;
201dbdc: c0 26 60 4c clr [ %i1 + 0x4c ]
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
201dbe0: 81 c7 e0 08 ret
201dbe4: 81 e8 00 00 restore
int brc;
if (map->dirty && map->inode)
{
brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
201dbe8: 88 10 20 00 clr %g4
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201dbec: 98 10 20 01 mov 1, %o4
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
201dbf0: c2 06 60 04 ld [ %i1 + 4 ], %g1
return rc;
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
201dbf4: 86 06 40 02 add %i1, %g2, %g3
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
201dbf8: da 00 60 0c ld [ %g1 + 0xc ], %o5
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
201dbfc: c6 00 e0 23 ld [ %g3 + 0x23 ], %g3
201dc00: b0 01 20 06 add %g4, 6, %i0
201dc04: b1 2e 20 02 sll %i0, 2, %i0
201dc08: b0 03 40 18 add %o5, %i0, %i0
201dc0c: 9f 30 e0 18 srl %g3, 0x18, %o7
201dc10: de 2e 20 04 stb %o7, [ %i0 + 4 ]
201dc14: f0 00 60 0c ld [ %g1 + 0xc ], %i0
201dc18: 9f 30 e0 10 srl %g3, 0x10, %o7
201dc1c: b0 06 00 02 add %i0, %g2, %i0
201dc20: de 2e 20 1c stb %o7, [ %i0 + 0x1c ]
201dc24: f0 00 60 0c ld [ %g1 + 0xc ], %i0
201dc28: 9f 30 e0 08 srl %g3, 8, %o7
201dc2c: b0 06 00 02 add %i0, %g2, %i0
201dc30: de 2e 20 1d stb %o7, [ %i0 + 0x1d ]
201dc34: f0 00 60 0c ld [ %g1 + 0xc ], %i0
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201dc38: 88 01 20 01 inc %g4
201dc3c: b0 06 00 02 add %i0, %g2, %i0
201dc40: c6 2e 20 1e stb %g3, [ %i0 + 0x1e ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201dc44: d8 28 60 10 stb %o4, [ %g1 + 0x10 ]
201dc48: 84 00 a0 04 add %g2, 4, %g2
201dc4c: 80 a1 20 05 cmp %g4, 5
201dc50: 12 bf ff e8 bne 201dbf0 <rtems_rfs_block_map_close+0x80>
201dc54: 82 10 20 01 mov 1, %g1
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
201dc58: c6 06 60 04 ld [ %i1 + 4 ], %g3
201dc5c: c4 06 60 08 ld [ %i1 + 8 ], %g2
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
201dc60: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201dc64: b1 30 a0 18 srl %g2, 0x18, %i0
201dc68: f0 29 20 0c stb %i0, [ %g4 + 0xc ]
201dc6c: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201dc70: b1 30 a0 10 srl %g2, 0x10, %i0
201dc74: f0 29 20 0d stb %i0, [ %g4 + 0xd ]
201dc78: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201dc7c: b1 30 a0 08 srl %g2, 8, %i0
201dc80: f0 29 20 0e stb %i0, [ %g4 + 0xe ]
201dc84: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201dc88: 90 10 00 1d mov %i5, %o0
201dc8c: c4 29 20 0f stb %g2, [ %g4 + 0xf ]
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
201dc90: c8 06 60 04 ld [ %i1 + 4 ], %g4
201dc94: c4 06 60 0c ld [ %i1 + 0xc ], %g2
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
201dc98: f0 01 20 0c ld [ %g4 + 0xc ], %i0
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201dc9c: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
201dca0: 87 30 a0 08 srl %g2, 8, %g3
201dca4: c6 2e 20 0a stb %g3, [ %i0 + 0xa ]
201dca8: c6 01 20 0c ld [ %g4 + 0xc ], %g3
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201dcac: 94 10 20 01 mov 1, %o2
201dcb0: c4 28 e0 0b stb %g2, [ %g3 + 0xb ]
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
201dcb4: c6 06 60 04 ld [ %i1 + 4 ], %g3
201dcb8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
201dcbc: f0 00 e0 0c ld [ %g3 + 0xc ], %i0
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201dcc0: c2 29 20 10 stb %g1, [ %g4 + 0x10 ]
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
201dcc4: 89 30 a0 18 srl %g2, 0x18, %g4
201dcc8: c8 2e 20 30 stb %g4, [ %i0 + 0x30 ]
201dccc: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201dcd0: b1 30 a0 10 srl %g2, 0x10, %i0
201dcd4: f0 29 20 31 stb %i0, [ %g4 + 0x31 ]
201dcd8: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201dcdc: b1 30 a0 08 srl %g2, 8, %i0
201dce0: f0 29 20 32 stb %i0, [ %g4 + 0x32 ]
201dce4: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
201dce8: c4 29 20 33 stb %g2, [ %g4 + 0x33 ]
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
201dcec: c4 06 60 04 ld [ %i1 + 4 ], %g2
201dcf0: c8 06 60 20 ld [ %i1 + 0x20 ], %g4
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
201dcf4: f0 00 a0 0c ld [ %g2 + 0xc ], %i0
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201dcf8: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
201dcfc: 87 31 20 18 srl %g4, 0x18, %g3
201dd00: c6 2e 20 34 stb %g3, [ %i0 + 0x34 ]
201dd04: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
201dd08: b1 31 20 10 srl %g4, 0x10, %i0
201dd0c: f0 28 e0 35 stb %i0, [ %g3 + 0x35 ]
201dd10: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
201dd14: b1 31 20 08 srl %g4, 8, %i0
201dd18: f0 28 e0 36 stb %i0, [ %g3 + 0x36 ]
201dd1c: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
201dd20: c8 28 e0 37 stb %g4, [ %g3 + 0x37 ]
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201dd24: d2 06 60 04 ld [ %i1 + 4 ], %o1
201dd28: 7f ff cc a1 call 2010fac <rtems_rfs_inode_unload>
201dd2c: c2 28 a0 10 stb %g1, [ %g2 + 0x10 ]
if (brc > 0)
rc = brc;
map->dirty = false;
201dd30: c0 2e 40 00 clrb [ %i1 ]
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
201dd34: 82 38 00 08 xnor %g0, %o0, %g1
201dd38: 83 38 60 1f sra %g1, 0x1f, %g1
201dd3c: 10 bf ff 9c b 201dbac <rtems_rfs_block_map_close+0x3c>
201dd40: b0 0a 00 01 and %o0, %g1, %i0
0201dd44 <rtems_rfs_block_map_find>:
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
int rc = 0;
*block = 0;
201dd44: c0 22 c0 00 clr [ %o3 ]
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201dd48: c2 02 80 00 ld [ %o2 ], %g1
201dd4c: 80 a0 60 00 cmp %g1, 0
201dd50: 02 80 00 07 be 201dd6c <rtems_rfs_block_map_find+0x28> <== ALWAYS TAKEN
201dd54: c4 02 60 08 ld [ %o1 + 8 ], %g2
201dd58: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201dd5c: 32 80 00 05 bne,a 201dd70 <rtems_rfs_block_map_find+0x2c><== NOT EXECUTED
201dd60: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
201dd64: 81 c3 e0 08 retl
201dd68: 90 10 20 06 mov 6, %o0
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201dd6c: 80 a0 40 02 cmp %g1, %g2
201dd70: 1a bf ff fd bcc 201dd64 <rtems_rfs_block_map_find+0x20>
201dd74: 01 00 00 00 nop
201dd78: 82 13 c0 00 mov %o7, %g1
201dd7c: 7f ff fe 6e call 201d734 <rtems_rfs_block_map_find.part.2>
201dd80: 9e 10 40 00 mov %g1, %o7
0201d734 <rtems_rfs_block_map_find.part.2>:
return 0;
}
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
201d734: 9d e3 bf 98 save %sp, -104, %sp
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
201d738: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
201d73c: e0 06 80 00 ld [ %i2 ], %l0
201d740: 80 a4 00 01 cmp %l0, %g1
201d744: 02 80 00 2b be 201d7f0 <rtems_rfs_block_map_find.part.2+0xbc><== ALWAYS TAKEN
201d748: ba 10 00 18 mov %i0, %i5
/*
* Determine the type of access we need to perform. If the number of blocks
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
201d74c: e2 06 60 08 ld [ %i1 + 8 ], %l1 <== NOT EXECUTED
201d750: 80 a4 60 05 cmp %l1, 5
201d754: 28 80 00 19 bleu,a 201d7b8 <rtems_rfs_block_map_find.part.2+0x84><== ALWAYS TAKEN
201d758: a0 04 20 08 add %l0, 8, %l0
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
201d75c: e4 07 60 30 ld [ %i5 + 0x30 ], %l2 <== NOT EXECUTED
201d760: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
201d764: 40 00 53 89 call 2032588 <.urem> <== NOT EXECUTED
201d768: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
201d76c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
201d770: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
201d774: 40 00 52 d9 call 20322d8 <.udiv> <== NOT EXECUTED
201d778: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
201d77c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
singly = bpos->bno / fs->blocks_per_block;
201d780: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
201d784: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
201d788: 08 80 00 3a bleu 201d870 <rtems_rfs_block_map_find.part.2+0x13c><== NOT EXECUTED
201d78c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
201d790: 40 00 53 7e call 2032588 <.urem> <== NOT EXECUTED
201d794: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
201d798: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
201d79c: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED
201d7a0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
201d7a4: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
201d7a8: 0a 80 00 18 bcs 201d808 <rtems_rfs_block_map_find.part.2+0xd4><== NOT EXECUTED
201d7ac: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
201d7b0: 81 c7 e0 08 ret <== NOT EXECUTED
201d7b4: 81 e8 00 00 restore <== NOT EXECUTED
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
{
*block = map->blocks[bpos->bno];
201d7b8: a1 2c 20 02 sll %l0, 2, %l0
201d7bc: a0 06 40 10 add %i1, %l0, %l0
201d7c0: c2 04 20 04 ld [ %l0 + 4 ], %g1
201d7c4: c2 26 c0 00 st %g1, [ %i3 ]
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
201d7c8: c6 06 a0 08 ld [ %i2 + 8 ], %g3
201d7cc: c2 06 a0 04 ld [ %i2 + 4 ], %g1
201d7d0: c4 06 80 00 ld [ %i2 ], %g2
201d7d4: c6 26 60 18 st %g3, [ %i1 + 0x18 ]
201d7d8: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
201d7dc: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
map->bpos.block = *block;
201d7e0: c2 06 c0 00 ld [ %i3 ], %g1
201d7e4: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
}
return rc;
}
201d7e8: 81 c7 e0 08 ret
201d7ec: 91 e8 20 00 restore %g0, 0, %o0
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
201d7f0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
201d7f4: 80 a0 60 00 cmp %g1, 0
201d7f8: 22 bf ff d6 be,a 201d750 <rtems_rfs_block_map_find.part.2+0x1c><== ALWAYS TAKEN
201d7fc: e2 06 60 08 ld [ %i1 + 8 ], %l1
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
{
*block = map->blocks[bpos->bno];
201d800: 10 bf ff f2 b 201d7c8 <rtems_rfs_block_map_find.part.2+0x94><== NOT EXECUTED
201d804: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
/*
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
201d808: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
201d80c: 40 00 52 b3 call 20322d8 <.udiv> <== NOT EXECUTED
201d810: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
singly %= fs->blocks_per_block;
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
201d814: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201d818: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201d81c: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201d820: e2 00 60 04 ld [ %g1 + 4 ], %l1 <== NOT EXECUTED
201d824: a4 06 60 44 add %i1, 0x44, %l2 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
201d828: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d82c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
201d830: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
201d834: 40 00 04 26 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201d838: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
201d83c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d840: 14 bf ff dc bg 201d7b0 <rtems_rfs_block_map_find.part.2+0x7c><== NOT EXECUTED
201d844: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d848: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
201d84c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
201d850: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
201d854: 7f ff ff 8f call 201d690 <rtems_rfs_block_find_indirect.part.1><== NOT EXECUTED
201d858: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
201d85c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d860: 12 bf ff d4 bne 201d7b0 <rtems_rfs_block_map_find.part.2+0x7c><== NOT EXECUTED
201d864: e0 07 bf fc ld [ %fp + -4 ], %l0 <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
201d868: 10 80 00 07 b 201d884 <rtems_rfs_block_map_find.part.2+0x150><== NOT EXECUTED
201d86c: a2 06 60 38 add %i1, 0x38, %l1 <== NOT EXECUTED
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
201d870: a6 02 20 08 add %o0, 8, %l3 <== NOT EXECUTED
201d874: a7 2c e0 02 sll %l3, 2, %l3 <== NOT EXECUTED
201d878: a6 06 40 13 add %i1, %l3, %l3 <== NOT EXECUTED
201d87c: e0 04 e0 04 ld [ %l3 + 4 ], %l0 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
{
rc = rtems_rfs_block_find_indirect (fs,
201d880: a2 06 60 38 add %i1, 0x38, %l1 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
201d884: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d888: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201d88c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201d890: 40 00 04 0f call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201d894: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
201d898: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d89c: 14 bf ff c5 bg 201d7b0 <rtems_rfs_block_map_find.part.2+0x7c><== NOT EXECUTED
201d8a0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d8a4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201d8a8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201d8ac: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
201d8b0: 7f ff ff 78 call 201d690 <rtems_rfs_block_find_indirect.part.1><== NOT EXECUTED
201d8b4: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
}
}
}
}
if (rc == 0)
201d8b8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d8bc: 22 bf ff c4 be,a 201d7cc <rtems_rfs_block_map_find.part.2+0x98><== NOT EXECUTED
201d8c0: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
201d8c4: 81 c7 e0 08 ret <== NOT EXECUTED
201d8c8: 81 e8 00 00 restore <== NOT EXECUTED
0201de94 <rtems_rfs_block_map_grow>:
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
201de94: 9d e3 bf 98 save %sp, -104, %sp
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
201de98: 90 10 20 00 clr %o0
201de9c: 13 00 00 08 sethi %hi(0x2000), %o1
201dea0: 7f ff d8 e7 call 201423c <rtems_rfs_trace>
201dea4: ba 10 00 18 mov %i0, %i5
201dea8: 80 8a 20 ff btst 0xff, %o0
201deac: 32 80 00 ce bne,a 201e1e4 <rtems_rfs_block_map_grow+0x350><== NEVER TAKEN
201deb0: d4 06 60 08 ld [ %i1 + 8 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
201deb4: c4 06 60 08 ld [ %i1 + 8 ], %g2
201deb8: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
201debc: 84 06 80 02 add %i2, %g2, %g2
201dec0: 80 a0 80 01 cmp %g2, %g1
201dec4: 1a 80 00 e1 bcc 201e248 <rtems_rfs_block_map_grow+0x3b4> <== NEVER TAKEN
201dec8: b0 10 20 1b mov 0x1b, %i0
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
201decc: 80 a6 a0 00 cmp %i2, 0
201ded0: 02 80 00 de be 201e248 <rtems_rfs_block_map_grow+0x3b4> <== NEVER TAKEN
201ded4: b0 10 20 00 clr %i0
201ded8: d2 06 60 20 ld [ %i1 + 0x20 ], %o1
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
201dedc: b8 10 20 00 clr %i4
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
201dee0: a2 10 20 01 mov 1, %l1
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
201dee4: aa 06 60 44 add %i1, 0x44, %l5
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201dee8: 10 80 00 11 b 201df2c <rtems_rfs_block_map_grow+0x98>
201deec: a8 06 60 38 add %i1, 0x38, %l4
false, &block);
if (rc > 0)
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
map->blocks[map->size.count] = block;
201def0: 82 06 20 08 add %i0, 8, %g1
201def4: 83 28 60 02 sll %g1, 2, %g1
201def8: 82 06 40 01 add %i1, %g1, %g1
201defc: d2 20 60 04 st %o1, [ %g1 + 4 ]
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
201df00: b0 06 20 01 inc %i0
map->size.offset = 0;
201df04: c0 26 60 0c clr [ %i1 + 0xc ]
if (b == 0)
201df08: 80 a7 20 00 cmp %i4, 0
201df0c: 12 80 00 03 bne 201df18 <rtems_rfs_block_map_grow+0x84> <== NEVER TAKEN
201df10: f0 26 60 08 st %i0, [ %i1 + 8 ]
*new_block = block;
201df14: d2 26 c0 00 st %o1, [ %i3 ]
map->last_data_block = block;
201df18: d2 26 60 20 st %o1, [ %i1 + 0x20 ]
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
201df1c: b8 07 20 01 inc %i4
201df20: 80 a7 00 1a cmp %i4, %i2
201df24: 02 80 00 cb be 201e250 <rtems_rfs_block_map_grow+0x3bc> <== ALWAYS TAKEN
201df28: e2 2e 40 00 stb %l1, [ %i1 ]
/*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
201df2c: 90 10 00 1d mov %i5, %o0
201df30: 94 10 20 00 clr %o2
201df34: 7f ff ca 6b call 20108e0 <rtems_rfs_group_bitmap_alloc>
201df38: 96 07 bf f8 add %fp, -8, %o3
false, &block);
if (rc > 0)
201df3c: b0 92 20 00 orcc %o0, 0, %i0
201df40: 14 80 00 ca bg 201e268 <rtems_rfs_block_map_grow+0x3d4> <== NEVER TAKEN
201df44: 01 00 00 00 nop
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
201df48: f0 06 60 08 ld [ %i1 + 8 ], %i0
201df4c: 80 a6 20 04 cmp %i0, 4
201df50: 08 bf ff e8 bleu 201def0 <rtems_rfs_block_map_grow+0x5c> <== ALWAYS TAKEN
201df54: d2 07 bf f8 ld [ %fp + -8 ], %o1
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
201df58: e4 07 60 30 ld [ %i5 + 0x30 ], %l2 <== NOT EXECUTED
201df5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201df60: 40 00 51 8a call 2032588 <.urem> <== NOT EXECUTED
201df64: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
201df68: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
201df6c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
201df70: 40 00 50 da call 20322d8 <.udiv> <== NOT EXECUTED
201df74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (map->size.count < fs->block_map_singly_blocks)
201df78: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
201df7c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
201df80: 1a 80 00 31 bcc 201e044 <rtems_rfs_block_map_grow+0x1b0> <== NOT EXECUTED
201df84: ac 10 00 08 mov %o0, %l6 <== NOT EXECUTED
* Singly indirect tables are being used. Allocate a new block for a
* mapping table if direct is 0 or we are moving up (upping). If upping
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
201df88: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
201df8c: 02 80 00 06 be 201dfa4 <rtems_rfs_block_map_grow+0x110> <== NOT EXECUTED
201df90: 80 a4 20 05 cmp %l0, 5 <== NOT EXECUTED
201df94: 12 80 00 8a bne 201e1bc <rtems_rfs_block_map_grow+0x328> <== NOT EXECUTED
201df98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201df9c: 12 80 00 89 bne 201e1c0 <rtems_rfs_block_map_grow+0x32c> <== NOT EXECUTED
201dfa0: 82 05 a0 08 add %l6, 8, %g1 <== NOT EXECUTED
{
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
201dfa4: b0 1e 20 05 xor %i0, 5, %i0 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201dfa8: 80 a0 00 18 cmp %g0, %i0 <== NOT EXECUTED
201dfac: 96 05 a0 08 add %l6, 8, %o3 <== NOT EXECUTED
201dfb0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201dfb4: 97 2a e0 02 sll %o3, 2, %o3 <== NOT EXECUTED
201dfb8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201dfbc: 96 06 40 0b add %i1, %o3, %o3 <== NOT EXECUTED
201dfc0: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201dfc4: 96 02 e0 04 add %o3, 4, %o3 <== NOT EXECUTED
201dfc8: 7f ff fd 61 call 201d54c <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
201dfcc: 98 60 3f ff subx %g0, -1, %o4 <== NOT EXECUTED
201dfd0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
201dfd4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201dfd8: 14 80 00 a1 bg 201e25c <rtems_rfs_block_map_grow+0x3c8> <== NOT EXECUTED
201dfdc: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
201dfe0: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201dfe4: c4 0f bf f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED
201dfe8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201dfec: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED
201dff0: c4 28 40 10 stb %g2, [ %g1 + %l0 ] <== NOT EXECUTED
201dff4: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201dff8: c4 17 bf f8 lduh [ %fp + -8 ], %g2 <== NOT EXECUTED
201dffc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e000: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED
201e004: c4 28 60 01 stb %g2, [ %g1 + 1 ] <== NOT EXECUTED
201e008: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201e00c: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
201e010: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e014: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201e018: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED
201e01c: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
201e020: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201e024: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e028: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED
201e02c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
201e030: c2 2c 20 03 stb %g1, [ %l0 + 3 ] <== NOT EXECUTED
201e034: e2 2e 60 38 stb %l1, [ %i1 + 0x38 ] <== NOT EXECUTED
201e038: f0 06 60 08 ld [ %i1 + 8 ], %i0 <== NOT EXECUTED
201e03c: 10 bf ff b1 b 201df00 <rtems_rfs_block_map_grow+0x6c> <== NOT EXECUTED
201e040: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
201e044: 40 00 50 a5 call 20322d8 <.udiv> <== NOT EXECUTED
201e048: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly %= fs->blocks_per_block;
201e04c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
201e050: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
singly %= fs->blocks_per_block;
201e054: 40 00 51 4d call 2032588 <.urem> <== NOT EXECUTED
201e058: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
201e05c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
201e060: 12 80 00 38 bne 201e140 <rtems_rfs_block_map_grow+0x2ac> <== NOT EXECUTED
201e064: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201e068: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e06c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201e070: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201e074: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
201e078: 7f ff fd 35 call 201d54c <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
201e07c: 98 10 20 00 clr %o4 <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
201e080: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201e084: 14 80 00 75 bg 201e258 <rtems_rfs_block_map_grow+0x3c4> <== NOT EXECUTED
201e088: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
/*
* Allocate a new block for a doubly indirect table if singly is 0 as
* it is the first entry of a new singly indirect block.
*/
if ((singly == 0) ||
201e08c: 02 80 00 06 be 201e0a4 <rtems_rfs_block_map_grow+0x210> <== NOT EXECUTED
201e090: 80 a4 a0 05 cmp %l2, 5 <== NOT EXECUTED
201e094: 12 80 00 5a bne 201e1fc <rtems_rfs_block_map_grow+0x368> <== NOT EXECUTED
201e098: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201e09c: 12 80 00 59 bne 201e200 <rtems_rfs_block_map_grow+0x36c> <== NOT EXECUTED
201e0a0: 82 04 e0 08 add %l3, 8, %g1 <== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
201e0a4: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
201e0a8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201e0ac: 96 04 e0 08 add %l3, 8, %o3 <== NOT EXECUTED
*/
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
201e0b0: 82 18 80 01 xor %g2, %g1, %g1 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
201e0b4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
201e0b8: 97 2a e0 02 sll %o3, 2, %o3 <== NOT EXECUTED
201e0bc: 98 60 3f ff subx %g0, -1, %o4 <== NOT EXECUTED
201e0c0: 96 06 40 0b add %i1, %o3, %o3 <== NOT EXECUTED
201e0c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e0c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201e0cc: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
201e0d0: 7f ff fd 1f call 201d54c <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
201e0d4: 96 02 e0 04 add %o3, 4, %o3 <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
201e0d8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201e0dc: 14 80 00 54 bg 201e22c <rtems_rfs_block_map_grow+0x398> <== NOT EXECUTED
201e0e0: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
201e0e4: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201e0e8: c4 0f bf fc ldub [ %fp + -4 ], %g2 <== NOT EXECUTED
201e0ec: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e0f0: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED
201e0f4: c4 28 40 12 stb %g2, [ %g1 + %l2 ] <== NOT EXECUTED
201e0f8: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201e0fc: c4 17 bf fc lduh [ %fp + -4 ], %g2 <== NOT EXECUTED
201e100: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e104: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
201e108: c4 28 60 01 stb %g2, [ %g1 + 1 ] <== NOT EXECUTED
201e10c: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201e110: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
201e114: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e118: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
201e11c: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
201e120: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
201e124: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201e128: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
201e12c: a4 00 40 12 add %g1, %l2, %l2 <== NOT EXECUTED
201e130: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
201e134: c2 2c a0 03 stb %g1, [ %l2 + 3 ] <== NOT EXECUTED
201e138: 10 bf ff aa b 201dfe0 <rtems_rfs_block_map_grow+0x14c> <== NOT EXECUTED
201e13c: e2 2e 60 44 stb %l1, [ %i1 + 0x44 ] <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
201e140: a6 04 e0 08 add %l3, 8, %l3 <== NOT EXECUTED
201e144: a7 2c e0 02 sll %l3, 2, %l3 <== NOT EXECUTED
201e148: a6 06 40 13 add %i1, %l3, %l3 <== NOT EXECUTED
201e14c: d4 04 e0 04 ld [ %l3 + 4 ], %o2 <== NOT EXECUTED
201e150: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e154: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
201e158: 40 00 01 dd call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e15c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
201e160: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201e164: 14 80 00 3d bg 201e258 <rtems_rfs_block_map_grow+0x3c4> <== NOT EXECUTED
201e168: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201e16c: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201e170: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e174: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201e178: c6 08 80 12 ldub [ %g2 + %l2 ], %g3 <== NOT EXECUTED
201e17c: 82 00 80 12 add %g2, %l2, %g1 <== NOT EXECUTED
201e180: d4 08 60 03 ldub [ %g1 + 3 ], %o2 <== NOT EXECUTED
201e184: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
201e188: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201e18c: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201e190: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201e194: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201e198: 94 12 80 03 or %o2, %g3, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e19c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201e1a0: 94 12 80 02 or %o2, %g2, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e1a4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
201e1a8: 94 12 80 01 or %o2, %g1, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e1ac: 40 00 01 c8 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e1b0: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED
201e1b4: 10 bf ff 88 b 201dfd4 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
201e1b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e1bc: 82 05 a0 08 add %l6, 8, %g1 <== NOT EXECUTED
201e1c0: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201e1c4: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201e1c8: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201e1cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e1d0: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
201e1d4: 40 00 01 be call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e1d8: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201e1dc: 10 bf ff 7e b 201dfd4 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
201e1e0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_block_no* new_block)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
201e1e4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201e1e8: 11 00 80 db sethi %hi(0x2036c00), %o0 <== NOT EXECUTED
201e1ec: 40 00 1e d9 call 2025d50 <printf> <== NOT EXECUTED
201e1f0: 90 12 23 80 or %o0, 0x380, %o0 ! 2036f80 <CSWTCH.1+0x94> <== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
201e1f4: 10 bf ff 31 b 201deb8 <rtems_rfs_block_map_grow+0x24> <== NOT EXECUTED
201e1f8: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
201e1fc: 82 04 e0 08 add %l3, 8, %g1 <== NOT EXECUTED
201e200: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201e204: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201e208: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201e20c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e210: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
201e214: 40 00 01 ae call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e218: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
201e21c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201e220: 24 bf ff b2 ble,a 201e0e8 <rtems_rfs_block_map_grow+0x254><== NOT EXECUTED
201e224: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
201e228: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
201e22c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e230: 7f ff ca 39 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201e234: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
201e238: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
201e23c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e240: 7f ff ca 35 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201e244: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
201e248: 81 c7 e0 08 ret <== NOT EXECUTED
201e24c: 81 e8 00 00 restore <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
201e250: 81 c7 e0 08 ret
201e254: 91 e8 20 00 restore %g0, 0, %o0
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, block);
201e258: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
201e25c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e260: 7f ff ca 2d call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201e264: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
201e268: 81 c7 e0 08 ret <== NOT EXECUTED
201e26c: 81 e8 00 00 restore <== NOT EXECUTED
0201d54c <rtems_rfs_block_map_indirect_alloc>:
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
201d54c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc;
/*
* Save the new block locally because upping can have *block pointing to the
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
201d550: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
201d554: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
201d558: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
int rc;
/*
* Save the new block locally because upping can have *block pointing to the
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
201d55c: 94 10 20 00 clr %o2 <== NOT EXECUTED
201d560: 7f ff cc e0 call 20108e0 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
201d564: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
201d568: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d56c: 14 80 00 0c bg 201d59c <rtems_rfs_block_map_indirect_alloc+0x50><== NOT EXECUTED
201d570: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
201d574: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d578: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201d57c: 40 00 04 d4 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201d580: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
201d584: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d588: 04 80 00 07 ble 201d5a4 <rtems_rfs_block_map_indirect_alloc+0x58><== NOT EXECUTED
201d58c: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
201d590: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201d594: 7f ff cd 60 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201d598: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
201d59c: 81 c7 e0 08 ret <== NOT EXECUTED
201d5a0: 81 e8 00 00 restore <== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
201d5a4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
201d5a8: d4 07 60 08 ld [ %i5 + 8 ], %o2 <== NOT EXECUTED
201d5ac: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED
201d5b0: 40 00 21 96 call 2025c08 <memset> <== NOT EXECUTED
201d5b4: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
if (upping)
201d5b8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201d5bc: 12 80 00 08 bne 201d5dc <rtems_rfs_block_map_indirect_alloc+0x90><== NOT EXECUTED
201d5c0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
201d5c4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
201d5c8: c4 2e 80 00 stb %g2, [ %i2 ] <== NOT EXECUTED
*block = new_block;
201d5cc: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
map->last_map_block = new_block;
201d5d0: c2 26 60 1c st %g1, [ %i1 + 0x1c ] <== NOT EXECUTED
return 0;
}
201d5d4: 81 c7 e0 08 ret <== NOT EXECUTED
201d5d8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
201d5dc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201d5e0: 7f ff db 17 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201d5e4: 13 00 00 08 sethi %hi(0x2000), %o1 <== NOT EXECUTED
201d5e8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201d5ec: 32 80 00 24 bne,a 201d67c <rtems_rfs_block_map_indirect_alloc+0x130><== NOT EXECUTED
201d5f0: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
201d5f4: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
201d5f8: 82 10 20 00 clr %g1 <== NOT EXECUTED
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
201d5fc: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
201d600: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201d604: c8 08 a0 24 ldub [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201d608: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201d60c: c8 28 c0 01 stb %g4, [ %g3 + %g1 ] <== NOT EXECUTED
201d610: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201d614: c8 10 a0 24 lduh [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201d618: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201d61c: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED
201d620: c8 28 e0 01 stb %g4, [ %g3 + 1 ] <== NOT EXECUTED
201d624: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201d628: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201d62c: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201d630: 89 31 20 08 srl %g4, 8, %g4 <== NOT EXECUTED
201d634: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED
201d638: c8 28 e0 02 stb %g4, [ %g3 + 2 ] <== NOT EXECUTED
201d63c: c6 06 a0 08 ld [ %i2 + 8 ], %g3 <== NOT EXECUTED
201d640: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4 <== NOT EXECUTED
201d644: c6 00 e0 24 ld [ %g3 + 0x24 ], %g3 <== NOT EXECUTED
201d648: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED
201d64c: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED
201d650: c8 28 e0 03 stb %g4, [ %g3 + 3 ] <== NOT EXECUTED
201d654: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201d658: 80 a0 60 14 cmp %g1, 0x14 <== NOT EXECUTED
201d65c: 12 bf ff e9 bne 201d600 <rtems_rfs_block_map_indirect_alloc+0xb4><== NOT EXECUTED
201d660: fa 2e 80 00 stb %i5, [ %i2 ] <== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
201d664: 90 06 60 24 add %i1, 0x24, %o0 <== NOT EXECUTED
201d668: 92 10 20 00 clr %o1 <== NOT EXECUTED
201d66c: 40 00 21 67 call 2025c08 <memset> <== NOT EXECUTED
201d670: 94 10 20 14 mov 0x14, %o2 <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
201d674: 10 bf ff d4 b 201d5c4 <rtems_rfs_block_map_indirect_alloc+0x78><== NOT EXECUTED
201d678: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
201d67c: 11 00 80 db sethi %hi(0x2036c00), %o0 <== NOT EXECUTED
201d680: 40 00 21 b4 call 2025d50 <printf> <== NOT EXECUTED
201d684: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 2036ef8 <CSWTCH.1+0xc> <== NOT EXECUTED
201d688: 10 bf ff dc b 201d5f8 <rtems_rfs_block_map_indirect_alloc+0xac><== NOT EXECUTED
201d68c: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED
0201d498 <rtems_rfs_block_map_indirect_shrink>:
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
201d498: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
* block to be freed and the indirect block is now also free, or we have only
* one indirect table and we can fit the remaining blocks into the inode,
* then either move to the next indirect block or move the remaining blocks
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
201d49c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
201d4a0: 22 80 00 07 be,a 201d4bc <rtems_rfs_block_map_indirect_shrink+0x24><== NOT EXECUTED
201d4a4: b6 06 e0 08 add %i3, 8, %i3 <== NOT EXECUTED
201d4a8: 80 a7 20 05 cmp %i4, 5 <== NOT EXECUTED
201d4ac: 02 80 00 11 be 201d4f0 <rtems_rfs_block_map_indirect_shrink+0x58><== NOT EXECUTED
201d4b0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
201d4b4: 81 c7 e0 08 ret <== NOT EXECUTED
201d4b8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
201d4bc: b7 2e e0 02 sll %i3, 2, %i3 <== NOT EXECUTED
201d4c0: b6 06 40 1b add %i1, %i3, %i3 <== NOT EXECUTED
201d4c4: f8 06 e0 04 ld [ %i3 + 4 ], %i4 <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
201d4c8: c0 26 e0 04 clr [ %i3 + 4 ] <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
201d4cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201d4d0: 92 10 20 00 clr %o1 <== NOT EXECUTED
201d4d4: 7f ff cd 90 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201d4d8: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
if (rc > 0)
201d4dc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201d4e0: 24 80 00 02 ble,a 201d4e8 <rtems_rfs_block_map_indirect_shrink+0x50><== NOT EXECUTED
201d4e4: f8 26 60 1c st %i4, [ %i1 + 0x1c ] <== NOT EXECUTED
map->last_map_block = block_to_free;
}
return rc;
}
201d4e8: 81 c7 e0 08 ret <== NOT EXECUTED
201d4ec: 81 e8 00 00 restore <== NOT EXECUTED
* block to be freed and the indirect block is now also free, or we have only
* one indirect table and we can fit the remaining blocks into the inode,
* then either move to the next indirect block or move the remaining blocks
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
201d4f0: 12 bf ff f1 bne 201d4b4 <rtems_rfs_block_map_indirect_shrink+0x1c><== NOT EXECUTED
201d4f4: 84 10 20 00 clr %g2 <== NOT EXECUTED
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
201d4f8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED
201d4fc: f8 06 60 24 ld [ %i1 + 0x24 ], %i4 <== NOT EXECUTED
201d500: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
201d504: c8 08 40 00 ldub [ %g1 ], %g4 <== NOT EXECUTED
201d508: da 08 60 01 ldub [ %g1 + 1 ], %o5 <== NOT EXECUTED
201d50c: de 08 60 03 ldub [ %g1 + 3 ], %o7 <== NOT EXECUTED
201d510: f4 08 60 02 ldub [ %g1 + 2 ], %i2 <== NOT EXECUTED
* @param indirect The index index in the inode's block table.
* @param index The index in the indirect table of the block.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
201d514: 86 06 40 02 add %i1, %g2, %g3 <== NOT EXECUTED
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
201d518: 89 29 20 18 sll %g4, 0x18, %g4 <== NOT EXECUTED
201d51c: 9b 2b 60 10 sll %o5, 0x10, %o5 <== NOT EXECUTED
201d520: b5 2e a0 08 sll %i2, 8, %i2 <== NOT EXECUTED
201d524: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED
201d528: 88 11 00 0f or %g4, %o7, %g4 <== NOT EXECUTED
201d52c: 88 11 00 1a or %g4, %i2, %g4 <== NOT EXECUTED
201d530: c8 20 e0 24 st %g4, [ %g3 + 0x24 ] <== NOT EXECUTED
201d534: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201d538: 80 a0 a0 14 cmp %g2, 0x14 <== NOT EXECUTED
201d53c: 12 bf ff f2 bne 201d504 <rtems_rfs_block_map_indirect_shrink+0x6c><== NOT EXECUTED
201d540: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
201d544: 10 bf ff e3 b 201d4d0 <rtems_rfs_block_map_indirect_shrink+0x38><== NOT EXECUTED
201d548: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
0201de2c <rtems_rfs_block_map_next_block>:
int
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
201de2c: 9d e3 bf 90 save %sp, -112, %sp
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
201de30: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
bpos.boff = 0;
201de34: c0 27 bf f8 clr [ %fp + -8 ]
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
201de38: 82 00 60 01 inc %g1
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
int rc = 0;
*block = 0;
201de3c: c0 26 80 00 clr [ %i2 ]
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
201de40: c2 27 bf f4 st %g1, [ %fp + -12 ]
bpos.boff = 0;
bpos.block = 0;
201de44: c0 27 bf fc clr [ %fp + -4 ]
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201de48: 80 a0 60 00 cmp %g1, 0
201de4c: 02 80 00 07 be 201de68 <rtems_rfs_block_map_next_block+0x3c><== NEVER TAKEN
201de50: c6 06 60 08 ld [ %i1 + 8 ], %g3
201de54: 80 a0 e0 00 cmp %g3, 0
201de58: 12 80 00 04 bne 201de68 <rtems_rfs_block_map_next_block+0x3c><== ALWAYS TAKEN
201de5c: 84 10 20 06 mov 6, %g2
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
bpos.boff = 0;
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
}
201de60: 81 c7 e0 08 ret
201de64: 91 e8 00 02 restore %g0, %g2, %o0
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201de68: 80 a0 40 03 cmp %g1, %g3
201de6c: 1a bf ff fd bcc 201de60 <rtems_rfs_block_map_next_block+0x34><== ALWAYS TAKEN
201de70: 84 10 20 06 mov 6, %g2
201de74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201de78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201de7c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
201de80: 7f ff fe 2d call 201d734 <rtems_rfs_block_map_find.part.2><== NOT EXECUTED
201de84: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
201de88: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
bpos.boff = 0;
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
}
201de8c: 81 c7 e0 08 ret <== NOT EXECUTED
201de90: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
0201d9e0 <rtems_rfs_block_map_open>:
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
201d9e0: 9d e3 bf a0 save %sp, -96, %sp
* Set the count to 0 so at least find fails, then open the handle and make
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
201d9e4: c0 2e 80 00 clrb [ %i2 ]
map->inode = NULL;
201d9e8: c0 26 a0 04 clr [ %i2 + 4 ]
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
201d9ec: c0 26 a0 08 clr [ %i2 + 8 ]
size->offset = 0;
201d9f0: c0 26 a0 0c clr [ %i2 + 0xc ]
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
201d9f4: c0 26 a0 10 clr [ %i2 + 0x10 ]
bpos->boff = 0;
201d9f8: c0 26 a0 14 clr [ %i2 + 0x14 ]
bpos->block = 0;
201d9fc: c0 26 a0 18 clr [ %i2 + 0x18 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201da00: c0 2e a0 38 clrb [ %i2 + 0x38 ]
handle->bnum = 0;
201da04: c0 26 a0 3c clr [ %i2 + 0x3c ]
handle->buffer = NULL;
201da08: c0 26 a0 40 clr [ %i2 + 0x40 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201da0c: c0 2e a0 44 clrb [ %i2 + 0x44 ]
handle->bnum = 0;
201da10: c0 26 a0 48 clr [ %i2 + 0x48 ]
handle->buffer = NULL;
201da14: c0 26 a0 4c clr [ %i2 + 0x4c ]
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
201da18: 90 10 00 18 mov %i0, %o0
201da1c: 92 10 00 19 mov %i1, %o1
201da20: 7f ff cc ff call 2010e1c <rtems_rfs_inode_load>
201da24: ba 10 00 1a mov %i2, %i5
if (rc > 0)
201da28: b8 92 20 00 orcc %o0, 0, %i4
201da2c: 14 80 00 42 bg 201db34 <rtems_rfs_block_map_open+0x154> <== NEVER TAKEN
201da30: 82 10 20 01 mov 1, %g1
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
201da34: c8 06 60 0c ld [ %i1 + 0xc ], %g4
201da38: f2 26 a0 04 st %i1, [ %i2 + 4 ]
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201da3c: 84 10 20 00 clr %g2
201da40: b8 01 20 1c add %g4, 0x1c, %i4
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
201da44: 86 07 00 01 add %i4, %g1, %g3
201da48: 96 00 a0 06 add %g2, 6, %o3
201da4c: d8 0f 00 01 ldub [ %i4 + %g1 ], %o4
201da50: de 08 e0 02 ldub [ %g3 + 2 ], %o7
201da54: da 08 e0 01 ldub [ %g3 + 1 ], %o5
201da58: 87 2a e0 02 sll %o3, 2, %g3
201da5c: 86 01 00 03 add %g4, %g3, %g3
201da60: d6 08 e0 04 ldub [ %g3 + 4 ], %o3
201da64: 99 2b 20 10 sll %o4, 0x10, %o4
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
201da68: 86 07 40 01 add %i5, %g1, %g3
201da6c: 97 2a e0 18 sll %o3, 0x18, %o3
201da70: 9b 2b 60 08 sll %o5, 8, %o5
201da74: 9e 13 c0 0b or %o7, %o3, %o7
201da78: 9e 13 c0 0c or %o7, %o4, %o7
201da7c: 9e 13 c0 0d or %o7, %o5, %o7
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
201da80: de 20 e0 23 st %o7, [ %g3 + 0x23 ]
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
201da84: 84 00 a0 01 inc %g2
201da88: 80 a0 a0 05 cmp %g2, 5
201da8c: 12 bf ff ee bne 201da44 <rtems_rfs_block_map_open+0x64>
201da90: 82 00 60 04 add %g1, 4, %g1
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
201da94: c6 09 20 0f ldub [ %g4 + 0xf ], %g3
201da98: c2 09 20 0c ldub [ %g4 + 0xc ], %g1
201da9c: f8 09 20 0d ldub [ %g4 + 0xd ], %i4
201daa0: c4 09 20 0e ldub [ %g4 + 0xe ], %g2
201daa4: b9 2f 20 10 sll %i4, 0x10, %i4
201daa8: 85 28 a0 08 sll %g2, 8, %g2
201daac: 83 28 60 18 sll %g1, 0x18, %g1
201dab0: 82 10 40 1c or %g1, %i4, %g1
201dab4: 82 10 40 03 or %g1, %g3, %g1
201dab8: 82 10 40 02 or %g1, %g2, %g1
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
201dabc: c2 27 60 08 st %g1, [ %i5 + 8 ]
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
201dac0: c4 09 20 0b ldub [ %g4 + 0xb ], %g2
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
201dac4: c2 09 20 0a ldub [ %g4 + 0xa ], %g1
201dac8: 83 28 60 08 sll %g1, 8, %g1
201dacc: 82 10 80 01 or %g2, %g1, %g1
201dad0: c2 27 60 0c st %g1, [ %i5 + 0xc ]
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
201dad4: c6 09 20 33 ldub [ %g4 + 0x33 ], %g3
201dad8: c2 09 20 30 ldub [ %g4 + 0x30 ], %g1
201dadc: f8 09 20 31 ldub [ %g4 + 0x31 ], %i4
201dae0: c4 09 20 32 ldub [ %g4 + 0x32 ], %g2
201dae4: b9 2f 20 10 sll %i4, 0x10, %i4
201dae8: 85 28 a0 08 sll %g2, 8, %g2
201daec: 83 28 60 18 sll %g1, 0x18, %g1
201daf0: 82 10 40 1c or %g1, %i4, %g1
201daf4: 82 10 40 03 or %g1, %g3, %g1
201daf8: 82 10 40 02 or %g1, %g2, %g1
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
201dafc: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
201db00: c2 09 20 34 ldub [ %g4 + 0x34 ], %g1
201db04: c6 09 20 37 ldub [ %g4 + 0x37 ], %g3
201db08: c4 09 20 36 ldub [ %g4 + 0x36 ], %g2
201db0c: f8 09 20 35 ldub [ %g4 + 0x35 ], %i4
201db10: 83 28 60 18 sll %g1, 0x18, %g1
201db14: 89 2f 20 10 sll %i4, 0x10, %g4
201db18: 85 28 a0 08 sll %g2, 8, %g2
201db1c: 82 10 40 04 or %g1, %g4, %g1
201db20: 82 10 40 03 or %g1, %g3, %g1
201db24: 82 10 40 02 or %g1, %g2, %g1
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
201db28: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
rc = rtems_rfs_inode_unload (fs, inode, false);
201db2c: 7f ff cd 20 call 2010fac <rtems_rfs_inode_unload>
201db30: 95 e8 20 00 restore %g0, 0, %o2
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201db34: 92 06 a0 38 add %i2, 0x38, %o1 <== NOT EXECUTED
201db38: 40 00 02 ea call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201db3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201db40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
201db44: c0 2e a0 38 clrb [ %i2 + 0x38 ] <== NOT EXECUTED
handle->bnum = 0;
201db48: c0 26 a0 3c clr [ %i2 + 0x3c ] <== NOT EXECUTED
handle->buffer = NULL;
201db4c: c0 26 a0 40 clr [ %i2 + 0x40 ] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201db50: 92 06 a0 44 add %i2, 0x44, %o1 <== NOT EXECUTED
201db54: 40 00 02 e3 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201db58: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
handle->dirty = false;
201db5c: c0 2e a0 44 clrb [ %i2 + 0x44 ] <== NOT EXECUTED
handle->bnum = 0;
201db60: c0 26 a0 48 clr [ %i2 + 0x48 ] <== NOT EXECUTED
handle->buffer = NULL;
201db64: c0 26 a0 4c clr [ %i2 + 0x4c ] <== NOT EXECUTED
return rc;
}
201db68: 81 c7 e0 08 ret <== NOT EXECUTED
201db6c: 81 e8 00 00 restore <== NOT EXECUTED
0201dd84 <rtems_rfs_block_map_seek>:
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
201dd84: 9d e3 bf 90 save %sp, -112, %sp
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
201dd88: fa 06 20 08 ld [ %i0 + 8 ], %i5
201dd8c: d2 06 60 10 ld [ %i1 + 0x10 ], %o1
201dd90: 40 00 51 18 call 20321f0 <.umul>
201dd94: 90 10 00 1d mov %i5, %o0
201dd98: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
201dd9c: 94 10 20 00 clr %o2
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
201dda0: 90 02 00 01 add %o0, %g1, %o0
static inline void
rtems_rfs_block_add_pos (rtems_rfs_file_system* fs,
rtems_rfs_pos_rel offset,
rtems_rfs_block_pos* bpos)
{
rtems_rfs_block_get_bpos (fs,
201dda4: b6 86 c0 08 addcc %i3, %o0, %i3
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
201dda8: 96 10 00 1d mov %i5, %o3
201ddac: b4 46 a0 00 addx %i2, 0, %i2
201ddb0: 92 10 00 1b mov %i3, %o1
201ddb4: 40 00 54 ad call 2033068 <__udivdi3>
201ddb8: 90 10 00 1a mov %i2, %o0
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
201ddbc: 90 10 00 1a mov %i2, %o0
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
201ddc0: a0 10 00 09 mov %o1, %l0
201ddc4: d2 27 bf f4 st %o1, [ %fp + -12 ]
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
201ddc8: 94 10 20 00 clr %o2
201ddcc: 92 10 00 1b mov %i3, %o1
201ddd0: 40 00 55 7b call 20333bc <__umoddi3>
201ddd4: 96 10 00 1d mov %i5, %o3
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
int rc = 0;
*block = 0;
201ddd8: c0 27 00 00 clr [ %i4 ]
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
201dddc: c0 27 bf fc clr [ %fp + -4 ]
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
201dde0: d2 27 bf f8 st %o1, [ %fp + -8 ]
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201dde4: 80 a4 20 00 cmp %l0, 0
201dde8: 02 80 00 07 be 201de04 <rtems_rfs_block_map_seek+0x80> <== ALWAYS TAKEN
201ddec: c2 06 60 08 ld [ %i1 + 8 ], %g1
201ddf0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ddf4: 12 80 00 04 bne 201de04 <rtems_rfs_block_map_seek+0x80> <== NOT EXECUTED
201ddf8: 90 10 20 06 mov 6, %o0 <== NOT EXECUTED
{
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
}
201ddfc: 81 c7 e0 08 ret
201de00: 91 e8 00 08 restore %g0, %o0, %o0
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
201de04: 80 a0 40 10 cmp %g1, %l0
201de08: 08 bf ff fd bleu 201ddfc <rtems_rfs_block_map_seek+0x78>
201de0c: 90 10 20 06 mov 6, %o0
201de10: 90 10 00 18 mov %i0, %o0
201de14: 92 10 00 19 mov %i1, %o1
201de18: 94 07 bf f4 add %fp, -12, %o2
201de1c: 7f ff fe 46 call 201d734 <rtems_rfs_block_map_find.part.2>
201de20: 96 10 00 1c mov %i4, %o3
{
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
}
201de24: 81 c7 e0 08 ret
201de28: 91 e8 00 08 restore %g0, %o0, %o0
0201e270 <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
201e270: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
201e274: 90 10 20 00 clr %o0
201e278: 13 00 00 10 sethi %hi(0x4000), %o1
201e27c: 7f ff d7 f0 call 201423c <rtems_rfs_trace>
201e280: ba 10 00 18 mov %i0, %i5
201e284: 80 8a 20 ff btst 0xff, %o0
201e288: 32 80 00 a1 bne,a 201e50c <rtems_rfs_block_map_shrink+0x29c><== NEVER TAKEN
201e28c: d4 06 60 08 ld [ %i1 + 8 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
201e290: e6 06 60 08 ld [ %i1 + 8 ], %l3
201e294: 80 a4 e0 00 cmp %l3, 0
201e298: 02 80 00 77 be 201e474 <rtems_rfs_block_map_shrink+0x204> <== ALWAYS TAKEN
201e29c: 90 10 20 00 clr %o0
201e2a0: 80 a6 80 13 cmp %i2, %l3 <== NOT EXECUTED
201e2a4: 38 80 00 02 bgu,a 201e2ac <rtems_rfs_block_map_shrink+0x3c><== NOT EXECUTED
201e2a8: b4 10 00 13 mov %l3, %i2 <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
201e2ac: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201e2b0: 02 80 00 a2 be 201e538 <rtems_rfs_block_map_shrink+0x2c8> <== NOT EXECUTED
201e2b4: a2 06 60 44 add %i1, 0x44, %l1 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e2b8: a0 06 60 38 add %i1, 0x38, %l0 <== NOT EXECUTED
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
201e2bc: 10 80 00 14 b 201e30c <rtems_rfs_block_map_shrink+0x9c> <== NOT EXECUTED
201e2c0: b6 10 20 01 mov 1, %i3 <== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
201e2c4: a7 2c e0 02 sll %l3, 2, %l3 <== NOT EXECUTED
201e2c8: a6 06 40 13 add %i1, %l3, %l3 <== NOT EXECUTED
201e2cc: f8 04 e0 04 ld [ %l3 + 4 ], %i4 <== NOT EXECUTED
map->blocks[block] = 0;
201e2d0: c0 24 e0 04 clr [ %l3 + 4 ] <== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
201e2d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e2d8: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e2dc: 7f ff ca 0e call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201e2e0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
if (rc > 0)
201e2e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e2e8: 14 80 00 63 bg 201e474 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
201e2ec: b4 86 bf ff addcc %i2, -1, %i2 <== NOT EXECUTED
return rc;
map->size.count--;
201e2f0: e6 06 60 08 ld [ %i1 + 8 ], %l3 <== NOT EXECUTED
map->size.offset = 0;
201e2f4: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
201e2f8: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED
map->size.offset = 0;
map->last_data_block = block_to_free;
201e2fc: f8 26 60 20 st %i4, [ %i1 + 0x20 ] <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
201e300: e6 26 60 08 st %l3, [ %i1 + 8 ] <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
201e304: 02 80 00 88 be 201e524 <rtems_rfs_block_map_shrink+0x2b4> <== NOT EXECUTED
201e308: f6 2e 40 00 stb %i3, [ %i1 ] <== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
201e30c: a4 04 ff ff add %l3, -1, %l2 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
201e310: 80 a4 a0 04 cmp %l2, 4 <== NOT EXECUTED
201e314: 28 bf ff ec bleu,a 201e2c4 <rtems_rfs_block_map_shrink+0x54><== NOT EXECUTED
201e318: a6 04 e0 07 add %l3, 7, %l3 <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
201e31c: f8 07 60 30 ld [ %i5 + 0x30 ], %i4 <== NOT EXECUTED
201e320: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
201e324: 40 00 50 99 call 2032588 <.urem> <== NOT EXECUTED
201e328: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
201e32c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
201e330: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
201e334: 40 00 4f e9 call 20322d8 <.udiv> <== NOT EXECUTED
201e338: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
if (block < fs->block_map_singly_blocks)
201e33c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
201e340: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED
201e344: 0a 80 00 4e bcs 201e47c <rtems_rfs_block_map_shrink+0x20c><== NOT EXECUTED
201e348: ac 10 00 08 mov %o0, %l6 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
201e34c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
201e350: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED
201e354: 1a 80 00 75 bcc 201e528 <rtems_rfs_block_map_shrink+0x2b8><== NOT EXECUTED
201e358: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
201e35c: 40 00 4f df call 20322d8 <.udiv> <== NOT EXECUTED
201e360: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
201e364: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201e368: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201e36c: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201e370: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
201e374: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
201e378: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
201e37c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e380: 40 00 01 53 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e384: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
201e388: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e38c: 14 80 00 3a bg 201e474 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
201e390: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
201e394: 40 00 50 7d call 2032588 <.urem> <== NOT EXECUTED
201e398: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201e39c: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
201e3a0: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED
201e3a4: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
201e3a8: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201e3ac: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201e3b0: c6 08 c0 02 ldub [ %g3 + %g2 ], %g3 <== NOT EXECUTED
201e3b4: e4 08 60 03 ldub [ %g1 + 3 ], %l2 <== NOT EXECUTED
201e3b8: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
201e3bc: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201e3c0: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201e3c4: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201e3c8: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201e3cc: a4 14 80 03 or %l2, %g3, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e3d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201e3d4: a4 14 80 02 or %l2, %g2, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e3d8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
201e3dc: a4 14 80 01 or %l2, %g1, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e3e0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
201e3e4: 40 00 01 3a call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e3e8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
singly, true);
if (rc > 0)
201e3ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e3f0: 14 80 00 21 bg 201e474 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
201e3f4: 85 2d 60 02 sll %l5, 2, %g2 <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201e3f8: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201e3fc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
direct);
if (direct == 0)
201e400: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly, true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201e404: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201e408: c6 08 c0 02 ldub [ %g3 + %g2 ], %g3 <== NOT EXECUTED
201e40c: f8 08 60 03 ldub [ %g1 + 3 ], %i4 <== NOT EXECUTED
201e410: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
201e414: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
201e418: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
201e41c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
201e420: b8 17 00 03 or %i4, %g3, %i4 <== NOT EXECUTED
201e424: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201e428: b8 17 00 02 or %i4, %g2, %i4 <== NOT EXECUTED
direct);
if (direct == 0)
201e42c: 12 bf ff aa bne 201e2d4 <rtems_rfs_block_map_shrink+0x64> <== NOT EXECUTED
201e430: b8 17 00 01 or %i4, %g1, %i4 <== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
201e434: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e438: 92 10 20 00 clr %o1 <== NOT EXECUTED
201e43c: 7f ff c9 b6 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
201e440: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
if (rc > 0)
201e444: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e448: 14 80 00 0b bg 201e474 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
201e44c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
return rc;
map->last_map_block = singly;
201e450: e4 26 60 1c st %l2, [ %i1 + 0x1c ] <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
201e454: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e458: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
201e45c: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
201e460: 7f ff fc 0e call 201d498 <rtems_rfs_block_map_indirect_shrink><== NOT EXECUTED
201e464: 98 10 00 14 mov %l4, %o4 <== NOT EXECUTED
doubly, doubly_singly);
if (rc)
201e468: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e46c: 22 bf ff 9b be,a 201e2d8 <rtems_rfs_block_map_shrink+0x68><== NOT EXECUTED
201e470: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
return 0;
}
201e474: 81 c7 e0 08 ret
201e478: 91 e8 00 08 restore %g0, %o0, %o0
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
201e47c: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
201e480: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
201e484: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
201e488: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
201e48c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201e490: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
201e494: 40 00 01 0e call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
201e498: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
201e49c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e4a0: 14 bf ff f5 bg 201e474 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
201e4a4: 85 2d 60 02 sll %l5, 2, %g2 <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201e4a8: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
201e4ac: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
201e4b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201e4b4: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
201e4b8: e6 08 c0 02 ldub [ %g3 + %g2 ], %l3 <== NOT EXECUTED
201e4bc: f8 08 60 01 ldub [ %g1 + 1 ], %i4 <== NOT EXECUTED
201e4c0: e4 08 60 02 ldub [ %g1 + 2 ], %l2 <== NOT EXECUTED
201e4c4: e8 08 60 03 ldub [ %g1 + 3 ], %l4 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
201e4c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201e4cc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201e4d0: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
201e4d4: 7f ff fb f1 call 201d498 <rtems_rfs_block_map_indirect_shrink><== NOT EXECUTED
201e4d8: 98 10 00 15 mov %l5, %o4 <== NOT EXECUTED
singly, direct);
if (rc)
201e4dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201e4e0: 12 bf ff e5 bne 201e474 <rtems_rfs_block_map_shrink+0x204><== NOT EXECUTED
201e4e4: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
201e4e8: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED
201e4ec: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
201e4f0: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED
201e4f4: b9 2f 20 10 sll %i4, 0x10, %i4 <== NOT EXECUTED
201e4f8: a4 0c a0 ff and %l2, 0xff, %l2 <== NOT EXECUTED
201e4fc: b8 14 c0 1c or %l3, %i4, %i4 <== NOT EXECUTED
201e500: a5 2c a0 08 sll %l2, 8, %l2 <== NOT EXECUTED
201e504: 10 bf ff 74 b 201e2d4 <rtems_rfs_block_map_shrink+0x64> <== NOT EXECUTED
201e508: b8 17 00 12 or %i4, %l2, %i4 <== NOT EXECUTED
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
201e50c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201e510: 11 00 80 db sethi %hi(0x2036c00), %o0 <== NOT EXECUTED
201e514: 40 00 1e 0f call 2025d50 <printf> <== NOT EXECUTED
201e518: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 2036fb8 <CSWTCH.1+0xcc> <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
201e51c: 10 bf ff 5e b 201e294 <rtems_rfs_block_map_shrink+0x24> <== NOT EXECUTED
201e520: e6 06 60 08 ld [ %i1 + 8 ], %l3 <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
201e524: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201e528: 32 80 00 05 bne,a 201e53c <rtems_rfs_block_map_shrink+0x2cc><== NOT EXECUTED
201e52c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
{
map->last_map_block = 0;
201e530: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED
map->last_data_block = 0;
201e534: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
201e538: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
201e53c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201e540: 12 80 00 0f bne 201e57c <rtems_rfs_block_map_shrink+0x30c><== NOT EXECUTED
201e544: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
201e548: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
201e54c: 28 80 00 0f bleu,a 201e588 <rtems_rfs_block_map_shrink+0x318><== NOT EXECUTED
201e550: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201e554: 84 04 ff ff add %l3, -1, %g2 <== NOT EXECUTED
201e558: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201e55c: 12 bf ff c6 bne 201e474 <rtems_rfs_block_map_shrink+0x204><== NOT EXECUTED
201e560: 90 10 20 00 clr %o0 <== NOT EXECUTED
201e564: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201e568: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 <== NOT EXECUTED
201e56c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201e570: 38 80 00 07 bgu,a 201e58c <rtems_rfs_block_map_shrink+0x31c><== NOT EXECUTED
201e574: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
201e578: 30 bf ff bf b,a 201e474 <rtems_rfs_block_map_shrink+0x204><== NOT EXECUTED
201e57c: 12 bf ff f4 bne 201e54c <rtems_rfs_block_map_shrink+0x2dc><== NOT EXECUTED
201e580: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
201e584: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
201e588: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
201e58c: c2 26 60 14 st %g1, [ %i1 + 0x14 ] <== NOT EXECUTED
201e590: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
201e594: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201e598: 02 bf ff b7 be 201e474 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
201e59c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201e5a0: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED
201e5a4: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
return 0;
}
201e5a8: 81 c7 e0 08 ret <== NOT EXECUTED
201e5ac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02024bb8 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
2024bb8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
2024bbc: 90 10 20 00 clr %o0
2024bc0: 7f ff bd 9f call 201423c <rtems_rfs_trace>
2024bc4: 92 10 20 40 mov 0x40, %o1
2024bc8: 80 8a 20 ff btst 0xff, %o0
2024bcc: 02 80 00 0b be 2024bf8 <rtems_rfs_buffer_bdbuf_release+0x40><== ALWAYS TAKEN
2024bd0: 80 a6 60 00 cmp %i1, 0
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
2024bd4: 17 00 80 d4 sethi %hi(0x2035000), %o3 <== NOT EXECUTED
2024bd8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED
2024bdc: d4 06 20 20 ld [ %i0 + 0x20 ], %o2 <== NOT EXECUTED
2024be0: 12 80 00 16 bne 2024c38 <rtems_rfs_buffer_bdbuf_release+0x80><== NOT EXECUTED
2024be4: 96 12 e2 a8 or %o3, 0x2a8, %o3 <== NOT EXECUTED
2024be8: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
2024bec: 40 00 04 59 call 2025d50 <printf> <== NOT EXECUTED
2024bf0: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 20386f0 <status_code_to_errno+0x124><== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
2024bf4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2024bf8: 02 80 00 09 be 2024c1c <rtems_rfs_buffer_bdbuf_release+0x64>
2024bfc: 90 10 00 18 mov %i0, %o0
sc = rtems_bdbuf_release_modified (buffer);
2024c00: 7f ff c8 a3 call 2016e8c <rtems_bdbuf_release_modified>
2024c04: 01 00 00 00 nop
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
2024c08: 80 a0 00 08 cmp %g0, %o0
2024c0c: b0 60 20 00 subx %g0, 0, %i0
#endif
rc = EIO;
}
return rc;
}
2024c10: b0 0e 20 05 and %i0, 5, %i0
2024c14: 81 c7 e0 08 ret
2024c18: 81 e8 00 00 restore
buffer->block, modified ? "(modified)" : "");
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
2024c1c: 7f ff c8 46 call 2016d34 <rtems_bdbuf_release>
2024c20: 01 00 00 00 nop
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
2024c24: 80 a0 00 08 cmp %g0, %o0
2024c28: b0 60 20 00 subx %g0, 0, %i0
#endif
rc = EIO;
}
return rc;
}
2024c2c: b0 0e 20 05 and %i0, 5, %i0
2024c30: 81 c7 e0 08 ret
2024c34: 81 e8 00 00 restore
{
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
2024c38: 17 00 80 e1 sethi %hi(0x2038400), %o3 <== NOT EXECUTED
2024c3c: 10 bf ff eb b 2024be8 <rtems_rfs_buffer_bdbuf_release+0x30><== NOT EXECUTED
2024c40: 96 12 e2 e0 or %o3, 0x2e0, %o3 ! 20386e0 <status_code_to_errno+0x114><== NOT EXECUTED
0201f094 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
201f094: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
201f098: 90 10 20 00 clr %o0
201f09c: 92 10 20 10 mov 0x10, %o1
201f0a0: 7f ff d4 67 call 201423c <rtems_rfs_trace>
201f0a4: ba 10 00 18 mov %i0, %i5
201f0a8: 80 8a 20 ff btst 0xff, %o0
201f0ac: 12 80 00 1d bne 201f120 <rtems_rfs_buffer_close+0x8c> <== NEVER TAKEN
201f0b0: 11 00 80 dd sethi %hi(0x2037400), %o0
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
201f0b4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201f0b8: 90 10 00 1d mov %i5, %o0
201f0bc: 7f ff ff 30 call 201ed7c <rtems_rfs_buffer_setblksize>
201f0c0: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
201f0c4: b0 92 20 00 orcc %o0, 0, %i0
201f0c8: 04 80 00 07 ble 201f0e4 <rtems_rfs_buffer_close+0x50> <== ALWAYS TAKEN
201f0cc: 90 10 20 00 clr %o0
201f0d0: 7f ff d4 5b call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f0d4: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED
201f0d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f0dc: 12 80 00 06 bne 201f0f4 <rtems_rfs_buffer_close+0x60> <== NOT EXECUTED
201f0e0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
201f0e4: 7f ff 98 17 call 2005140 <rtems_disk_release>
201f0e8: d0 07 60 0c ld [ %i5 + 0xc ], %o0
rc, strerror (rc));
}
#endif
return rc;
}
201f0ec: 81 c7 e0 08 ret
201f0f0: 81 e8 00 00 restore
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
201f0f4: 40 00 1e bd call 2026be8 <strerror> <== NOT EXECUTED
201f0f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f0fc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
201f100: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f104: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f108: 40 00 1b 12 call 2025d50 <printf> <== NOT EXECUTED
201f10c: 90 12 20 88 or %o0, 0x88, %o0 ! 2037488 <CSWTCH.1+0x59c> <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
201f110: 7f ff 98 0c call 2005140 <rtems_disk_release> <== NOT EXECUTED
201f114: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
rc, strerror (rc));
}
#endif
return rc;
}
201f118: 81 c7 e0 08 ret <== NOT EXECUTED
201f11c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: closing\n");
201f120: 40 00 1b 4d call 2025e54 <puts> <== NOT EXECUTED
201f124: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
201f128: 10 bf ff e4 b 201f0b8 <rtems_rfs_buffer_close+0x24> <== NOT EXECUTED
201f12c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
0201e6e0 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
201e6e0: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
201e6e4: c2 06 60 08 ld [ %i1 + 8 ], %g1
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
201e6e8: ba 10 00 18 mov %i0, %i5
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
201e6ec: 80 a0 60 00 cmp %g1, 0
201e6f0: 02 80 00 13 be 201e73c <rtems_rfs_buffer_handle_release+0x5c>
201e6f4: b0 10 20 00 clr %i0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
201e6f8: 90 10 20 00 clr %o0
201e6fc: 7f ff d6 d0 call 201423c <rtems_rfs_trace>
201e700: 92 10 22 00 mov 0x200, %o1
201e704: 80 8a 20 ff btst 0xff, %o0
201e708: 32 80 00 0f bne,a 201e744 <rtems_rfs_buffer_handle_release+0x64><== NEVER TAKEN
201e70c: c2 0e 40 00 ldub [ %i1 ], %g1 <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
201e710: d0 06 60 08 ld [ %i1 + 8 ], %o0
201e714: f8 02 20 38 ld [ %o0 + 0x38 ], %i4
201e718: 80 a7 20 00 cmp %i4, 0
201e71c: 04 80 00 05 ble 201e730 <rtems_rfs_buffer_handle_release+0x50><== NEVER TAKEN
201e720: 01 00 00 00 nop
rtems_rfs_buffer_refs_down (handle);
201e724: b8 07 3f ff add %i4, -1, %i4
201e728: f8 22 20 38 st %i4, [ %o0 + 0x38 ]
if (rtems_rfs_buffer_refs (handle) == 0)
201e72c: 80 a7 20 00 cmp %i4, 0
201e730: 02 80 00 19 be 201e794 <rtems_rfs_buffer_handle_release+0xb4>
201e734: b0 10 20 00 clr %i0
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
201e738: c0 26 60 08 clr [ %i1 + 8 ]
}
return rc;
}
201e73c: 81 c7 e0 08 ret
201e740: 81 e8 00 00 restore
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
201e744: 15 00 80 d4 sethi %hi(0x2035000), %o2 <== NOT EXECUTED
201e748: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED
201e74c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201e750: 02 80 00 04 be 201e760 <rtems_rfs_buffer_handle_release+0x80><== NOT EXECUTED
201e754: 94 12 a2 a8 or %o2, 0x2a8, %o2 <== NOT EXECUTED
201e758: 15 00 80 dc sethi %hi(0x2037000), %o2 <== NOT EXECUTED
201e75c: 94 12 a0 58 or %o2, 0x58, %o2 ! 2037058 <CSWTCH.1+0x16c> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
201e760: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
201e764: 19 00 80 d4 sethi %hi(0x2035000), %o4 <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
201e768: d6 00 60 38 ld [ %g1 + 0x38 ], %o3 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
201e76c: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
201e770: 12 80 00 04 bne 201e780 <rtems_rfs_buffer_handle_release+0xa0><== NOT EXECUTED
201e774: 98 13 22 a8 or %o4, 0x2a8, %o4 <== NOT EXECUTED
201e778: 19 00 80 dc sethi %hi(0x2037000), %o4 <== NOT EXECUTED
201e77c: 98 13 20 60 or %o4, 0x60, %o4 ! 2037060 <CSWTCH.1+0x174> <== NOT EXECUTED
201e780: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201e784: 40 00 1d 73 call 2025d50 <printf> <== NOT EXECUTED
201e788: 90 12 20 70 or %o0, 0x70, %o0 ! 2037070 <CSWTCH.1+0x184> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
201e78c: 10 bf ff e2 b 201e714 <rtems_rfs_buffer_handle_release+0x34><== NOT EXECUTED
201e790: d0 06 60 08 ld [ %i1 + 8 ], %o0 <== NOT EXECUTED
201e794: 7f ff b5 d1 call 200bed8 <_Chain_Extract>
201e798: 01 00 00 00 nop
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
201e79c: c4 07 60 4c ld [ %i5 + 0x4c ], %g2
if (rtems_rfs_fs_no_local_cache (fs))
201e7a0: c2 07 40 00 ld [ %i5 ], %g1
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
201e7a4: 84 00 bf ff add %g2, -1, %g2
if (rtems_rfs_fs_no_local_cache (fs))
201e7a8: 80 88 60 02 btst 2, %g1
201e7ac: 12 80 00 15 bne 201e800 <rtems_rfs_buffer_handle_release+0x120>
201e7b0: c4 27 60 4c st %g2, [ %i5 + 0x4c ]
* head.
*
* This code stops a large series of transactions causing all the
* buffers in the cache being held in queues of this file system.
*/
if ((fs->release_count +
201e7b4: c6 07 60 6c ld [ %i5 + 0x6c ], %g3
201e7b8: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
201e7bc: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
201e7c0: 84 00 c0 02 add %g3, %g2, %g2
201e7c4: 80 a0 80 01 cmp %g2, %g1
201e7c8: 1a 80 00 1d bcc 201e83c <rtems_rfs_buffer_handle_release+0x15c><== NEVER TAKEN
201e7cc: b0 10 00 1c mov %i4, %i0
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
201e7d0: c2 0e 40 00 ldub [ %i1 ], %g1
201e7d4: 80 a0 60 00 cmp %g1, 0
201e7d8: 02 80 00 11 be 201e81c <rtems_rfs_buffer_handle_release+0x13c>
201e7dc: d2 06 60 08 ld [ %i1 + 8 ], %o1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
201e7e0: 7f ff b5 b3 call 200beac <_Chain_Append>
201e7e4: 90 07 60 60 add %i5, 0x60, %o0
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
201e7e8: c2 07 60 6c ld [ %i5 + 0x6c ], %g1
201e7ec: 82 00 60 01 inc %g1
201e7f0: c2 27 60 6c st %g1, [ %i5 + 0x6c ]
201e7f4: c0 26 60 08 clr [ %i1 + 8 ]
201e7f8: 81 c7 e0 08 ret
201e7fc: 81 e8 00 00 restore
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
201e800: d0 06 60 08 ld [ %i1 + 8 ], %o0
rc = rtems_rfs_buffer_io_release (handle->buffer,
201e804: d2 0e 40 00 ldub [ %i1 ], %o1
201e808: 40 00 18 ec call 2024bb8 <rtems_rfs_buffer_bdbuf_release>
201e80c: c0 22 20 3c clr [ %o0 + 0x3c ]
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
201e810: c0 26 60 08 clr [ %i1 + 8 ]
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (handle->buffer,
201e814: 81 c7 e0 08 ret
201e818: 91 e8 00 08 restore %g0, %o0, %o0
201e81c: 7f ff b5 a4 call 200beac <_Chain_Append>
201e820: 90 07 60 50 add %i5, 0x50, %o0
fs->release_modified_count++;
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
201e824: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
201e828: 82 00 60 01 inc %g1
201e82c: c2 27 60 5c st %g1, [ %i5 + 0x5c ]
201e830: c0 26 60 08 clr [ %i1 + 8 ]
201e834: 81 c7 e0 08 ret
201e838: 81 e8 00 00 restore
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
201e83c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201e840: 7f ff d6 7f call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201e844: 92 10 22 00 mov 0x200, %o1 <== NOT EXECUTED
201e848: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201e84c: 32 80 00 19 bne,a 201e8b0 <rtems_rfs_buffer_handle_release+0x1d0><== NOT EXECUTED
201e850: d2 07 60 6c ld [ %i5 + 0x6c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
201e854: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
201e858: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED
201e85c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201e860: 08 80 00 0d bleu 201e894 <rtems_rfs_buffer_handle_release+0x1b4><== NOT EXECUTED
201e864: 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 );
201e868: 7f ff b5 a5 call 200befc <_Chain_Get> <== NOT EXECUTED
201e86c: 90 07 60 50 add %i5, 0x50, %o0 <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
201e870: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
modified = false;
201e874: 92 10 20 00 clr %o1 <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
201e878: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
201e87c: c2 27 60 5c st %g1, [ %i5 + 0x5c ] <== NOT EXECUTED
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
modified = true;
}
buffer->user = (void*) 0;
201e880: c0 22 20 3c clr [ %o0 + 0x3c ] <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
201e884: 40 00 18 cd call 2024bb8 <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
201e888: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED
201e88c: 10 bf ff d1 b 201e7d0 <rtems_rfs_buffer_handle_release+0xf0><== NOT EXECUTED
201e890: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
201e894: 7f ff b5 9a call 200befc <_Chain_Get> <== NOT EXECUTED
201e898: 90 07 60 60 add %i5, 0x60, %o0 <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
201e89c: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED
modified = true;
201e8a0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
201e8a4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
201e8a8: 10 bf ff f6 b 201e880 <rtems_rfs_buffer_handle_release+0x1a0><== NOT EXECUTED
201e8ac: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
201e8b0: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
201e8b4: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201e8b8: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
201e8bc: 40 00 1d 25 call 2025d50 <printf> <== NOT EXECUTED
201e8c0: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
201e8c4: 10 bf ff e5 b 201e858 <rtems_rfs_buffer_handle_release+0x178><== NOT EXECUTED
201e8c8: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
0201e8cc <rtems_rfs_buffer_handle_request>:
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
201e8cc: 9d e3 bf a0 save %sp, -96, %sp
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
201e8d0: c2 06 60 08 ld [ %i1 + 8 ], %g1
201e8d4: 80 a0 60 00 cmp %g1, 0
201e8d8: 02 80 00 18 be 201e938 <rtems_rfs_buffer_handle_request+0x6c>
201e8dc: ba 10 00 18 mov %i0, %i5
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
201e8e0: 80 a6 a0 00 cmp %i2, 0
201e8e4: 02 80 00 07 be 201e900 <rtems_rfs_buffer_handle_request+0x34><== NEVER TAKEN
201e8e8: 90 10 20 00 clr %o0
201e8ec: c2 06 60 04 ld [ %i1 + 4 ], %g1
201e8f0: 80 a0 40 1a cmp %g1, %i2
201e8f4: 02 80 00 0e be 201e92c <rtems_rfs_buffer_handle_request+0x60>
201e8f8: b0 10 20 00 clr %i0
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201e8fc: 90 10 20 00 clr %o0
201e900: 7f ff d6 4f call 201423c <rtems_rfs_trace>
201e904: 92 10 21 00 mov 0x100, %o1
201e908: 80 8a 20 ff btst 0xff, %o0
201e90c: 32 80 00 3e bne,a 201ea04 <rtems_rfs_buffer_handle_request+0x138><== NEVER TAKEN
201e910: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
201e914: 90 10 00 1d mov %i5, %o0
201e918: 7f ff ff 72 call 201e6e0 <rtems_rfs_buffer_handle_release>
201e91c: 92 10 00 19 mov %i1, %o1
if (rc > 0)
201e920: b0 92 20 00 orcc %o0, 0, %i0
201e924: 24 80 00 04 ble,a 201e934 <rtems_rfs_buffer_handle_request+0x68><== ALWAYS TAKEN
201e928: c0 2e 40 00 clrb [ %i1 ]
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
201e92c: 81 c7 e0 08 ret
201e930: 81 e8 00 00 restore
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
handle->bnum = 0;
201e934: c0 26 60 04 clr [ %i1 + 4 ]
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201e938: 90 10 20 00 clr %o0
201e93c: 7f ff d6 40 call 201423c <rtems_rfs_trace>
201e940: 92 10 21 00 mov 0x100, %o1
201e944: 80 8a 20 ff btst 0xff, %o0
201e948: 32 80 00 5d bne,a 201eabc <rtems_rfs_buffer_handle_request+0x1f0><== NEVER TAKEN
201e94c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could
* be shared where different parts of the block have separate functions. An
* example is an inode block and the file system needs to handle 2 inodes in
* the same block at the same time.
*/
if (fs->buffers_count)
201e950: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
201e954: 80 a0 60 00 cmp %g1, 0
201e958: 12 80 00 45 bne 201ea6c <rtems_rfs_buffer_handle_request+0x1a0>
201e95c: 90 07 60 40 add %i5, 0x40, %o0
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
201e960: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
201e964: c4 07 40 00 ld [ %i5 ], %g2
201e968: 80 88 a0 02 btst 2, %g2
201e96c: 02 80 00 2b be 201ea18 <rtems_rfs_buffer_handle_request+0x14c>
201e970: 80 a0 60 00 cmp %g1, 0
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
201e974: 02 80 00 58 be 201ead4 <rtems_rfs_buffer_handle_request+0x208><== ALWAYS TAKEN
201e978: 90 10 00 1d mov %i5, %o0
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
201e97c: c4 00 60 38 ld [ %g1 + 0x38 ], %g2
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
201e980: 92 10 00 01 mov %g1, %o1
201e984: 84 00 a0 01 inc %g2
201e988: 90 07 60 40 add %i5, 0x40, %o0
201e98c: 7f ff b5 48 call 200beac <_Chain_Append>
201e990: c4 20 60 38 st %g2, [ %g1 + 0x38 ]
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
201e994: c4 07 60 4c ld [ %i5 + 0x4c ], %g2
handle->buffer->user = (void*) ((intptr_t) block);
201e998: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
201e99c: 84 00 a0 01 inc %g2
201e9a0: c4 27 60 4c st %g2, [ %i5 + 0x4c ]
handle->buffer->user = (void*) ((intptr_t) block);
201e9a4: f4 20 60 3c st %i2, [ %g1 + 0x3c ]
handle->bnum = block;
201e9a8: f4 26 60 04 st %i2, [ %i1 + 4 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201e9ac: 90 10 20 00 clr %o0
201e9b0: 92 10 21 00 mov 0x100, %o1
201e9b4: 7f ff d6 22 call 201423c <rtems_rfs_trace>
201e9b8: b0 10 20 00 clr %i0
201e9bc: 80 8a 20 ff btst 0xff, %o0
201e9c0: 02 bf ff db be 201e92c <rtems_rfs_buffer_handle_request+0x60><== ALWAYS TAKEN
201e9c4: 15 00 80 dc sethi %hi(0x2037000), %o2
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
201e9c8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201e9cc: 02 80 00 04 be 201e9dc <rtems_rfs_buffer_handle_request+0x110><== NOT EXECUTED
201e9d0: 94 12 a0 e0 or %o2, 0xe0, %o2 <== NOT EXECUTED
201e9d4: 15 00 80 da sethi %hi(0x2036800), %o2 <== NOT EXECUTED
201e9d8: 94 12 a3 00 or %o2, 0x300, %o2 ! 2036b00 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
201e9dc: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
handle->buffer->references);
return 0;
201e9e0: b0 10 20 00 clr %i0 <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
201e9e4: d6 00 60 20 ld [ %g1 + 0x20 ], %o3 <== NOT EXECUTED
201e9e8: d8 00 60 38 ld [ %g1 + 0x38 ], %o4 <== NOT EXECUTED
201e9ec: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201e9f0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201e9f4: 40 00 1c d7 call 2025d50 <printf> <== NOT EXECUTED
201e9f8: 90 12 21 b8 or %o0, 0x1b8, %o0 <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
201e9fc: 81 c7 e0 08 ret <== NOT EXECUTED
201ea00: 81 e8 00 00 restore <== NOT EXECUTED
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
201ea04: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201ea08: 40 00 1c d2 call 2025d50 <printf> <== NOT EXECUTED
201ea0c: 90 12 20 e8 or %o0, 0xe8, %o0 ! 20370e8 <CSWTCH.1+0x1fc> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
201ea10: 10 bf ff c2 b 201e918 <rtems_rfs_buffer_handle_request+0x4c><== NOT EXECUTED
201ea14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
201ea18: 32 bf ff da bne,a 201e980 <rtems_rfs_buffer_handle_request+0xb4>
201ea1c: c4 00 60 38 ld [ %g1 + 0x38 ], %g2
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
201ea20: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
201ea24: 80 a0 60 00 cmp %g1, 0
201ea28: 12 80 00 4b bne 201eb54 <rtems_rfs_buffer_handle_request+0x288>
201ea2c: 90 07 60 50 add %i5, 0x50, %o0
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
201ea30: c2 07 60 6c ld [ %i5 + 0x6c ], %g1
201ea34: 80 a0 60 00 cmp %g1, 0
201ea38: 02 80 00 27 be 201ead4 <rtems_rfs_buffer_handle_request+0x208>
201ea3c: 90 10 00 1d mov %i5, %o0
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
201ea40: 90 07 60 60 add %i5, 0x60, %o0
201ea44: 92 07 60 6c add %i5, 0x6c, %o1
201ea48: 7f ff fe de call 201e5c0 <rtems_rfs_scan_chain>
201ea4c: 94 10 00 1a mov %i2, %o2
201ea50: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
201ea54: 80 a2 20 00 cmp %o0, 0
201ea58: 02 80 00 1e be 201ead0 <rtems_rfs_buffer_handle_request+0x204>
201ea5c: 82 10 00 08 mov %o0, %g1
rtems_rfs_buffer_mark_dirty (handle);
201ea60: 84 10 20 01 mov 1, %g2
201ea64: 10 bf ff c6 b 201e97c <rtems_rfs_buffer_handle_request+0xb0>
201ea68: c4 2e 40 00 stb %g2, [ %i1 ]
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
201ea6c: 92 07 60 4c add %i5, 0x4c, %o1
201ea70: 7f ff fe d4 call 201e5c0 <rtems_rfs_scan_chain>
201ea74: 94 10 00 1a mov %i2, %o2
201ea78: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
201ea7c: 80 a2 20 00 cmp %o0, 0
201ea80: 02 bf ff b9 be 201e964 <rtems_rfs_buffer_handle_request+0x98>
201ea84: 82 10 20 00 clr %g1
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201ea88: 90 10 20 00 clr %o0
201ea8c: 7f ff d5 ec call 201423c <rtems_rfs_trace>
201ea90: 92 10 21 00 mov 0x100, %o1
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
201ea94: 80 8a 20 ff btst 0xff, %o0
201ea98: 02 bf ff b3 be 201e964 <rtems_rfs_buffer_handle_request+0x98><== ALWAYS TAKEN
201ea9c: c2 06 60 08 ld [ %i1 + 8 ], %g1
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
201eaa0: d2 00 60 38 ld [ %g1 + 0x38 ], %o1 <== NOT EXECUTED
201eaa4: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201eaa8: 92 02 60 01 inc %o1 <== NOT EXECUTED
201eaac: 40 00 1c a9 call 2025d50 <printf> <== NOT EXECUTED
201eab0: 90 12 21 48 or %o0, 0x148, %o0 <== NOT EXECUTED
201eab4: 10 bf ff ac b 201e964 <rtems_rfs_buffer_handle_request+0x98><== NOT EXECUTED
201eab8: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
201eabc: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201eac0: 40 00 1c a4 call 2025d50 <printf> <== NOT EXECUTED
201eac4: 90 12 21 20 or %o0, 0x120, %o0 ! 2037120 <CSWTCH.1+0x234> <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could
* be shared where different parts of the block have separate functions. An
* example is an inode block and the file system needs to handle 2 inodes in
* the same block at the same time.
*/
if (fs->buffers_count)
201eac8: 10 bf ff a3 b 201e954 <rtems_rfs_buffer_handle_request+0x88><== NOT EXECUTED
201eacc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
201ead0: 90 10 00 1d mov %i5, %o0
201ead4: 92 10 00 1a mov %i2, %o1
201ead8: 94 10 00 1b mov %i3, %o2
201eadc: 40 00 18 22 call 2024b64 <rtems_rfs_buffer_bdbuf_request>
201eae0: 96 06 60 08 add %i1, 8, %o3
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
201eae4: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
201eae8: b0 10 00 08 mov %o0, %i0
201eaec: c0 20 60 04 clr [ %g1 + 4 ]
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
if (rc > 0)
201eaf0: 80 a2 20 00 cmp %o0, 0
201eaf4: 04 bf ff a2 ble 201e97c <rtems_rfs_buffer_handle_request+0xb0><== ALWAYS TAKEN
201eaf8: c0 20 40 00 clr [ %g1 ]
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
201eafc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201eb00: 7f ff d5 cf call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201eb04: 92 10 21 00 mov 0x100, %o1 <== NOT EXECUTED
201eb08: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201eb0c: 02 bf ff 88 be 201e92c <rtems_rfs_buffer_handle_request+0x60><== NOT EXECUTED
201eb10: 3b 00 80 dc sethi %hi(0x2037000), %i5 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
201eb14: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201eb18: 02 80 00 04 be 201eb28 <rtems_rfs_buffer_handle_request+0x25c><== NOT EXECUTED
201eb1c: ba 17 60 e0 or %i5, 0xe0, %i5 <== NOT EXECUTED
201eb20: 3b 00 80 da sethi %hi(0x2036800), %i5 <== NOT EXECUTED
201eb24: ba 17 63 00 or %i5, 0x300, %i5 ! 2036b00 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
201eb28: 40 00 20 30 call 2026be8 <strerror> <== NOT EXECUTED
201eb2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201eb30: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201eb34: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
201eb38: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
201eb3c: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201eb40: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
201eb44: 40 00 1c 83 call 2025d50 <printf> <== NOT EXECUTED
201eb48: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED
201eb4c: 81 c7 e0 08 ret <== NOT EXECUTED
201eb50: 81 e8 00 00 restore <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
201eb54: 92 07 60 5c add %i5, 0x5c, %o1
201eb58: 7f ff fe 9a call 201e5c0 <rtems_rfs_scan_chain>
201eb5c: 94 10 00 1a mov %i2, %o2
201eb60: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
201eb64: 80 a2 20 00 cmp %o0, 0
201eb68: 12 bf ff 85 bne 201e97c <rtems_rfs_buffer_handle_request+0xb0>
201eb6c: 82 10 00 08 mov %o0, %g1
201eb70: 10 bf ff b1 b 201ea34 <rtems_rfs_buffer_handle_request+0x168>
201eb74: c2 07 60 6c ld [ %i5 + 0x6c ], %g1
0201eb78 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
201eb78: 9d e3 bf 58 save %sp, -168, %sp
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201eb7c: 90 10 20 00 clr %o0
201eb80: 92 10 20 20 mov 0x20, %o1
201eb84: 7f ff d5 ae call 201423c <rtems_rfs_trace>
201eb88: ba 10 00 18 mov %i0, %i5
201eb8c: 80 8a 20 ff btst 0xff, %o0
201eb90: 12 80 00 17 bne 201ebec <rtems_rfs_buffer_open+0x74> <== NEVER TAKEN
201eb94: 92 10 00 18 mov %i0, %o1
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
201eb98: 90 10 00 1d mov %i5, %o0
201eb9c: 7f ff a5 14 call 2007fec <stat>
201eba0: 92 07 bf b8 add %fp, -72, %o1
201eba4: 80 a2 20 00 cmp %o0, 0
201eba8: 06 80 00 1b bl 201ec14 <rtems_rfs_buffer_open+0x9c> <== NEVER TAKEN
201ebac: 90 10 20 00 clr %o0
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
201ebb0: c4 07 bf c4 ld [ %fp + -60 ], %g2
201ebb4: 03 00 00 3c sethi %hi(0xf000), %g1
201ebb8: 84 08 80 01 and %g2, %g1, %g2
201ebbc: 03 00 00 18 sethi %hi(0x6000), %g1
201ebc0: 80 a0 80 01 cmp %g2, %g1
201ebc4: 02 80 00 25 be 201ec58 <rtems_rfs_buffer_open+0xe0> <== ALWAYS TAKEN
201ebc8: 92 10 20 08 mov 8, %o1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
201ebcc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201ebd0: 7f ff d5 9b call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ebd4: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201ebd8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ebdc: 12 80 00 32 bne 201eca4 <rtems_rfs_buffer_open+0x12c> <== NOT EXECUTED
201ebe0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
201ebe4: 81 c7 e0 08 ret
201ebe8: 81 e8 00 00 restore
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
201ebec: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201ebf0: 40 00 1c 58 call 2025d50 <printf> <== NOT EXECUTED
201ebf4: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 20371f8 <CSWTCH.1+0x30c> <== NOT EXECUTED
if (stat (name, &st) < 0)
201ebf8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ebfc: 7f ff a4 fc call 2007fec <stat> <== NOT EXECUTED
201ec00: 92 07 bf b8 add %fp, -72, %o1 <== NOT EXECUTED
201ec04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201ec08: 16 bf ff eb bge 201ebb4 <rtems_rfs_buffer_open+0x3c> <== NOT EXECUTED
201ec0c: c4 07 bf c4 ld [ %fp + -60 ], %g2 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
201ec10: 90 10 20 00 clr %o0 <== NOT EXECUTED
201ec14: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
201ec18: 7f ff d5 89 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ec1c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
201ec20: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ec24: 02 80 00 2d be 201ecd8 <rtems_rfs_buffer_open+0x160> <== NOT EXECUTED
201ec28: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
201ec2c: 40 00 18 e1 call 2024fb0 <__errno> <== NOT EXECUTED
201ec30: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
201ec34: 40 00 1f ed call 2026be8 <strerror> <== NOT EXECUTED
201ec38: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
201ec3c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201ec40: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201ec44: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201ec48: 40 00 1c 42 call 2025d50 <printf> <== NOT EXECUTED
201ec4c: 90 12 22 20 or %o0, 0x220, %o0 ! 2037220 <CSWTCH.1+0x334> <== NOT EXECUTED
201ec50: 81 c7 e0 08 ret <== NOT EXECUTED
201ec54: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
201ec58: 7f ff 98 d2 call 2004fa0 <rtems_disk_obtain>
201ec5c: d0 1f bf d0 ldd [ %fp + -48 ], %o0
201ec60: d0 26 60 0c st %o0, [ %i1 + 0xc ]
if (!fs->disk)
201ec64: 80 a2 20 00 cmp %o0, 0
201ec68: 02 80 00 14 be 201ecb8 <rtems_rfs_buffer_open+0x140> <== NEVER TAKEN
201ec6c: 90 10 20 00 clr %o0
}
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201ec70: 92 10 20 20 mov 0x20, %o1
201ec74: 7f ff d5 72 call 201423c <rtems_rfs_trace>
201ec78: b0 10 20 00 clr %i0
201ec7c: 80 8a 20 ff btst 0xff, %o0
201ec80: 02 bf ff d9 be 201ebe4 <rtems_rfs_buffer_open+0x6c> <== ALWAYS TAKEN
201ec84: 11 00 80 dc sethi %hi(0x2037000), %o0
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
201ec88: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
201ec8c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
201ec90: d4 00 60 24 ld [ %g1 + 0x24 ], %o2 <== NOT EXECUTED
201ec94: 40 00 1c 2f call 2025d50 <printf> <== NOT EXECUTED
201ec98: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
201ec9c: 81 c7 e0 08 ret <== NOT EXECUTED
201eca0: 81 e8 00 00 restore <== NOT EXECUTED
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
201eca4: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201eca8: 40 00 1c 2a call 2025d50 <printf> <== NOT EXECUTED
201ecac: 90 12 22 50 or %o0, 0x250, %o0 ! 2037250 <CSWTCH.1+0x364> <== NOT EXECUTED
201ecb0: 81 c7 e0 08 ret <== NOT EXECUTED
201ecb4: 81 e8 00 00 restore <== NOT EXECUTED
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
if (!fs->disk)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
201ecb8: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
201ecbc: 7f ff d5 60 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ecc0: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201ecc4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ecc8: 02 bf ff c7 be 201ebe4 <rtems_rfs_buffer_open+0x6c> <== NOT EXECUTED
201eccc: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
201ecd0: 40 00 1c 61 call 2025e54 <puts> <== NOT EXECUTED
201ecd4: 90 12 22 88 or %o0, 0x288, %o0 ! 2037288 <CSWTCH.1+0x39c> <== NOT EXECUTED
201ecd8: 81 c7 e0 08 ret <== NOT EXECUTED
201ecdc: 81 e8 00 00 restore <== NOT EXECUTED
0201ed7c <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
201ed7c: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201ed80: 90 10 20 00 clr %o0
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
201ed84: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201ed88: 7f ff d5 2d call 201423c <rtems_rfs_trace>
201ed8c: 92 10 24 00 mov 0x400, %o1
201ed90: 80 8a 20 ff btst 0xff, %o0
201ed94: 32 80 00 9f bne,a 201f010 <rtems_rfs_buffer_setblksize+0x294><== NEVER TAKEN
201ed98: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 <== NOT EXECUTED
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
201ed9c: 90 10 20 00 clr %o0
201eda0: 7f ff d5 27 call 201423c <rtems_rfs_trace>
201eda4: 92 10 20 40 mov 0x40, %o1
201eda8: 80 8a 20 ff btst 0xff, %o0
201edac: 32 80 00 a3 bne,a 201f038 <rtems_rfs_buffer_setblksize+0x2bc><== NEVER TAKEN
201edb0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201edb4: 90 10 20 00 clr %o0
201edb8: 92 10 20 80 mov 0x80, %o1
201edbc: 7f ff d5 20 call 201423c <rtems_rfs_trace>
201edc0: ba 06 20 50 add %i0, 0x50, %i5
201edc4: 80 8a 20 ff btst 0xff, %o0
201edc8: 12 80 00 62 bne 201ef50 <rtems_rfs_buffer_setblksize+0x1d4><== NEVER TAKEN
201edcc: b8 06 20 5c add %i0, 0x5c, %i4
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201edd0: b4 10 20 00 clr %i2
201edd4: b6 07 60 04 add %i5, 4, %i3
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201edd8: c2 07 40 00 ld [ %i5 ], %g1
201eddc: 80 a0 40 1b cmp %g1, %i3
201ede0: 02 80 00 14 be 201ee30 <rtems_rfs_buffer_setblksize+0xb4>
201ede4: 90 10 00 1d mov %i5, %o0
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
201ede8: 7f ff b4 45 call 200befc <_Chain_Get>
201edec: 01 00 00 00 nop
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201edf0: c2 07 00 00 ld [ %i4 ], %g1
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201edf4: 92 10 20 00 clr %o1
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201edf8: 82 00 7f ff add %g1, -1, %g1
201edfc: c2 27 00 00 st %g1, [ %i4 ]
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201ee00: 40 00 17 6e call 2024bb8 <rtems_rfs_buffer_bdbuf_release>
201ee04: c0 22 20 3c clr [ %o0 + 0x3c ]
if ((rc > 0) && (rrc == 0))
201ee08: 80 a2 20 00 cmp %o0, 0
201ee0c: 04 bf ff f4 ble 201eddc <rtems_rfs_buffer_setblksize+0x60><== ALWAYS TAKEN
201ee10: c2 07 40 00 ld [ %i5 ], %g1
201ee14: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201ee18: 12 bf ff f1 bne 201eddc <rtems_rfs_buffer_setblksize+0x60><== NOT EXECUTED
201ee1c: 01 00 00 00 nop <== NOT EXECUTED
201ee20: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201ee24: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201ee28: 12 bf ff f0 bne 201ede8 <rtems_rfs_buffer_setblksize+0x6c><== NOT EXECUTED
201ee2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201ee30: 90 10 20 00 clr %o0
201ee34: 92 10 20 80 mov 0x80, %o1
201ee38: 7f ff d5 01 call 201423c <rtems_rfs_trace>
201ee3c: ba 06 20 60 add %i0, 0x60, %i5
201ee40: 80 8a 20 ff btst 0xff, %o0
201ee44: 12 80 00 3d bne 201ef38 <rtems_rfs_buffer_setblksize+0x1bc><== NEVER TAKEN
201ee48: b8 06 20 6c add %i0, 0x6c, %i4
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201ee4c: b6 10 20 00 clr %i3
201ee50: b2 07 60 04 add %i5, 4, %i1
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201ee54: c2 07 40 00 ld [ %i5 ], %g1
201ee58: 80 a0 40 19 cmp %g1, %i1
201ee5c: 02 80 00 14 be 201eeac <rtems_rfs_buffer_setblksize+0x130><== ALWAYS TAKEN
201ee60: 90 10 00 1d mov %i5, %o0
201ee64: 7f ff b4 26 call 200befc <_Chain_Get> <== NOT EXECUTED
201ee68: 01 00 00 00 nop <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201ee6c: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201ee70: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201ee74: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
201ee78: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201ee7c: 40 00 17 4f call 2024bb8 <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
201ee80: c0 22 20 3c clr [ %o0 + 0x3c ] <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
201ee84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201ee88: 04 bf ff f4 ble 201ee58 <rtems_rfs_buffer_setblksize+0xdc><== NOT EXECUTED
201ee8c: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
201ee90: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201ee94: 12 bf ff f1 bne 201ee58 <rtems_rfs_buffer_setblksize+0xdc><== NOT EXECUTED
201ee98: 01 00 00 00 nop <== NOT EXECUTED
201ee9c: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201eea0: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED
201eea4: 12 bf ff f0 bne 201ee64 <rtems_rfs_buffer_setblksize+0xe8><== NOT EXECUTED
201eea8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
201eeac: 80 a6 e0 00 cmp %i3, 0
201eeb0: 04 80 00 2e ble 201ef68 <rtems_rfs_buffer_setblksize+0x1ec><== ALWAYS TAKEN
201eeb4: 80 a6 a0 00 cmp %i2, 0
201eeb8: 12 80 00 2c bne 201ef68 <rtems_rfs_buffer_setblksize+0x1ec><== NOT EXECUTED
201eebc: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201eec0: 7f ff d4 df call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201eec4: 92 10 24 00 mov 0x400, %o1 <== NOT EXECUTED
201eec8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201eecc: 12 80 00 62 bne 201f054 <rtems_rfs_buffer_setblksize+0x2d8><== NOT EXECUTED
201eed0: 01 00 00 00 nop <== NOT EXECUTED
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201eed4: 90 10 20 00 clr %o0 ! 0 <PROM_START> <== NOT EXECUTED
201eed8: 7f ff d4 d9 call 201423c <rtems_rfs_trace>
201eedc: 92 10 20 20 mov 0x20, %o1
201eee0: 80 8a 20 ff btst 0xff, %o0
201eee4: 12 80 00 47 bne 201f000 <rtems_rfs_buffer_setblksize+0x284><== NEVER TAKEN
201eee8: 11 00 80 dc sethi %hi(0x2037000), %o0
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201eeec: c2 06 20 0c ld [ %i0 + 0xc ], %g1
201eef0: 7f ff e0 a6 call 2017188 <rtems_bdbuf_syncdev>
201eef4: d0 18 40 00 ldd [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
201eef8: ba 92 20 00 orcc %o0, 0, %i5
201eefc: 12 80 00 1f bne 201ef78 <rtems_rfs_buffer_setblksize+0x1fc><== NEVER TAKEN
201ef00: 90 10 20 00 clr %o0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
201ef04: 7f ff 98 8f call 2005140 <rtems_disk_release>
201ef08: d0 06 20 0c ld [ %i0 + 0xc ], %o0
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
201ef0c: d0 06 20 0c ld [ %i0 + 0xc ], %o0
201ef10: 13 20 01 10 sethi %hi(0x80044000), %o1
201ef14: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
201ef18: 92 12 62 04 or %o1, 0x204, %o1
201ef1c: 9f c0 40 00 call %g1
201ef20: 94 07 a0 48 add %fp, 0x48, %o2
if (rc < 0)
201ef24: b0 92 20 00 orcc %o0, 0, %i0
201ef28: 06 80 00 31 bl 201efec <rtems_rfs_buffer_setblksize+0x270><== NEVER TAKEN
201ef2c: 01 00 00 00 nop
rc = errno;
#endif
return rc;
}
201ef30: 81 c7 e0 08 ret
201ef34: 81 e8 00 00 restore
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
201ef38: d2 06 20 6c ld [ %i0 + 0x6c ], %o1 <== NOT EXECUTED
201ef3c: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201ef40: 40 00 1b 84 call 2025d50 <printf> <== NOT EXECUTED
201ef44: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 20373b8 <CSWTCH.1+0x4cc> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201ef48: 10 bf ff c2 b 201ee50 <rtems_rfs_buffer_setblksize+0xd4> <== NOT EXECUTED
201ef4c: b6 10 20 00 clr %i3 <== NOT EXECUTED
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
201ef50: d2 06 20 5c ld [ %i0 + 0x5c ], %o1 <== NOT EXECUTED
201ef54: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201ef58: 40 00 1b 7e call 2025d50 <printf> <== NOT EXECUTED
201ef5c: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 20373b8 <CSWTCH.1+0x4cc> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201ef60: 10 bf ff 9d b 201edd4 <rtems_rfs_buffer_setblksize+0x58> <== NOT EXECUTED
201ef64: b4 10 20 00 clr %i2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201ef68: 02 bf ff dc be 201eed8 <rtems_rfs_buffer_setblksize+0x15c><== ALWAYS TAKEN
201ef6c: 90 10 20 00 clr %o0
201ef70: 10 bf ff d4 b 201eec0 <rtems_rfs_buffer_setblksize+0x144> <== NOT EXECUTED
201ef74: b6 10 00 1a mov %i2, %i3 <== NOT EXECUTED
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201ef78: 7f ff d4 b1 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ef7c: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED
201ef80: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ef84: 12 80 00 3d bne 201f078 <rtems_rfs_buffer_setblksize+0x2fc><== NOT EXECUTED
201ef88: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
201ef8c: 7f ff 98 6d call 2005140 <rtems_disk_release> <== NOT EXECUTED
201ef90: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
201ef94: 90 10 20 00 clr %o0 <== NOT EXECUTED
201ef98: 7f ff d4 a9 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ef9c: 92 10 24 00 mov 0x400, %o1 <== NOT EXECUTED
201efa0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201efa4: 22 bf ff db be,a 201ef10 <rtems_rfs_buffer_setblksize+0x194><== NOT EXECUTED
201efa8: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
201efac: 40 00 1f 0f call 2026be8 <strerror> <== NOT EXECUTED
201efb0: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
201efb4: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
201efb8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201efbc: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201efc0: 40 00 1b 64 call 2025d50 <printf> <== NOT EXECUTED
201efc4: 90 12 20 20 or %o0, 0x20, %o0 ! 2037420 <CSWTCH.1+0x534> <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
201efc8: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED
201efcc: 13 20 01 10 sethi %hi(0x80044000), %o1 <== NOT EXECUTED
201efd0: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
201efd4: 92 12 62 04 or %o1, 0x204, %o1 <== NOT EXECUTED
201efd8: 9f c0 40 00 call %g1 <== NOT EXECUTED
201efdc: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED
if (rc < 0)
201efe0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201efe4: 16 80 00 05 bge 201eff8 <rtems_rfs_buffer_setblksize+0x27c><== NOT EXECUTED
201efe8: 01 00 00 00 nop <== NOT EXECUTED
rc = errno;
201efec: 40 00 17 f1 call 2024fb0 <__errno> <== NOT EXECUTED
201eff0: 01 00 00 00 nop <== NOT EXECUTED
201eff4: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
#endif
return rc;
}
201eff8: 81 c7 e0 08 ret <== NOT EXECUTED
201effc: 81 e8 00 00 restore <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: syncing\n");
201f000: 40 00 1b 95 call 2025e54 <puts> <== NOT EXECUTED
201f004: 90 12 22 e8 or %o0, 0x2e8, %o0 <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201f008: 10 bf ff ba b 201eef0 <rtems_rfs_buffer_setblksize+0x174> <== NOT EXECUTED
201f00c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
201f010: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f014: 40 00 1b 4f call 2025d50 <printf> <== NOT EXECUTED
201f018: 90 12 23 38 or %o0, 0x338, %o0 ! 2037338 <CSWTCH.1+0x44c> <== NOT EXECUTED
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
201f01c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f020: 7f ff d4 87 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f024: 92 10 20 40 mov 0x40, %o1 <== NOT EXECUTED
201f028: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f02c: 22 bf ff 63 be,a 201edb8 <rtems_rfs_buffer_setblksize+0x3c><== NOT EXECUTED
201f030: 90 10 20 00 clr %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
201f034: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED
201f038: d4 06 20 5c ld [ %i0 + 0x5c ], %o2 <== NOT EXECUTED
201f03c: d6 06 20 6c ld [ %i0 + 0x6c ], %o3 <== NOT EXECUTED
201f040: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f044: 40 00 1b 43 call 2025d50 <printf> <== NOT EXECUTED
201f048: 90 12 23 68 or %o0, 0x368, %o0 ! 2037368 <CSWTCH.1+0x47c> <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201f04c: 10 bf ff 5b b 201edb8 <rtems_rfs_buffer_setblksize+0x3c> <== NOT EXECUTED
201f050: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
201f054: 40 00 1e e5 call 2026be8 <strerror> <== NOT EXECUTED
201f058: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201f05c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201f060: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f064: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f068: 40 00 1b 3a call 2025d50 <printf> <== NOT EXECUTED
201f06c: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 20373e0 <CSWTCH.1+0x4f4> <== NOT EXECUTED
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201f070: 10 bf ff 9a b 201eed8 <rtems_rfs_buffer_setblksize+0x15c> <== NOT EXECUTED
201f074: 90 10 20 00 clr %o0 <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
201f078: 7f ff 9c 2f call 2006134 <rtems_status_text> <== NOT EXECUTED
201f07c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201f080: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201f084: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f088: 40 00 1b 32 call 2025d50 <printf> <== NOT EXECUTED
201f08c: 90 12 23 08 or %o0, 0x308, %o0 ! 2037308 <CSWTCH.1+0x41c> <== NOT EXECUTED
201f090: 30 bf ff bf b,a 201ef8c <rtems_rfs_buffer_setblksize+0x210><== NOT EXECUTED
0201ece0 <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
201ece0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201ece4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201ece8: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED
201ecec: 7f ff d5 54 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ecf0: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
201ecf4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ecf8: 12 80 00 1d bne 201ed6c <rtems_rfs_buffer_sync+0x8c> <== NOT EXECUTED
201ecfc: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201ed00: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
201ed04: b0 10 20 00 clr %i0 <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201ed08: 7f ff e1 20 call 2017188 <rtems_bdbuf_syncdev> <== NOT EXECUTED
201ed0c: d0 18 40 00 ldd [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
201ed10: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
201ed14: 12 80 00 06 bne 201ed2c <rtems_rfs_buffer_sync+0x4c> <== NOT EXECUTED
201ed18: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
201ed1c: 7f ff 99 09 call 2005140 <rtems_disk_release> <== NOT EXECUTED
201ed20: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
201ed24: 81 c7 e0 08 ret <== NOT EXECUTED
201ed28: 81 e8 00 00 restore <== NOT EXECUTED
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
201ed2c: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED
201ed30: 7f ff d5 43 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ed34: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
201ed38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ed3c: 02 bf ff f8 be 201ed1c <rtems_rfs_buffer_sync+0x3c> <== NOT EXECUTED
201ed40: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
201ed44: 7f ff 9c fc call 2006134 <rtems_status_text> <== NOT EXECUTED
201ed48: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201ed4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201ed50: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201ed54: 40 00 1b ff call 2025d50 <printf> <== NOT EXECUTED
201ed58: 90 12 23 08 or %o0, 0x308, %o0 ! 2037308 <CSWTCH.1+0x41c> <== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
201ed5c: 7f ff 98 f9 call 2005140 <rtems_disk_release> <== NOT EXECUTED
201ed60: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
201ed64: 81 c7 e0 08 ret <== NOT EXECUTED
201ed68: 81 e8 00 00 restore <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: syncing\n");
201ed6c: 40 00 1c 3a call 2025e54 <puts> <== NOT EXECUTED
201ed70: 90 12 22 e8 or %o0, 0x2e8, %o0 <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
201ed74: 10 bf ff e4 b 201ed04 <rtems_rfs_buffer_sync+0x24> <== NOT EXECUTED
201ed78: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
0201f130 <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
201f130: 9d e3 bf a0 save %sp, -96, %sp
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
201f134: 90 10 20 00 clr %o0
201f138: 7f ff d4 41 call 201423c <rtems_rfs_trace>
201f13c: 92 10 20 40 mov 0x40, %o1
201f140: 80 8a 20 ff btst 0xff, %o0
201f144: 32 80 00 55 bne,a 201f298 <rtems_rfs_buffers_release+0x168><== NEVER TAKEN
201f148: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201f14c: 90 10 20 00 clr %o0
201f150: 92 10 20 80 mov 0x80, %o1
201f154: 7f ff d4 3a call 201423c <rtems_rfs_trace>
201f158: ba 06 20 50 add %i0, 0x50, %i5
201f15c: 80 8a 20 ff btst 0xff, %o0
201f160: 12 80 00 46 bne 201f278 <rtems_rfs_buffers_release+0x148> <== NEVER TAKEN
201f164: b8 06 20 5c add %i0, 0x5c, %i4
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201f168: b4 10 20 00 clr %i2
201f16c: b6 07 60 04 add %i5, 4, %i3
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201f170: c2 07 40 00 ld [ %i5 ], %g1
201f174: 80 a0 40 1b cmp %g1, %i3
201f178: 02 80 00 14 be 201f1c8 <rtems_rfs_buffers_release+0x98>
201f17c: 90 10 00 1d mov %i5, %o0
201f180: 7f ff b3 5f call 200befc <_Chain_Get>
201f184: 01 00 00 00 nop
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201f188: c2 07 00 00 ld [ %i4 ], %g1
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201f18c: 92 10 20 00 clr %o1
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201f190: 82 00 7f ff add %g1, -1, %g1
201f194: c2 27 00 00 st %g1, [ %i4 ]
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201f198: 40 00 16 88 call 2024bb8 <rtems_rfs_buffer_bdbuf_release>
201f19c: c0 22 20 3c clr [ %o0 + 0x3c ]
if ((rc > 0) && (rrc == 0))
201f1a0: 80 a2 20 00 cmp %o0, 0
201f1a4: 04 bf ff f4 ble 201f174 <rtems_rfs_buffers_release+0x44> <== ALWAYS TAKEN
201f1a8: c2 07 40 00 ld [ %i5 ], %g1
201f1ac: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
201f1b0: 12 bf ff f1 bne 201f174 <rtems_rfs_buffers_release+0x44> <== NOT EXECUTED
201f1b4: 01 00 00 00 nop <== NOT EXECUTED
201f1b8: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201f1bc: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201f1c0: 12 bf ff f0 bne 201f180 <rtems_rfs_buffers_release+0x50> <== NOT EXECUTED
201f1c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201f1c8: 90 10 20 00 clr %o0
201f1cc: 92 10 20 80 mov 0x80, %o1
201f1d0: 7f ff d4 1b call 201423c <rtems_rfs_trace>
201f1d4: ba 06 20 60 add %i0, 0x60, %i5
201f1d8: 80 8a 20 ff btst 0xff, %o0
201f1dc: 12 80 00 21 bne 201f260 <rtems_rfs_buffers_release+0x130> <== NEVER TAKEN
201f1e0: b8 06 20 6c add %i0, 0x6c, %i4
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201f1e4: b0 10 20 00 clr %i0
201f1e8: b6 07 60 04 add %i5, 4, %i3
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201f1ec: c2 07 40 00 ld [ %i5 ], %g1
201f1f0: 80 a0 40 1b cmp %g1, %i3
201f1f4: 02 80 00 14 be 201f244 <rtems_rfs_buffers_release+0x114>
201f1f8: 90 10 00 1d mov %i5, %o0
201f1fc: 7f ff b3 40 call 200befc <_Chain_Get>
201f200: 01 00 00 00 nop
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201f204: c2 07 00 00 ld [ %i4 ], %g1
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201f208: 92 10 20 01 mov 1, %o1
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
201f20c: 82 00 7f ff add %g1, -1, %g1
201f210: c2 27 00 00 st %g1, [ %i4 ]
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
201f214: 40 00 16 69 call 2024bb8 <rtems_rfs_buffer_bdbuf_release>
201f218: c0 22 20 3c clr [ %o0 + 0x3c ]
if ((rc > 0) && (rrc == 0))
201f21c: 80 a2 20 00 cmp %o0, 0
201f220: 04 bf ff f4 ble 201f1f0 <rtems_rfs_buffers_release+0xc0> <== ALWAYS TAKEN
201f224: c2 07 40 00 ld [ %i5 ], %g1
201f228: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201f22c: 12 bf ff f1 bne 201f1f0 <rtems_rfs_buffers_release+0xc0> <== NOT EXECUTED
201f230: 01 00 00 00 nop <== NOT EXECUTED
201f234: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
201f238: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
201f23c: 12 bf ff f0 bne 201f1fc <rtems_rfs_buffers_release+0xcc> <== NOT EXECUTED
201f240: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
201f244: 80 a6 20 00 cmp %i0, 0
201f248: 04 80 00 12 ble 201f290 <rtems_rfs_buffers_release+0x160> <== ALWAYS TAKEN
201f24c: 80 a6 a0 00 cmp %i2, 0
201f250: 12 80 00 10 bne 201f290 <rtems_rfs_buffers_release+0x160> <== NOT EXECUTED
201f254: 01 00 00 00 nop <== NOT EXECUTED
rrc = rc;
return rrc;
}
201f258: 81 c7 e0 08 ret <== NOT EXECUTED
201f25c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
201f260: d2 06 20 6c ld [ %i0 + 0x6c ], %o1 <== NOT EXECUTED
201f264: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f268: 40 00 1a ba call 2025d50 <printf> <== NOT EXECUTED
201f26c: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 20373b8 <CSWTCH.1+0x4cc> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201f270: 10 bf ff de b 201f1e8 <rtems_rfs_buffers_release+0xb8> <== NOT EXECUTED
201f274: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
201f278: d2 06 20 5c ld [ %i0 + 0x5c ], %o1 <== NOT EXECUTED
201f27c: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f280: 40 00 1a b4 call 2025d50 <printf> <== NOT EXECUTED
201f284: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 20373b8 <CSWTCH.1+0x4cc> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
201f288: 10 bf ff b9 b 201f16c <rtems_rfs_buffers_release+0x3c> <== NOT EXECUTED
201f28c: b4 10 20 00 clr %i2 <== NOT EXECUTED
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
201f290: 81 c7 e0 08 ret
201f294: 91 e8 00 1a restore %g0, %i2, %o0
{
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
201f298: d4 06 20 5c ld [ %i0 + 0x5c ], %o2 <== NOT EXECUTED
201f29c: d6 06 20 6c ld [ %i0 + 0x6c ], %o3 <== NOT EXECUTED
201f2a0: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201f2a4: 40 00 1a ab call 2025d50 <printf> <== NOT EXECUTED
201f2a8: 90 12 23 68 or %o0, 0x368, %o0 ! 2037368 <CSWTCH.1+0x47c> <== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201f2ac: 10 bf ff a9 b 201f150 <rtems_rfs_buffers_release+0x20> <== NOT EXECUTED
201f2b0: 90 10 20 00 clr %o0 <== NOT EXECUTED
0201f800 <rtems_rfs_dir_add_entry>:
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
201f800: 9d e3 bf 30 save %sp, -208, %sp
rtems_rfs_block_map map;
rtems_rfs_block_pos bpos;
rtems_rfs_buffer_handle buffer;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201f804: 90 10 20 00 clr %o0
201f808: 13 08 00 00 sethi %hi(0x20000000), %o1
201f80c: 7f ff d2 8c call 201423c <rtems_rfs_trace>
201f810: ba 10 00 18 mov %i0, %i5
201f814: 80 8a 20 ff btst 0xff, %o0
201f818: 32 80 00 84 bne,a 201fa28 <rtems_rfs_dir_add_entry+0x228><== NEVER TAKEN
201f81c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
201f820: 90 10 00 1d mov %i5, %o0
201f824: 92 10 00 19 mov %i1, %o1
201f828: 7f ff f8 6e call 201d9e0 <rtems_rfs_block_map_open>
201f82c: 94 07 bf 94 add %fp, -108, %o2
if (rc > 0)
201f830: b0 92 20 00 orcc %o0, 0, %i0
201f834: 14 80 00 7b bg 201fa20 <rtems_rfs_dir_add_entry+0x220> <== NEVER TAKEN
201f838: 21 00 00 3f sethi %hi(0xfc00), %l0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201f83c: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201f840: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201f844: c0 27 bf f8 clr [ %fp + -8 ]
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
201f848: c0 27 bf e4 clr [ %fp + -28 ]
bpos->boff = 0;
201f84c: c0 27 bf e8 clr [ %fp + -24 ]
bpos->block = 0;
201f850: c0 27 bf ec clr [ %fp + -20 ]
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f854: a0 14 23 ff or %l0, 0x3ff, %l0
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
201f858: a4 06 e0 0a add %i3, 0xa, %l2
/*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
201f85c: 90 10 00 1d mov %i5, %o0
201f860: 92 07 bf 94 add %fp, -108, %o1
201f864: 94 07 bf e4 add %fp, -28, %o2
201f868: 7f ff f9 37 call 201dd44 <rtems_rfs_block_map_find>
201f86c: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
201f870: b0 92 20 00 orcc %o0, 0, %i0
201f874: 04 80 00 b1 ble 201fb38 <rtems_rfs_dir_add_entry+0x338>
201f878: 80 a6 20 06 cmp %i0, 6
{
if (rc != ENXIO)
201f87c: 12 80 00 c2 bne 201fb84 <rtems_rfs_dir_add_entry+0x384> <== NEVER TAKEN
201f880: 90 10 00 1d mov %i5, %o0
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
201f884: 92 07 bf 94 add %fp, -108, %o1
201f888: 94 10 20 01 mov 1, %o2
201f88c: 7f ff f9 82 call 201de94 <rtems_rfs_block_map_grow>
201f890: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
201f894: b0 92 20 00 orcc %o0, 0, %i0
201f898: 14 80 00 cc bg 201fbc8 <rtems_rfs_dir_add_entry+0x3c8> <== NEVER TAKEN
201f89c: a2 10 20 00 clr %l1
}
read = false;
}
bpos.bno++;
201f8a0: c2 07 bf e4 ld [ %fp + -28 ], %g1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
201f8a4: d4 07 bf fc ld [ %fp + -4 ], %o2
}
read = false;
}
bpos.bno++;
201f8a8: 82 00 60 01 inc %g1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
201f8ac: a2 0c 60 ff and %l1, 0xff, %l1
}
read = false;
}
bpos.bno++;
201f8b0: c2 27 bf e4 st %g1, [ %fp + -28 ]
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
201f8b4: 90 10 00 1d mov %i5, %o0
201f8b8: 92 07 bf f0 add %fp, -16, %o1
201f8bc: 7f ff fc 04 call 201e8cc <rtems_rfs_buffer_handle_request>
201f8c0: 96 10 00 11 mov %l1, %o3
if (rc > 0)
201f8c4: b0 92 20 00 orcc %o0, 0, %i0
201f8c8: 14 80 00 9e bg 201fb40 <rtems_rfs_dir_add_entry+0x340> <== NEVER TAKEN
201f8cc: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
201f8d0: 80 a4 60 00 cmp %l1, 0
201f8d4: 02 80 00 68 be 201fa74 <rtems_rfs_dir_add_entry+0x274>
201f8d8: e2 00 60 24 ld [ %g1 + 0x24 ], %l1
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f8dc: da 07 60 08 ld [ %i5 + 8 ], %o5
201f8e0: 9e 83 7f f6 addcc %o5, -10, %o7
201f8e4: 02 bf ff df be 201f860 <rtems_rfs_dir_add_entry+0x60> <== NEVER TAKEN
201f8e8: 90 10 00 1d mov %i5, %o0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201f8ec: c2 0c 60 09 ldub [ %l1 + 9 ], %g1
201f8f0: e8 0c 60 08 ldub [ %l1 + 8 ], %l4
eino = rtems_rfs_dir_entry_ino (entry);
201f8f4: c4 0c 40 00 ldub [ %l1 ], %g2
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201f8f8: a9 2d 20 08 sll %l4, 8, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201f8fc: c8 0c 60 01 ldub [ %l1 + 1 ], %g4
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201f900: a8 15 00 01 or %l4, %g1, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201f904: c6 0c 60 02 ldub [ %l1 + 2 ], %g3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f908: 80 a5 00 10 cmp %l4, %l0
201f90c: 02 80 00 60 be 201fa8c <rtems_rfs_dir_add_entry+0x28c>
201f910: c2 0c 60 03 ldub [ %l1 + 3 ], %g1
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201f914: a6 09 20 ff and %g4, 0xff, %l3
201f918: 86 08 e0 ff and %g3, 0xff, %g3
201f91c: a7 2c e0 10 sll %l3, 0x10, %l3
201f920: 87 28 e0 08 sll %g3, 8, %g3
201f924: 82 08 60 ff and %g1, 0xff, %g1
201f928: a6 14 c0 03 or %l3, %g3, %l3
201f92c: 85 28 a0 18 sll %g2, 0x18, %g2
201f930: a6 14 c0 01 or %l3, %g1, %l3
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
201f934: b0 10 20 00 clr %i0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201f938: 10 80 00 20 b 201f9b8 <rtems_rfs_dir_add_entry+0x1b8>
201f93c: a6 14 c0 02 or %l3, %g2, %l3
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201f940: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201f944: 80 a5 00 01 cmp %l4, %g1
201f948: 1a 80 00 1f bcc 201f9c4 <rtems_rfs_dir_add_entry+0x1c4> <== NEVER TAKEN
201f94c: 80 a4 e0 00 cmp %l3, 0
201f950: 02 80 00 1e be 201f9c8 <rtems_rfs_dir_add_entry+0x1c8> <== NEVER TAKEN
201f954: 90 10 20 00 clr %o0
201f958: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201f95c: 80 a0 40 13 cmp %g1, %l3
201f960: 0a 80 00 1a bcs 201f9c8 <rtems_rfs_dir_add_entry+0x1c8> <== NEVER TAKEN
201f964: 01 00 00 00 nop
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
offset += elength;
201f968: b0 06 00 14 add %i0, %l4, %i0
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f96c: 80 a6 00 0f cmp %i0, %o7
201f970: 1a bf ff bb bcc 201f85c <rtems_rfs_dir_add_entry+0x5c> <== NEVER TAKEN
201f974: 98 10 00 18 mov %i0, %o4
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201f978: e8 0c 60 08 ldub [ %l1 + 8 ], %l4
201f97c: c8 0c 60 09 ldub [ %l1 + 9 ], %g4
eino = rtems_rfs_dir_entry_ino (entry);
201f980: e6 0c 40 00 ldub [ %l1 ], %l3
201f984: c6 0c 60 01 ldub [ %l1 + 1 ], %g3
201f988: c4 0c 60 03 ldub [ %l1 + 3 ], %g2
201f98c: c2 0c 60 02 ldub [ %l1 + 2 ], %g1
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201f990: a9 2d 20 08 sll %l4, 8, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201f994: a7 2c e0 18 sll %l3, 0x18, %l3
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201f998: a8 15 00 04 or %l4, %g4, %l4
eino = rtems_rfs_dir_entry_ino (entry);
201f99c: 87 28 e0 10 sll %g3, 0x10, %g3
201f9a0: 83 28 60 08 sll %g1, 8, %g1
201f9a4: a6 14 c0 03 or %l3, %g3, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f9a8: 80 a5 00 10 cmp %l4, %l0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201f9ac: a6 14 c0 02 or %l3, %g2, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f9b0: 02 80 00 38 be 201fa90 <rtems_rfs_dir_add_entry+0x290>
201f9b4: a6 14 c0 01 or %l3, %g1, %l3
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201f9b8: 80 a5 20 0a cmp %l4, 0xa
201f9bc: 14 bf ff e1 bg 201f940 <rtems_rfs_dir_add_entry+0x140> <== ALWAYS TAKEN
201f9c0: a2 04 40 14 add %l1, %l4, %l1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201f9c4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f9c8: 7f ff d2 1d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f9cc: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201f9d0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f9d4: 02 80 00 0a be 201f9fc <rtems_rfs_dir_add_entry+0x1fc> <== NOT EXECUTED
201f9d8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
201f9dc: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201f9e0: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
201f9e4: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
201f9e8: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED
201f9ec: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
201f9f0: 40 00 18 d8 call 2025d50 <printf> <== NOT EXECUTED
201f9f4: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201f9f8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201f9fc: 7f ff fb 39 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201fa00: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201fa04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201fa08: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201fa0c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201fa10: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201fa14: 92 07 bf 94 add %fp, -108, %o1 <== NOT EXECUTED
201fa18: 7f ff f8 56 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
201fa1c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
return EIO;
201fa20: 81 c7 e0 08 ret <== NOT EXECUTED
201fa24: 81 e8 00 00 restore <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
201fa28: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201fa2c: 40 00 18 c9 call 2025d50 <printf> <== NOT EXECUTED
201fa30: 90 12 23 98 or %o0, 0x398, %o0 ! 2037798 <CSWTCH.1+0x8ac> <== NOT EXECUTED
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
201fa34: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201fa38: 02 80 00 09 be 201fa5c <rtems_rfs_dir_add_entry+0x25c> <== NOT EXECUTED
201fa3c: 82 10 20 00 clr %g1 <== NOT EXECUTED
201fa40: b0 10 20 00 clr %i0 <== NOT EXECUTED
printf ("%c", name[c]);
201fa44: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 <== NOT EXECUTED
201fa48: 40 00 18 d5 call 2025d9c <putchar> <== NOT EXECUTED
201fa4c: b0 06 20 01 inc %i0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
201fa50: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED
201fa54: 12 bf ff fc bne 201fa44 <rtems_rfs_dir_add_entry+0x244> <== NOT EXECUTED
201fa58: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
201fa5c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201fa60: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201fa64: 40 00 18 bb call 2025d50 <printf> <== NOT EXECUTED
201fa68: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 20377c8 <CSWTCH.1+0x8dc> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
201fa6c: 10 bf ff 6e b 201f824 <rtems_rfs_dir_add_entry+0x24> <== NOT EXECUTED
201fa70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
201fa74: d4 07 60 08 ld [ %i5 + 8 ], %o2
201fa78: 90 10 00 11 mov %l1, %o0
201fa7c: 40 00 18 63 call 2025c08 <memset>
201fa80: 92 10 20 ff mov 0xff, %o1
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201fa84: 10 bf ff 97 b 201f8e0 <rtems_rfs_dir_add_entry+0xe0>
201fa88: da 07 60 08 ld [ %i5 + 8 ], %o5
201fa8c: 98 10 20 00 clr %o4
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
201fa90: 9a 23 40 0c sub %o5, %o4, %o5
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
201fa94: 80 a4 80 0d cmp %l2, %o5
201fa98: 3a bf ff 72 bcc,a 201f860 <rtems_rfs_dir_add_entry+0x60> <== NEVER TAKEN
201fa9c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
201faa0: 92 10 00 1b mov %i3, %o1
201faa4: 40 00 14 75 call 2024c78 <rtems_rfs_dir_hash>
201faa8: 90 10 00 1a mov %i2, %o0
rtems_rfs_dir_set_entry_hash (entry, hash);
201faac: 83 32 20 08 srl %o0, 8, %g1
201fab0: c2 2c 60 06 stb %g1, [ %l1 + 6 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
201fab4: 83 37 20 10 srl %i4, 0x10, %g1
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
201fab8: 85 32 20 10 srl %o0, 0x10, %g2
rtems_rfs_dir_set_entry_ino (entry, ino);
201fabc: c2 2c 60 01 stb %g1, [ %l1 + 1 ]
201fac0: 83 37 20 08 srl %i4, 8, %g1
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
201fac4: 87 32 20 18 srl %o0, 0x18, %g3
201fac8: c4 2c 60 05 stb %g2, [ %l1 + 5 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
201facc: c2 2c 60 02 stb %g1, [ %l1 + 2 ]
201fad0: 85 37 20 18 srl %i4, 0x18, %g2
rtems_rfs_dir_set_entry_length (entry,
201fad4: 83 34 a0 08 srl %l2, 8, %g1
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
201fad8: 94 10 00 1b mov %i3, %o2
201fadc: 92 10 00 1a mov %i2, %o1
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
201fae0: c6 2c 60 04 stb %g3, [ %l1 + 4 ]
201fae4: d0 2c 60 07 stb %o0, [ %l1 + 7 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
201fae8: c4 2c 40 00 stb %g2, [ %l1 ]
rtems_rfs_dir_set_entry_length (entry,
201faec: c2 2c 60 08 stb %g1, [ %l1 + 8 ]
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
201faf0: f8 2c 60 03 stb %i4, [ %l1 + 3 ]
rtems_rfs_dir_set_entry_length (entry,
201faf4: e4 2c 60 09 stb %l2, [ %l1 + 9 ]
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
201faf8: 40 00 17 b8 call 20259d8 <memcpy>
201fafc: 90 04 60 0a add %l1, 0xa, %o0
rtems_rfs_buffer_mark_dirty (&buffer);
201fb00: 82 10 20 01 mov 1, %g1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201fb04: 92 07 bf f0 add %fp, -16, %o1
201fb08: 90 10 00 1d mov %i5, %o0
201fb0c: 7f ff fa f5 call 201e6e0 <rtems_rfs_buffer_handle_release>
201fb10: c2 2f bf f0 stb %g1, [ %fp + -16 ]
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201fb14: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
201fb18: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201fb1c: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201fb20: c0 27 bf f8 clr [ %fp + -8 ]
201fb24: 92 07 bf 94 add %fp, -108, %o1
201fb28: 7f ff f8 12 call 201db70 <rtems_rfs_block_map_close>
201fb2c: b0 10 20 00 clr %i0
return 0;
201fb30: 81 c7 e0 08 ret
201fb34: 81 e8 00 00 restore
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
201fb38: 10 bf ff 5a b 201f8a0 <rtems_rfs_dir_add_entry+0xa0>
201fb3c: a2 10 20 01 mov 1, %l1
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201fb40: 90 10 20 00 clr %o0 <== NOT EXECUTED
201fb44: 7f ff d1 be call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201fb48: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201fb4c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fb50: 32 80 00 2f bne,a 201fc0c <rtems_rfs_dir_add_entry+0x40c><== NOT EXECUTED
201fb54: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201fb58: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201fb5c: 7f ff fa e1 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201fb60: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201fb64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201fb68: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201fb6c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201fb70: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201fb74: 7f ff f7 ff call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
201fb78: 92 07 bf 94 add %fp, -108, %o1 <== NOT EXECUTED
return rc;
}
201fb7c: 81 c7 e0 08 ret <== NOT EXECUTED
201fb80: 81 e8 00 00 restore <== NOT EXECUTED
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
if (rc > 0)
{
if (rc != ENXIO)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201fb84: 90 10 20 00 clr %o0 <== NOT EXECUTED
201fb88: 7f ff d1 ad call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201fb8c: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201fb90: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fb94: 22 bf ff f2 be,a 201fb5c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201fb98: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
201fb9c: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201fba0: 40 00 1c 12 call 2026be8 <strerror> <== NOT EXECUTED
201fba4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fba8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201fbac: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201fbb0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201fbb4: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201fbb8: 40 00 18 66 call 2025d50 <printf> <== NOT EXECUTED
201fbbc: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 20377d8 <CSWTCH.1+0x8ec> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201fbc0: 10 bf ff e7 b 201fb5c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201fbc4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
201fbc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
201fbcc: 7f ff d1 9c call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201fbd0: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
201fbd4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fbd8: 22 bf ff e1 be,a 201fb5c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201fbdc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
201fbe0: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201fbe4: 40 00 1c 01 call 2026be8 <strerror> <== NOT EXECUTED
201fbe8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fbec: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201fbf0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201fbf4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201fbf8: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
201fbfc: 40 00 18 55 call 2025d50 <printf> <== NOT EXECUTED
201fc00: 90 12 20 20 or %o0, 0x20, %o0 ! 2037820 <CSWTCH.1+0x934> <== NOT EXECUTED
201fc04: 10 bf ff d6 b 201fb5c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201fc08: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
201fc0c: 40 00 1b f7 call 2026be8 <strerror> <== NOT EXECUTED
201fc10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201fc14: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201fc18: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201fc1c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
201fc20: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
201fc24: 40 00 18 4b call 2025d50 <printf> <== NOT EXECUTED
201fc28: 90 12 20 68 or %o0, 0x68, %o0 ! 2037868 <CSWTCH.1+0x97c> <== NOT EXECUTED
201fc2c: 10 bf ff cc b 201fb5c <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
201fc30: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0201fc34 <rtems_rfs_dir_del_entry>:
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
201fc34: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201fc38: 90 10 20 00 clr %o0
201fc3c: 13 10 00 00 sethi %hi(0x40000000), %o1
201fc40: 7f ff d1 7f call 201423c <rtems_rfs_trace>
201fc44: ba 10 00 18 mov %i0, %i5
201fc48: 80 8a 20 ff btst 0xff, %o0
201fc4c: 12 80 00 0a bne 201fc74 <rtems_rfs_dir_del_entry+0x40> <== NEVER TAKEN
201fc50: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
201fc54: 90 10 00 1d mov %i5, %o0
201fc58: 7f ff f7 62 call 201d9e0 <rtems_rfs_block_map_open>
201fc5c: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
201fc60: b0 92 20 00 orcc %o0, 0, %i0
201fc64: 04 80 00 11 ble 201fca8 <rtems_rfs_dir_del_entry+0x74> <== ALWAYS TAKEN
201fc68: 90 10 00 1d mov %i5, %o0
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201fc6c: 81 c7 e0 08 ret <== NOT EXECUTED
201fc70: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
201fc74: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201fc78: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201fc7c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
201fc80: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
201fc84: 40 00 18 33 call 2025d50 <printf> <== NOT EXECUTED
201fc88: 90 12 20 f8 or %o0, 0xf8, %o0 ! 20378f8 <CSWTCH.1+0xa0c> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
201fc8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201fc90: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201fc94: 7f ff f7 53 call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
201fc98: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201fc9c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
201fca0: 14 bf ff f3 bg 201fc6c <rtems_rfs_dir_del_entry+0x38> <== NOT EXECUTED
201fca4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
201fca8: 92 07 bf a0 add %fp, -96, %o1
201fcac: 94 10 20 00 clr %o2
201fcb0: 96 10 00 1b mov %i3, %o3
201fcb4: 7f ff f8 34 call 201dd84 <rtems_rfs_block_map_seek>
201fcb8: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
201fcbc: b0 92 20 00 orcc %o0, 0, %i0
201fcc0: 04 80 00 09 ble 201fce4 <rtems_rfs_dir_del_entry+0xb0> <== ALWAYS TAKEN
201fcc4: 80 a6 20 06 cmp %i0, 6
{
if (rc == ENXIO)
201fcc8: 22 80 00 02 be,a 201fcd0 <rtems_rfs_dir_del_entry+0x9c> <== NOT EXECUTED
201fccc: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
201fcd0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201fcd4: 7f ff f7 a7 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
201fcd8: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
201fcdc: 81 c7 e0 08 ret <== NOT EXECUTED
201fce0: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
201fce4: 80 a0 00 1b cmp %g0, %i3
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201fce8: 27 00 00 3f sethi %hi(0xfc00), %l3
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201fcec: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201fcf0: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201fcf4: c0 27 bf f8 clr [ %fp + -8 ]
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
201fcf8: a4 60 3f ff subx %g0, -1, %l2
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201fcfc: a6 14 e3 ff or %l3, 0x3ff, %l3
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
201fd00: d4 07 bf fc ld [ %fp + -4 ], %o2
201fd04: 90 10 00 1d mov %i5, %o0
201fd08: 92 07 bf f0 add %fp, -16, %o1
201fd0c: 7f ff fa f0 call 201e8cc <rtems_rfs_buffer_handle_request>
201fd10: 96 10 20 01 mov 1, %o3
if (rc > 0)
201fd14: b0 92 20 00 orcc %o0, 0, %i0
201fd18: 14 80 00 d3 bg 2020064 <rtems_rfs_dir_del_entry+0x430> <== NEVER TAKEN
201fd1c: 82 10 20 00 clr %g1
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
201fd20: ea 07 60 08 ld [ %i5 + 8 ], %l5
201fd24: 80 a4 a0 00 cmp %l2, 0
201fd28: 12 80 00 07 bne 201fd44 <rtems_rfs_dir_del_entry+0x110> <== NEVER TAKEN
201fd2c: b8 10 20 00 clr %i4
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
201fd30: 90 10 00 1b mov %i3, %o0
201fd34: 40 00 4a 15 call 2032588 <.urem>
201fd38: 92 10 00 15 mov %l5, %o1
201fd3c: b8 10 00 08 mov %o0, %i4
201fd40: 82 10 00 08 mov %o0, %g1
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
201fd44: c4 07 bf f8 ld [ %fp + -8 ], %g2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201fd48: 9e 05 7f f6 add %l5, -10, %o7
201fd4c: 80 a0 40 0f cmp %g1, %o7
201fd50: 1a 80 00 4d bcc 201fe84 <rtems_rfs_dir_del_entry+0x250> <== NEVER TAKEN
201fd54: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
201fd58: a8 00 80 01 add %g2, %g1, %l4
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201fd5c: c6 0d 20 09 ldub [ %l4 + 9 ], %g3
201fd60: e0 0d 20 08 ldub [ %l4 + 8 ], %l0
eino = rtems_rfs_dir_entry_ino (entry);
201fd64: c2 08 80 01 ldub [ %g2 + %g1 ], %g1
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201fd68: a1 2c 20 08 sll %l0, 8, %l0
eino = rtems_rfs_dir_entry_ino (entry);
201fd6c: c8 0d 20 02 ldub [ %l4 + 2 ], %g4
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201fd70: a0 14 00 03 or %l0, %g3, %l0
eino = rtems_rfs_dir_entry_ino (entry);
201fd74: c4 0d 20 03 ldub [ %l4 + 3 ], %g2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201fd78: 80 a4 00 13 cmp %l0, %l3
201fd7c: 02 80 00 42 be 201fe84 <rtems_rfs_dir_del_entry+0x250> <== NEVER TAKEN
201fd80: c6 0d 20 01 ldub [ %l4 + 1 ], %g3
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201fd84: a2 09 20 ff and %g4, 0xff, %l1
201fd88: 86 08 e0 ff and %g3, 0xff, %g3
201fd8c: a3 2c 60 08 sll %l1, 8, %l1
201fd90: 87 28 e0 10 sll %g3, 0x10, %g3
201fd94: 84 08 a0 ff and %g2, 0xff, %g2
201fd98: a2 14 40 03 or %l1, %g3, %l1
201fd9c: 83 28 60 18 sll %g1, 0x18, %g1
201fda0: a2 14 40 02 or %l1, %g2, %l1
201fda4: 10 80 00 23 b 201fe30 <rtems_rfs_dir_del_entry+0x1fc>
201fda8: a2 14 40 01 or %l1, %g1, %l1
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201fdac: 80 a4 00 01 cmp %l0, %g1
201fdb0: 1a 80 00 23 bcc 201fe3c <rtems_rfs_dir_del_entry+0x208> <== NEVER TAKEN
201fdb4: 80 a4 60 00 cmp %l1, 0
201fdb8: 02 80 00 22 be 201fe40 <rtems_rfs_dir_del_entry+0x20c> <== NEVER TAKEN
201fdbc: 90 10 20 00 clr %o0
201fdc0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
201fdc4: 80 a0 40 11 cmp %g1, %l1
201fdc8: 0a 80 00 1e bcs 201fe40 <rtems_rfs_dir_del_entry+0x20c> <== NEVER TAKEN
201fdcc: 80 a6 80 11 cmp %i2, %l1
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
201fdd0: 02 80 00 45 be 201fee4 <rtems_rfs_dir_del_entry+0x2b0> <== ALWAYS TAKEN
201fdd4: 80 a4 a0 00 cmp %l2, 0
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
201fdd8: 02 80 00 1f be 201fe54 <rtems_rfs_dir_del_entry+0x220> <== NOT EXECUTED
201fddc: a8 05 00 10 add %l4, %l0, %l4 <== NOT EXECUTED
rc = EIO;
break;
}
entry += elength;
eoffset += elength;
201fde0: b8 07 00 10 add %i4, %l0, %i4 <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201fde4: 80 a7 00 0f cmp %i4, %o7 <== NOT EXECUTED
201fde8: 1a 80 00 28 bcc 201fe88 <rtems_rfs_dir_del_entry+0x254> <== NOT EXECUTED
201fdec: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201fdf0: e0 0d 20 08 ldub [ %l4 + 8 ], %l0 <== NOT EXECUTED
201fdf4: c8 0d 20 09 ldub [ %l4 + 9 ], %g4 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201fdf8: e2 0d 00 00 ldub [ %l4 ], %l1 <== NOT EXECUTED
201fdfc: c6 0d 20 01 ldub [ %l4 + 1 ], %g3 <== NOT EXECUTED
201fe00: c4 0d 20 03 ldub [ %l4 + 3 ], %g2 <== NOT EXECUTED
201fe04: c2 0d 20 02 ldub [ %l4 + 2 ], %g1 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201fe08: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201fe0c: a3 2c 60 18 sll %l1, 0x18, %l1 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
201fe10: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
201fe14: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201fe18: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201fe1c: a2 14 40 03 or %l1, %g3, %l1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201fe20: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
201fe24: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201fe28: 02 80 00 17 be 201fe84 <rtems_rfs_dir_del_entry+0x250> <== NOT EXECUTED
201fe2c: a2 14 40 01 or %l1, %g1, %l1 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
201fe30: 80 a4 20 0a cmp %l0, 0xa
201fe34: 34 bf ff de bg,a 201fdac <rtems_rfs_dir_del_entry+0x178> <== ALWAYS TAKEN
201fe38: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201fe3c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201fe40: 7f ff d0 ff call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201fe44: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
201fe48: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201fe4c: 32 80 00 1d bne,a 201fec0 <rtems_rfs_dir_del_entry+0x28c><== NOT EXECUTED
201fe50: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
201fe54: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201fe58: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
201fe5c: 7f ff fa 21 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201fe60: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
201fe64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201fe68: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
201fe6c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
201fe70: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
201fe74: 7f ff f7 3f call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
201fe78: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
}
201fe7c: 81 c7 e0 08 ret <== NOT EXECUTED
201fe80: 81 e8 00 00 restore <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
201fe84: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201fe88: 12 bf ff f5 bne 201fe5c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
201fe8c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201fe90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201fe94: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201fe98: 7f ff f7 e5 call 201de2c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
201fe9c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
201fea0: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
201fea4: 02 80 00 6e be 202005c <rtems_rfs_dir_del_entry+0x428> <== NOT EXECUTED
201fea8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
201feac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201feb0: 02 bf ff 95 be 201fd04 <rtems_rfs_dir_del_entry+0xd0> <== NOT EXECUTED
201feb4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201feb8: 10 bf ff e9 b 201fe5c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
201febc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201fec0: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED
201fec4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201fec8: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
201fecc: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
201fed0: 9a 10 00 1c mov %i4, %o5 <== NOT EXECUTED
201fed4: 40 00 17 9f call 2025d50 <printf> <== NOT EXECUTED
201fed8: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
201fedc: 10 bf ff df b 201fe58 <rtems_rfs_dir_del_entry+0x224> <== NOT EXECUTED
201fee0: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
memmove (entry, entry + elength, remaining);
201fee4: 92 05 00 10 add %l4, %l0, %o1
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
201fee8: b6 04 00 1c add %l0, %i4, %i3
memmove (entry, entry + elength, remaining);
201feec: 90 10 00 14 mov %l4, %o0
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
201fef0: b6 25 40 1b sub %l5, %i3, %i3
memmove (entry, entry + elength, remaining);
201fef4: 40 00 16 f5 call 2025ac8 <memmove>
201fef8: 94 10 00 1b mov %i3, %o2
memset (entry + remaining, 0xff, elength);
201fefc: 92 10 20 ff mov 0xff, %o1
201ff00: 94 10 00 10 mov %l0, %o2
201ff04: 40 00 17 41 call 2025c08 <memset>
201ff08: 90 05 00 1b add %l4, %i3, %o0
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
201ff0c: c2 0d 20 09 ldub [ %l4 + 9 ], %g1
201ff10: f6 0d 20 08 ldub [ %l4 + 8 ], %i3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201ff14: 90 10 20 00 clr %o0
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
201ff18: b7 2e e0 08 sll %i3, 8, %i3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201ff1c: 13 10 00 00 sethi %hi(0x40000000), %o1
201ff20: 7f ff d0 c7 call 201423c <rtems_rfs_trace>
201ff24: b6 16 c0 01 or %i3, %g1, %i3
201ff28: 80 8a 20 ff btst 0xff, %o0
201ff2c: 02 80 00 17 be 201ff88 <rtems_rfs_dir_del_entry+0x354> <== ALWAYS TAKEN
201ff30: 03 3f ff c0 sethi %hi(0xffff0000), %g1
printf ("rtems-rfs: dir-del-entry: "
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
201ff34: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201ff38: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED
201ff3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ff40: 12 80 00 06 bne 201ff58 <rtems_rfs_dir_del_entry+0x324> <== NOT EXECUTED
201ff44: c4 07 bf a8 ld [ %fp + -88 ], %g2 <== NOT EXECUTED
201ff48: 1b 00 80 d9 sethi %hi(0x2036400), %o5 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
201ff4c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201ff50: 02 80 00 07 be 201ff6c <rtems_rfs_dir_del_entry+0x338> <== NOT EXECUTED
201ff54: 9a 13 61 90 or %o5, 0x190, %o5 <== NOT EXECUTED
201ff58: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201ff5c: 1b 00 80 d9 sethi %hi(0x2036400), %o5 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
201ff60: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
201ff64: 02 80 00 51 be 20200a8 <rtems_rfs_dir_del_entry+0x474> <== NOT EXECUTED
201ff68: 9a 13 61 98 or %o5, 0x198, %o5 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
201ff6c: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
201ff70: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
201ff74: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED
201ff78: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
201ff7c: 40 00 17 75 call 2025d50 <printf> <== NOT EXECUTED
201ff80: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
201ff84: 03 3f ff c0 sethi %hi(0xffff0000), %g1 <== NOT EXECUTED
201ff88: b6 38 40 1b xnor %g1, %i3, %i3
201ff8c: 80 a6 e0 00 cmp %i3, 0
201ff90: 12 80 00 1f bne 202000c <rtems_rfs_dir_del_entry+0x3d8>
201ff94: 80 a7 20 00 cmp %i4, 0
201ff98: 12 80 00 1d bne 202000c <rtems_rfs_dir_del_entry+0x3d8> <== ALWAYS TAKEN
201ff9c: c2 07 bf b0 ld [ %fp + -80 ], %g1
(eoffset == 0) && rtems_rfs_block_map_last (&map))
201ffa0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ffa4: 12 80 00 28 bne 2020044 <rtems_rfs_dir_del_entry+0x410> <== NOT EXECUTED
201ffa8: c4 07 bf a8 ld [ %fp + -88 ], %g2 <== NOT EXECUTED
201ffac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
201ffb0: 12 80 00 26 bne 2020048 <rtems_rfs_dir_del_entry+0x414> <== NOT EXECUTED
201ffb4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
201ffb8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201ffbc: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
201ffc0: 7f ff f8 ac call 201e270 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
201ffc4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
if (rc > 0)
201ffc8: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
201ffcc: 04 80 00 10 ble 202000c <rtems_rfs_dir_del_entry+0x3d8> <== NOT EXECUTED
201ffd0: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
201ffd4: 7f ff d0 9a call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201ffd8: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
201ffdc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201ffe0: 02 80 00 0c be 2020010 <rtems_rfs_dir_del_entry+0x3dc> <== NOT EXECUTED
201ffe4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
201ffe8: f6 06 60 08 ld [ %i1 + 8 ], %i3 <== NOT EXECUTED
201ffec: 40 00 1a ff call 2026be8 <strerror> <== NOT EXECUTED
201fff0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201fff4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201fff8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201fffc: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2020000: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
2020004: 40 00 17 53 call 2025d50 <printf> <== NOT EXECUTED
2020008: 90 12 22 30 or %o0, 0x230, %o0 ! 2037a30 <CSWTCH.1+0xb44> <== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
202000c: 82 10 20 01 mov 1, %g1
2020010: 92 07 bf f0 add %fp, -16, %o1
2020014: 90 10 00 1d mov %i5, %o0
2020018: 7f ff f9 b2 call 201e6e0 <rtems_rfs_buffer_handle_release>
202001c: c2 2f bf f0 stb %g1, [ %fp + -16 ]
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
2020020: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
2020024: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
2020028: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
202002c: c0 27 bf f8 clr [ %fp + -8 ]
2020030: 92 07 bf a0 add %fp, -96, %o1
2020034: 7f ff f6 cf call 201db70 <rtems_rfs_block_map_close>
2020038: b0 10 20 00 clr %i0
return 0;
202003c: 81 c7 e0 08 ret
2020040: 81 e8 00 00 restore
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
2020044: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
2020048: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
202004c: 12 bf ff f1 bne 2020010 <rtems_rfs_dir_del_entry+0x3dc> <== NOT EXECUTED
2020050: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
2020054: 10 bf ff da b 201ffbc <rtems_rfs_dir_del_entry+0x388> <== NOT EXECUTED
2020058: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
202005c: 10 bf ff 7f b 201fe58 <rtems_rfs_dir_del_entry+0x224> <== NOT EXECUTED
2020060: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
2020064: 90 10 20 00 clr %o0 <== NOT EXECUTED
2020068: 7f ff d0 75 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202006c: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
2020070: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020074: 22 bf ff 7a be,a 201fe5c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
2020078: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
202007c: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
2020080: 40 00 1a da call 2026be8 <strerror> <== NOT EXECUTED
2020084: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2020088: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
202008c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2020090: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
2020094: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
2020098: 40 00 17 2e call 2025d50 <printf> <== NOT EXECUTED
202009c: 90 12 21 38 or %o0, 0x138, %o0 ! 2037938 <CSWTCH.1+0xa4c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
20200a0: 10 bf ff 6f b 201fe5c <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
20200a4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
20200a8: 1b 00 80 d9 sethi %hi(0x2036400), %o5 <== NOT EXECUTED
20200ac: 10 bf ff b0 b 201ff6c <rtems_rfs_dir_del_entry+0x338> <== NOT EXECUTED
20200b0: 9a 13 61 90 or %o5, 0x190, %o5 ! 2036590 <ramdisk_ops+0xa70><== NOT EXECUTED
0202045c <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
202045c: 9d e3 bf 40 save %sp, -192, %sp <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
2020460: 90 10 20 00 clr %o0 <== NOT EXECUTED
2020464: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
2020468: 7f ff cf 75 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202046c: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
2020470: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020474: 12 80 00 0a bne 202049c <rtems_rfs_dir_empty+0x40> <== NOT EXECUTED
2020478: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
202047c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020480: 7f ff f5 58 call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
2020484: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
2020488: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
202048c: 04 80 00 0f ble 20204c8 <rtems_rfs_dir_empty+0x6c> <== NOT EXECUTED
2020490: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
2020494: 81 c7 e0 08 ret <== NOT EXECUTED
2020498: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
202049c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
20204a0: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
20204a4: 40 00 16 2b call 2025d50 <printf> <== NOT EXECUTED
20204a8: 90 12 23 60 or %o0, 0x360, %o0 ! 2037b60 <CSWTCH.1+0xc74> <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
20204ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20204b0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20204b4: 7f ff f5 4b call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
20204b8: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
20204bc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20204c0: 14 bf ff f5 bg 2020494 <rtems_rfs_dir_empty+0x38> <== NOT EXECUTED
20204c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
20204c8: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
20204cc: 94 10 20 00 clr %o2 <== NOT EXECUTED
20204d0: 96 10 20 00 clr %o3 <== NOT EXECUTED
20204d4: 7f ff f6 2c call 201dd84 <rtems_rfs_block_map_seek> <== NOT EXECUTED
20204d8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
20204dc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20204e0: 14 80 00 7f bg 20206dc <rtems_rfs_dir_empty+0x280> <== NOT EXECUTED
20204e4: 39 00 00 3f sethi %hi(0xfc00), %i4 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
20204e8: 37 00 80 de sethi %hi(0x2037800), %i3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20204ec: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
20204f0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
20204f4: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20204f8: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
20204fc: b6 16 e3 80 or %i3, 0x380, %i3 <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
2020500: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
2020504: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020508: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
202050c: 7f ff f8 f0 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2020510: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
2020514: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2020518: 14 80 00 4e bg 2020650 <rtems_rfs_dir_empty+0x1f4> <== NOT EXECUTED
202051c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
2020520: da 07 60 08 ld [ %i5 + 8 ], %o5 <== NOT EXECUTED
2020524: 9a 83 7f f6 addcc %o5, -10, %o5 <== NOT EXECUTED
2020528: 02 80 00 5a be 2020690 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
202052c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
2020530: c4 08 60 09 ldub [ %g1 + 9 ], %g2 <== NOT EXECUTED
2020534: e2 08 60 08 ldub [ %g1 + 8 ], %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
2020538: c6 08 40 00 ldub [ %g1 ], %g3 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
202053c: a3 2c 60 08 sll %l1, 8, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
2020540: c8 08 60 01 ldub [ %g1 + 1 ], %g4 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
2020544: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
2020548: f4 08 60 02 ldub [ %g1 + 2 ], %i2 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
202054c: 80 a4 40 1c cmp %l1, %i4 <== NOT EXECUTED
2020550: 02 80 00 50 be 2020690 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
2020554: c4 08 60 03 ldub [ %g1 + 3 ], %g2 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
2020558: a0 0e a0 ff and %i2, 0xff, %l0 <== NOT EXECUTED
202055c: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
2020560: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED
2020564: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
2020568: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED
202056c: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
2020570: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
2020574: a0 14 00 02 or %l0, %g2, %l0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
2020578: b4 10 20 00 clr %i2 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
202057c: 10 80 00 20 b 20205fc <rtems_rfs_dir_empty+0x1a0> <== NOT EXECUTED
2020580: a0 14 00 03 or %l0, %g3, %l0 <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
2020584: 12 80 00 31 bne 2020648 <rtems_rfs_dir_empty+0x1ec> <== NOT EXECUTED
2020588: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
202058c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2020590: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
2020594: 12 80 00 2d bne 2020648 <rtems_rfs_dir_empty+0x1ec> <== NOT EXECUTED
2020598: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
202059c: c4 08 60 0b ldub [ %g1 + 0xb ], %g2 <== NOT EXECUTED
20205a0: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
20205a4: 12 80 00 29 bne 2020648 <rtems_rfs_dir_empty+0x1ec> <== NOT EXECUTED
20205a8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
empty = false;
break;
}
entry += elength;
offset += elength;
20205ac: b4 06 80 11 add %i2, %l1, %i2 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
20205b0: 80 a6 80 0d cmp %i2, %o5 <== NOT EXECUTED
20205b4: 1a 80 00 37 bcc 2020690 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
20205b8: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
20205bc: e2 08 60 08 ldub [ %g1 + 8 ], %l1 <== NOT EXECUTED
20205c0: de 08 60 09 ldub [ %g1 + 9 ], %o7 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
20205c4: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED
20205c8: c8 08 60 01 ldub [ %g1 + 1 ], %g4 <== NOT EXECUTED
20205cc: c6 08 60 03 ldub [ %g1 + 3 ], %g3 <== NOT EXECUTED
20205d0: c4 08 60 02 ldub [ %g1 + 2 ], %g2 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
20205d4: a3 2c 60 08 sll %l1, 8, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
20205d8: a1 2c 20 18 sll %l0, 0x18, %l0 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
20205dc: a2 14 40 0f or %l1, %o7, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
20205e0: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
20205e4: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
20205e8: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20205ec: 80 a4 40 1c cmp %l1, %i4 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
20205f0: a0 14 00 03 or %l0, %g3, %l0 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20205f4: 02 80 00 27 be 2020690 <rtems_rfs_dir_empty+0x234> <== NOT EXECUTED
20205f8: a0 14 00 02 or %l0, %g2, %l0 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
20205fc: 80 a4 60 0a cmp %l1, 0xa <== NOT EXECUTED
2020600: 04 80 00 1f ble 202067c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
2020604: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
2020608: c4 07 60 18 ld [ %i5 + 0x18 ], %g2 <== NOT EXECUTED
202060c: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED
2020610: 1a 80 00 1b bcc 202067c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
2020614: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2020618: 02 80 00 19 be 202067c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
202061c: 01 00 00 00 nop <== NOT EXECUTED
2020620: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
2020624: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED
2020628: 0a 80 00 15 bcs 202067c <rtems_rfs_dir_empty+0x220> <== NOT EXECUTED
202062c: 80 a4 60 0b cmp %l1, 0xb <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
2020630: 12 bf ff d5 bne 2020584 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
2020634: 80 a4 60 0c cmp %l1, 0xc <== NOT EXECUTED
2020638: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
202063c: 80 a0 a0 2e cmp %g2, 0x2e <== NOT EXECUTED
2020640: 02 bf ff db be 20205ac <rtems_rfs_dir_empty+0x150> <== NOT EXECUTED
2020644: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
2020648: 22 80 00 02 be,a 2020650 <rtems_rfs_dir_empty+0x1f4> <== NOT EXECUTED
202064c: b0 10 20 5a mov 0x5a, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020650: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2020654: 7f ff f8 23 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2020658: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
202065c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
2020660: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2020664: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2020668: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
202066c: 7f ff f5 41 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
2020670: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
}
2020674: 81 c7 e0 08 ret <== NOT EXECUTED
2020678: 81 e8 00 00 restore <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
202067c: 7f ff ce f0 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020680: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020684: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020688: 32 80 00 0e bne,a 20206c0 <rtems_rfs_dir_empty+0x264> <== NOT EXECUTED
202068c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
2020690: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020694: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
2020698: 7f ff f5 e5 call 201de2c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
202069c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc > 0)
20206a0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20206a4: 04 bf ff 98 ble 2020504 <rtems_rfs_dir_empty+0xa8> <== NOT EXECUTED
20206a8: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
if (rc == ENXIO)
20206ac: 82 1e 20 06 xor %i0, 6, %g1 <== NOT EXECUTED
20206b0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
20206b4: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED
20206b8: 10 bf ff e6 b 2020650 <rtems_rfs_dir_empty+0x1f4> <== NOT EXECUTED
20206bc: b0 0e 00 01 and %i0, %g1, %i0 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
20206c0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20206c4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
20206c8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
20206cc: 40 00 15 a1 call 2025d50 <printf> <== NOT EXECUTED
20206d0: 98 10 00 1a mov %i2, %o4 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
20206d4: 10 bf ff f0 b 2020694 <rtems_rfs_dir_empty+0x238> <== NOT EXECUTED
20206d8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
20206dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20206e0: 7f ff f5 24 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
20206e4: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
20206e8: 81 c7 e0 08 ret <== NOT EXECUTED
20206ec: 81 e8 00 00 restore <== NOT EXECUTED
02024c78 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
2024c78: 9d e3 bf a0 save %sp, -96, %sp
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
2024c7c: 09 37 f7 c5 sethi %hi(0xdfdf1400), %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2024c80: 82 10 00 18 mov %i0, %g1
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
2024c84: 88 11 22 9f or %g4, 0x29f, %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2024c88: 80 a6 60 0c cmp %i1, 0xc
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
2024c8c: 88 06 40 04 add %i1, %g4, %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2024c90: 84 10 00 04 mov %g4, %g2
2024c94: 08 80 00 4b bleu 2024dc0 <rtems_rfs_dir_hash+0x148>
2024c98: 86 10 00 04 mov %g4, %g3
{
a += k[0];
2024c9c: da 08 40 00 ldub [ %g1 ], %o5
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
2024ca0: f0 08 60 04 ldub [ %g1 + 4 ], %i0
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2024ca4: f6 08 60 01 ldub [ %g1 + 1 ], %i3
a += ((uint32_t)k[2])<<16;
2024ca8: f8 08 60 02 ldub [ %g1 + 2 ], %i4
a += ((uint32_t)k[3])<<24;
2024cac: fa 08 60 03 ldub [ %g1 + 3 ], %i5
b += k[4];
b += ((uint32_t)k[5])<<8;
2024cb0: de 08 60 05 ldub [ %g1 + 5 ], %o7
b += ((uint32_t)k[6])<<16;
2024cb4: d0 08 60 06 ldub [ %g1 + 6 ], %o0
b += ((uint32_t)k[7])<<24;
c += k[8];
2024cb8: f4 08 60 08 ldub [ %g1 + 8 ], %i2
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
2024cbc: d6 08 60 0b ldub [ %g1 + 0xb ], %o3
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
2024cc0: d4 08 60 07 ldub [ %g1 + 7 ], %o2
c += k[8];
c += ((uint32_t)k[9])<<8;
2024cc4: d2 08 60 09 ldub [ %g1 + 9 ], %o1
c += ((uint32_t)k[10])<<16;
2024cc8: d8 08 60 0a ldub [ %g1 + 0xa ], %o4
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
2024ccc: 86 03 40 03 add %o5, %g3, %g3
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
2024cd0: 84 06 00 02 add %i0, %g2, %g2
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
2024cd4: 88 06 80 04 add %i2, %g4, %g4
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2024cd8: b7 2e e0 08 sll %i3, 8, %i3
a += ((uint32_t)k[2])<<16;
2024cdc: b9 2f 20 10 sll %i4, 0x10, %i4
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2024ce0: 9a 00 c0 1b add %g3, %i3, %o5
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
2024ce4: bb 2f 60 18 sll %i5, 0x18, %i5
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
2024ce8: 87 2a 20 10 sll %o0, 0x10, %g3
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
2024cec: 9a 03 40 1c add %o5, %i4, %o5
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
2024cf0: 9f 2b e0 08 sll %o7, 8, %o7
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
2024cf4: 9a 03 40 1d add %o5, %i5, %o5
b += k[4];
b += ((uint32_t)k[5])<<8;
2024cf8: 9e 00 80 0f add %g2, %o7, %o7
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
2024cfc: 85 2a e0 18 sll %o3, 0x18, %g2
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
2024d00: 9e 03 c0 03 add %o7, %g3, %o7
b += ((uint32_t)k[7])<<24;
2024d04: 95 2a a0 18 sll %o2, 0x18, %o2
c += k[8];
c += ((uint32_t)k[9])<<8;
2024d08: 87 2a 60 08 sll %o1, 8, %g3
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
2024d0c: 9e 03 c0 0a add %o7, %o2, %o7
c += k[8];
c += ((uint32_t)k[9])<<8;
2024d10: 86 01 00 03 add %g4, %g3, %g3
c += ((uint32_t)k[10])<<16;
2024d14: 99 2b 20 10 sll %o4, 0x10, %o4
2024d18: 86 00 c0 0c add %g3, %o4, %g3
c += ((uint32_t)k[11])<<24;
2024d1c: 86 00 c0 02 add %g3, %g2, %g3
mix(a,b,c);
2024d20: 88 00 c0 0f add %g3, %o7, %g4
2024d24: 84 23 40 03 sub %o5, %g3, %g2
2024d28: 9b 28 e0 04 sll %g3, 4, %o5
2024d2c: 87 30 e0 1c srl %g3, 0x1c, %g3
2024d30: 86 13 40 03 or %o5, %g3, %g3
2024d34: 84 18 80 03 xor %g2, %g3, %g2
2024d38: 86 00 80 04 add %g2, %g4, %g3
2024d3c: 9b 28 a0 06 sll %g2, 6, %o5
2024d40: 9e 23 c0 02 sub %o7, %g2, %o7
2024d44: 85 30 a0 1a srl %g2, 0x1a, %g2
2024d48: 84 13 40 02 or %o5, %g2, %g2
2024d4c: 9e 18 80 0f xor %g2, %o7, %o7
2024d50: 84 03 c0 03 add %o7, %g3, %g2
2024d54: 9b 2b e0 08 sll %o7, 8, %o5
2024d58: 88 21 00 0f sub %g4, %o7, %g4
2024d5c: 9f 33 e0 18 srl %o7, 0x18, %o7
2024d60: 9e 13 40 0f or %o5, %o7, %o7
2024d64: 88 1b c0 04 xor %o7, %g4, %g4
2024d68: 9e 01 00 02 add %g4, %g2, %o7
2024d6c: 9b 29 20 10 sll %g4, 0x10, %o5
2024d70: 86 20 c0 04 sub %g3, %g4, %g3
2024d74: 89 31 20 10 srl %g4, 0x10, %g4
2024d78: 88 13 40 04 or %o5, %g4, %g4
2024d7c: 86 19 00 03 xor %g4, %g3, %g3
2024d80: 9b 28 e0 13 sll %g3, 0x13, %o5
2024d84: 89 30 e0 0d srl %g3, 0xd, %g4
2024d88: 88 13 40 04 or %o5, %g4, %g4
2024d8c: 84 20 80 03 sub %g2, %g3, %g2
length -= 12;
2024d90: b2 06 7f f4 add %i1, -12, %i1
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
2024d94: 84 19 00 02 xor %g4, %g2, %g2
2024d98: 86 00 c0 0f add %g3, %o7, %g3
2024d9c: 9b 28 a0 04 sll %g2, 4, %o5
2024da0: 9e 23 c0 02 sub %o7, %g2, %o7
2024da4: 89 30 a0 1c srl %g2, 0x1c, %g4
length -= 12;
k += 12;
2024da8: 82 00 60 0c add %g1, 0xc, %g1
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
2024dac: 88 13 40 04 or %o5, %g4, %g4
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2024db0: 80 a6 60 0c cmp %i1, 0xc
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
2024db4: 84 00 80 03 add %g2, %g3, %g2
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
2024db8: 18 bf ff b9 bgu 2024c9c <rtems_rfs_dir_hash+0x24> <== NEVER TAKEN
2024dbc: 88 19 00 0f xor %g4, %o7, %g4
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
2024dc0: b3 2e 60 02 sll %i1, 2, %i1
2024dc4: 3b 00 80 93 sethi %hi(0x2024c00), %i5
2024dc8: ba 17 60 44 or %i5, 0x44, %i5 ! 2024c44 <rtems_rfs_buffer_bdbuf_release+0x8c>
2024dcc: fa 07 40 19 ld [ %i5 + %i1 ], %i5
2024dd0: 81 c7 40 00 jmp %i5
2024dd4: 01 00 00 00 nop
{
case 12: c+=((uint32_t)k[11])<<24;
2024dd8: fa 08 60 0b ldub [ %g1 + 0xb ], %i5
2024ddc: bb 2f 60 18 sll %i5, 0x18, %i5
2024de0: 88 01 00 1d add %g4, %i5, %g4
case 11: c+=((uint32_t)k[10])<<16;
2024de4: fa 08 60 0a ldub [ %g1 + 0xa ], %i5
2024de8: bb 2f 60 10 sll %i5, 0x10, %i5
2024dec: 88 01 00 1d add %g4, %i5, %g4
case 10: c+=((uint32_t)k[9])<<8;
2024df0: fa 08 60 09 ldub [ %g1 + 9 ], %i5
2024df4: bb 2f 60 08 sll %i5, 8, %i5
2024df8: 88 01 00 1d add %g4, %i5, %g4
case 9 : c+=k[8];
2024dfc: fa 08 60 08 ldub [ %g1 + 8 ], %i5
2024e00: 88 01 00 1d add %g4, %i5, %g4
case 8 : b+=((uint32_t)k[7])<<24;
2024e04: fa 08 60 07 ldub [ %g1 + 7 ], %i5
2024e08: bb 2f 60 18 sll %i5, 0x18, %i5
2024e0c: 84 00 80 1d add %g2, %i5, %g2
case 7 : b+=((uint32_t)k[6])<<16;
2024e10: fa 08 60 06 ldub [ %g1 + 6 ], %i5
2024e14: bb 2f 60 10 sll %i5, 0x10, %i5
2024e18: 84 00 80 1d add %g2, %i5, %g2
case 6 : b+=((uint32_t)k[5])<<8;
2024e1c: fa 08 60 05 ldub [ %g1 + 5 ], %i5
2024e20: bb 2f 60 08 sll %i5, 8, %i5
2024e24: 84 00 80 1d add %g2, %i5, %g2
case 5 : b+=k[4];
2024e28: fa 08 60 04 ldub [ %g1 + 4 ], %i5
2024e2c: 84 00 80 1d add %g2, %i5, %g2
case 4 : a+=((uint32_t)k[3])<<24;
2024e30: fa 08 60 03 ldub [ %g1 + 3 ], %i5
2024e34: bb 2f 60 18 sll %i5, 0x18, %i5
2024e38: 86 00 c0 1d add %g3, %i5, %g3
case 3 : a+=((uint32_t)k[2])<<16;
2024e3c: fa 08 60 02 ldub [ %g1 + 2 ], %i5
2024e40: bb 2f 60 10 sll %i5, 0x10, %i5
2024e44: 86 00 c0 1d add %g3, %i5, %g3
case 2 : a+=((uint32_t)k[1])<<8;
2024e48: fa 08 60 01 ldub [ %g1 + 1 ], %i5
2024e4c: bb 2f 60 08 sll %i5, 8, %i5
2024e50: 86 00 c0 1d add %g3, %i5, %g3
case 1 : a+=k[0];
2024e54: c2 08 40 00 ldub [ %g1 ], %g1
break;
case 0 : return c;
}
}
final(a,b,c);
2024e58: bb 30 a0 12 srl %g2, 0x12, %i5
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 1 : a+=k[0];
2024e5c: 86 00 c0 01 add %g3, %g1, %g3
break;
case 0 : return c;
}
}
final(a,b,c);
2024e60: 83 28 a0 0e sll %g2, 0xe, %g1
2024e64: 82 17 40 01 or %i5, %g1, %g1
2024e68: 88 19 00 02 xor %g4, %g2, %g4
2024e6c: 88 21 00 01 sub %g4, %g1, %g4
2024e70: bb 29 20 0b sll %g4, 0xb, %i5
2024e74: 83 31 20 15 srl %g4, 0x15, %g1
2024e78: 82 17 40 01 or %i5, %g1, %g1
2024e7c: 86 19 00 03 xor %g4, %g3, %g3
2024e80: 86 20 c0 01 sub %g3, %g1, %g3
2024e84: bb 28 e0 19 sll %g3, 0x19, %i5
2024e88: 83 30 e0 07 srl %g3, 7, %g1
2024e8c: 82 17 40 01 or %i5, %g1, %g1
2024e90: 84 18 c0 02 xor %g3, %g2, %g2
2024e94: 84 20 80 01 sub %g2, %g1, %g2
2024e98: bb 28 a0 10 sll %g2, 0x10, %i5
2024e9c: 83 30 a0 10 srl %g2, 0x10, %g1
2024ea0: 82 17 40 01 or %i5, %g1, %g1
2024ea4: 88 18 80 04 xor %g2, %g4, %g4
2024ea8: 88 21 00 01 sub %g4, %g1, %g4
2024eac: bb 29 20 04 sll %g4, 4, %i5
2024eb0: 83 31 20 1c srl %g4, 0x1c, %g1
2024eb4: 82 17 40 01 or %i5, %g1, %g1
2024eb8: 86 19 00 03 xor %g4, %g3, %g3
2024ebc: 86 20 c0 01 sub %g3, %g1, %g3
2024ec0: 83 28 e0 0e sll %g3, 0xe, %g1
2024ec4: 84 18 c0 02 xor %g3, %g2, %g2
2024ec8: 87 30 e0 12 srl %g3, 0x12, %g3
2024ecc: 86 10 40 03 or %g1, %g3, %g3
2024ed0: 84 20 80 03 sub %g2, %g3, %g2
2024ed4: 88 18 80 04 xor %g2, %g4, %g4
2024ed8: 83 28 a0 18 sll %g2, 0x18, %g1
2024edc: 85 30 a0 08 srl %g2, 8, %g2
2024ee0: 84 10 40 02 or %g1, %g2, %g2
2024ee4: 88 21 00 02 sub %g4, %g2, %g4
return c;
}
2024ee8: 81 c7 e0 08 ret
2024eec: 91 e8 00 04 restore %g0, %g4, %o0
0201f2b4 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
201f2b4: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f2b8: 90 10 20 00 clr %o0
201f2bc: 13 01 00 00 sethi %hi(0x4000000), %o1
201f2c0: 7f ff d3 df call 201423c <rtems_rfs_trace>
201f2c4: aa 10 00 1d mov %i5, %l5
201f2c8: 80 8a 20 ff btst 0xff, %o0
201f2cc: 12 80 00 12 bne 201f314 <rtems_rfs_dir_lookup_ino+0x60> <== NEVER TAKEN
201f2d0: 92 10 00 19 mov %i1, %o1
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
201f2d4: c0 27 00 00 clr [ %i4 ]
*offset = 0;
201f2d8: c0 25 40 00 clr [ %l5 ]
rc = rtems_rfs_block_map_open (fs, inode, &map);
201f2dc: 90 10 00 18 mov %i0, %o0
201f2e0: 7f ff f9 c0 call 201d9e0 <rtems_rfs_block_map_open>
201f2e4: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
201f2e8: a6 92 20 00 orcc %o0, 0, %l3
201f2ec: 24 80 00 26 ble,a 201f384 <rtems_rfs_dir_lookup_ino+0xd0><== ALWAYS TAKEN
201f2f0: 92 10 00 1b mov %i3, %o1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f2f4: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f2f8: 7f ff d3 d1 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f2fc: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201f300: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f304: 32 80 00 43 bne,a 201f410 <rtems_rfs_dir_lookup_ino+0x15c><== NOT EXECUTED
201f308: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201f30c: 81 c7 e0 08 ret <== NOT EXECUTED
201f310: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
201f314: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201f318: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f31c: 40 00 1a 8d call 2025d50 <printf> <== NOT EXECUTED
201f320: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20374c8 <CSWTCH.1+0x5dc> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
201f324: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201f328: 04 80 00 0a ble 201f350 <rtems_rfs_dir_lookup_ino+0x9c> <== NOT EXECUTED
201f32c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201f330: ba 10 20 00 clr %i5 <== NOT EXECUTED
printf ("%c", name[c]);
201f334: d0 4e 80 1d ldsb [ %i2 + %i5 ], %o0 <== NOT EXECUTED
201f338: 40 00 1a 99 call 2025d9c <putchar> <== NOT EXECUTED
201f33c: ba 07 60 01 inc %i5 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
201f340: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED
201f344: 32 bf ff fd bne,a 201f338 <rtems_rfs_dir_lookup_ino+0x84><== NOT EXECUTED
201f348: d0 4e 80 1d ldsb [ %i2 + %i5 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
201f34c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201f350: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f354: 40 00 1a 7f call 2025d50 <printf> <== NOT EXECUTED
201f358: 90 12 21 00 or %o0, 0x100, %o0 ! 2037500 <CSWTCH.1+0x614> <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
201f35c: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
*offset = 0;
201f360: c0 25 40 00 clr [ %l5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
201f364: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201f368: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
201f36c: 7f ff f9 9d call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
201f370: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
201f374: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED
201f378: 14 bf ff e0 bg 201f2f8 <rtems_rfs_dir_lookup_ino+0x44> <== NOT EXECUTED
201f37c: 90 10 20 00 clr %o0 <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
201f380: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
201f384: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201f388: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201f38c: c0 27 bf f8 clr [ %fp + -8 ]
201f390: 40 00 16 3a call 2024c78 <rtems_rfs_dir_hash>
201f394: 90 10 00 1a mov %i2, %o0
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
201f398: 92 07 bf a0 add %fp, -96, %o1
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
201f39c: a4 10 00 08 mov %o0, %l2
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
201f3a0: 94 10 20 00 clr %o2
201f3a4: 90 10 00 18 mov %i0, %o0
201f3a8: 96 10 20 00 clr %o3
201f3ac: 7f ff fa 76 call 201dd84 <rtems_rfs_block_map_seek>
201f3b0: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
201f3b4: a6 92 20 00 orcc %o0, 0, %l3
201f3b8: 04 80 00 21 ble 201f43c <rtems_rfs_dir_lookup_ino+0x188>
201f3bc: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f3c0: 7f ff d3 9f call 201423c <rtems_rfs_trace>
201f3c4: 13 01 00 00 sethi %hi(0x4000000), %o1
201f3c8: 80 8a 20 ff btst 0xff, %o0
201f3cc: 12 80 00 cd bne 201f700 <rtems_rfs_dir_lookup_ino+0x44c> <== NEVER TAKEN
201f3d0: 01 00 00 00 nop
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
201f3d4: 80 a4 e0 06 cmp %l3, 6
201f3d8: 22 80 00 02 be,a 201f3e0 <rtems_rfs_dir_lookup_ino+0x12c><== ALWAYS TAKEN
201f3dc: a6 10 20 02 mov 2, %l3
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201f3e0: 92 07 bf f0 add %fp, -16, %o1
201f3e4: 7f ff fc bf call 201e6e0 <rtems_rfs_buffer_handle_release>
201f3e8: 90 10 00 18 mov %i0, %o0
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
201f3ec: 90 10 00 18 mov %i0, %o0
handle->dirty = false;
201f3f0: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
201f3f4: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
201f3f8: c0 27 bf f8 clr [ %fp + -8 ]
201f3fc: 92 07 bf a0 add %fp, -96, %o1
201f400: 7f ff f9 dc call 201db70 <rtems_rfs_block_map_close>
201f404: b0 10 00 13 mov %l3, %i0
return rc;
}
201f408: 81 c7 e0 08 ret
201f40c: 81 e8 00 00 restore
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
201f410: 40 00 1d f6 call 2026be8 <strerror> <== NOT EXECUTED
201f414: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
201f418: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201f41c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201f420: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
201f424: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201f428: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
201f42c: 40 00 1a 49 call 2025d50 <printf> <== NOT EXECUTED
201f430: 90 12 21 10 or %o0, 0x110, %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
201f434: 81 c7 e0 08 ret <== NOT EXECUTED
201f438: 81 e8 00 00 restore <== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
201f43c: 2f 00 80 dd sethi %hi(0x2037400), %l7
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f440: 23 00 00 3f sethi %hi(0xfc00), %l1
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201f444: 2d 00 80 dd sethi %hi(0x2037400), %l6
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
201f448: ae 15 e1 90 or %l7, 0x190, %l7
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f44c: a2 14 63 ff or %l1, 0x3ff, %l1
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201f450: ac 15 a2 60 or %l6, 0x260, %l6
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201f454: 80 a4 e0 00 cmp %l3, 0
201f458: 12 80 00 7f bne 201f654 <rtems_rfs_dir_lookup_ino+0x3a0> <== NEVER TAKEN
201f45c: c2 07 bf fc ld [ %fp + -4 ], %g1
201f460: 80 a0 60 00 cmp %g1, 0
201f464: 02 80 00 d5 be 201f7b8 <rtems_rfs_dir_lookup_ino+0x504> <== NEVER TAKEN
201f468: 90 10 20 00 clr %o0
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f46c: 7f ff d3 74 call 201423c <rtems_rfs_trace>
201f470: 13 01 00 00 sethi %hi(0x4000000), %o1
201f474: 80 8a 20 ff btst 0xff, %o0
201f478: 32 80 00 89 bne,a 201f69c <rtems_rfs_dir_lookup_ino+0x3e8><== NEVER TAKEN
201f47c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
201f480: d4 07 bf fc ld [ %fp + -4 ], %o2
201f484: 90 10 00 18 mov %i0, %o0
201f488: 92 07 bf f0 add %fp, -16, %o1
201f48c: 7f ff fd 10 call 201e8cc <rtems_rfs_buffer_handle_request>
201f490: 96 10 20 01 mov 1, %o3
if (rc > 0)
201f494: a8 92 20 00 orcc %o0, 0, %l4
201f498: 14 80 00 b5 bg 201f76c <rtems_rfs_dir_lookup_ino+0x4b8> <== NEVER TAKEN
201f49c: c2 07 bf f8 ld [ %fp + -8 ], %g1
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f4a0: d8 06 20 08 ld [ %i0 + 8 ], %o4
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
201f4a4: c0 27 bf b4 clr [ %fp + -76 ]
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f4a8: 80 a3 20 0a cmp %o4, 0xa
201f4ac: 12 80 00 0a bne 201f4d4 <rtems_rfs_dir_lookup_ino+0x220> <== ALWAYS TAKEN
201f4b0: fa 00 60 24 ld [ %g1 + 0x24 ], %i5
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
201f4b4: 10 80 00 4a b 201f5dc <rtems_rfs_dir_lookup_ino+0x328> <== NOT EXECUTED
201f4b8: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f4bc: 84 03 3f f6 add %o4, -10, %g2
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
201f4c0: 82 04 00 01 add %l0, %g1, %g1
201f4c4: c2 27 bf b4 st %g1, [ %fp + -76 ]
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f4c8: 80 a0 80 01 cmp %g2, %g1
201f4cc: 08 80 00 43 bleu 201f5d8 <rtems_rfs_dir_lookup_ino+0x324> <== NEVER TAKEN
201f4d0: ba 07 40 10 add %i5, %l0, %i5
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
201f4d4: c2 0f 40 00 ldub [ %i5 ], %g1
201f4d8: d2 0f 60 01 ldub [ %i5 + 1 ], %o1
201f4dc: d4 0f 60 03 ldub [ %i5 + 3 ], %o2
201f4e0: c6 0f 60 02 ldub [ %i5 + 2 ], %g3
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
201f4e4: e0 0f 60 08 ldub [ %i5 + 8 ], %l0
201f4e8: c4 0f 60 09 ldub [ %i5 + 9 ], %g2
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
201f4ec: d6 0f 60 04 ldub [ %i5 + 4 ], %o3
201f4f0: da 0f 60 05 ldub [ %i5 + 5 ], %o5
201f4f4: c8 0f 60 06 ldub [ %i5 + 6 ], %g4
201f4f8: de 0f 60 07 ldub [ %i5 + 7 ], %o7
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
201f4fc: 83 28 60 18 sll %g1, 0x18, %g1
201f500: 93 2a 60 10 sll %o1, 0x10, %o1
201f504: 87 28 e0 08 sll %g3, 8, %g3
201f508: 82 10 40 09 or %g1, %o1, %g1
201f50c: 82 10 40 0a or %g1, %o2, %g1
201f510: 82 10 40 03 or %g1, %g3, %g1
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
201f514: a1 2c 20 08 sll %l0, 8, %l0
201f518: a0 14 00 02 or %l0, %g2, %l0
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
201f51c: 80 a4 00 11 cmp %l0, %l1
201f520: 02 80 00 2e be 201f5d8 <rtems_rfs_dir_lookup_ino+0x324>
201f524: c2 27 00 00 st %g1, [ %i4 ]
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
201f528: 80 a4 20 0a cmp %l0, 0xa
201f52c: 04 80 00 30 ble 201f5ec <rtems_rfs_dir_lookup_ino+0x338>
201f530: 90 10 20 00 clr %o0
201f534: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
201f538: 80 a4 00 02 cmp %l0, %g2
201f53c: 1a 80 00 2c bcc 201f5ec <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
201f540: 80 a0 60 00 cmp %g1, 0
201f544: 02 80 00 2a be 201f5ec <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
201f548: 01 00 00 00 nop
201f54c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
201f550: 80 a0 40 02 cmp %g1, %g2
201f554: 18 80 00 26 bgu 201f5ec <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
201f558: 82 09 20 ff and %g4, 0xff, %g1
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
201f55c: 97 2a e0 18 sll %o3, 0x18, %o3
201f560: 9a 0b 60 ff and %o5, 0xff, %o5
201f564: 9e 0b e0 ff and %o7, 0xff, %o7
201f568: 9b 2b 60 10 sll %o5, 0x10, %o5
201f56c: 83 28 60 08 sll %g1, 8, %g1
201f570: 96 12 c0 0d or %o3, %o5, %o3
201f574: 88 12 c0 0f or %o3, %o7, %g4
201f578: 88 11 00 01 or %g4, %g1, %g4
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
201f57c: 80 a1 00 12 cmp %g4, %l2
201f580: 12 bf ff cf bne 201f4bc <rtems_rfs_dir_lookup_ino+0x208>
201f584: c2 07 bf b4 ld [ %fp + -76 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
201f588: 90 10 20 00 clr %o0
201f58c: 7f ff d3 2c call 201423c <rtems_rfs_trace>
201f590: 13 02 00 00 sethi %hi(0x8000000), %o1
201f594: 80 8a 20 ff btst 0xff, %o0
201f598: 32 80 00 31 bne,a 201f65c <rtems_rfs_dir_lookup_ino+0x3a8><== NEVER TAKEN
201f59c: c6 0f 60 01 ldub [ %i5 + 1 ], %g3 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
201f5a0: 90 07 60 0a add %i5, 0xa, %o0
201f5a4: 92 10 00 1a mov %i2, %o1
201f5a8: 40 00 18 de call 2025920 <memcmp>
201f5ac: 94 10 00 1b mov %i3, %o2
201f5b0: 80 a2 20 00 cmp %o0, 0
201f5b4: 02 80 00 5c be 201f724 <rtems_rfs_dir_lookup_ino+0x470> <== ALWAYS TAKEN
201f5b8: c2 07 bf b4 ld [ %fp + -76 ], %g1
201f5bc: d8 06 20 08 ld [ %i0 + 8 ], %o4 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
201f5c0: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED
201f5c4: c2 27 bf b4 st %g1, [ %fp + -76 ] <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
201f5c8: 84 03 3f f6 add %o4, -10, %g2 <== NOT EXECUTED
201f5cc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
201f5d0: 18 bf ff c1 bgu 201f4d4 <rtems_rfs_dir_lookup_ino+0x220> <== NOT EXECUTED
201f5d4: ba 07 40 10 add %i5, %l0, %i5 <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
201f5d8: 80 a5 20 00 cmp %l4, 0
201f5dc: 02 80 00 14 be 201f62c <rtems_rfs_dir_lookup_ino+0x378> <== ALWAYS TAKEN
201f5e0: 90 10 00 18 mov %i0, %o0
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201f5e4: 10 bf ff 7f b 201f3e0 <rtems_rfs_dir_lookup_ino+0x12c>
201f5e8: a6 10 00 14 mov %l4, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f5ec: 7f ff d3 14 call 201423c <rtems_rfs_trace>
201f5f0: 13 01 00 00 sethi %hi(0x4000000), %o1
201f5f4: 80 8a 20 ff btst 0xff, %o0
201f5f8: 12 80 00 04 bne 201f608 <rtems_rfs_dir_lookup_ino+0x354> <== NEVER TAKEN
201f5fc: a8 10 20 05 mov 5, %l4
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201f600: 10 bf ff 78 b 201f3e0 <rtems_rfs_dir_lookup_ino+0x12c>
201f604: a6 10 00 14 mov %l4, %l3
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
201f608: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201f60c: d6 07 00 00 ld [ %i4 ], %o3 <== NOT EXECUTED
201f610: d8 07 bf b4 ld [ %fp + -76 ], %o4 <== NOT EXECUTED
201f614: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
201f618: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f61c: 40 00 19 cd call 2025d50 <printf> <== NOT EXECUTED
201f620: 90 12 22 10 or %o0, 0x210, %o0 ! 2037610 <CSWTCH.1+0x724> <== NOT EXECUTED
201f624: 10 bf ff 6f b 201f3e0 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
201f628: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
201f62c: 92 07 bf a0 add %fp, -96, %o1
201f630: 7f ff f9 ff call 201de2c <rtems_rfs_block_map_next_block>
201f634: 94 07 bf fc add %fp, -4, %o2
if ((rc > 0) && (rc != ENXIO))
201f638: 80 a2 20 06 cmp %o0, 6
201f63c: 12 80 00 1d bne 201f6b0 <rtems_rfs_dir_lookup_ino+0x3fc> <== NEVER TAKEN
201f640: a6 10 00 08 mov %o0, %l3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
201f644: 80 a4 e0 06 cmp %l3, 6
201f648: 12 bf ff 84 bne 201f458 <rtems_rfs_dir_lookup_ino+0x1a4> <== NEVER TAKEN
201f64c: 80 a4 e0 00 cmp %l3, 0
rc = ENOENT;
201f650: a6 10 20 02 mov 2, %l3
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201f654: 10 bf ff e4 b 201f5e4 <rtems_rfs_dir_lookup_ino+0x330>
201f658: a8 10 00 13 mov %l3, %l4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201f65c: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED
201f660: da 0f 40 00 ldub [ %i5 ], %o5 <== NOT EXECUTED
201f664: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201f668: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201f66c: d4 1f bf b0 ldd [ %fp + -80 ], %o2 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201f670: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
201f674: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
201f678: 9b 2b 60 18 sll %o5, 0x18, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201f67c: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201f680: 9a 13 40 03 or %o5, %g3, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201f684: 98 10 00 10 mov %l0, %o4 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
201f688: 9a 13 40 02 or %o5, %g2, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
201f68c: 40 00 19 b1 call 2025d50 <printf> <== NOT EXECUTED
201f690: 9a 13 40 01 or %o5, %g1, %o5 <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
201f694: 10 bf ff c4 b 201f5a4 <rtems_rfs_dir_lookup_ino+0x2f0> <== NOT EXECUTED
201f698: 90 07 60 0a add %i5, 0xa, %o0 <== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
201f69c: d4 07 bf b0 ld [ %fp + -80 ], %o2 <== NOT EXECUTED
201f6a0: 40 00 19 ac call 2025d50 <printf> <== NOT EXECUTED
201f6a4: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
201f6a8: 10 bf ff 77 b 201f484 <rtems_rfs_dir_lookup_ino+0x1d0> <== NOT EXECUTED
201f6ac: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if ((rc > 0) && (rc != ENXIO))
201f6b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201f6b4: 04 bf ff e5 ble 201f648 <rtems_rfs_dir_lookup_ino+0x394> <== NOT EXECUTED
201f6b8: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f6bc: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f6c0: 7f ff d2 df call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f6c4: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201f6c8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f6cc: 22 bf ff 63 be,a 201f458 <rtems_rfs_dir_lookup_ino+0x1a4><== NOT EXECUTED
201f6d0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
201f6d4: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
201f6d8: 40 00 1d 44 call 2026be8 <strerror> <== NOT EXECUTED
201f6dc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
201f6e0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201f6e4: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201f6e8: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
201f6ec: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f6f0: 40 00 19 98 call 2025d50 <printf> <== NOT EXECUTED
201f6f4: 90 12 23 08 or %o0, 0x308, %o0 ! 2037708 <CSWTCH.1+0x81c> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
201f6f8: 10 bf ff 58 b 201f458 <rtems_rfs_dir_lookup_ino+0x1a4> <== NOT EXECUTED
201f6fc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
201f700: 40 00 1d 3a call 2026be8 <strerror> <== NOT EXECUTED
201f704: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
201f708: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
201f70c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201f710: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f714: 40 00 19 8f call 2025d50 <printf> <== NOT EXECUTED
201f718: 90 12 21 50 or %o0, 0x150, %o0 ! 2037550 <CSWTCH.1+0x664> <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
201f71c: 10 bf ff 2f b 201f3d8 <rtems_rfs_dir_lookup_ino+0x124> <== NOT EXECUTED
201f720: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
201f724: 90 10 00 18 mov %i0, %o0
201f728: 7f ff f8 79 call 201d90c <rtems_rfs_block_get_pos>
201f72c: 92 07 bf b0 add %fp, -80, %o1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
201f730: 90 10 20 00 clr %o0
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
201f734: d2 25 40 00 st %o1, [ %l5 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
201f738: 7f ff d2 c1 call 201423c <rtems_rfs_trace>
201f73c: 13 04 00 00 sethi %hi(0x10000000), %o1
201f740: 80 8a 20 ff btst 0xff, %o0
201f744: 22 bf ff 28 be,a 201f3e4 <rtems_rfs_dir_lookup_ino+0x130><== ALWAYS TAKEN
201f748: 92 07 bf f0 add %fp, -16, %o1
printf ("rtems-rfs: dir-lookup-ino: "
201f74c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
201f750: d4 07 00 00 ld [ %i4 ], %o2 <== NOT EXECUTED
201f754: d6 05 40 00 ld [ %l5 ], %o3 <== NOT EXECUTED
201f758: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f75c: 40 00 19 7d call 2025d50 <printf> <== NOT EXECUTED
201f760: 90 12 22 c0 or %o0, 0x2c0, %o0 ! 20376c0 <CSWTCH.1+0x7d4> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201f764: 10 bf ff 20 b 201f3e4 <rtems_rfs_dir_lookup_ino+0x130> <== NOT EXECUTED
201f768: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f76c: 90 10 20 00 clr %o0 <== NOT EXECUTED
201f770: 7f ff d2 b3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f774: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201f778: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f77c: 22 bf ff 19 be,a 201f3e0 <rtems_rfs_dir_lookup_ino+0x12c><== NOT EXECUTED
201f780: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
201f784: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
201f788: fa 07 bf fc ld [ %fp + -4 ], %i5 <== NOT EXECUTED
201f78c: 40 00 1d 17 call 2026be8 <strerror> <== NOT EXECUTED
201f790: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
201f794: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
201f798: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
201f79c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
201f7a0: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
201f7a4: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED
201f7a8: 40 00 19 6a call 2025d50 <printf> <== NOT EXECUTED
201f7ac: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED
201f7b0: 10 bf ff 0c b 201f3e0 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
201f7b4: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
201f7b8: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
201f7bc: 7f ff d2 a0 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201f7c0: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
201f7c4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201f7c8: 22 bf ff 07 be,a 201f3e4 <rtems_rfs_dir_lookup_ino+0x130><== NOT EXECUTED
201f7cc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
201f7d0: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
201f7d4: 40 00 1d 05 call 2026be8 <strerror> <== NOT EXECUTED
201f7d8: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
201f7dc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201f7e0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
201f7e4: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED
201f7e8: 11 00 80 dd sethi %hi(0x2037400), %o0 <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
201f7ec: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
201f7f0: 40 00 19 58 call 2025d50 <printf> <== NOT EXECUTED
201f7f4: 90 12 23 58 or %o0, 0x358, %o0 <== NOT EXECUTED
201f7f8: 10 bf fe fb b 201f3e4 <rtems_rfs_dir_lookup_ino+0x130> <== NOT EXECUTED
201f7fc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
020200b4 <rtems_rfs_dir_read>:
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
20200b4: 9d e3 bf 40 save %sp, -192, %sp <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
20200b8: 90 10 20 00 clr %o0 <== NOT EXECUTED
20200bc: 7f ff d0 60 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20200c0: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
20200c4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20200c8: 32 80 00 27 bne,a 2020164 <rtems_rfs_dir_read+0xb0> <== NOT EXECUTED
20200cc: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
20200d0: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
20200d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20200d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20200dc: 7f ff f6 41 call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
20200e0: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
20200e4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
20200e8: 24 80 00 04 ble,a 20200f8 <rtems_rfs_dir_read+0x44> <== NOT EXECUTED
20200ec: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
20200f0: 81 c7 e0 08 ret <== NOT EXECUTED
20200f4: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
20200f8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
20200fc: a2 10 00 10 mov %l0, %l1 <== NOT EXECUTED
2020100: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2020104: a0 10 20 00 clr %l0 <== NOT EXECUTED
2020108: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
202010c: 40 00 4a e3 call 2032c98 <__moddi3> <== NOT EXECUTED
2020110: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
2020114: 86 a4 40 09 subcc %l1, %o1, %g3 <== NOT EXECUTED
2020118: 84 64 00 08 subx %l0, %o0, %g2 <== NOT EXECUTED
202011c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2020120: 04 80 00 18 ble 2020180 <rtems_rfs_dir_read+0xcc> <== NOT EXECUTED
2020124: 01 00 00 00 nop <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
2020128: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
202012c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
2020130: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2020134: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
2020138: 7f ff f7 13 call 201dd84 <rtems_rfs_block_map_seek> <== NOT EXECUTED
202013c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
2020140: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
2020144: 04 80 00 25 ble 20201d8 <rtems_rfs_dir_read+0x124> <== NOT EXECUTED
2020148: 80 a4 20 06 cmp %l0, 6 <== NOT EXECUTED
{
if (rc == ENXIO)
202014c: 02 80 00 1f be 20201c8 <rtems_rfs_dir_read+0x114> <== NOT EXECUTED
2020150: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
2020154: 7f ff f6 87 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
2020158: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
202015c: 81 c7 e0 08 ret <== NOT EXECUTED
2020160: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
2020164: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2020168: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
202016c: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
2020170: 40 00 16 f8 call 2025d50 <printf> <== NOT EXECUTED
2020174: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
2020178: 10 bf ff d7 b 20200d4 <rtems_rfs_dir_read+0x20> <== NOT EXECUTED
202017c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
2020180: 12 80 00 06 bne 2020198 <rtems_rfs_dir_read+0xe4> <== NOT EXECUTED
2020184: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2020188: 80 a0 e0 0a cmp %g3, 0xa <== NOT EXECUTED
202018c: 38 bf ff e8 bgu,a 202012c <rtems_rfs_dir_read+0x78> <== NOT EXECUTED
2020190: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
2020194: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2020198: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
202019c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
20201a0: 40 00 49 d8 call 2032900 <__divdi3> <== NOT EXECUTED
20201a4: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
20201a8: 96 82 60 01 addcc %o1, 1, %o3 <== NOT EXECUTED
20201ac: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
20201b0: 94 42 20 00 addx %o0, 0, %o2 <== NOT EXECUTED
20201b4: 40 00 49 a1 call 2032838 <__muldi3> <== NOT EXECUTED
20201b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20201bc: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
20201c0: 10 bf ff da b 2020128 <rtems_rfs_dir_read+0x74> <== NOT EXECUTED
20201c4: b6 10 00 09 mov %o1, %i3 <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
20201c8: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
20201cc: 7f ff f6 69 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
20201d0: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
20201d4: 30 bf ff e2 b,a 202015c <rtems_rfs_dir_read+0xa8> <== NOT EXECUTED
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
20201d8: 25 00 00 3f sethi %hi(0xfc00), %l2 <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
20201dc: 29 00 80 de sethi %hi(0x2037800), %l4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20201e0: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
20201e4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
20201e8: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
20201ec: a4 14 a3 ff or %l2, 0x3ff, %l2 <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
20201f0: a8 15 23 28 or %l4, 0x328, %l4 <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
20201f4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
20201f8: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
20201fc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2020200: 7f ff f9 b3 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2020204: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (rc > 0)
2020208: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
202020c: 14 80 00 38 bg 20202ec <rtems_rfs_dir_read+0x238> <== NOT EXECUTED
2020210: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
2020214: ec 07 bf b4 ld [ %fp + -76 ], %l6 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
2020218: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
202021c: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
2020220: aa 00 40 16 add %g1, %l6, %l5 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
2020224: e6 08 40 16 ldub [ %g1 + %l6 ], %l3 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
2020228: e2 0d 60 08 ldub [ %l5 + 8 ], %l1 <== NOT EXECUTED
202022c: c8 0d 60 09 ldub [ %l5 + 9 ], %g4 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
2020230: c6 0d 60 01 ldub [ %l5 + 1 ], %g3 <== NOT EXECUTED
2020234: c4 0d 60 03 ldub [ %l5 + 3 ], %g2 <== NOT EXECUTED
2020238: c2 0d 60 02 ldub [ %l5 + 2 ], %g1 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
202023c: a3 2c 60 08 sll %l1, 8, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
2020240: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
2020244: a2 14 40 04 or %l1, %g4, %l1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
2020248: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
202024c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2020250: a6 14 c0 03 or %l3, %g3, %l3 <== NOT EXECUTED
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
2020254: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
2020258: a6 14 c0 02 or %l3, %g2, %l3 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
202025c: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED
2020260: 12 80 00 2d bne 2020314 <rtems_rfs_dir_read+0x260> <== NOT EXECUTED
2020264: a6 14 c0 01 or %l3, %g1, %l3 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
2020268: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED
202026c: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
2020270: ac 20 80 16 sub %g2, %l6, %l6 <== NOT EXECUTED
2020274: ac 00 40 16 add %g1, %l6, %l6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
2020278: 7f ff cf f1 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202027c: ec 27 40 00 st %l6, [ %i5 ] <== NOT EXECUTED
2020280: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020284: 12 80 00 0d bne 20202b8 <rtems_rfs_dir_read+0x204> <== NOT EXECUTED
2020288: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
202028c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
2020290: 7f ff f6 e7 call 201de2c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
2020294: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
2020298: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
202029c: 02 80 00 13 be 20202e8 <rtems_rfs_dir_read+0x234> <== NOT EXECUTED
20202a0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
20202a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20202a8: 02 bf ff d4 be 20201f8 <rtems_rfs_dir_read+0x144> <== NOT EXECUTED
20202ac: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
20202b0: 10 80 00 10 b 20202f0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
20202b4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
20202b8: d6 07 40 00 ld [ %i5 ], %o3 <== NOT EXECUTED
20202bc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
20202c0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
20202c4: 40 00 16 a3 call 2025d50 <printf> <== NOT EXECUTED
20202c8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
20202cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20202d0: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
20202d4: 7f ff f6 d6 call 201de2c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
20202d8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
20202dc: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
20202e0: 12 bf ff f1 bne 20202a4 <rtems_rfs_dir_read+0x1f0> <== NOT EXECUTED
20202e4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
rc = ENOENT;
20202e8: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED
20202ec: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
20202f0: 7f ff f8 fc call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20202f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
20202f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
20202fc: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2020300: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2020304: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2020308: 7f ff f6 1a call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
202030c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
2020310: 30 bf ff 78 b,a 20200f0 <rtems_rfs_dir_read+0x3c> <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
2020314: 80 a4 60 0a cmp %l1, 0xa <== NOT EXECUTED
2020318: 04 80 00 0d ble 202034c <rtems_rfs_dir_read+0x298> <== NOT EXECUTED
202031c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2020320: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
2020324: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
2020328: 1a 80 00 0a bcc 2020350 <rtems_rfs_dir_read+0x29c> <== NOT EXECUTED
202032c: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
2020330: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
2020334: 02 80 00 07 be 2020350 <rtems_rfs_dir_read+0x29c> <== NOT EXECUTED
2020338: 01 00 00 00 nop <== NOT EXECUTED
202033c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2020340: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED
2020344: 3a 80 00 11 bcc,a 2020388 <rtems_rfs_dir_read+0x2d4> <== NOT EXECUTED
2020348: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
202034c: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
2020350: 7f ff cf bb call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020354: a0 10 20 05 mov 5, %l0 <== NOT EXECUTED
2020358: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
202035c: 22 bf ff e5 be,a 20202f0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
2020360: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
2020364: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2020368: d8 07 bf b4 ld [ %fp + -76 ], %o4 <== NOT EXECUTED
202036c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2020370: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
2020374: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
2020378: 40 00 16 76 call 2025d50 <printf> <== NOT EXECUTED
202037c: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020380: 10 bf ff dc b 20202f0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
2020384: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
2020388: 92 10 20 00 clr %o1 <== NOT EXECUTED
202038c: 40 00 16 1f call 2025c08 <memset> <== NOT EXECUTED
2020390: 94 10 21 18 mov 0x118, %o2 <== NOT EXECUTED
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
2020394: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
2020398: 84 10 21 18 mov 0x118, %g2 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
202039c: f4 3f 20 08 std %i2, [ %i4 + 8 ] <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
20203a0: c4 37 20 10 sth %g2, [ %i4 + 0x10 ] <== NOT EXECUTED
*length += elength;
20203a4: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED
20203a8: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
20203ac: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED
20203b0: 84 20 80 16 sub %g2, %l6, %g2 <== NOT EXECUTED
20203b4: 84 20 80 11 sub %g2, %l1, %g2 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
20203b8: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
20203bc: 14 80 00 04 bg 20203cc <rtems_rfs_dir_read+0x318> <== NOT EXECUTED
20203c0: a2 04 7f f6 add %l1, -10, %l1 <== NOT EXECUTED
*length += remaining;
20203c4: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
20203c8: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
20203cc: 80 a4 60 ff cmp %l1, 0xff <== NOT EXECUTED
20203d0: 34 80 00 02 bg,a 20203d8 <rtems_rfs_dir_read+0x324> <== NOT EXECUTED
20203d4: a2 10 20 ff mov 0xff, %l1 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
20203d8: 92 05 60 0a add %l5, 0xa, %o1 <== NOT EXECUTED
20203dc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
20203e0: ba 07 20 14 add %i4, 0x14, %i5 <== NOT EXECUTED
20203e4: 40 00 15 7d call 20259d8 <memcpy> <== NOT EXECUTED
20203e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
20203ec: c8 0d 40 00 ldub [ %l5 ], %g4 <== NOT EXECUTED
20203f0: c6 0d 60 01 ldub [ %l5 + 1 ], %g3 <== NOT EXECUTED
20203f4: c4 0d 60 03 ldub [ %l5 + 3 ], %g2 <== NOT EXECUTED
20203f8: c2 0d 60 02 ldub [ %l5 + 2 ], %g1 <== NOT EXECUTED
20203fc: 89 29 20 18 sll %g4, 0x18, %g4 <== NOT EXECUTED
2020400: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
2020404: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2020408: 86 11 00 03 or %g4, %g3, %g3 <== NOT EXECUTED
202040c: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
2020410: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
dirent->d_namlen = elength;
2020414: e2 37 20 12 sth %l1, [ %i4 + 0x12 ] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
2020418: 90 10 20 00 clr %o0 <== NOT EXECUTED
202041c: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
2020420: 7f ff cf 87 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020424: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
2020428: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
202042c: 22 bf ff b1 be,a 20202f0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
2020430: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
2020434: c4 1f 20 08 ldd [ %i4 + 8 ], %g2 <== NOT EXECUTED
2020438: d6 07 00 00 ld [ %i4 ], %o3 <== NOT EXECUTED
202043c: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
2020440: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
2020444: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
2020448: 98 10 00 1d mov %i5, %o4 <== NOT EXECUTED
202044c: 40 00 16 41 call 2025d50 <printf> <== NOT EXECUTED
2020450: 90 12 22 f0 or %o0, 0x2f0, %o0 <== NOT EXECUTED
2020454: 10 bf ff a7 b 20202f0 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
2020458: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
02020a34 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
2020a34: 9d e3 bf a0 save %sp, -96, %sp
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
2020a38: 90 10 20 10 mov 0x10, %o0
2020a3c: 92 10 20 00 clr %o1
2020a40: 7f ff cd ff call 201423c <rtems_rfs_trace>
2020a44: ba 10 00 18 mov %i0, %i5
2020a48: 80 8a 20 ff btst 0xff, %o0
2020a4c: 32 80 00 87 bne,a 2020c68 <rtems_rfs_file_close+0x234> <== NEVER TAKEN
2020a50: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
if (handle->shared->references > 0)
2020a54: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
2020a58: c2 02 60 08 ld [ %o1 + 8 ], %g1
2020a5c: 80 a0 60 00 cmp %g1, 0
2020a60: 04 80 00 04 ble 2020a70 <rtems_rfs_file_close+0x3c> <== NEVER TAKEN
2020a64: 82 00 7f ff add %g1, -1, %g1
handle->shared->references--;
2020a68: c2 22 60 08 st %g1, [ %o1 + 8 ]
if (handle->shared->references == 0)
2020a6c: 80 a0 60 00 cmp %g1, 0
2020a70: 12 80 00 74 bne 2020c40 <rtems_rfs_file_close+0x20c> <== NEVER TAKEN
2020a74: 90 10 00 1d mov %i5, %o0
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
2020a78: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
2020a7c: 80 a0 60 00 cmp %g1, 0
2020a80: 22 80 00 a7 be,a 2020d1c <rtems_rfs_file_close+0x2e8> <== ALWAYS TAKEN
2020a84: 92 02 60 0c add %o1, 0xc, %o1
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
2020a88: c4 02 60 8c ld [ %o1 + 0x8c ], %g2
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2020a8c: 86 10 20 01 mov 1, %g3
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
2020a90: 89 30 a0 18 srl %g2, 0x18, %g4
2020a94: c8 28 60 10 stb %g4, [ %g1 + 0x10 ]
2020a98: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
2020a9c: 89 30 a0 10 srl %g2, 0x10, %g4
2020aa0: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
2020aa4: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
2020aa8: 89 30 a0 08 srl %g2, 8, %g4
2020aac: c8 28 60 12 stb %g4, [ %g1 + 0x12 ]
2020ab0: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
2020ab4: c4 28 60 13 stb %g2, [ %g1 + 0x13 ]
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
2020ab8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2020abc: c6 2a 60 1c stb %g3, [ %o1 + 0x1c ]
2020ac0: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2020ac4: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
2020ac8: b9 30 60 18 srl %g1, 0x18, %i4
2020acc: f8 29 20 14 stb %i4, [ %g4 + 0x14 ]
2020ad0: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
2020ad4: b9 30 60 10 srl %g1, 0x10, %i4
2020ad8: f8 29 20 15 stb %i4, [ %g4 + 0x15 ]
2020adc: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
2020ae0: b9 30 60 08 srl %g1, 8, %i4
2020ae4: f8 29 20 16 stb %i4, [ %g4 + 0x16 ]
2020ae8: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
2020aec: c2 29 20 17 stb %g1, [ %g4 + 0x17 ]
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
2020af0: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2020af4: c6 28 a0 1c stb %g3, [ %g2 + 0x1c ]
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
2020af8: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
2020afc: c4 00 60 94 ld [ %g1 + 0x94 ], %g2
2020b00: b9 30 a0 18 srl %g2, 0x18, %i4
2020b04: f8 29 20 18 stb %i4, [ %g4 + 0x18 ]
2020b08: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
2020b0c: b9 30 a0 10 srl %g2, 0x10, %i4
2020b10: f8 29 20 19 stb %i4, [ %g4 + 0x19 ]
2020b14: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
2020b18: b9 30 a0 08 srl %g2, 8, %i4
2020b1c: f8 29 20 1a stb %i4, [ %g4 + 0x1a ]
2020b20: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
2020b24: c4 29 20 1b stb %g2, [ %g4 + 0x1b ]
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
2020b28: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2020b2c: c6 28 60 1c stb %g3, [ %g1 + 0x1c ]
2020b30: c4 02 60 3c ld [ %o1 + 0x3c ], %g2
2020b34: c2 02 60 84 ld [ %o1 + 0x84 ], %g1
2020b38: 80 a0 40 02 cmp %g1, %g2
2020b3c: 02 80 00 72 be 2020d04 <rtems_rfs_file_close+0x2d0> <== ALWAYS TAKEN
2020b40: c4 02 60 88 ld [ %o1 + 0x88 ], %g2
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
2020b44: c2 22 60 3c st %g1, [ %o1 + 0x3c ] <== NOT EXECUTED
2020b48: c4 22 60 40 st %g2, [ %o1 + 0x40 ] <== NOT EXECUTED
map->dirty = true;
2020b4c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2020b50: b0 10 20 00 clr %i0 <== NOT EXECUTED
2020b54: c2 2a 60 34 stb %g1, [ %o1 + 0x34 ] <== NOT EXECUTED
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
2020b58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020b5c: 7f ff f4 05 call 201db70 <rtems_rfs_block_map_close>
2020b60: 92 02 60 34 add %o1, 0x34, %o1
if (rc > 0)
2020b64: b8 92 20 00 orcc %o0, 0, %i4
2020b68: 04 80 00 0a ble 2020b90 <rtems_rfs_file_close+0x15c> <== ALWAYS TAKEN
2020b6c: 90 10 20 10 mov 0x10, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
2020b70: 7f ff cd b3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020b74: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020b78: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020b7c: 32 80 00 57 bne,a 2020cd8 <rtems_rfs_file_close+0x2a4> <== NOT EXECUTED
2020b80: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
2020b84: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2020b88: 22 80 00 02 be,a 2020b90 <rtems_rfs_file_close+0x15c> <== NOT EXECUTED
2020b8c: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
2020b90: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
2020b94: 90 10 00 1d mov %i5, %o0
2020b98: 7f ff c1 44 call 20110a8 <rtems_rfs_inode_close>
2020b9c: 92 02 60 0c add %o1, 0xc, %o1
if (rc > 0)
2020ba0: b8 92 20 00 orcc %o0, 0, %i4
2020ba4: 04 80 00 0a ble 2020bcc <rtems_rfs_file_close+0x198> <== ALWAYS TAKEN
2020ba8: 90 10 20 10 mov 0x10, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
2020bac: 7f ff cd a4 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020bb0: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020bb4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020bb8: 32 80 00 3d bne,a 2020cac <rtems_rfs_file_close+0x278> <== NOT EXECUTED
2020bbc: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
2020bc0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2020bc4: 22 80 00 2f be,a 2020c80 <rtems_rfs_file_close+0x24c> <== NOT EXECUTED
2020bc8: d0 06 60 1c ld [ %i1 + 0x1c ], %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2020bcc: 7f ff ac c3 call 200bed8 <_Chain_Extract>
2020bd0: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
2020bd4: 7f ff 96 61 call 2006558 <free>
2020bd8: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020bdc: 90 10 00 1d mov %i5, %o0
2020be0: 7f ff f6 c0 call 201e6e0 <rtems_rfs_buffer_handle_release>
2020be4: 92 06 60 04 add %i1, 4, %o1
handle->dirty = false;
2020be8: c0 2e 60 04 clrb [ %i1 + 4 ]
handle->bnum = 0;
2020bec: c0 26 60 08 clr [ %i1 + 8 ]
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
2020bf0: 80 a6 20 00 cmp %i0, 0
2020bf4: 04 80 00 19 ble 2020c58 <rtems_rfs_file_close+0x224> <== ALWAYS TAKEN
2020bf8: c0 26 60 0c clr [ %i1 + 0xc ]
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
2020bfc: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED
2020c00: 7f ff cd 8f call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020c04: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020c08: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020c0c: 02 80 00 13 be 2020c58 <rtems_rfs_file_close+0x224> <== NOT EXECUTED
2020c10: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
2020c14: 40 00 17 f5 call 2026be8 <strerror> <== NOT EXECUTED
2020c18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2020c1c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2020c20: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2020c24: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020c28: 40 00 14 4a call 2025d50 <printf> <== NOT EXECUTED
2020c2c: 90 12 21 58 or %o0, 0x158, %o0 ! 2037d58 <CSWTCH.1+0xe6c> <== NOT EXECUTED
}
free (handle);
2020c30: 7f ff 96 4a call 2006558 <free> <== NOT EXECUTED
2020c34: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return rrc;
}
2020c38: 81 c7 e0 08 ret <== NOT EXECUTED
2020c3c: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020c40: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED
2020c44: 7f ff f6 a7 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2020c48: b0 10 20 00 clr %i0 <== NOT EXECUTED
handle->dirty = false;
2020c4c: c0 2e 60 04 clrb [ %i1 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
2020c50: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
2020c54: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
2020c58: 7f ff 96 40 call 2006558 <free>
2020c5c: 90 10 00 19 mov %i1, %o0
return rrc;
}
2020c60: 81 c7 e0 08 ret
2020c64: 81 e8 00 00 restore
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
2020c68: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020c6c: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 <== NOT EXECUTED
2020c70: 40 00 14 38 call 2025d50 <printf> <== NOT EXECUTED
2020c74: 90 12 20 b0 or %o0, 0xb0, %o0 <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
2020c78: 10 bf ff 78 b 2020a58 <rtems_rfs_file_close+0x24> <== NOT EXECUTED
2020c7c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
2020c80: 7f ff ac 96 call 200bed8 <_Chain_Extract> <== NOT EXECUTED
2020c84: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
if (rrc == 0)
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
2020c88: 7f ff 96 34 call 2006558 <free> <== NOT EXECUTED
2020c8c: d0 06 60 1c ld [ %i1 + 0x1c ], %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020c90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020c94: 7f ff f6 93 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2020c98: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED
handle->dirty = false;
2020c9c: c0 2e 60 04 clrb [ %i1 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
2020ca0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
2020ca4: 10 bf ff d6 b 2020bfc <rtems_rfs_file_close+0x1c8> <== NOT EXECUTED
2020ca8: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
2020cac: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2020cb0: 40 00 17 ce call 2026be8 <strerror> <== NOT EXECUTED
2020cb4: f6 00 60 14 ld [ %g1 + 0x14 ], %i3 <== NOT EXECUTED
2020cb8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2020cbc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2020cc0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2020cc4: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020cc8: 40 00 14 22 call 2025d50 <printf> <== NOT EXECUTED
2020ccc: 90 12 21 18 or %o0, 0x118, %o0 ! 2037d18 <CSWTCH.1+0xe2c> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
2020cd0: 10 bf ff bd b 2020bc4 <rtems_rfs_file_close+0x190> <== NOT EXECUTED
2020cd4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
2020cd8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2020cdc: 40 00 17 c3 call 2026be8 <strerror> <== NOT EXECUTED
2020ce0: f6 00 60 14 ld [ %g1 + 0x14 ], %i3 <== NOT EXECUTED
2020ce4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2020ce8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2020cec: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2020cf0: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020cf4: 40 00 14 17 call 2025d50 <printf> <== NOT EXECUTED
2020cf8: 90 12 20 d8 or %o0, 0xd8, %o0 ! 2037cd8 <CSWTCH.1+0xdec> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
2020cfc: 10 bf ff a3 b 2020b88 <rtems_rfs_file_close+0x154> <== NOT EXECUTED
2020d00: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
2020d04: c6 02 60 40 ld [ %o1 + 0x40 ], %g3
2020d08: 80 a0 80 03 cmp %g2, %g3
2020d0c: 12 bf ff 8e bne 2020b44 <rtems_rfs_file_close+0x110> <== NEVER TAKEN
2020d10: b0 10 20 00 clr %i0
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
2020d14: 10 bf ff 92 b 2020b5c <rtems_rfs_file_close+0x128>
2020d18: 90 10 00 1d mov %i5, %o0
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
2020d1c: 7f ff c0 40 call 2010e1c <rtems_rfs_inode_load>
2020d20: 90 10 00 1d mov %i5, %o0
if (rrc == 0)
2020d24: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
2020d28: 80 a2 20 00 cmp %o0, 0
2020d2c: 12 bf ff 8b bne 2020b58 <rtems_rfs_file_close+0x124> <== NEVER TAKEN
2020d30: b0 10 00 08 mov %o0, %i0
2020d34: 10 bf ff 55 b 2020a88 <rtems_rfs_file_close+0x54>
2020d38: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
02021650 <rtems_rfs_file_get_shared>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2021650: c2 02 20 70 ld [ %o0 + 0x70 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
2021654: 84 02 20 74 add %o0, 0x74, %g2
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
2021658: 80 a0 40 02 cmp %g1, %g2
202165c: 02 80 00 10 be 202169c <rtems_rfs_file_get_shared+0x4c> <== ALWAYS TAKEN
2021660: 90 10 20 00 clr %o0
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
2021664: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 <== NOT EXECUTED
2021668: 80 a0 c0 09 cmp %g3, %o1 <== NOT EXECUTED
202166c: 12 80 00 06 bne 2021684 <rtems_rfs_file_get_shared+0x34> <== NOT EXECUTED
2021670: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
2021674: 30 80 00 0a b,a 202169c <rtems_rfs_file_get_shared+0x4c> <== NOT EXECUTED
2021678: 80 a0 c0 09 cmp %g3, %o1 <== NOT EXECUTED
202167c: 02 80 00 08 be 202169c <rtems_rfs_file_get_shared+0x4c> <== NOT EXECUTED
2021680: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2021684: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
2021688: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
202168c: 32 bf ff fb bne,a 2021678 <rtems_rfs_file_get_shared+0x28><== NOT EXECUTED
2021690: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 <== NOT EXECUTED
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
2021694: 81 c3 e0 08 retl <== NOT EXECUTED
2021698: 90 10 20 00 clr %o0 <== NOT EXECUTED
202169c: 81 c3 e0 08 retl
02020f70 <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
2020f70: 9d e3 bf a0 save %sp, -96, %sp
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020f74: 90 10 20 20 mov 0x20, %o0
2020f78: 92 10 20 00 clr %o1
2020f7c: 7f ff cc b0 call 201423c <rtems_rfs_trace>
2020f80: ba 10 00 18 mov %i0, %i5
2020f84: 80 8a 20 ff btst 0xff, %o0
2020f88: 22 80 00 0b be,a 2020fb4 <rtems_rfs_file_io_end+0x44> <== ALWAYS TAKEN
2020f8c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
2020f90: 13 00 80 d2 sethi %hi(0x2034800), %o1 <== NOT EXECUTED
2020f94: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2020f98: 12 80 00 66 bne 2021130 <rtems_rfs_file_io_end+0x1c0> <== NOT EXECUTED
2020f9c: 92 12 61 68 or %o1, 0x168, %o1 <== NOT EXECUTED
2020fa0: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020fa4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2020fa8: 40 00 13 6a call 2025d50 <printf> <== NOT EXECUTED
2020fac: 90 12 22 38 or %o0, 0x238, %o0 <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
2020fb0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
2020fb4: 80 a0 60 00 cmp %g1, 0
2020fb8: 02 80 00 a0 be 2021238 <rtems_rfs_file_io_end+0x2c8> <== NEVER TAKEN
2020fbc: 80 a6 a0 00 cmp %i2, 0
{
if (!read)
2020fc0: 02 80 00 18 be 2021020 <rtems_rfs_file_io_end+0xb0>
2020fc4: 82 10 20 01 mov 1, %g1
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
2020fc8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2020fcc: 92 07 60 04 add %i5, 4, %o1
2020fd0: 7f ff f5 c4 call 201e6e0 <rtems_rfs_buffer_handle_release>
2020fd4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_file_buffer (handle));
if (rc > 0)
2020fd8: b0 92 20 00 orcc %o0, 0, %i0
2020fdc: 24 80 00 1a ble,a 2021044 <rtems_rfs_file_io_end+0xd4> <== ALWAYS TAKEN
2020fe0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
{
printf (
2020fe4: 3b 00 80 d2 sethi %hi(0x2034800), %i5 <== NOT EXECUTED
2020fe8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2020fec: 12 80 00 54 bne 202113c <rtems_rfs_file_io_end+0x1cc> <== NOT EXECUTED
2020ff0: ba 17 61 68 or %i5, 0x168, %i5 <== NOT EXECUTED
2020ff4: 40 00 16 fd call 2026be8 <strerror> <== NOT EXECUTED
2020ff8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2020ffc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021000: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
2021004: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2021008: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
202100c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2021010: 40 00 13 50 call 2025d50 <printf> <== NOT EXECUTED
2021014: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
2021018: 81 c7 e0 08 ret <== NOT EXECUTED
202101c: 81 e8 00 00 restore <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
if (!read)
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
2021020: c2 2f 60 04 stb %g1, [ %i5 + 4 ]
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
2021024: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2021028: 92 07 60 04 add %i5, 4, %o1
202102c: 7f ff f5 ad call 201e6e0 <rtems_rfs_buffer_handle_release>
2021030: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_file_buffer (handle));
if (rc > 0)
2021034: b0 92 20 00 orcc %o0, 0, %i0
2021038: 34 bf ff ec bg,a 2020fe8 <rtems_rfs_file_io_end+0x78> <== NEVER TAKEN
202103c: 3b 00 80 d2 sethi %hi(0x2034800), %i5 <== NOT EXECUTED
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
2021040: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 ! 203481c <_rodata_start+0x2ec>
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
2021044: c6 07 60 14 ld [ %i5 + 0x14 ], %g3
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
2021048: c4 00 60 98 ld [ %g1 + 0x98 ], %g2
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
202104c: b2 06 40 03 add %i1, %g3, %i1
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
2021050: c4 00 a0 08 ld [ %g2 + 8 ], %g2
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
2021054: 80 a6 40 02 cmp %i1, %g2
2021058: 0a 80 00 07 bcs 2021074 <rtems_rfs_file_io_end+0x104> <== ALWAYS TAKEN
202105c: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
2021060: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
2021064: b2 26 40 02 sub %i1, %g2, %i1 <== NOT EXECUTED
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
2021068: 86 00 e0 01 inc %g3 <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
202106c: f2 27 60 14 st %i1, [ %i5 + 0x14 ] <== NOT EXECUTED
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
2021070: c6 27 60 10 st %g3, [ %i5 + 0x10 ] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
2021074: 80 a6 a0 00 cmp %i2, 0
2021078: 12 80 00 0e bne 20210b0 <rtems_rfs_file_io_end+0x140>
202107c: b2 10 20 00 clr %i1
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
2021080: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
}
length = false;
mtime = false;
if (!read &&
2021084: 80 a0 a0 00 cmp %g2, 0
2021088: 02 80 00 5e be 2021200 <rtems_rfs_file_io_end+0x290> <== ALWAYS TAKEN
202108c: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
2021090: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2021094: 12 80 00 5c bne 2021204 <rtems_rfs_file_io_end+0x294> <== NOT EXECUTED
2021098: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
202109c: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
20210a0: c4 20 60 40 st %g2, [ %g1 + 0x40 ] <== NOT EXECUTED
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
20210a4: b2 10 20 01 mov 1, %i1
map->dirty = true;
20210a8: 84 10 20 01 mov 1, %g2
20210ac: c4 28 60 34 stb %g2, [ %g1 + 0x34 ]
}
atime = rtems_rfs_file_update_atime (handle);
20210b0: c2 07 40 00 ld [ %i5 ], %g1
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
20210b4: b8 10 20 00 clr %i4
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
20210b8: b6 08 60 01 and %g1, 1, %i3
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
20210bc: 80 88 60 02 btst 2, %g1
20210c0: 12 80 00 03 bne 20210cc <rtems_rfs_file_io_end+0x15c> <== NEVER TAKEN
20210c4: b6 1e e0 01 xor %i3, 1, %i3
20210c8: b8 10 00 19 mov %i1, %i4
length = rtems_rfs_file_update_length (handle) && length;
20210cc: 82 08 60 04 and %g1, 4, %g1
20210d0: 80 a0 00 01 cmp %g0, %g1
20210d4: 82 40 3f ff addx %g0, -1, %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
20210d8: 90 10 20 20 mov 0x20, %o0
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
20210dc: b2 0e 40 01 and %i1, %g1, %i1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
20210e0: 92 10 20 00 clr %o1
20210e4: 7f ff cc 56 call 201423c <rtems_rfs_trace>
20210e8: b6 0e e0 ff and %i3, 0xff, %i3
20210ec: 80 8a 20 ff btst 0xff, %o0
20210f0: 12 80 00 2b bne 202119c <rtems_rfs_file_io_end+0x22c> <== NEVER TAKEN
20210f4: b2 0e 60 ff and %i1, 0xff, %i1
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
20210f8: 80 a6 e0 00 cmp %i3, 0
20210fc: 12 80 00 1d bne 2021170 <rtems_rfs_file_io_end+0x200> <== ALWAYS TAKEN
2021100: 80 8f 20 ff btst 0xff, %i4
2021104: 12 80 00 1b bne 2021170 <rtems_rfs_file_io_end+0x200> <== NOT EXECUTED
2021108: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
202110c: 02 80 00 17 be 2021168 <rtems_rfs_file_io_end+0x1f8>
2021110: 01 00 00 00 nop
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
2021114: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
2021118: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
202111c: c4 00 60 40 ld [ %g1 + 0x40 ], %g2
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
2021120: c6 20 60 84 st %g3, [ %g1 + 0x84 ]
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
2021124: c4 20 60 88 st %g2, [ %g1 + 0x88 ]
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
2021128: 81 c7 e0 08 ret
202112c: 81 e8 00 00 restore
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
2021130: 13 00 80 da sethi %hi(0x2036800), %o1 <== NOT EXECUTED
2021134: 10 bf ff 9b b 2020fa0 <rtems_rfs_file_io_end+0x30> <== NOT EXECUTED
2021138: 92 12 63 00 or %o1, 0x300, %o1 ! 2036b00 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
if (rc > 0)
{
printf (
202113c: 40 00 16 ab call 2026be8 <strerror> <== NOT EXECUTED
2021140: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021144: 3b 00 80 da sethi %hi(0x2036800), %i5 <== NOT EXECUTED
2021148: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
202114c: ba 17 63 00 or %i5, 0x300, %i5 <== NOT EXECUTED
2021150: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2021154: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021158: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
202115c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2021160: 40 00 12 fc call 2025d50 <printf> <== NOT EXECUTED
2021164: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
2021168: 81 c7 e0 08 ret
202116c: 81 e8 00 00 restore
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
{
time_t now = time (NULL);
2021170: 40 00 21 d5 call 20298c4 <time>
2021174: 90 10 20 00 clr %o0
if (read && atime)
2021178: 80 a6 a0 00 cmp %i2, 0
202117c: 02 80 00 1c be 20211ec <rtems_rfs_file_io_end+0x27c>
2021180: 80 8f 20 ff btst 0xff, %i4
2021184: 80 a6 e0 00 cmp %i3, 0
2021188: 02 bf ff e1 be 202110c <rtems_rfs_file_io_end+0x19c> <== NEVER TAKEN
202118c: 80 a6 60 00 cmp %i1, 0
handle->shared->atime = now;
2021190: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2021194: 10 bf ff de b 202110c <rtems_rfs_file_io_end+0x19c>
2021198: d0 20 60 8c st %o0, [ %g1 + 0x8c ]
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
202119c: 80 a0 00 1b cmp %g0, %i3 <== NOT EXECUTED
20211a0: 82 0f 20 ff and %i4, 0xff, %g1 <== NOT EXECUTED
20211a4: 96 40 3f ff addx %g0, -1, %o3 <== NOT EXECUTED
20211a8: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 <== NOT EXECUTED
20211ac: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
20211b0: d4 07 60 14 ld [ %i5 + 0x14 ], %o2 <== NOT EXECUTED
20211b4: 98 40 3f ff addx %g0, -1, %o4 <== NOT EXECUTED
20211b8: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
20211bc: 96 0a ff ec and %o3, -20, %o3 <== NOT EXECUTED
20211c0: 9a 40 3f ff addx %g0, -1, %o5 <== NOT EXECUTED
20211c4: 98 0b 3f e0 and %o4, -32, %o4 <== NOT EXECUTED
20211c8: 9a 0b 7f e1 and %o5, -31, %o5 <== NOT EXECUTED
20211cc: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
20211d0: 96 02 e0 41 add %o3, 0x41, %o3 <== NOT EXECUTED
20211d4: 98 03 20 4d add %o4, 0x4d, %o4 <== NOT EXECUTED
20211d8: 9a 03 60 4c add %o5, 0x4c, %o5 <== NOT EXECUTED
20211dc: 40 00 12 dd call 2025d50 <printf> <== NOT EXECUTED
20211e0: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
20211e4: 10 bf ff c6 b 20210fc <rtems_rfs_file_io_end+0x18c> <== NOT EXECUTED
20211e8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
20211ec: 02 bf ff c8 be 202110c <rtems_rfs_file_io_end+0x19c>
20211f0: 80 a6 60 00 cmp %i1, 0
handle->shared->mtime = now;
20211f4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20211f8: 10 bf ff c5 b 202110c <rtems_rfs_file_io_end+0x19c>
20211fc: d0 20 60 90 st %o0, [ %g1 + 0x90 ]
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
2021200: 80 a0 80 03 cmp %g2, %g3
2021204: 3a bf ff a7 bcc,a 20210a0 <rtems_rfs_file_io_end+0x130> <== NEVER TAKEN
2021208: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
202120c: 86 00 ff ff add %g3, -1, %g3
2021210: 80 a0 80 03 cmp %g2, %g3
2021214: 12 bf ff a7 bne 20210b0 <rtems_rfs_file_io_end+0x140> <== NEVER TAKEN
2021218: b2 10 20 00 clr %i1
202121c: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
2021220: c6 00 60 40 ld [ %g1 + 0x40 ], %g3
2021224: 80 a0 80 03 cmp %g2, %g3
2021228: 28 bf ff a3 bleu,a 20210b4 <rtems_rfs_file_io_end+0x144>
202122c: c2 07 40 00 ld [ %i5 ], %g1
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
2021230: 10 bf ff 9d b 20210a4 <rtems_rfs_file_io_end+0x134>
2021234: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
2021238: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
202123c: c6 07 60 14 ld [ %i5 + 0x14 ], %g3 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
2021240: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
2021244: b2 06 40 03 add %i1, %g3, %i1 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
2021248: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
202124c: f2 27 60 14 st %i1, [ %i5 + 0x14 ] <== NOT EXECUTED
if (handle->bpos.boff >=
2021250: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED
2021254: 0a bf ff 88 bcs 2021074 <rtems_rfs_file_io_end+0x104> <== NOT EXECUTED
2021258: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
202125c: 10 bf ff 82 b 2021064 <rtems_rfs_file_io_end+0xf4> <== NOT EXECUTED
2021260: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 <== NOT EXECUTED
02021264 <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
2021264: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED
2021268: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
202126c: 02 80 00 07 be 2021288 <rtems_rfs_file_io_release+0x24> <== NOT EXECUTED
2021270: 92 02 20 04 add %o0, 4, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
2021274: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED
2021278: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
202127c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2021280: 7f ff f5 18 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2021284: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
2021288: 81 c3 e0 08 retl <== NOT EXECUTED
202128c: 90 10 20 00 clr %o0 <== NOT EXECUTED
02020d3c <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
2020d3c: 9d e3 bf 98 save %sp, -104, %sp
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020d40: 90 10 20 20 mov 0x20, %o0
2020d44: 92 10 20 00 clr %o1
2020d48: 7f ff cd 3d call 201423c <rtems_rfs_trace>
2020d4c: ba 10 00 18 mov %i0, %i5
2020d50: 80 8a 20 ff btst 0xff, %o0
2020d54: 22 80 00 0c be,a 2020d84 <rtems_rfs_file_io_start+0x48> <== ALWAYS TAKEN
2020d58: c2 07 60 0c ld [ %i5 + 0xc ], %g1
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
2020d5c: 13 00 80 d2 sethi %hi(0x2034800), %o1 <== NOT EXECUTED
2020d60: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2020d64: 12 80 00 2d bne 2020e18 <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
2020d68: 92 12 61 68 or %o1, 0x168, %o1 <== NOT EXECUTED
2020d6c: d4 07 60 10 ld [ %i5 + 0x10 ], %o2 <== NOT EXECUTED
2020d70: d6 07 60 14 ld [ %i5 + 0x14 ], %o3 <== NOT EXECUTED
2020d74: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020d78: 40 00 13 f6 call 2025d50 <printf> <== NOT EXECUTED
2020d7c: 90 12 21 80 or %o0, 0x180, %o0 ! 2037d80 <CSWTCH.1+0xe94> <== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
2020d80: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
2020d84: 80 a0 60 00 cmp %g1, 0
2020d88: 22 80 00 2d be,a 2020e3c <rtems_rfs_file_io_start+0x100> <== ALWAYS TAKEN
2020d8c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
block, request_read);
if (rc > 0)
return rc;
}
if (read
2020d90: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2020d94: 02 80 00 0d be 2020dc8 <rtems_rfs_file_io_start+0x8c>
2020d98: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
2020d9c: c4 00 60 44 ld [ %g1 + 0x44 ], %g2
2020da0: 80 a0 a0 00 cmp %g2, 0
2020da4: 12 80 00 20 bne 2020e24 <rtems_rfs_file_io_start+0xe8> <== NEVER TAKEN
2020da8: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
2020dac: 80 a0 e0 00 cmp %g3, 0
2020db0: 12 80 00 1e bne 2020e28 <rtems_rfs_file_io_start+0xec> <== ALWAYS TAKEN
2020db4: 86 00 ff ff add %g3, -1, %g3
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
2020db8: f4 00 60 40 ld [ %g1 + 0x40 ], %i2 <== NOT EXECUTED
2020dbc: 80 a6 a0 00 cmp %i2, 0
2020dc0: 32 80 00 05 bne,a 2020dd4 <rtems_rfs_file_io_start+0x98> <== ALWAYS TAKEN
2020dc4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
2020dc8: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
2020dcc: f4 00 60 08 ld [ %g1 + 8 ], %i2
*available = size - rtems_rfs_file_block_offset (handle);
2020dd0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020dd4: 90 10 20 20 mov 0x20, %o0
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
2020dd8: 82 26 80 01 sub %i2, %g1, %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020ddc: 92 10 20 00 clr %o1
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
2020de0: c2 26 40 00 st %g1, [ %i1 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020de4: 7f ff cd 16 call 201423c <rtems_rfs_trace>
2020de8: b0 10 20 00 clr %i0
2020dec: 80 8a 20 ff btst 0xff, %o0
2020df0: 32 80 00 04 bne,a 2020e00 <rtems_rfs_file_io_start+0xc4> <== NEVER TAKEN
2020df4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
2020df8: 81 c7 e0 08 ret
2020dfc: 81 e8 00 00 restore
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
2020e00: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2020e04: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020e08: 40 00 13 d2 call 2025d50 <printf> <== NOT EXECUTED
2020e0c: 90 12 22 08 or %o0, 0x208, %o0 ! 2037e08 <CSWTCH.1+0xf1c> <== NOT EXECUTED
*available, size);
return 0;
}
2020e10: 81 c7 e0 08 ret <== NOT EXECUTED
2020e14: 81 e8 00 00 restore <== NOT EXECUTED
bool read)
{
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
2020e18: 13 00 80 da sethi %hi(0x2036800), %o1 <== NOT EXECUTED
2020e1c: 10 bf ff d4 b 2020d6c <rtems_rfs_file_io_start+0x30> <== NOT EXECUTED
2020e20: 92 12 63 00 or %o1, 0x300, %o1 ! 2036b00 <rtems_rfs_rtems_link_handlers+0x2f0><== NOT EXECUTED
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
2020e24: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
2020e28: 80 a0 80 03 cmp %g2, %g3
2020e2c: 32 bf ff e8 bne,a 2020dcc <rtems_rfs_file_io_start+0x90> <== NEVER TAKEN
2020e30: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 <== NOT EXECUTED
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
2020e34: 10 bf ff e2 b 2020dbc <rtems_rfs_file_io_start+0x80>
2020e38: f4 00 60 40 ld [ %g1 + 0x40 ], %i2
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
2020e3c: 94 07 60 10 add %i5, 0x10, %o2
2020e40: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2020e44: 96 07 bf fc add %fp, -4, %o3
2020e48: 7f ff f3 bf call 201dd44 <rtems_rfs_block_map_find>
2020e4c: 92 02 60 34 add %o1, 0x34, %o1
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
2020e50: b0 92 20 00 orcc %o0, 0, %i0
2020e54: 04 80 00 09 ble 2020e78 <rtems_rfs_file_io_start+0x13c> <== ALWAYS TAKEN
2020e58: 80 a6 a0 00 cmp %i2, 0
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
2020e5c: 02 80 00 2f be 2020f18 <rtems_rfs_file_io_start+0x1dc> <== NOT EXECUTED
2020e60: 80 a6 20 06 cmp %i0, 6 <== NOT EXECUTED
2020e64: 12 80 00 2b bne 2020f10 <rtems_rfs_file_io_start+0x1d4> <== NOT EXECUTED
2020e68: 01 00 00 00 nop <== NOT EXECUTED
{
*available = 0;
2020e6c: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
return 0;
2020e70: 81 c7 e0 08 ret <== NOT EXECUTED
2020e74: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
2020e78: 12 80 00 0c bne 2020ea8 <rtems_rfs_file_io_start+0x16c>
2020e7c: b0 10 00 1a mov %i2, %i0
2020e80: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2020e84: 80 a0 60 00 cmp %g1, 0
2020e88: 12 80 00 08 bne 2020ea8 <rtems_rfs_file_io_start+0x16c> <== NEVER TAKEN
2020e8c: b0 10 20 01 mov 1, %i0
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
2020e90: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
2020e94: c4 06 40 00 ld [ %i1 ], %g2
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
2020e98: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
2020e9c: c2 00 60 08 ld [ %g1 + 8 ], %g1
2020ea0: 80 a0 80 01 cmp %g2, %g1
2020ea4: b0 40 20 00 addx %g0, 0, %i0
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020ea8: 90 10 20 20 mov 0x20, %o0
2020eac: 92 10 20 00 clr %o1
2020eb0: 7f ff cc e3 call 201423c <rtems_rfs_trace>
2020eb4: b0 0e 20 ff and %i0, 0xff, %i0
2020eb8: 80 8a 20 ff btst 0xff, %o0
2020ebc: 22 80 00 0d be,a 2020ef0 <rtems_rfs_file_io_start+0x1b4> <== ALWAYS TAKEN
2020ec0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
2020ec4: 15 00 80 d9 sethi %hi(0x2036400), %o2 <== NOT EXECUTED
2020ec8: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
2020ecc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2020ed0: 02 80 00 04 be 2020ee0 <rtems_rfs_file_io_start+0x1a4> <== NOT EXECUTED
2020ed4: 94 12 a1 98 or %o2, 0x198, %o2 <== NOT EXECUTED
2020ed8: 15 00 80 d9 sethi %hi(0x2036400), %o2 <== NOT EXECUTED
2020edc: 94 12 a1 90 or %o2, 0x190, %o2 ! 2036590 <ramdisk_ops+0xa70><== NOT EXECUTED
2020ee0: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020ee4: 40 00 13 9b call 2025d50 <printf> <== NOT EXECUTED
2020ee8: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 2037dd0 <CSWTCH.1+0xee4> <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
2020eec: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
2020ef0: d4 07 bf fc ld [ %fp + -4 ], %o2
2020ef4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2020ef8: 96 10 00 18 mov %i0, %o3
2020efc: 7f ff f6 74 call 201e8cc <rtems_rfs_buffer_handle_request>
2020f00: 92 07 60 04 add %i5, 4, %o1
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
2020f04: b0 92 20 00 orcc %o0, 0, %i0
2020f08: 04 bf ff a3 ble 2020d94 <rtems_rfs_file_io_start+0x58> <== ALWAYS TAKEN
2020f0c: 80 a6 a0 00 cmp %i2, 0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
2020f10: 81 c7 e0 08 ret <== NOT EXECUTED
2020f14: 81 e8 00 00 restore <== NOT EXECUTED
{
*available = 0;
return 0;
}
if (rc != ENXIO)
2020f18: 12 bf ff b8 bne 2020df8 <rtems_rfs_file_io_start+0xbc> <== NOT EXECUTED
2020f1c: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2020f20: 7f ff cc c7 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020f24: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020f28: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020f2c: 12 80 00 0d bne 2020f60 <rtems_rfs_file_io_start+0x224> <== NOT EXECUTED
2020f30: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
2020f34: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
2020f38: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2020f3c: d0 02 60 98 ld [ %o1 + 0x98 ], %o0 <== NOT EXECUTED
2020f40: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
2020f44: 7f ff f3 d4 call 201de94 <rtems_rfs_block_map_grow> <== NOT EXECUTED
2020f48: 92 02 60 34 add %o1, 0x34, %o1 <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
2020f4c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2020f50: 14 bf ff f0 bg 2020f10 <rtems_rfs_file_io_start+0x1d4> <== NOT EXECUTED
2020f54: 01 00 00 00 nop <== NOT EXECUTED
return rc;
request_read = false;
2020f58: 10 bf ff d4 b 2020ea8 <rtems_rfs_file_io_start+0x16c> <== NOT EXECUTED
2020f5c: b0 10 20 00 clr %i0 ! 0 <PROM_START> <== NOT EXECUTED
if (rc != ENXIO)
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
2020f60: 40 00 13 bd call 2025e54 <puts> <== NOT EXECUTED
2020f64: 90 12 21 b0 or %o0, 0x1b0, %o0 <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
2020f68: 10 bf ff f4 b 2020f38 <rtems_rfs_file_io_start+0x1fc> <== NOT EXECUTED
2020f6c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
020206f0 <rtems_rfs_file_open>:
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
20206f0: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
20206f4: 90 10 20 08 mov 8, %o0
20206f8: 92 10 20 00 clr %o1
20206fc: 7f ff ce d0 call 201423c <rtems_rfs_trace>
2020700: ba 10 00 18 mov %i0, %i5
2020704: 80 8a 20 ff btst 0xff, %o0
2020708: 12 80 00 2b bne 20207b4 <rtems_rfs_file_open+0xc4> <== NEVER TAKEN
202070c: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
2020710: c0 26 c0 00 clr [ %i3 ]
/*
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
2020714: 90 10 20 20 mov 0x20, %o0
2020718: 7f ff 99 b2 call 2006de0 <malloc>
202071c: b0 10 20 0c mov 0xc, %i0
if (!handle)
2020720: 80 a2 20 00 cmp %o0, 0
2020724: 02 80 00 58 be 2020884 <rtems_rfs_file_open+0x194> <== NEVER TAKEN
2020728: a0 10 00 08 mov %o0, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
202072c: f8 07 60 70 ld [ %i5 + 0x70 ], %i4
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
2020730: c0 22 00 00 clr [ %o0 ]
2020734: c0 22 20 04 clr [ %o0 + 4 ]
2020738: c0 22 20 10 clr [ %o0 + 0x10 ]
202073c: c0 22 20 14 clr [ %o0 + 0x14 ]
2020740: c0 22 20 18 clr [ %o0 + 0x18 ]
2020744: c0 22 20 1c clr [ %o0 + 0x1c ]
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
2020748: c0 22 20 08 clr [ %o0 + 8 ]
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
202074c: 84 07 60 74 add %i5, 0x74, %g2
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
2020750: 80 a7 00 02 cmp %i4, %g2
2020754: 12 80 00 06 bne 202076c <rtems_rfs_file_open+0x7c> <== NEVER TAKEN
2020758: c0 22 20 0c clr [ %o0 + 0xc ]
202075c: 30 80 00 24 b,a 20207ec <rtems_rfs_file_open+0xfc>
2020760: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED
2020764: 02 80 00 22 be 20207ec <rtems_rfs_file_open+0xfc> <== NOT EXECUTED
2020768: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
202076c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 <== NOT EXECUTED
2020770: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2020774: 32 bf ff fb bne,a 2020760 <rtems_rfs_file_open+0x70> <== NOT EXECUTED
2020778: f8 07 00 00 ld [ %i4 ], %i4 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
202077c: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
2020780: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
2020784: 82 00 60 01 inc %g1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
2020788: 92 10 20 00 clr %o1 <== NOT EXECUTED
202078c: 7f ff ce ac call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020790: c2 27 20 08 st %g1, [ %i4 + 8 ] <== NOT EXECUTED
2020794: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020798: 12 80 00 0c bne 20207c8 <rtems_rfs_file_open+0xd8> <== NOT EXECUTED
202079c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
20207a0: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
handle->shared = shared;
20207a4: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
*file = handle;
20207a8: e0 26 c0 00 st %l0, [ %i3 ]
return 0;
}
20207ac: 81 c7 e0 08 ret
20207b0: 91 e8 20 00 restore %g0, 0, %o0
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
20207b4: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
20207b8: 40 00 15 66 call 2025d50 <printf> <== NOT EXECUTED
20207bc: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 2037bc8 <CSWTCH.1+0xcdc> <== NOT EXECUTED
*file = NULL;
20207c0: 10 bf ff d5 b 2020714 <rtems_rfs_file_open+0x24> <== NOT EXECUTED
20207c4: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
20207c8: 11 00 80 de sethi %hi(0x2037800), %o0 <== NOT EXECUTED
handle->flags = flags;
handle->shared = shared;
*file = handle;
return 0;
20207cc: b0 10 20 00 clr %i0 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
20207d0: 40 00 15 60 call 2025d50 <printf> <== NOT EXECUTED
20207d4: 90 12 23 e8 or %o0, 0x3e8, %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
20207d8: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
handle->shared = shared;
20207dc: f8 24 20 1c st %i4, [ %l0 + 0x1c ] <== NOT EXECUTED
20207e0: e0 26 c0 00 st %l0, [ %i3 ] <== NOT EXECUTED
20207e4: 81 c7 e0 08 ret <== NOT EXECUTED
20207e8: 81 e8 00 00 restore <== NOT EXECUTED
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
20207ec: 7f ff 99 7d call 2006de0 <malloc>
20207f0: 90 10 20 9c mov 0x9c, %o0
if (!shared)
20207f4: b8 92 20 00 orcc %o0, 0, %i4
20207f8: 02 80 00 3d be 20208ec <rtems_rfs_file_open+0x1fc> <== NEVER TAKEN
20207fc: 92 10 20 00 clr %o1
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
2020800: 40 00 15 02 call 2025c08 <memset>
2020804: 94 10 20 9c mov 0x9c, %o2
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
2020808: a2 07 20 0c add %i4, 0xc, %l1
202080c: 90 10 00 1d mov %i5, %o0
2020810: 92 10 00 19 mov %i1, %o1
2020814: 94 10 00 11 mov %l1, %o2
2020818: 7f ff c1 ad call 2010ecc <rtems_rfs_inode_open>
202081c: 96 10 20 01 mov 1, %o3
if (rc > 0)
2020820: b0 92 20 00 orcc %o0, 0, %i0
2020824: 04 80 00 1a ble 202088c <rtems_rfs_file_open+0x19c> <== ALWAYS TAKEN
2020828: 90 10 20 08 mov 8, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
202082c: 7f ff ce 84 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2020830: 92 10 20 00 clr %o1 <== NOT EXECUTED
2020834: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2020838: 02 80 00 09 be 202085c <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
202083c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
2020840: 40 00 18 ea call 2026be8 <strerror> <== NOT EXECUTED
2020844: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2020848: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
202084c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2020850: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020854: 40 00 15 3f call 2025d50 <printf> <== NOT EXECUTED
2020858: 90 12 20 10 or %o0, 0x10, %o0 ! 2037c10 <CSWTCH.1+0xd24> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
free (shared);
202085c: 7f ff 97 3f call 2006558 <free> <== NOT EXECUTED
2020860: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2020864: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2020868: 7f ff f7 9e call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
202086c: 92 04 20 04 add %l0, 4, %o1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
2020870: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
2020874: c0 2c 20 04 clrb [ %l0 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
2020878: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
202087c: 7f ff 97 37 call 2006558 <free> <== NOT EXECUTED
2020880: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
return rc;
2020884: 81 c7 e0 08 ret <== NOT EXECUTED
2020888: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
202088c: 90 10 00 1d mov %i5, %o0
2020890: 92 10 00 11 mov %l1, %o1
2020894: 7f ff f4 53 call 201d9e0 <rtems_rfs_block_map_open>
2020898: 94 07 20 34 add %i4, 0x34, %o2
if (rc > 0)
202089c: b0 92 20 00 orcc %o0, 0, %i0
20208a0: 24 80 00 1e ble,a 2020918 <rtems_rfs_file_open+0x228> <== ALWAYS TAKEN
20208a4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
20208a8: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
20208ac: 7f ff ce 64 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20208b0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20208b4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20208b8: 22 80 00 0a be,a 20208e0 <rtems_rfs_file_open+0x1f0> <== NOT EXECUTED
20208bc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
20208c0: 40 00 18 ca call 2026be8 <strerror> <== NOT EXECUTED
20208c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20208c8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20208cc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20208d0: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
20208d4: 40 00 15 1f call 2025d50 <printf> <== NOT EXECUTED
20208d8: 90 12 20 48 or %o0, 0x48, %o0 ! 2037c48 <CSWTCH.1+0xd5c> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
20208dc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
20208e0: 7f ff c1 f2 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20208e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20208e8: 30 bf ff dd b,a 202085c <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
20208ec: 92 04 20 04 add %l0, 4, %o1 <== NOT EXECUTED
20208f0: 7f ff f7 7c call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20208f4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
if (!shared)
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
20208f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
20208fc: c0 2c 20 04 clrb [ %l0 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
2020900: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
2020904: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
2020908: 7f ff 97 14 call 2006558 <free> <== NOT EXECUTED
202090c: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
return ENOMEM;
2020910: 81 c7 e0 08 ret <== NOT EXECUTED
2020914: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
2020918: 84 10 20 01 mov 1, %g2
202091c: c4 27 20 08 st %g2, [ %i4 + 8 ]
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
2020920: f0 08 60 0c ldub [ %g1 + 0xc ], %i0
2020924: c8 08 60 0d ldub [ %g1 + 0xd ], %g4
2020928: c6 08 60 0f ldub [ %g1 + 0xf ], %g3
202092c: c4 08 60 0e ldub [ %g1 + 0xe ], %g2
2020930: b1 2e 20 18 sll %i0, 0x18, %i0
2020934: 89 29 20 10 sll %g4, 0x10, %g4
2020938: 85 28 a0 08 sll %g2, 8, %g2
202093c: 88 16 00 04 or %i0, %g4, %g4
2020940: 86 11 00 03 or %g4, %g3, %g3
2020944: 84 10 c0 02 or %g3, %g2, %g2
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
2020948: c4 27 20 84 st %g2, [ %i4 + 0x84 ]
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
202094c: c6 08 60 0b ldub [ %g1 + 0xb ], %g3
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
2020950: c4 08 60 0a ldub [ %g1 + 0xa ], %g2
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2020954: 90 07 60 70 add %i5, 0x70, %o0
2020958: 85 28 a0 08 sll %g2, 8, %g2
202095c: 84 10 c0 02 or %g3, %g2, %g2
2020960: c4 27 20 88 st %g2, [ %i4 + 0x88 ]
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
2020964: f0 08 60 10 ldub [ %g1 + 0x10 ], %i0
2020968: c8 08 60 11 ldub [ %g1 + 0x11 ], %g4
202096c: c6 08 60 13 ldub [ %g1 + 0x13 ], %g3
2020970: c4 08 60 12 ldub [ %g1 + 0x12 ], %g2
2020974: b1 2e 20 18 sll %i0, 0x18, %i0
2020978: 89 29 20 10 sll %g4, 0x10, %g4
202097c: 85 28 a0 08 sll %g2, 8, %g2
2020980: 88 16 00 04 or %i0, %g4, %g4
2020984: 86 11 00 03 or %g4, %g3, %g3
2020988: 84 10 c0 02 or %g3, %g2, %g2
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
202098c: c4 27 20 8c st %g2, [ %i4 + 0x8c ]
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
2020990: f0 08 60 14 ldub [ %g1 + 0x14 ], %i0
2020994: c8 08 60 15 ldub [ %g1 + 0x15 ], %g4
2020998: c6 08 60 17 ldub [ %g1 + 0x17 ], %g3
202099c: c4 08 60 16 ldub [ %g1 + 0x16 ], %g2
20209a0: b1 2e 20 18 sll %i0, 0x18, %i0
20209a4: 89 29 20 10 sll %g4, 0x10, %g4
20209a8: 85 28 a0 08 sll %g2, 8, %g2
20209ac: 88 16 00 04 or %i0, %g4, %g4
20209b0: 86 11 00 03 or %g4, %g3, %g3
20209b4: 84 10 c0 02 or %g3, %g2, %g2
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
20209b8: c4 27 20 90 st %g2, [ %i4 + 0x90 ]
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
20209bc: c8 08 60 18 ldub [ %g1 + 0x18 ], %g4
20209c0: c6 08 60 19 ldub [ %g1 + 0x19 ], %g3
20209c4: c4 08 60 1b ldub [ %g1 + 0x1b ], %g2
20209c8: c2 08 60 1a ldub [ %g1 + 0x1a ], %g1
20209cc: 89 29 20 18 sll %g4, 0x18, %g4
20209d0: 87 28 e0 10 sll %g3, 0x10, %g3
20209d4: 83 28 60 08 sll %g1, 8, %g1
20209d8: 86 11 00 03 or %g4, %g3, %g3
20209dc: 84 10 c0 02 or %g3, %g2, %g2
20209e0: 82 10 80 01 or %g2, %g1, %g1
20209e4: 92 10 00 1c mov %i4, %o1
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
20209e8: c2 27 20 94 st %g1, [ %i4 + 0x94 ]
20209ec: 7f ff ad 30 call 200beac <_Chain_Append>
20209f0: fa 27 20 98 st %i5, [ %i4 + 0x98 ]
shared->fs = fs;
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
20209f4: 92 10 00 11 mov %l1, %o1
20209f8: 94 10 20 00 clr %o2
20209fc: 7f ff c1 6c call 2010fac <rtems_rfs_inode_unload>
2020a00: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
2020a04: 90 10 20 08 mov 8, %o0
2020a08: 7f ff ce 0d call 201423c <rtems_rfs_trace>
2020a0c: 92 10 20 00 clr %o1
2020a10: 80 8a 20 ff btst 0xff, %o0
2020a14: 22 bf ff 64 be,a 20207a4 <rtems_rfs_file_open+0xb4> <== ALWAYS TAKEN
2020a18: f4 24 00 00 st %i2, [ %l0 ]
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
2020a1c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2020a20: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2020a24: 40 00 14 cb call 2025d50 <printf> <== NOT EXECUTED
2020a28: 90 12 20 80 or %o0, 0x80, %o0 ! 2037c80 <CSWTCH.1+0xd94> <== NOT EXECUTED
}
handle->flags = flags;
2020a2c: 10 bf ff 5e b 20207a4 <rtems_rfs_file_open+0xb4> <== NOT EXECUTED
2020a30: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
02021290 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
2021290: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2021294: 90 10 20 20 mov 0x20, %o0
2021298: 7f ff cb e9 call 201423c <rtems_rfs_trace>
202129c: 92 10 20 00 clr %o1
20212a0: 80 8a 20 ff btst 0xff, %o0
20212a4: 32 80 00 1c bne,a 2021314 <rtems_rfs_file_seek+0x84> <== NEVER TAKEN
20212a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
20212ac: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
20212b0: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
20212b4: 7f ff f1 b5 call 201d988 <rtems_rfs_block_get_size>
20212b8: 92 02 60 84 add %o1, 0x84, %o1
20212bc: 80 a2 00 19 cmp %o0, %i1
20212c0: 38 80 00 0b bgu,a 20212ec <rtems_rfs_file_seek+0x5c> <== NEVER TAKEN
20212c4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
20212c8: 02 80 00 06 be 20212e0 <rtems_rfs_file_seek+0x50> <== ALWAYS TAKEN
20212cc: 80 a2 40 1a cmp %o1, %i2
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
*new_pos = pos;
20212d0: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
20212d4: f4 26 e0 04 st %i2, [ %i3 + 4 ]
return 0;
}
20212d8: 81 c7 e0 08 ret
20212dc: 91 e8 20 00 restore %g0, 0, %o0
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
20212e0: 28 bf ff fd bleu,a 20212d4 <rtems_rfs_file_seek+0x44> <== ALWAYS TAKEN
20212e4: f2 26 c0 00 st %i1, [ %i3 ]
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
20212e8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
20212ec: 96 06 20 10 add %i0, 0x10, %o3 <== NOT EXECUTED
20212f0: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
20212f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20212f8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20212fc: 7f ff f1 74 call 201d8cc <rtems_rfs_block_get_bpos> <== NOT EXECUTED
2021300: b0 10 20 00 clr %i0 <== NOT EXECUTED
*new_pos = pos;
2021304: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
2021308: f4 26 e0 04 st %i2, [ %i3 + 4 ] <== NOT EXECUTED
return 0;
}
202130c: 81 c7 e0 08 ret <== NOT EXECUTED
2021310: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
2021314: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2021318: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
202131c: 40 00 12 8d call 2025d50 <printf> <== NOT EXECUTED
2021320: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
2021324: 10 bf ff e3 b 20212b0 <rtems_rfs_file_seek+0x20> <== NOT EXECUTED
2021328: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
0202132c <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
202132c: 9d e3 bf 90 save %sp, -112, %sp
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
2021330: e0 06 20 1c ld [ %i0 + 0x1c ], %l0
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
2021334: 90 10 20 20 mov 0x20, %o0
2021338: 92 10 20 00 clr %o1
202133c: 7f ff cb c0 call 201423c <rtems_rfs_trace>
2021340: a6 10 00 1a mov %i2, %l3
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
2021344: b6 10 00 18 mov %i0, %i3
2021348: a4 10 00 19 mov %i1, %l2
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
202134c: 80 8a 20 ff btst 0xff, %o0
2021350: 12 80 00 7a bne 2021538 <rtems_rfs_file_set_size+0x20c> <== NEVER TAKEN
2021354: b4 04 20 34 add %l0, 0x34, %i2
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
2021358: 80 94 80 13 orcc %l2, %l3, %g0
202135c: 32 80 00 0b bne,a 2021388 <rtems_rfs_file_set_size+0x5c>
2021360: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
2021364: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
2021368: 92 10 00 1a mov %i2, %o1
202136c: 7f ff f4 91 call 201e5b0 <rtems_rfs_block_map_free_all>
2021370: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
if (rc > 0)
2021374: b0 92 20 00 orcc %o0, 0, %i0
2021378: 24 80 00 63 ble,a 2021504 <rtems_rfs_file_set_size+0x1d8><== ALWAYS TAKEN
202137c: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
return 0;
}
2021380: 81 c7 e0 08 ret <== NOT EXECUTED
2021384: 81 e8 00 00 restore <== NOT EXECUTED
2021388: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
202138c: 7f ff f1 7f call 201d988 <rtems_rfs_block_get_size>
2021390: 92 02 60 84 add %o1, 0x84, %o1
size = rtems_rfs_file_size (handle);
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
2021394: 80 a4 80 08 cmp %l2, %o0
2021398: 02 80 00 58 be 20214f8 <rtems_rfs_file_set_size+0x1cc> <== ALWAYS TAKEN
202139c: 80 a4 c0 09 cmp %l3, %o1
{
if (size < new_size)
20213a0: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED
20213a4: 08 80 00 6c bleu 2021554 <rtems_rfs_file_set_size+0x228> <== ALWAYS TAKEN
20213a8: 01 00 00 00 nop
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
20213ac: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
20213b0: ba a4 c0 09 subcc %l3, %o1, %i5
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
20213b4: c2 04 60 98 ld [ %l1 + 0x98 ], %g1
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
20213b8: b8 64 80 08 subx %l2, %o0, %i4
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
20213bc: b2 10 00 11 mov %l1, %i1
read_block = false;
while (count)
20213c0: 80 97 00 1d orcc %i4, %i5, %g0
20213c4: 02 80 00 50 be 2021504 <rtems_rfs_file_set_size+0x1d8> <== NEVER TAKEN
20213c8: e4 00 60 08 ld [ %g1 + 8 ], %l2
20213cc: a8 10 20 00 clr %l4
map->dirty = true;
20213d0: a6 10 20 01 mov 1, %l3
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
20213d4: 10 80 00 27 b 2021470 <rtems_rfs_file_set_size+0x144>
20213d8: a2 06 e0 04 add %i3, 4, %l1
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
20213dc: 80 a0 80 1d cmp %g2, %i5
20213e0: 28 80 00 44 bleu,a 20214f0 <rtems_rfs_file_set_size+0x1c4><== NEVER TAKEN
20213e4: c0 24 20 40 clr [ %l0 + 0x40 ] <== NOT EXECUTED
{
length = count + bpos.boff;
20213e8: a4 00 40 1d add %g1, %i5, %l2
20213ec: e6 2c 20 34 stb %l3, [ %l0 + 0x34 ]
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
20213f0: e4 24 20 40 st %l2, [ %l0 + 0x40 ]
read_block = true;
20213f4: a8 10 20 01 mov 1, %l4
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
20213f8: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
20213fc: d4 07 bf fc ld [ %fp + -4 ], %o2
2021400: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2021404: 92 10 00 11 mov %l1, %o1
2021408: 7f ff f5 31 call 201e8cc <rtems_rfs_buffer_handle_request>
202140c: 96 0d 20 01 and %l4, 1, %o3
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
2021410: b0 92 20 00 orcc %o0, 0, %i0
2021414: 14 bf ff db bg 2021380 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
2021418: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
202141c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
memset (dst + bpos.boff, 0, length - bpos.boff);
2021420: d0 00 a0 24 ld [ %g2 + 0x24 ], %o0
2021424: 94 24 80 01 sub %l2, %g1, %o2
2021428: 92 10 20 00 clr %o1
202142c: 40 00 11 f7 call 2025c08 <memset>
2021430: 90 02 00 01 add %o0, %g1, %o0
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
2021434: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
2021438: e6 2e e0 04 stb %l3, [ %i3 + 4 ]
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
202143c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2021440: 7f ff f4 a8 call 201e6e0 <rtems_rfs_buffer_handle_release>
2021444: 92 10 00 11 mov %l1, %o1
rtems_rfs_file_buffer (handle));
if (rc > 0)
2021448: b0 92 20 00 orcc %o0, 0, %i0
202144c: 14 bf ff cd bg 2021380 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
2021450: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
count -= length - bpos.boff;
2021454: 82 24 80 01 sub %l2, %g1, %g1
2021458: ba a7 40 01 subcc %i5, %g1, %i5
202145c: b8 67 20 00 subx %i4, 0, %i4
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
2021460: 80 97 00 1d orcc %i4, %i5, %g0
2021464: 22 80 00 28 be,a 2021504 <rtems_rfs_file_set_size+0x1d8> <== ALWAYS TAKEN
2021468: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
202146c: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
2021470: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2021474: c4 04 20 3c ld [ %l0 + 0x3c ], %g2
2021478: c2 27 bf f4 st %g1, [ %fp + -12 ]
202147c: c4 27 bf f0 st %g2, [ %fp + -16 ]
2021480: 80 a0 60 00 cmp %g1, 0
2021484: 02 80 00 04 be 2021494 <rtems_rfs_file_set_size+0x168>
2021488: c0 27 bf f8 clr [ %fp + -8 ]
202148c: 84 00 bf ff add %g2, -1, %g2
2021490: c4 27 bf f0 st %g2, [ %fp + -16 ]
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
2021494: d0 06 60 98 ld [ %i1 + 0x98 ], %o0
2021498: 92 10 00 1a mov %i2, %o1
202149c: 94 07 bf f0 add %fp, -16, %o2
20214a0: 7f ff f2 29 call 201dd44 <rtems_rfs_block_map_find>
20214a4: 96 07 bf fc add %fp, -4, %o3
map, &bpos, &block);
if (rc > 0)
20214a8: b0 92 20 00 orcc %o0, 0, %i0
20214ac: 04 80 00 0c ble 20214dc <rtems_rfs_file_set_size+0x1b0>
20214b0: 80 a6 20 06 cmp %i0, 6
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
20214b4: 12 bf ff b3 bne 2021380 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
20214b8: 92 10 00 1a mov %i2, %o1
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
20214bc: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
20214c0: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
20214c4: 94 10 20 01 mov 1, %o2
20214c8: 7f ff f2 73 call 201de94 <rtems_rfs_block_map_grow>
20214cc: 96 07 bf fc add %fp, -4, %o3
map, 1, &block);
if (rc > 0)
20214d0: b0 92 20 00 orcc %o0, 0, %i0
20214d4: 14 80 00 17 bg 2021530 <rtems_rfs_file_set_size+0x204> <== NEVER TAKEN
20214d8: 01 00 00 00 nop
return rc;
}
if (count < (length - bpos.boff))
20214dc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20214e0: 80 a7 20 00 cmp %i4, 0
20214e4: 02 bf ff be be 20213dc <rtems_rfs_file_set_size+0xb0> <== ALWAYS TAKEN
20214e8: 84 24 80 01 sub %l2, %g1, %g2
20214ec: c0 24 20 40 clr [ %l0 + 0x40 ] <== NOT EXECUTED
map->dirty = true;
20214f0: 10 bf ff c2 b 20213f8 <rtems_rfs_file_set_size+0xcc> <== NOT EXECUTED
20214f4: e6 2c 20 34 stb %l3, [ %l0 + 0x34 ] <== NOT EXECUTED
size = rtems_rfs_file_size (handle);
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
20214f8: 12 bf ff ab bne 20213a4 <rtems_rfs_file_set_size+0x78>
20214fc: 80 a4 80 08 cmp %l2, %o0
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
2021500: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
2021504: f8 04 20 3c ld [ %l0 + 0x3c ], %i4
2021508: d2 04 20 40 ld [ %l0 + 0x40 ], %o1
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
202150c: c2 06 c0 00 ld [ %i3 ], %g1
rtems_rfs_file_bpos (handle));
}
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
2021510: f8 24 60 84 st %i4, [ %l1 + 0x84 ]
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
2021514: d2 24 60 88 st %o1, [ %l1 + 0x88 ]
if (rtems_rfs_file_update_mtime (handle))
2021518: 80 88 60 02 btst 2, %g1
202151c: 12 bf ff 99 bne 2021380 <rtems_rfs_file_set_size+0x54> <== NEVER TAKEN
2021520: b0 10 20 00 clr %i0
handle->shared->mtime = time (NULL);
2021524: 40 00 20 e8 call 20298c4 <time>
2021528: 90 10 20 00 clr %o0
202152c: d0 24 60 90 st %o0, [ %l1 + 0x90 ]
return 0;
}
2021530: 81 c7 e0 08 ret
2021534: 81 e8 00 00 restore
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
2021538: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
202153c: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
2021540: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2021544: 40 00 12 03 call 2025d50 <printf> <== NOT EXECUTED
2021548: 90 12 23 00 or %o0, 0x300, %o0 ! 2037f00 <CSWTCH.1+0x1014><== NOT EXECUTED
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
202154c: 10 bf ff 84 b 202135c <rtems_rfs_file_set_size+0x30> <== NOT EXECUTED
2021550: 80 94 80 13 orcc %l2, %l3, %g0 <== NOT EXECUTED
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
{
if (size < new_size)
2021554: 32 80 00 06 bne,a 202156c <rtems_rfs_file_set_size+0x240><== NEVER TAKEN
2021558: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
202155c: 80 a4 c0 09 cmp %l3, %o1
2021560: 38 bf ff 94 bgu,a 20213b0 <rtems_rfs_file_set_size+0x84> <== ALWAYS TAKEN
2021564: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
2021568: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
202156c: f8 04 20 3c ld [ %l0 + 0x3c ], %i4 <== NOT EXECUTED
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
2021570: e2 06 60 98 ld [ %i1 + 0x98 ], %l1 <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
2021574: 92 84 ff ff addcc %l3, -1, %o1 <== NOT EXECUTED
2021578: f4 04 60 08 ld [ %l1 + 8 ], %i2 <== NOT EXECUTED
202157c: 90 44 bf ff addx %l2, -1, %o0 <== NOT EXECUTED
2021580: 94 10 20 00 clr %o2 <== NOT EXECUTED
2021584: 40 00 46 b9 call 2033068 <__udivdi3> <== NOT EXECUTED
2021588: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
202158c: 94 38 00 09 xnor %g0, %o1, %o2 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
2021590: 94 82 80 1c addcc %o2, %i4, %o2 <== NOT EXECUTED
2021594: 12 80 00 22 bne 202161c <rtems_rfs_file_set_size+0x2f0> <== NOT EXECUTED
2021598: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
202159c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
20215a0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
20215a4: 94 10 20 00 clr %o2 <== NOT EXECUTED
20215a8: 40 00 47 85 call 20333bc <__umoddi3> <== NOT EXECUTED
20215ac: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
20215b0: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1 <== NOT EXECUTED
20215b4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
20215b8: d2 24 20 40 st %o1, [ %l0 + 0x40 ] <== NOT EXECUTED
20215bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20215c0: 02 80 00 0e be 20215f8 <rtems_rfs_file_set_size+0x2cc> <== NOT EXECUTED
20215c4: c4 2c 20 34 stb %g2, [ %l0 + 0x34 ] <== NOT EXECUTED
20215c8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20215cc: 12 80 00 0c bne 20215fc <rtems_rfs_file_set_size+0x2d0> <== NOT EXECUTED
20215d0: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
20215d4: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
20215d8: d2 26 e0 14 st %o1, [ %i3 + 0x14 ] <== NOT EXECUTED
20215dc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
20215e0: 02 80 00 0d be 2021614 <rtems_rfs_file_set_size+0x2e8> <== NOT EXECUTED
20215e4: c0 26 e0 18 clr [ %i3 + 0x18 ] <== NOT EXECUTED
20215e8: 82 07 3f ff add %i4, -1, %g1 <== NOT EXECUTED
20215ec: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
20215f0: 10 bf ff c7 b 202150c <rtems_rfs_file_set_size+0x1e0> <== NOT EXECUTED
20215f4: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
20215f8: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
20215fc: 3a bf ff f7 bcc,a 20215d8 <rtems_rfs_file_set_size+0x2ac><== NOT EXECUTED
2021600: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
2021604: 84 07 3f ff add %i4, -1, %g2 <== NOT EXECUTED
2021608: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
202160c: 22 80 00 0c be,a 202163c <rtems_rfs_file_set_size+0x310> <== NOT EXECUTED
2021610: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
2021614: 10 bf ff be b 202150c <rtems_rfs_file_set_size+0x1e0> <== NOT EXECUTED
2021618: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
202161c: 7f ff f3 15 call 201e270 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
2021620: 92 06 60 34 add %i1, 0x34, %o1 <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
2021624: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2021628: 14 bf ff c2 bg 2021530 <rtems_rfs_file_set_size+0x204> <== NOT EXECUTED
202162c: 01 00 00 00 nop <== NOT EXECUTED
2021630: f8 04 20 3c ld [ %l0 + 0x3c ], %i4 <== NOT EXECUTED
2021634: 10 bf ff da b 202159c <rtems_rfs_file_set_size+0x270> <== NOT EXECUTED
2021638: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
202163c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
2021640: 2a bf ff e6 bcs,a 20215d8 <rtems_rfs_file_set_size+0x2ac><== NOT EXECUTED
2021644: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
2021648: 10 bf ff b1 b 202150c <rtems_rfs_file_set_size+0x1e0> <== NOT EXECUTED
202164c: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
0200f6b4 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
200f6b4: 9d e3 be c8 save %sp, -312, %sp
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
200f6b8: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
200f6bc: 80 a0 60 00 cmp %g1, 0
200f6c0: 32 80 00 8b bne,a 200f8ec <rtems_rfs_format+0x238> <== NEVER TAKEN
200f6c4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
printf ("rtems-rfs: format: %s\n", name);
memset (&fs, 0, sizeof (rtems_rfs_file_system));
200f6c8: 92 10 20 00 clr %o1
200f6cc: 94 10 20 80 mov 0x80, %o2
200f6d0: 40 00 59 4e call 2025c08 <memset>
200f6d4: 90 07 bf 2c add %fp, -212, %o0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200f6d8: 82 07 bf 70 add %fp, -144, %g1
200f6dc: c2 27 bf 6c st %g1, [ %fp + -148 ]
head->previous = NULL;
tail->previous = head;
200f6e0: 82 07 bf 6c add %fp, -148, %g1
200f6e4: c2 27 bf 74 st %g1, [ %fp + -140 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200f6e8: 82 07 bf 80 add %fp, -128, %g1
200f6ec: c2 27 bf 7c st %g1, [ %fp + -132 ]
head->previous = NULL;
tail->previous = head;
200f6f0: 82 07 bf 7c add %fp, -132, %g1
200f6f4: c2 27 bf 84 st %g1, [ %fp + -124 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200f6f8: 82 07 bf 90 add %fp, -112, %g1
200f6fc: c2 27 bf 8c st %g1, [ %fp + -116 ]
head->previous = NULL;
tail->previous = head;
200f700: 82 07 bf 8c add %fp, -116, %g1
200f704: c2 27 bf 94 st %g1, [ %fp + -108 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200f708: 82 07 bf a0 add %fp, -96, %g1
200f70c: c2 27 bf 9c st %g1, [ %fp + -100 ]
head->previous = NULL;
tail->previous = head;
200f710: 82 07 bf 9c add %fp, -100, %g1
200f714: c2 27 bf a4 st %g1, [ %fp + -92 ]
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
200f718: 82 10 20 05 mov 5, %g1
200f71c: c2 27 bf 68 st %g1, [ %fp + -152 ]
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
200f720: 82 10 20 02 mov 2, %g1
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
200f724: 90 10 00 18 mov %i0, %o0
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
200f728: c2 27 bf 2c st %g1, [ %fp + -212 ]
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
200f72c: 40 00 3d 13 call 201eb78 <rtems_rfs_buffer_open>
200f730: 92 07 bf 2c add %fp, -212, %o1
if (rc > 0)
200f734: ba 92 20 00 orcc %o0, 0, %i5
200f738: 14 80 03 5f bg 20104b4 <rtems_rfs_format+0xe00> <== NEVER TAKEN
200f73c: c2 07 bf 38 ld [ %fp + -200 ], %g1
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
200f740: f8 00 60 24 ld [ %g1 + 0x24 ], %i4
200f744: 80 a7 20 00 cmp %i4, 0
200f748: 02 80 03 6d be 20104fc <rtems_rfs_format+0xe48> <== NEVER TAKEN
200f74c: 92 10 20 00 clr %o1
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
200f750: fa 06 40 00 ld [ %i1 ], %i5
if (!fs->block_size)
200f754: 80 a7 60 00 cmp %i5, 0
200f758: 02 80 00 d8 be 200fab8 <rtems_rfs_format+0x404> <== NEVER TAKEN
200f75c: fa 27 bf 34 st %i5, [ %fp + -204 ]
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
200f760: 90 10 00 1d mov %i5, %o0
200f764: 40 00 8b 89 call 2032588 <.urem>
200f768: 92 10 00 1c mov %i4, %o1
200f76c: 80 a2 20 00 cmp %o0, 0
200f770: 32 80 00 f7 bne,a 200fb4c <rtems_rfs_format+0x498> <== NEVER TAKEN
200f774: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
200f778: c2 06 60 04 ld [ %i1 + 4 ], %g1
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
200f77c: bb 2f 60 03 sll %i5, 3, %i5
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
if (!fs->group_blocks)
200f780: 80 a0 60 00 cmp %g1, 0
200f784: 12 80 00 52 bne 200f8cc <rtems_rfs_format+0x218> <== NEVER TAKEN
200f788: c2 27 bf 50 st %g1, [ %fp + -176 ]
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
200f78c: fa 27 bf 50 st %i5, [ %fp + -176 ]
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
200f790: 40 00 47 ce call 20216c8 <rtems_rfs_fs_media_size>
200f794: 90 07 bf 2c add %fp, -212, %o0
200f798: fa 07 bf 34 ld [ %fp + -204 ], %i5
200f79c: 94 10 20 00 clr %o2
200f7a0: 40 00 8e 32 call 2033068 <__udivdi3>
200f7a4: 96 10 00 1d mov %i5, %o3
200f7a8: d2 27 bf 30 st %o1, [ %fp + -208 ]
200f7ac: b8 10 00 09 mov %o1, %i4
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200f7b0: b5 2f 60 03 sll %i5, 3, %i2
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200f7b4: 80 a2 60 00 cmp %o1, 0
200f7b8: 02 80 00 06 be 200f7d0 <rtems_rfs_format+0x11c> <== NEVER TAKEN
200f7bc: a0 10 20 01 mov 1, %l0
return 1;
return ((dividend - 1) / divisor) + 1;
200f7c0: 90 02 7f ff add %o1, -1, %o0
200f7c4: 40 00 8a c5 call 20322d8 <.udiv>
200f7c8: 92 10 00 1a mov %i2, %o1
200f7cc: a0 02 20 01 add %o0, 1, %l0
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
200f7d0: f6 06 60 08 ld [ %i1 + 8 ], %i3
if (!fs->group_inodes)
200f7d4: 80 a6 e0 00 cmp %i3, 0
200f7d8: 02 80 01 43 be 200fce4 <rtems_rfs_format+0x630> <== ALWAYS TAKEN
200f7dc: e0 27 bf 4c st %l0, [ %fp + -180 ]
200f7e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200f7e4: 40 00 8a bd call 20322d8 <.udiv> <== NOT EXECUTED
200f7e8: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
200f7ec: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
200f7f0: d0 27 bf 58 st %o0, [ %fp + -168 ] <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200f7f4: 90 06 ff ff add %i3, -1, %o0 <== NOT EXECUTED
200f7f8: 40 00 8a b8 call 20322d8 <.udiv>
200f7fc: 92 10 00 1c mov %i4, %o1
200f800: 90 02 20 01 inc %o0
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
200f804: 40 00 8a 7b call 20321f0 <.umul>
200f808: 92 10 00 1c mov %i4, %o1
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
200f80c: 80 a6 80 08 cmp %i2, %o0
200f810: 1a 80 00 03 bcc 200f81c <rtems_rfs_format+0x168> <== ALWAYS TAKEN
200f814: d0 27 bf 54 st %o0, [ %fp + -172 ]
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
200f818: f4 27 bf 54 st %i2, [ %fp + -172 ] <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
200f81c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
if (!fs->max_name_length)
200f820: 80 a0 60 00 cmp %g1, 0
200f824: 12 80 00 04 bne 200f834 <rtems_rfs_format+0x180> <== NEVER TAKEN
200f828: c2 27 bf 44 st %g1, [ %fp + -188 ]
{
fs->max_name_length = 512;
200f82c: 82 10 22 00 mov 0x200, %g1
200f830: c2 27 bf 44 st %g1, [ %fp + -188 ]
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
200f834: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
200f838: 80 a0 60 00 cmp %g1, 0
200f83c: 12 80 00 cb bne 200fb68 <rtems_rfs_format+0x4b4> <== NEVER TAKEN
200f840: 01 00 00 00 nop
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
200f844: 92 10 00 1d mov %i5, %o1
200f848: 40 00 3d 4d call 201ed7c <rtems_rfs_buffer_setblksize>
200f84c: 90 07 bf 2c add %fp, -212, %o0
if (rc > 0)
200f850: ba 92 20 00 orcc %o0, 0, %i5
200f854: 14 80 02 82 bg 201025c <rtems_rfs_format+0xba8> <== NEVER TAKEN
200f858: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200f85c: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200f860: c0 27 bf f0 clr [ %fp + -16 ]
handle->buffer = NULL;
200f864: c0 27 bf f4 clr [ %fp + -12 ]
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
200f868: 90 07 bf 2c add %fp, -212, %o0
200f86c: 94 10 20 00 clr %o2
200f870: 40 00 3c 17 call 201e8cc <rtems_rfs_buffer_handle_request>
200f874: 96 10 20 00 clr %o3
if (rc > 0)
200f878: ba 92 20 00 orcc %o0, 0, %i5
200f87c: 04 80 00 21 ble 200f900 <rtems_rfs_format+0x24c> <== ALWAYS TAKEN
200f880: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200f884: 40 00 3b 97 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200f888: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
200f88c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200f890: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200f894: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200f898: 40 00 5c d4 call 2026be8 <strerror> <== NOT EXECUTED
200f89c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200f8a0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200f8a4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200f8a8: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200f8ac: 40 00 59 29 call 2025d50 <printf> <== NOT EXECUTED
200f8b0: 90 12 22 30 or %o0, 0x230, %o0 ! 2035e30 <ramdisk_ops+0x310><== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200f8b4: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
return -1;
200f8b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200f8bc: 40 00 59 66 call 2025e54 <puts> <== NOT EXECUTED
200f8c0: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED
return -1;
200f8c4: 81 c7 e0 08 ret <== NOT EXECUTED
200f8c8: 81 e8 00 00 restore <== NOT EXECUTED
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
200f8cc: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
200f8d0: 08 bf ff b0 bleu 200f790 <rtems_rfs_format+0xdc> <== NOT EXECUTED
200f8d4: 11 00 80 d6 sethi %hi(0x2035800), %o0 <== NOT EXECUTED
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
200f8d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
{
printf ("group block count is higher than bits in block\n");
200f8dc: 40 00 59 5e call 2025e54 <puts> <== NOT EXECUTED
200f8e0: 90 12 23 e8 or %o0, 0x3e8, %o0 <== NOT EXECUTED
200f8e4: 81 c7 e0 08 ret <== NOT EXECUTED
200f8e8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
200f8ec: 11 00 80 d6 sethi %hi(0x2035800), %o0 <== NOT EXECUTED
200f8f0: 40 00 59 18 call 2025d50 <printf> <== NOT EXECUTED
200f8f4: 90 12 23 38 or %o0, 0x338, %o0 ! 2035b38 <ramdisk_ops+0x18><== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
200f8f8: 10 bf ff 75 b 200f6cc <rtems_rfs_format+0x18> <== NOT EXECUTED
200f8fc: 92 10 20 00 clr %o1 <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
200f900: c2 07 bf f4 ld [ %fp + -12 ], %g1
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
200f904: d4 07 bf 34 ld [ %fp + -204 ], %o2
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
200f908: fa 00 60 24 ld [ %g1 + 0x24 ], %i5
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
200f90c: 92 10 20 ff mov 0xff, %o1
200f910: 40 00 58 be call 2025c08 <memset>
200f914: 90 10 00 1d mov %i5, %o0
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
200f918: 84 10 20 28 mov 0x28, %g2
200f91c: c4 2f 40 00 stb %g2, [ %i5 ]
200f920: 84 10 20 09 mov 9, %g2
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
200f924: c0 2f 60 04 clrb [ %i5 + 4 ]
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
200f928: c4 2f 60 01 stb %g2, [ %i5 + 1 ]
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
200f92c: c0 2f 60 05 clrb [ %i5 + 5 ]
200f930: c0 2f 60 06 clrb [ %i5 + 6 ]
200f934: c0 2f 60 07 clrb [ %i5 + 7 ]
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
200f938: 82 10 20 01 mov 1, %g1
200f93c: 84 10 20 20 mov 0x20, %g2
200f940: c2 2f 60 03 stb %g1, [ %i5 + 3 ]
200f944: c4 2f 60 02 stb %g2, [ %i5 + 2 ]
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200f948: c6 0f bf 34 ldub [ %fp + -204 ], %g3
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200f94c: c4 07 bf 30 ld [ %fp + -208 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200f950: c6 2f 60 08 stb %g3, [ %i5 + 8 ]
200f954: c6 17 bf 34 lduh [ %fp + -204 ], %g3
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200f958: c4 2f 60 0f stb %g2, [ %i5 + 0xf ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200f95c: c6 2f 60 09 stb %g3, [ %i5 + 9 ]
200f960: c8 07 bf 34 ld [ %fp + -204 ], %g4
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200f964: 87 30 a0 18 srl %g2, 0x18, %g3
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200f968: 89 31 20 08 srl %g4, 8, %g4
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200f96c: c6 2f 60 0c stb %g3, [ %i5 + 0xc ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200f970: c8 2f 60 0a stb %g4, [ %i5 + 0xa ]
200f974: c6 07 bf 34 ld [ %fp + -204 ], %g3
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
200f978: 90 07 bf 2c add %fp, -212, %o0
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
200f97c: c6 2f 60 0b stb %g3, [ %i5 + 0xb ]
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
200f980: 87 30 a0 10 srl %g2, 0x10, %g3
200f984: 85 30 a0 08 srl %g2, 8, %g2
200f988: c6 2f 60 0d stb %g3, [ %i5 + 0xd ]
200f98c: c4 2f 60 0e stb %g2, [ %i5 + 0xe ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
200f990: c4 0f bf 40 ldub [ %fp + -192 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
200f994: 92 07 bf ec add %fp, -20, %o1
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
200f998: c4 2f 60 10 stb %g2, [ %i5 + 0x10 ]
200f99c: c4 17 bf 40 lduh [ %fp + -192 ], %g2
200f9a0: c4 2f 60 11 stb %g2, [ %i5 + 0x11 ]
200f9a4: c4 07 bf 40 ld [ %fp + -192 ], %g2
200f9a8: 85 30 a0 08 srl %g2, 8, %g2
200f9ac: c4 2f 60 12 stb %g2, [ %i5 + 0x12 ]
200f9b0: c4 07 bf 40 ld [ %fp + -192 ], %g2
200f9b4: c4 2f 60 13 stb %g2, [ %i5 + 0x13 ]
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
200f9b8: c4 0f bf 44 ldub [ %fp + -188 ], %g2
200f9bc: c4 2f 60 14 stb %g2, [ %i5 + 0x14 ]
200f9c0: c4 17 bf 44 lduh [ %fp + -188 ], %g2
200f9c4: c4 2f 60 15 stb %g2, [ %i5 + 0x15 ]
200f9c8: c4 07 bf 44 ld [ %fp + -188 ], %g2
200f9cc: 85 30 a0 08 srl %g2, 8, %g2
200f9d0: c4 2f 60 16 stb %g2, [ %i5 + 0x16 ]
200f9d4: c4 07 bf 44 ld [ %fp + -188 ], %g2
200f9d8: c4 2f 60 17 stb %g2, [ %i5 + 0x17 ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
200f9dc: c4 0f bf 4c ldub [ %fp + -180 ], %g2
200f9e0: c4 2f 60 18 stb %g2, [ %i5 + 0x18 ]
200f9e4: c4 17 bf 4c lduh [ %fp + -180 ], %g2
200f9e8: c4 2f 60 19 stb %g2, [ %i5 + 0x19 ]
200f9ec: c4 07 bf 4c ld [ %fp + -180 ], %g2
200f9f0: 85 30 a0 08 srl %g2, 8, %g2
200f9f4: c4 2f 60 1a stb %g2, [ %i5 + 0x1a ]
200f9f8: c4 07 bf 4c ld [ %fp + -180 ], %g2
200f9fc: c4 2f 60 1b stb %g2, [ %i5 + 0x1b ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
200fa00: c4 0f bf 50 ldub [ %fp + -176 ], %g2
200fa04: c4 2f 60 1c stb %g2, [ %i5 + 0x1c ]
200fa08: c4 17 bf 50 lduh [ %fp + -176 ], %g2
200fa0c: c4 2f 60 1d stb %g2, [ %i5 + 0x1d ]
200fa10: c4 07 bf 50 ld [ %fp + -176 ], %g2
200fa14: 85 30 a0 08 srl %g2, 8, %g2
200fa18: c4 2f 60 1e stb %g2, [ %i5 + 0x1e ]
200fa1c: c4 07 bf 50 ld [ %fp + -176 ], %g2
200fa20: c4 2f 60 1f stb %g2, [ %i5 + 0x1f ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
200fa24: c4 0f bf 54 ldub [ %fp + -172 ], %g2
200fa28: c4 2f 60 20 stb %g2, [ %i5 + 0x20 ]
200fa2c: c4 17 bf 54 lduh [ %fp + -172 ], %g2
200fa30: c4 2f 60 21 stb %g2, [ %i5 + 0x21 ]
200fa34: c4 07 bf 54 ld [ %fp + -172 ], %g2
200fa38: 85 30 a0 08 srl %g2, 8, %g2
200fa3c: c4 2f 60 22 stb %g2, [ %i5 + 0x22 ]
200fa40: c4 07 bf 54 ld [ %fp + -172 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
200fa44: c0 2f 60 24 clrb [ %i5 + 0x24 ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
200fa48: c4 2f 60 23 stb %g2, [ %i5 + 0x23 ]
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
200fa4c: c0 2f 60 25 clrb [ %i5 + 0x25 ]
200fa50: c0 2f 60 26 clrb [ %i5 + 0x26 ]
200fa54: 84 10 20 38 mov 0x38, %g2
200fa58: c4 2f 60 27 stb %g2, [ %i5 + 0x27 ]
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
200fa5c: 40 00 3b 21 call 201e6e0 <rtems_rfs_buffer_handle_release>
200fa60: c2 2f bf ec stb %g1, [ %fp + -20 ]
if (rc > 0)
200fa64: ba 92 20 00 orcc %o0, 0, %i5
200fa68: 04 80 00 f0 ble 200fe28 <rtems_rfs_format+0x774> <== ALWAYS TAKEN
200fa6c: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200fa70: 40 00 3b 1c call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200fa74: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
200fa78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
200fa7c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200fa80: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200fa84: 40 00 5c 59 call 2026be8 <strerror> <== NOT EXECUTED
200fa88: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200fa8c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200fa90: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
200fa94: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fa98: 40 00 58 ae call 2025d50 <printf> <== NOT EXECUTED
200fa9c: 90 12 22 68 or %o0, 0x268, %o0 ! 2035e68 <ramdisk_ops+0x348><== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200faa0: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
return -1;
200faa4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
200faa8: 40 00 58 eb call 2025e54 <puts> <== NOT EXECUTED
200faac: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED
return -1;
200fab0: 81 c7 e0 08 ret <== NOT EXECUTED
200fab4: 81 e8 00 00 restore <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
200fab8: 40 00 47 04 call 20216c8 <rtems_rfs_fs_media_size> <== NOT EXECUTED
200fabc: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
if (total_size >= GIGS (1))
200fac0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200fac4: 22 80 00 a3 be,a 200fd50 <rtems_rfs_format+0x69c> <== NOT EXECUTED
200fac8: 03 00 03 ff sethi %hi(0xffc00), %g1 <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200facc: 84 10 20 00 clr %g2 <== NOT EXECUTED
200fad0: 07 00 04 00 sethi %hi(0x100000), %g3 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
200fad4: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200fad8: 92 82 40 03 addcc %o1, %g3, %o1 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
200fadc: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200fae0: 90 42 00 02 addx %o0, %g2, %o0 <== NOT EXECUTED
200fae4: 85 32 60 14 srl %o1, 0x14, %g2 <== NOT EXECUTED
200fae8: 89 2a 20 0c sll %o0, 0xc, %g4 <== NOT EXECUTED
200faec: 10 80 00 04 b 200fafc <rtems_rfs_format+0x448> <== NOT EXECUTED
200faf0: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
200faf4: 02 80 00 06 be 200fb0c <rtems_rfs_format+0x458> <== NOT EXECUTED
200faf8: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
200fafc: bb 28 c0 01 sll %g3, %g1, %i5 <== NOT EXECUTED
200fb00: 80 8f 40 02 btst %i5, %g2 <== NOT EXECUTED
200fb04: 02 bf ff fc be 200faf4 <rtems_rfs_format+0x440> <== NOT EXECUTED
200fb08: 82 80 7f ff addcc %g1, -1, %g1 <== NOT EXECUTED
break;
fs->block_size = 1 << b;
200fb0c: fa 27 bf 34 st %i5, [ %fp + -204 ] <== NOT EXECUTED
}
if (fs->block_size < 512)
200fb10: 80 a7 61 ff cmp %i5, 0x1ff <== NOT EXECUTED
200fb14: 18 80 01 c8 bgu 2010234 <rtems_rfs_format+0xb80> <== NOT EXECUTED
200fb18: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED
fs->block_size = 512;
200fb1c: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
200fb20: ba 10 22 00 mov 0x200, %i5 <== NOT EXECUTED
200fb24: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED
200fb28: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
200fb2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
break;
fs->block_size = 1 << b;
}
if (fs->block_size < 512)
fs->block_size = 512;
200fb30: c2 27 bf 34 st %g1, [ %fp + -204 ] <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
200fb34: 40 00 8a 95 call 2032588 <.urem> <== NOT EXECUTED
200fb38: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200fb3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200fb40: 22 bf ff 0f be,a 200f77c <rtems_rfs_format+0xc8> <== NOT EXECUTED
200fb44: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
200fb48: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200fb4c: 11 00 80 d6 sethi %hi(0x2035800), %o0 <== NOT EXECUTED
200fb50: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200fb54: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED
200fb58: 40 00 58 7e call 2025d50 <printf> <== NOT EXECUTED
200fb5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200fb60: 81 c7 e0 08 ret <== NOT EXECUTED
200fb64: 81 e8 00 00 restore <== NOT EXECUTED
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
200fb68: 40 00 46 d8 call 20216c8 <rtems_rfs_fs_media_size> <== NOT EXECUTED
200fb6c: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
200fb70: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
200fb74: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200fb78: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fb7c: 40 00 58 75 call 2025d50 <printf> <== NOT EXECUTED
200fb80: 90 12 20 18 or %o0, 0x18, %o0 ! 2035c18 <ramdisk_ops+0xf8><== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
200fb84: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
200fb88: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fb8c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
200fb90: 40 00 58 70 call 2025d50 <printf> <== NOT EXECUTED
200fb94: 90 12 20 40 or %o0, 0x40, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
rtems_rfs_fs_media_block_size (&fs));
200fb98: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
200fb9c: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fba0: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
200fba4: 40 00 58 6b call 2025d50 <printf> <== NOT EXECUTED
200fba8: 90 12 20 68 or %o0, 0x68, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
200fbac: 40 00 46 be call 20216a4 <rtems_rfs_fs_size> <== NOT EXECUTED
200fbb0: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
200fbb4: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
200fbb8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
200fbbc: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fbc0: 40 00 58 64 call 2025d50 <printf> <== NOT EXECUTED
200fbc4: 90 12 20 98 or %o0, 0x98, %o0 ! 2035c98 <ramdisk_ops+0x178><== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
200fbc8: d2 07 bf 30 ld [ %fp + -208 ], %o1 <== NOT EXECUTED
200fbcc: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fbd0: 40 00 58 60 call 2025d50 <printf> <== NOT EXECUTED
200fbd4: 90 12 20 b8 or %o0, 0xb8, %o0 ! 2035cb8 <ramdisk_ops+0x198><== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
200fbd8: d2 07 bf 34 ld [ %fp + -204 ], %o1 <== NOT EXECUTED
200fbdc: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fbe0: 40 00 58 5c call 2025d50 <printf> <== NOT EXECUTED
200fbe4: 90 12 20 e0 or %o0, 0xe0, %o0 ! 2035ce0 <ramdisk_ops+0x1c0><== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200fbe8: d2 07 bf 34 ld [ %fp + -204 ], %o1 <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
200fbec: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fbf0: 93 2a 60 03 sll %o1, 3, %o1 <== NOT EXECUTED
200fbf4: 40 00 58 57 call 2025d50 <printf> <== NOT EXECUTED
200fbf8: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
200fbfc: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
200fc00: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fc04: 40 00 58 53 call 2025d50 <printf> <== NOT EXECUTED
200fc08: 90 12 21 30 or %o0, 0x130, %o0 ! 2035d30 <ramdisk_ops+0x210><== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200fc0c: d2 07 bf 4c ld [ %fp + -180 ], %o1 <== NOT EXECUTED
fs.group_inodes * fs.group_count,
200fc10: f8 07 bf 54 ld [ %fp + -172 ], %i4 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200fc14: 40 00 89 77 call 20321f0 <.umul> <== NOT EXECUTED
200fc18: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
200fc1c: 83 2f 20 03 sll %i4, 3, %g1 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200fc20: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
200fc24: b9 2f 20 06 sll %i4, 6, %i4 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
200fc28: f4 07 bf 34 ld [ %fp + -204 ], %i2 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fc2c: a0 a7 00 01 subcc %i4, %g1, %l0 <== NOT EXECUTED
200fc30: 12 80 00 4e bne 200fd68 <rtems_rfs_format+0x6b4> <== NOT EXECUTED
200fc34: 90 10 27 d0 mov 0x7d0, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fc38: f6 07 bf 30 ld [ %fp + -208 ], %i3 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200fc3c: b9 2e a0 03 sll %i2, 3, %i4 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fc40: b6 06 ff ff add %i3, -1, %i3 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200fc44: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fc48: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
200fc4c: 08 80 00 03 bleu 200fc58 <rtems_rfs_format+0x5a4> <== NOT EXECUTED
200fc50: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
200fc54: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
200fc58: 40 00 89 a2 call 20322e0 <.div> <== NOT EXECUTED
200fc5c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200fc60: 40 00 89 a0 call 20322e0 <.div> <== NOT EXECUTED
200fc64: 92 10 20 0a mov 0xa, %o1 ! a <PROM_START+0xa> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fc68: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200fc6c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fc70: 12 80 00 50 bne 200fdb0 <rtems_rfs_format+0x6fc> <== NOT EXECUTED
200fc74: 90 10 27 d0 mov 0x7d0, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fc78: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
200fc7c: 38 80 00 02 bgu,a 200fc84 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
200fc80: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
200fc84: 40 00 89 97 call 20322e0 <.div> <== NOT EXECUTED
200fc88: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
200fc8c: 40 00 8a 41 call 2032590 <.rem> <== NOT EXECUTED
200fc90: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
200fc94: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
200fc98: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200fc9c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200fca0: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fca4: 40 00 58 2b call 2025d50 <printf> <== NOT EXECUTED
200fca8: 90 12 21 58 or %o0, 0x158, %o0 ! 2035d58 <ramdisk_ops+0x238><== NOT EXECUTED
fs.group_inodes * fs.group_count,
rtems_rfs_inode_overhead (&fs) / 10,
rtems_rfs_inode_overhead (&fs) % 10);
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
200fcac: d2 07 bf 4c ld [ %fp + -180 ], %o1 <== NOT EXECUTED
200fcb0: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fcb4: 40 00 58 27 call 2025d50 <printf> <== NOT EXECUTED
200fcb8: 90 12 21 88 or %o0, 0x188, %o0 ! 2035d88 <ramdisk_ops+0x268><== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
200fcbc: d2 07 bf 50 ld [ %fp + -176 ], %o1 <== NOT EXECUTED
200fcc0: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fcc4: 40 00 58 23 call 2025d50 <printf> <== NOT EXECUTED
200fcc8: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 2035da8 <ramdisk_ops+0x288><== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
200fccc: d2 07 bf 54 ld [ %fp + -172 ], %o1 <== NOT EXECUTED
200fcd0: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
200fcd4: 40 00 58 1f call 2025d50 <printf> <== NOT EXECUTED
200fcd8: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 2035dd0 <ramdisk_ops+0x2b0><== NOT EXECUTED
200fcdc: 10 bf fe da b 200f844 <rtems_rfs_format+0x190> <== NOT EXECUTED
200fce0: fa 07 bf 34 ld [ %fp + -204 ], %i5 <== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
200fce4: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200fce8: 80 a0 60 00 cmp %g1, 0
200fcec: 02 80 00 03 be 200fcf8 <rtems_rfs_format+0x644> <== ALWAYS TAKEN
200fcf0: 90 10 20 01 mov 1, %o0
200fcf4: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
200fcf8: 40 00 89 3e call 20321f0 <.umul>
200fcfc: 92 07 3f ff add %i4, -1, %o1
200fd00: 92 10 20 64 mov 0x64, %o1
200fd04: 40 00 89 75 call 20322d8 <.udiv>
200fd08: b6 10 20 01 mov 1, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fd0c: 80 a2 20 00 cmp %o0, 0
200fd10: 32 80 00 35 bne,a 200fde4 <rtems_rfs_format+0x730> <== ALWAYS TAKEN
200fd14: 92 10 00 10 mov %l0, %o1
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200fd18: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
200fd1c: 40 00 89 6f call 20322d8 <.udiv> <== NOT EXECUTED
200fd20: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200fd24: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
200fd28: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200fd2c: 40 00 89 31 call 20321f0 <.umul> <== NOT EXECUTED
200fd30: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
200fd34: f8 27 bf 58 st %i4, [ %fp + -168 ] <== NOT EXECUTED
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200fd38: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fd3c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
200fd40: 02 bf fe b1 be 200f804 <rtems_rfs_format+0x150> <== NOT EXECUTED
200fd44: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
200fd48: 10 bf fe ac b 200f7f8 <rtems_rfs_format+0x144> <== NOT EXECUTED
200fd4c: 90 06 ff ff add %i3, -1, %o0 <== NOT EXECUTED
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
200fd50: 82 10 63 ff or %g1, 0x3ff, %g1 <== NOT EXECUTED
200fd54: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
200fd58: 08 bf ff 6e bleu 200fb10 <rtems_rfs_format+0x45c> <== NOT EXECUTED
200fd5c: fa 07 bf 34 ld [ %fp + -204 ], %i5 <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
200fd60: 10 bf ff 5c b 200fad0 <rtems_rfs_format+0x41c> <== NOT EXECUTED
200fd64: 84 10 20 00 clr %g2 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200fd68: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
200fd6c: 40 00 89 5b call 20322d8 <.udiv> <== NOT EXECUTED
200fd70: 90 04 3f ff add %l0, -1, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fd74: f6 07 bf 30 ld [ %fp + -208 ], %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fd78: 90 02 20 02 add %o0, 2, %o0 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200fd7c: b9 2e a0 03 sll %i2, 3, %i4 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fd80: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
200fd84: 85 2a 20 07 sll %o0, 7, %g2 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fd88: b6 06 ff ff add %i3, -1, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fd8c: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
200fd90: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fd94: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
200fd98: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fd9c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
200fda0: 08 bf ff ae bleu 200fc58 <rtems_rfs_format+0x5a4> <== NOT EXECUTED
200fda4: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
200fda8: 10 bf ff ac b 200fc58 <rtems_rfs_format+0x5a4> <== NOT EXECUTED
200fdac: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200fdb0: 90 04 3f ff add %l0, -1, %o0 <== NOT EXECUTED
200fdb4: 40 00 89 49 call 20322d8 <.udiv> <== NOT EXECUTED
200fdb8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fdbc: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fdc0: 90 02 20 02 add %o0, 2, %o0 <== NOT EXECUTED
200fdc4: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
200fdc8: 85 2a 20 07 sll %o0, 7, %g2 <== NOT EXECUTED
200fdcc: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
200fdd0: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
200fdd4: 08 bf ff ac bleu 200fc84 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
200fdd8: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
200fddc: 10 bf ff aa b 200fc84 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
200fde0: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200fde4: 40 00 89 3d call 20322d8 <.udiv>
200fde8: 90 02 3f ff add %o0, -1, %o0
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200fdec: 92 10 20 38 mov 0x38, %o1
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
200fdf0: b6 02 20 01 add %o0, 1, %i3
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200fdf4: 40 00 89 39 call 20322d8 <.udiv>
200fdf8: 90 10 00 1d mov %i5, %o0
200fdfc: b8 10 00 08 mov %o0, %i4
200fe00: 90 10 00 1b mov %i3, %o0
200fe04: 40 00 88 fb call 20321f0 <.umul>
200fe08: 92 10 00 1c mov %i4, %o1
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
200fe0c: f8 27 bf 58 st %i4, [ %fp + -168 ]
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
200fe10: b6 10 00 08 mov %o0, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200fe14: 80 a6 e0 00 cmp %i3, 0
200fe18: 02 bf fe 7b be 200f804 <rtems_rfs_format+0x150> <== NEVER TAKEN
200fe1c: 90 10 20 01 mov 1, %o0
return 1;
return ((dividend - 1) / divisor) + 1;
200fe20: 10 bf fe 76 b 200f7f8 <rtems_rfs_format+0x144>
200fe24: 90 06 ff ff add %i3, -1, %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200fe28: 90 07 bf 2c add %fp, -212, %o0
200fe2c: 40 00 3a 2d call 201e6e0 <rtems_rfs_buffer_handle_release>
200fe30: 92 07 bf ec add %fp, -20, %o1
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
200fe34: c2 07 bf 4c ld [ %fp + -180 ], %g1
handle->dirty = false;
200fe38: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200fe3c: c0 27 bf f0 clr [ %fp + -16 ]
200fe40: 80 a0 60 00 cmp %g1, 0
200fe44: 04 80 00 96 ble 201009c <rtems_rfs_format+0x9e8> <== NEVER TAKEN
200fe48: c0 27 bf f4 clr [ %fp + -12 ]
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200fe4c: c2 07 bf 30 ld [ %fp + -208 ], %g1
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
200fe50: e2 0e 60 14 ldub [ %i1 + 0x14 ], %l1
200fe54: e4 0e 60 15 ldub [ %i1 + 0x15 ], %l2
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200fe58: 80 a0 60 00 cmp %g1, 0
200fe5c: 02 80 01 ca be 2010584 <rtems_rfs_format+0xed0> <== NEVER TAKEN
200fe60: fa 07 bf 50 ld [ %fp + -176 ], %i5
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
200fe64: 29 00 80 d7 sethi %hi(0x2035c00), %l4
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
200fe68: 27 00 80 d7 sethi %hi(0x2035c00), %l3
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
200fe6c: 2d 00 80 d8 sethi %hi(0x2036000), %l6
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
200fe70: b8 10 20 01 mov 1, %i4
200fe74: b4 10 20 00 clr %i2
200fe78: b6 10 20 00 clr %i3
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
200fe7c: a8 15 23 18 or %l4, 0x318, %l4
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
200fe80: a6 14 e3 50 or %l3, 0x350, %l3
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
200fe84: aa 10 20 01 mov 1, %l5
if (verbose)
printf (", inodes");
200fe88: ac 15 a0 40 or %l6, 0x40, %l6
/*
* Be nice to strange sizes of disks. These are embedded systems after all
* and nice numbers do not always work out. Let the last block pick up the
* remainder of the blocks.
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
200fe8c: 84 07 40 1c add %i5, %i4, %g2
200fe90: 80 a0 40 02 cmp %g1, %g2
200fe94: 2a 80 00 02 bcs,a 200fe9c <rtems_rfs_format+0x7e8> <== ALWAYS TAKEN
200fe98: ba 20 40 1c sub %g1, %i4, %i5
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
200fe9c: a4 8c a0 ff andcc %l2, 0xff, %l2
200fea0: 12 80 00 3b bne 200ff8c <rtems_rfs_format+0x8d8> <== NEVER TAKEN
200fea4: 90 10 00 14 mov %l4, %o0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200fea8: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
200feac: c0 27 bf f0 clr [ %fp + -16 ]
handle->buffer = NULL;
200feb0: c0 27 bf f4 clr [ %fp + -12 ]
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
200feb4: 90 07 bf d4 add %fp, -44, %o0
200feb8: 92 07 bf 2c add %fp, -212, %o1
200febc: 94 07 bf ec add %fp, -20, %o2
200fec0: 96 10 00 1d mov %i5, %o3
200fec4: 40 00 35 5e call 201d43c <rtems_rfs_bitmap_open>
200fec8: 98 10 00 1c mov %i4, %o4
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
200fecc: a0 92 20 00 orcc %o0, 0, %l0
200fed0: 04 80 00 12 ble 200ff18 <rtems_rfs_format+0x864> <== ALWAYS TAKEN
200fed4: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200fed8: 40 00 3a 02 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200fedc: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
200fee0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
200fee4: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200fee8: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200feec: 40 00 5b 3f call 2026be8 <strerror> <== NOT EXECUTED
200fef0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200fef4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200fef8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200fefc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200ff00: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200ff04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
200ff08: 40 00 57 92 call 2025d50 <printf> <== NOT EXECUTED
200ff0c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED
200ff10: 81 c7 e0 08 ret <== NOT EXECUTED
200ff14: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
200ff18: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ff1c: d4 07 bf 34 ld [ %fp + -204 ], %o2
200ff20: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
200ff24: 40 00 57 39 call 2025c08 <memset>
200ff28: 92 10 20 ff mov 0xff, %o1
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
200ff2c: 40 00 34 88 call 201d14c <rtems_rfs_bitmap_map_clear_all>
200ff30: 90 07 bf d4 add %fp, -44, %o0
if (rc > 0)
200ff34: a0 92 20 00 orcc %o0, 0, %l0
200ff38: 04 80 00 20 ble 200ffb8 <rtems_rfs_format+0x904> <== ALWAYS TAKEN
200ff3c: 92 10 20 00 clr %o1
{
rtems_rfs_bitmap_close (&bitmap);
200ff40: 40 00 35 50 call 201d480 <rtems_rfs_bitmap_close> <== NOT EXECUTED
200ff44: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
200ff48: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
200ff4c: 40 00 39 e5 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
200ff50: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
200ff54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
200ff58: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200ff5c: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200ff60: 40 00 5b 22 call 2026be8 <strerror> <== NOT EXECUTED
200ff64: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
200ff68: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200ff6c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
200ff70: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200ff74: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
200ff78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
if (rc > 0)
{
rtems_rfs_bitmap_close (&bitmap);
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
200ff7c: 40 00 57 75 call 2025d50 <printf> <== NOT EXECUTED
200ff80: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED
200ff84: 81 c7 e0 08 ret <== NOT EXECUTED
200ff88: 81 e8 00 00 restore <== NOT EXECUTED
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
200ff8c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200ff90: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200ff94: 40 00 57 6f call 2025d50 <printf> <== NOT EXECUTED
200ff98: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
200ff9c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200ffa0: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
200ffa4: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
200ffa8: 40 00 57 6a call 2025d50 <printf> <== NOT EXECUTED
200ffac: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
200ffb0: 10 bf ff c2 b 200feb8 <rtems_rfs_format+0x804> <== NOT EXECUTED
200ffb4: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
200ffb8: 40 00 33 ae call 201ce70 <rtems_rfs_bitmap_map_set>
200ffbc: 90 07 bf d4 add %fp, -44, %o0
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
200ffc0: 92 10 20 01 mov 1, %o1
200ffc4: 40 00 33 ab call 201ce70 <rtems_rfs_bitmap_map_set>
200ffc8: 90 07 bf d4 add %fp, -44, %o0
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
200ffcc: d0 07 bf 54 ld [ %fp + -172 ], %o0
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
200ffd0: 80 a2 20 00 cmp %o0, 0
200ffd4: 12 80 00 2b bne 2010080 <rtems_rfs_format+0x9cc> <== ALWAYS TAKEN
200ffd8: d2 07 bf 58 ld [ %fp + -168 ], %o1
return 1;
200ffdc: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
200ffe0: ae 10 20 00 clr %l7 <== NOT EXECUTED
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
200ffe4: 92 05 e0 02 add %l7, 2, %o1
200ffe8: 40 00 33 a2 call 201ce70 <rtems_rfs_bitmap_map_set>
200ffec: 90 07 bf d4 add %fp, -44, %o0
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
200fff0: ae 05 e0 01 inc %l7
200fff4: 80 a4 00 17 cmp %l0, %l7
200fff8: 14 bf ff fc bg 200ffe8 <rtems_rfs_format+0x934>
200fffc: 92 05 e0 02 add %l7, 2, %o1
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
2010000: 40 00 35 20 call 201d480 <rtems_rfs_bitmap_close>
2010004: 90 07 bf d4 add %fp, -44, %o0
if (rc > 0)
2010008: ae 92 20 00 orcc %o0, 0, %l7
201000c: 14 80 00 45 bg 2010120 <rtems_rfs_format+0xa6c> <== NEVER TAKEN
2010010: 80 a4 a0 00 cmp %l2, 0
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
2010014: 12 80 00 71 bne 20101d8 <rtems_rfs_format+0xb24> <== NEVER TAKEN
2010018: ea 2f bf ec stb %l5, [ %fp + -20 ]
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
201001c: 96 10 00 1d mov %i5, %o3
2010020: 90 07 bf d4 add %fp, -44, %o0
2010024: 92 07 bf 2c add %fp, -212, %o1
2010028: 94 07 bf ec add %fp, -20, %o2
201002c: 40 00 35 04 call 201d43c <rtems_rfs_bitmap_open>
2010030: 98 06 a0 02 add %i2, 2, %o4
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
2010034: ba 92 20 00 orcc %o0, 0, %i5
2010038: 04 80 00 4b ble 2010164 <rtems_rfs_format+0xab0> <== ALWAYS TAKEN
201003c: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010040: 40 00 39 a8 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010044: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
2010048: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201004c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
2010050: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
2010054: 40 00 5a e5 call 2026be8 <strerror> <== NOT EXECUTED
2010058: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
201005c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2010060: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2010064: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2010068: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
201006c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
2010070: 40 00 57 38 call 2025d50 <printf> <== NOT EXECUTED
2010074: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED
2010078: 81 c7 e0 08 ret <== NOT EXECUTED
201007c: 81 e8 00 00 restore <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
2010080: 40 00 88 96 call 20322d8 <.udiv>
2010084: 90 02 3f ff add %o0, -1, %o0
2010088: a0 02 20 01 add %o0, 1, %l0
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
201008c: 80 a4 20 00 cmp %l0, 0
2010090: 14 bf ff d5 bg 200ffe4 <rtems_rfs_format+0x930> <== ALWAYS TAKEN
2010094: ae 10 20 00 clr %l7
2010098: 30 bf ff da b,a 2010000 <rtems_rfs_format+0x94c> <== NOT EXECUTED
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
201009c: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
20100a0: 80 a0 60 00 cmp %g1, 0
20100a4: 12 80 00 6b bne 2010250 <rtems_rfs_format+0xb9c> <== NEVER TAKEN
20100a8: 01 00 00 00 nop
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
20100ac: 40 00 3b fa call 201f094 <rtems_rfs_buffer_close>
20100b0: 90 07 bf 2c add %fp, -212, %o0
if (rc > 0)
20100b4: ba 92 20 00 orcc %o0, 0, %i5
20100b8: 14 80 01 08 bg 20104d8 <rtems_rfs_format+0xe24> <== NEVER TAKEN
20100bc: 92 10 20 00 clr %o1
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
20100c0: 90 10 00 18 mov %i0, %o0
20100c4: 94 10 20 06 mov 6, %o2
20100c8: 96 10 20 00 clr %o3
20100cc: 40 00 45 89 call 20216f0 <rtems_rfs_fs_open>
20100d0: 98 07 bf f8 add %fp, -8, %o4
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
20100d4: 80 a2 20 00 cmp %o0, 0
20100d8: 06 80 01 3a bl 20105c0 <rtems_rfs_format+0xf0c> <== NEVER TAKEN
20100dc: 92 10 20 01 mov 1, %o1
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
20100e0: d0 07 bf f8 ld [ %fp + -8 ], %o0
20100e4: 40 00 03 3f call 2010de0 <rtems_rfs_inode_alloc>
20100e8: 94 07 bf fc add %fp, -4, %o2
if (rc > 0)
20100ec: ba 92 20 00 orcc %o0, 0, %i5
20100f0: 14 80 00 3e bg 20101e8 <rtems_rfs_format+0xb34> <== NEVER TAKEN
20100f4: d2 07 bf fc ld [ %fp + -4 ], %o1
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
20100f8: 80 a2 60 01 cmp %o1, 1
20100fc: 02 80 00 61 be 2010280 <rtems_rfs_format+0xbcc> <== ALWAYS TAKEN
2010100: 11 00 80 d8 sethi %hi(0x2036000), %o0
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
2010104: 40 00 57 13 call 2025d50 <printf> <== NOT EXECUTED
2010108: 90 12 22 18 or %o0, 0x218, %o0 ! 2036218 <ramdisk_ops+0x6f8><== NOT EXECUTED
rtems_rfs_fs_close (fs);
201010c: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
2010110: 40 00 47 a7 call 2021fac <rtems_rfs_fs_close> <== NOT EXECUTED
2010114: b0 10 20 00 clr %i0 <== NOT EXECUTED
2010118: 81 c7 e0 08 ret <== NOT EXECUTED
201011c: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010120: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2010124: 40 00 39 6f call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010128: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
201012c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
handle->dirty = false;
2010130: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
2010134: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
2010138: 40 00 5a ac call 2026be8 <strerror> <== NOT EXECUTED
201013c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
2010140: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2010144: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2010148: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED
201014c: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
2010150: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
2010154: 40 00 56 ff call 2025d50 <printf> <== NOT EXECUTED
2010158: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED
201015c: 81 c7 e0 08 ret <== NOT EXECUTED
2010160: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
2010164: c2 07 bf f4 ld [ %fp + -12 ], %g1
2010168: d4 07 bf 34 ld [ %fp + -204 ], %o2
201016c: d0 00 60 24 ld [ %g1 + 0x24 ], %o0
2010170: 40 00 56 a6 call 2025c08 <memset>
2010174: 92 10 20 00 clr %o1
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
2010178: 40 00 33 f5 call 201d14c <rtems_rfs_bitmap_map_clear_all>
201017c: 90 07 bf d4 add %fp, -44, %o0
2010180: ba 10 00 08 mov %o0, %i5
if (rc > 0)
2010184: 80 a7 60 00 cmp %i5, 0
2010188: 04 80 00 54 ble 20102d8 <rtems_rfs_format+0xc24> <== ALWAYS TAKEN
201018c: 90 07 bf d4 add %fp, -44, %o0
{
rtems_rfs_bitmap_close (&bitmap);
2010190: 40 00 34 bc call 201d480 <rtems_rfs_bitmap_close> <== NOT EXECUTED
2010194: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010198: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
201019c: 40 00 39 51 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20101a0: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
20101a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
20101a8: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
20101ac: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
20101b0: 40 00 5a 8e call 2026be8 <strerror> <== NOT EXECUTED
20101b4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
20101b8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20101bc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20101c0: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
20101c4: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20101c8: 40 00 56 e2 call 2025d50 <printf> <== NOT EXECUTED
20101cc: 90 12 20 98 or %o0, 0x98, %o0 ! 2036098 <ramdisk_ops+0x578><== NOT EXECUTED
20101d0: 81 c7 e0 08 ret <== NOT EXECUTED
20101d4: 81 e8 00 00 restore <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
20101d8: 40 00 56 de call 2025d50 <printf> <== NOT EXECUTED
20101dc: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
20101e0: 10 bf ff 90 b 2010020 <rtems_rfs_format+0x96c> <== NOT EXECUTED
20101e4: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
20101e8: 40 00 5a 80 call 2026be8 <strerror> <== NOT EXECUTED
20101ec: 01 00 00 00 nop <== NOT EXECUTED
20101f0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20101f4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20101f8: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20101fc: 40 00 56 d5 call 2025d50 <printf> <== NOT EXECUTED
2010200: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 20361e0 <ramdisk_ops+0x6c0><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
2010204: 40 00 47 6a call 2021fac <rtems_rfs_fs_close> <== NOT EXECUTED
2010208: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
201020c: 40 00 5a 77 call 2026be8 <strerror> <== NOT EXECUTED
2010210: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2010214: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2010218: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
rc, strerror (rc));
return -1;
201021c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
2010220: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
2010224: 40 00 56 cb call 2025d50 <printf> <== NOT EXECUTED
2010228: 90 12 23 58 or %o0, 0x358, %o0 ! 2036358 <ramdisk_ops+0x838><== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
201022c: 81 c7 e0 08 ret <== NOT EXECUTED
2010230: 81 e8 00 00 restore <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
2010234: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
2010238: 08 80 00 ef bleu 20105f4 <rtems_rfs_format+0xf40> <== NOT EXECUTED
201023c: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED
fs->block_size = (4 * 1024);
2010240: c2 27 bf 34 st %g1, [ %fp + -204 ] <== NOT EXECUTED
2010244: f8 00 a0 24 ld [ %g2 + 0x24 ], %i4 <== NOT EXECUTED
2010248: 10 bf fd 46 b 200f760 <rtems_rfs_format+0xac> <== NOT EXECUTED
201024c: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
printf ("\n");
2010250: 40 00 56 d3 call 2025d9c <putchar> <== NOT EXECUTED
2010254: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
2010258: 30 bf ff 95 b,a 20100ac <rtems_rfs_format+0x9f8> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
if (rc > 0)
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
201025c: 40 00 5a 63 call 2026be8 <strerror> <== NOT EXECUTED
2010260: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2010264: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2010268: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201026c: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
2010270: 40 00 56 b8 call 2025d50 <printf> <== NOT EXECUTED
2010274: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 2035df8 <ramdisk_ops+0x2d8><== NOT EXECUTED
rc, strerror (rc));
return -1;
2010278: 81 c7 e0 08 ret <== NOT EXECUTED
201027c: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2010280: d0 07 bf f8 ld [ %fp + -8 ], %o0
2010284: 92 10 20 01 mov 1, %o1
2010288: 94 07 bf ac add %fp, -84, %o2
201028c: 40 00 03 10 call 2010ecc <rtems_rfs_inode_open>
2010290: 96 10 20 01 mov 1, %o3
if (rc > 0)
2010294: ba 92 20 00 orcc %o0, 0, %i5
2010298: 24 80 00 50 ble,a 20103d8 <rtems_rfs_format+0xd24> <== ALWAYS TAKEN
201029c: 90 07 bf ac add %fp, -84, %o0
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
20102a0: 40 00 5a 52 call 2026be8 <strerror> <== NOT EXECUTED
20102a4: 01 00 00 00 nop <== NOT EXECUTED
20102a8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20102ac: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20102b0: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20102b4: 40 00 56 a7 call 2025d50 <printf> <== NOT EXECUTED
20102b8: 90 12 22 50 or %o0, 0x250, %o0 ! 2036250 <ramdisk_ops+0x730><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
20102bc: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
20102c0: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
20102c4: 40 00 02 14 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
20102c8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
rtems_rfs_fs_close (fs);
20102cc: 40 00 47 38 call 2021fac <rtems_rfs_fs_close> <== NOT EXECUTED
20102d0: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
20102d4: 30 bf ff ce b,a 201020c <rtems_rfs_format+0xb58> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
20102d8: 40 00 34 6a call 201d480 <rtems_rfs_bitmap_close>
20102dc: 01 00 00 00 nop
if (rc > 0)
20102e0: ba 92 20 00 orcc %o0, 0, %i5
20102e4: 14 80 00 2c bg 2010394 <rtems_rfs_format+0xce0> <== NEVER TAKEN
20102e8: 80 8c 60 ff btst 0xff, %l1
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
20102ec: 02 80 00 8a be 2010514 <rtems_rfs_format+0xe60> <== ALWAYS TAKEN
20102f0: ea 2f bf ec stb %l5, [ %fp + -20 ]
{
for (b = 0; b < blocks; b++)
20102f4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
20102f8: 04 80 00 87 ble 2010514 <rtems_rfs_format+0xe60> <== NOT EXECUTED
20102fc: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
2010300: 10 80 00 0a b 2010328 <rtems_rfs_format+0xc74> <== NOT EXECUTED
2010304: a0 07 00 10 add %i4, %l0, %l0 <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
2010308: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
201030c: d4 07 bf 34 ld [ %fp + -204 ], %o2 <== NOT EXECUTED
2010310: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED
2010314: 40 00 56 3d call 2025c08 <memset> <== NOT EXECUTED
2010318: b8 07 20 01 inc %i4 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
201031c: 80 a7 00 10 cmp %i4, %l0 <== NOT EXECUTED
2010320: 02 80 00 7d be 2010514 <rtems_rfs_format+0xe60> <== NOT EXECUTED
2010324: ea 2f bf ec stb %l5, [ %fp + -20 ] <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
2010328: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
201032c: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2010330: 96 10 20 00 clr %o3 <== NOT EXECUTED
2010334: 40 00 39 66 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2010338: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
201033c: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
2010340: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2010344: 04 bf ff f1 ble 2010308 <rtems_rfs_format+0xc54> <== NOT EXECUTED
2010348: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201034c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2010350: 40 00 38 e4 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010354: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
2010358: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
201035c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
2010360: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
2010364: 40 00 5a 21 call 2026be8 <strerror> <== NOT EXECUTED
2010368: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
201036c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2010370: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
2010374: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2010378: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
201037c: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
2010380: 90 12 21 30 or %o0, 0x130, %o0 <== NOT EXECUTED
2010384: 40 00 56 73 call 2025d50 <printf> <== NOT EXECUTED
2010388: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201038c: 81 c7 e0 08 ret <== NOT EXECUTED
2010390: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010394: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2010398: 40 00 38 d2 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201039c: 90 07 bf 2c add %fp, -212, %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
20103a0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
20103a4: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
20103a8: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
20103ac: 40 00 5a 0f call 2026be8 <strerror> <== NOT EXECUTED
20103b0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
20103b4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20103b8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20103bc: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
20103c0: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
20103c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
20103c8: 40 00 56 62 call 2025d50 <printf> <== NOT EXECUTED
20103cc: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED
20103d0: 81 c7 e0 08 ret <== NOT EXECUTED
20103d4: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
20103d8: 92 10 20 00 clr %o1
20103dc: 96 10 20 00 clr %o3
20103e0: 15 00 00 10 sethi %hi(0x4000), %o2
20103e4: 98 10 20 00 clr %o4
20103e8: 40 00 03 8d call 201121c <rtems_rfs_inode_initialise>
20103ec: 94 12 a1 c9 or %o2, 0x1c9, %o2
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
20103f0: ba 92 20 00 orcc %o0, 0, %i5
20103f4: 24 80 00 0a ble,a 201041c <rtems_rfs_format+0xd68> <== ALWAYS TAKEN
20103f8: d0 07 bf f8 ld [ %fp + -8 ], %o0
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
20103fc: 40 00 59 fb call 2026be8 <strerror> <== NOT EXECUTED
2010400: 01 00 00 00 nop <== NOT EXECUTED
2010404: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2010408: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201040c: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
2010410: 40 00 56 50 call 2025d50 <printf> <== NOT EXECUTED
2010414: 90 12 22 80 or %o0, 0x280, %o0 ! 2036280 <ramdisk_ops+0x760><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
2010418: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
201041c: d8 07 bf fc ld [ %fp + -4 ], %o4
2010420: 92 07 bf ac add %fp, -84, %o1
2010424: 96 10 20 01 mov 1, %o3
2010428: 15 00 80 d2 sethi %hi(0x2034800), %o2
201042c: 40 00 3c f5 call 201f800 <rtems_rfs_dir_add_entry>
2010430: 94 12 a0 c0 or %o2, 0xc0, %o2 ! 20348c0 <_rodata_start+0x390>
if (rc > 0)
2010434: ba 92 20 00 orcc %o0, 0, %i5
2010438: 24 80 00 0a ble,a 2010460 <rtems_rfs_format+0xdac> <== ALWAYS TAKEN
201043c: d0 07 bf f8 ld [ %fp + -8 ], %o0
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
2010440: 40 00 59 ea call 2026be8 <strerror> <== NOT EXECUTED
2010444: 01 00 00 00 nop <== NOT EXECUTED
2010448: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
201044c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2010450: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
2010454: 40 00 56 3f call 2025d50 <printf> <== NOT EXECUTED
2010458: 90 12 22 b8 or %o0, 0x2b8, %o0 ! 20362b8 <ramdisk_ops+0x798><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
201045c: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
2010460: 40 00 03 12 call 20110a8 <rtems_rfs_inode_close>
2010464: 92 07 bf ac add %fp, -84, %o1
if (rc > 0)
2010468: ba 92 20 00 orcc %o0, 0, %i5
201046c: 04 80 00 09 ble 2010490 <rtems_rfs_format+0xddc> <== ALWAYS TAKEN
2010470: 01 00 00 00 nop
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
2010474: 40 00 59 dd call 2026be8 <strerror> <== NOT EXECUTED
2010478: 01 00 00 00 nop <== NOT EXECUTED
201047c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2010480: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2010484: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
2010488: 40 00 56 32 call 2025d50 <printf> <== NOT EXECUTED
201048c: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 20362f0 <ramdisk_ops+0x7d0><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
2010490: 40 00 46 c7 call 2021fac <rtems_rfs_fs_close>
2010494: d0 07 bf f8 ld [ %fp + -8 ], %o0
if (rc < 0)
2010498: ba 92 20 00 orcc %o0, 0, %i5
201049c: 06 80 00 3c bl 201058c <rtems_rfs_format+0xed8> <== NEVER TAKEN
20104a0: 80 a7 60 00 cmp %i5, 0
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
20104a4: 12 bf ff 5a bne 201020c <rtems_rfs_format+0xb58> <== NEVER TAKEN
20104a8: b0 10 20 00 clr %i0
rc, strerror (rc));
return -1;
}
return 0;
}
20104ac: 81 c7 e0 08 ret
20104b0: 81 e8 00 00 restore
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
20104b4: 40 00 59 cd call 2026be8 <strerror> <== NOT EXECUTED
20104b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20104bc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20104c0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20104c4: 11 00 80 d6 sethi %hi(0x2035800), %o0 <== NOT EXECUTED
20104c8: 40 00 56 22 call 2025d50 <printf> <== NOT EXECUTED
20104cc: 90 12 23 50 or %o0, 0x350, %o0 ! 2035b50 <ramdisk_ops+0x30><== NOT EXECUTED
rc, strerror (rc));
return -1;
20104d0: 81 c7 e0 08 ret <== NOT EXECUTED
20104d4: 81 e8 00 00 restore <== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
20104d8: 40 00 59 c4 call 2026be8 <strerror> <== NOT EXECUTED
20104dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20104e0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20104e4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20104e8: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20104ec: 40 00 56 19 call 2025d50 <printf> <== NOT EXECUTED
20104f0: 90 12 21 78 or %o0, 0x178, %o0 ! 2036178 <ramdisk_ops+0x658><== NOT EXECUTED
rc, strerror (rc));
return -1;
20104f4: 81 c7 e0 08 ret <== NOT EXECUTED
20104f8: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
20104fc: 11 00 80 d6 sethi %hi(0x2035800), %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
2010500: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
2010504: 40 00 56 13 call 2025d50 <printf> <== NOT EXECUTED
2010508: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
201050c: 81 c7 e0 08 ret <== NOT EXECUTED
2010510: 81 e8 00 00 restore <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010514: 90 07 bf 2c add %fp, -212, %o0
2010518: 40 00 38 72 call 201e6e0 <rtems_rfs_buffer_handle_release>
201051c: 92 07 bf ec add %fp, -20, %o1
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
2010520: c2 07 bf 4c ld [ %fp + -180 ], %g1
handle->dirty = false;
2010524: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
2010528: c0 27 bf f0 clr [ %fp + -16 ]
201052c: b6 06 e0 01 inc %i3
2010530: 80 a0 40 1b cmp %g1, %i3
2010534: 04 bf fe da ble 201009c <rtems_rfs_format+0x9e8> <== ALWAYS TAKEN
2010538: c0 27 bf f4 clr [ %fp + -12 ]
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
201053c: fa 07 bf 50 ld [ %fp + -176 ], %i5 <== NOT EXECUTED
2010540: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2010544: 40 00 87 2b call 20321f0 <.umul> <== NOT EXECUTED
2010548: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
201054c: c2 07 bf 30 ld [ %fp + -208 ], %g1 <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
2010550: b8 02 20 01 add %o0, 1, %i4 <== NOT EXECUTED
2010554: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
2010558: e2 0e 60 14 ldub [ %i1 + 0x14 ], %l1 <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
201055c: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
2010560: 08 bf fe 4b bleu 200fe8c <rtems_rfs_format+0x7d8> <== NOT EXECUTED
2010564: e4 0e 60 15 ldub [ %i1 + 0x15 ], %l2 <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
2010568: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
201056c: 11 00 80 d7 sethi %hi(0x2035c00), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
2010570: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
2010574: 40 00 55 f7 call 2025d50 <printf> <== NOT EXECUTED
2010578: 90 12 22 d8 or %o0, 0x2d8, %o0 <== NOT EXECUTED
201057c: 81 c7 e0 08 ret <== NOT EXECUTED
2010580: 81 e8 00 00 restore <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
2010584: 10 bf ff f9 b 2010568 <rtems_rfs_format+0xeb4> <== NOT EXECUTED
2010588: b6 10 20 00 clr %i3 <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
201058c: 40 00 52 89 call 2024fb0 <__errno> <== NOT EXECUTED
2010590: b0 10 20 00 clr %i0 <== NOT EXECUTED
2010594: 40 00 52 87 call 2024fb0 <__errno> <== NOT EXECUTED
2010598: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
201059c: 40 00 59 93 call 2026be8 <strerror> <== NOT EXECUTED
20105a0: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
20105a4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20105a8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20105ac: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20105b0: 40 00 55 e8 call 2025d50 <printf> <== NOT EXECUTED
20105b4: 90 12 23 20 or %o0, 0x320, %o0 ! 2036320 <ramdisk_ops+0x800><== NOT EXECUTED
20105b8: 81 c7 e0 08 ret <== NOT EXECUTED
20105bc: 81 e8 00 00 restore <== NOT EXECUTED
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
20105c0: 40 00 52 7c call 2024fb0 <__errno> <== NOT EXECUTED
20105c4: b0 10 20 00 clr %i0 <== NOT EXECUTED
20105c8: 40 00 52 7a call 2024fb0 <__errno> <== NOT EXECUTED
20105cc: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED
rc = rtems_rfs_fs_open (name, NULL,
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
20105d0: 40 00 59 86 call 2026be8 <strerror> <== NOT EXECUTED
20105d4: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
20105d8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20105dc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20105e0: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20105e4: 40 00 55 db call 2025d50 <printf> <== NOT EXECUTED
20105e8: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 20361a8 <ramdisk_ops+0x688><== NOT EXECUTED
20105ec: 81 c7 e0 08 ret <== NOT EXECUTED
20105f0: 81 e8 00 00 restore <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
20105f4: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
20105f8: 10 bf fc 5a b 200f760 <rtems_rfs_format+0xac> <== NOT EXECUTED
20105fc: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED
02021fac <rtems_rfs_fs_close>:
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
2021fac: 9d e3 bf a0 save %sp, -96, %sp
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
2021fb0: 90 10 20 00 clr %o0
2021fb4: 92 10 20 02 mov 2, %o1
2021fb8: 7f ff c8 a1 call 201423c <rtems_rfs_trace>
2021fbc: ba 10 00 18 mov %i0, %i5
2021fc0: 80 8a 20 ff btst 0xff, %o0
2021fc4: 12 80 00 18 bne 2022024 <rtems_rfs_fs_close+0x78> <== NEVER TAKEN
2021fc8: 11 00 80 e0 sethi %hi(0x2038000), %o0
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
2021fcc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2021fd0: 80 a0 60 00 cmp %g1, 0
2021fd4: 04 80 00 0d ble 2022008 <rtems_rfs_fs_close+0x5c> <== NEVER TAKEN
2021fd8: 01 00 00 00 nop
2021fdc: b6 10 20 00 clr %i3 ! 0 <PROM_START>
2021fe0: b8 10 20 00 clr %i4
rtems_rfs_group_close (fs, &fs->groups[group]);
2021fe4: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
2021fe8: 90 10 00 1d mov %i5, %o0
2021fec: 7f ff ba 12 call 2010834 <rtems_rfs_group_close>
2021ff0: 92 02 40 1b add %o1, %i3, %o1
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
2021ff4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2021ff8: b8 07 20 01 inc %i4
2021ffc: 80 a0 40 1c cmp %g1, %i4
2022000: 14 bf ff f9 bg 2021fe4 <rtems_rfs_fs_close+0x38> <== NEVER TAKEN
2022004: b6 06 e0 50 add %i3, 0x50, %i3
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
2022008: 7f ff f4 23 call 201f094 <rtems_rfs_buffer_close>
202200c: 90 10 00 1d mov %i5, %o0
free (fs);
return 0;
}
2022010: b0 10 20 00 clr %i0
for (group = 0; group < fs->group_count; group++)
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
free (fs);
2022014: 7f ff 91 51 call 2006558 <free>
2022018: 90 10 00 1d mov %i5, %o0
return 0;
}
202201c: 81 c7 e0 08 ret
2022020: 81 e8 00 00 restore
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
2022024: 40 00 0f 8c call 2025e54 <puts> <== NOT EXECUTED
2022028: 90 12 22 68 or %o0, 0x268, %o0 <== NOT EXECUTED
for (group = 0; group < fs->group_count; group++)
202202c: 10 bf ff e9 b 2021fd0 <rtems_rfs_fs_close+0x24> <== NOT EXECUTED
2022030: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 <== NOT EXECUTED
020216f0 <rtems_rfs_fs_open>:
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
20216f0: 9d e3 bf 68 save %sp, -152, %sp
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
20216f4: 90 10 20 00 clr %o0
20216f8: 7f ff ca d1 call 201423c <rtems_rfs_trace>
20216fc: 92 10 20 01 mov 1, %o1
2021700: 80 8a 20 ff btst 0xff, %o0
2021704: 12 80 00 7b bne 20218f0 <rtems_rfs_fs_open+0x200> <== NEVER TAKEN
2021708: 92 10 00 18 mov %i0, %o1
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
202170c: 7f ff 95 b5 call 2006de0 <malloc>
2021710: 90 10 20 80 mov 0x80, %o0
if (!*fs)
2021714: 80 a2 20 00 cmp %o0, 0
2021718: 02 80 01 69 be 2021cbc <rtems_rfs_fs_open+0x5cc> <== NEVER TAKEN
202171c: d0 27 00 00 st %o0, [ %i4 ]
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
2021720: 92 10 20 00 clr %o1
2021724: 40 00 11 39 call 2025c08 <memset>
2021728: 94 10 20 80 mov 0x80, %o2
(*fs)->user = user;
202172c: c2 07 00 00 ld [ %i4 ], %g1
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
2021730: 90 10 00 18 mov %i0, %o0
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
2021734: f2 20 60 7c st %i1, [ %g1 + 0x7c ]
rtems_chain_initialize_empty (&(*fs)->buffers);
2021738: c2 07 00 00 ld [ %i4 ], %g1
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
202173c: c0 20 60 44 clr [ %g1 + 0x44 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2021740: 86 00 60 40 add %g1, 0x40, %g3
2021744: 84 00 60 44 add %g1, 0x44, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2021748: c6 20 60 48 st %g3, [ %g1 + 0x48 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
202174c: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
rtems_chain_initialize_empty (&(*fs)->release);
2021750: c2 07 00 00 ld [ %i4 ], %g1
head->previous = NULL;
2021754: c0 20 60 54 clr [ %g1 + 0x54 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2021758: 86 00 60 50 add %g1, 0x50, %g3
202175c: 84 00 60 54 add %g1, 0x54, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2021760: c6 20 60 58 st %g3, [ %g1 + 0x58 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2021764: c4 20 60 50 st %g2, [ %g1 + 0x50 ]
rtems_chain_initialize_empty (&(*fs)->release_modified);
2021768: c2 07 00 00 ld [ %i4 ], %g1
head->previous = NULL;
202176c: c0 20 60 64 clr [ %g1 + 0x64 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2021770: 86 00 60 60 add %g1, 0x60, %g3
2021774: 84 00 60 64 add %g1, 0x64, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2021778: c6 20 60 68 st %g3, [ %g1 + 0x68 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
202177c: c4 20 60 60 st %g2, [ %g1 + 0x60 ]
rtems_chain_initialize_empty (&(*fs)->file_shares);
2021780: c2 07 00 00 ld [ %i4 ], %g1
head->previous = NULL;
2021784: c0 20 60 74 clr [ %g1 + 0x74 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2021788: 86 00 60 70 add %g1, 0x70, %g3
202178c: 84 00 60 74 add %g1, 0x74, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2021790: c6 20 60 78 st %g3, [ %g1 + 0x78 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2021794: c4 20 60 70 st %g2, [ %g1 + 0x70 ]
(*fs)->max_held_buffers = max_held_buffers;
2021798: d2 07 00 00 ld [ %i4 ], %o1
202179c: f6 22 60 3c st %i3, [ %o1 + 0x3c ]
(*fs)->buffers_count = 0;
20217a0: c0 22 60 4c clr [ %o1 + 0x4c ]
(*fs)->release_count = 0;
20217a4: c0 22 60 5c clr [ %o1 + 0x5c ]
(*fs)->release_modified_count = 0;
20217a8: c0 22 60 6c clr [ %o1 + 0x6c ]
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
20217ac: 7f ff f4 f3 call 201eb78 <rtems_rfs_buffer_open>
20217b0: f4 22 40 00 st %i2, [ %o1 ]
if (rc > 0)
20217b4: ba 92 20 00 orcc %o0, 0, %i5
20217b8: 14 80 00 aa bg 2021a60 <rtems_rfs_fs_open+0x370> <== NEVER TAKEN
20217bc: 94 10 20 00 clr %o2
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
20217c0: f2 07 00 00 ld [ %i4 ], %i1
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20217c4: c0 2f bf f4 clrb [ %fp + -12 ]
handle->bnum = 0;
20217c8: c0 27 bf f8 clr [ %fp + -8 ]
handle->buffer = NULL;
20217cc: c0 27 bf fc clr [ %fp + -4 ]
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
20217d0: 90 10 00 19 mov %i1, %o0
20217d4: 92 07 bf f4 add %fp, -12, %o1
20217d8: 7f ff f4 3d call 201e8cc <rtems_rfs_buffer_handle_request>
20217dc: 96 10 20 01 mov 1, %o3
if (rc > 0)
20217e0: ba 92 20 00 orcc %o0, 0, %i5
20217e4: 04 80 00 16 ble 202183c <rtems_rfs_fs_open+0x14c> <== ALWAYS TAKEN
20217e8: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
20217ec: 7f ff ca 94 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20217f0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20217f4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20217f8: 12 80 00 49 bne 202191c <rtems_rfs_fs_open+0x22c> <== NOT EXECUTED
20217fc: 01 00 00 00 nop <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
2021800: 7f ff f6 25 call 201f094 <rtems_rfs_buffer_close> <== NOT EXECUTED
2021804: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
2021808: 7f ff 93 54 call 2006558 <free> <== NOT EXECUTED
202180c: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021810: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021814: 7f ff ca 8a call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021818: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
202181c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021820: 12 80 00 2c bne 20218d0 <rtems_rfs_fs_open+0x1e0> <== NOT EXECUTED
2021824: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
2021828: 40 00 0d e2 call 2024fb0 <__errno> <== NOT EXECUTED
202182c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2021830: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
return -1;
2021834: 81 c7 e0 08 ret <== NOT EXECUTED
2021838: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
202183c: c2 07 bf fc ld [ %fp + -4 ], %g1
2021840: f4 00 60 24 ld [ %g1 + 0x24 ], %i2
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
2021844: c2 0e a0 02 ldub [ %i2 + 2 ], %g1
2021848: c4 0e 80 00 ldub [ %i2 ], %g2
202184c: c8 0e a0 01 ldub [ %i2 + 1 ], %g4
2021850: c6 0e a0 03 ldub [ %i2 + 3 ], %g3
2021854: 83 28 60 08 sll %g1, 8, %g1
2021858: 85 28 a0 18 sll %g2, 0x18, %g2
202185c: 89 29 20 10 sll %g4, 0x10, %g4
2021860: 84 10 80 04 or %g2, %g4, %g2
2021864: 84 10 80 03 or %g2, %g3, %g2
2021868: 84 10 80 01 or %g2, %g1, %g2
202186c: 03 0a 02 48 sethi %hi(0x28092000), %g1
2021870: 82 10 60 01 or %g1, 1, %g1 ! 28092001 <RAM_END+0x25c92001>
2021874: 80 a0 80 01 cmp %g2, %g1
2021878: 22 80 00 31 be,a 202193c <rtems_rfs_fs_open+0x24c> <== ALWAYS TAKEN
202187c: c6 0e a0 0d ldub [ %i2 + 0xd ], %g3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021880: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021884: 7f ff ca 6e call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021888: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
202188c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021890: 32 80 00 1c bne,a 2021900 <rtems_rfs_fs_open+0x210> <== NOT EXECUTED
2021894: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2021898: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
202189c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
20218a0: 7f ff f3 90 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20218a4: ba 10 20 05 mov 5, %i5 <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
20218a8: 7f ff f5 fb call 201f094 <rtems_rfs_buffer_close> <== NOT EXECUTED
20218ac: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
20218b0: 7f ff 93 2a call 2006558 <free> <== NOT EXECUTED
20218b4: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
20218b8: 90 10 20 00 clr %o0 <== NOT EXECUTED
20218bc: 7f ff ca 60 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20218c0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20218c4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20218c8: 02 bf ff d8 be 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
20218cc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
20218d0: 40 00 14 c6 call 2026be8 <strerror> <== NOT EXECUTED
20218d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20218d8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20218dc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20218e0: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
20218e4: 40 00 11 1b call 2025d50 <printf> <== NOT EXECUTED
20218e8: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 20381a8 <CSWTCH.1+0x12bc><== NOT EXECUTED
20218ec: 30 bf ff cf b,a 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
20218f0: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
20218f4: 40 00 11 17 call 2025d50 <printf> <== NOT EXECUTED
20218f8: 90 12 23 28 or %o0, 0x328, %o0 ! 2037f28 <CSWTCH.1+0x103c><== NOT EXECUTED
20218fc: 30 bf ff 84 b,a 202170c <rtems_rfs_fs_open+0x1c> <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
2021900: 40 00 11 55 call 2025e54 <puts> <== NOT EXECUTED
2021904: 90 12 23 d8 or %o0, 0x3d8, %o0 <== NOT EXECUTED
2021908: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
202190c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
2021910: 7f ff f3 74 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2021914: ba 10 20 05 mov 5, %i5 <== NOT EXECUTED
2021918: 30 bf ff e4 b,a 20218a8 <rtems_rfs_fs_open+0x1b8> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
202191c: 40 00 14 b3 call 2026be8 <strerror> <== NOT EXECUTED
2021920: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021924: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021928: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
202192c: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2021930: 40 00 11 08 call 2025d50 <printf> <== NOT EXECUTED
2021934: 90 12 23 a0 or %o0, 0x3a0, %o0 ! 2037fa0 <CSWTCH.1+0x10b4><== NOT EXECUTED
2021938: 30 bf ff b2 b,a 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
202193c: c2 0e a0 0e ldub [ %i2 + 0xe ], %g1
2021940: c4 0e a0 0f ldub [ %i2 + 0xf ], %g2
2021944: d6 0e a0 0c ldub [ %i2 + 0xc ], %o3
2021948: 87 28 e0 10 sll %g3, 0x10, %g3
202194c: 83 28 60 08 sll %g1, 8, %g1
2021950: 97 2a e0 18 sll %o3, 0x18, %o3
2021954: 96 12 c0 03 or %o3, %g3, %o3
2021958: 96 12 c0 02 or %o3, %g2, %o3
202195c: 96 12 c0 01 or %o3, %g1, %o3
2021960: d6 26 60 04 st %o3, [ %i1 + 4 ]
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
2021964: c6 0e a0 09 ldub [ %i2 + 9 ], %g3
2021968: c2 0e a0 0a ldub [ %i2 + 0xa ], %g1
202196c: c4 0e a0 0b ldub [ %i2 + 0xb ], %g2
2021970: f6 0e a0 08 ldub [ %i2 + 8 ], %i3
2021974: 87 28 e0 10 sll %g3, 0x10, %g3
2021978: 83 28 60 08 sll %g1, 8, %g1
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
202197c: f0 06 60 0c ld [ %i1 + 0xc ], %i0
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
2021980: 94 10 20 00 clr %o2
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
2021984: b7 2e e0 18 sll %i3, 0x18, %i3
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
2021988: 90 10 20 00 clr %o0
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
202198c: b6 16 c0 03 or %i3, %g3, %i3
2021990: b6 16 c0 02 or %i3, %g2, %i3
2021994: b6 16 c0 01 or %i3, %g1, %i3
2021998: f6 26 60 08 st %i3, [ %i1 + 8 ]
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
202199c: 40 00 43 a7 call 2032838 <__muldi3>
20219a0: 92 10 00 1b mov %i3, %o1
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
20219a4: d6 06 20 1c ld [ %i0 + 0x1c ], %o3
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
20219a8: a0 10 00 09 mov %o1, %l0
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
20219ac: d2 06 20 24 ld [ %i0 + 0x24 ], %o1
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
20219b0: ba 10 00 08 mov %o0, %i5
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
20219b4: 94 10 20 00 clr %o2
20219b8: 40 00 43 a0 call 2032838 <__muldi3>
20219bc: 90 10 20 00 clr %o0
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
20219c0: 80 a7 40 08 cmp %i5, %o0
20219c4: 38 80 00 3a bgu,a 2021aac <rtems_rfs_fs_open+0x3bc> <== NEVER TAKEN
20219c8: 90 10 20 00 clr %o0 <== NOT EXECUTED
20219cc: 02 80 00 35 be 2021aa0 <rtems_rfs_fs_open+0x3b0> <== ALWAYS TAKEN
20219d0: 80 a4 00 09 cmp %l0, %o1
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
20219d4: c2 0e a0 24 ldub [ %i2 + 0x24 ], %g1 <== NOT EXECUTED
20219d8: c8 0e a0 25 ldub [ %i2 + 0x25 ], %g4
20219dc: c6 0e a0 27 ldub [ %i2 + 0x27 ], %g3
20219e0: c4 0e a0 26 ldub [ %i2 + 0x26 ], %g2
20219e4: 83 28 60 18 sll %g1, 0x18, %g1
20219e8: 89 29 20 10 sll %g4, 0x10, %g4
20219ec: 85 28 a0 08 sll %g2, 8, %g2
20219f0: 82 10 40 04 or %g1, %g4, %g1
20219f4: 82 10 40 03 or %g1, %g3, %g1
20219f8: 82 10 40 02 or %g1, %g2, %g1
20219fc: 80 a0 60 38 cmp %g1, 0x38
2021a00: 22 80 00 35 be,a 2021ad4 <rtems_rfs_fs_open+0x3e4> <== ALWAYS TAKEN
2021a04: c6 0e a0 13 ldub [ %i2 + 0x13 ], %g3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021a08: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021a0c: 7f ff ca 0c call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021a10: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021a14: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021a18: 22 bf ff a1 be,a 202189c <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
2021a1c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
2021a20: c6 0e a0 05 ldub [ %i2 + 5 ], %g3 <== NOT EXECUTED
2021a24: c2 0e a0 06 ldub [ %i2 + 6 ], %g1 <== NOT EXECUTED
2021a28: d2 0e a0 04 ldub [ %i2 + 4 ], %o1 <== NOT EXECUTED
2021a2c: c4 0e a0 07 ldub [ %i2 + 7 ], %g2 <== NOT EXECUTED
2021a30: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
2021a34: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2021a38: 93 2a 60 18 sll %o1, 0x18, %o1 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
2021a3c: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
2021a40: 92 12 40 03 or %o1, %g3, %o1 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
2021a44: 94 10 20 00 clr %o2 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
2021a48: 92 12 40 02 or %o1, %g2, %o1 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
2021a4c: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED
2021a50: 40 00 10 c0 call 2025d50 <printf> <== NOT EXECUTED
2021a54: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
2021a58: 10 bf ff 91 b 202189c <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
2021a5c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
if (rc > 0)
{
free (*fs);
2021a60: 7f ff 92 be call 2006558 <free> <== NOT EXECUTED
2021a64: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021a68: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021a6c: 7f ff c9 f4 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021a70: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021a74: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021a78: 02 bf ff 6c be 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
2021a7c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
2021a80: 40 00 14 5a call 2026be8 <strerror> <== NOT EXECUTED
2021a84: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021a88: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021a8c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2021a90: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
2021a94: 40 00 10 af call 2025d50 <printf> <== NOT EXECUTED
2021a98: 90 12 23 70 or %o0, 0x370, %o0 ! 2037f70 <CSWTCH.1+0x1084><== NOT EXECUTED
2021a9c: 30 bf ff 63 b,a 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
2021aa0: 28 bf ff ce bleu,a 20219d8 <rtems_rfs_fs_open+0x2e8> <== ALWAYS TAKEN
2021aa4: c2 0e a0 24 ldub [ %i2 + 0x24 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021aa8: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021aac: 7f ff c9 e4 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021ab0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021ab4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021ab8: 22 bf ff 79 be,a 202189c <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
2021abc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
2021ac0: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2021ac4: 40 00 10 e4 call 2025e54 <puts> <== NOT EXECUTED
2021ac8: 90 12 20 18 or %o0, 0x18, %o0 ! 2038018 <CSWTCH.1+0x112c> <== NOT EXECUTED
2021acc: 10 bf ff 74 b 202189c <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
2021ad0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
2021ad4: c2 0e a0 10 ldub [ %i2 + 0x10 ], %g1
2021ad8: c8 0e a0 11 ldub [ %i2 + 0x11 ], %g4
2021adc: c4 0e a0 12 ldub [ %i2 + 0x12 ], %g2
2021ae0: 89 29 20 10 sll %g4, 0x10, %g4
2021ae4: 85 28 a0 08 sll %g2, 8, %g2
2021ae8: 83 28 60 18 sll %g1, 0x18, %g1
2021aec: 82 10 40 04 or %g1, %g4, %g1
2021af0: 82 10 40 03 or %g1, %g3, %g1
2021af4: 82 10 40 02 or %g1, %g2, %g1
2021af8: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
2021afc: c6 0e a0 17 ldub [ %i2 + 0x17 ], %g3
2021b00: c2 0e a0 14 ldub [ %i2 + 0x14 ], %g1
2021b04: c8 0e a0 15 ldub [ %i2 + 0x15 ], %g4
2021b08: c4 0e a0 16 ldub [ %i2 + 0x16 ], %g2
2021b0c: 89 29 20 10 sll %g4, 0x10, %g4
2021b10: 85 28 a0 08 sll %g2, 8, %g2
2021b14: 83 28 60 18 sll %g1, 0x18, %g1
2021b18: 82 10 40 04 or %g1, %g4, %g1
2021b1c: 82 10 40 03 or %g1, %g3, %g1
2021b20: 82 10 40 02 or %g1, %g2, %g1
2021b24: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
2021b28: c6 0e a0 19 ldub [ %i2 + 0x19 ], %g3
2021b2c: c2 0e a0 1a ldub [ %i2 + 0x1a ], %g1
2021b30: c4 0e a0 1b ldub [ %i2 + 0x1b ], %g2
2021b34: f0 0e a0 18 ldub [ %i2 + 0x18 ], %i0
2021b38: 87 28 e0 10 sll %g3, 0x10, %g3
2021b3c: 83 28 60 08 sll %g1, 8, %g1
2021b40: b1 2e 20 18 sll %i0, 0x18, %i0
2021b44: b0 16 00 03 or %i0, %g3, %i0
2021b48: b0 16 00 02 or %i0, %g2, %i0
2021b4c: b0 16 00 01 or %i0, %g1, %i0
2021b50: f0 26 60 20 st %i0, [ %i1 + 0x20 ]
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
2021b54: c4 0e a0 1f ldub [ %i2 + 0x1f ], %g2
2021b58: fa 0e a0 1c ldub [ %i2 + 0x1c ], %i5
2021b5c: c6 0e a0 1d ldub [ %i2 + 0x1d ], %g3
2021b60: c2 0e a0 1e ldub [ %i2 + 0x1e ], %g1
2021b64: 87 28 e0 10 sll %g3, 0x10, %g3
2021b68: 83 28 60 08 sll %g1, 8, %g1
2021b6c: bb 2f 60 18 sll %i5, 0x18, %i5
2021b70: ba 17 40 03 or %i5, %g3, %i5
2021b74: ba 17 40 02 or %i5, %g2, %i5
2021b78: ba 17 40 01 or %i5, %g1, %i5
2021b7c: fa 26 60 24 st %i5, [ %i1 + 0x24 ]
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
2021b80: c4 0e a0 21 ldub [ %i2 + 0x21 ], %g2
2021b84: de 0e a0 20 ldub [ %i2 + 0x20 ], %o7
2021b88: c6 0e a0 22 ldub [ %i2 + 0x22 ], %g3
2021b8c: c8 0e a0 23 ldub [ %i2 + 0x23 ], %g4
2021b90: 85 28 a0 10 sll %g2, 0x10, %g2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
2021b94: 83 36 e0 02 srl %i3, 2, %g1
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
2021b98: b5 2b e0 18 sll %o7, 0x18, %i2
2021b9c: 87 28 e0 08 sll %g3, 8, %g3
2021ba0: b4 16 80 02 or %i2, %g2, %i2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
2021ba4: 85 28 60 02 sll %g1, 2, %g2
2021ba8: 84 00 80 01 add %g2, %g1, %g2
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
2021bac: b4 16 80 04 or %i2, %g4, %i2
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
2021bb0: 92 10 00 01 mov %g1, %o1
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
2021bb4: b4 16 80 03 or %i2, %g3, %i2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
2021bb8: c4 26 60 34 st %g2, [ %i1 + 0x34 ]
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
2021bbc: 90 10 00 01 mov %g1, %o0
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
2021bc0: c2 26 60 30 st %g1, [ %i1 + 0x30 ]
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
2021bc4: 40 00 41 8b call 20321f0 <.umul>
2021bc8: f4 26 60 28 st %i2, [ %i1 + 0x28 ]
2021bcc: 83 2a 20 02 sll %o0, 2, %g1
2021bd0: 82 00 40 08 add %g1, %o0, %g1
fs->inodes = fs->group_count * fs->group_inodes;
2021bd4: 92 10 00 18 mov %i0, %o1
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
2021bd8: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
2021bdc: 40 00 41 85 call 20321f0 <.umul>
2021be0: 90 10 00 1a mov %i2, %o0
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
2021be4: 92 10 20 38 mov 0x38, %o1
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
2021be8: d0 26 60 10 st %o0, [ %i1 + 0x10 ]
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
2021bec: 40 00 41 bb call 20322d8 <.udiv>
2021bf0: 90 10 00 1b mov %i3, %o0
2021bf4: d0 26 60 2c st %o0, [ %i1 + 0x2c ]
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
2021bf8: b7 2e e0 03 sll %i3, 3, %i3
2021bfc: 92 07 bf f4 add %fp, -12, %o1
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
2021c00: 80 a7 40 1b cmp %i5, %i3
2021c04: 08 80 00 10 bleu 2021c44 <rtems_rfs_fs_open+0x554> <== ALWAYS TAKEN
2021c08: 90 10 00 19 mov %i1, %o0
2021c0c: 7f ff f2 b5 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2021c10: ba 10 20 05 mov 5, %i5 <== NOT EXECUTED
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021c14: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021c18: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
2021c1c: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
2021c20: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2021c24: 7f ff c9 86 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021c28: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2021c2c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021c30: 02 bf fe f4 be 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
2021c34: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
2021c38: 40 00 10 87 call 2025e54 <puts> <== NOT EXECUTED
2021c3c: 90 12 20 a0 or %o0, 0xa0, %o0 ! 20380a0 <CSWTCH.1+0x11b4> <== NOT EXECUTED
2021c40: 30 bf fe f0 b,a 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2021c44: 7f ff f2 a7 call 201e6e0 <rtems_rfs_buffer_handle_release>
2021c48: 01 00 00 00 nop
rtems_rfs_buffer_handle_close (fs, &handle);
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
2021c4c: d2 06 60 08 ld [ %i1 + 8 ], %o1
handle->dirty = false;
2021c50: c0 2f bf f4 clrb [ %fp + -12 ]
handle->bnum = 0;
2021c54: c0 27 bf f8 clr [ %fp + -8 ]
handle->buffer = NULL;
2021c58: c0 27 bf fc clr [ %fp + -4 ]
2021c5c: 7f ff f4 48 call 201ed7c <rtems_rfs_buffer_setblksize>
2021c60: 90 10 00 19 mov %i1, %o0
if (rc > 0)
2021c64: ba 92 20 00 orcc %o0, 0, %i5
2021c68: 04 80 00 23 ble 2021cf4 <rtems_rfs_fs_open+0x604> <== ALWAYS TAKEN
2021c6c: 92 07 bf f4 add %fp, -12, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2021c70: 7f ff f2 9c call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2021c74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021c78: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021c7c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
2021c80: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
2021c84: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2021c88: 7f ff c9 6d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021c8c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2021c90: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021c94: 02 bf fe db be 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
2021c98: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
2021c9c: 40 00 13 d3 call 2026be8 <strerror> <== NOT EXECUTED
2021ca0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021ca4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021ca8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2021cac: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2021cb0: 40 00 10 28 call 2025d50 <printf> <== NOT EXECUTED
2021cb4: 90 12 20 e8 or %o0, 0xe8, %o0 ! 20380e8 <CSWTCH.1+0x11fc> <== NOT EXECUTED
2021cb8: 30 bf fe d2 b,a 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021cbc: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021cc0: 7f ff c9 5f call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021cc4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021cc8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021ccc: 02 80 00 04 be 2021cdc <rtems_rfs_fs_open+0x5ec> <== NOT EXECUTED
2021cd0: 11 00 80 df sethi %hi(0x2037c00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
2021cd4: 40 00 10 60 call 2025e54 <puts> <== NOT EXECUTED
2021cd8: 90 12 23 40 or %o0, 0x340, %o0 ! 2037f40 <CSWTCH.1+0x1054><== NOT EXECUTED
errno = ENOMEM;
2021cdc: 40 00 0c b5 call 2024fb0 <__errno> <== NOT EXECUTED
2021ce0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2021ce4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2021ce8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
2021cec: 81 c7 e0 08 ret <== NOT EXECUTED
2021cf0: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
2021cf4: fa 06 60 20 ld [ %i1 + 0x20 ], %i5
2021cf8: 92 10 20 50 mov 0x50, %o1
2021cfc: 7f ff 8f ef call 2005cb8 <calloc>
2021d00: 90 10 00 1d mov %i5, %o0
2021d04: d0 26 60 1c st %o0, [ %i1 + 0x1c ]
if (!fs->groups)
2021d08: 80 a2 20 00 cmp %o0, 0
2021d0c: 02 80 00 98 be 2021f6c <rtems_rfs_fs_open+0x87c> <== NEVER TAKEN
2021d10: b6 10 00 08 mov %o0, %i3
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
2021d14: 80 a7 60 00 cmp %i5, 0
2021d18: 04 80 00 38 ble 2021df8 <rtems_rfs_fs_open+0x708> <== NEVER TAKEN
2021d1c: b0 10 20 00 clr %i0
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: no memory for group table\n");
2021d20: fa 06 60 24 ld [ %i1 + 0x24 ], %i5
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
2021d24: 10 80 00 08 b 2021d44 <rtems_rfs_fs_open+0x654>
2021d28: b4 10 20 00 clr %i2
2021d2c: b4 06 a0 01 inc %i2
2021d30: 80 a6 80 01 cmp %i2, %g1
2021d34: 16 80 00 31 bge 2021df8 <rtems_rfs_fs_open+0x708> <== ALWAYS TAKEN
2021d38: b0 06 20 50 add %i0, 0x50, %i0
2021d3c: fa 06 60 24 ld [ %i1 + 0x24 ], %i5 <== NOT EXECUTED
2021d40: f6 06 60 1c ld [ %i1 + 0x1c ], %i3 <== NOT EXECUTED
{
rc = rtems_rfs_group_open (fs,
rtems_rfs_fs_block (fs, group, 0),
2021d44: 92 10 00 1d mov %i5, %o1
2021d48: 40 00 41 2a call 20321f0 <.umul>
2021d4c: 90 10 00 1a mov %i2, %o0
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
2021d50: d6 06 60 28 ld [ %i1 + 0x28 ], %o3
rtems_rfs_fs_block (fs, group, 0),
2021d54: 92 02 20 01 add %o0, 1, %o1
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
2021d58: 94 10 00 1d mov %i5, %o2
2021d5c: 98 06 c0 18 add %i3, %i0, %o4
2021d60: 7f ff ba 28 call 2010600 <rtems_rfs_group_open>
2021d64: 90 10 00 19 mov %i1, %o0
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
2021d68: ba 92 20 00 orcc %o0, 0, %i5
2021d6c: 24 bf ff f0 ble,a 2021d2c <rtems_rfs_fs_open+0x63c> <== ALWAYS TAKEN
2021d70: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
{
int g;
for (g = 0; g < group; g++)
2021d74: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2021d78: 22 80 00 0d be,a 2021dac <rtems_rfs_fs_open+0x6bc> <== NOT EXECUTED
2021d7c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
2021d80: b0 10 20 00 clr %i0 <== NOT EXECUTED
2021d84: b6 10 20 00 clr %i3 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
2021d88: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
2021d8c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2021d90: 7f ff ba a9 call 2010834 <rtems_rfs_group_close> <== NOT EXECUTED
2021d94: 92 02 40 18 add %o1, %i0, %o1 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
2021d98: b6 06 e0 01 inc %i3 <== NOT EXECUTED
2021d9c: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
2021da0: 12 bf ff fa bne 2021d88 <rtems_rfs_fs_open+0x698> <== NOT EXECUTED
2021da4: b0 06 20 50 add %i0, 0x50, %i0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2021da8: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
2021dac: 7f ff f2 4d call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2021db0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021db4: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021db8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
2021dbc: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
2021dc0: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2021dc4: 7f ff c9 1e call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021dc8: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2021dcc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021dd0: 02 bf fe 8c be 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
2021dd4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
2021dd8: 40 00 13 84 call 2026be8 <strerror> <== NOT EXECUTED
2021ddc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021de0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021de4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2021de8: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2021dec: 40 00 0f d9 call 2025d50 <printf> <== NOT EXECUTED
2021df0: 90 12 21 68 or %o0, 0x168, %o0 ! 2038168 <CSWTCH.1+0x127c><== NOT EXECUTED
2021df4: 30 bf fe 83 b,a 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
2021df8: d0 07 00 00 ld [ %i4 ], %o0
2021dfc: 92 10 20 01 mov 1, %o1
2021e00: 94 07 bf cc add %fp, -52, %o2
2021e04: 7f ff bc 32 call 2010ecc <rtems_rfs_inode_open>
2021e08: 96 10 20 01 mov 1, %o3
if (rc > 0)
2021e0c: ba 92 20 00 orcc %o0, 0, %i5
2021e10: 14 80 00 45 bg 2021f24 <rtems_rfs_fs_open+0x834> <== NEVER TAKEN
2021e14: 01 00 00 00 nop
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
2021e18: d0 07 00 00 ld [ %i4 ], %o0
2021e1c: c2 02 00 00 ld [ %o0 ], %g1
2021e20: 80 88 60 04 btst 4, %g1
2021e24: 12 80 00 10 bne 2021e64 <rtems_rfs_fs_open+0x774>
2021e28: c2 07 bf d8 ld [ %fp + -40 ], %g1
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
2021e2c: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2021e30: c6 08 60 02 ldub [ %g1 + 2 ], %g3
2021e34: 83 28 e0 08 sll %g3, 8, %g1
2021e38: 82 10 80 01 or %g2, %g1, %g1
2021e3c: 05 00 00 3f sethi %hi(0xfc00), %g2
2021e40: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
2021e44: 80 a0 40 02 cmp %g1, %g2
2021e48: 02 80 00 23 be 2021ed4 <rtems_rfs_fs_open+0x7e4> <== NEVER TAKEN
2021e4c: 05 00 00 3c sethi %hi(0xf000), %g2
2021e50: 82 08 40 02 and %g1, %g2, %g1
2021e54: 05 00 00 10 sethi %hi(0x4000), %g2
2021e58: 80 a0 40 02 cmp %g1, %g2
2021e5c: 12 80 00 1e bne 2021ed4 <rtems_rfs_fs_open+0x7e4> <== NEVER TAKEN
2021e60: 01 00 00 00 nop
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
2021e64: 7f ff bc 91 call 20110a8 <rtems_rfs_inode_close>
2021e68: 92 07 bf cc add %fp, -52, %o1
if (rc > 0)
2021e6c: ba 92 20 00 orcc %o0, 0, %i5
2021e70: 14 80 00 07 bg 2021e8c <rtems_rfs_fs_open+0x79c> <== NEVER TAKEN
2021e74: 01 00 00 00 nop
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
2021e78: 40 00 0c 4e call 2024fb0 <__errno>
2021e7c: b0 10 20 00 clr %i0 ! 0 <PROM_START>
2021e80: c0 22 00 00 clr [ %o0 ]
return 0;
}
2021e84: 81 c7 e0 08 ret
2021e88: 81 e8 00 00 restore
}
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
2021e8c: 7f ff f4 82 call 201f094 <rtems_rfs_buffer_close> <== NOT EXECUTED
2021e90: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
2021e94: 7f ff 91 b1 call 2006558 <free> <== NOT EXECUTED
2021e98: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021e9c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021ea0: 7f ff c8 e7 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021ea4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021ea8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021eac: 02 bf fe 5f be 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
2021eb0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
2021eb4: 40 00 13 4d call 2026be8 <strerror> <== NOT EXECUTED
2021eb8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021ebc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021ec0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2021ec4: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2021ec8: 40 00 0f a2 call 2025d50 <printf> <== NOT EXECUTED
2021ecc: 90 12 22 38 or %o0, 0x238, %o0 ! 2038238 <CSWTCH.1+0x134c><== NOT EXECUTED
2021ed0: 30 bf fe 56 b,a 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
{
rtems_rfs_inode_close (*fs, &inode);
2021ed4: 7f ff bc 75 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2021ed8: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
2021edc: 7f ff f4 6e call 201f094 <rtems_rfs_buffer_close> <== NOT EXECUTED
2021ee0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
2021ee4: 7f ff 91 9d call 2006558 <free> <== NOT EXECUTED
2021ee8: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021eec: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021ef0: 7f ff c8 d3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021ef4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021ef8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021efc: 02 80 00 04 be 2021f0c <rtems_rfs_fs_open+0x81c> <== NOT EXECUTED
2021f00: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
2021f04: 40 00 0f d4 call 2025e54 <puts> <== NOT EXECUTED
2021f08: 90 12 22 08 or %o0, 0x208, %o0 ! 2038208 <CSWTCH.1+0x131c><== NOT EXECUTED
errno = EIO;
2021f0c: 40 00 0c 29 call 2024fb0 <__errno> <== NOT EXECUTED
2021f10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2021f14: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2021f18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
2021f1c: 81 c7 e0 08 ret <== NOT EXECUTED
2021f20: 81 e8 00 00 restore <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
2021f24: 7f ff f4 5c call 201f094 <rtems_rfs_buffer_close> <== NOT EXECUTED
2021f28: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
2021f2c: 7f ff 91 8b call 2006558 <free> <== NOT EXECUTED
2021f30: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021f34: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021f38: 7f ff c8 c1 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021f3c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021f40: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021f44: 02 bf fe 39 be 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
2021f48: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
2021f4c: 40 00 13 27 call 2026be8 <strerror> <== NOT EXECUTED
2021f50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2021f54: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2021f58: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2021f5c: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2021f60: 40 00 0f 7c call 2025d50 <printf> <== NOT EXECUTED
2021f64: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 20381d8 <CSWTCH.1+0x12ec><== NOT EXECUTED
2021f68: 30 bf fe 30 b,a 2021828 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2021f6c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
2021f70: 7f ff f1 dc call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2021f74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
2021f78: 90 10 20 00 clr %o0 <== NOT EXECUTED
2021f7c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
2021f80: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
2021f84: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
handle->buffer = NULL;
2021f88: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2021f8c: 7f ff c8 ac call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2021f90: ba 10 20 0c mov 0xc, %i5 <== NOT EXECUTED
2021f94: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2021f98: 02 bf fe 1a be 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
2021f9c: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
2021fa0: 40 00 0f ad call 2025e54 <puts> <== NOT EXECUTED
2021fa4: 90 12 21 30 or %o0, 0x130, %o0 ! 2038130 <CSWTCH.1+0x1244><== NOT EXECUTED
2021fa8: 30 bf fe 16 b,a 2021800 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
020216a4 <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
20216a4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
20216a8: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED
20216ac: d6 06 20 04 ld [ %i0 + 4 ], %o3 <== NOT EXECUTED
20216b0: 94 10 20 00 clr %o2 <== NOT EXECUTED
20216b4: 40 00 44 61 call 2032838 <__muldi3> <== NOT EXECUTED
20216b8: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
20216bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
20216c0: 81 c7 e0 08 ret <== NOT EXECUTED
20216c4: 93 e8 00 09 restore %g0, %o1, %o1 <== NOT EXECUTED
020108e0 <rtems_rfs_group_bitmap_alloc>:
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
20108e0: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
20108e4: 80 a6 a0 00 cmp %i2, 0
20108e8: 02 80 00 62 be 2010a70 <rtems_rfs_group_bitmap_alloc+0x190>
20108ec: ba 10 00 18 mov %i0, %i5
{
size = fs->group_inodes;
20108f0: e8 06 20 28 ld [ %i0 + 0x28 ], %l4
goal -= RTEMS_RFS_ROOT_INO;
20108f4: b2 06 7f ff add %i1, -1, %i1
}
else
size = fs->group_blocks;
group_start = goal / size;
20108f8: 90 10 00 19 mov %i1, %o0
20108fc: 40 00 86 77 call 20322d8 <.udiv>
2010900: 92 10 00 14 mov %l4, %o1
bit = (rtems_rfs_bitmap_bit) (goal % size);
2010904: 92 10 00 14 mov %l4, %o1
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
2010908: a4 10 00 08 mov %o0, %l2
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
direction = 1;
201090c: a0 10 20 01 mov 1, %l0
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
2010910: 90 10 00 19 mov %i1, %o0
2010914: 40 00 87 1d call 2032588 <.urem>
2010918: b8 10 00 12 mov %l2, %i4
offset = 0;
updown = true;
201091c: a2 10 20 01 mov 1, %l1
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
2010920: d0 27 bf f8 st %o0, [ %fp + -8 ]
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
2010924: c0 2f bf ff clrb [ %fp + -1 ]
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
2010928: b2 10 20 00 clr %i1
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
201092c: 80 a7 20 00 cmp %i4, 0
2010930: 06 80 00 30 bl 20109f0 <rtems_rfs_group_bitmap_alloc+0x110><== NEVER TAKEN
2010934: 80 8c 60 ff btst 0xff, %l1
2010938: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
201093c: 80 a0 40 1c cmp %g1, %i4
2010940: 04 80 00 2c ble 20109f0 <rtems_rfs_group_bitmap_alloc+0x110><== NEVER TAKEN
2010944: 80 8c 60 ff btst 0xff, %l1
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
2010948: e6 07 60 1c ld [ %i5 + 0x1c ], %l3
201094c: ad 2f 20 04 sll %i4, 4, %l6
2010950: ab 2f 20 06 sll %i4, 6, %l5
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
2010954: 80 a6 a0 00 cmp %i2, 0
bitmap = &fs->groups[group].inode_bitmap;
2010958: 82 05 80 15 add %l6, %l5, %g1
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
201095c: 02 80 00 43 be 2010a68 <rtems_rfs_group_bitmap_alloc+0x188>
2010960: a6 04 c0 01 add %l3, %g1, %l3
bitmap = &fs->groups[group].inode_bitmap;
2010964: a6 04 e0 2c add %l3, 0x2c, %l3
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
2010968: d2 07 bf f8 ld [ %fp + -8 ], %o1
201096c: 90 10 00 13 mov %l3, %o0
2010970: 94 07 bf ff add %fp, -1, %o2
2010974: 40 00 32 31 call 201d238 <rtems_rfs_bitmap_map_alloc>
2010978: 96 07 bf f8 add %fp, -8, %o3
if (rc > 0)
201097c: b0 92 20 00 orcc %o0, 0, %i0
2010980: 14 80 00 5c bg 2010af0 <rtems_rfs_group_bitmap_alloc+0x210><== NEVER TAKEN
2010984: 01 00 00 00 nop
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
2010988: c2 07 40 00 ld [ %i5 ], %g1
201098c: 80 88 60 01 btst 1, %g1
2010990: 22 80 00 3a be,a 2010a78 <rtems_rfs_group_bitmap_alloc+0x198><== ALWAYS TAKEN
2010994: d2 04 c0 00 ld [ %l3 ], %o1
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
2010998: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
201099c: 80 a0 60 00 cmp %g1, 0
20109a0: 12 80 00 3a bne 2010a88 <rtems_rfs_group_bitmap_alloc+0x1a8><== ALWAYS TAKEN
20109a4: 80 8c 60 ff btst 0xff, %l1
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
20109a8: 02 80 00 06 be 20109c0 <rtems_rfs_group_bitmap_alloc+0xe0><== NOT EXECUTED
20109ac: b2 06 60 01 inc %i1 <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
20109b0: a0 1c 20 01 xor %l0, 1, %l0 <== NOT EXECUTED
20109b4: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED
20109b8: a0 40 3f ff addx %g0, -1, %l0 <== NOT EXECUTED
20109bc: a0 14 20 01 or %l0, 1, %l0 <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
20109c0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20109c4: 40 00 86 0b call 20321f0 <.umul> <== NOT EXECUTED
20109c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (offset)
bit = direction > 0 ? 0 : size - 1;
20109cc: 82 10 20 00 clr %g1 <== NOT EXECUTED
20109d0: 80 a4 20 01 cmp %l0, 1 <== NOT EXECUTED
20109d4: 12 80 00 17 bne 2010a30 <rtems_rfs_group_bitmap_alloc+0x150><== NOT EXECUTED
20109d8: b8 02 00 12 add %o0, %l2, %i4 <== NOT EXECUTED
20109dc: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
20109e0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20109e4: 36 bf ff d6 bge,a 201093c <rtems_rfs_group_bitmap_alloc+0x5c><== NOT EXECUTED
20109e8: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 <== NOT EXECUTED
{
if (!updown)
20109ec: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
20109f0: 02 80 00 13 be 2010a3c <rtems_rfs_group_bitmap_alloc+0x15c><== NOT EXECUTED
20109f4: a0 1c 20 01 xor %l0, 1, %l0 <== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
20109f8: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
20109fc: c0 2f bf ff clrb [ %fp + -1 ] <== NOT EXECUTED
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
2010a00: a0 40 3f ff addx %g0, -1, %l0 <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
2010a04: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
2010a08: a0 14 20 01 or %l0, 1, %l0 <== NOT EXECUTED
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
2010a0c: 40 00 85 f9 call 20321f0 <.umul> <== NOT EXECUTED
2010a10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if (offset)
2010a14: a2 10 20 00 clr %l1 <== NOT EXECUTED
2010a18: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2010a1c: 02 bf ff c4 be 201092c <rtems_rfs_group_bitmap_alloc+0x4c><== NOT EXECUTED
2010a20: b8 02 00 12 add %o0, %l2, %i4 <== NOT EXECUTED
bit = direction > 0 ? 0 : size - 1;
2010a24: 80 a4 20 01 cmp %l0, 1 <== NOT EXECUTED
2010a28: 02 bf ff ed be 20109dc <rtems_rfs_group_bitmap_alloc+0xfc><== NOT EXECUTED
2010a2c: 82 10 20 00 clr %g1 <== NOT EXECUTED
2010a30: 82 05 3f ff add %l4, -1, %g1 <== NOT EXECUTED
2010a34: 10 bf ff eb b 20109e0 <rtems_rfs_group_bitmap_alloc+0x100><== NOT EXECUTED
2010a38: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
offset++;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
2010a3c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2010a40: 13 00 00 80 sethi %hi(0x20000), %o1 <== NOT EXECUTED
2010a44: 40 00 0d fe call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2010a48: b0 10 20 1c mov 0x1c, %i0 <== NOT EXECUTED
2010a4c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010a50: 02 80 00 04 be 2010a60 <rtems_rfs_group_bitmap_alloc+0x180><== NOT EXECUTED
2010a54: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
2010a58: 40 00 54 ff call 2025e54 <puts> <== NOT EXECUTED
2010a5c: 90 12 20 f8 or %o0, 0xf8, %o0 ! 20364f8 <ramdisk_ops+0x9d8><== NOT EXECUTED
return ENOSPC;
}
2010a60: 81 c7 e0 08 ret
2010a64: 81 e8 00 00 restore
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
2010a68: 10 bf ff c0 b 2010968 <rtems_rfs_group_bitmap_alloc+0x88>
2010a6c: a6 04 e0 08 add %l3, 8, %l3
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
2010a70: 10 bf ff a2 b 20108f8 <rtems_rfs_group_bitmap_alloc+0x18>
2010a74: e8 06 20 24 ld [ %i0 + 0x24 ], %l4
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010a78: 40 00 37 1a call 201e6e0 <rtems_rfs_buffer_handle_release>
2010a7c: 90 10 00 1d mov %i5, %o0
if (allocated)
2010a80: 10 bf ff c7 b 201099c <rtems_rfs_group_bitmap_alloc+0xbc>
2010a84: c2 0f bf ff ldub [ %fp + -1 ], %g1
{
if (inode)
2010a88: 80 a6 a0 00 cmp %i2, 0
2010a8c: 32 80 00 1b bne,a 2010af8 <rtems_rfs_group_bitmap_alloc+0x218>
2010a90: d2 07 60 28 ld [ %i5 + 0x28 ], %o1
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
2010a94: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2010a98: aa 05 80 15 add %l6, %l5, %l5
2010a9c: c4 07 bf f8 ld [ %fp + -8 ], %g2
2010aa0: c2 00 40 15 ld [ %g1 + %l5 ], %g1
2010aa4: 82 00 80 01 add %g2, %g1, %g1
2010aa8: c2 26 c0 00 st %g1, [ %i3 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
2010aac: 90 10 20 00 clr %o0
2010ab0: 13 00 00 80 sethi %hi(0x20000), %o1
2010ab4: 40 00 0d e2 call 201423c <rtems_rfs_trace>
2010ab8: b0 10 20 00 clr %i0
2010abc: 80 8a 20 ff btst 0xff, %o0
2010ac0: 02 bf ff e8 be 2010a60 <rtems_rfs_group_bitmap_alloc+0x180><== ALWAYS TAKEN
2010ac4: 13 00 80 d9 sethi %hi(0x2036400), %o1
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
2010ac8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2010acc: 02 80 00 04 be 2010adc <rtems_rfs_group_bitmap_alloc+0x1fc><== NOT EXECUTED
2010ad0: 92 12 60 b8 or %o1, 0xb8, %o1 <== NOT EXECUTED
2010ad4: 13 00 80 d9 sethi %hi(0x2036400), %o1 <== NOT EXECUTED
2010ad8: 92 12 60 b0 or %o1, 0xb0, %o1 ! 20364b0 <ramdisk_ops+0x990><== NOT EXECUTED
2010adc: d4 06 c0 00 ld [ %i3 ], %o2 <== NOT EXECUTED
2010ae0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
2010ae4: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
2010ae8: 40 00 54 9a call 2025d50 <printf> <== NOT EXECUTED
2010aec: 90 12 20 c0 or %o0, 0xc0, %o0 <== NOT EXECUTED
2010af0: 81 c7 e0 08 ret <== NOT EXECUTED
2010af4: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
{
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
2010af8: fa 07 bf f8 ld [ %fp + -8 ], %i5
2010afc: 90 10 00 1c mov %i4, %o0
2010b00: 40 00 85 bc call 20321f0 <.umul>
2010b04: ba 07 60 01 inc %i5
2010b08: ba 07 40 08 add %i5, %o0, %i5
2010b0c: 10 bf ff e8 b 2010aac <rtems_rfs_group_bitmap_alloc+0x1cc>
2010b10: fa 26 c0 00 st %i5, [ %i3 ]
02010b14 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
2010b14: 9d e3 bf a0 save %sp, -96, %sp
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
2010b18: 90 10 20 00 clr %o0
2010b1c: 13 00 00 80 sethi %hi(0x20000), %o1
2010b20: 40 00 0d c7 call 201423c <rtems_rfs_trace>
2010b24: ba 10 00 18 mov %i0, %i5
2010b28: 80 8a 20 ff btst 0xff, %o0
2010b2c: 02 80 00 0a be 2010b54 <rtems_rfs_group_bitmap_free+0x40> <== ALWAYS TAKEN
2010b30: 80 a6 60 00 cmp %i1, 0
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
2010b34: 13 00 80 d9 sethi %hi(0x2036400), %o1 <== NOT EXECUTED
2010b38: 12 80 00 38 bne 2010c18 <rtems_rfs_group_bitmap_free+0x104><== NOT EXECUTED
2010b3c: 92 12 60 b8 or %o1, 0xb8, %o1 ! 20364b8 <ramdisk_ops+0x998><== NOT EXECUTED
2010b40: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2010b44: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2010b48: 40 00 54 82 call 2025d50 <printf> <== NOT EXECUTED
2010b4c: 90 12 21 30 or %o0, 0x130, %o0 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
2010b50: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2010b54: 22 80 00 1a be,a 2010bbc <rtems_rfs_group_bitmap_free+0xa8><== NEVER TAKEN
2010b58: f0 07 60 24 ld [ %i5 + 0x24 ], %i0 <== NOT EXECUTED
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
2010b5c: f0 07 60 28 ld [ %i5 + 0x28 ], %i0
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
{
no -= RTEMS_RFS_ROOT_INO;
2010b60: b4 06 bf ff add %i2, -1, %i2
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
2010b64: 92 10 00 18 mov %i0, %o1
2010b68: 40 00 86 88 call 2032588 <.urem>
2010b6c: 90 10 00 1a mov %i2, %o0
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
2010b70: 92 10 00 18 mov %i0, %o1
bit = (rtems_rfs_bitmap_bit) (no % size);
2010b74: b2 10 00 08 mov %o0, %i1
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
2010b78: 40 00 85 d8 call 20322d8 <.udiv>
2010b7c: 90 10 00 1a mov %i2, %o0
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
2010b80: f4 07 60 1c ld [ %i5 + 0x1c ], %i2
2010b84: 83 2a 20 04 sll %o0, 4, %g1
2010b88: 91 2a 20 06 sll %o0, 6, %o0
2010b8c: 90 00 40 08 add %g1, %o0, %o0
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
2010b90: 92 10 00 19 mov %i1, %o1
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
2010b94: b4 06 80 08 add %i2, %o0, %i2
2010b98: b4 06 a0 2c add %i2, 0x2c, %i2
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
2010b9c: 40 00 30 e7 call 201cf38 <rtems_rfs_bitmap_map_clear>
2010ba0: 90 10 00 1a mov %i2, %o0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010ba4: d2 06 80 00 ld [ %i2 ], %o1
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
2010ba8: b0 10 00 08 mov %o0, %i0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010bac: 40 00 36 cd call 201e6e0 <rtems_rfs_buffer_handle_release>
2010bb0: 90 10 00 1d mov %i5, %o0
return rc;
}
2010bb4: 81 c7 e0 08 ret
2010bb8: 81 e8 00 00 restore
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
2010bbc: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
2010bc0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2010bc4: 40 00 86 71 call 2032588 <.urem> <== NOT EXECUTED
2010bc8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
2010bcc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
2010bd0: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
2010bd4: 40 00 85 c1 call 20322d8 <.udiv> <== NOT EXECUTED
2010bd8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
2010bdc: f4 07 60 1c ld [ %i5 + 0x1c ], %i2 <== NOT EXECUTED
2010be0: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
2010be4: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
2010be8: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
2010bec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
2010bf0: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
2010bf4: b4 06 a0 08 add %i2, 8, %i2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
2010bf8: 40 00 30 d0 call 201cf38 <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
2010bfc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010c00: d2 06 80 00 ld [ %i2 ], %o1 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
2010c04: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010c08: 40 00 36 b6 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010c0c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
}
2010c10: 81 c7 e0 08 ret <== NOT EXECUTED
2010c14: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
2010c18: 13 00 80 d9 sethi %hi(0x2036400), %o1 <== NOT EXECUTED
2010c1c: 10 bf ff c9 b 2010b40 <rtems_rfs_group_bitmap_free+0x2c> <== NOT EXECUTED
2010c20: 92 12 60 b0 or %o1, 0xb0, %o1 ! 20364b0 <ramdisk_ops+0x990><== NOT EXECUTED
02010c24 <rtems_rfs_group_bitmap_test>:
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
2010c24: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
2010c28: 90 10 20 00 clr %o0 <== NOT EXECUTED
2010c2c: 13 00 00 80 sethi %hi(0x20000), %o1 <== NOT EXECUTED
2010c30: 40 00 0d 83 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2010c34: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
2010c38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010c3c: 02 80 00 0a be 2010c64 <rtems_rfs_group_bitmap_test+0x40> <== NOT EXECUTED
2010c40: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
2010c44: 13 00 80 d9 sethi %hi(0x2036400), %o1 <== NOT EXECUTED
2010c48: 12 80 00 2d bne 2010cfc <rtems_rfs_group_bitmap_test+0xd8><== NOT EXECUTED
2010c4c: 92 12 60 b8 or %o1, 0xb8, %o1 ! 20364b8 <ramdisk_ops+0x998><== NOT EXECUTED
2010c50: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2010c54: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2010c58: 40 00 54 3e call 2025d50 <printf> <== NOT EXECUTED
2010c5c: 90 12 21 60 or %o0, 0x160, %o0 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
2010c60: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2010c64: 22 80 00 0b be,a 2010c90 <rtems_rfs_group_bitmap_test+0x6c><== NOT EXECUTED
2010c68: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
2010c6c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2010c70: 04 80 00 06 ble 2010c88 <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
2010c74: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
2010c78: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
2010c7c: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
2010c80: 28 80 00 22 bleu,a 2010d08 <rtems_rfs_group_bitmap_test+0xe4><== NOT EXECUTED
2010c84: f0 07 60 28 ld [ %i5 + 0x28 ], %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
}
2010c88: 81 c7 e0 08 ret <== NOT EXECUTED
2010c8c: 81 e8 00 00 restore <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
2010c90: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
2010c94: 1a bf ff fd bcc 2010c88 <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
2010c98: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
2010c9c: f0 07 60 24 ld [ %i5 + 0x24 ], %i0 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
2010ca0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2010ca4: 40 00 86 39 call 2032588 <.urem> <== NOT EXECUTED
2010ca8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
2010cac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
2010cb0: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
2010cb4: 40 00 85 89 call 20322d8 <.udiv> <== NOT EXECUTED
2010cb8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
2010cbc: f4 07 60 1c ld [ %i5 + 0x1c ], %i2 <== NOT EXECUTED
2010cc0: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
2010cc4: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
2010cc8: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
2010ccc: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
2010cd0: b4 06 a0 08 add %i2, 8, %i2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
2010cd4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2010cd8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2010cdc: 40 00 30 c6 call 201cff4 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
2010ce0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010ce4: d2 06 80 00 ld [ %i2 ], %o1 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
2010ce8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
2010cec: 40 00 36 7d call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010cf0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
}
2010cf4: 81 c7 e0 08 ret <== NOT EXECUTED
2010cf8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
2010cfc: 13 00 80 d9 sethi %hi(0x2036400), %o1 <== NOT EXECUTED
2010d00: 10 bf ff d4 b 2010c50 <rtems_rfs_group_bitmap_test+0x2c> <== NOT EXECUTED
2010d04: 92 12 60 b0 or %o1, 0xb0, %o1 ! 20364b0 <ramdisk_ops+0x990><== NOT EXECUTED
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
2010d08: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
2010d0c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2010d10: 40 00 86 1e call 2032588 <.urem> <== NOT EXECUTED
2010d14: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
2010d18: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
2010d1c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
2010d20: 40 00 85 6e call 20322d8 <.udiv> <== NOT EXECUTED
2010d24: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
2010d28: f4 07 60 1c ld [ %i5 + 0x1c ], %i2 <== NOT EXECUTED
2010d2c: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
2010d30: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
2010d34: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
2010d38: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
2010d3c: 10 bf ff e6 b 2010cd4 <rtems_rfs_group_bitmap_test+0xb0> <== NOT EXECUTED
2010d40: b4 06 a0 2c add %i2, 0x2c, %i2 <== NOT EXECUTED
02010834 <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
2010834: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
2010838: 90 10 20 00 clr %o0
201083c: 13 00 00 40 sethi %hi(0x10000), %o1
2010840: 40 00 0e 7f call 201423c <rtems_rfs_trace>
2010844: ba 10 00 18 mov %i0, %i5
2010848: 80 8a 20 ff btst 0xff, %o0
201084c: 32 80 00 17 bne,a 20108a8 <rtems_rfs_group_close+0x74> <== NEVER TAKEN
2010850: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
/*
* We need to close as much as possible and also return any error if one
* occurs but this may result in one even more important error being lost but
* we cannot OR the errors together so this is a reasonable compromise.
*/
rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
2010854: 40 00 33 0b call 201d480 <rtems_rfs_bitmap_close>
2010858: 90 06 60 2c add %i1, 0x2c, %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201085c: 92 06 60 44 add %i1, 0x44, %o1
2010860: b8 10 00 08 mov %o0, %i4
2010864: 40 00 37 9f call 201e6e0 <rtems_rfs_buffer_handle_release>
2010868: 90 10 00 1d mov %i5, %o0
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
201086c: 90 06 60 08 add %i1, 8, %o0
handle->dirty = false;
2010870: c0 2e 60 44 clrb [ %i1 + 0x44 ]
handle->bnum = 0;
2010874: c0 26 60 48 clr [ %i1 + 0x48 ]
2010878: 40 00 33 02 call 201d480 <rtems_rfs_bitmap_close>
201087c: c0 26 60 4c clr [ %i1 + 0x4c ]
if (rc > 0)
2010880: b0 92 20 00 orcc %o0, 0, %i0
2010884: 04 80 00 0d ble 20108b8 <rtems_rfs_group_close+0x84> <== ALWAYS TAKEN
2010888: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
201088c: 40 00 37 95 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010890: 92 06 60 20 add %i1, 0x20, %o1 <== NOT EXECUTED
handle->dirty = false;
2010894: c0 2e 60 20 clrb [ %i1 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
2010898: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED
handle->buffer = NULL;
201089c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
20108a0: 81 c7 e0 08 ret <== NOT EXECUTED
20108a4: 81 e8 00 00 restore <== NOT EXECUTED
{
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
20108a8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20108ac: 40 00 55 29 call 2025d50 <printf> <== NOT EXECUTED
20108b0: 90 12 20 88 or %o0, 0x88, %o0 ! 2036488 <ramdisk_ops+0x968><== NOT EXECUTED
20108b4: 30 bf ff e8 b,a 2010854 <rtems_rfs_group_close+0x20> <== NOT EXECUTED
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
if (rc > 0)
20108b8: b0 38 00 1c xnor %g0, %i4, %i0
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
20108bc: 92 06 60 20 add %i1, 0x20, %o1
20108c0: 40 00 37 88 call 201e6e0 <rtems_rfs_buffer_handle_release>
20108c4: b1 3e 20 1f sra %i0, 0x1f, %i0
20108c8: b0 0f 00 18 and %i4, %i0, %i0
handle->dirty = false;
20108cc: c0 2e 60 20 clrb [ %i1 + 0x20 ]
handle->bnum = 0;
20108d0: c0 26 60 24 clr [ %i1 + 0x24 ]
handle->buffer = NULL;
20108d4: c0 26 60 28 clr [ %i1 + 0x28 ]
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
20108d8: 81 c7 e0 08 ret
20108dc: 81 e8 00 00 restore
02010600 <rtems_rfs_group_open>:
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
2010600: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
2010604: c2 06 20 04 ld [ %i0 + 4 ], %g1
2010608: 80 a0 40 19 cmp %g1, %i1
201060c: 08 80 00 3b bleu 20106f8 <rtems_rfs_group_open+0xf8> <== NEVER TAKEN
2010610: ba 10 00 18 mov %i0, %i5
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
2010614: 84 06 80 19 add %i2, %i1, %g2
2010618: 80 a0 40 02 cmp %g1, %g2
201061c: 28 80 00 02 bleu,a 2010624 <rtems_rfs_group_open+0x24> <== ALWAYS TAKEN
2010620: b4 20 40 19 sub %g1, %i1, %i2
size = rtems_rfs_fs_blocks (fs) - base;
2010624: 80 a6 80 1b cmp %i2, %i3
2010628: 18 80 00 25 bgu 20106bc <rtems_rfs_group_open+0xbc> <== ALWAYS TAKEN
201062c: a2 10 00 1a mov %i2, %l1
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
2010630: 90 10 20 00 clr %o0 <== NOT EXECUTED
2010634: 40 00 0f 02 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2010638: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
201063c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2010640: 12 80 00 27 bne 20106dc <rtems_rfs_group_open+0xdc> <== NOT EXECUTED
2010644: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
2010648: f2 27 00 00 st %i1, [ %i4 ] <== NOT EXECUTED
group->size = size;
201064c: f4 27 20 04 st %i2, [ %i4 + 4 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2010650: c0 2f 20 20 clrb [ %i4 + 0x20 ]
handle->bnum = 0;
2010654: c0 27 20 24 clr [ %i4 + 0x24 ]
handle->buffer = NULL;
2010658: c0 27 20 28 clr [ %i4 + 0x28 ]
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
201065c: a0 07 20 08 add %i4, 8, %l0
2010660: b6 07 20 20 add %i4, 0x20, %i3
2010664: 90 10 00 10 mov %l0, %o0
2010668: 92 10 00 1d mov %i5, %o1
201066c: 94 10 00 1b mov %i3, %o2
2010670: 96 10 00 1a mov %i2, %o3
2010674: 40 00 33 72 call 201d43c <rtems_rfs_bitmap_open>
2010678: 98 10 00 19 mov %i1, %o4
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
201067c: b0 92 20 00 orcc %o0, 0, %i0
2010680: 04 80 00 37 ble 201075c <rtems_rfs_group_open+0x15c> <== ALWAYS TAKEN
2010684: 92 10 00 1b mov %i3, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010688: 40 00 38 16 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
201068c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
2010690: 90 10 20 00 clr %o0 <== NOT EXECUTED
2010694: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
handle->dirty = false;
2010698: c0 2f 20 20 clrb [ %i4 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
201069c: c0 27 20 24 clr [ %i4 + 0x24 ] <== NOT EXECUTED
20106a0: 40 00 0e e7 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20106a4: c0 27 20 28 clr [ %i4 + 0x28 ] <== NOT EXECUTED
20106a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20106ac: 12 80 00 23 bne 2010738 <rtems_rfs_group_open+0x138> <== NOT EXECUTED
20106b0: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
20106b4: 81 c7 e0 08 ret <== NOT EXECUTED
20106b8: 81 e8 00 00 restore <== NOT EXECUTED
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
20106bc: 90 10 20 00 clr %o0
20106c0: 13 00 00 20 sethi %hi(0x8000), %o1
20106c4: 40 00 0e de call 201423c <rtems_rfs_trace>
20106c8: a2 10 00 1b mov %i3, %l1
20106cc: 80 8a 20 ff btst 0xff, %o0
20106d0: 22 bf ff df be,a 201064c <rtems_rfs_group_open+0x4c> <== ALWAYS TAKEN
20106d4: f2 27 00 00 st %i1, [ %i4 ]
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
20106d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20106dc: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
20106e0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20106e4: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
20106e8: 40 00 55 9a call 2025d50 <printf> <== NOT EXECUTED
20106ec: 90 12 23 d0 or %o0, 0x3d0, %o0 <== NOT EXECUTED
base, size, inodes);
group->base = base;
20106f0: 10 bf ff d7 b 201064c <rtems_rfs_group_open+0x4c> <== NOT EXECUTED
20106f4: f2 27 00 00 st %i1, [ %i4 ] <== NOT EXECUTED
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
20106f8: 90 10 20 00 clr %o0 <== NOT EXECUTED
20106fc: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
2010700: 40 00 0e cf call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2010704: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2010708: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201070c: 02 80 00 48 be 201082c <rtems_rfs_group_open+0x22c> <== NOT EXECUTED
2010710: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
2010714: 40 00 59 35 call 2026be8 <strerror> <== NOT EXECUTED
2010718: 90 10 20 05 mov 5, %o0 ! 5 <PROM_START+0x5> <== NOT EXECUTED
201071c: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
2010720: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2010724: 11 00 80 d8 sethi %hi(0x2036000), %o0 <== NOT EXECUTED
2010728: 40 00 55 8a call 2025d50 <printf> <== NOT EXECUTED
201072c: 90 12 23 90 or %o0, 0x390, %o0 ! 2036390 <ramdisk_ops+0x870><== NOT EXECUTED
2010730: 81 c7 e0 08 ret <== NOT EXECUTED
2010734: 81 e8 00 00 restore <== NOT EXECUTED
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
2010738: 40 00 59 2c call 2026be8 <strerror> <== NOT EXECUTED
201073c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2010740: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2010744: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2010748: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
201074c: 40 00 55 81 call 2025d50 <printf> <== NOT EXECUTED
2010750: 90 12 20 08 or %o0, 8, %o0 ! 2036408 <ramdisk_ops+0x8e8> <== NOT EXECUTED
2010754: 81 c7 e0 08 ret <== NOT EXECUTED
2010758: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
201075c: d8 07 00 00 ld [ %i4 ], %o4
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2010760: c0 2f 20 44 clrb [ %i4 + 0x44 ]
handle->bnum = 0;
2010764: c0 27 20 48 clr [ %i4 + 0x48 ]
handle->buffer = NULL;
2010768: c0 27 20 4c clr [ %i4 + 0x4c ]
201076c: b4 07 20 44 add %i4, 0x44, %i2
2010770: 90 07 20 2c add %i4, 0x2c, %o0
2010774: 92 10 00 1d mov %i5, %o1
2010778: 94 10 00 1a mov %i2, %o2
201077c: 96 10 00 11 mov %l1, %o3
2010780: 40 00 33 2f call 201d43c <rtems_rfs_bitmap_open>
2010784: 98 03 20 01 inc %o4
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
2010788: b0 92 20 00 orcc %o0, 0, %i0
201078c: 04 80 00 1e ble 2010804 <rtems_rfs_group_open+0x204> <== ALWAYS TAKEN
2010790: 92 10 00 1a mov %i2, %o1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2010794: 40 00 37 d3 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2010798: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
201079c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
20107a0: c0 2f 20 44 clrb [ %i4 + 0x44 ] <== NOT EXECUTED
handle->bnum = 0;
20107a4: c0 27 20 48 clr [ %i4 + 0x48 ] <== NOT EXECUTED
20107a8: 40 00 33 36 call 201d480 <rtems_rfs_bitmap_close> <== NOT EXECUTED
20107ac: c0 27 20 4c clr [ %i4 + 0x4c ] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
20107b0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20107b4: 40 00 37 cb call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20107b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
20107bc: 90 10 20 00 clr %o0 <== NOT EXECUTED
20107c0: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
handle->dirty = false;
20107c4: c0 2f 20 20 clrb [ %i4 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
20107c8: c0 27 20 24 clr [ %i4 + 0x24 ] <== NOT EXECUTED
20107cc: 40 00 0e 9c call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20107d0: c0 27 20 28 clr [ %i4 + 0x28 ] <== NOT EXECUTED
20107d4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20107d8: 02 80 00 15 be 201082c <rtems_rfs_group_open+0x22c> <== NOT EXECUTED
20107dc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
20107e0: 40 00 59 02 call 2026be8 <strerror> <== NOT EXECUTED
20107e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20107e8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20107ec: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20107f0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20107f4: 40 00 55 57 call 2025d50 <printf> <== NOT EXECUTED
20107f8: 90 12 20 48 or %o0, 0x48, %o0 ! 2036448 <ramdisk_ops+0x928><== NOT EXECUTED
20107fc: 81 c7 e0 08 ret <== NOT EXECUTED
2010800: 81 e8 00 00 restore <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
2010804: c2 07 40 00 ld [ %i5 ], %g1
2010808: 80 88 60 01 btst 1, %g1
201080c: 12 bf ff aa bne 20106b4 <rtems_rfs_group_open+0xb4> <== NEVER TAKEN
2010810: b0 10 20 00 clr %i0
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
2010814: d2 07 20 08 ld [ %i4 + 8 ], %o1
2010818: 40 00 37 b2 call 201e6e0 <rtems_rfs_buffer_handle_release>
201081c: 90 10 00 1d mov %i5, %o0
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
2010820: d2 07 20 2c ld [ %i4 + 0x2c ], %o1
2010824: 40 00 37 af call 201e6e0 <rtems_rfs_buffer_handle_release>
2010828: 90 10 00 1d mov %i5, %o0
}
return 0;
}
201082c: 81 c7 e0 08 ret
2010830: 81 e8 00 00 restore
02010d44 <rtems_rfs_group_usage>:
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
2010d44: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int g;
*blocks = 0;
2010d48: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
*inodes = 0;
2010d4c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
2010d50: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
2010d54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2010d58: 04 80 00 14 ble 2010da8 <rtems_rfs_group_usage+0x64> <== NOT EXECUTED
2010d5c: 84 10 20 00 clr %g2 <== NOT EXECUTED
2010d60: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
2010d64: de 00 60 14 ld [ %g1 + 0x14 ], %o7 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
2010d68: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
2010d6c: c6 06 40 00 ld [ %i1 ], %g3 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
2010d70: 84 00 a0 01 inc %g2 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
2010d74: 86 03 c0 03 add %o7, %g3, %g3 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
2010d78: 86 20 c0 04 sub %g3, %g4, %g3 <== NOT EXECUTED
2010d7c: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
2010d80: de 00 60 38 ld [ %g1 + 0x38 ], %o7 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
2010d84: c8 00 60 3c ld [ %g1 + 0x3c ], %g4 <== NOT EXECUTED
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
2010d88: c6 06 80 00 ld [ %i2 ], %g3 <== NOT EXECUTED
2010d8c: 86 03 c0 03 add %o7, %g3, %g3 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
2010d90: 86 20 c0 04 sub %g3, %g4, %g3 <== NOT EXECUTED
2010d94: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
2010d98: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 <== NOT EXECUTED
2010d9c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2010da0: 14 bf ff f1 bg 2010d64 <rtems_rfs_group_usage+0x20> <== NOT EXECUTED
2010da4: 82 00 60 50 add %g1, 0x50, %g1 <== NOT EXECUTED
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
2010da8: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED
2010dac: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
2010db0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2010db4: 38 80 00 02 bgu,a 2010dbc <rtems_rfs_group_usage+0x78> <== NOT EXECUTED
2010db8: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
2010dbc: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
2010dc0: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
2010dc4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2010dc8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2010dcc: 38 80 00 02 bgu,a 2010dd4 <rtems_rfs_group_usage+0x90> <== NOT EXECUTED
2010dd0: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
2010dd4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
2010dd8: 81 c7 e0 08 ret <== NOT EXECUTED
2010ddc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
020110a8 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
20110a8: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
20110ac: 90 10 20 00 clr %o0
20110b0: 40 00 0c 63 call 201423c <rtems_rfs_trace>
20110b4: 13 00 02 00 sethi %hi(0x80000), %o1
20110b8: 80 8a 20 ff btst 0xff, %o0
20110bc: 32 80 00 16 bne,a 2011114 <rtems_rfs_inode_close+0x6c> <== NEVER TAKEN
20110c0: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
20110c4: 90 10 00 18 mov %i0, %o0
20110c8: 92 10 00 19 mov %i1, %o1
20110cc: 7f ff ff b8 call 2010fac <rtems_rfs_inode_unload>
20110d0: 94 10 20 01 mov 1, %o2
if ((rc == 0) && (handle->loads > 0))
20110d4: b0 92 20 00 orcc %o0, 0, %i0
20110d8: 32 80 00 0d bne,a 201110c <rtems_rfs_inode_close+0x64> <== NEVER TAKEN
20110dc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
20110e0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
20110e4: 80 a0 60 00 cmp %g1, 0
20110e8: 04 80 00 08 ble 2011108 <rtems_rfs_inode_close+0x60> <== ALWAYS TAKEN
20110ec: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
20110f0: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
20110f4: 40 00 0c 52 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20110f8: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
20110fc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011100: 32 80 00 0a bne,a 2011128 <rtems_rfs_inode_close+0x80> <== NOT EXECUTED
2011104: d2 06 60 24 ld [ %i1 + 0x24 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
2011108: c0 26 60 08 clr [ %i1 + 8 ]
return rc;
}
201110c: 81 c7 e0 08 ret
2011110: 81 e8 00 00 restore
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
2011114: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011118: 40 00 53 0e call 2025d50 <printf> <== NOT EXECUTED
201111c: 90 12 22 38 or %o0, 0x238, %o0 ! 2036638 <ramdisk_ops+0xb18><== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
2011120: 10 bf ff ea b 20110c8 <rtems_rfs_inode_close+0x20> <== NOT EXECUTED
2011124: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
2011128: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
201112c: 40 00 53 09 call 2025d50 <printf> <== NOT EXECUTED
2011130: 90 12 22 60 or %o0, 0x260, %o0 ! 2036660 <ramdisk_ops+0xb40><== NOT EXECUTED
handle->loads);
rc = EIO;
}
handle->ino = 0;
2011134: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
return rc;
}
2011138: 81 c7 e0 08 ret <== NOT EXECUTED
201113c: 81 e8 00 00 restore <== NOT EXECUTED
020113dc <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
20113dc: 9d e3 bf 48 save %sp, -184, %sp
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
20113e0: 90 10 20 00 clr %o0
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
20113e4: e4 07 a0 64 ld [ %fp + 0x64 ], %l2
20113e8: e2 17 a0 5e lduh [ %fp + 0x5e ], %l1
20113ec: e0 17 a0 62 lduh [ %fp + 0x62 ], %l0
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
20113f0: 13 00 10 00 sethi %hi(0x400000), %o1
20113f4: 40 00 0b 92 call 201423c <rtems_rfs_trace>
20113f8: 27 00 00 3c sethi %hi(0xf000), %l3
20113fc: 80 8a 20 ff btst 0xff, %o0
2011400: 02 80 00 2f be 20114bc <rtems_rfs_inode_create+0xe0> <== ALWAYS TAKEN
2011404: a6 0f 00 13 and %i4, %l3, %l3
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
2011408: 03 00 00 10 sethi %hi(0x4000), %g1 <== NOT EXECUTED
type = "dir";
201140c: 29 00 80 d9 sethi %hi(0x2036400), %l4 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
2011410: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2011414: 02 80 00 16 be 201146c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2011418: a8 15 22 c0 or %l4, 0x2c0, %l4 <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
201141c: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
type = "char";
2011420: 29 00 80 d9 sethi %hi(0x2036400), %l4 <== NOT EXECUTED
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
2011424: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2011428: 02 80 00 11 be 201146c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
201142c: a8 15 22 c8 or %l4, 0x2c8, %l4 <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
2011430: 03 00 00 18 sethi %hi(0x6000), %g1 <== NOT EXECUTED
type = "block";
2011434: 29 00 80 d9 sethi %hi(0x2036400), %l4 <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
2011438: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
201143c: 02 80 00 0c be 201146c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2011440: a8 15 20 b8 or %l4, 0xb8, %l4 <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
2011444: 03 00 00 20 sethi %hi(0x8000), %g1 <== NOT EXECUTED
type = "file";
2011448: 29 00 80 d9 sethi %hi(0x2036400), %l4 <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
201144c: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2011450: 02 80 00 07 be 201146c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2011454: a8 15 22 d0 or %l4, 0x2d0, %l4 <== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
2011458: 03 00 00 28 sethi %hi(0xa000), %g1 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
201145c: 29 00 80 d9 sethi %hi(0x2036400), %l4 <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
2011460: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2011464: 02 80 00 41 be 2011568 <rtems_rfs_inode_create+0x18c> <== NOT EXECUTED
2011468: a8 15 22 d8 or %l4, 0x2d8, %l4 <== NOT EXECUTED
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
201146c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2011470: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011474: 40 00 52 37 call 2025d50 <printf> <== NOT EXECUTED
2011478: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 20366e8 <ramdisk_ops+0xbc8><== NOT EXECUTED
for (c = 0; c < length; c++)
201147c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2011480: 02 80 00 09 be 20114a4 <rtems_rfs_inode_create+0xc8> <== NOT EXECUTED
2011484: 82 10 20 00 clr %g1 <== NOT EXECUTED
2011488: aa 10 20 00 clr %l5 <== NOT EXECUTED
printf ("%c", name[c]);
201148c: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 <== NOT EXECUTED
2011490: 40 00 52 43 call 2025d9c <putchar> <== NOT EXECUTED
2011494: aa 05 60 01 inc %l5 <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
2011498: 80 a5 40 1b cmp %l5, %i3 <== NOT EXECUTED
201149c: 12 bf ff fc bne 201148c <rtems_rfs_inode_create+0xb0> <== NOT EXECUTED
20114a0: 82 10 00 15 mov %l5, %g1 <== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
20114a4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20114a8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20114ac: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED
20114b0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
20114b4: 40 00 52 27 call 2025d50 <printf> <== NOT EXECUTED
20114b8: 96 0f 23 ff and %i4, 0x3ff, %o3 <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
20114bc: 03 00 00 18 sethi %hi(0x6000), %g1
20114c0: 80 a4 c0 01 cmp %l3, %g1
20114c4: 02 80 00 15 be 2011518 <rtems_rfs_inode_create+0x13c> <== NEVER TAKEN
20114c8: 92 10 00 19 mov %i1, %o1
20114cc: 04 80 00 0c ble 20114fc <rtems_rfs_inode_create+0x120>
20114d0: 03 00 00 08 sethi %hi(0x2000), %g1
20114d4: 03 00 00 20 sethi %hi(0x8000), %g1
20114d8: 80 a4 c0 01 cmp %l3, %g1
20114dc: 02 80 00 0f be 2011518 <rtems_rfs_inode_create+0x13c>
20114e0: 03 00 00 28 sethi %hi(0xa000), %g1
20114e4: 80 a4 c0 01 cmp %l3, %g1
20114e8: 02 80 00 0d be 201151c <rtems_rfs_inode_create+0x140> <== ALWAYS TAKEN
20114ec: 90 10 00 18 mov %i0, %o0
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
20114f0: a8 10 20 16 mov 0x16, %l4 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
20114f4: 81 c7 e0 08 ret
20114f8: 91 e8 00 14 restore %g0, %l4, %o0
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
20114fc: 80 a4 c0 01 cmp %l3, %g1
2011500: 02 80 00 05 be 2011514 <rtems_rfs_inode_create+0x138> <== NEVER TAKEN
2011504: 03 00 00 10 sethi %hi(0x4000), %g1
2011508: 80 a4 c0 01 cmp %l3, %g1
201150c: 12 bf ff fa bne 20114f4 <rtems_rfs_inode_create+0x118> <== NEVER TAKEN
2011510: a8 10 20 16 mov 0x16, %l4
rtems_rfs_bitmap_bit goal,
rtems_rfs_ino* ino)
{
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_group_bitmap_alloc (fs, goal, true, &bit);
2011514: 92 10 00 19 mov %i1, %o1
2011518: 90 10 00 18 mov %i0, %o0
201151c: 94 10 20 01 mov 1, %o2
2011520: 7f ff fc f0 call 20108e0 <rtems_rfs_group_bitmap_alloc>
2011524: 96 07 bf fc add %fp, -4, %o3
*ino = bit;
2011528: d2 07 bf fc ld [ %fp + -4 ], %o1
rtems_rfs_bitmap_bit goal,
rtems_rfs_ino* ino)
{
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_group_bitmap_alloc (fs, goal, true, &bit);
201152c: a8 10 00 08 mov %o0, %l4
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
if (rc > 0)
2011530: 80 a2 20 00 cmp %o0, 0
2011534: 14 bf ff f0 bg 20114f4 <rtems_rfs_inode_create+0x118> <== NEVER TAKEN
2011538: d2 24 80 00 st %o1, [ %l2 ]
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
201153c: 90 10 00 18 mov %i0, %o0
2011540: 94 07 bf d4 add %fp, -44, %o2
2011544: 7f ff fe 62 call 2010ecc <rtems_rfs_inode_open>
2011548: 96 10 20 01 mov 1, %o3
if (rc > 0)
201154c: a8 92 20 00 orcc %o0, 0, %l4
2011550: 04 80 00 09 ble 2011574 <rtems_rfs_inode_create+0x198> <== ALWAYS TAKEN
2011554: 90 10 00 18 mov %i0, %o0
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
2011558: d4 04 80 00 ld [ %l2 ], %o2 <== NOT EXECUTED
201155c: 7f ff fd 6e call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
2011560: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2011564: 30 bf ff e4 b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
2011568: 29 00 80 d9 sethi %hi(0x2036400), %l4 <== NOT EXECUTED
201156c: 10 bf ff c0 b 201146c <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2011570: a8 15 22 e0 or %l4, 0x2e0, %l4 ! 20366e0 <ramdisk_ops+0xbc0><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
2011574: 90 07 bf d4 add %fp, -44, %o0
2011578: 92 10 00 1d mov %i5, %o1
201157c: 94 10 00 1c mov %i4, %o2
2011580: 96 10 00 11 mov %l1, %o3
2011584: 7f ff ff 26 call 201121c <rtems_rfs_inode_initialise>
2011588: 98 10 00 10 mov %l0, %o4
if (rc > 0)
201158c: a8 92 20 00 orcc %o0, 0, %l4
2011590: 14 80 00 28 bg 2011630 <rtems_rfs_inode_create+0x254> <== NEVER TAKEN
2011594: 03 00 00 10 sethi %hi(0x4000), %g1
/*
* Only handle the specifics of a directory. Let caller handle the others.
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
2011598: 80 a4 c0 01 cmp %l3, %g1
201159c: 22 80 00 74 be,a 201176c <rtems_rfs_inode_create+0x390>
20115a0: d8 04 80 00 ld [ %l2 ], %o4
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
20115a4: 90 10 00 18 mov %i0, %o0
20115a8: 92 10 00 19 mov %i1, %o1
20115ac: 94 07 bf ac add %fp, -84, %o2
20115b0: 7f ff fe 47 call 2010ecc <rtems_rfs_inode_open>
20115b4: 96 10 20 01 mov 1, %o3
if (rc > 0)
20115b8: a8 92 20 00 orcc %o0, 0, %l4
20115bc: 04 80 00 40 ble 20116bc <rtems_rfs_inode_create+0x2e0> <== ALWAYS TAKEN
20115c0: 92 07 bf d4 add %fp, -44, %o1
{
rtems_rfs_inode_delete (fs, &inode);
20115c4: 7f ff fe df call 2011140 <rtems_rfs_inode_delete> <== NOT EXECUTED
20115c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
20115cc: 90 10 20 00 clr %o0 <== NOT EXECUTED
20115d0: 40 00 0b 1b call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20115d4: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
20115d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20115dc: 12 80 00 89 bne 2011800 <rtems_rfs_inode_create+0x424> <== NOT EXECUTED
20115e0: d2 07 bf dc ld [ %fp + -36 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
20115e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20115e8: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
20115ec: 7f ff fe 70 call 2010fac <rtems_rfs_inode_unload> <== NOT EXECUTED
20115f0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
20115f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20115f8: 12 bf ff bf bne 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
20115fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2011600: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2011604: 04 bf ff bc ble 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
2011608: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
201160c: 40 00 0b 0c call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011610: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
2011614: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011618: 02 bf ff b7 be 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
201161c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
2011620: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011624: 40 00 51 cb call 2025d50 <printf> <== NOT EXECUTED
2011628: 90 12 22 60 or %o0, 0x260, %o0 ! 2036660 <ramdisk_ops+0xb40><== NOT EXECUTED
201162c: 30 bf ff b2 b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
2011630: 90 10 20 00 clr %o0 <== NOT EXECUTED
2011634: 40 00 0b 02 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011638: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
201163c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011640: 22 80 00 07 be,a 201165c <rtems_rfs_inode_create+0x280> <== NOT EXECUTED
2011644: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
2011648: d2 07 bf dc ld [ %fp + -36 ], %o1 <== NOT EXECUTED
201164c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011650: 40 00 51 c0 call 2025d50 <printf> <== NOT EXECUTED
2011654: 90 12 22 38 or %o0, 0x238, %o0 ! 2036638 <ramdisk_ops+0xb18><== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
2011658: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201165c: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
2011660: 7f ff fe 53 call 2010fac <rtems_rfs_inode_unload> <== NOT EXECUTED
2011664: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
2011668: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201166c: 12 80 00 0e bne 20116a4 <rtems_rfs_inode_create+0x2c8> <== NOT EXECUTED
2011670: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2011674: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2011678: 04 80 00 0b ble 20116a4 <rtems_rfs_inode_create+0x2c8> <== NOT EXECUTED
201167c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
2011680: 40 00 0a ef call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011684: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
2011688: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201168c: 22 80 00 07 be,a 20116a8 <rtems_rfs_inode_create+0x2cc> <== NOT EXECUTED
2011690: d4 04 80 00 ld [ %l2 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
2011694: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
2011698: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
201169c: 40 00 51 ad call 2025d50 <printf> <== NOT EXECUTED
20116a0: 90 12 22 60 or %o0, 0x260, %o0 ! 2036660 <ramdisk_ops+0xb40><== NOT EXECUTED
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
20116a4: d4 04 80 00 ld [ %l2 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
20116a8: c0 27 bf dc clr [ %fp + -36 ] <== NOT EXECUTED
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
20116ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20116b0: 7f ff fd 19 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
20116b4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20116b8: 30 bf ff 8f b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
20116bc: d8 04 80 00 ld [ %l2 ], %o4
20116c0: 90 10 00 18 mov %i0, %o0
20116c4: 92 07 bf ac add %fp, -84, %o1
20116c8: 94 10 00 1a mov %i2, %o2
20116cc: 40 00 38 4d call 201f800 <rtems_rfs_dir_add_entry>
20116d0: 96 10 00 1b mov %i3, %o3
if (rc > 0)
20116d4: a8 92 20 00 orcc %o0, 0, %l4
20116d8: 14 80 00 40 bg 20117d8 <rtems_rfs_inode_create+0x3fc> <== NEVER TAKEN
20116dc: 03 00 00 10 sethi %hi(0x4000), %g1
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
20116e0: 80 a4 c0 01 cmp %l3, %g1
20116e4: 12 80 00 15 bne 2011738 <rtems_rfs_inode_create+0x35c>
20116e8: 92 07 bf ac add %fp, -84, %o1
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20116ec: c2 07 bf b8 ld [ %fp + -72 ], %g1
if (links == 0xffff)
links = 0;
20116f0: 09 3f ff c0 sethi %hi(0xffff0000), %g4
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20116f4: c6 08 40 00 ldub [ %g1 ], %g3
20116f8: c4 08 60 01 ldub [ %g1 + 1 ], %g2
20116fc: 87 28 e0 08 sll %g3, 8, %g3
2011700: 84 10 c0 02 or %g3, %g2, %g2
if (links == 0xffff)
2011704: 87 28 a0 10 sll %g2, 0x10, %g3
2011708: 87 30 e0 10 srl %g3, 0x10, %g3
links = 0;
201170c: 86 39 00 03 xnor %g4, %g3, %g3
2011710: 80 a0 00 03 cmp %g0, %g3
2011714: 86 60 20 00 subx %g0, 0, %g3
2011718: 84 08 80 03 and %g2, %g3, %g2
rtems_rfs_inode_set_links (&parent_inode,
201171c: 84 00 a0 01 inc %g2
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
2011720: 87 30 a0 08 srl %g2, 8, %g3
2011724: c6 28 40 00 stb %g3, [ %g1 ]
2011728: c2 07 bf b8 ld [ %fp + -72 ], %g1
201172c: c4 28 60 01 stb %g2, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011730: 82 10 20 01 mov 1, %g1
2011734: c2 2f bf bc stb %g1, [ %fp + -68 ]
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
2011738: 7f ff fe 5c call 20110a8 <rtems_rfs_inode_close>
201173c: 90 10 00 18 mov %i0, %o0
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
2011740: 92 07 bf d4 add %fp, -44, %o1
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
2011744: a8 10 00 08 mov %o0, %l4
if (rc > 0)
2011748: 80 a5 20 00 cmp %l4, 0
201174c: 04 80 00 32 ble 2011814 <rtems_rfs_inode_create+0x438> <== ALWAYS TAKEN
2011750: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_delete (fs, &inode);
2011754: 7f ff fe 7b call 2011140 <rtems_rfs_inode_delete> <== NOT EXECUTED
2011758: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
201175c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2011760: 7f ff fe 52 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2011764: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
return rc;
2011768: 30 bf ff 63 b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
201176c: 90 10 00 18 mov %i0, %o0
2011770: 92 07 bf d4 add %fp, -44, %o1
2011774: 96 10 20 01 mov 1, %o3
2011778: 15 00 80 d2 sethi %hi(0x2034800), %o2
201177c: 40 00 38 21 call 201f800 <rtems_rfs_dir_add_entry>
2011780: 94 12 a0 c0 or %o2, 0xc0, %o2 ! 20348c0 <_rodata_start+0x390>
if (rc == 0)
2011784: a8 92 20 00 orcc %o0, 0, %l4
2011788: 12 80 00 0b bne 20117b4 <rtems_rfs_inode_create+0x3d8> <== NEVER TAKEN
201178c: 80 a5 20 00 cmp %l4, 0
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
2011790: 90 10 00 18 mov %i0, %o0
2011794: 92 07 bf d4 add %fp, -44, %o1
2011798: 96 10 20 02 mov 2, %o3
201179c: 15 00 80 d1 sethi %hi(0x2034400), %o2
20117a0: 98 10 00 19 mov %i1, %o4
20117a4: 40 00 38 17 call 201f800 <rtems_rfs_dir_add_entry>
20117a8: 94 12 a3 48 or %o2, 0x348, %o2
20117ac: a8 10 00 08 mov %o0, %l4
if (rc > 0)
20117b0: 80 a5 20 00 cmp %l4, 0
20117b4: 04 bf ff 7d ble 20115a8 <rtems_rfs_inode_create+0x1cc> <== ALWAYS TAKEN
20117b8: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_delete (fs, &inode);
20117bc: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
20117c0: 7f ff fe 60 call 2011140 <rtems_rfs_inode_delete> <== NOT EXECUTED
20117c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20117c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20117cc: 7f ff fe 37 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20117d0: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
return rc;
20117d4: 30 bf ff 48 b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
20117d8: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
20117dc: 7f ff fe 59 call 2011140 <rtems_rfs_inode_delete> <== NOT EXECUTED
20117e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20117e4: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
20117e8: 7f ff fe 30 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20117ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
20117f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20117f4: 7f ff fe 2d call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20117f8: 92 07 bf ac add %fp, -84, %o1 <== NOT EXECUTED
return rc;
20117fc: 30 bf ff 3e b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
2011800: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011804: 40 00 51 53 call 2025d50 <printf> <== NOT EXECUTED
2011808: 90 12 22 38 or %o0, 0x238, %o0 ! 2036638 <ramdisk_ops+0xb18><== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
201180c: 10 bf ff 77 b 20115e8 <rtems_rfs_inode_create+0x20c> <== NOT EXECUTED
2011810: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
2011814: 7f ff fe 25 call 20110a8 <rtems_rfs_inode_close>
2011818: 01 00 00 00 nop
if (rc > 0)
201181c: a8 92 20 00 orcc %o0, 0, %l4
2011820: 24 bf ff 35 ble,a 20114f4 <rtems_rfs_inode_create+0x118> <== ALWAYS TAKEN
2011824: a8 10 20 00 clr %l4
{
rtems_rfs_inode_free (fs, *ino);
2011828: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
201182c: 7f ff fd 77 call 2010e08 <rtems_rfs_inode_free> <== NOT EXECUTED
2011830: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
2011834: 30 bf ff 30 b,a 20114f4 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
02011140 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
2011140: 9d e3 bf 50 save %sp, -176, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
2011144: 90 10 20 00 clr %o0
2011148: 13 00 20 00 sethi %hi(0x800000), %o1
201114c: 40 00 0c 3c call 201423c <rtems_rfs_trace>
2011150: ba 10 00 18 mov %i0, %i5
2011154: 80 8a 20 ff btst 0xff, %o0
2011158: 02 80 00 0d be 201118c <rtems_rfs_inode_delete+0x4c> <== ALWAYS TAKEN
201115c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
2011160: 15 00 80 d9 sethi %hi(0x2036400), %o2 <== NOT EXECUTED
2011164: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2011168: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201116c: 02 80 00 04 be 201117c <rtems_rfs_inode_delete+0x3c> <== NOT EXECUTED
2011170: 94 12 a1 98 or %o2, 0x198, %o2 <== NOT EXECUTED
2011174: 15 00 80 d9 sethi %hi(0x2036400), %o2 <== NOT EXECUTED
2011178: 94 12 a1 90 or %o2, 0x190, %o2 ! 2036590 <ramdisk_ops+0xa70><== NOT EXECUTED
201117c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011180: 40 00 52 f4 call 2025d50 <printf> <== NOT EXECUTED
2011184: 90 12 22 90 or %o0, 0x290, %o0 ! 2036690 <ramdisk_ops+0xb70><== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
2011188: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
201118c: 80 a0 60 00 cmp %g1, 0
2011190: 02 80 00 09 be 20111b4 <rtems_rfs_inode_delete+0x74> <== NEVER TAKEN
2011194: b0 10 20 00 clr %i0
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
2011198: d4 06 60 08 ld [ %i1 + 8 ], %o2
201119c: 90 10 00 1d mov %i5, %o0
20111a0: 7f ff fe 5d call 2010b14 <rtems_rfs_group_bitmap_free>
20111a4: 92 10 20 01 mov 1, %o1
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
if (rc > 0)
20111a8: b0 92 20 00 orcc %o0, 0, %i0
20111ac: 04 80 00 04 ble 20111bc <rtems_rfs_inode_delete+0x7c> <== ALWAYS TAKEN
20111b0: 90 10 00 1d mov %i5, %o0
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
20111b4: 81 c7 e0 08 ret <== NOT EXECUTED
20111b8: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
20111bc: 92 10 00 19 mov %i1, %o1
20111c0: 40 00 32 08 call 201d9e0 <rtems_rfs_block_map_open>
20111c4: 94 07 bf b0 add %fp, -80, %o2
if (rc == 0)
20111c8: b0 92 20 00 orcc %o0, 0, %i0
20111cc: 12 bf ff fa bne 20111b4 <rtems_rfs_inode_delete+0x74> <== NEVER TAKEN
20111d0: 92 07 bf b0 add %fp, -80, %o1
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
20111d4: 40 00 34 f7 call 201e5b0 <rtems_rfs_block_map_free_all>
20111d8: 90 10 00 1d mov %i5, %o0
rc = rtems_rfs_block_map_close (fs, &map);
20111dc: 92 07 bf b0 add %fp, -80, %o1
20111e0: 40 00 32 64 call 201db70 <rtems_rfs_block_map_close>
20111e4: 90 10 00 1d mov %i5, %o0
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
20111e8: d0 06 60 0c ld [ %i1 + 0xc ], %o0
20111ec: 94 10 20 38 mov 0x38, %o2
20111f0: 40 00 52 86 call 2025c08 <memset>
20111f4: 92 10 20 ff mov 0xff, %o1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20111f8: 82 10 20 01 mov 1, %g1
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
20111fc: 90 10 00 1d mov %i5, %o0
2011200: 92 06 60 10 add %i1, 0x10, %o1
2011204: 40 00 35 37 call 201e6e0 <rtems_rfs_buffer_handle_release>
2011208: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
handle->loads = 0;
201120c: c0 26 60 24 clr [ %i1 + 0x24 ]
handle->node = NULL;
2011210: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
return rc;
}
2011214: 81 c7 e0 08 ret
2011218: 91 e8 00 08 restore %g0, %o0, %o0
02010e08 <rtems_rfs_inode_free>:
int
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
2010e08: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
2010e0c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2010e10: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2010e14: 7f ff ff 40 call 2010b14 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
2010e18: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0201121c <rtems_rfs_inode_initialise>:
rtems_rfs_inode_initialise (rtems_rfs_inode_handle* handle,
uint16_t links,
uint16_t mode,
uid_t uid,
gid_t gid)
{
201121c: 9d e3 bf a0 save %sp, -96, %sp
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
2011220: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2011224: 85 36 60 08 srl %i1, 8, %g2
2011228: c4 28 40 00 stb %g2, [ %g1 ]
201122c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
2011230: b9 2f 20 10 sll %i4, 0x10, %i4
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
2011234: f2 28 60 01 stb %i1, [ %g1 + 1 ]
* @prarm flags The flags.
*/
static inline void
rtems_rfs_inode_set_flags (rtems_rfs_inode_handle* handle, uint16_t flags)
{
rtems_rfs_write_u16 (&handle->node->flags, flags);
2011238: c4 06 20 0c ld [ %i0 + 0xc ], %g2
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
201123c: 83 36 a0 08 srl %i2, 8, %g1
* @prarm flags The flags.
*/
static inline void
rtems_rfs_inode_set_flags (rtems_rfs_inode_handle* handle, uint16_t flags)
{
rtems_rfs_write_u16 (&handle->node->flags, flags);
2011240: c0 28 a0 08 clrb [ %g2 + 8 ]
2011244: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2011248: ba 10 00 18 mov %i0, %i5
201124c: c0 28 a0 09 clrb [ %g2 + 9 ]
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
2011250: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2011254: c2 28 a0 02 stb %g1, [ %g2 + 2 ]
2011258: c4 06 20 0c ld [ %i0 + 0xc ], %g2
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
201125c: 82 17 00 1b or %i4, %i3, %g1
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
2011260: f4 28 a0 03 stb %i2, [ %g2 + 3 ]
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
2011264: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2011268: 87 30 60 18 srl %g1, 0x18, %g3
201126c: c6 28 a0 04 stb %g3, [ %g2 + 4 ]
2011270: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2011274: 87 30 60 10 srl %g1, 0x10, %g3
2011278: c6 28 a0 05 stb %g3, [ %g2 + 5 ]
201127c: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2011280: 83 30 60 08 srl %g1, 8, %g1
2011284: c2 28 a0 06 stb %g1, [ %g2 + 6 ]
2011288: c2 06 20 0c ld [ %i0 + 0xc ], %g1
201128c: f6 28 60 07 stb %i3, [ %g1 + 7 ]
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
2011290: c4 06 20 0c ld [ %i0 + 0xc ], %g2
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011294: 82 10 20 01 mov 1, %g1
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
2011298: c0 28 a0 0a clrb [ %g2 + 0xa ]
201129c: c6 06 20 0c ld [ %i0 + 0xc ], %g3
rtems_rfs_inode_set_flags (handle, 0);
rtems_rfs_inode_set_mode (handle, mode);
rtems_rfs_inode_set_uid_gid (handle, uid, gid);
rtems_rfs_inode_set_block_offset (handle, 0);
rtems_rfs_inode_set_block_count (handle, 0);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
20112a0: 84 10 20 00 clr %g2
20112a4: c0 28 e0 0b clrb [ %g3 + 0xb ]
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
20112a8: c6 06 20 0c ld [ %i0 + 0xc ], %g3
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20112ac: b6 10 20 01 mov 1, %i3
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
20112b0: c0 28 e0 0c clrb [ %g3 + 0xc ]
20112b4: c6 06 20 0c ld [ %i0 + 0xc ], %g3
20112b8: c0 28 e0 0d clrb [ %g3 + 0xd ]
20112bc: c6 06 20 0c ld [ %i0 + 0xc ], %g3
20112c0: c0 28 e0 0e clrb [ %g3 + 0xe ]
20112c4: c6 06 20 0c ld [ %i0 + 0xc ], %g3
20112c8: c0 28 e0 0f clrb [ %g3 + 0xf ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20112cc: 86 10 20 01 mov 1, %g3
20112d0: c6 2e 20 10 stb %g3, [ %i0 + 0x10 ]
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
20112d4: c8 07 60 0c ld [ %i5 + 0xc ], %g4
20112d8: 86 00 a0 06 add %g2, 6, %g3
20112dc: 87 28 e0 02 sll %g3, 2, %g3
20112e0: 86 01 00 03 add %g4, %g3, %g3
20112e4: c0 28 e0 04 clrb [ %g3 + 4 ]
20112e8: c6 07 60 0c ld [ %i5 + 0xc ], %g3
20112ec: 84 00 a0 01 inc %g2
20112f0: 86 00 c0 01 add %g3, %g1, %g3
20112f4: c0 28 e0 1c clrb [ %g3 + 0x1c ]
20112f8: c6 07 60 0c ld [ %i5 + 0xc ], %g3
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20112fc: b2 10 20 01 mov 1, %i1
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2011300: 86 00 c0 01 add %g3, %g1, %g3
2011304: c0 28 e0 1d clrb [ %g3 + 0x1d ]
2011308: c6 07 60 0c ld [ %i5 + 0xc ], %g3
201130c: 80 a0 a0 05 cmp %g2, 5
2011310: 86 00 c0 01 add %g3, %g1, %g3
2011314: c0 28 e0 1e clrb [ %g3 + 0x1e ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011318: f6 2f 60 10 stb %i3, [ %i5 + 0x10 ]
201131c: 12 bf ff ee bne 20112d4 <rtems_rfs_inode_initialise+0xb8>
2011320: 82 00 60 04 add %g1, 4, %g1
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
2011324: c2 07 60 0c ld [ %i5 + 0xc ], %g1
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
2011328: b0 10 20 06 mov 6, %i0
201132c: c0 28 60 30 clrb [ %g1 + 0x30 ]
2011330: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011334: c0 28 60 31 clrb [ %g1 + 0x31 ]
2011338: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201133c: c0 28 60 32 clrb [ %g1 + 0x32 ]
2011340: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011344: c0 28 60 33 clrb [ %g1 + 0x33 ]
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
2011348: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201134c: c0 28 60 34 clrb [ %g1 + 0x34 ]
2011350: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011354: c0 28 60 35 clrb [ %g1 + 0x35 ]
2011358: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201135c: c0 28 60 36 clrb [ %g1 + 0x36 ]
2011360: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011364: c0 28 60 37 clrb [ %g1 + 0x37 ]
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
2011368: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201136c: 80 a0 60 00 cmp %g1, 0
2011370: 02 80 00 19 be 20113d4 <rtems_rfs_inode_initialise+0x1b8> <== NEVER TAKEN
2011374: f2 2f 60 10 stb %i1, [ %i5 + 0x10 ]
return ENXIO;
now = time (NULL);
2011378: 40 00 61 53 call 20298c4 <time>
201137c: 90 10 20 00 clr %o0
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
2011380: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011384: 87 32 20 18 srl %o0, 0x18, %g3
2011388: c6 28 60 10 stb %g3, [ %g1 + 0x10 ]
201138c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011390: 85 32 20 10 srl %o0, 0x10, %g2
2011394: c4 28 60 11 stb %g2, [ %g1 + 0x11 ]
2011398: c8 07 60 0c ld [ %i5 + 0xc ], %g4
201139c: 83 32 20 08 srl %o0, 8, %g1
20113a0: c2 29 20 12 stb %g1, [ %g4 + 0x12 ]
20113a4: c8 07 60 0c ld [ %i5 + 0xc ], %g4
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
20113a8: b0 10 20 00 clr %i0
20113ac: d0 29 20 13 stb %o0, [ %g4 + 0x13 ]
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
20113b0: c8 07 60 0c ld [ %i5 + 0xc ], %g4
20113b4: c6 29 20 14 stb %g3, [ %g4 + 0x14 ]
20113b8: c6 07 60 0c ld [ %i5 + 0xc ], %g3
20113bc: c4 28 e0 15 stb %g2, [ %g3 + 0x15 ]
20113c0: c4 07 60 0c ld [ %i5 + 0xc ], %g2
20113c4: c2 28 a0 16 stb %g1, [ %g2 + 0x16 ]
20113c8: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20113cc: d0 28 60 17 stb %o0, [ %g1 + 0x17 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20113d0: f2 2f 60 10 stb %i1, [ %i5 + 0x10 ]
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (handle, b, 0);
rtems_rfs_inode_set_last_map_block (handle, 0);
rtems_rfs_inode_set_last_data_block (handle, 0);
return rtems_rfs_inode_time_stamp_now (handle, true, true);
}
20113d4: 81 c7 e0 08 ret
20113d8: 81 e8 00 00 restore
02010e1c <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
2010e1c: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
2010e20: 90 10 20 00 clr %o0
2010e24: 40 00 0d 06 call 201423c <rtems_rfs_trace>
2010e28: 13 00 04 00 sethi %hi(0x100000), %o1
2010e2c: 80 8a 20 ff btst 0xff, %o0
2010e30: 02 80 00 0e be 2010e68 <rtems_rfs_inode_load+0x4c> <== ALWAYS TAKEN
2010e34: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
2010e38: 17 00 80 d9 sethi %hi(0x2036400), %o3 <== NOT EXECUTED
2010e3c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2010e40: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 <== NOT EXECUTED
2010e44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2010e48: 02 80 00 04 be 2010e58 <rtems_rfs_inode_load+0x3c> <== NOT EXECUTED
2010e4c: 96 12 e1 98 or %o3, 0x198, %o3 <== NOT EXECUTED
2010e50: 17 00 80 d9 sethi %hi(0x2036400), %o3 <== NOT EXECUTED
2010e54: 96 12 e1 90 or %o3, 0x190, %o3 ! 2036590 <ramdisk_ops+0xa70><== NOT EXECUTED
2010e58: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2010e5c: 40 00 53 bd call 2025d50 <printf> <== NOT EXECUTED
2010e60: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 20365a0 <ramdisk_ops+0xa80><== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
2010e64: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
2010e68: 80 a0 60 00 cmp %g1, 0
2010e6c: 22 80 00 08 be,a 2010e8c <rtems_rfs_inode_load+0x70>
2010e70: d4 06 60 1c ld [ %i1 + 0x1c ], %o2
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
2010e74: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return 0;
2010e78: b0 10 20 00 clr %i0
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
2010e7c: 82 00 60 01 inc %g1
2010e80: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
return 0;
}
2010e84: 81 c7 e0 08 ret
2010e88: 81 e8 00 00 restore
if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
2010e8c: 90 10 00 18 mov %i0, %o0
2010e90: 92 06 60 10 add %i1, 0x10, %o1
2010e94: 40 00 36 8e call 201e8cc <rtems_rfs_buffer_handle_request>
2010e98: 96 10 20 01 mov 1, %o3
handle->block, true);
if (rc > 0)
2010e9c: b0 92 20 00 orcc %o0, 0, %i0
2010ea0: 14 bf ff f9 bg 2010e84 <rtems_rfs_inode_load+0x68> <== NEVER TAKEN
2010ea4: 01 00 00 00 nop
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
2010ea8: c4 06 60 18 ld [ %i1 + 0x18 ], %g2
handle->node += handle->offset;
2010eac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2010eb0: c4 00 a0 24 ld [ %g2 + 0x24 ], %g2
2010eb4: 87 28 60 03 sll %g1, 3, %g3
2010eb8: 83 28 60 06 sll %g1, 6, %g1
2010ebc: 82 20 40 03 sub %g1, %g3, %g1
2010ec0: 82 00 80 01 add %g2, %g1, %g1
2010ec4: 10 bf ff ec b 2010e74 <rtems_rfs_inode_load+0x58>
2010ec8: c2 26 60 0c st %g1, [ %i1 + 0xc ]
02010ecc <rtems_rfs_inode_open>:
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
2010ecc: 9d e3 bf a0 save %sp, -96, %sp
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
2010ed0: 90 10 20 00 clr %o0
2010ed4: 40 00 0c da call 201423c <rtems_rfs_trace>
2010ed8: 13 00 01 00 sethi %hi(0x40000), %o1
2010edc: 80 8a 20 ff btst 0xff, %o0
2010ee0: 32 80 00 2e bne,a 2010f98 <rtems_rfs_inode_open+0xcc> <== NEVER TAKEN
2010ee4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
2010ee8: 80 a6 60 00 cmp %i1, 0
2010eec: 12 80 00 04 bne 2010efc <rtems_rfs_inode_open+0x30> <== ALWAYS TAKEN
2010ef0: 82 10 20 16 mov 0x16, %g1
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
2010ef4: 81 c7 e0 08 ret <== NOT EXECUTED
2010ef8: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
2010efc: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
2010f00: ba 06 7f ff add %i1, -1, %i5
2010f04: 80 a7 40 02 cmp %i5, %g2
2010f08: 18 bf ff fb bgu 2010ef4 <rtems_rfs_inode_open+0x28> <== NEVER TAKEN
2010f0c: 01 00 00 00 nop
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
2010f10: f8 06 20 28 ld [ %i0 + 0x28 ], %i4
gino = gino % fs->group_inodes;
2010f14: 90 10 00 1d mov %i5, %o0
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
2010f18: f2 26 a0 08 st %i1, [ %i2 + 8 ]
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
2010f1c: 92 10 00 1c mov %i4, %o1
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
2010f20: c0 26 a0 0c clr [ %i2 + 0xc ]
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
2010f24: 40 00 85 99 call 2032588 <.urem>
2010f28: c0 26 a0 24 clr [ %i2 + 0x24 ]
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
2010f2c: f2 06 20 2c ld [ %i0 + 0x2c ], %i1
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
2010f30: a0 10 00 08 mov %o0, %l0
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
2010f34: 40 00 85 95 call 2032588 <.urem>
2010f38: 92 10 00 19 mov %i1, %o1
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
2010f3c: 92 10 00 1c mov %i4, %o1
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
2010f40: d0 26 a0 20 st %o0, [ %i2 + 0x20 ]
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
2010f44: 40 00 84 e5 call 20322d8 <.udiv>
2010f48: 90 10 00 1d mov %i5, %o0
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
2010f4c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
2010f50: 85 2a 20 04 sll %o0, 4, %g2
2010f54: 91 2a 20 06 sll %o0, 6, %o0
2010f58: 90 00 80 08 add %g2, %o0, %o0
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
2010f5c: fa 00 40 08 ld [ %g1 + %o0 ], %i5
2010f60: 92 10 00 19 mov %i1, %o1
2010f64: 90 10 00 10 mov %l0, %o0
2010f68: 40 00 84 dc call 20322d8 <.udiv>
2010f6c: ba 07 60 02 add %i5, 2, %i5
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2010f70: c0 2e a0 10 clrb [ %i2 + 0x10 ]
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
2010f74: ba 07 40 08 add %i5, %o0, %i5
handle->bnum = 0;
2010f78: c0 26 a0 14 clr [ %i2 + 0x14 ]
2010f7c: fa 26 a0 1c st %i5, [ %i2 + 0x1c ]
handle->buffer = NULL;
2010f80: c0 26 a0 18 clr [ %i2 + 0x18 ]
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
2010f84: 80 a6 e0 00 cmp %i3, 0
2010f88: 02 bf ff db be 2010ef4 <rtems_rfs_inode_open+0x28> <== NEVER TAKEN
2010f8c: 82 10 20 00 clr %g1
rc = rtems_rfs_inode_load (fs, handle);
2010f90: 7f ff ff a3 call 2010e1c <rtems_rfs_inode_load>
2010f94: 93 e8 00 1a restore %g0, %i2, %o1
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
2010f98: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2010f9c: 40 00 53 6d call 2025d50 <printf> <== NOT EXECUTED
2010fa0: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 20365d8 <ramdisk_ops+0xab8><== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
2010fa4: 10 bf ff d2 b 2010eec <rtems_rfs_inode_open+0x20> <== NOT EXECUTED
2010fa8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
02011838 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
2011838: 9d e3 bf a0 save %sp, -96, %sp
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
201183c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
2011840: ba 10 00 18 mov %i0, %i5
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
2011844: 80 a0 60 00 cmp %g1, 0
2011848: 02 80 00 23 be 20118d4 <rtems_rfs_inode_time_stamp_now+0x9c><== NEVER TAKEN
201184c: b0 10 20 06 mov 6, %i0
return ENXIO;
now = time (NULL);
2011850: 40 00 60 1d call 20298c4 <time>
2011854: 90 10 20 00 clr %o0
if (atime)
2011858: 80 a6 60 00 cmp %i1, 0
201185c: 02 80 00 0f be 2011898 <rtems_rfs_inode_time_stamp_now+0x60><== NEVER TAKEN
2011860: 80 a6 a0 00 cmp %i2, 0
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
2011864: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011868: 85 32 20 18 srl %o0, 0x18, %g2
201186c: c4 28 60 10 stb %g2, [ %g1 + 0x10 ]
2011870: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011874: 85 32 20 10 srl %o0, 0x10, %g2
2011878: c4 28 60 11 stb %g2, [ %g1 + 0x11 ]
201187c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2011880: 85 32 20 08 srl %o0, 8, %g2
2011884: c4 28 60 12 stb %g2, [ %g1 + 0x12 ]
2011888: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201188c: d0 28 60 13 stb %o0, [ %g1 + 0x13 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2011890: 82 10 20 01 mov 1, %g1
2011894: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
2011898: 02 80 00 0f be 20118d4 <rtems_rfs_inode_time_stamp_now+0x9c><== NEVER TAKEN
201189c: b0 10 20 00 clr %i0
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
20118a0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20118a4: 85 32 20 18 srl %o0, 0x18, %g2
20118a8: c4 28 60 14 stb %g2, [ %g1 + 0x14 ]
20118ac: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20118b0: 85 32 20 10 srl %o0, 0x10, %g2
20118b4: c4 28 60 15 stb %g2, [ %g1 + 0x15 ]
20118b8: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20118bc: 85 32 20 08 srl %o0, 8, %g2
20118c0: c4 28 60 16 stb %g2, [ %g1 + 0x16 ]
20118c4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20118c8: d0 28 60 17 stb %o0, [ %g1 + 0x17 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20118cc: 82 10 20 01 mov 1, %g1
20118d0: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
20118d4: 81 c7 e0 08 ret
20118d8: 81 e8 00 00 restore
02010fac <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
2010fac: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
2010fb0: 90 10 20 00 clr %o0
2010fb4: 13 00 08 00 sethi %hi(0x200000), %o1
2010fb8: 40 00 0c a1 call 201423c <rtems_rfs_trace>
2010fbc: ba 10 00 18 mov %i0, %i5
2010fc0: 80 8a 20 ff btst 0xff, %o0
2010fc4: 02 80 00 0e be 2010ffc <rtems_rfs_inode_unload+0x50> <== ALWAYS TAKEN
2010fc8: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
2010fcc: 17 00 80 d9 sethi %hi(0x2036400), %o3 <== NOT EXECUTED
2010fd0: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2010fd4: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 <== NOT EXECUTED
2010fd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2010fdc: 02 80 00 04 be 2010fec <rtems_rfs_inode_unload+0x40> <== NOT EXECUTED
2010fe0: 96 12 e1 98 or %o3, 0x198, %o3 <== NOT EXECUTED
2010fe4: 17 00 80 d9 sethi %hi(0x2036400), %o3 <== NOT EXECUTED
2010fe8: 96 12 e1 90 or %o3, 0x190, %o3 ! 2036590 <ramdisk_ops+0xa70><== NOT EXECUTED
2010fec: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2010ff0: 40 00 53 58 call 2025d50 <printf> <== NOT EXECUTED
2010ff4: 90 12 22 00 or %o0, 0x200, %o0 ! 2036600 <ramdisk_ops+0xae0><== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
2010ff8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
2010ffc: 80 a0 60 00 cmp %g1, 0
2011000: 02 80 00 06 be 2011018 <rtems_rfs_inode_unload+0x6c>
2011004: b0 10 20 00 clr %i0
{
if (handle->loads == 0)
2011008: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
201100c: 80 a0 60 00 cmp %g1, 0
2011010: 12 80 00 04 bne 2011020 <rtems_rfs_inode_unload+0x74> <== ALWAYS TAKEN
2011014: b0 10 20 05 mov 5, %i0
handle->node = NULL;
}
}
return rc;
}
2011018: 81 c7 e0 08 ret
201101c: 81 e8 00 00 restore
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
2011020: 82 00 7f ff add %g1, -1, %g1
2011024: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
if (handle->loads == 0)
2011028: 80 a0 60 00 cmp %g1, 0
201102c: 12 bf ff fb bne 2011018 <rtems_rfs_inode_unload+0x6c>
2011030: b0 10 20 00 clr %i0
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
2011034: c2 0e 60 10 ldub [ %i1 + 0x10 ], %g1
2011038: 80 a0 60 00 cmp %g1, 0
201103c: 02 80 00 06 be 2011054 <rtems_rfs_inode_unload+0xa8>
2011040: 90 10 00 1d mov %i5, %o0
2011044: 80 a6 a0 00 cmp %i2, 0
2011048: 12 80 00 08 bne 2011068 <rtems_rfs_inode_unload+0xbc> <== ALWAYS TAKEN
201104c: 01 00 00 00 nop
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
2011050: 90 10 00 1d mov %i5, %o0
2011054: 40 00 35 a3 call 201e6e0 <rtems_rfs_buffer_handle_release>
2011058: 92 06 60 10 add %i1, 0x10, %o1
handle->node = NULL;
201105c: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
return rc;
}
2011060: 81 c7 e0 08 ret
2011064: 91 e8 00 08 restore %g0, %o0, %o0
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
2011068: 40 00 62 17 call 20298c4 <time>
201106c: 90 10 20 00 clr %o0
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
2011070: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2011074: 85 32 20 18 srl %o0, 0x18, %g2
2011078: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
201107c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2011080: 85 32 20 10 srl %o0, 0x10, %g2
2011084: c4 28 60 19 stb %g2, [ %g1 + 0x19 ]
2011088: c2 06 60 0c ld [ %i1 + 0xc ], %g1
201108c: 85 32 20 08 srl %o0, 8, %g2
2011090: c4 28 60 1a stb %g2, [ %g1 + 0x1a ]
2011094: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2011098: d0 28 60 1b stb %o0, [ %g1 + 0x1b ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201109c: 82 10 20 01 mov 1, %g1
20110a0: 10 bf ff ec b 2011050 <rtems_rfs_inode_unload+0xa4>
20110a4: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
02022034 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
2022034: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle target_inode;
uint16_t links;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
2022038: 90 10 20 00 clr %o0
202203c: 7f ff c8 80 call 201423c <rtems_rfs_trace>
2022040: 13 00 40 00 sethi %hi(0x1000000), %o1
2022044: 80 8a 20 ff btst 0xff, %o0
2022048: 12 80 00 50 bne 2022188 <rtems_rfs_link+0x154> <== NEVER TAKEN
202204c: 92 10 00 1b mov %i3, %o1
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
2022050: 90 10 00 18 mov %i0, %o0
2022054: 92 10 00 1c mov %i4, %o1
2022058: 94 07 bf d8 add %fp, -40, %o2
202205c: 7f ff bb 9c call 2010ecc <rtems_rfs_inode_open>
2022060: 96 10 20 01 mov 1, %o3
if (rc)
2022064: a0 92 20 00 orcc %o0, 0, %l0
2022068: 12 80 00 3d bne 202215c <rtems_rfs_link+0x128> <== NEVER TAKEN
202206c: 80 a7 60 00 cmp %i5, 0
/*
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
2022070: 12 80 00 0b bne 202209c <rtems_rfs_link+0x68> <== NEVER TAKEN
2022074: 90 10 00 18 mov %i0, %o0
2022078: c2 07 bf e4 ld [ %fp + -28 ], %g1
202207c: c4 08 60 02 ldub [ %g1 + 2 ], %g2
2022080: 03 00 00 3c sethi %hi(0xf000), %g1
2022084: 85 28 a0 08 sll %g2, 8, %g2
2022088: 84 08 80 01 and %g2, %g1, %g2
202208c: 03 00 00 10 sethi %hi(0x4000), %g1
2022090: 80 a0 80 01 cmp %g2, %g1
2022094: 02 80 00 4f be 20221d0 <rtems_rfs_link+0x19c> <== NEVER TAKEN
2022098: 92 07 bf d8 add %fp, -40, %o1
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
202209c: 92 10 00 1b mov %i3, %o1
20220a0: 94 07 bf b0 add %fp, -80, %o2
20220a4: 7f ff bb 8a call 2010ecc <rtems_rfs_inode_open>
20220a8: 96 10 20 01 mov 1, %o3
20220ac: a0 10 00 08 mov %o0, %l0
if (rc)
20220b0: 80 a4 20 00 cmp %l0, 0
20220b4: 12 80 00 30 bne 2022174 <rtems_rfs_link+0x140> <== NEVER TAKEN
20220b8: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
20220bc: 92 07 bf b0 add %fp, -80, %o1
20220c0: 94 10 00 19 mov %i1, %o2
20220c4: 96 10 00 1a mov %i2, %o3
20220c8: 7f ff f5 ce call 201f800 <rtems_rfs_dir_add_entry>
20220cc: 98 10 00 1c mov %i4, %o4
if (rc > 0)
20220d0: a0 92 20 00 orcc %o0, 0, %l0
20220d4: 14 80 00 24 bg 2022164 <rtems_rfs_link+0x130> <== NEVER TAKEN
20220d8: c2 07 bf e4 ld [ %fp + -28 ], %g1
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
20220dc: 3b 3f ff c0 sethi %hi(0xffff0000), %i5
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20220e0: c6 08 60 01 ldub [ %g1 + 1 ], %g3
20220e4: c8 08 40 00 ldub [ %g1 ], %g4
if (links == 0xffff)
20220e8: 84 10 20 01 mov 1, %g2
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20220ec: 89 29 20 08 sll %g4, 8, %g4
20220f0: 88 11 00 03 or %g4, %g3, %g4
if (links == 0xffff)
20220f4: b9 29 20 10 sll %g4, 0x10, %i4
20220f8: 80 a7 00 1d cmp %i4, %i5
20220fc: 02 80 00 05 be 2022110 <rtems_rfs_link+0xdc> <== NEVER TAKEN
2022100: 86 10 20 00 clr %g3
2022104: 84 01 20 01 add %g4, 1, %g2
2022108: 87 28 a0 10 sll %g2, 0x10, %g3
202210c: 87 30 e0 18 srl %g3, 0x18, %g3
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
2022110: c6 28 40 00 stb %g3, [ %g1 ]
2022114: c2 07 bf e4 ld [ %fp + -28 ], %g1
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
2022118: 92 10 20 01 mov 1, %o1
202211c: c4 28 60 01 stb %g2, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2022120: 82 10 20 01 mov 1, %g1
2022124: 90 07 bf b0 add %fp, -80, %o0
2022128: c2 2f bf e8 stb %g1, [ %fp + -24 ]
202212c: 7f ff bd c3 call 2011838 <rtems_rfs_inode_time_stamp_now>
2022130: 94 10 20 01 mov 1, %o2
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
2022134: 92 07 bf b0 add %fp, -80, %o1
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
2022138: a0 10 00 08 mov %o0, %l0
if (rc > 0)
202213c: 80 a4 20 00 cmp %l0, 0
2022140: 04 80 00 28 ble 20221e0 <rtems_rfs_link+0x1ac> <== ALWAYS TAKEN
2022144: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &parent_inode);
2022148: 7f ff bb d8 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
202214c: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2022150: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022154: 7f ff bb d5 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2022158: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
202215c: 81 c7 e0 08 ret
2022160: 91 e8 00 10 restore %g0, %l0, %o0
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
2022164: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022168: 7f ff bb d0 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
202216c: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2022170: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022174: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2022178: 7f ff bb cc call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
202217c: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
2022180: 81 c7 e0 08 ret <== NOT EXECUTED
2022184: 81 e8 00 00 restore <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
2022188: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
202218c: 40 00 0e f1 call 2025d50 <printf> <== NOT EXECUTED
2022190: 90 12 22 80 or %o0, 0x280, %o0 ! 2038280 <CSWTCH.1+0x1394><== NOT EXECUTED
for (c = 0; c < length; c++)
2022194: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2022198: 04 80 00 08 ble 20221b8 <rtems_rfs_link+0x184> <== NOT EXECUTED
202219c: a0 10 20 00 clr %l0 <== NOT EXECUTED
printf ("%c", name[c]);
20221a0: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
20221a4: 40 00 0e fe call 2025d9c <putchar> <== NOT EXECUTED
20221a8: a0 04 20 01 inc %l0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
for (c = 0; c < length; c++)
20221ac: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED
20221b0: 32 bf ff fd bne,a 20221a4 <rtems_rfs_link+0x170> <== NOT EXECUTED
20221b4: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
20221b8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
20221bc: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
20221c0: 40 00 0e e4 call 2025d50 <printf> <== NOT EXECUTED
20221c4: 90 12 22 a8 or %o0, 0x2a8, %o0 ! 20382a8 <CSWTCH.1+0x13bc><== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
20221c8: 10 bf ff a3 b 2022054 <rtems_rfs_link+0x20> <== NOT EXECUTED
20221cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
{
rtems_rfs_inode_close (fs, &target_inode);
20221d0: 7f ff bb b6 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20221d4: a0 10 20 86 mov 0x86, %l0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
20221d8: 81 c7 e0 08 ret <== NOT EXECUTED
20221dc: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
20221e0: 7f ff bb b2 call 20110a8 <rtems_rfs_inode_close>
20221e4: 01 00 00 00 nop
if (rc > 0)
{
rtems_rfs_inode_close (fs, &target_inode);
20221e8: 92 07 bf d8 add %fp, -40, %o1
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
20221ec: a0 10 00 08 mov %o0, %l0
if (rc > 0)
20221f0: 80 a4 20 00 cmp %l0, 0
20221f4: 14 bf ff e1 bg 2022178 <rtems_rfs_link+0x144> <== NEVER TAKEN
20221f8: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
20221fc: 7f ff bb ab call 20110a8 <rtems_rfs_inode_close>
2022200: 01 00 00 00 nop
return rc;
2022204: 10 bf ff d6 b 202215c <rtems_rfs_link+0x128>
2022208: a0 10 00 08 mov %o0, %l0
02022aa8 <rtems_rfs_mutex_create>:
RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
2022aa8: 9d e3 bf a0 save %sp, -96, %sp
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
2022aac: 92 10 20 01 mov 1, %o1
2022ab0: 98 10 00 18 mov %i0, %o4
2022ab4: 11 14 91 94 sethi %hi(0x52465000), %o0
2022ab8: 94 10 20 24 mov 0x24, %o2
2022abc: 90 12 23 6d or %o0, 0x36d, %o0
2022ac0: 96 10 20 00 clr %o3
2022ac4: 7f ff a1 44 call 200afd4 <rtems_semaphore_create>
2022ac8: b0 10 20 00 clr %i0
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
2022acc: 80 a2 20 00 cmp %o0, 0
2022ad0: 02 80 00 0f be 2022b0c <rtems_rfs_mutex_create+0x64> <== ALWAYS TAKEN
2022ad4: ba 10 00 08 mov %o0, %i5
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022ad8: 90 10 20 00 clr %o0 <== NOT EXECUTED
2022adc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2022ae0: 7f ff c5 d7 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022ae4: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2022ae8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022aec: 02 80 00 08 be 2022b0c <rtems_rfs_mutex_create+0x64> <== NOT EXECUTED
2022af0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
2022af4: 7f ff 8d 90 call 2006134 <rtems_status_text> <== NOT EXECUTED
2022af8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022afc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2022b00: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
2022b04: 40 00 0c 93 call 2025d50 <printf> <== NOT EXECUTED
2022b08: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20384d8 <CSWTCH.1+0x15ec> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
2022b0c: 81 c7 e0 08 ret
2022b10: 81 e8 00 00 restore
02022b14 <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
2022b14: 9d e3 bf a0 save %sp, -96, %sp
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
2022b18: d0 06 00 00 ld [ %i0 ], %o0
2022b1c: 7f ff a1 9e call 200b194 <rtems_semaphore_delete>
2022b20: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2022b24: ba 92 20 00 orcc %o0, 0, %i5
2022b28: 02 80 00 0e be 2022b60 <rtems_rfs_mutex_destroy+0x4c> <== ALWAYS TAKEN
2022b2c: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022b30: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2022b34: 7f ff c5 c2 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022b38: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2022b3c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022b40: 02 80 00 08 be 2022b60 <rtems_rfs_mutex_destroy+0x4c> <== NOT EXECUTED
2022b44: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
2022b48: 7f ff 8d 7b call 2006134 <rtems_status_text> <== NOT EXECUTED
2022b4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022b50: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2022b54: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
2022b58: 40 00 0c 7e call 2025d50 <printf> <== NOT EXECUTED
2022b5c: 90 12 21 00 or %o0, 0x100, %o0 ! 2038500 <CSWTCH.1+0x1614><== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
2022b60: 81 c7 e0 08 ret
2022b64: 81 e8 00 00 restore
02012f6c <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
2012f6c: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012f70: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012f74: f8 06 00 00 ld [ %i0 ], %i4
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012f78: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012f7c: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2012f80: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2012f84: 94 10 20 00 clr %o2
2012f88: 7f ff e0 ba call 200b270 <rtems_semaphore_obtain>
2012f8c: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2012f90: b6 92 20 00 orcc %o0, 0, %i3
2012f94: 12 80 00 17 bne 2012ff0 <rtems_rfs_rtems_chown+0x84> <== NEVER TAKEN
2012f98: 90 10 20 00 clr %o0
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012f9c: 92 10 00 1c mov %i4, %o1
2012fa0: 90 10 00 1d mov %i5, %o0
2012fa4: 94 07 bf d8 add %fp, -40, %o2
2012fa8: 7f ff f7 c9 call 2010ecc <rtems_rfs_inode_open>
2012fac: 96 10 20 01 mov 1, %o3
if (rc > 0)
2012fb0: b8 92 20 00 orcc %o0, 0, %i4
2012fb4: 04 80 00 22 ble 201303c <rtems_rfs_rtems_chown+0xd0> <== ALWAYS TAKEN
2012fb8: 01 00 00 00 nop
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012fbc: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012fc0: 40 00 30 5c call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012fc4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012fc8: 7f ff e0 f4 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2012fcc: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012fd0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012fd4: 12 80 00 48 bne 20130f4 <rtems_rfs_rtems_chown+0x188> <== NOT EXECUTED
2012fd8: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
2012fdc: 40 00 47 f5 call 2024fb0 <__errno> <== NOT EXECUTED
2012fe0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012fe4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012fe8: 81 c7 e0 08 ret <== NOT EXECUTED
2012fec: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012ff0: 40 00 04 93 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012ff4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012ff8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012ffc: 02 bf ff e9 be 2012fa0 <rtems_rfs_rtems_chown+0x34> <== NOT EXECUTED
2013000: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2013004: 7f ff cc 4c call 2006134 <rtems_status_text> <== NOT EXECUTED
2013008: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201300c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013010: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013014: 40 00 4b 4f call 2025d50 <printf> <== NOT EXECUTED
2013018: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
201301c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2013020: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013024: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2013028: 7f ff f7 a9 call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
201302c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
2013030: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2013034: 34 bf ff e3 bg,a 2012fc0 <rtems_rfs_rtems_chown+0x54> <== NOT EXECUTED
2013038: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
201303c: 40 00 18 c3 call 2019348 <geteuid>
2013040: 01 00 00 00 nop
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2013044: c2 07 bf e4 ld [ %fp + -28 ], %g1
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
2013048: 91 2a 20 10 sll %o0, 0x10, %o0
201304c: c4 08 60 06 ldub [ %g1 + 6 ], %g2
2013050: c6 08 60 07 ldub [ %g1 + 7 ], %g3
2013054: 85 28 a0 08 sll %g2, 8, %g2
2013058: 84 10 80 03 or %g2, %g3, %g2
201305c: 85 28 a0 10 sll %g2, 0x10, %g2
2013060: 80 a0 80 08 cmp %g2, %o0
2013064: 02 80 00 05 be 2013078 <rtems_rfs_rtems_chown+0x10c> <== ALWAYS TAKEN
2013068: 89 32 20 10 srl %o0, 0x10, %g4
201306c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
2013070: 12 80 00 3e bne 2013168 <rtems_rfs_rtems_chown+0x1fc> <== NOT EXECUTED
2013074: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
2013078: b5 2e a0 10 sll %i2, 0x10, %i2
201307c: b4 16 80 19 or %i2, %i1, %i2
2013080: 85 36 a0 18 srl %i2, 0x18, %g2
2013084: c4 28 60 04 stb %g2, [ %g1 + 4 ]
2013088: c2 07 bf e4 ld [ %fp + -28 ], %g1
201308c: 85 36 a0 10 srl %i2, 0x10, %g2
2013090: c4 28 60 05 stb %g2, [ %g1 + 5 ]
2013094: c2 07 bf e4 ld [ %fp + -28 ], %g1
2013098: b5 36 a0 08 srl %i2, 8, %i2
201309c: f4 28 60 06 stb %i2, [ %g1 + 6 ]
20130a0: c2 07 bf e4 ld [ %fp + -28 ], %g1
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
20130a4: 90 10 00 1d mov %i5, %o0
20130a8: f2 28 60 07 stb %i1, [ %g1 + 7 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20130ac: 82 10 20 01 mov 1, %g1
20130b0: 92 07 bf d8 add %fp, -40, %o1
20130b4: 7f ff f7 fd call 20110a8 <rtems_rfs_inode_close>
20130b8: c2 2f bf e8 stb %g1, [ %fp + -24 ]
if (rc)
20130bc: b8 92 20 00 orcc %o0, 0, %i4
20130c0: 32 bf ff c0 bne,a 2012fc0 <rtems_rfs_rtems_chown+0x54> <== NEVER TAKEN
20130c4: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20130c8: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
20130cc: 40 00 30 19 call 201f130 <rtems_rfs_buffers_release>
20130d0: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20130d4: d0 07 00 00 ld [ %i4 ], %o0
20130d8: 7f ff e0 b0 call 200b398 <rtems_semaphore_release>
20130dc: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
20130e0: ba 92 20 00 orcc %o0, 0, %i5
20130e4: 12 80 00 14 bne 2013134 <rtems_rfs_rtems_chown+0x1c8> <== NEVER TAKEN
20130e8: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
20130ec: 81 c7 e0 08 ret
20130f0: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20130f4: 40 00 04 52 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20130f8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20130fc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013100: 02 bf ff b7 be 2012fdc <rtems_rfs_rtems_chown+0x70> <== NOT EXECUTED
2013104: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013108: 7f ff cc 0b call 2006134 <rtems_status_text> <== NOT EXECUTED
201310c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013110: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013114: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013118: 40 00 4b 0e call 2025d50 <printf> <== NOT EXECUTED
201311c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
2013120: 40 00 47 a4 call 2024fb0 <__errno> <== NOT EXECUTED
2013124: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013128: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
201312c: 81 c7 e0 08 ret <== NOT EXECUTED
2013130: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013134: 40 00 04 42 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013138: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201313c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013140: 02 80 00 18 be 20131a0 <rtems_rfs_rtems_chown+0x234> <== NOT EXECUTED
2013144: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013148: 7f ff cb fb call 2006134 <rtems_status_text> <== NOT EXECUTED
201314c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013150: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013154: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013158: 40 00 4a fe call 2025d50 <printf> <== NOT EXECUTED
201315c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2013160: 81 c7 e0 08 ret <== NOT EXECUTED
2013164: 81 e8 00 00 restore <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
2013168: 7f ff f7 d0 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
201316c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013170: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2013174: 40 00 2f ef call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013178: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201317c: 7f ff e0 87 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2013180: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013184: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013188: 12 80 00 08 bne 20131a8 <rtems_rfs_rtems_chown+0x23c> <== NOT EXECUTED
201318c: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: not able", EPERM);
2013190: 40 00 47 88 call 2024fb0 <__errno> <== NOT EXECUTED
2013194: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013198: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201319c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20131a0: 81 c7 e0 08 ret <== NOT EXECUTED
20131a4: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20131a8: 40 00 04 25 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20131ac: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20131b0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20131b4: 02 bf ff f7 be 2013190 <rtems_rfs_rtems_chown+0x224> <== NOT EXECUTED
20131b8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20131bc: 7f ff cb de call 2006134 <rtems_status_text> <== NOT EXECUTED
20131c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20131c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20131c8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20131cc: 40 00 4a e1 call 2025d50 <printf> <== NOT EXECUTED
20131d0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20131d4: 30 bf ff ef b,a 2013190 <rtems_rfs_rtems_chown+0x224> <== NOT EXECUTED
02022c6c <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
2022c6c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
2022c70: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2022c74: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
2022c78: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
2022c7c: f0 27 bf f4 st %i0, [ %fp + -12 ] <== NOT EXECUTED
args.flags = 0;
2022c80: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
2022c84: 40 00 06 d6 call 20247dc <rtems_io_close> <== NOT EXECUTED
2022c88: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
return rtems_deviceio_errno (status);
2022c8c: 40 00 04 62 call 2023e14 <rtems_deviceio_errno> <== NOT EXECUTED
2022c90: 01 00 00 00 nop <== NOT EXECUTED
}
2022c94: 81 c7 e0 08 ret <== NOT EXECUTED
2022c98: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02022b74 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
return 0;
}
2022b74: 81 c3 e0 08 retl <== NOT EXECUTED
2022b78: 90 10 20 00 clr %o0 <== NOT EXECUTED
02022b7c <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
2022b7c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2022b80: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2022b84: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
args.iop = iop;
args.command = command;
2022b88: f0 3f bf f0 std %i0, [ %fp + -16 ] <== NOT EXECUTED
args.buffer = buffer;
2022b8c: f4 27 bf f8 st %i2, [ %fp + -8 ] <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
2022b90: 40 00 07 2c call 2024840 <rtems_io_control> <== NOT EXECUTED
2022b94: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
if (status)
2022b98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2022b9c: 12 80 00 04 bne 2022bac <rtems_rfs_rtems_device_ioctl+0x30><== NOT EXECUTED
2022ba0: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
}
2022ba4: 81 c7 e0 08 ret <== NOT EXECUTED
2022ba8: 81 e8 00 00 restore <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2022bac: 40 00 04 9a call 2023e14 <rtems_deviceio_errno> <== NOT EXECUTED
2022bb0: 01 00 00 00 nop <== NOT EXECUTED
return args.ioctl_return;
}
2022bb4: 81 c7 e0 08 ret <== NOT EXECUTED
2022bb8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02022b68 <rtems_rfs_rtems_device_lseek>:
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
return offset;
}
2022b68: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2022b6c: 81 c3 e0 08 retl <== NOT EXECUTED
2022b70: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
02022c9c <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
2022c9c: 9d e3 bf 68 save %sp, -152, %sp <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2022ca0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
2022ca4: f8 06 20 1c ld [ %i0 + 0x1c ], %i4 <== NOT EXECUTED
const char *pathname,
uint32_t flag,
uint32_t mode)
{
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2022ca8: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2022cac: 92 10 20 00 clr %o1 <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_filesystem_default_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2022cb0: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2022cb4: 94 10 20 00 clr %o2 <== NOT EXECUTED
2022cb8: 7f ff a1 6e call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
2022cbc: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022cc0: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2022cc4: 12 80 00 27 bne 2022d60 <rtems_rfs_rtems_device_open+0xc4><== NOT EXECUTED
2022cc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2022ccc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2022cd0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022cd4: 94 07 bf cc add %fp, -52, %o2 <== NOT EXECUTED
2022cd8: 7f ff b8 7d call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
2022cdc: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
2022ce0: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2022ce4: 04 80 00 2c ble 2022d94 <rtems_rfs_rtems_device_open+0xf8><== NOT EXECUTED
2022ce8: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2022cec: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2022cf0: 7f ff f1 10 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2022cf4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2022cf8: 7f ff a1 a8 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2022cfc: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022d00: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2022d04: 12 80 00 07 bne 2022d20 <rtems_rfs_rtems_device_open+0x84><== NOT EXECUTED
2022d08: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
2022d0c: 40 00 08 a9 call 2024fb0 <__errno> <== NOT EXECUTED
2022d10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2022d14: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2022d18: 81 c7 e0 08 ret <== NOT EXECUTED
2022d1c: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022d20: 7f ff c5 47 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022d24: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2022d28: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022d2c: 02 bf ff f8 be 2022d0c <rtems_rfs_rtems_device_open+0x70> <== NOT EXECUTED
2022d30: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2022d34: 7f ff 8d 00 call 2006134 <rtems_status_text> <== NOT EXECUTED
2022d38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022d3c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2022d40: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2022d44: 40 00 0c 03 call 2025d50 <printf> <== NOT EXECUTED
2022d48: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2022d4c: 40 00 08 99 call 2024fb0 <__errno> <== NOT EXECUTED
2022d50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2022d54: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2022d58: 81 c7 e0 08 ret <== NOT EXECUTED
2022d5c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022d60: 7f ff c5 37 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022d64: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2022d68: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022d6c: 22 bf ff d9 be,a 2022cd0 <rtems_rfs_rtems_device_open+0x34><== NOT EXECUTED
2022d70: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2022d74: 7f ff 8c f0 call 2006134 <rtems_status_text> <== NOT EXECUTED
2022d78: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2022d7c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2022d80: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2022d84: 40 00 0b f3 call 2025d50 <printf> <== NOT EXECUTED
2022d88: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2022d8c: 10 bf ff d1 b 2022cd0 <rtems_rfs_rtems_device_open+0x34> <== NOT EXECUTED
2022d90: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
2022d94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
2022d98: e0 08 60 1c ldub [ %g1 + 0x1c ], %l0 <== NOT EXECUTED
2022d9c: f2 08 60 1d ldub [ %g1 + 0x1d ], %i1 <== NOT EXECUTED
2022da0: f8 08 60 1e ldub [ %g1 + 0x1e ], %i4 <== NOT EXECUTED
2022da4: f4 08 60 1f ldub [ %g1 + 0x1f ], %i2 <== NOT EXECUTED
2022da8: e8 08 60 20 ldub [ %g1 + 0x20 ], %l4 <== NOT EXECUTED
2022dac: e6 08 60 21 ldub [ %g1 + 0x21 ], %l3 <== NOT EXECUTED
2022db0: e2 08 60 22 ldub [ %g1 + 0x22 ], %l1 <== NOT EXECUTED
2022db4: e4 08 60 23 ldub [ %g1 + 0x23 ], %l2 <== NOT EXECUTED
2022db8: 7f ff b8 bc call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2022dbc: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
if (rc > 0)
2022dc0: aa 92 20 00 orcc %o0, 0, %l5 <== NOT EXECUTED
2022dc4: 24 80 00 0f ble,a 2022e00 <rtems_rfs_rtems_device_open+0x164><== NOT EXECUTED
2022dc8: ea 07 60 7c ld [ %i5 + 0x7c ], %l5 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2022dcc: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2022dd0: 7f ff f0 d8 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2022dd4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2022dd8: 7f ff a1 70 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2022ddc: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022de0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2022de4: 12 80 00 2d bne 2022e98 <rtems_rfs_rtems_device_open+0x1fc><== NOT EXECUTED
2022de8: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
2022dec: 40 00 08 71 call 2024fb0 <__errno> <== NOT EXECUTED
2022df0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2022df4: ea 22 00 00 st %l5, [ %o0 ] <== NOT EXECUTED
2022df8: 81 c7 e0 08 ret <== NOT EXECUTED
2022dfc: 81 e8 00 00 restore <== NOT EXECUTED
2022e00: 7f ff f0 cc call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2022e04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2022e08: 7f ff a1 64 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2022e0c: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022e10: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2022e14: 12 80 00 2d bne 2022ec8 <rtems_rfs_rtems_device_open+0x22c><== NOT EXECUTED
2022e18: 90 10 20 00 clr %o0 <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
2022e1c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
2022e20: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
2022e24: a4 0c a0 ff and %l2, 0xff, %l2 <== NOT EXECUTED
2022e28: 84 0c 60 ff and %l1, 0xff, %g2 <== NOT EXECUTED
2022e2c: a9 2d 20 18 sll %l4, 0x18, %l4 <== NOT EXECUTED
2022e30: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2022e34: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED
2022e38: a7 2c e0 10 sll %l3, 0x10, %l3 <== NOT EXECUTED
2022e3c: a8 15 00 13 or %l4, %l3, %l4 <== NOT EXECUTED
2022e40: a2 15 00 12 or %l4, %l2, %l1 <== NOT EXECUTED
2022e44: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
2022e48: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
2022e4c: e2 26 20 38 st %l1, [ %i0 + 0x38 ] <== NOT EXECUTED
args.iop = iop;
2022e50: f0 27 bf f4 st %i0, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
2022e54: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
2022e58: a1 2c 20 18 sll %l0, 0x18, %l0 <== NOT EXECUTED
2022e5c: b4 0e a0 ff and %i2, 0xff, %i2 <== NOT EXECUTED
args.mode = mode;
2022e60: f6 27 bf fc st %i3, [ %fp + -4 ] <== NOT EXECUTED
2022e64: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED
2022e68: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
2022e6c: b3 2e 60 10 sll %i1, 0x10, %i1 <== NOT EXECUTED
2022e70: b9 2f 20 08 sll %i4, 8, %i4 <== NOT EXECUTED
2022e74: 90 14 00 19 or %l0, %i1, %o0 <== NOT EXECUTED
2022e78: 90 12 00 1a or %o0, %i2, %o0 <== NOT EXECUTED
2022e7c: 90 12 00 1c or %o0, %i4, %o0 <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
2022e80: 40 00 06 89 call 20248a4 <rtems_io_open> <== NOT EXECUTED
2022e84: d0 26 20 34 st %o0, [ %i0 + 0x34 ] <== NOT EXECUTED
return rtems_deviceio_errno (status);
2022e88: 40 00 03 e3 call 2023e14 <rtems_deviceio_errno> <== NOT EXECUTED
2022e8c: 01 00 00 00 nop <== NOT EXECUTED
}
2022e90: 81 c7 e0 08 ret <== NOT EXECUTED
2022e94: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022e98: 7f ff c4 e9 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022e9c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2022ea0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022ea4: 02 bf ff d2 be 2022dec <rtems_rfs_rtems_device_open+0x150><== NOT EXECUTED
2022ea8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2022eac: 7f ff 8c a2 call 2006134 <rtems_status_text> <== NOT EXECUTED
2022eb0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022eb4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2022eb8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2022ebc: 40 00 0b a5 call 2025d50 <printf> <== NOT EXECUTED
2022ec0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2022ec4: 30 bf ff ca b,a 2022dec <rtems_rfs_rtems_device_open+0x150><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022ec8: 7f ff c4 dd call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022ecc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2022ed0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022ed4: 22 bf ff d3 be,a 2022e20 <rtems_rfs_rtems_device_open+0x184><== NOT EXECUTED
2022ed8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2022edc: 7f ff 8c 96 call 2006134 <rtems_status_text> <== NOT EXECUTED
2022ee0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022ee4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2022ee8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2022eec: 40 00 0b 99 call 2025d50 <printf> <== NOT EXECUTED
2022ef0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
2022ef4: 10 bf ff cb b 2022e20 <rtems_rfs_rtems_device_open+0x184> <== NOT EXECUTED
2022ef8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
02022c14 <rtems_rfs_rtems_device_read>:
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
2022c14: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
2022c18: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
2022c1c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2022c20: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2022c24: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
args.iop = iop;
2022c28: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
2022c2c: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = buffer;
2022c30: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
args.count = count;
2022c34: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
2022c38: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
args.bytes_moved = 0;
2022c3c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
2022c40: 40 00 07 32 call 2024908 <rtems_io_read> <== NOT EXECUTED
2022c44: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
if (status)
2022c48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2022c4c: 12 80 00 04 bne 2022c5c <rtems_rfs_rtems_device_read+0x48><== NOT EXECUTED
2022c50: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
2022c54: 81 c7 e0 08 ret <== NOT EXECUTED
2022c58: 81 e8 00 00 restore <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2022c5c: 40 00 04 6e call 2023e14 <rtems_deviceio_errno> <== NOT EXECUTED
2022c60: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
2022c64: 81 c7 e0 08 ret <== NOT EXECUTED
2022c68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02022bbc <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
2022bbc: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
2022bc0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
2022bc4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2022bc8: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2022bcc: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
args.iop = iop;
2022bd0: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
2022bd4: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = (void *) buffer;
2022bd8: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
args.count = count;
2022bdc: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
2022be0: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
args.bytes_moved = 0;
2022be4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
2022be8: 40 00 07 61 call 202496c <rtems_io_write> <== NOT EXECUTED
2022bec: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
if (status)
2022bf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2022bf4: 12 80 00 04 bne 2022c04 <rtems_rfs_rtems_device_write+0x48><== NOT EXECUTED
2022bf8: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
2022bfc: 81 c7 e0 08 ret <== NOT EXECUTED
2022c00: 81 e8 00 00 restore <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2022c04: 40 00 04 84 call 2023e14 <rtems_deviceio_errno> <== NOT EXECUTED
2022c08: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
2022c0c: 81 c7 e0 08 ret <== NOT EXECUTED
2022c10: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02022f04 <rtems_rfs_rtems_dir_lseek>:
*/
static off_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
2022f04: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
switch (whence)
2022f08: 80 a6 e0 01 cmp %i3, 1 <== NOT EXECUTED
2022f0c: 28 80 00 09 bleu,a 2022f30 <rtems_rfs_rtems_dir_lseek+0x2c><== NOT EXECUTED
2022f10: b0 10 20 00 clr %i0 <== NOT EXECUTED
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
2022f14: 40 00 08 27 call 2024fb0 <__errno> <== NOT EXECUTED
2022f18: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
2022f1c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2022f20: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
2022f24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2022f28: 81 c7 e0 08 ret <== NOT EXECUTED
2022f2c: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
break;
}
return 0;
}
2022f30: 81 c7 e0 08 ret <== NOT EXECUTED
2022f34: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
020232c0 <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
20232c0: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
20232c4: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
20232c8: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
20232cc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20232d0: 92 10 20 00 clr %o1
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_dir_rmnod
};
20232d4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
20232d8: 94 10 20 00 clr %o2
20232dc: 7f ff 9f e5 call 200b270 <rtems_semaphore_obtain>
20232e0: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20232e4: b6 92 20 00 orcc %o0, 0, %i3
20232e8: 12 80 00 2d bne 202339c <rtems_rfs_rtems_dir_open+0xdc> <== NEVER TAKEN
20232ec: 90 10 20 00 clr %o0
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20232f0: 92 10 00 1c mov %i4, %o1
20232f4: 90 10 00 1d mov %i5, %o0
20232f8: 94 07 bf d8 add %fp, -40, %o2
20232fc: 7f ff b6 f4 call 2010ecc <rtems_rfs_inode_open>
2023300: 96 10 20 01 mov 1, %o3
if (rc)
2023304: b8 92 20 00 orcc %o0, 0, %i4
2023308: 32 80 00 39 bne,a 20233ec <rtems_rfs_rtems_dir_open+0x12c><== NEVER TAKEN
202330c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2023310: c2 07 bf e4 ld [ %fp + -28 ], %g1
2023314: c4 08 60 02 ldub [ %g1 + 2 ], %g2
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
2023318: 03 00 00 3c sethi %hi(0xf000), %g1
202331c: 85 28 a0 08 sll %g2, 8, %g2
2023320: 84 08 80 01 and %g2, %g1, %g2
2023324: 03 00 00 10 sethi %hi(0x4000), %g1
2023328: 80 a0 80 01 cmp %g2, %g1
202332c: 12 80 00 48 bne 202344c <rtems_rfs_rtems_dir_open+0x18c> <== NEVER TAKEN
2023330: 92 07 bf d8 add %fp, -40, %o1
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
2023334: c0 26 20 10 clr [ %i0 + 0x10 ]
2023338: c0 26 20 14 clr [ %i0 + 0x14 ]
rtems_rfs_inode_close (fs, &inode);
202333c: 7f ff b7 5b call 20110a8 <rtems_rfs_inode_close>
2023340: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023344: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2023348: 7f ff ef 7a call 201f130 <rtems_rfs_buffers_release>
202334c: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023350: d0 07 00 00 ld [ %i4 ], %o0
2023354: 7f ff a0 11 call 200b398 <rtems_semaphore_release>
2023358: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
202335c: ba 92 20 00 orcc %o0, 0, %i5
2023360: 02 80 00 0d be 2023394 <rtems_rfs_rtems_dir_open+0xd4> <== ALWAYS TAKEN
2023364: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023368: 7f ff c3 b5 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202336c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023370: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023374: 02 80 00 44 be 2023484 <rtems_rfs_rtems_dir_open+0x1c4> <== NOT EXECUTED
2023378: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
202337c: 7f ff 8b 6e call 2006134 <rtems_status_text> <== NOT EXECUTED
2023380: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023384: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023388: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
202338c: 40 00 0a 71 call 2025d50 <printf> <== NOT EXECUTED
2023390: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
2023394: 81 c7 e0 08 ret
2023398: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202339c: 7f ff c3 a8 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20233a0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20233a4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20233a8: 02 bf ff d3 be 20232f4 <rtems_rfs_rtems_dir_open+0x34> <== NOT EXECUTED
20233ac: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20233b0: 7f ff 8b 61 call 2006134 <rtems_status_text> <== NOT EXECUTED
20233b4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20233b8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20233bc: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20233c0: 40 00 0a 64 call 2025d50 <printf> <== NOT EXECUTED
20233c4: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20233c8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
20233cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20233d0: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
20233d4: 7f ff b6 be call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
20233d8: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
20233dc: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20233e0: 02 bf ff cd be 2023314 <rtems_rfs_rtems_dir_open+0x54> <== NOT EXECUTED
20233e4: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20233e8: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20233ec: 7f ff ef 51 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
20233f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20233f4: 7f ff 9f e9 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20233f8: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20233fc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023400: 12 80 00 07 bne 202341c <rtems_rfs_rtems_dir_open+0x15c> <== NOT EXECUTED
2023404: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
2023408: 40 00 06 ea call 2024fb0 <__errno> <== NOT EXECUTED
202340c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023410: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2023414: 81 c7 e0 08 ret <== NOT EXECUTED
2023418: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202341c: 7f ff c3 88 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023420: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023424: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023428: 02 bf ff f8 be 2023408 <rtems_rfs_rtems_dir_open+0x148> <== NOT EXECUTED
202342c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023430: 7f ff 8b 41 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023434: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023438: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
202343c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023440: 40 00 0a 44 call 2025d50 <printf> <== NOT EXECUTED
2023444: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2023448: 30 bf ff f0 b,a 2023408 <rtems_rfs_rtems_dir_open+0x148> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
202344c: 7f ff b7 17 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2023450: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023454: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2023458: 7f ff ef 36 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
202345c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023460: 7f ff 9f ce call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023464: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023468: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
202346c: 12 80 00 08 bne 202348c <rtems_rfs_rtems_dir_open+0x1cc> <== NOT EXECUTED
2023470: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
2023474: 40 00 06 cf call 2024fb0 <__errno> <== NOT EXECUTED
2023478: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202347c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2023480: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2023484: 81 c7 e0 08 ret <== NOT EXECUTED
2023488: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202348c: 7f ff c3 6c call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023490: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023494: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023498: 02 bf ff f7 be 2023474 <rtems_rfs_rtems_dir_open+0x1b4> <== NOT EXECUTED
202349c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20234a0: 7f ff 8b 25 call 2006134 <rtems_status_text> <== NOT EXECUTED
20234a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20234a8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20234ac: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20234b0: 40 00 0a 28 call 2025d50 <printf> <== NOT EXECUTED
20234b4: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20234b8: 30 bf ff ef b,a 2023474 <rtems_rfs_rtems_dir_open+0x1b4> <== NOT EXECUTED
020230a8 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
20230a8: 9d e3 bf 70 save %sp, -144, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
20230ac: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
20230b0: f6 06 20 1c ld [ %i0 + 0x1c ], %i3 <== NOT EXECUTED
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
20230b4: f8 00 60 34 ld [ %g1 + 0x34 ], %i4 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
20230b8: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_dir_rmnod
};
20230bc: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20230c0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20230c4: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
20230c8: 7f ff a0 6a call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
20230cc: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20230d0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20230d4: 12 80 00 40 bne 20231d4 <rtems_rfs_rtems_dir_read+0x12c> <== NOT EXECUTED
20230d8: 90 10 20 00 clr %o0 <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20230dc: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20230e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20230e4: 94 07 bf d4 add %fp, -44, %o2 <== NOT EXECUTED
20230e8: 7f ff b7 79 call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
20230ec: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
20230f0: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
20230f4: 32 80 00 4c bne,a 2023224 <rtems_rfs_rtems_dir_read+0x17c><== NOT EXECUTED
20230f8: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
20230fc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2023100: 92 10 21 18 mov 0x118, %o1 <== NOT EXECUTED
2023104: 40 00 3c 75 call 20322d8 <.udiv> <== NOT EXECUTED
2023108: b0 10 20 00 clr %i0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
202310c: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2023110: 02 80 00 1a be 2023178 <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
2023114: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
2023118: d4 1f 60 10 ldd [ %i5 + 0x10 ], %o2 <== NOT EXECUTED
* exisiting file, the remaining entries will be placed in the buffer and the
* returned value will be equal to -m actual- times the size of a directory
* entry.
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
202311c: b6 10 20 00 clr %i3 <== NOT EXECUTED
2023120: 10 80 00 0d b 2023154 <rtems_rfs_rtems_dir_read+0xac> <== NOT EXECUTED
2023124: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (rc == ENOENT)
{
rc = 0;
break;
}
if (rc > 0)
2023128: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202312c: 14 80 00 4a bg 2023254 <rtems_rfs_rtems_dir_read+0x1ac> <== NOT EXECUTED
2023130: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
2023134: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
2023138: b6 06 e0 01 inc %i3 <== NOT EXECUTED
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
202313c: 96 80 c0 0a addcc %g3, %o2, %o3 <== NOT EXECUTED
2023140: 94 40 a0 00 addx %g2, 0, %o2 <== NOT EXECUTED
2023144: d4 3f 60 10 std %o2, [ %i5 + 0x10 ] <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
2023148: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
202314c: 02 80 00 0a be 2023174 <rtems_rfs_rtems_dir_read+0xcc> <== NOT EXECUTED
2023150: b0 06 21 18 add %i0, 0x118, %i0 <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
2023154: 98 06 40 18 add %i1, %i0, %o4 <== NOT EXECUTED
2023158: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
202315c: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
2023160: 7f ff f3 d5 call 20200b4 <rtems_rfs_dir_read> <== NOT EXECUTED
2023164: 9a 07 bf fc add %fp, -4, %o5 <== NOT EXECUTED
if (rc == ENOENT)
2023168: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED
202316c: 12 bf ff ef bne 2023128 <rtems_rfs_rtems_dir_read+0x80> <== NOT EXECUTED
2023170: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2023174: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
2023178: 7f ff b7 cc call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
202317c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023180: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2023184: 7f ff ef eb call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2023188: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
202318c: 7f ff a0 83 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023190: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023194: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023198: 02 80 00 0d be 20231cc <rtems_rfs_rtems_dir_read+0x124> <== NOT EXECUTED
202319c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20231a0: 7f ff c4 27 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20231a4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20231a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20231ac: 02 80 00 28 be 202324c <rtems_rfs_rtems_dir_read+0x1a4> <== NOT EXECUTED
20231b0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20231b4: 7f ff 8b e0 call 2006134 <rtems_status_text> <== NOT EXECUTED
20231b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20231bc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20231c0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20231c4: 40 00 0a e3 call 2025d50 <printf> <== NOT EXECUTED
20231c8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
20231cc: 81 c7 e0 08 ret <== NOT EXECUTED
20231d0: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20231d4: 7f ff c4 1a call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20231d8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20231dc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20231e0: 02 bf ff c0 be 20230e0 <rtems_rfs_rtems_dir_read+0x38> <== NOT EXECUTED
20231e4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20231e8: 7f ff 8b d3 call 2006134 <rtems_status_text> <== NOT EXECUTED
20231ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20231f0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20231f4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20231f8: 40 00 0a d6 call 2025d50 <printf> <== NOT EXECUTED
20231fc: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2023200: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2023204: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2023208: 94 07 bf d4 add %fp, -44, %o2 <== NOT EXECUTED
202320c: 7f ff b7 30 call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
2023210: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2023214: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2023218: 02 bf ff ba be 2023100 <rtems_rfs_rtems_dir_read+0x58> <== NOT EXECUTED
202321c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023220: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2023224: 7f ff ef c3 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2023228: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
202322c: 7f ff a0 5b call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023230: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023234: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023238: 12 80 00 16 bne 2023290 <rtems_rfs_rtems_dir_read+0x1e8> <== NOT EXECUTED
202323c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
2023240: 40 00 07 5c call 2024fb0 <__errno> <== NOT EXECUTED
2023244: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023248: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
202324c: 81 c7 e0 08 ret <== NOT EXECUTED
2023250: 81 e8 00 00 restore <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
2023254: 40 00 07 57 call 2024fb0 <__errno> <== NOT EXECUTED
2023258: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
202325c: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
2023260: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2023264: 7f ff b7 91 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2023268: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
202326c: fa 07 20 7c ld [ %i4 + 0x7c ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2023270: 7f ff ef b0 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2023274: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023278: 7f ff a0 48 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
202327c: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023280: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023284: 02 bf ff d2 be 20231cc <rtems_rfs_rtems_dir_read+0x124> <== NOT EXECUTED
2023288: 90 10 20 00 clr %o0 <== NOT EXECUTED
202328c: 30 bf ff c5 b,a 20231a0 <rtems_rfs_rtems_dir_read+0xf8> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023290: 7f ff c3 eb call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023294: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023298: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
202329c: 02 bf ff e9 be 2023240 <rtems_rfs_rtems_dir_read+0x198> <== NOT EXECUTED
20232a0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20232a4: 7f ff 8b a4 call 2006134 <rtems_status_text> <== NOT EXECUTED
20232a8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20232ac: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20232b0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20232b4: 40 00 0a a7 call 2025d50 <printf> <== NOT EXECUTED
20232b8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20232bc: 30 bf ff e1 b,a 2023240 <rtems_rfs_rtems_dir_read+0x198> <== NOT EXECUTED
02022f38 <rtems_rfs_rtems_dir_rmnod>:
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
2022f38: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2022f3c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2022f40: f8 06 40 00 ld [ %i1 ], %i4 <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2022f44: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
2022f48: f4 06 00 00 ld [ %i0 ], %i2 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
2022f4c: 80 a7 20 01 cmp %i4, 1 <== NOT EXECUTED
2022f50: 02 80 00 50 be 2023090 <rtems_rfs_rtems_dir_rmnod+0x158> <== NOT EXECUTED
2022f54: f6 06 60 04 ld [ %i1 + 4 ], %i3 <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_dir_rmnod
};
2022f58: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2022f5c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2022f60: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
2022f64: 7f ff a0 c3 call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
2022f68: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022f6c: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED
2022f70: 12 80 00 22 bne 2022ff8 <rtems_rfs_rtems_dir_rmnod+0xc0> <== NOT EXECUTED
2022f74: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
2022f78: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2022f7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022f80: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2022f84: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
2022f88: 7f ff fc a1 call 202220c <rtems_rfs_unlink> <== NOT EXECUTED
2022f8c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
if (rc)
2022f90: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2022f94: 22 80 00 0f be,a 2022fd0 <rtems_rfs_rtems_dir_rmnod+0x98><== NOT EXECUTED
2022f98: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2022f9c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2022fa0: 7f ff f0 64 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2022fa4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2022fa8: 7f ff a0 fc call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2022fac: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022fb0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2022fb4: 12 80 00 2b bne 2023060 <rtems_rfs_rtems_dir_rmnod+0x128> <== NOT EXECUTED
2022fb8: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
2022fbc: 40 00 07 fd call 2024fb0 <__errno> <== NOT EXECUTED
2022fc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2022fc4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2022fc8: 81 c7 e0 08 ret <== NOT EXECUTED
2022fcc: 81 e8 00 00 restore <== NOT EXECUTED
2022fd0: 7f ff f0 58 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2022fd4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2022fd8: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2022fdc: 7f ff a0 ef call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2022fe0: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2022fe4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2022fe8: 12 80 00 11 bne 202302c <rtems_rfs_rtems_dir_rmnod+0xf4> <== NOT EXECUTED
2022fec: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2022ff0: 81 c7 e0 08 ret <== NOT EXECUTED
2022ff4: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2022ff8: 7f ff c4 91 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022ffc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023000: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023004: 22 bf ff de be,a 2022f7c <rtems_rfs_rtems_dir_rmnod+0x44><== NOT EXECUTED
2023008: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
202300c: 7f ff 8c 4a call 2006134 <rtems_status_text> <== NOT EXECUTED
2023010: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2023014: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023018: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
202301c: 40 00 0b 4d call 2025d50 <printf> <== NOT EXECUTED
2023020: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
2023024: 10 bf ff d6 b 2022f7c <rtems_rfs_rtems_dir_rmnod+0x44> <== NOT EXECUTED
2023028: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
202302c: 7f ff c4 84 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023030: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023034: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023038: 02 80 00 1a be 20230a0 <rtems_rfs_rtems_dir_rmnod+0x168> <== NOT EXECUTED
202303c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023040: 7f ff 8c 3d call 2006134 <rtems_status_text> <== NOT EXECUTED
2023044: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023048: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
202304c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023050: 40 00 0b 40 call 2025d50 <printf> <== NOT EXECUTED
2023054: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2023058: 81 c7 e0 08 ret <== NOT EXECUTED
202305c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023060: 7f ff c4 77 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023064: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023068: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
202306c: 02 bf ff d4 be 2022fbc <rtems_rfs_rtems_dir_rmnod+0x84> <== NOT EXECUTED
2023070: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023074: 7f ff 8c 30 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023078: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
202307c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023080: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023084: 40 00 0b 33 call 2025d50 <printf> <== NOT EXECUTED
2023088: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
202308c: 30 bf ff cc b,a 2022fbc <rtems_rfs_rtems_dir_rmnod+0x84> <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
2023090: 40 00 07 c8 call 2024fb0 <__errno> <== NOT EXECUTED
2023094: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023098: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED
202309c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20230a0: 81 c7 e0 08 ret <== NOT EXECUTED
20230a4: 81 e8 00 00 restore <== NOT EXECUTED
020131d8 <rtems_rfs_rtems_eval_for_make>:
*/
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
20131d8: 9d e3 bf 68 save %sp, -152, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20131dc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20131e0: c2 06 40 00 ld [ %i1 ], %g1
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20131e4: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20131e8: c2 27 bf f4 st %g1, [ %fp + -12 ]
rtems_rfs_ino node_ino;
uint32_t doff = 0;
20131ec: c0 27 bf fc clr [ %fp + -4 ]
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
20131f0: 40 00 4e 86 call 2026c08 <strlen>
20131f4: 90 10 00 18 mov %i0, %o0
20131f8: 90 06 00 08 add %i0, %o0, %o0
20131fc: d0 26 80 00 st %o0, [ %i2 ]
while (*name != path)
2013200: 80 a6 00 08 cmp %i0, %o0
2013204: 02 80 00 0b be 2013230 <rtems_rfs_rtems_eval_for_make+0x58>
2013208: 82 02 3f ff add %o0, -1, %g1
{
(*name)--;
201320c: c2 26 80 00 st %g1, [ %i2 ]
if (rtems_filesystem_is_separator (**name))
2013210: 7f ff d3 df call 200818c <rtems_filesystem_is_separator>
2013214: d0 4a 3f ff ldsb [ %o0 + -1 ], %o0
2013218: 80 a2 20 00 cmp %o0, 0
201321c: 22 bf ff f9 be,a 2013200 <rtems_rfs_rtems_eval_for_make+0x28>
2013220: d0 06 80 00 ld [ %i2 ], %o0
{
(*name)++;
2013224: c2 06 80 00 ld [ %i2 ], %g1
2013228: 82 00 60 01 inc %g1
201322c: c2 26 80 00 st %g1, [ %i2 ]
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
2013230: 40 00 4e 76 call 2026c08 <strlen>
2013234: 90 10 00 18 mov %i0, %o0
2013238: 92 10 00 08 mov %o0, %o1
201323c: 7f ff cc 4a call 2006364 <rtems_filesystem_prefix_separators>
2013240: 90 10 00 18 mov %i0, %o0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2013244: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
path += stripped;
2013248: a2 06 00 08 add %i0, %o0, %l1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
201324c: d0 00 40 00 ld [ %g1 ], %o0
2013250: 92 10 20 00 clr %o1
2013254: 7f ff e0 07 call 200b270 <rtems_semaphore_obtain>
2013258: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
201325c: b8 92 20 00 orcc %o0, 0, %i4
2013260: 12 80 00 b8 bne 2013540 <rtems_rfs_rtems_eval_for_make+0x368><== NEVER TAKEN
2013264: 90 10 20 00 clr %o0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013268: 21 00 80 d1 sethi %hi(0x2034400), %l0
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
201326c: 31 00 00 3c sethi %hi(0xf000), %i0
2013270: 37 00 00 10 sethi %hi(0x4000), %i3
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013274: a0 14 23 48 or %l0, 0x348, %l0
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2013278: d2 07 bf f4 ld [ %fp + -12 ], %o1
201327c: 90 10 00 1d mov %i5, %o0
2013280: 94 07 bf cc add %fp, -52, %o2
2013284: 7f ff f7 12 call 2010ecc <rtems_rfs_inode_open>
2013288: 96 10 20 01 mov 1, %o3
if (rc > 0)
201328c: b8 92 20 00 orcc %o0, 0, %i4
2013290: 14 80 00 6b bg 201343c <rtems_rfs_rtems_eval_for_make+0x264><== NEVER TAKEN
2013294: c2 07 bf d8 ld [ %fp + -40 ], %g1
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
2013298: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
201329c: c6 08 60 02 ldub [ %g1 + 2 ], %g3
20132a0: 83 28 e0 08 sll %g3, 8, %g1
20132a4: 82 10 80 01 or %g2, %g1, %g1
20132a8: 82 08 40 18 and %g1, %i0, %g1
20132ac: 80 a0 40 1b cmp %g1, %i3
20132b0: 02 80 00 70 be 2013470 <rtems_rfs_rtems_eval_for_make+0x298>
20132b4: 90 07 bf cc add %fp, -52, %o0
}
/*
* Is this the end of the pathname we were given ?
*/
if (path == *name)
20132b8: c2 06 80 00 ld [ %i2 ], %g1
20132bc: 80 a0 40 11 cmp %g1, %l1
20132c0: 02 80 00 3f be 20133bc <rtems_rfs_rtems_eval_for_make+0x1e4>
20132c4: c2 07 bf d8 ld [ %fp + -40 ], %g1
20132c8: b8 10 00 11 mov %l1, %i4
20132cc: 10 80 00 0c b 20132fc <rtems_rfs_rtems_eval_for_make+0x124>
20132d0: a4 10 20 00 clr %l2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
20132d4: 80 a0 60 00 cmp %g1, 0
20132d8: 02 80 00 0e be 2013310 <rtems_rfs_rtems_eval_for_make+0x138><== NEVER TAKEN
20132dc: 01 00 00 00 nop
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
20132e0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
20132e4: 82 00 7f ff add %g1, -1, %g1
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
(*path != '\0') &&
20132e8: 80 a4 80 01 cmp %l2, %g1
20132ec: 1a 80 00 09 bcc 2013310 <rtems_rfs_rtems_eval_for_make+0x138><== NEVER TAKEN
20132f0: 01 00 00 00 nop
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
{
node_len++;
20132f4: a4 04 a0 01 inc %l2
path++;
20132f8: b8 07 20 01 inc %i4
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
20132fc: 7f ff d3 a4 call 200818c <rtems_filesystem_is_separator>
2013300: d0 4f 00 00 ldsb [ %i4 ], %o0
2013304: 80 a2 20 00 cmp %o0, 0
2013308: 22 bf ff f3 be,a 20132d4 <rtems_rfs_rtems_eval_for_make+0xfc>
201330c: c2 4f 00 00 ldsb [ %i4 ], %g1
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
2013310: 40 00 4e 3e call 2026c08 <strlen>
2013314: 90 10 00 1c mov %i4, %o0
2013318: 92 10 00 08 mov %o0, %o1
201331c: 7f ff cc 12 call 2006364 <rtems_filesystem_prefix_separators>
2013320: 90 10 00 1c mov %i4, %o0
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013324: c2 4c 40 00 ldsb [ %l1 ], %g1
2013328: 80 a0 60 2e cmp %g1, 0x2e
201332c: 02 80 00 1b be 2013398 <rtems_rfs_rtems_eval_for_make+0x1c0><== NEVER TAKEN
2013330: b8 07 00 08 add %i4, %o0, %i4
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
2013334: c2 4f 00 00 ldsb [ %i4 ], %g1
2013338: 80 a0 60 2e cmp %g1, 0x2e
201333c: 12 80 00 07 bne 2013358 <rtems_rfs_rtems_eval_for_make+0x180><== ALWAYS TAKEN
2013340: 90 10 00 1d mov %i5, %o0
2013344: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1 <== NOT EXECUTED
2013348: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED
201334c: 22 80 00 6b be,a 20134f8 <rtems_rfs_rtems_eval_for_make+0x320><== NOT EXECUTED
2013350: d0 4f 20 02 ldsb [ %i4 + 2 ], %o0 <== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013354: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013358: 92 07 bf cc add %fp, -52, %o1
201335c: 94 10 00 11 mov %l1, %o2
2013360: 96 10 00 12 mov %l2, %o3
2013364: 98 07 bf f4 add %fp, -12, %o4
2013368: 40 00 2f d3 call 201f2b4 <rtems_rfs_dir_lookup_ino>
201336c: 9a 07 bf fc add %fp, -4, %o5
node, node_len - stripped, &ino, &doff);
if (rc > 0)
2013370: a2 92 20 00 orcc %o0, 0, %l1
2013374: 14 80 00 af bg 2013630 <rtems_rfs_rtems_eval_for_make+0x458>
2013378: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%" PRId32 "\n",
node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
201337c: 7f ff f7 4b call 20110a8 <rtems_rfs_inode_close>
2013380: 92 07 bf cc add %fp, -52, %o1
if (rc > 0)
2013384: a2 92 20 00 orcc %o0, 0, %l1
2013388: 34 80 00 ae bg,a 2013640 <rtems_rfs_rtems_eval_for_make+0x468><== NEVER TAKEN
201338c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
path += stripped;
2013390: 10 bf ff ba b 2013278 <rtems_rfs_rtems_eval_for_make+0xa0>
2013394: a2 10 00 1c mov %i4, %l1
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013398: d0 4c 60 01 ldsb [ %l1 + 1 ], %o0 <== NOT EXECUTED
201339c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20133a0: 12 80 00 75 bne 2013574 <rtems_rfs_rtems_eval_for_make+0x39c><== NOT EXECUTED
20133a4: 01 00 00 00 nop <== NOT EXECUTED
{
if (*path)
20133a8: c2 4f 00 00 ldsb [ %i4 ], %g1 <== NOT EXECUTED
20133ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20133b0: 12 80 00 7a bne 2013598 <rtems_rfs_rtems_eval_for_make+0x3c0><== NOT EXECUTED
20133b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20133b8: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
20133bc: c4 08 60 02 ldub [ %g1 + 2 ], %g2
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
20133c0: 03 00 00 3c sethi %hi(0xf000), %g1
20133c4: 85 28 a0 08 sll %g2, 8, %g2
20133c8: 84 08 80 01 and %g2, %g1, %g2
20133cc: 03 00 00 10 sethi %hi(0x4000), %g1
20133d0: 80 a0 80 01 cmp %g2, %g1
20133d4: 12 80 00 ae bne 201368c <rtems_rfs_rtems_eval_for_make+0x4b4>
20133d8: 90 07 bf cc add %fp, -52, %o0
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
20133dc: 40 00 03 23 call 2014068 <rtems_rfs_rtems_eval_perms>
20133e0: 92 10 20 03 mov 3, %o1
20133e4: 80 8a 20 ff btst 0xff, %o0
20133e8: 02 80 00 28 be 2013488 <rtems_rfs_rtems_eval_for_make+0x2b0><== NEVER TAKEN
20133ec: 92 07 bf cc add %fp, -52, %o1
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
20133f0: f8 06 80 00 ld [ %i2 ], %i4
20133f4: 40 00 4e 05 call 2026c08 <strlen>
20133f8: 90 10 00 1c mov %i4, %o0
20133fc: 92 07 bf cc add %fp, -52, %o1
2013400: 96 10 00 08 mov %o0, %o3
2013404: 94 10 00 1c mov %i4, %o2
2013408: 90 10 00 1d mov %i5, %o0
201340c: 98 07 bf f8 add %fp, -8, %o4
2013410: 40 00 2f a9 call 201f2b4 <rtems_rfs_dir_lookup_ino>
2013414: 9a 07 bf fc add %fp, -4, %o5
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
2013418: 92 07 bf cc add %fp, -52, %o1
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
201341c: 80 a2 20 00 cmp %o0, 0
2013420: 02 80 00 fe be 2013818 <rtems_rfs_rtems_eval_for_make+0x640>
2013424: b8 10 00 08 mov %o0, %i4
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
}
if (rc != ENOENT)
2013428: 80 a2 20 02 cmp %o0, 2
201342c: 02 80 00 60 be 20135ac <rtems_rfs_rtems_eval_for_make+0x3d4>
2013430: c2 07 bf f4 ld [ %fp + -12 ], %g1
{
rtems_rfs_inode_close (fs, &inode);
2013434: 7f ff f7 1d call 20110a8 <rtems_rfs_inode_close>
2013438: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201343c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3
rtems_rfs_buffers_release (fs);
2013440: 40 00 2f 3c call 201f130 <rtems_rfs_buffers_release>
2013444: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013448: 7f ff df d4 call 200b398 <rtems_semaphore_release>
201344c: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013450: ba 92 20 00 orcc %o0, 0, %i5
2013454: 12 80 00 1d bne 20134c8 <rtems_rfs_rtems_eval_for_make+0x2f0><== NEVER TAKEN
2013458: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
201345c: 40 00 46 d5 call 2024fb0 <__errno>
2013460: b0 10 3f ff mov -1, %i0
2013464: f8 22 00 00 st %i4, [ %o0 ]
2013468: 81 c7 e0 08 ret
201346c: 81 e8 00 00 restore
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
2013470: 40 00 02 fe call 2014068 <rtems_rfs_rtems_eval_perms>
2013474: 92 10 20 01 mov 1, %o1
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
2013478: 80 8a 20 ff btst 0xff, %o0
201347c: 32 bf ff 90 bne,a 20132bc <rtems_rfs_rtems_eval_for_make+0xe4><== ALWAYS TAKEN
2013480: c2 06 80 00 ld [ %i2 ], %g1
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
{
rtems_rfs_inode_close (fs, &inode);
2013484: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
2013488: 7f ff f7 08 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
201348c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013490: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2013494: 40 00 2f 27 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013498: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201349c: 7f ff df bf call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20134a0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20134a4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20134a8: 12 80 00 a2 bne 2013730 <rtems_rfs_rtems_eval_for_make+0x558><== NOT EXECUTED
20134ac: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
20134b0: 40 00 46 c0 call 2024fb0 <__errno> <== NOT EXECUTED
20134b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20134b8: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
20134bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20134c0: 81 c7 e0 08 ret <== NOT EXECUTED
20134c4: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20134c8: 40 00 03 5d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20134cc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20134d0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20134d4: 02 bf ff e2 be 201345c <rtems_rfs_rtems_eval_for_make+0x284><== NOT EXECUTED
20134d8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20134dc: 7f ff cb 16 call 2006134 <rtems_status_text> <== NOT EXECUTED
20134e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20134e4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20134e8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20134ec: 40 00 4a 19 call 2025d50 <printf> <== NOT EXECUTED
20134f0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20134f4: 30 bf ff da b,a 201345c <rtems_rfs_rtems_eval_for_make+0x284><== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
20134f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20134fc: 12 80 00 5d bne 2013670 <rtems_rfs_rtems_eval_for_make+0x498><== NOT EXECUTED
2013500: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2013504: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2013508: 02 80 00 96 be 2013760 <rtems_rfs_rtems_eval_for_make+0x588><== NOT EXECUTED
201350c: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
/*
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
2013510: c4 08 60 03 ldub [ %g1 + 3 ], %g2 <== NOT EXECUTED
2013514: c6 08 60 02 ldub [ %g1 + 2 ], %g3 <== NOT EXECUTED
2013518: 83 28 e0 08 sll %g3, 8, %g1 <== NOT EXECUTED
201351c: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
2013520: 82 08 40 18 and %g1, %i0, %g1 <== NOT EXECUTED
2013524: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
2013528: 12 80 00 ab bne 20137d4 <rtems_rfs_rtems_eval_for_make+0x5fc><== NOT EXECUTED
201352c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013530: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
2013534: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
2013538: 10 bf ff 8b b 2013364 <rtems_rfs_rtems_eval_for_make+0x18c><== NOT EXECUTED
201353c: 96 10 20 02 mov 2, %o3 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013540: 40 00 03 3f call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013544: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013548: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201354c: 22 bf ff 48 be,a 201326c <rtems_rfs_rtems_eval_for_make+0x94><== NOT EXECUTED
2013550: 21 00 80 d1 sethi %hi(0x2034400), %l0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2013554: 7f ff ca f8 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013558: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
201355c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013560: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013564: 40 00 49 fb call 2025d50 <printf> <== NOT EXECUTED
2013568: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
201356c: 10 bf ff 40 b 201326c <rtems_rfs_rtems_eval_for_make+0x94><== NOT EXECUTED
2013570: 21 00 80 d1 sethi %hi(0x2034400), %l0 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013574: 7f ff d3 06 call 200818c <rtems_filesystem_is_separator> <== NOT EXECUTED
2013578: 01 00 00 00 nop <== NOT EXECUTED
201357c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013580: 02 bf ff 6e be 2013338 <rtems_rfs_rtems_eval_for_make+0x160><== NOT EXECUTED
2013584: c2 4f 00 00 ldsb [ %i4 ], %g1 <== NOT EXECUTED
{
if (*path)
2013588: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201358c: 02 bf ff 8c be 20133bc <rtems_rfs_rtems_eval_for_make+0x1e4><== NOT EXECUTED
2013590: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
2013594: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013598: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
201359c: 7f ff f6 c3 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20135a0: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20135a4: 10 bf ff 36 b 201327c <rtems_rfs_rtems_eval_for_make+0xa4><== NOT EXECUTED
20135a8: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20135ac: 90 10 00 19 mov %i1, %o0
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
20135b0: c2 26 40 00 st %g1, [ %i1 ]
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
20135b4: c2 07 bf fc ld [ %fp + -4 ], %g1
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20135b8: 40 00 02 e2 call 2014140 <rtems_rfs_rtems_set_handlers>
20135bc: c2 26 60 04 st %g1, [ %i1 + 4 ]
20135c0: 90 0a 20 ff and %o0, 0xff, %o0
20135c4: 80 a0 00 08 cmp %g0, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
20135c8: 92 07 bf cc add %fp, -52, %o1
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
20135cc: b0 40 3f ff addx %g0, -1, %i0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
20135d0: 7f ff f6 b6 call 20110a8 <rtems_rfs_inode_close>
20135d4: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20135d8: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
20135dc: 40 00 2e d5 call 201f130 <rtems_rfs_buffers_release>
20135e0: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20135e4: d0 07 00 00 ld [ %i4 ], %o0
20135e8: 7f ff df 6c call 200b398 <rtems_semaphore_release>
20135ec: b0 0e 20 05 and %i0, 5, %i0
if (sc != RTEMS_SUCCESSFUL)
20135f0: ba 92 20 00 orcc %o0, 0, %i5
20135f4: 02 bf ff 9d be 2013468 <rtems_rfs_rtems_eval_for_make+0x290><== ALWAYS TAKEN
20135f8: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20135fc: 40 00 03 10 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013600: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013604: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013608: 02 80 00 92 be 2013850 <rtems_rfs_rtems_eval_for_make+0x678><== NOT EXECUTED
201360c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013610: 7f ff ca c9 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013614: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013618: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201361c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013620: 40 00 49 cc call 2025d50 <printf> <== NOT EXECUTED
2013624: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
2013628: 81 c7 e0 08 ret <== NOT EXECUTED
201362c: 81 e8 00 00 restore <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
2013630: 92 07 bf cc add %fp, -52, %o1
2013634: 7f ff f6 9d call 20110a8 <rtems_rfs_inode_close>
2013638: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201363c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2013640: 40 00 2e bc call 201f130 <rtems_rfs_buffers_release>
2013644: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013648: 7f ff df 54 call 200b398 <rtems_semaphore_release>
201364c: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013650: ba 92 20 00 orcc %o0, 0, %i5
2013654: 12 80 00 1f bne 20136d0 <rtems_rfs_rtems_eval_for_make+0x4f8><== NEVER TAKEN
2013658: 90 10 20 00 clr %o0
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
201365c: 40 00 46 55 call 2024fb0 <__errno>
2013660: b0 10 3f ff mov -1, %i0
2013664: e2 22 00 00 st %l1, [ %o0 ]
2013668: 81 c7 e0 08 ret
201366c: 81 e8 00 00 restore
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
2013670: 7f ff d2 c7 call 200818c <rtems_filesystem_is_separator> <== NOT EXECUTED
2013674: 01 00 00 00 nop <== NOT EXECUTED
2013678: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201367c: 22 bf ff 37 be,a 2013358 <rtems_rfs_rtems_eval_for_make+0x180><== NOT EXECUTED
2013680: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2013684: 10 bf ff a0 b 2013504 <rtems_rfs_rtems_eval_for_make+0x32c><== NOT EXECUTED
2013688: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
201368c: 92 07 bf cc add %fp, -52, %o1
2013690: 7f ff f6 86 call 20110a8 <rtems_rfs_inode_close>
2013694: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013698: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
201369c: 40 00 2e a5 call 201f130 <rtems_rfs_buffers_release>
20136a0: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20136a4: 7f ff df 3d call 200b398 <rtems_semaphore_release>
20136a8: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20136ac: ba 92 20 00 orcc %o0, 0, %i5
20136b0: 12 80 00 14 bne 2013700 <rtems_rfs_rtems_eval_for_make+0x528><== NEVER TAKEN
20136b4: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
20136b8: 40 00 46 3e call 2024fb0 <__errno>
20136bc: b0 10 3f ff mov -1, %i0
20136c0: 82 10 20 14 mov 0x14, %g1
20136c4: c2 22 00 00 st %g1, [ %o0 ]
20136c8: 81 c7 e0 08 ret
20136cc: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20136d0: 40 00 02 db call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20136d4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20136d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20136dc: 02 bf ff e0 be 201365c <rtems_rfs_rtems_eval_for_make+0x484><== NOT EXECUTED
20136e0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20136e4: 7f ff ca 94 call 2006134 <rtems_status_text> <== NOT EXECUTED
20136e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20136ec: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20136f0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20136f4: 40 00 49 97 call 2025d50 <printf> <== NOT EXECUTED
20136f8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20136fc: 30 bf ff d8 b,a 201365c <rtems_rfs_rtems_eval_for_make+0x484><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013700: 40 00 02 cf call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013704: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013708: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201370c: 02 bf ff eb be 20136b8 <rtems_rfs_rtems_eval_for_make+0x4e0><== NOT EXECUTED
2013710: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013714: 7f ff ca 88 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013718: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201371c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013720: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013724: 40 00 49 8b call 2025d50 <printf> <== NOT EXECUTED
2013728: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
201372c: 30 bf ff e3 b,a 20136b8 <rtems_rfs_rtems_eval_for_make+0x4e0><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013730: 40 00 02 c3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013734: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013738: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201373c: 02 bf ff 5d be 20134b0 <rtems_rfs_rtems_eval_for_make+0x2d8><== NOT EXECUTED
2013740: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013744: 7f ff ca 7c call 2006134 <rtems_status_text> <== NOT EXECUTED
2013748: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
201374c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013750: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013754: 40 00 49 7f call 2025d50 <printf> <== NOT EXECUTED
2013758: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
201375c: 30 bf ff 55 b,a 20134b0 <rtems_rfs_rtems_eval_for_make+0x2d8><== NOT EXECUTED
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
2013760: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
2013764: 7f ff f6 51 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2013768: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201376c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2013770: 40 00 2e 70 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013774: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013778: 7f ff df 08 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201377c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013780: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013784: 12 80 00 35 bne 2013858 <rtems_rfs_rtems_eval_for_make+0x680><== NOT EXECUTED
2013788: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
201378c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
2013790: 90 07 20 02 add %i4, 2, %o0 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013794: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
2013798: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
201379c: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED
20137a0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20137a4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20137a8: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED
20137ac: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
20137b0: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
20137b4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED
20137b8: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20137bc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
20137c0: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
20137c4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20137c8: c4 26 60 10 st %g2, [ %i1 + 0x10 ] <== NOT EXECUTED
20137cc: 81 c7 e0 08 ret <== NOT EXECUTED
20137d0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
20137d4: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
20137d8: 7f ff f6 34 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20137dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20137e0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20137e4: 40 00 2e 53 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
20137e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20137ec: 7f ff de eb call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20137f0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20137f4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20137f8: 12 80 00 25 bne 201388c <rtems_rfs_rtems_eval_for_make+0x6b4><== NOT EXECUTED
20137fc: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
2013800: 40 00 45 ec call 2024fb0 <__errno> <== NOT EXECUTED
2013804: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013808: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
201380c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013810: 81 c7 e0 08 ret <== NOT EXECUTED
2013814: 81 e8 00 00 restore <== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
2013818: 7f ff f6 24 call 20110a8 <rtems_rfs_inode_close>
201381c: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013820: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2013824: 40 00 2e 43 call 201f130 <rtems_rfs_buffers_release>
2013828: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201382c: 7f ff de db call 200b398 <rtems_semaphore_release>
2013830: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013834: ba 92 20 00 orcc %o0, 0, %i5
2013838: 12 80 00 21 bne 20138bc <rtems_rfs_rtems_eval_for_make+0x6e4><== NEVER TAKEN
201383c: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
2013840: 40 00 45 dc call 2024fb0 <__errno>
2013844: b0 10 3f ff mov -1, %i0
2013848: 82 10 20 11 mov 0x11, %g1
201384c: c2 22 00 00 st %g1, [ %o0 ]
2013850: 81 c7 e0 08 ret
2013854: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013858: 40 00 02 79 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
201385c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013860: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013864: 22 bf ff cb be,a 2013790 <rtems_rfs_rtems_eval_for_make+0x5b8><== NOT EXECUTED
2013868: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
201386c: 7f ff ca 32 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013870: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013874: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013878: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
201387c: 40 00 49 35 call 2025d50 <printf> <== NOT EXECUTED
2013880: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013884: 10 bf ff c3 b 2013790 <rtems_rfs_rtems_eval_for_make+0x5b8><== NOT EXECUTED
2013888: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201388c: 40 00 02 6c call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013890: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013894: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013898: 02 bf ff da be 2013800 <rtems_rfs_rtems_eval_for_make+0x628><== NOT EXECUTED
201389c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20138a0: 7f ff ca 25 call 2006134 <rtems_status_text> <== NOT EXECUTED
20138a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20138a8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20138ac: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20138b0: 40 00 49 28 call 2025d50 <printf> <== NOT EXECUTED
20138b4: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20138b8: 30 bf ff d2 b,a 2013800 <rtems_rfs_rtems_eval_for_make+0x628><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20138bc: 40 00 02 60 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20138c0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20138c4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20138c8: 02 bf ff de be 2013840 <rtems_rfs_rtems_eval_for_make+0x668><== NOT EXECUTED
20138cc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20138d0: 7f ff ca 19 call 2006134 <rtems_status_text> <== NOT EXECUTED
20138d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20138d8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20138dc: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20138e0: 40 00 49 1c call 2025d50 <printf> <== NOT EXECUTED
20138e4: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20138e8: 30 bf ff d6 b,a 2013840 <rtems_rfs_rtems_eval_for_make+0x668><== NOT EXECUTED
020138ec <rtems_rfs_rtems_eval_path>:
static int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
20138ec: 9d e3 bf 70 save %sp, -144, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20138f0: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20138f4: c2 06 c0 00 ld [ %i3 ], %g1
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20138f8: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
20138fc: 92 10 00 19 mov %i1, %o1
int flags,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2013900: c2 27 bf f8 st %g1, [ %fp + -8 ]
uint32_t doff = 0;
2013904: c0 27 bf fc clr [ %fp + -4 ]
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2013908: 7f ff ca 97 call 2006364 <rtems_filesystem_prefix_separators>
201390c: 90 10 00 18 mov %i0, %o0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2013910: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2013914: b8 10 00 08 mov %o0, %i4
path += stripped;
2013918: a4 06 00 08 add %i0, %o0, %l2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
201391c: d0 00 40 00 ld [ %g1 ], %o0
pathlen -= stripped;
2013920: b8 26 40 1c sub %i1, %i4, %i4
2013924: 92 10 20 00 clr %o1
2013928: 7f ff de 52 call 200b270 <rtems_semaphore_obtain>
201392c: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2013930: b2 92 20 00 orcc %o0, 0, %i1
2013934: 12 80 00 81 bne 2013b38 <rtems_rfs_rtems_eval_path+0x24c> <== NEVER TAKEN
2013938: 90 10 20 00 clr %o0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
201393c: 23 00 80 d1 sethi %hi(0x2034400), %l1
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
2013940: 21 00 00 3c sethi %hi(0xf000), %l0
2013944: 31 00 00 10 sethi %hi(0x4000), %i0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013948: a2 14 63 48 or %l1, 0x348, %l1
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
201394c: d2 07 bf f8 ld [ %fp + -8 ], %o1
2013950: 90 10 00 1d mov %i5, %o0
2013954: 94 07 bf d0 add %fp, -48, %o2
2013958: 7f ff f5 5d call 2010ecc <rtems_rfs_inode_open>
201395c: 96 10 20 01 mov 1, %o3
if (rc > 0)
2013960: b2 92 20 00 orcc %o0, 0, %i1
2013964: 34 80 00 b6 bg,a 2013c3c <rtems_rfs_rtems_eval_path+0x350><== NEVER TAKEN
2013968: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
}
/*
* Is this the end of the pathname we were given ?
*/
if ((*path == '\0') || (pathlen == 0))
201396c: d0 0c 80 00 ldub [ %l2 ], %o0
2013970: 91 2a 20 18 sll %o0, 0x18, %o0
2013974: 80 a2 20 00 cmp %o0, 0
2013978: 02 80 00 4d be 2013aac <rtems_rfs_rtems_eval_path+0x1c0>
201397c: 80 a7 20 00 cmp %i4, 0
2013980: 02 80 00 4b be 2013aac <rtems_rfs_rtems_eval_path+0x1c0> <== NEVER TAKEN
2013984: c2 07 bf dc ld [ %fp + -36 ], %g1
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
2013988: c4 08 60 03 ldub [ %g1 + 3 ], %g2
201398c: c6 08 60 02 ldub [ %g1 + 2 ], %g3
2013990: 83 28 e0 08 sll %g3, 8, %g1
2013994: 82 10 80 01 or %g2, %g1, %g1
2013998: 82 08 40 10 and %g1, %l0, %g1
201399c: 80 a0 40 18 cmp %g1, %i0
20139a0: 22 80 00 33 be,a 2013a6c <rtems_rfs_rtems_eval_path+0x180>
20139a4: 90 07 bf d0 add %fp, -48, %o0
20139a8: b2 10 00 12 mov %l2, %i1
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
20139ac: 10 80 00 11 b 20139f0 <rtems_rfs_rtems_eval_path+0x104>
20139b0: a6 10 20 00 clr %l3
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
(*path != '\0') && pathlen &&
20139b4: 80 a0 a0 00 cmp %g2, 0
20139b8: 02 80 00 13 be 2013a04 <rtems_rfs_rtems_eval_path+0x118> <== NEVER TAKEN
20139bc: 82 04 e0 01 add %l3, 1, %g1
20139c0: 80 a7 20 00 cmp %i4, 0
20139c4: 02 80 00 11 be 2013a08 <rtems_rfs_rtems_eval_path+0x11c> <== NEVER TAKEN
20139c8: 92 10 00 1c mov %i4, %o1
20139cc: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
20139d0: 80 a0 40 02 cmp %g1, %g2
20139d4: 1a 80 00 0d bcc 2013a08 <rtems_rfs_rtems_eval_path+0x11c> <== NEVER TAKEN
20139d8: 01 00 00 00 nop
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
20139dc: d0 0e 60 01 ldub [ %i1 + 1 ], %o0
20139e0: b8 07 3f ff add %i4, -1, %i4
20139e4: b2 06 60 01 inc %i1
20139e8: a6 10 00 01 mov %g1, %l3
20139ec: 91 2a 20 18 sll %o0, 0x18, %o0
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
20139f0: 7f ff d1 e7 call 200818c <rtems_filesystem_is_separator>
20139f4: 91 3a 20 18 sra %o0, 0x18, %o0
20139f8: 80 a2 20 00 cmp %o0, 0
20139fc: 22 bf ff ee be,a 20139b4 <rtems_rfs_rtems_eval_path+0xc8>
2013a00: c4 4e 40 00 ldsb [ %i1 ], %g2
}
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
2013a04: 92 10 00 1c mov %i4, %o1
2013a08: 7f ff ca 57 call 2006364 <rtems_filesystem_prefix_separators>
2013a0c: 90 10 00 19 mov %i1, %o0
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013a10: c2 4c 80 00 ldsb [ %l2 ], %g1
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
2013a14: b2 06 40 08 add %i1, %o0, %i1
pathlen -= stripped;
2013a18: b8 27 00 08 sub %i4, %o0, %i4
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013a1c: 80 a0 60 2e cmp %g1, 0x2e
2013a20: 02 80 00 1b be 2013a8c <rtems_rfs_rtems_eval_path+0x1a0>
2013a24: a8 02 00 13 add %o0, %l3, %l4
/*
* Look up the node name in this directory. If found drop through, close
* the current inode and let the loop open the inode so the mode can be
* read and handlers set.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013a28: 90 10 00 1d mov %i5, %o0
2013a2c: 92 07 bf d0 add %fp, -48, %o1
2013a30: 94 10 00 12 mov %l2, %o2
2013a34: 96 10 00 13 mov %l3, %o3
2013a38: 98 07 bf f8 add %fp, -8, %o4
2013a3c: 40 00 2e 1e call 201f2b4 <rtems_rfs_dir_lookup_ino>
2013a40: 9a 07 bf fc add %fp, -4, %o5
node, node_len - stripped, &ino, &doff);
if (rc > 0)
2013a44: a4 92 20 00 orcc %o0, 0, %l2
2013a48: 14 80 00 66 bg 2013be0 <rtems_rfs_rtems_eval_path+0x2f4>
2013a4c: 90 10 00 1d mov %i5, %o0
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
2013a50: 7f ff f5 96 call 20110a8 <rtems_rfs_inode_close>
2013a54: 92 07 bf d0 add %fp, -48, %o1
if (rc > 0)
2013a58: a4 92 20 00 orcc %o0, 0, %l2
2013a5c: 14 80 00 62 bg 2013be4 <rtems_rfs_rtems_eval_path+0x2f8> <== NEVER TAKEN
2013a60: 92 07 bf d0 add %fp, -48, %o1
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
2013a64: 10 bf ff ba b 201394c <rtems_rfs_rtems_eval_path+0x60>
2013a68: a4 10 00 19 mov %i1, %l2
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
2013a6c: 40 00 01 7f call 2014068 <rtems_rfs_rtems_eval_perms>
2013a70: 92 10 20 01 mov 1, %o1
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
2013a74: 80 8a 20 ff btst 0xff, %o0
2013a78: 02 80 00 b3 be 2013d44 <rtems_rfs_rtems_eval_path+0x458> <== NEVER TAKEN
2013a7c: 92 07 bf d0 add %fp, -48, %o1
2013a80: d0 0c 80 00 ldub [ %l2 ], %o0
2013a84: 10 bf ff c9 b 20139a8 <rtems_rfs_rtems_eval_path+0xbc>
2013a88: 91 2a 20 18 sll %o0, 0x18, %o0
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013a8c: d0 4c a0 01 ldsb [ %l2 + 1 ], %o0
2013a90: 80 a2 20 00 cmp %o0, 0
2013a94: 12 80 00 36 bne 2013b6c <rtems_rfs_rtems_eval_path+0x280>
2013a98: 01 00 00 00 nop
{
if (*path)
2013a9c: c2 4e 40 00 ldsb [ %i1 ], %g1
2013aa0: 80 a0 60 00 cmp %g1, 0
2013aa4: 32 80 00 4a bne,a 2013bcc <rtems_rfs_rtems_eval_path+0x2e0><== NEVER TAKEN
2013aa8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
2013aac: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
2013ab0: 92 07 bf d0 add %fp, -48, %o1
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
2013ab4: c2 26 c0 00 st %g1, [ %i3 ]
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
2013ab8: c2 07 bf fc ld [ %fp + -4 ], %g1
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
2013abc: 90 10 00 1b mov %i3, %o0
2013ac0: 40 00 01 a0 call 2014140 <rtems_rfs_rtems_set_handlers>
2013ac4: c2 26 e0 04 st %g1, [ %i3 + 4 ]
2013ac8: 90 0a 20 ff and %o0, 0xff, %o0
2013acc: 80 a0 00 08 cmp %g0, %o0
rtems_rfs_inode_close (fs, &inode);
2013ad0: 92 07 bf d0 add %fp, -48, %o1
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
2013ad4: b0 40 3f ff addx %g0, -1, %i0
rtems_rfs_inode_close (fs, &inode);
2013ad8: 7f ff f5 74 call 20110a8 <rtems_rfs_inode_close>
2013adc: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013ae0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2013ae4: 40 00 2d 93 call 201f130 <rtems_rfs_buffers_release>
2013ae8: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013aec: d0 07 00 00 ld [ %i4 ], %o0
2013af0: 7f ff de 2a call 200b398 <rtems_semaphore_release>
2013af4: b0 0e 20 05 and %i0, 5, %i0
if (sc != RTEMS_SUCCESSFUL)
2013af8: ba 92 20 00 orcc %o0, 0, %i5
2013afc: 02 80 00 0d be 2013b30 <rtems_rfs_rtems_eval_path+0x244> <== ALWAYS TAKEN
2013b00: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013b04: 40 00 01 ce call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013b08: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013b0c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013b10: 02 80 00 9b be 2013d7c <rtems_rfs_rtems_eval_path+0x490> <== NOT EXECUTED
2013b14: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013b18: 7f ff c9 87 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013b1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013b20: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013b24: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013b28: 40 00 48 8a call 2025d50 <printf> <== NOT EXECUTED
2013b2c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
2013b30: 81 c7 e0 08 ret
2013b34: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013b38: 40 00 01 c1 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013b3c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013b40: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013b44: 22 bf ff 7f be,a 2013940 <rtems_rfs_rtems_eval_path+0x54><== NOT EXECUTED
2013b48: 23 00 80 d1 sethi %hi(0x2034400), %l1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2013b4c: 7f ff c9 7a call 2006134 <rtems_status_text> <== NOT EXECUTED
2013b50: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2013b54: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013b58: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013b5c: 40 00 48 7d call 2025d50 <printf> <== NOT EXECUTED
2013b60: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013b64: 10 bf ff 77 b 2013940 <rtems_rfs_rtems_eval_path+0x54> <== NOT EXECUTED
2013b68: 23 00 80 d1 sethi %hi(0x2034400), %l1 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on to it otherwise we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
2013b6c: 7f ff d1 88 call 200818c <rtems_filesystem_is_separator>
2013b70: 01 00 00 00 nop
2013b74: 80 a2 20 00 cmp %o0, 0
2013b78: 32 bf ff ca bne,a 2013aa0 <rtems_rfs_rtems_eval_path+0x1b4><== NEVER TAKEN
2013b7c: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
2013b80: c2 4c 80 00 ldsb [ %l2 ], %g1
2013b84: 80 a0 60 2e cmp %g1, 0x2e
2013b88: 12 bf ff a9 bne 2013a2c <rtems_rfs_rtems_eval_path+0x140> <== NEVER TAKEN
2013b8c: 90 10 00 1d mov %i5, %o0
2013b90: c2 4c a0 01 ldsb [ %l2 + 1 ], %g1
2013b94: 80 a0 60 2e cmp %g1, 0x2e
2013b98: 12 bf ff a6 bne 2013a30 <rtems_rfs_rtems_eval_path+0x144> <== NEVER TAKEN
2013b9c: 92 07 bf d0 add %fp, -48, %o1
2013ba0: d0 4c a0 02 ldsb [ %l2 + 2 ], %o0
2013ba4: 80 a2 20 00 cmp %o0, 0
2013ba8: 12 80 00 1e bne 2013c20 <rtems_rfs_rtems_eval_path+0x334> <== NEVER TAKEN
2013bac: c2 07 bf f8 ld [ %fp + -8 ], %g1
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2013bb0: 80 a0 60 01 cmp %g1, 1
2013bb4: 02 80 00 46 be 2013ccc <rtems_rfs_rtems_eval_path+0x3e0>
2013bb8: 90 10 00 1d mov %i5, %o0
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
2013bbc: 92 07 bf d0 add %fp, -48, %o1
2013bc0: 94 10 00 11 mov %l1, %o2
2013bc4: 10 bf ff 9d b 2013a38 <rtems_rfs_rtems_eval_path+0x14c>
2013bc8: 96 10 20 02 mov 2, %o3
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
2013bcc: 92 07 bf d0 add %fp, -48, %o1 <== NOT EXECUTED
2013bd0: 7f ff f5 36 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2013bd4: a4 10 00 19 mov %i1, %l2 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2013bd8: 10 bf ff 5e b 2013950 <rtems_rfs_rtems_eval_path+0x64> <== NOT EXECUTED
2013bdc: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
2013be0: 92 07 bf d0 add %fp, -48, %o1
2013be4: 7f ff f5 31 call 20110a8 <rtems_rfs_inode_close>
2013be8: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013bec: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2013bf0: 40 00 2d 50 call 201f130 <rtems_rfs_buffers_release>
2013bf4: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013bf8: 7f ff dd e8 call 200b398 <rtems_semaphore_release>
2013bfc: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013c00: ba 92 20 00 orcc %o0, 0, %i5
2013c04: 12 80 00 1a bne 2013c6c <rtems_rfs_rtems_eval_path+0x380> <== NEVER TAKEN
2013c08: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
2013c0c: 40 00 44 e9 call 2024fb0 <__errno>
2013c10: b0 10 3f ff mov -1, %i0
2013c14: e4 22 00 00 st %l2, [ %o0 ]
2013c18: 81 c7 e0 08 ret
2013c1c: 81 e8 00 00 restore
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
2013c20: 7f ff d1 5b call 200818c <rtems_filesystem_is_separator> <== NOT EXECUTED
2013c24: 01 00 00 00 nop <== NOT EXECUTED
2013c28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2013c2c: 02 bf ff 80 be 2013a2c <rtems_rfs_rtems_eval_path+0x140> <== NOT EXECUTED
2013c30: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
2013c34: 10 bf ff df b 2013bb0 <rtems_rfs_rtems_eval_path+0x2c4> <== NOT EXECUTED
2013c38: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2013c3c: 40 00 2d 3d call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013c40: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013c44: 7f ff dd d5 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2013c48: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013c4c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013c50: 12 80 00 13 bne 2013c9c <rtems_rfs_rtems_eval_path+0x3b0> <== NOT EXECUTED
2013c54: 90 10 20 00 clr %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: opening inode", rc);
2013c58: 40 00 44 d6 call 2024fb0 <__errno> <== NOT EXECUTED
2013c5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013c60: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED
2013c64: 81 c7 e0 08 ret <== NOT EXECUTED
2013c68: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013c6c: 40 00 01 74 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013c70: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013c74: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013c78: 02 bf ff e5 be 2013c0c <rtems_rfs_rtems_eval_path+0x320> <== NOT EXECUTED
2013c7c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013c80: 7f ff c9 2d call 2006134 <rtems_status_text> <== NOT EXECUTED
2013c84: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013c88: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013c8c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013c90: 40 00 48 30 call 2025d50 <printf> <== NOT EXECUTED
2013c94: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2013c98: 30 bf ff dd b,a 2013c0c <rtems_rfs_rtems_eval_path+0x320><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013c9c: 40 00 01 68 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013ca0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013ca4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013ca8: 02 bf ff ec be 2013c58 <rtems_rfs_rtems_eval_path+0x36c> <== NOT EXECUTED
2013cac: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013cb0: 7f ff c9 21 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013cb4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013cb8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013cbc: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013cc0: 40 00 48 24 call 2025d50 <printf> <== NOT EXECUTED
2013cc4: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2013cc8: 30 bf ff e4 b,a 2013c58 <rtems_rfs_rtems_eval_path+0x36c><== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
2013ccc: 92 07 bf d0 add %fp, -48, %o1
2013cd0: 7f ff f4 f6 call 20110a8 <rtems_rfs_inode_close>
2013cd4: 90 10 00 1d mov %i5, %o0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013cd8: f0 07 60 7c ld [ %i5 + 0x7c ], %i0
rtems_rfs_buffers_release (fs);
2013cdc: 40 00 2d 15 call 201f130 <rtems_rfs_buffers_release>
2013ce0: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013ce4: 7f ff dd ad call 200b398 <rtems_semaphore_release>
2013ce8: d0 06 00 00 ld [ %i0 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2013cec: ba 92 20 00 orcc %o0, 0, %i5
2013cf0: 12 80 00 25 bne 2013d84 <rtems_rfs_rtems_eval_path+0x498> <== NEVER TAKEN
2013cf4: 90 10 20 00 clr %o0
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013cf8: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2013cfc: 90 26 40 14 sub %i1, %l4, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013d00: c2 00 a0 08 ld [ %g2 + 8 ], %g1
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2013d04: 92 07 00 14 add %i4, %l4, %o1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013d08: c2 26 c0 00 st %g1, [ %i3 ]
2013d0c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2013d10: 94 10 00 1a mov %i2, %o2
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013d14: c2 26 e0 04 st %g1, [ %i3 + 4 ]
2013d18: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2013d1c: 96 10 00 1b mov %i3, %o3
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013d20: c2 26 e0 08 st %g1, [ %i3 + 8 ]
2013d24: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2013d28: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2013d2c: c2 00 40 00 ld [ %g1 ], %g1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013d30: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
2013d34: 9f c0 40 00 call %g1
2013d38: c4 26 e0 10 st %g2, [ %i3 + 0x10 ]
2013d3c: 81 c7 e0 08 ret
2013d40: 91 e8 00 08 restore %g0, %o0, %o0
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
2013d44: 7f ff f4 d9 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2013d48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013d4c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2013d50: 40 00 2c f8 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013d54: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013d58: 7f ff dd 90 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2013d5c: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013d60: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013d64: 12 80 00 15 bne 2013db8 <rtems_rfs_rtems_eval_path+0x4cc> <== NOT EXECUTED
2013d68: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
2013d6c: 40 00 44 91 call 2024fb0 <__errno> <== NOT EXECUTED
2013d70: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013d74: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
2013d78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013d7c: 81 c7 e0 08 ret <== NOT EXECUTED
2013d80: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013d84: 40 00 01 2e call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013d88: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013d8c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013d90: 22 bf ff db be,a 2013cfc <rtems_rfs_rtems_eval_path+0x410><== NOT EXECUTED
2013d94: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013d98: 7f ff c8 e7 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013d9c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013da0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013da4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013da8: 40 00 47 ea call 2025d50 <printf> <== NOT EXECUTED
2013dac: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
2013db0: 10 bf ff d3 b 2013cfc <rtems_rfs_rtems_eval_path+0x410> <== NOT EXECUTED
2013db4: c4 06 e0 10 ld [ %i3 + 0x10 ], %g2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013db8: 40 00 01 21 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013dbc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013dc0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013dc4: 02 bf ff ea be 2013d6c <rtems_rfs_rtems_eval_path+0x480> <== NOT EXECUTED
2013dc8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013dcc: 7f ff c8 da call 2006134 <rtems_status_text> <== NOT EXECUTED
2013dd0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013dd4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013dd8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013ddc: 40 00 47 dd call 2025d50 <printf> <== NOT EXECUTED
2013de0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2013de4: 30 bf ff e2 b,a 2013d6c <rtems_rfs_rtems_eval_path+0x480><== NOT EXECUTED
02014068 <rtems_rfs_rtems_eval_perms>:
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
2014068: 9d e3 bf a0 save %sp, -96, %sp
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
201406c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2014070: c6 08 60 06 ldub [ %g1 + 6 ], %g3
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2014074: c4 08 60 05 ldub [ %g1 + 5 ], %g2
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2014078: f6 08 60 07 ldub [ %g1 + 7 ], %i3
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
201407c: f8 08 60 04 ldub [ %g1 + 4 ], %i4
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2014080: fa 08 60 02 ldub [ %g1 + 2 ], %i5
2014084: c2 08 60 03 ldub [ %g1 + 3 ], %g1
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2014088: 85 28 a0 10 sll %g2, 0x10, %g2
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
201408c: 87 28 e0 08 sll %g3, 8, %g3
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2014090: b9 2f 20 18 sll %i4, 0x18, %i4
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2014094: b6 10 c0 1b or %g3, %i3, %i3
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2014098: b8 17 00 02 or %i4, %g2, %i4
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
201409c: bb 2f 60 08 sll %i5, 8, %i5
uid = rtems_rfs_inode_get_uid (inode);
gid = rtems_rfs_inode_get_gid (inode);
mode = rtems_rfs_inode_get_mode (inode);
#if defined (RTEMS_POSIX_API)
st_uid = geteuid ();
20140a0: 40 00 14 aa call 2019348 <geteuid>
20140a4: ba 17 40 01 or %i5, %g1, %i5
st_gid = getegid ();
20140a8: 40 00 14 a4 call 2019338 <getegid>
20140ac: b4 10 00 08 mov %o0, %i2
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
20140b0: b5 2e a0 10 sll %i2, 0x10, %i2
20140b4: b5 36 a0 10 srl %i2, 0x10, %i2
20140b8: 80 a0 00 1a cmp %g0, %i2
20140bc: b7 2e e0 10 sll %i3, 0x10, %i3
20140c0: 84 60 3f ff subx %g0, -1, %g2
20140c4: b7 36 e0 10 srl %i3, 0x10, %i3
20140c8: 80 a6 80 1b cmp %i2, %i3
20140cc: 02 80 00 1a be 2014134 <rtems_rfs_rtems_eval_perms+0xcc> <== ALWAYS TAKEN
20140d0: b9 37 20 10 srl %i4, 0x10, %i4
20140d4: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
20140d8: 12 80 00 17 bne 2014134 <rtems_rfs_rtems_eval_perms+0xcc> <== NOT EXECUTED
20140dc: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
20140e0: 91 2a 20 10 sll %o0, 0x10, %o0
20140e4: 91 32 20 10 srl %o0, 0x10, %o0
20140e8: 80 a2 00 1c cmp %o0, %i4
20140ec: 22 80 00 0b be,a 2014118 <rtems_rfs_rtems_eval_perms+0xb0><== ALWAYS TAKEN
20140f0: b3 2e 60 03 sll %i1, 3, %i1
20140f4: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
20140f8: 32 80 00 08 bne,a 2014118 <rtems_rfs_rtems_eval_perms+0xb0><== NOT EXECUTED
20140fc: b3 2e 60 03 sll %i1, 3, %i1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
2014100: ba 0f 61 ff and %i5, 0x1ff, %i5 <== NOT EXECUTED
2014104: 82 0f 40 01 and %i5, %g1, %g1 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
2014108: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
201410c: b0 40 20 00 addx %g0, 0, %i0 <== NOT EXECUTED
2014110: 81 c7 e0 08 ret <== NOT EXECUTED
2014114: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
2014118: ba 0f 61 ff and %i5, 0x1ff, %i5
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
flags_to_test |= flags << 3;
201411c: 82 10 40 19 or %g1, %i1, %g1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
2014120: 82 0f 40 01 and %i5, %g1, %g1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
2014124: 80 a0 00 01 cmp %g0, %g1
2014128: b0 40 20 00 addx %g0, 0, %i0
201412c: 81 c7 e0 08 ret
2014130: 81 e8 00 00 restore
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
2014134: 83 2e 60 06 sll %i1, 6, %g1
2014138: 10 bf ff ea b 20140e0 <rtems_rfs_rtems_eval_perms+0x78>
201413c: 82 10 40 19 or %g1, %i1, %g1
02013de8 <rtems_rfs_rtems_fchmod>:
}
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
2013de8: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2013dec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2013df0: f8 06 00 00 ld [ %i0 ], %i4 <== NOT EXECUTED
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2013df4: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2013df8: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2013dfc: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
2013e00: 94 10 20 00 clr %o2 <== NOT EXECUTED
2013e04: 7f ff dd 1b call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
2013e08: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013e0c: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2013e10: 12 80 00 3b bne 2013efc <rtems_rfs_rtems_fchmod+0x114> <== NOT EXECUTED
2013e14: 90 10 20 00 clr %o0 <== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2013e18: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2013e1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013e20: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2013e24: 7f ff f4 2a call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
2013e28: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2013e2c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2013e30: 32 80 00 27 bne,a 2013ecc <rtems_rfs_rtems_fchmod+0xe4> <== NOT EXECUTED
2013e34: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
2013e38: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
2013e3c: f6 08 60 02 ldub [ %g1 + 2 ], %i3 <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
2013e40: 40 00 15 42 call 2019348 <geteuid> <== NOT EXECUTED
2013e44: f8 08 60 03 ldub [ %g1 + 3 ], %i4 <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2013e48: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
2013e4c: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED
2013e50: c4 08 60 06 ldub [ %g1 + 6 ], %g2 <== NOT EXECUTED
2013e54: c6 08 60 07 ldub [ %g1 + 7 ], %g3 <== NOT EXECUTED
2013e58: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2013e5c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
2013e60: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
2013e64: 80 a0 80 08 cmp %g2, %o0 <== NOT EXECUTED
2013e68: 02 80 00 05 be 2013e7c <rtems_rfs_rtems_fchmod+0x94> <== NOT EXECUTED
2013e6c: 89 32 20 10 srl %o0, 0x10, %g4 <== NOT EXECUTED
2013e70: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
2013e74: 12 80 00 54 bne 2013fc4 <rtems_rfs_rtems_fchmod+0x1dc> <== NOT EXECUTED
2013e78: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2013e7c: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED
2013e80: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
2013e84: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2013e88: b2 0e 6f ff and %i1, 0xfff, %i1 <== NOT EXECUTED
2013e8c: b8 16 c0 1c or %i3, %i4, %i4 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2013e90: b8 0f 30 00 and %i4, -4096, %i4 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2013e94: b2 17 00 19 or %i4, %i1, %i1 <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
2013e98: 85 36 60 08 srl %i1, 8, %g2 <== NOT EXECUTED
2013e9c: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
2013ea0: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
2013ea4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013ea8: f2 28 60 03 stb %i1, [ %g1 + 3 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2013eac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2013eb0: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2013eb4: 7f ff f4 7d call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2013eb8: c2 2f bf e8 stb %g1, [ %fp + -24 ] <== NOT EXECUTED
if (rc > 0)
2013ebc: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2013ec0: 24 80 00 2c ble,a 2013f70 <rtems_rfs_rtems_fchmod+0x188> <== NOT EXECUTED
2013ec4: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013ec8: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2013ecc: 40 00 2c 99 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013ed0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013ed4: 7f ff dd 31 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2013ed8: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013edc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013ee0: 12 80 00 14 bne 2013f30 <rtems_rfs_rtems_fchmod+0x148> <== NOT EXECUTED
2013ee4: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
2013ee8: 40 00 44 32 call 2024fb0 <__errno> <== NOT EXECUTED
2013eec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013ef0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2013ef4: 81 c7 e0 08 ret <== NOT EXECUTED
2013ef8: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013efc: 40 00 00 d0 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013f00: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013f04: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013f08: 22 bf ff c5 be,a 2013e1c <rtems_rfs_rtems_fchmod+0x34> <== NOT EXECUTED
2013f0c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2013f10: 7f ff c8 89 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013f14: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2013f18: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013f1c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013f20: 40 00 47 8c call 2025d50 <printf> <== NOT EXECUTED
2013f24: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2013f28: 10 bf ff bd b 2013e1c <rtems_rfs_rtems_fchmod+0x34> <== NOT EXECUTED
2013f2c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013f30: 40 00 00 c3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013f34: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013f38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013f3c: 02 bf ff eb be 2013ee8 <rtems_rfs_rtems_fchmod+0x100> <== NOT EXECUTED
2013f40: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013f44: 7f ff c8 7c call 2006134 <rtems_status_text> <== NOT EXECUTED
2013f48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013f4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013f50: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013f54: 40 00 47 7f call 2025d50 <printf> <== NOT EXECUTED
2013f58: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
2013f5c: 40 00 44 15 call 2024fb0 <__errno> <== NOT EXECUTED
2013f60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013f64: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2013f68: 81 c7 e0 08 ret <== NOT EXECUTED
2013f6c: 81 e8 00 00 restore <== NOT EXECUTED
2013f70: 40 00 2c 70 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013f74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013f78: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2013f7c: 7f ff dd 07 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2013f80: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013f84: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013f88: 02 bf ff db be 2013ef4 <rtems_rfs_rtems_fchmod+0x10c> <== NOT EXECUTED
2013f8c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2013f90: 40 00 00 ab call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2013f94: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2013f98: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2013f9c: 02 80 00 18 be 2013ffc <rtems_rfs_rtems_fchmod+0x214> <== NOT EXECUTED
2013fa0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2013fa4: 7f ff c8 64 call 2006134 <rtems_status_text> <== NOT EXECUTED
2013fa8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2013fac: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2013fb0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2013fb4: 40 00 47 67 call 2025d50 <printf> <== NOT EXECUTED
2013fb8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2013fbc: 81 c7 e0 08 ret <== NOT EXECUTED
2013fc0: 81 e8 00 00 restore <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
2013fc4: 7f ff f4 39 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2013fc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2013fcc: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2013fd0: 40 00 2c 58 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2013fd4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2013fd8: 7f ff dc f0 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2013fdc: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2013fe0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2013fe4: 12 80 00 08 bne 2014004 <rtems_rfs_rtems_fchmod+0x21c> <== NOT EXECUTED
2013fe8: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
2013fec: 40 00 43 f1 call 2024fb0 <__errno> <== NOT EXECUTED
2013ff0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2013ff4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2013ff8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2013ffc: 81 c7 e0 08 ret <== NOT EXECUTED
2014000: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2014004: 40 00 00 8e call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2014008: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201400c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2014010: 02 bf ff f7 be 2013fec <rtems_rfs_rtems_fchmod+0x204> <== NOT EXECUTED
2014014: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2014018: 7f ff c8 47 call 2006134 <rtems_status_text> <== NOT EXECUTED
201401c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2014020: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2014024: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2014028: 40 00 47 4a call 2025d50 <printf> <== NOT EXECUTED
201402c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2014030: 30 bf ff ef b,a 2013fec <rtems_rfs_rtems_fchmod+0x204> <== NOT EXECUTED
02014034 <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
2014034: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
2014038: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
201403c: b0 10 20 00 clr %i0 <== NOT EXECUTED
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
2014040: 40 00 2b 28 call 201ece0 <rtems_rfs_buffer_sync> <== NOT EXECUTED
2014044: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 <== NOT EXECUTED
if (rc)
2014048: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201404c: 02 80 00 05 be 2014060 <rtems_rfs_rtems_fdatasync+0x2c> <== NOT EXECUTED
2014050: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
2014054: 40 00 43 d7 call 2024fb0 <__errno> <== NOT EXECUTED
2014058: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201405c: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
return 0;
}
2014060: 81 c7 e0 08 ret <== NOT EXECUTED
2014064: 81 e8 00 00 restore <== NOT EXECUTED
020237ac <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
20237ac: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
20237b0: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20237b4: 92 10 20 00 clr %o1
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
20237b8: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
20237bc: 94 10 20 00 clr %o2
20237c0: fa 00 60 98 ld [ %g1 + 0x98 ], %i5
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
20237c4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
20237c8: 7f ff 9e aa call 200b270 <rtems_semaphore_obtain>
20237cc: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20237d0: b0 92 20 00 orcc %o0, 0, %i0
20237d4: 12 80 00 21 bne 2023858 <rtems_rfs_rtems_file_close+0xac> <== NEVER TAKEN
20237d8: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
20237dc: 90 10 00 1d mov %i5, %o0
20237e0: 7f ff f4 95 call 2020a34 <rtems_rfs_file_close>
20237e4: 92 10 00 1c mov %i4, %o1
if (rc > 0)
20237e8: b0 92 20 00 orcc %o0, 0, %i0
20237ec: 24 80 00 07 ble,a 2023808 <rtems_rfs_rtems_file_close+0x5c><== ALWAYS TAKEN
20237f0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
20237f4: 40 00 05 ef call 2024fb0 <__errno> <== NOT EXECUTED
20237f8: 01 00 00 00 nop <== NOT EXECUTED
20237fc: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
2023800: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023804: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2023808: 7f ff ee 4a call 201f130 <rtems_rfs_buffers_release>
202380c: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023810: 7f ff 9e e2 call 200b398 <rtems_semaphore_release>
2023814: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2023818: ba 92 20 00 orcc %o0, 0, %i5
202381c: 02 80 00 0d be 2023850 <rtems_rfs_rtems_file_close+0xa4> <== ALWAYS TAKEN
2023820: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023824: 7f ff c2 86 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023828: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
202382c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023830: 02 80 00 08 be 2023850 <rtems_rfs_rtems_file_close+0xa4> <== NOT EXECUTED
2023834: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023838: 7f ff 8a 3f call 2006134 <rtems_status_text> <== NOT EXECUTED
202383c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023840: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023844: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023848: 40 00 09 42 call 2025d50 <printf> <== NOT EXECUTED
202384c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
2023850: 81 c7 e0 08 ret
2023854: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023858: 7f ff c2 79 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202385c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023860: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023864: 22 bf ff df be,a 20237e0 <rtems_rfs_rtems_file_close+0x34><== NOT EXECUTED
2023868: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
202386c: 7f ff 8a 32 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023870: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2023874: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023878: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
202387c: 40 00 09 35 call 2025d50 <printf> <== NOT EXECUTED
2023880: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
2023884: 10 bf ff d7 b 20237e0 <rtems_rfs_rtems_file_close+0x34> <== NOT EXECUTED
2023888: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
0202369c <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
202369c: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
20236a0: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20236a4: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
20236a8: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
20236ac: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20236b0: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
20236b4: ba 10 00 1a mov %i2, %i5
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
20236b8: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
20236bc: b8 10 00 19 mov %i1, %i4
20236c0: 7f ff 9e ec call 200b270 <rtems_semaphore_obtain>
20236c4: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20236c8: b4 92 20 00 orcc %o0, 0, %i2
20236cc: 12 80 00 1d bne 2023740 <rtems_rfs_rtems_file_ftruncate+0xa4><== NEVER TAKEN
20236d0: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
20236d4: 92 10 00 1c mov %i4, %o1
20236d8: 90 10 00 1b mov %i3, %o0
20236dc: 7f ff f7 14 call 202132c <rtems_rfs_file_set_size>
20236e0: 94 10 00 1d mov %i5, %o2
if (rc)
20236e4: b8 92 20 00 orcc %o0, 0, %i4
20236e8: 22 80 00 07 be,a 2023704 <rtems_rfs_rtems_file_ftruncate+0x68><== ALWAYS TAKEN
20236ec: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
20236f0: 40 00 06 30 call 2024fb0 <__errno> <== NOT EXECUTED
20236f4: 01 00 00 00 nop <== NOT EXECUTED
20236f8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20236fc: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
2023700: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
2023704: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2023708: 7f ff e8 a0 call 201d988 <rtems_rfs_block_get_size>
202370c: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023710: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
2023714: d0 3e 20 08 std %o0, [ %i0 + 8 ]
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023718: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
202371c: 7f ff ee 85 call 201f130 <rtems_rfs_buffers_release>
2023720: f6 02 20 7c ld [ %o0 + 0x7c ], %i3
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023724: 7f ff 9f 1d call 200b398 <rtems_semaphore_release>
2023728: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
202372c: b6 92 20 00 orcc %o0, 0, %i3
2023730: 12 80 00 11 bne 2023774 <rtems_rfs_rtems_file_ftruncate+0xd8><== NEVER TAKEN
2023734: 90 10 20 00 clr %o0
return rc;
}
2023738: 81 c7 e0 08 ret
202373c: 91 e8 00 1c restore %g0, %i4, %o0
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023740: 7f ff c2 bf call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023744: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023748: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
202374c: 22 bf ff e3 be,a 20236d8 <rtems_rfs_rtems_file_ftruncate+0x3c><== NOT EXECUTED
2023750: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2023754: 7f ff 8a 78 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023758: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
202375c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023760: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023764: 40 00 09 7b call 2025d50 <printf> <== NOT EXECUTED
2023768: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
202376c: 10 bf ff db b 20236d8 <rtems_rfs_rtems_file_ftruncate+0x3c><== NOT EXECUTED
2023770: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023774: 7f ff c2 b2 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023778: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
202377c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023780: 02 bf ff ee be 2023738 <rtems_rfs_rtems_file_ftruncate+0x9c><== NOT EXECUTED
2023784: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023788: 7f ff 8a 6b call 2006134 <rtems_status_text> <== NOT EXECUTED
202378c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rc;
}
2023790: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
2023794: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023798: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
202379c: 40 00 09 6d call 2025d50 <printf> <== NOT EXECUTED
20237a0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20237a4: 81 c7 e0 08 ret <== NOT EXECUTED
20237a8: 81 e8 00 00 restore <== NOT EXECUTED
020234bc <rtems_rfs_rtems_file_ioctl>:
static int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
return 0;
}
20234bc: 81 c3 e0 08 retl <== NOT EXECUTED
20234c0: 90 10 20 00 clr %o0 <== NOT EXECUTED
02023b14 <rtems_rfs_rtems_file_lseek>:
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
2023b14: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2023b18: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2023b1c: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
2023b20: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2023b24: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023b28: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2023b2c: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
2023b30: 7f ff 9d d0 call 200b270 <rtems_semaphore_obtain>
2023b34: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2023b38: b8 92 20 00 orcc %o0, 0, %i4
2023b3c: 12 80 00 26 bne 2023bd4 <rtems_rfs_rtems_file_lseek+0xc0> <== NEVER TAKEN
2023b40: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2023b44: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
rc = rtems_rfs_file_seek (file, pos, &pos);
2023b48: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2023b4c: c4 3f bf f8 std %g2, [ %fp + -8 ]
rc = rtems_rfs_file_seek (file, pos, &pos);
2023b50: 92 10 00 02 mov %g2, %o1
2023b54: 94 10 00 03 mov %g3, %o2
2023b58: 7f ff f5 ce call 2021290 <rtems_rfs_file_seek>
2023b5c: 96 07 bf f8 add %fp, -8, %o3
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023b60: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
2023b64: b8 10 00 08 mov %o0, %i4
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023b68: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
2023b6c: 80 a7 20 00 cmp %i4, 0
2023b70: 02 80 00 0f be 2023bac <rtems_rfs_rtems_file_lseek+0x98> <== ALWAYS TAKEN
2023b74: fa 02 20 7c ld [ %o0 + 0x7c ], %i5
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
2023b78: 7f ff ed 6e call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2023b7c: 01 00 00 00 nop <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023b80: 7f ff 9e 06 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023b84: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023b88: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023b8c: 12 80 00 2d bne 2023c40 <rtems_rfs_rtems_file_lseek+0x12c><== NOT EXECUTED
2023b90: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
2023b94: 40 00 05 07 call 2024fb0 <__errno> <== NOT EXECUTED
2023b98: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
2023b9c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2023ba0: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
2023ba4: 81 c7 e0 08 ret <== NOT EXECUTED
2023ba8: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
2023bac: 7f ff ed 61 call 201f130 <rtems_rfs_buffers_release>
2023bb0: 01 00 00 00 nop
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023bb4: 7f ff 9d f9 call 200b398 <rtems_semaphore_release>
2023bb8: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2023bbc: ba 92 20 00 orcc %o0, 0, %i5
2023bc0: 12 80 00 12 bne 2023c08 <rtems_rfs_rtems_file_lseek+0xf4> <== NEVER TAKEN
2023bc4: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
2023bc8: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0
}
2023bcc: 81 c7 e0 08 ret
2023bd0: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023bd4: 7f ff c1 9a call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023bd8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023bdc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023be0: 22 bf ff da be,a 2023b48 <rtems_rfs_rtems_file_lseek+0x34><== NOT EXECUTED
2023be4: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2023be8: 7f ff 89 53 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023bec: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2023bf0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023bf4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023bf8: 40 00 08 56 call 2025d50 <printf> <== NOT EXECUTED
2023bfc: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
2023c00: 10 bf ff d2 b 2023b48 <rtems_rfs_rtems_file_lseek+0x34> <== NOT EXECUTED
2023c04: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023c08: 7f ff c1 8d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023c0c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023c10: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023c14: 22 bf ff ee be,a 2023bcc <rtems_rfs_rtems_file_lseek+0xb8><== NOT EXECUTED
2023c18: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023c1c: 7f ff 89 46 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023c20: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023c24: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023c28: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023c2c: 40 00 08 49 call 2025d50 <printf> <== NOT EXECUTED
2023c30: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2023c34: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
2023c38: 81 c7 e0 08 ret <== NOT EXECUTED
2023c3c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023c40: 7f ff c1 7f call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023c44: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023c48: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023c4c: 02 bf ff d2 be 2023b94 <rtems_rfs_rtems_file_lseek+0x80> <== NOT EXECUTED
2023c50: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023c54: 7f ff 89 38 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023c58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023c5c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023c60: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023c64: 40 00 08 3b call 2025d50 <printf> <== NOT EXECUTED
2023c68: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2023c6c: 30 bf ff ca b,a 2023b94 <rtems_rfs_rtems_file_lseek+0x80><== NOT EXECUTED
02023c70 <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
2023c70: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2023c74: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2023c78: 92 10 20 00 clr %o1
2023c7c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
2023c80: 94 10 20 00 clr %o2
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
2023c84: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
2023c88: b8 10 00 18 mov %i0, %i4
2023c8c: 7f ff 9d 79 call 200b270 <rtems_semaphore_obtain>
2023c90: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2023c94: b6 92 20 00 orcc %o0, 0, %i3
2023c98: 12 80 00 27 bne 2023d34 <rtems_rfs_rtems_file_open+0xc4> <== NEVER TAKEN
2023c9c: 90 10 20 00 clr %o0
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
2023ca0: d2 07 20 1c ld [ %i4 + 0x1c ], %o1
2023ca4: 90 10 00 1d mov %i5, %o0
2023ca8: 94 10 20 00 clr %o2
2023cac: 7f ff f2 91 call 20206f0 <rtems_rfs_file_open>
2023cb0: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
2023cb4: b6 92 20 00 orcc %o0, 0, %i3
2023cb8: 04 80 00 33 ble 2023d84 <rtems_rfs_rtems_file_open+0x114> <== ALWAYS TAKEN
2023cbc: c2 07 bf fc ld [ %fp + -4 ], %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023cc0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2023cc4: 7f ff ed 1b call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2023cc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023ccc: 7f ff 9d b3 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023cd0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023cd4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023cd8: 12 80 00 07 bne 2023cf4 <rtems_rfs_rtems_file_open+0x84> <== NOT EXECUTED
2023cdc: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
2023ce0: 40 00 04 b4 call 2024fb0 <__errno> <== NOT EXECUTED
2023ce4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023ce8: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2023cec: 81 c7 e0 08 ret
2023cf0: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023cf4: 7f ff c1 52 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023cf8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023cfc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023d00: 02 bf ff f8 be 2023ce0 <rtems_rfs_rtems_file_open+0x70> <== NOT EXECUTED
2023d04: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023d08: 7f ff 89 0b call 2006134 <rtems_status_text> <== NOT EXECUTED
2023d0c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023d10: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023d14: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023d18: 40 00 08 0e call 2025d50 <printf> <== NOT EXECUTED
2023d1c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2023d20: 40 00 04 a4 call 2024fb0 <__errno> <== NOT EXECUTED
2023d24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023d28: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2023d2c: 81 c7 e0 08 ret <== NOT EXECUTED
2023d30: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023d34: 7f ff c1 42 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023d38: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023d3c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023d40: 22 bf ff d9 be,a 2023ca4 <rtems_rfs_rtems_file_open+0x34><== NOT EXECUTED
2023d44: d2 07 20 1c ld [ %i4 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2023d48: 7f ff 88 fb call 2006134 <rtems_status_text> <== NOT EXECUTED
2023d4c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2023d50: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023d54: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023d58: 40 00 07 fe call 2025d50 <printf> <== NOT EXECUTED
2023d5c: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
2023d60: d2 07 20 1c ld [ %i4 + 0x1c ], %o1 <== NOT EXECUTED
2023d64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023d68: 94 10 20 00 clr %o2 <== NOT EXECUTED
2023d6c: 7f ff f2 61 call 20206f0 <rtems_rfs_file_open> <== NOT EXECUTED
2023d70: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
2023d74: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2023d78: 34 bf ff d3 bg,a 2023cc4 <rtems_rfs_rtems_file_open+0x54><== NOT EXECUTED
2023d7c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
2023d80: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
rtems_rfs_rtems_set_iop_file_handle (iop, file);
rtems_rfs_rtems_unlock (fs);
return 0;
2023d84: b0 10 20 00 clr %i0
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
2023d88: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
2023d8c: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2023d90: 7f ff e6 fe call 201d988 <rtems_rfs_block_get_size>
2023d94: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_set_iop_file_handle (iop, file);
2023d98: c2 07 bf fc ld [ %fp + -4 ], %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2023d9c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
2023da0: d0 3f 20 08 std %o0, [ %i4 + 8 ]
rtems_rfs_rtems_set_iop_file_handle (iop, file);
2023da4: c2 27 20 20 st %g1, [ %i4 + 0x20 ]
rtems_rfs_buffers_release (fs);
2023da8: 7f ff ec e2 call 201f130 <rtems_rfs_buffers_release>
2023dac: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023db0: 7f ff 9d 7a call 200b398 <rtems_semaphore_release>
2023db4: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2023db8: ba 92 20 00 orcc %o0, 0, %i5
2023dbc: 02 bf ff cc be 2023cec <rtems_rfs_rtems_file_open+0x7c> <== ALWAYS TAKEN
2023dc0: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023dc4: 7f ff c1 1e call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023dc8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023dcc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023dd0: 02 80 00 08 be 2023df0 <rtems_rfs_rtems_file_open+0x180> <== NOT EXECUTED
2023dd4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023dd8: 7f ff 88 d7 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023ddc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023de0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023de4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023de8: 40 00 07 da call 2025d50 <printf> <== NOT EXECUTED
2023dec: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
2023df0: 81 c7 e0 08 ret <== NOT EXECUTED
2023df4: 81 e8 00 00 restore <== NOT EXECUTED
020234c4 <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
20234c4: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
20234c8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20234cc: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
20234d0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20234d4: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20234d8: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
20234dc: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
20234e0: 7f ff 9f 64 call 200b270 <rtems_semaphore_obtain>
20234e4: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20234e8: b8 92 20 00 orcc %o0, 0, %i4
20234ec: 12 80 00 5b bne 2023658 <rtems_rfs_rtems_file_read+0x194> <== NEVER TAKEN
20234f0: 90 10 20 00 clr %o0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
20234f4: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
20234f8: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
20234fc: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2023500: f0 06 20 14 ld [ %i0 + 0x14 ], %i0
2023504: 7f ff e9 21 call 201d988 <rtems_rfs_block_get_size>
2023508: 92 02 60 84 add %o1, 0x84, %o1
if (pos < rtems_rfs_file_size (file))
202350c: 80 a2 00 1c cmp %o0, %i4
2023510: 08 80 00 43 bleu 202361c <rtems_rfs_rtems_file_read+0x158><== ALWAYS TAKEN
2023514: 01 00 00 00 nop
{
while (count)
2023518: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
202351c: 12 80 00 16 bne 2023574 <rtems_rfs_rtems_file_read+0xb0> <== ALWAYS TAKEN
2023520: b0 10 20 00 clr %i0
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023524: 10 80 00 29 b 20235c8 <rtems_rfs_rtems_file_read+0x104> <== NOT EXECUTED
2023528: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
202352c: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2023530: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2023534: d2 00 a0 24 ld [ %g2 + 0x24 ], %o1
2023538: 90 10 00 19 mov %i1, %o0
202353c: 92 02 40 01 add %o1, %g1, %o1
2023540: 40 00 09 26 call 20259d8 <memcpy>
2023544: 94 10 00 1c mov %i4, %o2
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
2023548: 90 10 00 1d mov %i5, %o0
202354c: 92 10 00 1c mov %i4, %o1
2023550: 94 10 20 01 mov 1, %o2
2023554: 7f ff f6 87 call 2020f70 <rtems_rfs_file_io_end>
2023558: b2 06 40 1c add %i1, %i4, %i1
if (rc > 0)
202355c: 80 a2 20 00 cmp %o0, 0
2023560: 14 80 00 16 bg 20235b8 <rtems_rfs_rtems_file_read+0xf4> <== NEVER TAKEN
2023564: b6 10 00 08 mov %o0, %i3
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
2023568: 80 a6 a0 00 cmp %i2, 0
202356c: 02 80 00 16 be 20235c4 <rtems_rfs_rtems_file_read+0x100> <== ALWAYS TAKEN
2023570: b0 07 00 18 add %i4, %i0, %i0
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
2023574: 92 07 bf fc add %fp, -4, %o1
2023578: 94 10 20 01 mov 1, %o2
202357c: 7f ff f5 f0 call 2020d3c <rtems_rfs_file_io_start>
2023580: 90 10 00 1d mov %i5, %o0
if (rc > 0)
2023584: b8 92 20 00 orcc %o0, 0, %i4
2023588: 14 80 00 41 bg 202368c <rtems_rfs_rtems_file_read+0x1c8> <== NEVER TAKEN
202358c: 01 00 00 00 nop
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
2023590: f8 07 bf fc ld [ %fp + -4 ], %i4
2023594: 80 a7 20 00 cmp %i4, 0
2023598: 02 80 00 0b be 20235c4 <rtems_rfs_rtems_file_read+0x100> <== NEVER TAKEN
202359c: 80 a7 00 1a cmp %i4, %i2
break;
if (size > count)
20235a0: 28 bf ff e3 bleu,a 202352c <rtems_rfs_rtems_file_read+0x68><== ALWAYS TAKEN
20235a4: b4 26 80 1c sub %i2, %i4, %i2
size = count;
20235a8: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
20235ac: f4 27 bf fc st %i2, [ %fp + -4 ] <== NOT EXECUTED
20235b0: 10 bf ff df b 202352c <rtems_rfs_rtems_file_read+0x68> <== NOT EXECUTED
20235b4: b4 10 20 00 clr %i2 <== NOT EXECUTED
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
20235b8: 40 00 06 7e call 2024fb0 <__errno> <== NOT EXECUTED
20235bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20235c0: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20235c4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20235c8: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
20235cc: 7f ff ee d9 call 201f130 <rtems_rfs_buffers_release>
20235d0: fa 02 20 7c ld [ %o0 + 0x7c ], %i5
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20235d4: 7f ff 9f 71 call 200b398 <rtems_semaphore_release>
20235d8: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20235dc: ba 92 20 00 orcc %o0, 0, %i5
20235e0: 02 80 00 0d be 2023614 <rtems_rfs_rtems_file_read+0x150> <== ALWAYS TAKEN
20235e4: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20235e8: 7f ff c3 15 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20235ec: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20235f0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20235f4: 02 80 00 08 be 2023614 <rtems_rfs_rtems_file_read+0x150> <== NOT EXECUTED
20235f8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20235fc: 7f ff 8a ce call 2006134 <rtems_status_text> <== NOT EXECUTED
2023600: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023604: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023608: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
202360c: 40 00 09 d1 call 2025d50 <printf> <== NOT EXECUTED
2023610: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
return read;
}
2023614: 81 c7 e0 08 ret
2023618: 81 e8 00 00 restore
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
202361c: 12 80 00 04 bne 202362c <rtems_rfs_rtems_file_read+0x168> <== NEVER TAKEN
2023620: 80 a2 40 18 cmp %o1, %i0
2023624: 18 bf ff be bgu 202351c <rtems_rfs_rtems_file_read+0x58> <== ALWAYS TAKEN
2023628: 80 a6 a0 00 cmp %i2, 0
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
202362c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
size_t count)
{
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
rtems_rfs_pos pos;
uint8_t* data = buffer;
ssize_t read = 0;
2023630: b0 10 20 00 clr %i0 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023634: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
2023638: 7f ff ee be call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
202363c: fa 02 20 7c ld [ %o0 + 0x7c ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023640: 7f ff 9f 56 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023644: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023648: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
202364c: 02 bf ff f2 be 2023614 <rtems_rfs_rtems_file_read+0x150> <== NOT EXECUTED
2023650: 90 10 20 00 clr %o0 <== NOT EXECUTED
2023654: 30 bf ff e5 b,a 20235e8 <rtems_rfs_rtems_file_read+0x124><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023658: 7f ff c2 f9 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202365c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023660: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023664: 22 bf ff a5 be,a 20234f8 <rtems_rfs_rtems_file_read+0x34><== NOT EXECUTED
2023668: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
202366c: 7f ff 8a b2 call 2006134 <rtems_status_text> <== NOT EXECUTED
2023670: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2023674: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023678: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
202367c: 40 00 09 b5 call 2025d50 <printf> <== NOT EXECUTED
2023680: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2023684: 10 bf ff 9d b 20234f8 <rtems_rfs_rtems_file_read+0x34> <== NOT EXECUTED
2023688: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
202368c: 40 00 06 49 call 2024fb0 <__errno> <== NOT EXECUTED
2023690: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023694: 10 bf ff cc b 20235c4 <rtems_rfs_rtems_file_read+0x100> <== NOT EXECUTED
2023698: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
0202388c <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
202388c: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2023890: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2023894: 92 10 20 00 clr %o1
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
2023898: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
202389c: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20238a0: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_rfs_rtems_rmnod
};
20238a4: c2 00 60 7c ld [ %g1 + 0x7c ], %g1
20238a8: 7f ff 9e 72 call 200b270 <rtems_semaphore_obtain>
20238ac: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20238b0: ba 92 20 00 orcc %o0, 0, %i5
20238b4: 12 80 00 60 bne 2023a34 <rtems_rfs_rtems_file_write+0x1a8><== NEVER TAKEN
20238b8: 90 10 20 00 clr %o0
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
20238bc: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
20238c0: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
20238c4: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
20238c8: 7f ff e8 30 call 201d988 <rtems_rfs_block_get_size>
20238cc: 92 02 60 84 add %o1, 0x84, %o1
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
20238d0: 80 a2 00 1c cmp %o0, %i4
20238d4: 38 80 00 0e bgu,a 202390c <rtems_rfs_rtems_file_write+0x80><== NEVER TAKEN
20238d8: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
20238dc: 80 a2 00 1c cmp %o0, %i4
20238e0: 02 80 00 48 be 2023a00 <rtems_rfs_rtems_file_write+0x174> <== ALWAYS TAKEN
20238e4: 80 a2 40 1d cmp %o1, %i5
{
rc = rtems_rfs_file_set_size (file, pos + 1);
20238e8: 86 87 60 01 addcc %i5, 1, %g3 <== NOT EXECUTED
20238ec: 84 47 20 00 addx %i4, 0, %g2 <== NOT EXECUTED
20238f0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20238f4: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
20238f8: 7f ff f6 8d call 202132c <rtems_rfs_file_set_size> <== NOT EXECUTED
20238fc: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
if (rc)
2023900: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
2023904: 12 80 00 67 bne 2023aa0 <rtems_rfs_rtems_file_write+0x214><== NOT EXECUTED
2023908: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
}
rtems_rfs_file_set_bpos (file, pos);
202390c: 94 10 00 1d mov %i5, %o2
2023910: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2023914: 92 10 00 1c mov %i4, %o1
2023918: 7f ff e7 ed call 201d8cc <rtems_rfs_block_get_bpos>
202391c: 96 06 e0 10 add %i3, 0x10, %o3
while (count)
2023920: 80 a6 a0 00 cmp %i2, 0
2023924: 12 80 00 07 bne 2023940 <rtems_rfs_rtems_file_write+0xb4> <== ALWAYS TAKEN
2023928: ba 10 20 00 clr %i5
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
202392c: 10 80 00 26 b 20239c4 <rtems_rfs_rtems_file_write+0x138> <== NOT EXECUTED
2023930: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
2023934: b4 a6 80 1c subcc %i2, %i4, %i2
2023938: 02 80 00 22 be 20239c0 <rtems_rfs_rtems_file_write+0x134> <== ALWAYS TAKEN
202393c: ba 07 40 1c add %i5, %i4, %i5
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
2023940: 92 07 bf fc add %fp, -4, %o1
rtems_rfs_file_set_bpos (file, pos);
while (count)
{
size_t size = count;
2023944: f4 27 bf fc st %i2, [ %fp + -4 ]
rc = rtems_rfs_file_io_start (file, &size, false);
2023948: 94 10 20 00 clr %o2
202394c: 7f ff f4 fc call 2020d3c <rtems_rfs_file_io_start>
2023950: 90 10 00 1b mov %i3, %o0
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
2023954: 92 10 00 19 mov %i1, %o1
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
2023958: 80 a2 20 00 cmp %o0, 0
202395c: 12 80 00 5e bne 2023ad4 <rtems_rfs_rtems_file_write+0x248><== NEVER TAKEN
2023960: b8 10 00 08 mov %o0, %i4
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
2023964: d4 07 bf fc ld [ %fp + -4 ], %o2
2023968: 80 a2 80 1a cmp %o2, %i2
202396c: 28 80 00 05 bleu,a 2023980 <rtems_rfs_rtems_file_write+0xf4><== NEVER TAKEN
2023970: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 <== NOT EXECUTED
size = count;
2023974: f4 27 bf fc st %i2, [ %fp + -4 ]
2023978: 94 10 00 1a mov %i2, %o2
memcpy (rtems_rfs_file_data (file), data, size);
202397c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
2023980: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1
2023984: d0 00 a0 24 ld [ %g2 + 0x24 ], %o0
2023988: 40 00 08 14 call 20259d8 <memcpy>
202398c: 90 02 00 01 add %o0, %g1, %o0
data += size;
2023990: f8 07 bf fc ld [ %fp + -4 ], %i4
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
2023994: 90 10 00 1b mov %i3, %o0
2023998: 92 10 00 1c mov %i4, %o1
202399c: 94 10 20 00 clr %o2
20239a0: 7f ff f5 74 call 2020f70 <rtems_rfs_file_io_end>
20239a4: b2 06 40 1c add %i1, %i4, %i1
if (rc)
20239a8: 80 a2 20 00 cmp %o0, 0
20239ac: 02 bf ff e2 be 2023934 <rtems_rfs_rtems_file_write+0xa8> <== ALWAYS TAKEN
20239b0: a0 10 00 08 mov %o0, %l0
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
20239b4: 40 00 05 7f call 2024fb0 <__errno> <== NOT EXECUTED
20239b8: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
20239bc: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
break;
}
}
iop->size = rtems_rfs_file_size (file);
20239c0: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
20239c4: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
20239c8: 7f ff e7 f0 call 201d988 <rtems_rfs_block_get_size>
20239cc: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20239d0: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
20239d4: d0 3e 20 08 std %o0, [ %i0 + 8 ]
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20239d8: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
20239dc: 7f ff ed d5 call 201f130 <rtems_rfs_buffers_release>
20239e0: f8 02 20 7c ld [ %o0 + 0x7c ], %i4
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20239e4: 7f ff 9e 6d call 200b398 <rtems_semaphore_release>
20239e8: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20239ec: b8 92 20 00 orcc %o0, 0, %i4
20239f0: 12 80 00 1e bne 2023a68 <rtems_rfs_rtems_file_write+0x1dc><== NEVER TAKEN
20239f4: 90 10 20 00 clr %o0
return write;
}
20239f8: 81 c7 e0 08 ret
20239fc: 91 e8 00 1d restore %g0, %i5, %o0
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
2023a00: 38 bf ff c3 bgu,a 202390c <rtems_rfs_rtems_file_write+0x80>
2023a04: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
{
rc = rtems_rfs_file_set_size (file, pos + 1);
2023a08: 86 87 60 01 addcc %i5, 1, %g3
2023a0c: 84 47 20 00 addx %i4, 0, %g2
2023a10: 90 10 00 1b mov %i3, %o0
2023a14: 92 10 00 02 mov %g2, %o1
2023a18: 7f ff f6 45 call 202132c <rtems_rfs_file_set_size>
2023a1c: 94 10 00 03 mov %g3, %o2
if (rc)
2023a20: a0 92 20 00 orcc %o0, 0, %l0
2023a24: 02 bf ff ba be 202390c <rtems_rfs_rtems_file_write+0x80> <== ALWAYS TAKEN
2023a28: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023a2c: 10 80 00 1e b 2023aa4 <rtems_rfs_rtems_file_write+0x218> <== NOT EXECUTED
2023a30: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023a34: 7f ff c2 02 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023a38: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023a3c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023a40: 22 bf ff a0 be,a 20238c0 <rtems_rfs_rtems_file_write+0x34><== NOT EXECUTED
2023a44: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2023a48: 7f ff 89 bb call 2006134 <rtems_status_text> <== NOT EXECUTED
2023a4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023a50: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023a54: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023a58: 40 00 08 be call 2025d50 <printf> <== NOT EXECUTED
2023a5c: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
2023a60: 10 bf ff 98 b 20238c0 <rtems_rfs_rtems_file_write+0x34> <== NOT EXECUTED
2023a64: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023a68: 7f ff c1 f5 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023a6c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023a70: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023a74: 02 bf ff e1 be 20239f8 <rtems_rfs_rtems_file_write+0x16c> <== NOT EXECUTED
2023a78: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023a7c: 7f ff 89 ae call 2006134 <rtems_status_text> <== NOT EXECUTED
2023a80: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
2023a84: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED
2023a88: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023a8c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023a90: 40 00 08 b0 call 2025d50 <printf> <== NOT EXECUTED
2023a94: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2023a98: 81 c7 e0 08 ret <== NOT EXECUTED
2023a9c: 81 e8 00 00 restore <== NOT EXECUTED
if (pos >= rtems_rfs_file_size (file))
{
rc = rtems_rfs_file_set_size (file, pos + 1);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2023aa0: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
2023aa4: 7f ff ed a3 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2023aa8: fa 02 20 7c ld [ %o0 + 0x7c ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2023aac: 7f ff 9e 3b call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2023ab0: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023ab4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023ab8: 12 80 00 0b bne 2023ae4 <rtems_rfs_rtems_file_write+0x258><== NOT EXECUTED
2023abc: 90 10 20 00 clr %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
2023ac0: 40 00 05 3c call 2024fb0 <__errno> <== NOT EXECUTED
2023ac4: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
2023ac8: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
2023acc: 81 c7 e0 08 ret <== NOT EXECUTED
2023ad0: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
2023ad4: 40 00 05 37 call 2024fb0 <__errno> <== NOT EXECUTED
2023ad8: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
2023adc: 10 bf ff b9 b 20239c0 <rtems_rfs_rtems_file_write+0x134> <== NOT EXECUTED
2023ae0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2023ae4: 7f ff c1 d6 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2023ae8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2023aec: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2023af0: 02 bf ff f4 be 2023ac0 <rtems_rfs_rtems_file_write+0x234> <== NOT EXECUTED
2023af4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2023af8: 7f ff 89 8f call 2006134 <rtems_status_text> <== NOT EXECUTED
2023afc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023b00: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2023b04: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2023b08: 40 00 08 92 call 2025d50 <printf> <== NOT EXECUTED
2023b0c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2023b10: 30 bf ff ec b,a 2023ac0 <rtems_rfs_rtems_file_write+0x234><== NOT EXECUTED
02012460 <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
2012460: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012464: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012468: f8 06 00 00 ld [ %i0 ], %i4
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
201246c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012470: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2012474: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2012478: 94 10 20 00 clr %o2
201247c: 7f ff e3 7d call 200b270 <rtems_semaphore_obtain>
2012480: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2012484: b6 92 20 00 orcc %o0, 0, %i3
2012488: 12 80 00 8b bne 20126b4 <rtems_rfs_rtems_fstat+0x254> <== NEVER TAKEN
201248c: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012490: 92 10 00 1c mov %i4, %o1
2012494: 90 10 00 1d mov %i5, %o0
2012498: 94 07 bf d8 add %fp, -40, %o2
201249c: 7f ff fa 8c call 2010ecc <rtems_rfs_inode_open>
20124a0: 96 10 20 01 mov 1, %o3
if (rc)
20124a4: b8 92 20 00 orcc %o0, 0, %i4
20124a8: 12 80 00 61 bne 201262c <rtems_rfs_rtems_fstat+0x1cc> <== NEVER TAKEN
20124ac: c2 07 bf e4 ld [ %fp + -28 ], %g1
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
20124b0: 07 00 00 18 sethi %hi(0x6000), %g3
20124b4: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
20124b8: d0 08 60 02 ldub [ %g1 + 2 ], %o0
20124bc: 91 2a 20 08 sll %o0, 8, %o0
20124c0: 90 10 80 08 or %g2, %o0, %o0
20124c4: 05 00 00 3c sethi %hi(0xf000), %g2
20124c8: 84 0a 00 02 and %o0, %g2, %g2
20124cc: 80 a0 80 03 cmp %g2, %g3
20124d0: 12 80 00 64 bne 2012660 <rtems_rfs_rtems_fstat+0x200> <== ALWAYS TAKEN
20124d4: 07 00 00 08 sethi %hi(0x2000), %g3
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
20124d8: da 08 60 21 ldub [ %g1 + 0x21 ], %o5 <== NOT EXECUTED
20124dc: c6 08 60 20 ldub [ %g1 + 0x20 ], %g3 <== NOT EXECUTED
20124e0: de 08 60 23 ldub [ %g1 + 0x23 ], %o7 <== NOT EXECUTED
20124e4: f6 08 60 22 ldub [ %g1 + 0x22 ], %i3 <== NOT EXECUTED
20124e8: f8 08 60 1c ldub [ %g1 + 0x1c ], %i4 <== NOT EXECUTED
20124ec: f0 08 60 1d ldub [ %g1 + 0x1d ], %i0 <== NOT EXECUTED
20124f0: c8 08 60 1f ldub [ %g1 + 0x1f ], %g4 <== NOT EXECUTED
20124f4: c4 08 60 1e ldub [ %g1 + 0x1e ], %g2 <== NOT EXECUTED
20124f8: 83 2b 60 10 sll %o5, 0x10, %g1 <== NOT EXECUTED
20124fc: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
2012500: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
2012504: 86 10 c0 01 or %g3, %g1, %g3 <== NOT EXECUTED
2012508: b9 2f 20 18 sll %i4, 0x18, %i4 <== NOT EXECUTED
201250c: 86 10 c0 0f or %g3, %o7, %g3 <== NOT EXECUTED
2012510: 83 2e 20 10 sll %i0, 0x10, %g1 <== NOT EXECUTED
2012514: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED
2012518: 82 17 00 01 or %i4, %g1, %g1 <== NOT EXECUTED
201251c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2012520: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
{
buf->st_rdev =
2012524: c6 26 60 1c st %g3, [ %i1 + 0x1c ] <== NOT EXECUTED
2012528: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
201252c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
2012530: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
2012534: c4 18 40 00 ldd [ %g1 ], %g2
buf->st_ino = rtems_rfs_inode_ino (&inode);
2012538: c2 07 bf e0 ld [ %fp + -32 ], %g1
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
201253c: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
2012540: 40 00 07 3d call 2014234 <rtems_rfs_rtems_mode>
2012544: c2 26 60 08 st %g1, [ %i1 + 8 ]
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
2012548: c2 07 bf e4 ld [ %fp + -28 ], %g1
201254c: d0 26 60 0c st %o0, [ %i1 + 0xc ]
2012550: c6 08 60 01 ldub [ %g1 + 1 ], %g3
2012554: c4 08 40 00 ldub [ %g1 ], %g2
if (links == 0xffff)
links = 0;
2012558: 09 3f ff c0 sethi %hi(0xffff0000), %g4
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
201255c: 85 28 a0 08 sll %g2, 8, %g2
2012560: 84 10 80 03 or %g2, %g3, %g2
if (links == 0xffff)
2012564: 87 28 a0 10 sll %g2, 0x10, %g3
2012568: 87 30 e0 10 srl %g3, 0x10, %g3
links = 0;
201256c: 86 39 00 03 xnor %g4, %g3, %g3
2012570: 80 a0 00 03 cmp %g0, %g3
2012574: 86 60 20 00 subx %g0, 0, %g3
2012578: 84 08 80 03 and %g2, %g3, %g2
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
201257c: c4 36 60 10 sth %g2, [ %i1 + 0x10 ]
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
2012580: c4 08 60 06 ldub [ %g1 + 6 ], %g2
2012584: c6 08 60 07 ldub [ %g1 + 7 ], %g3
2012588: 85 28 a0 08 sll %g2, 8, %g2
201258c: 84 10 80 03 or %g2, %g3, %g2
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
2012590: c4 36 60 12 sth %g2, [ %i1 + 0x12 ]
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
2012594: c4 08 60 04 ldub [ %g1 + 4 ], %g2
2012598: c2 08 60 05 ldub [ %g1 + 5 ], %g1
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
201259c: d2 07 bf e0 ld [ %fp + -32 ], %o1
20125a0: 85 28 a0 18 sll %g2, 0x18, %g2
20125a4: 83 28 60 10 sll %g1, 0x10, %g1
20125a8: 82 10 80 01 or %g2, %g1, %g1
20125ac: 83 30 60 10 srl %g1, 0x10, %g1
20125b0: 90 10 00 1d mov %i5, %o0
20125b4: 40 00 3c 27 call 2021650 <rtems_rfs_file_get_shared>
20125b8: c2 36 60 14 sth %g1, [ %i1 + 0x14 ]
if (shared)
20125bc: 92 92 20 00 orcc %o0, 0, %o1
20125c0: 02 80 00 6c be 2012770 <rtems_rfs_rtems_fstat+0x310> <== ALWAYS TAKEN
20125c4: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
20125c8: c2 02 60 84 ld [ %o1 + 0x84 ], %g1 <== NOT EXECUTED
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
20125cc: f8 02 60 8c ld [ %o1 + 0x8c ], %i4 <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
20125d0: c8 02 60 90 ld [ %o1 + 0x90 ], %g4 <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
20125d4: c6 02 60 94 ld [ %o1 + 0x94 ], %g3 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
20125d8: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
20125dc: c2 26 60 44 st %g1, [ %i1 + 0x44 ] <== NOT EXECUTED
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
20125e0: f8 26 60 28 st %i4, [ %i1 + 0x28 ] <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
20125e4: 03 00 00 3c sethi %hi(0xf000), %g1 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
20125e8: c8 26 60 30 st %g4, [ %i1 + 0x30 ] <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
20125ec: 84 08 80 01 and %g2, %g1, %g2 <== NOT EXECUTED
20125f0: 03 00 00 28 sethi %hi(0xa000), %g1 <== NOT EXECUTED
20125f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20125f8: 12 80 00 3c bne 20126e8 <rtems_rfs_rtems_fstat+0x288> <== NOT EXECUTED
20125fc: c6 26 60 38 st %g3, [ %i1 + 0x38 ] <== NOT EXECUTED
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
2012600: c2 12 60 8a lduh [ %o1 + 0x8a ], %g1 <== NOT EXECUTED
2012604: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
2012608: c2 26 60 24 st %g1, [ %i1 + 0x24 ] <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
201260c: c2 07 60 08 ld [ %i5 + 8 ], %g1
rc = rtems_rfs_inode_close (fs, &inode);
2012610: 90 10 00 1d mov %i5, %o0
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
2012614: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
rc = rtems_rfs_inode_close (fs, &inode);
2012618: 7f ff fa a4 call 20110a8 <rtems_rfs_inode_close>
201261c: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
2012620: b8 92 20 00 orcc %o0, 0, %i4
2012624: 24 80 00 3e ble,a 201271c <rtems_rfs_rtems_fstat+0x2bc> <== ALWAYS TAKEN
2012628: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201262c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012630: 40 00 32 c0 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012634: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012638: 7f ff e3 58 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201263c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012640: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012644: 12 80 00 0c bne 2012674 <rtems_rfs_rtems_fstat+0x214> <== NOT EXECUTED
2012648: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
201264c: 40 00 4a 59 call 2024fb0 <__errno> <== NOT EXECUTED
2012650: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012654: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012658: 81 c7 e0 08 ret
201265c: 81 e8 00 00 restore
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
2012660: 80 a0 80 03 cmp %g2, %g3
2012664: 32 bf ff b4 bne,a 2012534 <rtems_rfs_rtems_fstat+0xd4> <== ALWAYS TAKEN
2012668: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
201266c: 10 bf ff 9c b 20124dc <rtems_rfs_rtems_fstat+0x7c> <== NOT EXECUTED
2012670: da 08 60 21 ldub [ %g1 + 0x21 ], %o5 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012674: 40 00 06 f2 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012678: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
201267c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012680: 02 bf ff f3 be 201264c <rtems_rfs_rtems_fstat+0x1ec> <== NOT EXECUTED
2012684: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012688: 7f ff ce ab call 2006134 <rtems_status_text> <== NOT EXECUTED
201268c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012690: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012694: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012698: 40 00 4d ae call 2025d50 <printf> <== NOT EXECUTED
201269c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
20126a0: 40 00 4a 44 call 2024fb0 <__errno> <== NOT EXECUTED
20126a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20126a8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20126ac: 81 c7 e0 08 ret <== NOT EXECUTED
20126b0: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20126b4: 40 00 06 e2 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20126b8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20126bc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20126c0: 22 bf ff 75 be,a 2012494 <rtems_rfs_rtems_fstat+0x34> <== NOT EXECUTED
20126c4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20126c8: 7f ff ce 9b call 2006134 <rtems_status_text> <== NOT EXECUTED
20126cc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20126d0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20126d4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20126d8: 40 00 4d 9e call 2025d50 <printf> <== NOT EXECUTED
20126dc: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20126e0: 10 bf ff 6d b 2012494 <rtems_rfs_rtems_fstat+0x34> <== NOT EXECUTED
20126e4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
*/
static inline rtems_rfs_pos
rtems_rfs_file_shared_get_size (rtems_rfs_file_system* fs,
rtems_rfs_file_shared* shared)
{
return rtems_rfs_block_get_size (fs, &shared->size);
20126e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20126ec: 40 00 2c a7 call 201d988 <rtems_rfs_block_get_size> <== NOT EXECUTED
20126f0: 92 02 60 84 add %o1, 0x84, %o1 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
20126f4: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
20126f8: d0 3e 60 20 std %o0, [ %i1 + 0x20 ] <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
20126fc: c2 26 60 40 st %g1, [ %i1 + 0x40 ] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
2012700: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012704: 7f ff fa 69 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2012708: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
if (rc > 0)
201270c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2012710: 34 bf ff c8 bg,a 2012630 <rtems_rfs_rtems_fstat+0x1d0> <== NOT EXECUTED
2012714: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012718: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
201271c: 40 00 32 85 call 201f130 <rtems_rfs_buffers_release>
2012720: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012724: d0 07 00 00 ld [ %i4 ], %o0
2012728: 7f ff e3 1c call 200b398 <rtems_semaphore_release>
201272c: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2012730: ba 92 20 00 orcc %o0, 0, %i5
2012734: 02 bf ff c9 be 2012658 <rtems_rfs_rtems_fstat+0x1f8> <== ALWAYS TAKEN
2012738: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201273c: 40 00 06 c0 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012740: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012744: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012748: 02 80 00 08 be 2012768 <rtems_rfs_rtems_fstat+0x308> <== NOT EXECUTED
201274c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012750: 7f ff ce 79 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012754: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012758: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201275c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012760: 40 00 4d 7c call 2025d50 <printf> <== NOT EXECUTED
2012764: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2012768: 81 c7 e0 08 ret <== NOT EXECUTED
201276c: 81 e8 00 00 restore <== NOT EXECUTED
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
2012770: c6 06 60 0c ld [ %i1 + 0xc ], %g3
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
2012774: f8 08 60 13 ldub [ %g1 + 0x13 ], %i4
2012778: c4 08 60 10 ldub [ %g1 + 0x10 ], %g2
201277c: f6 08 60 11 ldub [ %g1 + 0x11 ], %i3
2012780: c8 08 60 12 ldub [ %g1 + 0x12 ], %g4
2012784: b7 2e e0 10 sll %i3, 0x10, %i3
2012788: 89 29 20 08 sll %g4, 8, %g4
201278c: 85 28 a0 18 sll %g2, 0x18, %g2
2012790: 84 10 80 1b or %g2, %i3, %g2
2012794: 84 10 80 1c or %g2, %i4, %g2
2012798: 84 10 80 04 or %g2, %g4, %g2
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
201279c: c4 26 60 28 st %g2, [ %i1 + 0x28 ]
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
20127a0: f8 08 60 17 ldub [ %g1 + 0x17 ], %i4
20127a4: c4 08 60 14 ldub [ %g1 + 0x14 ], %g2
20127a8: f6 08 60 15 ldub [ %g1 + 0x15 ], %i3
20127ac: c8 08 60 16 ldub [ %g1 + 0x16 ], %g4
20127b0: b7 2e e0 10 sll %i3, 0x10, %i3
20127b4: 89 29 20 08 sll %g4, 8, %g4
20127b8: 85 28 a0 18 sll %g2, 0x18, %g2
20127bc: 84 10 80 1b or %g2, %i3, %g2
20127c0: 84 10 80 1c or %g2, %i4, %g2
20127c4: 84 10 80 04 or %g2, %g4, %g2
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
20127c8: c4 26 60 30 st %g2, [ %i1 + 0x30 ]
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
20127cc: f8 08 60 1b ldub [ %g1 + 0x1b ], %i4
20127d0: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2
20127d4: f6 08 60 19 ldub [ %g1 + 0x19 ], %i3
20127d8: c8 08 60 1a ldub [ %g1 + 0x1a ], %g4
20127dc: b7 2e e0 10 sll %i3, 0x10, %i3
20127e0: 89 29 20 08 sll %g4, 8, %g4
20127e4: 85 28 a0 18 sll %g2, 0x18, %g2
20127e8: 84 10 80 1b or %g2, %i3, %g2
20127ec: 84 10 80 1c or %g2, %i4, %g2
20127f0: 84 10 80 04 or %g2, %g4, %g2
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
20127f4: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
20127f8: c4 08 60 0c ldub [ %g1 + 0xc ], %g2
20127fc: f6 08 60 0d ldub [ %g1 + 0xd ], %i3
2012800: f8 08 60 0f ldub [ %g1 + 0xf ], %i4
2012804: c8 08 60 0e ldub [ %g1 + 0xe ], %g4
2012808: 85 28 a0 18 sll %g2, 0x18, %g2
201280c: b7 2e e0 10 sll %i3, 0x10, %i3
2012810: 89 29 20 08 sll %g4, 8, %g4
2012814: 84 10 80 1b or %g2, %i3, %g2
2012818: 84 10 80 1c or %g2, %i4, %g2
201281c: 84 10 80 04 or %g2, %g4, %g2
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
2012820: c4 26 60 44 st %g2, [ %i1 + 0x44 ]
if (S_ISLNK (buf->st_mode))
2012824: 05 00 00 3c sethi %hi(0xf000), %g2
2012828: 86 08 c0 02 and %g3, %g2, %g3
201282c: 05 00 00 28 sethi %hi(0xa000), %g2
2012830: 80 a0 c0 02 cmp %g3, %g2
2012834: 12 80 00 09 bne 2012858 <rtems_rfs_rtems_fstat+0x3f8>
2012838: 90 10 00 1d mov %i5, %o0
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
201283c: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
2012840: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
2012844: c0 26 60 20 clr [ %i1 + 0x20 ]
2012848: 83 28 e0 08 sll %g3, 8, %g1
201284c: 82 10 80 01 or %g2, %g1, %g1
2012850: 10 bf ff 6f b 201260c <rtems_rfs_rtems_fstat+0x1ac>
2012854: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
2012858: 7f ff fc 21 call 20118dc <rtems_rfs_inode_get_size>
201285c: 92 07 bf d8 add %fp, -40, %o1
2012860: 10 bf ff 6b b 201260c <rtems_rfs_rtems_fstat+0x1ac>
2012864: d0 3e 60 20 std %o0, [ %i1 + 0x20 ]
02012cf0 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
2012cf0: 9d e3 bf 98 save %sp, -104, %sp
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
2012cf4: a2 10 20 05 mov 5, %l1
2012cf8: 80 a6 60 00 cmp %i1, 0
2012cfc: 02 80 00 1f be 2012d78 <rtems_rfs_rtems_initialise+0x88> <== ALWAYS TAKEN
2012d00: b8 10 20 00 clr %i4
{
printf ("options=%s\n", options);
2012d04: 37 00 80 d9 sethi %hi(0x2036400), %i3 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
2012d08: 3b 00 80 d9 sethi %hi(0x2036400), %i5 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
2012d0c: 35 00 80 d9 sethi %hi(0x2036400), %i2 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
2012d10: 21 00 80 d9 sethi %hi(0x2036400), %l0 <== NOT EXECUTED
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
2012d14: b6 16 e3 88 or %i3, 0x388, %i3 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
2012d18: ba 17 63 98 or %i5, 0x398, %i5 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
2012d1c: b4 16 a3 a8 or %i2, 0x3a8, %i2 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
2012d20: a0 14 23 b8 or %l0, 0x3b8, %l0 <== NOT EXECUTED
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
2012d24: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2012d28: 40 00 4c 0a call 2025d50 <printf> <== NOT EXECUTED
2012d2c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
2012d30: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2012d34: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2012d38: 40 00 4f e5 call 2026ccc <strncmp> <== NOT EXECUTED
2012d3c: 94 10 20 0c mov 0xc, %o2 <== NOT EXECUTED
2012d40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012d44: 12 80 00 1e bne 2012dbc <rtems_rfs_rtems_initialise+0xcc> <== NOT EXECUTED
2012d48: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
2012d4c: b8 17 20 01 or %i4, 1, %i4 <== NOT EXECUTED
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
2012d50: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2012d54: 40 00 4d 49 call 2026278 <strchr> <== NOT EXECUTED
2012d58: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED
if (options)
2012d5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012d60: 02 80 00 06 be 2012d78 <rtems_rfs_rtems_initialise+0x88> <== NOT EXECUTED
2012d64: 01 00 00 00 nop <== NOT EXECUTED
{
++options;
if (*options == '\0')
2012d68: c2 4a 20 01 ldsb [ %o0 + 1 ], %g1 <== NOT EXECUTED
2012d6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012d70: 12 80 00 1b bne 2012ddc <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
2012d74: b2 82 20 01 addcc %o0, 1, %i1 <== NOT EXECUTED
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
2012d78: 7f ff d0 1a call 2006de0 <malloc>
2012d7c: 90 10 20 04 mov 4, %o0
if (!rtems)
2012d80: ba 92 20 00 orcc %o0, 0, %i5
2012d84: 02 80 00 74 be 2012f54 <rtems_rfs_rtems_initialise+0x264> <== NEVER TAKEN
2012d88: 01 00 00 00 nop
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
rc = rtems_rfs_mutex_create (&rtems->access);
2012d8c: 40 00 3f 47 call 2022aa8 <rtems_rfs_mutex_create>
2012d90: c0 27 40 00 clr [ %i5 ]
if (rc > 0)
2012d94: b6 92 20 00 orcc %o0, 0, %i3
2012d98: 24 80 00 1f ble,a 2012e14 <rtems_rfs_rtems_initialise+0x124><== ALWAYS TAKEN
2012d9c: d0 07 40 00 ld [ %i5 ], %o0
{
free (rtems);
2012da0: 7f ff cd ee call 2006558 <free> <== NOT EXECUTED
2012da4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
2012da8: 40 00 48 82 call 2024fb0 <__errno> <== NOT EXECUTED
2012dac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012db0: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2012db4: 81 c7 e0 08 ret
2012db8: 81 e8 00 00 restore
{
printf ("options=%s\n", options);
if (strncmp (options, "hold-bitmaps",
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
2012dbc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2012dc0: 40 00 4f c3 call 2026ccc <strncmp> <== NOT EXECUTED
2012dc4: 94 10 20 0e mov 0xe, %o2 <== NOT EXECUTED
2012dc8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012dcc: 12 80 00 07 bne 2012de8 <rtems_rfs_rtems_initialise+0xf8> <== NOT EXECUTED
2012dd0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
2012dd4: 10 bf ff df b 2012d50 <rtems_rfs_rtems_initialise+0x60> <== NOT EXECUTED
2012dd8: b8 17 20 02 or %i4, 2, %i4 <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
2012ddc: 12 bf ff d3 bne 2012d28 <rtems_rfs_rtems_initialise+0x38> <== NOT EXECUTED
2012de0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2012de4: 30 bf ff e5 b,a 2012d78 <rtems_rfs_rtems_initialise+0x88><== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
2012de8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2012dec: 40 00 4f b8 call 2026ccc <strncmp> <== NOT EXECUTED
2012df0: 94 10 20 0d mov 0xd, %o2 <== NOT EXECUTED
2012df4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2012df8: 12 80 00 2c bne 2012ea8 <rtems_rfs_rtems_initialise+0x1b8><== NOT EXECUTED
2012dfc: 90 06 60 0e add %i1, 0xe, %o0 <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
2012e00: 92 10 20 00 clr %o1 <== NOT EXECUTED
2012e04: 40 00 50 d8 call 2027164 <strtoul> <== NOT EXECUTED
2012e08: 94 10 20 00 clr %o2 <== NOT EXECUTED
2012e0c: 10 bf ff d1 b 2012d50 <rtems_rfs_rtems_initialise+0x60> <== NOT EXECUTED
2012e10: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012e14: 92 10 20 00 clr %o1
2012e18: 7f ff e1 16 call 200b270 <rtems_semaphore_obtain>
2012e1c: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2012e20: b6 92 20 00 orcc %o0, 0, %i3
2012e24: 12 80 00 11 bne 2012e68 <rtems_rfs_rtems_initialise+0x178><== NEVER TAKEN
2012e28: 94 10 00 1c mov %i4, %o2
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
2012e2c: d0 06 20 70 ld [ %i0 + 0x70 ], %o0
2012e30: 92 10 00 1d mov %i5, %o1
2012e34: 96 10 00 11 mov %l1, %o3
2012e38: 40 00 3a 2e call 20216f0 <rtems_rfs_fs_open>
2012e3c: 98 07 bf fc add %fp, -4, %o4
if (rc)
2012e40: b8 92 20 00 orcc %o0, 0, %i4
2012e44: 02 80 00 1f be 2012ec0 <rtems_rfs_rtems_initialise+0x1d0> <== ALWAYS TAKEN
2012e48: d0 07 bf fc ld [ %fp + -4 ], %o0
{
free (rtems);
2012e4c: 7f ff cd c3 call 2006558 <free> <== NOT EXECUTED
2012e50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
2012e54: 40 00 48 57 call 2024fb0 <__errno> <== NOT EXECUTED
2012e58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012e5c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012e60: 81 c7 e0 08 ret <== NOT EXECUTED
2012e64: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012e68: 90 10 20 00 clr %o0 <== NOT EXECUTED
2012e6c: 40 00 04 f4 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012e70: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012e74: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012e78: 12 80 00 30 bne 2012f38 <rtems_rfs_rtems_initialise+0x248><== NOT EXECUTED
2012e7c: 01 00 00 00 nop <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
2012e80: 40 00 3f 25 call 2022b14 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
2012e84: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
free (rtems);
2012e88: 7f ff cd b4 call 2006558 <free> <== NOT EXECUTED
2012e8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
2012e90: 40 00 48 48 call 2024fb0 <__errno> <== NOT EXECUTED
2012e94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012e98: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2012e9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012ea0: 81 c7 e0 08 ret <== NOT EXECUTED
2012ea4: 81 e8 00 00 restore <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
2012ea8: 40 00 48 42 call 2024fb0 <__errno> <== NOT EXECUTED
2012eac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012eb0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2012eb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012eb8: 81 c7 e0 08 ret <== NOT EXECUTED
2012ebc: 81 e8 00 00 restore <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
2012ec0: 82 10 20 01 mov 1, %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012ec4: fa 02 20 7c ld [ %o0 + 0x7c ], %i5
2012ec8: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
2012ecc: 03 00 80 e1 sethi %hi(0x2038400), %g1
2012ed0: 82 10 61 5c or %g1, 0x15c, %g1 ! 203855c <rtems_rfs_rtems_dir_handlers>
2012ed4: c2 26 20 24 st %g1, [ %i0 + 0x24 ]
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
2012ed8: 03 00 80 d9 sethi %hi(0x2036400), %g1
2012edc: 82 10 63 c8 or %g1, 0x3c8, %g1 ! 20367c8 <rtems_rfs_ops>
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
2012ee0: d0 26 20 34 st %o0, [ %i0 + 0x34 ]
rtems_rfs_buffers_release (fs);
2012ee4: 40 00 30 93 call 201f130 <rtems_rfs_buffers_release>
2012ee8: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012eec: d0 07 40 00 ld [ %i5 ], %o0
2012ef0: 7f ff e1 2a call 200b398 <rtems_semaphore_release>
2012ef4: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2012ef8: ba 92 20 00 orcc %o0, 0, %i5
2012efc: 02 bf ff ae be 2012db4 <rtems_rfs_rtems_initialise+0xc4> <== ALWAYS TAKEN
2012f00: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012f04: 40 00 04 ce call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012f08: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012f0c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012f10: 02 80 00 15 be 2012f64 <rtems_rfs_rtems_initialise+0x274> <== NOT EXECUTED
2012f14: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012f18: 7f ff cc 87 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012f1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012f20: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012f24: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012f28: 40 00 4b 8a call 2025d50 <printf> <== NOT EXECUTED
2012f2c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
2012f30: 81 c7 e0 08 ret <== NOT EXECUTED
2012f34: 81 e8 00 00 restore <== NOT EXECUTED
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012f38: 7f ff cc 7f call 2006134 <rtems_status_text> <== NOT EXECUTED
2012f3c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2012f40: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012f44: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012f48: 40 00 4b 82 call 2025d50 <printf> <== NOT EXECUTED
2012f4c: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
2012f50: 30 bf ff cc b,a 2012e80 <rtems_rfs_rtems_initialise+0x190><== NOT EXECUTED
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
2012f54: 40 00 48 17 call 2024fb0 <__errno> <== NOT EXECUTED
2012f58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012f5c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2012f60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012f64: 81 c7 e0 08 ret <== NOT EXECUTED
2012f68: 81 e8 00 00 restore <== NOT EXECUTED
02011f7c <rtems_rfs_rtems_link>:
*/
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
2011f7c: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
2011f80: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2011f84: f6 06 40 00 ld [ %i1 ], %i3
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
2011f88: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
2011f8c: f8 06 00 00 ld [ %i0 ], %i4
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011f90: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011f94: 92 10 20 00 clr %o1
2011f98: d0 00 40 00 ld [ %g1 ], %o0
2011f9c: 7f ff e4 b5 call 200b270 <rtems_semaphore_obtain>
2011fa0: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2011fa4: b2 92 20 00 orcc %o0, 0, %i1
2011fa8: 12 80 00 25 bne 201203c <rtems_rfs_rtems_link+0xc0> <== NEVER TAKEN
2011fac: 90 10 20 00 clr %o0
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
2011fb0: 40 00 53 16 call 2026c08 <strlen>
2011fb4: 90 10 00 1a mov %i2, %o0
2011fb8: 98 10 00 1c mov %i4, %o4
2011fbc: 94 10 00 08 mov %o0, %o2
2011fc0: 92 10 00 1a mov %i2, %o1
2011fc4: 90 10 00 1d mov %i5, %o0
2011fc8: 96 10 00 1b mov %i3, %o3
2011fcc: 40 00 40 1a call 2022034 <rtems_rfs_link>
2011fd0: 9a 10 20 00 clr %o5
if (rc)
2011fd4: b8 92 20 00 orcc %o0, 0, %i4
2011fd8: 22 80 00 0f be,a 2012014 <rtems_rfs_rtems_link+0x98> <== ALWAYS TAKEN
2011fdc: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011fe0: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011fe4: 40 00 34 53 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2011fe8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011fec: 7f ff e4 eb call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2011ff0: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011ff4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011ff8: 12 80 00 2a bne 20120a0 <rtems_rfs_rtems_link+0x124> <== NOT EXECUTED
2011ffc: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("link: linking", rc);
2012000: 40 00 4b ec call 2024fb0 <__errno> <== NOT EXECUTED
2012004: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012008: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
201200c: 81 c7 e0 08 ret <== NOT EXECUTED
2012010: 81 e8 00 00 restore <== NOT EXECUTED
2012014: 40 00 34 47 call 201f130 <rtems_rfs_buffers_release>
2012018: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201201c: d0 07 00 00 ld [ %i4 ], %o0
2012020: 7f ff e4 de call 200b398 <rtems_semaphore_release>
2012024: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2012028: ba 92 20 00 orcc %o0, 0, %i5
201202c: 12 80 00 10 bne 201206c <rtems_rfs_rtems_link+0xf0> <== NEVER TAKEN
2012030: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2012034: 81 c7 e0 08 ret
2012038: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201203c: 40 00 08 80 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012040: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012044: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012048: 02 bf ff da be 2011fb0 <rtems_rfs_rtems_link+0x34> <== NOT EXECUTED
201204c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012050: 7f ff d0 39 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012054: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2012058: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201205c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012060: 40 00 4f 3c call 2025d50 <printf> <== NOT EXECUTED
2012064: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
2012068: 30 bf ff d2 b,a 2011fb0 <rtems_rfs_rtems_link+0x34> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201206c: 40 00 08 74 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012070: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012074: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012078: 02 80 00 08 be 2012098 <rtems_rfs_rtems_link+0x11c> <== NOT EXECUTED
201207c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012080: 7f ff d0 2d call 2006134 <rtems_status_text> <== NOT EXECUTED
2012084: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012088: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201208c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012090: 40 00 4f 30 call 2025d50 <printf> <== NOT EXECUTED
2012094: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2012098: 81 c7 e0 08 ret <== NOT EXECUTED
201209c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20120a0: 40 00 08 67 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20120a4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20120a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20120ac: 02 bf ff d5 be 2012000 <rtems_rfs_rtems_link+0x84> <== NOT EXECUTED
20120b0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20120b4: 7f ff d0 20 call 2006134 <rtems_status_text> <== NOT EXECUTED
20120b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20120bc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20120c0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20120c4: 40 00 4f 23 call 2025d50 <printf> <== NOT EXECUTED
20120c8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20120cc: 30 bf ff cd b,a 2012000 <rtems_rfs_rtems_link+0x84> <== NOT EXECUTED
02012a2c <rtems_rfs_rtems_mknod>:
static int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
2012a2c: 9d e3 bf 60 save %sp, -160, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012a30: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012a34: e2 07 00 00 ld [ %i4 ], %l1
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
2012a38: 40 00 1a 44 call 2019348 <geteuid>
2012a3c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
gid = getegid ();
2012a40: 40 00 1a 3e call 2019338 <getegid>
2012a44: a0 10 00 08 mov %o0, %l0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2012a48: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
gid = getegid ();
2012a4c: b8 10 00 08 mov %o0, %i4
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012a50: d0 00 40 00 ld [ %g1 ], %o0
2012a54: 92 10 20 00 clr %o1
2012a58: 7f ff e2 06 call 200b270 <rtems_semaphore_obtain>
2012a5c: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2012a60: a4 92 20 00 orcc %o0, 0, %l2
2012a64: 32 80 00 27 bne,a 2012b00 <rtems_rfs_rtems_mknod+0xd4> <== NEVER TAKEN
2012a68: 90 10 20 00 clr %o0 <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
2012a6c: 40 00 50 67 call 2026c08 <strlen>
2012a70: 90 10 00 18 mov %i0, %o0
2012a74: a4 10 00 08 mov %o0, %l2
2012a78: 40 00 05 ec call 2014228 <rtems_rfs_rtems_imode>
2012a7c: 90 10 00 19 mov %i1, %o0
2012a80: 82 07 bf fc add %fp, -4, %g1
2012a84: b9 2f 20 10 sll %i4, 0x10, %i4
2012a88: b9 37 20 10 srl %i4, 0x10, %i4
2012a8c: 99 2a 20 10 sll %o0, 0x10, %o4
2012a90: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
2012a94: 92 10 00 11 mov %l1, %o1
2012a98: a1 2c 20 10 sll %l0, 0x10, %l0
2012a9c: 90 10 00 1d mov %i5, %o0
2012aa0: a1 34 20 10 srl %l0, 0x10, %l0
2012aa4: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
2012aa8: e0 23 a0 5c st %l0, [ %sp + 0x5c ]
2012aac: 94 10 00 18 mov %i0, %o2
2012ab0: 96 10 00 12 mov %l2, %o3
2012ab4: 99 33 20 10 srl %o4, 0x10, %o4
2012ab8: 7f ff fa 49 call 20113dc <rtems_rfs_inode_create>
2012abc: 9a 10 20 01 mov 1, %o5
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
2012ac0: b8 92 20 00 orcc %o0, 0, %i4
2012ac4: 04 80 00 2b ble 2012b70 <rtems_rfs_rtems_mknod+0x144> <== ALWAYS TAKEN
2012ac8: d2 07 bf fc ld [ %fp + -4 ], %o1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012acc: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012ad0: 40 00 31 98 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012ad4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012ad8: 7f ff e2 30 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2012adc: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012ae0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012ae4: 12 80 00 13 bne 2012b30 <rtems_rfs_rtems_mknod+0x104> <== NOT EXECUTED
2012ae8: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
2012aec: 40 00 49 31 call 2024fb0 <__errno> <== NOT EXECUTED
2012af0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012af4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012af8: 81 c7 e0 08 ret
2012afc: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012b00: 40 00 05 cf call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012b04: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012b08: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012b0c: 02 bf ff d8 be 2012a6c <rtems_rfs_rtems_mknod+0x40> <== NOT EXECUTED
2012b10: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012b14: 7f ff cd 88 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012b18: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2012b1c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012b20: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012b24: 40 00 4c 8b call 2025d50 <printf> <== NOT EXECUTED
2012b28: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
2012b2c: 30 bf ff d0 b,a 2012a6c <rtems_rfs_rtems_mknod+0x40> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012b30: 40 00 05 c3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012b34: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012b38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012b3c: 02 bf ff ec be 2012aec <rtems_rfs_rtems_mknod+0xc0> <== NOT EXECUTED
2012b40: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012b44: 7f ff cd 7c call 2006134 <rtems_status_text> <== NOT EXECUTED
2012b48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012b4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012b50: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012b54: 40 00 4c 7f call 2025d50 <printf> <== NOT EXECUTED
2012b58: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2012b5c: 40 00 49 15 call 2024fb0 <__errno> <== NOT EXECUTED
2012b60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012b64: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012b68: 81 c7 e0 08 ret <== NOT EXECUTED
2012b6c: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012b70: 90 10 00 1d mov %i5, %o0
2012b74: 94 07 bf d4 add %fp, -44, %o2
2012b78: 7f ff f8 d5 call 2010ecc <rtems_rfs_inode_open>
2012b7c: 96 10 20 01 mov 1, %o3
if (rc > 0)
2012b80: b8 92 20 00 orcc %o0, 0, %i4
2012b84: 34 bf ff d3 bg,a 2012ad0 <rtems_rfs_rtems_mknod+0xa4> <== NEVER TAKEN
2012b88: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
}
if (S_ISDIR(mode) || S_ISREG(mode))
2012b8c: 03 00 00 3c sethi %hi(0xf000), %g1
2012b90: b2 0e 40 01 and %i1, %g1, %i1
2012b94: 03 00 00 20 sethi %hi(0x8000), %g1
2012b98: 80 a6 40 01 cmp %i1, %g1
2012b9c: 02 80 00 19 be 2012c00 <rtems_rfs_rtems_mknod+0x1d4>
2012ba0: 03 00 00 10 sethi %hi(0x4000), %g1
2012ba4: 80 a6 40 01 cmp %i1, %g1
2012ba8: 02 80 00 16 be 2012c00 <rtems_rfs_rtems_mknod+0x1d4> <== ALWAYS TAKEN
2012bac: 03 00 00 18 sethi %hi(0x6000), %g1
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
2012bb0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2012bb4: 12 80 00 2f bne 2012c70 <rtems_rfs_rtems_mknod+0x244> <== NOT EXECUTED
2012bb8: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2012bbc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
2012bc0: b9 36 a0 08 srl %i2, 8, %i4 <== NOT EXECUTED
2012bc4: b1 36 a0 18 srl %i2, 0x18, %i0 <== NOT EXECUTED
2012bc8: b3 36 a0 10 srl %i2, 0x10, %i1 <== NOT EXECUTED
2012bcc: 89 36 e0 18 srl %i3, 0x18, %g4 <== NOT EXECUTED
2012bd0: 87 36 e0 10 srl %i3, 0x10, %g3 <== NOT EXECUTED
2012bd4: 85 36 e0 08 srl %i3, 8, %g2 <== NOT EXECUTED
2012bd8: f8 28 60 1e stb %i4, [ %g1 + 0x1e ] <== NOT EXECUTED
2012bdc: f0 28 60 1c stb %i0, [ %g1 + 0x1c ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2012be0: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2012be4: f2 28 60 1d stb %i1, [ %g1 + 0x1d ] <== NOT EXECUTED
2012be8: f4 28 60 1f stb %i2, [ %g1 + 0x1f ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2012bec: f8 2f bf e4 stb %i4, [ %fp + -28 ] <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
2012bf0: c8 28 60 20 stb %g4, [ %g1 + 0x20 ] <== NOT EXECUTED
2012bf4: c6 28 60 21 stb %g3, [ %g1 + 0x21 ] <== NOT EXECUTED
2012bf8: c4 28 60 22 stb %g2, [ %g1 + 0x22 ] <== NOT EXECUTED
2012bfc: f6 28 60 23 stb %i3, [ %g1 + 0x23 ] <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
2012c00: 90 10 00 1d mov %i5, %o0
2012c04: 7f ff f9 29 call 20110a8 <rtems_rfs_inode_close>
2012c08: 92 07 bf d4 add %fp, -44, %o1
if (rc > 0)
2012c0c: b8 92 20 00 orcc %o0, 0, %i4
2012c10: 34 bf ff b0 bg,a 2012ad0 <rtems_rfs_rtems_mknod+0xa4> <== NEVER TAKEN
2012c14: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012c18: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
2012c1c: 40 00 31 45 call 201f130 <rtems_rfs_buffers_release>
2012c20: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012c24: d0 07 00 00 ld [ %i4 ], %o0
2012c28: 7f ff e1 dc call 200b398 <rtems_semaphore_release>
2012c2c: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2012c30: ba 92 20 00 orcc %o0, 0, %i5
2012c34: 02 bf ff b1 be 2012af8 <rtems_rfs_rtems_mknod+0xcc> <== ALWAYS TAKEN
2012c38: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012c3c: 40 00 05 80 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012c40: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012c44: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012c48: 02 80 00 1c be 2012cb8 <rtems_rfs_rtems_mknod+0x28c> <== NOT EXECUTED
2012c4c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012c50: 7f ff cd 39 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012c54: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012c58: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012c5c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012c60: 40 00 4c 3c call 2025d50 <printf> <== NOT EXECUTED
2012c64: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2012c68: 81 c7 e0 08 ret <== NOT EXECUTED
2012c6c: 81 e8 00 00 restore <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
2012c70: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2012c74: 02 bf ff d3 be 2012bc0 <rtems_rfs_rtems_mknod+0x194> <== NOT EXECUTED
2012c78: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
else
{
rtems_rfs_inode_close (fs, &inode);
2012c7c: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
2012c80: 7f ff f9 0a call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2012c84: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012c88: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012c8c: 40 00 31 29 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012c90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012c94: 7f ff e1 c1 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2012c98: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012c9c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012ca0: 12 80 00 08 bne 2012cc0 <rtems_rfs_rtems_mknod+0x294> <== NOT EXECUTED
2012ca4: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
2012ca8: 40 00 48 c2 call 2024fb0 <__errno> <== NOT EXECUTED
2012cac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012cb0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2012cb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2012cb8: 81 c7 e0 08 ret <== NOT EXECUTED
2012cbc: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012cc0: 40 00 05 5f call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012cc4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012cc8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012ccc: 02 bf ff f7 be 2012ca8 <rtems_rfs_rtems_mknod+0x27c> <== NOT EXECUTED
2012cd0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012cd4: 7f ff cd 18 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012cd8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012cdc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012ce0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012ce4: 40 00 4c 1b call 2025d50 <printf> <== NOT EXECUTED
2012ce8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2012cec: 30 bf ff ef b,a 2012ca8 <rtems_rfs_rtems_mknod+0x27c> <== NOT EXECUTED
02012868 <rtems_rfs_rtems_node_type>:
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
2012868: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
201286c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2012870: f8 06 00 00 ld [ %i0 ], %i4
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2012874: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2012878: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
201287c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2012880: 94 10 20 00 clr %o2
2012884: 7f ff e2 7b call 200b270 <rtems_semaphore_obtain>
2012888: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
201288c: b0 92 20 00 orcc %o0, 0, %i0
2012890: 12 80 00 38 bne 2012970 <rtems_rfs_rtems_node_type+0x108> <== NEVER TAKEN
2012894: 90 10 20 00 clr %o0
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012898: 92 10 00 1c mov %i4, %o1
201289c: 90 10 00 1d mov %i5, %o0
20128a0: 94 07 bf d8 add %fp, -40, %o2
20128a4: 7f ff f9 8a call 2010ecc <rtems_rfs_inode_open>
20128a8: 96 10 20 01 mov 1, %o3
if (rc > 0)
20128ac: b8 92 20 00 orcc %o0, 0, %i4
20128b0: 04 80 00 0f ble 20128ec <rtems_rfs_rtems_node_type+0x84> <== ALWAYS TAKEN
20128b4: c2 07 bf e4 ld [ %fp + -28 ], %g1
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20128b8: f0 07 60 7c ld [ %i5 + 0x7c ], %i0 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20128bc: 40 00 32 1d call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
20128c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20128c4: 7f ff e2 b5 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20128c8: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20128cc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20128d0: 12 80 00 35 bne 20129a4 <rtems_rfs_rtems_node_type+0x13c> <== NOT EXECUTED
20128d4: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
20128d8: 40 00 49 b6 call 2024fb0 <__errno> <== NOT EXECUTED
20128dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20128e0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20128e4: 81 c7 e0 08 ret <== NOT EXECUTED
20128e8: 81 e8 00 00 restore <== NOT EXECUTED
* link is actually the normal path to a regular file, directory, device
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
20128ec: 05 00 00 3c sethi %hi(0xf000), %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
20128f0: c2 08 60 02 ldub [ %g1 + 2 ], %g1
20128f4: 83 28 60 08 sll %g1, 8, %g1
20128f8: 82 08 40 02 and %g1, %g2, %g1
20128fc: 05 00 00 10 sethi %hi(0x4000), %g2
2012900: 80 a0 40 02 cmp %g1, %g2
2012904: 02 80 00 0b be 2012930 <rtems_rfs_rtems_node_type+0xc8>
2012908: b0 10 20 01 mov 1, %i0
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
201290c: 05 00 00 28 sethi %hi(0xa000), %g2
2012910: 80 a0 40 02 cmp %g1, %g2
2012914: 02 80 00 07 be 2012930 <rtems_rfs_rtems_node_type+0xc8>
2012918: b0 10 20 04 mov 4, %i0
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
201291c: 05 00 00 08 sethi %hi(0x2000), %g2
2012920: 80 a0 40 02 cmp %g1, %g2
2012924: 12 80 00 30 bne 20129e4 <rtems_rfs_rtems_node_type+0x17c> <== ALWAYS TAKEN
2012928: 05 00 00 18 sethi %hi(0x6000), %g2
type = RTEMS_FILESYSTEM_DEVICE;
201292c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
else
type = RTEMS_FILESYSTEM_MEMORY_FILE;
rc = rtems_rfs_inode_close (fs, &inode);
2012930: 90 10 00 1d mov %i5, %o0
2012934: 7f ff f9 dd call 20110a8 <rtems_rfs_inode_close>
2012938: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
201293c: b8 92 20 00 orcc %o0, 0, %i4
2012940: 34 bf ff df bg,a 20128bc <rtems_rfs_rtems_node_type+0x54><== NEVER TAKEN
2012944: f0 07 60 7c ld [ %i5 + 0x7c ], %i0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012948: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
rtems_rfs_buffers_release (fs);
201294c: 40 00 31 f9 call 201f130 <rtems_rfs_buffers_release>
2012950: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012954: 7f ff e2 91 call 200b398 <rtems_semaphore_release>
2012958: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
201295c: ba 92 20 00 orcc %o0, 0, %i5
2012960: 12 80 00 26 bne 20129f8 <rtems_rfs_rtems_node_type+0x190> <== NEVER TAKEN
2012964: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return type;
}
2012968: 81 c7 e0 08 ret
201296c: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012970: 40 00 06 33 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012974: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012978: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201297c: 22 bf ff c8 be,a 201289c <rtems_rfs_rtems_node_type+0x34><== NOT EXECUTED
2012980: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012984: 7f ff cd ec call 2006134 <rtems_status_text> <== NOT EXECUTED
2012988: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
201298c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012990: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012994: 40 00 4c ef call 2025d50 <printf> <== NOT EXECUTED
2012998: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
201299c: 10 bf ff c0 b 201289c <rtems_rfs_rtems_node_type+0x34> <== NOT EXECUTED
20129a0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20129a4: 40 00 06 26 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20129a8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20129ac: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20129b0: 02 bf ff ca be 20128d8 <rtems_rfs_rtems_node_type+0x70> <== NOT EXECUTED
20129b4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20129b8: 7f ff cd df call 2006134 <rtems_status_text> <== NOT EXECUTED
20129bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20129c0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20129c4: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20129c8: 40 00 4c e2 call 2025d50 <printf> <== NOT EXECUTED
20129cc: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
20129d0: 40 00 49 78 call 2024fb0 <__errno> <== NOT EXECUTED
20129d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20129d8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20129dc: 81 c7 e0 08 ret <== NOT EXECUTED
20129e0: 81 e8 00 00 restore <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
20129e4: 80 a0 40 02 cmp %g1, %g2
20129e8: 12 bf ff d2 bne 2012930 <rtems_rfs_rtems_node_type+0xc8> <== ALWAYS TAKEN
20129ec: b0 10 20 05 mov 5, %i0
type = RTEMS_FILESYSTEM_DEVICE;
20129f0: 10 bf ff d0 b 2012930 <rtems_rfs_rtems_node_type+0xc8> <== NOT EXECUTED
20129f4: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20129f8: 40 00 06 11 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20129fc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012a00: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012a04: 02 80 00 08 be 2012a24 <rtems_rfs_rtems_node_type+0x1bc> <== NOT EXECUTED
2012a08: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012a0c: 7f ff cd ca call 2006134 <rtems_status_text> <== NOT EXECUTED
2012a10: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012a14: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012a18: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012a1c: 40 00 4c cd call 2025d50 <printf> <== NOT EXECUTED
2012a20: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
2012a24: 81 c7 e0 08 ret <== NOT EXECUTED
2012a28: 81 e8 00 00 restore <== NOT EXECUTED
02011b60 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
2011b60: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011b64: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2011b68: f8 06 00 00 ld [ %i0 ], %i4
static ssize_t
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011b6c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011b70: 92 10 20 00 clr %o1
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011b74: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2011b78: 94 10 20 00 clr %o2
2011b7c: 7f ff e5 bd call 200b270 <rtems_semaphore_obtain>
2011b80: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2011b84: b6 92 20 00 orcc %o0, 0, %i3
2011b88: 12 80 00 22 bne 2011c10 <rtems_rfs_rtems_readlink+0xb0> <== NEVER TAKEN
2011b8c: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
2011b90: 92 10 00 1c mov %i4, %o1
2011b94: 90 10 00 1d mov %i5, %o0
2011b98: 94 10 00 19 mov %i1, %o2
2011b9c: 96 10 00 1a mov %i2, %o3
2011ba0: 40 00 43 4b call 20228cc <rtems_rfs_symlink_read>
2011ba4: 98 07 bf fc add %fp, -4, %o4
if (rc)
2011ba8: b8 92 20 00 orcc %o0, 0, %i4
2011bac: 22 80 00 0f be,a 2011be8 <rtems_rfs_rtems_readlink+0x88>
2011bb0: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011bb4: f6 07 60 7c ld [ %i5 + 0x7c ], %i3
rtems_rfs_buffers_release (fs);
2011bb8: 40 00 35 5e call 201f130 <rtems_rfs_buffers_release>
2011bbc: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011bc0: 7f ff e5 f6 call 200b398 <rtems_semaphore_release>
2011bc4: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2011bc8: ba 92 20 00 orcc %o0, 0, %i5
2011bcc: 12 80 00 2c bne 2011c7c <rtems_rfs_rtems_readlink+0x11c> <== NEVER TAKEN
2011bd0: 90 10 20 00 clr %o0
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("readlink: reading link", rc);
2011bd4: 40 00 4c f7 call 2024fb0 <__errno>
2011bd8: b0 10 3f ff mov -1, %i0
2011bdc: f8 22 00 00 st %i4, [ %o0 ]
2011be0: 81 c7 e0 08 ret
2011be4: 81 e8 00 00 restore
2011be8: 40 00 35 52 call 201f130 <rtems_rfs_buffers_release>
2011bec: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011bf0: 7f ff e5 ea call 200b398 <rtems_semaphore_release>
2011bf4: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2011bf8: ba 92 20 00 orcc %o0, 0, %i5
2011bfc: 12 80 00 12 bne 2011c44 <rtems_rfs_rtems_readlink+0xe4> <== NEVER TAKEN
2011c00: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
2011c04: f0 07 bf fc ld [ %fp + -4 ], %i0
}
2011c08: 81 c7 e0 08 ret
2011c0c: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011c10: 40 00 09 8b call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011c14: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011c18: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011c1c: 22 bf ff de be,a 2011b94 <rtems_rfs_rtems_readlink+0x34> <== NOT EXECUTED
2011c20: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011c24: 7f ff d1 44 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011c28: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2011c2c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011c30: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011c34: 40 00 50 47 call 2025d50 <printf> <== NOT EXECUTED
2011c38: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
2011c3c: 10 bf ff d6 b 2011b94 <rtems_rfs_rtems_readlink+0x34> <== NOT EXECUTED
2011c40: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011c44: 40 00 09 7e call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011c48: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011c4c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011c50: 22 bf ff e4 be,a 2011be0 <rtems_rfs_rtems_readlink+0x80> <== NOT EXECUTED
2011c54: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011c58: 7f ff d1 37 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011c5c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011c60: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011c64: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011c68: 40 00 50 3a call 2025d50 <printf> <== NOT EXECUTED
2011c6c: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2011c70: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
2011c74: 81 c7 e0 08 ret <== NOT EXECUTED
2011c78: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011c7c: 40 00 09 70 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011c80: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011c84: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011c88: 02 bf ff d3 be 2011bd4 <rtems_rfs_rtems_readlink+0x74> <== NOT EXECUTED
2011c8c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011c90: 7f ff d1 29 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011c94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011c98: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011c9c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011ca0: 40 00 50 2c call 2025d50 <printf> <== NOT EXECUTED
2011ca4: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2011ca8: 30 bf ff cb b,a 2011bd4 <rtems_rfs_rtems_readlink+0x74> <== NOT EXECUTED
020120d0 <rtems_rfs_rtems_rename>:
static int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
20120d0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
20120d4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino new_parent;
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
20120d8: f8 06 00 00 ld [ %i0 ], %i4 <== NOT EXECUTED
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
20120dc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
20120e0: f0 06 80 00 ld [ %i2 ], %i0 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
20120e4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
20120e8: f4 06 40 00 ld [ %i1 ], %i2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20120ec: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
20120f0: f2 06 60 04 ld [ %i1 + 4 ], %i1 <== NOT EXECUTED
20120f4: 92 10 20 00 clr %o1 <== NOT EXECUTED
20120f8: 7f ff e4 5e call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
20120fc: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012100: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
2012104: 12 80 00 3a bne 20121ec <rtems_rfs_rtems_rename+0x11c> <== NOT EXECUTED
2012108: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, strlen (new_name), new_parent, ino, true);
201210c: 40 00 52 bf call 2026c08 <strlen> <== NOT EXECUTED
2012110: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2012114: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2012118: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
201211c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2012120: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012124: 98 10 00 1a mov %i2, %o4 <== NOT EXECUTED
2012128: 40 00 3f c3 call 2022034 <rtems_rfs_link> <== NOT EXECUTED
201212c: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
if (rc)
2012130: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2012134: 02 80 00 0f be 2012170 <rtems_rfs_rtems_rename+0xa0> <== NOT EXECUTED
2012138: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201213c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012140: 40 00 33 fc call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012144: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012148: 7f ff e4 94 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201214c: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012150: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012154: 12 80 00 32 bne 201221c <rtems_rfs_rtems_rename+0x14c> <== NOT EXECUTED
2012158: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: linking", rc);
201215c: 40 00 4b 95 call 2024fb0 <__errno> <== NOT EXECUTED
2012160: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012164: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2012168: 81 c7 e0 08 ret <== NOT EXECUTED
201216c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
2012170: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012174: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2012178: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
201217c: 40 00 40 24 call 202220c <rtems_rfs_unlink> <== NOT EXECUTED
2012180: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
2012184: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2012188: 22 80 00 0f be,a 20121c4 <rtems_rfs_rtems_rename+0xf4> <== NOT EXECUTED
201218c: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2012190: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012194: 40 00 33 e7 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012198: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
201219c: 7f ff e4 7f call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20121a0: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20121a4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20121a8: 12 80 00 29 bne 201224c <rtems_rfs_rtems_rename+0x17c> <== NOT EXECUTED
20121ac: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: unlinking", rc);
20121b0: 40 00 4b 80 call 2024fb0 <__errno> <== NOT EXECUTED
20121b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20121b8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20121bc: 81 c7 e0 08 ret <== NOT EXECUTED
20121c0: 81 e8 00 00 restore <== NOT EXECUTED
20121c4: 40 00 33 db call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
20121c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20121cc: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
20121d0: 7f ff e4 72 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20121d4: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20121d8: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20121dc: 12 80 00 28 bne 201227c <rtems_rfs_rtems_rename+0x1ac> <== NOT EXECUTED
20121e0: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
20121e4: 81 c7 e0 08 ret <== NOT EXECUTED
20121e8: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20121ec: 40 00 08 14 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20121f0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20121f4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20121f8: 02 bf ff c5 be 201210c <rtems_rfs_rtems_rename+0x3c> <== NOT EXECUTED
20121fc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2012200: 7f ff cf cd call 2006134 <rtems_status_text> <== NOT EXECUTED
2012204: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2012208: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201220c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012210: 40 00 4e d0 call 2025d50 <printf> <== NOT EXECUTED
2012214: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
2012218: 30 bf ff bd b,a 201210c <rtems_rfs_rtems_rename+0x3c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201221c: 40 00 08 08 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012220: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012224: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012228: 02 bf ff cd be 201215c <rtems_rfs_rtems_rename+0x8c> <== NOT EXECUTED
201222c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012230: 7f ff cf c1 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012234: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012238: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201223c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012240: 40 00 4e c4 call 2025d50 <printf> <== NOT EXECUTED
2012244: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2012248: 30 bf ff c5 b,a 201215c <rtems_rfs_rtems_rename+0x8c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201224c: 40 00 07 fc call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012250: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012254: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012258: 02 bf ff d6 be 20121b0 <rtems_rfs_rtems_rename+0xe0> <== NOT EXECUTED
201225c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012260: 7f ff cf b5 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012264: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012268: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201226c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012270: 40 00 4e b8 call 2025d50 <printf> <== NOT EXECUTED
2012274: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2012278: 30 bf ff ce b,a 20121b0 <rtems_rfs_rtems_rename+0xe0> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201227c: 40 00 07 f0 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012280: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012284: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012288: 02 80 00 08 be 20122a8 <rtems_rfs_rtems_rename+0x1d8> <== NOT EXECUTED
201228c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012290: 7f ff cf a9 call 2006134 <rtems_status_text> <== NOT EXECUTED
2012294: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012298: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201229c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20122a0: 40 00 4e ac call 2025d50 <printf> <== NOT EXECUTED
20122a4: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20122a8: 81 c7 e0 08 ret <== NOT EXECUTED
20122ac: 81 e8 00 00 restore <== NOT EXECUTED
02011a10 <rtems_rfs_rtems_rmnod>:
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
2011a10: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011a14: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
2011a18: f6 06 40 00 ld [ %i1 ], %i3 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011a1c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
2011a20: f8 06 60 04 ld [ %i1 + 4 ], %i4 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011a24: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
2011a28: f4 06 00 00 ld [ %i0 ], %i2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011a2c: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
2011a30: 92 10 20 00 clr %o1 <== NOT EXECUTED
2011a34: 7f ff e6 0f call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
2011a38: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011a3c: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED
2011a40: 12 80 00 22 bne 2011ac8 <rtems_rfs_rtems_rmnod+0xb8> <== NOT EXECUTED
2011a44: 90 10 20 00 clr %o0 <== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2011a48: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
2011a4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011a50: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2011a54: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
2011a58: 40 00 41 ed call 202220c <rtems_rfs_unlink> <== NOT EXECUTED
2011a5c: 98 10 20 00 clr %o4 <== NOT EXECUTED
if (rc)
2011a60: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2011a64: 22 80 00 0f be,a 2011aa0 <rtems_rfs_rtems_rmnod+0x90> <== NOT EXECUTED
2011a68: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011a6c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011a70: 40 00 35 b0 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2011a74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011a78: 7f ff e6 48 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2011a7c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011a80: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011a84: 12 80 00 2b bne 2011b30 <rtems_rfs_rtems_rmnod+0x120> <== NOT EXECUTED
2011a88: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
2011a8c: 40 00 4d 49 call 2024fb0 <__errno> <== NOT EXECUTED
2011a90: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011a94: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011a98: 81 c7 e0 08 ret <== NOT EXECUTED
2011a9c: 81 e8 00 00 restore <== NOT EXECUTED
2011aa0: 40 00 35 a4 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2011aa4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011aa8: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
2011aac: 7f ff e6 3b call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2011ab0: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011ab4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011ab8: 12 80 00 11 bne 2011afc <rtems_rfs_rtems_rmnod+0xec> <== NOT EXECUTED
2011abc: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011ac0: 81 c7 e0 08 ret <== NOT EXECUTED
2011ac4: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011ac8: 40 00 09 dd call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011acc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011ad0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011ad4: 22 bf ff de be,a 2011a4c <rtems_rfs_rtems_rmnod+0x3c> <== NOT EXECUTED
2011ad8: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011adc: 7f ff d1 96 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011ae0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2011ae4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011ae8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011aec: 40 00 50 99 call 2025d50 <printf> <== NOT EXECUTED
2011af0: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2011af4: 10 bf ff d6 b 2011a4c <rtems_rfs_rtems_rmnod+0x3c> <== NOT EXECUTED
2011af8: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011afc: 40 00 09 d0 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011b00: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011b04: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011b08: 02 80 00 08 be 2011b28 <rtems_rfs_rtems_rmnod+0x118> <== NOT EXECUTED
2011b0c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011b10: 7f ff d1 89 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011b14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011b18: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011b1c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011b20: 40 00 50 8c call 2025d50 <printf> <== NOT EXECUTED
2011b24: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011b28: 81 c7 e0 08 ret <== NOT EXECUTED
2011b2c: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011b30: 40 00 09 c3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011b34: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011b38: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011b3c: 02 bf ff d4 be 2011a8c <rtems_rfs_rtems_rmnod+0x7c> <== NOT EXECUTED
2011b40: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011b44: 7f ff d1 7c call 2006134 <rtems_status_text> <== NOT EXECUTED
2011b48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011b4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011b50: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011b54: 40 00 50 7f call 2025d50 <printf> <== NOT EXECUTED
2011b58: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2011b5c: 30 bf ff cc b,a 2011a8c <rtems_rfs_rtems_rmnod+0x7c> <== NOT EXECUTED
02014140 <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
2014140: 9d e3 bf a0 save %sp, -96, %sp
2014144: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2014148: c4 08 60 02 ldub [ %g1 + 2 ], %g2
201414c: d2 08 60 03 ldub [ %g1 + 3 ], %o1
2014150: 83 28 a0 08 sll %g2, 8, %g1
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
2014154: 92 0a 60 ff and %o1, 0xff, %o1
2014158: 05 00 00 10 sethi %hi(0x4000), %g2
201415c: 92 12 40 01 or %o1, %g1, %o1
2014160: 03 00 00 3c sethi %hi(0xf000), %g1
2014164: 82 0a 40 01 and %o1, %g1, %g1
2014168: 80 a0 40 02 cmp %g1, %g2
201416c: 02 80 00 1c be 20141dc <rtems_rfs_rtems_set_handlers+0x9c>
2014170: c0 26 20 08 clr [ %i0 + 8 ]
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
2014174: 05 00 00 18 sethi %hi(0x6000), %g2
2014178: 80 a0 40 02 cmp %g1, %g2
201417c: 02 80 00 11 be 20141c0 <rtems_rfs_rtems_set_handlers+0x80><== NEVER TAKEN
2014180: 05 00 00 08 sethi %hi(0x2000), %g2
2014184: 80 a0 40 02 cmp %g1, %g2
2014188: 02 80 00 0e be 20141c0 <rtems_rfs_rtems_set_handlers+0x80><== NEVER TAKEN
201418c: 05 00 00 28 sethi %hi(0xa000), %g2
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
2014190: 80 a0 40 02 cmp %g1, %g2
2014194: 02 80 00 20 be 2014214 <rtems_rfs_rtems_set_handlers+0xd4>
2014198: 05 00 00 20 sethi %hi(0x8000), %g2
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
201419c: 80 a0 40 02 cmp %g1, %g2
20141a0: 02 80 00 16 be 20141f8 <rtems_rfs_rtems_set_handlers+0xb8><== ALWAYS TAKEN
20141a4: 11 00 80 da sethi %hi(0x2036800), %o0
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
20141a8: 40 00 46 ea call 2025d50 <printf> <== NOT EXECUTED
20141ac: 90 12 20 48 or %o0, 0x48, %o0 ! 2036848 <rtems_rfs_rtems_link_handlers+0x38><== NOT EXECUTED
return false;
20141b0: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
return true;
}
20141b4: b0 08 60 01 and %g1, 1, %i0
20141b8: 81 c7 e0 08 ret
20141bc: 81 e8 00 00 restore
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
20141c0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
20141c4: 05 00 80 e1 sethi %hi(0x2038400), %g2 <== NOT EXECUTED
20141c8: 84 10 a1 24 or %g2, 0x124, %g2 ! 2038524 <rtems_rfs_rtems_device_handlers><== NOT EXECUTED
20141cc: c4 26 20 08 st %g2, [ %i0 + 8 ] <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
20141d0: b0 08 60 01 and %g1, 1, %i0 <== NOT EXECUTED
20141d4: 81 c7 e0 08 ret <== NOT EXECUTED
20141d8: 81 e8 00 00 restore <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
20141dc: 82 10 20 01 mov 1, %g1
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
20141e0: 05 00 80 e1 sethi %hi(0x2038400), %g2
20141e4: 84 10 a1 5c or %g2, 0x15c, %g2 ! 203855c <rtems_rfs_rtems_dir_handlers>
20141e8: c4 26 20 08 st %g2, [ %i0 + 8 ]
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
20141ec: b0 08 60 01 and %g1, 1, %i0
20141f0: 81 c7 e0 08 ret
20141f4: 81 e8 00 00 restore
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
20141f8: 82 10 20 01 mov 1, %g1
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
20141fc: 05 00 80 e1 sethi %hi(0x2038400), %g2
2014200: 84 10 a1 94 or %g2, 0x194, %g2 ! 2038594 <rtems_rfs_rtems_file_handlers>
2014204: c4 26 20 08 st %g2, [ %i0 + 8 ]
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2014208: b0 08 60 01 and %g1, 1, %i0
201420c: 81 c7 e0 08 ret
2014210: 81 e8 00 00 restore
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
2014214: 05 00 80 da sethi %hi(0x2036800), %g2
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2014218: 82 10 20 01 mov 1, %g1
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
201421c: 84 10 a0 10 or %g2, 0x10, %g2
2014220: 10 bf ff e5 b 20141b4 <rtems_rfs_rtems_set_handlers+0x74>
2014224: c4 26 20 08 st %g2, [ %i0 + 8 ]
0201193c <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
201193c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011940: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
2011944: 92 07 bf f8 add %fp, -8, %o1 <== NOT EXECUTED
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2011948: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
201194c: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
2011950: 7f ff fc fd call 2010d44 <rtems_rfs_group_usage> <== NOT EXECUTED
2011954: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
2011958: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
201195c: d8 07 60 04 ld [ %i5 + 4 ], %o4 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
2011960: da 07 60 08 ld [ %i5 + 8 ], %o5 <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
2011964: de 00 60 24 ld [ %g1 + 0x24 ], %o7 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
2011968: c8 00 60 1c ld [ %g1 + 0x1c ], %g4 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
201196c: c6 07 40 00 ld [ %i5 ], %g3 <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
2011970: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
2011974: c4 07 60 18 ld [ %i5 + 0x18 ], %g2 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2011978: fa 07 bf f8 ld [ %fp + -8 ], %i5 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
201197c: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2011980: 98 23 00 1d sub %o4, %i5, %o4 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
2011984: fa 07 bf fc ld [ %fp + -4 ], %i5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
2011988: da 26 40 00 st %o5, [ %i1 ] <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
201198c: ba 20 40 1d sub %g1, %i5, %i5 <== NOT EXECUTED
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
2011990: de 26 60 04 st %o7, [ %i1 + 4 ] <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
2011994: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
2011998: c8 26 60 0c st %g4, [ %i1 + 0xc ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
201199c: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED
20119a0: d8 26 60 14 st %o4, [ %i1 + 0x14 ] <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
20119a4: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
20119a8: d8 26 60 1c st %o4, [ %i1 + 0x1c ] <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
20119ac: fa 26 60 24 st %i5, [ %i1 + 0x24 ] <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
20119b0: fa 26 60 28 st %i5, [ %i1 + 0x28 ] <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
20119b4: 03 0a 02 48 sethi %hi(0x28092000), %g1 <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
20119b8: c6 26 60 30 st %g3, [ %i1 + 0x30 ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
20119bc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
20119c0: c4 26 60 34 st %g2, [ %i1 + 0x34 ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
20119c4: c2 26 60 2c st %g1, [ %i1 + 0x2c ] <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
20119c8: 81 c7 e0 08 ret <== NOT EXECUTED
20119cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02011cac <rtems_rfs_rtems_symlink>:
static int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
2011cac: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
2011cb0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2011cb4: f8 06 00 00 ld [ %i0 ], %i4
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
2011cb8: 40 00 1d a4 call 2019348 <geteuid>
2011cbc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
gid = getegid ();
2011cc0: 40 00 1d 9e call 2019338 <getegid>
2011cc4: b0 10 00 08 mov %o0, %i0
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011cc8: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
gid = getegid ();
2011ccc: b6 10 00 08 mov %o0, %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011cd0: d0 00 40 00 ld [ %g1 ], %o0
2011cd4: 92 10 20 00 clr %o1
2011cd8: 7f ff e5 66 call 200b270 <rtems_semaphore_obtain>
2011cdc: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2011ce0: a0 92 20 00 orcc %o0, 0, %l0
2011ce4: 32 80 00 2d bne,a 2011d98 <rtems_rfs_rtems_symlink+0xec> <== NEVER TAKEN
2011ce8: 90 10 20 00 clr %o0 <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
2011cec: 40 00 53 c7 call 2026c08 <strlen>
2011cf0: 90 10 00 1a mov %i2, %o0
2011cf4: a0 10 00 08 mov %o0, %l0
link_name, strlen (link_name),
2011cf8: 40 00 53 c4 call 2026c08 <strlen>
2011cfc: 90 10 00 19 mov %i1, %o0
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
2011d00: b1 2e 20 10 sll %i0, 0x10, %i0
link_name, strlen (link_name),
2011d04: 98 10 00 08 mov %o0, %o4
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
2011d08: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
2011d0c: b7 2e e0 10 sll %i3, 0x10, %i3
2011d10: 90 10 00 1d mov %i5, %o0
2011d14: b7 36 e0 10 srl %i3, 0x10, %i3
2011d18: 92 10 00 1a mov %i2, %o1
2011d1c: f6 23 a0 5c st %i3, [ %sp + 0x5c ]
2011d20: 94 10 00 10 mov %l0, %o2
2011d24: 96 10 00 19 mov %i1, %o3
2011d28: 40 00 42 45 call 202263c <rtems_rfs_symlink>
2011d2c: 9b 36 20 10 srl %i0, 0x10, %o5
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
2011d30: b8 92 20 00 orcc %o0, 0, %i4
2011d34: 22 80 00 0f be,a 2011d70 <rtems_rfs_rtems_symlink+0xc4> <== ALWAYS TAKEN
2011d38: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011d3c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011d40: 40 00 34 fc call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2011d44: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011d48: 7f ff e5 94 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2011d4c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011d50: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011d54: 12 80 00 2a bne 2011dfc <rtems_rfs_rtems_symlink+0x150> <== NOT EXECUTED
2011d58: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
2011d5c: 40 00 4c 95 call 2024fb0 <__errno> <== NOT EXECUTED
2011d60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011d64: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011d68: 81 c7 e0 08 ret <== NOT EXECUTED
2011d6c: 81 e8 00 00 restore <== NOT EXECUTED
2011d70: 40 00 34 f0 call 201f130 <rtems_rfs_buffers_release>
2011d74: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011d78: d0 07 00 00 ld [ %i4 ], %o0
2011d7c: 7f ff e5 87 call 200b398 <rtems_semaphore_release>
2011d80: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2011d84: ba 92 20 00 orcc %o0, 0, %i5
2011d88: 12 80 00 10 bne 2011dc8 <rtems_rfs_rtems_symlink+0x11c> <== NEVER TAKEN
2011d8c: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011d90: 81 c7 e0 08 ret
2011d94: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011d98: 40 00 09 29 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011d9c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011da0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011da4: 02 bf ff d2 be 2011cec <rtems_rfs_rtems_symlink+0x40> <== NOT EXECUTED
2011da8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011dac: 7f ff d0 e2 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011db0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2011db4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011db8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011dbc: 40 00 4f e5 call 2025d50 <printf> <== NOT EXECUTED
2011dc0: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
2011dc4: 30 bf ff ca b,a 2011cec <rtems_rfs_rtems_symlink+0x40> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011dc8: 40 00 09 1d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011dcc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011dd0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011dd4: 02 80 00 08 be 2011df4 <rtems_rfs_rtems_symlink+0x148> <== NOT EXECUTED
2011dd8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011ddc: 7f ff d0 d6 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011de0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011de4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011de8: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011dec: 40 00 4f d9 call 2025d50 <printf> <== NOT EXECUTED
2011df0: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2011df4: 81 c7 e0 08 ret <== NOT EXECUTED
2011df8: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011dfc: 40 00 09 10 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011e00: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011e04: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011e08: 02 bf ff d5 be 2011d5c <rtems_rfs_rtems_symlink+0xb0> <== NOT EXECUTED
2011e0c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011e10: 7f ff d0 c9 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011e14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011e18: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011e1c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011e20: 40 00 4f cc call 2025d50 <printf> <== NOT EXECUTED
2011e24: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2011e28: 30 bf ff cd b,a 2011d5c <rtems_rfs_rtems_symlink+0xb0> <== NOT EXECUTED
02011e2c <rtems_rfs_rtems_unlink>:
*/
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
2011e2c: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
2011e30: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
2011e34: f6 06 40 00 ld [ %i1 ], %i3
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
2011e38: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (loc);
2011e3c: f8 06 60 04 ld [ %i1 + 4 ], %i4
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
2011e40: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2011e44: f4 06 00 00 ld [ %i0 ], %i2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2011e48: d0 00 40 00 ld [ %g1 ], %o0
2011e4c: 92 10 20 00 clr %o1
2011e50: 7f ff e5 08 call 200b270 <rtems_semaphore_obtain>
2011e54: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2011e58: b2 92 20 00 orcc %o0, 0, %i1
2011e5c: 12 80 00 22 bne 2011ee4 <rtems_rfs_rtems_unlink+0xb8> <== NEVER TAKEN
2011e60: 90 10 20 00 clr %o0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2011e64: 96 10 00 1c mov %i4, %o3
2011e68: 90 10 00 1d mov %i5, %o0
2011e6c: 92 10 00 1a mov %i2, %o1
2011e70: 94 10 00 1b mov %i3, %o2
2011e74: 40 00 40 e6 call 202220c <rtems_rfs_unlink>
2011e78: 98 10 20 00 clr %o4
if (rc)
2011e7c: b8 92 20 00 orcc %o0, 0, %i4
2011e80: 22 80 00 0f be,a 2011ebc <rtems_rfs_rtems_unlink+0x90> <== ALWAYS TAKEN
2011e84: f8 07 60 7c ld [ %i5 + 0x7c ], %i4
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2011e88: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2011e8c: 40 00 34 a9 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2011e90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011e94: 7f ff e5 41 call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
2011e98: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2011e9c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2011ea0: 12 80 00 2b bne 2011f4c <rtems_rfs_rtems_unlink+0x120> <== NOT EXECUTED
2011ea4: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
2011ea8: 40 00 4c 42 call 2024fb0 <__errno> <== NOT EXECUTED
2011eac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2011eb0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2011eb4: 81 c7 e0 08 ret <== NOT EXECUTED
2011eb8: 81 e8 00 00 restore <== NOT EXECUTED
2011ebc: 40 00 34 9d call 201f130 <rtems_rfs_buffers_release>
2011ec0: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2011ec4: d0 07 00 00 ld [ %i4 ], %o0
2011ec8: 7f ff e5 34 call 200b398 <rtems_semaphore_release>
2011ecc: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2011ed0: ba 92 20 00 orcc %o0, 0, %i5
2011ed4: 12 80 00 11 bne 2011f18 <rtems_rfs_rtems_unlink+0xec> <== NEVER TAKEN
2011ed8: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011edc: 81 c7 e0 08 ret
2011ee0: 81 e8 00 00 restore
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011ee4: 40 00 08 d6 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011ee8: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011eec: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011ef0: 22 bf ff de be,a 2011e68 <rtems_rfs_rtems_unlink+0x3c> <== NOT EXECUTED
2011ef4: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2011ef8: 7f ff d0 8f call 2006134 <rtems_status_text> <== NOT EXECUTED
2011efc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2011f00: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011f04: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011f08: 40 00 4f 92 call 2025d50 <printf> <== NOT EXECUTED
2011f0c: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
2011f10: 10 bf ff d6 b 2011e68 <rtems_rfs_rtems_unlink+0x3c> <== NOT EXECUTED
2011f14: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011f18: 40 00 08 c9 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011f1c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011f20: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011f24: 02 80 00 08 be 2011f44 <rtems_rfs_rtems_unlink+0x118> <== NOT EXECUTED
2011f28: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011f2c: 7f ff d0 82 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011f30: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011f34: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011f38: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011f3c: 40 00 4f 85 call 2025d50 <printf> <== NOT EXECUTED
2011f40: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2011f44: 81 c7 e0 08 ret <== NOT EXECUTED
2011f48: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2011f4c: 40 00 08 bc call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2011f50: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2011f54: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2011f58: 02 bf ff d4 be 2011ea8 <rtems_rfs_rtems_unlink+0x7c> <== NOT EXECUTED
2011f5c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2011f60: 7f ff d0 75 call 2006134 <rtems_status_text> <== NOT EXECUTED
2011f64: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2011f68: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2011f6c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2011f70: 40 00 4f 78 call 2025d50 <printf> <== NOT EXECUTED
2011f74: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
2011f78: 30 bf ff cc b,a 2011ea8 <rtems_rfs_rtems_unlink+0x7c> <== NOT EXECUTED
020122b0 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
20122b0: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20122b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
20122b8: f8 06 00 00 ld [ %i0 ], %i4 <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20122bc: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20122c0: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
20122c4: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED
20122c8: 94 10 20 00 clr %o2 <== NOT EXECUTED
20122cc: 7f ff e3 e9 call 200b270 <rtems_semaphore_obtain> <== NOT EXECUTED
20122d0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20122d4: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
20122d8: 12 80 00 48 bne 20123f8 <rtems_rfs_rtems_utime+0x148> <== NOT EXECUTED
20122dc: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20122e0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
20122e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20122e8: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
20122ec: 7f ff fa f8 call 2010ecc <rtems_rfs_inode_open> <== NOT EXECUTED
20122f0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
20122f4: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20122f8: 32 80 00 1a bne,a 2012360 <rtems_rfs_rtems_utime+0xb0> <== NOT EXECUTED
20122fc: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
2012300: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
2012304: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED
2012308: 87 36 60 10 srl %i1, 0x10, %g3 <== NOT EXECUTED
201230c: c4 28 60 10 stb %g2, [ %g1 + 0x10 ] <== NOT EXECUTED
2012310: 85 36 60 08 srl %i1, 8, %g2 <== NOT EXECUTED
2012314: c6 28 60 11 stb %g3, [ %g1 + 0x11 ] <== NOT EXECUTED
2012318: c4 28 60 12 stb %g2, [ %g1 + 0x12 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
201231c: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2012320: 85 36 a0 18 srl %i2, 0x18, %g2 <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2012324: c6 2f bf e8 stb %g3, [ %fp + -24 ] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2012328: c4 28 60 14 stb %g2, [ %g1 + 0x14 ] <== NOT EXECUTED
201232c: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED
2012330: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
2012334: f2 28 60 13 stb %i1, [ %g1 + 0x13 ] <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
2012338: c6 28 60 15 stb %g3, [ %g1 + 0x15 ] <== NOT EXECUTED
201233c: c4 28 60 16 stb %g2, [ %g1 + 0x16 ] <== NOT EXECUTED
2012340: f4 28 60 17 stb %i2, [ %g1 + 0x17 ] <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
2012344: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012348: 7f ff fb 58 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
201234c: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
if (rc)
2012350: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2012354: 22 80 00 1f be,a 20123d0 <rtems_rfs_rtems_utime+0x120> <== NOT EXECUTED
2012358: f8 07 60 7c ld [ %i5 + 0x7c ], %i4 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
201235c: f6 07 60 7c ld [ %i5 + 0x7c ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2012360: 40 00 33 74 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
2012364: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2012368: 7f ff e4 0c call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
201236c: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2012370: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2012374: 12 80 00 07 bne 2012390 <rtems_rfs_rtems_utime+0xe0> <== NOT EXECUTED
2012378: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
201237c: 40 00 4b 0d call 2024fb0 <__errno> <== NOT EXECUTED
2012380: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2012384: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2012388: 81 c7 e0 08 ret <== NOT EXECUTED
201238c: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2012390: 40 00 07 ab call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012394: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012398: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
201239c: 02 bf ff f8 be 201237c <rtems_rfs_rtems_utime+0xcc> <== NOT EXECUTED
20123a0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20123a4: 7f ff cf 64 call 2006134 <rtems_status_text> <== NOT EXECUTED
20123a8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20123ac: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20123b0: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
20123b4: 40 00 4e 67 call 2025d50 <printf> <== NOT EXECUTED
20123b8: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
20123bc: 40 00 4a fd call 2024fb0 <__errno> <== NOT EXECUTED
20123c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20123c4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20123c8: 81 c7 e0 08 ret <== NOT EXECUTED
20123cc: 81 e8 00 00 restore <== NOT EXECUTED
20123d0: 40 00 33 58 call 201f130 <rtems_rfs_buffers_release> <== NOT EXECUTED
20123d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20123d8: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
20123dc: 7f ff e3 ef call 200b398 <rtems_semaphore_release> <== NOT EXECUTED
20123e0: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20123e4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20123e8: 12 80 00 11 bne 201242c <rtems_rfs_rtems_utime+0x17c> <== NOT EXECUTED
20123ec: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
20123f0: 81 c7 e0 08 ret <== NOT EXECUTED
20123f4: 81 e8 00 00 restore <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20123f8: 40 00 07 91 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20123fc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012400: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012404: 22 bf ff b8 be,a 20122e4 <rtems_rfs_rtems_utime+0x34> <== NOT EXECUTED
2012408: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
201240c: 7f ff cf 4a call 2006134 <rtems_status_text> <== NOT EXECUTED
2012410: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2012414: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2012418: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
201241c: 40 00 4e 4d call 2025d50 <printf> <== NOT EXECUTED
2012420: 90 12 23 38 or %o0, 0x338, %o0 ! 2036738 <ramdisk_ops+0xc18><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2012424: 10 bf ff b0 b 20122e4 <rtems_rfs_rtems_utime+0x34> <== NOT EXECUTED
2012428: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
201242c: 40 00 07 84 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2012430: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2012434: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2012438: 02 80 00 08 be 2012458 <rtems_rfs_rtems_utime+0x1a8> <== NOT EXECUTED
201243c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2012440: 7f ff cf 3d call 2006134 <rtems_status_text> <== NOT EXECUTED
2012444: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2012448: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
201244c: 11 00 80 d9 sethi %hi(0x2036400), %o0 <== NOT EXECUTED
2012450: 40 00 4e 40 call 2025d50 <printf> <== NOT EXECUTED
2012454: 90 12 23 60 or %o0, 0x360, %o0 ! 2036760 <ramdisk_ops+0xc40><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
2012458: 81 c7 e0 08 ret <== NOT EXECUTED
201245c: 81 e8 00 00 restore <== NOT EXECUTED
0200f688 <rtems_rfs_rup_quotient>:
* Return a rounded up integer quotient given a dividend and divisor. That is:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
200f688: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
200f68c: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED
if (dividend == 0)
200f690: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200f694: 02 80 00 06 be 200f6ac <rtems_rfs_rup_quotient+0x24> <== NOT EXECUTED
200f698: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
200f69c: 90 00 7f ff add %g1, -1, %o0 <== NOT EXECUTED
200f6a0: 40 00 8b 0e call 20322d8 <.udiv> <== NOT EXECUTED
200f6a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f6a8: b0 02 20 01 add %o0, 1, %i0 <== NOT EXECUTED
}
200f6ac: 81 c7 e0 08 ret <== NOT EXECUTED
200f6b0: 81 e8 00 00 restore <== NOT EXECUTED
0201e5c0 <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
201e5c0: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201e5c4: 90 10 20 00 clr %o0
201e5c8: 92 10 20 80 mov 0x80, %o1
201e5cc: 7f ff d7 1c call 201423c <rtems_rfs_trace>
201e5d0: fa 06 20 08 ld [ %i0 + 8 ], %i5
201e5d4: 80 8a 20 ff btst 0xff, %o0
201e5d8: 32 80 00 38 bne,a 201e6b8 <rtems_rfs_scan_chain+0xf8> <== NEVER TAKEN
201e5dc: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
201e5e0: 80 a7 40 18 cmp %i5, %i0
201e5e4: 02 80 00 2c be 201e694 <rtems_rfs_scan_chain+0xd4> <== NEVER TAKEN
201e5e8: 39 00 80 dc sethi %hi(0x2037000), %i4
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
201e5ec: 10 80 00 09 b 201e610 <rtems_rfs_scan_chain+0x50>
201e5f0: b8 17 20 28 or %i4, 0x28, %i4 ! 2037028 <CSWTCH.1+0x13c>
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
201e5f4: 80 a0 40 1a cmp %g1, %i2
201e5f8: 02 80 00 14 be 201e648 <rtems_rfs_scan_chain+0x88>
201e5fc: 90 10 20 00 clr %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
201e600: fa 07 60 04 ld [ %i5 + 4 ], %i5
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
201e604: 80 a7 40 18 cmp %i5, %i0
201e608: 02 80 00 24 be 201e698 <rtems_rfs_scan_chain+0xd8>
201e60c: 90 10 20 00 clr %o0
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201e610: 90 10 20 00 clr %o0
201e614: 7f ff d7 0a call 201423c <rtems_rfs_trace>
201e618: 92 10 20 80 mov 0x80, %o1
201e61c: 80 8a 20 ff btst 0xff, %o0
201e620: 22 bf ff f5 be,a 201e5f4 <rtems_rfs_scan_chain+0x34> <== ALWAYS TAKEN
201e624: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
201e628: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
201e62c: 40 00 1d c9 call 2025d50 <printf> <== NOT EXECUTED
201e630: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
201e634: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
201e638: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
201e63c: 32 bf ff f2 bne,a 201e604 <rtems_rfs_scan_chain+0x44> <== NOT EXECUTED
201e640: fa 07 60 04 ld [ %i5 + 4 ], %i5 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201e644: 90 10 20 00 clr %o0 <== NOT EXECUTED
201e648: 7f ff d6 fd call 201423c <rtems_rfs_trace>
201e64c: 92 10 20 80 mov 0x80, %o1
201e650: 80 8a 20 ff btst 0xff, %o0
201e654: 22 80 00 07 be,a 201e670 <rtems_rfs_scan_chain+0xb0> <== ALWAYS TAKEN
201e658: c2 06 40 00 ld [ %i1 ], %g1
printf (": found block=%" PRIuPTR "\n",
201e65c: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
201e660: 11 00 80 dc sethi %hi(0x2037000), %o0 <== NOT EXECUTED
201e664: 40 00 1d bb call 2025d50 <printf> <== NOT EXECUTED
201e668: 90 12 20 30 or %o0, 0x30, %o0 ! 2037030 <CSWTCH.1+0x144> <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
201e66c: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
201e670: 90 10 00 1d mov %i5, %o0
201e674: 82 00 7f ff add %g1, -1, %g1
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
201e678: b0 10 00 1d mov %i5, %i0
201e67c: 7f ff b6 17 call 200bed8 <_Chain_Extract>
201e680: c2 26 40 00 st %g1, [ %i1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
201e684: c0 27 60 04 clr [ %i5 + 4 ]
201e688: c0 27 40 00 clr [ %i5 ]
201e68c: 81 c7 e0 08 ret
201e690: 81 e8 00 00 restore
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
201e694: 90 10 20 00 clr %o0 <== NOT EXECUTED
201e698: 92 10 20 80 mov 0x80, %o1
201e69c: 7f ff d6 e8 call 201423c <rtems_rfs_trace>
201e6a0: b0 10 20 00 clr %i0
201e6a4: 80 8a 20 ff btst 0xff, %o0
201e6a8: 12 80 00 0a bne 201e6d0 <rtems_rfs_scan_chain+0x110> <== NEVER TAKEN
201e6ac: 11 00 80 dc sethi %hi(0x2037000), %o0
printf (": not found\n");
return NULL;
}
201e6b0: 81 c7 e0 08 ret
201e6b4: 81 e8 00 00 restore
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
201e6b8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
201e6bc: 11 00 80 db sethi %hi(0x2036c00), %o0 <== NOT EXECUTED
201e6c0: 40 00 1d a4 call 2025d50 <printf> <== NOT EXECUTED
201e6c4: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 2036ff8 <CSWTCH.1+0x10c> <== NOT EXECUTED
while (!rtems_chain_is_head (chain, node))
201e6c8: 10 bf ff c7 b 201e5e4 <rtems_rfs_scan_chain+0x24> <== NOT EXECUTED
201e6cc: 80 a7 40 18 cmp %i5, %i0 <== NOT EXECUTED
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": not found\n");
201e6d0: 40 00 1d e1 call 2025e54 <puts> <== NOT EXECUTED
201e6d4: 90 12 20 48 or %o0, 0x48, %o0 <== NOT EXECUTED
return NULL;
}
201e6d8: 81 c7 e0 08 ret <== NOT EXECUTED
201e6dc: 81 e8 00 00 restore <== NOT EXECUTED
0201cb1c <rtems_rfs_search_map_for_clear_bit.constprop.1>:
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201cb1c: 9d e3 bf 90 save %sp, -112, %sp
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201cb20: d2 06 00 00 ld [ %i0 ], %o1
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
201cb24: c0 2e 80 00 clrb [ %i2 ]
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201cb28: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
201cb2c: 80 a2 60 00 cmp %o1, 0
201cb30: 02 80 00 7c be 201cd20 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x204><== NEVER TAKEN
201cb34: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
201cb38: d0 07 60 04 ld [ %i5 + 4 ], %o0
201cb3c: d4 07 60 08 ld [ %i5 + 8 ], %o2
201cb40: 40 00 07 63 call 201e8cc <rtems_rfs_buffer_handle_request>
201cb44: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
201cb48: b0 92 20 00 orcc %o0, 0, %i0
201cb4c: 12 80 00 77 bne 201cd28 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x20c><== NEVER TAKEN
201cb50: 80 a6 20 00 cmp %i0, 0
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
201cb54: c2 07 40 00 ld [ %i5 ], %g1
201cb58: c2 00 60 08 ld [ %g1 + 8 ], %g1
201cb5c: e6 00 60 24 ld [ %g1 + 0x24 ], %l3
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
201cb60: f0 06 40 00 ld [ %i1 ], %i0
end_bit = test_bit + (window * direction);
201cb64: a1 2e e0 0b sll %i3, 0xb, %l0
if (end_bit < 0)
201cb68: a0 84 00 18 addcc %l0, %i0, %l0
201cb6c: 2c 80 00 06 bneg,a 201cb84 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x68><== NEVER TAKEN
201cb70: a0 10 20 00 clr %l0 <== NOT EXECUTED
end_bit = 0;
else if (end_bit >= control->size)
201cb74: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201cb78: 80 a4 00 01 cmp %l0, %g1
201cb7c: 3a 80 00 02 bcc,a 201cb84 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x68><== ALWAYS TAKEN
201cb80: a0 00 7f ff add %g1, -1, %l0
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
201cb84: a5 3e 20 05 sra %i0, 5, %l2
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
201cb88: e8 07 60 14 ld [ %i5 + 0x14 ], %l4
map_bits = &map[map_index];
201cb8c: 83 2c a0 02 sll %l2, 2, %g1
201cb90: a6 04 c0 01 add %l3, %g1, %l3
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201cb94: 82 10 20 1f mov 0x1f, %g1
201cb98: c2 27 bf fc st %g1, [ %fp + -4 ]
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
201cb9c: 85 3e 20 0a sra %i0, 0xa, %g2
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
201cba0: b8 0e 20 1f and %i0, 0x1f, %i4
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
201cba4: 85 28 a0 02 sll %g2, 2, %g2
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
201cba8: 92 0c a0 1f and %l2, 0x1f, %o1
search_bits = &control->search_bits[search_index];
201cbac: a8 05 00 02 add %l4, %g2, %l4
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201cbb0: 80 a6 e0 00 cmp %i3, 0
201cbb4: 04 80 00 03 ble 201cbc0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xa4><== NEVER TAKEN
201cbb8: ab 2e e0 02 sll %i3, 2, %l5
201cbbc: c0 27 bf fc clr [ %fp + -4 ]
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201cbc0: ad 36 e0 1f srl %i3, 0x1f, %l6
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
201cbc4: 83 3e e0 1f sra %i3, 0x1f, %g1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201cbc8: 84 0d a0 ff and %l6, 0xff, %g2
|| ((direction > 0) && (test_bit >= end_bit)))
201cbcc: 82 20 40 1b sub %g1, %i3, %g1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201cbd0: af 2e e0 05 sll %i3, 5, %l7
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
201cbd4: 83 30 60 1f srl %g1, 0x1f, %g1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201cbd8: a2 10 20 01 mov 1, %l1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201cbdc: c4 27 bf f4 st %g2, [ %fp + -12 ]
|| ((direction > 0) && (test_bit >= end_bit)))
201cbe0: c2 27 bf f8 st %g1, [ %fp + -8 ]
/*
* If any bit is clear find that bit and then search the map element. If
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
201cbe4: c8 05 00 00 ld [ %l4 ], %g4
201cbe8: 80 a1 20 00 cmp %g4, 0
201cbec: 02 80 00 53 be 201cd38 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x21c><== NEVER TAKEN
201cbf0: 80 a6 e0 00 cmp %i3, 0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201cbf4: c2 07 bf fc ld [ %fp + -4 ], %g1
201cbf8: 86 06 c0 12 add %i3, %l2, %g3
201cbfc: 87 28 e0 05 sll %g3, 5, %g3
201cc00: 86 00 c0 01 add %g3, %g1, %g3
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
201cc04: 80 a2 60 1f cmp %o1, 0x1f
201cc08: 18 80 00 58 bgu 201cd68 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x24c><== NEVER TAKEN
201cc0c: 9f 2c 40 09 sll %l1, %o1, %o7
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
201cc10: 80 8b c0 04 btst %o7, %g4
201cc14: 22 80 00 14 be,a 201cc64 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x148><== NEVER TAKEN
201cc18: a6 04 c0 15 add %l3, %l5, %l3 <== NOT EXECUTED
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
201cc1c: c4 04 c0 00 ld [ %l3 ], %g2
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201cc20: 83 2c 40 1c sll %l1, %i4, %g1
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
201cc24: 80 88 40 02 btst %g1, %g2
201cc28: 02 80 00 0c be 201cc58 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x13c>
201cc2c: 80 a4 00 18 cmp %l0, %i0
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cc30: 10 80 00 58 b 201cd90 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x274>
201cc34: 82 28 80 01 andn %g2, %g1, %g1
{
/*
* Find the clear bit in the map. Update the search map and map if
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
201cc38: 80 a7 20 1f cmp %i4, 0x1f
201cc3c: 38 80 00 0a bgu,a 201cc64 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x148><== NEVER TAKEN
201cc40: a6 04 c0 15 add %l3, %l5, %l3 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
201cc44: 83 2c 40 1c sll %l1, %i4, %g1
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
201cc48: 80 88 40 02 btst %g1, %g2
201cc4c: 12 80 00 50 bne 201cd8c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x270>
201cc50: b0 06 c0 18 add %i3, %i0, %i0
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
201cc54: 80 a4 00 18 cmp %l0, %i0
201cc58: 12 bf ff f8 bne 201cc38 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x11c><== ALWAYS TAKEN
201cc5c: b8 06 c0 1c add %i3, %i4, %i4
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
201cc60: a6 04 c0 15 add %l3, %l5, %l3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201cc64: a4 06 c0 12 add %i3, %l2, %l2 <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201cc68: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201cc6c: 04 80 00 03 ble 201cc78 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x15c><== NOT EXECUTED
201cc70: b8 10 20 1f mov 0x1f, %i4 <== NOT EXECUTED
201cc74: b8 10 20 00 clr %i4 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
201cc78: b0 10 00 03 mov %g3, %i0 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
201cc7c: 92 06 c0 09 add %i3, %o1, %o1 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201cc80: 84 10 00 16 mov %l6, %g2 <== NOT EXECUTED
201cc84: 80 a4 00 03 cmp %l0, %g3 <== NOT EXECUTED
201cc88: 16 80 00 03 bge 201cc94 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x178><== NOT EXECUTED
201cc8c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201cc90: 82 10 20 00 clr %g1 <== NOT EXECUTED
201cc94: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201cc98: 12 80 00 5d bne 201ce0c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2f0><== NOT EXECUTED
201cc9c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
201cca0: 86 00 c0 17 add %g3, %l7, %g3 <== NOT EXECUTED
|| ((direction > 0) && (test_bit >= end_bit)))
201cca4: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201cca8: 04 80 00 03 ble 201ccb4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x198><== NOT EXECUTED
201ccac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201ccb0: 82 10 20 00 clr %g1 <== NOT EXECUTED
201ccb4: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201ccb8: 02 bf ff d4 be 201cc08 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xec><== NOT EXECUTED
201ccbc: 80 a2 60 1f cmp %o1, 0x1f <== NOT EXECUTED
201ccc0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
201ccc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ccc8: 02 bf ff d0 be 201cc08 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xec><== NOT EXECUTED
201cccc: 80 a2 60 1f cmp %o1, 0x1f <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
201ccd0: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
201ccd4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201ccd8: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
201ccdc: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201cce0: 02 80 00 06 be 201ccf8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1dc><== NOT EXECUTED
201cce4: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201cce8: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
201ccec: 32 bf ff bf bne,a 201cbe8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xcc><== NOT EXECUTED
201ccf0: c8 05 00 00 ld [ %l4 ], %g4 <== NOT EXECUTED
201ccf4: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201ccf8: 16 80 00 03 bge 201cd04 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1e8><== NOT EXECUTED
201ccfc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201cd00: 82 10 20 00 clr %g1 <== NOT EXECUTED
201cd04: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201cd08: 02 80 00 05 be 201cd1c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x200><== NOT EXECUTED
201cd0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
201cd10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201cd14: 32 bf ff b5 bne,a 201cbe8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xcc><== NOT EXECUTED
201cd18: c8 05 00 00 ld [ %l4 ], %g4 <== NOT EXECUTED
return 0;
201cd1c: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
201cd20: 81 c7 e0 08 ret <== NOT EXECUTED
201cd24: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
201cd28: 14 bf ff fe bg 201cd20 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x204><== NOT EXECUTED
201cd2c: a6 10 20 00 clr %l3 <== NOT EXECUTED
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
201cd30: 10 bf ff 8d b 201cb64 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x48><== NOT EXECUTED
201cd34: f0 06 40 00 ld [ %i1 ], %i0 <== NOT EXECUTED
* Align test_bit either up or down depending on the direction to next 32
* bit boundary.
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
201cd38: 04 80 00 2f ble 201cdf4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2d8><== NOT EXECUTED
201cd3c: b0 0e 3f e0 and %i0, -32, %i0 <== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
201cd40: 84 10 20 20 mov 0x20, %g2 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
201cd44: b8 10 20 00 clr %i4 <== NOT EXECUTED
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
201cd48: 92 20 80 09 sub %g2, %o1, %o1 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
201cd4c: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
201cd50: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
201cd54: 40 00 55 27 call 20321f0 <.umul> <== NOT EXECUTED
201cd58: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
201cd5c: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
map_index += direction * bits_skipped;
201cd60: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
201cd64: a6 04 c0 01 add %l3, %g1, %l3 <== NOT EXECUTED
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201cd68: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
201cd6c: 04 80 00 19 ble 201cdd0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2b4><== NOT EXECUTED
201cd70: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
201cd74: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201cd78: 04 80 00 03 ble 201cd84 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x268><== NOT EXECUTED
201cd7c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201cd80: 82 10 20 00 clr %g1 <== NOT EXECUTED
201cd84: 10 bf ff d5 b 201ccd8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1bc><== NOT EXECUTED
201cd88: 84 10 20 00 clr %g2 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cd8c: 82 28 80 01 andn %g2, %g1, %g1
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
201cd90: 80 a0 60 00 cmp %g1, 0
201cd94: 12 80 00 05 bne 201cda8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x28c><== ALWAYS TAKEN
201cd98: c2 24 c0 00 st %g1, [ %l3 ]
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
201cd9c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
201cda0: 9e 28 40 0f andn %g1, %o7, %o7 <== NOT EXECUTED
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
201cda4: de 25 00 00 st %o7, [ %l4 ] <== NOT EXECUTED
1 << search_offset);
control->free--;
201cda8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
201cdac: c4 07 40 00 ld [ %i5 ], %g2
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
201cdb0: 82 00 7f ff add %g1, -1, %g1
201cdb4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
*bit = test_bit;
201cdb8: f0 26 40 00 st %i0, [ %i1 ]
*found = true;
201cdbc: 82 10 20 01 mov 1, %g1
201cdc0: c2 2e 80 00 stb %g1, [ %i2 ]
rtems_rfs_buffer_mark_dirty (control->buffer);
201cdc4: c2 28 80 00 stb %g1, [ %g2 ]
return 0;
201cdc8: 81 c7 e0 08 ret
201cdcc: 91 e8 20 00 restore %g0, 0, %o0
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201cdd0: 84 10 00 16 mov %l6, %g2 <== NOT EXECUTED
201cdd4: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
201cdd8: 14 80 00 04 bg 201cde8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2cc><== NOT EXECUTED
201cddc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201cde0: 10 bf ff bf b 201ccdc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c0><== NOT EXECUTED
201cde4: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
201cde8: 82 10 20 00 clr %g1 <== NOT EXECUTED
201cdec: 10 bf ff bc b 201ccdc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c0><== NOT EXECUTED
201cdf0: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
201cdf4: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
201cdf8: b8 10 20 1f mov 0x1f, %i4 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
201cdfc: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
201ce00: 92 02 60 01 inc %o1 <== NOT EXECUTED
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
201ce04: 10 bf ff d4 b 201cd54 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x238><== NOT EXECUTED
201ce08: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201ce0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
201ce10: 22 bf ff a5 be,a 201cca4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x188><== NOT EXECUTED
201ce14: 86 00 c0 17 add %g3, %l7, %g3 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
201ce18: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
201ce1c: 80 a4 00 03 cmp %l0, %g3 <== NOT EXECUTED
201ce20: 04 80 00 03 ble 201ce2c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x310><== NOT EXECUTED
201ce24: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
201ce28: 82 10 20 00 clr %g1 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
201ce2c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
201ce30: 10 bf ff ab b 201ccdc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c0><== NOT EXECUTED
201ce34: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
0202263c <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
202263c: 9d e3 bf 00 save %sp, -256, %sp
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
2022640: 90 10 20 02 mov 2, %o0
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
2022644: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
2022648: e2 17 a0 5e lduh [ %fp + 0x5e ], %l1
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
202264c: 7f ff c6 fc call 201423c <rtems_rfs_trace>
2022650: 92 10 20 00 clr %o1
2022654: 80 8a 20 ff btst 0xff, %o0
2022658: 32 80 00 08 bne,a 2022678 <rtems_rfs_symlink+0x3c> <== NEVER TAKEN
202265c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
2022660: c2 06 20 08 ld [ %i0 + 8 ], %g1
2022664: 80 a7 00 01 cmp %i4, %g1
2022668: 0a 80 00 21 bcs 20226ec <rtems_rfs_symlink+0xb0> <== ALWAYS TAKEN
202266c: b4 10 20 5b mov 0x5b, %i2
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
2022670: 81 c7 e0 08 ret
2022674: 91 e8 00 1a restore %g0, %i2, %o0
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
2022678: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
202267c: 40 00 0d b5 call 2025d50 <printf> <== NOT EXECUTED
2022680: 90 12 20 80 or %o0, 0x80, %o0 ! 2038480 <CSWTCH.1+0x1594> <== NOT EXECUTED
for (c = 0; c < length; c++)
2022684: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2022688: 04 80 00 0a ble 20226b0 <rtems_rfs_symlink+0x74> <== NOT EXECUTED
202268c: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
2022690: a4 10 20 00 clr %l2 <== NOT EXECUTED
printf ("%c", name[c]);
2022694: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
2022698: 40 00 0d c1 call 2025d9c <putchar> <== NOT EXECUTED
202269c: a4 04 a0 01 inc %l2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
20226a0: 80 a4 80 1a cmp %l2, %i2 <== NOT EXECUTED
20226a4: 32 bf ff fd bne,a 2022698 <rtems_rfs_symlink+0x5c> <== NOT EXECUTED
20226a8: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
20226ac: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
20226b0: 40 00 0d a8 call 2025d50 <printf> <== NOT EXECUTED
20226b4: 90 12 20 a8 or %o0, 0xa8, %o0 ! 20384a8 <CSWTCH.1+0x15bc> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
20226b8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20226bc: 04 bf ff e9 ble 2022660 <rtems_rfs_symlink+0x24> <== NOT EXECUTED
20226c0: b4 10 20 00 clr %i2 <== NOT EXECUTED
printf ("%c", link[c]);
20226c4: d0 4e c0 1a ldsb [ %i3 + %i2 ], %o0 <== NOT EXECUTED
20226c8: 40 00 0d b5 call 2025d9c <putchar> <== NOT EXECUTED
20226cc: b4 06 a0 01 inc %i2 <== NOT EXECUTED
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
for (c = 0; c < link_length; c++)
20226d0: 80 a6 80 1c cmp %i2, %i4 <== NOT EXECUTED
20226d4: 32 bf ff fd bne,a 20226c8 <rtems_rfs_symlink+0x8c> <== NOT EXECUTED
20226d8: d0 4e c0 1a ldsb [ %i3 + %i2 ], %o0 <== NOT EXECUTED
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
20226dc: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
20226e0: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
20226e4: 1a bf ff e3 bcc 2022670 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
20226e8: b4 10 20 5b mov 0x5b, %i2 <== NOT EXECUTED
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
20226ec: 40 00 11 47 call 2026c08 <strlen>
20226f0: 90 10 00 19 mov %i1, %o0
20226f4: 82 07 bf f8 add %fp, -8, %g1
20226f8: 96 10 00 08 mov %o0, %o3
20226fc: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
2022700: e2 23 a0 60 st %l1, [ %sp + 0x60 ]
2022704: 90 10 00 18 mov %i0, %o0
2022708: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
202270c: 92 10 00 10 mov %l0, %o1
2022710: 94 10 00 19 mov %i1, %o2
2022714: 9a 10 20 01 mov 1, %o5
2022718: 19 00 00 28 sethi %hi(0xa000), %o4
202271c: 7f ff bb 30 call 20113dc <rtems_rfs_inode_create>
2022720: 98 13 21 ff or %o4, 0x1ff, %o4 ! a1ff <PROM_START+0xa1ff>
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
2022724: b4 92 20 00 orcc %o0, 0, %i2
2022728: 14 bf ff d2 bg 2022670 <rtems_rfs_symlink+0x34> <== NEVER TAKEN
202272c: d2 07 bf f8 ld [ %fp + -8 ], %o1
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2022730: 90 10 00 18 mov %i0, %o0
2022734: 94 07 bf c4 add %fp, -60, %o2
2022738: 7f ff b9 e5 call 2010ecc <rtems_rfs_inode_open>
202273c: 96 10 20 01 mov 1, %o3
if (rc > 0)
2022740: b4 92 20 00 orcc %o0, 0, %i2
2022744: 14 bf ff cb bg 2022670 <rtems_rfs_symlink+0x34> <== NEVER TAKEN
2022748: 80 a7 20 13 cmp %i4, 0x13
/*
* If the link length is less than the length of data union in the inode
* place the link into the data area else allocate a block and write the link
* to that.
*/
if (link_length < RTEMS_RFS_INODE_DATA_NAME_SIZE)
202274c: 38 80 00 20 bgu,a 20227cc <rtems_rfs_symlink+0x190> <== NEVER TAKEN
2022750: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
2022754: d0 07 bf d0 ld [ %fp + -48 ], %o0
2022758: 92 10 20 00 clr %o1
202275c: 94 10 20 14 mov 0x14, %o2
2022760: 40 00 0d 2a call 2025c08 <memset>
2022764: 90 02 20 1c add %o0, 0x1c, %o0
memcpy (inode.node->data.name, link, link_length);
2022768: d0 07 bf d0 ld [ %fp + -48 ], %o0
202276c: 92 10 00 1b mov %i3, %o1
2022770: 90 02 20 1c add %o0, 0x1c, %o0
2022774: 40 00 0c 99 call 20259d8 <memcpy>
2022778: 94 10 00 1c mov %i4, %o2
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
202277c: c2 07 bf d0 ld [ %fp + -48 ], %g1
2022780: c0 28 60 0c clrb [ %g1 + 0xc ]
2022784: c2 07 bf d0 ld [ %fp + -48 ], %g1
2022788: c0 28 60 0d clrb [ %g1 + 0xd ]
202278c: c2 07 bf d0 ld [ %fp + -48 ], %g1
2022790: c0 28 60 0e clrb [ %g1 + 0xe ]
2022794: c2 07 bf d0 ld [ %fp + -48 ], %g1
2022798: c0 28 60 0f clrb [ %g1 + 0xf ]
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
202279c: c2 07 bf d0 ld [ %fp + -48 ], %g1
20227a0: 85 37 20 08 srl %i4, 8, %g2
20227a4: c4 28 60 0a stb %g2, [ %g1 + 0xa ]
20227a8: c2 07 bf d0 ld [ %fp + -48 ], %g1
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
20227ac: 90 10 00 18 mov %i0, %o0
20227b0: f8 28 60 0b stb %i4, [ %g1 + 0xb ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20227b4: 82 10 20 01 mov 1, %g1
20227b8: 92 07 bf c4 add %fp, -60, %o1
20227bc: 7f ff ba 3b call 20110a8 <rtems_rfs_inode_close>
20227c0: c2 2f bf d4 stb %g1, [ %fp + -44 ]
return rc;
20227c4: 10 bf ff ab b 2022670 <rtems_rfs_symlink+0x34>
20227c8: b4 10 00 08 mov %o0, %i2
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
20227cc: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
20227d0: 7f ff ec 84 call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
20227d4: 94 07 bf 74 add %fp, -140, %o2 <== NOT EXECUTED
20227d8: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
if (rc > 0)
20227dc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
20227e0: 04 80 00 05 ble 20227f4 <rtems_rfs_symlink+0x1b8> <== NOT EXECUTED
20227e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
20227e8: 7f ff ba 30 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20227ec: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
20227f0: 30 bf ff a0 b,a 2022670 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
20227f4: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
20227f8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20227fc: 7f ff ed a6 call 201de94 <rtems_rfs_block_map_grow> <== NOT EXECUTED
2022800: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
2022804: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2022808: 04 80 00 08 ble 2022828 <rtems_rfs_symlink+0x1ec> <== NOT EXECUTED
202280c: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
2022810: 7f ff ec d8 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
2022814: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
2022818: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
202281c: 7f ff ba 23 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2022820: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
2022824: 30 bf ff 93 b,a 2022670 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
2022828: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
202282c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
2022830: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
handle->buffer = NULL;
2022834: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
2022838: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
202283c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2022840: 7f ff f0 23 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2022844: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
2022848: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
202284c: 04 80 00 07 ble 2022868 <rtems_rfs_symlink+0x22c> <== NOT EXECUTED
2022850: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
2022854: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022858: 7f ff ec c6 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
202285c: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
2022860: 10 bf ff e2 b 20227e8 <rtems_rfs_symlink+0x1ac> <== NOT EXECUTED
2022864: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
2022868: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
202286c: f4 00 60 24 ld [ %g1 + 0x24 ], %i2 <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
2022870: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
2022874: 40 00 0c e5 call 2025c08 <memset> <== NOT EXECUTED
2022878: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
memcpy (data, link, link_length);
202287c: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2022880: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2022884: 40 00 0c 55 call 20259d8 <memcpy> <== NOT EXECUTED
2022888: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
202288c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2022890: 7f ff ef 94 call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2022894: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
2022898: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
202289c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
20228a0: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
handle->buffer = NULL;
20228a4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
20228a8: 7f ff ec b2 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
20228ac: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
if (rc > 0)
20228b0: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
20228b4: 04 bf ff bb ble 20227a0 <rtems_rfs_symlink+0x164> <== NOT EXECUTED
20228b8: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
20228bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20228c0: 7f ff b9 fa call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20228c4: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
20228c8: 30 bf ff 6a b,a 2022670 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
020228cc <rtems_rfs_symlink_read>:
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
20228cc: 9d e3 bf 18 save %sp, -232, %sp
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
20228d0: 90 10 20 04 mov 4, %o0
20228d4: 92 10 20 00 clr %o1
20228d8: 7f ff c6 59 call 201423c <rtems_rfs_trace>
20228dc: ba 10 00 18 mov %i0, %i5
20228e0: 80 8a 20 ff btst 0xff, %o0
20228e4: 12 80 00 34 bne 20229b4 <rtems_rfs_symlink_read+0xe8> <== NEVER TAKEN
20228e8: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
20228ec: 90 10 00 1d mov %i5, %o0
20228f0: 92 10 00 19 mov %i1, %o1
20228f4: 94 07 bf c8 add %fp, -56, %o2
20228f8: 7f ff b9 75 call 2010ecc <rtems_rfs_inode_open>
20228fc: 96 10 20 01 mov 1, %o3
if (rc)
2022900: b0 92 20 00 orcc %o0, 0, %i0
2022904: 12 80 00 0e bne 202293c <rtems_rfs_symlink_read+0x70> <== NEVER TAKEN
2022908: d2 07 bf d4 ld [ %fp + -44 ], %o1
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
202290c: 03 00 00 3c sethi %hi(0xf000), %g1
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2022910: c4 0a 60 02 ldub [ %o1 + 2 ], %g2
2022914: 85 28 a0 08 sll %g2, 8, %g2
2022918: 84 08 80 01 and %g2, %g1, %g2
202291c: 03 00 00 28 sethi %hi(0xa000), %g1
2022920: 80 a0 80 01 cmp %g2, %g1
2022924: 22 80 00 08 be,a 2022944 <rtems_rfs_symlink_read+0x78> <== ALWAYS TAKEN
2022928: d4 0a 60 0a ldub [ %o1 + 0xa ], %o2
*length = rtems_rfs_inode_get_block_offset (&inode);
if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
202292c: 90 10 00 1d mov %i5, %o0
2022930: 92 07 bf c8 add %fp, -56, %o1
2022934: 7f ff b9 dd call 20110a8 <rtems_rfs_inode_close>
2022938: b0 10 20 16 mov 0x16, %i0
return EINVAL;
202293c: 81 c7 e0 08 ret
2022940: 81 e8 00 00 restore
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
2022944: c2 0a 60 0b ldub [ %o1 + 0xb ], %g1
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
2022948: 95 2a a0 08 sll %o2, 8, %o2
202294c: 94 10 40 0a or %g1, %o2, %o2
if (size < *length)
2022950: 80 a2 80 1b cmp %o2, %i3
2022954: 18 bf ff f6 bgu 202292c <rtems_rfs_symlink_read+0x60>
2022958: d4 27 00 00 st %o2, [ %i4 ]
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
202295c: c8 0a 60 0c ldub [ %o1 + 0xc ], %g4
2022960: c4 0a 60 0d ldub [ %o1 + 0xd ], %g2
2022964: c6 0a 60 0f ldub [ %o1 + 0xf ], %g3
2022968: c2 0a 60 0e ldub [ %o1 + 0xe ], %g1
202296c: 89 29 20 18 sll %g4, 0x18, %g4
2022970: 85 28 a0 10 sll %g2, 0x10, %g2
2022974: 83 28 60 08 sll %g1, 8, %g1
2022978: 84 11 00 02 or %g4, %g2, %g2
202297c: 84 10 80 03 or %g2, %g3, %g2
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
2022980: 80 90 80 01 orcc %g2, %g1, %g0
2022984: 12 80 00 11 bne 20229c8 <rtems_rfs_symlink_read+0xfc> <== NEVER TAKEN
2022988: 90 10 00 1d mov %i5, %o0
{
memcpy (path, inode.node->data.name, *length);
202298c: 90 10 00 1a mov %i2, %o0
2022990: 40 00 0c 12 call 20259d8 <memcpy>
2022994: 92 02 60 1c add %o1, 0x1c, %o1
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
2022998: c2 07 00 00 ld [ %i4 ], %g1
rc = rtems_rfs_inode_close (fs, &inode);
202299c: 90 10 00 1d mov %i5, %o0
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
20229a0: c0 2e 80 01 clrb [ %i2 + %g1 ]
rc = rtems_rfs_inode_close (fs, &inode);
20229a4: 7f ff b9 c1 call 20110a8 <rtems_rfs_inode_close>
20229a8: 92 07 bf c8 add %fp, -56, %o1
return rc;
}
20229ac: 81 c7 e0 08 ret
20229b0: 91 e8 00 08 restore %g0, %o0, %o0
{
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
20229b4: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
20229b8: 40 00 0c e6 call 2025d50 <printf> <== NOT EXECUTED
20229bc: 90 12 20 b0 or %o0, 0xb0, %o0 ! 20384b0 <CSWTCH.1+0x15c4> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
20229c0: 10 bf ff cc b 20228f0 <rtems_rfs_symlink_read+0x24> <== NOT EXECUTED
20229c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
20229c8: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
20229cc: 7f ff ec 05 call 201d9e0 <rtems_rfs_block_map_open> <== NOT EXECUTED
20229d0: 94 07 bf 78 add %fp, -136, %o2 <== NOT EXECUTED
20229d4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
if (rc > 0)
20229d8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
20229dc: 04 80 00 06 ble 20229f4 <rtems_rfs_symlink_read+0x128> <== NOT EXECUTED
20229e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
20229e4: 7f ff b9 b1 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20229e8: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
return rc;
20229ec: 81 c7 e0 08 ret <== NOT EXECUTED
20229f0: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
20229f4: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
20229f8: 94 10 20 00 clr %o2 <== NOT EXECUTED
20229fc: 96 10 20 00 clr %o3 <== NOT EXECUTED
2022a00: 7f ff ec e1 call 201dd84 <rtems_rfs_block_map_seek> <== NOT EXECUTED
2022a04: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
2022a08: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2022a0c: 04 80 00 07 ble 2022a28 <rtems_rfs_symlink_read+0x15c> <== NOT EXECUTED
2022a10: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
2022a14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022a18: 7f ff ec 56 call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
2022a1c: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
2022a20: 10 bf ff f1 b 20229e4 <rtems_rfs_symlink_read+0x118> <== NOT EXECUTED
2022a24: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2022a28: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2022a2c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2022a30: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
2022a34: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022a38: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2022a3c: 7f ff ef a4 call 201e8cc <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2022a40: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
2022a44: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2022a48: 14 bf ff f4 bg 2022a18 <rtems_rfs_symlink_read+0x14c> <== NOT EXECUTED
2022a4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
2022a50: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
2022a54: d4 07 00 00 ld [ %i4 ], %o2 <== NOT EXECUTED
2022a58: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
2022a5c: 40 00 0b df call 20259d8 <memcpy> <== NOT EXECUTED
2022a60: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
2022a64: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2022a68: 7f ff ef 1e call 201e6e0 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2022a6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
2022a70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
2022a74: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2022a78: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2022a7c: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2022a80: 7f ff ec 3c call 201db70 <rtems_rfs_block_map_close> <== NOT EXECUTED
2022a84: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
if (rc > 0)
2022a88: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2022a8c: 24 bf ff c4 ble,a 202299c <rtems_rfs_symlink_read+0xd0> <== NOT EXECUTED
2022a90: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
2022a94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022a98: 7f ff b9 84 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2022a9c: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
return rc;
2022aa0: 81 c7 e0 08 ret <== NOT EXECUTED
2022aa4: 81 e8 00 00 restore <== NOT EXECUTED
02014280 <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
2014280: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
2014284: 03 00 80 e7 sethi %hi(0x2039c00), %g1 <== NOT EXECUTED
2014288: c4 18 63 10 ldd [ %g1 + 0x310 ], %g2 ! 2039f10 <rtems_rfs_trace_flags><== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
201428c: 98 28 80 18 andn %g2, %i0, %o4 <== NOT EXECUTED
2014290: 9a 28 c0 19 andn %g3, %i1, %o5 <== NOT EXECUTED
return state;
}
2014294: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
2014298: d8 38 63 10 std %o4, [ %g1 + 0x310 ] <== NOT EXECUTED
return state;
}
201429c: 81 c7 e0 08 ret <== NOT EXECUTED
20142a0: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
0201425c <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
201425c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
2014260: 03 00 80 e7 sethi %hi(0x2039c00), %g1 <== NOT EXECUTED
2014264: c4 18 63 10 ldd [ %g1 + 0x310 ], %g2 ! 2039f10 <rtems_rfs_trace_flags><== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
2014268: 98 16 00 02 or %i0, %g2, %o4 <== NOT EXECUTED
201426c: 9a 16 40 03 or %i1, %g3, %o5 <== NOT EXECUTED
return state;
}
2014270: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
2014274: d8 38 63 10 std %o4, [ %g1 + 0x310 ] <== NOT EXECUTED
return state;
}
2014278: 81 c7 e0 08 ret <== NOT EXECUTED
201427c: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
020142a4 <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
20142a4: 9d e3 be f8 save %sp, -264, %sp <== NOT EXECUTED
const char* table[] =
20142a8: 13 00 80 da sethi %hi(0x2036800), %o1 <== NOT EXECUTED
20142ac: ba 07 bf 68 add %fp, -152, %i5 <== NOT EXECUTED
20142b0: 92 12 63 30 or %o1, 0x330, %o1 <== NOT EXECUTED
20142b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20142b8: 40 00 45 c8 call 20259d8 <memcpy> <== NOT EXECUTED
20142bc: 94 10 20 98 mov 0x98, %o2 <== NOT EXECUTED
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
20142c0: a0 10 00 19 mov %i1, %l0 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20142c4: 80 a6 20 01 cmp %i0, 1 <== NOT EXECUTED
20142c8: 04 80 00 49 ble 20143ec <rtems_rfs_trace_shell_command+0x148><== NOT EXECUTED
20142cc: 82 10 20 00 clr %g1 <== NOT EXECUTED
{
if (argv[arg][0] == '-')
20142d0: ec 06 60 04 ld [ %i1 + 4 ], %l6 <== NOT EXECUTED
20142d4: c2 4d 80 00 ldsb [ %l6 ], %g1 <== NOT EXECUTED
20142d8: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
20142dc: 02 80 00 6c be 201448c <rtems_rfs_trace_shell_command+0x1e8><== NOT EXECUTED
20142e0: 23 00 80 e7 sethi %hi(0x2039c00), %l1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
20142e4: 25 00 80 da sethi %hi(0x2036800), %l2 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
return 1;
20142e8: f4 1c 63 10 ldd [ %l1 + 0x310 ], %i2 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
20142ec: 27 00 80 da sethi %hi(0x2036800), %l3 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
20142f0: 29 00 80 da sethi %hi(0x2036800), %l4 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20142f4: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
20142f8: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
20142fc: c0 27 bf 60 clr [ %fp + -160 ] <== NOT EXECUTED
2014300: c0 27 bf 64 clr [ %fp + -156 ] <== NOT EXECUTED
"file-open",
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
2014304: c0 27 bf 58 clr [ %fp + -168 ] <== NOT EXECUTED
2014308: c0 27 bf 5c clr [ %fp + -164 ] <== NOT EXECUTED
201430c: a2 14 63 10 or %l1, 0x310, %l1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
2014310: a4 14 a0 e0 or %l2, 0xe0, %l2 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
2014314: a6 14 e0 e8 or %l3, 0xe8, %l3 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
2014318: a8 15 20 f0 or %l4, 0xf0, %l4 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1 << t;
else
clear_value = 1 << t;
201431c: 10 80 00 12 b 2014364 <rtems_rfs_trace_shell_command+0xc0><== NOT EXECUTED
2014320: ae 10 20 01 mov 1, %l7 <== NOT EXECUTED
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
2014324: b2 10 20 00 clr %i1 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
2014328: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
201432c: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
2014330: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
2014334: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2014338: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
201433c: b8 07 20 01 inc %i4 <== NOT EXECUTED
2014340: 80 a7 00 18 cmp %i4, %i0 <== NOT EXECUTED
2014344: 02 80 00 29 be 20143e8 <rtems_rfs_trace_shell_command+0x144><== NOT EXECUTED
2014348: f4 3c 40 00 std %i2, [ %l1 ] <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
201434c: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
2014350: ec 04 00 01 ld [ %l0 + %g1 ], %l6 <== NOT EXECUTED
2014354: c2 4d 80 00 ldsb [ %l6 ], %g1 <== NOT EXECUTED
2014358: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
201435c: 22 80 00 4d be,a 2014490 <rtems_rfs_trace_shell_command+0x1ec><== NOT EXECUTED
2014360: c2 4d a0 01 ldsb [ %l6 + 1 ], %g1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
2014364: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2014368: 40 00 48 37 call 2026444 <strcmp> <== NOT EXECUTED
201436c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
2014370: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014374: 22 80 00 02 be,a 201437c <rtems_rfs_trace_shell_command+0xd8><== NOT EXECUTED
2014378: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
201437c: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2014380: 40 00 48 31 call 2026444 <strcmp> <== NOT EXECUTED
2014384: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2014388: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
201438c: 02 bf ff e6 be 2014324 <rtems_rfs_trace_shell_command+0x80><== NOT EXECUTED
2014390: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
2014394: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2014398: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
201439c: 40 00 48 2a call 2026444 <strcmp> <== NOT EXECUTED
20143a0: aa 10 20 00 clr %l5 <== NOT EXECUTED
20143a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20143a8: 12 80 00 16 bne 2014400 <rtems_rfs_trace_shell_command+0x15c><== NOT EXECUTED
20143ac: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
{
if (set)
20143b0: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
20143b4: 02 80 00 26 be 201444c <rtems_rfs_trace_shell_command+0x1a8><== NOT EXECUTED
20143b8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
20143bc: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20143c0: b8 07 20 01 inc %i4 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
20143c4: b4 38 a0 00 xnor %g2, 0, %i2 <== NOT EXECUTED
20143c8: b6 38 e0 00 xnor %g3, 0, %i3 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
20143cc: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
20143d0: f4 3c 40 00 std %i2, [ %l1 ] <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
20143d4: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
20143d8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20143dc: 80 a7 00 18 cmp %i4, %i0 <== NOT EXECUTED
20143e0: 12 bf ff db bne 201434c <rtems_rfs_trace_shell_command+0xa8><== NOT EXECUTED
20143e4: c4 3f bf 58 std %g2, [ %fp + -168 ] <== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
20143e8: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
20143ec: 81 c7 e0 08 ret <== NOT EXECUTED
20143f0: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
20143f4: 80 a5 60 26 cmp %l5, 0x26 <== NOT EXECUTED
20143f8: 02 80 00 0e be 2014430 <rtems_rfs_trace_shell_command+0x18c><== NOT EXECUTED
20143fc: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
{
if (strcmp (argv[arg], table[t]) == 0)
2014400: d2 07 40 01 ld [ %i5 + %g1 ], %o1 <== NOT EXECUTED
2014404: 40 00 48 10 call 2026444 <strcmp> <== NOT EXECUTED
2014408: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
201440c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2014410: 32 bf ff f9 bne,a 20143f4 <rtems_rfs_trace_shell_command+0x150><== NOT EXECUTED
2014414: aa 05 60 01 inc %l5 <== NOT EXECUTED
{
if (set)
2014418: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
201441c: 02 80 00 12 be 2014464 <rtems_rfs_trace_shell_command+0x1c0><== NOT EXECUTED
2014420: ab 2d c0 15 sll %l7, %l5, %l5 <== NOT EXECUTED
set_value = 1 << t;
2014424: ea 27 bf 5c st %l5, [ %fp + -164 ] <== NOT EXECUTED
2014428: ab 3d 60 1f sra %l5, 0x1f, %l5 <== NOT EXECUTED
201442c: ea 27 bf 58 st %l5, [ %fp + -168 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2014430: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
2014434: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
2014438: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
201443c: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
2014440: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2014444: 10 bf ff be b 201433c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
2014448: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
201444c: b4 10 20 00 clr %i2 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
2014450: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
2014454: b6 10 20 00 clr %i3 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
2014458: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
201445c: 10 bf ff b8 b 201433c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
2014460: c4 3f bf 60 std %g2, [ %fp + -160 ] <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1 << t;
else
clear_value = 1 << t;
2014464: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
2014468: ea 27 bf 64 st %l5, [ %fp + -156 ] <== NOT EXECUTED
201446c: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
2014470: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
2014474: ab 3d 60 1f sra %l5, 0x1f, %l5 <== NOT EXECUTED
2014478: ea 27 bf 60 st %l5, [ %fp + -160 ] <== NOT EXECUTED
201447c: c4 1f bf 60 ldd [ %fp + -160 ], %g2 <== NOT EXECUTED
2014480: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2014484: 10 bf ff ae b 201433c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
2014488: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
201448c: c2 4d a0 01 ldsb [ %l6 + 1 ], %g1 <== NOT EXECUTED
2014490: 80 a0 60 68 cmp %g1, 0x68 <== NOT EXECUTED
2014494: 02 80 00 0a be 20144bc <rtems_rfs_trace_shell_command+0x218><== NOT EXECUTED
2014498: 80 a0 60 6c cmp %g1, 0x6c <== NOT EXECUTED
201449c: 22 80 00 0f be,a 20144d8 <rtems_rfs_trace_shell_command+0x234><== NOT EXECUTED
20144a0: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
20144a4: 11 00 80 da sethi %hi(0x2036800), %o0 <== NOT EXECUTED
20144a8: 40 00 46 6b call 2025e54 <puts> <== NOT EXECUTED
20144ac: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20368c8 <rtems_rfs_rtems_link_handlers+0xb8><== NOT EXECUTED
return 1;
20144b0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
20144b4: 81 c7 e0 08 ret <== NOT EXECUTED
20144b8: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
20144bc: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
20144c0: 11 00 80 da sethi %hi(0x2036800), %o0 <== NOT EXECUTED
20144c4: 40 00 46 23 call 2025d50 <printf> <== NOT EXECUTED
20144c8: 90 12 20 70 or %o0, 0x70, %o0 ! 2036870 <rtems_rfs_rtems_link_handlers+0x60><== NOT EXECUTED
return 0;
20144cc: 82 10 20 00 clr %g1 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
20144d0: 81 c7 e0 08 ret <== NOT EXECUTED
20144d4: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
20144d8: 11 00 80 da sethi %hi(0x2036800), %o0 <== NOT EXECUTED
20144dc: 39 00 80 da sethi %hi(0x2036800), %i4 <== NOT EXECUTED
20144e0: 90 12 20 98 or %o0, 0x98, %o0 <== NOT EXECUTED
20144e4: 40 00 46 1b call 2025d50 <printf> <== NOT EXECUTED
20144e8: b4 10 00 1e mov %fp, %i2 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
20144ec: b8 17 20 c0 or %i4, 0xc0, %i4 <== NOT EXECUTED
20144f0: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
20144f4: 40 00 46 17 call 2025d50 <printf> <== NOT EXECUTED
20144f8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20144fc: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2014500: 80 a7 40 1a cmp %i5, %i2 <== NOT EXECUTED
2014504: 32 bf ff fc bne,a 20144f4 <rtems_rfs_trace_shell_command+0x250><== NOT EXECUTED
2014508: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
201450c: 10 bf ff b8 b 20143ec <rtems_rfs_trace_shell_command+0x148><== NOT EXECUTED
2014510: 82 10 20 00 clr %g1 <== NOT EXECUTED
0202220c <rtems_rfs_unlink>:
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
202220c: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022210: 90 10 20 00 clr %o0
2022214: 13 00 80 00 sethi %hi(0x2000000), %o1
2022218: 7f ff c8 09 call 201423c <rtems_rfs_trace>
202221c: ba 10 00 18 mov %i0, %i5
2022220: 80 8a 20 ff btst 0xff, %o0
2022224: 12 80 00 5d bne 2022398 <rtems_rfs_unlink+0x18c> <== NEVER TAKEN
2022228: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
202222c: 90 10 00 1d mov %i5, %o0
2022230: 92 10 00 1a mov %i2, %o1
2022234: 94 07 bf d8 add %fp, -40, %o2
2022238: 7f ff bb 25 call 2010ecc <rtems_rfs_inode_open>
202223c: 96 10 20 01 mov 1, %o3
if (rc)
2022240: b0 92 20 00 orcc %o0, 0, %i0
2022244: 12 80 00 19 bne 20222a8 <rtems_rfs_unlink+0x9c> <== NEVER TAKEN
2022248: c2 07 bf e4 ld [ %fp + -28 ], %g1
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
202224c: 05 00 00 3c sethi %hi(0xf000), %g2
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
2022250: c2 08 60 02 ldub [ %g1 + 2 ], %g1
2022254: 83 28 60 08 sll %g1, 8, %g1
2022258: 82 08 40 02 and %g1, %g2, %g1
202225c: 05 00 00 10 sethi %hi(0x4000), %g2
2022260: 82 18 40 02 xor %g1, %g2, %g1
if (dir)
2022264: 80 a0 00 01 cmp %g0, %g1
2022268: a0 60 3f ff subx %g0, -1, %l0
202226c: 80 a4 20 00 cmp %l0, 0
2022270: 02 80 00 26 be 2022308 <rtems_rfs_unlink+0xfc> <== ALWAYS TAKEN
2022274: 80 a7 20 00 cmp %i4, 0
{
switch (dir_mode)
2022278: 12 80 00 22 bne 2022300 <rtems_rfs_unlink+0xf4> <== NOT EXECUTED
202227c: 80 a7 20 01 cmp %i4, 1 <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022280: 90 10 20 00 clr %o0 <== NOT EXECUTED
2022284: 7f ff c7 ee call 201423c <rtems_rfs_trace> <== NOT EXECUTED
2022288: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
202228c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022290: 12 80 00 6c bne 2022440 <rtems_rfs_unlink+0x234> <== NOT EXECUTED
2022294: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
2022298: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
202229c: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
20222a0: 7f ff bb 82 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20222a4: b0 10 20 15 mov 0x15, %i0 <== NOT EXECUTED
return EISDIR;
20222a8: 81 c7 e0 08 ret
20222ac: 81 e8 00 00 restore
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
20222b0: 90 10 00 1d mov %i5, %o0
20222b4: 7f ff bb 7d call 20110a8 <rtems_rfs_inode_close>
20222b8: 92 07 bf d8 add %fp, -40, %o1
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
20222bc: b0 92 20 00 orcc %o0, 0, %i0
20222c0: 04 bf ff fa ble 20222a8 <rtems_rfs_unlink+0x9c> <== ALWAYS TAKEN
20222c4: 90 10 20 00 clr %o0
20222c8: 7f ff c7 dd call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20222cc: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
20222d0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20222d4: 02 80 00 46 be 20223ec <rtems_rfs_unlink+0x1e0> <== NOT EXECUTED
20222d8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
20222dc: 40 00 12 43 call 2026be8 <strerror> <== NOT EXECUTED
20222e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20222e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20222e8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20222ec: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
20222f0: 40 00 0e 98 call 2025d50 <printf> <== NOT EXECUTED
20222f4: 90 12 20 48 or %o0, 0x48, %o0 ! 2038448 <CSWTCH.1+0x155c> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
20222f8: 81 c7 e0 08 ret <== NOT EXECUTED
20222fc: 81 e8 00 00 restore <== NOT EXECUTED
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
if (dir)
{
switch (dir_mode)
2022300: 02 80 00 3d be 20223f4 <rtems_rfs_unlink+0x1e8> <== NOT EXECUTED
2022304: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
2022308: 90 10 00 1d mov %i5, %o0
202230c: 92 10 00 19 mov %i1, %o1
2022310: 94 07 bf b0 add %fp, -80, %o2
2022314: 7f ff ba ee call 2010ecc <rtems_rfs_inode_open>
2022318: 96 10 20 01 mov 1, %o3
if (rc)
202231c: b0 92 20 00 orcc %o0, 0, %i0
2022320: 12 80 00 24 bne 20223b0 <rtems_rfs_unlink+0x1a4> <== NEVER TAKEN
2022324: 90 10 20 00 clr %o0
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
2022328: 90 10 00 1d mov %i5, %o0
202232c: 92 07 bf b0 add %fp, -80, %o1
2022330: 94 10 00 1a mov %i2, %o2
2022334: 7f ff f6 40 call 201fc34 <rtems_rfs_dir_del_entry>
2022338: 96 10 00 1b mov %i3, %o3
if (rc > 0)
202233c: b0 92 20 00 orcc %o0, 0, %i0
2022340: 04 80 00 44 ble 2022450 <rtems_rfs_unlink+0x244> <== ALWAYS TAKEN
2022344: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022348: 7f ff c7 bd call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202234c: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2022350: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022354: 22 80 00 0a be,a 202237c <rtems_rfs_unlink+0x170> <== NOT EXECUTED
2022358: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
202235c: 40 00 12 23 call 2026be8 <strerror> <== NOT EXECUTED
2022360: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022364: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2022368: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
202236c: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2022370: 40 00 0e 78 call 2025d50 <printf> <== NOT EXECUTED
2022374: 90 12 23 50 or %o0, 0x350, %o0 ! 2038350 <CSWTCH.1+0x1464><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
2022378: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
202237c: 7f ff bb 4b call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
2022380: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2022384: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022388: 7f ff bb 48 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
202238c: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
2022390: 81 c7 e0 08 ret <== NOT EXECUTED
2022394: 81 e8 00 00 restore <== NOT EXECUTED
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
2022398: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
202239c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20223a0: 40 00 0e 6c call 2025d50 <printf> <== NOT EXECUTED
20223a4: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
20223a8: 10 bf ff a2 b 2022230 <rtems_rfs_unlink+0x24> <== NOT EXECUTED
20223ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
20223b0: 7f ff c7 a3 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20223b4: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
20223b8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20223bc: 22 80 00 0a be,a 20223e4 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
20223c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
20223c4: 40 00 12 09 call 2026be8 <strerror> <== NOT EXECUTED
20223c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20223cc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20223d0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20223d4: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
20223d8: 40 00 0e 5e call 2025d50 <printf> <== NOT EXECUTED
20223dc: 90 12 23 20 or %o0, 0x320, %o0 ! 2038320 <CSWTCH.1+0x1434><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
20223e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20223e4: 7f ff bb 31 call 20110a8 <rtems_rfs_inode_close> <== NOT EXECUTED
20223e8: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
20223ec: 81 c7 e0 08 ret <== NOT EXECUTED
20223f0: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
20223f4: 7f ff f8 1a call 202045c <rtems_rfs_dir_empty> <== NOT EXECUTED
20223f8: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
if (rc > 0)
20223fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2022400: 04 bf ff c2 ble 2022308 <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
2022404: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022408: 7f ff c7 8d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202240c: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2022410: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022414: 22 bf ff f4 be,a 20223e4 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
2022418: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
202241c: 40 00 11 f3 call 2026be8 <strerror> <== NOT EXECUTED
2022420: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022424: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2022428: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
202242c: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2022430: 40 00 0e 48 call 2025d50 <printf> <== NOT EXECUTED
2022434: 90 12 23 00 or %o0, 0x300, %o0 ! 2038300 <CSWTCH.1+0x1414><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
2022438: 10 bf ff eb b 20223e4 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
202243c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
switch (dir_mode)
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
2022440: 40 00 0e 85 call 2025e54 <puts> <== NOT EXECUTED
2022444: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2022448: 10 bf ff 95 b 202229c <rtems_rfs_unlink+0x90> <== NOT EXECUTED
202244c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
2022450: c2 07 bf e4 ld [ %fp + -28 ], %g1
if (links == 0xffff)
links = 0;
2022454: 05 3f ff c0 sethi %hi(0xffff0000), %g2
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
2022458: f8 08 40 00 ldub [ %g1 ], %i4
202245c: c2 08 60 01 ldub [ %g1 + 1 ], %g1
2022460: b9 2f 20 08 sll %i4, 8, %i4
2022464: b8 17 00 01 or %i4, %g1, %i4
if (links == 0xffff)
2022468: 83 2f 20 10 sll %i4, 0x10, %g1
202246c: 83 30 60 10 srl %g1, 0x10, %g1
links = 0;
2022470: 82 38 80 01 xnor %g2, %g1, %g1
2022474: 80 a0 00 01 cmp %g0, %g1
2022478: 82 60 20 00 subx %g0, 0, %g1
202247c: b8 0f 00 01 and %i4, %g1, %i4
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022480: 13 00 80 00 sethi %hi(0x2000000), %o1
2022484: 7f ff c7 6e call 201423c <rtems_rfs_trace>
2022488: b7 2f 20 10 sll %i4, 0x10, %i3
202248c: 80 8a 20 ff btst 0xff, %o0
2022490: 12 80 00 22 bne 2022518 <rtems_rfs_unlink+0x30c> <== NEVER TAKEN
2022494: 92 10 00 1a mov %i2, %o1
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
2022498: b7 36 e0 10 srl %i3, 0x10, %i3
202249c: 80 a6 e0 01 cmp %i3, 1
20224a0: 08 80 00 38 bleu 2022580 <rtems_rfs_unlink+0x374>
20224a4: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
links--;
20224a8: b8 07 3f ff add %i4, -1, %i4
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
20224ac: 85 37 20 08 srl %i4, 8, %g2
20224b0: c4 28 40 00 stb %g2, [ %g1 ]
20224b4: c2 07 bf e4 ld [ %fp + -28 ], %g1
20224b8: f8 28 60 01 stb %i4, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20224bc: 82 10 20 01 mov 1, %g1
20224c0: c2 2f bf e8 stb %g1, [ %fp + -24 ]
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
20224c4: 90 07 bf b0 add %fp, -80, %o0
20224c8: 92 10 20 01 mov 1, %o1
20224cc: 7f ff bc db call 2011838 <rtems_rfs_inode_time_stamp_now>
20224d0: 94 10 20 01 mov 1, %o2
if (rc > 0)
20224d4: b0 92 20 00 orcc %o0, 0, %i0
20224d8: 04 80 00 16 ble 2022530 <rtems_rfs_unlink+0x324> <== ALWAYS TAKEN
20224dc: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
20224e0: 7f ff c7 57 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
20224e4: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
20224e8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20224ec: 22 bf ff a4 be,a 202237c <rtems_rfs_unlink+0x170> <== NOT EXECUTED
20224f0: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
20224f4: 40 00 11 bd call 2026be8 <strerror> <== NOT EXECUTED
20224f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20224fc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2022500: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2022504: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
2022508: 40 00 0e 12 call 2025d50 <printf> <== NOT EXECUTED
202250c: 90 12 23 d8 or %o0, 0x3d8, %o0 ! 20383d8 <CSWTCH.1+0x14ec><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
2022510: 10 bf ff 9b b 202237c <rtems_rfs_unlink+0x170> <== NOT EXECUTED
2022514: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
2022518: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
202251c: 95 36 e0 10 srl %i3, 0x10, %o2 <== NOT EXECUTED
2022520: 40 00 0e 0c call 2025d50 <printf> <== NOT EXECUTED
2022524: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED
if (links > 1)
2022528: 10 bf ff dd b 202249c <rtems_rfs_unlink+0x290> <== NOT EXECUTED
202252c: b7 36 e0 10 srl %i3, 0x10, %i3 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
2022530: 90 10 00 1d mov %i5, %o0
2022534: 7f ff ba dd call 20110a8 <rtems_rfs_inode_close>
2022538: 92 07 bf b0 add %fp, -80, %o1
if (rc > 0)
202253c: b0 92 20 00 orcc %o0, 0, %i0
2022540: 04 bf ff 5c ble 20222b0 <rtems_rfs_unlink+0xa4> <== ALWAYS TAKEN
2022544: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022548: 7f ff c7 3d call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202254c: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2022550: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2022554: 22 bf ff a4 be,a 20223e4 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
2022558: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
202255c: 40 00 11 a3 call 2026be8 <strerror> <== NOT EXECUTED
2022560: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2022564: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2022568: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
202256c: 11 00 80 e1 sethi %hi(0x2038400), %o0 <== NOT EXECUTED
2022570: 40 00 0d f8 call 2025d50 <printf> <== NOT EXECUTED
2022574: 90 12 20 10 or %o0, 0x10, %o0 ! 2038410 <CSWTCH.1+0x1524> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
2022578: 10 bf ff 9b b 20223e4 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
202257c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
2022580: 90 10 00 1d mov %i5, %o0
2022584: 7f ff ba ef call 2011140 <rtems_rfs_inode_delete>
2022588: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
202258c: b0 92 20 00 orcc %o0, 0, %i0
2022590: 04 80 00 10 ble 20225d0 <rtems_rfs_unlink+0x3c4> <== ALWAYS TAKEN
2022594: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2022598: 7f ff c7 29 call 201423c <rtems_rfs_trace> <== NOT EXECUTED
202259c: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
20225a0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20225a4: 22 bf ff 76 be,a 202237c <rtems_rfs_unlink+0x170> <== NOT EXECUTED
20225a8: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
20225ac: 40 00 11 8f call 2026be8 <strerror> <== NOT EXECUTED
20225b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20225b4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20225b8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20225bc: 11 00 80 e0 sethi %hi(0x2038000), %o0 <== NOT EXECUTED
20225c0: 40 00 0d e4 call 2025d50 <printf> <== NOT EXECUTED
20225c4: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 20383a8 <CSWTCH.1+0x14bc><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
20225c8: 10 bf ff 6d b 202237c <rtems_rfs_unlink+0x170> <== NOT EXECUTED
20225cc: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
20225d0: 80 a4 20 00 cmp %l0, 0
20225d4: 02 bf ff bd be 20224c8 <rtems_rfs_unlink+0x2bc> <== ALWAYS TAKEN
20225d8: 90 07 bf b0 add %fp, -80, %o0
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20225dc: c4 07 bf bc ld [ %fp + -68 ], %g2 <== NOT EXECUTED
if (links == 0xffff)
20225e0: 39 00 00 3f sethi %hi(0xfc00), %i4 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20225e4: c2 08 a0 01 ldub [ %g2 + 1 ], %g1 <== NOT EXECUTED
20225e8: c6 08 80 00 ldub [ %g2 ], %g3 <== NOT EXECUTED
if (links == 0xffff)
20225ec: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
20225f0: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
20225f4: 86 10 c0 01 or %g3, %g1, %g3 <== NOT EXECUTED
if (links == 0xffff)
20225f8: 89 28 e0 10 sll %g3, 0x10, %g4 <== NOT EXECUTED
20225fc: 89 31 20 10 srl %g4, 0x10, %g4 <== NOT EXECUTED
2022600: 80 a1 00 1c cmp %g4, %i4 <== NOT EXECUTED
2022604: 02 80 00 0c be 2022634 <rtems_rfs_unlink+0x428> <== NOT EXECUTED
2022608: 82 10 00 03 mov %g3, %g1 <== NOT EXECUTED
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
202260c: 80 a1 20 01 cmp %g4, 1 <== NOT EXECUTED
2022610: 38 80 00 02 bgu,a 2022618 <rtems_rfs_unlink+0x40c> <== NOT EXECUTED
2022614: 82 00 ff ff add %g3, -1, %g1 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
2022618: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
202261c: c6 28 80 00 stb %g3, [ %g2 ] <== NOT EXECUTED
2022620: c4 07 bf bc ld [ %fp + -68 ], %g2 <== NOT EXECUTED
2022624: c2 28 a0 01 stb %g1, [ %g2 + 1 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2022628: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
202262c: 10 bf ff a6 b 20224c4 <rtems_rfs_unlink+0x2b8> <== NOT EXECUTED
2022630: c2 2f bf c0 stb %g1, [ %fp + -64 ] <== NOT EXECUTED
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
2022634: 10 bf ff f9 b 2022618 <rtems_rfs_unlink+0x40c> <== NOT EXECUTED
2022638: 82 10 20 00 clr %g1 <== NOT EXECUTED
02016110 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
2016110: 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 )
2016114: 80 a6 60 00 cmp %i1, 0
2016118: 12 80 00 04 bne 2016128 <rtems_signal_send+0x18>
201611c: 82 10 20 0a mov 0xa, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016120: 81 c7 e0 08 ret
2016124: 91 e8 00 01 restore %g0, %g1, %o0
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2016128: 90 10 00 18 mov %i0, %o0
201612c: 40 00 13 ef call 201b0e8 <_Thread_Get>
2016130: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2016134: c2 07 bf fc ld [ %fp + -4 ], %g1
2016138: 80 a0 60 00 cmp %g1, 0
201613c: 12 80 00 20 bne 20161bc <rtems_signal_send+0xac>
2016140: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2016144: fa 02 21 58 ld [ %o0 + 0x158 ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2016148: c2 07 60 0c ld [ %i5 + 0xc ], %g1
201614c: 80 a0 60 00 cmp %g1, 0
2016150: 02 80 00 1e be 20161c8 <rtems_signal_send+0xb8>
2016154: 01 00 00 00 nop
if ( asr->is_enabled ) {
2016158: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
201615c: 80 a0 60 00 cmp %g1, 0
2016160: 02 80 00 1e be 20161d8 <rtems_signal_send+0xc8>
2016164: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2016168: 7f ff e4 3d call 200f25c <sparc_disable_interrupts>
201616c: 01 00 00 00 nop
*signal_set |= signals;
2016170: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2016174: b2 10 40 19 or %g1, %i1, %i1
2016178: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
201617c: 7f ff e4 3c call 200f26c <sparc_enable_interrupts>
2016180: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2016184: 03 00 80 f6 sethi %hi(0x203d800), %g1
2016188: 82 10 63 70 or %g1, 0x370, %g1 ! 203db70 <_Per_CPU_Information>
201618c: c4 00 60 08 ld [ %g1 + 8 ], %g2
2016190: 80 a0 a0 00 cmp %g2, 0
2016194: 02 80 00 06 be 20161ac <rtems_signal_send+0x9c>
2016198: 01 00 00 00 nop
201619c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
20161a0: 80 a7 00 02 cmp %i4, %g2
20161a4: 02 80 00 15 be 20161f8 <rtems_signal_send+0xe8> <== ALWAYS TAKEN
20161a8: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
20161ac: 40 00 13 c2 call 201b0b4 <_Thread_Enable_dispatch>
20161b0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20161b4: 10 bf ff db b 2016120 <rtems_signal_send+0x10>
20161b8: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
20161bc: 82 10 20 04 mov 4, %g1
}
20161c0: 81 c7 e0 08 ret
20161c4: 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();
20161c8: 40 00 13 bb call 201b0b4 <_Thread_Enable_dispatch>
20161cc: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
20161d0: 10 bf ff d4 b 2016120 <rtems_signal_send+0x10>
20161d4: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
20161d8: 7f ff e4 21 call 200f25c <sparc_disable_interrupts>
20161dc: 01 00 00 00 nop
*signal_set |= signals;
20161e0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
20161e4: b2 10 40 19 or %g1, %i1, %i1
20161e8: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
20161ec: 7f ff e4 20 call 200f26c <sparc_enable_interrupts>
20161f0: 01 00 00 00 nop
20161f4: 30 bf ff ee b,a 20161ac <rtems_signal_send+0x9c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
20161f8: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
20161fc: 30 bf ff ec b,a 20161ac <rtems_signal_send+0x9c>
0200257c <rtems_stack_checker_begin_extension>:
Thread_Control *the_thread
)
{
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
200257c: c2 02 20 08 ld [ %o0 + 8 ], %g1
2002580: 80 a0 60 00 cmp %g1, 0
2002584: 02 80 00 0c be 20025b4 <rtems_stack_checker_begin_extension+0x38><== NEVER TAKEN
2002588: 05 00 80 7c sethi %hi(0x201f000), %g2
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
200258c: c2 02 20 b8 ld [ %o0 + 0xb8 ], %g1
2002590: c6 00 a3 ac ld [ %g2 + 0x3ac ], %g3
2002594: 84 10 a3 ac or %g2, 0x3ac, %g2
2002598: c6 20 60 08 st %g3, [ %g1 + 8 ]
200259c: c6 00 a0 04 ld [ %g2 + 4 ], %g3
20025a0: c6 20 60 0c st %g3, [ %g1 + 0xc ]
20025a4: c6 00 a0 08 ld [ %g2 + 8 ], %g3
20025a8: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
20025ac: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
20025b0: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
20025b4: 81 c3 e0 08 retl
020024c8 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
20024c8: 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 )
20024cc: 3b 00 80 7c sethi %hi(0x201f000), %i5
20024d0: c2 07 61 34 ld [ %i5 + 0x134 ], %g1 ! 201f134 <Stack_check_Initialized>
20024d4: 80 a0 60 00 cmp %g1, 0
20024d8: 12 80 00 20 bne 2002558 <rtems_stack_checker_create_extension+0x90>
20024dc: 07 00 80 7c sethi %hi(0x201f000), %g3
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
20024e0: 09 3f bb 7c sethi %hi(0xfeedf000), %g4
20024e4: 82 10 e3 ac or %g3, 0x3ac, %g1
20024e8: 88 11 20 0d or %g4, 0xd, %g4
20024ec: c8 20 e3 ac st %g4, [ %g3 + 0x3ac ]
20024f0: 07 02 eb 43 sethi %hi(0xbad0c00), %g3
20024f4: 86 10 e1 06 or %g3, 0x106, %g3 ! bad0d06 <RAM_END+0x96d0d06>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
20024f8: 05 00 80 7e sethi %hi(0x201f800), %g2
20024fc: d0 00 a2 d0 ld [ %g2 + 0x2d0 ], %o0 ! 201fad0 <_Per_CPU_Information>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
2002500: c6 20 60 04 st %g3, [ %g1 + 4 ]
2002504: 07 37 ab 7c sethi %hi(0xdeadf000), %g3
2002508: 86 10 e0 0d or %g3, 0xd, %g3 ! deadf00d <RAM_END+0xdc6df00d>
200250c: c6 20 60 08 st %g3, [ %g1 + 8 ]
2002510: 07 18 03 43 sethi %hi(0x600d0c00), %g3
2002514: 86 10 e1 06 or %g3, 0x106, %g3 ! 600d0d06 <RAM_END+0x5dcd0d06>
2002518: c6 20 60 0c st %g3, [ %g1 + 0xc ]
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
200251c: 80 a2 20 00 cmp %o0, 0
2002520: 02 80 00 0c be 2002550 <rtems_stack_checker_create_extension+0x88><== NEVER TAKEN
2002524: 84 10 a2 d0 or %g2, 0x2d0, %g2
2002528: d4 00 a0 04 ld [ %g2 + 4 ], %o2
200252c: 80 a2 a0 00 cmp %o2, 0
2002530: 02 80 00 08 be 2002550 <rtems_stack_checker_create_extension+0x88><== NEVER TAKEN
2002534: 03 00 80 7c sethi %hi(0x201f000), %g1
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002538: 84 10 63 bc or %g1, 0x3bc, %g2 ! 201f3bc <Stack_check_Interrupt_stack>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
200253c: 94 22 80 08 sub %o2, %o0, %o2
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002540: d0 20 a0 04 st %o0, [ %g2 + 4 ]
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
2002544: d4 20 63 bc st %o2, [ %g1 + 0x3bc ]
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2002548: 40 00 3f 04 call 2012158 <memset>
200254c: 92 10 20 a5 mov 0xa5, %o1
}
#endif
Stack_check_Initialized = 1;
2002550: 82 10 20 01 mov 1, %g1
2002554: c2 27 61 34 st %g1, [ %i5 + 0x134 ]
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
2002558: 80 a6 60 00 cmp %i1, 0
200255c: 02 80 00 06 be 2002574 <rtems_stack_checker_create_extension+0xac><== NEVER TAKEN
2002560: 01 00 00 00 nop
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
2002564: d0 06 60 b8 ld [ %i1 + 0xb8 ], %o0
2002568: d4 06 60 b4 ld [ %i1 + 0xb4 ], %o2
200256c: 40 00 3e fb call 2012158 <memset>
2002570: 92 10 20 a5 mov 0xa5, %o1
return true;
}
2002574: 81 c7 e0 08 ret
2002578: 91 e8 20 01 restore %g0, 1, %o0
020026d0 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
20026d0: 9d e3 bf a0 save %sp, -96, %sp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
20026d4: 39 00 80 7e sethi %hi(0x201f800), %i4
20026d8: b8 17 22 d0 or %i4, 0x2d0, %i4 ! 201fad0 <_Per_CPU_Information>
20026dc: c2 07 20 0c ld [ %i4 + 0xc ], %g1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
20026e0: d0 00 60 b8 ld [ %g1 + 0xb8 ], %o0
20026e4: 80 a7 80 08 cmp %fp, %o0
20026e8: 0a 80 00 06 bcs 2002700 <rtems_stack_checker_is_blown+0x30><== NEVER TAKEN
20026ec: ba 10 20 00 clr %i5
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
20026f0: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1
20026f4: 82 02 00 01 add %o0, %g1, %g1
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
20026f8: 80 a0 40 1e cmp %g1, %fp
20026fc: ba 60 3f ff subx %g0, -1, %i5
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
2002700: 03 00 80 7c sethi %hi(0x201f000), %g1
2002704: c2 00 61 34 ld [ %g1 + 0x134 ], %g1 ! 201f134 <Stack_check_Initialized>
2002708: 80 a0 60 00 cmp %g1, 0
200270c: 02 80 00 09 be 2002730 <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
2002710: 92 10 20 01 mov 1, %o1
pattern_ok = (!memcmp(
2002714: 90 02 20 08 add %o0, 8, %o0
2002718: 94 10 20 10 mov 0x10, %o2
200271c: 13 00 80 7c sethi %hi(0x201f000), %o1
2002720: 40 00 3e 24 call 2011fb0 <memcmp>
2002724: 92 12 63 ac or %o1, 0x3ac, %o1 ! 201f3ac <Stack_check_Pattern>
2002728: 80 a0 00 08 cmp %g0, %o0
200272c: 92 60 3f ff subx %g0, -1, %o1
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
2002730: 80 8f 60 ff btst 0xff, %i5
2002734: 22 80 00 07 be,a 2002750 <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
2002738: 92 0a 60 ff and %o1, 0xff, %o1 <== NOT EXECUTED
200273c: 92 8a 60 ff andcc %o1, 0xff, %o1
2002740: 02 80 00 04 be 2002750 <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
2002744: b0 10 20 00 clr %i0
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
2002748: 81 c7 e0 08 ret
200274c: 81 e8 00 00 restore
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
2002750: 7f ff ff 9b call 20025bc <Stack_check_report_blown_task> <== NOT EXECUTED
2002754: d0 07 20 0c ld [ %i4 + 0xc ], %o0 <== NOT EXECUTED
0200275c <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200275c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if ( !print )
2002760: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2002764: 02 80 00 14 be 20027b4 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
2002768: 39 00 80 7c sethi %hi(0x201f000), %i4 <== NOT EXECUTED
return;
print_context = context;
print_handler = print;
200276c: 3b 00 80 7c sethi %hi(0x201f000), %i5 <== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
2002770: f0 27 21 3c st %i0, [ %i4 + 0x13c ] <== NOT EXECUTED
print_handler = print;
2002774: f2 27 61 38 st %i1, [ %i5 + 0x138 ] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
2002778: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200277c: 13 00 80 73 sethi %hi(0x201cc00), %o1 <== NOT EXECUTED
2002780: 9f c6 40 00 call %i1 <== NOT EXECUTED
2002784: 92 12 62 08 or %o1, 0x208, %o1 ! 201ce08 <rtems_filesystem_table+0x68c><== NOT EXECUTED
(*print)( context,
2002788: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200278c: 13 00 80 73 sethi %hi(0x201cc00), %o1 <== NOT EXECUTED
2002790: 9f c6 40 00 call %i1 <== NOT EXECUTED
2002794: 92 12 62 20 or %o1, 0x220, %o1 ! 201ce20 <rtems_filesystem_table+0x6a4><== 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 );
2002798: 11 00 80 08 sethi %hi(0x2002000), %o0 <== NOT EXECUTED
200279c: 40 00 18 52 call 20088e4 <rtems_iterate_over_all_threads> <== NOT EXECUTED
20027a0: 90 12 22 90 or %o0, 0x290, %o0 ! 2002290 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
20027a4: 7f ff fe bb call 2002290 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
20027a8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
#endif
print_context = NULL;
20027ac: c0 27 21 3c clr [ %i4 + 0x13c ] <== NOT EXECUTED
print_handler = NULL;
20027b0: c0 27 61 38 clr [ %i5 + 0x138 ] <== NOT EXECUTED
20027b4: 81 c7 e0 08 ret <== NOT EXECUTED
20027b8: 81 e8 00 00 restore <== NOT EXECUTED
02002664 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
2002664: 9d e3 bf a0 save %sp, -96, %sp
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
2002668: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
200266c: 13 00 80 7c sethi %hi(0x201f000), %o1
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
2002670: 90 00 60 08 add %g1, 8, %o0
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002674: 94 10 20 10 mov 0x10, %o2
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
2002678: 80 a7 80 01 cmp %fp, %g1
200267c: 0a 80 00 07 bcs 2002698 <rtems_stack_checker_switch_extension+0x34><== NEVER TAKEN
2002680: 92 12 63 ac or %o1, 0x3ac, %o1
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
2002684: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2
2002688: 82 00 40 02 add %g1, %g2, %g1
200268c: 80 a7 80 01 cmp %fp, %g1
2002690: 08 80 00 09 bleu 20026b4 <rtems_stack_checker_switch_extension+0x50><== ALWAYS TAKEN
2002694: 01 00 00 00 nop
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
2002698: 40 00 3e 46 call 2011fb0 <memcmp> <== NOT EXECUTED
200269c: 01 00 00 00 nop <== NOT EXECUTED
20026a0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
20026a4: 92 60 3f ff subx %g0, -1, %o1 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
20026a8: 90 10 00 18 mov %i0, %o0
20026ac: 7f ff ff c4 call 20025bc <Stack_check_report_blown_task>
20026b0: 92 0a 60 01 and %o1, 1, %o1
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
20026b4: 40 00 3e 3f call 2011fb0 <memcmp>
20026b8: 01 00 00 00 nop
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
20026bc: 80 a2 20 00 cmp %o0, 0
20026c0: 12 bf ff fa bne 20026a8 <rtems_stack_checker_switch_extension+0x44>
20026c4: 92 10 20 00 clr %o1
20026c8: 81 c7 e0 08 ret
20026cc: 81 e8 00 00 restore
0200d454 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
200d454: 9d e3 bf 98 save %sp, -104, %sp
200d458: ba 10 00 18 mov %i0, %i5
long result;
char *end;
if ( !n )
200d45c: 80 a6 60 00 cmp %i1, 0
200d460: 02 80 00 1f be 200d4dc <rtems_string_to_int+0x88>
200d464: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d468: 40 00 0d f7 call 2010c44 <__errno>
200d46c: 01 00 00 00 nop
200d470: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtol( s, &end, base );
200d474: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200d478: c0 26 40 00 clr [ %i1 ]
result = strtol( s, &end, base );
200d47c: 90 10 00 1d mov %i5, %o0
200d480: 40 00 19 ef call 2013c3c <strtol>
200d484: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200d488: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
200d48c: 80 a6 a0 00 cmp %i2, 0
200d490: 02 80 00 03 be 200d49c <rtems_string_to_int+0x48>
200d494: b6 10 00 08 mov %o0, %i3
*endptr = end;
200d498: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200d49c: 80 a7 40 01 cmp %i5, %g1
200d4a0: 02 80 00 0f be 200d4dc <rtems_string_to_int+0x88>
200d4a4: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d4a8: 40 00 0d e7 call 2010c44 <__errno>
200d4ac: 01 00 00 00 nop
200d4b0: c2 02 00 00 ld [ %o0 ], %g1
200d4b4: 80 a0 60 22 cmp %g1, 0x22
200d4b8: 02 80 00 05 be 200d4cc <rtems_string_to_int+0x78>
200d4bc: 03 20 00 00 sethi %hi(0x80000000), %g1
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200d4c0: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
200d4c4: 81 c7 e0 08 ret
200d4c8: 91 e8 20 00 restore %g0, 0, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200d4cc: 82 38 40 1b xnor %g1, %i3, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d4d0: 80 a0 60 00 cmp %g1, 0
200d4d4: 12 80 00 04 bne 200d4e4 <rtems_string_to_int+0x90>
200d4d8: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200d4dc: 81 c7 e0 08 ret
200d4e0: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d4e4: 80 a6 e0 00 cmp %i3, 0
200d4e8: 02 bf ff fd be 200d4dc <rtems_string_to_int+0x88> <== NEVER TAKEN
200d4ec: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200d4f0: 80 a6 c0 01 cmp %i3, %g1
200d4f4: 32 bf ff f4 bne,a 200d4c4 <rtems_string_to_int+0x70> <== NEVER TAKEN
200d4f8: f6 26 40 00 st %i3, [ %i1 ] <== NOT EXECUTED
200d4fc: 30 bf ff f8 b,a 200d4dc <rtems_string_to_int+0x88>
0200d5d8 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
200d5d8: 9d e3 bf 98 save %sp, -104, %sp
200d5dc: ba 10 00 18 mov %i0, %i5
long result;
char *end;
if ( !n )
200d5e0: 80 a6 60 00 cmp %i1, 0
200d5e4: 02 80 00 1f be 200d660 <rtems_string_to_long+0x88>
200d5e8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d5ec: 40 00 0d 96 call 2010c44 <__errno>
200d5f0: 01 00 00 00 nop
200d5f4: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtol( s, &end, base );
200d5f8: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200d5fc: c0 26 40 00 clr [ %i1 ]
result = strtol( s, &end, base );
200d600: 90 10 00 1d mov %i5, %o0
200d604: 40 00 19 8e call 2013c3c <strtol>
200d608: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200d60c: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
200d610: 80 a6 a0 00 cmp %i2, 0
200d614: 02 80 00 03 be 200d620 <rtems_string_to_long+0x48>
200d618: b6 10 00 08 mov %o0, %i3
*endptr = end;
200d61c: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200d620: 80 a7 40 01 cmp %i5, %g1
200d624: 02 80 00 0f be 200d660 <rtems_string_to_long+0x88>
200d628: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d62c: 40 00 0d 86 call 2010c44 <__errno>
200d630: 01 00 00 00 nop
200d634: c2 02 00 00 ld [ %o0 ], %g1
200d638: 80 a0 60 22 cmp %g1, 0x22
200d63c: 02 80 00 05 be 200d650 <rtems_string_to_long+0x78>
200d640: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
200d644: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
200d648: 81 c7 e0 08 ret
200d64c: 91 e8 20 00 restore %g0, 0, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200d650: 82 38 40 1b xnor %g1, %i3, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d654: 80 a0 60 00 cmp %g1, 0
200d658: 12 80 00 04 bne 200d668 <rtems_string_to_long+0x90>
200d65c: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
200d660: 81 c7 e0 08 ret
200d664: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d668: 80 a6 e0 00 cmp %i3, 0
200d66c: 02 bf ff fd be 200d660 <rtems_string_to_long+0x88> <== NEVER TAKEN
200d670: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200d674: 80 a6 c0 01 cmp %i3, %g1
200d678: 32 bf ff f4 bne,a 200d648 <rtems_string_to_long+0x70> <== NEVER TAKEN
200d67c: f6 26 40 00 st %i3, [ %i1 ] <== NOT EXECUTED
200d680: 30 bf ff f8 b,a 200d660 <rtems_string_to_long+0x88>
0200d500 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
200d500: 9d e3 bf 98 save %sp, -104, %sp
long long result;
char *end;
if ( !n )
200d504: 80 a6 60 00 cmp %i1, 0
200d508: 02 80 00 1c be 200d578 <rtems_string_to_long_long+0x78>
200d50c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d510: 40 00 0d cd call 2010c44 <__errno>
200d514: 01 00 00 00 nop
200d518: c0 22 00 00 clr [ %o0 ]
*n = 0;
200d51c: c0 26 40 00 clr [ %i1 ]
200d520: c0 26 60 04 clr [ %i1 + 4 ]
result = strtoll( s, &end, base );
200d524: 90 10 00 18 mov %i0, %o0
200d528: 92 07 bf fc add %fp, -4, %o1
200d52c: 40 00 19 cd call 2013c60 <strtoll>
200d530: 94 10 00 1b mov %i3, %o2
if ( endptr )
*endptr = end;
200d534: c4 07 bf fc ld [ %fp + -4 ], %g2
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
200d538: b8 10 00 08 mov %o0, %i4
if ( endptr )
200d53c: 80 a6 a0 00 cmp %i2, 0
200d540: 02 80 00 03 be 200d54c <rtems_string_to_long_long+0x4c>
200d544: ba 10 00 09 mov %o1, %i5
*endptr = end;
200d548: c4 26 80 00 st %g2, [ %i2 ]
if ( end == s )
200d54c: 80 a6 00 02 cmp %i0, %g2
200d550: 02 80 00 0a be 200d578 <rtems_string_to_long_long+0x78>
200d554: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d558: 40 00 0d bb call 2010c44 <__errno>
200d55c: 01 00 00 00 nop
200d560: c2 02 00 00 ld [ %o0 ], %g1
200d564: 80 a0 60 22 cmp %g1, 0x22
200d568: 02 80 00 06 be 200d580 <rtems_string_to_long_long+0x80>
200d56c: 05 1f ff ff sethi %hi(0x7ffffc00), %g2
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
200d570: f8 3e 40 00 std %i4, [ %i1 ]
return RTEMS_SUCCESSFUL;
200d574: 82 10 20 00 clr %g1
}
200d578: 81 c7 e0 08 ret
200d57c: 91 e8 00 01 restore %g0, %g1, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
200d580: 07 3f ff ff sethi %hi(0xfffffc00), %g3
200d584: 84 10 a3 ff or %g2, 0x3ff, %g2
200d588: 86 10 e3 ff or %g3, 0x3ff, %g3
200d58c: 84 1f 00 02 xor %i4, %g2, %g2
200d590: 86 1f 40 03 xor %i5, %g3, %g3
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d594: 80 90 80 03 orcc %g2, %g3, %g0
200d598: 12 80 00 04 bne 200d5a8 <rtems_string_to_long_long+0xa8>
200d59c: 80 97 00 1d orcc %i4, %i5, %g0
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
200d5a0: 10 bf ff f6 b 200d578 <rtems_string_to_long_long+0x78>
200d5a4: 82 10 20 0a mov 0xa, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d5a8: 02 bf ff f4 be 200d578 <rtems_string_to_long_long+0x78> <== NEVER TAKEN
200d5ac: 82 10 20 0a mov 0xa, %g1
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
200d5b0: 03 20 00 00 sethi %hi(0x80000000), %g1
200d5b4: 80 a7 00 01 cmp %i4, %g1
200d5b8: 32 bf ff ef bne,a 200d574 <rtems_string_to_long_long+0x74><== NEVER TAKEN
200d5bc: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
200d5c0: 80 a7 60 00 cmp %i5, 0
200d5c4: 22 bf ff ed be,a 200d578 <rtems_string_to_long_long+0x78><== ALWAYS TAKEN
200d5c8: 82 10 20 0a mov 0xa, %g1
return RTEMS_INVALID_NUMBER;
*n = result;
200d5cc: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
200d5d0: 10 bf ff ea b 200d578 <rtems_string_to_long_long+0x78> <== NOT EXECUTED
200d5d4: 82 10 20 00 clr %g1 <== NOT EXECUTED
0200d694 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
200d694: 9d e3 bf 98 save %sp, -104, %sp
200d698: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200d69c: 80 a6 60 00 cmp %i1, 0
200d6a0: 02 80 00 22 be 200d728 <rtems_string_to_unsigned_char+0x94>
200d6a4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d6a8: 40 00 0d 67 call 2010c44 <__errno>
200d6ac: 01 00 00 00 nop
200d6b0: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200d6b4: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200d6b8: c0 2e 40 00 clrb [ %i1 ]
result = strtoul( s, &end, base );
200d6bc: 90 10 00 1d mov %i5, %o0
200d6c0: 40 00 1a b8 call 20141a0 <strtoul>
200d6c4: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200d6c8: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200d6cc: 80 a6 a0 00 cmp %i2, 0
200d6d0: 02 80 00 03 be 200d6dc <rtems_string_to_unsigned_char+0x48>
200d6d4: b6 10 00 08 mov %o0, %i3
*endptr = end;
200d6d8: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200d6dc: 80 a7 40 01 cmp %i5, %g1
200d6e0: 02 80 00 12 be 200d728 <rtems_string_to_unsigned_char+0x94>
200d6e4: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d6e8: 40 00 0d 57 call 2010c44 <__errno>
200d6ec: 01 00 00 00 nop
200d6f0: c2 02 00 00 ld [ %o0 ], %g1
200d6f4: 80 a0 60 22 cmp %g1, 0x22
200d6f8: 02 80 00 0e be 200d730 <rtems_string_to_unsigned_char+0x9c>
200d6fc: 82 06 ff ff add %i3, -1, %g1
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
200d700: 80 a6 e0 ff cmp %i3, 0xff
200d704: 18 80 00 05 bgu 200d718 <rtems_string_to_unsigned_char+0x84>
200d708: 01 00 00 00 nop
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200d70c: f6 2e 40 00 stb %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200d710: 81 c7 e0 08 ret
200d714: 91 e8 20 00 restore %g0, 0, %o0
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
200d718: 40 00 0d 4b call 2010c44 <__errno>
200d71c: b0 10 20 0a mov 0xa, %i0
200d720: 82 10 20 22 mov 0x22, %g1
200d724: c2 22 00 00 st %g1, [ %o0 ]
return RTEMS_INVALID_NUMBER;
200d728: 81 c7 e0 08 ret
200d72c: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d730: 80 a0 7f fd cmp %g1, -3
200d734: 08 bf ff f3 bleu 200d700 <rtems_string_to_unsigned_char+0x6c><== NEVER TAKEN
200d738: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200d73c: 81 c7 e0 08 ret
200d740: 81 e8 00 00 restore
0200d744 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
200d744: 9d e3 bf 98 save %sp, -104, %sp
200d748: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200d74c: 80 a6 60 00 cmp %i1, 0
200d750: 02 80 00 1e be 200d7c8 <rtems_string_to_unsigned_int+0x84>
200d754: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d758: 40 00 0d 3b call 2010c44 <__errno>
200d75c: 01 00 00 00 nop
200d760: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200d764: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200d768: c0 26 40 00 clr [ %i1 ]
result = strtoul( s, &end, base );
200d76c: 90 10 00 1d mov %i5, %o0
200d770: 40 00 1a 8c call 20141a0 <strtoul>
200d774: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200d778: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200d77c: 80 a6 a0 00 cmp %i2, 0
200d780: 02 80 00 03 be 200d78c <rtems_string_to_unsigned_int+0x48>
200d784: b6 10 00 08 mov %o0, %i3
*endptr = end;
200d788: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200d78c: 80 a7 40 01 cmp %i5, %g1
200d790: 02 80 00 0e be 200d7c8 <rtems_string_to_unsigned_int+0x84>
200d794: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d798: 40 00 0d 2b call 2010c44 <__errno>
200d79c: 01 00 00 00 nop
200d7a0: c2 02 00 00 ld [ %o0 ], %g1
200d7a4: 80 a0 60 22 cmp %g1, 0x22
200d7a8: 02 80 00 05 be 200d7bc <rtems_string_to_unsigned_int+0x78>
200d7ac: 82 06 ff ff add %i3, -1, %g1
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200d7b0: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200d7b4: 81 c7 e0 08 ret
200d7b8: 91 e8 20 00 restore %g0, 0, %o0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d7bc: 80 a0 7f fd cmp %g1, -3
200d7c0: 08 bf ff fc bleu 200d7b0 <rtems_string_to_unsigned_int+0x6c><== NEVER TAKEN
200d7c4: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200d7c8: 81 c7 e0 08 ret
200d7cc: 81 e8 00 00 restore
0200d870 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
200d870: 9d e3 bf 98 save %sp, -104, %sp
200d874: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200d878: 80 a6 60 00 cmp %i1, 0
200d87c: 02 80 00 1e be 200d8f4 <rtems_string_to_unsigned_long+0x84>
200d880: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d884: 40 00 0c f0 call 2010c44 <__errno>
200d888: 01 00 00 00 nop
200d88c: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200d890: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200d894: c0 26 40 00 clr [ %i1 ]
result = strtoul( s, &end, base );
200d898: 90 10 00 1d mov %i5, %o0
200d89c: 40 00 1a 41 call 20141a0 <strtoul>
200d8a0: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200d8a4: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200d8a8: 80 a6 a0 00 cmp %i2, 0
200d8ac: 02 80 00 03 be 200d8b8 <rtems_string_to_unsigned_long+0x48>
200d8b0: b6 10 00 08 mov %o0, %i3
*endptr = end;
200d8b4: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200d8b8: 80 a7 40 01 cmp %i5, %g1
200d8bc: 02 80 00 0e be 200d8f4 <rtems_string_to_unsigned_long+0x84>
200d8c0: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d8c4: 40 00 0c e0 call 2010c44 <__errno>
200d8c8: 01 00 00 00 nop
200d8cc: c2 02 00 00 ld [ %o0 ], %g1
200d8d0: 80 a0 60 22 cmp %g1, 0x22
200d8d4: 02 80 00 05 be 200d8e8 <rtems_string_to_unsigned_long+0x78>
200d8d8: 82 06 ff ff add %i3, -1, %g1
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200d8dc: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200d8e0: 81 c7 e0 08 ret
200d8e4: 91 e8 20 00 restore %g0, 0, %o0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d8e8: 80 a0 7f fd cmp %g1, -3
200d8ec: 08 bf ff fc bleu 200d8dc <rtems_string_to_unsigned_long+0x6c><== NEVER TAKEN
200d8f0: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
200d8f4: 81 c7 e0 08 ret
200d8f8: 81 e8 00 00 restore
0200d7d0 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
200d7d0: 9d e3 bf 98 save %sp, -104, %sp
unsigned long long result;
char *end;
if ( !n )
200d7d4: 80 a6 60 00 cmp %i1, 0
200d7d8: 02 80 00 1c be 200d848 <rtems_string_to_unsigned_long_long+0x78>
200d7dc: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
errno = 0;
200d7e0: 40 00 0d 19 call 2010c44 <__errno>
200d7e4: 01 00 00 00 nop
200d7e8: c0 22 00 00 clr [ %o0 ]
*n = 0;
200d7ec: c0 26 40 00 clr [ %i1 ]
200d7f0: c0 26 60 04 clr [ %i1 + 4 ]
result = strtoull( s, &end, base );
200d7f4: 90 10 00 18 mov %i0, %o0
200d7f8: 92 07 bf fc add %fp, -4, %o1
200d7fc: 40 00 1a 72 call 20141c4 <strtoull>
200d800: 94 10 00 1b mov %i3, %o2
if ( endptr )
*endptr = end;
200d804: c4 07 bf fc ld [ %fp + -4 ], %g2
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
200d808: b8 10 00 08 mov %o0, %i4
if ( endptr )
200d80c: 80 a6 a0 00 cmp %i2, 0
200d810: 02 80 00 03 be 200d81c <rtems_string_to_unsigned_long_long+0x4c>
200d814: ba 10 00 09 mov %o1, %i5
*endptr = end;
200d818: c4 26 80 00 st %g2, [ %i2 ]
if ( end == s )
200d81c: 80 a6 00 02 cmp %i0, %g2
200d820: 02 80 00 0a be 200d848 <rtems_string_to_unsigned_long_long+0x78>
200d824: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d828: 40 00 0d 07 call 2010c44 <__errno>
200d82c: 01 00 00 00 nop
200d830: c2 02 00 00 ld [ %o0 ], %g1
200d834: 80 a0 60 22 cmp %g1, 0x22
200d838: 02 80 00 06 be 200d850 <rtems_string_to_unsigned_long_long+0x80>
200d83c: 86 87 7f ff addcc %i5, -1, %g3
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200d840: f8 3e 40 00 std %i4, [ %i1 ]
return RTEMS_SUCCESSFUL;
200d844: 82 10 20 00 clr %g1
}
200d848: 81 c7 e0 08 ret
200d84c: 91 e8 00 01 restore %g0, %g1, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
200d850: 84 47 3f ff addx %i4, -1, %g2
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200d854: 80 a0 bf ff cmp %g2, -1
200d858: 12 bf ff fa bne 200d840 <rtems_string_to_unsigned_long_long+0x70><== NEVER TAKEN
200d85c: 80 a0 ff fd cmp %g3, -3
200d860: 18 bf ff fa bgu 200d848 <rtems_string_to_unsigned_long_long+0x78><== ALWAYS TAKEN
200d864: 82 10 20 0a mov 0xa, %g1
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200d868: 10 bf ff f7 b 200d844 <rtems_string_to_unsigned_long_long+0x74><== NOT EXECUTED
200d86c: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
02002ec4 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
2002ec4: 9d e3 be 10 save %sp, -496, %sp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
2002ec8: 40 00 4d b4 call 2016598 <strlen>
2002ecc: 90 10 00 18 mov %i0, %o0
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
2002ed0: ba 10 00 18 mov %i0, %i5
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
2002ed4: 92 10 00 08 mov %o0, %o1
2002ed8: 94 10 20 00 clr %o2
2002edc: 90 10 00 18 mov %i0, %o0
2002ee0: 96 07 bf d4 add %fp, -44, %o3
2002ee4: 40 00 03 06 call 2003afc <rtems_filesystem_evaluate_path>
2002ee8: 98 10 20 00 clr %o4
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
2002eec: b0 92 20 00 orcc %o0, 0, %i0
2002ef0: 12 80 00 75 bne 20030c4 <rtems_tarfs_load+0x200>
2002ef4: c2 07 bf e0 ld [ %fp + -32 ], %g1
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
2002ef8: 05 00 80 88 sethi %hi(0x2022000), %g2
2002efc: 84 10 a0 10 or %g2, 0x10, %g2 ! 2022010 <IMFS_ops>
2002f00: 80 a0 40 02 cmp %g1, %g2
2002f04: 02 80 00 06 be 2002f1c <rtems_tarfs_load+0x58>
2002f08: 05 00 80 8a sethi %hi(0x2022800), %g2
2002f0c: 84 10 a0 c4 or %g2, 0xc4, %g2 ! 20228c4 <fifoIMFS_ops>
2002f10: 80 a0 40 02 cmp %g1, %g2
2002f14: 12 80 00 6a bne 20030bc <rtems_tarfs_load+0x1f8> <== ALWAYS TAKEN
2002f18: 01 00 00 00 nop
2002f1c: a6 10 20 00 clr %l3 ! 0 <PROM_START>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
2002f20: 21 00 80 88 sethi %hi(0x2022000), %l0
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
2002f24: b8 04 e2 00 add %l3, 0x200, %i4
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
2002f28: a0 14 20 58 or %l0, 0x58, %l0
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
2002f2c: 25 00 00 20 sethi %hi(0x8000), %l2
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
2002f30: 80 a7 00 1a cmp %i4, %i2
2002f34: 18 80 00 29 bgu 2002fd8 <rtems_tarfs_load+0x114> <== NEVER TAKEN
2002f38: a2 10 20 2f mov 0x2f, %l1
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
2002f3c: a6 06 40 13 add %i1, %l3, %l3
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
2002f40: 92 10 00 10 mov %l0, %o1
2002f44: 90 04 e1 01 add %l3, 0x101, %o0
2002f48: 40 00 4d c5 call 201665c <strncmp>
2002f4c: 94 10 20 05 mov 5, %o2
2002f50: 80 a2 20 00 cmp %o0, 0
2002f54: 12 80 00 21 bne 2002fd8 <rtems_tarfs_load+0x114>
2002f58: 94 10 20 63 mov 0x63, %o2
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
2002f5c: 92 10 00 13 mov %l3, %o1
2002f60: 40 00 4e 14 call 20167b0 <strncpy>
2002f64: 90 07 bf 70 add %fp, -144, %o0
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
2002f68: 92 10 20 08 mov 8, %o1
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
2002f6c: c0 2f bf d3 clrb [ %fp + -45 ]
linkflag = hdr_ptr[156];
2002f70: ea 0c e0 9c ldub [ %l3 + 0x9c ], %l5
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
2002f74: 40 00 23 8e call 200bdac <_rtems_octal2ulong>
2002f78: 90 04 e0 64 add %l3, 0x64, %o0
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
2002f7c: 92 10 20 0c mov 0xc, %o1
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
2002f80: a8 10 00 08 mov %o0, %l4
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
2002f84: 40 00 23 8a call 200bdac <_rtems_octal2ulong>
2002f88: 90 04 e0 7c add %l3, 0x7c, %o0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
2002f8c: 92 10 20 08 mov 8, %o1
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
2002f90: b6 10 00 08 mov %o0, %i3
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
2002f94: 40 00 23 86 call 200bdac <_rtems_octal2ulong>
2002f98: 90 04 e0 94 add %l3, 0x94, %o0
2002f9c: ac 10 00 08 mov %o0, %l6
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
2002fa0: 40 00 24 d5 call 200c2f4 <_rtems_tar_header_checksum>
2002fa4: 90 10 00 13 mov %l3, %o0
2002fa8: 80 a2 00 16 cmp %o0, %l6
2002fac: 12 80 00 0b bne 2002fd8 <rtems_tarfs_load+0x114> <== NEVER TAKEN
2002fb0: aa 0d 60 ff and %l5, 0xff, %l5
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
2002fb4: 80 a5 60 35 cmp %l5, 0x35
2002fb8: 02 80 00 20 be 2003038 <rtems_tarfs_load+0x174>
2002fbc: 80 a5 60 30 cmp %l5, 0x30
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
2002fc0: 02 80 00 08 be 2002fe0 <rtems_tarfs_load+0x11c>
2002fc4: a6 10 00 1c mov %i4, %l3
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
2002fc8: b8 04 e2 00 add %l3, 0x200, %i4
2002fcc: 80 a7 00 1a cmp %i4, %i2
2002fd0: 08 bf ff dc bleu 2002f40 <rtems_tarfs_load+0x7c> <== ALWAYS TAKEN
2002fd4: a6 06 40 13 add %i1, %l3, %l3
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
2002fd8: 81 c7 e0 08 ret
2002fdc: 81 e8 00 00 restore
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
2002fe0: c2 07 bf d4 ld [ %fp + -44 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
2002fe4: 90 07 bf 70 add %fp, -144, %o0
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
2002fe8: c2 27 bf e8 st %g1, [ %fp + -24 ]
2002fec: c2 07 bf d8 ld [ %fp + -40 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
2002ff0: 92 07 bf e8 add %fp, -24, %o1
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
2002ff4: c2 27 bf ec st %g1, [ %fp + -20 ]
2002ff8: c2 07 bf dc ld [ %fp + -36 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
2002ffc: 94 07 bf fc add %fp, -4, %o2
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
2003000: c2 27 bf f0 st %g1, [ %fp + -16 ]
2003004: c2 07 bf e0 ld [ %fp + -32 ], %g1
2003008: c2 27 bf f4 st %g1, [ %fp + -12 ]
200300c: c2 07 bf e4 ld [ %fp + -28 ], %g1
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
2003010: 40 00 28 88 call 200d230 <IMFS_evaluate_for_make>
2003014: c2 27 bf f8 st %g1, [ %fp + -8 ]
2003018: 80 a2 20 00 cmp %o0, 0
200301c: 02 80 00 1d be 2003090 <rtems_tarfs_load+0x1cc> <== ALWAYS TAKEN
2003020: d4 07 bf fc ld [ %fp + -4 ], %o2
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
2003024: b6 06 e1 ff add %i3, 0x1ff, %i3
offset += 512 * nblocks;
2003028: b6 0e fe 00 and %i3, -512, %i3
200302c: b8 06 c0 1c add %i3, %i4, %i4
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
2003030: 10 bf ff e6 b 2002fc8 <rtems_tarfs_load+0x104>
2003034: a6 10 00 1c mov %i4, %l3
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
2003038: 92 10 00 1d mov %i5, %o1
200303c: 40 00 4b 93 call 2015e88 <strcpy>
2003040: 90 07 be 70 add %fp, -400, %o0
if (full_filename[strlen(full_filename)-1] != '/')
2003044: 40 00 4d 55 call 2016598 <strlen>
2003048: 90 07 be 70 add %fp, -400, %o0
200304c: 82 07 80 08 add %fp, %o0, %g1
2003050: c2 48 7e 6f ldsb [ %g1 + -401 ], %g1
2003054: 80 a0 60 2f cmp %g1, 0x2f
2003058: 02 80 00 05 be 200306c <rtems_tarfs_load+0x1a8> <== ALWAYS TAKEN
200305c: 82 07 be 70 add %fp, -400, %g1
strcat(full_filename, "/");
2003060: e2 28 40 08 stb %l1, [ %g1 + %o0 ] <== NOT EXECUTED
2003064: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
2003068: c0 2a 20 01 clrb [ %o0 + 1 ] <== NOT EXECUTED
strcat(full_filename, filename);
200306c: 92 07 bf 70 add %fp, -144, %o1
2003070: 40 00 4b 32 call 2015d38 <strcat>
2003074: 90 07 be 70 add %fp, -400, %o0
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
2003078: 90 07 be 70 add %fp, -400, %o0
200307c: 92 10 21 ff mov 0x1ff, %o1
2003080: 40 00 05 5f call 20045fc <mkdir>
2003084: a6 10 00 1c mov %i4, %l3
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
2003088: 10 bf ff d1 b 2002fcc <rtems_tarfs_load+0x108>
200308c: b8 04 e2 00 add %l3, 0x200, %i4
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
2003090: 96 0d 21 ff and %l4, 0x1ff, %o3
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
2003094: 90 07 bf e8 add %fp, -24, %o0
2003098: 92 10 20 06 mov 6, %o1
200309c: 96 12 c0 12 or %o3, %l2, %o3
20030a0: 40 00 24 ff call 200c49c <IMFS_create_node>
20030a4: 98 10 20 00 clr %o4
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
20030a8: 82 06 40 1c add %i1, %i4, %g1
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
20030ac: c0 22 20 50 clr [ %o0 + 0x50 ]
20030b0: f6 22 20 54 st %i3, [ %o0 + 0x54 ]
node->info.linearfile.direct = &tar_image[offset];
20030b4: 10 bf ff dc b 2003024 <rtems_tarfs_load+0x160>
20030b8: c2 22 20 58 st %g1, [ %o0 + 0x58 ]
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
20030bc: 81 c7 e0 08 ret
20030c0: 91 e8 3f ff restore %g0, -1, %o0
0,
&root_loc,
0
);
if (status != 0)
return -1;
20030c4: 81 c7 e0 08 ret
20030c8: 91 e8 3f ff restore %g0, -1, %o0
02010fa4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
2010fa4: 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 )
2010fa8: 80 a6 a0 00 cmp %i2, 0
2010fac: 02 80 00 3b be 2011098 <rtems_task_mode+0xf4>
2010fb0: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
2010fb4: 21 00 80 7e sethi %hi(0x201f800), %l0
2010fb8: a0 14 22 00 or %l0, 0x200, %l0 ! 201fa00 <_Per_CPU_Information>
2010fbc: fa 04 20 0c ld [ %l0 + 0xc ], %i5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
2010fc0: c4 0f 60 70 ldub [ %i5 + 0x70 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
2010fc4: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
2010fc8: 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 ];
2010fcc: f8 07 61 58 ld [ %i5 + 0x158 ], %i4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
2010fd0: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
2010fd4: 80 a0 60 00 cmp %g1, 0
2010fd8: 12 80 00 40 bne 20110d8 <rtems_task_mode+0x134>
2010fdc: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
2010fe0: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
2010fe4: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
2010fe8: 7f ff e8 b7 call 200b2c4 <_CPU_ISR_Get_level>
2010fec: a2 60 3f ff subx %g0, -1, %l1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
2010ff0: a3 2c 60 0a sll %l1, 0xa, %l1
2010ff4: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
2010ff8: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
2010ffc: 80 8e 61 00 btst 0x100, %i1
2011000: 02 80 00 06 be 2011018 <rtems_task_mode+0x74>
2011004: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
2011008: 82 0e 21 00 and %i0, 0x100, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
201100c: 80 a0 00 01 cmp %g0, %g1
2011010: 82 60 3f ff subx %g0, -1, %g1
2011014: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
2011018: 80 8e 62 00 btst 0x200, %i1
201101c: 12 80 00 21 bne 20110a0 <rtems_task_mode+0xfc>
2011020: 80 8e 22 00 btst 0x200, %i0
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
2011024: 80 8e 60 0f btst 0xf, %i1
2011028: 12 80 00 27 bne 20110c4 <rtems_task_mode+0x120>
201102c: 01 00 00 00 nop
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
2011030: 80 8e 64 00 btst 0x400, %i1
2011034: 02 80 00 14 be 2011084 <rtems_task_mode+0xe0>
2011038: 86 10 20 00 clr %g3
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
201103c: c4 0f 20 08 ldub [ %i4 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
2011040: b0 0e 24 00 and %i0, 0x400, %i0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
2011044: 80 a0 00 18 cmp %g0, %i0
2011048: 82 60 3f ff subx %g0, -1, %g1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
201104c: 80 a0 80 01 cmp %g2, %g1
2011050: 22 80 00 0e be,a 2011088 <rtems_task_mode+0xe4>
2011054: 03 00 80 7d sethi %hi(0x201f400), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
2011058: 7f ff c5 41 call 200255c <sparc_disable_interrupts>
201105c: c2 2f 20 08 stb %g1, [ %i4 + 8 ]
_signals = information->signals_pending;
2011060: c4 07 20 18 ld [ %i4 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
2011064: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
information->signals_posted = _signals;
2011068: c4 27 20 14 st %g2, [ %i4 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
201106c: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
2011070: 7f ff c5 3f call 200256c <sparc_enable_interrupts>
2011074: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
2011078: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
201107c: 80 a0 00 01 cmp %g0, %g1
2011080: 86 40 20 00 addx %g0, 0, %g3
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
2011084: 03 00 80 7d sethi %hi(0x201f400), %g1
2011088: c4 00 62 18 ld [ %g1 + 0x218 ], %g2 ! 201f618 <_System_state_Current>
201108c: 80 a0 a0 03 cmp %g2, 3
2011090: 02 80 00 1f be 201110c <rtems_task_mode+0x168>
2011094: 82 10 20 00 clr %g1
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
2011098: 81 c7 e0 08 ret
201109c: 91 e8 00 01 restore %g0, %g1, %o0
*/
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
20110a0: 22 bf ff e1 be,a 2011024 <rtems_task_mode+0x80>
20110a4: c0 27 60 78 clr [ %i5 + 0x78 ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
20110a8: 03 00 80 7d sethi %hi(0x201f400), %g1
20110ac: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 201f424 <_Thread_Ticks_per_timeslice>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
20110b0: 80 8e 60 0f btst 0xf, %i1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
20110b4: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
20110b8: 82 10 20 01 mov 1, %g1
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
20110bc: 02 bf ff dd be 2011030 <rtems_task_mode+0x8c>
20110c0: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
20110c4: 90 0e 20 0f and %i0, 0xf, %o0
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
20110c8: 7f ff c5 29 call 200256c <sparc_enable_interrupts>
20110cc: 91 2a 20 08 sll %o0, 8, %o0
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
20110d0: 10 bf ff d9 b 2011034 <rtems_task_mode+0x90>
20110d4: 80 8e 64 00 btst 0x400, %i1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
20110d8: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
20110dc: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
20110e0: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
20110e4: 7f ff e8 78 call 200b2c4 <_CPU_ISR_Get_level>
20110e8: a2 60 3f ff subx %g0, -1, %l1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
20110ec: a3 2c 60 0a sll %l1, 0xa, %l1
20110f0: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
20110f4: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
20110f8: 80 8e 61 00 btst 0x100, %i1
20110fc: 02 bf ff c7 be 2011018 <rtems_task_mode+0x74>
2011100: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
2011104: 10 bf ff c2 b 201100c <rtems_task_mode+0x68>
2011108: 82 0e 21 00 and %i0, 0x100, %g1
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
201110c: 80 88 e0 ff btst 0xff, %g3
2011110: 12 80 00 0a bne 2011138 <rtems_task_mode+0x194>
2011114: c4 04 20 0c ld [ %l0 + 0xc ], %g2
2011118: c6 04 20 10 ld [ %l0 + 0x10 ], %g3
201111c: 80 a0 80 03 cmp %g2, %g3
2011120: 02 bf ff de be 2011098 <rtems_task_mode+0xf4>
2011124: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
2011128: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
201112c: 80 a0 a0 00 cmp %g2, 0
2011130: 02 bf ff da be 2011098 <rtems_task_mode+0xf4> <== NEVER TAKEN
2011134: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
2011138: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
201113c: c2 2c 20 18 stb %g1, [ %l0 + 0x18 ]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
2011140: 7f ff e2 de call 2009cb8 <_Thread_Dispatch>
2011144: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
2011148: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
201114c: 81 c7 e0 08 ret
2011150: 91 e8 00 01 restore %g0, %g1, %o0
0200c68c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200c68c: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200c690: 80 a6 60 00 cmp %i1, 0
200c694: 02 80 00 07 be 200c6b0 <rtems_task_set_priority+0x24>
200c698: 90 10 00 18 mov %i0, %o0
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
200c69c: 03 00 80 8e sethi %hi(0x2023800), %g1
200c6a0: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 ! 2023870 <rtems_maximum_priority>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
200c6a4: 80 a6 40 01 cmp %i1, %g1
200c6a8: 18 80 00 1c bgu 200c718 <rtems_task_set_priority+0x8c>
200c6ac: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200c6b0: 80 a6 a0 00 cmp %i2, 0
200c6b4: 02 80 00 19 be 200c718 <rtems_task_set_priority+0x8c>
200c6b8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200c6bc: 40 00 0a 44 call 200efcc <_Thread_Get>
200c6c0: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200c6c4: c2 07 bf fc ld [ %fp + -4 ], %g1
200c6c8: 80 a0 60 00 cmp %g1, 0
200c6cc: 12 80 00 13 bne 200c718 <rtems_task_set_priority+0x8c>
200c6d0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200c6d4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200c6d8: 80 a6 60 00 cmp %i1, 0
200c6dc: 02 80 00 0d be 200c710 <rtems_task_set_priority+0x84>
200c6e0: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200c6e4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200c6e8: 80 a0 60 00 cmp %g1, 0
200c6ec: 02 80 00 06 be 200c704 <rtems_task_set_priority+0x78>
200c6f0: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
200c6f4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200c6f8: 80 a6 40 01 cmp %i1, %g1
200c6fc: 1a 80 00 05 bcc 200c710 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
200c700: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
200c704: 92 10 00 19 mov %i1, %o1
200c708: 40 00 08 e7 call 200eaa4 <_Thread_Change_priority>
200c70c: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200c710: 40 00 0a 22 call 200ef98 <_Thread_Enable_dispatch>
200c714: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
200c718: 81 c7 e0 08 ret
200c71c: 81 e8 00 00 restore
0200831c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
200831c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
2008320: 80 a6 60 00 cmp %i1, 0
2008324: 02 80 00 1e be 200839c <rtems_task_variable_delete+0x80>
2008328: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
200832c: 90 10 00 18 mov %i0, %o0
2008330: 40 00 09 e6 call 200aac8 <_Thread_Get>
2008334: 92 07 bf fc add %fp, -4, %o1
switch (location) {
2008338: c2 07 bf fc ld [ %fp + -4 ], %g1
200833c: 80 a0 60 00 cmp %g1, 0
2008340: 12 80 00 19 bne 20083a4 <rtems_task_variable_delete+0x88>
2008344: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
2008348: c2 02 21 64 ld [ %o0 + 0x164 ], %g1
while (tvp) {
200834c: 80 a0 60 00 cmp %g1, 0
2008350: 02 80 00 10 be 2008390 <rtems_task_variable_delete+0x74>
2008354: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2008358: c4 00 60 04 ld [ %g1 + 4 ], %g2
200835c: 80 a0 80 19 cmp %g2, %i1
2008360: 32 80 00 09 bne,a 2008384 <rtems_task_variable_delete+0x68>
2008364: d2 00 40 00 ld [ %g1 ], %o1
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2008368: 10 80 00 18 b 20083c8 <rtems_task_variable_delete+0xac>
200836c: c4 00 40 00 ld [ %g1 ], %g2
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
2008370: 80 a0 80 19 cmp %g2, %i1
2008374: 22 80 00 0e be,a 20083ac <rtems_task_variable_delete+0x90>
2008378: c4 02 40 00 ld [ %o1 ], %g2
200837c: 82 10 00 09 mov %o1, %g1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
2008380: d2 00 40 00 ld [ %g1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
2008384: 80 a2 60 00 cmp %o1, 0
2008388: 32 bf ff fa bne,a 2008370 <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
200838c: c4 02 60 04 ld [ %o1 + 4 ], %g2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2008390: 40 00 09 c1 call 200aa94 <_Thread_Enable_dispatch>
2008394: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
2008398: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200839c: 81 c7 e0 08 ret
20083a0: 91 e8 00 01 restore %g0, %g1, %o0
20083a4: 81 c7 e0 08 ret
20083a8: 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;
20083ac: c4 20 40 00 st %g2, [ %g1 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
20083b0: 40 00 00 2d call 2008464 <_RTEMS_Tasks_Invoke_task_variable_dtor>
20083b4: 01 00 00 00 nop
_Thread_Enable_dispatch();
20083b8: 40 00 09 b7 call 200aa94 <_Thread_Enable_dispatch>
20083bc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20083c0: 10 bf ff f7 b 200839c <rtems_task_variable_delete+0x80>
20083c4: 82 10 20 00 clr %g1 ! 0 <PROM_START>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
20083c8: 92 10 00 01 mov %g1, %o1
20083cc: 10 bf ff f9 b 20083b0 <rtems_task_variable_delete+0x94>
20083d0: c4 22 21 64 st %g2, [ %o0 + 0x164 ]
020083d4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
20083d4: 9d e3 bf 98 save %sp, -104, %sp
20083d8: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
20083dc: 80 a6 60 00 cmp %i1, 0
20083e0: 02 80 00 1b be 200844c <rtems_task_variable_get+0x78>
20083e4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !result )
20083e8: 80 a6 a0 00 cmp %i2, 0
20083ec: 02 80 00 1c be 200845c <rtems_task_variable_get+0x88>
20083f0: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
20083f4: 40 00 09 b5 call 200aac8 <_Thread_Get>
20083f8: 92 07 bf fc add %fp, -4, %o1
switch (location) {
20083fc: c2 07 bf fc ld [ %fp + -4 ], %g1
2008400: 80 a0 60 00 cmp %g1, 0
2008404: 12 80 00 12 bne 200844c <rtems_task_variable_get+0x78>
2008408: 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;
200840c: c2 02 21 64 ld [ %o0 + 0x164 ], %g1
while (tvp) {
2008410: 80 a0 60 00 cmp %g1, 0
2008414: 32 80 00 07 bne,a 2008430 <rtems_task_variable_get+0x5c>
2008418: c4 00 60 04 ld [ %g1 + 4 ], %g2
200841c: 30 80 00 0e b,a 2008454 <rtems_task_variable_get+0x80>
2008420: 80 a0 60 00 cmp %g1, 0
2008424: 02 80 00 0c be 2008454 <rtems_task_variable_get+0x80> <== NEVER TAKEN
2008428: 01 00 00 00 nop
if (tvp->ptr == ptr) {
200842c: c4 00 60 04 ld [ %g1 + 4 ], %g2
2008430: 80 a0 80 19 cmp %g2, %i1
2008434: 32 bf ff fb bne,a 2008420 <rtems_task_variable_get+0x4c>
2008438: 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;
200843c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
2008440: b0 10 20 00 clr %i0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
2008444: 40 00 09 94 call 200aa94 <_Thread_Enable_dispatch>
2008448: c2 26 80 00 st %g1, [ %i2 ]
return RTEMS_SUCCESSFUL;
200844c: 81 c7 e0 08 ret
2008450: 81 e8 00 00 restore
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2008454: 40 00 09 90 call 200aa94 <_Thread_Enable_dispatch>
2008458: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
200845c: 81 c7 e0 08 ret
2008460: 81 e8 00 00 restore
02005f8c <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
2005f8c: 82 10 00 08 mov %o0, %g1
int baud_index;
switch (termios_baud) {
2005f90: 80 a0 60 09 cmp %g1, 9
2005f94: 02 80 00 2d be 2006048 <rtems_termios_baud_to_index+0xbc>
2005f98: 90 10 20 09 mov 9, %o0
2005f9c: 80 a0 60 09 cmp %g1, 9
2005fa0: 04 80 00 1a ble 2006008 <rtems_termios_baud_to_index+0x7c>
2005fa4: 80 a0 60 04 cmp %g1, 4
2005fa8: 80 a0 60 0e cmp %g1, 0xe
2005fac: 02 80 00 27 be 2006048 <rtems_termios_baud_to_index+0xbc>
2005fb0: 90 10 20 0e mov 0xe, %o0
2005fb4: 80 a0 60 0e cmp %g1, 0xe
2005fb8: 04 80 00 26 ble 2006050 <rtems_termios_baud_to_index+0xc4>
2005fbc: 80 a0 60 0b cmp %g1, 0xb
2005fc0: 05 00 00 04 sethi %hi(0x1000), %g2
2005fc4: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <PROM_START+0x1002>
2005fc8: 80 a0 40 03 cmp %g1, %g3
2005fcc: 02 80 00 1f be 2006048 <rtems_termios_baud_to_index+0xbc>
2005fd0: 90 10 20 11 mov 0x11, %o0
2005fd4: 80 a0 40 03 cmp %g1, %g3
2005fd8: 04 80 00 38 ble 20060b8 <rtems_termios_baud_to_index+0x12c>
2005fdc: 80 a0 60 0f cmp %g1, 0xf
2005fe0: 86 10 a0 03 or %g2, 3, %g3
2005fe4: 80 a0 40 03 cmp %g1, %g3
2005fe8: 02 80 00 18 be 2006048 <rtems_termios_baud_to_index+0xbc>
2005fec: 90 10 20 12 mov 0x12, %o0
2005ff0: 84 10 a0 04 or %g2, 4, %g2
2005ff4: 80 a0 40 02 cmp %g1, %g2
2005ff8: 02 80 00 14 be 2006048 <rtems_termios_baud_to_index+0xbc> <== ALWAYS TAKEN
2005ffc: 90 10 20 13 mov 0x13, %o0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
2006000: 81 c3 e0 08 retl
2006004: 90 10 3f ff mov -1, %o0
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
2006008: 02 80 00 10 be 2006048 <rtems_termios_baud_to_index+0xbc>
200600c: 90 10 20 04 mov 4, %o0
2006010: 80 a0 60 04 cmp %g1, 4
2006014: 14 80 00 1c bg 2006084 <rtems_termios_baud_to_index+0xf8>
2006018: 80 a0 60 06 cmp %g1, 6
200601c: 80 a0 60 01 cmp %g1, 1
2006020: 02 80 00 0a be 2006048 <rtems_termios_baud_to_index+0xbc>
2006024: 90 10 20 01 mov 1, %o0
2006028: 80 a0 60 01 cmp %g1, 1
200602c: 04 80 00 2b ble 20060d8 <rtems_termios_baud_to_index+0x14c>
2006030: 80 a0 60 02 cmp %g1, 2
2006034: 02 80 00 05 be 2006048 <rtems_termios_baud_to_index+0xbc>
2006038: 90 10 20 02 mov 2, %o0
200603c: 80 a0 60 03 cmp %g1, 3
2006040: 12 bf ff f0 bne 2006000 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
2006044: 90 10 20 03 mov 3, %o0
2006048: 81 c3 e0 08 retl
200604c: 01 00 00 00 nop
2006050: 02 bf ff fe be 2006048 <rtems_termios_baud_to_index+0xbc>
2006054: 90 10 20 0b mov 0xb, %o0 ! b <PROM_START+0xb>
2006058: 80 a0 60 0b cmp %g1, 0xb
200605c: 06 bf ff fb bl 2006048 <rtems_termios_baud_to_index+0xbc>
2006060: 90 10 20 0a mov 0xa, %o0
2006064: 80 a0 60 0c cmp %g1, 0xc
2006068: 02 bf ff f8 be 2006048 <rtems_termios_baud_to_index+0xbc>
200606c: 90 10 20 0c mov 0xc, %o0
2006070: 80 a0 60 0d cmp %g1, 0xd
2006074: 12 bf ff e3 bne 2006000 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
2006078: 90 10 20 0d mov 0xd, %o0
200607c: 81 c3 e0 08 retl
2006080: 01 00 00 00 nop
2006084: 02 bf ff f1 be 2006048 <rtems_termios_baud_to_index+0xbc>
2006088: 90 10 20 06 mov 6, %o0 ! 6 <PROM_START+0x6>
200608c: 80 a0 60 06 cmp %g1, 6
2006090: 06 bf ff ee bl 2006048 <rtems_termios_baud_to_index+0xbc>
2006094: 90 10 20 05 mov 5, %o0
2006098: 80 a0 60 07 cmp %g1, 7
200609c: 02 bf ff eb be 2006048 <rtems_termios_baud_to_index+0xbc>
20060a0: 90 10 20 07 mov 7, %o0
20060a4: 80 a0 60 08 cmp %g1, 8
20060a8: 12 bf ff d6 bne 2006000 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
20060ac: 90 10 20 08 mov 8, %o0
20060b0: 81 c3 e0 08 retl
20060b4: 01 00 00 00 nop
20060b8: 02 bf ff e4 be 2006048 <rtems_termios_baud_to_index+0xbc>
20060bc: 90 10 20 0f mov 0xf, %o0 ! f <PROM_START+0xf>
20060c0: 84 10 a0 01 or %g2, 1, %g2
20060c4: 80 a0 40 02 cmp %g1, %g2
20060c8: 12 bf ff ce bne 2006000 <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
20060cc: 90 10 20 10 mov 0x10, %o0
20060d0: 81 c3 e0 08 retl
20060d4: 01 00 00 00 nop
20060d8: 80 a0 60 00 cmp %g1, 0
20060dc: 12 bf ff c9 bne 2006000 <rtems_termios_baud_to_index+0x74>
20060e0: 90 10 20 00 clr %o0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
20060e4: 81 c3 e0 08 retl
02004a94 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
2004a94: 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(
2004a98: 39 00 80 7c sethi %hi(0x201f000), %i4
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004a9c: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain(
2004aa0: d0 07 23 40 ld [ %i4 + 0x340 ], %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;
2004aa4: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
rtems_status_code sc;
sc = rtems_semaphore_obtain(
2004aa8: 92 10 20 00 clr %o1
2004aac: 40 00 0a 05 call 20072c0 <rtems_semaphore_obtain>
2004ab0: 94 10 20 00 clr %o2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004ab4: 80 a2 20 00 cmp %o0, 0
2004ab8: 12 80 00 68 bne 2004c58 <rtems_termios_close+0x1c4> <== NEVER TAKEN
2004abc: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
2004ac0: c2 07 60 08 ld [ %i5 + 8 ], %g1
2004ac4: 82 00 7f ff add %g1, -1, %g1
2004ac8: 80 a0 60 00 cmp %g1, 0
2004acc: 12 80 00 39 bne 2004bb0 <rtems_termios_close+0x11c>
2004ad0: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2004ad4: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2004ad8: 03 00 80 7c sethi %hi(0x201f000), %g1
2004adc: 85 28 a0 05 sll %g2, 5, %g2
2004ae0: 82 10 60 8c or %g1, 0x8c, %g1
2004ae4: 82 00 40 02 add %g1, %g2, %g1
2004ae8: c2 00 60 04 ld [ %g1 + 4 ], %g1
2004aec: 80 a0 60 00 cmp %g1, 0
2004af0: 22 80 00 3e be,a 2004be8 <rtems_termios_close+0x154>
2004af4: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2004af8: 9f c0 40 00 call %g1
2004afc: 90 10 00 1d mov %i5, %o0
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004b00: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2004b04: 80 a0 60 02 cmp %g1, 2
2004b08: 22 80 00 49 be,a 2004c2c <rtems_termios_close+0x198> <== NEVER TAKEN
2004b0c: d0 07 60 c4 ld [ %i5 + 0xc4 ], %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
2004b10: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
2004b14: 80 a0 60 00 cmp %g1, 0
2004b18: 22 80 00 07 be,a 2004b34 <rtems_termios_close+0xa0> <== ALWAYS TAKEN
2004b1c: c2 07 40 00 ld [ %i5 ], %g1
(*tty->device.lastClose)(tty->major, tty->minor, arg);
2004b20: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
2004b24: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 <== NOT EXECUTED
2004b28: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004b2c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->forw == NULL) {
2004b30: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
2004b34: 80 a0 60 00 cmp %g1, 0
2004b38: 02 80 00 4a be 2004c60 <rtems_termios_close+0x1cc>
2004b3c: c4 07 60 04 ld [ %i5 + 4 ], %g2
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
2004b40: c4 20 60 04 st %g2, [ %g1 + 4 ]
2004b44: c4 07 60 04 ld [ %i5 + 4 ], %g2
}
if (tty->back == NULL) {
2004b48: 80 a0 a0 00 cmp %g2, 0
2004b4c: 22 80 00 22 be,a 2004bd4 <rtems_termios_close+0x140> <== ALWAYS TAKEN
2004b50: 05 00 80 7c sethi %hi(0x201f000), %g2
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
2004b54: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
2004b58: 40 00 09 a3 call 20071e4 <rtems_semaphore_delete>
2004b5c: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
rtems_semaphore_delete (tty->osem);
2004b60: 40 00 09 a1 call 20071e4 <rtems_semaphore_delete>
2004b64: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
2004b68: 40 00 09 9f call 20071e4 <rtems_semaphore_delete>
2004b6c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0
if ((tty->device.pollRead == NULL) ||
2004b70: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
2004b74: 80 a0 60 00 cmp %g1, 0
2004b78: 02 80 00 13 be 2004bc4 <rtems_termios_close+0x130>
2004b7c: 01 00 00 00 nop
2004b80: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2004b84: 80 a0 60 02 cmp %g1, 2
2004b88: 02 80 00 0f be 2004bc4 <rtems_termios_close+0x130>
2004b8c: 01 00 00 00 nop
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
2004b90: 7f ff f9 d8 call 20032f0 <free>
2004b94: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
free (tty->rawOutBuf.theBuf);
2004b98: 7f ff f9 d6 call 20032f0 <free>
2004b9c: d0 07 60 7c ld [ %i5 + 0x7c ], %o0
free (tty->cbuf);
2004ba0: 7f ff f9 d4 call 20032f0 <free>
2004ba4: d0 07 60 1c ld [ %i5 + 0x1c ], %o0
free (tty);
2004ba8: 7f ff f9 d2 call 20032f0 <free>
2004bac: 90 10 00 1d mov %i5, %o0
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004bb0: d0 07 23 40 ld [ %i4 + 0x340 ], %o0
2004bb4: 40 00 0a 0d call 20073e8 <rtems_semaphore_release>
2004bb8: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2004bbc: 81 c7 e0 08 ret
2004bc0: 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);
2004bc4: 40 00 09 88 call 20071e4 <rtems_semaphore_delete>
2004bc8: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2004bcc: 30 bf ff f1 b,a 2004b90 <rtems_termios_close+0xfc>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
2004bd0: 05 00 80 7c sethi %hi(0x201f000), %g2
if ( rtems_termios_ttyHead != NULL ) {
2004bd4: 80 a0 60 00 cmp %g1, 0
2004bd8: 02 bf ff e0 be 2004b58 <rtems_termios_close+0xc4>
2004bdc: c2 20 a3 48 st %g1, [ %g2 + 0x348 ]
rtems_termios_ttyHead->back = NULL;
2004be0: 10 bf ff de b 2004b58 <rtems_termios_close+0xc4>
2004be4: c0 20 60 04 clr [ %g1 + 4 ]
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004be8: 92 10 20 00 clr %o1
2004bec: 40 00 09 b5 call 20072c0 <rtems_semaphore_obtain>
2004bf0: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL) {
2004bf4: 80 a2 20 00 cmp %o0, 0
2004bf8: 12 80 00 18 bne 2004c58 <rtems_termios_close+0x1c4> <== NEVER TAKEN
2004bfc: 01 00 00 00 nop
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2004c00: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2004c04: 80 a0 60 00 cmp %g1, 0
2004c08: 12 80 00 1d bne 2004c7c <rtems_termios_close+0x1e8>
2004c0c: 01 00 00 00 nop
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
2004c10: 40 00 09 f6 call 20073e8 <rtems_semaphore_release>
2004c14: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004c18: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2004c1c: 80 a0 60 02 cmp %g1, 2
2004c20: 32 bf ff bd bne,a 2004b14 <rtems_termios_close+0x80>
2004c24: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
2004c28: d0 07 60 c4 ld [ %i5 + 0xc4 ], %o0
2004c2c: 40 00 08 66 call 2006dc4 <rtems_event_send>
2004c30: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
2004c34: 80 a2 20 00 cmp %o0, 0
2004c38: 12 80 00 08 bne 2004c58 <rtems_termios_close+0x1c4> <== NEVER TAKEN
2004c3c: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
2004c40: d0 07 60 c8 ld [ %i5 + 0xc8 ], %o0
2004c44: 40 00 08 60 call 2006dc4 <rtems_event_send>
2004c48: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
2004c4c: 80 a2 20 00 cmp %o0, 0
2004c50: 22 bf ff b1 be,a 2004b14 <rtems_termios_close+0x80> <== ALWAYS TAKEN
2004c54: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
rtems_fatal_error_occurred (sc);
2004c58: 40 00 0b 5e call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2004c5c: 01 00 00 00 nop <== NOT EXECUTED
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
2004c60: 07 00 80 7c sethi %hi(0x201f000), %g3
if ( rtems_termios_ttyTail != NULL ) {
2004c64: 80 a0 a0 00 cmp %g2, 0
2004c68: 02 bf ff da be 2004bd0 <rtems_termios_close+0x13c> <== ALWAYS TAKEN
2004c6c: c4 20 e3 44 st %g2, [ %g3 + 0x344 ]
rtems_termios_ttyTail->forw = NULL;
2004c70: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED
2004c74: 10 bf ff b8 b 2004b54 <rtems_termios_close+0xc0> <== NOT EXECUTED
2004c78: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
2004c7c: 7f ff f6 38 call 200255c <sparc_disable_interrupts>
2004c80: 01 00 00 00 nop
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2004c84: c4 07 60 84 ld [ %i5 + 0x84 ], %g2
2004c88: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2004c8c: 80 a0 80 01 cmp %g2, %g1
2004c90: 02 80 00 14 be 2004ce0 <rtems_termios_close+0x24c> <== ALWAYS TAKEN
2004c94: 01 00 00 00 nop
tty->rawOutBufState = rob_wait;
2004c98: b6 10 20 02 mov 2, %i3 ! 2 <PROM_START+0x2> <== NOT EXECUTED
2004c9c: f6 27 60 94 st %i3, [ %i5 + 0x94 ] <== NOT EXECUTED
rtems_interrupt_enable (level);
2004ca0: 7f ff f6 33 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
2004ca4: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain(
2004ca8: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
2004cac: 92 10 20 00 clr %o1 <== NOT EXECUTED
2004cb0: 40 00 09 84 call 20072c0 <rtems_semaphore_obtain> <== NOT EXECUTED
2004cb4: 94 10 20 00 clr %o2 <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004cb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004cbc: 12 bf ff e7 bne 2004c58 <rtems_termios_close+0x1c4> <== NOT EXECUTED
2004cc0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2004cc4: 7f ff f6 26 call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
2004cc8: 01 00 00 00 nop <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2004ccc: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
2004cd0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED
2004cd4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004cd8: 32 bf ff f2 bne,a 2004ca0 <rtems_termios_close+0x20c> <== NOT EXECUTED
2004cdc: f6 27 60 94 st %i3, [ %i5 + 0x94 ] <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
2004ce0: 7f ff f6 23 call 200256c <sparc_enable_interrupts>
2004ce4: 01 00 00 00 nop
2004ce8: 30 bf ff ca b,a 2004c10 <rtems_termios_close+0x17c>
02006664 <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)
{
2006664: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2006668: c4 06 20 90 ld [ %i0 + 0x90 ], %g2
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
200666c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2006670: 84 00 80 19 add %g2, %i1, %g2
2006674: c4 26 20 90 st %g2, [ %i0 + 0x90 ]
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2006678: 80 a0 60 02 cmp %g1, 2
200667c: 02 80 00 10 be 20066bc <rtems_termios_dequeue_characters+0x58>
2006680: 90 10 00 18 mov %i0, %o0
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
2006684: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2006688: 80 a0 60 05 cmp %g1, 5
200668c: 02 80 00 04 be 200669c <rtems_termios_dequeue_characters+0x38>
2006690: 03 00 80 7c sethi %hi(0x201f000), %g1
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
2006694: 7f ff ff 58 call 20063f4 <rtems_termios_refill_transmitter>
2006698: 81 e8 00 00 restore
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
200669c: c2 00 61 40 ld [ %g1 + 0x140 ], %g1
20066a0: 80 a0 60 00 cmp %g1, 0
20066a4: 02 80 00 04 be 20066b4 <rtems_termios_dequeue_characters+0x50><== NEVER TAKEN
20066a8: 01 00 00 00 nop
rtems_termios_linesw[tty->t_line].l_start(tty);
20066ac: 9f c0 40 00 call %g1
20066b0: 01 00 00 00 nop
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
20066b4: 81 c7 e0 08 ret
20066b8: 91 e8 20 00 restore %g0, 0, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
20066bc: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
20066c0: 40 00 01 c1 call 2006dc4 <rtems_event_send>
20066c4: 92 10 20 02 mov 2, %o1
if (sc != RTEMS_SUCCESSFUL)
20066c8: 80 a2 20 00 cmp %o0, 0
20066cc: 02 bf ff fa be 20066b4 <rtems_termios_dequeue_characters+0x50><== ALWAYS TAKEN
20066d0: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
20066d4: 40 00 04 bf call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
0200605c <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
200605c: 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) {
2006060: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2006064: 39 00 80 7c sethi %hi(0x201f000), %i4
2006068: 83 28 60 05 sll %g1, 5, %g1
200606c: b8 17 20 8c or %i4, 0x8c, %i4
2006070: 82 07 00 01 add %i4, %g1, %g1
2006074: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2006078: 80 a0 60 00 cmp %g1, 0
200607c: 02 80 00 27 be 2006118 <rtems_termios_enqueue_raw_characters+0xbc>
2006080: ba 10 00 18 mov %i0, %i5
while (len--) {
2006084: 80 a6 a0 00 cmp %i2, 0
2006088: 22 80 00 10 be,a 20060c8 <rtems_termios_enqueue_raw_characters+0x6c><== NEVER TAKEN
200608c: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1 <== NOT EXECUTED
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
2006090: b4 06 bf ff add %i2, -1, %i2
2006094: 10 80 00 06 b 20060ac <rtems_termios_enqueue_raw_characters+0x50>
2006098: b6 10 20 00 clr %i3
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
200609c: b6 06 e0 01 inc %i3
20060a0: 83 28 60 05 sll %g1, 5, %g1
20060a4: 82 07 00 01 add %i4, %g1, %g1
20060a8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
20060ac: d0 4e 40 1b ldsb [ %i1 + %i3 ], %o0
20060b0: 9f c0 40 00 call %g1
20060b4: 92 10 00 1d mov %i5, %o1
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
20060b8: 80 a6 c0 1a cmp %i3, %i2
20060bc: 32 bf ff f8 bne,a 200609c <rtems_termios_enqueue_raw_characters+0x40>
20060c0: c2 07 60 cc ld [ %i5 + 0xcc ], %g1
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
20060c4: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1
20060c8: 80 a0 60 00 cmp %g1, 0
20060cc: 12 80 00 0b bne 20060f8 <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
20060d0: b0 10 20 00 clr %i0
20060d4: c2 07 60 dc ld [ %i5 + 0xdc ], %g1
20060d8: 80 a0 60 00 cmp %g1, 0
20060dc: 02 80 00 0d be 2006110 <rtems_termios_enqueue_raw_characters+0xb4>
20060e0: 01 00 00 00 nop
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
20060e4: d2 07 60 e0 ld [ %i5 + 0xe0 ], %o1
20060e8: 9f c0 40 00 call %g1
20060ec: 90 07 60 30 add %i5, 0x30, %o0
tty->tty_rcvwakeup = 1;
20060f0: 82 10 20 01 mov 1, %g1
20060f4: c2 27 60 e4 st %g1, [ %i5 + 0xe4 ]
20060f8: 81 c7 e0 08 ret
20060fc: 81 e8 00 00 restore
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2006100: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
}
}
}
}
tty->rawInBufDropped += dropped;
2006104: 82 00 40 18 add %g1, %i0, %g1
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2006108: 40 00 04 b8 call 20073e8 <rtems_semaphore_release>
200610c: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
return dropped;
}
2006110: 81 c7 e0 08 ret
2006114: 81 e8 00 00 restore
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
2006118: b4 06 40 1a add %i1, %i2, %i2
200611c: a0 10 20 00 clr %l0
2006120: b0 10 20 00 clr %i0
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2006124: a4 07 60 30 add %i5, 0x30, %l2
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
2006128: a6 07 60 4a add %i5, 0x4a, %l3
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
200612c: 80 a6 40 1a cmp %i1, %i2
2006130: 22 bf ff f4 be,a 2006100 <rtems_termios_enqueue_raw_characters+0xa4>
2006134: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2006138: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
}
return 0;
}
while (len--) {
c = *buf++;
200613c: f8 0e 40 00 ldub [ %i1 ], %i4
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2006140: 80 88 62 00 btst 0x200, %g1
2006144: 02 80 00 0b be 2006170 <rtems_termios_enqueue_raw_characters+0x114>
2006148: b2 06 60 01 inc %i1
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
200614c: c4 0f 60 4a ldub [ %i5 + 0x4a ], %g2
2006150: 83 2f 20 18 sll %i4, 0x18, %g1
2006154: 83 38 60 18 sra %g1, 0x18, %g1
2006158: 80 a0 40 02 cmp %g1, %g2
200615c: 02 80 00 54 be 20062ac <rtems_termios_enqueue_raw_characters+0x250>
2006160: c4 0f 60 49 ldub [ %i5 + 0x49 ], %g2
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
2006164: 80 a0 40 02 cmp %g1, %g2
2006168: 02 80 00 59 be 20062cc <rtems_termios_enqueue_raw_characters+0x270><== NEVER TAKEN
200616c: 01 00 00 00 nop
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
2006170: 80 8c 20 ff btst 0xff, %l0
2006174: 02 80 00 15 be 20061c8 <rtems_termios_enqueue_raw_characters+0x16c><== ALWAYS TAKEN
2006178: 01 00 00 00 nop
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
200617c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2006180: 82 08 60 30 and %g1, 0x30, %g1
2006184: 80 a0 60 20 cmp %g1, 0x20
2006188: 12 bf ff ea bne 2006130 <rtems_termios_enqueue_raw_characters+0xd4><== ALWAYS TAKEN
200618c: 80 a6 40 1a cmp %i1, %i2
/* disable interrupts */
rtems_interrupt_disable(level);
2006190: 7f ff f0 f3 call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
2006194: 01 00 00 00 nop <== NOT EXECUTED
2006198: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
200619c: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20061a0: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
20061a4: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
20061a8: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20061ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20061b0: 12 80 00 4f bne 20062ec <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
20061b4: 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);
20061b8: 7f ff f0 ed call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
20061bc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
20061c0: 10 bf ff dc b 2006130 <rtems_termios_enqueue_raw_characters+0xd4><== NOT EXECUTED
20061c4: 80 a6 40 1a cmp %i1, %i2 <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
20061c8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0
20061cc: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
20061d0: 40 00 51 3f call 201a6cc <.urem>
20061d4: 90 02 20 01 inc %o0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
20061d8: 7f ff f0 e1 call 200255c <sparc_disable_interrupts>
20061dc: b6 10 00 08 mov %o0, %i3
20061e0: a2 10 00 08 mov %o0, %l1
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
20061e4: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
20061e8: d0 07 60 64 ld [ %i5 + 0x64 ], %o0
% tty->rawInBuf.Size) > tty->highwater) &&
20061ec: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
20061f0: 90 22 00 01 sub %o0, %g1, %o0
% tty->rawInBuf.Size) > tty->highwater) &&
20061f4: 40 00 51 36 call 201a6cc <.urem>
20061f8: 90 02 00 1b add %o0, %i3, %o0
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
20061fc: c2 07 60 c0 ld [ %i5 + 0xc0 ], %g1
2006200: 80 a2 00 01 cmp %o0, %g1
2006204: 08 80 00 13 bleu 2006250 <rtems_termios_enqueue_raw_characters+0x1f4><== ALWAYS TAKEN
2006208: 01 00 00 00 nop
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
200620c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
2006210: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2006214: 12 80 00 0f bne 2006250 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2006218: 01 00 00 00 nop <== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
200621c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2006220: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
2006224: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2006228: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
200622c: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED
2006230: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
2006234: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2006238: 02 80 00 35 be 200630c <rtems_termios_enqueue_raw_characters+0x2b0><== NOT EXECUTED
200623c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
2006240: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED
2006244: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED
2006248: 02 80 00 40 be 2006348 <rtems_termios_enqueue_raw_characters+0x2ec><== NOT EXECUTED
200624c: 01 00 00 00 nop <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2006250: 7f ff f0 c7 call 200256c <sparc_enable_interrupts>
2006254: 90 10 00 11 mov %l1, %o0
if (newTail == tty->rawInBuf.Head) {
2006258: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
200625c: 80 a0 40 1b cmp %g1, %i3
2006260: 22 bf ff b3 be,a 200612c <rtems_termios_enqueue_raw_characters+0xd0><== NEVER TAKEN
2006264: b0 06 20 01 inc %i0 <== NOT EXECUTED
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
2006268: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
200626c: f8 28 40 1b stb %i4, [ %g1 + %i3 ]
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2006270: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
2006274: f6 27 60 60 st %i3, [ %i5 + 0x60 ]
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2006278: 80 a0 60 00 cmp %g1, 0
200627c: 12 bf ff ad bne 2006130 <rtems_termios_enqueue_raw_characters+0xd4><== NEVER TAKEN
2006280: 80 a6 40 1a cmp %i1, %i2
2006284: c2 07 60 dc ld [ %i5 + 0xdc ], %g1
2006288: 80 a0 60 00 cmp %g1, 0
200628c: 02 bf ff a9 be 2006130 <rtems_termios_enqueue_raw_characters+0xd4><== ALWAYS TAKEN
2006290: 80 a6 40 1a cmp %i1, %i2
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2006294: d2 07 60 e0 ld [ %i5 + 0xe0 ], %o1 <== NOT EXECUTED
2006298: 9f c0 40 00 call %g1 <== NOT EXECUTED
200629c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
20062a0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
20062a4: 10 bf ff a2 b 200612c <rtems_termios_enqueue_raw_characters+0xd0><== NOT EXECUTED
20062a8: c2 27 60 e4 st %g1, [ %i5 + 0xe4 ] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
20062ac: 80 a0 40 02 cmp %g1, %g2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
20062b0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
20062b4: 22 80 00 0b be,a 20062e0 <rtems_termios_enqueue_raw_characters+0x284><== NEVER TAKEN
20062b8: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
20062bc: 82 10 60 10 or %g1, 0x10, %g1
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
20062c0: a0 10 20 01 mov 1, %l0
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
20062c4: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
20062c8: 30 bf ff ad b,a 200617c <rtems_termios_enqueue_raw_characters+0x120>
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
20062cc: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
20062d0: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
20062d4: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED
20062d8: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
20062dc: 30 bf ff a8 b,a 200617c <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
20062e0: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
20062e4: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
20062e8: 30 bf ff a5 b,a 200617c <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
20062ec: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
20062f0: d2 07 60 7c ld [ %i5 + 0x7c ], %o1 <== NOT EXECUTED
20062f4: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
20062f8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
20062fc: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2006300: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006304: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2006308: 30 bf ff ac b,a 20061b8 <rtems_termios_enqueue_raw_characters+0x15c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
200630c: 12 80 00 06 bne 2006324 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
2006310: 01 00 00 00 nop <== NOT EXECUTED
2006314: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
2006318: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200631c: 12 bf ff cd bne 2006250 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2006320: 01 00 00 00 nop <== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
2006324: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2006328: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
200632c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
2006330: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2006334: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
2006338: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
200633c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006340: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2006344: 30 bf ff c3 b,a 2006250 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2006348: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
200634c: c2 07 60 ac ld [ %i5 + 0xac ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2006350: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED
2006354: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2006358: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200635c: 02 bf ff bd be 2006250 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2006360: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
2006364: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006368: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
200636c: 30 bf ff b9 b,a 2006250 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
02004d0c <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
2004d0c: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004d10: c2 06 00 00 ld [ %i0 ], %g1
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
2004d14: f6 06 20 08 ld [ %i0 + 8 ], %i3
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2004d18: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2004d1c: 92 10 20 00 clr %o1
2004d20: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
2004d24: 94 10 20 00 clr %o2
2004d28: 40 00 09 66 call 20072c0 <rtems_semaphore_obtain>
2004d2c: c0 26 20 0c clr [ %i0 + 0xc ]
if (sc != RTEMS_SUCCESSFUL) {
2004d30: b8 92 20 00 orcc %o0, 0, %i4
2004d34: 32 80 00 33 bne,a 2004e00 <rtems_termios_ioctl+0xf4> <== NEVER TAKEN
2004d38: f8 26 20 0c st %i4, [ %i0 + 0xc ] <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004d3c: c2 06 20 04 ld [ %i0 + 4 ], %g1
2004d40: 80 a0 60 04 cmp %g1, 4
2004d44: 22 80 00 29 be,a 2004de8 <rtems_termios_ioctl+0xdc>
2004d48: c2 06 c0 00 ld [ %i3 ], %g1
2004d4c: 18 80 00 2f bgu 2004e08 <rtems_termios_ioctl+0xfc>
2004d50: 05 10 01 19 sethi %hi(0x40046400), %g2
2004d54: 80 a0 60 02 cmp %g1, 2
2004d58: 22 80 00 43 be,a 2004e64 <rtems_termios_ioctl+0x158>
2004d5c: d2 06 20 08 ld [ %i0 + 8 ], %o1
2004d60: 08 80 00 b2 bleu 2005028 <rtems_termios_ioctl+0x31c>
2004d64: 80 a0 60 01 cmp %g1, 1
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2004d68: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2004d6c: 80 a0 60 00 cmp %g1, 0
2004d70: 02 80 00 21 be 2004df4 <rtems_termios_ioctl+0xe8> <== ALWAYS TAKEN
2004d74: 01 00 00 00 nop
rtems_interrupt_disable (level);
2004d78: 7f ff f5 f9 call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
2004d7c: 01 00 00 00 nop <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2004d80: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
2004d84: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED
2004d88: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004d8c: 02 80 00 14 be 2004ddc <rtems_termios_ioctl+0xd0> <== NOT EXECUTED
2004d90: 01 00 00 00 nop <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
2004d94: b6 10 20 02 mov 2, %i3 ! 2 <PROM_START+0x2> <== NOT EXECUTED
2004d98: f6 27 60 94 st %i3, [ %i5 + 0x94 ] <== NOT EXECUTED
rtems_interrupt_enable (level);
2004d9c: 7f ff f5 f4 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
2004da0: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain(
2004da4: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
2004da8: 92 10 20 00 clr %o1 <== NOT EXECUTED
2004dac: 40 00 09 45 call 20072c0 <rtems_semaphore_obtain> <== NOT EXECUTED
2004db0: 94 10 20 00 clr %o2 <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004db4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004db8: 12 80 00 f2 bne 2005180 <rtems_termios_ioctl+0x474> <== NOT EXECUTED
2004dbc: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2004dc0: 7f ff f5 e7 call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
2004dc4: 01 00 00 00 nop <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2004dc8: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
2004dcc: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED
2004dd0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004dd4: 32 bf ff f2 bne,a 2004d9c <rtems_termios_ioctl+0x90> <== NOT EXECUTED
2004dd8: f6 27 60 94 st %i3, [ %i5 + 0x94 ] <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
2004ddc: 7f ff f5 e4 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
2004de0: 01 00 00 00 nop <== NOT EXECUTED
2004de4: 30 80 00 04 b,a 2004df4 <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
2004de8: c2 27 60 dc st %g1, [ %i5 + 0xdc ]
2004dec: c2 06 e0 04 ld [ %i3 + 4 ], %g1
2004df0: c2 27 60 e0 st %g1, [ %i5 + 0xe0 ]
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
2004df4: 40 00 09 7d call 20073e8 <rtems_semaphore_release>
2004df8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
args->ioctl_return = sc;
2004dfc: f8 26 20 0c st %i4, [ %i0 + 0xc ]
return sc;
}
2004e00: 81 c7 e0 08 ret
2004e04: 91 e8 00 1c restore %g0, %i4, %o0
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2004e08: 84 10 a2 7f or %g2, 0x27f, %g2
2004e0c: 80 a0 40 02 cmp %g1, %g2
2004e10: 02 80 00 7a be 2004ff8 <rtems_termios_ioctl+0x2ec> <== NEVER TAKEN
2004e14: 01 00 00 00 nop
2004e18: 18 80 00 8b bgu 2005044 <rtems_termios_ioctl+0x338>
2004e1c: 05 10 01 1d sethi %hi(0x40047400), %g2
2004e20: 80 a0 60 05 cmp %g1, 5
2004e24: 22 80 00 ac be,a 20050d4 <rtems_termios_ioctl+0x3c8>
2004e28: c2 06 c0 00 ld [ %i3 ], %g1
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
2004e2c: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2004e30: 03 00 80 7c sethi %hi(0x201f000), %g1
2004e34: 85 28 a0 05 sll %g2, 5, %g2
2004e38: 82 10 60 8c or %g1, 0x8c, %g1
2004e3c: 82 00 40 02 add %g1, %g2, %g1
2004e40: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2004e44: 80 a0 60 00 cmp %g1, 0
2004e48: 02 bf ff eb be 2004df4 <rtems_termios_ioctl+0xe8> <== NEVER TAKEN
2004e4c: b8 10 20 0a mov 0xa, %i4
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
2004e50: 90 10 00 1d mov %i5, %o0
2004e54: 9f c0 40 00 call %g1
2004e58: 92 10 00 18 mov %i0, %o1
2004e5c: 10 bf ff e6 b 2004df4 <rtems_termios_ioctl+0xe8>
2004e60: b8 10 00 08 mov %o0, %i4
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
2004e64: b6 07 60 30 add %i5, 0x30, %i3
2004e68: 94 10 20 24 mov 0x24, %o2
2004e6c: 40 00 34 35 call 2011f40 <memcpy>
2004e70: 90 10 00 1b mov %i3, %o0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2004e74: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004e78: 80 88 62 00 btst 0x200, %g1
2004e7c: 02 80 00 19 be 2004ee0 <rtems_termios_ioctl+0x1d4>
2004e80: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
2004e84: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2004e88: 80 88 64 00 btst 0x400, %g1
2004e8c: 12 80 00 15 bne 2004ee0 <rtems_termios_ioctl+0x1d4>
2004e90: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
2004e94: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004e98: 82 08 7d ef and %g1, -529, %g1
2004e9c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
2004ea0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004ea4: 80 88 60 20 btst 0x20, %g1
2004ea8: 02 80 00 0e be 2004ee0 <rtems_termios_ioctl+0x1d4> <== ALWAYS TAKEN
2004eac: 01 00 00 00 nop
/* disable interrupts */
rtems_interrupt_disable(level);
2004eb0: 7f ff f5 ab call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
2004eb4: 01 00 00 00 nop <== NOT EXECUTED
2004eb8: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
2004ebc: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2004ec0: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
2004ec4: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
2004ec8: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2004ecc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004ed0: 12 80 00 a4 bne 2005160 <rtems_termios_ioctl+0x454> <== NOT EXECUTED
2004ed4: 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);
2004ed8: 7f ff f5 a5 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
2004edc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
2004ee0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004ee4: 80 88 64 00 btst 0x400, %g1
2004ee8: 02 80 00 0c be 2004f18 <rtems_termios_ioctl+0x20c>
2004eec: 03 00 00 04 sethi %hi(0x1000), %g1
2004ef0: c4 07 60 30 ld [ %i5 + 0x30 ], %g2
2004ef4: 80 88 80 01 btst %g2, %g1
2004ef8: 12 80 00 08 bne 2004f18 <rtems_termios_ioctl+0x20c> <== NEVER TAKEN
2004efc: 01 00 00 00 nop
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
2004f00: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004f04: 82 08 7b ff and %g1, -1025, %g1
2004f08: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
2004f0c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004f10: 82 08 7f fd and %g1, -3, %g1
2004f14: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
2004f18: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004f1c: 80 88 61 00 btst 0x100, %g1
2004f20: 02 80 00 16 be 2004f78 <rtems_termios_ioctl+0x26c> <== ALWAYS TAKEN
2004f24: c4 07 60 38 ld [ %i5 + 0x38 ], %g2
2004f28: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004f2c: 06 80 00 82 bl 2005134 <rtems_termios_ioctl+0x428> <== NOT EXECUTED
2004f30: 01 00 00 00 nop <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
2004f34: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004f38: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
2004f3c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
2004f40: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004f44: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2004f48: 02 80 00 09 be 2004f6c <rtems_termios_ioctl+0x260> <== NOT EXECUTED
2004f4c: 01 00 00 00 nop <== NOT EXECUTED
2004f50: c2 07 60 b0 ld [ %i5 + 0xb0 ], %g1 <== NOT EXECUTED
2004f54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004f58: 02 80 00 05 be 2004f6c <rtems_termios_ioctl+0x260> <== NOT EXECUTED
2004f5c: 01 00 00 00 nop <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2004f60: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004f64: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2004f68: c4 07 60 38 ld [ %i5 + 0x38 ], %g2 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
2004f6c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2004f70: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
2004f74: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
2004f78: 80 a0 a0 00 cmp %g2, 0
2004f7c: 06 80 00 6e bl 2005134 <rtems_termios_ioctl+0x428> <== NEVER TAKEN
2004f80: 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) {
2004f84: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2004f88: 05 00 00 04 sethi %hi(0x1000), %g2
2004f8c: 80 88 40 02 btst %g1, %g2
2004f90: 02 80 00 06 be 2004fa8 <rtems_termios_ioctl+0x29c>
2004f94: 80 88 64 00 btst 0x400, %g1
tty->flow_ctrl |= FL_MDXOF;
2004f98: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2
2004f9c: 84 10 a4 00 or %g2, 0x400, %g2
2004fa0: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ]
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
2004fa4: 80 88 64 00 btst 0x400, %g1
2004fa8: 22 80 00 06 be,a 2004fc0 <rtems_termios_ioctl+0x2b4>
2004fac: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
tty->flow_ctrl |= FL_MDXON;
2004fb0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2004fb4: 82 10 62 00 or %g1, 0x200, %g1
2004fb8: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
2004fbc: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
2004fc0: 80 88 60 02 btst 2, %g1
2004fc4: 02 80 00 48 be 20050e4 <rtems_termios_ioctl+0x3d8>
2004fc8: 01 00 00 00 nop
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2004fcc: c0 27 60 6c clr [ %i5 + 0x6c ]
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
2004fd0: c0 27 60 70 clr [ %i5 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
2004fd4: c0 27 60 74 clr [ %i5 + 0x74 ]
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
2004fd8: c2 07 60 a8 ld [ %i5 + 0xa8 ], %g1
2004fdc: 80 a0 60 00 cmp %g1, 0
2004fe0: 02 bf ff 85 be 2004df4 <rtems_termios_ioctl+0xe8> <== NEVER TAKEN
2004fe4: 01 00 00 00 nop
(*tty->device.setAttributes)(tty->minor, &tty->termios);
2004fe8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
2004fec: 9f c0 40 00 call %g1
2004ff0: 92 10 00 1b mov %i3, %o1
2004ff4: 30 bf ff 80 b,a 2004df4 <rtems_termios_ioctl+0xe8>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
2004ff8: c4 07 60 60 ld [ %i5 + 0x60 ], %g2 <== NOT EXECUTED
2004ffc: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
if ( rawnc < 0 )
2005000: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED
2005004: 0c 80 00 49 bneg 2005128 <rtems_termios_ioctl+0x41c> <== NOT EXECUTED
2005008: 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;
200500c: c8 07 60 20 ld [ %i5 + 0x20 ], %g4 <== NOT EXECUTED
2005010: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 <== NOT EXECUTED
2005014: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED
2005018: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED
200501c: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
}
break;
2005020: 10 bf ff 75 b 2004df4 <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
2005024: 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) {
2005028: 32 bf ff 82 bne,a 2004e30 <rtems_termios_ioctl+0x124> <== NEVER TAKEN
200502c: c4 07 60 cc ld [ %i5 + 0xcc ], %g2 <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
2005030: d0 06 20 08 ld [ %i0 + 8 ], %o0
2005034: 92 07 60 30 add %i5, 0x30, %o1
2005038: 40 00 33 c2 call 2011f40 <memcpy>
200503c: 94 10 20 24 mov 0x24, %o2
break;
2005040: 30 bf ff 6d b,a 2004df4 <rtems_termios_ioctl+0xe8>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
2005044: 84 10 a0 1a or %g2, 0x1a, %g2
2005048: 80 a0 40 02 cmp %g1, %g2
200504c: 02 80 00 1e be 20050c4 <rtems_termios_ioctl+0x3b8>
2005050: 05 20 01 1d sethi %hi(0x80047400), %g2
2005054: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <RAM_END+0x7dc4741b>
2005058: 80 a0 40 02 cmp %g1, %g2
200505c: 32 bf ff 75 bne,a 2004e30 <rtems_termios_ioctl+0x124> <== NEVER TAKEN
2005060: c4 07 60 cc ld [ %i5 + 0xcc ], %g2 <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2005064: c2 07 60 cc ld [ %i5 + 0xcc ], %g1
2005068: 37 00 80 7c sethi %hi(0x201f000), %i3
200506c: 83 28 60 05 sll %g1, 5, %g1
2005070: b6 16 e0 8c or %i3, 0x8c, %i3
2005074: 82 06 c0 01 add %i3, %g1, %g1
2005078: c2 00 60 04 ld [ %g1 + 4 ], %g1
200507c: 80 a0 60 00 cmp %g1, 0
2005080: 22 80 00 06 be,a 2005098 <rtems_termios_ioctl+0x38c>
2005084: c2 06 20 08 ld [ %i0 + 8 ], %g1
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2005088: 9f c0 40 00 call %g1
200508c: 90 10 00 1d mov %i5, %o0
2005090: b8 10 00 08 mov %o0, %i4
}
tty->t_line=*(int*)(args->buffer);
2005094: c2 06 20 08 ld [ %i0 + 8 ], %g1
2005098: c4 00 40 00 ld [ %g1 ], %g2
tty->t_sc = NULL; /* ensure that no more valid data */
200509c: c0 27 60 d0 clr [ %i5 + 0xd0 ]
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
20050a0: 83 28 a0 05 sll %g2, 5, %g1
20050a4: c2 06 c0 01 ld [ %i3 + %g1 ], %g1
20050a8: 80 a0 60 00 cmp %g1, 0
20050ac: 02 bf ff 52 be 2004df4 <rtems_termios_ioctl+0xe8>
20050b0: c4 27 60 cc st %g2, [ %i5 + 0xcc ]
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
20050b4: 9f c0 40 00 call %g1
20050b8: 90 10 00 1d mov %i5, %o0
20050bc: 10 bf ff 4e b 2004df4 <rtems_termios_ioctl+0xe8>
20050c0: b8 10 00 08 mov %o0, %i4
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
20050c4: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
20050c8: c2 06 20 08 ld [ %i0 + 8 ], %g1
break;
20050cc: 10 bf ff 4a b 2004df4 <rtems_termios_ioctl+0xe8>
20050d0: c4 20 40 00 st %g2, [ %g1 ]
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
20050d4: c2 27 60 d4 st %g1, [ %i5 + 0xd4 ]
20050d8: c2 06 e0 04 ld [ %i3 + 4 ], %g1
break;
20050dc: 10 bf ff 46 b 2004df4 <rtems_termios_ioctl+0xe8>
20050e0: c2 27 60 d8 st %g1, [ %i5 + 0xd8 ]
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
20050e4: 40 00 06 aa call 2006b8c <rtems_clock_get_ticks_per_second>
20050e8: f4 0f 60 46 ldub [ %i5 + 0x46 ], %i2
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
20050ec: 40 00 54 92 call 201a334 <.umul>
20050f0: 92 10 00 1a mov %i2, %o1
rtems_clock_get_ticks_per_second() / 10;
20050f4: 40 00 54 ca call 201a41c <.udiv>
20050f8: 92 10 20 0a mov 0xa, %o1
if (tty->termios.c_cc[VTIME]) {
20050fc: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
2005100: d0 27 60 54 st %o0, [ %i5 + 0x54 ]
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
2005104: 80 a0 60 00 cmp %g1, 0
2005108: 02 80 00 10 be 2005148 <rtems_termios_ioctl+0x43c>
200510c: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2005110: c0 27 60 6c clr [ %i5 + 0x6c ]
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2005114: 80 a0 60 00 cmp %g1, 0
2005118: 12 bf ff af bne 2004fd4 <rtems_termios_ioctl+0x2c8>
200511c: d0 27 60 70 st %o0, [ %i5 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
2005120: 10 bf ff ae b 2004fd8 <rtems_termios_ioctl+0x2cc>
2005124: d0 27 60 74 st %o0, [ %i5 + 0x74 ]
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
2005128: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 <== NOT EXECUTED
200512c: 10 bf ff b8 b 200500c <rtems_termios_ioctl+0x300> <== NOT EXECUTED
2005130: 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;
2005134: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2005138: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED
200513c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
2005140: 10 bf ff 92 b 2004f88 <rtems_termios_ioctl+0x27c> <== NOT EXECUTED
2005144: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
2005148: 80 a0 60 00 cmp %g1, 0
200514c: 32 bf ff a1 bne,a 2004fd0 <rtems_termios_ioctl+0x2c4> <== NEVER TAKEN
2005150: c0 27 60 6c clr [ %i5 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
2005154: 82 10 20 01 mov 1, %g1
2005158: 10 bf ff a0 b 2004fd8 <rtems_termios_ioctl+0x2cc>
200515c: c2 27 60 6c st %g1, [ %i5 + 0x6c ]
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2005160: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
2005164: d2 07 60 7c ld [ %i5 + 0x7c ], %o1 <== NOT EXECUTED
2005168: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
200516c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2005170: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2005174: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005178: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
200517c: 30 bf ff 57 b,a 2004ed8 <rtems_termios_ioctl+0x1cc> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2005180: 40 00 0a 14 call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
0200466c <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
200466c: 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(
2004670: 39 00 80 7c sethi %hi(0x201f000), %i4
2004674: d0 07 23 40 ld [ %i4 + 0x340 ], %o0 ! 201f340 <rtems_termios_ttyMutex>
2004678: 92 10 20 00 clr %o1
200467c: 40 00 0b 11 call 20072c0 <rtems_semaphore_obtain>
2004680: 94 10 20 00 clr %o2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004684: ba 92 20 00 orcc %o0, 0, %i5
2004688: 12 80 00 27 bne 2004724 <rtems_termios_open+0xb8> <== NEVER TAKEN
200468c: 25 00 80 7c sethi %hi(0x201f000), %l2
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004690: e2 04 a3 48 ld [ %l2 + 0x348 ], %l1 ! 201f348 <rtems_termios_ttyHead>
2004694: 80 a4 60 00 cmp %l1, 0
2004698: 02 80 00 34 be 2004768 <rtems_termios_open+0xfc>
200469c: a0 10 00 11 mov %l1, %l0
if ((tty->major == major) && (tty->minor == minor))
20046a0: 10 80 00 06 b 20046b8 <rtems_termios_open+0x4c>
20046a4: c2 04 20 0c ld [ %l0 + 0xc ], %g1
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
20046a8: 80 a4 20 00 cmp %l0, 0
20046ac: 02 80 00 30 be 200476c <rtems_termios_open+0x100> <== ALWAYS TAKEN
20046b0: 90 10 20 01 mov 1, %o0
if ((tty->major == major) && (tty->minor == minor))
20046b4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
20046b8: 80 a0 40 18 cmp %g1, %i0
20046bc: 32 bf ff fb bne,a 20046a8 <rtems_termios_open+0x3c>
20046c0: e0 04 00 00 ld [ %l0 ], %l0
20046c4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
20046c8: 80 a0 40 19 cmp %g1, %i1
20046cc: 32 bf ff f7 bne,a 20046a8 <rtems_termios_open+0x3c> <== NEVER TAKEN
20046d0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
20046d4: c4 06 80 00 ld [ %i2 ], %g2
if (!tty->refcount++) {
20046d8: c2 04 20 08 ld [ %l0 + 8 ], %g1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
20046dc: e0 20 a0 38 st %l0, [ %g2 + 0x38 ]
if (!tty->refcount++) {
20046e0: 84 00 60 01 add %g1, 1, %g2
20046e4: 80 a0 60 00 cmp %g1, 0
20046e8: 12 80 00 0d bne 200471c <rtems_termios_open+0xb0>
20046ec: c4 24 20 08 st %g2, [ %l0 + 8 ]
if (tty->device.firstOpen)
20046f0: c2 04 20 98 ld [ %l0 + 0x98 ], %g1
20046f4: 80 a0 60 00 cmp %g1, 0
20046f8: 02 80 00 05 be 200470c <rtems_termios_open+0xa0>
20046fc: 90 10 00 18 mov %i0, %o0
(*tty->device.firstOpen)(major, minor, arg);
2004700: 92 10 00 19 mov %i1, %o1
2004704: 9f c0 40 00 call %g1
2004708: 94 10 00 1a mov %i2, %o2
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
200470c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
2004710: 80 a0 60 02 cmp %g1, 2
2004714: 22 80 00 06 be,a 200472c <rtems_termios_open+0xc0>
2004718: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
200471c: 40 00 0b 33 call 20073e8 <rtems_semaphore_release>
2004720: d0 07 23 40 ld [ %i4 + 0x340 ], %o0
return RTEMS_SUCCESSFUL;
}
2004724: 81 c7 e0 08 ret
2004728: 91 e8 00 1d restore %g0, %i5, %o0
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
200472c: 94 10 00 10 mov %l0, %o2
2004730: 13 00 80 18 sethi %hi(0x2006000), %o1
2004734: 40 00 0b fc call 2007724 <rtems_task_start>
2004738: 92 12 63 70 or %o1, 0x370, %o1 ! 2006370 <rtems_termios_rxdaemon>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
200473c: 80 a2 20 00 cmp %o0, 0
2004740: 12 80 00 ba bne 2004a28 <rtems_termios_open+0x3bc> <== NEVER TAKEN
2004744: 94 10 00 10 mov %l0, %o2
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
2004748: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0
200474c: 13 00 80 19 sethi %hi(0x2006400), %o1
2004750: 40 00 0b f5 call 2007724 <rtems_task_start>
2004754: 92 12 61 f4 or %o1, 0x1f4, %o1 ! 20065f4 <rtems_termios_txdaemon>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004758: 80 a2 20 00 cmp %o0, 0
200475c: 02 bf ff f0 be 200471c <rtems_termios_open+0xb0> <== ALWAYS TAKEN
2004760: 01 00 00 00 nop
2004764: 30 80 00 b1 b,a 2004a28 <rtems_termios_open+0x3bc> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004768: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
200476c: 7f ff f9 be call 2002e64 <calloc>
2004770: 92 10 20 e8 mov 0xe8, %o1
if (tty == NULL) {
2004774: a0 92 20 00 orcc %o0, 0, %l0
2004778: 02 80 00 9d be 20049ec <rtems_termios_open+0x380>
200477c: 03 00 80 7a sethi %hi(0x201e800), %g1
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
2004780: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 201e960 <rtems_termios_raw_input_size>
2004784: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
2004788: d0 04 20 64 ld [ %l0 + 0x64 ], %o0
200478c: 7f ff fc 0d call 20037c0 <malloc>
2004790: 01 00 00 00 nop
2004794: d0 24 20 58 st %o0, [ %l0 + 0x58 ]
if (tty->rawInBuf.theBuf == NULL) {
2004798: 80 a2 20 00 cmp %o0, 0
200479c: 02 80 00 92 be 20049e4 <rtems_termios_open+0x378>
20047a0: a6 10 00 08 mov %o0, %l3
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
20047a4: 03 00 80 7a sethi %hi(0x201e800), %g1
20047a8: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 201e964 <rtems_termios_raw_output_size>
20047ac: c2 24 20 88 st %g1, [ %l0 + 0x88 ]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
20047b0: d0 04 20 88 ld [ %l0 + 0x88 ], %o0
20047b4: 7f ff fc 03 call 20037c0 <malloc>
20047b8: 01 00 00 00 nop
20047bc: d0 24 20 7c st %o0, [ %l0 + 0x7c ]
if (tty->rawOutBuf.theBuf == NULL) {
20047c0: 80 a2 20 00 cmp %o0, 0
20047c4: 02 80 00 86 be 20049dc <rtems_termios_open+0x370>
20047c8: a8 10 00 08 mov %o0, %l4
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
20047cc: 03 00 80 7a sethi %hi(0x201e800), %g1
20047d0: 7f ff fb fc call 20037c0 <malloc>
20047d4: d0 00 61 68 ld [ %g1 + 0x168 ], %o0 ! 201e968 <rtems_termios_cbufsize>
if (tty->cbuf == NULL) {
20047d8: 80 a2 20 00 cmp %o0, 0
20047dc: 02 80 00 7e be 20049d4 <rtems_termios_open+0x368> <== NEVER TAKEN
20047e0: d0 24 20 1c st %o0, [ %l0 + 0x1c ]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
20047e4: c0 24 20 d4 clr [ %l0 + 0xd4 ]
tty->tty_snd.sw_arg = NULL;
20047e8: c0 24 20 d8 clr [ %l0 + 0xd8 ]
tty->tty_rcv.sw_pfn = NULL;
20047ec: c0 24 20 dc clr [ %l0 + 0xdc ]
tty->tty_rcv.sw_arg = NULL;
20047f0: c0 24 20 e0 clr [ %l0 + 0xe0 ]
tty->tty_rcvwakeup = 0;
20047f4: c0 24 20 e4 clr [ %l0 + 0xe4 ]
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
20047f8: e2 24 00 00 st %l1, [ %l0 ]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
20047fc: 80 a4 60 00 cmp %l1, 0
2004800: 02 80 00 03 be 200480c <rtems_termios_open+0x1a0>
2004804: c0 24 20 04 clr [ %l0 + 4 ]
rtems_termios_ttyHead->back = tty;
2004808: e0 24 60 04 st %l0, [ %l1 + 4 ]
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
200480c: 03 00 80 7c sethi %hi(0x201f000), %g1
2004810: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 201f344 <rtems_termios_ttyTail>
2004814: 80 a0 a0 00 cmp %g2, 0
2004818: 02 80 00 9d be 2004a8c <rtems_termios_open+0x420>
200481c: e0 24 a3 48 st %l0, [ %l2 + 0x348 ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
2004820: 23 00 80 7a sethi %hi(0x201e800), %l1
2004824: d0 4c 61 6c ldsb [ %l1 + 0x16c ], %o0 ! 201e96c <c.6547>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2004828: 03 15 14 9a sethi %hi(0x54526800), %g1
200482c: 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;
2004830: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
tty->major = major;
2004834: f0 24 20 0c st %i0, [ %l0 + 0xc ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2004838: 92 10 20 01 mov 1, %o1
200483c: 94 10 20 54 mov 0x54, %o2
2004840: 90 12 00 01 or %o0, %g1, %o0
2004844: 96 10 20 00 clr %o3
2004848: 40 00 09 f7 call 2007024 <rtems_semaphore_create>
200484c: 98 04 20 14 add %l0, 0x14, %o4
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
2004850: 80 a2 20 00 cmp %o0, 0
2004854: 12 80 00 75 bne 2004a28 <rtems_termios_open+0x3bc>
2004858: 03 15 14 9b sethi %hi(0x54526c00), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
200485c: d0 4c 61 6c ldsb [ %l1 + 0x16c ], %o0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
2004860: 82 10 63 00 or %g1, 0x300, %g1
2004864: 92 10 20 01 mov 1, %o1
2004868: 94 10 20 54 mov 0x54, %o2
200486c: 90 12 00 01 or %o0, %g1, %o0
2004870: 96 10 20 00 clr %o3
2004874: 40 00 09 ec call 2007024 <rtems_semaphore_create>
2004878: 98 04 20 18 add %l0, 0x18, %o4
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
200487c: 80 a2 20 00 cmp %o0, 0
2004880: 12 80 00 6a bne 2004a28 <rtems_termios_open+0x3bc>
2004884: 03 15 14 9e sethi %hi(0x54527800), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
2004888: d0 4c 61 6c ldsb [ %l1 + 0x16c ], %o0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
200488c: 92 10 20 00 clr %o1
2004890: 90 12 00 01 or %o0, %g1, %o0
2004894: 94 10 20 20 mov 0x20, %o2
2004898: 96 10 20 00 clr %o3
200489c: 40 00 09 e2 call 2007024 <rtems_semaphore_create>
20048a0: 98 04 20 8c add %l0, 0x8c, %o4
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
20048a4: 80 a2 20 00 cmp %o0, 0
20048a8: 12 80 00 60 bne 2004a28 <rtems_termios_open+0x3bc>
20048ac: 92 10 00 1b mov %i3, %o1
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
20048b0: c0 24 20 94 clr [ %l0 + 0x94 ]
/*
* Set callbacks
*/
tty->device = *callbacks;
20048b4: 90 04 20 98 add %l0, 0x98, %o0
20048b8: 40 00 35 a2 call 2011f40 <memcpy>
20048bc: 94 10 20 20 mov 0x20, %o2
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20048c0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20048c4: 80 a0 60 02 cmp %g1, 2
20048c8: 02 80 00 5a be 2004a30 <rtems_termios_open+0x3c4>
20048cc: d0 4c 61 6c ldsb [ %l1 + 0x16c ], %o0
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
20048d0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
20048d4: 80 a0 60 00 cmp %g1, 0
20048d8: 02 80 00 49 be 20049fc <rtems_termios_open+0x390>
20048dc: d0 4c 61 6c ldsb [ %l1 + 0x16c ], %o0
20048e0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20048e4: 80 a0 60 02 cmp %g1, 2
20048e8: 02 80 00 46 be 2004a00 <rtems_termios_open+0x394>
20048ec: 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;
20048f0: c0 24 20 b8 clr [ %l0 + 0xb8 ]
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
20048f4: c8 04 20 64 ld [ %l0 + 0x64 ], %g4
tty->highwater = tty->rawInBuf.Size * 3/4;
20048f8: c4 04 20 64 ld [ %l0 + 0x64 ], %g2
/*
* Bump name characer
*/
if (c++ == 'z')
20048fc: c2 0c 61 6c ldub [ %l1 + 0x16c ], %g1
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
2004900: b7 28 a0 01 sll %g2, 1, %i3
2004904: 84 06 c0 02 add %i3, %g2, %g2
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
2004908: 37 00 00 09 sethi %hi(0x2400), %i3
200490c: b6 16 e1 02 or %i3, 0x102, %i3 ! 2502 <PROM_START+0x2502>
2004910: f6 24 20 30 st %i3, [ %l0 + 0x30 ]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
2004914: 37 00 00 06 sethi %hi(0x1800), %i3
2004918: b6 16 e0 05 or %i3, 5, %i3 ! 1805 <PROM_START+0x1805>
200491c: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
2004920: b6 10 28 bd mov 0x8bd, %i3
2004924: f6 24 20 38 st %i3, [ %l0 + 0x38 ]
tty->termios.c_lflag =
2004928: 37 00 00 20 sethi %hi(0x8000), %i3
200492c: b6 16 e2 3b or %i3, 0x23b, %i3 ! 823b <PROM_START+0x823b>
2004930: f6 24 20 3c st %i3, [ %l0 + 0x3c ]
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
2004934: b6 10 20 03 mov 3, %i3
2004938: f6 2c 20 41 stb %i3, [ %l0 + 0x41 ]
tty->termios.c_cc[VQUIT] = '\034';
200493c: b6 10 20 1c mov 0x1c, %i3
2004940: f6 2c 20 42 stb %i3, [ %l0 + 0x42 ]
tty->termios.c_cc[VERASE] = '\177';
2004944: b6 10 20 7f mov 0x7f, %i3
2004948: f6 2c 20 43 stb %i3, [ %l0 + 0x43 ]
tty->termios.c_cc[VKILL] = '\025';
200494c: b6 10 20 15 mov 0x15, %i3
2004950: f6 2c 20 44 stb %i3, [ %l0 + 0x44 ]
tty->termios.c_cc[VEOF] = '\004';
2004954: b6 10 20 04 mov 4, %i3
2004958: f6 2c 20 45 stb %i3, [ %l0 + 0x45 ]
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
200495c: b6 10 20 11 mov 0x11, %i3
2004960: f6 2c 20 49 stb %i3, [ %l0 + 0x49 ]
tty->termios.c_cc[VSTOP] = '\023';
2004964: b6 10 20 13 mov 0x13, %i3
2004968: f6 2c 20 4a stb %i3, [ %l0 + 0x4a ]
tty->termios.c_cc[VSUSP] = '\032';
200496c: b6 10 20 1a mov 0x1a, %i3
2004970: f6 2c 20 4b stb %i3, [ %l0 + 0x4b ]
tty->termios.c_cc[VREPRINT] = '\022';
2004974: b6 10 20 12 mov 0x12, %i3
2004978: f6 2c 20 4d stb %i3, [ %l0 + 0x4d ]
tty->termios.c_cc[VDISCARD] = '\017';
200497c: b6 10 20 0f mov 0xf, %i3
2004980: f6 2c 20 4e stb %i3, [ %l0 + 0x4e ]
tty->termios.c_cc[VWERASE] = '\027';
2004984: b6 10 20 17 mov 0x17, %i3
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
2004988: 86 00 60 01 add %g1, 1, %g3
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
200498c: 89 31 20 01 srl %g4, 1, %g4
tty->highwater = tty->rawInBuf.Size * 3/4;
2004990: 85 30 a0 02 srl %g2, 2, %g2
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
2004994: f6 2c 20 4f stb %i3, [ %l0 + 0x4f ]
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
2004998: c0 2c 20 4c clrb [ %l0 + 0x4c ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
200499c: b6 10 20 16 mov 0x16, %i3
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
20049a0: c0 2c 20 51 clrb [ %l0 + 0x51 ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
20049a4: f6 2c 20 50 stb %i3, [ %l0 + 0x50 ]
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
20049a8: c8 24 20 bc st %g4, [ %l0 + 0xbc ]
tty->highwater = tty->rawInBuf.Size * 3/4;
20049ac: c4 24 20 c0 st %g2, [ %l0 + 0xc0 ]
/*
* Bump name characer
*/
if (c++ == 'z')
20049b0: 83 28 60 18 sll %g1, 0x18, %g1
20049b4: 83 38 60 18 sra %g1, 0x18, %g1
20049b8: 80 a0 60 7a cmp %g1, 0x7a
20049bc: 12 bf ff 46 bne 20046d4 <rtems_termios_open+0x68>
20049c0: c6 2c 61 6c stb %g3, [ %l1 + 0x16c ]
c = 'a';
20049c4: 84 10 20 61 mov 0x61, %g2
20049c8: 03 00 80 7a sethi %hi(0x201e800), %g1
20049cc: 10 bf ff 42 b 20046d4 <rtems_termios_open+0x68>
20049d0: c4 28 61 6c stb %g2, [ %g1 + 0x16c ] ! 201e96c <c.6547>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
20049d4: 7f ff fa 47 call 20032f0 <free> <== NOT EXECUTED
20049d8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
20049dc: 7f ff fa 45 call 20032f0 <free>
20049e0: 90 10 00 13 mov %l3, %o0
free(tty);
20049e4: 7f ff fa 43 call 20032f0 <free>
20049e8: 90 10 00 10 mov %l0, %o0
rtems_semaphore_release (rtems_termios_ttyMutex);
20049ec: d0 07 23 40 ld [ %i4 + 0x340 ], %o0
20049f0: 40 00 0a 7e call 20073e8 <rtems_semaphore_release>
20049f4: ba 10 20 1a mov 0x1a, %i5
return RTEMS_NO_MEMORY;
20049f8: 30 bf ff 4b b,a 2004724 <rtems_termios_open+0xb8>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
20049fc: 03 15 14 9c sethi %hi(0x54527000), %g1
2004a00: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <RAM_END+0x52127200>
2004a04: 92 10 20 00 clr %o1
2004a08: 94 10 20 24 mov 0x24, %o2
2004a0c: 90 12 00 01 or %o0, %g1, %o0
2004a10: 96 10 20 00 clr %o3
2004a14: 40 00 09 84 call 2007024 <rtems_semaphore_create>
2004a18: 98 04 20 68 add %l0, 0x68, %o4
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
2004a1c: 80 a2 20 00 cmp %o0, 0
2004a20: 02 bf ff b4 be 20048f0 <rtems_termios_open+0x284> <== ALWAYS TAKEN
2004a24: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2004a28: 40 00 0b ea call 20079d0 <rtems_fatal_error_occurred>
2004a2c: 01 00 00 00 nop
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
2004a30: 03 15 1e 15 sethi %hi(0x54785400), %g1
2004a34: 92 10 20 0a mov 0xa, %o1
2004a38: 90 12 00 01 or %o0, %g1, %o0
2004a3c: 94 10 24 00 mov 0x400, %o2
2004a40: 96 10 25 00 mov 0x500, %o3
2004a44: 98 10 20 00 clr %o4
2004a48: 40 00 0a 93 call 2007494 <rtems_task_create>
2004a4c: 9a 04 20 c8 add %l0, 0xc8, %o5
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
2004a50: 80 a2 20 00 cmp %o0, 0
2004a54: 12 bf ff f5 bne 2004a28 <rtems_termios_open+0x3bc> <== NEVER TAKEN
2004a58: 03 14 9e 15 sethi %hi(0x52785400), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
2004a5c: d0 4c 61 6c ldsb [ %l1 + 0x16c ], %o0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
2004a60: 92 10 20 09 mov 9, %o1
2004a64: 90 12 00 01 or %o0, %g1, %o0
2004a68: 94 10 24 00 mov 0x400, %o2
2004a6c: 96 10 25 00 mov 0x500, %o3
2004a70: 98 10 20 00 clr %o4
2004a74: 40 00 0a 88 call 2007494 <rtems_task_create>
2004a78: 9a 04 20 c4 add %l0, 0xc4, %o5
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
2004a7c: 80 a2 20 00 cmp %o0, 0
2004a80: 22 bf ff 95 be,a 20048d4 <rtems_termios_open+0x268> <== ALWAYS TAKEN
2004a84: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
2004a88: 30 bf ff e8 b,a 2004a28 <rtems_termios_open+0x3bc> <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
2004a8c: 10 bf ff 65 b 2004820 <rtems_termios_open+0x1b4>
2004a90: e0 20 63 44 st %l0, [ %g1 + 0x344 ]
0200518c <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
200518c: 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) {
2005190: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1
2005194: 80 a0 60 00 cmp %g1, 0
2005198: 22 80 00 44 be,a 20052a8 <rtems_termios_puts+0x11c>
200519c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
20051a0: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0
while (len) {
20051a4: 80 a6 60 00 cmp %i1, 0
20051a8: 02 80 00 35 be 200527c <rtems_termios_puts+0xf0> <== NEVER TAKEN
20051ac: b6 10 20 02 mov 2, %i3
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
20051b0: a2 10 20 01 mov 1, %l1
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
20051b4: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1
20051b8: 40 00 55 45 call 201a6cc <.urem>
20051bc: 90 04 20 01 add %l0, 1, %o0
rtems_interrupt_disable (level);
20051c0: 7f ff f4 e7 call 200255c <sparc_disable_interrupts>
20051c4: a0 10 00 08 mov %o0, %l0
20051c8: ba 10 00 08 mov %o0, %i5
while (newHead == tty->rawOutBuf.Tail) {
20051cc: f8 06 a0 84 ld [ %i2 + 0x84 ], %i4
20051d0: 80 a7 00 10 cmp %i4, %l0
20051d4: 32 80 00 14 bne,a 2005224 <rtems_termios_puts+0x98>
20051d8: c6 0e 00 00 ldub [ %i0 ], %g3
tty->rawOutBufState = rob_wait;
20051dc: f6 26 a0 94 st %i3, [ %i2 + 0x94 ]
rtems_interrupt_enable (level);
20051e0: 7f ff f4 e3 call 200256c <sparc_enable_interrupts>
20051e4: 90 10 00 1d mov %i5, %o0
sc = rtems_semaphore_obtain(
20051e8: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0
20051ec: 92 10 20 00 clr %o1
20051f0: 40 00 08 34 call 20072c0 <rtems_semaphore_obtain>
20051f4: 94 10 20 00 clr %o2
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20051f8: 80 a2 20 00 cmp %o0, 0
20051fc: 12 80 00 31 bne 20052c0 <rtems_termios_puts+0x134> <== NEVER TAKEN
2005200: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2005204: 7f ff f4 d6 call 200255c <sparc_disable_interrupts>
2005208: 01 00 00 00 nop
200520c: ba 10 00 08 mov %o0, %i5
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
2005210: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1
2005214: 80 a0 40 1c cmp %g1, %i4
2005218: 22 bf ff f2 be,a 20051e0 <rtems_termios_puts+0x54> <== NEVER TAKEN
200521c: f6 26 a0 94 st %i3, [ %i2 + 0x94 ] <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
2005220: c6 0e 00 00 ldub [ %i0 ], %g3
2005224: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1
2005228: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2
200522c: b0 06 20 01 inc %i0
2005230: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
2005234: 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;
2005238: e0 26 a0 80 st %l0, [ %i2 + 0x80 ]
if (tty->rawOutBufState == rob_idle) {
200523c: 80 a0 60 00 cmp %g1, 0
2005240: 12 80 00 0a bne 2005268 <rtems_termios_puts+0xdc>
2005244: 01 00 00 00 nop
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2005248: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1
200524c: 80 88 60 10 btst 0x10, %g1
2005250: 02 80 00 0d be 2005284 <rtems_termios_puts+0xf8> <== ALWAYS TAKEN
2005254: 01 00 00 00 nop
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
2005258: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
200525c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
2005260: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
2005264: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED
}
rtems_interrupt_enable (level);
2005268: 7f ff f4 c1 call 200256c <sparc_enable_interrupts>
200526c: 90 10 00 1d mov %i5, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
2005270: b2 86 7f ff addcc %i1, -1, %i1
2005274: 12 bf ff d0 bne 20051b4 <rtems_termios_puts+0x28>
2005278: 01 00 00 00 nop
200527c: 81 c7 e0 08 ret
2005280: 81 e8 00 00 restore
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2005284: 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)(
2005288: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1
200528c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
2005290: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
2005294: 92 02 40 02 add %o1, %g2, %o1
2005298: 9f c0 40 00 call %g1
200529c: 94 10 20 01 mov 1, %o2
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
20052a0: 10 bf ff f2 b 2005268 <rtems_termios_puts+0xdc>
20052a4: e2 26 a0 94 st %l1, [ %i2 + 0x94 ]
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
20052a8: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
20052ac: 92 10 00 18 mov %i0, %o1
20052b0: 9f c0 40 00 call %g1
20052b4: 94 10 00 19 mov %i1, %o2
return;
20052b8: 81 c7 e0 08 ret
20052bc: 81 e8 00 00 restore
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
20052c0: 40 00 09 c4 call 20079d0 <rtems_fatal_error_occurred> <== NOT EXECUTED
02005b60 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2005b60: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005b64: c2 06 00 00 ld [ %i0 ], %g1
uint32_t count = args->count;
2005b68: f4 06 20 14 ld [ %i0 + 0x14 ], %i2
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005b6c: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
uint32_t count = args->count;
char *buffer = args->buffer;
2005b70: e4 06 20 10 ld [ %i0 + 0x10 ], %l2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2005b74: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
2005b78: 92 10 20 00 clr %o1
2005b7c: 40 00 05 d1 call 20072c0 <rtems_semaphore_obtain>
2005b80: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2005b84: a0 92 20 00 orcc %o0, 0, %l0
2005b88: 12 80 00 10 bne 2005bc8 <rtems_termios_read+0x68> <== NEVER TAKEN
2005b8c: 03 00 80 7c sethi %hi(0x201f000), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
2005b90: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005b94: 85 28 a0 05 sll %g2, 5, %g2
2005b98: 82 10 60 8c or %g1, 0x8c, %g1
2005b9c: 82 00 40 02 add %g1, %g2, %g1
2005ba0: c2 00 60 08 ld [ %g1 + 8 ], %g1
2005ba4: 80 a0 60 00 cmp %g1, 0
2005ba8: 02 80 00 0a be 2005bd0 <rtems_termios_read+0x70>
2005bac: 90 10 00 1d mov %i5, %o0
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
2005bb0: 9f c0 40 00 call %g1
2005bb4: 92 10 00 18 mov %i0, %o1
2005bb8: a0 10 00 08 mov %o0, %l0
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2005bbc: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
2005bc0: 40 00 06 0a call 20073e8 <rtems_semaphore_release>
2005bc4: c0 27 60 e4 clr [ %i5 + 0xe4 ]
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
2005bc8: 81 c7 e0 08 ret
2005bcc: 91 e8 00 10 restore %g0, %l0, %o0
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
2005bd0: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
2005bd4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2005bd8: 80 a0 80 01 cmp %g2, %g1
2005bdc: 22 80 00 20 be,a 2005c5c <rtems_termios_read+0xfc> <== ALWAYS TAKEN
2005be0: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2005be4: 80 a6 a0 00 cmp %i2, 0
2005be8: 22 80 00 15 be,a 2005c3c <rtems_termios_read+0xdc> <== NEVER TAKEN
2005bec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
2005bf0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
2005bf4: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2005bf8: 80 a0 80 01 cmp %g2, %g1
2005bfc: 24 80 00 10 ble,a 2005c3c <rtems_termios_read+0xdc> <== NEVER TAKEN
2005c00: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
2005c04: 10 80 00 06 b 2005c1c <rtems_termios_read+0xbc>
2005c08: a4 24 80 01 sub %l2, %g1, %l2
2005c0c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2005c10: 80 a0 80 01 cmp %g2, %g1
2005c14: 24 80 00 0a ble,a 2005c3c <rtems_termios_read+0xdc>
2005c18: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
*buffer++ = tty->cbuf[tty->cindex++];
2005c1c: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2005c20: b4 86 bf ff addcc %i2, -1, %i2
*buffer++ = tty->cbuf[tty->cindex++];
2005c24: c4 08 80 01 ldub [ %g2 + %g1 ], %g2
2005c28: c4 2c 80 01 stb %g2, [ %l2 + %g1 ]
2005c2c: 82 00 60 01 inc %g1
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2005c30: 12 bf ff f7 bne 2005c0c <rtems_termios_read+0xac>
2005c34: c2 27 60 24 st %g1, [ %i5 + 0x24 ]
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
2005c38: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2005c3c: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
2005c40: b4 20 40 1a sub %g1, %i2, %i2
2005c44: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
tty->tty_rcvwakeup = 0;
2005c48: c0 27 60 e4 clr [ %i5 + 0xe4 ]
rtems_semaphore_release (tty->isem);
2005c4c: 40 00 05 e7 call 20073e8 <rtems_semaphore_release>
2005c50: b0 10 00 10 mov %l0, %i0
return sc;
}
2005c54: 81 c7 e0 08 ret
2005c58: 81 e8 00 00 restore
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
2005c5c: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
2005c60: c0 27 60 20 clr [ %i5 + 0x20 ]
2005c64: c0 27 60 24 clr [ %i5 + 0x24 ]
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
2005c68: 80 a0 60 00 cmp %g1, 0
2005c6c: 02 80 00 06 be 2005c84 <rtems_termios_read+0x124>
2005c70: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
2005c74: c4 07 60 b4 ld [ %i5 + 0xb4 ], %g2
2005c78: 80 a0 a0 00 cmp %g2, 0
2005c7c: 22 80 00 8e be,a 2005eb4 <rtems_termios_read+0x354>
2005c80: c4 07 60 3c ld [ %i5 + 0x3c ], %g2
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
2005c84: f8 07 60 74 ld [ %i5 + 0x74 ], %i4
rtems_status_code sc;
int wait = (int)1;
2005c88: b6 10 20 01 mov 1, %i3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
2005c8c: 23 00 80 7a sethi %hi(0x201e800), %l1
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
2005c90: a6 07 60 49 add %i5, 0x49, %l3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005c94: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
2005c98: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2005c9c: 80 a0 80 01 cmp %g2, %g1
2005ca0: 02 80 00 57 be 2005dfc <rtems_termios_read+0x29c>
2005ca4: c4 04 61 68 ld [ %l1 + 0x168 ], %g2
2005ca8: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
(tty->ccount < (CBUFSIZE-1))) {
2005cac: 84 00 bf ff add %g2, -1, %g2
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005cb0: 80 a0 80 01 cmp %g2, %g1
2005cb4: 18 80 00 18 bgu 2005d14 <rtems_termios_read+0x1b4> <== ALWAYS TAKEN
2005cb8: b2 14 61 68 or %l1, 0x168, %i1
}
/*
* Wait for characters
*/
if ( wait ) {
2005cbc: 10 80 00 51 b 2005e00 <rtems_termios_read+0x2a0> <== NOT EXECUTED
2005cc0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2005cc4: 32 80 00 59 bne,a 2005e28 <rtems_termios_read+0x2c8> <== ALWAYS TAKEN
2005cc8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
2005ccc: 90 0f 20 ff and %i4, 0xff, %o0 <== NOT EXECUTED
2005cd0: 7f ff fe 96 call 2005728 <iproc> <== NOT EXECUTED
2005cd4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2005cd8: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
2005cdc: 80 a0 00 1c cmp %g0, %i4 <== NOT EXECUTED
2005ce0: 82 40 3f ff addx %g0, -1, %g1
2005ce4: b6 0e c0 01 and %i3, %g1, %i3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005ce8: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
2005cec: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2005cf0: 80 a0 80 01 cmp %g2, %g1
2005cf4: 02 80 00 42 be 2005dfc <rtems_termios_read+0x29c>
2005cf8: f8 07 60 70 ld [ %i5 + 0x70 ], %i4
(tty->ccount < (CBUFSIZE-1))) {
2005cfc: c2 06 40 00 ld [ %i1 ], %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005d00: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
(tty->ccount < (CBUFSIZE-1))) {
2005d04: 82 00 7f ff add %g1, -1, %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005d08: 80 a0 80 01 cmp %g2, %g1
2005d0c: 1a 80 00 3d bcc 2005e00 <rtems_termios_read+0x2a0> <== NEVER TAKEN
2005d10: 80 a6 e0 00 cmp %i3, 0
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
2005d14: d0 07 60 5c ld [ %i5 + 0x5c ], %o0
2005d18: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
2005d1c: 40 00 52 6c call 201a6cc <.urem>
2005d20: 90 02 20 01 inc %o0
c = tty->rawInBuf.theBuf[newHead];
2005d24: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
2005d28: f8 08 40 08 ldub [ %g1 + %o0 ], %i4
tty->rawInBuf.Head = newHead;
2005d2c: d0 27 60 5c st %o0, [ %i5 + 0x5c ]
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
2005d30: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2005d34: c4 07 60 64 ld [ %i5 + 0x64 ], %g2
% tty->rawInBuf.Size)
2005d38: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
2005d3c: 82 00 80 01 add %g2, %g1, %g1
% tty->rawInBuf.Size)
2005d40: 40 00 52 63 call 201a6cc <.urem>
2005d44: 90 20 40 08 sub %g1, %o0, %o0
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
2005d48: c2 07 60 bc ld [ %i5 + 0xbc ], %g1
2005d4c: 80 a2 00 01 cmp %o0, %g1
2005d50: 3a 80 00 18 bcc,a 2005db0 <rtems_termios_read+0x250> <== NEVER TAKEN
2005d54: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
2005d58: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d5c: 82 08 7f fe and %g1, -2, %g1
2005d60: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
2005d64: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d68: 82 08 62 02 and %g1, 0x202, %g1
2005d6c: 80 a0 62 02 cmp %g1, 0x202
2005d70: 22 80 00 43 be,a 2005e7c <rtems_termios_read+0x31c> <== NEVER TAKEN
2005d74: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
2005d78: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d7c: 80 88 61 00 btst 0x100, %g1
2005d80: 22 80 00 0c be,a 2005db0 <rtems_termios_read+0x250> <== ALWAYS TAKEN
2005d84: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
tty->flow_ctrl &= ~FL_IRTSOFF;
2005d88: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2005d8c: c2 07 60 b0 ld [ %i5 + 0xb0 ], %g1 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
2005d90: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED
2005d94: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2005d98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005d9c: 22 80 00 05 be,a 2005db0 <rtems_termios_read+0x250> <== NOT EXECUTED
2005da0: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2005da4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005da8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2005dac: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
2005db0: 80 88 60 02 btst 2, %g1
2005db4: 12 bf ff c4 bne 2005cc4 <rtems_termios_read+0x164> <== ALWAYS TAKEN
2005db8: 80 88 6e 78 btst 0xe78, %g1
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2005dbc: 32 80 00 26 bne,a 2005e54 <rtems_termios_read+0x2f4> <== NOT EXECUTED
2005dc0: d0 07 60 18 ld [ %i5 + 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);
2005dc4: 90 0f 20 ff and %i4, 0xff, %o0 <== NOT EXECUTED
2005dc8: 7f ff fe 58 call 2005728 <iproc> <== NOT EXECUTED
2005dcc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
2005dd0: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1 <== NOT EXECUTED
2005dd4: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED
2005dd8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2005ddc: 06 bf ff c3 bl 2005ce8 <rtems_termios_read+0x188> <== NOT EXECUTED
2005de0: 01 00 00 00 nop <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005de4: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
2005de8: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
2005dec: b6 10 20 00 clr %i3 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2005df0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2005df4: 12 bf ff c2 bne 2005cfc <rtems_termios_read+0x19c> <== NOT EXECUTED
2005df8: f8 07 60 70 ld [ %i5 + 0x70 ], %i4 <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
2005dfc: 80 a6 e0 00 cmp %i3, 0
2005e00: 02 bf ff 7a be 2005be8 <rtems_termios_read+0x88>
2005e04: 80 a6 a0 00 cmp %i2, 0
sc = rtems_semaphore_obtain(
2005e08: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2005e0c: d2 07 60 6c ld [ %i5 + 0x6c ], %o1
2005e10: 40 00 05 2c call 20072c0 <rtems_semaphore_obtain>
2005e14: 94 10 00 1c mov %i4, %o2
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
2005e18: 80 a2 20 00 cmp %o0, 0
2005e1c: 02 bf ff 9e be 2005c94 <rtems_termios_read+0x134> <== ALWAYS TAKEN
2005e20: 80 a6 a0 00 cmp %i2, 0
2005e24: 30 bf ff 71 b,a 2005be8 <rtems_termios_read+0x88> <== 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);
2005e28: 94 10 20 00 clr %o2
2005e2c: 40 00 05 25 call 20072c0 <rtems_semaphore_obtain>
2005e30: 92 10 20 00 clr %o1
i = iproc (c, tty);
2005e34: 90 0f 20 ff and %i4, 0xff, %o0
2005e38: 7f ff fe 3c call 2005728 <iproc>
2005e3c: 92 10 00 1d mov %i5, %o1
2005e40: b8 10 00 08 mov %o0, %i4
rtems_semaphore_release (tty->osem);
2005e44: 40 00 05 69 call 20073e8 <rtems_semaphore_release>
2005e48: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
2005e4c: 10 bf ff a5 b 2005ce0 <rtems_termios_read+0x180>
2005e50: 80 a0 00 1c cmp %g0, %i4
/*
* 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);
2005e54: 94 10 20 00 clr %o2 <== NOT EXECUTED
2005e58: 40 00 05 1a call 20072c0 <rtems_semaphore_obtain> <== NOT EXECUTED
2005e5c: 92 10 20 00 clr %o1 <== NOT EXECUTED
i = iproc (c, tty);
2005e60: 90 0f 20 ff and %i4, 0xff, %o0 <== NOT EXECUTED
2005e64: 7f ff fe 31 call 2005728 <iproc> <== NOT EXECUTED
2005e68: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2005e6c: 40 00 05 5f call 20073e8 <rtems_semaphore_release> <== NOT EXECUTED
2005e70: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
2005e74: 10 bf ff d8 b 2005dd4 <rtems_termios_read+0x274> <== NOT EXECUTED
2005e78: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1 <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
2005e7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005e80: 22 80 00 07 be,a 2005e9c <rtems_termios_read+0x33c> <== NOT EXECUTED
2005e84: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
2005e88: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2005e8c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2005e90: 02 bf ff ba be 2005d78 <rtems_termios_read+0x218> <== NOT EXECUTED
2005e94: 01 00 00 00 nop <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
2005e98: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2005e9c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2005ea0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2005ea4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005ea8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2005eac: 10 bf ff c1 b 2005db0 <rtems_termios_read+0x250> <== NOT EXECUTED
2005eb0: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2005eb4: 80 88 a0 02 btst 2, %g2
2005eb8: 02 80 00 14 be 2005f08 <rtems_termios_read+0x3a8>
2005ebc: 01 00 00 00 nop
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2005ec0: 9f c0 40 00 call %g1
2005ec4: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if (n < 0) {
2005ec8: 80 a2 20 00 cmp %o0, 0
2005ecc: 06 80 00 5b bl 2006038 <rtems_termios_read+0x4d8>
2005ed0: 01 00 00 00 nop
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2005ed4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
2005ed8: 80 88 6e 78 btst 0xe78, %g1
2005edc: 12 80 00 40 bne 2005fdc <rtems_termios_read+0x47c> <== ALWAYS TAKEN
2005ee0: b8 10 00 08 mov %o0, %i4
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
2005ee4: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
2005ee8: 7f ff fe 10 call 2005728 <iproc> <== NOT EXECUTED
2005eec: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2005ef0: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
2005ef4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2005ef8: 12 bf ff 3c bne 2005be8 <rtems_termios_read+0x88>
2005efc: 80 a6 a0 00 cmp %i2, 0
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2005f00: 10 bf ff f0 b 2005ec0 <rtems_termios_read+0x360>
2005f04: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
2005f08: 40 00 03 29 call 2006bac <rtems_clock_get_ticks_since_boot>
2005f0c: 01 00 00 00 nop
2005f10: b6 10 00 08 mov %o0, %i3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2005f14: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
2005f18: 9f c0 40 00 call %g1
2005f1c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if (n < 0) {
2005f20: 80 a2 20 00 cmp %o0, 0
2005f24: 26 80 00 15 bl,a 2005f78 <rtems_termios_read+0x418>
2005f28: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2005f2c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
2005f30: 80 88 6e 78 btst 0xe78, %g1
2005f34: 12 80 00 36 bne 200600c <rtems_termios_read+0x4ac> <== ALWAYS TAKEN
2005f38: b8 10 00 08 mov %o0, %i4
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
2005f3c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
2005f40: 7f ff fd fa call 2005728 <iproc> <== NOT EXECUTED
2005f44: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
2005f48: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1 <== NOT EXECUTED
2005f4c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2005f50: 80 a0 80 01 cmp %g2, %g1
2005f54: 16 bf ff 24 bge 2005be4 <rtems_termios_read+0x84>
2005f58: 80 a0 60 00 cmp %g1, 0
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2005f5c: 22 bf ff ef be,a 2005f18 <rtems_termios_read+0x3b8> <== NEVER TAKEN
2005f60: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 <== NOT EXECUTED
2005f64: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
2005f68: 80 a0 60 00 cmp %g1, 0
2005f6c: 22 bf ff eb be,a 2005f18 <rtems_termios_read+0x3b8> <== NEVER TAKEN
2005f70: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 <== NOT EXECUTED
2005f74: 30 bf ff e5 b,a 2005f08 <rtems_termios_read+0x3a8>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
2005f78: 80 a0 60 00 cmp %g1, 0
2005f7c: 02 80 00 0d be 2005fb0 <rtems_termios_read+0x450> <== NEVER TAKEN
2005f80: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
if (tty->termios.c_cc[VTIME] && tty->ccount) {
2005f84: 80 a0 60 00 cmp %g1, 0
2005f88: 02 80 00 06 be 2005fa0 <rtems_termios_read+0x440> <== NEVER TAKEN
2005f8c: 01 00 00 00 nop
2005f90: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2005f94: 80 a0 60 00 cmp %g1, 0
2005f98: 12 80 00 09 bne 2005fbc <rtems_termios_read+0x45c>
2005f9c: 01 00 00 00 nop
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
2005fa0: 40 00 05 fc call 2007790 <rtems_task_wake_after>
2005fa4: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2005fa8: 10 bf ff dc b 2005f18 <rtems_termios_read+0x3b8>
2005fac: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
2005fb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005fb4: 02 bf ff 0d be 2005be8 <rtems_termios_read+0x88> <== NOT EXECUTED
2005fb8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
2005fbc: 40 00 02 fc call 2006bac <rtems_clock_get_ticks_since_boot>
2005fc0: 01 00 00 00 nop
if ((now - then) > tty->vtimeTicks) {
2005fc4: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
2005fc8: 90 22 00 1b sub %o0, %i3, %o0
2005fcc: 80 a2 00 01 cmp %o0, %g1
2005fd0: 08 bf ff f4 bleu 2005fa0 <rtems_termios_read+0x440>
2005fd4: 80 a6 a0 00 cmp %i2, 0
2005fd8: 30 bf ff 04 b,a 2005be8 <rtems_termios_read+0x88>
/*
* 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);
2005fdc: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
2005fe0: 94 10 20 00 clr %o2
2005fe4: 40 00 04 b7 call 20072c0 <rtems_semaphore_obtain>
2005fe8: 92 10 20 00 clr %o1
i = iproc (c, tty);
2005fec: 90 0f 20 ff and %i4, 0xff, %o0
2005ff0: 7f ff fd ce call 2005728 <iproc>
2005ff4: 92 10 00 1d mov %i5, %o1
2005ff8: b8 10 00 08 mov %o0, %i4
rtems_semaphore_release (tty->osem);
2005ffc: 40 00 04 fb call 20073e8 <rtems_semaphore_release>
2006000: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
2006004: 10 bf ff bd b 2005ef8 <rtems_termios_read+0x398>
2006008: 80 a7 20 00 cmp %i4, 0
/*
* 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);
200600c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
2006010: 94 10 20 00 clr %o2
2006014: 40 00 04 ab call 20072c0 <rtems_semaphore_obtain>
2006018: 92 10 20 00 clr %o1
i = iproc (c, tty);
200601c: 90 0f 20 ff and %i4, 0xff, %o0
2006020: 7f ff fd c2 call 2005728 <iproc>
2006024: 92 10 00 1d mov %i5, %o1
rtems_semaphore_release (tty->osem);
2006028: 40 00 04 f0 call 20073e8 <rtems_semaphore_release>
200602c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
2006030: 10 bf ff c7 b 2005f4c <rtems_termios_read+0x3ec>
2006034: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
2006038: 40 00 05 d6 call 2007790 <rtems_task_wake_after>
200603c: 90 10 20 01 mov 1, %o0
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2006040: 10 bf ff a0 b 2005ec0 <rtems_termios_read+0x360>
2006044: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
020063f4 <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)
{
20063f4: 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))
20063f8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
20063fc: 82 08 64 03 and %g1, 0x403, %g1
2006400: 80 a0 64 01 cmp %g1, 0x401
2006404: 02 80 00 44 be 2006514 <rtems_termios_refill_transmitter+0x120><== NEVER TAKEN
2006408: ba 10 00 18 mov %i0, %i5
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
200640c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
2006410: 82 08 60 03 and %g1, 3, %g1
2006414: 80 a0 60 02 cmp %g1, 2
2006418: 22 80 00 50 be,a 2006558 <rtems_termios_refill_transmitter+0x164><== NEVER TAKEN
200641c: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2006420: c4 06 20 80 ld [ %i0 + 0x80 ], %g2
2006424: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2006428: 80 a0 80 01 cmp %g2, %g1
200642c: 22 80 00 30 be,a 20064ec <rtems_termios_refill_transmitter+0xf8>
2006430: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
2006434: 7f ff f0 4a call 200255c <sparc_disable_interrupts>
2006438: 01 00 00 00 nop
len = tty->t_dqlen;
200643c: f8 06 20 90 ld [ %i0 + 0x90 ], %i4
tty->t_dqlen = 0;
2006440: c0 26 20 90 clr [ %i0 + 0x90 ]
rtems_interrupt_enable(level);
2006444: 7f ff f0 4a call 200256c <sparc_enable_interrupts>
2006448: 01 00 00 00 nop
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
200644c: d0 06 20 84 ld [ %i0 + 0x84 ], %o0
2006450: d2 06 20 88 ld [ %i0 + 0x88 ], %o1
2006454: 40 00 50 9e call 201a6cc <.urem>
2006458: 90 07 00 08 add %i4, %o0, %o0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
200645c: 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;
2006460: d0 27 60 84 st %o0, [ %i5 + 0x84 ]
if (tty->rawOutBufState == rob_wait) {
2006464: 80 a0 60 02 cmp %g1, 2
2006468: 02 80 00 55 be 20065bc <rtems_termios_refill_transmitter+0x1c8>
200646c: b8 10 00 08 mov %o0, %i4
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
2006470: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2006474: 80 a0 40 1c cmp %g1, %i4
2006478: 22 80 00 48 be,a 2006598 <rtems_termios_refill_transmitter+0x1a4>
200647c: c2 07 60 d4 ld [ %i5 + 0xd4 ], %g1
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2006480: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2006484: 82 08 62 10 and %g1, 0x210, %g1
2006488: 80 a0 62 10 cmp %g1, 0x210
200648c: 02 80 00 4f be 20065c8 <rtems_termios_refill_transmitter+0x1d4><== NEVER TAKEN
2006490: 01 00 00 00 nop
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2006494: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2006498: 80 a7 00 01 cmp %i4, %g1
200649c: 18 80 00 1b bgu 2006508 <rtems_termios_refill_transmitter+0x114>
20064a0: 01 00 00 00 nop
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
20064a4: f0 07 60 80 ld [ %i5 + 0x80 ], %i0
20064a8: b0 26 00 1c sub %i0, %i4, %i0
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
20064ac: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
20064b0: 80 88 66 00 btst 0x600, %g1
20064b4: 02 80 00 04 be 20064c4 <rtems_termios_refill_transmitter+0xd0>
20064b8: 94 10 00 18 mov %i0, %o2
20064bc: 94 10 20 01 mov 1, %o2
nToSend = 1;
20064c0: b0 10 20 01 mov 1, %i0
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
20064c4: d2 07 60 7c ld [ %i5 + 0x7c ], %o1
20064c8: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1
20064cc: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
20064d0: 84 10 20 01 mov 1, %g2
(*tty->device.write)(
20064d4: 92 02 40 1c add %o1, %i4, %o1
20064d8: 9f c0 40 00 call %g1
20064dc: c4 27 60 94 st %g2, [ %i5 + 0x94 ]
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
20064e0: f8 27 60 84 st %i4, [ %i5 + 0x84 ]
}
return nToSend;
}
20064e4: 81 c7 e0 08 ret
20064e8: 81 e8 00 00 restore
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
20064ec: 80 a0 60 02 cmp %g1, 2
20064f0: 12 bf ff fd bne 20064e4 <rtems_termios_refill_transmitter+0xf0><== ALWAYS TAKEN
20064f4: b0 10 20 00 clr %i0
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
20064f8: 40 00 03 bc call 20073e8 <rtems_semaphore_release> <== NOT EXECUTED
20064fc: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
2006500: 81 c7 e0 08 ret <== NOT EXECUTED
2006504: 81 e8 00 00 restore <== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
2006508: f0 07 60 88 ld [ %i5 + 0x88 ], %i0
200650c: 10 bf ff e8 b 20064ac <rtems_termios_refill_transmitter+0xb8>
2006510: b0 26 00 1c sub %i0, %i4, %i0
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
2006514: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
2006518: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
200651c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED
2006520: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006524: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
rtems_interrupt_disable(level);
2006528: 7f ff f0 0d call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
200652c: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2006530: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2006534: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2006538: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
200653c: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2006540: c4 27 60 90 st %g2, [ %i5 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2006544: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2006548: 7f ff f0 09 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
200654c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2006550: 81 c7 e0 08 ret <== NOT EXECUTED
2006554: 81 e8 00 00 restore <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
2006558: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
200655c: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED
2006560: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006564: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
rtems_interrupt_disable(level);
2006568: 7f ff ef fd call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
200656c: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2006570: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2006574: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2006578: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
200657c: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2006580: c4 27 60 90 st %g2, [ %i5 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2006584: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2006588: 7f ff ef f9 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
200658c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2006590: 81 c7 e0 08 ret <== NOT EXECUTED
2006594: 81 e8 00 00 restore <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2006598: c0 27 60 94 clr [ %i5 + 0x94 ]
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
200659c: 80 a0 60 00 cmp %g1, 0
20065a0: 02 bf ff d0 be 20064e0 <rtems_termios_refill_transmitter+0xec><== ALWAYS TAKEN
20065a4: b0 10 20 00 clr %i0
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
20065a8: d2 07 60 d8 ld [ %i5 + 0xd8 ], %o1 <== NOT EXECUTED
20065ac: 9f c0 40 00 call %g1 <== NOT EXECUTED
20065b0: 90 07 60 30 add %i5, 0x30, %o0 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
20065b4: f8 27 60 84 st %i4, [ %i5 + 0x84 ] <== NOT EXECUTED
20065b8: 30 bf ff f6 b,a 2006590 <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);
20065bc: 40 00 03 8b call 20073e8 <rtems_semaphore_release>
20065c0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0
20065c4: 30 bf ff ab b,a 2006470 <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);
20065c8: 7f ff ef e5 call 200255c <sparc_disable_interrupts> <== NOT EXECUTED
20065cc: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
20065d0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
20065d4: 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;
20065d8: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
20065dc: c4 27 60 94 st %g2, [ %i5 + 0x94 ] <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
20065e0: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
20065e4: 7f ff ef e2 call 200256c <sparc_enable_interrupts> <== NOT EXECUTED
20065e8: 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*/
20065ec: f8 27 60 84 st %i4, [ %i5 + 0x84 ] <== NOT EXECUTED
20065f0: 30 bf ff e8 b,a 2006590 <rtems_termios_refill_transmitter+0x19c><== NOT EXECUTED
02006370 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
2006370: 9d e3 bf 98 save %sp, -104, %sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2006374: 10 80 00 08 b 2006394 <rtems_termios_rxdaemon+0x24>
2006378: 96 07 bf f8 add %fp, -8, %o3
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
200637c: 9f c0 40 00 call %g1
2006380: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
if (c != EOF) {
2006384: 80 a2 3f ff cmp %o0, -1
2006388: 32 80 00 15 bne,a 20063dc <rtems_termios_rxdaemon+0x6c>
200638c: d0 2f bf ff stb %o0, [ %fp + -1 ]
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2006390: 96 07 bf f8 add %fp, -8, %o3
2006394: 92 10 20 02 mov 2, %o1
2006398: 94 10 20 00 clr %o2
200639c: 40 00 02 27 call 2006c38 <rtems_event_receive>
20063a0: 90 10 20 03 mov 3, %o0
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
20063a4: c2 07 bf f8 ld [ %fp + -8 ], %g1
20063a8: 80 88 60 01 btst 1, %g1
20063ac: 22 bf ff f4 be,a 200637c <rtems_termios_rxdaemon+0xc> <== ALWAYS TAKEN
20063b0: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1
tty->rxTaskId = 0;
20063b4: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
20063b8: 40 00 04 81 call 20075bc <rtems_task_delete> <== NOT EXECUTED
20063bc: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
20063c0: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
20063c4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20063c8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
if (c != EOF) {
20063cc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
20063d0: 22 bf ff f1 be,a 2006394 <rtems_termios_rxdaemon+0x24> <== NOT EXECUTED
20063d4: 96 07 bf f8 add %fp, -8, %o3 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
20063d8: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
20063dc: 92 07 bf ff add %fp, -1, %o1
20063e0: 90 10 00 18 mov %i0, %o0
20063e4: 7f ff ff 1e call 200605c <rtems_termios_enqueue_raw_characters>
20063e8: 94 10 20 01 mov 1, %o2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
20063ec: 10 bf ff ea b 2006394 <rtems_termios_rxdaemon+0x24>
20063f0: 96 07 bf f8 add %fp, -8, %o3
020065f4 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
20065f4: 9d e3 bf 98 save %sp, -104, %sp
20065f8: 3b 00 80 7c sethi %hi(0x201f000), %i5
20065fc: 10 80 00 0c b 200662c <rtems_termios_txdaemon+0x38>
2006600: ba 17 60 8c or %i5, 0x8c, %i5 ! 201f08c <rtems_termios_linesw>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2006604: 83 28 60 05 sll %g1, 5, %g1
2006608: 82 07 40 01 add %i5, %g1, %g1
200660c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2006610: 80 a0 60 00 cmp %g1, 0
2006614: 02 80 00 04 be 2006624 <rtems_termios_txdaemon+0x30> <== ALWAYS TAKEN
2006618: 90 10 00 18 mov %i0, %o0
rtems_termios_linesw[tty->t_line].l_start(tty);
200661c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006620: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
2006624: 7f ff ff 74 call 20063f4 <rtems_termios_refill_transmitter>
2006628: 90 10 00 18 mov %i0, %o0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
200662c: 92 10 20 02 mov 2, %o1
2006630: 94 10 20 00 clr %o2
2006634: 96 07 bf fc add %fp, -4, %o3
2006638: 40 00 01 80 call 2006c38 <rtems_event_receive>
200663c: 90 10 20 03 mov 3, %o0
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
2006640: c2 07 bf fc ld [ %fp + -4 ], %g1
2006644: 80 88 60 01 btst 1, %g1
2006648: 22 bf ff ef be,a 2006604 <rtems_termios_txdaemon+0x10> <== ALWAYS TAKEN
200664c: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
tty->txTaskId = 0;
2006650: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2006654: 40 00 03 da call 20075bc <rtems_task_delete> <== NOT EXECUTED
2006658: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
200665c: 10 bf ff ea b 2006604 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
2006660: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
02005a94 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2005a94: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005a98: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2005a9c: 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;
2005aa0: fa 00 60 38 ld [ %g1 + 0x38 ], %i5
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2005aa4: 94 10 20 00 clr %o2
2005aa8: 40 00 06 06 call 20072c0 <rtems_semaphore_obtain>
2005aac: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2005ab0: b8 92 20 00 orcc %o0, 0, %i4
2005ab4: 12 80 00 0f bne 2005af0 <rtems_termios_write+0x5c> <== NEVER TAKEN
2005ab8: 03 00 80 7c sethi %hi(0x201f000), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
2005abc: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005ac0: 85 28 a0 05 sll %g2, 5, %g2
2005ac4: 82 10 60 8c or %g1, 0x8c, %g1
2005ac8: 82 00 40 02 add %g1, %g2, %g1
2005acc: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2005ad0: 80 a0 60 00 cmp %g1, 0
2005ad4: 02 80 00 09 be 2005af8 <rtems_termios_write+0x64>
2005ad8: 90 10 00 1d mov %i5, %o0
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
2005adc: 9f c0 40 00 call %g1
2005ae0: 92 10 00 18 mov %i0, %o1
2005ae4: b8 10 00 08 mov %o0, %i4
rtems_semaphore_release (tty->osem);
2005ae8: 40 00 06 40 call 20073e8 <rtems_semaphore_release>
2005aec: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
2005af0: 81 c7 e0 08 ret
2005af4: 91 e8 00 1c restore %g0, %i4, %o0
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
2005af8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2005afc: 80 88 60 01 btst 1, %g1
2005b00: 22 80 00 14 be,a 2005b50 <rtems_termios_write+0xbc> <== NEVER TAKEN
2005b04: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
2005b08: f4 1e 20 10 ldd [ %i0 + 0x10 ], %i2
while (count--)
2005b0c: 80 a6 e0 00 cmp %i3, 0
2005b10: 02 80 00 0a be 2005b38 <rtems_termios_write+0xa4> <== NEVER TAKEN
2005b14: 82 10 20 00 clr %g1
oproc (*buffer++, tty);
2005b18: d0 0e 80 00 ldub [ %i2 ], %o0
2005b1c: 92 10 00 1d mov %i5, %o1
2005b20: 7f ff fd eb call 20052cc <oproc>
2005b24: 90 0a 20 ff and %o0, 0xff, %o0
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
2005b28: b6 86 ff ff addcc %i3, -1, %i3
2005b2c: 12 bf ff fb bne 2005b18 <rtems_termios_write+0x84>
2005b30: b4 06 a0 01 inc %i2
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2005b34: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
}
rtems_semaphore_release (tty->osem);
2005b38: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2005b3c: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
}
rtems_semaphore_release (tty->osem);
2005b40: 40 00 06 2a call 20073e8 <rtems_semaphore_release>
2005b44: b0 10 00 1c mov %i4, %i0
return sc;
}
2005b48: 81 c7 e0 08 ret
2005b4c: 81 e8 00 00 restore
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
2005b50: 7f ff fd 8f call 200518c <rtems_termios_puts> <== NOT EXECUTED
2005b54: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
args->bytes_moved = args->count;
2005b58: 10 bf ff f8 b 2005b38 <rtems_termios_write+0xa4> <== NOT EXECUTED
2005b5c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
02016b94 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
2016b94: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2016b98: 11 00 80 f7 sethi %hi(0x203dc00), %o0
2016b9c: 92 10 00 18 mov %i0, %o1
2016ba0: 90 12 23 b4 or %o0, 0x3b4, %o0
2016ba4: 40 00 0d 36 call 201a07c <_Objects_Get>
2016ba8: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2016bac: c2 07 bf fc ld [ %fp + -4 ], %g1
2016bb0: 80 a0 60 00 cmp %g1, 0
2016bb4: 12 80 00 0c bne 2016be4 <rtems_timer_cancel+0x50>
2016bb8: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2016bbc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2016bc0: 80 a0 60 04 cmp %g1, 4
2016bc4: 02 80 00 04 be 2016bd4 <rtems_timer_cancel+0x40> <== NEVER TAKEN
2016bc8: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2016bcc: 40 00 15 c7 call 201c2e8 <_Watchdog_Remove>
2016bd0: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2016bd4: 40 00 11 38 call 201b0b4 <_Thread_Enable_dispatch>
2016bd8: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2016bdc: 81 c7 e0 08 ret
2016be0: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016be4: 81 c7 e0 08 ret
2016be8: 91 e8 20 04 restore %g0, 4, %o0
020170d8 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20170d8: 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;
20170dc: 03 00 80 f7 sethi %hi(0x203dc00), %g1
20170e0: fa 00 63 f4 ld [ %g1 + 0x3f4 ], %i5 ! 203dff4 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20170e4: b8 10 00 18 mov %i0, %i4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
20170e8: 80 a7 60 00 cmp %i5, 0
20170ec: 02 80 00 3a be 20171d4 <rtems_timer_server_fire_when+0xfc>
20170f0: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
20170f4: 03 00 80 f5 sethi %hi(0x203d400), %g1
20170f8: c2 08 62 40 ldub [ %g1 + 0x240 ], %g1 ! 203d640 <_TOD_Is_set>
20170fc: 80 a0 60 00 cmp %g1, 0
2017100: 02 80 00 35 be 20171d4 <rtems_timer_server_fire_when+0xfc><== NEVER TAKEN
2017104: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
2017108: 80 a6 a0 00 cmp %i2, 0
201710c: 02 80 00 32 be 20171d4 <rtems_timer_server_fire_when+0xfc>
2017110: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2017114: 90 10 00 19 mov %i1, %o0
2017118: 7f ff f3 10 call 2013d58 <_TOD_Validate>
201711c: b0 10 20 14 mov 0x14, %i0
2017120: 80 8a 20 ff btst 0xff, %o0
2017124: 02 80 00 2c be 20171d4 <rtems_timer_server_fire_when+0xfc>
2017128: 01 00 00 00 nop
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
201712c: 7f ff f2 d0 call 2013c6c <_TOD_To_seconds>
2017130: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
2017134: 21 00 80 f5 sethi %hi(0x203d400), %l0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2017138: b2 10 00 08 mov %o0, %i1
201713c: d0 1c 22 c0 ldd [ %l0 + 0x2c0 ], %o0
2017140: 94 10 20 00 clr %o2
2017144: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017148: 40 00 58 cf call 202d484 <__divdi3>
201714c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
if ( seconds <= _TOD_Seconds_since_epoch() )
2017150: 80 a6 40 09 cmp %i1, %o1
2017154: 08 80 00 20 bleu 20171d4 <rtems_timer_server_fire_when+0xfc>
2017158: 92 10 00 1c mov %i4, %o1
201715c: 11 00 80 f7 sethi %hi(0x203dc00), %o0
2017160: 94 07 bf fc add %fp, -4, %o2
2017164: 40 00 0b c6 call 201a07c <_Objects_Get>
2017168: 90 12 23 b4 or %o0, 0x3b4, %o0
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
201716c: c2 07 bf fc ld [ %fp + -4 ], %g1
2017170: 80 a0 60 00 cmp %g1, 0
2017174: 12 80 00 1a bne 20171dc <rtems_timer_server_fire_when+0x104>
2017178: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
201717c: 40 00 14 5b call 201c2e8 <_Watchdog_Remove>
2017180: 90 02 20 10 add %o0, 0x10, %o0
2017184: d0 1c 22 c0 ldd [ %l0 + 0x2c0 ], %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
2017188: 82 10 20 03 mov 3, %g1
201718c: 94 10 20 00 clr %o2
2017190: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2017194: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
the_watchdog->id = id;
2017198: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
the_watchdog->user_data = user_data;
201719c: f6 26 20 34 st %i3, [ %i0 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20171a0: c0 26 20 18 clr [ %i0 + 0x18 ]
20171a4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20171a8: 40 00 58 b7 call 202d484 <__divdi3>
20171ac: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
20171b0: c2 07 60 04 ld [ %i5 + 4 ], %g1
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
20171b4: b2 26 40 09 sub %i1, %o1, %i1
(*timer_server->schedule_operation)( timer_server, the_timer );
20171b8: 90 10 00 1d mov %i5, %o0
20171bc: 92 10 00 18 mov %i0, %o1
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
20171c0: f2 26 20 1c st %i1, [ %i0 + 0x1c ]
(*timer_server->schedule_operation)( timer_server, the_timer );
20171c4: 9f c0 40 00 call %g1
20171c8: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20171cc: 40 00 0f ba call 201b0b4 <_Thread_Enable_dispatch>
20171d0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
20171d4: 81 c7 e0 08 ret
20171d8: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20171dc: 81 c7 e0 08 ret
20171e0: 91 e8 20 04 restore %g0, 4, %o0
02002eb8 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
2002eb8: 9d e3 bf a0 save %sp, -96, %sp
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
2002ebc: 03 08 00 00 sethi %hi(0x20000000), %g1
2002ec0: 80 8e 00 01 btst %i0, %g1
2002ec4: 02 80 00 11 be 2002f08 <rtems_verror+0x50>
2002ec8: b8 10 00 18 mov %i0, %i4
if (rtems_panic_in_progress++)
2002ecc: 05 00 80 7c sethi %hi(0x201f000), %g2
2002ed0: c6 00 a2 f4 ld [ %g2 + 0x2f4 ], %g3 ! 201f2f4 <rtems_panic_in_progress>
2002ed4: 82 00 e0 01 add %g3, 1, %g1
2002ed8: 80 a0 e0 00 cmp %g3, 0
2002edc: 02 80 00 08 be 2002efc <rtems_verror+0x44> <== ALWAYS TAKEN
2002ee0: c2 20 a2 f4 st %g1, [ %g2 + 0x2f4 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2002ee4: 03 00 80 7d sethi %hi(0x201f400), %g1 <== NOT EXECUTED
2002ee8: c6 00 60 c0 ld [ %g1 + 0xc0 ], %g3 ! 201f4c0 <_Thread_Dispatch_disable_level><== NOT EXECUTED
2002eec: 86 00 e0 01 inc %g3 <== NOT EXECUTED
2002ef0: c6 20 60 c0 st %g3, [ %g1 + 0xc0 ] <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
2002ef4: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 <== NOT EXECUTED
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
2002ef8: c2 00 a2 f4 ld [ %g2 + 0x2f4 ], %g1 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2002efc: 80 a0 60 02 cmp %g1, 2
2002f00: 14 80 00 2f bg 2002fbc <rtems_verror+0x104> <== NEVER TAKEN
2002f04: b0 10 20 00 clr %i0
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002f08: 3b 00 80 7a sethi %hi(0x201e800), %i5
2002f0c: c2 07 63 38 ld [ %i5 + 0x338 ], %g1 ! 201eb38 <_impure_ptr>
status = error_flag & ~RTEMS_ERROR_MASK;
2002f10: 21 1c 00 00 sethi %hi(0x70000000), %l0
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002f14: d0 00 60 08 ld [ %g1 + 8 ], %o0
2002f18: 40 00 3a be call 2011a10 <fflush>
2002f1c: b6 10 20 00 clr %i3
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2002f20: 03 10 00 00 sethi %hi(0x40000000), %g1
2002f24: 80 8f 00 01 btst %i4, %g1
2002f28: 12 80 00 35 bne 2002ffc <rtems_verror+0x144>
2002f2c: a0 2f 00 10 andn %i4, %l0, %l0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2002f30: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
2002f34: 92 10 00 19 mov %i1, %o1
2002f38: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2002f3c: 40 00 4e db call 2016aa8 <vfprintf>
2002f40: 94 10 00 1a mov %i2, %o2
if (status)
2002f44: 80 a4 20 00 cmp %l0, 0
2002f48: 12 80 00 1f bne 2002fc4 <rtems_verror+0x10c>
2002f4c: b0 10 00 08 mov %o0, %i0
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
2002f50: 80 a6 e0 00 cmp %i3, 0
2002f54: 02 80 00 12 be 2002f9c <rtems_verror+0xe4>
2002f58: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
if ((local_errno > 0) && *strerror(local_errno))
2002f5c: 80 a6 e0 00 cmp %i3, 0
2002f60: 04 80 00 09 ble 2002f84 <rtems_verror+0xcc>
2002f64: 13 00 80 73 sethi %hi(0x201cc00), %o1
2002f68: 40 00 3f 2a call 2012c10 <strerror>
2002f6c: 90 10 00 1b mov %i3, %o0
2002f70: c2 4a 00 00 ldsb [ %o0 ], %g1
2002f74: 80 a0 60 00 cmp %g1, 0
2002f78: 12 80 00 25 bne 200300c <rtems_verror+0x154> <== ALWAYS TAKEN
2002f7c: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
2002f80: 13 00 80 73 sethi %hi(0x201cc00), %o1 <== NOT EXECUTED
2002f84: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2002f88: 92 12 62 28 or %o1, 0x228, %o1
2002f8c: 40 00 3b 9a call 2011df4 <fprintf>
2002f90: 94 10 00 1b mov %i3, %o2
2002f94: b0 06 00 08 add %i0, %o0, %i0
}
chars_written += fprintf(stderr, "\n");
2002f98: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
2002f9c: 13 00 80 73 sethi %hi(0x201cc00), %o1
2002fa0: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2002fa4: 40 00 3b 94 call 2011df4 <fprintf>
2002fa8: 92 12 60 b0 or %o1, 0xb0, %o1
(void) fflush(stderr);
2002fac: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
2002fb0: b0 02 00 18 add %o0, %i0, %i0
(void) fflush(stderr);
2002fb4: 40 00 3a 97 call 2011a10 <fflush>
2002fb8: d0 00 60 0c ld [ %g1 + 0xc ], %o0
return chars_written;
}
2002fbc: 81 c7 e0 08 ret
2002fc0: 81 e8 00 00 restore
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fc4: 03 00 80 7a sethi %hi(0x201e800), %g1
2002fc8: c2 00 63 38 ld [ %g1 + 0x338 ], %g1 ! 201eb38 <_impure_ptr>
const char *rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fcc: 92 10 00 10 mov %l0, %o1
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fd0: f8 00 60 0c ld [ %g1 + 0xc ], %i4
const char *rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fd4: 11 00 80 74 sethi %hi(0x201d000), %o0
2002fd8: 40 00 27 41 call 200ccdc <rtems_assoc_name_by_local>
2002fdc: 90 12 21 88 or %o0, 0x188, %o0 ! 201d188 <rtems_status_assoc>
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fe0: 13 00 80 73 sethi %hi(0x201cc00), %o1
const char *rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fe4: 94 10 00 08 mov %o0, %o2
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fe8: 92 12 62 08 or %o1, 0x208, %o1
2002fec: 40 00 3b 82 call 2011df4 <fprintf>
2002ff0: 90 10 00 1c mov %i4, %o0
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
2002ff4: 10 bf ff d7 b 2002f50 <rtems_verror+0x98>
2002ff8: b0 06 00 08 add %i0, %o0, %i0
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
2002ffc: 40 00 39 75 call 20115d0 <__errno>
2003000: 01 00 00 00 nop
2003004: 10 bf ff cb b 2002f30 <rtems_verror+0x78>
2003008: f6 02 00 00 ld [ %o0 ], %i3
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
200300c: 90 10 00 1b mov %i3, %o0
2003010: 40 00 3f 00 call 2012c10 <strerror>
2003014: f8 00 60 0c ld [ %g1 + 0xc ], %i4
2003018: 13 00 80 73 sethi %hi(0x201cc00), %o1
200301c: 94 10 00 08 mov %o0, %o2
2003020: 92 12 62 18 or %o1, 0x218, %o1
2003024: 40 00 3b 74 call 2011df4 <fprintf>
2003028: 90 10 00 1c mov %i4, %o0
200302c: 10 bf ff db b 2002f98 <rtems_verror+0xe0>
2003030: b0 06 00 08 add %i0, %o0, %i0
02003830 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
2003830: 9d e3 bf a0 save %sp, -96, %sp
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
2003834: 35 1f ff ff sethi %hi(0x7ffffc00), %i2
int sign = 0;
2003838: b6 10 20 00 clr %i3
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
200383c: b4 16 a3 ff or %i2, 0x3ff, %i2
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
2003840: b8 10 20 00 clr %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
2003844: 23 00 80 81 sethi %hi(0x2020400), %l1
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
2003848: 21 00 80 81 sethi %hi(0x2020400), %l0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
200384c: c2 06 20 04 ld [ %i0 + 4 ], %g1
2003850: 82 00 7f ff add %g1, -1, %g1
2003854: 80 a0 60 00 cmp %g1, 0
2003858: 06 80 00 24 bl 20038e8 <scanInt+0xb8> <== NEVER TAKEN
200385c: c2 26 20 04 st %g1, [ %i0 + 4 ]
2003860: c2 06 00 00 ld [ %i0 ], %g1
2003864: fa 08 40 00 ldub [ %g1 ], %i5
2003868: 82 00 60 01 inc %g1
if (c == ':')
200386c: 80 a7 60 3a cmp %i5, 0x3a
2003870: 02 80 00 25 be 2003904 <scanInt+0xd4>
2003874: c2 26 00 00 st %g1, [ %i0 ]
break;
if (sign == 0) {
2003878: 80 a6 e0 00 cmp %i3, 0
200387c: 12 80 00 06 bne 2003894 <scanInt+0x64>
2003880: c2 04 22 34 ld [ %l0 + 0x234 ], %g1
if (c == '-') {
2003884: 80 a7 60 2d cmp %i5, 0x2d
2003888: 02 80 00 32 be 2003950 <scanInt+0x120>
200388c: b6 10 20 01 mov 1, %i3
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
2003890: c2 04 22 34 ld [ %l0 + 0x234 ], %g1
2003894: 82 00 40 1d add %g1, %i5, %g1
2003898: c2 08 60 01 ldub [ %g1 + 1 ], %g1
200389c: 80 88 60 04 btst 4, %g1
20038a0: 02 80 00 2f be 200395c <scanInt+0x12c>
20038a4: 90 10 00 1a mov %i2, %o0
return 0;
d = c - '0';
if ((i > (limit / 10))
20038a8: 40 00 61 4e call 201bde0 <.udiv>
20038ac: 92 10 20 0a mov 0xa, %o1
20038b0: 80 a7 00 08 cmp %i4, %o0
20038b4: 18 80 00 2a bgu 200395c <scanInt+0x12c>
20038b8: 01 00 00 00 nop
|| ((i == (limit / 10)) && (d > (limit % 10))))
20038bc: 02 80 00 1c be 200392c <scanInt+0xfc>
20038c0: ba 07 7f d0 add %i5, -48, %i5
return 0;
i = i * 10 + d;
20038c4: 83 2f 20 01 sll %i4, 1, %g1
20038c8: b9 2f 20 03 sll %i4, 3, %i4
20038cc: b8 00 40 1c add %g1, %i4, %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20038d0: 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;
20038d4: b8 07 40 1c add %i5, %i4, %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20038d8: 82 00 7f ff add %g1, -1, %g1
20038dc: 80 a0 60 00 cmp %g1, 0
20038e0: 16 bf ff e0 bge 2003860 <scanInt+0x30> <== ALWAYS TAKEN
20038e4: c2 26 20 04 st %g1, [ %i0 + 4 ]
20038e8: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 <== NOT EXECUTED
20038ec: 40 00 41 21 call 2013d70 <__srget_r> <== NOT EXECUTED
20038f0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20038f4: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
if (c == ':')
20038f8: 80 a7 60 3a cmp %i5, 0x3a <== NOT EXECUTED
20038fc: 12 bf ff e0 bne 200387c <scanInt+0x4c> <== NOT EXECUTED
2003900: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
2003904: 80 a6 e0 00 cmp %i3, 0
2003908: 02 80 00 07 be 2003924 <scanInt+0xf4> <== NEVER TAKEN
200390c: b0 10 20 00 clr %i0
return 0;
*val = i * sign;
2003910: 90 10 00 1b mov %i3, %o0
2003914: 92 10 00 1c mov %i4, %o1
2003918: 40 00 60 f8 call 201bcf8 <.umul>
200391c: b0 10 20 01 mov 1, %i0
2003920: d0 26 40 00 st %o0, [ %i1 ]
return 1;
2003924: 81 c7 e0 08 ret
2003928: 81 e8 00 00 restore
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
200392c: 90 10 00 1a mov %i2, %o0
2003930: 40 00 61 d8 call 201c090 <.urem>
2003934: 92 10 20 0a mov 0xa, %o1
2003938: 80 a7 40 08 cmp %i5, %o0
200393c: 08 bf ff e3 bleu 20038c8 <scanInt+0x98> <== NEVER TAKEN
2003940: 83 2f 20 01 sll %i4, 1, %g1
return 0;
2003944: b0 10 20 00 clr %i0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
2003948: 81 c7 e0 08 ret
200394c: 81 e8 00 00 restore
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
2003950: b4 06 a0 01 inc %i2
continue;
2003954: 10 bf ff be b 200384c <scanInt+0x1c>
2003958: b6 10 3f ff mov -1, %i3
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
200395c: 81 c7 e0 08 ret
2003960: 91 e8 20 00 restore %g0, 0, %o0
02003964 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
2003964: 9d e3 bf a0 save %sp, -96, %sp
int c;
*name = *bufp;
2003968: c2 06 80 00 ld [ %i2 ], %g1
for (;;) {
c = getc(fp);
200396c: 3b 00 80 81 sethi %hi(0x2020400), %i5
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
int c;
*name = *bufp;
2003970: 10 80 00 19 b 20039d4 <scanString+0x70>
2003974: c2 26 40 00 st %g1, [ %i1 ]
for (;;) {
c = getc(fp);
2003978: c2 06 00 00 ld [ %i0 ], %g1
200397c: d0 08 40 00 ldub [ %g1 ], %o0
2003980: 82 00 60 01 inc %g1
if (c == ':') {
2003984: 80 a2 20 3a cmp %o0, 0x3a
2003988: 02 80 00 1e be 2003a00 <scanString+0x9c>
200398c: c2 26 00 00 st %g1, [ %i0 ]
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
2003990: 80 a2 20 0a cmp %o0, 0xa
2003994: 02 80 00 28 be 2003a34 <scanString+0xd0>
2003998: 80 a2 3f ff cmp %o0, -1
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
200399c: 02 80 00 2b be 2003a48 <scanString+0xe4>
20039a0: 01 00 00 00 nop
return 0;
if (*nleft < 2)
20039a4: c2 06 c0 00 ld [ %i3 ], %g1
20039a8: 80 a0 60 01 cmp %g1, 1
20039ac: 08 80 00 29 bleu 2003a50 <scanString+0xec>
20039b0: 01 00 00 00 nop
return 0;
**bufp = c;
20039b4: c2 06 80 00 ld [ %i2 ], %g1
20039b8: d0 28 40 00 stb %o0, [ %g1 ]
++(*bufp);
20039bc: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
20039c0: c2 06 c0 00 ld [ %i3 ], %g1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
20039c4: 84 00 a0 01 inc %g2
20039c8: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
20039cc: 82 00 7f ff add %g1, -1, %g1
20039d0: c2 26 c0 00 st %g1, [ %i3 ]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
20039d4: c2 06 20 04 ld [ %i0 + 4 ], %g1
20039d8: 82 00 7f ff add %g1, -1, %g1
20039dc: 80 a0 60 00 cmp %g1, 0
20039e0: 16 bf ff e6 bge 2003978 <scanString+0x14>
20039e4: c2 26 20 04 st %g1, [ %i0 + 4 ]
20039e8: d0 07 62 38 ld [ %i5 + 0x238 ], %o0
20039ec: 40 00 40 e1 call 2013d70 <__srget_r>
20039f0: 92 10 00 18 mov %i0, %o1
if (c == ':') {
20039f4: 80 a2 20 3a cmp %o0, 0x3a
20039f8: 12 bf ff e7 bne 2003994 <scanString+0x30> <== ALWAYS TAKEN
20039fc: 80 a2 20 0a cmp %o0, 0xa
if (nlFlag)
2003a00: 80 a7 20 00 cmp %i4, 0
2003a04: 12 80 00 0f bne 2003a40 <scanString+0xdc>
2003a08: b0 10 20 00 clr %i0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
2003a0c: c2 06 80 00 ld [ %i2 ], %g1
2003a10: c0 28 40 00 clrb [ %g1 ]
++(*bufp);
2003a14: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
2003a18: c2 06 c0 00 ld [ %i3 ], %g1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
2003a1c: 84 00 a0 01 inc %g2
2003a20: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
2003a24: 82 00 7f ff add %g1, -1, %g1
2003a28: c2 26 c0 00 st %g1, [ %i3 ]
return 1;
2003a2c: 81 c7 e0 08 ret
2003a30: 91 e8 20 01 restore %g0, 1, %o0
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
2003a34: 80 a7 20 00 cmp %i4, 0
2003a38: 12 bf ff f5 bne 2003a0c <scanString+0xa8>
2003a3c: b0 10 20 00 clr %i0
2003a40: 81 c7 e0 08 ret
2003a44: 81 e8 00 00 restore
return 0;
break;
}
if (c == EOF)
return 0;
2003a48: 81 c7 e0 08 ret
2003a4c: 91 e8 20 00 restore %g0, 0, %o0
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
2003a50: 81 c7 e0 08 ret
2003a54: 91 e8 20 00 restore %g0, 0, %o0
02003a58 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
2003a58: 9d e3 bf 98 save %sp, -104, %sp
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2003a5c: 98 10 20 00 clr %o4
2003a60: 90 10 00 18 mov %i0, %o0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
2003a64: ba 10 00 18 mov %i0, %i5
2003a68: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003a6c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2003a70: 92 10 00 19 mov %i1, %o1
2003a74: 94 07 a0 4c add %fp, 0x4c, %o2
2003a78: 96 07 a0 50 add %fp, 0x50, %o3
2003a7c: 7f ff ff ba call 2003964 <scanString>
2003a80: b0 10 20 00 clr %i0
2003a84: 80 a2 20 00 cmp %o0, 0
2003a88: 12 80 00 04 bne 2003a98 <scangr+0x40>
2003a8c: 90 10 00 1d mov %i5, %o0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
2003a90: 81 c7 e0 08 ret
2003a94: 81 e8 00 00 restore
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
2003a98: 92 06 60 04 add %i1, 4, %o1
2003a9c: 94 07 a0 4c add %fp, 0x4c, %o2
2003aa0: 96 07 a0 50 add %fp, 0x50, %o3
2003aa4: 7f ff ff b0 call 2003964 <scanString>
2003aa8: 98 10 20 00 clr %o4
2003aac: 80 a2 20 00 cmp %o0, 0
2003ab0: 02 bf ff f8 be 2003a90 <scangr+0x38> <== NEVER TAKEN
2003ab4: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &grgid)
2003ab8: 7f ff ff 5e call 2003830 <scanInt>
2003abc: 92 07 bf f8 add %fp, -8, %o1
2003ac0: 80 a2 20 00 cmp %o0, 0
2003ac4: 02 bf ff f3 be 2003a90 <scangr+0x38> <== NEVER TAKEN
2003ac8: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
2003acc: 92 07 bf fc add %fp, -4, %o1
2003ad0: 94 07 a0 4c add %fp, 0x4c, %o2
2003ad4: 96 07 a0 50 add %fp, 0x50, %o3
2003ad8: 7f ff ff a3 call 2003964 <scanString>
2003adc: 98 10 20 01 mov 1, %o4
2003ae0: 80 a2 20 00 cmp %o0, 0
2003ae4: 02 bf ff eb be 2003a90 <scangr+0x38> <== NEVER TAKEN
2003ae8: c2 07 bf f8 ld [ %fp + -8 ], %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003aec: fa 07 bf fc ld [ %fp + -4 ], %i5
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
2003af0: c2 36 60 08 sth %g1, [ %i1 + 8 ]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003af4: c6 0f 40 00 ldub [ %i5 ], %g3
2003af8: 83 28 e0 18 sll %g3, 0x18, %g1
2003afc: 80 a0 60 00 cmp %g1, 0
2003b00: 02 80 00 10 be 2003b40 <scangr+0xe8> <== NEVER TAKEN
2003b04: 88 10 20 17 mov 0x17, %g4
2003b08: 84 10 00 1d mov %i5, %g2
2003b0c: 88 10 20 01 mov 1, %g4
if(*cp == ',')
memcount++;
2003b10: 84 00 a0 01 inc %g2
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003b14: c6 08 80 00 ldub [ %g2 ], %g3
if(*cp == ',')
2003b18: 83 38 60 18 sra %g1, 0x18, %g1
memcount++;
2003b1c: 82 18 60 2c xor %g1, 0x2c, %g1
2003b20: 80 a0 00 01 cmp %g0, %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003b24: 83 28 e0 18 sll %g3, 0x18, %g1
if(*cp == ',')
memcount++;
2003b28: 88 61 3f ff subx %g4, -1, %g4
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003b2c: 80 a0 60 00 cmp %g1, 0
2003b30: 32 bf ff f9 bne,a 2003b14 <scangr+0xbc>
2003b34: 84 00 a0 01 inc %g2
2003b38: 89 29 20 02 sll %g4, 2, %g4
2003b3c: 88 01 20 13 add %g4, 0x13, %g4
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
2003b40: c2 07 a0 50 ld [ %fp + 0x50 ], %g1
2003b44: 80 a0 40 04 cmp %g1, %g4
2003b48: 0a bf ff d2 bcs 2003a90 <scangr+0x38> <== NEVER TAKEN
2003b4c: b0 10 20 00 clr %i0
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
2003b50: c2 07 a0 4c ld [ %fp + 0x4c ], %g1
2003b54: 82 00 60 0f add %g1, 0xf, %g1
2003b58: 82 08 7f f0 and %g1, -16, %g1
2003b5c: c2 26 60 0c st %g1, [ %i1 + 0xc ]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
2003b60: fa 20 40 00 st %i5, [ %g1 ]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003b64: c2 07 bf fc ld [ %fp + -4 ], %g1
2003b68: c4 08 40 00 ldub [ %g1 ], %g2
2003b6c: 85 28 a0 18 sll %g2, 0x18, %g2
2003b70: 80 a0 a0 00 cmp %g2, 0
2003b74: 02 80 00 15 be 2003bc8 <scangr+0x170> <== NEVER TAKEN
2003b78: 86 10 20 04 mov 4, %g3
}
/*
* Extract a single group record from the database
*/
static int scangr(
2003b7c: 82 00 60 01 inc %g1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003b80: 10 80 00 08 b 2003ba0 <scangr+0x148>
2003b84: 86 10 20 01 mov 1, %g3
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
2003b88: 82 00 60 01 inc %g1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2003b8c: c4 08 7f ff ldub [ %g1 + -1 ], %g2
2003b90: 85 28 a0 18 sll %g2, 0x18, %g2
2003b94: 80 a0 a0 00 cmp %g2, 0
2003b98: 22 80 00 0c be,a 2003bc8 <scangr+0x170>
2003b9c: 87 28 e0 02 sll %g3, 2, %g3
if(*cp == ',') {
2003ba0: 85 38 a0 18 sra %g2, 0x18, %g2
2003ba4: 80 a0 a0 2c cmp %g2, 0x2c
2003ba8: 32 bf ff f9 bne,a 2003b8c <scangr+0x134>
2003bac: 82 00 60 01 inc %g1
*cp = '\0';
2003bb0: c0 28 7f ff clrb [ %g1 + -1 ]
grp->gr_mem[memcount++] = cp + 1;
2003bb4: c8 06 60 0c ld [ %i1 + 0xc ], %g4
2003bb8: 85 28 e0 02 sll %g3, 2, %g2
2003bbc: 86 00 e0 01 inc %g3
2003bc0: 10 bf ff f2 b 2003b88 <scangr+0x130>
2003bc4: c2 21 00 02 st %g1, [ %g4 + %g2 ]
}
}
grp->gr_mem[memcount] = NULL;
2003bc8: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2003bcc: c0 20 40 03 clr [ %g1 + %g3 ]
return 1;
}
2003bd0: 81 c7 e0 08 ret
2003bd4: 91 e8 20 01 restore %g0, 1, %o0
02003bd8 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
2003bd8: 9d e3 bf 98 save %sp, -104, %sp
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003bdc: 98 10 20 00 clr %o4
2003be0: 90 10 00 18 mov %i0, %o0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
2003be4: ba 10 00 18 mov %i0, %i5
2003be8: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2003bec: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2003bf0: 92 10 00 19 mov %i1, %o1
2003bf4: 94 07 a0 4c add %fp, 0x4c, %o2
2003bf8: 96 07 a0 50 add %fp, 0x50, %o3
2003bfc: 7f ff ff 5a call 2003964 <scanString>
2003c00: b0 10 20 00 clr %i0
2003c04: 80 a2 20 00 cmp %o0, 0
2003c08: 12 80 00 04 bne 2003c18 <scanpw+0x40>
2003c0c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
2003c10: 81 c7 e0 08 ret
2003c14: 81 e8 00 00 restore
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
2003c18: 92 06 60 04 add %i1, 4, %o1
2003c1c: 94 07 a0 4c add %fp, 0x4c, %o2
2003c20: 96 07 a0 50 add %fp, 0x50, %o3
2003c24: 7f ff ff 50 call 2003964 <scanString>
2003c28: 98 10 20 00 clr %o4
2003c2c: 80 a2 20 00 cmp %o0, 0
2003c30: 02 bf ff f8 be 2003c10 <scanpw+0x38> <== NEVER TAKEN
2003c34: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &pwuid)
2003c38: 7f ff fe fe call 2003830 <scanInt>
2003c3c: 92 07 bf f8 add %fp, -8, %o1
2003c40: 80 a2 20 00 cmp %o0, 0
2003c44: 02 bf ff f3 be 2003c10 <scanpw+0x38>
2003c48: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &pwgid)
2003c4c: 7f ff fe f9 call 2003830 <scanInt>
2003c50: 92 07 bf fc add %fp, -4, %o1
2003c54: 80 a2 20 00 cmp %o0, 0
2003c58: 02 bf ff ee be 2003c10 <scanpw+0x38>
2003c5c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
2003c60: 92 06 60 0c add %i1, 0xc, %o1
2003c64: 94 07 a0 4c add %fp, 0x4c, %o2
2003c68: 96 07 a0 50 add %fp, 0x50, %o3
2003c6c: 7f ff ff 3e call 2003964 <scanString>
2003c70: 98 10 20 00 clr %o4
2003c74: 80 a2 20 00 cmp %o0, 0
2003c78: 02 bf ff e6 be 2003c10 <scanpw+0x38> <== NEVER TAKEN
2003c7c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
2003c80: 92 06 60 10 add %i1, 0x10, %o1
2003c84: 94 07 a0 4c add %fp, 0x4c, %o2
2003c88: 96 07 a0 50 add %fp, 0x50, %o3
2003c8c: 7f ff ff 36 call 2003964 <scanString>
2003c90: 98 10 20 00 clr %o4
2003c94: 80 a2 20 00 cmp %o0, 0
2003c98: 02 bf ff de be 2003c10 <scanpw+0x38> <== NEVER TAKEN
2003c9c: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
2003ca0: 92 06 60 14 add %i1, 0x14, %o1
2003ca4: 94 07 a0 4c add %fp, 0x4c, %o2
2003ca8: 96 07 a0 50 add %fp, 0x50, %o3
2003cac: 7f ff ff 2e call 2003964 <scanString>
2003cb0: 98 10 20 00 clr %o4
2003cb4: 80 a2 20 00 cmp %o0, 0
2003cb8: 02 bf ff d6 be 2003c10 <scanpw+0x38> <== NEVER TAKEN
2003cbc: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
2003cc0: 92 06 60 18 add %i1, 0x18, %o1
2003cc4: 94 07 a0 4c add %fp, 0x4c, %o2
2003cc8: 96 07 a0 50 add %fp, 0x50, %o3
2003ccc: 7f ff ff 26 call 2003964 <scanString>
2003cd0: 98 10 20 01 mov 1, %o4
2003cd4: 80 a2 20 00 cmp %o0, 0
2003cd8: 02 bf ff ce be 2003c10 <scanpw+0x38>
2003cdc: c2 07 bf f8 ld [ %fp + -8 ], %g1
return 0;
pwd->pw_uid = pwuid;
2003ce0: c2 36 60 08 sth %g1, [ %i1 + 8 ]
pwd->pw_gid = pwgid;
2003ce4: c2 07 bf fc ld [ %fp + -4 ], %g1
2003ce8: c2 36 60 0a sth %g1, [ %i1 + 0xa ]
return 1;
}
2003cec: 81 c7 e0 08 ret
2003cf0: 91 e8 20 01 restore %g0, 1, %o0
02007a08 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
2007a08: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2007a0c: 80 a6 20 04 cmp %i0, 4
2007a10: 08 80 00 08 bleu 2007a30 <sched_get_priority_max+0x28>
2007a14: 82 10 20 01 mov 1, %g1
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2007a18: 40 00 29 f7 call 20121f4 <__errno>
2007a1c: b0 10 3f ff mov -1, %i0
2007a20: 82 10 20 16 mov 0x16, %g1
2007a24: c2 22 00 00 st %g1, [ %o0 ]
2007a28: 81 c7 e0 08 ret
2007a2c: 81 e8 00 00 restore
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
2007a30: b1 28 40 18 sll %g1, %i0, %i0
2007a34: 80 8e 20 17 btst 0x17, %i0
2007a38: 02 bf ff f8 be 2007a18 <sched_get_priority_max+0x10> <== NEVER TAKEN
2007a3c: 03 00 80 8d sethi %hi(0x2023400), %g1
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
2007a40: f0 08 61 40 ldub [ %g1 + 0x140 ], %i0 ! 2023540 <rtems_maximum_priority>
}
2007a44: 81 c7 e0 08 ret
2007a48: 91 ee 3f ff restore %i0, -1, %o0
02007a4c <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
2007a4c: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2007a50: 80 a6 20 04 cmp %i0, 4
2007a54: 08 80 00 09 bleu 2007a78 <sched_get_priority_min+0x2c>
2007a58: 84 10 20 01 mov 1, %g2
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2007a5c: 40 00 29 e6 call 20121f4 <__errno>
2007a60: 01 00 00 00 nop
2007a64: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
2007a68: 84 10 20 16 mov 0x16, %g2
2007a6c: c4 22 00 00 st %g2, [ %o0 ]
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
2007a70: 81 c7 e0 08 ret
2007a74: 91 e8 00 01 restore %g0, %g1, %o0
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
2007a78: b1 28 80 18 sll %g2, %i0, %i0
2007a7c: 80 8e 20 17 btst 0x17, %i0
2007a80: 02 bf ff f7 be 2007a5c <sched_get_priority_min+0x10> <== NEVER TAKEN
2007a84: 82 10 20 01 mov 1, %g1
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
2007a88: 81 c7 e0 08 ret
2007a8c: 91 e8 00 01 restore %g0, %g1, %o0
02007a90 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
2007a90: 9d e3 bf a0 save %sp, -96, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2007a94: 80 a6 20 00 cmp %i0, 0
2007a98: 12 80 00 0a bne 2007ac0 <sched_rr_get_interval+0x30> <== ALWAYS TAKEN
2007a9c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
2007aa0: 02 80 00 13 be 2007aec <sched_rr_get_interval+0x5c>
2007aa4: 03 00 80 90 sethi %hi(0x2024000), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
2007aa8: d0 00 61 b4 ld [ %g1 + 0x1b4 ], %o0 ! 20241b4 <_Thread_Ticks_per_timeslice>
2007aac: 92 10 00 19 mov %i1, %o1
2007ab0: 40 00 0f 9e call 200b928 <_Timespec_From_ticks>
2007ab4: b0 10 20 00 clr %i0
return 0;
}
2007ab8: 81 c7 e0 08 ret
2007abc: 81 e8 00 00 restore
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2007ac0: 7f ff ef ae call 2003978 <getpid>
2007ac4: 01 00 00 00 nop
2007ac8: 80 a2 00 18 cmp %o0, %i0
2007acc: 02 bf ff f5 be 2007aa0 <sched_rr_get_interval+0x10>
2007ad0: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
2007ad4: 40 00 29 c8 call 20121f4 <__errno>
2007ad8: b0 10 3f ff mov -1, %i0
2007adc: 82 10 20 03 mov 3, %g1
2007ae0: c2 22 00 00 st %g1, [ %o0 ]
2007ae4: 81 c7 e0 08 ret
2007ae8: 81 e8 00 00 restore
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
2007aec: 40 00 29 c2 call 20121f4 <__errno>
2007af0: b0 10 3f ff mov -1, %i0
2007af4: 82 10 20 16 mov 0x16, %g1
2007af8: c2 22 00 00 st %g1, [ %o0 ]
2007afc: 81 c7 e0 08 ret
2007b00: 81 e8 00 00 restore
0200a44c <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
200a44c: 9d e3 bf 90 save %sp, -112, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200a450: 03 00 80 a1 sethi %hi(0x2028400), %g1
200a454: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 2028780 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
200a458: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200a45c: 84 00 a0 01 inc %g2
200a460: c4 20 63 80 st %g2, [ %g1 + 0x380 ]
return _Thread_Dispatch_disable_level;
200a464: c2 00 63 80 ld [ %g1 + 0x380 ], %g1
200a468: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200a46c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200a470: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
200a474: b8 8e 62 00 andcc %i1, 0x200, %i4
200a478: 12 80 00 25 bne 200a50c <sem_open+0xc0>
200a47c: ba 10 20 00 clr %i5
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
200a480: 90 10 00 18 mov %i0, %o0
200a484: 40 00 1e 8b call 2011eb0 <_POSIX_Semaphore_Name_to_id>
200a488: 92 07 bf f4 add %fp, -12, %o1
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
200a48c: b6 92 20 00 orcc %o0, 0, %i3
200a490: 22 80 00 0e be,a 200a4c8 <sem_open+0x7c>
200a494: b2 0e 6a 00 and %i1, 0xa00, %i1
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
200a498: 80 a6 e0 02 cmp %i3, 2
200a49c: 12 80 00 04 bne 200a4ac <sem_open+0x60> <== NEVER TAKEN
200a4a0: 80 a7 20 00 cmp %i4, 0
200a4a4: 12 80 00 1e bne 200a51c <sem_open+0xd0>
200a4a8: 94 10 00 1d mov %i5, %o2
_Thread_Enable_dispatch();
200a4ac: 40 00 0d 08 call 200d8cc <_Thread_Enable_dispatch>
200a4b0: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
200a4b4: 40 00 2d 89 call 2015ad8 <__errno>
200a4b8: 01 00 00 00 nop
200a4bc: f6 22 00 00 st %i3, [ %o0 ]
200a4c0: 81 c7 e0 08 ret
200a4c4: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
200a4c8: 80 a6 6a 00 cmp %i1, 0xa00
200a4cc: 02 80 00 20 be 200a54c <sem_open+0x100>
200a4d0: d2 07 bf f4 ld [ %fp + -12 ], %o1
200a4d4: 94 07 bf fc add %fp, -4, %o2
200a4d8: 11 00 80 a2 sethi %hi(0x2028800), %o0
200a4dc: 40 00 08 fb call 200c8c8 <_Objects_Get>
200a4e0: 90 12 22 40 or %o0, 0x240, %o0 ! 2028a40 <_POSIX_Semaphore_Information>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
200a4e4: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
200a4e8: d0 27 bf f8 st %o0, [ %fp + -8 ]
the_semaphore->open_count += 1;
200a4ec: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
200a4f0: 40 00 0c f7 call 200d8cc <_Thread_Enable_dispatch>
200a4f4: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
_Thread_Enable_dispatch();
200a4f8: 40 00 0c f5 call 200d8cc <_Thread_Enable_dispatch>
200a4fc: 01 00 00 00 nop
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
200a500: f0 07 bf f8 ld [ %fp + -8 ], %i0
}
200a504: 81 c7 e0 08 ret
200a508: 91 ee 20 08 restore %i0, 8, %o0
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
200a50c: 82 07 a0 54 add %fp, 0x54, %g1
200a510: fa 07 a0 50 ld [ %fp + 0x50 ], %i5
200a514: 10 bf ff db b 200a480 <sem_open+0x34>
200a518: c2 27 bf f0 st %g1, [ %fp + -16 ]
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
200a51c: 92 10 20 00 clr %o1
200a520: 96 07 bf f8 add %fp, -8, %o3
200a524: 40 00 1e 07 call 2011d40 <_POSIX_Semaphore_Create_support>
200a528: 90 10 00 18 mov %i0, %o0
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
200a52c: 40 00 0c e8 call 200d8cc <_Thread_Enable_dispatch>
200a530: ba 10 00 08 mov %o0, %i5
if ( status == -1 )
200a534: 80 a7 7f ff cmp %i5, -1
200a538: 02 bf ff e2 be 200a4c0 <sem_open+0x74>
200a53c: b0 10 3f ff mov -1, %i0
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
200a540: f0 07 bf f8 ld [ %fp + -8 ], %i0
200a544: 81 c7 e0 08 ret
200a548: 91 ee 20 08 restore %i0, 8, %o0
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
200a54c: 40 00 0c e0 call 200d8cc <_Thread_Enable_dispatch>
200a550: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
200a554: 40 00 2d 61 call 2015ad8 <__errno>
200a558: 01 00 00 00 nop
200a55c: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
200a560: c2 22 00 00 st %g1, [ %o0 ]
200a564: 81 c7 e0 08 ret
200a568: 81 e8 00 00 restore
0200a5c8 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
200a5c8: 9d e3 bf 98 save %sp, -104, %sp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
200a5cc: 90 10 00 19 mov %i1, %o0
200a5d0: 40 00 1b 63 call 201135c <_POSIX_Absolute_timeout_to_ticks>
200a5d4: 92 07 bf fc add %fp, -4, %o1
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
200a5d8: d4 07 bf fc ld [ %fp + -4 ], %o2
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
200a5dc: 80 a2 20 03 cmp %o0, 3
200a5e0: 02 80 00 06 be 200a5f8 <sem_timedwait+0x30> <== ALWAYS TAKEN
200a5e4: 90 10 00 18 mov %i0, %o0
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
200a5e8: 40 00 1e 54 call 2011f38 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
200a5ec: 92 10 20 00 clr %o1 <== NOT EXECUTED
200a5f0: 81 c7 e0 08 ret <== NOT EXECUTED
200a5f4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
200a5f8: 40 00 1e 50 call 2011f38 <_POSIX_Semaphore_Wait_support>
200a5fc: 92 10 20 01 mov 1, %o1
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
200a600: 81 c7 e0 08 ret
200a604: 91 e8 00 08 restore %g0, %o0, %o0
020042b4 <setgrent>:
void setgrent(void)
{
20042b4: 9d e3 bf a0 save %sp, -96, %sp
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
20042b8: 03 00 80 82 sethi %hi(0x2020800), %g1
20042bc: c2 48 63 90 ldsb [ %g1 + 0x390 ], %g1 ! 2020b90 <etc_passwd_initted.6596>
20042c0: 80 a0 60 00 cmp %g1, 0
20042c4: 12 80 00 04 bne 20042d4 <setgrent+0x20> <== ALWAYS TAKEN
20042c8: 3b 00 80 83 sethi %hi(0x2020c00), %i5
20042cc: 7f ff fe 8a call 2003cf4 <init_etc_passwd_group.part.0> <== NOT EXECUTED
20042d0: 01 00 00 00 nop <== NOT EXECUTED
void setgrent(void)
{
init_etc_passwd_group();
if (group_fp != NULL)
20042d4: d0 07 61 58 ld [ %i5 + 0x158 ], %o0
20042d8: 80 a2 20 00 cmp %o0, 0
20042dc: 22 80 00 05 be,a 20042f0 <setgrent+0x3c>
20042e0: 11 00 80 7b sethi %hi(0x201ec00), %o0
fclose(group_fp);
20042e4: 40 00 38 c6 call 20125fc <fclose>
20042e8: 01 00 00 00 nop
group_fp = fopen("/etc/group", "r");
20042ec: 11 00 80 7b sethi %hi(0x201ec00), %o0
20042f0: 13 00 80 7d sethi %hi(0x201f400), %o1
20042f4: 90 12 22 08 or %o0, 0x208, %o0
20042f8: 40 00 3a a0 call 2012d78 <fopen>
20042fc: 92 12 63 f8 or %o1, 0x3f8, %o1
2004300: d0 27 61 58 st %o0, [ %i5 + 0x158 ]
}
2004304: 81 c7 e0 08 ret
2004308: 81 e8 00 00 restore
020079cc <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
20079cc: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
if ( oact )
20079d0: 80 a6 a0 00 cmp %i2, 0
20079d4: 02 80 00 0d be 2007a08 <sigaction+0x3c>
20079d8: 87 2e 20 02 sll %i0, 2, %g3
*oact = _POSIX_signals_Vectors[ sig ];
20079dc: 05 00 80 8c sethi %hi(0x2023000), %g2
20079e0: 83 2e 20 04 sll %i0, 4, %g1
20079e4: 84 10 a0 20 or %g2, 0x20, %g2
20079e8: 82 20 40 03 sub %g1, %g3, %g1
20079ec: c6 00 80 01 ld [ %g2 + %g1 ], %g3
20079f0: 82 00 80 01 add %g2, %g1, %g1
20079f4: c6 26 80 00 st %g3, [ %i2 ]
20079f8: c4 00 60 04 ld [ %g1 + 4 ], %g2
20079fc: c4 26 a0 04 st %g2, [ %i2 + 4 ]
2007a00: c2 00 60 08 ld [ %g1 + 8 ], %g1
2007a04: c2 26 a0 08 st %g1, [ %i2 + 8 ]
if ( !sig )
2007a08: 80 a6 20 00 cmp %i0, 0
2007a0c: 02 80 00 33 be 2007ad8 <sigaction+0x10c>
2007a10: 01 00 00 00 nop
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
2007a14: 82 06 3f ff add %i0, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2007a18: 80 a0 60 1f cmp %g1, 0x1f
2007a1c: 18 80 00 2f bgu 2007ad8 <sigaction+0x10c>
2007a20: 80 a6 20 09 cmp %i0, 9
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
2007a24: 02 80 00 2d be 2007ad8 <sigaction+0x10c>
2007a28: 80 a6 60 00 cmp %i1, 0
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
2007a2c: 02 80 00 1a be 2007a94 <sigaction+0xc8> <== NEVER TAKEN
2007a30: 82 10 20 00 clr %g1
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
2007a34: 7f ff eb b4 call 2002904 <sparc_disable_interrupts>
2007a38: 01 00 00 00 nop
2007a3c: b4 10 00 08 mov %o0, %i2
if ( act->sa_handler == SIG_DFL ) {
2007a40: c2 06 60 08 ld [ %i1 + 8 ], %g1
2007a44: 80 a0 60 00 cmp %g1, 0
2007a48: 02 80 00 15 be 2007a9c <sigaction+0xd0>
2007a4c: 83 2e 20 02 sll %i0, 2, %g1
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
2007a50: 40 00 1c 63 call 200ebdc <_POSIX_signals_Clear_process_signals>
2007a54: 90 10 00 18 mov %i0, %o0
_POSIX_signals_Vectors[ sig ] = *act;
2007a58: c4 06 40 00 ld [ %i1 ], %g2
2007a5c: 87 2e 20 02 sll %i0, 2, %g3
2007a60: 03 00 80 8c sethi %hi(0x2023000), %g1
2007a64: b1 2e 20 04 sll %i0, 4, %i0
2007a68: 82 10 60 20 or %g1, 0x20, %g1
2007a6c: b0 26 00 03 sub %i0, %g3, %i0
2007a70: c4 20 40 18 st %g2, [ %g1 + %i0 ]
2007a74: c4 06 60 04 ld [ %i1 + 4 ], %g2
2007a78: b0 00 40 18 add %g1, %i0, %i0
2007a7c: c4 26 20 04 st %g2, [ %i0 + 4 ]
2007a80: c2 06 60 08 ld [ %i1 + 8 ], %g1
2007a84: c2 26 20 08 st %g1, [ %i0 + 8 ]
}
_ISR_Enable( level );
2007a88: 7f ff eb a3 call 2002914 <sparc_enable_interrupts>
2007a8c: 90 10 00 1a mov %i2, %o0
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
2007a90: 82 10 20 00 clr %g1
}
2007a94: 81 c7 e0 08 ret
2007a98: 91 e8 00 01 restore %g0, %g1, %o0
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
2007a9c: b1 2e 20 04 sll %i0, 4, %i0
2007aa0: b0 26 00 01 sub %i0, %g1, %i0
2007aa4: 03 00 80 82 sethi %hi(0x2020800), %g1
2007aa8: 82 10 63 d4 or %g1, 0x3d4, %g1 ! 2020bd4 <_POSIX_signals_Default_vectors>
2007aac: c8 00 40 18 ld [ %g1 + %i0 ], %g4
2007ab0: 82 00 40 18 add %g1, %i0, %g1
2007ab4: c6 00 60 04 ld [ %g1 + 4 ], %g3
2007ab8: c4 00 60 08 ld [ %g1 + 8 ], %g2
2007abc: 03 00 80 8c sethi %hi(0x2023000), %g1
2007ac0: 82 10 60 20 or %g1, 0x20, %g1 ! 2023020 <_POSIX_signals_Vectors>
2007ac4: c8 20 40 18 st %g4, [ %g1 + %i0 ]
2007ac8: b0 00 40 18 add %g1, %i0, %i0
2007acc: c6 26 20 04 st %g3, [ %i0 + 4 ]
2007ad0: 10 bf ff ee b 2007a88 <sigaction+0xbc>
2007ad4: c4 26 20 08 st %g2, [ %i0 + 8 ]
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
2007ad8: 40 00 2b 3f call 20127d4 <__errno>
2007adc: 01 00 00 00 nop
2007ae0: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
2007ae4: 82 10 3f ff mov -1, %g1
2007ae8: 10 bf ff eb b 2007a94 <sigaction+0xc8>
2007aec: c4 22 00 00 st %g2, [ %o0 ]
02007f60 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
2007f60: 9d e3 bf 90 save %sp, -112, %sp
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
2007f64: ba 96 20 00 orcc %i0, 0, %i5
2007f68: 02 80 00 aa be 2008210 <sigtimedwait+0x2b0>
2007f6c: 80 a6 a0 00 cmp %i2, 0
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
2007f70: 02 80 00 6f be 200812c <sigtimedwait+0x1cc>
2007f74: 80 a6 60 00 cmp %i1, 0
if ( !_Timespec_Is_valid( timeout ) )
2007f78: 40 00 0f fc call 200bf68 <_Timespec_Is_valid>
2007f7c: 90 10 00 1a mov %i2, %o0
2007f80: 80 8a 20 ff btst 0xff, %o0
2007f84: 02 80 00 a3 be 2008210 <sigtimedwait+0x2b0>
2007f88: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
2007f8c: 40 00 10 08 call 200bfac <_Timespec_To_ticks>
2007f90: 90 10 00 1a mov %i2, %o0
if ( !interval )
2007f94: a0 92 20 00 orcc %o0, 0, %l0
2007f98: 02 80 00 9e be 2008210 <sigtimedwait+0x2b0> <== NEVER TAKEN
2007f9c: 80 a6 60 00 cmp %i1, 0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
2007fa0: 02 80 00 66 be 2008138 <sigtimedwait+0x1d8> <== NEVER TAKEN
2007fa4: 39 00 80 8d sethi %hi(0x2023400), %i4
the_thread = _Thread_Executing;
2007fa8: 39 00 80 8d sethi %hi(0x2023400), %i4
2007fac: b8 17 21 70 or %i4, 0x170, %i4 ! 2023570 <_Per_CPU_Information>
2007fb0: f0 07 20 0c ld [ %i4 + 0xc ], %i0
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
2007fb4: 7f ff eb 2f call 2002c70 <sparc_disable_interrupts>
2007fb8: f4 06 21 5c ld [ %i0 + 0x15c ], %i2
2007fbc: b6 10 00 08 mov %o0, %i3
if ( *set & api->signals_pending ) {
2007fc0: c4 07 40 00 ld [ %i5 ], %g2
2007fc4: c2 06 a0 d4 ld [ %i2 + 0xd4 ], %g1
2007fc8: 80 88 80 01 btst %g2, %g1
2007fcc: 12 80 00 67 bne 2008168 <sigtimedwait+0x208>
2007fd0: 92 10 20 1b mov 0x1b, %o1
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
2007fd4: 03 00 80 8d sethi %hi(0x2023400), %g1
2007fd8: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 20237c4 <_POSIX_signals_Pending>
2007fdc: 80 88 80 01 btst %g2, %g1
2007fe0: 32 80 00 30 bne,a 20080a0 <sigtimedwait+0x140>
2007fe4: b0 10 20 1b mov 0x1b, %i0
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007fe8: 03 00 80 8c sethi %hi(0x2023000), %g1
2007fec: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 ! 2023030 <_Thread_Dispatch_disable_level>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
2007ff0: 86 10 3f ff mov -1, %g3
2007ff4: c6 26 40 00 st %g3, [ %i1 ]
2007ff8: 84 00 a0 01 inc %g2
2007ffc: c4 20 60 30 st %g2, [ %g1 + 0x30 ]
return _Thread_Dispatch_disable_level;
2008000: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
2008004: 82 10 20 04 mov 4, %g1
2008008: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_thread->Wait.option = *set;
200800c: c2 07 40 00 ld [ %i5 ], %g1
the_thread->Wait.return_argument = the_info;
2008010: f2 26 20 28 st %i1, [ %i0 + 0x28 ]
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
2008014: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2008018: b6 10 20 01 mov 1, %i3
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
200801c: 23 00 80 8d sethi %hi(0x2023400), %l1
2008020: a2 14 63 5c or %l1, 0x35c, %l1 ! 202375c <_POSIX_signals_Wait_queue>
2008024: e2 26 20 44 st %l1, [ %i0 + 0x44 ]
2008028: f6 24 60 30 st %i3, [ %l1 + 0x30 ]
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
200802c: 7f ff eb 15 call 2002c80 <sparc_enable_interrupts>
2008030: 01 00 00 00 nop
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
2008034: 90 10 00 11 mov %l1, %o0
2008038: 92 10 00 10 mov %l0, %o1
200803c: 15 00 80 2f sethi %hi(0x200bc00), %o2
2008040: 40 00 0e 45 call 200b954 <_Thread_queue_Enqueue_with_handler>
2008044: 94 12 a1 34 or %o2, 0x134, %o2 ! 200bd34 <_Thread_queue_Timeout>
_Thread_Enable_dispatch();
2008048: 40 00 0c f8 call 200b428 <_Thread_Enable_dispatch>
200804c: 01 00 00 00 nop
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
2008050: d2 06 40 00 ld [ %i1 ], %o1
2008054: 90 10 00 1a mov %i2, %o0
2008058: 94 10 00 19 mov %i1, %o2
200805c: 96 10 20 00 clr %o3
2008060: 40 00 1d 44 call 200f570 <_POSIX_signals_Clear_signals>
2008064: 98 10 20 00 clr %o4
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
2008068: c2 07 20 0c ld [ %i4 + 0xc ], %g1
200806c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008070: 80 a0 60 04 cmp %g1, 4
2008074: 12 80 00 60 bne 20081f4 <sigtimedwait+0x294>
2008078: 01 00 00 00 nop
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
200807c: f0 06 40 00 ld [ %i1 ], %i0
2008080: c2 07 40 00 ld [ %i5 ], %g1
2008084: 84 06 3f ff add %i0, -1, %g2
2008088: b7 2e c0 02 sll %i3, %g2, %i3
200808c: 80 8e c0 01 btst %i3, %g1
2008090: 02 80 00 59 be 20081f4 <sigtimedwait+0x294>
2008094: 01 00 00 00 nop
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
2008098: 81 c7 e0 08 ret
200809c: 81 e8 00 00 restore
20080a0: 86 10 20 01 mov 1, %g3
/* 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
NOTE: P1003.1c/D10, p. 39 adds sigwait(). */
int _EXFUN(sigwaitinfo, (const sigset_t *set, siginfo_t *info));
int _EXFUN(sigtimedwait,
20080a4: 84 06 3f ff add %i0, -1, %g2
20080a8: 85 28 c0 02 sll %g3, %g2, %g2
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
20080ac: 80 88 80 01 btst %g2, %g1
20080b0: 12 80 00 12 bne 20080f8 <sigtimedwait+0x198> <== NEVER TAKEN
20080b4: 90 10 00 1a mov %i2, %o0
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
20080b8: b0 06 20 01 inc %i0
20080bc: 80 a6 20 20 cmp %i0, 0x20
20080c0: 12 bf ff fa bne 20080a8 <sigtimedwait+0x148>
20080c4: 84 06 3f ff add %i0, -1, %g2
20080c8: b0 10 20 01 mov 1, %i0
20080cc: 10 80 00 05 b 20080e0 <sigtimedwait+0x180>
20080d0: 86 10 20 01 mov 1, %g3
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
20080d4: 80 a6 20 1b cmp %i0, 0x1b
20080d8: 02 80 00 08 be 20080f8 <sigtimedwait+0x198> <== NEVER TAKEN
20080dc: 90 10 00 1a mov %i2, %o0
20080e0: 84 06 3f ff add %i0, -1, %g2
20080e4: 85 28 c0 02 sll %g3, %g2, %g2
if ( set & signo_to_mask( signo ) ) {
20080e8: 80 88 80 01 btst %g2, %g1
20080ec: 22 bf ff fa be,a 20080d4 <sigtimedwait+0x174>
20080f0: b0 06 20 01 inc %i0
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
20080f4: 90 10 00 1a mov %i2, %o0
20080f8: 92 10 00 18 mov %i0, %o1
20080fc: 94 10 00 19 mov %i1, %o2
2008100: 96 10 20 01 mov 1, %o3
2008104: 40 00 1d 1b call 200f570 <_POSIX_signals_Clear_signals>
2008108: 98 10 20 00 clr %o4
_ISR_Enable( level );
200810c: 7f ff ea dd call 2002c80 <sparc_enable_interrupts>
2008110: 90 10 00 1b mov %i3, %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2008114: 82 10 20 01 mov 1, %g1
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
2008118: f0 26 40 00 st %i0, [ %i1 ]
the_info->si_code = SI_USER;
200811c: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
2008120: c0 26 60 08 clr [ %i1 + 8 ]
return signo;
2008124: 81 c7 e0 08 ret
2008128: 81 e8 00 00 restore
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
200812c: 12 bf ff 9f bne 2007fa8 <sigtimedwait+0x48>
2008130: a0 10 20 00 clr %l0
the_thread = _Thread_Executing;
2008134: 39 00 80 8d sethi %hi(0x2023400), %i4
2008138: b8 17 21 70 or %i4, 0x170, %i4 ! 2023570 <_Per_CPU_Information>
200813c: f0 07 20 0c ld [ %i4 + 0xc ], %i0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
2008140: b2 07 bf f4 add %fp, -12, %i1
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
2008144: 7f ff ea cb call 2002c70 <sparc_disable_interrupts>
2008148: f4 06 21 5c ld [ %i0 + 0x15c ], %i2
200814c: b6 10 00 08 mov %o0, %i3
if ( *set & api->signals_pending ) {
2008150: c4 07 40 00 ld [ %i5 ], %g2
2008154: c2 06 a0 d4 ld [ %i2 + 0xd4 ], %g1
2008158: 80 88 80 01 btst %g2, %g1
200815c: 22 bf ff 9f be,a 2007fd8 <sigtimedwait+0x78>
2008160: 03 00 80 8d sethi %hi(0x2023400), %g1
2008164: 92 10 20 1b mov 0x1b, %o1
2008168: 86 10 20 01 mov 1, %g3
200816c: 84 02 7f ff add %o1, -1, %g2
2008170: 85 28 c0 02 sll %g3, %g2, %g2
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
2008174: 80 88 80 01 btst %g2, %g1
2008178: 32 80 00 12 bne,a 20081c0 <sigtimedwait+0x260> <== NEVER TAKEN
200817c: d2 26 40 00 st %o1, [ %i1 ] <== NOT EXECUTED
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
2008180: 92 02 60 01 inc %o1
2008184: 80 a2 60 20 cmp %o1, 0x20
2008188: 12 bf ff fa bne 2008170 <sigtimedwait+0x210>
200818c: 84 02 7f ff add %o1, -1, %g2
2008190: 92 10 20 01 mov 1, %o1
2008194: 10 80 00 05 b 20081a8 <sigtimedwait+0x248>
2008198: 86 10 20 01 mov 1, %g3
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
200819c: 80 a2 60 1b cmp %o1, 0x1b
20081a0: 22 80 00 08 be,a 20081c0 <sigtimedwait+0x260> <== NEVER TAKEN
20081a4: d2 26 40 00 st %o1, [ %i1 ] <== NOT EXECUTED
20081a8: 84 02 7f ff add %o1, -1, %g2
20081ac: 85 28 c0 02 sll %g3, %g2, %g2
if ( set & signo_to_mask( signo ) ) {
20081b0: 80 88 80 01 btst %g2, %g1
20081b4: 22 bf ff fa be,a 200819c <sigtimedwait+0x23c>
20081b8: 92 02 60 01 inc %o1
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
20081bc: d2 26 40 00 st %o1, [ %i1 ]
_POSIX_signals_Clear_signals(
20081c0: 90 10 00 1a mov %i2, %o0
20081c4: 94 10 00 19 mov %i1, %o2
20081c8: 96 10 20 00 clr %o3
20081cc: 40 00 1c e9 call 200f570 <_POSIX_signals_Clear_signals>
20081d0: 98 10 20 00 clr %o4
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
20081d4: 7f ff ea ab call 2002c80 <sparc_enable_interrupts>
20081d8: 90 10 00 1b mov %i3, %o0
the_info->si_code = SI_USER;
20081dc: 82 10 20 01 mov 1, %g1
the_info->si_value.sival_int = 0;
20081e0: c0 26 60 08 clr [ %i1 + 8 ]
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
20081e4: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
return the_info->si_signo;
20081e8: f0 06 40 00 ld [ %i1 ], %i0
20081ec: 81 c7 e0 08 ret
20081f0: 81 e8 00 00 restore
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
20081f4: 40 00 2b 7f call 2012ff0 <__errno>
20081f8: b0 10 3f ff mov -1, %i0
20081fc: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2008200: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008204: c2 22 00 00 st %g1, [ %o0 ]
return -1;
}
return the_info->si_signo;
}
2008208: 81 c7 e0 08 ret
200820c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
2008210: 40 00 2b 78 call 2012ff0 <__errno>
2008214: b0 10 3f ff mov -1, %i0
2008218: 82 10 20 16 mov 0x16, %g1
200821c: c2 22 00 00 st %g1, [ %o0 ]
2008220: 81 c7 e0 08 ret
2008224: 81 e8 00 00 restore
02009e2c <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
2009e2c: 9d e3 bf a0 save %sp, -96, %sp
int status;
status = sigtimedwait( set, NULL, NULL );
2009e30: 92 10 20 00 clr %o1
2009e34: 90 10 00 18 mov %i0, %o0
2009e38: 7f ff ff 47 call 2009b54 <sigtimedwait>
2009e3c: 94 10 20 00 clr %o2
if ( status != -1 ) {
2009e40: 80 a2 3f ff cmp %o0, -1
2009e44: 02 80 00 07 be 2009e60 <sigwait+0x34>
2009e48: 80 a6 60 00 cmp %i1, 0
if ( sig )
2009e4c: 02 80 00 03 be 2009e58 <sigwait+0x2c> <== NEVER TAKEN
2009e50: b0 10 20 00 clr %i0
*sig = status;
2009e54: d0 26 40 00 st %o0, [ %i1 ]
2009e58: 81 c7 e0 08 ret
2009e5c: 81 e8 00 00 restore
return 0;
}
return errno;
2009e60: 40 00 2a 97 call 20148bc <__errno>
2009e64: 01 00 00 00 nop
2009e68: f0 02 00 00 ld [ %o0 ], %i0
}
2009e6c: 81 c7 e0 08 ret
2009e70: 81 e8 00 00 restore
02006ec0 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
2006ec0: 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 ) )
2006ec4: 40 00 3d d0 call 2016604 <strlen>
2006ec8: 90 10 00 18 mov %i0, %o0
2006ecc: 94 10 20 00 clr %o2
2006ed0: 92 10 00 08 mov %o0, %o1
2006ed4: 96 07 bf ec add %fp, -20, %o3
2006ed8: 90 10 00 18 mov %i0, %o0
2006edc: 98 10 20 01 mov 1, %o4
2006ee0: 7f ff f9 55 call 2005434 <rtems_filesystem_evaluate_path>
2006ee4: b0 10 3f ff mov -1, %i0
2006ee8: 80 a2 20 00 cmp %o0, 0
2006eec: 12 80 00 0e bne 2006f24 <statvfs+0x64> <== NEVER TAKEN
2006ef0: fa 07 bf fc ld [ %fp + -4 ], %i5
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
2006ef4: 92 10 20 00 clr %o1
2006ef8: 94 10 20 38 mov 0x38, %o2
2006efc: 40 00 38 c1 call 2015200 <memset>
2006f00: 90 10 00 19 mov %i1, %o0
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
2006f04: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2006f08: 92 10 00 19 mov %i1, %o1
2006f0c: c2 00 60 44 ld [ %g1 + 0x44 ], %g1
2006f10: 9f c0 40 00 call %g1
2006f14: 90 07 60 1c add %i5, 0x1c, %o0
2006f18: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
2006f1c: 7f ff f9 94 call 200556c <rtems_filesystem_freenode>
2006f20: 90 07 bf ec add %fp, -20, %o0
return result;
}
2006f24: 81 c7 e0 08 ret
2006f28: 81 e8 00 00 restore
020058dc <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
20058dc: 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;
20058e0: c2 06 21 54 ld [ %i0 + 0x154 ], %g1
if ( this_reent ) {
20058e4: 80 a0 60 00 cmp %g1, 0
20058e8: 02 80 00 0c be 2005918 <sync_per_thread+0x3c> <== NEVER TAKEN
20058ec: 3b 00 80 85 sethi %hi(0x2021400), %i5
current_reent = _Thread_Executing->libc_reent;
20058f0: ba 17 60 70 or %i5, 0x70, %i5 ! 2021470 <_Per_CPU_Information>
20058f4: c4 07 60 0c ld [ %i5 + 0xc ], %g2
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
20058f8: 13 00 80 16 sethi %hi(0x2005800), %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;
20058fc: f8 00 a1 54 ld [ %g2 + 0x154 ], %i4
_Thread_Executing->libc_reent = this_reent;
2005900: c2 20 a1 54 st %g1, [ %g2 + 0x154 ]
_fwalk (t->libc_reent, sync_wrapper);
2005904: d0 06 21 54 ld [ %i0 + 0x154 ], %o0
2005908: 40 00 37 14 call 2013558 <_fwalk>
200590c: 92 12 61 20 or %o1, 0x120, %o1
_Thread_Executing->libc_reent = current_reent;
2005910: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2005914: f8 20 61 54 st %i4, [ %g1 + 0x154 ]
2005918: 81 c7 e0 08 ret
200591c: 81 e8 00 00 restore
02006bd8 <sysconf>:
*/
long sysconf(
int name
)
{
2006bd8: 9d e3 bf a0 save %sp, -96, %sp
if ( name == _SC_CLK_TCK )
2006bdc: 80 a6 20 02 cmp %i0, 2
2006be0: 02 80 00 10 be 2006c20 <sysconf+0x48>
2006be4: 03 00 80 7b sethi %hi(0x201ec00), %g1
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
2006be8: 80 a6 20 04 cmp %i0, 4
2006bec: 02 80 00 0b be 2006c18 <sysconf+0x40>
2006bf0: c2 00 60 90 ld [ %g1 + 0x90 ], %g1
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
2006bf4: 80 a6 20 33 cmp %i0, 0x33
2006bf8: 02 80 00 08 be 2006c18 <sysconf+0x40>
2006bfc: 82 10 24 00 mov 0x400, %g1
return 1024;
if ( name == _SC_PAGESIZE )
2006c00: 80 a6 20 08 cmp %i0, 8
2006c04: 02 80 00 05 be 2006c18 <sysconf+0x40>
2006c08: 03 00 00 04 sethi %hi(0x1000), %g1
return PAGE_SIZE;
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
2006c0c: 80 a6 22 03 cmp %i0, 0x203
2006c10: 12 80 00 0c bne 2006c40 <sysconf+0x68> <== ALWAYS TAKEN
2006c14: 82 10 20 00 clr %g1
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
2006c18: 81 c7 e0 08 ret
2006c1c: 91 e8 00 01 restore %g0, %g1, %o0
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
2006c20: 03 00 80 7a sethi %hi(0x201e800), %g1
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
2006c24: d2 00 63 4c ld [ %g1 + 0x34c ], %o1 ! 201eb4c <Configuration+0x10>
2006c28: 11 00 03 d0 sethi %hi(0xf4000), %o0
2006c2c: 40 00 4e e4 call 201a7bc <.udiv>
2006c30: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
2006c34: 82 10 00 08 mov %o0, %g1
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
2006c38: 81 c7 e0 08 ret
2006c3c: 91 e8 00 01 restore %g0, %g1, %o0
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
2006c40: 40 00 2b 4c call 2011970 <__errno>
2006c44: 01 00 00 00 nop
2006c48: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
2006c4c: 82 10 3f ff mov -1, %g1
2006c50: 10 bf ff f2 b 2006c18 <sysconf+0x40>
2006c54: c4 22 00 00 st %g2, [ %o0 ]
0200e670 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
200e670: 9d e3 bf a0 save %sp, -96, %sp
switch (opt) {
200e674: 80 a6 60 00 cmp %i1, 0
200e678: 02 80 00 10 be 200e6b8 <tcsetattr+0x48>
200e67c: 80 a6 60 01 cmp %i1, 1
200e680: 22 80 00 08 be,a 200e6a0 <tcsetattr+0x30>
200e684: 90 10 00 18 mov %i0, %o0
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
200e688: 40 00 12 c4 call 2013198 <__errno>
200e68c: 01 00 00 00 nop
200e690: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
200e694: c2 22 00 00 st %g1, [ %o0 ]
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
200e698: 81 c7 e0 08 ret
200e69c: 91 e8 3f ff restore %g0, -1, %o0
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
200e6a0: 92 10 20 03 mov 3, %o1
200e6a4: 7f ff fe 8f call 200e0e0 <ioctl>
200e6a8: 94 10 20 00 clr %o2
200e6ac: 80 a2 20 00 cmp %o0, 0
200e6b0: 06 bf ff fa bl 200e698 <tcsetattr+0x28> <== NEVER TAKEN
200e6b4: 01 00 00 00 nop
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
200e6b8: 7f ff fe 8a call 200e0e0 <ioctl>
200e6bc: 93 e8 20 02 restore %g0, 2, %o1
02006c9c <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
2006c9c: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
2006ca0: 80 a6 20 01 cmp %i0, 1
2006ca4: 12 80 00 3e bne 2006d9c <timer_create+0x100>
2006ca8: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
2006cac: 02 80 00 3c be 2006d9c <timer_create+0x100>
2006cb0: 80 a6 60 00 cmp %i1, 0
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
2006cb4: 02 80 00 0e be 2006cec <timer_create+0x50>
2006cb8: 03 00 80 80 sethi %hi(0x2020000), %g1
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
2006cbc: c2 06 40 00 ld [ %i1 ], %g1
2006cc0: 82 00 7f ff add %g1, -1, %g1
2006cc4: 80 a0 60 01 cmp %g1, 1
2006cc8: 18 80 00 35 bgu 2006d9c <timer_create+0x100> <== NEVER TAKEN
2006ccc: 01 00 00 00 nop
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
2006cd0: c2 06 60 04 ld [ %i1 + 4 ], %g1
2006cd4: 80 a0 60 00 cmp %g1, 0
2006cd8: 02 80 00 31 be 2006d9c <timer_create+0x100> <== NEVER TAKEN
2006cdc: 82 00 7f ff add %g1, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
2006ce0: 80 a0 60 1f cmp %g1, 0x1f
2006ce4: 18 80 00 2e bgu 2006d9c <timer_create+0x100> <== NEVER TAKEN
2006ce8: 03 00 80 80 sethi %hi(0x2020000), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2006cec: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 2020020 <_Thread_Dispatch_disable_level>
2006cf0: 84 00 a0 01 inc %g2
2006cf4: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
return _Thread_Dispatch_disable_level;
2006cf8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
2006cfc: 3b 00 80 80 sethi %hi(0x2020000), %i5
2006d00: 40 00 08 a7 call 2008f9c <_Objects_Allocate>
2006d04: 90 17 63 20 or %i5, 0x320, %o0 ! 2020320 <_POSIX_Timer_Information>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
2006d08: 80 a2 20 00 cmp %o0, 0
2006d0c: 02 80 00 2a be 2006db4 <timer_create+0x118>
2006d10: 82 10 20 02 mov 2, %g1
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
2006d14: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ]
ptimer->thread_id = _Thread_Executing->Object.id;
2006d18: 03 00 80 81 sethi %hi(0x2020400), %g1
2006d1c: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 ! 202056c <_Per_CPU_Information+0xc>
if ( evp != NULL ) {
2006d20: 80 a6 60 00 cmp %i1, 0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
2006d24: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( evp != NULL ) {
2006d28: 02 80 00 08 be 2006d48 <timer_create+0xac>
2006d2c: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
ptimer->inf.sigev_notify = evp->sigev_notify;
2006d30: c6 06 40 00 ld [ %i1 ], %g3
ptimer->inf.sigev_signo = evp->sigev_signo;
2006d34: c4 06 60 04 ld [ %i1 + 4 ], %g2
ptimer->inf.sigev_value = evp->sigev_value;
2006d38: c2 06 60 08 ld [ %i1 + 8 ], %g1
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
if ( evp != NULL ) {
ptimer->inf.sigev_notify = evp->sigev_notify;
2006d3c: c6 22 20 40 st %g3, [ %o0 + 0x40 ]
ptimer->inf.sigev_signo = evp->sigev_signo;
2006d40: c4 22 20 44 st %g2, [ %o0 + 0x44 ]
ptimer->inf.sigev_value = evp->sigev_value;
2006d44: c2 22 20 48 st %g1, [ %o0 + 0x48 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2006d48: c4 12 20 0a lduh [ %o0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006d4c: ba 17 63 20 or %i5, 0x320, %i5
2006d50: c6 07 60 1c ld [ %i5 + 0x1c ], %g3
}
ptimer->overrun = 0;
2006d54: c0 22 20 68 clr [ %o0 + 0x68 ]
ptimer->timer_data.it_value.tv_sec = 0;
2006d58: c0 22 20 5c clr [ %o0 + 0x5c ]
ptimer->timer_data.it_value.tv_nsec = 0;
2006d5c: c0 22 20 60 clr [ %o0 + 0x60 ]
ptimer->timer_data.it_interval.tv_sec = 0;
2006d60: c0 22 20 54 clr [ %o0 + 0x54 ]
ptimer->timer_data.it_interval.tv_nsec = 0;
2006d64: c0 22 20 58 clr [ %o0 + 0x58 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006d68: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
2006d6c: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
2006d70: c0 22 20 30 clr [ %o0 + 0x30 ]
the_watchdog->user_data = user_data;
2006d74: c0 22 20 34 clr [ %o0 + 0x34 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2006d78: c2 02 20 08 ld [ %o0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006d7c: 85 28 a0 02 sll %g2, 2, %g2
2006d80: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2006d84: c0 22 20 0c clr [ %o0 + 0xc ]
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
2006d88: c2 26 80 00 st %g1, [ %i2 ]
_Thread_Enable_dispatch();
2006d8c: 40 00 0d b1 call 200a450 <_Thread_Enable_dispatch>
2006d90: b0 10 20 00 clr %i0
return 0;
}
2006d94: 81 c7 e0 08 ret
2006d98: 81 e8 00 00 restore
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
2006d9c: 40 00 2c 7e call 2011f94 <__errno>
2006da0: b0 10 3f ff mov -1, %i0
2006da4: 82 10 20 16 mov 0x16, %g1
2006da8: c2 22 00 00 st %g1, [ %o0 ]
2006dac: 81 c7 e0 08 ret
2006db0: 81 e8 00 00 restore
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
2006db4: 40 00 0d a7 call 200a450 <_Thread_Enable_dispatch>
2006db8: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EAGAIN );
2006dbc: 40 00 2c 76 call 2011f94 <__errno>
2006dc0: 01 00 00 00 nop
2006dc4: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
2006dc8: c2 22 00 00 st %g1, [ %o0 ]
2006dcc: 81 c7 e0 08 ret
2006dd0: 81 e8 00 00 restore
02006dd4 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
2006dd4: 9d e3 bf 78 save %sp, -136, %sp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
2006dd8: 80 a6 a0 00 cmp %i2, 0
2006ddc: 02 80 00 a6 be 2007074 <timer_settime+0x2a0> <== NEVER TAKEN
2006de0: 01 00 00 00 nop
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
2006de4: 40 00 10 6b call 200af90 <_Timespec_Is_valid>
2006de8: 90 06 a0 08 add %i2, 8, %o0
2006dec: 80 8a 20 ff btst 0xff, %o0
2006df0: 02 80 00 a1 be 2007074 <timer_settime+0x2a0>
2006df4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
2006df8: 40 00 10 66 call 200af90 <_Timespec_Is_valid>
2006dfc: 90 10 00 1a mov %i2, %o0
2006e00: 80 8a 20 ff btst 0xff, %o0
2006e04: 02 80 00 9c be 2007074 <timer_settime+0x2a0> <== NEVER TAKEN
2006e08: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
2006e0c: 12 80 00 98 bne 200706c <timer_settime+0x298>
2006e10: 80 a6 60 04 cmp %i1, 4
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
2006e14: c8 06 80 00 ld [ %i2 ], %g4
2006e18: c6 06 a0 04 ld [ %i2 + 4 ], %g3
2006e1c: c4 06 a0 08 ld [ %i2 + 8 ], %g2
2006e20: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
2006e24: c8 27 bf d8 st %g4, [ %fp + -40 ]
2006e28: c6 27 bf dc st %g3, [ %fp + -36 ]
2006e2c: c4 27 bf e0 st %g2, [ %fp + -32 ]
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
2006e30: 80 a6 60 04 cmp %i1, 4
2006e34: 02 80 00 4a be 2006f5c <timer_settime+0x188>
2006e38: c2 27 bf e4 st %g1, [ %fp + -28 ]
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
2006e3c: 92 10 00 18 mov %i0, %o1
2006e40: 11 00 80 80 sethi %hi(0x2020000), %o0
2006e44: 94 07 bf fc add %fp, -4, %o2
2006e48: 40 00 09 a0 call 20094c8 <_Objects_Get>
2006e4c: 90 12 23 20 or %o0, 0x320, %o0
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
2006e50: c2 07 bf fc ld [ %fp + -4 ], %g1
2006e54: 80 a0 60 00 cmp %g1, 0
2006e58: 12 80 00 64 bne 2006fe8 <timer_settime+0x214> <== NEVER TAKEN
2006e5c: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
2006e60: c2 07 bf e0 ld [ %fp + -32 ], %g1
2006e64: 80 a0 60 00 cmp %g1, 0
2006e68: 12 80 00 05 bne 2006e7c <timer_settime+0xa8>
2006e6c: c2 07 bf e4 ld [ %fp + -28 ], %g1
2006e70: 80 a0 60 00 cmp %g1, 0
2006e74: 02 80 00 63 be 2007000 <timer_settime+0x22c>
2006e78: 01 00 00 00 nop
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
2006e7c: 40 00 10 7c call 200b06c <_Timespec_To_ticks>
2006e80: 90 10 00 1a mov %i2, %o0
2006e84: d0 26 20 64 st %o0, [ %i0 + 0x64 ]
initial_period = _Timespec_To_ticks( &normalize.it_value );
2006e88: 40 00 10 79 call 200b06c <_Timespec_To_ticks>
2006e8c: 90 07 bf e0 add %fp, -32, %o0
activated = _POSIX_Timer_Insert_helper(
2006e90: d4 06 20 08 ld [ %i0 + 8 ], %o2
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
2006e94: 92 10 00 08 mov %o0, %o1
activated = _POSIX_Timer_Insert_helper(
2006e98: 98 10 00 18 mov %i0, %o4
2006e9c: 90 06 20 10 add %i0, 0x10, %o0
2006ea0: 17 00 80 1c sethi %hi(0x2007000), %o3
2006ea4: 40 00 1e 38 call 200e784 <_POSIX_Timer_Insert_helper>
2006ea8: 96 12 e0 8c or %o3, 0x8c, %o3 ! 200708c <_POSIX_Timer_TSR>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
2006eac: 80 8a 20 ff btst 0xff, %o0
2006eb0: 02 80 00 27 be 2006f4c <timer_settime+0x178>
2006eb4: 80 a6 e0 00 cmp %i3, 0
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
2006eb8: 02 80 00 0b be 2006ee4 <timer_settime+0x110>
2006ebc: c2 07 bf d8 ld [ %fp + -40 ], %g1
*ovalue = ptimer->timer_data;
2006ec0: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
2006ec4: c2 26 c0 00 st %g1, [ %i3 ]
2006ec8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
2006ecc: c2 26 e0 04 st %g1, [ %i3 + 4 ]
2006ed0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2006ed4: c2 26 e0 08 st %g1, [ %i3 + 8 ]
2006ed8: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2006edc: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
ptimer->timer_data = normalize;
2006ee0: c2 07 bf d8 ld [ %fp + -40 ], %g1
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
2006ee4: 90 07 bf e8 add %fp, -24, %o0
2006ee8: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
2006eec: c2 07 bf dc ld [ %fp + -36 ], %g1
2006ef0: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
2006ef4: c2 07 bf e0 ld [ %fp + -32 ], %g1
2006ef8: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
2006efc: c2 07 bf e4 ld [ %fp + -28 ], %g1
2006f00: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
2006f04: 82 10 20 03 mov 3, %g1
2006f08: 40 00 06 94 call 2008958 <_TOD_Get_as_timestamp>
2006f0c: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ]
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2006f10: f8 1f bf e8 ldd [ %fp + -24 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2006f14: 94 10 20 00 clr %o2
2006f18: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2006f1c: 90 10 00 1c mov %i4, %o0
2006f20: 96 12 e2 00 or %o3, 0x200, %o3
2006f24: 40 00 51 cf call 201b660 <__divdi3>
2006f28: 92 10 00 1d mov %i5, %o1
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2006f2c: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2006f30: d2 26 20 6c st %o1, [ %i0 + 0x6c ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2006f34: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2006f38: 90 10 00 1c mov %i4, %o0
2006f3c: 96 12 e2 00 or %o3, 0x200, %o3
2006f40: 40 00 52 ae call 201b9f8 <__moddi3>
2006f44: 92 10 00 1d mov %i5, %o1
2006f48: d2 26 20 70 st %o1, [ %i0 + 0x70 ]
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
2006f4c: 40 00 0d 41 call 200a450 <_Thread_Enable_dispatch>
2006f50: b0 10 20 00 clr %i0
return 0;
2006f54: 81 c7 e0 08 ret
2006f58: 81 e8 00 00 restore
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
2006f5c: 40 00 06 7f call 2008958 <_TOD_Get_as_timestamp>
2006f60: 90 07 bf e8 add %fp, -24, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2006f64: f8 1f bf e8 ldd [ %fp + -24 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2006f68: 94 10 20 00 clr %o2
2006f6c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2006f70: 90 10 00 1c mov %i4, %o0
2006f74: 96 12 e2 00 or %o3, 0x200, %o3
2006f78: 40 00 51 ba call 201b660 <__divdi3>
2006f7c: 92 10 00 1d mov %i5, %o1
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2006f80: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2006f84: d2 27 bf f4 st %o1, [ %fp + -12 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2006f88: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2006f8c: 90 10 00 1c mov %i4, %o0
2006f90: 96 12 e2 00 or %o3, 0x200, %o3
2006f94: 40 00 52 99 call 201b9f8 <__moddi3>
2006f98: 92 10 00 1d mov %i5, %o1
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
2006f9c: 90 07 bf e0 add %fp, -32, %o0
2006fa0: d2 27 bf f8 st %o1, [ %fp + -8 ]
2006fa4: 40 00 10 0c call 200afd4 <_Timespec_Less_than>
2006fa8: 92 07 bf f4 add %fp, -12, %o1
2006fac: 80 8a 20 ff btst 0xff, %o0
2006fb0: 12 80 00 31 bne 2007074 <timer_settime+0x2a0>
2006fb4: 92 07 bf e0 add %fp, -32, %o1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
2006fb8: 90 07 bf f4 add %fp, -12, %o0
2006fbc: 40 00 10 18 call 200b01c <_Timespec_Subtract>
2006fc0: 94 10 00 09 mov %o1, %o2
2006fc4: 92 10 00 18 mov %i0, %o1
2006fc8: 11 00 80 80 sethi %hi(0x2020000), %o0
2006fcc: 94 07 bf fc add %fp, -4, %o2
2006fd0: 40 00 09 3e call 20094c8 <_Objects_Get>
2006fd4: 90 12 23 20 or %o0, 0x320, %o0
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
2006fd8: c2 07 bf fc ld [ %fp + -4 ], %g1
2006fdc: 80 a0 60 00 cmp %g1, 0
2006fe0: 02 bf ff a0 be 2006e60 <timer_settime+0x8c>
2006fe4: b0 10 00 08 mov %o0, %i0
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
2006fe8: 40 00 2b eb call 2011f94 <__errno>
2006fec: b0 10 3f ff mov -1, %i0
2006ff0: 82 10 20 16 mov 0x16, %g1
2006ff4: c2 22 00 00 st %g1, [ %o0 ]
}
2006ff8: 81 c7 e0 08 ret
2006ffc: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
2007000: 40 00 11 60 call 200b580 <_Watchdog_Remove>
2007004: 90 02 20 10 add %o0, 0x10, %o0
/* The old data of the timer are returned */
if ( ovalue )
2007008: 80 a6 e0 00 cmp %i3, 0
200700c: 02 80 00 0b be 2007038 <timer_settime+0x264>
2007010: c2 07 bf d8 ld [ %fp + -40 ], %g1
*ovalue = ptimer->timer_data;
2007014: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
2007018: c2 26 c0 00 st %g1, [ %i3 ]
200701c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
2007020: c2 26 e0 04 st %g1, [ %i3 + 4 ]
2007024: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2007028: c2 26 e0 08 st %g1, [ %i3 + 8 ]
200702c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2007030: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
/* The new data are set */
ptimer->timer_data = normalize;
2007034: c2 07 bf d8 ld [ %fp + -40 ], %g1
2007038: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
200703c: c2 07 bf dc ld [ %fp + -36 ], %g1
2007040: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
2007044: c2 07 bf e0 ld [ %fp + -32 ], %g1
2007048: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
200704c: c2 07 bf e4 ld [ %fp + -28 ], %g1
2007050: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
2007054: 82 10 20 04 mov 4, %g1
2007058: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ]
/* Returns with success */
_Thread_Enable_dispatch();
200705c: 40 00 0c fd call 200a450 <_Thread_Enable_dispatch>
2007060: b0 10 20 00 clr %i0
return 0;
2007064: 81 c7 e0 08 ret
2007068: 81 e8 00 00 restore
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
200706c: 22 bf ff 6b be,a 2006e18 <timer_settime+0x44>
2007070: c8 06 80 00 ld [ %i2 ], %g4
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
rtems_set_errno_and_return_minus_one( EINVAL );
2007074: 40 00 2b c8 call 2011f94 <__errno>
2007078: b0 10 3f ff mov -1, %i0
200707c: 82 10 20 16 mov 0x16, %g1
2007080: c2 22 00 00 st %g1, [ %o0 ]
2007084: 81 c7 e0 08 ret
2007088: 81 e8 00 00 restore
02006944 <times>:
*/
clock_t times(
struct tms *ptms
)
{
2006944: 9d e3 bf 90 save %sp, -112, %sp
struct tms *ptms
)
{
rtems_interval ticks;
if ( !ptms )
2006948: 80 a6 20 00 cmp %i0, 0
200694c: 02 80 00 4c be 2006a7c <times+0x138> <== ALWAYS TAKEN
2006950: 01 00 00 00 nop
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
2006954: 40 00 01 c8 call 2007074 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
2006958: ac 10 20 00 clr %l6 ! 0 <PROM_START> <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
200695c: 03 00 80 7a sethi %hi(0x201e800), %g1 <== NOT EXECUTED
2006960: f4 00 63 ec ld [ %g1 + 0x3ec ], %i2 ! 201ebec <Configuration+0x10><== NOT EXECUTED
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
2006964: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
2006968: 83 2e a0 02 sll %i2, 2, %g1 <== NOT EXECUTED
200696c: 91 2e a0 07 sll %i2, 7, %o0 <== NOT EXECUTED
2006970: 13 0e e6 b2 sethi %hi(0x3b9ac800), %o1 <== NOT EXECUTED
2006974: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
2006978: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED
200697c: 90 02 00 1a add %o0, %i2, %o0 <== NOT EXECUTED
2006980: 40 00 50 76 call 201ab58 <.urem> <== NOT EXECUTED
2006984: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
2006988: 13 00 03 d0 sethi %hi(0xf4000), %o1 <== NOT EXECUTED
200698c: ae 10 00 08 mov %o0, %l7 <== NOT EXECUTED
2006990: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED
2006994: 40 00 4f c5 call 201a8a8 <.udiv> <== NOT EXECUTED
2006998: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
200699c: 05 00 80 7f sethi %hi(0x201fc00), %g2 <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
20069a0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
20069a4: 9b 28 60 03 sll %g1, 3, %o5 <== NOT EXECUTED
20069a8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED
20069ac: 99 30 60 1d srl %g1, 0x1d, %o4 <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
20069b0: d0 00 a2 8c ld [ %g2 + 0x28c ], %o0 <== NOT EXECUTED
20069b4: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED
20069b8: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED
20069bc: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED
20069c0: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
20069c4: b7 28 e0 06 sll %g3, 6, %i3 <== NOT EXECUTED
20069c8: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED
20069cc: 89 30 e0 1a srl %g3, 0x1a, %g4 <== NOT EXECUTED
20069d0: b5 28 a0 06 sll %g2, 6, %i2 <== NOT EXECUTED
20069d4: 86 a6 c0 03 subcc %i3, %g3, %g3 <== NOT EXECUTED
20069d8: b4 11 00 1a or %g4, %i2, %i2 <== NOT EXECUTED
20069dc: 84 66 80 02 subx %i2, %g2, %g2 <== NOT EXECUTED
20069e0: 86 80 c0 01 addcc %g3, %g1, %g3 <== NOT EXECUTED
20069e4: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
20069e8: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED
20069ec: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED
20069f0: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED
20069f4: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED
20069f8: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED
20069fc: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
2006a00: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED
2006a04: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED
2006a08: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED
2006a0c: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED
2006a10: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED
2006a14: ab 28 e0 02 sll %g3, 2, %l5 <== NOT EXECUTED
2006a18: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED
2006a1c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
2006a20: a9 28 a0 02 sll %g2, 2, %l4 <== NOT EXECUTED
2006a24: 86 80 c0 15 addcc %g3, %l5, %g3 <== NOT EXECUTED
2006a28: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED
2006a2c: 84 40 80 14 addx %g2, %l4, %g2 <== NOT EXECUTED
2006a30: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED
2006a34: b5 30 e0 17 srl %g3, 0x17, %i2 <== NOT EXECUTED
2006a38: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED
2006a3c: 86 85 c0 01 addcc %l7, %g1, %g3 <== NOT EXECUTED
2006a40: 84 16 80 04 or %i2, %g4, %g2 <== NOT EXECUTED
2006a44: 84 45 80 02 addx %l6, %g2, %g2 <== NOT EXECUTED
2006a48: 90 02 20 80 add %o0, 0x80, %o0 <== NOT EXECUTED
2006a4c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2006a50: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
2006a54: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
2006a58: 40 00 10 b1 call 200ad1c <_Timestamp64_Divide> <== NOT EXECUTED
2006a5c: c4 3f bf f0 std %g2, [ %fp + -16 ] <== NOT EXECUTED
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
2006a60: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
2006a64: fa 26 20 04 st %i5, [ %i0 + 4 ] <== NOT EXECUTED
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
2006a68: c2 26 00 00 st %g1, [ %i0 ] <== NOT EXECUTED
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
2006a6c: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED
ptms->tms_cstime = 0;
2006a70: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
clock_t times(
struct tms *ptms
)
{
return _times( ptms );
}
2006a74: 81 c7 e0 08 ret <== NOT EXECUTED
2006a78: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
2006a7c: 40 00 2b f8 call 2011a5c <__errno>
2006a80: ba 10 3f ff mov -1, %i5
2006a84: 82 10 20 0e mov 0xe, %g1
2006a88: c2 22 00 00 st %g1, [ %o0 ]
clock_t times(
struct tms *ptms
)
{
return _times( ptms );
}
2006a8c: 81 c7 e0 08 ret
2006a90: 91 e8 00 1d restore %g0, %i5, %o0
0200701c <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
200701c: 9d e3 bf 98 save %sp, -104, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
2007020: 3b 00 80 86 sethi %hi(0x2021800), %i5
2007024: ba 17 61 b8 or %i5, 0x1b8, %i5 ! 20219b8 <_POSIX_signals_Ualarm_timer>
2007028: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200702c: 80 a0 60 00 cmp %g1, 0
2007030: 02 80 00 24 be 20070c0 <ualarm+0xa4>
2007034: b8 10 00 18 mov %i0, %i4
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
2007038: 40 00 11 03 call 200b444 <_Watchdog_Remove>
200703c: 90 10 00 1d mov %i5, %o0
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
2007040: 90 02 3f fe add %o0, -2, %o0
2007044: 80 a2 20 01 cmp %o0, 1
2007048: 08 80 00 26 bleu 20070e0 <ualarm+0xc4> <== ALWAYS TAKEN
200704c: b0 10 20 00 clr %i0
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
2007050: 80 a7 20 00 cmp %i4, 0
2007054: 02 80 00 19 be 20070b8 <ualarm+0x9c>
2007058: 37 00 03 d0 sethi %hi(0xf4000), %i3
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
200705c: 90 10 00 1c mov %i4, %o0
2007060: 40 00 54 d1 call 201c3a4 <.udiv>
2007064: 92 16 e2 40 or %i3, 0x240, %o1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2007068: 92 16 e2 40 or %i3, 0x240, %o1
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
200706c: d0 27 bf f8 st %o0, [ %fp + -8 ]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2007070: 40 00 55 79 call 201c654 <.urem>
2007074: 90 10 00 1c mov %i4, %o0
2007078: 87 2a 20 07 sll %o0, 7, %g3
200707c: 82 10 00 08 mov %o0, %g1
2007080: 85 2a 20 02 sll %o0, 2, %g2
2007084: 84 20 c0 02 sub %g3, %g2, %g2
2007088: 82 00 80 01 add %g2, %g1, %g1
200708c: 83 28 60 03 sll %g1, 3, %g1
ticks = _Timespec_To_ticks( &tp );
2007090: 90 07 bf f8 add %fp, -8, %o0
2007094: 40 00 0f 78 call 200ae74 <_Timespec_To_ticks>
2007098: c2 27 bf fc st %g1, [ %fp + -4 ]
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
200709c: 40 00 0f 76 call 200ae74 <_Timespec_To_ticks>
20070a0: 90 07 bf f8 add %fp, -8, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20070a4: 92 10 00 1d mov %i5, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20070a8: d0 27 60 0c st %o0, [ %i5 + 0xc ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20070ac: 11 00 80 84 sethi %hi(0x2021000), %o0
20070b0: 40 00 10 83 call 200b2bc <_Watchdog_Insert>
20070b4: 90 12 21 60 or %o0, 0x160, %o0 ! 2021160 <_Watchdog_Ticks_chain>
}
return remaining;
}
20070b8: 81 c7 e0 08 ret
20070bc: 81 e8 00 00 restore
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20070c0: 03 00 80 1b sethi %hi(0x2006c00), %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20070c4: c0 27 60 08 clr [ %i5 + 8 ]
the_watchdog->routine = routine;
20070c8: 82 10 63 f0 or %g1, 0x3f0, %g1
the_watchdog->id = id;
20070cc: c0 27 60 20 clr [ %i5 + 0x20 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20070d0: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20070d4: c0 27 60 24 clr [ %i5 + 0x24 ]
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
20070d8: 10 bf ff de b 2007050 <ualarm+0x34>
20070dc: b0 10 20 00 clr %i0
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
20070e0: c4 07 60 0c ld [ %i5 + 0xc ], %g2
20070e4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
20070e8: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20070ec: 92 07 bf f8 add %fp, -8, %o1
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
20070f0: 90 02 00 02 add %o0, %g2, %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20070f4: 40 00 0f 4b call 200ae20 <_Timespec_From_ticks>
20070f8: 90 22 00 01 sub %o0, %g1, %o0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20070fc: c2 07 bf f8 ld [ %fp + -8 ], %g1
remaining += tp.tv_nsec / 1000;
2007100: d0 07 bf fc ld [ %fp + -4 ], %o0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2007104: 85 28 60 03 sll %g1, 3, %g2
2007108: 87 28 60 08 sll %g1, 8, %g3
200710c: 84 20 c0 02 sub %g3, %g2, %g2
remaining += tp.tv_nsec / 1000;
2007110: 92 10 23 e8 mov 0x3e8, %o1
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2007114: b1 28 a0 06 sll %g2, 6, %i0
2007118: b0 26 00 02 sub %i0, %g2, %i0
remaining += tp.tv_nsec / 1000;
200711c: 40 00 54 a4 call 201c3ac <.div>
2007120: b0 06 00 01 add %i0, %g1, %i0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2007124: b1 2e 20 06 sll %i0, 6, %i0
remaining += tp.tv_nsec / 1000;
2007128: 10 bf ff ca b 2007050 <ualarm+0x34>
200712c: b0 02 00 18 add %o0, %i0, %i0
02007794 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
2007794: 9d e3 bf 70 save %sp, -144, %sp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
2007798: 90 10 00 18 mov %i0, %o0
200779c: 7f ff f2 c1 call 20042a0 <rtems_filesystem_dirname>
20077a0: ba 10 00 18 mov %i0, %i5
if ( parentpathlen == 0 )
20077a4: 80 a2 20 00 cmp %o0, 0
20077a8: 12 80 00 29 bne 200784c <unlink+0xb8>
20077ac: b6 10 00 08 mov %o0, %i3
rtems_filesystem_get_start_loc( path, &i, &parentloc );
20077b0: b8 07 bf d4 add %fp, -44, %i4
20077b4: 90 10 00 18 mov %i0, %o0
20077b8: 92 07 bf fc add %fp, -4, %o1
20077bc: 94 10 00 1c mov %i4, %o2
20077c0: 7f ff f7 8a call 20055e8 <rtems_filesystem_get_start_loc>
20077c4: b6 10 20 00 clr %i3
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
20077c8: b4 10 20 00 clr %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077cc: c2 07 bf d4 ld [ %fp + -44 ], %g1
name = path + parentpathlen;
20077d0: ba 07 40 1b add %i5, %i3, %i5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077d4: c2 27 bf e8 st %g1, [ %fp + -24 ]
20077d8: c2 07 bf d8 ld [ %fp + -40 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
20077dc: 90 10 00 1d mov %i5, %o0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
20077e0: c2 27 bf ec st %g1, [ %fp + -20 ]
20077e4: c2 07 bf dc ld [ %fp + -36 ], %g1
20077e8: c2 27 bf f0 st %g1, [ %fp + -16 ]
20077ec: c2 07 bf e0 ld [ %fp + -32 ], %g1
20077f0: c2 27 bf f4 st %g1, [ %fp + -12 ]
20077f4: c2 07 bf e4 ld [ %fp + -28 ], %g1
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
20077f8: 40 00 3e df call 2017374 <strlen>
20077fc: c2 27 bf f8 st %g1, [ %fp + -8 ]
2007800: 92 10 00 08 mov %o0, %o1
2007804: 7f ff f2 b6 call 20042dc <rtems_filesystem_prefix_separators>
2007808: 90 10 00 1d mov %i5, %o0
200780c: ba 07 40 08 add %i5, %o0, %i5
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
2007810: 40 00 3e d9 call 2017374 <strlen>
2007814: 90 10 00 1d mov %i5, %o0
2007818: 94 10 20 00 clr %o2
200781c: 92 10 00 08 mov %o0, %o1
2007820: 96 07 bf e8 add %fp, -24, %o3
2007824: 90 10 00 1d mov %i5, %o0
2007828: 7f ff f2 5e call 20041a0 <rtems_filesystem_evaluate_relative_path>
200782c: 98 10 20 00 clr %o4
0, &loc, false );
if ( result != 0 ) {
2007830: 80 a2 20 00 cmp %o0, 0
2007834: 02 80 00 17 be 2007890 <unlink+0xfc>
2007838: 80 8e a0 ff btst 0xff, %i2
if ( free_parentloc )
200783c: 12 80 00 11 bne 2007880 <unlink+0xec>
2007840: b0 10 3f ff mov -1, %i0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
2007844: 81 c7 e0 08 ret
2007848: 81 e8 00 00 restore
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
200784c: b8 07 bf d4 add %fp, -44, %i4
2007850: 90 10 00 18 mov %i0, %o0
2007854: 92 10 00 1b mov %i3, %o1
2007858: 94 10 20 02 mov 2, %o2
200785c: 96 10 00 1c mov %i4, %o3
2007860: 98 10 20 00 clr %o4
2007864: 7f ff f2 6c call 2004214 <rtems_filesystem_evaluate_path>
2007868: b0 10 3f ff mov -1, %i0
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
200786c: 80 a2 20 00 cmp %o0, 0
2007870: 12 bf ff f5 bne 2007844 <unlink+0xb0> <== NEVER TAKEN
2007874: b4 10 20 01 mov 1, %i2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
2007878: 10 bf ff d6 b 20077d0 <unlink+0x3c>
200787c: c2 07 bf d4 ld [ %fp + -44 ], %g1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
2007880: 7f ff f2 b3 call 200434c <rtems_filesystem_freenode>
2007884: 90 10 00 1c mov %i4, %o0
2007888: 81 c7 e0 08 ret
200788c: 81 e8 00 00 restore
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
2007890: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007894: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2007898: 9f c0 40 00 call %g1
200789c: 90 07 bf e8 add %fp, -24, %o0
20078a0: 80 a2 20 01 cmp %o0, 1
20078a4: 02 80 00 10 be 20078e4 <unlink+0x150>
20078a8: c2 07 bf f4 ld [ %fp + -12 ], %g1
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
20078ac: 92 07 bf e8 add %fp, -24, %o1
20078b0: c2 00 60 0c ld [ %g1 + 0xc ], %g1
20078b4: 9f c0 40 00 call %g1
20078b8: 90 10 00 1c mov %i4, %o0
20078bc: b0 10 00 08 mov %o0, %i0
rtems_filesystem_freenode( &loc );
20078c0: 7f ff f2 a3 call 200434c <rtems_filesystem_freenode>
20078c4: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
20078c8: 80 8e a0 ff btst 0xff, %i2
20078cc: 02 80 00 11 be 2007910 <unlink+0x17c>
20078d0: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
20078d4: 7f ff f2 9e call 200434c <rtems_filesystem_freenode>
20078d8: 90 10 00 1c mov %i4, %o0
return result;
}
20078dc: 81 c7 e0 08 ret
20078e0: 81 e8 00 00 restore
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
20078e4: 7f ff f2 9a call 200434c <rtems_filesystem_freenode>
20078e8: 90 07 bf e8 add %fp, -24, %o0
if ( free_parentloc )
20078ec: 80 8e a0 ff btst 0xff, %i2
20078f0: 02 80 00 04 be 2007900 <unlink+0x16c>
20078f4: 01 00 00 00 nop
rtems_filesystem_freenode( &parentloc );
20078f8: 7f ff f2 95 call 200434c <rtems_filesystem_freenode>
20078fc: 90 10 00 1c mov %i4, %o0
rtems_set_errno_and_return_minus_one( EISDIR );
2007900: 40 00 39 05 call 2015d14 <__errno>
2007904: b0 10 3f ff mov -1, %i0
2007908: 82 10 20 15 mov 0x15, %g1
200790c: c2 22 00 00 st %g1, [ %o0 ]
2007910: 81 c7 e0 08 ret
2007914: 81 e8 00 00 restore
0200a498 <unmount>:
*/
int unmount(
const char *path
)
{
200a498: 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 ) )
200a49c: 40 00 5f f3 call 2022468 <strlen>
200a4a0: 90 10 00 18 mov %i0, %o0
200a4a4: 94 10 20 00 clr %o2
200a4a8: 92 10 00 08 mov %o0, %o1
200a4ac: 96 07 bf ec add %fp, -20, %o3
200a4b0: 90 10 00 18 mov %i0, %o0
200a4b4: 7f ff ef 7a call 200629c <rtems_filesystem_evaluate_path>
200a4b8: 98 10 20 01 mov 1, %o4
200a4bc: 80 a2 20 00 cmp %o0, 0
200a4c0: 12 80 00 53 bne 200a60c <unmount+0x174>
200a4c4: fa 07 bf fc ld [ %fp + -4 ], %i5
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
200a4c8: c2 07 bf ec ld [ %fp + -20 ], %g1
200a4cc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
200a4d0: 80 a0 80 01 cmp %g2, %g1
200a4d4: 12 80 00 3c bne 200a5c4 <unmount+0x12c>
200a4d8: 90 07 bf ec add %fp, -20, %o0
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
200a4dc: 7f ff f0 18 call 200653c <rtems_filesystem_freenode>
200a4e0: 01 00 00 00 nop
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
200a4e4: 03 00 80 c9 sethi %hi(0x2032400), %g1
200a4e8: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 20327f0 <rtems_current_user_env>
200a4ec: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
200a4f0: 80 a0 40 1d cmp %g1, %i5
200a4f4: 02 80 00 40 be 200a5f4 <unmount+0x15c>
200a4f8: 11 00 80 29 sethi %hi(0x200a400), %o0
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
200a4fc: d2 07 60 2c ld [ %i5 + 0x2c ], %o1
200a500: 7f ff f3 a1 call 2007384 <rtems_filesystem_mount_iterate>
200a504: 90 12 20 84 or %o0, 0x84, %o0
200a508: 80 8a 20 ff btst 0xff, %o0
200a50c: 12 80 00 3a bne 200a5f4 <unmount+0x15c>
200a510: 01 00 00 00 nop
* Run the file descriptor table to determine if there are any file
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
200a514: 7f ff f1 43 call 2006a20 <rtems_libio_is_open_files_in_fs>
200a518: 90 10 00 1d mov %i5, %o0
200a51c: 80 a2 20 01 cmp %o0, 1
200a520: 02 80 00 35 be 200a5f4 <unmount+0x15c>
200a524: 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 )
200a528: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200a52c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
200a530: 9f c0 40 00 call %g1
200a534: 90 10 00 1d mov %i5, %o0
200a538: 80 a2 20 00 cmp %o0, 0
200a53c: 12 80 00 2a bne 200a5e4 <unmount+0x14c> <== NEVER TAKEN
200a540: 01 00 00 00 nop
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
200a544: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200a548: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
200a54c: 9f c0 40 00 call %g1
200a550: 90 10 00 1d mov %i5, %o0
200a554: 80 a2 20 00 cmp %o0, 0
200a558: 02 80 00 0c be 200a588 <unmount+0xf0> <== ALWAYS TAKEN
200a55c: 39 00 80 cc sethi %hi(0x2033000), %i4
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
200a560: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
200a564: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200a568: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED
200a56c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200a570: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a574: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200a578: 12 80 00 1d bne 200a5ec <unmount+0x154> <== NOT EXECUTED
200a57c: 01 00 00 00 nop <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
200a580: 81 c7 e0 08 ret <== NOT EXECUTED
200a584: 81 e8 00 00 restore <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200a588: d0 07 22 b0 ld [ %i4 + 0x2b0 ], %o0
200a58c: 92 10 20 00 clr %o1
200a590: 40 00 03 38 call 200b270 <rtems_semaphore_obtain>
200a594: 94 10 20 00 clr %o2
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200a598: 40 00 06 50 call 200bed8 <_Chain_Extract>
200a59c: 90 10 00 1d mov %i5, %o0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200a5a0: d0 07 22 b0 ld [ %i4 + 0x2b0 ], %o0
200a5a4: 40 00 03 7d call 200b398 <rtems_semaphore_release>
200a5a8: b0 10 20 00 clr %i0
/*
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
200a5ac: 7f ff ef e4 call 200653c <rtems_filesystem_freenode>
200a5b0: 90 07 60 08 add %i5, 8, %o0
free( mt_entry );
200a5b4: 7f ff ef e9 call 2006558 <free>
200a5b8: 90 10 00 1d mov %i5, %o0
return 0;
200a5bc: 81 c7 e0 08 ret
200a5c0: 81 e8 00 00 restore
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
200a5c4: 7f ff ef de call 200653c <rtems_filesystem_freenode>
200a5c8: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EACCES );
200a5cc: 40 00 58 db call 2020938 <__errno>
200a5d0: 01 00 00 00 nop
200a5d4: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
200a5d8: c2 22 00 00 st %g1, [ %o0 ]
200a5dc: 81 c7 e0 08 ret
200a5e0: 81 e8 00 00 restore
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
200a5e4: 81 c7 e0 08 ret <== NOT EXECUTED
200a5e8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
200a5ec: 40 00 05 26 call 200ba84 <rtems_fatal_error_occurred> <== NOT EXECUTED
200a5f0: 90 10 20 00 clr %o0 <== NOT EXECUTED
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
200a5f4: 40 00 58 d1 call 2020938 <__errno>
200a5f8: b0 10 3f ff mov -1, %i0
200a5fc: 82 10 20 10 mov 0x10, %g1
200a600: c2 22 00 00 st %g1, [ %o0 ]
200a604: 81 c7 e0 08 ret
200a608: 81 e8 00 00 restore
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
200a60c: 81 c7 e0 08 ret
200a610: 91 e8 3f ff restore %g0, -1, %o0
0200671c <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
200671c: 9d e3 bf 88 save %sp, -120, %sp
for (; *fmt != '\0'; fmt++) {
2006720: c2 0e 00 00 ldub [ %i0 ], %g1
2006724: 83 28 60 18 sll %g1, 0x18, %g1
2006728: 80 a0 60 00 cmp %g1, 0
200672c: 02 80 00 7d be 2006920 <vprintk+0x204> <== NEVER TAKEN
2006730: 29 00 80 7a sethi %hi(0x201e800), %l4
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
2006734: a2 07 bf e8 add %fp, -24, %l1
2006738: a6 07 bf e7 add %fp, -25, %l3
200673c: 2d 00 80 74 sethi %hi(0x201d000), %l6
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
2006740: 2f 00 80 73 sethi %hi(0x201cc00), %l7
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
2006744: 91 38 60 18 sra %g1, 0x18, %o0
2006748: 80 a2 20 25 cmp %o0, 0x25
200674c: 12 80 00 8d bne 2006980 <vprintk+0x264>
2006750: c2 05 21 4c ld [ %l4 + 0x14c ], %g1
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
2006754: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2006758: 85 28 60 18 sll %g1, 0x18, %g2
200675c: 87 38 a0 18 sra %g2, 0x18, %g3
2006760: 80 a0 e0 30 cmp %g3, 0x30
2006764: 22 80 00 96 be,a 20069bc <vprintk+0x2a0>
2006768: c2 0e 20 02 ldub [ %i0 + 2 ], %g1
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
200676c: b0 06 20 01 inc %i0
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
2006770: aa 10 20 20 mov 0x20, %l5
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
2006774: 87 38 a0 18 sra %g2, 0x18, %g3
2006778: 80 a0 e0 2d cmp %g3, 0x2d
200677c: 02 80 00 8b be 20069a8 <vprintk+0x28c>
2006780: a4 10 20 00 clr %l2
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2006784: 82 00 7f d0 add %g1, -48, %g1
2006788: 82 08 60 ff and %g1, 0xff, %g1
200678c: 80 a0 60 09 cmp %g1, 9
2006790: 18 80 00 0f bgu 20067cc <vprintk+0xb0>
2006794: ba 10 20 00 clr %i5
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
2006798: b0 06 20 01 inc %i0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
200679c: c2 0e 00 00 ldub [ %i0 ], %g1
width *= 10;
20067a0: 87 2f 60 01 sll %i5, 1, %g3
width += ((unsigned) *fmt - '0');
20067a4: 85 38 a0 18 sra %g2, 0x18, %g2
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
20067a8: bb 2f 60 03 sll %i5, 3, %i5
20067ac: ba 00 c0 1d add %g3, %i5, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
20067b0: 86 00 7f d0 add %g1, -48, %g3
width *= 10;
width += ((unsigned) *fmt - '0');
20067b4: ba 07 40 02 add %i5, %g2, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
20067b8: 86 08 e0 ff and %g3, 0xff, %g3
width *= 10;
width += ((unsigned) *fmt - '0');
20067bc: ba 07 7f d0 add %i5, -48, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
20067c0: 80 a0 e0 09 cmp %g3, 9
20067c4: 08 bf ff f5 bleu 2006798 <vprintk+0x7c>
20067c8: 85 28 60 18 sll %g1, 0x18, %g2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
20067cc: 83 38 a0 18 sra %g2, 0x18, %g1
20067d0: 80 a0 60 6c cmp %g1, 0x6c
20067d4: 02 80 00 7e be 20069cc <vprintk+0x2b0>
20067d8: 80 a0 60 63 cmp %g1, 0x63
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
20067dc: 22 80 00 83 be,a 20069e8 <vprintk+0x2cc>
20067e0: 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' ) {
20067e4: 80 a0 60 73 cmp %g1, 0x73
20067e8: 02 80 00 8b be 2006a14 <vprintk+0x2f8>
20067ec: 80 a0 60 4f cmp %g1, 0x4f
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
20067f0: 22 80 00 6c be,a 20069a0 <vprintk+0x284>
20067f4: 82 10 20 00 clr %g1
20067f8: 80 a0 60 6f cmp %g1, 0x6f
20067fc: 22 80 00 69 be,a 20069a0 <vprintk+0x284>
2006800: 82 10 20 00 clr %g1
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
2006804: 80 a0 60 49 cmp %g1, 0x49
2006808: 22 80 00 06 be,a 2006820 <vprintk+0x104>
200680c: 82 10 20 01 mov 1, %g1
2006810: 80 a0 60 69 cmp %g1, 0x69
2006814: 12 80 00 45 bne 2006928 <vprintk+0x20c>
2006818: 80 a0 60 44 cmp %g1, 0x44
c == 'd' || c == 'D' ) {
base = 10; sign = true;
200681c: 82 10 20 01 mov 1, %g1
2006820: a0 10 20 0a mov 0xa, %l0
} else {
BSP_output_char(c);
continue;
}
printNum(
2006824: f4 06 40 00 ld [ %i1 ], %i2
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
2006828: 80 88 60 ff btst 0xff, %g1
200682c: 02 80 00 05 be 2006840 <vprintk+0x124>
2006830: b2 06 60 04 add %i1, 4, %i1
2006834: 80 a6 a0 00 cmp %i2, 0
2006838: 06 80 00 bf bl 2006b34 <vprintk+0x418>
200683c: c2 05 21 4c ld [ %l4 + 0x14c ], %g1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2006840: 90 10 00 1a mov %i2, %o0
2006844: 92 10 00 10 mov %l0, %o1
2006848: 40 00 4e f5 call 201a41c <.udiv>
200684c: a4 10 00 10 mov %l0, %l2
2006850: b8 92 20 00 orcc %o0, 0, %i4
2006854: 12 80 00 06 bne 200686c <vprintk+0x150>
2006858: b6 10 20 00 clr %i3
200685c: 10 80 00 c4 b 2006b6c <vprintk+0x450>
2006860: b8 10 00 1a mov %i2, %i4
2006864: b4 10 00 1c mov %i4, %i2
2006868: b8 10 00 08 mov %o0, %i4
toPrint[count++] = (char) (unsigned_num - (n * base));
200686c: 92 10 00 1c mov %i4, %o1
2006870: 40 00 4e b1 call 201a334 <.umul>
2006874: 90 10 00 12 mov %l2, %o0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2006878: 92 10 00 10 mov %l0, %o1
toPrint[count++] = (char) (unsigned_num - (n * base));
200687c: b4 26 80 08 sub %i2, %o0, %i2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2006880: 90 10 00 1c mov %i4, %o0
2006884: 40 00 4e e6 call 201a41c <.udiv>
2006888: f4 2c 40 1b stb %i2, [ %l1 + %i3 ]
200688c: 80 a2 20 00 cmp %o0, 0
2006890: 12 bf ff f5 bne 2006864 <vprintk+0x148>
2006894: b6 06 e0 01 inc %i3
2006898: b4 06 e0 01 add %i3, 1, %i2
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
200689c: b6 07 80 1b add %fp, %i3, %i3
for (n=maxwidth ; n > count; n-- )
20068a0: 80 a7 40 1a cmp %i5, %i2
20068a4: 08 80 00 0b bleu 20068d0 <vprintk+0x1b4>
20068a8: f8 2e ff e8 stb %i4, [ %i3 + -24 ]
20068ac: b8 15 21 4c or %l4, 0x14c, %i4
BSP_output_char(lead);
20068b0: aa 0d 60 30 and %l5, 0x30, %l5
20068b4: c2 07 00 00 ld [ %i4 ], %g1
20068b8: 9f c0 40 00 call %g1
20068bc: 90 10 00 15 mov %l5, %o0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
20068c0: ba 07 7f ff add %i5, -1, %i5
20068c4: 80 a7 40 1a cmp %i5, %i2
20068c8: 38 bf ff fc bgu,a 20068b8 <vprintk+0x19c>
20068cc: c2 07 00 00 ld [ %i4 ], %g1
BSP_output_char(lead);
for (n = 0; n < count; n++) {
20068d0: 80 a6 a0 00 cmp %i2, 0
20068d4: 22 80 00 0f be,a 2006910 <vprintk+0x1f4> <== NEVER TAKEN
20068d8: c2 0e 20 01 ldub [ %i0 + 1 ], %g1 <== NOT EXECUTED
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
20068dc: ba 06 bf ff add %i2, -1, %i5
20068e0: b8 15 21 4c or %l4, 0x14c, %i4
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
20068e4: ba 04 40 1d add %l1, %i5, %i5
20068e8: b6 15 a3 98 or %l6, 0x398, %i3
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
20068ec: c4 4f 40 00 ldsb [ %i5 ], %g2
20068f0: c2 07 00 00 ld [ %i4 ], %g1
20068f4: d0 4e c0 02 ldsb [ %i3 + %g2 ], %o0
20068f8: 9f c0 40 00 call %g1
20068fc: ba 07 7f ff add %i5, -1, %i5
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2006900: 80 a7 40 13 cmp %i5, %l3
2006904: 32 bf ff fb bne,a 20068f0 <vprintk+0x1d4>
2006908: c4 4f 40 00 ldsb [ %i5 ], %g2
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
200690c: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2006910: 83 28 60 18 sll %g1, 0x18, %g1
2006914: 80 a0 60 00 cmp %g1, 0
2006918: 12 bf ff 8b bne 2006744 <vprintk+0x28>
200691c: b0 06 20 01 inc %i0
2006920: 81 c7 e0 08 ret
2006924: 81 e8 00 00 restore
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
2006928: 22 bf ff be be,a 2006820 <vprintk+0x104>
200692c: 82 10 20 01 mov 1, %g1
2006930: 80 a0 60 64 cmp %g1, 0x64
2006934: 22 bf ff bb be,a 2006820 <vprintk+0x104>
2006938: 82 10 20 01 mov 1, %g1
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
200693c: 80 a0 60 55 cmp %g1, 0x55
2006940: 22 80 00 8d be,a 2006b74 <vprintk+0x458>
2006944: 82 10 20 00 clr %g1
2006948: 80 a0 60 75 cmp %g1, 0x75
200694c: 02 80 00 8a be 2006b74 <vprintk+0x458>
2006950: 82 10 20 00 clr %g1
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
2006954: 91 38 a0 18 sra %g2, 0x18, %o0
2006958: 80 a2 20 58 cmp %o0, 0x58
200695c: 02 80 00 88 be 2006b7c <vprintk+0x460>
2006960: 01 00 00 00 nop
2006964: 80 a2 20 78 cmp %o0, 0x78
2006968: 02 bf ff af be 2006824 <vprintk+0x108>
200696c: a0 10 20 10 mov 0x10, %l0
base = 16; sign = false;
} else if ( c == 'p' ) {
2006970: 80 a2 20 70 cmp %o0, 0x70
2006974: 02 bf ff ac be 2006824 <vprintk+0x108>
2006978: 01 00 00 00 nop
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
200697c: c2 05 21 4c ld [ %l4 + 0x14c ], %g1
2006980: 9f c0 40 00 call %g1
2006984: 01 00 00 00 nop
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2006988: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
200698c: 83 28 60 18 sll %g1, 0x18, %g1
2006990: 80 a0 60 00 cmp %g1, 0
2006994: 12 bf ff 6c bne 2006744 <vprintk+0x28>
2006998: b0 06 20 01 inc %i0
200699c: 30 80 00 64 b,a 2006b2c <vprintk+0x410>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
20069a0: 10 bf ff a1 b 2006824 <vprintk+0x108>
20069a4: a0 10 20 08 mov 8, %l0
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
20069a8: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
20069ac: a4 10 20 01 mov 1, %l2
fmt++;
20069b0: b0 06 20 01 inc %i0
20069b4: 10 bf ff 74 b 2006784 <vprintk+0x68>
20069b8: 85 28 60 18 sll %g1, 0x18, %g2
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
20069bc: aa 10 20 30 mov 0x30, %l5
fmt++;
20069c0: b0 06 20 02 add %i0, 2, %i0
20069c4: 10 bf ff 6c b 2006774 <vprintk+0x58>
20069c8: 85 28 60 18 sll %g1, 0x18, %g2
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
20069cc: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
20069d0: 85 28 60 18 sll %g1, 0x18, %g2
}
if ( c == 'c' ) {
20069d4: 83 38 a0 18 sra %g2, 0x18, %g1
20069d8: 80 a0 60 63 cmp %g1, 0x63
20069dc: 12 bf ff 82 bne 20067e4 <vprintk+0xc8> <== ALWAYS TAKEN
20069e0: b0 06 20 01 inc %i0
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
20069e4: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
BSP_output_char(chr);
20069e8: c2 05 21 4c ld [ %l4 + 0x14c ], %g1
20069ec: 91 2a 20 18 sll %o0, 0x18, %o0
20069f0: 9f c0 40 00 call %g1
20069f4: 91 3a 20 18 sra %o0, 0x18, %o0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
20069f8: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
20069fc: b2 06 60 04 add %i1, 4, %i1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2006a00: 83 28 60 18 sll %g1, 0x18, %g1
2006a04: 80 a0 60 00 cmp %g1, 0
2006a08: 12 bf ff 4f bne 2006744 <vprintk+0x28> <== ALWAYS TAKEN
2006a0c: b0 06 20 01 inc %i0
2006a10: 30 80 00 47 b,a 2006b2c <vprintk+0x410> <== NOT EXECUTED
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
2006a14: f6 06 40 00 ld [ %i1 ], %i3
if ( str == NULL ) {
2006a18: 80 a6 e0 00 cmp %i3, 0
2006a1c: 02 80 00 5a be 2006b84 <vprintk+0x468>
2006a20: b2 06 60 04 add %i1, 4, %i1
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2006a24: c2 4e c0 00 ldsb [ %i3 ], %g1
2006a28: 80 a0 60 00 cmp %g1, 0
2006a2c: 02 80 00 08 be 2006a4c <vprintk+0x330>
2006a30: b4 10 20 00 clr %i2
2006a34: 82 10 00 1b mov %i3, %g1
2006a38: 82 00 60 01 inc %g1
2006a3c: c4 48 40 00 ldsb [ %g1 ], %g2
2006a40: 80 a0 a0 00 cmp %g2, 0
2006a44: 12 bf ff fd bne 2006a38 <vprintk+0x31c>
2006a48: b4 06 a0 01 inc %i2
;
/* leading spaces */
if ( !minus )
2006a4c: a4 8c a0 ff andcc %l2, 0xff, %l2
2006a50: 12 80 00 0f bne 2006a8c <vprintk+0x370>
2006a54: 80 a7 60 00 cmp %i5, 0
for ( i=len ; i<width ; i++ )
2006a58: 80 a7 40 1a cmp %i5, %i2
2006a5c: 08 80 00 0c bleu 2006a8c <vprintk+0x370>
2006a60: 80 a7 60 00 cmp %i5, 0
2006a64: a0 10 00 1a mov %i2, %l0
2006a68: b8 15 21 4c or %l4, 0x14c, %i4
BSP_output_char(' ');
2006a6c: c2 07 00 00 ld [ %i4 ], %g1
2006a70: 9f c0 40 00 call %g1
2006a74: 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++ )
2006a78: a0 04 20 01 inc %l0
2006a7c: 80 a7 40 10 cmp %i5, %l0
2006a80: 38 bf ff fc bgu,a 2006a70 <vprintk+0x354>
2006a84: c2 07 00 00 ld [ %i4 ], %g1
BSP_output_char(' ');
/* no width option */
if (width == 0) {
2006a88: 80 a7 60 00 cmp %i5, 0
2006a8c: 32 80 00 07 bne,a 2006aa8 <vprintk+0x38c>
2006a90: d0 4e c0 00 ldsb [ %i3 ], %o0
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2006a94: 80 a6 a0 00 cmp %i2, 0
2006a98: 02 80 00 13 be 2006ae4 <vprintk+0x3c8>
2006a9c: 80 a4 a0 00 cmp %l2, 0
2006aa0: ba 10 00 1a mov %i2, %i5
2006aa4: d0 4e c0 00 ldsb [ %i3 ], %o0
2006aa8: 80 a2 20 00 cmp %o0, 0
2006aac: 02 80 00 0d be 2006ae0 <vprintk+0x3c4> <== NEVER TAKEN
2006ab0: c2 05 21 4c ld [ %l4 + 0x14c ], %g1
BSP_output_char(*str);
2006ab4: 9f c0 40 00 call %g1
2006ab8: b8 15 21 4c or %l4, 0x14c, %i4
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2006abc: 10 80 00 05 b 2006ad0 <vprintk+0x3b4>
2006ac0: b6 06 e0 01 inc %i3
BSP_output_char(*str);
2006ac4: c2 07 00 00 ld [ %i4 ], %g1
2006ac8: 9f c0 40 00 call %g1
2006acc: 01 00 00 00 nop
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2006ad0: d0 4e c0 00 ldsb [ %i3 ], %o0
2006ad4: 80 a2 20 00 cmp %o0, 0
2006ad8: 12 bf ff fb bne 2006ac4 <vprintk+0x3a8>
2006adc: b6 06 e0 01 inc %i3
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
2006ae0: 80 a4 a0 00 cmp %l2, 0
2006ae4: 22 bf ff 8b be,a 2006910 <vprintk+0x1f4>
2006ae8: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
for ( i=len ; i<width ; i++ )
2006aec: 80 a6 80 1d cmp %i2, %i5
2006af0: 3a bf ff 88 bcc,a 2006910 <vprintk+0x1f4>
2006af4: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2006af8: b8 15 21 4c or %l4, 0x14c, %i4
BSP_output_char(' ');
2006afc: c2 07 00 00 ld [ %i4 ], %g1
2006b00: 9f c0 40 00 call %g1
2006b04: 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++ )
2006b08: b4 06 a0 01 inc %i2
2006b0c: 80 a6 80 1d cmp %i2, %i5
2006b10: 2a bf ff fc bcs,a 2006b00 <vprintk+0x3e4>
2006b14: c2 07 00 00 ld [ %i4 ], %g1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2006b18: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2006b1c: 83 28 60 18 sll %g1, 0x18, %g1
2006b20: 80 a0 60 00 cmp %g1, 0
2006b24: 12 bf ff 08 bne 2006744 <vprintk+0x28> <== ALWAYS TAKEN
2006b28: b0 06 20 01 inc %i0
2006b2c: 81 c7 e0 08 ret
2006b30: 81 e8 00 00 restore
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
2006b34: 9f c0 40 00 call %g1
2006b38: 90 10 20 2d mov 0x2d, %o0
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
2006b3c: 80 a0 00 1d cmp %g0, %i5
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
2006b40: b4 20 00 1a neg %i2
if (maxwidth) maxwidth--;
2006b44: ba 67 60 00 subx %i5, 0, %i5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
2006b48: 90 10 00 1a mov %i2, %o0
2006b4c: 92 10 00 10 mov %l0, %o1
2006b50: 40 00 4e 33 call 201a41c <.udiv>
2006b54: a4 10 00 10 mov %l0, %l2
2006b58: b8 92 20 00 orcc %o0, 0, %i4
2006b5c: 12 bf ff 44 bne 200686c <vprintk+0x150> <== ALWAYS TAKEN
2006b60: b6 10 20 00 clr %i3
2006b64: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
2006b68: b6 10 20 00 clr %i3 <== NOT EXECUTED
while ((n = unsigned_num / base) > 0) {
2006b6c: 10 bf ff 4c b 200689c <vprintk+0x180>
2006b70: b4 10 20 01 mov 1, %i2
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
2006b74: 10 bf ff 2c b 2006824 <vprintk+0x108>
2006b78: a0 10 20 0a mov 0xa, %l0
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
2006b7c: 10 bf ff 2a b 2006824 <vprintk+0x108>
2006b80: a0 10 20 10 mov 0x10, %l0
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
2006b84: 10 bf ff a8 b 2006a24 <vprintk+0x308>
2006b88: b6 15 e1 60 or %l7, 0x160, %i3
0201bea8 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
201bea8: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201beac: 03 00 80 7a sethi %hi(0x201e800), %g1
201beb0: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 201e88c <rtems_libio_number_iops>
201beb4: 80 a6 00 01 cmp %i0, %g1
201beb8: 1a 80 00 1e bcc 201bf30 <write+0x88>
201bebc: 03 00 80 7c sethi %hi(0x201f000), %g1
iop = rtems_libio_iop( fd );
201bec0: fa 00 62 f8 ld [ %g1 + 0x2f8 ], %i5 ! 201f2f8 <rtems_libio_iops>
201bec4: b1 2e 20 06 sll %i0, 6, %i0
201bec8: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
201becc: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201bed0: 80 88 61 00 btst 0x100, %g1
201bed4: 02 80 00 17 be 201bf30 <write+0x88>
201bed8: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201bedc: 02 80 00 1b be 201bf48 <write+0xa0> <== NEVER TAKEN
201bee0: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201bee4: 02 80 00 11 be 201bf28 <write+0x80>
201bee8: b0 10 20 00 clr %i0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
201beec: 80 88 60 04 btst 4, %g1
201bef0: 02 80 00 10 be 201bf30 <write+0x88>
201bef4: 90 10 00 1d mov %i5, %o0
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
201bef8: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
201befc: c2 00 60 0c ld [ %g1 + 0xc ], %g1
201bf00: 92 10 00 19 mov %i1, %o1
201bf04: 9f c0 40 00 call %g1
201bf08: 94 10 00 1a mov %i2, %o2
if ( rc > 0 )
201bf0c: b0 92 20 00 orcc %o0, 0, %i0
201bf10: 04 80 00 06 ble 201bf28 <write+0x80>
201bf14: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
201bf18: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201bf1c: 86 83 40 18 addcc %o5, %i0, %g3
201bf20: 84 43 00 02 addx %o4, %g2, %g2
201bf24: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
return rc;
}
201bf28: 81 c7 e0 08 ret
201bf2c: 81 e8 00 00 restore
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
201bf30: 7f ff d5 a8 call 20115d0 <__errno>
201bf34: b0 10 3f ff mov -1, %i0
201bf38: 82 10 20 09 mov 9, %g1
201bf3c: c2 22 00 00 st %g1, [ %o0 ]
201bf40: 81 c7 e0 08 ret
201bf44: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
201bf48: 7f ff d5 a2 call 20115d0 <__errno> <== NOT EXECUTED
201bf4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201bf50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201bf54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201bf58: 81 c7 e0 08 ret <== NOT EXECUTED
201bf5c: 81 e8 00 00 restore <== NOT EXECUTED
02007d34 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
2007d34: 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 );
2007d38: 03 00 80 7c sethi %hi(0x201f000), %g1
2007d3c: c2 00 63 4c ld [ %g1 + 0x34c ], %g1 ! 201f34c <rtems_libio_number_iops>
2007d40: 80 a6 00 01 cmp %i0, %g1
2007d44: 1a 80 00 50 bcc 2007e84 <writev+0x150>
2007d48: 03 00 80 7f sethi %hi(0x201fc00), %g1
iop = rtems_libio_iop( fd );
2007d4c: f6 00 61 b8 ld [ %g1 + 0x1b8 ], %i3 ! 201fdb8 <rtems_libio_iops>
2007d50: b1 2e 20 06 sll %i0, 6, %i0
2007d54: b6 06 c0 18 add %i3, %i0, %i3
rtems_libio_check_is_open( iop );
2007d58: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
2007d5c: 80 88 61 00 btst 0x100, %g1
2007d60: 02 80 00 49 be 2007e84 <writev+0x150>
2007d64: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2007d68: 02 80 00 47 be 2007e84 <writev+0x150> <== NEVER TAKEN
2007d6c: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
2007d70: 02 80 00 3f be 2007e6c <writev+0x138>
2007d74: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
2007d78: 04 80 00 3d ble 2007e6c <writev+0x138>
2007d7c: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2007d80: 14 80 00 3b bg 2007e6c <writev+0x138> <== NEVER TAKEN
2007d84: b5 2e a0 03 sll %i2, 3, %i2
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
2007d88: 82 10 20 00 clr %g1
2007d8c: ba 10 20 01 mov 1, %i5
2007d90: 84 10 20 00 clr %g2
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
2007d94: c6 06 40 01 ld [ %i1 + %g1 ], %g3
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
2007d98: b8 06 40 01 add %i1, %g1, %i4
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
2007d9c: 80 a0 e0 00 cmp %g3, 0
2007da0: 02 80 00 33 be 2007e6c <writev+0x138>
2007da4: 88 10 20 01 mov 1, %g4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
2007da8: c6 07 20 04 ld [ %i4 + 4 ], %g3
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
2007dac: 82 00 60 08 add %g1, 8, %g1
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
2007db0: 80 a0 00 03 cmp %g0, %g3
2007db4: b8 40 3f ff addx %g0, -1, %i4
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
2007db8: 86 80 c0 02 addcc %g3, %g2, %g3
2007dbc: 0c 80 00 2c bneg 2007e6c <writev+0x138>
2007dc0: ba 0f 40 1c and %i5, %i4, %i5
2007dc4: 80 a0 80 03 cmp %g2, %g3
2007dc8: 24 80 00 02 ble,a 2007dd0 <writev+0x9c>
2007dcc: 88 10 20 00 clr %g4
2007dd0: 80 89 20 ff btst 0xff, %g4
2007dd4: 12 80 00 26 bne 2007e6c <writev+0x138>
2007dd8: 80 a0 40 1a cmp %g1, %i2
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
2007ddc: 12 bf ff ee bne 2007d94 <writev+0x60>
2007de0: 84 10 00 03 mov %g3, %g2
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
2007de4: 80 8f 60 ff btst 0xff, %i5
2007de8: 12 80 00 1f bne 2007e64 <writev+0x130>
2007dec: b0 10 20 00 clr %i0
2007df0: 10 80 00 05 b 2007e04 <writev+0xd0>
2007df4: ba 10 20 00 clr %i5
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2007df8: 80 a7 40 1a cmp %i5, %i2
2007dfc: 02 80 00 26 be 2007e94 <writev+0x160>
2007e00: 01 00 00 00 nop
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
2007e04: b8 06 40 1d add %i1, %i5, %i4
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
2007e08: d4 07 20 04 ld [ %i4 + 4 ], %o2
2007e0c: 80 a2 a0 00 cmp %o2, 0
2007e10: 22 bf ff fa be,a 2007df8 <writev+0xc4> <== NEVER TAKEN
2007e14: ba 07 60 08 add %i5, 8, %i5 <== NOT EXECUTED
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
2007e18: c2 06 e0 24 ld [ %i3 + 0x24 ], %g1
2007e1c: d2 06 40 1d ld [ %i1 + %i5 ], %o1
2007e20: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2007e24: 9f c0 40 00 call %g1
2007e28: 90 10 00 1b mov %i3, %o0
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
2007e2c: 80 a2 20 00 cmp %o0, 0
2007e30: 06 80 00 1b bl 2007e9c <writev+0x168> <== NEVER TAKEN
2007e34: 01 00 00 00 nop
return -1;
if ( bytes > 0 ) {
2007e38: 02 80 00 07 be 2007e54 <writev+0x120> <== NEVER TAKEN
2007e3c: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
2007e40: c4 1e e0 10 ldd [ %i3 + 0x10 ], %g2
2007e44: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2007e48: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
2007e4c: 84 40 80 10 addx %g2, %l0, %g2
2007e50: c4 3e e0 10 std %g2, [ %i3 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
2007e54: c2 07 20 04 ld [ %i4 + 4 ], %g1
2007e58: 80 a2 00 01 cmp %o0, %g1
2007e5c: 02 bf ff e7 be 2007df8 <writev+0xc4> <== ALWAYS TAKEN
2007e60: ba 07 60 08 add %i5, 8, %i5
break;
}
return total;
}
2007e64: 81 c7 e0 08 ret
2007e68: 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 );
2007e6c: 40 00 29 3f call 2012368 <__errno>
2007e70: b0 10 3f ff mov -1, %i0
2007e74: 82 10 20 16 mov 0x16, %g1
2007e78: c2 22 00 00 st %g1, [ %o0 ]
2007e7c: 81 c7 e0 08 ret
2007e80: 81 e8 00 00 restore
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2007e84: 40 00 29 39 call 2012368 <__errno>
2007e88: b0 10 3f ff mov -1, %i0
2007e8c: 82 10 20 09 mov 9, %g1
2007e90: c2 22 00 00 st %g1, [ %o0 ]
2007e94: 81 c7 e0 08 ret
2007e98: 81 e8 00 00 restore
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
2007e9c: 81 c7 e0 08 ret <== NOT EXECUTED
2007ea0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED