RTEMS 4.11Annotated Report
Fri Jul 16 18:21:51 2010
300088ec <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 ) {
300088ec: e5902000 ldr r2, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300088f0: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
300088f4: e592204c ldr r2, [r2, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300088f8: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
300088fc: e2422001 sub r2, r2, #1
30008900: e3520006 cmp r2, #6
30008904: 979ff102 ldrls pc, [pc, r2, lsl #2]
30008908: ea000010 b 30008950 <IMFS_Set_handlers+0x64> <== NOT EXECUTED
3000890c: 30008928 .word 0x30008928 <== NOT EXECUTED
30008910: 30008930 .word 0x30008930 <== NOT EXECUTED
30008914: 30008938 .word 0x30008938 <== NOT EXECUTED
30008918: 30008938 .word 0x30008938 <== NOT EXECUTED
3000891c: 30008940 .word 0x30008940 <== NOT EXECUTED
30008920: 30008940 .word 0x30008940 <== NOT EXECUTED
30008924: 30008948 .word 0x30008948 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
30008928: e593300c ldr r3, [r3, #12]
3000892c: ea000006 b 3000894c <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
30008930: e59f3020 ldr r3, [pc, #32] ; 30008958 <IMFS_Set_handlers+0x6c>
30008934: ea000004 b 3000894c <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
30008938: e59f301c ldr r3, [pc, #28] ; 3000895c <IMFS_Set_handlers+0x70>
3000893c: ea000002 b 3000894c <IMFS_Set_handlers+0x60>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
30008940: e5933008 ldr r3, [r3, #8]
30008944: ea000000 b 3000894c <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
30008948: e5933010 ldr r3, [r3, #16]
3000894c: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
30008950: e3a00000 mov r0, #0
30008954: e12fff1e bx lr
30008774 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
30008774: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30008778: e2508000 subs r8, r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
3000877c: e1a04001 mov r4, r1
30008780: e59d5018 ldr r5, [sp, #24]
30008784: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30008788: 0a000043 beq 3000889c <IMFS_create_node+0x128>
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
3000878c: e5982010 ldr r2, [r8, #16]
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
30008790: e3540007 cmp r4, #7
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
30008794: e5987000 ldr r7, [r8]
fs_info = parent_loc->mt_entry->fs_info;
30008798: e5926034 ldr r6, [r2, #52] ; 0x34
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
3000879c: 1a000004 bne 300087b4 <IMFS_create_node+0x40>
300087a0: e5960010 ldr r0, [r6, #16]
300087a4: e59f20f8 ldr r2, [pc, #248] ; 300088a4 <IMFS_create_node+0x130>
300087a8: e1500002 cmp r0, r2
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
300087ac: 03a08000 moveq r8, #0
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
300087b0: 0a000039 beq 3000889c <IMFS_create_node+0x128>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
300087b4: e59f20ec ldr r2, [pc, #236] ; 300088a8 <IMFS_create_node+0x134>
300087b8: e1a00004 mov r0, r4
300087bc: e5922000 ldr r2, [r2]
300087c0: e592202c ldr r2, [r2, #44] ; 0x2c
300087c4: e1c32002 bic r2, r3, r2
300087c8: ebffffcc bl 30008700 <IMFS_allocate_node>
if ( !node )
300087cc: e2508000 subs r8, r0, #0
300087d0: 0a000031 beq 3000889c <IMFS_create_node+0x128>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
300087d4: e2444001 sub r4, r4, #1
300087d8: e3540006 cmp r4, #6
300087dc: 979ff104 ldrls pc, [pc, r4, lsl #2]
300087e0: ea000025 b 3000887c <IMFS_create_node+0x108> <== NOT EXECUTED
300087e4: 30008800 .word 0x30008800 <== NOT EXECUTED
300087e8: 30008824 .word 0x30008824 <== NOT EXECUTED
300087ec: 3000881c .word 0x3000881c <== NOT EXECUTED
300087f0: 3000881c .word 0x3000881c <== NOT EXECUTED
300087f4: 30008850 .word 0x30008850 <== NOT EXECUTED
300087f8: 30008838 .word 0x30008838 <== NOT EXECUTED
300087fc: 30008874 .word 0x30008874 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30008800: e2883054 add r3, r8, #84 ; 0x54
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30008804: e5883050 str r3, [r8, #80] ; 0x50
the_chain->permanent_null = NULL;
30008808: e3a03000 mov r3, #0
3000880c: e5883054 str r3, [r8, #84] ; 0x54
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
30008810: e2883050 add r3, r8, #80 ; 0x50
the_chain->last = _Chain_Head(the_chain);
30008814: e5883058 str r3, [r8, #88] ; 0x58
30008818: ea000017 b 3000887c <IMFS_create_node+0x108>
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
3000881c: e5953000 ldr r3, [r5]
30008820: ea000014 b 30008878 <IMFS_create_node+0x104>
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
30008824: e5953000 ldr r3, [r5]
30008828: e5883050 str r3, [r8, #80] ; 0x50
node->info.device.minor = info->device.minor;
3000882c: e5953004 ldr r3, [r5, #4]
30008830: e5883054 str r3, [r8, #84] ; 0x54
break;
30008834: ea000010 b 3000887c <IMFS_create_node+0x108>
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
30008838: e3a03000 mov r3, #0
3000883c: e3a04000 mov r4, #0
30008840: e5883050 str r3, [r8, #80] ; 0x50
30008844: e5884054 str r4, [r8, #84] ; 0x54
node->info.linearfile.direct = 0;
30008848: e3a03000 mov r3, #0
3000884c: e5883058 str r3, [r8, #88] ; 0x58
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
30008850: e3a03000 mov r3, #0
30008854: e3a04000 mov r4, #0
30008858: e5883050 str r3, [r8, #80] ; 0x50
3000885c: e5884054 str r4, [r8, #84] ; 0x54
node->info.file.indirect = 0;
30008860: e3a03000 mov r3, #0
30008864: e5883058 str r3, [r8, #88] ; 0x58
node->info.file.doubly_indirect = 0;
30008868: e588305c str r3, [r8, #92] ; 0x5c
node->info.file.triply_indirect = 0;
3000886c: e5883060 str r3, [r8, #96] ; 0x60
break;
30008870: ea000001 b 3000887c <IMFS_create_node+0x108>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
30008874: e3a03000 mov r3, #0
30008878: e5883050 str r3, [r8, #80] ; 0x50
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
3000887c: e5963004 ldr r3, [r6, #4]
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
30008880: e5887008 str r7, [r8, #8]
node->st_ino = ++fs_info->ino_count;
30008884: e2833001 add r3, r3, #1
30008888: e5863004 str r3, [r6, #4]
3000888c: e2870050 add r0, r7, #80 ; 0x50
30008890: e5883038 str r3, [r8, #56] ; 0x38
30008894: e1a01008 mov r1, r8
30008898: ebfff42b bl 3000594c <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
3000889c: e1a00008 mov r0, r8
300088a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
300089e0 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
300089e0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
300089e4: e24dd040 sub sp, sp, #64 ; 0x40
300089e8: e1a0a000 mov sl, r0
300089ec: e1a06001 mov r6, r1
300089f0: e58d2000 str r2, [sp]
300089f4: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
300089f8: e5935000 ldr r5, [r3]
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
300089fc: e3a09001 mov r9, #1
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
30008a00: e3a07000 mov r7, #0
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
30008a04: ea000063 b 30008b98 <IMFS_eval_path+0x1b8>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
30008a08: e08a0007 add r0, sl, r7
30008a0c: e1a01006 mov r1, r6
30008a10: e28d2004 add r2, sp, #4
30008a14: e28d303c add r3, sp, #60 ; 0x3c
30008a18: eb0001d7 bl 3000917c <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30008a1c: e594b000 ldr fp, [r4]
* 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 );
30008a20: e1a09000 mov r9, r0
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30008a24: e35b0000 cmp fp, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30008a28: e59d803c ldr r8, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30008a2c: 0a000051 beq 30008b78 <IMFS_eval_path+0x198>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30008a30: e3500000 cmp r0, #0
30008a34: 0a000006 beq 30008a54 <IMFS_eval_path+0x74>
if ( node->type == IMFS_DIRECTORY )
30008a38: e595104c ldr r1, [r5, #76] ; 0x4c
30008a3c: e3510001 cmp r1, #1
30008a40: 1a000003 bne 30008a54 <IMFS_eval_path+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30008a44: e1a00004 mov r0, r4
30008a48: ebffffc4 bl 30008960 <IMFS_evaluate_permission>
30008a4c: e3500000 cmp r0, #0
30008a50: 0a000077 beq 30008c34 <IMFS_eval_path+0x254>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
30008a54: e3590003 cmp r9, #3
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30008a58: e0686006 rsb r6, r8, r6
i += len;
30008a5c: e0877008 add r7, r7, r8
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 );
node = pathloc->node_access;
30008a60: e1a0500b mov r5, fp
switch( type ) {
30008a64: 0a000022 beq 30008af4 <IMFS_eval_path+0x114>
30008a68: e3590004 cmp r9, #4
30008a6c: 0a000046 beq 30008b8c <IMFS_eval_path+0x1ac>
30008a70: e3590002 cmp r9, #2
30008a74: 1a000047 bne 30008b98 <IMFS_eval_path+0x1b8>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30008a78: e59f21d0 ldr r2, [pc, #464] ; 30008c50 <IMFS_eval_path+0x270>
30008a7c: e5923000 ldr r3, [r2]
30008a80: e5933018 ldr r3, [r3, #24]
30008a84: e15b0003 cmp fp, r3
30008a88: 0a000042 beq 30008b98 <IMFS_eval_path+0x1b8>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
30008a8c: e594c010 ldr ip, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
30008a90: e59c301c ldr r3, [ip, #28]
30008a94: e15b0003 cmp fp, r3
30008a98: 1a00000f bne 30008adc <IMFS_eval_path+0xfc>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008a9c: e28de028 add lr, sp, #40 ; 0x28
30008aa0: e28cc008 add ip, ip, #8
30008aa4: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008aa8: e8ae000f stmia lr!, {r0, r1, r2, r3}
30008aac: e59c5000 ldr r5, [ip]
*pathloc = newloc;
30008ab0: e28dc028 add ip, sp, #40 ; 0x28
30008ab4: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008ab8: e1a0c004 mov ip, r4
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008abc: e58e5000 str r5, [lr]
*pathloc = newloc;
30008ac0: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
30008ac4: e0680007 rsb r0, r8, r7
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
30008ac8: e58c5000 str r5, [ip]
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
30008acc: e594c00c ldr ip, [r4, #12]
30008ad0: e08a0000 add r0, sl, r0
30008ad4: e0881006 add r1, r8, r6
30008ad8: ea000047 b 30008bfc <IMFS_eval_path+0x21c>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
30008adc: e59b5008 ldr r5, [fp, #8]
30008ae0: e3550000 cmp r5, #0
30008ae4: 1a000026 bne 30008b84 <IMFS_eval_path+0x1a4>
rtems_set_errno_and_return_minus_one( ENOENT );
30008ae8: eb000cb9 bl 3000bdd4 <__errno>
30008aec: e5809000 str r9, [r0]
30008af0: ea000052 b 30008c40 <IMFS_eval_path+0x260>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
30008af4: e59b304c ldr r3, [fp, #76] ; 0x4c
30008af8: e3530003 cmp r3, #3
30008afc: 1a000006 bne 30008b1c <IMFS_eval_path+0x13c>
IMFS_evaluate_hard_link( pathloc, 0 );
30008b00: e1a00004 mov r0, r4
30008b04: e3a01000 mov r1, #0
30008b08: ebffff9c bl 30008980 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
30008b0c: e5945000 ldr r5, [r4]
if ( !node )
30008b10: e3550000 cmp r5, #0
30008b14: 1a000009 bne 30008b40 <IMFS_eval_path+0x160>
30008b18: ea00000b b 30008b4c <IMFS_eval_path+0x16c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
30008b1c: e3530004 cmp r3, #4
30008b20: 1a000006 bne 30008b40 <IMFS_eval_path+0x160>
result = IMFS_evaluate_sym_link( pathloc, 0 );
30008b24: e1a00004 mov r0, r4
30008b28: e3a01000 mov r1, #0
30008b2c: eb000048 bl 30008c54 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
30008b30: e3700001 cmn r0, #1
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
30008b34: e1a08000 mov r8, r0
node = pathloc->node_access;
30008b38: e5945000 ldr r5, [r4]
if ( result == -1 )
30008b3c: 0a000040 beq 30008c44 <IMFS_eval_path+0x264>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30008b40: e595304c ldr r3, [r5, #76] ; 0x4c
30008b44: e3530001 cmp r3, #1
30008b48: 0a000002 beq 30008b58 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30008b4c: eb000ca0 bl 3000bdd4 <__errno>
30008b50: e3a03014 mov r3, #20
30008b54: ea000038 b 30008c3c <IMFS_eval_path+0x25c>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
30008b58: e595e05c ldr lr, [r5, #92] ; 0x5c
30008b5c: e35e0000 cmp lr, #0
30008b60: 1a000015 bne 30008bbc <IMFS_eval_path+0x1dc>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30008b64: e1a00005 mov r0, r5
30008b68: e28d1004 add r1, sp, #4
30008b6c: eb00015e bl 300090ec <IMFS_find_match_in_dir>
if ( !node )
30008b70: e2505000 subs r5, r0, #0
30008b74: 1a000002 bne 30008b84 <IMFS_eval_path+0x1a4>
rtems_set_errno_and_return_minus_one( ENOENT );
30008b78: eb000c95 bl 3000bdd4 <__errno>
30008b7c: e3a03002 mov r3, #2
30008b80: ea00002d b 30008c3c <IMFS_eval_path+0x25c>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
30008b84: e5845000 str r5, [r4]
30008b88: ea000002 b 30008b98 <IMFS_eval_path+0x1b8>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30008b8c: eb000c90 bl 3000bdd4 <__errno>
30008b90: e3a0305b mov r3, #91 ; 0x5b
30008b94: ea000028 b 30008c3c <IMFS_eval_path+0x25c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
30008b98: e3590004 cmp r9, #4
30008b9c: 13590000 cmpne r9, #0
30008ba0: 1affff98 bne 30008a08 <IMFS_eval_path+0x28>
* 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 ) {
30008ba4: e595304c ldr r3, [r5, #76] ; 0x4c
30008ba8: e3530001 cmp r3, #1
30008bac: 1a000018 bne 30008c14 <IMFS_eval_path+0x234>
if ( node->info.directory.mt_fs != NULL ) {
30008bb0: e595e05c ldr lr, [r5, #92] ; 0x5c
30008bb4: e35e0000 cmp lr, #0
30008bb8: 0a000015 beq 30008c14 <IMFS_eval_path+0x234>
newloc = node->info.directory.mt_fs->mt_fs_root;
30008bbc: e28dc028 add ip, sp, #40 ; 0x28
30008bc0: e28ee01c add lr, lr, #28
30008bc4: e8be000f ldm lr!, {r0, r1, r2, r3}
30008bc8: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008bcc: e59ee000 ldr lr, [lr]
30008bd0: e58ce000 str lr, [ip]
*pathloc = newloc;
30008bd4: e28dc028 add ip, sp, #40 ; 0x28
30008bd8: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008bdc: e1a0c004 mov ip, r4
30008be0: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30008be4: e59d103c ldr r1, [sp, #60] ; 0x3c
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
30008be8: e58ce000 str lr, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30008bec: e0610007 rsb r0, r1, r7
30008bf0: e594c00c ldr ip, [r4, #12]
30008bf4: e08a0000 add r0, sl, r0
30008bf8: e0861001 add r1, r6, r1
30008bfc: e59d2000 ldr r2, [sp]
30008c00: e1a03004 mov r3, r4
30008c04: e1a0e00f mov lr, pc
30008c08: e59cf000 ldr pc, [ip]
30008c0c: e1a08000 mov r8, r0
30008c10: ea00000b b 30008c44 <IMFS_eval_path+0x264>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30008c14: e1a00004 mov r0, r4
30008c18: ebffff33 bl 300088ec <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30008c1c: e59d1000 ldr r1, [sp]
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30008c20: e1a08000 mov r8, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30008c24: e1a00004 mov r0, r4
30008c28: ebffff4c bl 30008960 <IMFS_evaluate_permission>
30008c2c: e3500000 cmp r0, #0
30008c30: 1a000003 bne 30008c44 <IMFS_eval_path+0x264>
rtems_set_errno_and_return_minus_one( EACCES );
30008c34: eb000c66 bl 3000bdd4 <__errno>
30008c38: e3a0300d mov r3, #13
30008c3c: e5803000 str r3, [r0]
30008c40: e3e08000 mvn r8, #0
return result;
}
30008c44: e1a00008 mov r0, r8
30008c48: e28dd040 add sp, sp, #64 ; 0x40
30008c4c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30008db8 <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 */
)
{
30008db8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30008dbc: e24dd040 sub sp, sp, #64 ; 0x40
30008dc0: e1a07000 mov r7, r0
30008dc4: e1a04001 mov r4, r1
30008dc8: e58d2000 str r2, [sp]
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30008dcc: e5916000 ldr r6, [r1]
/*
* Get the path length.
*/
pathlen = strlen( path );
30008dd0: eb000fef bl 3000cd94 <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
30008dd4: e3a05000 mov r5, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
30008dd8: e1a08000 mov r8, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30008ddc: e1a01008 mov r1, r8
30008de0: e0870005 add r0, r7, r5
30008de4: e28d2004 add r2, sp, #4
30008de8: e28d303c add r3, sp, #60 ; 0x3c
30008dec: eb0000e2 bl 3000917c <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
30008df0: e5949000 ldr r9, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
30008df4: e59da03c ldr sl, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30008df8: e3590000 cmp r9, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30008dfc: e1a0b000 mov fp, r0
pathlen -= len;
30008e00: e06a8008 rsb r8, sl, r8
i += len;
if ( !pathloc->node_access )
30008e04: 0a00006c beq 30008fbc <IMFS_evaluate_for_make+0x204>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30008e08: e3500000 cmp r0, #0
30008e0c: 0a000006 beq 30008e2c <IMFS_evaluate_for_make+0x74>
if ( node->type == IMFS_DIRECTORY )
30008e10: e596104c ldr r1, [r6, #76] ; 0x4c
30008e14: e3510001 cmp r1, #1
30008e18: 1a000003 bne 30008e2c <IMFS_evaluate_for_make+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30008e1c: e1a00004 mov r0, r4
30008e20: ebfffece bl 30008960 <IMFS_evaluate_permission>
30008e24: e3500000 cmp r0, #0
30008e28: 0a000078 beq 30009010 <IMFS_evaluate_for_make+0x258>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
30008e2c: e085500a add r5, r5, sl
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 );
node = pathloc->node_access;
30008e30: e1a06009 mov r6, r9
switch( type ) {
30008e34: e35b0004 cmp fp, #4
30008e38: 979ff10b ldrls pc, [pc, fp, lsl #2]
30008e3c: eaffffe6 b 30008ddc <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
30008e40: 30008f7c .word 0x30008f7c <== NOT EXECUTED
30008e44: 30008ddc .word 0x30008ddc <== NOT EXECUTED
30008e48: 30008e54 .word 0x30008e54 <== NOT EXECUTED
30008e4c: 30008ec0 .word 0x30008ec0 <== NOT EXECUTED
30008e50: 30008f88 .word 0x30008f88 <== NOT EXECUTED
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30008e54: e59f21d0 ldr r2, [pc, #464] ; 3000902c <IMFS_evaluate_for_make+0x274>
30008e58: e5923000 ldr r3, [r2]
30008e5c: e5933018 ldr r3, [r3, #24]
30008e60: e1590003 cmp r9, r3
30008e64: 0affffdc beq 30008ddc <IMFS_evaluate_for_make+0x24>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
30008e68: e594e010 ldr lr, [r4, #16]
30008e6c: e59e301c ldr r3, [lr, #28]
30008e70: e1590003 cmp r9, r3
30008e74: 1a00000d bne 30008eb0 <IMFS_evaluate_for_make+0xf8>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008e78: e28dc028 add ip, sp, #40 ; 0x28
30008e7c: e28ee008 add lr, lr, #8
30008e80: e8be000f ldm lr!, {r0, r1, r2, r3}
30008e84: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008e88: e59ee000 ldr lr, [lr]
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30008e8c: e06a5005 rsb r5, sl, r5
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008e90: e58ce000 str lr, [ip]
*pathloc = newloc;
30008e94: e28dc028 add ip, sp, #40 ; 0x28
30008e98: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008e9c: e1a0c004 mov ip, r4
30008ea0: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008ea4: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30008ea8: e594300c ldr r3, [r4, #12]
30008eac: ea000025 b 30008f48 <IMFS_evaluate_for_make+0x190>
}
} else {
if ( !node->Parent )
30008eb0: e5996008 ldr r6, [r9, #8]
30008eb4: e3560000 cmp r6, #0
30008eb8: 1a00002d bne 30008f74 <IMFS_evaluate_for_make+0x1bc>
30008ebc: ea00003e b 30008fbc <IMFS_evaluate_for_make+0x204>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
30008ec0: e599304c ldr r3, [r9, #76] ; 0x4c
30008ec4: e3530003 cmp r3, #3
30008ec8: 0a000001 beq 30008ed4 <IMFS_evaluate_for_make+0x11c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
30008ecc: e3530004 cmp r3, #4
30008ed0: 1a000005 bne 30008eec <IMFS_evaluate_for_make+0x134>
result = IMFS_evaluate_link( pathloc, 0 );
30008ed4: e1a00004 mov r0, r4
30008ed8: e3a01000 mov r1, #0
30008edc: ebffff88 bl 30008d04 <IMFS_evaluate_link>
if ( result == -1 )
30008ee0: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30008ee4: e1a06000 mov r6, r0
if ( result == -1 )
30008ee8: 0a00004c beq 30009020 <IMFS_evaluate_for_make+0x268>
return -1;
}
node = pathloc->node_access;
30008eec: e5940000 ldr r0, [r4]
if ( !node )
30008ef0: e3500000 cmp r0, #0
30008ef4: 0a00003d beq 30008ff0 <IMFS_evaluate_for_make+0x238>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30008ef8: e590304c ldr r3, [r0, #76] ; 0x4c
30008efc: e3530001 cmp r3, #1
30008f00: 1a00003a bne 30008ff0 <IMFS_evaluate_for_make+0x238>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
30008f04: e590e05c ldr lr, [r0, #92] ; 0x5c
30008f08: e35e0000 cmp lr, #0
30008f0c: 0a000014 beq 30008f64 <IMFS_evaluate_for_make+0x1ac>
newloc = node->info.directory.mt_fs->mt_fs_root;
30008f10: e28dc028 add ip, sp, #40 ; 0x28
30008f14: e28ee01c add lr, lr, #28
30008f18: e8be000f ldm lr!, {r0, r1, r2, r3}
30008f1c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008f20: e59ee000 ldr lr, [lr]
30008f24: e58ce000 str lr, [ip]
*pathloc = newloc;
30008f28: e28dc028 add ip, sp, #40 ; 0x28
30008f2c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008f30: e1a0c004 mov ip, r4
30008f34: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30008f38: e59d203c ldr r2, [sp, #60] ; 0x3c
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
30008f3c: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30008f40: e594300c ldr r3, [r4, #12]
30008f44: e0625005 rsb r5, r2, r5
30008f48: e0870005 add r0, r7, r5
30008f4c: e1a01004 mov r1, r4
30008f50: e59d2000 ldr r2, [sp]
30008f54: e1a0e00f mov lr, pc
30008f58: e593f004 ldr pc, [r3, #4]
30008f5c: e1a06000 mov r6, r0
30008f60: ea00002e b 30009020 <IMFS_evaluate_for_make+0x268>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30008f64: e28d1004 add r1, sp, #4
30008f68: eb00005f bl 300090ec <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
30008f6c: e2506000 subs r6, r0, #0
30008f70: 0a000007 beq 30008f94 <IMFS_evaluate_for_make+0x1dc>
done = true;
else
pathloc->node_access = node;
30008f74: e5846000 str r6, [r4]
30008f78: eaffff97 b 30008ddc <IMFS_evaluate_for_make+0x24>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
30008f7c: eb000b94 bl 3000bdd4 <__errno>
30008f80: e3a03011 mov r3, #17
30008f84: ea000023 b 30009018 <IMFS_evaluate_for_make+0x260>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30008f88: eb000b91 bl 3000bdd4 <__errno>
30008f8c: e3a0305b mov r3, #91 ; 0x5b
30008f90: ea000020 b 30009018 <IMFS_evaluate_for_make+0x260>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
30008f94: e59d303c ldr r3, [sp, #60] ; 0x3c
30008f98: e59d2000 ldr r2, [sp]
30008f9c: e0633005 rsb r3, r3, r5
30008fa0: e0873003 add r3, r7, r3
30008fa4: e5823000 str r3, [r2]
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
30008fa8: e0875005 add r5, r7, r5
/*
* 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++) {
30008fac: ea000005 b 30008fc8 <IMFS_evaluate_for_make+0x210>
if ( !IMFS_is_separator( path[ i ] ) )
30008fb0: ebffe72f bl 30002c74 <rtems_filesystem_is_separator>
30008fb4: e3500000 cmp r0, #0
30008fb8: 1a000002 bne 30008fc8 <IMFS_evaluate_for_make+0x210>
rtems_set_errno_and_return_minus_one( ENOENT );
30008fbc: eb000b84 bl 3000bdd4 <__errno>
30008fc0: e3a03002 mov r3, #2
30008fc4: ea000013 b 30009018 <IMFS_evaluate_for_make+0x260>
/*
* 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++) {
30008fc8: e4d50001 ldrb r0, [r5], #1
30008fcc: e3500000 cmp r0, #0
30008fd0: 1afffff6 bne 30008fb0 <IMFS_evaluate_for_make+0x1f8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30008fd4: e1a00004 mov r0, r4
30008fd8: ebfffe43 bl 300088ec <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30008fdc: e5943000 ldr r3, [r4]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30008fe0: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30008fe4: e593304c ldr r3, [r3, #76] ; 0x4c
30008fe8: e3530001 cmp r3, #1
30008fec: 0a000002 beq 30008ffc <IMFS_evaluate_for_make+0x244>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30008ff0: eb000b77 bl 3000bdd4 <__errno>
30008ff4: e3a03014 mov r3, #20
30008ff8: ea000006 b 30009018 <IMFS_evaluate_for_make+0x260>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
30008ffc: e1a00004 mov r0, r4
30009000: e3a01003 mov r1, #3
30009004: ebfffe55 bl 30008960 <IMFS_evaluate_permission>
30009008: e3500000 cmp r0, #0
3000900c: 1a000003 bne 30009020 <IMFS_evaluate_for_make+0x268>
rtems_set_errno_and_return_minus_one( EACCES );
30009010: eb000b6f bl 3000bdd4 <__errno>
30009014: e3a0300d mov r3, #13
30009018: e5803000 str r3, [r0]
3000901c: e3e06000 mvn r6, #0
return result;
}
30009020: e1a00006 mov r0, r6
30009024: e28dd040 add sp, sp, #64 ; 0x40
30009028: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30008980 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
IMFS_jnode_t *jnode = node->node_access;
30008980: e5903000 ldr r3, [r0]
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30008984: e92d4030 push {r4, r5, lr}
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
30008988: e593204c ldr r2, [r3, #76] ; 0x4c
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
3000898c: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
30008990: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30008994: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
30008998: 159f003c ldrne r0, [pc, #60] ; 300089dc <IMFS_evaluate_hard_link+0x5c>
3000899c: 1bfff33f blne 300056a0 <rtems_fatal_error_occurred>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
300089a0: e5933050 ldr r3, [r3, #80] ; 0x50
300089a4: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
300089a8: ebffffcf bl 300088ec <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
300089ac: e1a00004 mov r0, r4
300089b0: e1a01005 mov r1, r5
300089b4: ebffffe9 bl 30008960 <IMFS_evaluate_permission>
300089b8: e3500000 cmp r0, #0
300089bc: 1a000004 bne 300089d4 <IMFS_evaluate_hard_link+0x54>
rtems_set_errno_and_return_minus_one( EACCES );
300089c0: eb000d03 bl 3000bdd4 <__errno> <== NOT EXECUTED
300089c4: e3a0300d mov r3, #13 <== NOT EXECUTED
300089c8: e5803000 str r3, [r0] <== NOT EXECUTED
300089cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
300089d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
return result;
300089d4: e3a00000 mov r0, #0
}
300089d8: e8bd8030 pop {r4, r5, pc}
30008c54 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30008c54: e92d4071 push {r0, r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
30008c58: e5906000 ldr r6, [r0]
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30008c5c: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30008c60: e596304c ldr r3, [r6, #76] ; 0x4c
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30008c64: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30008c68: e3530004 cmp r3, #4
rtems_fatal_error_occurred (0xABCD0000);
30008c6c: 159f0088 ldrne r0, [pc, #136] ; 30008cfc <IMFS_evaluate_sym_link+0xa8>
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30008c70: 1a000003 bne 30008c84 <IMFS_evaluate_sym_link+0x30>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
30008c74: e5963008 ldr r3, [r6, #8]
30008c78: e3530000 cmp r3, #0
30008c7c: 1a000001 bne 30008c88 <IMFS_evaluate_sym_link+0x34>
rtems_fatal_error_occurred( 0xBAD00000 );
30008c80: e59f0078 ldr r0, [pc, #120] ; 30008d00 <IMFS_evaluate_sym_link+0xac><== NOT EXECUTED
30008c84: ebfff285 bl 300056a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
30008c88: e5960050 ldr r0, [r6, #80] ; 0x50
30008c8c: e1a0100d mov r1, sp
30008c90: e1a02004 mov r2, r4
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
30008c94: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
30008c98: eb000351 bl 300099e4 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
30008c9c: e59d3000 ldr r3, [sp]
30008ca0: e5966050 ldr r6, [r6, #80] ; 0x50
30008ca4: e0866003 add r6, r6, r3
30008ca8: e1a00006 mov r0, r6
30008cac: eb001038 bl 3000cd94 <strlen>
30008cb0: e1a02005 mov r2, r5
30008cb4: e1a01000 mov r1, r0
30008cb8: e1a03004 mov r3, r4
30008cbc: e1a00006 mov r0, r6
30008cc0: ebffff46 bl 300089e0 <IMFS_eval_path>
30008cc4: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
30008cc8: e1a00004 mov r0, r4
30008ccc: ebffff06 bl 300088ec <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
30008cd0: e1a00004 mov r0, r4
30008cd4: e1a01005 mov r1, r5
30008cd8: ebffff20 bl 30008960 <IMFS_evaluate_permission>
30008cdc: e3500000 cmp r0, #0
30008ce0: 1a000003 bne 30008cf4 <IMFS_evaluate_sym_link+0xa0>
rtems_set_errno_and_return_minus_one( EACCES );
30008ce4: eb000c3a bl 3000bdd4 <__errno> <== NOT EXECUTED
30008ce8: e3a0300d mov r3, #13 <== NOT EXECUTED
30008cec: e5803000 str r3, [r0] <== NOT EXECUTED
30008cf0: e3e06000 mvn r6, #0 <== NOT EXECUTED
return result;
}
30008cf4: e1a00006 mov r0, r6
30008cf8: e8bd8078 pop {r3, r4, r5, r6, pc}
30002258 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
30002258: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
3000225c: e5905018 ldr r5, [r0, #24]
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
30002260: e1a04000 mov r4, r0
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
30002264: e1a01004 mov r1, r4
30002268: e2850050 add r0, r5, #80 ; 0x50
3000226c: eb002226 bl 3000ab0c <pipe_release>
if (err == 0) {
30002270: e2506000 subs r6, r0, #0
30002274: 1a000005 bne 30002290 <IMFS_fifo_close+0x38>
iop->flags &= ~LIBIO_FLAGS_OPEN;
30002278: e5943014 ldr r3, [r4, #20]
IMFS_check_node_remove(jnode);
3000227c: e1a00005 mov r0, r5
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
30002280: e3c33c01 bic r3, r3, #256 ; 0x100
30002284: e5843014 str r3, [r4, #20]
IMFS_check_node_remove(jnode);
30002288: eb000182 bl 30002898 <IMFS_check_node_remove>
3000228c: ea000004 b 300022a4 <IMFS_fifo_close+0x4c>
}
IMFS_FIFO_RETURN(err);
30002290: aa000003 bge 300022a4 <IMFS_fifo_close+0x4c> <== NOT EXECUTED
30002294: eb002c32 bl 3000d364 <__errno> <== NOT EXECUTED
30002298: e2666000 rsb r6, r6, #0 <== NOT EXECUTED
3000229c: e5806000 str r6, [r0] <== NOT EXECUTED
300022a0: e3e06000 mvn r6, #0 <== NOT EXECUTED
}
300022a4: e1a00006 mov r0, r6
300022a8: e8bd8070 pop {r4, r5, r6, pc}
30009030 <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
)
{
30009030: e92d4070 push {r4, r5, r6, lr}
/*
* 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;
30009034: e1a0c000 mov ip, r0
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009038: e24dd014 sub sp, sp, #20
/*
* 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;
3000903c: e5bc401c ldr r4, [ip, #28]!
loc = temp_mt_entry->mt_fs_root;
30009040: e1a0e00d mov lr, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009044: e1a05000 mov r5, r0
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
30009048: e8bc000f ldm ip!, {r0, r1, r2, r3}
3000904c: e8ae000f stmia lr!, {r0, r1, r2, r3}
30009050: e59c3000 ldr r3, [ip]
30009054: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
30009058: e3a03000 mov r3, #0
3000905c: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
30009060: e1a0500d mov r5, sp
30009064: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
30009068: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
3000906c: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
30009070: ebfffe1d bl 300088ec <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
30009074: e594304c ldr r3, [r4, #76] ; 0x4c
30009078: e3530001 cmp r3, #1
3000907c: 1a000003 bne 30009090 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
30009080: e5942050 ldr r2, [r4, #80] ; 0x50
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30009084: e2843054 add r3, r4, #84 ; 0x54
30009088: e1520003 cmp r2, r3
3000908c: 1a000005 bne 300090a8 <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
30009090: e3a00000 mov r0, #0
30009094: e1a0100d mov r1, sp
30009098: ebffe236 bl 30001978 <IMFS_unlink>
if (result != 0)
3000909c: e3500000 cmp r0, #0
300090a0: 1a00000c bne 300090d8 <IMFS_fsunmount+0xa8>
return -1;
jnode = next;
300090a4: e1a04006 mov r4, r6
}
if ( jnode != NULL ) {
300090a8: e3540000 cmp r4, #0
300090ac: 0a00000b beq 300090e0 <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
300090b0: e594304c ldr r3, [r4, #76] ; 0x4c
300090b4: e3530001 cmp r3, #1
300090b8: 1affffe9 bne 30009064 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
300090bc: e5943050 ldr r3, [r4, #80] ; 0x50
300090c0: e2842054 add r2, r4, #84 ; 0x54
300090c4: e1530002 cmp r3, r2
300090c8: 0affffe5 beq 30009064 <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
300090cc: e2534000 subs r4, r3, #0
300090d0: 1affffe3 bne 30009064 <IMFS_fsunmount+0x34>
300090d4: ea000001 b 300090e0 <IMFS_fsunmount+0xb0> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
300090d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300090dc: ea000000 b 300090e4 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
300090e0: e1a00004 mov r0, r4
}
300090e4: e28dd014 add sp, sp, #20
300090e8: e8bd8070 pop {r4, r5, r6, pc}
30001594 <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
)
{
30001594: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30001598: e1a07003 mov r7, r3
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
3000159c: e59f30cc ldr r3, [pc, #204] ; 30001670 <IMFS_initialize_support+0xdc>
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
)
{
300015a0: e1a0a001 mov sl, r1
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
300015a4: e5933000 ldr r3, [r3]
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
)
{
300015a8: e1a08002 mov r8, r2
300015ac: e1a04000 mov r4, r0
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
300015b0: e3a01006 mov r1, #6
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
300015b4: e3a02010 mov r2, #16
300015b8: e1520003 cmp r2, r3
300015bc: 0a000003 beq 300015d0 <IMFS_initialize_support+0x3c>
300015c0: e2511001 subs r1, r1, #1
300015c4: e1a02082 lsl r2, r2, #1
300015c8: 1afffffa bne 300015b8 <IMFS_initialize_support+0x24>
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
300015cc: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
300015d0: e59f609c ldr r6, [pc, #156] ; 30001674 <IMFS_initialize_support+0xe0>
300015d4: e5863000 str r3, [r6]
/*
* 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();
300015d8: eb001cb3 bl 300088ac <IMFS_create_root_node>
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;
300015dc: e59fe094 ldr lr, [pc, #148] ; 30001678 <IMFS_initialize_support+0xe4>
300015e0: e284c038 add ip, r4, #56 ; 0x38
/*
* 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();
300015e4: e584001c str r0, [r4, #28]
300015e8: e1a05000 mov r5, r0
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;
300015ec: e8be000f ldm lr!, {r0, r1, r2, r3}
300015f0: e8ac000f stmia ip!, {r0, r1, r2, r3}
300015f4: e8be000f ldm lr!, {r0, r1, r2, r3}
300015f8: e8ac000f stmia ip!, {r0, r1, r2, r3}
300015fc: e89e000f ldm lr, {r0, r1, r2, r3}
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
30001600: e5847024 str r7, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
30001604: e88c000f stm ip, {r0, r1, r2, r3}
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
30001608: e584a028 str sl, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
3000160c: e3a00001 mov r0, #1
30001610: e3a01014 mov r1, #20
30001614: eb0001a0 bl 30001c9c <calloc>
if ( !fs_info ) {
30001618: e3500000 cmp r0, #0
3000161c: 1a000006 bne 3000163c <IMFS_initialize_support+0xa8>
free(temp_mt_entry->mt_fs_root.node_access);
30001620: e1a00005 mov r0, r5 <== NOT EXECUTED
30001624: eb000217 bl 30001e88 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
30001628: eb0029e9 bl 3000bdd4 <__errno> <== NOT EXECUTED
3000162c: e3a0300c mov r3, #12 <== NOT EXECUTED
30001630: e5803000 str r3, [r0] <== NOT EXECUTED
30001634: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001638: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
3000163c: e5963004 ldr r3, [r6, #4]
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;
30001640: e5840034 str r0, [r4, #52] ; 0x34
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
30001644: e59d201c ldr r2, [sp, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
30001648: e5803000 str r3, [r0]
3000164c: e2833001 add r3, r3, #1
30001650: e5863004 str r3, [r6, #4]
fs_info->ino_count = 1;
30001654: e3a03001 mov r3, #1
30001658: e9800108 stmib r0, {r3, r8}
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
3000165c: e580700c str r7, [r0, #12]
fs_info->fifo_handlers = fifo_handlers;
30001660: e5802010 str r2, [r0, #16]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
30001664: e5853038 str r3, [r5, #56] ; 0x38
return 0;
30001668: e3a00000 mov r0, #0
}
3000166c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
3000167c <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
3000167c: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
30001680: e5903000 ldr r3, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001684: e24dd048 sub sp, sp, #72 ; 0x48
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
30001688: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
3000168c: e1d333b4 ldrh r3, [r3, #52] ; 0x34
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001690: e1a05001 mov r5, r1
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
30001694: e3530007 cmp r3, #7
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001698: e1a06002 mov r6, r2
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
3000169c: 9a000002 bls 300016ac <IMFS_link+0x30>
rtems_set_errno_and_return_minus_one( EMLINK );
300016a0: eb0029cb bl 3000bdd4 <__errno>
300016a4: e3a0301f mov r3, #31
300016a8: ea000012 b 300016f8 <IMFS_link+0x7c>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
300016ac: e1a00002 mov r0, r2
300016b0: eb002db7 bl 3000cd94 <strlen>
300016b4: e28d4004 add r4, sp, #4
300016b8: e1a01000 mov r1, r0
300016bc: e1a02004 mov r2, r4
300016c0: e28d3044 add r3, sp, #68 ; 0x44
300016c4: e1a00006 mov r0, r6
300016c8: eb001eab bl 3000917c <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
300016cc: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
300016d0: e58d3000 str r3, [sp]
300016d4: e1a00005 mov r0, r5
300016d8: e3a01003 mov r1, #3
300016dc: e1a02004 mov r2, r4
300016e0: e59f3050 ldr r3, [pc, #80] ; 30001738 <IMFS_link+0xbc>
300016e4: eb001c22 bl 30008774 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
300016e8: e3500000 cmp r0, #0
300016ec: 1a000004 bne 30001704 <IMFS_link+0x88>
rtems_set_errno_and_return_minus_one( ENOMEM );
300016f0: eb0029b7 bl 3000bdd4 <__errno> <== NOT EXECUTED
300016f4: e3a0300c mov r3, #12 <== NOT EXECUTED
300016f8: e5803000 str r3, [r0]
300016fc: e3e00000 mvn r0, #0
30001700: ea00000a b 30001730 <IMFS_link+0xb4>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001704: e59d3028 ldr r3, [sp, #40] ; 0x28
IMFS_update_ctime( info.hard_link.link_node );
30001708: e28d003c add r0, sp, #60 ; 0x3c
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
3000170c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
30001710: e3a01000 mov r1, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001714: e2822001 add r2, r2, #1
30001718: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
3000171c: eb000202 bl 30001f2c <gettimeofday>
30001720: e59d203c ldr r2, [sp, #60] ; 0x3c
30001724: e59d3028 ldr r3, [sp, #40] ; 0x28
return 0;
30001728: e3a00000 mov r0, #0
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
3000172c: e5832048 str r2, [r3, #72] ; 0x48
return 0;
}
30001730: e28dd048 add sp, sp, #72 ; 0x48
30001734: e8bd8070 pop {r4, r5, r6, pc}
3000aef8 <IMFS_memfile_extend>:
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000aef8: e59f3110 ldr r3, [pc, #272] ; 3000b010 <IMFS_memfile_extend+0x118>
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000aefc: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr}
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000af00: e593b000 ldr fp, [r3]
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000af04: e1a05002 mov r5, r2
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000af08: e1a0312b lsr r3, fp, #2
3000af0c: e2832001 add r2, r3, #1
3000af10: e0020293 mul r2, r3, r2
3000af14: e2822001 add r2, r2, #1
3000af18: e0030392 mul r3, r2, r3
3000af1c: e3a02000 mov r2, #0
3000af20: e2433001 sub r3, r3, #1
3000af24: e1520005 cmp r2, r5
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000af28: e1a04000 mov r4, r0
3000af2c: e1a06001 mov r6, r1
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000af30: e003039b mul r3, fp, r3
3000af34: ca000005 bgt 3000af50 <IMFS_memfile_extend+0x58>
3000af38: 1a000001 bne 3000af44 <IMFS_memfile_extend+0x4c>
3000af3c: e1530001 cmp r3, r1
3000af40: 8a000002 bhi 3000af50 <IMFS_memfile_extend+0x58>
rtems_set_errno_and_return_minus_one( EINVAL );
3000af44: eb0003a2 bl 3000bdd4 <__errno>
3000af48: e3a03016 mov r3, #22
3000af4c: ea000025 b 3000afe8 <IMFS_memfile_extend+0xf0>
if ( new_length <= the_jnode->info.file.size )
3000af50: e5948054 ldr r8, [r4, #84] ; 0x54
3000af54: e5947050 ldr r7, [r4, #80] ; 0x50
3000af58: e1550008 cmp r5, r8
3000af5c: ca000002 bgt 3000af6c <IMFS_memfile_extend+0x74>
3000af60: 1a000028 bne 3000b008 <IMFS_memfile_extend+0x110>
3000af64: e1560007 cmp r6, r7
3000af68: 9a000026 bls 3000b008 <IMFS_memfile_extend+0x110>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000af6c: e1a0cfcb asr ip, fp, #31
3000af70: e1a0300c mov r3, ip
3000af74: e1a0200b mov r2, fp
3000af78: e1a00006 mov r0, r6
3000af7c: e1a01005 mov r1, r5
3000af80: e58dc000 str ip, [sp]
3000af84: eb001439 bl 30010070 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000af88: e59dc000 ldr ip, [sp]
3000af8c: e1a01008 mov r1, r8
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000af90: e1a0a000 mov sl, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000af94: e1a0200b mov r2, fp
3000af98: e1a00007 mov r0, r7
3000af9c: e1a0300c mov r3, ip
3000afa0: eb001432 bl 30010070 <__divdi3>
3000afa4: e1a08000 mov r8, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000afa8: e1a07000 mov r7, r0
3000afac: ea000011 b 3000aff8 <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
3000afb0: e1a00004 mov r0, r4
3000afb4: e1a01007 mov r1, r7
3000afb8: ebffff56 bl 3000ad18 <IMFS_memfile_addblock>
3000afbc: e3500000 cmp r0, #0
3000afc0: 0a00000b beq 3000aff4 <IMFS_memfile_extend+0xfc>
3000afc4: ea000003 b 3000afd8 <IMFS_memfile_extend+0xe0> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
3000afc8: e1a01007 mov r1, r7 <== NOT EXECUTED
3000afcc: e1a00004 mov r0, r4 <== NOT EXECUTED
3000afd0: ebffffbe bl 3000aed0 <IMFS_memfile_remove_block> <== 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-- ) {
3000afd4: e2477001 sub r7, r7, #1 <== NOT EXECUTED
3000afd8: e1570008 cmp r7, r8 <== NOT EXECUTED
3000afdc: 2afffff9 bcs 3000afc8 <IMFS_memfile_extend+0xd0> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
3000afe0: eb00037b bl 3000bdd4 <__errno> <== NOT EXECUTED
3000afe4: e3a0301c mov r3, #28 <== NOT EXECUTED
3000afe8: e5803000 str r3, [r0]
3000afec: e3e00000 mvn r0, #0
3000aff0: ea000005 b 3000b00c <IMFS_memfile_extend+0x114>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000aff4: e2877001 add r7, r7, #1
3000aff8: e157000a cmp r7, sl
3000affc: 9affffeb bls 3000afb0 <IMFS_memfile_extend+0xb8>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
3000b000: e5846050 str r6, [r4, #80] ; 0x50
3000b004: e5845054 str r5, [r4, #84] ; 0x54
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
return 0;
3000b008: e3a00000 mov r0, #0
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
3000b00c: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc}
3000a910 <IMFS_memfile_get_block_pointer>:
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000a910: e59f31dc ldr r3, [pc, #476] ; 3000aaf4 <IMFS_memfile_get_block_pointer+0x1e4>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000a914: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000a918: e5935000 ldr r5, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000a91c: e1a04000 mov r4, r0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000a920: e1a05125 lsr r5, r5, #2
3000a924: e2453001 sub r3, r5, #1
3000a928: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000a92c: e1a06001 mov r6, r1
3000a930: e1a08002 mov r8, r2
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000a934: 8a00000e bhi 3000a974 <IMFS_memfile_get_block_pointer+0x64>
p = info->indirect;
if ( malloc_it ) {
3000a938: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
3000a93c: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
3000a940: 0a000007 beq 3000a964 <IMFS_memfile_get_block_pointer+0x54>
if ( !p ) {
3000a944: e3500000 cmp r0, #0
3000a948: 1a000003 bne 3000a95c <IMFS_memfile_get_block_pointer+0x4c>
p = memfile_alloc_block();
3000a94c: ebffffe2 bl 3000a8dc <memfile_alloc_block>
if ( !p )
3000a950: e3500000 cmp r0, #0
3000a954: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->indirect = p;
3000a958: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
3000a95c: e5940058 ldr r0, [r4, #88] ; 0x58
3000a960: ea000001 b 3000a96c <IMFS_memfile_get_block_pointer+0x5c>
}
if ( !p )
3000a964: e3500000 cmp r0, #0
3000a968: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return &info->indirect[ my_block ];
3000a96c: e0800106 add r0, r0, r6, lsl #2
3000a970: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
3000a974: e2853001 add r3, r5, #1
3000a978: e0030395 mul r3, r5, r3
3000a97c: e2432001 sub r2, r3, #1
3000a980: e1510002 cmp r1, r2
3000a984: 8a000021 bhi 3000aa10 <IMFS_memfile_get_block_pointer+0x100>
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
3000a988: e0656001 rsb r6, r5, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000a98c: e1a00006 mov r0, r6
3000a990: e1a01005 mov r1, r5
3000a994: eb001355 bl 3000f6f0 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000a998: e1a01005 mov r1, r5
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000a99c: e1a07000 mov r7, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000a9a0: e1a00006 mov r0, r6
3000a9a4: eb0012b9 bl 3000f490 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
3000a9a8: e3580000 cmp r8, #0
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000a9ac: e1a05000 mov r5, r0
p = info->doubly_indirect;
3000a9b0: e594005c ldr r0, [r4, #92] ; 0x5c
if ( malloc_it ) {
3000a9b4: 0a00000e beq 3000a9f4 <IMFS_memfile_get_block_pointer+0xe4>
if ( !p ) {
3000a9b8: e3500000 cmp r0, #0
3000a9bc: 1a000003 bne 3000a9d0 <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
3000a9c0: ebffffc5 bl 3000a8dc <memfile_alloc_block>
if ( !p )
3000a9c4: e3500000 cmp r0, #0
3000a9c8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->doubly_indirect = p;
3000a9cc: e584005c str r0, [r4, #92] ; 0x5c
}
p1 = (block_p *)p[ doubly ];
3000a9d0: e0804105 add r4, r0, r5, lsl #2
3000a9d4: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p1 ) {
3000a9d8: e3500000 cmp r0, #0
3000a9dc: 1a000009 bne 3000aa08 <IMFS_memfile_get_block_pointer+0xf8>
p1 = memfile_alloc_block();
3000a9e0: ebffffbd bl 3000a8dc <memfile_alloc_block>
if ( !p1 )
3000a9e4: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
3000a9e8: 15840000 strne r0, [r4]
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
3000a9ec: 1a000005 bne 3000aa08 <IMFS_memfile_get_block_pointer+0xf8>
3000a9f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
3000a9f4: e3500000 cmp r0, #0
3000a9f8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p = (block_p *)p[ doubly ];
3000a9fc: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p )
3000aa00: e3500000 cmp r0, #0
3000aa04: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
3000aa08: e0800107 add r0, r0, r7, lsl #2
3000aa0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000aa10: e2832001 add r2, r3, #1
3000aa14: e0020295 mul r2, r5, r2
3000aa18: e2422001 sub r2, r2, #1
3000aa1c: e1510002 cmp r1, r2
3000aa20: 8a000031 bhi 3000aaec <IMFS_memfile_get_block_pointer+0x1dc>
my_block -= FIRST_TRIPLY_INDIRECT;
3000aa24: e0636001 rsb r6, r3, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000aa28: e1a00006 mov r0, r6
3000aa2c: e1a01005 mov r1, r5
3000aa30: eb00132e bl 3000f6f0 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000aa34: e1a01005 mov r1, r5
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000aa38: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000aa3c: e1a00006 mov r0, r6
3000aa40: eb001292 bl 3000f490 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000aa44: e1a01005 mov r1, r5
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;
3000aa48: e1a06000 mov r6, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000aa4c: eb00128f bl 3000f490 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000aa50: e1a01005 mov r1, r5
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;
3000aa54: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000aa58: e1a00006 mov r0, r6
3000aa5c: eb001323 bl 3000f6f0 <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
3000aa60: e3580000 cmp r8, #0
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000aa64: e1a05000 mov r5, r0
p = info->triply_indirect;
3000aa68: e5940060 ldr r0, [r4, #96] ; 0x60
if ( malloc_it ) {
3000aa6c: 0a000016 beq 3000aacc <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
3000aa70: e3500000 cmp r0, #0
3000aa74: 1a000003 bne 3000aa88 <IMFS_memfile_get_block_pointer+0x178>
p = memfile_alloc_block();
3000aa78: ebffff97 bl 3000a8dc <memfile_alloc_block>
if ( !p )
3000aa7c: e3500000 cmp r0, #0
3000aa80: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->triply_indirect = p;
3000aa84: e5840060 str r0, [r4, #96] ; 0x60
}
p1 = (block_p *) p[ triply ];
3000aa88: e0804107 add r4, r0, r7, lsl #2
3000aa8c: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 ) {
3000aa90: e3500000 cmp r0, #0
3000aa94: 1a000003 bne 3000aaa8 <IMFS_memfile_get_block_pointer+0x198>
p1 = memfile_alloc_block();
3000aa98: ebffff8f bl 3000a8dc <memfile_alloc_block>
if ( !p1 )
3000aa9c: e3500000 cmp r0, #0
3000aaa0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p[ triply ] = (block_p) p1;
3000aaa4: e5840000 str r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
3000aaa8: e0804105 add r4, r0, r5, lsl #2
3000aaac: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 ) {
3000aab0: e3500000 cmp r0, #0
3000aab4: 1a00000a bne 3000aae4 <IMFS_memfile_get_block_pointer+0x1d4>
p2 = memfile_alloc_block();
3000aab8: ebffff87 bl 3000a8dc <memfile_alloc_block>
if ( !p2 )
3000aabc: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
3000aac0: 15840000 strne r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
3000aac4: 1a000006 bne 3000aae4 <IMFS_memfile_get_block_pointer+0x1d4>
3000aac8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
3000aacc: e3500000 cmp r0, #0
3000aad0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
3000aad4: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
3000aad8: e3500000 cmp r0, #0
3000aadc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000aae0: e7900105 ldr r0, [r0, r5, lsl #2]
3000aae4: e080010a add r0, r0, sl, lsl #2
3000aae8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* This means the requested block number is out of range.
*/
return 0;
3000aaec: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000aaf0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
3000aaf8 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000aaf8: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Error checks on arguments
*/
if ( !dest )
3000aafc: e2537000 subs r7, r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000ab00: e1a04000 mov r4, r0
3000ab04: e1a08001 mov r8, r1
3000ab08: e1a09002 mov r9, r2
3000ab0c: e59d6034 ldr r6, [sp, #52] ; 0x34
/*
* Error checks on arguments
*/
if ( !dest )
3000ab10: 0a000001 beq 3000ab1c <IMFS_memfile_read+0x24>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
3000ab14: e3560000 cmp r6, #0
3000ab18: 1a000004 bne 3000ab30 <IMFS_memfile_read+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
3000ab1c: eb0004ac bl 3000bdd4 <__errno> <== NOT EXECUTED
3000ab20: e3a03016 mov r3, #22 <== NOT EXECUTED
3000ab24: e5803000 str r3, [r0] <== NOT EXECUTED
3000ab28: e3e06000 mvn r6, #0 <== NOT EXECUTED
3000ab2c: ea00006b b 3000ace0 <IMFS_memfile_read+0x1e8> <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000ab30: e590304c ldr r3, [r0, #76] ; 0x4c
3000ab34: e3530006 cmp r3, #6
3000ab38: 1a000012 bne 3000ab88 <IMFS_memfile_read+0x90>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
3000ab3c: e280b050 add fp, r0, #80 ; 0x50
3000ab40: e89b0c00 ldm fp, {sl, fp}
3000ab44: e1a0200a mov r2, sl
3000ab48: e1a0300b mov r3, fp
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
3000ab4c: e5901058 ldr r1, [r0, #88] ; 0x58
if (my_length > (the_jnode->info.linearfile.size - start))
3000ab50: e0522008 subs r2, r2, r8
3000ab54: e0c33009 sbc r3, r3, r9
3000ab58: e3a00000 mov r0, #0
3000ab5c: e1500003 cmp r0, r3
3000ab60: ca000002 bgt 3000ab70 <IMFS_memfile_read+0x78>
3000ab64: 1a000002 bne 3000ab74 <IMFS_memfile_read+0x7c>
3000ab68: e1560002 cmp r6, r2
3000ab6c: 9a000000 bls 3000ab74 <IMFS_memfile_read+0x7c>
my_length = the_jnode->info.linearfile.size - start;
3000ab70: e068600a rsb r6, r8, sl
memcpy(dest, &file_ptr[start], my_length);
3000ab74: e1a00007 mov r0, r7
3000ab78: e0811008 add r1, r1, r8
3000ab7c: e1a02006 mov r2, r6
3000ab80: eb0006c1 bl 3000c68c <memcpy>
3000ab84: ea000050 b 3000accc <IMFS_memfile_read+0x1d4>
/*
* 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;
3000ab88: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
3000ab8c: e5901054 ldr r1, [r0, #84] ; 0x54
3000ab90: e5905050 ldr r5, [r0, #80] ; 0x50
3000ab94: e3a00000 mov r0, #0
3000ab98: e1500001 cmp r0, r1
/*
* 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;
3000ab9c: e0862008 add r2, r6, r8
if ( last_byte > the_jnode->info.file.size )
3000aba0: ca000002 bgt 3000abb0 <IMFS_memfile_read+0xb8>
3000aba4: 1a000003 bne 3000abb8 <IMFS_memfile_read+0xc0>
3000aba8: e1520005 cmp r2, r5
3000abac: 9a000001 bls 3000abb8 <IMFS_memfile_read+0xc0>
my_length = the_jnode->info.file.size - start;
3000abb0: e0635005 rsb r5, r3, r5
3000abb4: ea000000 b 3000abbc <IMFS_memfile_read+0xc4>
* 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 )
3000abb8: e1a05006 mov r5, r6
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000abbc: e59f3128 ldr r3, [pc, #296] ; 3000acec <IMFS_memfile_read+0x1f4>
3000abc0: e1a00008 mov r0, r8
3000abc4: e593b000 ldr fp, [r3]
3000abc8: e1a01009 mov r1, r9
3000abcc: e1a0200b mov r2, fp
3000abd0: e1a03fc2 asr r3, r2, #31
3000abd4: e88d000c stm sp, {r2, r3}
3000abd8: eb00165e bl 30010558 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000abdc: e89d000c ldm sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000abe0: e1a06000 mov r6, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000abe4: e1a01009 mov r1, r9
3000abe8: e1a00008 mov r0, r8
3000abec: eb00151f bl 30010070 <__divdi3>
if ( start_offset ) {
3000abf0: e3560000 cmp r6, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000abf4: e1a08000 mov r8, r0
if ( start_offset ) {
3000abf8: 0a000012 beq 3000ac48 <IMFS_memfile_read+0x150>
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 );
3000abfc: e1a00004 mov r0, r4
3000ac00: e1a01008 mov r1, r8
3000ac04: e3a02000 mov r2, #0
3000ac08: ebffff40 bl 3000a910 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000ac0c: e3500000 cmp r0, #0
return copied;
3000ac10: 01a06000 moveq r6, r0
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 )
3000ac14: 0a000031 beq 3000ace0 <IMFS_memfile_read+0x1e8>
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000ac18: e5901000 ldr r1, [r0]
*/
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;
3000ac1c: e066a00b rsb sl, r6, fp
3000ac20: e155000a cmp r5, sl
3000ac24: 31a0a005 movcc sl, r5
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 );
3000ac28: e1a00007 mov r0, r7
3000ac2c: e0811006 add r1, r1, r6
3000ac30: e1a0200a mov r2, sl
3000ac34: eb000694 bl 3000c68c <memcpy>
dest += to_copy;
3000ac38: e087700a add r7, r7, sl
block++;
3000ac3c: e2888001 add r8, r8, #1
my_length -= to_copy;
3000ac40: e06a5005 rsb r5, sl, r5
copied += to_copy;
3000ac44: e1a0600a mov r6, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
3000ac48: e59f909c ldr r9, [pc, #156] ; 3000acec <IMFS_memfile_read+0x1f4>
3000ac4c: e599a000 ldr sl, [r9]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000ac50: ea00000d b 3000ac8c <IMFS_memfile_read+0x194>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000ac54: e1a00004 mov r0, r4
3000ac58: e1a01008 mov r1, r8
3000ac5c: e3a02000 mov r2, #0
3000ac60: ebffff2a bl 3000a910 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000ac64: e2503000 subs r3, r0, #0
3000ac68: 0a00001c beq 3000ace0 <IMFS_memfile_read+0x1e8>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000ac6c: e1a00007 mov r0, r7
3000ac70: e5931000 ldr r1, [r3]
3000ac74: e1a0200a mov r2, sl
3000ac78: eb000683 bl 3000c68c <memcpy>
dest += to_copy;
3000ac7c: e087700a add r7, r7, sl
block++;
3000ac80: e2888001 add r8, r8, #1
my_length -= to_copy;
3000ac84: e06a5005 rsb r5, sl, r5
copied += to_copy;
3000ac88: e086600a add r6, r6, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000ac8c: e5993000 ldr r3, [r9]
3000ac90: e1550003 cmp r5, r3
3000ac94: 2affffee bcs 3000ac54 <IMFS_memfile_read+0x15c>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
if ( my_length ) {
3000ac98: e3550000 cmp r5, #0
3000ac9c: 0a00000a beq 3000accc <IMFS_memfile_read+0x1d4>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000aca0: e1a00004 mov r0, r4
3000aca4: e1a01008 mov r1, r8
3000aca8: e3a02000 mov r2, #0
3000acac: ebffff17 bl 3000a910 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000acb0: e2503000 subs r3, r0, #0
3000acb4: 0a000009 beq 3000ace0 <IMFS_memfile_read+0x1e8>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
3000acb8: e1a00007 mov r0, r7
3000acbc: e5931000 ldr r1, [r3]
3000acc0: e1a02005 mov r2, r5
3000acc4: eb000670 bl 3000c68c <memcpy>
copied += my_length;
3000acc8: e0856006 add r6, r5, r6
}
IMFS_update_atime( the_jnode );
3000accc: e28d0008 add r0, sp, #8
3000acd0: e3a01000 mov r1, #0
3000acd4: ebffdc94 bl 30001f2c <gettimeofday>
3000acd8: e59d3008 ldr r3, [sp, #8]
3000acdc: e5843040 str r3, [r4, #64] ; 0x40
return copied;
}
3000ace0: e1a00006 mov r0, r6
3000ace4: e28dd010 add sp, sp, #16
3000ace8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000adc4 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000adc4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* 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;
3000adc8: e59f30fc ldr r3, [pc, #252] ; 3000aecc <IMFS_memfile_remove+0x108>
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000adcc: e1a04000 mov r4, r0
/*
* 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;
3000add0: e5935000 ldr r5, [r3]
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
3000add4: e5903058 ldr r3, [r0, #88] ; 0x58
/*
* 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;
3000add8: e1a05125 lsr r5, r5, #2
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
3000addc: e3530000 cmp r3, #0
memfile_free_blocks_in_table( &info->indirect, to_free );
3000ade0: 12800058 addne r0, r0, #88 ; 0x58
3000ade4: 11a01005 movne r1, r5
3000ade8: 1bffffe0 blne 3000ad70 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
3000adec: e594305c ldr r3, [r4, #92] ; 0x5c
3000adf0: e3530000 cmp r3, #0
3000adf4: 13a06000 movne r6, #0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000adf8: 159f70cc ldrne r7, [pc, #204] ; 3000aecc <IMFS_memfile_remove+0x108>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
3000adfc: 1a000008 bne 3000ae24 <IMFS_memfile_remove+0x60>
3000ae00: ea00000d b 3000ae3c <IMFS_memfile_remove+0x78>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
3000ae04: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
3000ae08: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED
3000ae0c: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED
3000ae10: e3520000 cmp r2, #0 <== NOT EXECUTED
memfile_free_blocks_in_table(
3000ae14: 10830000 addne r0, r3, r0 <== NOT EXECUTED
3000ae18: 11a01005 movne r1, r5 <== NOT EXECUTED
3000ae1c: 1bffffd3 blne 3000ad70 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000ae20: e2866001 add r6, r6, #1 <== NOT EXECUTED
3000ae24: e5973000 ldr r3, [r7] <== NOT EXECUTED
3000ae28: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
3000ae2c: 3afffff4 bcc 3000ae04 <IMFS_memfile_remove+0x40> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
3000ae30: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED
3000ae34: e1a01005 mov r1, r5 <== NOT EXECUTED
3000ae38: ebffffcc bl 3000ad70 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
3000ae3c: e5943060 ldr r3, [r4, #96] ; 0x60
3000ae40: e3530000 cmp r3, #0
3000ae44: 13a06000 movne r6, #0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000ae48: 159fa07c ldrne sl, [pc, #124] ; 3000aecc <IMFS_memfile_remove+0x108>
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
3000ae4c: 1a000016 bne 3000aeac <IMFS_memfile_remove+0xe8>
3000ae50: ea00001b b 3000aec4 <IMFS_memfile_remove+0x100>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000ae54: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
3000ae58: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000ae5c: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000ae60: e3580000 cmp r8, #0 <== NOT EXECUTED
3000ae64: 0a000013 beq 3000aeb8 <IMFS_memfile_remove+0xf4> <== NOT EXECUTED
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
3000ae68: e2488004 sub r8, r8, #4 <== NOT EXECUTED
3000ae6c: e3a07000 mov r7, #0 <== NOT EXECUTED
3000ae70: ea000005 b 3000ae8c <IMFS_memfile_remove+0xc8> <== NOT EXECUTED
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++ ) {
if ( p[j] ) {
3000ae74: e5b83004 ldr r3, [r8, #4]! <== NOT EXECUTED
3000ae78: e3530000 cmp r3, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
3000ae7c: 11a00008 movne r0, r8 <== NOT EXECUTED
3000ae80: 11a01005 movne r1, r5 <== NOT EXECUTED
3000ae84: 1bffffb9 blne 3000ad70 <memfile_free_blocks_in_table> <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000ae88: e2877001 add r7, r7, #1 <== NOT EXECUTED
3000ae8c: e59a3000 ldr r3, [sl] <== NOT EXECUTED
3000ae90: e1570123 cmp r7, r3, lsr #2 <== NOT EXECUTED
3000ae94: 3afffff6 bcc 3000ae74 <IMFS_memfile_remove+0xb0> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
3000ae98: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
3000ae9c: e1a01005 mov r1, r5 <== NOT EXECUTED
3000aea0: e0800009 add r0, r0, r9 <== NOT EXECUTED
3000aea4: ebffffb1 bl 3000ad70 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000aea8: e2866001 add r6, r6, #1 <== NOT EXECUTED
3000aeac: e59a3000 ldr r3, [sl] <== NOT EXECUTED
3000aeb0: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
3000aeb4: 3affffe6 bcc 3000ae54 <IMFS_memfile_remove+0x90> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
3000aeb8: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
3000aebc: e1a01005 mov r1, r5 <== NOT EXECUTED
3000aec0: ebffffaa bl 3000ad70 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
3000aec4: e3a00000 mov r0, #0
3000aec8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000aed0 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
3000aed0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000aed4: e3a02000 mov r2, #0 <== NOT EXECUTED
3000aed8: ebfffe8c bl 3000a910 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
3000aedc: e2503000 subs r3, r0, #0 <== NOT EXECUTED
ptr = *block_ptr;
*block_ptr = 0;
3000aee0: 13a02000 movne r2, #0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
ptr = *block_ptr;
3000aee4: 15930000 ldrne r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
3000aee8: 15832000 strne r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
3000aeec: 1bffff97 blne 3000ad50 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
3000aef0: e3a00001 mov r0, #1 <== NOT EXECUTED
3000aef4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
3000b014 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000b014: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Error check arguments
*/
if ( !source )
3000b018: e2538000 subs r8, r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000b01c: e1a04000 mov r4, r0
3000b020: e1a07001 mov r7, r1
3000b024: e1a0a002 mov sl, r2
3000b028: e59d5030 ldr r5, [sp, #48] ; 0x30
/*
* Error check arguments
*/
if ( !source )
3000b02c: 0a000001 beq 3000b038 <IMFS_memfile_write+0x24>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
3000b030: e3550000 cmp r5, #0
3000b034: 1a000002 bne 3000b044 <IMFS_memfile_write+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
3000b038: eb000365 bl 3000bdd4 <__errno> <== NOT EXECUTED
3000b03c: e3a03016 mov r3, #22 <== NOT EXECUTED
3000b040: ea00000e b 3000b080 <IMFS_memfile_write+0x6c> <== NOT EXECUTED
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
3000b044: e5903054 ldr r3, [r0, #84] ; 0x54
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
3000b048: e0851001 add r1, r5, r1
if ( last_byte > the_jnode->info.file.size ) {
3000b04c: e3530000 cmp r3, #0
3000b050: ba000003 blt 3000b064 <IMFS_memfile_write+0x50>
3000b054: 1a00000c bne 3000b08c <IMFS_memfile_write+0x78>
3000b058: e5903050 ldr r3, [r0, #80] ; 0x50
3000b05c: e1530001 cmp r3, r1
3000b060: 2a000009 bcs 3000b08c <IMFS_memfile_write+0x78>
status = IMFS_memfile_extend( the_jnode, last_byte );
3000b064: e1a00004 mov r0, r4
3000b068: e3a02000 mov r2, #0
3000b06c: ebffffa1 bl 3000aef8 <IMFS_memfile_extend>
if ( status )
3000b070: e3500000 cmp r0, #0
3000b074: 0a000004 beq 3000b08c <IMFS_memfile_write+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000b078: eb000355 bl 3000bdd4 <__errno>
3000b07c: e3a0301c mov r3, #28
3000b080: e5803000 str r3, [r0]
3000b084: e3e06000 mvn r6, #0
3000b088: ea00004d b 3000b1c4 <IMFS_memfile_write+0x1b0>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b08c: e59f3138 ldr r3, [pc, #312] ; 3000b1cc <IMFS_memfile_write+0x1b8>
3000b090: e1a00007 mov r0, r7
3000b094: e5939000 ldr r9, [r3]
3000b098: e1a0100a mov r1, sl
3000b09c: e1a0b009 mov fp, r9
3000b0a0: e1a0cfcb asr ip, fp, #31
3000b0a4: e1a0300c mov r3, ip
3000b0a8: e1a0200b mov r2, fp
3000b0ac: e58dc000 str ip, [sp]
3000b0b0: eb001528 bl 30010558 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b0b4: e59dc000 ldr ip, [sp]
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b0b8: e1a06000 mov r6, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b0bc: e1a0100a mov r1, sl
3000b0c0: e1a00007 mov r0, r7
3000b0c4: e1a0200b mov r2, fp
3000b0c8: e1a0300c mov r3, ip
3000b0cc: eb0013e7 bl 30010070 <__divdi3>
if ( start_offset ) {
3000b0d0: e3560000 cmp r6, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b0d4: e1a07000 mov r7, r0
if ( start_offset ) {
3000b0d8: 0a000012 beq 3000b128 <IMFS_memfile_write+0x114>
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 );
3000b0dc: e1a00004 mov r0, r4
3000b0e0: e1a01007 mov r1, r7
3000b0e4: e3a02000 mov r2, #0
3000b0e8: ebfffe08 bl 3000a910 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000b0ec: e3500000 cmp r0, #0
return copied;
3000b0f0: 01a06000 moveq r6, r0
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 )
3000b0f4: 0a000032 beq 3000b1c4 <IMFS_memfile_write+0x1b0>
*/
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;
3000b0f8: e066a009 rsb sl, r6, r9
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000b0fc: e5900000 ldr r0, [r0]
*/
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;
3000b100: e15a0005 cmp sl, r5
3000b104: 21a0a005 movcs sl, r5
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000b108: e0800006 add r0, r0, r6
3000b10c: e1a01008 mov r1, r8
3000b110: e1a0200a mov r2, sl
3000b114: eb00055c bl 3000c68c <memcpy>
src += to_copy;
3000b118: e088800a add r8, r8, sl
block++;
3000b11c: e2877001 add r7, r7, #1
my_length -= to_copy;
3000b120: e06a5005 rsb r5, sl, r5
copied += to_copy;
3000b124: e1a0600a mov r6, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b128: e59f909c ldr r9, [pc, #156] ; 3000b1cc <IMFS_memfile_write+0x1b8>
3000b12c: e599a000 ldr sl, [r9]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000b130: ea00000d b 3000b16c <IMFS_memfile_write+0x158>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000b134: e1a00004 mov r0, r4
3000b138: e1a01007 mov r1, r7
3000b13c: e3a02000 mov r2, #0
3000b140: ebfffdf2 bl 3000a910 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000b144: e3500000 cmp r0, #0
3000b148: 0a00001d beq 3000b1c4 <IMFS_memfile_write+0x1b0>
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 );
3000b14c: e1a01008 mov r1, r8
3000b150: e5900000 ldr r0, [r0]
3000b154: e1a0200a mov r2, sl
3000b158: eb00054b bl 3000c68c <memcpy>
src += to_copy;
3000b15c: e088800a add r8, r8, sl
block++;
3000b160: e2877001 add r7, r7, #1
my_length -= to_copy;
3000b164: e06a5005 rsb r5, sl, r5
*
* 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(
3000b168: e086600a add r6, r6, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000b16c: e5993000 ldr r3, [r9]
3000b170: e1550003 cmp r5, r3
3000b174: 2affffee bcs 3000b134 <IMFS_memfile_write+0x120>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
to_copy = my_length;
if ( my_length ) {
3000b178: e3550000 cmp r5, #0
3000b17c: 0a00000a beq 3000b1ac <IMFS_memfile_write+0x198>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000b180: e1a00004 mov r0, r4
3000b184: e1a01007 mov r1, r7
3000b188: e3a02000 mov r2, #0
3000b18c: ebfffddf bl 3000a910 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000b190: e3500000 cmp r0, #0
3000b194: 0a00000a beq 3000b1c4 <IMFS_memfile_write+0x1b0>
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 );
3000b198: e5900000 ldr r0, [r0]
3000b19c: e1a01008 mov r1, r8
3000b1a0: e1a02005 mov r2, r5
3000b1a4: eb000538 bl 3000c68c <memcpy>
my_length = 0;
copied += to_copy;
3000b1a8: e0866005 add r6, r6, r5
}
IMFS_mtime_ctime_update( the_jnode );
3000b1ac: e28d0004 add r0, sp, #4
3000b1b0: e3a01000 mov r1, #0
3000b1b4: ebffdb5c bl 30001f2c <gettimeofday>
3000b1b8: e59d3004 ldr r3, [sp, #4]
3000b1bc: e5843044 str r3, [r4, #68] ; 0x44
3000b1c0: e5843048 str r3, [r4, #72] ; 0x48
return copied;
}
3000b1c4: e1a00006 mov r0, r6
3000b1c8: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000173c <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
3000173c: e92d40f0 push {r4, r5, r6, r7, lr}
30001740: e24dd040 sub sp, sp, #64 ; 0x40
30001744: e1a04001 mov r4, r1
30001748: e1a07000 mov r7, r0
3000174c: e1a06002 mov r6, r2
30001750: e1a05003 mov r5, r3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
30001754: eb002d8e bl 3000cd94 <strlen>
30001758: e28d303c add r3, sp, #60 ; 0x3c
3000175c: e1a01000 mov r1, r0
30001760: e28d2004 add r2, sp, #4
30001764: e1a00007 mov r0, r7
30001768: eb001e83 bl 3000917c <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
3000176c: e2043a0f and r3, r4, #61440 ; 0xf000
30001770: e3530901 cmp r3, #16384 ; 0x4000
30001774: 0a00000d beq 300017b0 <IMFS_mknod+0x74>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
30001778: e3530902 cmp r3, #32768 ; 0x8000
3000177c: 0a00000d beq 300017b8 <IMFS_mknod+0x7c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
30001780: e3530a06 cmp r3, #24576 ; 0x6000
30001784: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
30001788: 058d6028 streq r6, [sp, #40] ; 0x28
3000178c: 058d502c streq r5, [sp, #44] ; 0x2c
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
30001790: 03a01002 moveq r1, #2
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
30001794: 0a000008 beq 300017bc <IMFS_mknod+0x80>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
30001798: e3530a01 cmp r3, #4096 ; 0x1000
type = IMFS_FIFO;
3000179c: 03a01007 moveq r1, #7
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
300017a0: 0a000005 beq 300017bc <IMFS_mknod+0x80>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
300017a4: eb00298a bl 3000bdd4 <__errno> <== NOT EXECUTED
300017a8: e3a03016 mov r3, #22 <== NOT EXECUTED
300017ac: ea00000d b 300017e8 <IMFS_mknod+0xac> <== NOT EXECUTED
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
300017b0: e3a01001 mov r1, #1
300017b4: ea000000 b 300017bc <IMFS_mknod+0x80>
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
300017b8: e3a01005 mov r1, #5
new_node = IMFS_create_node(
pathloc,
type,
new_name,
mode,
&info
300017bc: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
300017c0: e58d3000 str r3, [sp]
300017c4: e59d0054 ldr r0, [sp, #84] ; 0x54
300017c8: e28d2004 add r2, sp, #4
300017cc: e1a03004 mov r3, r4
300017d0: eb001be7 bl 30008774 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
300017d4: e3500000 cmp r0, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
300017d8: 13a00000 movne r0, #0
new_name,
mode,
&info
);
if ( !new_node )
300017dc: 1a000003 bne 300017f0 <IMFS_mknod+0xb4>
rtems_set_errno_and_return_minus_one( ENOMEM );
300017e0: eb00297b bl 3000bdd4 <__errno>
300017e4: e3a0300c mov r3, #12
300017e8: e5803000 str r3, [r0]
300017ec: e3e00000 mvn r0, #0
return 0;
}
300017f0: e28dd040 add sp, sp, #64 ; 0x40
300017f4: e8bd80f0 pop {r4, r5, r6, r7, pc}
300017f8 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
300017f8: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
300017fc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001800: e593204c ldr r2, [r3, #76] ; 0x4c
30001804: e3520001 cmp r2, #1
30001808: 0a000004 beq 30001820 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000180c: eb002970 bl 3000bdd4 <__errno> <== NOT EXECUTED
30001810: e3a03014 mov r3, #20 <== NOT EXECUTED
30001814: e5803000 str r3, [r0] <== NOT EXECUTED
30001818: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000181c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
30001820: e583005c str r0, [r3, #92] ; 0x5c
return 0;
30001824: e3a00000 mov r0, #0
}
30001828: e49df004 pop {pc} ; (ldr pc, [sp], #4)
300038f0 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
300038f0: e92d4030 push {r4, r5, lr}
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
300038f4: e59f50e0 ldr r5, [pc, #224] ; 300039dc <IMFS_print_jnode+0xec>
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
300038f8: e1a04000 mov r4, r0
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
300038fc: e5953000 ldr r3, [r5]
30003900: e280000c add r0, r0, #12
30003904: e5931008 ldr r1, [r3, #8]
30003908: eb003075 bl 3000fae4 <fputs>
switch( the_jnode->type ) {
3000390c: e594204c ldr r2, [r4, #76] ; 0x4c
30003910: e2423001 sub r3, r2, #1
30003914: e3530006 cmp r3, #6
30003918: 979ff103 ldrls pc, [pc, r3, lsl #2]
3000391c: ea000026 b 300039bc <IMFS_print_jnode+0xcc> <== NOT EXECUTED
30003920: 3000393c .word 0x3000393c <== NOT EXECUTED
30003924: 30003950 .word 0x30003950 <== NOT EXECUTED
30003928: 3000399c .word 0x3000399c <== NOT EXECUTED
3000392c: 3000399c .word 0x3000399c <== NOT EXECUTED
30003930: 30003984 .word 0x30003984 <== NOT EXECUTED
30003934: 30003968 .word 0x30003968 <== NOT EXECUTED
30003938: 300039a8 .word 0x300039a8 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
3000393c: e5953000 ldr r3, [r5]
30003940: e3a0002f mov r0, #47 ; 0x2f
30003944: e5931008 ldr r1, [r3, #8]
30003948: eb003030 bl 3000fa10 <fputc>
break;
3000394c: ea00001f b 300039d0 <IMFS_print_jnode+0xe0>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
30003950: e5953000 ldr r3, [r5]
30003954: e59f1084 ldr r1, [pc, #132] ; 300039e0 <IMFS_print_jnode+0xf0>
30003958: e5930008 ldr r0, [r3, #8]
3000395c: e5942050 ldr r2, [r4, #80] ; 0x50
30003960: e5943054 ldr r3, [r4, #84] ; 0x54
30003964: ea000004 b 3000397c <IMFS_print_jnode+0x8c>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
30003968: e5953000 ldr r3, [r5] <== NOT EXECUTED
3000396c: e59f1070 ldr r1, [pc, #112] ; 300039e4 <IMFS_print_jnode+0xf4><== NOT EXECUTED
30003970: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
30003974: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED
30003978: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3000397c: eb003003 bl 3000f990 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
30003980: ea000012 b 300039d0 <IMFS_print_jnode+0xe0>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
30003984: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003988: e59f1058 ldr r1, [pc, #88] ; 300039e8 <IMFS_print_jnode+0xf8><== NOT EXECUTED
3000398c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
30003990: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED
30003994: eb002ffd bl 3000f990 <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
30003998: ea00000c b 300039d0 <IMFS_print_jnode+0xe0> <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
3000399c: e5953000 ldr r3, [r5] <== NOT EXECUTED
300039a0: e59f0044 ldr r0, [pc, #68] ; 300039ec <IMFS_print_jnode+0xfc><== NOT EXECUTED
300039a4: ea000001 b 300039b0 <IMFS_print_jnode+0xc0> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
300039a8: e5953000 ldr r3, [r5] <== NOT EXECUTED
300039ac: e59f003c ldr r0, [pc, #60] ; 300039f0 <IMFS_print_jnode+0x100><== NOT EXECUTED
300039b0: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
300039b4: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
300039b8: ea003049 b 3000fae4 <fputs> <== NOT EXECUTED
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
300039bc: e5953000 ldr r3, [r5] <== NOT EXECUTED
300039c0: e59f102c ldr r1, [pc, #44] ; 300039f4 <IMFS_print_jnode+0x104><== NOT EXECUTED
300039c4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
300039c8: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
300039cc: ea002fef b 3000f990 <fprintf> <== NOT EXECUTED
return;
}
puts("");
300039d0: e59f0020 ldr r0, [pc, #32] ; 300039f8 <IMFS_print_jnode+0x108>
}
300039d4: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
300039d8: ea003735 b 300116b4 <puts>
30001838 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
30001838: e5903000 ldr r3, [r0]
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
3000183c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
30001840: e593004c ldr r0, [r3, #76] ; 0x4c
30001844: e3500004 cmp r0, #4
30001848: 03a00000 moveq r0, #0
3000184c: 0a000006 beq 3000186c <IMFS_readlink+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
30001850: eb00295f bl 3000bdd4 <__errno> <== NOT EXECUTED
30001854: e3a03016 mov r3, #22 <== NOT EXECUTED
30001858: e5803000 str r3, [r0] <== NOT EXECUTED
3000185c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001860: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
30001864: e7c1c000 strb ip, [r1, r0]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
30001868: e2800001 add r0, r0, #1
3000186c: e1500002 cmp r0, r2
30001870: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4)
30001874: e593c050 ldr ip, [r3, #80] ; 0x50
30001878: e7dcc000 ldrb ip, [ip, r0]
3000187c: e35c0000 cmp ip, #0
30001880: 1afffff7 bne 30001864 <IMFS_readlink+0x2c>
buf[i] = node->info.sym_link.name[i];
return i;
}
30001884: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30001888 <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 */
)
{
30001888: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
3000188c: e5914000 ldr r4, [r1] <== NOT EXECUTED
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 */
)
{
30001890: e1a05002 mov r5, r2 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
30001894: e1a01003 mov r1, r3 <== NOT EXECUTED
30001898: e284000c add r0, r4, #12 <== NOT EXECUTED
3000189c: e3a02020 mov r2, #32 <== NOT EXECUTED
300018a0: eb002d53 bl 3000cdf4 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
300018a4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
300018a8: e3530000 cmp r3, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
300018ac: 11a00004 movne r0, r4 <== NOT EXECUTED
300018b0: 1b001030 blne 30005978 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
300018b4: e5950000 ldr r0, [r5] <== 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 );
300018b8: e1a01004 mov r1, r4 <== NOT EXECUTED
the_jnode->Parent = new_parent;
300018bc: e5840008 str r0, [r4, #8] <== NOT EXECUTED
300018c0: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED
300018c4: eb001020 bl 3000594c <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
300018c8: e1a0000d mov r0, sp <== NOT EXECUTED
300018cc: e3a01000 mov r1, #0 <== NOT EXECUTED
300018d0: eb000195 bl 30001f2c <gettimeofday> <== NOT EXECUTED
300018d4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
return 0;
}
300018d8: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
300018dc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0;
}
300018e0: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
30009324 <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
30009324: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30009328: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
3000932c: e593204c ldr r2, [r3, #76] ; 0x4c
30009330: e2422002 sub r2, r2, #2
30009334: e3520005 cmp r2, #5
30009338: 979ff102 ldrls pc, [pc, r2, lsl #2]
3000933c: ea000012 b 3000938c <IMFS_stat+0x68> <== NOT EXECUTED
30009340: 30009358 .word 0x30009358 <== NOT EXECUTED
30009344: 3000938c .word 0x3000938c <== NOT EXECUTED
30009348: 30009378 .word 0x30009378 <== NOT EXECUTED
3000934c: 3000936c .word 0x3000936c <== NOT EXECUTED
30009350: 3000936c .word 0x3000936c <== NOT EXECUTED
30009354: 30009378 .word 0x30009378 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
30009358: e5932054 ldr r2, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
3000935c: e593c050 ldr ip, [r3, #80] ; 0x50
30009360: e581201c str r2, [r1, #28]
30009364: e581c018 str ip, [r1, #24]
break;
30009368: ea00000c b 300093a0 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
3000936c: e283c050 add ip, r3, #80 ; 0x50
30009370: e89c1800 ldm ip, {fp, ip}
30009374: ea000001 b 30009380 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
30009378: e3a0b000 mov fp, #0
3000937c: e3a0c000 mov ip, #0
30009380: e581b020 str fp, [r1, #32]
30009384: e581c024 str ip, [r1, #36] ; 0x24
break;
30009388: ea000004 b 300093a0 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000938c: eb000a90 bl 3000bdd4 <__errno> <== NOT EXECUTED
30009390: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30009394: e5803000 str r3, [r0] <== NOT EXECUTED
30009398: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000939c: e8bd8800 pop {fp, pc} <== NOT EXECUTED
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
300093a0: e5902010 ldr r2, [r0, #16]
300093a4: e59f0050 ldr r0, [pc, #80] ; 300093fc <IMFS_stat+0xd8>
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
300093a8: e5922034 ldr r2, [r2, #52] ; 0x34
300093ac: e5922000 ldr r2, [r2]
/*
* 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 =
300093b0: e8810005 stm r1, {r0, r2}
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
300093b4: e5932030 ldr r2, [r3, #48] ; 0x30
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
300093b8: e3a00000 mov r0, #0
*/
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;
300093bc: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
300093c0: e1d323b4 ldrh r2, [r3, #52] ; 0x34
300093c4: e1c121b0 strh r2, [r1, #16]
buf->st_ino = the_jnode->st_ino;
300093c8: e5932038 ldr r2, [r3, #56] ; 0x38
300093cc: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
300093d0: e1d323bc ldrh r2, [r3, #60] ; 0x3c
300093d4: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
300093d8: e1d323be ldrh r2, [r3, #62] ; 0x3e
300093dc: e1c121b4 strh r2, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
300093e0: e5932040 ldr r2, [r3, #64] ; 0x40
300093e4: e5812028 str r2, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
300093e8: e5932044 ldr r2, [r3, #68] ; 0x44
buf->st_ctime = the_jnode->stat_ctime;
300093ec: e5933048 ldr r3, [r3, #72] ; 0x48
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
300093f0: e5812030 str r2, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
300093f4: e5813038 str r3, [r1, #56] ; 0x38
return 0;
}
300093f8: e8bd8800 pop {fp, pc}
300018e4 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
300018e4: e92d40f0 push {r4, r5, r6, r7, lr}
300018e8: e1a05000 mov r5, r0
300018ec: e24dd040 sub sp, sp, #64 ; 0x40
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
300018f0: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
300018f4: e1a06001 mov r6, r1
300018f8: e1a07002 mov r7, r2
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
300018fc: eb002d24 bl 3000cd94 <strlen>
30001900: e28d4004 add r4, sp, #4
30001904: e1a01000 mov r1, r0
30001908: e1a02004 mov r2, r4
3000190c: e28d303c add r3, sp, #60 ; 0x3c
30001910: e1a00007 mov r0, r7
30001914: eb001e18 bl 3000917c <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001918: e1a00006 mov r0, r6
3000191c: eb002d08 bl 3000cd44 <strdup>
if (info.sym_link.name == NULL) {
30001920: e3500000 cmp r0, #0
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001924: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
30001928: 0a00000b beq 3000195c <IMFS_symlink+0x78>
new_node = IMFS_create_node(
parent_loc,
IMFS_SYM_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
3000192c: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
30001930: e58d3000 str r3, [sp]
30001934: e1a00005 mov r0, r5
30001938: e3a01004 mov r1, #4
3000193c: e1a02004 mov r2, r4
30001940: e59f302c ldr r3, [pc, #44] ; 30001974 <IMFS_symlink+0x90>
30001944: eb001b8a bl 30008774 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001948: e3500000 cmp r0, #0
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
3000194c: 13a00000 movne r0, #0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001950: 1a000005 bne 3000196c <IMFS_symlink+0x88>
free(info.sym_link.name);
30001954: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
30001958: eb00014a bl 30001e88 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
3000195c: eb00291c bl 3000bdd4 <__errno> <== NOT EXECUTED
30001960: e3a0300c mov r3, #12 <== NOT EXECUTED
30001964: e5803000 str r3, [r0] <== NOT EXECUTED
30001968: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return 0;
}
3000196c: e28dd040 add sp, sp, #64 ; 0x40
30001970: e8bd80f0 pop {r4, r5, r6, r7, pc}
30001978 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001978: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
3000197c: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001980: e24dd01c sub sp, sp, #28
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001984: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001988: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
3000198c: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001990: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001994: 1a000024 bne 30001a2c <IMFS_unlink+0xb4>
if ( !node->info.hard_link.link_node )
30001998: e595e050 ldr lr, [r5, #80] ; 0x50
3000199c: e35e0000 cmp lr, #0
300019a0: 1a000003 bne 300019b4 <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
300019a4: eb00290a bl 3000bdd4 <__errno> <== NOT EXECUTED
300019a8: e3a03016 mov r3, #22 <== NOT EXECUTED
300019ac: e5803000 str r3, [r0] <== NOT EXECUTED
300019b0: ea000023 b 30001a44 <IMFS_unlink+0xcc> <== NOT EXECUTED
the_link = *loc;
300019b4: e1a0c00d mov ip, sp
300019b8: e1a07001 mov r7, r1
300019bc: e8b7000f ldm r7!, {r0, r1, r2, r3}
300019c0: e8ac000f stmia ip!, {r0, r1, r2, r3}
300019c4: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
300019c8: e28d701c add r7, sp, #28
300019cc: e527e01c str lr, [r7, #-28]!
IMFS_Set_handlers( &the_link );
300019d0: e1a0000d mov r0, sp
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
300019d4: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
300019d8: eb001bc3 bl 300088ec <IMFS_Set_handlers>
/*
* 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)
300019dc: e5953050 ldr r3, [r5, #80] ; 0x50
300019e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34
300019e4: e3520001 cmp r2, #1
300019e8: 1a000007 bne 30001a0c <IMFS_unlink+0x94>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
300019ec: e1a00006 mov r0, r6
300019f0: e1a0100d mov r1, sp
300019f4: e59d3008 ldr r3, [sp, #8]
300019f8: e1a0e00f mov lr, pc
300019fc: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
30001a00: e3500000 cmp r0, #0
30001a04: 0a000008 beq 30001a2c <IMFS_unlink+0xb4>
30001a08: ea00000d b 30001a44 <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
30001a0c: e2422001 sub r2, r2, #1
30001a10: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
30001a14: e28d0014 add r0, sp, #20
30001a18: e3a01000 mov r1, #0
30001a1c: eb000142 bl 30001f2c <gettimeofday>
30001a20: e5953050 ldr r3, [r5, #80] ; 0x50
30001a24: e59d2014 ldr r2, [sp, #20]
30001a28: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
30001a2c: e5943008 ldr r3, [r4, #8]
30001a30: e1a00006 mov r0, r6
30001a34: e1a01004 mov r1, r4
30001a38: e1a0e00f mov lr, pc
30001a3c: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
30001a40: ea000000 b 30001a48 <IMFS_unlink+0xd0>
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
return -1;
30001a44: e3e00000 mvn r0, #0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
30001a48: e28dd01c add sp, sp, #28
30001a4c: e8bd80f0 pop {r4, r5, r6, r7, pc}
30001a50 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001a50: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001a54: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001a58: e593204c ldr r2, [r3, #76] ; 0x4c
30001a5c: e3520001 cmp r2, #1
30001a60: 0a000002 beq 30001a70 <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001a64: eb0028da bl 3000bdd4 <__errno> <== NOT EXECUTED
30001a68: e3a03014 mov r3, #20 <== NOT EXECUTED
30001a6c: ea000004 b 30001a84 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
30001a70: e593205c ldr r2, [r3, #92] ; 0x5c
30001a74: e3520000 cmp r2, #0
30001a78: 1a000004 bne 30001a90 <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
30001a7c: eb0028d4 bl 3000bdd4 <__errno> <== NOT EXECUTED
30001a80: e3a03016 mov r3, #22 <== NOT EXECUTED
30001a84: e5803000 str r3, [r0] <== NOT EXECUTED
30001a88: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001a8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* 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;
30001a90: e3a00000 mov r0, #0
30001a94: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
30001a98: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30001548 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
30001548: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}<== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
3000154c: e5908008 ldr r8, [r0, #8] <== NOT EXECUTED
30001550: e59f4070 ldr r4, [pc, #112] ; 300015c8 <Stack_check_Dump_threads_usage+0x80><== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
30001554: e1a05000 mov r5, r0 <== NOT EXECUTED
current = 0;
} else
#else
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
30001558: e59060f0 ldr r6, [r0, #240] ; 0xf0 <== NOT EXECUTED
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
3000155c: e59090c0 ldr r9, [r0, #192] ; 0xc0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
30001560: e28d2008 add r2, sp, #8 <== NOT EXECUTED
30001564: e1a00008 mov r0, r8 <== NOT EXECUTED
30001568: e3a01005 mov r1, #5 <== NOT EXECUTED
3000156c: e8940480 ldm r4, {r7, sl} <== NOT EXECUTED
30001570: eb000ecc bl 300050a8 <rtems_object_get_name> <== NOT EXECUTED
30001574: e1a02008 mov r2, r8 <== NOT EXECUTED
30001578: e1a03000 mov r3, r0 <== NOT EXECUTED
3000157c: e59f1048 ldr r1, [pc, #72] ; 300015cc <Stack_check_Dump_threads_usage+0x84><== NOT EXECUTED
30001580: e1a0000a mov r0, sl <== NOT EXECUTED
30001584: e1a0e00f mov lr, pc <== NOT EXECUTED
30001588: e12fff17 bx r7 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
3000158c: e59530c0 ldr r3, [r5, #192] ; 0xc0 <== NOT EXECUTED
30001590: e59520c4 ldr r2, [r5, #196] ; 0xc4 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
30001594: e2499010 sub r9, r9, #16 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
30001598: e2433001 sub r3, r3, #1 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
3000159c: e88d0240 stm sp, {r6, r9} <== NOT EXECUTED
300015a0: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
300015a4: e59f1024 ldr r1, [pc, #36] ; 300015d0 <Stack_check_Dump_threads_usage+0x88><== NOT EXECUTED
300015a8: e0823003 add r3, r2, r3 <== NOT EXECUTED
300015ac: e1a0e00f mov lr, pc <== NOT EXECUTED
300015b0: e594f000 ldr pc, [r4] <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
300015b4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
300015b8: e59f1014 ldr r1, [pc, #20] ; 300015d4 <Stack_check_Dump_threads_usage+0x8c><== NOT EXECUTED
300015bc: e1a0e00f mov lr, pc <== NOT EXECUTED
300015c0: e594f000 ldr pc, [r4] <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
300015c4: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED
300015d8 <Stack_check_Initialize>:
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
}
300015d8: e12fff1e bx lr <== NOT EXECUTED
30001620 <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)
{
30001620: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED
30001624: e1a06000 mov r6, r0 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
30001628: e59040c4 ldr r4, [r0, #196] ; 0xc4 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
3000162c: e59f0078 ldr r0, [pc, #120] ; 300016ac <Stack_check_report_blown_task+0x8c><== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
30001630: e20150ff and r5, r1, #255 ; 0xff <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
30001634: eb00060b bl 30002e68 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
30001638: e59f0070 ldr r0, [pc, #112] ; 300016b0 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
3000163c: e1a01006 mov r1, r6 <== NOT EXECUTED
30001640: eb000608 bl 30002e68 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
30001644: e59f0068 ldr r0, [pc, #104] ; 300016b4 <Stack_check_report_blown_task+0x94><== NOT EXECUTED
30001648: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
3000164c: eb000605 bl 30002e68 <printk> <== NOT EXECUTED
printk(
30001650: e59f0060 ldr r0, [pc, #96] ; 300016b8 <Stack_check_report_blown_task+0x98><== NOT EXECUTED
30001654: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
30001658: eb000602 bl 30002e68 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
3000165c: e1a0200d mov r2, sp <== NOT EXECUTED
30001660: e3a01020 mov r1, #32 <== NOT EXECUTED
30001664: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
30001668: eb000e8e bl 300050a8 <rtems_object_get_name> <== NOT EXECUTED
3000166c: e1a01000 mov r1, r0 <== NOT EXECUTED
30001670: e59f0044 ldr r0, [pc, #68] ; 300016bc <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
30001674: eb0005fb bl 30002e68 <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
30001678: e59620c4 ldr r2, [r6, #196] ; 0xc4 <== NOT EXECUTED
3000167c: e59610c0 ldr r1, [r6, #192] ; 0xc0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
30001680: e59f0038 ldr r0, [pc, #56] ; 300016c0 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
30001684: e0823001 add r3, r2, r1 <== NOT EXECUTED
30001688: eb0005f6 bl 30002e68 <printk> <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
3000168c: e3550000 cmp r5, #0 <== NOT EXECUTED
printk(
30001690: 059f002c ldreq r0, [pc, #44] ; 300016c4 <Stack_check_report_blown_task+0xa4><== NOT EXECUTED
30001694: 03a01010 moveq r1, #16 <== NOT EXECUTED
30001698: 02842008 addeq r2, r4, #8 <== NOT EXECUTED
3000169c: 02843018 addeq r3, r4, #24 <== NOT EXECUTED
300016a0: 0b0005f0 bleq 30002e68 <printk> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
300016a4: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED
300016a8: eb00108f bl 300058ec <rtems_fatal_error_occurred> <== NOT EXECUTED
30014d60 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014d60: e590304c ldr r3, [r0, #76] ; 0x4c
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30014d64: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014d68: e1520003 cmp r2, r3
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30014d6c: e1a06000 mov r6, r0
30014d70: e1a0a001 mov sl, r1
30014d74: e1a07002 mov r7, r2
30014d78: e59d8020 ldr r8, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014d7c: 8a000013 bhi 30014dd0 <_CORE_message_queue_Broadcast+0x70>
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
30014d80: e5905048 ldr r5, [r0, #72] ; 0x48
30014d84: e3550000 cmp r5, #0
*count = 0;
30014d88: 13a00000 movne r0, #0
30014d8c: 15880000 strne r0, [r8]
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
30014d90: 0a000007 beq 30014db4 <_CORE_message_queue_Broadcast+0x54>
30014d94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
30014d98: e594002c ldr r0, [r4, #44] ; 0x2c
30014d9c: e1a0100a mov r1, sl
30014da0: e1a02007 mov r2, r7
30014da4: eb001e76 bl 3001c784 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014da8: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
30014dac: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014db0: e5837000 str r7, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30014db4: e1a00006 mov r0, r6
30014db8: eb000994 bl 30017410 <_Thread_queue_Dequeue>
30014dbc: e2504000 subs r4, r0, #0
30014dc0: 1afffff4 bne 30014d98 <_CORE_message_queue_Broadcast+0x38>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
30014dc4: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
30014dc8: e1a00004 mov r0, r4
30014dcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
30014dd0: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
30014dd4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
30009fb4 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
30009fb4: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
30009fb8: e59f2124 ldr r2, [pc, #292] ; 3000a0e4 <_CORE_mutex_Seize_interrupt_trylock+0x130>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
30009fbc: e593c050 ldr ip, [r3, #80] ; 0x50
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
30009fc0: e3a00000 mov r0, #0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
30009fc4: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
30009fc8: e15c0000 cmp ip, r0
30009fcc: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
30009fd0: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
30009fd4: 0a00002c beq 3000a08c <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
30009fd8: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
30009fdc: e5920008 ldr r0, [r2, #8]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
30009fe0: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
30009fe4: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
30009fe8: e3a00001 mov r0, #1
30009fec: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
30009ff0: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
30009ff4: e3500002 cmp r0, #2
30009ff8: 0a000001 beq 3000a004 <_CORE_mutex_Seize_interrupt_trylock+0x50>
30009ffc: e3500003 cmp r0, #3
3000a000: 1a000004 bne 3000a018 <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000a004: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
3000a008: e3500003 cmp r0, #3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000a00c: e28c4001 add r4, ip, #1
3000a010: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
3000a014: 0a000000 beq 3000a01c <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
3000a018: ea00002b b 3000a0cc <_CORE_mutex_Seize_interrupt_trylock+0x118>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
3000a01c: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
3000a020: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
3000a024: e1540000 cmp r4, r0
3000a028: 1a000000 bne 3000a030 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
3000a02c: ea000026 b 3000a0cc <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
if ( current > ceiling ) {
3000a030: 9a00000b bls 3000a064 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
3000a034: e59f20ac ldr r2, [pc, #172] ; 3000a0e8 <_CORE_mutex_Seize_interrupt_trylock+0x134>
3000a038: e5920000 ldr r0, [r2]
3000a03c: e2800001 add r0, r0, #1
3000a040: e5820000 str r0, [r2]
3000a044: e5912000 ldr r2, [r1]
3000a048: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
3000a04c: e3a02000 mov r2, #0
3000a050: e593005c ldr r0, [r3, #92] ; 0x5c
3000a054: e593104c ldr r1, [r3, #76] ; 0x4c
3000a058: ebfff282 bl 30006a68 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
3000a05c: ebfff3c8 bl 30006f84 <_Thread_Enable_dispatch>
3000a060: ea00001b b 3000a0d4 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
3000a064: e3a00006 mov r0, #6
3000a068: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
3000a06c: e3a00001 mov r0, #1
3000a070: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
3000a074: e3a00000 mov r0, #0
3000a078: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
3000a07c: e582c01c str ip, [r2, #28]
3000a080: e5913000 ldr r3, [r1]
3000a084: e129f003 msr CPSR_fc, r3
3000a088: e8bd8010 pop {r4, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
3000a08c: e593005c ldr r0, [r3, #92] ; 0x5c
3000a090: e1500002 cmp r0, r2
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
3000a094: 13a00001 movne r0, #1
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
3000a098: 18bd8010 popne {r4, pc}
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
3000a09c: e5932040 ldr r2, [r3, #64] ; 0x40
3000a0a0: e3520000 cmp r2, #0
3000a0a4: 0a000002 beq 3000a0b4 <_CORE_mutex_Seize_interrupt_trylock+0x100>
3000a0a8: e3520001 cmp r2, #1
3000a0ac: 1a00000a bne 3000a0dc <_CORE_mutex_Seize_interrupt_trylock+0x128>
3000a0b0: ea000003 b 3000a0c4 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
3000a0b4: e5932054 ldr r2, [r3, #84] ; 0x54
3000a0b8: e2822001 add r2, r2, #1
3000a0bc: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
3000a0c0: ea000001 b 3000a0cc <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
3000a0c4: e3a03002 mov r3, #2 <== NOT EXECUTED
3000a0c8: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
3000a0cc: e5913000 ldr r3, [r1]
3000a0d0: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
3000a0d4: e3a00000 mov r0, #0
3000a0d8: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
3000a0dc: e3a00001 mov r0, #1
3000a0e0: e8bd8010 pop {r4, pc}
30006e0c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e0c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30006e10: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e14: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30006e18: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
30006e1c: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e20: e59f4500 ldr r4, [pc, #1280] ; 30007328 <_Heap_Walk+0x51c>
)
{
uintptr_t const page_size = heap->page_size;
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;
30006e24: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e28: e59f34fc ldr r3, [pc, #1276] ; 3000732c <_Heap_Walk+0x520>
30006e2c: e31200ff tst r2, #255 ; 0xff
30006e30: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e34: e59f34f4 ldr r3, [pc, #1268] ; 30007330 <_Heap_Walk+0x524>
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
30006e38: e590c020 ldr ip, [r0, #32]
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e3c: e5933000 ldr r3, [r3]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e40: e1a06000 mov r6, r0
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e44: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e48: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
30006e4c: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
30006e50: e58dc020 str ip, [sp, #32]
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e54: 1a000127 bne 300072f8 <_Heap_Walk+0x4ec>
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)(
30006e58: e59dc024 ldr ip, [sp, #36] ; 0x24
30006e5c: e59d2020 ldr r2, [sp, #32]
30006e60: e58dc000 str ip, [sp]
30006e64: e5903018 ldr r3, [r0, #24]
30006e68: e58d3004 str r3, [sp, #4]
30006e6c: e590301c ldr r3, [r0, #28]
30006e70: e58d200c str r2, [sp, #12]
30006e74: e58d3008 str r3, [sp, #8]
30006e78: e59d3028 ldr r3, [sp, #40] ; 0x28
30006e7c: e59f24b0 ldr r2, [pc, #1200] ; 30007334 <_Heap_Walk+0x528>
30006e80: e58d3010 str r3, [sp, #16]
30006e84: e5903008 ldr r3, [r0, #8]
30006e88: e58d3014 str r3, [sp, #20]
30006e8c: e590300c ldr r3, [r0, #12]
30006e90: e1a00001 mov r0, r1
30006e94: e58d3018 str r3, [sp, #24]
30006e98: e3a01000 mov r1, #0
30006e9c: e1a03009 mov r3, r9
30006ea0: e1a0e00f mov lr, pc
30006ea4: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
30006ea8: e3590000 cmp r9, #0
30006eac: 1a000006 bne 30006ecc <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
30006eb0: e1a00005 mov r0, r5
30006eb4: e3a01001 mov r1, #1
30006eb8: e59f2478 ldr r2, [pc, #1144] ; 30007338 <_Heap_Walk+0x52c>
30006ebc: e1a0e00f mov lr, pc
30006ec0: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30006ec4: e1a08009 mov r8, r9
30006ec8: ea00010b b 300072fc <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
30006ecc: e2198003 ands r8, r9, #3
(*printer)(
30006ed0: 11a00005 movne r0, r5
30006ed4: 13a01001 movne r1, #1
30006ed8: 159f245c ldrne r2, [pc, #1116] ; 3000733c <_Heap_Walk+0x530>
30006edc: 11a03009 movne r3, r9
30006ee0: 1a00010c bne 30007318 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ee4: e59d0024 ldr r0, [sp, #36] ; 0x24
30006ee8: e1a01009 mov r1, r9
30006eec: ebffe72a bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
30006ef0: e250b000 subs fp, r0, #0
30006ef4: 0a000006 beq 30006f14 <_Heap_Walk+0x108>
(*printer)(
30006ef8: e1a00005 mov r0, r5
30006efc: e3a01001 mov r1, #1
30006f00: e59f2438 ldr r2, [pc, #1080] ; 30007340 <_Heap_Walk+0x534>
30006f04: e59d3024 ldr r3, [sp, #36] ; 0x24
30006f08: e1a0e00f mov lr, pc
30006f0c: e12fff14 bx r4
30006f10: ea0000f9 b 300072fc <_Heap_Walk+0x4f0>
30006f14: e59dc020 ldr ip, [sp, #32]
30006f18: e1a01009 mov r1, r9
30006f1c: e28c0008 add r0, ip, #8
30006f20: ebffe71d bl 30000b9c <__umodsi3>
);
return false;
}
if (
30006f24: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
30006f28: 11a00005 movne r0, r5
30006f2c: 13a01001 movne r1, #1
30006f30: 159f240c ldrne r2, [pc, #1036] ; 30007344 <_Heap_Walk+0x538>
30006f34: 159d3020 ldrne r3, [sp, #32]
30006f38: 1a0000cc bne 30007270 <_Heap_Walk+0x464>
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;
30006f3c: e59d2020 ldr r2, [sp, #32]
30006f40: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
30006f44: e2188001 ands r8, r8, #1
(*printer)(
30006f48: 01a00005 moveq r0, r5
30006f4c: 03a01001 moveq r1, #1
30006f50: 059f23f0 ldreq r2, [pc, #1008] ; 30007348 <_Heap_Walk+0x53c>
30006f54: 0a000009 beq 30006f80 <_Heap_Walk+0x174>
- 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;
30006f58: e59d3028 ldr r3, [sp, #40] ; 0x28
30006f5c: e5937004 ldr r7, [r3, #4]
30006f60: e3c77001 bic r7, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
30006f64: e0837007 add r7, r3, r7
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;
30006f68: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
30006f6c: e2188001 ands r8, r8, #1
30006f70: 1a000005 bne 30006f8c <_Heap_Walk+0x180>
(*printer)(
30006f74: e59f23d0 ldr r2, [pc, #976] ; 3000734c <_Heap_Walk+0x540>
30006f78: e1a00005 mov r0, r5
30006f7c: e3a01001 mov r1, #1
30006f80: e1a0e00f mov lr, pc
30006f84: e12fff14 bx r4
30006f88: ea0000db b 300072fc <_Heap_Walk+0x4f0>
);
return false;
}
if (
30006f8c: e59dc020 ldr ip, [sp, #32]
30006f90: e157000c cmp r7, ip
30006f94: 0a000006 beq 30006fb4 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
30006f98: e1a00005 mov r0, r5 <== NOT EXECUTED
30006f9c: e3a01001 mov r1, #1 <== NOT EXECUTED
30006fa0: e59f23a8 ldr r2, [pc, #936] ; 30007350 <_Heap_Walk+0x544> <== NOT EXECUTED
30006fa4: e1a0e00f mov lr, pc <== NOT EXECUTED
30006fa8: e12fff14 bx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30006fac: e1a0800a mov r8, sl <== NOT EXECUTED
30006fb0: ea0000d1 b 300072fc <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
30006fb4: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
30006fb8: e5968008 ldr r8, [r6, #8]
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
30006fbc: e1a0a006 mov sl, r6
30006fc0: ea000034 b 30007098 <_Heap_Walk+0x28c>
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;
30006fc4: e5963020 ldr r3, [r6, #32]
30006fc8: e1530008 cmp r3, r8
30006fcc: 83a0c000 movhi ip, #0
30006fd0: 8a000003 bhi 30006fe4 <_Heap_Walk+0x1d8>
30006fd4: e596c024 ldr ip, [r6, #36] ; 0x24
30006fd8: e15c0008 cmp ip, r8
30006fdc: 33a0c000 movcc ip, #0
30006fe0: 23a0c001 movcs ip, #1
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
30006fe4: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
30006fe8: 01a00005 moveq r0, r5
30006fec: 03a01001 moveq r1, #1
30006ff0: 059f235c ldreq r2, [pc, #860] ; 30007354 <_Heap_Walk+0x548>
30006ff4: 0a000012 beq 30007044 <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ff8: e2880008 add r0, r8, #8
30006ffc: e1a0100b mov r1, fp
30007000: ebffe6e5 bl 30000b9c <__umodsi3>
);
return false;
}
if (
30007004: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30007008: 11a00005 movne r0, r5
3000700c: 13a01001 movne r1, #1
30007010: 159f2340 ldrne r2, [pc, #832] ; 30007358 <_Heap_Walk+0x54c>
30007014: 11a03008 movne r3, r8
30007018: 1a0000be bne 30007318 <_Heap_Walk+0x50c>
- 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;
3000701c: e5983004 ldr r3, [r8, #4]
30007020: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007024: e0883003 add r3, r8, r3
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;
30007028: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
3000702c: e2133001 ands r3, r3, #1
30007030: e58d302c str r3, [sp, #44] ; 0x2c
30007034: 0a000009 beq 30007060 <_Heap_Walk+0x254>
(*printer)(
30007038: e59f231c ldr r2, [pc, #796] ; 3000735c <_Heap_Walk+0x550>
3000703c: e1a00005 mov r0, r5
30007040: e3a01001 mov r1, #1
30007044: e1a03008 mov r3, r8
30007048: e58dc01c str ip, [sp, #28]
3000704c: e1a0e00f mov lr, pc
30007050: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007054: e59dc01c ldr ip, [sp, #28]
30007058: e1a0800c mov r8, ip
3000705c: ea0000a6 b 300072fc <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007060: e598300c ldr r3, [r8, #12]
30007064: e153000a cmp r3, sl
30007068: 0a000008 beq 30007090 <_Heap_Walk+0x284>
(*printer)(
3000706c: e58d3000 str r3, [sp]
30007070: e1a00005 mov r0, r5
30007074: e1a03008 mov r3, r8
30007078: e3a01001 mov r1, #1
3000707c: e59f22dc ldr r2, [pc, #732] ; 30007360 <_Heap_Walk+0x554>
30007080: e1a0e00f mov lr, pc
30007084: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007088: e59d802c ldr r8, [sp, #44] ; 0x2c
3000708c: ea00009a b 300072fc <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
30007090: e1a0a008 mov sl, r8
30007094: e5988008 ldr r8, [r8, #8]
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 ) {
30007098: e1580006 cmp r8, r6
3000709c: 1affffc8 bne 30006fc4 <_Heap_Walk+0x1b8>
300070a0: ea000000 b 300070a8 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300070a4: e1a07008 mov r7, r8
return true;
}
300070a8: e5973004 ldr r3, [r7, #4]
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;
300070ac: e5962020 ldr r2, [r6, #32]
- 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;
300070b0: e3c3a001 bic sl, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
300070b4: e087800a add r8, r7, sl
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;
300070b8: e1520008 cmp r2, r8
300070bc: 83a0b000 movhi fp, #0
300070c0: 8a000003 bhi 300070d4 <_Heap_Walk+0x2c8>
300070c4: e596b024 ldr fp, [r6, #36] ; 0x24
300070c8: e15b0008 cmp fp, r8
300070cc: 33a0b000 movcc fp, #0
300070d0: 23a0b001 movcs fp, #1
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;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
300070d4: e21bb0ff ands fp, fp, #255 ; 0xff
300070d8: 1a000007 bne 300070fc <_Heap_Walk+0x2f0>
(*printer)(
300070dc: e58d8000 str r8, [sp]
300070e0: e1a00005 mov r0, r5
300070e4: e3a01001 mov r1, #1
300070e8: e59f2274 ldr r2, [pc, #628] ; 30007364 <_Heap_Walk+0x558>
300070ec: e1a03007 mov r3, r7
300070f0: e1a0e00f mov lr, pc
300070f4: e12fff14 bx r4
300070f8: ea00005e b 30007278 <_Heap_Walk+0x46c>
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;
300070fc: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007100: e1a0000a mov r0, sl
30007104: e1a01009 mov r1, r9
30007108: e057b002 subs fp, r7, r2
3000710c: 13a0b001 movne fp, #1
30007110: e58d301c str r3, [sp, #28]
30007114: ebffe6a0 bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
30007118: e3500000 cmp r0, #0
3000711c: e59d301c ldr r3, [sp, #28]
30007120: 0a000005 beq 3000713c <_Heap_Walk+0x330>
30007124: e35b0000 cmp fp, #0
(*printer)(
30007128: 158da000 strne sl, [sp]
3000712c: 11a00005 movne r0, r5
30007130: 13a01001 movne r1, #1
30007134: 159f222c ldrne r2, [pc, #556] ; 30007368 <_Heap_Walk+0x55c>
30007138: 1a000014 bne 30007190 <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
3000713c: e59dc024 ldr ip, [sp, #36] ; 0x24
30007140: e15a000c cmp sl, ip
30007144: 2a000009 bcs 30007170 <_Heap_Walk+0x364>
30007148: e35b0000 cmp fp, #0
3000714c: 0a000007 beq 30007170 <_Heap_Walk+0x364>
(*printer)(
30007150: e88d1400 stm sp, {sl, ip}
30007154: e1a00005 mov r0, r5
30007158: e3a01001 mov r1, #1
3000715c: e59f2208 ldr r2, [pc, #520] ; 3000736c <_Heap_Walk+0x560>
30007160: e1a03007 mov r3, r7
30007164: e1a0e00f mov lr, pc
30007168: e12fff14 bx r4
3000716c: ea00006b b 30007320 <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
30007170: e1580007 cmp r8, r7
30007174: 8a000009 bhi 300071a0 <_Heap_Walk+0x394>
30007178: e35b0000 cmp fp, #0
3000717c: 0a000007 beq 300071a0 <_Heap_Walk+0x394>
(*printer)(
30007180: e59f21e8 ldr r2, [pc, #488] ; 30007370 <_Heap_Walk+0x564>
30007184: e58d8000 str r8, [sp]
30007188: e1a00005 mov r0, r5
3000718c: e3a01001 mov r1, #1
30007190: e1a03007 mov r3, r7
30007194: e1a0e00f mov lr, pc
30007198: e12fff14 bx r4
3000719c: ea00005f b 30007320 <_Heap_Walk+0x514>
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;
300071a0: e203b001 and fp, r3, #1
300071a4: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
300071a8: e3130001 tst r3, #1
300071ac: 1a00003b bne 300072a0 <_Heap_Walk+0x494>
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 ?
300071b0: e597200c ldr r2, [r7, #12]
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)(
300071b4: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
300071b8: e596100c ldr r1, [r6, #12]
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)(
300071bc: e1520003 cmp r2, r3
300071c0: 059f01ac ldreq r0, [pc, #428] ; 30007374 <_Heap_Walk+0x568>
300071c4: 0a000003 beq 300071d8 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
300071c8: e59f31a8 ldr r3, [pc, #424] ; 30007378 <_Heap_Walk+0x56c>
300071cc: e1520006 cmp r2, r6
300071d0: e59f01a4 ldr r0, [pc, #420] ; 3000737c <_Heap_Walk+0x570>
300071d4: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
300071d8: e5973008 ldr r3, [r7, #8]
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)(
300071dc: e1530001 cmp r3, r1
300071e0: 059f1198 ldreq r1, [pc, #408] ; 30007380 <_Heap_Walk+0x574>
300071e4: 0a000003 beq 300071f8 <_Heap_Walk+0x3ec>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
300071e8: e59fc194 ldr ip, [pc, #404] ; 30007384 <_Heap_Walk+0x578>
300071ec: e1530006 cmp r3, r6
300071f0: e59f1184 ldr r1, [pc, #388] ; 3000737c <_Heap_Walk+0x570>
300071f4: 01a0100c moveq r1, ip
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)(
300071f8: e58d2004 str r2, [sp, #4]
300071fc: e58d0008 str r0, [sp, #8]
30007200: e58d300c str r3, [sp, #12]
30007204: e58d1010 str r1, [sp, #16]
30007208: e1a03007 mov r3, r7
3000720c: e58da000 str sl, [sp]
30007210: e1a00005 mov r0, r5
30007214: e3a01000 mov r1, #0
30007218: e59f2168 ldr r2, [pc, #360] ; 30007388 <_Heap_Walk+0x57c>
3000721c: e1a0e00f mov lr, pc
30007220: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
30007224: e5983000 ldr r3, [r8]
30007228: e15a0003 cmp sl, r3
3000722c: 0a000009 beq 30007258 <_Heap_Walk+0x44c>
(*printer)(
30007230: e58d3004 str r3, [sp, #4]
30007234: e58da000 str sl, [sp]
30007238: e58d8008 str r8, [sp, #8]
3000723c: e1a00005 mov r0, r5
30007240: e3a01001 mov r1, #1
30007244: e59f2140 ldr r2, [pc, #320] ; 3000738c <_Heap_Walk+0x580>
30007248: e1a03007 mov r3, r7
3000724c: e1a0e00f mov lr, pc
30007250: e12fff14 bx r4
30007254: ea000031 b 30007320 <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
30007258: e35b0000 cmp fp, #0
3000725c: 1a000007 bne 30007280 <_Heap_Walk+0x474>
(*printer)(
30007260: e59f2128 ldr r2, [pc, #296] ; 30007390 <_Heap_Walk+0x584>
30007264: e1a00005 mov r0, r5
30007268: e3a01001 mov r1, #1
3000726c: e1a03007 mov r3, r7
30007270: e1a0e00f mov lr, pc
30007274: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007278: e1a0800b mov r8, fp
3000727c: ea00001e b 300072fc <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
30007280: e5963008 ldr r3, [r6, #8]
30007284: ea000002 b 30007294 <_Heap_Walk+0x488>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
30007288: e1530007 cmp r3, r7
3000728c: 0a000016 beq 300072ec <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
30007290: e5933008 ldr r3, [r3, #8]
)
{
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 ) {
30007294: e1530006 cmp r3, r6
30007298: 1afffffa bne 30007288 <_Heap_Walk+0x47c>
3000729c: ea000019 b 30007308 <_Heap_Walk+0x4fc>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
300072a0: e35b0000 cmp fp, #0
300072a4: 0a000007 beq 300072c8 <_Heap_Walk+0x4bc>
(*printer)(
300072a8: e58da000 str sl, [sp]
300072ac: e1a00005 mov r0, r5
300072b0: e3a01000 mov r1, #0
300072b4: e59f20d8 ldr r2, [pc, #216] ; 30007394 <_Heap_Walk+0x588>
300072b8: e1a03007 mov r3, r7
300072bc: e1a0e00f mov lr, pc
300072c0: e12fff14 bx r4
300072c4: ea000008 b 300072ec <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
300072c8: e58da000 str sl, [sp]
300072cc: e5973000 ldr r3, [r7]
300072d0: e1a00005 mov r0, r5
300072d4: e58d3004 str r3, [sp, #4]
300072d8: e1a0100b mov r1, fp
300072dc: e59f20b4 ldr r2, [pc, #180] ; 30007398 <_Heap_Walk+0x58c>
300072e0: e1a03007 mov r3, r7
300072e4: e1a0e00f mov lr, pc
300072e8: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300072ec: e59d2020 ldr r2, [sp, #32]
300072f0: e1580002 cmp r8, r2
300072f4: 1affff6a bne 300070a4 <_Heap_Walk+0x298>
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
300072f8: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
300072fc: e1a00008 mov r0, r8
30007300: e28dd030 add sp, sp, #48 ; 0x30
30007304: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
30007308: e59f208c ldr r2, [pc, #140] ; 3000739c <_Heap_Walk+0x590>
3000730c: e1a00005 mov r0, r5
30007310: e3a01001 mov r1, #1
30007314: e1a03007 mov r3, r7
30007318: e1a0e00f mov lr, pc
3000731c: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007320: e3a08000 mov r8, #0
30007324: eafffff4 b 300072fc <_Heap_Walk+0x4f0>
30006248 <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
30006248: e59f3038 ldr r3, [pc, #56] ; 30006288 <_Internal_error_Occurred+0x40>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
3000624c: e20110ff and r1, r1, #255 ; 0xff
30006250: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
30006254: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
30006258: e5c31004 strb r1, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
3000625c: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30006260: e1a04002 mov r4, r2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
30006264: eb0006d3 bl 30007db8 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
30006268: e59f301c ldr r3, [pc, #28] ; 3000628c <_Internal_error_Occurred+0x44><== NOT EXECUTED
3000626c: e3a02005 mov r2, #5 <== NOT EXECUTED
30006270: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30006274: e10f2000 mrs r2, CPSR <== NOT EXECUTED
30006278: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
3000627c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
30006280: e1a00004 mov r0, r4 <== NOT EXECUTED
30006284: eafffffe b 30006284 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
30007c68 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
30007c68: e92d4011 push {r0, r4, lr}
30007c6c: e1a04001 mov r4, r1
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
30007c70: e2501000 subs r1, r0, #0
30007c74: 059f306c ldreq r3, [pc, #108] ; 30007ce8 <_Objects_Id_to_name+0x80>
30007c78: 05933004 ldreq r3, [r3, #4]
30007c7c: 05931008 ldreq r1, [r3, #8]
30007c80: e1a03c21 lsr r3, r1, #24
30007c84: e2033007 and r3, r3, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
30007c88: e2432001 sub r2, r3, #1
30007c8c: e3520002 cmp r2, #2
30007c90: 8a00000d bhi 30007ccc <_Objects_Id_to_name+0x64>
30007c94: ea00000e b 30007cd4 <_Objects_Id_to_name+0x6c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
30007c98: e1a02da1 lsr r2, r1, #27
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
30007c9c: e7930102 ldr r0, [r3, r2, lsl #2]
if ( !information )
30007ca0: e3500000 cmp r0, #0
30007ca4: 0a000008 beq 30007ccc <_Objects_Id_to_name+0x64>
#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 );
30007ca8: e1a0200d mov r2, sp
30007cac: ebffffd3 bl 30007c00 <_Objects_Get>
if ( !the_object )
30007cb0: e3500000 cmp r0, #0
30007cb4: 0a000004 beq 30007ccc <_Objects_Id_to_name+0x64>
return OBJECTS_INVALID_ID;
*name = the_object->name;
30007cb8: e590300c ldr r3, [r0, #12]
30007cbc: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
30007cc0: eb00020c bl 300084f8 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
30007cc4: e3a00000 mov r0, #0
30007cc8: ea000000 b 30007cd0 <_Objects_Id_to_name+0x68>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
30007ccc: e3a00003 mov r0, #3
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
30007cd0: e8bd8018 pop {r3, r4, pc}
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
30007cd4: e59f2010 ldr r2, [pc, #16] ; 30007cec <_Objects_Id_to_name+0x84>
30007cd8: e7923103 ldr r3, [r2, r3, lsl #2]
30007cdc: e3530000 cmp r3, #0
30007ce0: 1affffec bne 30007c98 <_Objects_Id_to_name+0x30>
30007ce4: eafffff8 b 30007ccc <_Objects_Id_to_name+0x64> <== NOT EXECUTED
300074b8 <_Thread_queue_Enqueue_priority>:
300074b8: e281303c add r3, r1, #60 ; 0x3c
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
300074bc: e591c014 ldr ip, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300074c0: e5813038 str r3, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
300074c4: e3a03000 mov r3, #0
300074c8: e581303c str r3, [r1, #60] ; 0x3c
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
300074cc: e2813038 add r3, r1, #56 ; 0x38
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
300074d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
the_chain->last = _Chain_Head(the_chain);
300074d4: e5813040 str r3, [r1, #64] ; 0x40
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
300074d8: e3a0400c mov r4, #12
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
300074dc: e1a0332c lsr r3, ip, #6
300074e0: e0030394 mul r3, r4, r3
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
300074e4: e31c0020 tst ip, #32
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
300074e8: e0807003 add r7, r0, r3
block_state = the_thread_queue->state;
300074ec: e5908038 ldr r8, [r0, #56] ; 0x38
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
300074f0: 159fa15c ldrne sl, [pc, #348] ; 30007654 <_Thread_queue_Enqueue_priority+0x19c>
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
300074f4: 11a0b007 movne fp, r7
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
300074f8: 1a000024 bne 30007590 <_Thread_queue_Enqueue_priority+0xd8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300074fc: e2833004 add r3, r3, #4
30007500: e080a003 add sl, r0, r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007504: e10f4000 mrs r4, CPSR
30007508: e3843080 orr r3, r4, #128 ; 0x80
3000750c: e129f003 msr CPSR_fc, r3
30007510: e1a05004 mov r5, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
30007514: e3e06000 mvn r6, #0
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
30007518: e5973000 ldr r3, [r7]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
3000751c: ea00000b b 30007550 <_Thread_queue_Enqueue_priority+0x98>
search_priority = search_thread->current_priority;
30007520: e5936014 ldr r6, [r3, #20]
if ( priority <= search_priority )
30007524: e15c0006 cmp ip, r6
30007528: 9a00000a bls 30007558 <_Thread_queue_Enqueue_priority+0xa0>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
3000752c: e10f9000 mrs r9, CPSR
30007530: e129f004 msr CPSR_fc, r4
30007534: e129f009 msr CPSR_fc, r9
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
30007538: e5939010 ldr r9, [r3, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
3000753c: e1180009 tst r8, r9
30007540: 1a000001 bne 3000754c <_Thread_queue_Enqueue_priority+0x94>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007544: e129f004 msr CPSR_fc, r4
30007548: eaffffed b 30007504 <_Thread_queue_Enqueue_priority+0x4c>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
3000754c: e5933000 ldr r3, [r3]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007550: e153000a cmp r3, sl
30007554: 1afffff1 bne 30007520 <_Thread_queue_Enqueue_priority+0x68>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
30007558: e5907030 ldr r7, [r0, #48] ; 0x30
3000755c: e3570001 cmp r7, #1
30007560: 1a000038 bne 30007648 <_Thread_queue_Enqueue_priority+0x190>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007564: e3a02000 mov r2, #0
if ( priority == search_priority )
30007568: e15c0006 cmp ip, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
3000756c: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
30007570: 0a00002a beq 30007620 <_Thread_queue_Enqueue_priority+0x168>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
30007574: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007578: e5813000 str r3, [r1]
the_node->previous = previous_node;
3000757c: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
30007580: e5821000 str r1, [r2]
search_node->previous = the_node;
30007584: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
30007588: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
3000758c: ea000021 b 30007618 <_Thread_queue_Enqueue_priority+0x160>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
30007590: e5da6000 ldrb r6, [sl]
30007594: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007598: e10f4000 mrs r4, CPSR
3000759c: e3843080 orr r3, r4, #128 ; 0x80
300075a0: e129f003 msr CPSR_fc, r3
300075a4: e1a05004 mov r5, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
300075a8: e59b3008 ldr r3, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
300075ac: ea00000b b 300075e0 <_Thread_queue_Enqueue_priority+0x128>
search_priority = search_thread->current_priority;
300075b0: e5936014 ldr r6, [r3, #20]
if ( priority >= search_priority )
300075b4: e15c0006 cmp ip, r6
300075b8: 2a00000a bcs 300075e8 <_Thread_queue_Enqueue_priority+0x130>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
300075bc: e10f9000 mrs r9, CPSR
300075c0: e129f004 msr CPSR_fc, r4
300075c4: e129f009 msr CPSR_fc, r9
300075c8: e5939010 ldr r9, [r3, #16]
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
300075cc: e1180009 tst r8, r9
300075d0: 1a000001 bne 300075dc <_Thread_queue_Enqueue_priority+0x124>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300075d4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
300075d8: eaffffec b 30007590 <_Thread_queue_Enqueue_priority+0xd8> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
300075dc: e5933004 ldr r3, [r3, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
300075e0: e1530007 cmp r3, r7
300075e4: 1afffff1 bne 300075b0 <_Thread_queue_Enqueue_priority+0xf8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
300075e8: e5907030 ldr r7, [r0, #48] ; 0x30
300075ec: e3570001 cmp r7, #1
300075f0: 1a000014 bne 30007648 <_Thread_queue_Enqueue_priority+0x190>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
300075f4: e3a02000 mov r2, #0
if ( priority == search_priority )
300075f8: e15c0006 cmp ip, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
300075fc: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
30007600: 0a000006 beq 30007620 <_Thread_queue_Enqueue_priority+0x168>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
30007604: e5932000 ldr r2, [r3]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
30007608: e881000c stm r1, {r2, r3}
search_node->next = the_node;
next_node->previous = the_node;
3000760c: e5821004 str r1, [r2, #4]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
30007610: e5831000 str r1, [r3]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
30007614: e5810044 str r0, [r1, #68] ; 0x44
30007618: e129f004 msr CPSR_fc, r4
3000761c: ea000007 b 30007640 <_Thread_queue_Enqueue_priority+0x188>
30007620: e283303c add r3, r3, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
30007624: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007628: e5813000 str r3, [r1]
the_node->previous = previous_node;
3000762c: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
30007630: e5821000 str r1, [r2]
search_node->previous = the_node;
30007634: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
30007638: e5810044 str r0, [r1, #68] ; 0x44
3000763c: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007640: e3a00001 mov r0, #1
30007644: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
30007648: e5825000 str r5, [r2]
return the_thread_queue->sync_state;
3000764c: e5900030 ldr r0, [r0, #48] ; 0x30
}
30007650: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000a654 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
3000a654: e92d4070 push {r4, r5, r6, lr}
3000a658: e20220ff and r2, r2, #255 ; 0xff
3000a65c: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a660: e10f1000 mrs r1, CPSR
3000a664: e3813080 orr r3, r1, #128 ; 0x80
3000a668: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
3000a66c: e59f30a8 ldr r3, [pc, #168] ; 3000a71c <_Thread_queue_Extract_priority_helper+0xc8>
3000a670: e5940010 ldr r0, [r4, #16]
3000a674: e0003003 and r3, r0, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
3000a678: e3530000 cmp r3, #0
3000a67c: 1a000000 bne 3000a684 <_Thread_queue_Extract_priority_helper+0x30>
_ISR_Enable( level );
3000a680: ea000015 b 3000a6dc <_Thread_queue_Extract_priority_helper+0x88>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000a684: e5943038 ldr r3, [r4, #56] ; 0x38
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
3000a688: e8941001 ldm r4, {r0, ip}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000a68c: e284503c add r5, r4, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000a690: e1530005 cmp r3, r5
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
3000a694: 058c0000 streq r0, [ip]
next_node->previous = previous_node;
3000a698: 0580c004 streq ip, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000a69c: 0a00000c beq 3000a6d4 <_Thread_queue_Extract_priority_helper+0x80>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
3000a6a0: e5945040 ldr r5, [r4, #64] ; 0x40
new_second_node = new_first_node->next;
3000a6a4: e5936000 ldr r6, [r3]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000a6a8: e1530005 cmp r3, r5
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
3000a6ac: e58c3000 str r3, [ip]
next_node->previous = new_first_node;
3000a6b0: e5803004 str r3, [r0, #4]
new_first_node->next = next_node;
3000a6b4: e8831001 stm r3, {r0, ip}
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000a6b8: 0a000005 beq 3000a6d4 <_Thread_queue_Extract_priority_helper+0x80>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
3000a6bc: e2830038 add r0, r3, #56 ; 0x38
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
new_second_node->previous =
3000a6c0: e5860004 str r0, [r6, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
3000a6c4: e5836038 str r6, [r3, #56] ; 0x38
new_first_thread->Wait.Block2n.last = last_node;
3000a6c8: e5835040 str r5, [r3, #64] ; 0x40
3000a6cc: e283303c add r3, r3, #60 ; 0x3c
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
3000a6d0: e5853000 str r3, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
3000a6d4: e3520000 cmp r2, #0
3000a6d8: 0a000001 beq 3000a6e4 <_Thread_queue_Extract_priority_helper+0x90>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a6dc: e129f001 msr CPSR_fc, r1
3000a6e0: e8bd8070 pop {r4, r5, r6, pc}
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
3000a6e4: e5943050 ldr r3, [r4, #80] ; 0x50
3000a6e8: e3530002 cmp r3, #2
3000a6ec: 0a000001 beq 3000a6f8 <_Thread_queue_Extract_priority_helper+0xa4>
3000a6f0: e129f001 msr CPSR_fc, r1
3000a6f4: ea000004 b 3000a70c <_Thread_queue_Extract_priority_helper+0xb8>
3000a6f8: e3a03003 mov r3, #3 <== NOT EXECUTED
3000a6fc: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
3000a700: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
3000a704: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
3000a708: ebfff65c bl 30008080 <_Watchdog_Remove> <== NOT EXECUTED
3000a70c: e59f100c ldr r1, [pc, #12] ; 3000a720 <_Thread_queue_Extract_priority_helper+0xcc>
3000a710: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
3000a714: e8bd4070 pop {r4, r5, r6, lr}
3000a718: eafff136 b 30006bf8 <_Thread_Clear_state>
3001423c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
3001423c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30014240: e24dd018 sub sp, sp, #24
30014244: e28db00c add fp, sp, #12
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
30014248: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3001424c: e28ba004 add sl, fp, #4
30014250: e28d7004 add r7, sp, #4
30014254: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30014258: e58da00c str sl, [sp, #12]
the_chain->permanent_null = NULL;
3001425c: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
30014260: e58db014 str fp, [sp, #20]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30014264: e1a0500d mov r5, sp
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30014268: e58d7000 str r7, [sp]
the_chain->permanent_null = NULL;
3001426c: e98d2008 stmib sp, {r3, sp}
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014270: e2809030 add r9, r0, #48 ; 0x30
{
/*
* 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;
30014274: e584b078 str fp, [r4, #120] ; 0x78
/*
* 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 );
30014278: e2848068 add r8, r4, #104 ; 0x68
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
3001427c: e59f2150 ldr r2, [pc, #336] ; 300143d4 <_Timer_server_Body+0x198>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014280: e1a00009 mov r0, r9
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
30014284: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
30014288: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001428c: e1a02005 mov r2, r5
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
30014290: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014294: e0611003 rsb r1, r1, r3
30014298: eb00106b bl 3001844c <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
3001429c: e59f3134 ldr r3, [pc, #308] ; 300143d8 <_Timer_server_Body+0x19c>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
300142a0: e5942074 ldr r2, [r4, #116] ; 0x74
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
300142a4: e5936000 ldr r6, [r3]
/*
* 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 ) {
300142a8: e1560002 cmp r6, r2
300142ac: 9a000004 bls 300142c4 <_Timer_server_Body+0x88>
/*
* 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 );
300142b0: e0621006 rsb r1, r2, r6
300142b4: e1a00008 mov r0, r8
300142b8: e1a02005 mov r2, r5
300142bc: eb001062 bl 3001844c <_Watchdog_Adjust_to_chain>
300142c0: ea000003 b 300142d4 <_Timer_server_Body+0x98>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
300142c4: 31a00008 movcc r0, r8
300142c8: 33a01001 movcc r1, #1
300142cc: 30662002 rsbcc r2, r6, r2
300142d0: 3b001035 blcc 300183ac <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
300142d4: e5846074 str r6, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
300142d8: e5940078 ldr r0, [r4, #120] ; 0x78
300142dc: eb000282 bl 30014cec <_Chain_Get>
if ( timer == NULL ) {
300142e0: e2506000 subs r6, r0, #0
300142e4: 0a000009 beq 30014310 <_Timer_server_Body+0xd4>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
300142e8: e5963038 ldr r3, [r6, #56] ; 0x38
300142ec: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
300142f0: 01a00009 moveq r0, r9
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
300142f4: 0a000002 beq 30014304 <_Timer_server_Body+0xc8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
300142f8: e3530003 cmp r3, #3
300142fc: 1afffff5 bne 300142d8 <_Timer_server_Body+0x9c>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
30014300: e1a00008 mov r0, r8
30014304: e2861010 add r1, r6, #16
30014308: eb00107a bl 300184f8 <_Watchdog_Insert>
3001430c: eafffff1 b 300142d8 <_Timer_server_Body+0x9c>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
30014310: ebffff97 bl 30014174 <arm_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
30014314: e59d300c ldr r3, [sp, #12]
30014318: e153000a cmp r3, sl
3001431c: 1a000006 bne 3001433c <_Timer_server_Body+0x100>
ts->insert_chain = NULL;
30014320: e5846078 str r6, [r4, #120] ; 0x78
30014324: e129f000 msr CPSR_fc, r0
_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 ) ) {
30014328: e59d3000 ldr r3, [sp]
3001432c: e1530007 cmp r3, r7
)
{
if ( !_Chain_Is_empty(the_chain))
return _Chain_Get_first_unprotected(the_chain);
else
return NULL;
30014330: 13a06000 movne r6, #0
30014334: 1a000002 bne 30014344 <_Timer_server_Body+0x108>
30014338: ea000013 b 3001438c <_Timer_server_Body+0x150>
3001433c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
30014340: eaffffcd b 3001427c <_Timer_server_Body+0x40> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
30014344: ebffff8a bl 30014174 <arm_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30014348: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
3001434c: e1530007 cmp r3, r7
30014350: 0a00000b beq 30014384 <_Timer_server_Body+0x148>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
30014354: e5932000 ldr r2, [r3]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
30014358: e3530000 cmp r3, #0
the_chain->first = new_first;
3001435c: e58d2000 str r2, [sp]
new_first->previous = _Chain_Head(the_chain);
30014360: e5825004 str r5, [r2, #4]
30014364: 0a000006 beq 30014384 <_Timer_server_Body+0x148>
watchdog->state = WATCHDOG_INACTIVE;
30014368: e5836008 str r6, [r3, #8]
3001436c: e129f000 msr CPSR_fc, r0
/*
* 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 );
30014370: e5930020 ldr r0, [r3, #32]
30014374: e5931024 ldr r1, [r3, #36] ; 0x24
30014378: e1a0e00f mov lr, pc
3001437c: e593f01c ldr pc, [r3, #28]
}
30014380: eaffffef b 30014344 <_Timer_server_Body+0x108>
30014384: e129f000 msr CPSR_fc, r0
30014388: eaffffb9 b 30014274 <_Timer_server_Body+0x38>
} else {
ts->active = false;
3001438c: e3a03000 mov r3, #0
30014390: e5c4307c strb r3, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
30014394: ebffff7a bl 30014184 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
30014398: e3a01008 mov r1, #8
3001439c: e5940000 ldr r0, [r4]
300143a0: eb000dc1 bl 30017aac <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
300143a4: e1a00004 mov r0, r4
300143a8: ebffff7b bl 3001419c <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
300143ac: e1a00004 mov r0, r4
300143b0: ebffff8d bl 300141ec <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
300143b4: eb000b49 bl 300170e0 <_Thread_Enable_dispatch>
ts->active = true;
300143b8: e3a03001 mov r3, #1
300143bc: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
300143c0: e2840008 add r0, r4, #8
300143c4: eb0010a1 bl 30018650 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
300143c8: e2840040 add r0, r4, #64 ; 0x40
300143cc: eb00109f bl 30018650 <_Watchdog_Remove>
300143d0: eaffffa7 b 30014274 <_Timer_server_Body+0x38>
300098c8 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
300098c8: e5902000 ldr r2, [r0]
300098cc: e5913000 ldr r3, [r1]
300098d0: e1520003 cmp r2, r3
return true;
300098d4: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
300098d8: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
300098dc: ba000005 blt 300098f8 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
300098e0: e5900004 ldr r0, [r0, #4]
300098e4: e5913004 ldr r3, [r1, #4]
300098e8: e1500003 cmp r0, r3
300098ec: d3a00000 movle r0, #0
300098f0: c3a00001 movgt r0, #1
300098f4: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
300098f8: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
300098fc: e12fff1e bx lr <== NOT EXECUTED
30007db8 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007db8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007dbc: e59f503c ldr r5, [pc, #60] ; 30007e00 <_User_extensions_Fatal+0x48>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007dc0: e1a08000 mov r8, r0
30007dc4: e1a07002 mov r7, r2
30007dc8: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007dcc: e5954008 ldr r4, [r5, #8]
30007dd0: ea000007 b 30007df4 <_User_extensions_Fatal+0x3c>
!_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 )
30007dd4: e5943030 ldr r3, [r4, #48] ; 0x30
30007dd8: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
30007ddc: 11a00008 movne r0, r8
30007de0: 11a01006 movne r1, r6
30007de4: 11a02007 movne r2, r7
30007de8: 11a0e00f movne lr, pc
30007dec: 112fff13 bxne r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
30007df0: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007df4: e1540005 cmp r4, r5
30007df8: 1afffff5 bne 30007dd4 <_User_extensions_Fatal+0x1c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
30007dfc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3001f660 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
3001f660: e3a00000 mov r0, #0 <== NOT EXECUTED
3001f664: e12fff1e bx lr <== NOT EXECUTED
30011718 <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
30011718: e1a04000 mov r4, r0
3001171c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
30011720: eb00021f bl 30011fa4 <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
30011724: ebffffdf bl 300116a8 <libc_wrapup>
rtems_shutdown_executive(status);
30011728: e1a00004 mov r0, r4
3001172c: eb000036 bl 3001180c <rtems_shutdown_executive>
30011730: eafffffe b 30011730 <_exit+0x18> <== NOT EXECUTED
30001f90 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
30001f90: eaffffe5 b 30001f2c <gettimeofday> <== NOT EXECUTED
300057f8 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
300057f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
300057fc: e1a00001 mov r0, r1 <== NOT EXECUTED
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
30005800: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
30005804: e1a04001 mov r4, r1 <== NOT EXECUTED
30005808: e1a06002 mov r6, r2 <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
3000580c: ebfffb2f bl 300044d0 <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
30005810: e2507000 subs r7, r0, #0 <== NOT EXECUTED
30005814: e28d3018 add r3, sp, #24 <== NOT EXECUTED
30005818: 1a000005 bne 30005834 <_rename_r+0x3c> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
3000581c: e1a00004 mov r0, r4 <== NOT EXECUTED
30005820: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED
30005824: e1a02003 mov r2, r3 <== NOT EXECUTED
30005828: eb0000dd bl 30005ba4 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
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;
3000582c: e1a05007 mov r5, r7 <== NOT EXECUTED
30005830: ea000008 b 30005858 <_rename_r+0x60> <== NOT EXECUTED
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,
30005834: e3a02000 mov r2, #0 <== NOT EXECUTED
30005838: e58d2000 str r2, [sp] <== NOT EXECUTED
3000583c: e1a00004 mov r0, r4 <== NOT EXECUTED
30005840: e1a01007 mov r1, r7 <== NOT EXECUTED
30005844: e2822002 add r2, r2, #2 <== NOT EXECUTED
30005848: ebfffb02 bl 30004458 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
3000584c: e3500000 cmp r0, #0 <== NOT EXECUTED
30005850: 1a000054 bne 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED
return -1;
free_old_parentloc = true;
30005854: e3a05001 mov r5, #1 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30005858: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED
3000585c: e28de018 add lr, sp, #24 <== NOT EXECUTED
30005860: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
30005864: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
30005868: e59e3000 ldr r3, [lr] <== NOT EXECUTED
name = old + old_parent_pathlen;
3000586c: e0844007 add r4, r4, r7 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30005870: e58c3000 str r3, [ip] <== NOT EXECUTED
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005874: e1a00004 mov r0, r4 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
30005878: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
3000587c: eb00329d bl 300122f8 <strlen> <== NOT EXECUTED
30005880: e1a01000 mov r1, r0 <== NOT EXECUTED
30005884: e1a00004 mov r0, r4 <== NOT EXECUTED
30005888: ebfffb1e bl 30004508 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
3000588c: e0844000 add r4, r4, r0 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30005890: e1a00004 mov r0, r4 <== NOT EXECUTED
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005894: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30005898: eb003296 bl 300122f8 <strlen> <== NOT EXECUTED
3000589c: e28d802c add r8, sp, #44 ; 0x2c <== NOT EXECUTED
300058a0: e1a01000 mov r1, r0 <== NOT EXECUTED
300058a4: e3a02000 mov r2, #0 <== NOT EXECUTED
300058a8: e1a00004 mov r0, r4 <== NOT EXECUTED
300058ac: e1a03008 mov r3, r8 <== NOT EXECUTED
300058b0: e58d2000 str r2, [sp] <== NOT EXECUTED
300058b4: ebfffabf bl 300043b8 <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED
0, &old_loc, false );
if ( result != 0 ) {
300058b8: e3500000 cmp r0, #0 <== NOT EXECUTED
300058bc: 0a000003 beq 300058d0 <_rename_r+0xd8> <== NOT EXECUTED
if ( free_old_parentloc )
300058c0: e3550000 cmp r5, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
300058c4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
300058c8: 0a000036 beq 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED
300058cc: ea000013 b 30005920 <_rename_r+0x128> <== NOT EXECUTED
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
300058d0: e28d4004 add r4, sp, #4 <== NOT EXECUTED
300058d4: e1a00006 mov r0, r6 <== NOT EXECUTED
300058d8: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED
300058dc: e1a02004 mov r2, r4 <== NOT EXECUTED
300058e0: eb0000af bl 30005ba4 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
300058e4: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED
300058e8: e1a01004 mov r1, r4 <== NOT EXECUTED
300058ec: e0860000 add r0, r6, r0 <== NOT EXECUTED
300058f0: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED
300058f4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
300058f8: e1a0e00f mov lr, pc <== NOT EXECUTED
300058fc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( result != 0 ) {
30005900: e3500000 cmp r0, #0 <== NOT EXECUTED
30005904: 0a000007 beq 30005928 <_rename_r+0x130> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
30005908: e1a00004 mov r0, r4 <== NOT EXECUTED
3000590c: ebfffb0c bl 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_old_parentloc )
30005910: e3550000 cmp r5, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
30005914: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
30005918: 1bfffb09 blne 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
3000591c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED
30005920: ebfffb07 bl 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
30005924: ea00001f b 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED
/*
* 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 ) {
30005928: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
3000592c: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED
30005930: e1520003 cmp r2, r3 <== NOT EXECUTED
30005934: 0a00000a beq 30005964 <_rename_r+0x16c> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
30005938: e1a00004 mov r0, r4 <== NOT EXECUTED
3000593c: ebfffb00 bl 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_old_parentloc )
30005940: e3550000 cmp r5, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
30005944: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
30005948: 1bfffafd blne 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
3000594c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED
30005950: ebfffafb bl 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
30005954: eb002582 bl 3000ef64 <__errno> <== NOT EXECUTED
30005958: e3a03012 mov r3, #18 <== NOT EXECUTED
3000595c: e5803000 str r3, [r0] <== NOT EXECUTED
30005960: ea000010 b 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
30005964: e28d6018 add r6, sp, #24 <== NOT EXECUTED
30005968: e1a01008 mov r1, r8 <== NOT EXECUTED
3000596c: e1a02004 mov r2, r4 <== NOT EXECUTED
30005970: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
30005974: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
30005978: e1a00006 mov r0, r6 <== NOT EXECUTED
3000597c: e1a0e00f mov lr, pc <== NOT EXECUTED
30005980: e59cf040 ldr pc, [ip, #64] ; 0x40 <== NOT EXECUTED
30005984: e1a07000 mov r7, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
30005988: e1a00004 mov r0, r4 <== NOT EXECUTED
3000598c: ebfffaec bl 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_old_parentloc )
30005990: e3550000 cmp r5, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
30005994: 11a00006 movne r0, r6 <== NOT EXECUTED
30005998: 1bfffae9 blne 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
3000599c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED
300059a0: ebfffae7 bl 30004544 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
300059a4: ea000000 b 300059ac <_rename_r+0x1b4> <== NOT EXECUTED
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 );
return -1;
300059a8: e3e07000 mvn r7, #0 <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
300059ac: e1a00007 mov r0, r7 <== NOT EXECUTED
300059b0: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
300059b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30005a90 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
30005a90: e1a00001 mov r0, r1 <== NOT EXECUTED
30005a94: eaffffa9 b 30005940 <unlink> <== NOT EXECUTED
30001f60 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30001f60: e92d4070 push {r4, r5, r6, lr}
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) {
30001f64: e59f50b4 ldr r5, [pc, #180] ; 30002020 <chroot+0xc0>
30001f68: e59f30b4 ldr r3, [pc, #180] ; 30002024 <chroot+0xc4>
30001f6c: e5954000 ldr r4, [r5]
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30001f70: e24dd018 sub sp, sp, #24
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) {
30001f74: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30001f78: e1a06000 mov r6, r0
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) {
30001f7c: 1a000007 bne 30001fa0 <chroot+0x40>
rtems_libio_set_private_env(); /* try to set a new private env*/
30001f80: eb0004b6 bl 30003260 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
30001f84: e5953000 ldr r3, [r5]
30001f88: e1530004 cmp r3, r4
30001f8c: 1a000003 bne 30001fa0 <chroot+0x40>
rtems_set_errno_and_return_minus_one( ENOTSUP );
30001f90: eb002997 bl 3000c5f4 <__errno> <== NOT EXECUTED
30001f94: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30001f98: e5803000 str r3, [r0] <== NOT EXECUTED
30001f9c: ea000008 b 30001fc4 <chroot+0x64> <== NOT EXECUTED
}
result = chdir(pathname);
30001fa0: e1a00006 mov r0, r6
30001fa4: eb001fe7 bl 30009f48 <chdir>
if (result) {
30001fa8: e2502000 subs r2, r0, #0
30001fac: 0a000006 beq 30001fcc <chroot+0x6c>
rtems_set_errno_and_return_minus_one( errno );
30001fb0: eb00298f bl 3000c5f4 <__errno> <== NOT EXECUTED
30001fb4: e1a04000 mov r4, r0 <== NOT EXECUTED
30001fb8: eb00298d bl 3000c5f4 <__errno> <== NOT EXECUTED
30001fbc: e5903000 ldr r3, [r0] <== NOT EXECUTED
30001fc0: e5843000 str r3, [r4] <== NOT EXECUTED
30001fc4: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001fc8: ea000012 b 30002018 <chroot+0xb8> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
30001fcc: e28d4004 add r4, sp, #4
30001fd0: e59f0050 ldr r0, [pc, #80] ; 30002028 <chroot+0xc8>
30001fd4: e3a01001 mov r1, #1
30001fd8: e1a03004 mov r3, r4
30001fdc: e58d2000 str r2, [sp]
30001fe0: eb000059 bl 3000214c <rtems_filesystem_evaluate_path>
30001fe4: e2505000 subs r5, r0, #0
30001fe8: 1afffff0 bne 30001fb0 <chroot+0x50>
/* 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);
30001fec: e59f602c ldr r6, [pc, #44] ; 30002020 <chroot+0xc0>
30001ff0: e5960000 ldr r0, [r6]
30001ff4: e2800018 add r0, r0, #24
30001ff8: eb00008e bl 30002238 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
30001ffc: e8b4000f ldm r4!, {r0, r1, r2, r3}
30002000: e596c000 ldr ip, [r6]
30002004: e28cc018 add ip, ip, #24
30002008: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000200c: e5943000 ldr r3, [r4]
return 0;
30002010: e1a00005 mov r0, r5
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);
rtems_filesystem_root = loc;
30002014: e58c3000 str r3, [ip]
return 0;
}
30002018: e28dd018 add sp, sp, #24
3000201c: e8bd8070 pop {r4, r5, r6, pc}
30008614 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008614: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
30008618: e5936000 ldr r6, [r3]
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
3000861c: e1a09000 mov r9, r0
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
30008620: e3560000 cmp r6, #0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008624: e1a04001 mov r4, r1
30008628: e1a05003 mov r5, r3
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
3000862c: 13a07000 movne r7, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
30008630: 159fa094 ldrne sl, [pc, #148] ; 300086cc <devFS_evaluate_path+0xb8>
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
30008634: 1a00001c bne 300086ac <devFS_evaluate_path+0x98>
rtems_set_errno_and_return_minus_one( EFAULT );
30008638: eb00064b bl 30009f6c <__errno> <== NOT EXECUTED
3000863c: e3a0300e mov r3, #14 <== NOT EXECUTED
30008640: e5803000 str r3, [r0] <== NOT EXECUTED
30008644: e3e00000 mvn r0, #0 <== NOT EXECUTED
30008648: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
3000864c: e5968000 ldr r8, [r6]
30008650: e3580000 cmp r8, #0
30008654: 0a000012 beq 300086a4 <devFS_evaluate_path+0x90>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30008658: e1a00009 mov r0, r9
3000865c: e1a01008 mov r1, r8
30008660: e1a02004 mov r2, r4
30008664: eb000a09 bl 3000ae90 <strncmp>
30008668: e3500000 cmp r0, #0
3000866c: 1a00000c bne 300086a4 <devFS_evaluate_path+0x90>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
30008670: e7d80004 ldrb r0, [r8, r4]
30008674: e3500000 cmp r0, #0
30008678: 1a000009 bne 300086a4 <devFS_evaluate_path+0x90>
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
3000867c: e59f304c ldr r3, [pc, #76] ; 300086d0 <devFS_evaluate_path+0xbc>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
30008680: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
30008684: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
30008688: e59f3044 ldr r3, [pc, #68] ; 300086d4 <devFS_evaluate_path+0xc0>
3000868c: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30008690: e59f3040 ldr r3, [pc, #64] ; 300086d8 <devFS_evaluate_path+0xc4>
30008694: e5933000 ldr r3, [r3]
30008698: e5933028 ldr r3, [r3, #40] ; 0x28
3000869c: e5853010 str r3, [r5, #16]
return 0;
300086a0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* 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++) {
300086a4: e2877001 add r7, r7, #1
300086a8: e2866014 add r6, r6, #20
300086ac: e59a3000 ldr r3, [sl]
300086b0: e1570003 cmp r7, r3
300086b4: 3affffe4 bcc 3000864c <devFS_evaluate_path+0x38>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
300086b8: eb00062b bl 30009f6c <__errno>
300086bc: e3a03002 mov r3, #2
300086c0: e5803000 str r3, [r0]
300086c4: e3e00000 mvn r0, #0
}
300086c8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000163c <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
3000163c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
30001640: e59f7058 ldr r7, [pc, #88] ; 300016a0 <devFS_initialize+0x64>
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
30001644: e1a04000 mov r4, r0
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
30001648: e5970000 ldr r0, [r7]
3000164c: e3a06014 mov r6, #20
30001650: e0000096 mul r0, r6, r0
30001654: eb001a6c bl 3000800c <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
30001658: e2505000 subs r5, r0, #0
3000165c: 1a000004 bne 30001674 <devFS_initialize+0x38>
rtems_set_errno_and_return_minus_one( ENOMEM );
30001660: eb002241 bl 30009f6c <__errno> <== NOT EXECUTED
30001664: e3a0300c mov r3, #12 <== NOT EXECUTED
30001668: e5803000 str r3, [r0] <== NOT EXECUTED
3000166c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001670: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
memset(
30001674: e5972000 ldr r2, [r7]
30001678: e3a01000 mov r1, #0
3000167c: e0020296 mul r2, r6, r2
30001680: eb0024a6 bl 3000a920 <memset>
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
30001684: e59f3018 ldr r3, [pc, #24] ; 300016a4 <devFS_initialize+0x68>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
30001688: e584501c str r5, [r4, #28]
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
3000168c: e5843024 str r3, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
30001690: e2833038 add r3, r3, #56 ; 0x38
30001694: e5843028 str r3, [r4, #40] ; 0x28
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
30001698: e3a00000 mov r0, #0
}
3000169c: e8bd80f0 pop {r4, r5, r6, r7, pc}
300016a8 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
300016a8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
300016ac: e58d2000 str r2, [sp]
300016b0: e1a09003 mov r9, r3
* 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') &&
300016b4: e5d03000 ldrb r3, [r0]
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
300016b8: e1a04000 mov r4, r0
* 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') &&
300016bc: e3530064 cmp r3, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
300016c0: e1a05001 mov r5, r1
* 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') &&
300016c4: 1a000008 bne 300016ec <devFS_mknod+0x44>
300016c8: e5d03001 ldrb r3, [r0, #1]
300016cc: e3530065 cmp r3, #101 ; 0x65
300016d0: 1a000005 bne 300016ec <devFS_mknod+0x44>
300016d4: e5d03002 ldrb r3, [r0, #2]
300016d8: e3530076 cmp r3, #118 ; 0x76
300016dc: 1a000002 bne 300016ec <devFS_mknod+0x44>
(path[2] == 'v') && (path[3] == '\0'))
300016e0: e5d00003 ldrb r0, [r0, #3]
300016e4: e3500000 cmp r0, #0
300016e8: 0a000039 beq 300017d4 <devFS_mknod+0x12c>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
300016ec: e205aa0f and sl, r5, #61440 ; 0xf000
300016f0: e35a0a02 cmp sl, #8192 ; 0x2000
300016f4: 135a0a06 cmpne sl, #24576 ; 0x6000
300016f8: 03a0a000 moveq sl, #0
300016fc: 13a0a001 movne sl, #1
30001700: 0a000002 beq 30001710 <devFS_mknod+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
30001704: eb002218 bl 30009f6c <__errno> <== NOT EXECUTED
30001708: e3a03016 mov r3, #22 <== NOT EXECUTED
3000170c: ea000008 b 30001734 <devFS_mknod+0x8c> <== NOT EXECUTED
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;
30001710: e59d3028 ldr r3, [sp, #40] ; 0x28
30001714: e5936000 ldr r6, [r3]
if (!device_name_table)
30001718: e3560000 cmp r6, #0
3000171c: 13e07000 mvnne r7, #0
30001720: 11a0800a movne r8, sl
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
30001724: 159fb0ac ldrne fp, [pc, #172] ; 300017d8 <devFS_mknod+0x130>
30001728: 1a000011 bne 30001774 <devFS_mknod+0xcc>
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 );
3000172c: eb00220e bl 30009f6c <__errno> <== NOT EXECUTED
30001730: e3a0300e mov r3, #14 <== NOT EXECUTED
30001734: e5803000 str r3, [r0] <== NOT EXECUTED
30001738: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000173c: ea000024 b 300017d4 <devFS_mknod+0x12c> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
30001740: e796100a ldr r1, [r6, sl]
30001744: e3510000 cmp r1, #0
30001748: 0a000006 beq 30001768 <devFS_mknod+0xc0>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
3000174c: e1a00004 mov r0, r4 <== NOT EXECUTED
30001750: eb0024ee bl 3000ab10 <strcmp> <== NOT EXECUTED
30001754: e3500000 cmp r0, #0 <== NOT EXECUTED
30001758: 1a000003 bne 3000176c <devFS_mknod+0xc4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
3000175c: eb002202 bl 30009f6c <__errno> <== NOT EXECUTED
30001760: e3a03011 mov r3, #17 <== NOT EXECUTED
30001764: eafffff2 b 30001734 <devFS_mknod+0x8c> <== NOT EXECUTED
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
30001768: e1a07008 mov r7, r8
/* 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++){
3000176c: e2888001 add r8, r8, #1
30001770: e28aa014 add sl, sl, #20
30001774: e59b3000 ldr r3, [fp]
30001778: e1580003 cmp r8, r3
3000177c: 3affffef bcc 30001740 <devFS_mknod+0x98>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
30001780: e3770001 cmn r7, #1
30001784: 1a000004 bne 3000179c <devFS_mknod+0xf4>
rtems_set_errno_and_return_minus_one( ENOMEM );
30001788: eb0021f7 bl 30009f6c <__errno> <== NOT EXECUTED
3000178c: e3a0300c mov r3, #12 <== NOT EXECUTED
30001790: e5803000 str r3, [r0] <== NOT EXECUTED
30001794: e1a00007 mov r0, r7 <== NOT EXECUTED
30001798: ea00000d b 300017d4 <devFS_mknod+0x12c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000179c: e10fa000 mrs sl, CPSR
300017a0: e38a3080 orr r3, sl, #128 ; 0x80
300017a4: e129f003 msr CPSR_fc, r3
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300017a8: e3a03014 mov r3, #20
300017ac: e0070793 mul r7, r3, r7
device_name_table[slot].device_name_length = strlen(path);
300017b0: e1a00004 mov r0, r4
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300017b4: e7864007 str r4, [r6, r7]
device_name_table[slot].device_name_length = strlen(path);
300017b8: eb00259c bl 3000ae30 <strlen>
device_name_table[slot].major = major;
300017bc: e59d3000 ldr r3, [sp]
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300017c0: e0868007 add r8, r6, r7
device_name_table[slot].device_name_length = strlen(path);
300017c4: e9880209 stmib r8, {r0, r3, r9}
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
300017c8: e5885010 str r5, [r8, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300017cc: e129f00a msr CPSR_fc, sl
_ISR_Enable(level);
return 0;
300017d0: e3a00000 mov r0, #0
}
300017d4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
300018b4 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
300018b4: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
300018b8: e280c00c add ip, r0, #12 <== NOT EXECUTED
300018bc: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
300018c0: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
300018c4: e5902014 ldr r2, [r0, #20] <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
300018c8: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
300018cc: e58d2014 str r2, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
300018d0: e3a02000 mov r2, #0 <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
300018d4: e58d0000 str r0, [sp] <== NOT EXECUTED
args.offset = iop->offset;
args.buffer = buffer;
300018d8: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
300018dc: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
status = rtems_io_read(
300018e0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
300018e4: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
300018e8: e1a0200d mov r2, sp <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
300018ec: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
300018f0: eb000f3e bl 300055f0 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
300018f4: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
300018f8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
300018fc: 1b001b79 blne 300086e8 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
30001900: e28dd01c add sp, sp, #28 <== NOT EXECUTED
30001904: e8bd8800 pop {fp, pc} <== NOT EXECUTED
30001908 <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
30001908: e5903000 ldr r3, [r0]
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3000190c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
30001910: e3530000 cmp r3, #0
30001914: 1a000004 bne 3000192c <devFS_stat+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
30001918: eb002193 bl 30009f6c <__errno> <== NOT EXECUTED
3000191c: e3a0300e mov r3, #14 <== NOT EXECUTED
30001920: e5803000 str r3, [r0] <== NOT EXECUTED
30001924: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001928: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
3000192c: e2830008 add r0, r3, #8
30001930: e890000d ldm r0, {r0, r2, r3}
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
30001934: e5810018 str r0, [r1, #24]
30001938: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
3000193c: e581300c str r3, [r1, #12]
return 0;
30001940: e3a00000 mov r0, #0
}
30001944: e49df004 pop {pc} ; (ldr pc, [sp], #4)
3000b5a8 <device_ftruncate>:
rtems_libio_t *iop,
rtems_off64_t length
)
{
return 0;
}
3000b5a8: e3a00000 mov r0, #0 <== NOT EXECUTED
3000b5ac: e12fff1e bx lr <== NOT EXECUTED
30002ce4 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002ce4: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002ce8: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002cec: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002cf0: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002cf4: 08bd8030 popeq {r4, r5, pc}
rtems_interrupt_disable (level);
30002cf8: ebfffff5 bl 30002cd4 <arm_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
30002cfc: e3a05002 mov r5, #2
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) {
30002d00: ea000008 b 30002d28 <drainOutput+0x44>
tty->rawOutBufState = rob_wait;
30002d04: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30002d08: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30002d0c: e3a01000 mov r1, #0 <== NOT EXECUTED
30002d10: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
30002d14: e1a02001 mov r2, r1 <== NOT EXECUTED
30002d18: eb0008ca bl 30005048 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30002d1c: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
30002d20: 1b000a5e blne 300056a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
30002d24: ebffffea bl 30002cd4 <arm_interrupt_disable> <== 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) {
30002d28: e5942084 ldr r2, [r4, #132] ; 0x84
30002d2c: e5943080 ldr r3, [r4, #128] ; 0x80
30002d30: e1520003 cmp r2, r3
30002d34: 1afffff2 bne 30002d04 <drainOutput+0x20>
30002d38: e129f000 msr CPSR_fc, r0
30002d3c: e8bd8030 pop {r4, r5, pc}
300039bc <erase>:
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
300039bc: e5903020 ldr r3, [r0, #32]
* 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)
{
300039c0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
if (tty->ccount == 0)
300039c4: e3530000 cmp r3, #0
* 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)
{
300039c8: e1a04000 mov r4, r0
300039cc: e1a07001 mov r7, r1
if (tty->ccount == 0)
300039d0: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return;
if (lineFlag) {
300039d4: e3510000 cmp r1, #0
300039d8: 0a000060 beq 30003b60 <erase+0x1a4>
if (!(tty->termios.c_lflag & ECHO)) {
300039dc: e590303c ldr r3, [r0, #60] ; 0x3c
300039e0: e2132008 ands r2, r3, #8
tty->ccount = 0;
300039e4: 05802020 streq r2, [r0, #32]
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
300039e8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
300039ec: e2133010 ands r3, r3, #16
300039f0: 1a00005a bne 30003b60 <erase+0x1a4>
tty->ccount = 0;
300039f4: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
300039f8: e1a01004 mov r1, r4 <== NOT EXECUTED
300039fc: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
30003a00: ebffffca bl 30003930 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
30003a04: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003a08: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
30003a0c: 13a0000a movne r0, #10 <== 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)
30003a10: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30003a14: ea00000b b 30003a48 <erase+0x8c> <== NOT EXECUTED
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
30003a18: e594303c ldr r3, [r4, #60] ; 0x3c
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003a1c: e2411001 sub r1, r1, #1
30003a20: e594001c ldr r0, [r4, #28]
30003a24: e5841020 str r1, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
30003a28: e3130008 tst r3, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003a2c: e7d05001 ldrb r5, [r0, r1]
if (tty->termios.c_lflag & ECHO) {
30003a30: 0a000047 beq 30003b54 <erase+0x198>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
30003a34: e3570000 cmp r7, #0
30003a38: 1a000005 bne 30003a54 <erase+0x98>
30003a3c: e3130010 tst r3, #16
30003a40: 1a000003 bne 30003a54 <erase+0x98>
echo (tty->termios.c_cc[VERASE], tty);
30003a44: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
30003a48: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
30003a4c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
30003a50: eaffffb6 b 30003930 <echo> <== NOT EXECUTED
} else if (c == '\t') {
30003a54: e3550009 cmp r5, #9
30003a58: 1a00001f bne 30003adc <erase+0x120>
int col = tty->read_start_column;
30003a5c: e594502c ldr r5, [r4, #44] ; 0x2c
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003a60: e5968000 ldr r8, [r6]
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;
30003a64: e3a02000 mov r2, #0
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)
30003a68: e2033c02 and r3, r3, #512 ; 0x200
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003a6c: ea00000c b 30003aa4 <erase+0xe8>
c = tty->cbuf[i++];
30003a70: e7d0c002 ldrb ip, [r0, r2]
30003a74: e2822001 add r2, r2, #1
if (c == '\t') {
30003a78: e35c0009 cmp ip, #9
col = (col | 7) + 1;
30003a7c: 03855007 orreq r5, r5, #7
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
30003a80: 0a000006 beq 30003aa0 <erase+0xe4>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003a84: e088c00c add ip, r8, ip
30003a88: e5dcc001 ldrb ip, [ip, #1]
30003a8c: e31c0020 tst ip, #32
30003a90: 0a000002 beq 30003aa0 <erase+0xe4>
if (tty->termios.c_lflag & ECHOCTL)
30003a94: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
30003a98: 12855002 addne r5, r5, #2 <== NOT EXECUTED
30003a9c: ea000000 b 30003aa4 <erase+0xe8> <== NOT EXECUTED
} else {
col++;
30003aa0: e2855001 add r5, r5, #1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003aa4: e1520001 cmp r2, r1
30003aa8: 1afffff0 bne 30003a70 <erase+0xb4>
30003aac: ea000006 b 30003acc <erase+0x110>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
30003ab0: e59f00bc ldr r0, [pc, #188] ; 30003b74 <erase+0x1b8>
30003ab4: e3a01001 mov r1, #1
30003ab8: e1a02004 mov r2, r4
30003abc: ebffff07 bl 300036e0 <rtems_termios_puts>
tty->column--;
30003ac0: e5943028 ldr r3, [r4, #40] ; 0x28
30003ac4: e2433001 sub r3, r3, #1
30003ac8: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003acc: e5943028 ldr r3, [r4, #40] ; 0x28
30003ad0: e1530005 cmp r3, r5
30003ad4: cafffff5 bgt 30003ab0 <erase+0xf4>
30003ad8: ea00001d b 30003b54 <erase+0x198>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003adc: e5962000 ldr r2, [r6]
30003ae0: e2855001 add r5, r5, #1
30003ae4: e7d22005 ldrb r2, [r2, r5]
30003ae8: e3120020 tst r2, #32
30003aec: 0a000009 beq 30003b18 <erase+0x15c>
30003af0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003af4: 0a000007 beq 30003b18 <erase+0x15c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003af8: e59f0078 ldr r0, [pc, #120] ; 30003b78 <erase+0x1bc> <== NOT EXECUTED
30003afc: e3a01003 mov r1, #3 <== NOT EXECUTED
30003b00: e1a02004 mov r2, r4 <== NOT EXECUTED
30003b04: ebfffef5 bl 300036e0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003b08: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003b0c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003b10: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003b14: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
30003b18: e5963000 ldr r3, [r6]
30003b1c: e7d33005 ldrb r3, [r3, r5]
30003b20: e3130020 tst r3, #32
30003b24: 0a000002 beq 30003b34 <erase+0x178>
30003b28: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003b2c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003b30: 0a000007 beq 30003b54 <erase+0x198> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003b34: e59f003c ldr r0, [pc, #60] ; 30003b78 <erase+0x1bc>
30003b38: e3a01003 mov r1, #3
30003b3c: e1a02004 mov r2, r4
30003b40: ebfffee6 bl 300036e0 <rtems_termios_puts>
if (tty->column)
30003b44: e5943028 ldr r3, [r4, #40] ; 0x28
30003b48: e3530000 cmp r3, #0
tty->column--;
30003b4c: 12433001 subne r3, r3, #1
30003b50: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
30003b54: e3570000 cmp r7, #0
30003b58: 1a000001 bne 30003b64 <erase+0x1a8>
30003b5c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30003b60: e59f6014 ldr r6, [pc, #20] ; 30003b7c <erase+0x1c0>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
30003b64: e5941020 ldr r1, [r4, #32]
30003b68: e3510000 cmp r1, #0
30003b6c: 1affffa9 bne 30003a18 <erase+0x5c>
30003b70: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002728 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
30002728: e92d000e push {r1, r2, r3}
3000272c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002730: e59f21a4 ldr r2, [pc, #420] ; 300028dc <fcntl+0x1b4>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002734: e28d301c add r3, sp, #28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002738: e5921000 ldr r1, [r2]
int fcntl(
int fd,
int cmd,
...
)
{
3000273c: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002740: e1500001 cmp r0, r1
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002744: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002748: 2a000006 bcs 30002768 <fcntl+0x40>
iop = rtems_libio_iop( fd );
3000274c: e59f218c ldr r2, [pc, #396] ; 300028e0 <fcntl+0x1b8>
30002750: e3a04038 mov r4, #56 ; 0x38
30002754: e5922000 ldr r2, [r2]
30002758: e0242490 mla r4, r0, r4, r2
rtems_libio_check_is_open(iop);
3000275c: e5940014 ldr r0, [r4, #20]
30002760: e3100c01 tst r0, #256 ; 0x100
30002764: 1a000002 bne 30002774 <fcntl+0x4c>
30002768: eb002964 bl 3000cd00 <__errno>
3000276c: e3a03009 mov r3, #9
30002770: ea000047 b 30002894 <fcntl+0x16c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
30002774: e3570009 cmp r7, #9
30002778: 979ff107 ldrls pc, [pc, r7, lsl #2]
3000277c: ea000042 b 3000288c <fcntl+0x164>
30002780: 300027a8 .word 0x300027a8 <== NOT EXECUTED
30002784: 30002818 .word 0x30002818 <== NOT EXECUTED
30002788: 30002828 .word 0x30002828 <== NOT EXECUTED
3000278c: 30002848 .word 0x30002848 <== NOT EXECUTED
30002790: 30002854 .word 0x30002854 <== NOT EXECUTED
30002794: 30002880 .word 0x30002880 <== NOT EXECUTED
30002798: 30002880 .word 0x30002880 <== NOT EXECUTED
3000279c: 30002880 .word 0x30002880 <== NOT EXECUTED
300027a0: 30002880 .word 0x30002880 <== NOT EXECUTED
300027a4: 30002880 .word 0x30002880 <== NOT EXECUTED
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
300027a8: e5933000 ldr r3, [r3]
if ( fd2 )
300027ac: e3530000 cmp r3, #0
300027b0: 0a000004 beq 300027c8 <fcntl+0xa0>
diop = rtems_libio_iop( fd2 );
300027b4: e1530001 cmp r3, r1 <== NOT EXECUTED
300027b8: 33a06038 movcc r6, #56 ; 0x38 <== NOT EXECUTED
300027bc: 30262693 mlacc r6, r3, r6, r2 <== NOT EXECUTED
300027c0: 3a000005 bcc 300027dc <fcntl+0xb4> <== NOT EXECUTED
300027c4: ea000003 b 300027d8 <fcntl+0xb0> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
300027c8: eb000190 bl 30002e10 <rtems_libio_allocate>
if ( diop == 0 ) {
300027cc: e2506000 subs r6, r0, #0
300027d0: 1a000001 bne 300027dc <fcntl+0xb4>
300027d4: ea00003b b 300028c8 <fcntl+0x1a0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
300027d8: e3a06000 mov r6, #0 <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
300027dc: e5943014 ldr r3, [r4, #20]
diop->pathinfo = iop->pathinfo;
300027e0: e286c018 add ip, r6, #24
300027e4: e2845018 add r5, r4, #24
ret = -1;
break;
}
}
diop->flags = iop->flags;
300027e8: e5863014 str r3, [r6, #20]
diop->pathinfo = iop->pathinfo;
300027ec: e8b5000f ldm r5!, {r0, r1, r2, r3}
300027f0: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027f4: e5953000 ldr r3, [r5]
300027f8: e58c3000 str r3, [ip]
ret = (int) (diop - rtems_libio_iops);
300027fc: e59f30dc ldr r3, [pc, #220] ; 300028e0 <fcntl+0x1b8>
30002800: e5933000 ldr r3, [r3]
30002804: e0636006 rsb r6, r3, r6
30002808: e59f30d4 ldr r3, [pc, #212] ; 300028e4 <fcntl+0x1bc>
3000280c: e1a061c6 asr r6, r6, #3
30002810: e0060693 mul r6, r3, r6
30002814: ea000020 b 3000289c <fcntl+0x174>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
30002818: e3100b02 tst r0, #2048 ; 0x800
3000281c: 03a06000 moveq r6, #0
30002820: 13a06001 movne r6, #1
30002824: ea00001e b 300028a4 <fcntl+0x17c>
* 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 ) )
30002828: e5936000 ldr r6, [r3]
3000282c: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
30002830: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002834: 03c00b02 biceq r0, r0, #2048 ; 0x800
* 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;
30002838: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
3000283c: 05840014 streq r0, [r4, #20]
* 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 ) )
30002840: 0a000017 beq 300028a4 <fcntl+0x17c>
30002844: ea00000b b 30002878 <fcntl+0x150>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
30002848: eb00015e bl 30002dc8 <rtems_libio_to_fcntl_flags>
3000284c: e1a06000 mov r6, r0
30002850: ea000011 b 3000289c <fcntl+0x174>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
30002854: e5930000 ldr r0, [r3]
30002858: eb00014d bl 30002d94 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
3000285c: e5942014 ldr r2, [r4, #20]
30002860: e59f3080 ldr r3, [pc, #128] ; 300028e8 <fcntl+0x1c0>
30002864: e3c22c02 bic r2, r2, #512 ; 0x200
30002868: e0003003 and r3, r0, r3
3000286c: e3c22001 bic r2, r2, #1
30002870: e1833002 orr r3, r3, r2
30002874: e5843014 str r3, [r4, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002878: e3a06000 mov r6, #0
3000287c: ea000008 b 300028a4 <fcntl+0x17c>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
30002880: eb00291e bl 3000cd00 <__errno>
30002884: e3a03086 mov r3, #134 ; 0x86
30002888: ea000001 b 30002894 <fcntl+0x16c>
ret = -1;
break;
default:
errno = EINVAL;
3000288c: eb00291b bl 3000cd00 <__errno>
30002890: e3a03016 mov r3, #22
30002894: e5803000 str r3, [r0]
30002898: ea00000a b 300028c8 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
3000289c: e3560000 cmp r6, #0
300028a0: ba000009 blt 300028cc <fcntl+0x1a4>
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
300028a4: e5943020 ldr r3, [r4, #32]
300028a8: e1a01004 mov r1, r4
300028ac: e1a00007 mov r0, r7
300028b0: e1a0e00f mov lr, pc
300028b4: e593f030 ldr pc, [r3, #48] ; 0x30
if (err) {
300028b8: e2504000 subs r4, r0, #0
300028bc: 0a000002 beq 300028cc <fcntl+0x1a4>
errno = err;
300028c0: eb00290e bl 3000cd00 <__errno> <== NOT EXECUTED
300028c4: e5804000 str r4, [r0] <== NOT EXECUTED
ret = -1;
300028c8: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
300028cc: e1a00006 mov r0, r6
300028d0: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
300028d4: e28dd00c add sp, sp, #12
300028d8: e12fff1e bx lr
3000abf0 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000abf0: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr}
3000abf4: e1a06000 mov r6, r0
3000abf8: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
3000abfc: ebffff87 bl 3000aa20 <pipe_lock>
if (err)
3000ac00: e250a000 subs sl, r0, #0
3000ac04: 1a0000b8 bne 3000aeec <fifo_open+0x2fc>
return err;
pipe = *pipep;
3000ac08: e5964000 ldr r4, [r6]
if (pipe == NULL) {
3000ac0c: e3540000 cmp r4, #0
3000ac10: 1a00003a bne 3000ad00 <fifo_open+0x110>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000ac14: e2800034 add r0, r0, #52 ; 0x34
3000ac18: ebffe267 bl 300035bc <malloc>
if (pipe == NULL)
3000ac1c: e2508000 subs r8, r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000ac20: e1a04000 mov r4, r0
if (pipe == NULL)
3000ac24: 0a000033 beq 3000acf8 <fifo_open+0x108>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000ac28: e1a0100a mov r1, sl
3000ac2c: e3a02034 mov r2, #52 ; 0x34
3000ac30: eb000c38 bl 3000dd18 <memset>
pipe->Size = PIPE_BUF;
3000ac34: e3a00c02 mov r0, #512 ; 0x200
3000ac38: e5840004 str r0, [r4, #4]
pipe->Buffer = malloc(pipe->Size);
3000ac3c: ebffe25e bl 300035bc <malloc>
if (! pipe->Buffer)
3000ac40: e3500000 cmp r0, #0
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
3000ac44: e5840000 str r0, [r4]
if (! pipe->Buffer)
3000ac48: 0a000028 beq 3000acf0 <fifo_open+0x100>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
3000ac4c: e59f52a0 ldr r5, [pc, #672] ; 3000aef4 <fifo_open+0x304>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000ac50: e59f02a0 ldr r0, [pc, #672] ; 3000aef8 <fifo_open+0x308>
rtems_build_name ('P', 'I', 'r', c),
3000ac54: e5d53000 ldrb r3, [r5]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000ac58: e1a0100a mov r1, sl
3000ac5c: e1830000 orr r0, r3, r0
3000ac60: e1a0200a mov r2, sl
3000ac64: e284302c add r3, r4, #44 ; 0x2c
3000ac68: eb00044d bl 3000bda4 <rtems_barrier_create>
3000ac6c: e2501000 subs r1, r0, #0
3000ac70: 1a00001c bne 3000ace8 <fifo_open+0xf8>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
3000ac74: e5d53000 ldrb r3, [r5]
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
3000ac78: e59f027c ldr r0, [pc, #636] ; 3000aefc <fifo_open+0x30c>
3000ac7c: e1a02001 mov r2, r1
3000ac80: e1830000 orr r0, r3, r0
3000ac84: e2843030 add r3, r4, #48 ; 0x30
3000ac88: eb000445 bl 3000bda4 <rtems_barrier_create>
3000ac8c: e2503000 subs r3, r0, #0
3000ac90: 1a000012 bne 3000ace0 <fifo_open+0xf0>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
rtems_build_name ('P', 'I', 's', c), 1,
3000ac94: e5d52000 ldrb r2, [r5]
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
3000ac98: e59f0260 ldr r0, [pc, #608] ; 3000af00 <fifo_open+0x310>
3000ac9c: e2841028 add r1, r4, #40 ; 0x28
3000aca0: e58d1000 str r1, [sp]
3000aca4: e1820000 orr r0, r2, r0
3000aca8: e3a01001 mov r1, #1
3000acac: e3a02010 mov r2, #16
3000acb0: ebffedc3 bl 300063c4 <rtems_semaphore_create>
3000acb4: e3500000 cmp r0, #0
3000acb8: 1a000006 bne 3000acd8 <fifo_open+0xe8>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000acbc: e5d53000 ldrb r3, [r5]
3000acc0: e353007a cmp r3, #122 ; 0x7a
3000acc4: e2832001 add r2, r3, #1
c = 'a';
3000acc8: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000accc: e5c52000 strb r2, [r5]
c = 'a';
3000acd0: 05c53000 strbeq r3, [r5]
3000acd4: ea000009 b 3000ad00 <fifo_open+0x110>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
3000acd8: e5980030 ldr r0, [r8, #48] ; 0x30
3000acdc: eb000460 bl 3000be64 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
3000ace0: e598002c ldr r0, [r8, #44] ; 0x2c
3000ace4: eb00045e bl 3000be64 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
3000ace8: e5980000 ldr r0, [r8]
3000acec: ebffe0cc bl 30003024 <free>
err_buf:
free(pipe);
3000acf0: e1a00008 mov r0, r8
3000acf4: ebffe0ca bl 30003024 <free>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
3000acf8: e3e0a00b mvn sl, #11
3000acfc: ea00000d b 3000ad38 <fifo_open+0x148>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000ad00: e3a01000 mov r1, #0
3000ad04: e5940028 ldr r0, [r4, #40] ; 0x28
3000ad08: e1a02001 mov r2, r1
3000ad0c: ebffee3e bl 3000660c <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
3000ad10: e5963000 ldr r3, [r6]
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
3000ad14: e3500000 cmp r0, #0
3000ad18: 03a0a000 moveq sl, #0
3000ad1c: 13e0a003 mvnne sl, #3
if (*pipep == NULL) {
3000ad20: e3530000 cmp r3, #0
3000ad24: 1a000003 bne 3000ad38 <fifo_open+0x148>
if (err)
3000ad28: e35a0000 cmp sl, #0
pipe_free(pipe);
else
*pipep = pipe;
3000ad2c: 05864000 streq r4, [r6]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
3000ad30: 11a00004 movne r0, r4
3000ad34: 1bffff5d blne 3000aab0 <pipe_free>
else
*pipep = pipe;
}
out:
pipe_unlock();
3000ad38: ebffff69 bl 3000aae4 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
3000ad3c: e35a0000 cmp sl, #0
3000ad40: 1a000069 bne 3000aeec <fifo_open+0x2fc>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
3000ad44: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
3000ad48: e5964000 ldr r4, [r6]
switch (LIBIO_ACCMODE(iop)) {
3000ad4c: e2033006 and r3, r3, #6
3000ad50: e3530004 cmp r3, #4
3000ad54: 0a000024 beq 3000adec <fifo_open+0x1fc>
3000ad58: e3530006 cmp r3, #6
3000ad5c: 0a000047 beq 3000ae80 <fifo_open+0x290>
3000ad60: e3530002 cmp r3, #2
3000ad64: 1a000059 bne 3000aed0 <fifo_open+0x2e0>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000ad68: e5943020 ldr r3, [r4, #32]
3000ad6c: e2833001 add r3, r3, #1
3000ad70: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
3000ad74: e5943010 ldr r3, [r4, #16]
3000ad78: e2832001 add r2, r3, #1
3000ad7c: e3530000 cmp r3, #0
3000ad80: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
3000ad84: 05940030 ldreq r0, [r4, #48] ; 0x30
3000ad88: 028d1004 addeq r1, sp, #4
3000ad8c: 0b00045c bleq 3000bf04 <rtems_barrier_release>
if (pipe->Writers == 0) {
3000ad90: e5943014 ldr r3, [r4, #20]
3000ad94: e3530000 cmp r3, #0
3000ad98: 1a00004c bne 3000aed0 <fifo_open+0x2e0>
/* Not an error */
if (LIBIO_NODELAY(iop))
3000ad9c: e5973014 ldr r3, [r7, #20]
3000ada0: e3130001 tst r3, #1
3000ada4: 1a000049 bne 3000aed0 <fifo_open+0x2e0>
break;
prevCounter = pipe->writerCounter;
3000ada8: e5945024 ldr r5, [r4, #36] ; 0x24
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
3000adac: e5940028 ldr r0, [r4, #40] ; 0x28
3000adb0: ebffee5b bl 30006724 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000adb4: e3a01000 mov r1, #0
3000adb8: e594002c ldr r0, [r4, #44] ; 0x2c
3000adbc: eb000466 bl 3000bf5c <rtems_barrier_wait>
3000adc0: e2501000 subs r1, r0, #0
3000adc4: 1a000044 bne 3000aedc <fifo_open+0x2ec>
goto out_error;
if (! PIPE_LOCK(pipe))
3000adc8: e5940028 ldr r0, [r4, #40] ; 0x28
3000adcc: e1a02001 mov r2, r1
3000add0: ebffee0d bl 3000660c <rtems_semaphore_obtain>
3000add4: e3500000 cmp r0, #0
3000add8: 1a00003f bne 3000aedc <fifo_open+0x2ec>
goto out_error;
} while (prevCounter == pipe->writerCounter);
3000addc: e5943024 ldr r3, [r4, #36] ; 0x24
3000ade0: e1550003 cmp r5, r3
3000ade4: 0afffff0 beq 3000adac <fifo_open+0x1bc>
3000ade8: ea000038 b 3000aed0 <fifo_open+0x2e0>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000adec: e5943024 ldr r3, [r4, #36] ; 0x24
3000adf0: e2833001 add r3, r3, #1
3000adf4: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000adf8: e5943014 ldr r3, [r4, #20]
3000adfc: e2832001 add r2, r3, #1
3000ae00: e3530000 cmp r3, #0
3000ae04: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
3000ae08: 0594002c ldreq r0, [r4, #44] ; 0x2c
3000ae0c: 028d1004 addeq r1, sp, #4
3000ae10: 0b00043b bleq 3000bf04 <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000ae14: e5943010 ldr r3, [r4, #16]
3000ae18: e3530000 cmp r3, #0
3000ae1c: 1a00002b bne 3000aed0 <fifo_open+0x2e0>
3000ae20: e5973014 ldr r3, [r7, #20]
3000ae24: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
3000ae28: 05945020 ldreq r5, [r4, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000ae2c: 0a000003 beq 3000ae40 <fifo_open+0x250>
PIPE_UNLOCK(pipe);
3000ae30: e5940028 ldr r0, [r4, #40] ; 0x28
3000ae34: ebffee3a bl 30006724 <rtems_semaphore_release>
err = -ENXIO;
3000ae38: e3e0a005 mvn sl, #5
goto out_error;
3000ae3c: ea000027 b 3000aee0 <fifo_open+0x2f0>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
3000ae40: e5940028 ldr r0, [r4, #40] ; 0x28
3000ae44: ebffee36 bl 30006724 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000ae48: e3a01000 mov r1, #0
3000ae4c: e5940030 ldr r0, [r4, #48] ; 0x30
3000ae50: eb000441 bl 3000bf5c <rtems_barrier_wait>
3000ae54: e2501000 subs r1, r0, #0
3000ae58: 1a00001f bne 3000aedc <fifo_open+0x2ec>
goto out_error;
if (! PIPE_LOCK(pipe))
3000ae5c: e5940028 ldr r0, [r4, #40] ; 0x28
3000ae60: e1a02001 mov r2, r1
3000ae64: ebffede8 bl 3000660c <rtems_semaphore_obtain>
3000ae68: e3500000 cmp r0, #0
3000ae6c: 1a00001a bne 3000aedc <fifo_open+0x2ec>
goto out_error;
} while (prevCounter == pipe->readerCounter);
3000ae70: e5943020 ldr r3, [r4, #32]
3000ae74: e1550003 cmp r5, r3
3000ae78: 0afffff0 beq 3000ae40 <fifo_open+0x250>
3000ae7c: ea000013 b 3000aed0 <fifo_open+0x2e0>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000ae80: e5943020 ldr r3, [r4, #32]
3000ae84: e2833001 add r3, r3, #1
3000ae88: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
3000ae8c: e5943010 ldr r3, [r4, #16]
3000ae90: e2832001 add r2, r3, #1
3000ae94: e3530000 cmp r3, #0
3000ae98: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
3000ae9c: 05940030 ldreq r0, [r4, #48] ; 0x30
3000aea0: 028d1004 addeq r1, sp, #4
3000aea4: 0b000416 bleq 3000bf04 <rtems_barrier_release>
pipe->writerCounter ++;
3000aea8: e5943024 ldr r3, [r4, #36] ; 0x24
3000aeac: e2833001 add r3, r3, #1
3000aeb0: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000aeb4: e5943014 ldr r3, [r4, #20]
3000aeb8: e2832001 add r2, r3, #1
3000aebc: e3530000 cmp r3, #0
3000aec0: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
3000aec4: 0594002c ldreq r0, [r4, #44] ; 0x2c
3000aec8: 028d1004 addeq r1, sp, #4
3000aecc: 0b00040c bleq 3000bf04 <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
3000aed0: e5940028 ldr r0, [r4, #40] ; 0x28
3000aed4: ebffee12 bl 30006724 <rtems_semaphore_release>
return 0;
3000aed8: ea000003 b 3000aeec <fifo_open+0x2fc>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
3000aedc: e3e0a003 mvn sl, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
3000aee0: e1a00006 mov r0, r6
3000aee4: e1a01007 mov r1, r7
3000aee8: ebffff07 bl 3000ab0c <pipe_release>
return err;
}
3000aeec: e1a0000a mov r0, sl
3000aef0: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc}
3000296c <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
3000296c: e59f3104 ldr r3, [pc, #260] ; 30002a78 <fpathconf+0x10c>
long fpathconf(
int fd,
int name
)
{
30002970: e52de004 push {lr} ; (str lr, [sp, #-4]!)
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002974: e5933000 ldr r3, [r3]
30002978: e1500003 cmp r0, r3
3000297c: 2a000006 bcs 3000299c <fpathconf+0x30>
iop = rtems_libio_iop(fd);
30002980: e59f30f4 ldr r3, [pc, #244] ; 30002a7c <fpathconf+0x110>
30002984: e3a02038 mov r2, #56 ; 0x38
30002988: e5933000 ldr r3, [r3]
3000298c: e0203092 mla r0, r2, r0, r3
rtems_libio_check_is_open(iop);
30002990: e5903014 ldr r3, [r0, #20]
30002994: e3130c01 tst r3, #256 ; 0x100
30002998: 1a000002 bne 300029a8 <fpathconf+0x3c>
3000299c: eb0028d7 bl 3000cd00 <__errno>
300029a0: e3a03009 mov r3, #9
300029a4: ea000003 b 300029b8 <fpathconf+0x4c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
300029a8: e3130002 tst r3, #2
300029ac: 1a000004 bne 300029c4 <fpathconf+0x58>
300029b0: eb0028d2 bl 3000cd00 <__errno> <== NOT EXECUTED
300029b4: e3a03016 mov r3, #22 <== NOT EXECUTED
300029b8: e5803000 str r3, [r0]
300029bc: e3e00000 mvn r0, #0
300029c0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
300029c4: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
300029c8: e351000b cmp r1, #11
300029cc: 979ff101 ldrls pc, [pc, r1, lsl #2]
300029d0: ea000023 b 30002a64 <fpathconf+0xf8>
300029d4: 30002a04 .word 0x30002a04 <== NOT EXECUTED
300029d8: 30002a0c .word 0x30002a0c <== NOT EXECUTED
300029dc: 30002a14 .word 0x30002a14 <== NOT EXECUTED
300029e0: 30002a1c .word 0x30002a1c <== NOT EXECUTED
300029e4: 30002a24 .word 0x30002a24 <== NOT EXECUTED
300029e8: 30002a2c .word 0x30002a2c <== NOT EXECUTED
300029ec: 30002a34 .word 0x30002a34 <== NOT EXECUTED
300029f0: 30002a3c .word 0x30002a3c <== NOT EXECUTED
300029f4: 30002a44 .word 0x30002a44 <== NOT EXECUTED
300029f8: 30002a4c .word 0x30002a4c <== NOT EXECUTED
300029fc: 30002a54 .word 0x30002a54 <== NOT EXECUTED
30002a00: 30002a5c .word 0x30002a5c <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
30002a04: e5930038 ldr r0, [r3, #56] ; 0x38
break;
30002a08: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
30002a0c: e593003c ldr r0, [r3, #60] ; 0x3c
break;
30002a10: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
30002a14: e5930040 ldr r0, [r3, #64] ; 0x40
break;
30002a18: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
30002a1c: e5930044 ldr r0, [r3, #68] ; 0x44
break;
30002a20: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
30002a24: e5930048 ldr r0, [r3, #72] ; 0x48
break;
30002a28: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
30002a2c: e593004c ldr r0, [r3, #76] ; 0x4c
break;
30002a30: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
30002a34: e5930054 ldr r0, [r3, #84] ; 0x54
break;
30002a38: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
30002a3c: e5930058 ldr r0, [r3, #88] ; 0x58
break;
30002a40: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
30002a44: e5930064 ldr r0, [r3, #100] ; 0x64
break;
30002a48: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
30002a4c: e5930050 ldr r0, [r3, #80] ; 0x50
break;
30002a50: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
30002a54: e593005c ldr r0, [r3, #92] ; 0x5c
break;
30002a58: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
30002a5c: e5930060 ldr r0, [r3, #96] ; 0x60
break;
30002a60: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30002a64: eb0028a5 bl 3000cd00 <__errno>
30002a68: e3a03016 mov r3, #22
30002a6c: e5803000 str r3, [r0]
30002a70: e3e00000 mvn r0, #0
break;
}
return return_value;
}
30002a74: e49df004 pop {pc} ; (ldr pc, [sp], #4)
3000322c <free_user_env>:
static void
free_user_env(void *venv)
{
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
3000322c: e59f3028 ldr r3, [pc, #40] ; 3000325c <free_user_env+0x30> <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
30003230: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
30003234: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
30003238: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
3000323c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
30003240: e2800004 add r0, r0, #4 <== NOT EXECUTED
30003244: ebfffbfb bl 30002238 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
30003248: e2840018 add r0, r4, #24 <== NOT EXECUTED
3000324c: ebfffbf9 bl 30002238 <rtems_filesystem_freenode> <== NOT EXECUTED
free(env);
30003250: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
30003254: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
30003258: eafffbfb b 3000224c <free> <== NOT EXECUTED
30009480 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
30009480: e92d4070 push {r4, r5, r6, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
30009484: e59f30b8 ldr r3, [pc, #184] ; 30009544 <ftruncate+0xc4>
int ftruncate(
int fd,
off_t length
)
{
30009488: e24dd014 sub sp, sp, #20
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
3000948c: e5933000 ldr r3, [r3]
int ftruncate(
int fd,
off_t length
)
{
30009490: e1a05001 mov r5, r1
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
30009494: e1500003 cmp r0, r3
int ftruncate(
int fd,
off_t length
)
{
30009498: e1a06002 mov r6, r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
3000949c: 2a000006 bcs 300094bc <ftruncate+0x3c>
iop = rtems_libio_iop( fd );
300094a0: e59f30a0 ldr r3, [pc, #160] ; 30009548 <ftruncate+0xc8>
300094a4: e3a04038 mov r4, #56 ; 0x38
300094a8: e5933000 ldr r3, [r3]
300094ac: e0243490 mla r4, r0, r4, r3
rtems_libio_check_is_open(iop);
300094b0: e5943014 ldr r3, [r4, #20]
300094b4: e3130c01 tst r3, #256 ; 0x100
300094b8: 1a000002 bne 300094c8 <ftruncate+0x48>
300094bc: eb000a44 bl 3000bdd4 <__errno>
300094c0: e3a03009 mov r3, #9
300094c4: ea000013 b 30009518 <ftruncate+0x98>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
300094c8: e1a0c00d mov ip, sp
300094cc: e284e018 add lr, r4, #24
300094d0: e8be000f ldm lr!, {r0, r1, r2, r3}
300094d4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300094d8: e59e3000 ldr r3, [lr]
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
300094dc: e1a0000d mov r0, sp
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
300094e0: e58c3000 str r3, [ip]
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
300094e4: e59d300c ldr r3, [sp, #12]
300094e8: e1a0e00f mov lr, pc
300094ec: e593f010 ldr pc, [r3, #16]
300094f0: e3500001 cmp r0, #1
300094f4: 1a000002 bne 30009504 <ftruncate+0x84>
rtems_set_errno_and_return_minus_one( EISDIR );
300094f8: eb000a35 bl 3000bdd4 <__errno> <== NOT EXECUTED
300094fc: e3a03015 mov r3, #21 <== NOT EXECUTED
30009500: ea000004 b 30009518 <ftruncate+0x98> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30009504: e5943014 ldr r3, [r4, #20]
30009508: e3130004 tst r3, #4
3000950c: 1a000004 bne 30009524 <ftruncate+0xa4>
30009510: eb000a2f bl 3000bdd4 <__errno>
30009514: e3a03016 mov r3, #22
30009518: e5803000 str r3, [r0]
3000951c: e3e00000 mvn r0, #0
30009520: ea000005 b 3000953c <ftruncate+0xbc>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
30009524: e5943020 ldr r3, [r4, #32]
30009528: e1a00004 mov r0, r4
3000952c: e1a01005 mov r1, r5
30009530: e1a02006 mov r2, r6
30009534: e1a0e00f mov lr, pc
30009538: e593f020 ldr pc, [r3, #32]
}
3000953c: e28dd014 add sp, sp, #20
30009540: e8bd8070 pop {r4, r5, r6, pc}
30001f2c <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
30001f2c: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
30001f30: e2504000 subs r4, r0, #0
30001f34: 1a000004 bne 30001f4c <gettimeofday+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
30001f38: eb0027a5 bl 3000bdd4 <__errno> <== NOT EXECUTED
30001f3c: e3a0300e mov r3, #14 <== NOT EXECUTED
30001f40: e5803000 str r3, [r0] <== NOT EXECUTED
30001f44: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001f48: ea00000c b 30001f80 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30001f4c: e10f5000 mrs r5, CPSR
30001f50: e3853080 orr r3, r5, #128 ; 0x80
30001f54: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
30001f58: e1a0000d mov r0, sp
30001f5c: eb000f78 bl 30005d44 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30001f60: e129f005 msr CPSR_fc, r5
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
30001f64: e59d3000 ldr r3, [sp]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
30001f68: e59d0004 ldr r0, [sp, #4]
time->tv_sec = now.tv_sec;
30001f6c: e5843000 str r3, [r4]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
30001f70: e3a01ffa mov r1, #1000 ; 0x3e8
30001f74: eb00358b bl 3000f5a8 <__aeabi_idiv>
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
30001f78: e5840004 str r0, [r4, #4]
* 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;
30001f7c: e3a00000 mov r0, #0
}
30001f80: e8bd803c pop {r2, r3, r4, r5, pc}
3000b5b0 <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 )
3000b5b0: e5903018 ldr r3, [r0, #24]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000b5b4: e92d4010 push {r4, lr}
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 )
3000b5b8: e593304c ldr r3, [r3, #76] ; 0x4c
3000b5bc: e3530001 cmp r3, #1
3000b5c0: 1a000005 bne 3000b5dc <imfs_dir_open+0x2c>
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
3000b5c4: e3a03000 mov r3, #0
3000b5c8: e3a04000 mov r4, #0
3000b5cc: e580300c str r3, [r0, #12]
3000b5d0: e5804010 str r4, [r0, #16]
return 0;
3000b5d4: e3a00000 mov r0, #0
3000b5d8: e8bd8010 pop {r4, pc}
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
3000b5dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
3000b5e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30003b80 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
30003b80: e5913030 ldr r3, [r1, #48] ; 0x30
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b84: e92d4030 push {r4, r5, lr}
if (tty->termios.c_iflag & ISTRIP)
30003b88: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b8c: e20050ff and r5, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
30003b90: 1200507f andne r5, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
30003b94: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b98: e1a04001 mov r4, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
30003b9c: 0a000007 beq 30003bc0 <iproc+0x40>
c = tolower (c);
30003ba0: e59f2164 ldr r2, [pc, #356] ; 30003d0c <iproc+0x18c>
30003ba4: e5922000 ldr r2, [r2]
30003ba8: e0822005 add r2, r2, r5
30003bac: e5d22001 ldrb r2, [r2, #1]
30003bb0: e2022003 and r2, r2, #3
30003bb4: e3520001 cmp r2, #1
30003bb8: 02855020 addeq r5, r5, #32
30003bbc: e20550ff and r5, r5, #255 ; 0xff
if (c == '\r') {
30003bc0: e355000d cmp r5, #13
30003bc4: 1a000005 bne 30003be0 <iproc+0x60>
if (tty->termios.c_iflag & IGNCR)
30003bc8: e3130080 tst r3, #128 ; 0x80
30003bcc: 1a000048 bne 30003cf4 <iproc+0x174>
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
30003bd0: e3130c01 tst r3, #256 ; 0x100
30003bd4: 03a0500d moveq r5, #13
30003bd8: 13a0500a movne r5, #10
30003bdc: ea000007 b 30003c00 <iproc+0x80>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
30003be0: e355000a cmp r5, #10
30003be4: 1a000003 bne 30003bf8 <iproc+0x78>
c = '\r';
30003be8: e3130040 tst r3, #64 ; 0x40
30003bec: 03a0500a moveq r5, #10
30003bf0: 13a0500d movne r5, #13
30003bf4: ea000001 b 30003c00 <iproc+0x80>
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30003bf8: e3550000 cmp r5, #0
30003bfc: 0a00002c beq 30003cb4 <iproc+0x134>
30003c00: e594303c ldr r3, [r4, #60] ; 0x3c
30003c04: e3130002 tst r3, #2
30003c08: 0a000029 beq 30003cb4 <iproc+0x134>
if (c == tty->termios.c_cc[VERASE]) {
30003c0c: e5d42043 ldrb r2, [r4, #67] ; 0x43
30003c10: e1520005 cmp r2, r5
erase (tty, 0);
30003c14: 01a00004 moveq r0, r4
30003c18: 03a01000 moveq r1, #0
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
30003c1c: 0a000004 beq 30003c34 <iproc+0xb4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
30003c20: e5d42044 ldrb r2, [r4, #68] ; 0x44
30003c24: e1520005 cmp r2, r5
30003c28: 1a000003 bne 30003c3c <iproc+0xbc>
erase (tty, 1);
30003c2c: e1a00004 mov r0, r4
30003c30: e3a01001 mov r1, #1
30003c34: ebffff60 bl 300039bc <erase>
30003c38: ea00002d b 30003cf4 <iproc+0x174>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
30003c3c: e5d42045 ldrb r2, [r4, #69] ; 0x45
30003c40: e1520005 cmp r2, r5
30003c44: 0a00002c beq 30003cfc <iproc+0x17c>
return 1;
} else if (c == '\n') {
30003c48: e355000a cmp r5, #10
30003c4c: 1a000008 bne 30003c74 <iproc+0xf4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
30003c50: e3130048 tst r3, #72 ; 0x48
echo (c, tty);
30003c54: 11a00005 movne r0, r5
30003c58: 11a01004 movne r1, r4
30003c5c: 1bffff33 blne 30003930 <echo>
tty->cbuf[tty->ccount++] = c;
30003c60: e5943020 ldr r3, [r4, #32]
30003c64: e594201c ldr r2, [r4, #28]
30003c68: e3a0100a mov r1, #10
30003c6c: e7c21003 strb r1, [r2, r3]
30003c70: ea00000c b 30003ca8 <iproc+0x128>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
30003c74: e5d4204c ldrb r2, [r4, #76] ; 0x4c
30003c78: e1520005 cmp r2, r5
30003c7c: 0a000002 beq 30003c8c <iproc+0x10c>
30003c80: e5d42051 ldrb r2, [r4, #81] ; 0x51
30003c84: e1520005 cmp r2, r5
30003c88: 1a000009 bne 30003cb4 <iproc+0x134>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
30003c8c: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
30003c90: 11a00005 movne r0, r5 <== NOT EXECUTED
30003c94: 11a01004 movne r1, r4 <== NOT EXECUTED
30003c98: 1bffff24 blne 30003930 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
30003c9c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30003ca0: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
30003ca4: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
30003ca8: e2833001 add r3, r3, #1
30003cac: e5843020 str r3, [r4, #32]
30003cb0: ea000011 b 30003cfc <iproc+0x17c>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
30003cb4: e59f3054 ldr r3, [pc, #84] ; 30003d10 <iproc+0x190>
30003cb8: e5942020 ldr r2, [r4, #32]
30003cbc: e5933008 ldr r3, [r3, #8]
30003cc0: e2433001 sub r3, r3, #1
30003cc4: e1520003 cmp r2, r3
30003cc8: aa00000d bge 30003d04 <iproc+0x184>
if (tty->termios.c_lflag & ECHO)
30003ccc: e594303c ldr r3, [r4, #60] ; 0x3c
30003cd0: e3130008 tst r3, #8
echo (c, tty);
30003cd4: 11a00005 movne r0, r5
30003cd8: 11a01004 movne r1, r4
30003cdc: 1bffff13 blne 30003930 <echo>
tty->cbuf[tty->ccount++] = c;
30003ce0: e5943020 ldr r3, [r4, #32]
30003ce4: e594201c ldr r2, [r4, #28]
30003ce8: e7c25003 strb r5, [r2, r3]
30003cec: e2833001 add r3, r3, #1
30003cf0: e5843020 str r3, [r4, #32]
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
30003cf4: e3a00000 mov r0, #0
30003cf8: e8bd8030 pop {r4, r5, pc}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
30003cfc: e3a00001 mov r0, #1
30003d00: e8bd8030 pop {r4, r5, pc}
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
30003d04: e3a00000 mov r0, #0 <== NOT EXECUTED
}
30003d08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
3001f650 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
3001f650: e3a00000 mov r0, #0 <== NOT EXECUTED
3001f654: e12fff1e bx lr <== NOT EXECUTED
3000ad70 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
3000ad70: e92d41f0 push {r4, r5, r6, r7, r8, lr}
*/
#if defined(RTEMS_DEBUG)
assert( block_table );
#endif
if ( !block_table )
3000ad74: e2505000 subs r5, r0, #0
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
3000ad78: 13a04000 movne r4, #0
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
3000ad7c: e1a08001 mov r8, r1
*/
#if defined(RTEMS_DEBUG)
assert( block_table );
#endif
if ( !block_table )
3000ad80: 15956000 ldrne r6, [r5]
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
3000ad84: 11a07004 movne r7, r4
*/
#if defined(RTEMS_DEBUG)
assert( block_table );
#endif
if ( !block_table )
3000ad88: 1a000006 bne 3000ada8 <memfile_free_blocks_in_table+0x38>
3000ad8c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
3000ad90: e4960004 ldr r0, [r6], #4
3000ad94: e3500000 cmp r0, #0
3000ad98: 0a000001 beq 3000ada4 <memfile_free_blocks_in_table+0x34>
memfile_free_block( b[i] );
3000ad9c: ebffffeb bl 3000ad50 <memfile_free_block>
b[i] = 0;
3000ada0: e5067004 str r7, [r6, #-4]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
3000ada4: e2844001 add r4, r4, #1
3000ada8: e1540008 cmp r4, r8
3000adac: bafffff7 blt 3000ad90 <memfile_free_blocks_in_table+0x20>
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
3000adb0: e5950000 ldr r0, [r5]
3000adb4: ebffffe5 bl 3000ad50 <memfile_free_block>
*block_table = 0;
3000adb8: e3a03000 mov r3, #0
3000adbc: e5853000 str r3, [r5]
3000adc0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3000b2a8 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000b2a8: e92d4013 push {r0, r1, r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000b2ac: e5904018 ldr r4, [r0, #24]
* 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 )
3000b2b0: e5943054 ldr r3, [r4, #84] ; 0x54
3000b2b4: e1530002 cmp r3, r2
3000b2b8: ba000003 blt 3000b2cc <memfile_ftruncate+0x24>
3000b2bc: 1a000005 bne 3000b2d8 <memfile_ftruncate+0x30>
3000b2c0: e5943050 ldr r3, [r4, #80] ; 0x50
3000b2c4: e1530001 cmp r3, r1
3000b2c8: 2a000002 bcs 3000b2d8 <memfile_ftruncate+0x30>
return IMFS_memfile_extend( the_jnode, length );
3000b2cc: e1a00004 mov r0, r4 <== NOT EXECUTED
3000b2d0: ebffff08 bl 3000aef8 <IMFS_memfile_extend> <== NOT EXECUTED
3000b2d4: ea000008 b 3000b2fc <memfile_ftruncate+0x54> <== NOT EXECUTED
* 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;
3000b2d8: e5841050 str r1, [r4, #80] ; 0x50
3000b2dc: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
3000b2e0: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
3000b2e4: e3a01000 mov r1, #0
3000b2e8: e1a0000d mov r0, sp
3000b2ec: ebffdb0e bl 30001f2c <gettimeofday>
3000b2f0: e59d3000 ldr r3, [sp]
return 0;
3000b2f4: e3a00000 mov r0, #0
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
3000b2f8: e5843040 str r3, [r4, #64] ; 0x40
return 0;
}
3000b2fc: e8bd801c pop {r2, r3, r4, pc}
3000b300 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000b300: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000b304: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000b308: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000b30c: e595304c ldr r3, [r5, #76] ; 0x4c
3000b310: e3530006 cmp r3, #6
3000b314: 1a00000b bne 3000b348 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
3000b318: e5953054 ldr r3, [r5, #84] ; 0x54
3000b31c: e5901010 ldr r1, [r0, #16]
3000b320: e5952050 ldr r2, [r5, #80] ; 0x50
3000b324: e1510003 cmp r1, r3
3000b328: ca000003 bgt 3000b33c <memfile_lseek+0x3c>
3000b32c: 1a000014 bne 3000b384 <memfile_lseek+0x84>
3000b330: e590100c ldr r1, [r0, #12]
3000b334: e1510002 cmp r1, r2
3000b338: 9a000011 bls 3000b384 <memfile_lseek+0x84>
iop->offset = the_jnode->info.linearfile.size;
3000b33c: e584200c str r2, [r4, #12] <== NOT EXECUTED
3000b340: e5843010 str r3, [r4, #16] <== NOT EXECUTED
3000b344: ea00000e b 3000b384 <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
3000b348: e1a00005 mov r0, r5
3000b34c: e284200c add r2, r4, #12
3000b350: e8920006 ldm r2, {r1, r2}
3000b354: ebfffee7 bl 3000aef8 <IMFS_memfile_extend>
3000b358: e3500000 cmp r0, #0
3000b35c: 0a000005 beq 3000b378 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000b360: eb00029b bl 3000bdd4 <__errno> <== NOT EXECUTED
3000b364: e3a0301c mov r3, #28 <== NOT EXECUTED
3000b368: e5803000 str r3, [r0] <== NOT EXECUTED
3000b36c: e3e04000 mvn r4, #0 <== NOT EXECUTED
3000b370: e3e03000 mvn r3, #0 <== NOT EXECUTED
3000b374: ea000004 b 3000b38c <memfile_lseek+0x8c> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
3000b378: e2853050 add r3, r5, #80 ; 0x50
3000b37c: e893000c ldm r3, {r2, r3}
3000b380: e984000c stmib r4, {r2, r3}
}
return iop->offset;
3000b384: e284400c add r4, r4, #12
3000b388: e8940018 ldm r4, {r3, r4}
}
3000b38c: e1a00003 mov r0, r3
3000b390: e1a01004 mov r1, r4
3000b394: e8bd8030 pop {r4, r5, pc}
3000b20c <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000b20c: e5903014 ldr r3, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000b210: e92d4031 push {r0, r4, r5, lr}
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000b214: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000b218: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000b21c: e5904018 ldr r4, [r0, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000b220: 0a000015 beq 3000b27c <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
3000b224: e594304c ldr r3, [r4, #76] ; 0x4c
3000b228: e3530006 cmp r3, #6
3000b22c: 1a000012 bne 3000b27c <memfile_open+0x70>
uint32_t count = the_jnode->info.linearfile.size;
3000b230: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
3000b234: e3a00000 mov r0, #0 <== 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;
3000b238: e3a02005 mov r2, #5 <== NOT EXECUTED
3000b23c: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
3000b240: e3a01000 mov r1, #0 <== NOT EXECUTED
3000b244: e3a02000 mov r2, #0 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
3000b248: e15c0000 cmp ip, r0 <== NOT EXECUTED
* 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;
3000b24c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
3000b250: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED
3000b254: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
3000b258: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
3000b25c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
3000b260: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
3000b264: 0a000004 beq 3000b27c <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
3000b268: e1a00004 mov r0, r4 <== NOT EXECUTED
3000b26c: e58dc000 str ip, [sp] <== NOT EXECUTED
3000b270: ebffff67 bl 3000b014 <IMFS_memfile_write> <== NOT EXECUTED
3000b274: e3700001 cmn r0, #1 <== NOT EXECUTED
3000b278: 0a000009 beq 3000b2a4 <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
3000b27c: e5953014 ldr r3, [r5, #20]
3000b280: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
3000b284: 12843050 addne r3, r4, #80 ; 0x50
3000b288: 1893000c ldmne r3, {r2, r3}
3000b28c: 1585200c strne r2, [r5, #12]
3000b290: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
3000b294: e2844050 add r4, r4, #80 ; 0x50
3000b298: e8940018 ldm r4, {r3, r4}
3000b29c: e9850018 stmib r5, {r3, r4}
return 0;
3000b2a0: e3a00000 mov r0, #0
}
3000b2a4: e8bd8038 pop {r3, r4, r5, pc}
300022c4 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
300022c4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
300022c8: e3110a0f tst r1, #61440 ; 0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
300022cc: e24dd020 sub sp, sp, #32
300022d0: e1a06000 mov r6, r0
300022d4: e1a05001 mov r5, r1
300022d8: e1a07002 mov r7, r2
300022dc: e1a08003 mov r8, r3
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
300022e0: 1a000003 bne 300022f4 <mknod+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
300022e4: eb0026ba bl 3000bdd4 <__errno> <== NOT EXECUTED
300022e8: e3a03016 mov r3, #22 <== NOT EXECUTED
300022ec: e5803000 str r3, [r0] <== NOT EXECUTED
300022f0: ea000018 b 30002358 <mknod+0x94> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
300022f4: e28d4004 add r4, sp, #4
300022f8: e28d101c add r1, sp, #28
300022fc: e1a02004 mov r2, r4
30002300: eb000241 bl 30002c0c <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
30002304: e59d001c ldr r0, [sp, #28]
30002308: e1a01004 mov r1, r4
3000230c: e0860000 add r0, r6, r0
30002310: e28d2018 add r2, sp, #24
30002314: e59d3010 ldr r3, [sp, #16]
30002318: e1a0e00f mov lr, pc
3000231c: e593f004 ldr pc, [r3, #4]
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
30002320: e3500000 cmp r0, #0
30002324: 1a00000b bne 30002358 <mknod+0x94>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
30002328: e1a01005 mov r1, r5
3000232c: e58d4000 str r4, [sp]
30002330: e59d0018 ldr r0, [sp, #24]
30002334: e1a02007 mov r2, r7
30002338: e1a03008 mov r3, r8
3000233c: e59dc010 ldr ip, [sp, #16]
30002340: e1a0e00f mov lr, pc
30002344: e59cf014 ldr pc, [ip, #20]
30002348: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
3000234c: e1a00004 mov r0, r4
30002350: ebfffec7 bl 30001e74 <rtems_filesystem_freenode>
return result;
30002354: ea000000 b 3000235c <mknod+0x98>
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
return -1;
30002358: e3e05000 mvn r5, #0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
3000235c: e1a00005 mov r0, r5
30002360: e28dd020 add sp, sp, #32
30002364: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
300023fc <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
300023fc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002400: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002404: e24dd028 sub sp, sp, #40 ; 0x28
30002408: e1a06000 mov r6, r0
3000240c: e1a07001 mov r7, r1
30002410: e1a08002 mov r8, r2
30002414: e58d300c str r3, [sp, #12]
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002418: 8a000004 bhi 30002430 <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
3000241c: e1a00002 mov r0, r2
30002420: eb001d1c bl 30009898 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
30002424: e3500000 cmp r0, #0
30002428: e58d0010 str r0, [sp, #16]
3000242c: 1a000002 bne 3000243c <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
30002430: eb002667 bl 3000bdd4 <__errno>
30002434: e3a03016 mov r3, #22
30002438: ea000039 b 30002524 <mount+0x128>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
3000243c: e2575000 subs r5, r7, #0
30002440: 13a05001 movne r5, #1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
30002444: e59f3250 ldr r3, [pc, #592] ; 3000269c <mount+0x2a0>
30002448: e3550000 cmp r5, #0
3000244c: 11a03007 movne r3, r7
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
30002450: e1a00008 mov r0, r8
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
30002454: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
30002458: eb002a4d bl 3000cd94 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
3000245c: e3560000 cmp r6, #0
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;
30002460: e280b001 add fp, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
30002464: 01a0a006 moveq sl, r6
30002468: 0a000002 beq 30002478 <mount+0x7c>
3000246c: e1a00006 mov r0, r6
30002470: eb002a47 bl 3000cd94 <strlen>
30002474: e280a001 add sl, r0, #1
size_t target_length = strlen( target );
30002478: e59d0004 ldr r0, [sp, #4]
3000247c: eb002a44 bl 3000cd94 <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
30002480: e28b1075 add r1, fp, #117 ; 0x75
30002484: e0811000 add r1, r1, r0
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
30002488: e58d0008 str r0, [sp, #8]
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
3000248c: e081100a add r1, r1, sl
30002490: e3a00001 mov r0, #1
30002494: ebfffe00 bl 30001c9c <calloc>
if ( mt_entry != NULL ) {
30002498: e2504000 subs r4, r0, #0
3000249c: 0a00001e beq 3000251c <mount+0x120>
char *str = (char *) mt_entry + sizeof( *mt_entry );
300024a0: e2849074 add r9, r4, #116 ; 0x74
strcpy( str, filesystemtype );
300024a4: e1a00009 mov r0, r9
300024a8: e1a01008 mov r1, r8
300024ac: eb0029e8 bl 3000cc54 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
300024b0: e3560000 cmp r6, #0
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
300024b4: e584906c str r9, [r4, #108] ; 0x6c
str += filesystemtype_size;
300024b8: e089900b add r9, r9, fp
if ( source_or_null != NULL ) {
300024bc: 0a000004 beq 300024d4 <mount+0xd8>
strcpy( str, source_or_null );
300024c0: e1a00009 mov r0, r9
300024c4: e1a01006 mov r1, r6
300024c8: eb0029e1 bl 3000cc54 <strcpy>
mt_entry->dev = str;
300024cc: e5849070 str r9, [r4, #112] ; 0x70
str += source_size;
300024d0: e089900a add r9, r9, sl
}
strcpy( str, target );
300024d4: e59d1004 ldr r1, [sp, #4]
300024d8: e1a00009 mov r0, r9
300024dc: eb0029dc bl 3000cc54 <strcpy>
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
300024e0: e59d300c ldr r3, [sp, #12]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
300024e4: e59fe1b4 ldr lr, [pc, #436] ; 300026a0 <mount+0x2a4>
300024e8: e284c038 add ip, r4, #56 ; 0x38
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
300024ec: e5843030 str r3, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
300024f0: e8be000f ldm lr!, {r0, r1, r2, r3}
300024f4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300024f8: e8be000f ldm lr!, {r0, r1, r2, r3}
300024fc: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002500: e89e000f ldm lr, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
30002504: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
30002508: e5849068 str r9, [r4, #104] ; 0x68
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
3000250c: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002510: e88c000f stm ip, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
30002514: 0a00002e beq 300025d4 <mount+0x1d8>
30002518: ea000003 b 3000252c <mount+0x130>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
3000251c: eb00262c bl 3000bdd4 <__errno> <== NOT EXECUTED
30002520: e3a0300c mov r3, #12 <== NOT EXECUTED
30002524: e5803000 str r3, [r0]
30002528: ea000058 b 30002690 <mount+0x294>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
3000252c: e3a03001 mov r3, #1
30002530: e28d6014 add r6, sp, #20
30002534: e58d3000 str r3, [sp]
30002538: e1a00007 mov r0, r7
3000253c: e59d1008 ldr r1, [sp, #8]
30002540: e3a02007 mov r2, #7
30002544: e1a03006 mov r3, r6
30002548: ebfffe0e bl 30001d88 <rtems_filesystem_evaluate_path>
3000254c: e3700001 cmn r0, #1
30002550: 0a000048 beq 30002678 <mount+0x27c>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
30002554: e1a00006 mov r0, r6
30002558: e59d3020 ldr r3, [sp, #32]
3000255c: e1a0e00f mov lr, pc
30002560: e593f010 ldr pc, [r3, #16]
30002564: e3500001 cmp r0, #1
30002568: 0a000002 beq 30002578 <mount+0x17c>
errno = ENOTDIR;
3000256c: eb002618 bl 3000bdd4 <__errno>
30002570: e3a03014 mov r3, #20
30002574: ea000006 b 30002594 <mount+0x198>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
30002578: e59f0124 ldr r0, [pc, #292] ; 300026a4 <mount+0x2a8>
3000257c: e59d1014 ldr r1, [sp, #20]
30002580: ebffff87 bl 300023a4 <rtems_filesystem_mount_iterate>
30002584: e3500000 cmp r0, #0
30002588: 0a000003 beq 3000259c <mount+0x1a0>
errno = EBUSY;
3000258c: eb002610 bl 3000bdd4 <__errno>
30002590: e3a03010 mov r3, #16
30002594: e5803000 str r3, [r0]
goto cleanup_and_bail;
30002598: ea000037 b 3000267c <mount+0x280>
* 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;
3000259c: e59d3014 ldr r3, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
300025a0: e59d2024 ldr r2, [sp, #36] ; 0x24
* 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;
300025a4: e5843008 str r3, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
300025a8: e59d301c ldr r3, [sp, #28]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
300025ac: e5842018 str r2, [r4, #24]
* 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;
300025b0: e5843010 str r3, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
300025b4: e59d3020 ldr r3, [sp, #32]
/*
* 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 ) ) {
300025b8: e1a00004 mov r0, r4
* 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;
300025bc: e5843014 str r3, [r4, #20]
/*
* 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 ) ) {
300025c0: e1a0e00f mov lr, pc
300025c4: e593f020 ldr pc, [r3, #32]
300025c8: e3500000 cmp r0, #0
300025cc: 0a00000b beq 30002600 <mount+0x204>
300025d0: ea000029 b 3000267c <mount+0x280> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
300025d4: e59f30cc ldr r3, [pc, #204] ; 300026a8 <mount+0x2ac>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300025d8: e2832004 add r2, r3, #4
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
300025dc: e5933000 ldr r3, [r3]
300025e0: e1530002 cmp r3, r2
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
300025e4: 01a06005 moveq r6, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
300025e8: 0a000004 beq 30002600 <mount+0x204>
errno = EINVAL;
300025ec: eb0025f8 bl 3000bdd4 <__errno> <== NOT EXECUTED
300025f0: e3a03016 mov r3, #22 <== NOT EXECUTED
300025f4: e5803000 str r3, [r0] <== NOT EXECUTED
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
300025f8: e1a06005 mov r6, r5 <== NOT EXECUTED
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
goto cleanup_and_bail;
300025fc: ea00001e b 3000267c <mount+0x280> <== NOT EXECUTED
* 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 ) ) {
30002600: e1a00004 mov r0, r4
30002604: e59d104c ldr r1, [sp, #76] ; 0x4c
30002608: e59d3010 ldr r3, [sp, #16]
3000260c: e1a0e00f mov lr, pc
30002610: e12fff13 bx r3
30002614: e2507000 subs r7, r0, #0
30002618: 0a000004 beq 30002630 <mount+0x234>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
3000261c: e1a00004 mov r0, r4 <== NOT EXECUTED
30002620: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
30002624: e1a0e00f mov lr, pc <== NOT EXECUTED
30002628: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
goto cleanup_and_bail;
3000262c: ea000012 b 3000267c <mount+0x280> <== NOT EXECUTED
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
30002630: ebffff51 bl 3000237c <rtems_libio_lock>
30002634: e59f006c ldr r0, [pc, #108] ; 300026a8 <mount+0x2ac>
30002638: e1a01004 mov r1, r4
3000263c: eb000cc2 bl 3000594c <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
30002640: ebffff53 bl 30002394 <rtems_libio_unlock>
if ( !has_target )
30002644: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
30002648: 11a00007 movne r0, r7
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
3000264c: 1a000010 bne 30002694 <mount+0x298>
rtems_filesystem_root = mt_entry->mt_fs_root;
30002650: e59f3054 ldr r3, [pc, #84] ; 300026ac <mount+0x2b0>
30002654: e284401c add r4, r4, #28
30002658: e593c000 ldr ip, [r3]
3000265c: e8b4000f ldm r4!, {r0, r1, r2, r3}
30002660: e28cc018 add ip, ip, #24
30002664: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002668: e5943000 ldr r3, [r4]
return 0;
3000266c: e1a00005 mov r0, r5
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
30002670: e58c3000 str r3, [ip]
30002674: ea000006 b 30002694 <mount+0x298>
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
30002678: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
3000267c: e1a00004 mov r0, r4
30002680: ebfffe00 bl 30001e88 <free>
if ( loc_to_free )
30002684: e3560000 cmp r6, #0
rtems_filesystem_freenode( loc_to_free );
30002688: 11a00006 movne r0, r6
3000268c: 1bfffdf8 blne 30001e74 <rtems_filesystem_freenode>
return -1;
30002690: e3e00000 mvn r0, #0
}
30002694: e28dd028 add sp, sp, #40 ; 0x28
30002698: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
300026b4 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
300026b4: e92d4010 push {r4, lr}
300026b8: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
300026bc: eb0026c7 bl 3000c1e0 <fileno>
300026c0: e3500002 cmp r0, #2
300026c4: 8a00000b bhi 300026f8 <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
300026c8: e1d430bc ldrh r3, [r4, #12]
300026cc: e3130080 tst r3, #128 ; 0x80
300026d0: 0a00000a beq 30002700 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
300026d4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300026d8: ebfffdea bl 30001e88 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
300026dc: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED
300026e0: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED
300026e4: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
300026e8: e3a03000 mov r3, #0 <== NOT EXECUTED
300026ec: e5843000 str r3, [r4] <== NOT EXECUTED
300026f0: e5843010 str r3, [r4, #16] <== NOT EXECUTED
300026f4: ea000001 b 30002700 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
300026f8: e1a00004 mov r0, r4 <== NOT EXECUTED
300026fc: eb002602 bl 3000bf0c <fclose> <== NOT EXECUTED
}
return 0;
}
30002700: e3a00000 mov r0, #0
30002704: e8bd8010 pop {r4, pc}
300037e0 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
300037e0: e92d4011 push {r0, r4, lr}
300037e4: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
300037e8: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
300037ec: e1a04001 mov r4, r1
int i;
if (tty->termios.c_oflag & OPOST) {
300037f0: e3130001 tst r3, #1
300037f4: 0a000045 beq 30003910 <oproc+0x130>
switch (c) {
300037f8: e5dd2000 ldrb r2, [sp]
300037fc: e2421008 sub r1, r2, #8
30003800: e3510005 cmp r1, #5
30003804: 979ff101 ldrls pc, [pc, r1, lsl #2]
30003808: ea00002c b 300038c0 <oproc+0xe0>
3000380c: 300038ac .word 0x300038ac <== NOT EXECUTED
30003810: 30003884 .word 0x30003884 <== NOT EXECUTED
30003814: 30003824 .word 0x30003824 <== NOT EXECUTED
30003818: 300038c0 .word 0x300038c0 <== NOT EXECUTED
3000381c: 300038c0 .word 0x300038c0 <== NOT EXECUTED
30003820: 3000384c .word 0x3000384c <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
30003824: e3130020 tst r3, #32
tty->column = 0;
30003828: 13a02000 movne r2, #0
3000382c: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
30003830: e3130004 tst r3, #4
30003834: 0a000035 beq 30003910 <oproc+0x130>
rtems_termios_puts ("\r", 1, tty);
30003838: e59f00e4 ldr r0, [pc, #228] ; 30003924 <oproc+0x144>
3000383c: e3a01001 mov r1, #1
30003840: e1a02004 mov r2, r4
30003844: ebffffa5 bl 300036e0 <rtems_termios_puts>
30003848: ea00000b b 3000387c <oproc+0x9c>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
3000384c: e3130010 tst r3, #16 <== NOT EXECUTED
30003850: 0a000002 beq 30003860 <oproc+0x80> <== NOT EXECUTED
30003854: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
30003858: e3520000 cmp r2, #0 <== NOT EXECUTED
3000385c: 0a00002f beq 30003920 <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
30003860: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
30003864: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
30003868: 0a000028 beq 30003910 <oproc+0x130> <== NOT EXECUTED
c = '\n';
3000386c: e3a0200a mov r2, #10 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
30003870: e3130020 tst r3, #32 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
30003874: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
30003878: 0a000024 beq 30003910 <oproc+0x130> <== NOT EXECUTED
tty->column = 0;
3000387c: e3a03000 mov r3, #0
30003880: ea000021 b 3000390c <oproc+0x12c>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003884: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003888: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3000388c: e2021007 and r1, r2, #7
30003890: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003894: e3530b06 cmp r3, #6144 ; 0x1800
30003898: e0813002 add r3, r1, r2
tty->column += i;
3000389c: 05843028 streq r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
300038a0: 059f0080 ldreq r0, [pc, #128] ; 30003928 <oproc+0x148>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
300038a4: 1a000018 bne 3000390c <oproc+0x12c>
300038a8: ea00001a b 30003918 <oproc+0x138>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
300038ac: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
300038b0: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
300038b4: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
300038b8: ca000013 bgt 3000390c <oproc+0x12c> <== NOT EXECUTED
300038bc: ea000013 b 30003910 <oproc+0x130> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
300038c0: e3130002 tst r3, #2
300038c4: 0a000007 beq 300038e8 <oproc+0x108>
c = toupper(c);
300038c8: e59f305c ldr r3, [pc, #92] ; 3000392c <oproc+0x14c> <== NOT EXECUTED
300038cc: e5933000 ldr r3, [r3] <== NOT EXECUTED
300038d0: e0833002 add r3, r3, r2 <== NOT EXECUTED
300038d4: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
300038d8: e2033003 and r3, r3, #3 <== NOT EXECUTED
300038dc: e3530002 cmp r3, #2 <== NOT EXECUTED
300038e0: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
300038e4: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
300038e8: e59f203c ldr r2, [pc, #60] ; 3000392c <oproc+0x14c>
300038ec: e5dd3000 ldrb r3, [sp]
300038f0: e5922000 ldr r2, [r2]
300038f4: e0823003 add r3, r2, r3
300038f8: e5d33001 ldrb r3, [r3, #1]
300038fc: e3130020 tst r3, #32
30003900: 1a000002 bne 30003910 <oproc+0x130>
tty->column++;
30003904: e5943028 ldr r3, [r4, #40] ; 0x28
30003908: e2833001 add r3, r3, #1
3000390c: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
30003910: e1a0000d mov r0, sp
30003914: e3a01001 mov r1, #1
30003918: e1a02004 mov r2, r4
3000391c: ebffff6f bl 300036e0 <rtems_termios_puts>
}
30003920: e8bd8018 pop {r3, r4, pc}
3000b21c <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000b21c: e59f3058 ldr r3, [pc, #88] ; 3000b27c <pipe_ioctl+0x60>
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000b220: e92d4070 push {r4, r5, r6, lr}
if (cmd == FIONREAD) {
3000b224: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000b228: e1a04000 mov r4, r0
3000b22c: e1a05002 mov r5, r2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
3000b230: 13e00015 mvnne r0, #21
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000b234: 18bd8070 popne {r4, r5, r6, pc}
if (buffer == NULL)
3000b238: e3520000 cmp r2, #0
return -EFAULT;
3000b23c: 03e0000d mvneq r0, #13
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
3000b240: 08bd8070 popeq {r4, r5, r6, pc}
return -EFAULT;
if (! PIPE_LOCK(pipe))
3000b244: e3a01000 mov r1, #0
3000b248: e5940028 ldr r0, [r4, #40] ; 0x28
3000b24c: e1a02001 mov r2, r1
3000b250: ebffeced bl 3000660c <rtems_semaphore_obtain>
3000b254: e2506000 subs r6, r0, #0
3000b258: 1a000005 bne 3000b274 <pipe_ioctl+0x58>
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000b25c: e594300c ldr r3, [r4, #12]
PIPE_UNLOCK(pipe);
3000b260: e5940028 ldr r0, [r4, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000b264: e5853000 str r3, [r5]
PIPE_UNLOCK(pipe);
3000b268: ebffed2d bl 30006724 <rtems_semaphore_release>
return 0;
3000b26c: e1a00006 mov r0, r6
3000b270: e8bd8070 pop {r4, r5, r6, pc}
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
return -EINTR;
3000b274: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
3000b278: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
3000af04 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000af04: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000af08: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000af0c: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000af10: e1a04000 mov r4, r0
3000af14: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000af18: e5900028 ldr r0, [r0, #40] ; 0x28
3000af1c: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000af20: e1a0a003 mov sl, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000af24: ebffedb8 bl 3000660c <rtems_semaphore_obtain>
3000af28: e2506000 subs r6, r0, #0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000af2c: 01a0b00d moveq fp, sp
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000af30: 0a000043 beq 3000b044 <pipe_read+0x140>
3000af34: ea00004e b 3000b074 <pipe_read+0x170> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
3000af38: e5947014 ldr r7, [r4, #20]
3000af3c: e3570000 cmp r7, #0
3000af40: 0a000044 beq 3000b058 <pipe_read+0x154>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
3000af44: e59a8014 ldr r8, [sl, #20]
3000af48: e2188001 ands r8, r8, #1
3000af4c: 1a000040 bne 3000b054 <pipe_read+0x150>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000af50: e5943018 ldr r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000af54: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000af58: e2833001 add r3, r3, #1
3000af5c: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000af60: ebffedef bl 30006724 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000af64: e1a01008 mov r1, r8
3000af68: e594002c ldr r0, [r4, #44] ; 0x2c
3000af6c: eb0003fa bl 3000bf5c <rtems_barrier_wait>
3000af70: e3500000 cmp r0, #0
3000af74: 01a07000 moveq r7, r0
3000af78: 13e07003 mvnne r7, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000af7c: e1a01008 mov r1, r8
3000af80: e5940028 ldr r0, [r4, #40] ; 0x28
3000af84: e1a02008 mov r2, r8
3000af88: ebffed9f bl 3000660c <rtems_semaphore_obtain>
3000af8c: e3500000 cmp r0, #0
3000af90: 1a000033 bne 3000b064 <pipe_read+0x160>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000af94: e5943018 ldr r3, [r4, #24]
if (ret != 0)
3000af98: e3570000 cmp r7, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000af9c: e2433001 sub r3, r3, #1
3000afa0: e5843018 str r3, [r4, #24]
if (ret != 0)
3000afa4: 1a00002b bne 3000b058 <pipe_read+0x154>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
3000afa8: e594300c ldr r3, [r4, #12]
3000afac: e3530000 cmp r3, #0
3000afb0: 0affffe0 beq 3000af38 <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
3000afb4: e0667005 rsb r7, r6, r5
3000afb8: e1530007 cmp r3, r7
3000afbc: 31a07003 movcc r7, r3
chunk1 = pipe->Size - pipe->Start;
3000afc0: e5948004 ldr r8, [r4, #4]
3000afc4: e5943008 ldr r3, [r4, #8]
3000afc8: e5941000 ldr r1, [r4]
3000afcc: e0638008 rsb r8, r3, r8
if (chunk > chunk1) {
3000afd0: e1570008 cmp r7, r8
3000afd4: e0890006 add r0, r9, r6
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);
3000afd8: d0811003 addle r1, r1, r3
3000afdc: d1a02007 movle r2, r7
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
3000afe0: da000006 ble 3000b000 <pipe_read+0xfc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
3000afe4: e0811003 add r1, r1, r3
3000afe8: e1a02008 mov r2, r8
3000afec: eb000b0a bl 3000dc1c <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
3000aff0: e0860008 add r0, r6, r8
3000aff4: e5941000 ldr r1, [r4]
3000aff8: e0890000 add r0, r9, r0
3000affc: e0682007 rsb r2, r8, r7
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
3000b000: eb000b05 bl 3000dc1c <memcpy>
pipe->Start += chunk;
3000b004: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
3000b008: e5941004 ldr r1, [r4, #4]
3000b00c: e0870000 add r0, r7, r0
3000b010: eb002eb3 bl 30016ae4 <__umodsi3>
pipe->Length -= chunk;
3000b014: e594300c ldr r3, [r4, #12]
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
3000b018: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
3000b01c: e0673003 rsb r3, r7, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
3000b020: e3530000 cmp r3, #0
pipe->Start = 0;
3000b024: 05843008 streq r3, [r4, #8]
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
3000b028: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
3000b02c: e594301c ldr r3, [r4, #28]
3000b030: e3530000 cmp r3, #0
PIPE_WAKEUPWRITERS(pipe);
3000b034: 15940030 ldrne r0, [r4, #48] ; 0x30
3000b038: 11a0100d movne r1, sp
3000b03c: 1b0003b0 blne 3000bf04 <rtems_barrier_release>
read += chunk;
3000b040: e0866007 add r6, r6, r7
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
3000b044: e1560005 cmp r6, r5
3000b048: 3affffd6 bcc 3000afa8 <pipe_read+0xa4>
3000b04c: e3a07000 mov r7, #0
3000b050: ea000000 b 3000b058 <pipe_read+0x154>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000b054: e3e0700a mvn r7, #10
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
3000b058: e5940028 ldr r0, [r4, #40] ; 0x28
3000b05c: ebffedb0 bl 30006724 <rtems_semaphore_release>
3000b060: ea000000 b 3000b068 <pipe_read+0x164>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
3000b064: e3e07003 mvn r7, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
3000b068: e3560000 cmp r6, #0
3000b06c: d1a06007 movle r6, r7
3000b070: ea000000 b 3000b078 <pipe_read+0x174>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
3000b074: e3e06003 mvn r6, #3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
3000b078: e1a00006 mov r0, r6
3000b07c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000ab0c <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000ab0c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
3000ab10: e1a06001 mov r6, r1
3000ab14: e1a05000 mov r5, r0
pipe_control_t *pipe = *pipep;
3000ab18: e5904000 ldr r4, [r0]
uint32_t mode;
if (pipe_lock())
3000ab1c: ebffffbf bl 3000aa20 <pipe_lock>
3000ab20: e2501000 subs r1, r0, #0
3000ab24: 1a000004 bne 3000ab3c <pipe_release+0x30>
/* WARN pipe not freed and pipep not set to NULL! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
3000ab28: e5940028 ldr r0, [r4, #40] ; 0x28
3000ab2c: e1a02001 mov r2, r1
3000ab30: ebffeeb5 bl 3000660c <rtems_semaphore_obtain>
3000ab34: e3500000 cmp r0, #0
3000ab38: 0a000001 beq 3000ab44 <pipe_release+0x38>
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
3000ab3c: e59f00a8 ldr r0, [pc, #168] ; 3000abec <pipe_release+0xe0> <== NOT EXECUTED
3000ab40: ebfff02f bl 30006c04 <rtems_fatal_error_occurred> <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
3000ab44: e5963014 ldr r3, [r6, #20]
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
3000ab48: e5940028 ldr r0, [r4, #40] ; 0x28
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
3000ab4c: e3130002 tst r3, #2
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
3000ab50: e2036006 and r6, r3, #6
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
3000ab54: 15943010 ldrne r3, [r4, #16]
3000ab58: 12433001 subne r3, r3, #1
3000ab5c: 15843010 strne r3, [r4, #16]
if (mode & LIBIO_FLAGS_WRITE)
3000ab60: e3160004 tst r6, #4
pipe->Writers --;
3000ab64: 15943014 ldrne r3, [r4, #20]
3000ab68: 12433001 subne r3, r3, #1
3000ab6c: 15843014 strne r3, [r4, #20]
PIPE_UNLOCK(pipe);
3000ab70: ebffeeeb bl 30006724 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
3000ab74: e5943010 ldr r3, [r4, #16]
3000ab78: e3530000 cmp r3, #0
3000ab7c: 1a000006 bne 3000ab9c <pipe_release+0x90>
3000ab80: e5947014 ldr r7, [r4, #20]
3000ab84: e3570000 cmp r7, #0
3000ab88: 1a000003 bne 3000ab9c <pipe_release+0x90>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
3000ab8c: e1a00004 mov r0, r4
3000ab90: ebffffc6 bl 3000aab0 <pipe_free>
*pipep = NULL;
3000ab94: e5857000 str r7, [r5]
3000ab98: ea000010 b 3000abe0 <pipe_release+0xd4>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
3000ab9c: e2562004 subs r2, r6, #4
3000aba0: 13a02001 movne r2, #1
3000aba4: e3530000 cmp r3, #0
3000aba8: 13a02000 movne r2, #0
3000abac: e3520000 cmp r2, #0
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
3000abb0: 15940030 ldrne r0, [r4, #48] ; 0x30
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
3000abb4: 1a000007 bne 3000abd8 <pipe_release+0xcc>
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
3000abb8: e5943014 ldr r3, [r4, #20]
3000abbc: e2566002 subs r6, r6, #2
3000abc0: 13a06001 movne r6, #1
3000abc4: e3530000 cmp r3, #0
3000abc8: 13a06000 movne r6, #0
3000abcc: e3560000 cmp r6, #0
3000abd0: 0a000002 beq 3000abe0 <pipe_release+0xd4>
PIPE_WAKEUPREADERS(pipe);
3000abd4: e594002c ldr r0, [r4, #44] ; 0x2c
3000abd8: e1a0100d mov r1, sp
3000abdc: eb0004c8 bl 3000bf04 <rtems_barrier_release>
pipe_unlock();
3000abe0: ebffffbf bl 3000aae4 <pipe_unlock>
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
3000abe4: e3a00000 mov r0, #0
3000abe8: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
3000aae4 <pipe_unlock>:
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
3000aae4: e59f3018 ldr r3, [pc, #24] ; 3000ab04 <pipe_unlock+0x20>
return -ENOMEM;
}
}
static void pipe_unlock(void)
{
3000aae8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
3000aaec: e5930000 ldr r0, [r3]
3000aaf0: ebffef0b bl 30006724 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
3000aaf4: e3500000 cmp r0, #0
3000aaf8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
3000aafc: e59f0004 ldr r0, [pc, #4] ; 3000ab08 <pipe_unlock+0x24> <== NOT EXECUTED
3000ab00: ebfff03f bl 30006c04 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000b080 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b080: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000b084: e2527000 subs r7, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b088: e1a04000 mov r4, r0
3000b08c: e1a0b001 mov fp, r1
3000b090: e1a08003 mov r8, r3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
3000b094: 01a05007 moveq r5, r7
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000b098: 0a00005d beq 3000b214 <pipe_write+0x194>
return 0;
if (! PIPE_LOCK(pipe))
3000b09c: e3a01000 mov r1, #0
3000b0a0: e5900028 ldr r0, [r0, #40] ; 0x28
3000b0a4: e1a02001 mov r2, r1
3000b0a8: ebffed57 bl 3000660c <rtems_semaphore_obtain>
3000b0ac: e3500000 cmp r0, #0
return -EINTR;
3000b0b0: 13e05003 mvnne r5, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000b0b4: 1a000056 bne 3000b214 <pipe_write+0x194>
return -EINTR;
if (pipe->Readers == 0) {
3000b0b8: e5945010 ldr r5, [r4, #16]
3000b0bc: e3550000 cmp r5, #0
3000b0c0: 0a00004c beq 3000b1f8 <pipe_write+0x178>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
3000b0c4: e5949004 ldr r9, [r4, #4]
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
3000b0c8: e1a05000 mov r5, r0
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
3000b0cc: e1570009 cmp r7, r9
3000b0d0: 91a09007 movls r9, r7
3000b0d4: 83a09001 movhi r9, #1
3000b0d8: ea000040 b 3000b1e0 <pipe_write+0x160>
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
3000b0dc: e598a014 ldr sl, [r8, #20]
3000b0e0: e21aa001 ands sl, sl, #1
3000b0e4: 1a000041 bne 3000b1f0 <pipe_write+0x170>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000b0e8: e594301c ldr r3, [r4, #28]
PIPE_UNLOCK(pipe);
3000b0ec: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000b0f0: e2833001 add r3, r3, #1
3000b0f4: e584301c str r3, [r4, #28]
PIPE_UNLOCK(pipe);
3000b0f8: ebffed89 bl 30006724 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000b0fc: e1a0100a mov r1, sl
3000b100: e5940030 ldr r0, [r4, #48] ; 0x30
3000b104: eb000394 bl 3000bf5c <rtems_barrier_wait>
3000b108: e3500000 cmp r0, #0
3000b10c: 01a06000 moveq r6, r0
3000b110: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000b114: e1a0100a mov r1, sl
3000b118: e5940028 ldr r0, [r4, #40] ; 0x28
3000b11c: e1a0200a mov r2, sl
3000b120: ebffed39 bl 3000660c <rtems_semaphore_obtain>
3000b124: e3500000 cmp r0, #0
3000b128: 1a000036 bne 3000b208 <pipe_write+0x188>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000b12c: e594301c ldr r3, [r4, #28]
if (ret != 0)
3000b130: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000b134: e2433001 sub r3, r3, #1
3000b138: e584301c str r3, [r4, #28]
if (ret != 0)
3000b13c: 1a00002e bne 3000b1fc <pipe_write+0x17c>
goto out_locked;
if (pipe->Readers == 0) {
3000b140: e5943010 ldr r3, [r4, #16]
3000b144: e3530000 cmp r3, #0
3000b148: 0a00002a beq 3000b1f8 <pipe_write+0x178>
/* 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) {
3000b14c: e594a004 ldr sl, [r4, #4]
3000b150: e594300c ldr r3, [r4, #12]
3000b154: e063200a rsb r2, r3, sl
3000b158: e1520009 cmp r2, r9
3000b15c: 3affffde bcc 3000b0dc <pipe_write+0x5c>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000b160: e5940008 ldr r0, [r4, #8]
3000b164: e1a0100a mov r1, sl
3000b168: e0830000 add r0, r3, r0
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000b16c: e0656007 rsb r6, r5, r7
3000b170: e1520006 cmp r2, r6
3000b174: 31a06002 movcc r6, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000b178: eb002e59 bl 30016ae4 <__umodsi3>
3000b17c: e5943000 ldr r3, [r4]
3000b180: e060a00a rsb sl, r0, sl
if (chunk > chunk1) {
3000b184: e156000a cmp r6, sl
3000b188: e08b1005 add r1, fp, r5
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);
3000b18c: d0830000 addle r0, r3, r0
3000b190: d1a02006 movle r2, r6
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
3000b194: da000006 ble 3000b1b4 <pipe_write+0x134>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
3000b198: e1a0200a mov r2, sl
3000b19c: e0830000 add r0, r3, r0
3000b1a0: eb000a9d bl 3000dc1c <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
3000b1a4: e08a1005 add r1, sl, r5
3000b1a8: e5940000 ldr r0, [r4]
3000b1ac: e08b1001 add r1, fp, r1
3000b1b0: e06a2006 rsb r2, sl, r6
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
3000b1b4: eb000a98 bl 3000dc1c <memcpy>
pipe->Length += chunk;
3000b1b8: e594300c ldr r3, [r4, #12]
3000b1bc: e0833006 add r3, r3, r6
3000b1c0: e584300c str r3, [r4, #12]
if (pipe->waitingReaders > 0)
3000b1c4: e5943018 ldr r3, [r4, #24]
3000b1c8: e3530000 cmp r3, #0
PIPE_WAKEUPREADERS(pipe);
3000b1cc: 1594002c ldrne r0, [r4, #44] ; 0x2c
3000b1d0: 11a0100d movne r1, sp
3000b1d4: 1b00034a blne 3000bf04 <rtems_barrier_release>
written += chunk;
3000b1d8: e0855006 add r5, r5, r6
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
3000b1dc: e3a09001 mov r9, #1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000b1e0: e1550007 cmp r5, r7
3000b1e4: 3affffd8 bcc 3000b14c <pipe_write+0xcc>
3000b1e8: e3a06000 mov r6, #0
3000b1ec: ea000002 b 3000b1fc <pipe_write+0x17c>
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000b1f0: e3e0600a mvn r6, #10
3000b1f4: ea000000 b 3000b1fc <pipe_write+0x17c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
3000b1f8: e3e0601f mvn r6, #31
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
3000b1fc: e5940028 ldr r0, [r4, #40] ; 0x28
3000b200: ebffed47 bl 30006724 <rtems_semaphore_release>
3000b204: ea000000 b 3000b20c <pipe_write+0x18c>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
3000b208: e3e06003 mvn r6, #3 <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
return written;
return ret;
3000b20c: e3550000 cmp r5, #0
3000b210: d1a05006 movle r5, r6
}
3000b214: e1a00005 mov r0, r5
3000b218: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
30011734 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
30011734: e92d4030 push {r4, r5, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30011738: e59f4098 ldr r4, [pc, #152] ; 300117d8 <read+0xa4>
3001173c: e5944000 ldr r4, [r4]
30011740: e1500004 cmp r0, r4
30011744: 2a000006 bcs 30011764 <read+0x30>
iop = rtems_libio_iop( fd );
30011748: e59f408c ldr r4, [pc, #140] ; 300117dc <read+0xa8>
3001174c: e3a05038 mov r5, #56 ; 0x38
30011750: e5944000 ldr r4, [r4]
30011754: e0244095 mla r4, r5, r0, r4
rtems_libio_check_is_open( iop );
30011758: e5940014 ldr r0, [r4, #20]
3001175c: e3100c01 tst r0, #256 ; 0x100
30011760: 1a000002 bne 30011770 <read+0x3c>
30011764: ebffe99a bl 3000bdd4 <__errno>
30011768: e3a03009 mov r3, #9
3001176c: ea000007 b 30011790 <read+0x5c>
rtems_libio_check_buffer( buffer );
30011770: e3510000 cmp r1, #0
30011774: 0a000003 beq 30011788 <read+0x54>
rtems_libio_check_count( count );
30011778: e3520000 cmp r2, #0
3001177c: 0a000013 beq 300117d0 <read+0x9c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
30011780: e3100002 tst r0, #2
30011784: 1a000004 bne 3001179c <read+0x68>
30011788: ebffe991 bl 3000bdd4 <__errno> <== NOT EXECUTED
3001178c: e3a03016 mov r3, #22 <== NOT EXECUTED
30011790: e5803000 str r3, [r0]
30011794: e3e00000 mvn r0, #0
30011798: e8bd8030 pop {r4, r5, pc}
return 0;
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
3001179c: e5943020 ldr r3, [r4, #32]
300117a0: e1a00004 mov r0, r4
300117a4: e1a0e00f mov lr, pc
300117a8: e593f008 ldr pc, [r3, #8]
if ( rc > 0 )
300117ac: e3500000 cmp r0, #0
300117b0: d8bd8030 pople {r4, r5, pc}
iop->offset += rc;
300117b4: e284300c add r3, r4, #12
300117b8: e893000c ldm r3, {r2, r3}
300117bc: e0922000 adds r2, r2, r0
300117c0: e0a33fc0 adc r3, r3, r0, asr #31
300117c4: e584200c str r2, [r4, #12]
300117c8: e5843010 str r3, [r4, #16]
300117cc: e8bd8030 pop {r4, r5, pc}
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 );
300117d0: e1a00002 mov r0, r2 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
300117d4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
300051f8 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
300051f8: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
300051fc: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
30005200: e24dd018 sub sp, sp, #24
30005204: e1a07000 mov r7, r0
30005208: e1a05002 mov r5, r2
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
3000520c: 1a000002 bne 3000521c <readlink+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
30005210: eb0026b4 bl 3000ece8 <__errno> <== NOT EXECUTED
30005214: e3a0300e mov r3, #14 <== NOT EXECUTED
30005218: ea000013 b 3000526c <readlink+0x74> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
3000521c: eb002e36 bl 30010afc <strlen>
30005220: e28d4004 add r4, sp, #4
30005224: e1a01000 mov r1, r0
30005228: e3a02000 mov r2, #0
3000522c: e1a00007 mov r0, r7
30005230: e1a03004 mov r3, r4
30005234: e58d2000 str r2, [sp]
30005238: ebfffbb3 bl 3000410c <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
3000523c: e3500000 cmp r0, #0
30005240: 1a000015 bne 3000529c <readlink+0xa4>
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
30005244: e1a00004 mov r0, r4
30005248: e59d3010 ldr r3, [sp, #16]
3000524c: e1a0e00f mov lr, pc
30005250: e593f010 ldr pc, [r3, #16]
30005254: e3500004 cmp r0, #4
30005258: 0a000005 beq 30005274 <readlink+0x7c>
rtems_filesystem_freenode( &loc );
3000525c: e1a00004 mov r0, r4
30005260: ebfffbe4 bl 300041f8 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
30005264: eb00269f bl 3000ece8 <__errno>
30005268: e3a03016 mov r3, #22
3000526c: e5803000 str r3, [r0]
30005270: ea000009 b 3000529c <readlink+0xa4>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
30005274: e1a02005 mov r2, r5
30005278: e1a00004 mov r0, r4
3000527c: e1a01006 mov r1, r6
30005280: e59d3010 ldr r3, [sp, #16]
30005284: e1a0e00f mov lr, pc
30005288: e593f03c ldr pc, [r3, #60] ; 0x3c
3000528c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30005290: e1a00004 mov r0, r4
30005294: ebfffbd7 bl 300041f8 <rtems_filesystem_freenode>
return result;
30005298: ea000000 b 300052a0 <readlink+0xa8>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
3000529c: e3e05000 mvn r5, #0
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
300052a0: e1a00005 mov r0, r5
300052a4: e28dd018 add sp, sp, #24
300052a8: e8bd80f0 pop {r4, r5, r6, r7, pc}
30011838 <realloc>:
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30011838: e59f310c ldr r3, [pc, #268] ; 3001194c <realloc+0x114>
void *realloc(
void *ptr,
size_t size
)
{
3001183c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30011840: e5932010 ldr r2, [r3, #16]
void *realloc(
void *ptr,
size_t size
)
{
30011844: e1a04000 mov r4, r0
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30011848: e2822001 add r2, r2, #1
3001184c: e5832010 str r2, [r3, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30011850: e59f30f8 ldr r3, [pc, #248] ; 30011950 <realloc+0x118>
void *realloc(
void *ptr,
size_t size
)
{
30011854: e1a05001 mov r5, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30011858: e5933000 ldr r3, [r3]
3001185c: e3530003 cmp r3, #3
30011860: 1a000009 bne 3001188c <realloc+0x54>
if (_Thread_Dispatch_disable_level > 0)
30011864: e59f30e8 ldr r3, [pc, #232] ; 30011954 <realloc+0x11c>
30011868: e5933000 ldr r3, [r3]
3001186c: e3530000 cmp r3, #0
return (void *) 0;
30011870: 13a04000 movne r4, #0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
30011874: 1a000032 bne 30011944 <realloc+0x10c>
return (void *) 0;
if (_ISR_Nest_level > 0)
30011878: e59f20d8 ldr r2, [pc, #216] ; 30011958 <realloc+0x120>
3001187c: e5922000 ldr r2, [r2]
30011880: e3520000 cmp r2, #0
return (void *) 0;
30011884: 11a04003 movne r4, r3
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
30011888: 1a00002d bne 30011944 <realloc+0x10c>
}
/*
* Continue with realloc().
*/
if ( !ptr )
3001188c: e3540000 cmp r4, #0
30011890: 1a000003 bne 300118a4 <realloc+0x6c>
return malloc( size );
30011894: e1a00005 mov r0, r5
30011898: ebffc249 bl 300021c4 <malloc>
3001189c: e1a04000 mov r4, r0
300118a0: ea000027 b 30011944 <realloc+0x10c>
if ( !size ) {
300118a4: e3550000 cmp r5, #0
300118a8: 1a000003 bne 300118bc <realloc+0x84>
free( ptr );
300118ac: e1a00004 mov r0, r4 <== NOT EXECUTED
300118b0: ebffc174 bl 30001e88 <free> <== NOT EXECUTED
return (void *) 0;
300118b4: e1a04005 mov r4, r5 <== NOT EXECUTED
300118b8: ea000021 b 30011944 <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
300118bc: e59f6098 ldr r6, [pc, #152] ; 3001195c <realloc+0x124>
300118c0: e1a01004 mov r1, r4
300118c4: e5960000 ldr r0, [r6]
300118c8: e1a0200d mov r2, sp
300118cc: eb00004e bl 30011a0c <_Protected_heap_Get_block_size>
300118d0: e2507000 subs r7, r0, #0
300118d4: 1a000004 bne 300118ec <realloc+0xb4>
errno = EINVAL;
300118d8: ebffe93d bl 3000bdd4 <__errno>
300118dc: e3a03016 mov r3, #22
300118e0: e5803000 str r3, [r0]
return (void *) 0;
300118e4: e1a04007 mov r4, r7
300118e8: ea000015 b 30011944 <realloc+0x10c>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
300118ec: e5960000 ldr r0, [r6]
300118f0: e1a01004 mov r1, r4
300118f4: e1a02005 mov r2, r5
300118f8: eb000054 bl 30011a50 <_Protected_heap_Resize_block>
300118fc: e3500000 cmp r0, #0
30011900: 1a00000f bne 30011944 <realloc+0x10c>
* 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 );
30011904: e1a00005 mov r0, r5
30011908: ebffc22d bl 300021c4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
3001190c: e59f3038 ldr r3, [pc, #56] ; 3001194c <realloc+0x114>
if ( !new_area ) {
30011910: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
30011914: e5932004 ldr r2, [r3, #4]
30011918: e2422001 sub r2, r2, #1
3001191c: e5832004 str r2, [r3, #4]
if ( !new_area ) {
30011920: 0a000006 beq 30011940 <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
30011924: e59d2000 ldr r2, [sp]
30011928: e1a01004 mov r1, r4
3001192c: e1550002 cmp r5, r2
30011930: 31a02005 movcc r2, r5
30011934: ebffeb54 bl 3000c68c <memcpy>
free( ptr );
30011938: e1a00004 mov r0, r4
3001193c: ebffc151 bl 30001e88 <free>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
30011940: e1a04006 mov r4, r6
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
30011944: e1a00004 mov r0, r4
30011948: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
30003e34 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
30003e34: e92d40f0 push {r4, r5, r6, r7, lr}
30003e38: e24dd030 sub sp, sp, #48 ; 0x30
30003e3c: e1a06000 mov r6, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
30003e40: ebfffb54 bl 30002b98 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
30003e44: e2504000 subs r4, r0, #0
30003e48: e28d3018 add r3, sp, #24
30003e4c: 1a000005 bne 30003e68 <rmdir+0x34>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
30003e50: e1a00006 mov r0, r6
30003e54: e28d102c add r1, sp, #44 ; 0x2c
30003e58: e1a02003 mov r2, r3
30003e5c: eb000048 bl 30003f84 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
30003e60: e1a05004 mov r5, r4
30003e64: ea000008 b 30003e8c <rmdir+0x58>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
30003e68: e3a02000 mov r2, #0
30003e6c: e58d2000 str r2, [sp]
30003e70: e1a00006 mov r0, r6
30003e74: e1a01004 mov r1, r4
30003e78: e2822002 add r2, r2, #2
30003e7c: ebfffb27 bl 30002b20 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
30003e80: e3500000 cmp r0, #0
30003e84: 1a00003a bne 30003f74 <rmdir+0x140>
return -1;
free_parentloc = true;
30003e88: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30003e8c: e28dc004 add ip, sp, #4
30003e90: e28de018 add lr, sp, #24
30003e94: e8be000f ldm lr!, {r0, r1, r2, r3}
30003e98: e8ac000f stmia ip!, {r0, r1, r2, r3}
name = pathname + parentpathlen;
30003e9c: e0864004 add r4, r6, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30003ea0: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30003ea4: e1a00004 mov r0, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30003ea8: e58c3000 str r3, [ip]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30003eac: eb0027d0 bl 3000ddf4 <strlen>
30003eb0: e1a01000 mov r1, r0
30003eb4: e1a00004 mov r0, r4
30003eb8: ebfffb44 bl 30002bd0 <rtems_filesystem_prefix_separators>
30003ebc: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30003ec0: e1a00006 mov r0, r6
30003ec4: eb0027ca bl 3000ddf4 <strlen>
30003ec8: e28d4004 add r4, sp, #4
30003ecc: e1a01000 mov r1, r0
30003ed0: e3a02000 mov r2, #0
30003ed4: e1a00006 mov r0, r6
30003ed8: e1a03004 mov r3, r4
30003edc: e58d2000 str r2, [sp]
30003ee0: ebfffae6 bl 30002a80 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
30003ee4: e3500000 cmp r0, #0
30003ee8: 0a000004 beq 30003f00 <rmdir+0xcc>
if ( free_parentloc )
30003eec: e3550000 cmp r5, #0
30003ef0: 0a00001f beq 30003f74 <rmdir+0x140>
rtems_filesystem_freenode( &parentloc );
30003ef4: e28d0018 add r0, sp, #24 <== NOT EXECUTED
30003ef8: ebfffbd0 bl 30002e40 <rtems_filesystem_freenode> <== NOT EXECUTED
30003efc: ea00001c b 30003f74 <rmdir+0x140> <== NOT EXECUTED
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
30003f00: e1a00004 mov r0, r4
30003f04: e59d3010 ldr r3, [sp, #16]
30003f08: e1a0e00f mov lr, pc
30003f0c: e593f010 ldr pc, [r3, #16]
30003f10: e3500001 cmp r0, #1
30003f14: 0a000008 beq 30003f3c <rmdir+0x108>
rtems_filesystem_freenode( &loc );
30003f18: e1a00004 mov r0, r4
30003f1c: ebfffbc7 bl 30002e40 <rtems_filesystem_freenode>
if ( free_parentloc )
30003f20: e3550000 cmp r5, #0
rtems_filesystem_freenode( &parentloc );
30003f24: 128d0018 addne r0, sp, #24
30003f28: 1bfffbc4 blne 30002e40 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30003f2c: eb0023eb bl 3000cee0 <__errno>
30003f30: e3a03014 mov r3, #20
30003f34: e5803000 str r3, [r0]
30003f38: ea00000d b 30003f74 <rmdir+0x140>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
30003f3c: e28d6018 add r6, sp, #24
30003f40: e1a01004 mov r1, r4
30003f44: e59d300c ldr r3, [sp, #12]
30003f48: e1a00006 mov r0, r6
30003f4c: e1a0e00f mov lr, pc
30003f50: e593f034 ldr pc, [r3, #52] ; 0x34
30003f54: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30003f58: e1a00004 mov r0, r4
30003f5c: ebfffbb7 bl 30002e40 <rtems_filesystem_freenode>
if ( free_parentloc )
30003f60: e3550000 cmp r5, #0
30003f64: 0a000003 beq 30003f78 <rmdir+0x144>
rtems_filesystem_freenode( &parentloc );
30003f68: e1a00006 mov r0, r6
30003f6c: ebfffbb3 bl 30002e40 <rtems_filesystem_freenode>
30003f70: ea000000 b 30003f78 <rmdir+0x144>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
30003f74: e3e07000 mvn r7, #0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
30003f78: e1a00007 mov r0, r7
30003f7c: e28dd030 add sp, sp, #48 ; 0x30
30003f80: e8bd80f0 pop {r4, r5, r6, r7, pc}
30002450 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30002450: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
30002454: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30002458: e24dd040 sub sp, sp, #64 ; 0x40
3000245c: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
30002460: 0a000057 beq 300025c4 <rtems_cpu_usage_report_with_plugin+0x174>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
30002464: e28d5030 add r5, sp, #48 ; 0x30
30002468: e1a00005 mov r0, r5
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
3000246c: e28d4028 add r4, sp, #40 ; 0x28
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
30002470: eb001488 bl 30007698 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
30002474: e1a01005 mov r1, r5
30002478: e59f014c ldr r0, [pc, #332] ; 300025cc <rtems_cpu_usage_report_with_plugin+0x17c>
3000247c: e1a02004 mov r2, r4
30002480: eb001d3b bl 30009974 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
30002484: e1a00008 mov r0, r8
30002488: e59f1140 ldr r1, [pc, #320] ; 300025d0 <rtems_cpu_usage_report_with_plugin+0x180>
3000248c: e1a0e00f mov lr, pc
30002490: e12fff1a bx sl
30002494: e59f5138 ldr r5, [pc, #312] ; 300025d4 <rtems_cpu_usage_report_with_plugin+0x184>
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
30002498: e28db008 add fp, sp, #8
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
3000249c: e5b53004 ldr r3, [r5, #4]!
300024a0: e3530000 cmp r3, #0
300024a4: 0a00003a beq 30002594 <rtems_cpu_usage_report_with_plugin+0x144>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
300024a8: e5936004 ldr r6, [r3, #4]
if ( information ) {
300024ac: e3560000 cmp r6, #0
300024b0: 13a07001 movne r7, #1
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
300024b4: 128d9018 addne r9, sp, #24
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
300024b8: 1a000032 bne 30002588 <rtems_cpu_usage_report_with_plugin+0x138>
300024bc: ea000034 b 30002594 <rtems_cpu_usage_report_with_plugin+0x144><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
300024c0: e596301c ldr r3, [r6, #28]
300024c4: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
300024c8: e3540000 cmp r4, #0
300024cc: 0a00002c beq 30002584 <rtems_cpu_usage_report_with_plugin+0x134>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
300024d0: e3a0100d mov r1, #13
300024d4: e1a0200b mov r2, fp
300024d8: e5940008 ldr r0, [r4, #8]
300024dc: eb000fe3 bl 30006470 <rtems_object_get_name>
(*print)(
300024e0: e5942008 ldr r2, [r4, #8]
300024e4: e1a0300b mov r3, fp
300024e8: e1a00008 mov r0, r8
300024ec: e59f10e4 ldr r1, [pc, #228] ; 300025d8 <rtems_cpu_usage_report_with_plugin+0x188>
300024f0: e1a0e00f mov lr, pc
300024f4: e12fff1a bx sl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
300024f8: e2843084 add r3, r4, #132 ; 0x84
300024fc: e893000c ldm r3, {r2, r3}
30002500: e58d2020 str r2, [sp, #32]
30002504: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
30002508: e59f20cc ldr r2, [pc, #204] ; 300025dc <rtems_cpu_usage_report_with_plugin+0x18c>
3000250c: e5923004 ldr r3, [r2, #4]
30002510: e5932008 ldr r2, [r3, #8]
30002514: e5943008 ldr r3, [r4, #8]
30002518: e1520003 cmp r2, r3
3000251c: 1a000006 bne 3000253c <rtems_cpu_usage_report_with_plugin+0xec>
Timestamp_Control used;
_Timestamp_Subtract(
30002520: e59f00b8 ldr r0, [pc, #184] ; 300025e0 <rtems_cpu_usage_report_with_plugin+0x190>
30002524: e28d1030 add r1, sp, #48 ; 0x30
30002528: e1a02009 mov r2, r9
3000252c: eb001d10 bl 30009974 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
30002530: e28d0020 add r0, sp, #32
30002534: e1a01009 mov r1, r9
30002538: eb001cd2 bl 30009888 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
3000253c: e28d203c add r2, sp, #60 ; 0x3c
30002540: e28d3038 add r3, sp, #56 ; 0x38
30002544: e28d0020 add r0, sp, #32
30002548: e28d1028 add r1, sp, #40 ; 0x28
3000254c: eb001ce5 bl 300098e8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
30002550: e3a01ffa mov r1, #1000 ; 0x3e8
30002554: e59d0024 ldr r0, [sp, #36] ; 0x24
30002558: eb0051b6 bl 30016c38 <__aeabi_uidiv>
3000255c: e59d203c ldr r2, [sp, #60] ; 0x3c
30002560: e1a03000 mov r3, r0
30002564: e58d2000 str r2, [sp]
30002568: e59d2038 ldr r2, [sp, #56] ; 0x38
3000256c: e1a00008 mov r0, r8
30002570: e58d2004 str r2, [sp, #4]
30002574: e59f1068 ldr r1, [pc, #104] ; 300025e4 <rtems_cpu_usage_report_with_plugin+0x194>
30002578: e59d2020 ldr r2, [sp, #32]
3000257c: e1a0e00f mov lr, pc
30002580: e12fff1a bx sl
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
30002584: e2877001 add r7, r7, #1
30002588: e1d631b0 ldrh r3, [r6, #16]
3000258c: e1570003 cmp r7, r3
30002590: 9affffca bls 300024c0 <rtems_cpu_usage_report_with_plugin+0x70>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
30002594: e59f304c ldr r3, [pc, #76] ; 300025e8 <rtems_cpu_usage_report_with_plugin+0x198>
30002598: e1550003 cmp r5, r3
3000259c: 1affffbe bne 3000249c <rtems_cpu_usage_report_with_plugin+0x4c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
300025a0: e3a01ffa mov r1, #1000 ; 0x3e8
300025a4: e59d002c ldr r0, [sp, #44] ; 0x2c
300025a8: eb0051a2 bl 30016c38 <__aeabi_uidiv>
300025ac: e59f1038 ldr r1, [pc, #56] ; 300025ec <rtems_cpu_usage_report_with_plugin+0x19c>
300025b0: e1a03000 mov r3, r0
300025b4: e59d2028 ldr r2, [sp, #40] ; 0x28
300025b8: e1a00008 mov r0, r8
300025bc: e1a0e00f mov lr, pc
300025c0: e12fff1a bx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
300025c4: e28dd040 add sp, sp, #64 ; 0x40
300025c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000bd90 <rtems_deviceio_errno>:
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
3000bd90: e3500000 cmp r0, #0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
3000bd94: e92d4010 push {r4, lr}
if (sc == RTEMS_SUCCESSFUL) {
3000bd98: 08bd8010 popeq {r4, pc}
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
3000bd9c: e350001c cmp r0, #28 <== NOT EXECUTED
eno = status_code_to_errno [sc];
3000bda0: 959f3014 ldrls r3, [pc, #20] ; 3000bdbc <rtems_deviceio_errno+0x2c><== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
3000bda4: 83a04016 movhi r4, #22 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
3000bda8: 97934100 ldrls r4, [r3, r0, lsl #2] <== NOT EXECUTED
}
errno = eno;
3000bdac: eb000008 bl 3000bdd4 <__errno> <== NOT EXECUTED
3000bdb0: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
3000bdb4: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
}
3000bdb8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30001d88 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001d88: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
30001d8c: e1a06003 mov r6, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
30001d90: e2507000 subs r7, r0, #0
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
int i = 0;
30001d94: e3a03000 mov r3, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001d98: e1a05001 mov r5, r1
30001d9c: e1a04002 mov r4, r2
int i = 0;
30001da0: e58d3004 str r3, [sp, #4]
/*
* Verify Input parameters.
*/
if ( !pathname )
30001da4: 1a000002 bne 30001db4 <rtems_filesystem_evaluate_path+0x2c>
rtems_set_errno_and_return_minus_one( EFAULT );
30001da8: eb002809 bl 3000bdd4 <__errno> <== NOT EXECUTED
30001dac: e3a0300e mov r3, #14 <== NOT EXECUTED
30001db0: ea000003 b 30001dc4 <rtems_filesystem_evaluate_path+0x3c> <== NOT EXECUTED
if ( !pathloc )
30001db4: e3560000 cmp r6, #0
30001db8: 1a000004 bne 30001dd0 <rtems_filesystem_evaluate_path+0x48>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30001dbc: eb002804 bl 3000bdd4 <__errno> <== NOT EXECUTED
30001dc0: e3a03005 mov r3, #5 <== NOT EXECUTED
30001dc4: e5803000 str r3, [r0] <== NOT EXECUTED
30001dc8: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001dcc: ea00000a b 30001dfc <rtems_filesystem_evaluate_path+0x74> <== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
30001dd0: e28d1004 add r1, sp, #4
30001dd4: e1a02006 mov r2, r6
30001dd8: eb00038b bl 30002c0c <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
30001ddc: e59d1004 ldr r1, [sp, #4]
30001de0: e59d301c ldr r3, [sp, #28]
30001de4: e0870001 add r0, r7, r1
30001de8: e58d3000 str r3, [sp]
30001dec: e0611005 rsb r1, r1, r5
30001df0: e1a02004 mov r2, r4
30001df4: e1a03006 mov r3, r6
30001df8: ebffffba bl 30001ce8 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
30001dfc: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc}
30001ce8 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
30001ce8: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001cec: e92d4030 push {r4, r5, lr}
30001cf0: e1a05002 mov r5, r2
30001cf4: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
30001cf8: 1a000002 bne 30001d08 <rtems_filesystem_evaluate_relative_path+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
30001cfc: eb002834 bl 3000bdd4 <__errno> <== NOT EXECUTED
30001d00: e3a0300e mov r3, #14 <== NOT EXECUTED
30001d04: ea000003 b 30001d18 <rtems_filesystem_evaluate_relative_path+0x30><== NOT EXECUTED
if ( !pathloc )
30001d08: e3530000 cmp r3, #0
30001d0c: 1a000004 bne 30001d24 <rtems_filesystem_evaluate_relative_path+0x3c>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30001d10: eb00282f bl 3000bdd4 <__errno> <== NOT EXECUTED
30001d14: e3a03005 mov r3, #5 <== NOT EXECUTED
30001d18: e5803000 str r3, [r0] <== NOT EXECUTED
30001d1c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001d20: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
30001d24: e593c00c ldr ip, [r3, #12]
30001d28: e1a0e00f mov lr, pc
30001d2c: e59cf000 ldr pc, [ip]
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
30001d30: e59d200c ldr r2, [sp, #12]
30001d34: e2703001 rsbs r3, r0, #1
30001d38: 33a03000 movcc r3, #0
30001d3c: e3520000 cmp r2, #0
30001d40: 03a03000 moveq r3, #0
30001d44: e3530000 cmp r3, #0
30001d48: 08bd8030 popeq {r4, r5, pc}
type = (*pathloc->ops->node_type_h)( pathloc );
30001d4c: e594300c ldr r3, [r4, #12]
30001d50: e1a00004 mov r0, r4
30001d54: e1a0e00f mov lr, pc
30001d58: e593f010 ldr pc, [r3, #16]
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
30001d5c: e2400003 sub r0, r0, #3
30001d60: e3500001 cmp r0, #1
30001d64: 8a000005 bhi 30001d80 <rtems_filesystem_evaluate_relative_path+0x98>
* 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 );
30001d68: e594300c ldr r3, [r4, #12]
30001d6c: e1a00004 mov r0, r4
30001d70: e1a01005 mov r1, r5
30001d74: e1a0e00f mov lr, pc
30001d78: e593f034 ldr pc, [r3, #52] ; 0x34
30001d7c: e8bd8030 pop {r4, r5, pc}
if ( (result == 0) && follow_link ) {
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
30001d80: e3a00000 mov r0, #0
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
30001d84: e8bd8030 pop {r4, r5, pc}
30001b8c <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 )
{
30001b8c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001b90: e59f60e0 ldr r6, [pc, #224] ; 30001c78 <rtems_filesystem_initialize+0xec>
30001b94: e3a02012 mov r2, #18
30001b98: e5963000 ldr r3, [r6]
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
30001b9c: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001ba0: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001ba4: e59f30d0 ldr r3, [pc, #208] ; 30001c7c <rtems_filesystem_initialize+0xf0>
30001ba8: e5933000 ldr r3, [r3]
30001bac: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
30001bb0: 059f00c8 ldreq r0, [pc, #200] ; 30001c80 <rtems_filesystem_initialize+0xf4>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001bb4: 0a00000a beq 30001be4 <rtems_filesystem_initialize+0x58>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001bb8: e59f30c4 ldr r3, [pc, #196] ; 30001c84 <rtems_filesystem_initialize+0xf8>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001bbc: e3a05000 mov r5, #0
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001bc0: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001bc4: e58d5000 str r5, [sp]
30001bc8: e5930008 ldr r0, [r3, #8]
30001bcc: e593100c ldr r1, [r3, #12]
30001bd0: e893000c ldm r3, {r2, r3}
30001bd4: eb000208 bl 300023fc <mount>
if ( status == -1 )
30001bd8: e3700001 cmn r0, #1
30001bdc: 1a000001 bne 30001be8 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0002 );
30001be0: e59f00a0 ldr r0, [pc, #160] ; 30001c88 <rtems_filesystem_initialize+0xfc><== NOT EXECUTED
30001be4: eb000ead bl 300056a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
30001be8: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bec: e28d4004 add r4, sp, #4
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;
30001bf0: e1c353b0 strh r5, [r3, #48] ; 0x30
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bf4: e3a01001 mov r1, #1
30001bf8: e1a03004 mov r3, r4
30001bfc: e1a02005 mov r2, r5
30001c00: e59f0084 ldr r0, [pc, #132] ; 30001c8c <rtems_filesystem_initialize+0x100>
30001c04: e58d5000 str r5, [sp]
30001c08: eb00005e bl 30001d88 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30001c0c: e596c000 ldr ip, [r6]
30001c10: e1a07004 mov r7, r4
30001c14: e28cc018 add ip, ip, #24
30001c18: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001c1c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001c20: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001c24: e3a01001 mov r1, #1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
30001c28: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001c2c: e1a02005 mov r2, r5
30001c30: e1a03004 mov r3, r4
30001c34: e59f0050 ldr r0, [pc, #80] ; 30001c8c <rtems_filesystem_initialize+0x100>
30001c38: e58d5000 str r5, [sp]
30001c3c: eb000051 bl 30001d88 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30001c40: e8b4000f ldm r4!, {r0, r1, r2, r3}
30001c44: e596c000 ldr ip, [r6]
30001c48: e28cc004 add ip, ip, #4
30001c4c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001c50: e5973000 ldr r3, [r7]
*
* 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);
30001c54: e59f0034 ldr r0, [pc, #52] ; 30001c90 <rtems_filesystem_initialize+0x104>
/* 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;
30001c58: e58c3000 str r3, [ip]
*
* 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);
30001c5c: e59f1030 ldr r1, [pc, #48] ; 30001c94 <rtems_filesystem_initialize+0x108>
30001c60: eb000193 bl 300022b4 <mkdir>
if ( status != 0 )
30001c64: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
30001c68: 159f0028 ldrne r0, [pc, #40] ; 30001c98 <rtems_filesystem_initialize+0x10c>
* 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);
if ( status != 0 )
30001c6c: 1affffdc bne 30001be4 <rtems_filesystem_initialize+0x58>
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
30001c70: e28dd018 add sp, sp, #24
30001c74: e8bd80f0 pop {r4, r5, r6, r7, pc}
30009800 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
30009800: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30009804: e1a06000 mov r6, r0
30009808: e1a07001 mov r7, r1
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
3000980c: e3a00000 mov r0, #0
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
30009810: e59f4078 ldr r4, [pc, #120] ; 30009890 <rtems_filesystem_iterate+0x90>
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
30009814: ea000004 b 3000982c <rtems_filesystem_iterate+0x2c>
stop = (*routine)( table_entry, routine_arg );
30009818: e1a00004 mov r0, r4
3000981c: e1a01007 mov r1, r7
30009820: e1a0e00f mov lr, pc
30009824: e12fff16 bx r6
++table_entry;
30009828: e2844008 add r4, r4, #8
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000982c: e5943000 ldr r3, [r4]
30009830: e3530000 cmp r3, #0
30009834: 0a000002 beq 30009844 <rtems_filesystem_iterate+0x44>
30009838: e3500000 cmp r0, #0
3000983c: 0afffff5 beq 30009818 <rtems_filesystem_iterate+0x18>
30009840: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
30009844: e2508000 subs r8, r0, #0
30009848: 18bd81f0 popne {r4, r5, r6, r7, r8, pc}
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
3000984c: e59f5040 ldr r5, [pc, #64] ; 30009894 <rtems_filesystem_iterate+0x94>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
30009850: ebffffe0 bl 300097d8 <rtems_libio_lock>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
30009854: e4954004 ldr r4, [r5], #4
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
30009858: ea000005 b 30009874 <rtems_filesystem_iterate+0x74>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
3000985c: e2840008 add r0, r4, #8
30009860: e1a01007 mov r1, r7
30009864: e1a0e00f mov lr, pc
30009868: e12fff16 bx r6
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
3000986c: e5944000 ldr r4, [r4]
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
30009870: e1a08000 mov r8, r0
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
30009874: e1540005 cmp r4, r5
30009878: 0a000001 beq 30009884 <rtems_filesystem_iterate+0x84>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
3000987c: e3580000 cmp r8, #0
30009880: 0afffff5 beq 3000985c <rtems_filesystem_iterate+0x5c>
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
30009884: ebffffd9 bl 300097f0 <rtems_libio_unlock>
30009888: e1a00008 mov r0, r8
}
return stop;
}
3000988c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002778 <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
30002778: e92d4031 push {r0, r4, r5, lr}
3000277c: e1a04000 mov r4, r0
rtems_status_code status;
void *p= 0;
30002780: e3a05000 mov r5, #0
30002784: e28d2004 add r2, sp, #4
30002788: e5225004 str r5, [r2, #-4]!
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
3000278c: e1a00005 mov r0, r5
30002790: e1a01004 mov r1, r4
30002794: e1a0200d mov r2, sp
30002798: eb000e2e bl 30006058 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
3000279c: e1500005 cmp r0, r5
/* We do not have to do this, but what the heck ! */
p= key->val;
300027a0: 05943000 ldreq r3, [r4]
300027a4: 058d3000 streq r3, [sp]
rtems_status_code status;
void *p= 0;
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
if ( status == RTEMS_SUCCESSFUL ) {
300027a8: 0a000007 beq 300027cc <rtems_gxx_getspecific+0x54>
p= key->val;
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
300027ac: e1a00005 mov r0, r5 <== NOT EXECUTED
300027b0: e1a01004 mov r1, r4 <== NOT EXECUTED
300027b4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
300027b8: eb000dde bl 30005f38 <rtems_task_variable_add> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL ) {
300027bc: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_panic ("rtems_gxx_getspecific");
}
key->val = (void *)0;
300027c0: 05840000 streq r0, [r4] <== NOT EXECUTED
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
rtems_panic ("rtems_gxx_getspecific");
300027c4: 159f0008 ldrne r0, [pc, #8] ; 300027d4 <rtems_gxx_getspecific+0x5c><== NOT EXECUTED
300027c8: 1b001e88 blne 3000a1f0 <rtems_panic> <== NOT EXECUTED
p,
rtems_task_self()
);
#endif
return p;
}
300027cc: e59d0000 ldr r0, [sp]
300027d0: e8bd8038 pop {r3, r4, r5, pc}
30002738 <rtems_gxx_key_dtor>:
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
30002738: e3a03000 mov r3, #0 <== NOT EXECUTED
3000273c: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
}
30002740: e1a00003 mov r0, r3 <== NOT EXECUTED
30002744: e12fff1e bx lr <== NOT EXECUTED
30002858 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
30002858: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
3000285c: e5900000 ldr r0, [r0] <== NOT EXECUTED
30002860: eb000c1a bl 300058d0 <rtems_semaphore_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
30002864: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
return -1;
}
30002868: 13e00000 mvnne r0, #0 <== NOT EXECUTED
3000286c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30003260 <rtems_libio_set_private_env>:
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
30003260: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
30003264: e3a00000 mov r0, #0
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
30003268: e24dd01c sub sp, sp, #28
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
3000326c: e1a01000 mov r1, r0
30003270: e28d2018 add r2, sp, #24
30003274: eb000a7d bl 30005c70 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
30003278: e2508000 subs r8, r0, #0
3000327c: 1a000037 bne 30003360 <rtems_libio_set_private_env+0x100>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
30003280: e59f40e4 ldr r4, [pc, #228] ; 3000336c <rtems_libio_set_private_env+0x10c>
30003284: e59f30e4 ldr r3, [pc, #228] ; 30003370 <rtems_libio_set_private_env+0x110>
30003288: e5942000 ldr r2, [r4]
3000328c: e1520003 cmp r2, r3
30003290: 1a00000f bne 300032d4 <rtems_libio_set_private_env+0x74>
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
30003294: e2800048 add r0, r0, #72 ; 0x48
30003298: ebfffd51 bl 300027e4 <malloc>
if (!tmp)
3000329c: e2505000 subs r5, r0, #0
return RTEMS_NO_MEMORY;
300032a0: 03a0801a moveq r8, #26
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
if (!tmp)
300032a4: 0a00002d beq 30003360 <rtems_libio_set_private_env+0x100>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
300032a8: e1a00008 mov r0, r8
300032ac: e1a01004 mov r1, r4
300032b0: e59f20bc ldr r2, [pc, #188] ; 30003374 <rtems_libio_set_private_env+0x114>
300032b4: eb000abd bl 30005db0 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
300032b8: e2506000 subs r6, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
300032bc: 05845000 streq r5, [r4]
sc = rtems_task_variable_add(
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
300032c0: 0a000003 beq 300032d4 <rtems_libio_set_private_env+0x74>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
300032c4: e1a00005 mov r0, r5 <== NOT EXECUTED
300032c8: ebfffbdf bl 3000224c <free> <== NOT EXECUTED
return sc;
300032cc: e1a08006 mov r8, r6 <== NOT EXECUTED
300032d0: ea000022 b 30003360 <rtems_libio_set_private_env+0x100> <== NOT EXECUTED
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
300032d4: e59f6090 ldr r6, [pc, #144] ; 3000336c <rtems_libio_set_private_env+0x10c>
300032d8: e59f1090 ldr r1, [pc, #144] ; 30003370 <rtems_libio_set_private_env+0x110>
300032dc: e5964000 ldr r4, [r6]
300032e0: e3a02048 mov r2, #72 ; 0x48
300032e4: e1a00004 mov r0, r4
300032e8: eb0026ef bl 3000ceac <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
300032ec: e59d3018 ldr r3, [sp, #24]
* 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_evaluate_path("/", 1, 0, &loc, 0);
300032f0: e3a05000 mov r5, #0
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
300032f4: e5843000 str r3, [r4]
* 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_evaluate_path("/", 1, 0, &loc, 0);
300032f8: e28d4004 add r4, sp, #4
300032fc: e1a03004 mov r3, r4
30003300: e3a01001 mov r1, #1
30003304: e1a02005 mov r2, r5
30003308: e59f0068 ldr r0, [pc, #104] ; 30003378 <rtems_libio_set_private_env+0x118>
3000330c: e58d5000 str r5, [sp]
30003310: ebfffb8d bl 3000214c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30003314: e596c000 ldr ip, [r6]
30003318: e1a07004 mov r7, r4
3000331c: e28cc018 add ip, ip, #24
30003320: e8b7000f ldm r7!, {r0, r1, r2, r3}
30003324: e8ac000f stmia ip!, {r0, r1, r2, r3}
30003328: e5973000 ldr r3, [r7]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
3000332c: e3a01001 mov r1, #1
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
30003330: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003334: e1a02005 mov r2, r5
30003338: e1a03004 mov r3, r4
3000333c: e59f0034 ldr r0, [pc, #52] ; 30003378 <rtems_libio_set_private_env+0x118>
30003340: e58d5000 str r5, [sp]
30003344: ebfffb80 bl 3000214c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30003348: e8b4000f ldm r4!, {r0, r1, r2, r3}
3000334c: e596c000 ldr ip, [r6]
30003350: e28cc004 add ip, ip, #4
30003354: e8ac000f stmia ip!, {r0, r1, r2, r3}
30003358: e5973000 ldr r3, [r7]
3000335c: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL;
}
30003360: e1a00008 mov r0, r8
30003364: e28dd01c add sp, sp, #28
30003368: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3000337c <rtems_libio_share_private_env>:
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
3000337c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
30003380: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
30003384: e3a00000 mov r0, #0 <== NOT EXECUTED
30003388: e1a01000 mov r1, r0 <== NOT EXECUTED
3000338c: e1a0200d mov r2, sp <== NOT EXECUTED
30003390: eb000a36 bl 30005c70 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
30003394: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003398: 1a00001c bne 30003410 <rtems_libio_share_private_env+0x94> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
3000339c: e59f1074 ldr r1, [pc, #116] ; 30003418 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
300033a0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
300033a4: e5915000 ldr r5, [r1] <== NOT EXECUTED
300033a8: e5952000 ldr r2, [r5] <== NOT EXECUTED
300033ac: e1520003 cmp r2, r3 <== NOT EXECUTED
300033b0: 1a000005 bne 300033cc <rtems_libio_share_private_env+0x50> <== NOT EXECUTED
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
300033b4: eb000aa7 bl 30005e58 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
300033b8: e2503000 subs r3, r0, #0 <== NOT EXECUTED
300033bc: 1a000013 bne 30003410 <rtems_libio_share_private_env+0x94> <== NOT EXECUTED
free_user_env(tmp);
300033c0: e1a00005 mov r0, r5 <== NOT EXECUTED
300033c4: ebffff98 bl 3000322c <free_user_env> <== NOT EXECUTED
300033c8: ea000004 b 300033e0 <rtems_libio_share_private_env+0x64> <== NOT EXECUTED
} else {
sc = rtems_task_variable_get(
300033cc: e1a00004 mov r0, r4 <== NOT EXECUTED
300033d0: e28d2004 add r2, sp, #4 <== NOT EXECUTED
300033d4: eb000abd bl 30005ed0 <rtems_task_variable_get> <== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
300033d8: e2503000 subs r3, r0, #0 <== NOT EXECUTED
300033dc: 1a000008 bne 30003404 <rtems_libio_share_private_env+0x88> <== NOT EXECUTED
goto bailout;
}
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
300033e0: e59f4030 ldr r4, [pc, #48] ; 30003418 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
300033e4: e59f2030 ldr r2, [pc, #48] ; 3000341c <rtems_libio_share_private_env+0xa0><== NOT EXECUTED
300033e8: e3a00000 mov r0, #0 <== NOT EXECUTED
300033ec: e1a01004 mov r1, r4 <== NOT EXECUTED
300033f0: eb000a6e bl 30005db0 <rtems_task_variable_add> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
300033f4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
300033f8: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED
300033fc: 05842000 streq r2, [r4] <== NOT EXECUTED
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
30003400: 0a000002 beq 30003410 <rtems_libio_share_private_env+0x94> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
30003404: e59f1014 ldr r1, [pc, #20] ; 30003420 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
30003408: e59f2008 ldr r2, [pc, #8] ; 30003418 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
3000340c: e5821000 str r1, [r2] <== NOT EXECUTED
return sc;
}
30003410: e1a00003 mov r0, r3 <== NOT EXECUTED
30003414: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
300095a8 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
300095a8: e2003006 and r3, r0, #6
300095ac: e3530006 cmp r3, #6
fcntl_flags |= O_RDWR;
300095b0: 03a03002 moveq r3, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
300095b4: 0a000005 beq 300095d0 <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
300095b8: e3100002 tst r0, #2
fcntl_flags |= O_RDONLY;
300095bc: 13a03000 movne r3, #0
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
300095c0: 1a000002 bne 300095d0 <rtems_libio_to_fcntl_flags+0x28>
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
300095c4: e3100004 tst r0, #4 <== NOT EXECUTED
300095c8: 03a03000 moveq r3, #0 <== NOT EXECUTED
300095cc: 13a03001 movne r3, #1 <== NOT EXECUTED
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 ) {
300095d0: e3100001 tst r0, #1
fcntl_flags |= O_NONBLOCK;
300095d4: 13833901 orrne r3, r3, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
300095d8: e3100c02 tst r0, #512 ; 0x200
fcntl_flags |= O_APPEND;
300095dc: 13833008 orrne r3, r3, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
300095e0: e3100b01 tst r0, #1024 ; 0x400
fcntl_flags |= O_CREAT;
300095e4: 13833c02 orrne r3, r3, #512 ; 0x200
}
return fcntl_flags;
}
300095e8: e1a00003 mov r0, r3
300095ec: e12fff1e bx lr
3000bb58 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
3000bb58: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000bb5c: e24dd048 sub sp, sp, #72 ; 0x48
3000bb60: e1a0b001 mov fp, r1
int success = 0;
char *dup_path = strdup(path);
3000bb64: eb0009e6 bl 3000e304 <strdup>
if (dup_path != NULL) {
3000bb68: e2505000 subs r5, r0, #0
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
3000bb6c: 03e00000 mvneq r0, #0
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
3000bb70: 0a000056 beq 3000bcd0 <rtems_mkdir+0x178>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
3000bb74: e5d53000 ldrb r3, [r5]
3000bb78: e3a06000 mov r6, #0
3000bb7c: e353002f cmp r3, #47 ; 0x2f
++p;
3000bb80: 02857001 addeq r7, r5, #1
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
3000bb84: 11a07005 movne r7, r5
3000bb88: e3a03001 mov r3, #1
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
3000bb8c: e1a09006 mov r9, r6
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000bb90: e3a0a02f mov sl, #47 ; 0x2f
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
3000bb94: e1a0800d mov r8, sp
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
3000bb98: e4d72001 ldrb r2, [r7], #1
3000bb9c: e3520000 cmp r2, #0
last = 1;
3000bba0: 03a02001 moveq r2, #1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
3000bba4: 0a000002 beq 3000bbb4 <rtems_mkdir+0x5c>
last = 1;
else if (p[0] != '/')
3000bba8: e352002f cmp r2, #47 ; 0x2f
3000bbac: 03a02000 moveq r2, #0
3000bbb0: 1afffff8 bne 3000bb98 <rtems_mkdir+0x40>
continue;
*p = '\0';
if (!last && p[1] == '\0')
3000bbb4: e3520000 cmp r2, #0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
3000bbb8: e5479001 strb r9, [r7, #-1]
if (!last && p[1] == '\0')
3000bbbc: 13a04001 movne r4, #1
3000bbc0: 1a000002 bne 3000bbd0 <rtems_mkdir+0x78>
3000bbc4: e5d74000 ldrb r4, [r7]
3000bbc8: e2744001 rsbs r4, r4, #1
3000bbcc: 33a04000 movcc r4, #0
last = 1;
if (first) {
3000bbd0: e3530000 cmp r3, #0
3000bbd4: 0a000004 beq 3000bbec <rtems_mkdir+0x94>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
3000bbd8: e3a00000 mov r0, #0
3000bbdc: eb000069 bl 3000bd88 <umask>
3000bbe0: e1a06000 mov r6, r0
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
3000bbe4: e3c000c0 bic r0, r0, #192 ; 0xc0
3000bbe8: eb000066 bl 3000bd88 <umask>
first = 0;
}
if (last)
3000bbec: e3540000 cmp r4, #0
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000bbf0: 059f10f0 ldreq r1, [pc, #240] ; 3000bce8 <rtems_mkdir+0x190>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
3000bbf4: 0a000002 beq 3000bc04 <rtems_mkdir+0xac>
(void)umask(oumask);
3000bbf8: e1a00006 mov r0, r6
3000bbfc: eb000061 bl 3000bd88 <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000bc00: e1a0100b mov r1, fp
3000bc04: e1a00005 mov r0, r5
3000bc08: ebffdea7 bl 300036ac <mkdir>
3000bc0c: e3500000 cmp r0, #0
3000bc10: aa00001f bge 3000bc94 <rtems_mkdir+0x13c>
if (errno == EEXIST || errno == EISDIR) {
3000bc14: eb0005d2 bl 3000d364 <__errno>
3000bc18: e5903000 ldr r3, [r0]
3000bc1c: e3530011 cmp r3, #17
3000bc20: 0a000003 beq 3000bc34 <rtems_mkdir+0xdc>
3000bc24: eb0005ce bl 3000d364 <__errno> <== NOT EXECUTED
3000bc28: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000bc2c: e3530015 cmp r3, #21 <== NOT EXECUTED
3000bc30: 1a00001c bne 3000bca8 <rtems_mkdir+0x150> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
3000bc34: e1a00005 mov r0, r5
3000bc38: e1a0100d mov r1, sp
3000bc3c: eb00002a bl 3000bcec <stat>
3000bc40: e3500000 cmp r0, #0
3000bc44: ba000017 blt 3000bca8 <rtems_mkdir+0x150>
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
3000bc48: e59d300c ldr r3, [sp, #12]
3000bc4c: e2033a0f and r3, r3, #61440 ; 0xf000
3000bc50: e3530901 cmp r3, #16384 ; 0x4000
3000bc54: 0a00000b beq 3000bc88 <rtems_mkdir+0x130>
if (last)
3000bc58: e3540000 cmp r4, #0
3000bc5c: 0a000004 beq 3000bc74 <rtems_mkdir+0x11c>
errno = EEXIST;
3000bc60: eb0005bf bl 3000d364 <__errno>
3000bc64: e3a03011 mov r3, #17
3000bc68: e5803000 str r3, [r0]
else
errno = ENOTDIR;
retval = 0;
3000bc6c: e3a07000 mov r7, #0
3000bc70: ea000011 b 3000bcbc <rtems_mkdir+0x164>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
3000bc74: eb0005ba bl 3000d364 <__errno> <== NOT EXECUTED
3000bc78: e3a03014 mov r3, #20 <== NOT EXECUTED
3000bc7c: e5803000 str r3, [r0] <== NOT EXECUTED
retval = 0;
3000bc80: e1a07004 mov r7, r4 <== NOT EXECUTED
3000bc84: ea00000a b 3000bcb4 <rtems_mkdir+0x15c> <== NOT EXECUTED
break;
}
if (last)
3000bc88: e3540000 cmp r4, #0
3000bc8c: 1a000011 bne 3000bcd8 <rtems_mkdir+0x180>
3000bc90: ea000001 b 3000bc9c <rtems_mkdir+0x144>
} else {
retval = 0;
break;
}
}
if (!last)
3000bc94: e3540000 cmp r4, #0
3000bc98: 1a000010 bne 3000bce0 <rtems_mkdir+0x188>
*p = '/';
3000bc9c: e547a001 strb sl, [r7, #-1]
3000bca0: e3a03000 mov r3, #0
3000bca4: eaffffbb b 3000bb98 <rtems_mkdir+0x40>
}
if (!first && !last)
3000bca8: e3540000 cmp r4, #0 <== NOT EXECUTED
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
3000bcac: e3a07000 mov r7, #0 <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
3000bcb0: 1a000001 bne 3000bcbc <rtems_mkdir+0x164> <== NOT EXECUTED
(void)umask(oumask);
3000bcb4: e1a00006 mov r0, r6 <== NOT EXECUTED
3000bcb8: eb000032 bl 3000bd88 <umask> <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000bcbc: e1a00005 mov r0, r5
3000bcc0: ebffdcd7 bl 30003024 <free>
}
return success != 0 ? 0 : -1;
3000bcc4: e3570000 cmp r7, #0
3000bcc8: 13a00000 movne r0, #0
3000bccc: 03e00000 mvneq r0, #0
}
3000bcd0: e28dd048 add sp, sp, #72 ; 0x48
3000bcd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
3000bcd8: e3a07002 mov r7, #2
3000bcdc: eafffff6 b 3000bcbc <rtems_mkdir+0x164>
} else {
retval = 0;
break;
}
}
if (!last)
3000bce0: e3a07001 mov r7, #1
3000bce4: eafffff4 b 3000bcbc <rtems_mkdir+0x164>
3000172c <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
3000172c: e59f303c ldr r3, [pc, #60] ; 30001770 <rtems_stack_checker_is_blown+0x44>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001730: e92d4800 push {fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
30001734: e5932004 ldr r2, [r3, #4]
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001738: e28db004 add fp, sp, #4
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
3000173c: e59230c4 ldr r3, [r2, #196] ; 0xc4
30001740: e15b0003 cmp fp, r3
30001744: 3a000003 bcc 30001758 <rtems_stack_checker_is_blown+0x2c>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30001748: e59220c0 ldr r2, [r2, #192] ; 0xc0
3000174c: e0833002 add r3, r3, r2
30001750: e15b0003 cmp fp, r3
30001754: 9a000003 bls 30001768 <rtems_stack_checker_is_blown+0x3c>
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
30001758: e59f3010 ldr r3, [pc, #16] ; 30001770 <rtems_stack_checker_is_blown+0x44><== NOT EXECUTED
3000175c: e3a01001 mov r1, #1 <== NOT EXECUTED
30001760: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
30001764: ebffffad bl 30001620 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
30001768: e3a00000 mov r0, #0
3000176c: e8bd8800 pop {fp, pc}
300017d4 <rtems_stack_checker_report_usage>:
}
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
300017d4: e59f1004 ldr r1, [pc, #4] ; 300017e0 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
300017d8: e3a00000 mov r0, #0 <== NOT EXECUTED
300017dc: eaffffe4 b 30001774 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
30001774 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30001774: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !print )
30001778: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
3000177c: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( !print )
30001780: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return;
print_context = context;
30001784: e59f4038 ldr r4, [pc, #56] ; 300017c4 <rtems_stack_checker_report_usage_with_plugin+0x50><== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
30001788: e59f1038 ldr r1, [pc, #56] ; 300017c8 <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
3000178c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
print_handler = print;
30001790: e5845000 str r5, [r4] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
30001794: e1a0e00f mov lr, pc <== NOT EXECUTED
30001798: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
3000179c: e59f1028 ldr r1, [pc, #40] ; 300017cc <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
300017a0: e1a00006 mov r0, r6 <== NOT EXECUTED
300017a4: e1a0e00f mov lr, pc <== NOT EXECUTED
300017a8: e12fff15 bx r5 <== 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 );
300017ac: e59f001c ldr r0, [pc, #28] ; 300017d0 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
300017b0: eb00134e bl 300064f0 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
300017b4: e3a03000 mov r3, #0 <== NOT EXECUTED
300017b8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
print_handler = NULL;
300017bc: e5843000 str r3, [r4] <== NOT EXECUTED
300017c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
300016c8 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
300016c8: e92d4830 push {r4, r5, fp, lr}
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
300016cc: e59030c4 ldr r3, [r0, #196] ; 0xc4
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
300016d0: e28db00c add fp, sp, #12
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
300016d4: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
300016d8: e1a04000 mov r4, r0
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
300016dc: 33a05000 movcc r5, #0
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
300016e0: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
300016e4: 3a000004 bcc 300016fc <rtems_stack_checker_switch_extension+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
300016e8: e59450c0 ldr r5, [r4, #192] ; 0xc0
300016ec: e0835005 add r5, r3, r5
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
300016f0: e15b0005 cmp fp, r5
300016f4: 83a05000 movhi r5, #0
300016f8: 93a05001 movls r5, #1
/*
* 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,
300016fc: e59f1024 ldr r1, [pc, #36] ; 30001728 <rtems_stack_checker_switch_extension+0x60>
30001700: e3a02010 mov r2, #16
30001704: eb002ca3 bl 3000c998 <memcmp>
30001708: e2701001 rsbs r1, r0, #1
3000170c: 33a01000 movcc r1, #0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
30001710: e3550000 cmp r5, #0
30001714: 0a000001 beq 30001720 <rtems_stack_checker_switch_extension+0x58>
30001718: e3510000 cmp r1, #0
3000171c: 18bd8830 popne {r4, r5, fp, pc}
Stack_check_report_blown_task( running, pattern_ok );
30001720: e1a00004 mov r0, r4 <== NOT EXECUTED
30001724: ebffffbd bl 30001620 <Stack_check_report_blown_task> <== NOT EXECUTED
3000b2ac <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000b2ac: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000b2b0: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000b2b4: e1a05000 mov r5, r0
3000b2b8: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
3000b2bc: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000b2c0: 0a000018 beq 3000b328 <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000b2c4: eb000792 bl 3000d114 <__errno>
3000b2c8: e3a03000 mov r3, #0
3000b2cc: e5803000 str r3, [r0]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000b2d0: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000b2d4: e5843000 str r3, [r4]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000b2d8: e1a00005 mov r0, r5
3000b2dc: e3a02010 mov r2, #16
3000b2e0: eb001518 bl 30010748 <strtoul>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
3000b2e4: e3560000 cmp r6, #0
*endptr = end;
3000b2e8: 159d3000 ldrne r3, [sp]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000b2ec: e1a07000 mov r7, r0
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
3000b2f0: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
3000b2f4: e59d3000 ldr r3, [sp]
3000b2f8: e1530005 cmp r3, r5
return RTEMS_NOT_DEFINED;
3000b2fc: 03a0000b moveq r0, #11
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
3000b300: 0a000008 beq 3000b328 <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000b304: e3770001 cmn r7, #1
3000b308: 1a000004 bne 3000b320 <rtems_string_to_pointer+0x74>
3000b30c: eb000780 bl 3000d114 <__errno> <== NOT EXECUTED
3000b310: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000b314: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
3000b318: 03a0000a moveq r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000b31c: 0a000001 beq 3000b328 <rtems_string_to_pointer+0x7c> <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
3000b320: e5847000 str r7, [r4]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
3000b324: e3a00000 mov r0, #0
}
3000b328: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
300019b0 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
300019b0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
300019b4: e24ddf6b sub sp, sp, #428 ; 0x1ac
300019b8: e58d1010 str r1, [sp, #16]
300019bc: e58d2018 str r2, [sp, #24]
300019c0: e58d000c str r0, [sp, #12]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
300019c4: eb003899 bl 3000fc30 <strlen>
300019c8: e3a02000 mov r2, #0
300019cc: e1a01000 mov r1, r0
300019d0: e28d3f65 add r3, sp, #404 ; 0x194
300019d4: e59d000c ldr r0, [sp, #12]
300019d8: e58d2000 str r2, [sp]
300019dc: eb0002b2 bl 300024ac <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
300019e0: e2504000 subs r4, r0, #0
300019e4: 1a00006c bne 30001b9c <rtems_tarfs_load+0x1ec>
return -1;
if (root_loc.ops != &IMFS_ops
300019e8: e59d31a0 ldr r3, [sp, #416] ; 0x1a0
300019ec: e59f21c0 ldr r2, [pc, #448] ; 30001bb4 <rtems_tarfs_load+0x204>
300019f0: e1530002 cmp r3, r2
300019f4: 0a000005 beq 30001a10 <rtems_tarfs_load+0x60>
&& root_loc.ops != &fifoIMFS_ops)
300019f8: e59f21b8 ldr r2, [pc, #440] ; 30001bb8 <rtems_tarfs_load+0x208><== NOT EXECUTED
300019fc: e1530002 cmp r3, r2 <== NOT EXECUTED
30001a00: 1a000065 bne 30001b9c <rtems_tarfs_load+0x1ec> <== NOT EXECUTED
30001a04: ea000001 b 30001a10 <rtems_tarfs_load+0x60> <== NOT EXECUTED
30001a08: e1a08004 mov r8, r4
30001a0c: ea000006 b 30001a2c <rtems_tarfs_load+0x7c>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001a10: e28d2f65 add r2, sp, #404 ; 0x194
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
30001a14: e1a08004 mov r8, r4
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001a18: e28d7f47 add r7, sp, #284 ; 0x11c
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001a1c: e28d9d06 add r9, sp, #384 ; 0x180
30001a20: e58d2004 str r2, [sp, #4]
* - 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);
30001a24: e28d501c add r5, sp, #28
30001a28: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001a2c: e59d3018 ldr r3, [sp, #24]
30001a30: e2884c02 add r4, r8, #512 ; 0x200
30001a34: e1540003 cmp r4, r3
30001a38: 8a000059 bhi 30001ba4 <rtems_tarfs_load+0x1f4>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001a3c: e59de010 ldr lr, [sp, #16]
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
30001a40: e59f1174 ldr r1, [pc, #372] ; 30001bbc <rtems_tarfs_load+0x20c>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001a44: e08e8008 add r8, lr, r8
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
30001a48: e2880c01 add r0, r8, #256 ; 0x100
30001a4c: e2800001 add r0, r0, #1
30001a50: e3a02007 mov r2, #7
30001a54: eb00388d bl 3000fc90 <strncmp>
30001a58: e2506000 subs r6, r0, #0
30001a5c: 1a000050 bne 30001ba4 <rtems_tarfs_load+0x1f4>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001a60: e3a02063 mov r2, #99 ; 0x63
30001a64: e1a01008 mov r1, r8
30001a68: e1a00007 mov r0, r7
30001a6c: eb0038e3 bl 3000fe00 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
30001a70: e5cd617f strb r6, [sp, #383] ; 0x17f
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001a74: e3a01008 mov r1, #8
30001a78: e2880064 add r0, r8, #100 ; 0x64
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
30001a7c: e5d8609c ldrb r6, [r8, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001a80: eb001da7 bl 30009124 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001a84: e3a0100c mov r1, #12
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);
30001a88: e58d0014 str r0, [sp, #20]
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001a8c: e288007c add r0, r8, #124 ; 0x7c
30001a90: eb001da3 bl 30009124 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001a94: e3a01008 mov r1, #8
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);
30001a98: e1a0b000 mov fp, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001a9c: e2880094 add r0, r8, #148 ; 0x94
30001aa0: eb001d9f bl 30009124 <_rtems_octal2ulong>
30001aa4: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
30001aa8: e1a00008 mov r0, r8
30001aac: e58d3008 str r3, [sp, #8]
30001ab0: eb001da9 bl 3000915c <_rtems_tar_header_checksum>
30001ab4: e59d3008 ldr r3, [sp, #8]
30001ab8: e1500003 cmp r0, r3
30001abc: 1a000038 bne 30001ba4 <rtems_tarfs_load+0x1f4>
* 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) {
30001ac0: e3560035 cmp r6, #53 ; 0x35
30001ac4: 1a000012 bne 30001b14 <rtems_tarfs_load+0x164>
strcpy(full_filename, mountpoint);
30001ac8: e59d100c ldr r1, [sp, #12]
30001acc: e1a00005 mov r0, r5
30001ad0: eb003692 bl 3000f520 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
30001ad4: e1a00005 mov r0, r5
30001ad8: eb003854 bl 3000fc30 <strlen>
30001adc: e28d2f6b add r2, sp, #428 ; 0x1ac
30001ae0: e0820000 add r0, r2, r0
30001ae4: e5503191 ldrb r3, [r0, #-401] ; 0x191
30001ae8: e353002f cmp r3, #47 ; 0x2f
strcat(full_filename, "/");
30001aec: 11a00005 movne r0, r5
30001af0: 159f10c8 ldrne r1, [pc, #200] ; 30001bc0 <rtems_tarfs_load+0x210>
30001af4: 1b0035d2 blne 3000f244 <strcat>
strcat(full_filename, filename);
30001af8: e1a01007 mov r1, r7
30001afc: e1a00005 mov r0, r5
30001b00: eb0035cf bl 3000f244 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
30001b04: e1a00005 mov r0, r5
30001b08: e59f10b4 ldr r1, [pc, #180] ; 30001bc4 <rtems_tarfs_load+0x214>
30001b0c: eb000486 bl 30002d2c <mkdir>
30001b10: eaffffbc b 30001a08 <rtems_tarfs_load+0x58>
* 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) {
30001b14: e3560030 cmp r6, #48 ; 0x30
30001b18: 1affffba bne 30001a08 <rtems_tarfs_load+0x58>
const char *name;
loc = root_loc;
30001b1c: e59dc004 ldr ip, [sp, #4]
30001b20: e1a0e009 mov lr, r9
30001b24: e8bc000f ldm ip!, {r0, r1, r2, r3}
30001b28: e8ae000f stmia lr!, {r0, r1, r2, r3}
30001b2c: e59c2000 ldr r2, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001b30: e1a00007 mov r0, r7
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001b34: e58e2000 str r2, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001b38: e1a01009 mov r1, r9
30001b3c: e28d2f6a add r2, sp, #424 ; 0x1a8
30001b40: eb002060 bl 30009cc8 <IMFS_evaluate_for_make>
30001b44: e2506000 subs r6, r0, #0
30001b48: 1a00000d bne 30001b84 <rtems_tarfs_load+0x1d4>
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001b4c: e59d2014 ldr r2, [sp, #20]
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
30001b50: e1a00009 mov r0, r9
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001b54: e1a03b82 lsl r3, r2, #23
30001b58: e1a03ba3 lsr r3, r3, #23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
30001b5c: e59d21a8 ldr r2, [sp, #424] ; 0x1a8
30001b60: e3833902 orr r3, r3, #32768 ; 0x8000
30001b64: e3a01006 mov r1, #6
30001b68: e58d6000 str r6, [sp]
30001b6c: eb001ec4 bl 30009684 <IMFS_create_node>
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];
30001b70: e59d2010 ldr r2, [sp, #16]
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001b74: e580b050 str fp, [r0, #80] ; 0x50
node->info.linearfile.direct = &tar_image[offset];
30001b78: e0823004 add r3, r2, r4
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001b7c: e5806054 str r6, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
30001b80: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001b84: e28bbf7f add fp, fp, #508 ; 0x1fc
30001b88: e28bb003 add fp, fp, #3
offset += 512 * nblocks;
30001b8c: e3cbbf7f bic fp, fp, #508 ; 0x1fc
30001b90: e3cbb003 bic fp, fp, #3
30001b94: e08b4004 add r4, fp, r4
30001b98: eaffff9a b 30001a08 <rtems_tarfs_load+0x58>
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
return -1;
30001b9c: e3e04000 mvn r4, #0 <== NOT EXECUTED
30001ba0: ea000000 b 30001ba8 <rtems_tarfs_load+0x1f8> <== NOT EXECUTED
30001ba4: e1a0400a mov r4, sl
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
30001ba8: e1a00004 mov r0, r4
30001bac: e28ddf6b add sp, sp, #428 ; 0x1ac
30001bb0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000b97c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000b97c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
3000b980: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000b984: e1a04000 mov r4, r0
3000b988: e1a05001 mov r5, r1
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
3000b98c: 03a00009 moveq r0, #9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
3000b990: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
3000b994: e59f314c ldr r3, [pc, #332] ; 3000bae8 <rtems_task_mode+0x16c>
3000b998: e5937004 ldr r7, [r3, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
3000b99c: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
3000b9a0: e5976100 ldr r6, [r7, #256] ; 0x100
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000b9a4: e597307c ldr r3, [r7, #124] ; 0x7c
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
3000b9a8: e3580000 cmp r8, #0
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;
3000b9ac: e5d69008 ldrb r9, [r6, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
3000b9b0: 03a08c01 moveq r8, #256 ; 0x100
3000b9b4: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000b9b8: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
3000b9bc: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
3000b9c0: e3590000 cmp r9, #0
3000b9c4: 03a09b01 moveq r9, #1024 ; 0x400
3000b9c8: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
3000b9cc: ebfff307 bl 300085f0 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
3000b9d0: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
3000b9d4: e1898008 orr r8, r9, r8
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000b9d8: e3150c01 tst r5, #256 ; 0x100
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
3000b9dc: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000b9e0: 0a000003 beq 3000b9f4 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
3000b9e4: e3140c01 tst r4, #256 ; 0x100
3000b9e8: 13a03000 movne r3, #0
3000b9ec: 03a03001 moveq r3, #1
3000b9f0: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
3000b9f4: e3150c02 tst r5, #512 ; 0x200
3000b9f8: 0a000006 beq 3000ba18 <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
3000b9fc: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
3000ba00: 13a03001 movne r3, #1
3000ba04: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
3000ba08: 159f30dc ldrne r3, [pc, #220] ; 3000baec <rtems_task_mode+0x170>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
3000ba0c: 0587307c streq r3, [r7, #124] ; 0x7c
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;
3000ba10: 15933000 ldrne r3, [r3]
3000ba14: 15873078 strne r3, [r7, #120] ; 0x78
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
3000ba18: e3150080 tst r5, #128 ; 0x80
3000ba1c: 0a000001 beq 3000ba28 <rtems_task_mode+0xac>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
3000ba20: e2040080 and r0, r4, #128 ; 0x80
3000ba24: ebfff2ec bl 300085dc <_CPU_ISR_Set_level>
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
3000ba28: e2150b01 ands r0, r5, #1024 ; 0x400
3000ba2c: 0a000013 beq 3000ba80 <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000ba30: e3140b01 tst r4, #1024 ; 0x400
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 ) {
3000ba34: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000ba38: 13a03000 movne r3, #0
3000ba3c: 03a03001 moveq r3, #1
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 ) {
3000ba40: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000ba44: 03a00000 moveq r0, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
3000ba48: 0a00000c beq 3000ba80 <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
3000ba4c: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000ba50: e10f3000 mrs r3, CPSR
3000ba54: e3832080 orr r2, r3, #128 ; 0x80
3000ba58: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
3000ba5c: e5962018 ldr r2, [r6, #24]
information->signals_pending = information->signals_posted;
3000ba60: e5961014 ldr r1, [r6, #20]
information->signals_posted = _signals;
3000ba64: e5862014 str r2, [r6, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
3000ba68: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000ba6c: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
3000ba70: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000ba74: e3500000 cmp r0, #0
3000ba78: 13a00001 movne r0, #1
3000ba7c: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
3000ba80: e59f3068 ldr r3, [pc, #104] ; 3000baf0 <rtems_task_mode+0x174>
3000ba84: e5933000 ldr r3, [r3]
3000ba88: e3530003 cmp r3, #3
3000ba8c: 1a000013 bne 3000bae0 <rtems_task_mode+0x164>
*/
RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
3000ba90: e59f2050 ldr r2, [pc, #80] ; 3000bae8 <rtems_task_mode+0x16c>
3000ba94: e5923004 ldr r3, [r2, #4]
if ( !_States_Is_ready( executing->current_state ) ||
3000ba98: e5931010 ldr r1, [r3, #16]
3000ba9c: e3510000 cmp r1, #0
3000baa0: 1a000005 bne 3000babc <rtems_task_mode+0x140>
3000baa4: e5922008 ldr r2, [r2, #8]
3000baa8: e1530002 cmp r3, r2
3000baac: 0a000006 beq 3000bacc <rtems_task_mode+0x150>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
3000bab0: e5d33074 ldrb r3, [r3, #116] ; 0x74
3000bab4: e3530000 cmp r3, #0
3000bab8: 0a000003 beq 3000bacc <rtems_task_mode+0x150>
_Context_Switch_necessary = true;
3000babc: e59f3024 ldr r3, [pc, #36] ; 3000bae8 <rtems_task_mode+0x16c>
3000bac0: e3a02001 mov r2, #1
3000bac4: e5c32010 strb r2, [r3, #16]
3000bac8: ea000001 b 3000bad4 <rtems_task_mode+0x158>
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
3000bacc: e3500000 cmp r0, #0
3000bad0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch();
3000bad4: ebffece6 bl 30006e74 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
3000bad8: e3a00000 mov r0, #0
3000badc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000bae0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000bae4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
3000332c <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
3000332c: e59f300c ldr r3, [pc, #12] ; 30003340 <rtems_termios_bufsize+0x14><== NOT EXECUTED
30003330: e5830008 str r0, [r3, #8] <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
30003334: e8830006 stm r3, {r1, r2} <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
30003338: e3a00000 mov r0, #0 <== NOT EXECUTED
3000333c: e12fff1e bx lr <== NOT EXECUTED
30003194 <rtems_termios_close>:
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003194: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
30003198: e92d4030 push {r4, r5, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3000319c: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
300031a0: e59f3174 ldr r3, [pc, #372] ; 3000331c <rtems_termios_close+0x188>
300031a4: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
300031a8: e1a05000 mov r5, r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
300031ac: e1a02001 mov r2, r1
300031b0: e5930000 ldr r0, [r3]
300031b4: eb0007a3 bl 30005048 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
300031b8: e3500000 cmp r0, #0
300031bc: 1a000022 bne 3000324c <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
300031c0: e5943008 ldr r3, [r4, #8]
300031c4: e2433001 sub r3, r3, #1
300031c8: e3530000 cmp r3, #0
300031cc: e5843008 str r3, [r4, #8]
300031d0: 1a00004c bne 30003308 <rtems_termios_close+0x174>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
300031d4: e59420cc ldr r2, [r4, #204] ; 0xcc
300031d8: e59f3140 ldr r3, [pc, #320] ; 30003320 <rtems_termios_close+0x18c>
300031dc: e0833282 add r3, r3, r2, lsl #5
300031e0: e5931004 ldr r1, [r3, #4]
300031e4: e3510000 cmp r1, #0
300031e8: 0a000003 beq 300031fc <rtems_termios_close+0x68>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
300031ec: e1a00004 mov r0, r4
300031f0: e1a0e00f mov lr, pc
300031f4: e12fff11 bx r1
300031f8: ea000006 b 30003218 <rtems_termios_close+0x84>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300031fc: e5940018 ldr r0, [r4, #24]
30003200: e1a02001 mov r2, r1
30003204: eb00078f bl 30005048 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
30003208: e3500000 cmp r0, #0
3000320c: 1a00000e bne 3000324c <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
30003210: e1a00004 mov r0, r4
30003214: ebfffeb2 bl 30002ce4 <drainOutput>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30003218: e59430b4 ldr r3, [r4, #180] ; 0xb4
3000321c: e3530002 cmp r3, #2
30003220: 1a00000a bne 30003250 <rtems_termios_close+0xbc>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
30003224: e59400c4 ldr r0, [r4, #196] ; 0xc4
30003228: e3a01001 mov r1, #1
3000322c: eb000673 bl 30004c00 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30003230: e3500000 cmp r0, #0
30003234: 1a000004 bne 3000324c <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
30003238: e59400c8 ldr r0, [r4, #200] ; 0xc8
3000323c: e3a01001 mov r1, #1
30003240: eb00066e bl 30004c00 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30003244: e3500000 cmp r0, #0
30003248: 0a000000 beq 30003250 <rtems_termios_close+0xbc>
rtems_fatal_error_occurred (sc);
3000324c: eb000913 bl 300056a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
30003250: e594309c ldr r3, [r4, #156] ; 0x9c
30003254: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
30003258: 1594000c ldrne r0, [r4, #12]
3000325c: 15941010 ldrne r1, [r4, #16]
30003260: 11a02005 movne r2, r5
30003264: 11a0e00f movne lr, pc
30003268: 112fff13 bxne r3
if (tty->forw == NULL) {
3000326c: e894000c ldm r4, {r2, r3}
30003270: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
30003274: 15823004 strne r3, [r2, #4]
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
30003278: 1a000003 bne 3000328c <rtems_termios_close+0xf8>
rtems_termios_ttyTail = tty->back;
3000327c: e59f10a0 ldr r1, [pc, #160] ; 30003324 <rtems_termios_close+0x190>
if ( rtems_termios_ttyTail != NULL ) {
30003280: e3530000 cmp r3, #0
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
30003284: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
30003288: 15832000 strne r2, [r3]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
3000328c: e5942004 ldr r2, [r4, #4]
30003290: e5943000 ldr r3, [r4]
30003294: e3520000 cmp r2, #0
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
30003298: 15823000 strne r3, [r2]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
3000329c: 1a000003 bne 300032b0 <rtems_termios_close+0x11c>
rtems_termios_ttyHead = tty->forw;
300032a0: e59f1080 ldr r1, [pc, #128] ; 30003328 <rtems_termios_close+0x194>
if ( rtems_termios_ttyHead != NULL ) {
300032a4: e3530000 cmp r3, #0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
300032a8: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
300032ac: 15832004 strne r2, [r3, #4]
}
} else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
300032b0: e5940014 ldr r0, [r4, #20]
300032b4: eb00073c bl 30004fac <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
300032b8: e5940018 ldr r0, [r4, #24]
300032bc: eb00073a bl 30004fac <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
300032c0: e594008c ldr r0, [r4, #140] ; 0x8c
300032c4: eb000738 bl 30004fac <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
300032c8: e59430a0 ldr r3, [r4, #160] ; 0xa0
300032cc: e3530000 cmp r3, #0
300032d0: 0a000002 beq 300032e0 <rtems_termios_close+0x14c>
300032d4: e59430b4 ldr r3, [r4, #180] ; 0xb4
300032d8: e3530002 cmp r3, #2
300032dc: 1a000001 bne 300032e8 <rtems_termios_close+0x154>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
300032e0: e5940068 ldr r0, [r4, #104] ; 0x68
300032e4: eb000730 bl 30004fac <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
300032e8: e5940058 ldr r0, [r4, #88] ; 0x58
300032ec: ebfffae5 bl 30001e88 <free>
free (tty->rawOutBuf.theBuf);
300032f0: e594007c ldr r0, [r4, #124] ; 0x7c
300032f4: ebfffae3 bl 30001e88 <free>
free (tty->cbuf);
300032f8: e594001c ldr r0, [r4, #28]
300032fc: ebfffae1 bl 30001e88 <free>
free (tty);
30003300: e1a00004 mov r0, r4
30003304: ebfffadf bl 30001e88 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
30003308: e59f300c ldr r3, [pc, #12] ; 3000331c <rtems_termios_close+0x188>
3000330c: e5930000 ldr r0, [r3]
30003310: eb000792 bl 30005160 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
30003314: e3a00000 mov r0, #0
30003318: e8bd8030 pop {r4, r5, pc}
300046a8 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
300046a8: e5902090 ldr r2, [r0, #144] ; 0x90
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
300046ac: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
300046b0: e0822001 add r2, r2, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300046b4: e59010b4 ldr r1, [r0, #180] ; 0xb4
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
300046b8: e5802090 str r2, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300046bc: e3510002 cmp r1, #2
300046c0: 1a000004 bne 300046d8 <rtems_termios_dequeue_characters+0x30>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
300046c4: e59000c8 ldr r0, [r0, #200] ; 0xc8
300046c8: eb00014c bl 30004c00 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
300046cc: e2503000 subs r3, r0, #0
300046d0: 0a00000d beq 3000470c <rtems_termios_dequeue_characters+0x64>
rtems_fatal_error_occurred (sc);
300046d4: eb0003f1 bl 300056a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
300046d8: e59030cc ldr r3, [r0, #204] ; 0xcc
300046dc: e3530005 cmp r3, #5
300046e0: 1a000007 bne 30004704 <rtems_termios_dequeue_characters+0x5c>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
300046e4: e59f3028 ldr r3, [pc, #40] ; 30004714 <rtems_termios_dequeue_characters+0x6c>
300046e8: e59330b4 ldr r3, [r3, #180] ; 0xb4
300046ec: e3530000 cmp r3, #0
300046f0: 0a000005 beq 3000470c <rtems_termios_dequeue_characters+0x64>
rtems_termios_linesw[tty->t_line].l_start(tty);
300046f4: e1a0e00f mov lr, pc
300046f8: e12fff13 bx r3
}
return 0; /* nothing to output in IRQ... */
300046fc: e3a03000 mov r3, #0
30004700: ea000001 b 3000470c <rtems_termios_dequeue_characters+0x64>
}
return rtems_termios_refill_transmitter(tty);
}
30004704: e49de004 pop {lr} ; (ldr lr, [sp], #4)
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
30004708: eaffff5a b 30004478 <rtems_termios_refill_transmitter>
}
3000470c: e1a00003 mov r0, r3
30004710: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30004174 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004174: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr}
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) {
30004178: e59030cc ldr r3, [r0, #204] ; 0xcc
3000417c: e59f7288 ldr r7, [pc, #648] ; 3000440c <rtems_termios_enqueue_raw_characters+0x298>
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004180: e1a04000 mov r4, r0
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) {
30004184: e0873283 add r3, r7, r3, lsl #5
30004188: e5939010 ldr r9, [r3, #16]
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
3000418c: e1a06001 mov r6, r1
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) {
30004190: e3590000 cmp r9, #0
30004194: 11a05002 movne r5, r2
30004198: 1a00000d bne 300041d4 <rtems_termios_enqueue_raw_characters+0x60>
/*
* 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);
3000419c: e2803030 add r3, r0, #48 ; 0x30
300041a0: e58d3000 str r3, [sp]
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,
300041a4: e280304a add r3, r0, #74 ; 0x4a
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) {
300041a8: e1a08002 mov r8, r2
300041ac: e1a05009 mov r5, r9
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,
300041b0: e58d3004 str r3, [sp, #4]
300041b4: ea00008b b 300043e8 <rtems_termios_enqueue_raw_characters+0x274>
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
300041b8: e59430cc ldr r3, [r4, #204] ; 0xcc
300041bc: e4d60001 ldrb r0, [r6], #1
300041c0: e0873283 add r3, r7, r3, lsl #5
300041c4: e1a01004 mov r1, r4
300041c8: e1a0e00f mov lr, pc
300041cc: e593f010 ldr pc, [r3, #16]
300041d0: e2455001 sub r5, r5, #1
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--) {
300041d4: e3550000 cmp r5, #0
300041d8: 1afffff6 bne 300041b8 <rtems_termios_enqueue_raw_characters+0x44>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300041dc: e59430e4 ldr r3, [r4, #228] ; 0xe4
300041e0: e3530000 cmp r3, #0
300041e4: 1a000086 bne 30004404 <rtems_termios_enqueue_raw_characters+0x290>
300041e8: e59430dc ldr r3, [r4, #220] ; 0xdc
300041ec: e3530000 cmp r3, #0
300041f0: 0a000083 beq 30004404 <rtems_termios_enqueue_raw_characters+0x290>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
300041f4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
300041f8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
300041fc: e1a0e00f mov lr, pc <== NOT EXECUTED
30004200: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30004204: e3a03001 mov r3, #1 <== NOT EXECUTED
30004208: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
3000420c: ea00007c b 30004404 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
30004210: e59430b8 ldr r3, [r4, #184] ; 0xb8
}
return 0;
}
while (len--) {
c = *buf++;
30004214: e4d6a001 ldrb sl, [r6], #1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
30004218: e3130c02 tst r3, #512 ; 0x200
3000421c: 0a00000f beq 30004260 <rtems_termios_enqueue_raw_characters+0xec>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
30004220: e5d4204a ldrb r2, [r4, #74] ; 0x4a
30004224: e5d43049 ldrb r3, [r4, #73] ; 0x49
30004228: e152000a cmp r2, sl
3000422c: 1a000007 bne 30004250 <rtems_termios_enqueue_raw_characters+0xdc>
if (c == tty->termios.c_cc[VSTART]) {
30004230: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
30004234: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30004238: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== 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;
3000423c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30004240: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
30004244: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004248: e3a09001 mov r9, #1 <== NOT EXECUTED
3000424c: ea000005 b 30004268 <rtems_termios_enqueue_raw_characters+0xf4><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
30004250: e153000a cmp r3, sl
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
30004254: 059430b8 ldreq r3, [r4, #184] ; 0xb8
30004258: 03c33010 biceq r3, r3, #16
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
3000425c: 0afffff8 beq 30004244 <rtems_termios_enqueue_raw_characters+0xd0>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
30004260: e3590000 cmp r9, #0
30004264: 0a000014 beq 300042bc <rtems_termios_enqueue_raw_characters+0x148>
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
30004268: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000426c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
30004270: e3530020 cmp r3, #32 <== NOT EXECUTED
30004274: 1a00005a bne 300043e4 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
30004278: ebfffa95 bl 30002cd4 <arm_interrupt_disable> <== NOT EXECUTED
3000427c: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
30004280: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004284: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
30004288: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000428c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004290: e3530000 cmp r3, #0 <== NOT EXECUTED
30004294: 0a000006 beq 300042b4 <rtems_termios_enqueue_raw_characters+0x140><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
30004298: e5943084 ldr r3, [r4, #132] ; 0x84 <== 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)(
3000429c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
300042a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300042a4: e0811003 add r1, r1, r3 <== NOT EXECUTED
300042a8: e3a02001 mov r2, #1 <== NOT EXECUTED
300042ac: e1a0e00f mov lr, pc <== NOT EXECUTED
300042b0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
300042b4: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
300042b8: ea000049 b 300043e4 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
300042bc: e5940060 ldr r0, [r4, #96] ; 0x60
300042c0: e5941064 ldr r1, [r4, #100] ; 0x64
300042c4: e2800001 add r0, r0, #1
300042c8: eb002d08 bl 3000f6f0 <__umodsi3>
300042cc: e1a07000 mov r7, r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
300042d0: ebfffa7f bl 30002cd4 <arm_interrupt_disable>
300042d4: e1a0b000 mov fp, r0
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
300042d8: e594305c ldr r3, [r4, #92] ; 0x5c
300042dc: e5940064 ldr r0, [r4, #100] ; 0x64
% tty->rawInBuf.Size) > tty->highwater) &&
300042e0: e5941064 ldr r1, [r4, #100] ; 0x64
}
} 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)
300042e4: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
300042e8: e0800007 add r0, r0, r7
300042ec: eb002cff bl 3000f6f0 <__umodsi3>
}
} 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)
300042f0: e59430c0 ldr r3, [r4, #192] ; 0xc0
300042f4: e1500003 cmp r0, r3
300042f8: 9a000025 bls 30004394 <rtems_termios_enqueue_raw_characters+0x220>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
300042fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== 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) &&
30004300: e3130001 tst r3, #1 <== NOT EXECUTED
30004304: 1a000022 bne 30004394 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
30004308: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000430c: e3833001 orr r3, r3, #1 <== NOT EXECUTED
30004310: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
30004314: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004318: e59f30f0 ldr r3, [pc, #240] ; 30004410 <rtems_termios_enqueue_raw_characters+0x29c><== NOT EXECUTED
3000431c: e0023003 and r3, r2, r3 <== NOT EXECUTED
30004320: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
30004324: 1a00000e bne 30004364 <rtems_termios_enqueue_raw_characters+0x1f0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
30004328: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000432c: e3130020 tst r3, #32 <== NOT EXECUTED
30004330: 1a000002 bne 30004340 <rtems_termios_enqueue_raw_characters+0x1cc><== NOT EXECUTED
30004334: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004338: e3530000 cmp r3, #0 <== NOT EXECUTED
3000433c: 1a000014 bne 30004394 <rtems_termios_enqueue_raw_characters+0x220><== 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;
30004340: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
30004344: e5940010 ldr r0, [r4, #16] <== 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;
30004348: e3833002 orr r3, r3, #2 <== NOT EXECUTED
3000434c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
30004350: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
30004354: e3a02001 mov r2, #1 <== NOT EXECUTED
30004358: e1a0e00f mov lr, pc <== NOT EXECUTED
3000435c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30004360: ea00000b b 30004394 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
30004364: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004368: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
3000436c: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
30004370: 1a000007 bne 30004394 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
30004374: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004378: e3833004 orr r3, r3, #4 <== NOT EXECUTED
3000437c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
30004380: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
30004384: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
30004388: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
3000438c: 11a0e00f movne lr, pc <== NOT EXECUTED
30004390: 112fff13 bxne r3 <== NOT EXECUTED
30004394: e129f00b msr CPSR_fc, fp
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
30004398: e594305c ldr r3, [r4, #92] ; 0x5c
3000439c: e1570003 cmp r7, r3
dropped++;
300043a0: 02855001 addeq r5, r5, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
300043a4: 0a00000e beq 300043e4 <rtems_termios_enqueue_raw_characters+0x270>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
300043a8: e5943058 ldr r3, [r4, #88] ; 0x58
300043ac: e7c3a007 strb sl, [r3, r7]
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300043b0: e59430e4 ldr r3, [r4, #228] ; 0xe4
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
300043b4: e5847060 str r7, [r4, #96] ; 0x60
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300043b8: e3530000 cmp r3, #0
300043bc: 1a000008 bne 300043e4 <rtems_termios_enqueue_raw_characters+0x270>
300043c0: e59430dc ldr r3, [r4, #220] ; 0xdc
300043c4: e3530000 cmp r3, #0
300043c8: 0a000005 beq 300043e4 <rtems_termios_enqueue_raw_characters+0x270>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
300043cc: e59d0000 ldr r0, [sp] <== NOT EXECUTED
300043d0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
300043d4: e1a0e00f mov lr, pc <== NOT EXECUTED
300043d8: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
300043dc: e3a03001 mov r3, #1 <== NOT EXECUTED
300043e0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
300043e4: e2488001 sub r8, r8, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
300043e8: e3580000 cmp r8, #0
300043ec: 1affff87 bne 30004210 <rtems_termios_enqueue_raw_characters+0x9c>
}
}
}
}
tty->rawInBufDropped += dropped;
300043f0: e5943078 ldr r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
300043f4: e5940068 ldr r0, [r4, #104] ; 0x68
}
}
}
}
tty->rawInBufDropped += dropped;
300043f8: e0833005 add r3, r3, r5
300043fc: e5843078 str r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004400: eb000356 bl 30005160 <rtems_semaphore_release>
return dropped;
}
30004404: e1a00005 mov r0, r5
30004408: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
30003344 <rtems_termios_ioctl>:
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003344: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
30003348: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3000334c: e5934034 ldr r4, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
30003350: e3a01000 mov r1, #0
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
30003354: e5907008 ldr r7, [r0, #8]
rtems_status_code sc;
args->ioctl_return = 0;
30003358: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3000335c: e1a05000 mov r5, r0
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003360: e1a02001 mov r2, r1
30003364: e5940018 ldr r0, [r4, #24]
30003368: eb000736 bl 30005048 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3000336c: e2506000 subs r6, r0, #0
30003370: 1a0000d4 bne 300036c8 <rtems_termios_ioctl+0x384>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003374: e5953004 ldr r3, [r5, #4]
30003378: e3530004 cmp r3, #4
3000337c: 0a0000a8 beq 30003624 <rtems_termios_ioctl+0x2e0>
30003380: 8a000005 bhi 3000339c <rtems_termios_ioctl+0x58>
30003384: e3530002 cmp r3, #2
30003388: 0a000029 beq 30003434 <rtems_termios_ioctl+0xf0>
3000338c: 8a00009d bhi 30003608 <rtems_termios_ioctl+0x2c4>
30003390: e3530001 cmp r3, #1
30003394: 1a000010 bne 300033dc <rtems_termios_ioctl+0x98>
30003398: ea00001b b 3000340c <rtems_termios_ioctl+0xc8>
3000339c: e59f2330 ldr r2, [pc, #816] ; 300036d4 <rtems_termios_ioctl+0x390>
300033a0: e1530002 cmp r3, r2
300033a4: 0a0000ba beq 30003694 <rtems_termios_ioctl+0x350>
300033a8: 8a000002 bhi 300033b8 <rtems_termios_ioctl+0x74>
300033ac: e3530005 cmp r3, #5
300033b0: 1a000009 bne 300033dc <rtems_termios_ioctl+0x98>
300033b4: ea000096 b 30003614 <rtems_termios_ioctl+0x2d0> <== NOT EXECUTED
300033b8: e59f2318 ldr r2, [pc, #792] ; 300036d8 <rtems_termios_ioctl+0x394>
300033bc: e1530002 cmp r3, r2
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
300033c0: 05953008 ldreq r3, [r5, #8]
300033c4: 059420cc ldreq r2, [r4, #204] ; 0xcc
300033c8: 05832000 streq r2, [r3]
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
300033cc: 0a0000bb beq 300036c0 <rtems_termios_ioctl+0x37c>
300033d0: e2822105 add r2, r2, #1073741825 ; 0x40000001
300033d4: e1530002 cmp r3, r2
300033d8: 0a000095 beq 30003634 <rtems_termios_ioctl+0x2f0>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
300033dc: e59420cc ldr r2, [r4, #204] ; 0xcc
300033e0: e59f32f4 ldr r3, [pc, #756] ; 300036dc <rtems_termios_ioctl+0x398>
300033e4: e0833282 add r3, r3, r2, lsl #5
300033e8: e5933018 ldr r3, [r3, #24]
300033ec: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
300033f0: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
300033f4: 0a0000b1 beq 300036c0 <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
300033f8: e1a00004 mov r0, r4
300033fc: e1a01005 mov r1, r5
30003400: e1a0e00f mov lr, pc
30003404: e12fff13 bx r3
30003408: ea00009f b 3000368c <rtems_termios_ioctl+0x348>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
3000340c: e5957008 ldr r7, [r5, #8]
30003410: e284c030 add ip, r4, #48 ; 0x30
30003414: e1a0e007 mov lr, r7
30003418: e8bc000f ldm ip!, {r0, r1, r2, r3}
3000341c: e8ae000f stmia lr!, {r0, r1, r2, r3}
30003420: e8bc000f ldm ip!, {r0, r1, r2, r3}
30003424: e8ae000f stmia lr!, {r0, r1, r2, r3}
30003428: e59c3000 ldr r3, [ip]
3000342c: e58e3000 str r3, [lr]
break;
30003430: ea0000a2 b 300036c0 <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
30003434: e595e008 ldr lr, [r5, #8]
30003438: e284c030 add ip, r4, #48 ; 0x30
3000343c: e8be000f ldm lr!, {r0, r1, r2, r3}
30003440: e8ac000f stmia ip!, {r0, r1, r2, r3}
30003444: e8be000f ldm lr!, {r0, r1, r2, r3}
30003448: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000344c: e59e3000 ldr r3, [lr]
30003450: e58c3000 str r3, [ip]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
30003454: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003458: e3130c02 tst r3, #512 ; 0x200
3000345c: 0a000018 beq 300034c4 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
30003460: e5943030 ldr r3, [r4, #48] ; 0x30
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
30003464: e3130b01 tst r3, #1024 ; 0x400
30003468: 1a000015 bne 300034c4 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
3000346c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003470: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
30003474: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
30003478: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000347c: e3130020 tst r3, #32 <== NOT EXECUTED
30003480: 0a00000f beq 300034c4 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
30003484: ebfffe12 bl 30002cd4 <arm_interrupt_disable> <== NOT EXECUTED
30003488: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
3000348c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003490: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
30003494: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003498: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3000349c: e3530000 cmp r3, #0 <== NOT EXECUTED
300034a0: 0a000006 beq 300034c0 <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
300034a4: e5943084 ldr r3, [r4, #132] ; 0x84 <== 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)(
300034a8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
300034ac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300034b0: e0811003 add r1, r1, r3 <== NOT EXECUTED
300034b4: e3a02001 mov r2, #1 <== NOT EXECUTED
300034b8: e1a0e00f mov lr, pc <== NOT EXECUTED
300034bc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
300034c0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
300034c4: e59430b8 ldr r3, [r4, #184] ; 0xb8
300034c8: e3130b01 tst r3, #1024 ; 0x400
300034cc: 0a000008 beq 300034f4 <rtems_termios_ioctl+0x1b0>
300034d0: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
300034d4: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
300034d8: 1a000005 bne 300034f4 <rtems_termios_ioctl+0x1b0> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
300034dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300034e0: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
300034e4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
300034e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300034ec: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
300034f0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
300034f4: e59430b8 ldr r3, [r4, #184] ; 0xb8
300034f8: e3130c01 tst r3, #256 ; 0x100
300034fc: 0a000010 beq 30003544 <rtems_termios_ioctl+0x200>
30003500: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
30003504: e3530000 cmp r3, #0 <== NOT EXECUTED
30003508: ba00000d blt 30003544 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
3000350c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003510: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
30003514: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
30003518: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000351c: e3130004 tst r3, #4 <== NOT EXECUTED
30003520: 0a000004 beq 30003538 <rtems_termios_ioctl+0x1f4> <== NOT EXECUTED
30003524: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
30003528: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
3000352c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
30003530: 11a0e00f movne lr, pc <== NOT EXECUTED
30003534: 112fff13 bxne r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
30003538: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000353c: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
30003540: e58430b8 str r3, [r4, #184] ; 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) {
30003544: e5943038 ldr r3, [r4, #56] ; 0x38
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) {
30003548: e594703c ldr r7, [r4, #60] ; 0x3c
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
3000354c: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
30003550: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
30003554: b3833c01 orrlt r3, r3, #256 ; 0x100
30003558: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
3000355c: e5943030 ldr r3, [r4, #48] ; 0x30
30003560: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
30003564: 159420b8 ldrne r2, [r4, #184] ; 0xb8
30003568: 13822b01 orrne r2, r2, #1024 ; 0x400
3000356c: 158420b8 strne r2, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
30003570: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
30003574: 159430b8 ldrne r3, [r4, #184] ; 0xb8
30003578: 13833c02 orrne r3, r3, #512 ; 0x200
3000357c: 158430b8 strne r3, [r4, #184] ; 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) {
30003580: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003584: 13a03000 movne r3, #0
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) {
30003588: 1a000013 bne 300035dc <rtems_termios_ioctl+0x298>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
3000358c: e5d48046 ldrb r8, [r4, #70] ; 0x46
rtems_clock_get_ticks_per_second() / 10;
30003590: eb000519 bl 300049fc <rtems_clock_get_ticks_per_second>
30003594: e3a0100a mov r1, #10
30003598: e0000098 mul r0, r8, r0
3000359c: eb002fbb bl 3000f490 <__aeabi_uidiv>
if (tty->termios.c_cc[VTIME]) {
300035a0: e5d43046 ldrb r3, [r4, #70] ; 0x46
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] *
300035a4: e5840054 str r0, [r4, #84] ; 0x54
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
300035a8: e3530000 cmp r3, #0
300035ac: e5d42047 ldrb r2, [r4, #71] ; 0x47
300035b0: 0a000005 beq 300035cc <rtems_termios_ioctl+0x288>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300035b4: e3520000 cmp r2, #0 <== NOT EXECUTED
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
300035b8: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300035bc: 13a00000 movne r0, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
300035c0: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300035c4: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED
300035c8: ea000006 b 300035e8 <rtems_termios_ioctl+0x2a4> <== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
300035cc: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
300035d0: 03a03001 moveq r3, #1
300035d4: 0584306c streq r3, [r4, #108] ; 0x6c
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
300035d8: 0a000002 beq 300035e8 <rtems_termios_ioctl+0x2a4>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
300035dc: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
300035e0: e5843070 str r3, [r4, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300035e4: e5843074 str r3, [r4, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
300035e8: e59430a8 ldr r3, [r4, #168] ; 0xa8
300035ec: e3530000 cmp r3, #0
300035f0: 0a000032 beq 300036c0 <rtems_termios_ioctl+0x37c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
300035f4: e5940010 ldr r0, [r4, #16]
300035f8: e2841030 add r1, r4, #48 ; 0x30
300035fc: e1a0e00f mov lr, pc
30003600: e12fff13 bx r3
30003604: ea00002d b 300036c0 <rtems_termios_ioctl+0x37c>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
30003608: e1a00004 mov r0, r4
3000360c: ebfffdb4 bl 30002ce4 <drainOutput>
break;
30003610: ea00002a b 300036c0 <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
30003614: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
30003618: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED
3000361c: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED
break;
30003620: ea000026 b 300036c0 <rtems_termios_ioctl+0x37c> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
30003624: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
30003628: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED
3000362c: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED
break;
30003630: ea000022 b 300036c0 <rtems_termios_ioctl+0x37c> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
30003634: e59420cc ldr r2, [r4, #204] ; 0xcc
30003638: e59f309c ldr r3, [pc, #156] ; 300036dc <rtems_termios_ioctl+0x398>
3000363c: e0833282 add r3, r3, r2, lsl #5
30003640: e5933004 ldr r3, [r3, #4]
30003644: e3530000 cmp r3, #0
30003648: 0a000003 beq 3000365c <rtems_termios_ioctl+0x318>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3000364c: e1a00004 mov r0, r4
30003650: e1a0e00f mov lr, pc
30003654: e12fff13 bx r3
30003658: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
3000365c: e5953008 ldr r3, [r5, #8]
tty->t_sc = NULL; /* ensure that no more valid data */
30003660: e3a02000 mov r2, #0
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
30003664: e5933000 ldr r3, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
30003668: e58420d0 str r2, [r4, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3000366c: e59f2068 ldr r2, [pc, #104] ; 300036dc <rtems_termios_ioctl+0x398>
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
30003670: e58430cc str r3, [r4, #204] ; 0xcc
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
30003674: e7923283 ldr r3, [r2, r3, lsl #5]
30003678: e3530000 cmp r3, #0
3000367c: 0a00000f beq 300036c0 <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
30003680: e1a00004 mov r0, r4
30003684: e1a0e00f mov lr, pc
30003688: e12fff13 bx r3
3000368c: e1a06000 mov r6, r0
30003690: ea00000a b 300036c0 <rtems_termios_ioctl+0x37c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
30003694: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
30003698: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3000369c: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
300036a0: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
300036a4: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
300036a8: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
300036ac: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
300036b0: e0611000 rsb r1, r1, r0 <== NOT EXECUTED
300036b4: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
300036b8: e0813003 add r3, r1, r3 <== NOT EXECUTED
300036bc: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
300036c0: e5940018 ldr r0, [r4, #24]
300036c4: eb0006a5 bl 30005160 <rtems_semaphore_release>
args->ioctl_return = sc;
300036c8: e585600c str r6, [r5, #12]
return sc;
}
300036cc: e1a00006 mov r0, r6
300036d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002d40 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30002d40: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
30002d44: e58d300c str r3, [sp, #12]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30002d48: e59f3404 ldr r3, [pc, #1028] ; 30003154 <rtems_termios_open+0x414>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30002d4c: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30002d50: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30002d54: e1a09000 mov r9, r0
30002d58: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30002d5c: e5930000 ldr r0, [r3]
30002d60: e1a02001 mov r2, r1
30002d64: eb0008b7 bl 30005048 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30002d68: e2506000 subs r6, r0, #0
30002d6c: 1a0000ee bne 3000312c <rtems_termios_open+0x3ec>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
30002d70: e59f33e0 ldr r3, [pc, #992] ; 30003158 <rtems_termios_open+0x418>
30002d74: e5937000 ldr r7, [r3]
30002d78: e1a05007 mov r5, r7
30002d7c: ea000006 b 30002d9c <rtems_termios_open+0x5c>
if ((tty->major == major) && (tty->minor == minor))
30002d80: e595300c ldr r3, [r5, #12]
30002d84: e1530009 cmp r3, r9
30002d88: 1a000002 bne 30002d98 <rtems_termios_open+0x58>
30002d8c: e5953010 ldr r3, [r5, #16]
30002d90: e153000a cmp r3, sl
30002d94: 0a0000c3 beq 300030a8 <rtems_termios_open+0x368>
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) {
30002d98: e5955000 ldr r5, [r5]
30002d9c: e3550000 cmp r5, #0
30002da0: 1afffff6 bne 30002d80 <rtems_termios_open+0x40>
30002da4: ea0000e3 b 30003138 <rtems_termios_open+0x3f8>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
30002da8: e59f23ac ldr r2, [pc, #940] ; 3000315c <rtems_termios_open+0x41c>
30002dac: e5923000 ldr r3, [r2]
30002db0: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30002db4: e5950064 ldr r0, [r5, #100] ; 0x64
30002db8: e58d2008 str r2, [sp, #8]
30002dbc: ebfffd00 bl 300021c4 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
30002dc0: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30002dc4: e1a0b000 mov fp, r0
30002dc8: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
30002dcc: e59d2008 ldr r2, [sp, #8]
30002dd0: 1a000006 bne 30002df0 <rtems_termios_open+0xb0>
free(tty);
30002dd4: e1a00005 mov r0, r5 <== NOT EXECUTED
30002dd8: ebfffc2a bl 30001e88 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
30002ddc: e59f3370 ldr r3, [pc, #880] ; 30003154 <rtems_termios_open+0x414><== NOT EXECUTED
return RTEMS_NO_MEMORY;
30002de0: e3a0601a mov r6, #26 <== NOT EXECUTED
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
30002de4: e5930000 ldr r0, [r3] <== NOT EXECUTED
30002de8: eb0008dc bl 30005160 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
30002dec: ea0000ce b 3000312c <rtems_termios_open+0x3ec> <== NOT EXECUTED
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
30002df0: e5923004 ldr r3, [r2, #4]
30002df4: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
30002df8: e5950088 ldr r0, [r5, #136] ; 0x88
30002dfc: e58d2008 str r2, [sp, #8]
30002e00: ebfffcef bl 300021c4 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
30002e04: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
30002e08: e1a03000 mov r3, r0
30002e0c: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
30002e10: e59d2008 ldr r2, [sp, #8]
30002e14: 0a000008 beq 30002e3c <rtems_termios_open+0xfc>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
30002e18: e5920008 ldr r0, [r2, #8]
30002e1c: e58d3008 str r3, [sp, #8]
30002e20: ebfffce7 bl 300021c4 <malloc>
if (tty->cbuf == NULL) {
30002e24: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
30002e28: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
30002e2c: e59d3008 ldr r3, [sp, #8]
30002e30: 1a000004 bne 30002e48 <rtems_termios_open+0x108>
free((void *)(tty->rawOutBuf.theBuf));
30002e34: e1a00003 mov r0, r3 <== NOT EXECUTED
30002e38: ebfffc12 bl 30001e88 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
30002e3c: e1a0000b mov r0, fp <== NOT EXECUTED
30002e40: ebfffc10 bl 30001e88 <free> <== NOT EXECUTED
30002e44: eaffffe2 b 30002dd4 <rtems_termios_open+0x94> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
30002e48: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
30002e4c: e5853004 str r3, [r5, #4]
if (rtems_termios_ttyHead != NULL)
30002e50: e1570003 cmp r7, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
30002e54: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
30002e58: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
30002e5c: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
30002e60: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
30002e64: e58530e4 str r3, [r5, #228] ; 0xe4
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30002e68: e59f32e8 ldr r3, [pc, #744] ; 30003158 <rtems_termios_open+0x418>
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
30002e6c: 15875004 strne r5, [r7, #4]
rtems_termios_ttyHead = tty;
30002e70: e5834000 str r4, [r3]
if (rtems_termios_ttyTail == NULL)
30002e74: e59f32e4 ldr r3, [pc, #740] ; 30003160 <rtems_termios_open+0x420>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30002e78: e5857000 str r7, [r5]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30002e7c: e5932000 ldr r2, [r3]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30002e80: e59f72d4 ldr r7, [pc, #724] ; 3000315c <rtems_termios_open+0x41c>
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30002e84: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
30002e88: 05834000 streq r4, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30002e8c: e59f02d0 ldr r0, [pc, #720] ; 30003164 <rtems_termios_open+0x424>
rtems_build_name ('T', 'R', 'i', c),
30002e90: e5d7300c ldrb r3, [r7, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30002e94: e2842014 add r2, r4, #20
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
30002e98: e584a010 str sl, [r4, #16]
tty->major = major;
30002e9c: e584900c str r9, [r4, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30002ea0: e1830000 orr r0, r3, r0
30002ea4: e58d2000 str r2, [sp]
30002ea8: e3a03000 mov r3, #0
30002eac: e3a01001 mov r1, #1
30002eb0: e3a02054 mov r2, #84 ; 0x54
30002eb4: eb0007d1 bl 30004e00 <rtems_semaphore_create>
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)
30002eb8: e2503000 subs r3, r0, #0
30002ebc: 1a000096 bne 3000311c <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
30002ec0: e5d7200c ldrb r2, [r7, #12]
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 (
30002ec4: e59f029c ldr r0, [pc, #668] ; 30003168 <rtems_termios_open+0x428>
30002ec8: e2841018 add r1, r4, #24
30002ecc: e58d1000 str r1, [sp]
30002ed0: e1820000 orr r0, r2, r0
30002ed4: e3a01001 mov r1, #1
30002ed8: e3a02054 mov r2, #84 ; 0x54
30002edc: eb0007c7 bl 30004e00 <rtems_semaphore_create>
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)
30002ee0: e2501000 subs r1, r0, #0
30002ee4: 1a00008c bne 3000311c <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
30002ee8: e5d7300c ldrb r3, [r7, #12]
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 (
30002eec: e59f0278 ldr r0, [pc, #632] ; 3000316c <rtems_termios_open+0x42c>
30002ef0: e284208c add r2, r4, #140 ; 0x8c
30002ef4: e58d2000 str r2, [sp]
30002ef8: e1830000 orr r0, r3, r0
30002efc: e3a02020 mov r2, #32
30002f00: e1a03001 mov r3, r1
30002f04: eb0007bd bl 30004e00 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
30002f08: e250b000 subs fp, r0, #0
30002f0c: 1a000082 bne 3000311c <rtems_termios_open+0x3dc>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
30002f10: e59de00c ldr lr, [sp, #12]
30002f14: e284c098 add ip, r4, #152 ; 0x98
30002f18: e8be000f ldm lr!, {r0, r1, r2, r3}
30002f1c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002f20: e89e000f ldm lr, {r0, r1, r2, r3}
30002f24: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30002f28: e59430b4 ldr r3, [r4, #180] ; 0xb4
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
30002f2c: e584b094 str fp, [r4, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30002f30: e3530002 cmp r3, #2
30002f34: 1a000017 bne 30002f98 <rtems_termios_open+0x258>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
30002f38: e5d7300c ldrb r3, [r7, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
30002f3c: e59f022c ldr r0, [pc, #556] ; 30003170 <rtems_termios_open+0x430>
30002f40: e28420c8 add r2, r4, #200 ; 0xc8
30002f44: e58d2004 str r2, [sp, #4]
30002f48: e1830000 orr r0, r3, r0
30002f4c: e3a02b01 mov r2, #1024 ; 0x400
30002f50: e3a0100a mov r1, #10
30002f54: e3a03c05 mov r3, #1280 ; 0x500
30002f58: e58db000 str fp, [sp]
30002f5c: eb0008a6 bl 300051fc <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
30002f60: e2502000 subs r2, r0, #0
30002f64: 1a00006c bne 3000311c <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
30002f68: e5d7300c ldrb r3, [r7, #12]
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
30002f6c: e59f0200 ldr r0, [pc, #512] ; 30003174 <rtems_termios_open+0x434>
30002f70: e58d2000 str r2, [sp]
30002f74: e28420c4 add r2, r4, #196 ; 0xc4
30002f78: e58d2004 str r2, [sp, #4]
30002f7c: e1830000 orr r0, r3, r0
30002f80: e3a01009 mov r1, #9
30002f84: e3a02b01 mov r2, #1024 ; 0x400
30002f88: e3a03c05 mov r3, #1280 ; 0x500
30002f8c: eb00089a bl 300051fc <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
30002f90: e3500000 cmp r0, #0
30002f94: 1a000060 bne 3000311c <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
30002f98: e59430a0 ldr r3, [r4, #160] ; 0xa0
30002f9c: e3530000 cmp r3, #0
30002fa0: 0a000002 beq 30002fb0 <rtems_termios_open+0x270>
30002fa4: e59430b4 ldr r3, [r4, #180] ; 0xb4
30002fa8: e3530002 cmp r3, #2
30002fac: 1a00000b bne 30002fe0 <rtems_termios_open+0x2a0>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
30002fb0: e59f31a4 ldr r3, [pc, #420] ; 3000315c <rtems_termios_open+0x41c>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30002fb4: e59f01bc ldr r0, [pc, #444] ; 30003178 <rtems_termios_open+0x438>
rtems_build_name ('T', 'R', 'r', c),
30002fb8: e5d3300c ldrb r3, [r3, #12]
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30002fbc: e2842068 add r2, r4, #104 ; 0x68
30002fc0: e3a01000 mov r1, #0
30002fc4: e58d2000 str r2, [sp]
30002fc8: e1830000 orr r0, r3, r0
30002fcc: e3a02024 mov r2, #36 ; 0x24
30002fd0: e1a03001 mov r3, r1
30002fd4: eb000789 bl 30004e00 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
30002fd8: e3500000 cmp r0, #0
30002fdc: 1a00004e bne 3000311c <rtems_termios_open+0x3dc>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30002fe0: e59f3194 ldr r3, [pc, #404] ; 3000317c <rtems_termios_open+0x43c>
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
30002fe4: e3a02011 mov r2, #17
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30002fe8: e5843030 str r3, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30002fec: e59f318c ldr r3, [pc, #396] ; 30003180 <rtems_termios_open+0x440>
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
30002ff0: e5c42049 strb r2, [r4, #73] ; 0x49
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30002ff4: e5843034 str r3, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
30002ff8: e59f3184 ldr r3, [pc, #388] ; 30003184 <rtems_termios_open+0x444>
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
30002ffc: e2822002 add r2, r2, #2
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
30003000: e5843038 str r3, [r4, #56] ; 0x38
tty->termios.c_lflag =
30003004: e59f317c ldr r3, [pc, #380] ; 30003188 <rtems_termios_open+0x448>
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
30003008: e5c4204a strb r2, [r4, #74] ; 0x4a
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
3000300c: e584303c str r3, [r4, #60] ; 0x3c
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
30003010: e3a03003 mov r3, #3
30003014: e5c43041 strb r3, [r4, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
30003018: e2833019 add r3, r3, #25
3000301c: e5c43042 strb r3, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
30003020: e2833063 add r3, r3, #99 ; 0x63
30003024: e5c43043 strb r3, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
30003028: e3a03015 mov r3, #21
3000302c: e5c43044 strb r3, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
30003030: e3a03004 mov r3, #4
30003034: e5c43045 strb r3, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
30003038: e3a03000 mov r3, #0
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;
3000303c: e58430b8 str r3, [r4, #184] ; 0xb8
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';
30003040: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
30003044: e5c43051 strb r3, [r4, #81] ; 0x51
/* 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;
30003048: e5943064 ldr r3, [r4, #100] ; 0x64
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
3000304c: e2822007 add r2, r2, #7
/* 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;
30003050: e1a030a3 lsr r3, r3, #1
30003054: e58430bc str r3, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
30003058: e5943064 ldr r3, [r4, #100] ; 0x64
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
3000305c: e5c4204b strb r2, [r4, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
30003060: e3a02012 mov r2, #18
30003064: e5c4204d strb r2, [r4, #77] ; 0x4d
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;
30003068: e0833083 add r3, r3, r3, lsl #1
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
3000306c: e3a0200f mov r2, #15
30003070: e5c4204e strb r2, [r4, #78] ; 0x4e
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;
30003074: e1a03123 lsr r3, r3, #2
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';
30003078: e2822008 add r2, r2, #8
3000307c: e5c4204f strb r2, [r4, #79] ; 0x4f
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;
30003080: e58430c0 str r3, [r4, #192] ; 0xc0
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';
30003084: e3a02016 mov r2, #22
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
30003088: e59f30cc ldr r3, [pc, #204] ; 3000315c <rtems_termios_open+0x41c>
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';
3000308c: e5c42050 strb r2, [r4, #80] ; 0x50
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
30003090: e5d3200c ldrb r2, [r3, #12]
30003094: e352007a cmp r2, #122 ; 0x7a
30003098: e2821001 add r1, r2, #1
c = 'a';
3000309c: 03a02061 moveq r2, #97 ; 0x61
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
300030a0: e5c3100c strb r1, [r3, #12]
c = 'a';
300030a4: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
300030a8: e5983000 ldr r3, [r8]
300030ac: e5835034 str r5, [r3, #52] ; 0x34
if (!tty->refcount++) {
300030b0: e5953008 ldr r3, [r5, #8]
300030b4: e2832001 add r2, r3, #1
300030b8: e3530000 cmp r3, #0
300030bc: e5852008 str r2, [r5, #8]
300030c0: 1a000016 bne 30003120 <rtems_termios_open+0x3e0>
if (tty->device.firstOpen)
300030c4: e5953098 ldr r3, [r5, #152] ; 0x98
300030c8: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
300030cc: 11a00009 movne r0, r9
300030d0: 11a0100a movne r1, sl
300030d4: 11a02008 movne r2, r8
300030d8: 11a0e00f movne lr, pc
300030dc: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300030e0: e59530b4 ldr r3, [r5, #180] ; 0xb4
300030e4: e3530002 cmp r3, #2
300030e8: 1a00000c bne 30003120 <rtems_termios_open+0x3e0>
sc = rtems_task_start(
300030ec: e59500c4 ldr r0, [r5, #196] ; 0xc4
300030f0: e59f1094 ldr r1, [pc, #148] ; 3000318c <rtems_termios_open+0x44c>
300030f4: e1a02005 mov r2, r5
300030f8: eb0008e7 bl 3000549c <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
300030fc: e3500000 cmp r0, #0
30003100: 1a000005 bne 3000311c <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
30003104: e59500c8 ldr r0, [r5, #200] ; 0xc8
30003108: e59f1080 ldr r1, [pc, #128] ; 30003190 <rtems_termios_open+0x450>
3000310c: e1a02005 mov r2, r5
30003110: eb0008e1 bl 3000549c <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003114: e3500000 cmp r0, #0
30003118: 0a000000 beq 30003120 <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
3000311c: eb00095f bl 300056a0 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
30003120: e59f302c ldr r3, [pc, #44] ; 30003154 <rtems_termios_open+0x414>
30003124: e5930000 ldr r0, [r3]
30003128: eb00080c bl 30005160 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
3000312c: e1a00006 mov r0, r6
30003130: e28dd010 add sp, sp, #16
30003134: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
30003138: e3a00001 mov r0, #1
3000313c: e3a010e8 mov r1, #232 ; 0xe8
30003140: ebfffad5 bl 30001c9c <calloc>
if (tty == NULL) {
30003144: e2504000 subs r4, r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
30003148: e1a05000 mov r5, r0
if (tty == NULL) {
3000314c: 1affff15 bne 30002da8 <rtems_termios_open+0x68>
30003150: eaffff21 b 30002ddc <rtems_termios_open+0x9c> <== NOT EXECUTED
30003e28 <rtems_termios_read>:
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003e28: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003e2c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003e30: e5934034 ldr r4, [r3, #52] ; 0x34
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003e34: e3a01000 mov r1, #0
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
30003e38: e5908010 ldr r8, [r0, #16]
char *buffer = args->buffer;
30003e3c: e590b00c ldr fp, [r0, #12]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003e40: e1a05000 mov r5, r0
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003e44: e1a02001 mov r2, r1
30003e48: e5940014 ldr r0, [r4, #20]
30003e4c: eb00047d bl 30005048 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30003e50: e2507000 subs r7, r0, #0
30003e54: 1a0000be bne 30004154 <rtems_termios_read+0x32c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
30003e58: e59420cc ldr r2, [r4, #204] ; 0xcc
30003e5c: e59f32f8 ldr r3, [pc, #760] ; 3000415c <rtems_termios_read+0x334>
30003e60: e0833282 add r3, r3, r2, lsl #5
30003e64: e5933008 ldr r3, [r3, #8]
30003e68: e3530000 cmp r3, #0
30003e6c: 0a000005 beq 30003e88 <rtems_termios_read+0x60>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30003e70: e1a00004 mov r0, r4
30003e74: e1a01005 mov r1, r5
30003e78: e1a0e00f mov lr, pc
30003e7c: e12fff13 bx r3
30003e80: e1a07000 mov r7, r0
30003e84: ea0000ae b 30004144 <rtems_termios_read+0x31c>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
30003e88: e5942024 ldr r2, [r4, #36] ; 0x24
30003e8c: e5943020 ldr r3, [r4, #32]
30003e90: e1520003 cmp r2, r3
30003e94: 1a0000a1 bne 30004120 <rtems_termios_read+0x2f8>
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
30003e98: e5943028 ldr r3, [r4, #40] ; 0x28
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003e9c: e5847020 str r7, [r4, #32]
tty->read_start_column = tty->column;
30003ea0: e584302c str r3, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
30003ea4: e59430a0 ldr r3, [r4, #160] ; 0xa0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003ea8: e5847024 str r7, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
30003eac: e3530000 cmp r3, #0
30003eb0: 0a00003b beq 30003fa4 <rtems_termios_read+0x17c>
30003eb4: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003eb8: e3530000 cmp r3, #0
30003ebc: 1a000038 bne 30003fa4 <rtems_termios_read+0x17c>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30003ec0: e594303c ldr r3, [r4, #60] ; 0x3c
30003ec4: e3130002 tst r3, #2
30003ec8: 0a00000d beq 30003f04 <rtems_termios_read+0xdc>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30003ecc: e5940010 ldr r0, [r4, #16]
30003ed0: e1a0e00f mov lr, pc
30003ed4: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
30003ed8: e3500000 cmp r0, #0
30003edc: aa000002 bge 30003eec <rtems_termios_read+0xc4>
rtems_task_wake_after (1);
30003ee0: e3a00001 mov r0, #1
30003ee4: eb000584 bl 300054fc <rtems_task_wake_after>
30003ee8: eafffff7 b 30003ecc <rtems_termios_read+0xa4>
} else {
if (siproc (n, tty))
30003eec: e20000ff and r0, r0, #255 ; 0xff
30003ef0: e1a01004 mov r1, r4
30003ef4: ebffff86 bl 30003d14 <siproc>
30003ef8: e3500000 cmp r0, #0
30003efc: 0afffff2 beq 30003ecc <rtems_termios_read+0xa4>
30003f00: ea000086 b 30004120 <rtems_termios_read+0x2f8>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
30003f04: eb0002c4 bl 30004a1c <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
30003f08: e1a06000 mov r6, r0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30003f0c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30003f10: e1a0e00f mov lr, pc <== NOT EXECUTED
30003f14: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
30003f18: e3500000 cmp r0, #0 <== NOT EXECUTED
30003f1c: aa000013 bge 30003f70 <rtems_termios_read+0x148> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
30003f20: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
30003f24: e3530000 cmp r3, #0 <== NOT EXECUTED
30003f28: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
30003f2c: 0a000005 beq 30003f48 <rtems_termios_read+0x120> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
30003f30: e3530000 cmp r3, #0 <== NOT EXECUTED
30003f34: 0a00000a beq 30003f64 <rtems_termios_read+0x13c> <== NOT EXECUTED
30003f38: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30003f3c: e3530000 cmp r3, #0 <== NOT EXECUTED
30003f40: 0a000007 beq 30003f64 <rtems_termios_read+0x13c> <== NOT EXECUTED
30003f44: ea000001 b 30003f50 <rtems_termios_read+0x128> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
30003f48: e3530000 cmp r3, #0 <== NOT EXECUTED
30003f4c: 0a000073 beq 30004120 <rtems_termios_read+0x2f8> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
30003f50: eb0002b1 bl 30004a1c <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
30003f54: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
30003f58: e0660000 rsb r0, r6, r0 <== NOT EXECUTED
30003f5c: e1500003 cmp r0, r3 <== NOT EXECUTED
30003f60: 8a00006e bhi 30004120 <rtems_termios_read+0x2f8> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
30003f64: e3a00001 mov r0, #1 <== NOT EXECUTED
30003f68: eb000563 bl 300054fc <rtems_task_wake_after> <== NOT EXECUTED
30003f6c: eaffffe6 b 30003f0c <rtems_termios_read+0xe4> <== NOT EXECUTED
} else {
siproc (n, tty);
30003f70: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
30003f74: e1a01004 mov r1, r4 <== NOT EXECUTED
30003f78: ebffff65 bl 30003d14 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
30003f7c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
30003f80: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
30003f84: e1520003 cmp r2, r3 <== NOT EXECUTED
30003f88: aa000064 bge 30004120 <rtems_termios_read+0x2f8> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
30003f8c: e3530000 cmp r3, #0 <== NOT EXECUTED
30003f90: 0affffdd beq 30003f0c <rtems_termios_read+0xe4> <== NOT EXECUTED
30003f94: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
30003f98: e3530000 cmp r3, #0 <== NOT EXECUTED
30003f9c: 0affffda beq 30003f0c <rtems_termios_read+0xe4> <== NOT EXECUTED
30003fa0: eaffffd7 b 30003f04 <rtems_termios_read+0xdc> <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
30003fa4: e2842049 add r2, r4, #73 ; 0x49
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
30003fa8: e594a074 ldr sl, [r4, #116] ; 0x74
rtems_status_code sc;
int wait = (int)1;
30003fac: e3a06001 mov r6, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
30003fb0: e59f91a8 ldr r9, [pc, #424] ; 30004160 <rtems_termios_read+0x338>
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)(
30003fb4: e58d2000 str r2, [sp]
30003fb8: ea000040 b 300040c0 <rtems_termios_read+0x298>
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
30003fbc: e594005c ldr r0, [r4, #92] ; 0x5c
30003fc0: e5941064 ldr r1, [r4, #100] ; 0x64
30003fc4: e2800001 add r0, r0, #1
30003fc8: eb002dc8 bl 3000f6f0 <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
30003fcc: e5943058 ldr r3, [r4, #88] ; 0x58
30003fd0: e7d3a000 ldrb sl, [r3, r0]
tty->rawInBuf.Head = newHead;
30003fd4: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
30003fd8: e5943060 ldr r3, [r4, #96] ; 0x60
30003fdc: e5942064 ldr r2, [r4, #100] ; 0x64
% tty->rawInBuf.Size)
30003fe0: e5941064 ldr r1, [r4, #100] ; 0x64
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)
30003fe4: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
30003fe8: e0600003 rsb r0, r0, r3
30003fec: eb002dbf bl 3000f6f0 <__umodsi3>
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)
30003ff0: e59430bc ldr r3, [r4, #188] ; 0xbc
30003ff4: e1500003 cmp r0, r3
30003ff8: 2a00001f bcs 3000407c <rtems_termios_read+0x254>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30003ffc: e59430b8 ldr r3, [r4, #184] ; 0xb8
30004000: e3c33001 bic r3, r3, #1
30004004: e58430b8 str r3, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004008: e59420b8 ldr r2, [r4, #184] ; 0xb8
3000400c: e59f3150 ldr r3, [pc, #336] ; 30004164 <rtems_termios_read+0x33c>
30004010: e0023003 and r3, r2, r3
30004014: e59f2148 ldr r2, [pc, #328] ; 30004164 <rtems_termios_read+0x33c>
30004018: e1530002 cmp r3, r2
3000401c: 1a00000b bne 30004050 <rtems_termios_read+0x228>
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
30004020: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004024: e3530000 cmp r3, #0 <== NOT EXECUTED
30004028: 0a000002 beq 30004038 <rtems_termios_read+0x210> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
3000402c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004030: e3130020 tst r3, #32 <== NOT EXECUTED
30004034: 0a000005 beq 30004050 <rtems_termios_read+0x228> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
30004038: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3000403c: e59d1000 ldr r1, [sp] <== NOT EXECUTED
30004040: e3a02001 mov r2, #1 <== NOT EXECUTED
30004044: e1a0e00f mov lr, pc <== NOT EXECUTED
30004048: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3000404c: ea00000a b 3000407c <rtems_termios_read+0x254> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
30004050: e59430b8 ldr r3, [r4, #184] ; 0xb8
30004054: e3130c01 tst r3, #256 ; 0x100
30004058: 0a000007 beq 3000407c <rtems_termios_read+0x254>
tty->flow_ctrl &= ~FL_IRTSOFF;
3000405c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004060: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
30004064: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
30004068: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
3000406c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
30004070: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
30004074: 11a0e00f movne lr, pc <== NOT EXECUTED
30004078: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
3000407c: e594303c ldr r3, [r4, #60] ; 0x3c
30004080: e3130002 tst r3, #2
30004084: 0a000005 beq 300040a0 <rtems_termios_read+0x278>
if (siproc (c, tty))
30004088: e1a0000a mov r0, sl
3000408c: e1a01004 mov r1, r4
30004090: ebffff1f bl 30003d14 <siproc>
wait = 0;
30004094: e3500000 cmp r0, #0
30004098: 13a06000 movne r6, #0
3000409c: ea000006 b 300040bc <rtems_termios_read+0x294>
} else {
siproc (c, tty);
300040a0: e1a0000a mov r0, sl <== NOT EXECUTED
300040a4: e1a01004 mov r1, r4 <== NOT EXECUTED
300040a8: ebffff19 bl 30003d14 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
300040ac: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300040b0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
300040b4: e1520003 cmp r2, r3 <== NOT EXECUTED
300040b8: a3a06000 movge r6, #0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
300040bc: e594a070 ldr sl, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
300040c0: e594205c ldr r2, [r4, #92] ; 0x5c
300040c4: e5943060 ldr r3, [r4, #96] ; 0x60
300040c8: e1520003 cmp r2, r3
300040cc: 0a000004 beq 300040e4 <rtems_termios_read+0x2bc>
(tty->ccount < (CBUFSIZE-1))) {
300040d0: e5993008 ldr r3, [r9, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
300040d4: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
300040d8: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
300040dc: e1520003 cmp r2, r3
300040e0: baffffb5 blt 30003fbc <rtems_termios_read+0x194>
}
/*
* Wait for characters
*/
if ( wait ) {
300040e4: e3560000 cmp r6, #0
300040e8: 0a00000c beq 30004120 <rtems_termios_read+0x2f8>
sc = rtems_semaphore_obtain(
300040ec: e5940068 ldr r0, [r4, #104] ; 0x68
300040f0: e594106c ldr r1, [r4, #108] ; 0x6c
300040f4: e1a0200a mov r2, sl
300040f8: eb0003d2 bl 30005048 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
300040fc: e3500000 cmp r0, #0
30004100: 0affffee beq 300040c0 <rtems_termios_read+0x298>
30004104: ea000005 b 30004120 <rtems_termios_read+0x2f8> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
30004108: e594201c ldr r2, [r4, #28]
count--;
3000410c: e2488001 sub r8, r8, #1
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
30004110: e7d22003 ldrb r2, [r2, r3]
30004114: e2833001 add r3, r3, #1
30004118: e4cb2001 strb r2, [fp], #1
3000411c: e5843024 str r3, [r4, #36] ; 0x24
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004120: e3580000 cmp r8, #0
30004124: 0a000003 beq 30004138 <rtems_termios_read+0x310>
30004128: e5943024 ldr r3, [r4, #36] ; 0x24
3000412c: e5942020 ldr r2, [r4, #32]
30004130: e1530002 cmp r3, r2
30004134: bafffff3 blt 30004108 <rtems_termios_read+0x2e0>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
30004138: e5953010 ldr r3, [r5, #16]
3000413c: e0688003 rsb r8, r8, r3
30004140: e5858018 str r8, [r5, #24]
tty->tty_rcvwakeup = 0;
30004144: e3a03000 mov r3, #0
30004148: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
3000414c: e5940014 ldr r0, [r4, #20]
30004150: eb000402 bl 30005160 <rtems_semaphore_release>
return sc;
}
30004154: e1a00007 mov r0, r7
30004158: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
30004478 <rtems_termios_refill_transmitter>:
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30004478: e59020b8 ldr r2, [r0, #184] ; 0xb8
3000447c: e59f31b8 ldr r3, [pc, #440] ; 3000463c <rtems_termios_refill_transmitter+0x1c4>
* 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)
{
30004480: e92d4070 push {r4, r5, r6, lr}
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30004484: e0023003 and r3, r2, r3
30004488: e59f21b0 ldr r2, [pc, #432] ; 30004640 <rtems_termios_refill_transmitter+0x1c8>
* 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)
{
3000448c: e1a04000 mov r4, r0
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30004490: e1530002 cmp r3, r2
30004494: 1a00000c bne 300044cc <rtems_termios_refill_transmitter+0x54>
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
30004498: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
3000449c: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
300044a0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
300044a4: e1a0e00f mov lr, pc <== NOT EXECUTED
300044a8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
300044ac: ebfffa08 bl 30002cd4 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
300044b0: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
300044b4: e2433001 sub r3, r3, #1 <== NOT EXECUTED
300044b8: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
300044bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300044c0: e3833002 orr r3, r3, #2 <== NOT EXECUTED
300044c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
rtems_interrupt_enable(level);
300044c8: ea00000f b 3000450c <rtems_termios_refill_transmitter+0x94><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
300044cc: e59030b8 ldr r3, [r0, #184] ; 0xb8
300044d0: e2033003 and r3, r3, #3
300044d4: e3530002 cmp r3, #2
300044d8: 1a00000e bne 30004518 <rtems_termios_refill_transmitter+0xa0>
* 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);
300044dc: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
300044e0: e3a02001 mov r2, #1 <== NOT EXECUTED
300044e4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
300044e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300044ec: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
300044f0: ebfff9f7 bl 30002cd4 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
300044f4: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
300044f8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
300044fc: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004500: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004504: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
30004508: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000450c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
30004510: e3a05001 mov r5, #1 <== NOT EXECUTED
30004514: ea000046 b 30004634 <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
30004518: e5902080 ldr r2, [r0, #128] ; 0x80
3000451c: e5903084 ldr r3, [r0, #132] ; 0x84
30004520: e1520003 cmp r2, r3
30004524: 1a000005 bne 30004540 <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
30004528: e5903094 ldr r3, [r0, #148] ; 0x94
3000452c: e3530002 cmp r3, #2
30004530: 1a00003e bne 30004630 <rtems_termios_refill_transmitter+0x1b8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004534: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
30004538: eb000308 bl 30005160 <rtems_semaphore_release> <== NOT EXECUTED
3000453c: ea00003b b 30004630 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
30004540: ebfff9e3 bl 30002cd4 <arm_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
30004544: e3a03000 mov r3, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
30004548: e5942090 ldr r2, [r4, #144] ; 0x90
tty->t_dqlen = 0;
3000454c: e5843090 str r3, [r4, #144] ; 0x90
30004550: e129f000 msr CPSR_fc, r0
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
30004554: e5943084 ldr r3, [r4, #132] ; 0x84
30004558: e5941088 ldr r1, [r4, #136] ; 0x88
3000455c: e0820003 add r0, r2, r3
30004560: eb002c62 bl 3000f6f0 <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30004564: e5943094 ldr r3, [r4, #148] ; 0x94
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
30004568: e1a06000 mov r6, r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
3000456c: e3530002 cmp r3, #2
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
30004570: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004574: 0594008c ldreq r0, [r4, #140] ; 0x8c
30004578: 0b0002f8 bleq 30005160 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
3000457c: e5943080 ldr r3, [r4, #128] ; 0x80
30004580: e1560003 cmp r6, r3
30004584: 1a00000a bne 300045b4 <rtems_termios_refill_transmitter+0x13c>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004588: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
3000458c: e3a05000 mov r5, #0
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004590: e1530005 cmp r3, r5
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004594: e5845094 str r5, [r4, #148] ; 0x94
nToSend = 0;
30004598: 01a05003 moveq r5, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
3000459c: 0a000021 beq 30004628 <rtems_termios_refill_transmitter+0x1b0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
300045a0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
300045a4: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
300045a8: e1a0e00f mov lr, pc <== NOT EXECUTED
300045ac: e12fff13 bx r3 <== NOT EXECUTED
300045b0: ea00001c b 30004628 <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
300045b4: e59430b8 ldr r3, [r4, #184] ; 0xb8
300045b8: e2033e21 and r3, r3, #528 ; 0x210
300045bc: e3530e21 cmp r3, #528 ; 0x210
300045c0: 1a000008 bne 300045e8 <rtems_termios_refill_transmitter+0x170>
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
300045c4: ebfff9c2 bl 30002cd4 <arm_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
300045c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300045cc: e3833020 orr r3, r3, #32 <== NOT EXECUTED
300045d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
300045d4: e3a03001 mov r3, #1 <== NOT EXECUTED
300045d8: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
300045dc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
300045e0: e3a05000 mov r5, #0 <== NOT EXECUTED
300045e4: ea00000f b 30004628 <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
300045e8: e5943080 ldr r3, [r4, #128] ; 0x80
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
300045ec: e594107c ldr r1, [r4, #124] ; 0x7c
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
300045f0: e1560003 cmp r6, r3
nToSend = tty->rawOutBuf.Size - newTail;
300045f4: 85945088 ldrhi r5, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
300045f8: 95945080 ldrls r5, [r4, #128] ; 0x80
/* 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)) {
300045fc: e59430b8 ldr r3, [r4, #184] ; 0xb8
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
30004600: e0665005 rsb r5, r6, r5
/* 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)) {
30004604: e3130c06 tst r3, #1536 ; 0x600
nToSend = 1;
30004608: 13a05001 movne r5, #1
}
tty->rawOutBufState = rob_busy; /*apm*/
3000460c: e3a03001 mov r3, #1
30004610: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
30004614: e5940010 ldr r0, [r4, #16]
30004618: e0811006 add r1, r1, r6
3000461c: e1a02005 mov r2, r5
30004620: e1a0e00f mov lr, pc
30004624: e594f0a4 ldr pc, [r4, #164] ; 0xa4
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
30004628: e5846084 str r6, [r4, #132] ; 0x84
3000462c: ea000000 b 30004634 <rtems_termios_refill_transmitter+0x1bc>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
30004630: e3a05000 mov r5, #0
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
30004634: e1a00005 mov r0, r5
30004638: e8bd8070 pop {r4, r5, r6, pc}
3000632c <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
3000632c: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006330: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30006334: e1a05000 mov r5, r0
30006338: e1a08001 mov r8, r1
3000633c: e1a04002 mov r4, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006340: 0a00000e beq 30006380 <rtems_verror+0x54>
if (rtems_panic_in_progress++)
30006344: e59f212c ldr r2, [pc, #300] ; 30006478 <rtems_verror+0x14c>
30006348: e5923000 ldr r3, [r2]
3000634c: e2831001 add r1, r3, #1
30006350: e3530000 cmp r3, #0
30006354: e5821000 str r1, [r2]
30006358: 0a000003 beq 3000636c <rtems_verror+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
3000635c: e59f3118 ldr r3, [pc, #280] ; 3000647c <rtems_verror+0x150><== NOT EXECUTED
30006360: e5932000 ldr r2, [r3] <== NOT EXECUTED
30006364: e2822001 add r2, r2, #1 <== NOT EXECUTED
30006368: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
3000636c: e59f3104 ldr r3, [pc, #260] ; 30006478 <rtems_verror+0x14c>
30006370: e5933000 ldr r3, [r3]
30006374: e3530002 cmp r3, #2
return 0;
30006378: c3a04000 movgt r4, #0
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
3000637c: ca00003b bgt 30006470 <rtems_verror+0x144>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006380: e59f30f8 ldr r3, [pc, #248] ; 30006480 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
30006384: e3c56207 bic r6, r5, #1879048192 ; 0x70000000
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006388: e5933000 ldr r3, [r3]
3000638c: e5930008 ldr r0, [r3, #8]
30006390: eb002bc5 bl 300112ac <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
30006394: e2155101 ands r5, r5, #1073741824 ; 0x40000000
30006398: 0a000001 beq 300063a4 <rtems_verror+0x78>
local_errno = errno;
3000639c: eb002acb bl 30010ed0 <__errno>
300063a0: e5905000 ldr r5, [r0]
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
300063a4: e59f70d4 ldr r7, [pc, #212] ; 30006480 <rtems_verror+0x154>
300063a8: e1a02004 mov r2, r4
300063ac: e5973000 ldr r3, [r7]
300063b0: e1a01008 mov r1, r8
300063b4: e593000c ldr r0, [r3, #12]
300063b8: eb004432 bl 30017488 <vfprintf>
if (status)
300063bc: e3560000 cmp r6, #0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
300063c0: e1a04000 mov r4, r0
if (status)
300063c4: 0a000008 beq 300063ec <rtems_verror+0xc0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
300063c8: e5973000 ldr r3, [r7]
300063cc: e1a00006 mov r0, r6
300063d0: e593700c ldr r7, [r3, #12]
300063d4: ebffffd0 bl 3000631c <rtems_status_text>
300063d8: e59f10a4 ldr r1, [pc, #164] ; 30006484 <rtems_verror+0x158>
300063dc: e1a02000 mov r2, r0
300063e0: e1a00007 mov r0, r7
300063e4: eb002c96 bl 30011644 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
300063e8: e0844000 add r4, r4, r0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
300063ec: e3550000 cmp r5, #0
300063f0: 0a000015 beq 3000644c <rtems_verror+0x120>
if ((local_errno > 0) && *strerror(local_errno))
300063f4: da00000d ble 30006430 <rtems_verror+0x104>
300063f8: e1a00005 mov r0, r5
300063fc: eb002f99 bl 30012268 <strerror>
30006400: e5d03000 ldrb r3, [r0]
30006404: e3530000 cmp r3, #0
30006408: 0a000008 beq 30006430 <rtems_verror+0x104>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
3000640c: e59f306c ldr r3, [pc, #108] ; 30006480 <rtems_verror+0x154>
30006410: e1a00005 mov r0, r5
30006414: e5933000 ldr r3, [r3]
30006418: e593600c ldr r6, [r3, #12]
3000641c: eb002f91 bl 30012268 <strerror>
30006420: e59f1060 ldr r1, [pc, #96] ; 30006488 <rtems_verror+0x15c>
30006424: e1a02000 mov r2, r0
30006428: e1a00006 mov r0, r6
3000642c: ea000004 b 30006444 <rtems_verror+0x118>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
30006430: e59f3048 ldr r3, [pc, #72] ; 30006480 <rtems_verror+0x154>
30006434: e59f1050 ldr r1, [pc, #80] ; 3000648c <rtems_verror+0x160>
30006438: e5933000 ldr r3, [r3]
3000643c: e1a02005 mov r2, r5
30006440: e593000c ldr r0, [r3, #12]
30006444: eb002c7e bl 30011644 <fprintf>
30006448: e0844000 add r4, r4, r0
}
chars_written += fprintf(stderr, "\n");
3000644c: e59f502c ldr r5, [pc, #44] ; 30006480 <rtems_verror+0x154>
30006450: e59f1038 ldr r1, [pc, #56] ; 30006490 <rtems_verror+0x164>
30006454: e5953000 ldr r3, [r5]
30006458: e593000c ldr r0, [r3, #12]
3000645c: eb002c78 bl 30011644 <fprintf>
(void) fflush(stderr);
30006460: e5953000 ldr r3, [r5]
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
30006464: e0804004 add r4, r0, r4
(void) fflush(stderr);
30006468: e593000c ldr r0, [r3, #12]
3000646c: eb002b8e bl 300112ac <fflush>
return chars_written;
}
30006470: e1a00004 mov r0, r4
30006474: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
300025b0 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
300025b0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
300025b4: e3a04000 mov r4, #0
int d;
for (;;) {
c = getc(fp);
300025b8: e59fb0d8 ldr fp, [pc, #216] ; 30002698 <scanInt+0xe8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
300025bc: e59f90d8 ldr r9, [pc, #216] ; 3000269c <scanInt+0xec>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
300025c0: e1a05000 mov r5, r0
300025c4: e58d1000 str r1, [sp]
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
300025c8: e3e08102 mvn r8, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
300025cc: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
300025d0: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
300025d4: e5953004 ldr r3, [r5, #4]
300025d8: e2433001 sub r3, r3, #1
300025dc: e3530000 cmp r3, #0
300025e0: e5853004 str r3, [r5, #4]
300025e4: a5953000 ldrge r3, [r5]
300025e8: a4d36001 ldrbge r6, [r3], #1
300025ec: a5853000 strge r3, [r5]
300025f0: aa000003 bge 30002604 <scanInt+0x54>
300025f4: e59b0000 ldr r0, [fp] <== NOT EXECUTED
300025f8: e1a01005 mov r1, r5 <== NOT EXECUTED
300025fc: eb0030f0 bl 3000e9c4 <__srget_r> <== NOT EXECUTED
30002600: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
30002604: e356003a cmp r6, #58 ; 0x3a
30002608: 0a000019 beq 30002674 <scanInt+0xc4>
break;
if (sign == 0) {
3000260c: e3540000 cmp r4, #0
30002610: 1a000004 bne 30002628 <scanInt+0x78>
if (c == '-') {
30002614: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
30002618: 02888001 addeq r8, r8, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
3000261c: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
30002620: 0affffeb beq 300025d4 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
30002624: e3a04001 mov r4, #1
}
if (!isdigit(c))
30002628: e5993000 ldr r3, [r9]
3000262c: e0833006 add r3, r3, r6
30002630: e5d30001 ldrb r0, [r3, #1]
30002634: e2100004 ands r0, r0, #4
30002638: 0a000015 beq 30002694 <scanInt+0xe4>
return 0;
d = c - '0';
if ((i > (limit / 10))
3000263c: e1a00008 mov r0, r8
30002640: e3a0100a mov r1, #10
30002644: eb0039e8 bl 30010dec <__aeabi_uidiv>
30002648: e1570000 cmp r7, r0
3000264c: 8a00000f bhi 30002690 <scanInt+0xe0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
30002650: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
30002654: 1a000004 bne 3000266c <scanInt+0xbc>
30002658: e1a00008 mov r0, r8 <== NOT EXECUTED
3000265c: e3a0100a mov r1, #10 <== NOT EXECUTED
30002660: eb003a79 bl 3001104c <__umodsi3> <== NOT EXECUTED
30002664: e1560000 cmp r6, r0 <== NOT EXECUTED
30002668: 8a000008 bhi 30002690 <scanInt+0xe0> <== NOT EXECUTED
return 0;
i = i * 10 + d;
3000266c: e027679a mla r7, sl, r7, r6
30002670: eaffffd7 b 300025d4 <scanInt+0x24>
}
if (sign == 0)
30002674: e3540000 cmp r4, #0
return 0;
30002678: 01a00004 moveq r0, r4
*val = i * sign;
3000267c: 10040497 mulne r4, r7, r4
30002680: 159d3000 ldrne r3, [sp]
return 1;
30002684: 13a00001 movne r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
30002688: 15834000 strne r4, [r3]
return 1;
3000268c: ea000000 b 30002694 <scanInt+0xe4>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
30002690: e3a00000 mov r0, #0 <== NOT EXECUTED
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
30002694: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
300026a0 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
300026a0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300026a4: e1a06003 mov r6, r3
int c;
*name = *bufp;
300026a8: e5923000 ldr r3, [r2]
for (;;) {
c = getc(fp);
300026ac: e59f80d8 ldr r8, [pc, #216] ; 3000278c <scanString+0xec>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
300026b0: e59d7018 ldr r7, [sp, #24]
300026b4: e1a04000 mov r4, r0
300026b8: e1a05002 mov r5, r2
int c;
*name = *bufp;
300026bc: e5813000 str r3, [r1]
for (;;) {
c = getc(fp);
300026c0: e5943004 ldr r3, [r4, #4]
300026c4: e2433001 sub r3, r3, #1
300026c8: e3530000 cmp r3, #0
300026cc: e5843004 str r3, [r4, #4]
300026d0: a5943000 ldrge r3, [r4]
300026d4: a4d30001 ldrbge r0, [r3], #1
300026d8: a5843000 strge r3, [r4]
300026dc: b5980000 ldrlt r0, [r8]
300026e0: b1a01004 movlt r1, r4
300026e4: bb0030b6 bllt 3000e9c4 <__srget_r>
if (c == ':') {
300026e8: e350003a cmp r0, #58 ; 0x3a
300026ec: 1a000002 bne 300026fc <scanString+0x5c>
if (nlFlag)
300026f0: e3570000 cmp r7, #0
300026f4: 0a000013 beq 30002748 <scanString+0xa8>
300026f8: ea00001f b 3000277c <scanString+0xdc>
return 0;
break;
}
if (c == '\n') {
300026fc: e350000a cmp r0, #10
30002700: 1a000002 bne 30002710 <scanString+0x70>
if (!nlFlag)
30002704: e3570000 cmp r7, #0
30002708: 1a00000e bne 30002748 <scanString+0xa8>
3000270c: ea000018 b 30002774 <scanString+0xd4>
return 0;
break;
}
if (c == EOF)
30002710: e3700001 cmn r0, #1
30002714: 0a000018 beq 3000277c <scanString+0xdc>
return 0;
if (*nleft < 2)
30002718: e5963000 ldr r3, [r6]
3000271c: e3530001 cmp r3, #1
30002720: 9a000017 bls 30002784 <scanString+0xe4>
return 0;
**bufp = c;
30002724: e5953000 ldr r3, [r5]
30002728: e5c30000 strb r0, [r3]
++(*bufp);
3000272c: e5953000 ldr r3, [r5]
30002730: e2833001 add r3, r3, #1
30002734: e5853000 str r3, [r5]
--(*nleft);
30002738: e5963000 ldr r3, [r6]
3000273c: e2433001 sub r3, r3, #1
30002740: e5863000 str r3, [r6]
}
30002744: eaffffdd b 300026c0 <scanString+0x20>
**bufp = '\0';
30002748: e5953000 ldr r3, [r5]
3000274c: e3a02000 mov r2, #0
30002750: e5c32000 strb r2, [r3]
++(*bufp);
30002754: e5953000 ldr r3, [r5]
--(*nleft);
return 1;
30002758: e3a00001 mov r0, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
3000275c: e2833001 add r3, r3, #1
30002760: e5853000 str r3, [r5]
--(*nleft);
30002764: e5963000 ldr r3, [r6]
30002768: e2433001 sub r3, r3, #1
3000276c: e5863000 str r3, [r6]
return 1;
30002770: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
return 0;
30002774: e1a00007 mov r0, r7
30002778: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
break;
}
if (c == EOF)
return 0;
3000277c: e3a00000 mov r0, #0
30002780: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (*nleft < 2)
return 0;
30002784: e3a00000 mov r0, #0 <== NOT EXECUTED
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
30002788: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30003d14 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003d14: e591203c ldr r2, [r1, #60] ; 0x3c
30003d18: e59f304c ldr r3, [pc, #76] ; 30003d6c <siproc+0x58>
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003d1c: e92d4030 push {r4, r5, lr}
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003d20: e0023003 and r3, r2, r3
30003d24: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003d28: e1a04001 mov r4, r1
30003d2c: e1a05000 mov r5, r0
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003d30: 0a00000b beq 30003d64 <siproc+0x50>
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003d34: e5910018 ldr r0, [r1, #24]
30003d38: e3a01000 mov r1, #0
30003d3c: e1a02001 mov r2, r1
30003d40: eb0004c0 bl 30005048 <rtems_semaphore_obtain>
i = iproc (c, tty);
30003d44: e1a01004 mov r1, r4
30003d48: e1a00005 mov r0, r5
30003d4c: ebffff8b bl 30003b80 <iproc>
30003d50: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
30003d54: e5940018 ldr r0, [r4, #24]
30003d58: eb000500 bl 30005160 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
30003d5c: e1a00005 mov r0, r5
30003d60: e8bd8030 pop {r4, r5, pc}
30003d64: e8bd4030 pop {r4, r5, lr} <== 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);
30003d68: eaffff84 b 30003b80 <iproc> <== NOT EXECUTED
300076bc <truncate>:
int truncate(
const char *path,
off_t length
)
{
300076bc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
300076c0: e1a05001 mov r5, r1 <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
300076c4: e3a01001 mov r1, #1 <== NOT EXECUTED
int truncate(
const char *path,
off_t length
)
{
300076c8: e1a06002 mov r6, r2 <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
300076cc: ebfff77d bl 300054c8 <open> <== NOT EXECUTED
if ( fd == -1 )
300076d0: e3700001 cmn r0, #1 <== NOT EXECUTED
)
{
int status;
int fd;
fd = open( path, O_WRONLY );
300076d4: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( fd == -1 )
return -1;
300076d8: 01a05000 moveq r5, r0 <== NOT EXECUTED
{
int status;
int fd;
fd = open( path, O_WRONLY );
if ( fd == -1 )
300076dc: 0a000005 beq 300076f8 <truncate+0x3c> <== NOT EXECUTED
return -1;
status = ftruncate( fd, length );
300076e0: e1a01005 mov r1, r5 <== NOT EXECUTED
300076e4: e1a02006 mov r2, r6 <== NOT EXECUTED
300076e8: eb00146b bl 3000c89c <ftruncate> <== NOT EXECUTED
300076ec: e1a05000 mov r5, r0 <== NOT EXECUTED
(void) close( fd );
300076f0: e1a00004 mov r0, r4 <== NOT EXECUTED
300076f4: ebfff30f bl 30004338 <close> <== NOT EXECUTED
return status;
}
300076f8: e1a00005 mov r0, r5 <== NOT EXECUTED
300076fc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30005940 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
30005940: e92d40f0 push {r4, r5, r6, r7, lr}
30005944: e24dd030 sub sp, sp, #48 ; 0x30
30005948: e1a06000 mov r6, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
3000594c: ebfff56b bl 30002f00 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
30005950: e2504000 subs r4, r0, #0
30005954: e28d3018 add r3, sp, #24
30005958: 1a000005 bne 30005974 <unlink+0x34>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
3000595c: e1a00006 mov r0, r6
30005960: e28d102c add r1, sp, #44 ; 0x2c
30005964: e1a02003 mov r2, r3
30005968: ebfff931 bl 30003e34 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
3000596c: e1a05004 mov r5, r4
30005970: ea000008 b 30005998 <unlink+0x58>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
30005974: e3a02000 mov r2, #0
30005978: e58d2000 str r2, [sp]
3000597c: e1a00006 mov r0, r6
30005980: e1a01004 mov r1, r4
30005984: e2822002 add r2, r2, #2
30005988: ebfff53e bl 30002e88 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
3000598c: e3500000 cmp r0, #0
30005990: 1a00003a bne 30005a80 <unlink+0x140>
return -1;
free_parentloc = true;
30005994: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30005998: e28dc004 add ip, sp, #4
3000599c: e28de018 add lr, sp, #24
300059a0: e8be000f ldm lr!, {r0, r1, r2, r3}
300059a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
name = path + parentpathlen;
300059a8: e0864004 add r4, r6, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300059ac: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
300059b0: e1a00004 mov r0, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300059b4: e58c3000 str r3, [ip]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
300059b8: eb002ce6 bl 30010d58 <strlen>
300059bc: e1a01000 mov r1, r0
300059c0: e1a00004 mov r0, r4
300059c4: ebfff55b bl 30002f38 <rtems_filesystem_prefix_separators>
300059c8: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
300059cc: e1a00006 mov r0, r6
300059d0: eb002ce0 bl 30010d58 <strlen>
300059d4: e28d4004 add r4, sp, #4
300059d8: e1a01000 mov r1, r0
300059dc: e3a02000 mov r2, #0
300059e0: e1a00006 mov r0, r6
300059e4: e1a03004 mov r3, r4
300059e8: e58d2000 str r2, [sp]
300059ec: ebfff4fd bl 30002de8 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
300059f0: e3500000 cmp r0, #0
300059f4: 0a000004 beq 30005a0c <unlink+0xcc>
if ( free_parentloc )
300059f8: e3550000 cmp r5, #0 <== NOT EXECUTED
300059fc: 0a00001f beq 30005a80 <unlink+0x140> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
30005a00: e28d0018 add r0, sp, #24 <== NOT EXECUTED
30005a04: ebfff55a bl 30002f74 <rtems_filesystem_freenode> <== NOT EXECUTED
30005a08: ea00001c b 30005a80 <unlink+0x140> <== NOT EXECUTED
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
30005a0c: e1a00004 mov r0, r4
30005a10: e59d3010 ldr r3, [sp, #16]
30005a14: e1a0e00f mov lr, pc
30005a18: e593f010 ldr pc, [r3, #16]
30005a1c: e3500001 cmp r0, #1
30005a20: 1a000008 bne 30005a48 <unlink+0x108>
rtems_filesystem_freenode( &loc );
30005a24: e1a00004 mov r0, r4
30005a28: ebfff551 bl 30002f74 <rtems_filesystem_freenode>
if ( free_parentloc )
30005a2c: e3550000 cmp r5, #0
rtems_filesystem_freenode( &parentloc );
30005a30: 128d0018 addne r0, sp, #24
30005a34: 1bfff54e blne 30002f74 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EISDIR );
30005a38: eb002901 bl 3000fe44 <__errno>
30005a3c: e3a03015 mov r3, #21
30005a40: e5803000 str r3, [r0]
30005a44: ea00000d b 30005a80 <unlink+0x140>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
30005a48: e28d6018 add r6, sp, #24
30005a4c: e1a01004 mov r1, r4
30005a50: e59d3010 ldr r3, [sp, #16]
30005a54: e1a00006 mov r0, r6
30005a58: e1a0e00f mov lr, pc
30005a5c: e593f00c ldr pc, [r3, #12]
30005a60: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30005a64: e1a00004 mov r0, r4
30005a68: ebfff541 bl 30002f74 <rtems_filesystem_freenode>
if ( free_parentloc )
30005a6c: e3550000 cmp r5, #0
30005a70: 0a000003 beq 30005a84 <unlink+0x144>
rtems_filesystem_freenode( &parentloc );
30005a74: e1a00006 mov r0, r6
30005a78: ebfff53d bl 30002f74 <rtems_filesystem_freenode>
30005a7c: ea000000 b 30005a84 <unlink+0x144>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
30005a80: e3e07000 mvn r7, #0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
30005a84: e1a00007 mov r0, r7
30005a88: e28dd030 add sp, sp, #48 ; 0x30
30005a8c: e8bd80f0 pop {r4, r5, r6, r7, pc}
30005bdc <unmount>:
*/
int unmount(
const char *path
)
{
30005bdc: e92d4070 push {r4, r5, r6, lr}
30005be0: e24dd018 sub sp, sp, #24
30005be4: e1a05000 mov r5, r0
* 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 ) )
30005be8: eb00229f bl 3000e66c <strlen>
30005bec: e28d4004 add r4, sp, #4
30005bf0: e3a03001 mov r3, #1
30005bf4: e1a01000 mov r1, r0
30005bf8: e58d3000 str r3, [sp]
30005bfc: e1a00005 mov r0, r5
30005c00: e3a02000 mov r2, #0
30005c04: e1a03004 mov r3, r4
30005c08: ebfff46e bl 30002dc8 <rtems_filesystem_evaluate_path>
30005c0c: e3500000 cmp r0, #0
30005c10: 1a000040 bne 30005d18 <unmount+0x13c>
return -1;
mt_entry = loc.mt_entry;
30005c14: e59d5014 ldr r5, [sp, #20]
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
30005c18: e59d3004 ldr r3, [sp, #4]
30005c1c: e595201c ldr r2, [r5, #28]
30005c20: e1520003 cmp r2, r3
30005c24: 0a000004 beq 30005c3c <unmount+0x60>
rtems_filesystem_freenode( &loc );
30005c28: e1a00004 mov r0, r4
30005c2c: ebfff4a0 bl 30002eb4 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
30005c30: eb001d11 bl 3000d07c <__errno>
30005c34: e3a0300d mov r3, #13
30005c38: ea000011 b 30005c84 <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
30005c3c: e1a00004 mov r0, r4
30005c40: ebfff49b bl 30002eb4 <rtems_filesystem_freenode>
* 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 )
30005c44: e59f30d8 ldr r3, [pc, #216] ; 30005d24 <unmount+0x148>
30005c48: e5933000 ldr r3, [r3]
30005c4c: e5933014 ldr r3, [r3, #20]
30005c50: e1530005 cmp r3, r5
30005c54: 0a000008 beq 30005c7c <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
30005c58: e59f00c8 ldr r0, [pc, #200] ; 30005d28 <unmount+0x14c>
30005c5c: e595102c ldr r1, [r5, #44] ; 0x2c
30005c60: ebfff6b5 bl 3000373c <rtems_filesystem_mount_iterate>
30005c64: e3500000 cmp r0, #0
30005c68: 1a000003 bne 30005c7c <unmount+0xa0>
* 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 )
30005c6c: e1a00005 mov r0, r5
30005c70: ebfff56a bl 30003220 <rtems_libio_is_open_files_in_fs>
30005c74: e3500001 cmp r0, #1
30005c78: 1a000003 bne 30005c8c <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
30005c7c: eb001cfe bl 3000d07c <__errno>
30005c80: e3a03010 mov r3, #16
30005c84: e5803000 str r3, [r0]
30005c88: ea000022 b 30005d18 <unmount+0x13c>
* 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 )
30005c8c: e5953014 ldr r3, [r5, #20]
30005c90: e1a00005 mov r0, r5
30005c94: e1a0e00f mov lr, pc
30005c98: e593f028 ldr pc, [r3, #40] ; 0x28
30005c9c: e2506000 subs r6, r0, #0
30005ca0: 1a00001c bne 30005d18 <unmount+0x13c>
* 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){
30005ca4: e5953028 ldr r3, [r5, #40] ; 0x28
30005ca8: e1a00005 mov r0, r5
30005cac: e1a0e00f mov lr, pc
30005cb0: e593f02c ldr pc, [r3, #44] ; 0x2c
30005cb4: e2504000 subs r4, r0, #0
30005cb8: 0a000007 beq 30005cdc <unmount+0x100>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
30005cbc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
30005cc0: e1a00005 mov r0, r5 <== NOT EXECUTED
30005cc4: e1a0e00f mov lr, pc <== NOT EXECUTED
30005cc8: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
30005ccc: e3500000 cmp r0, #0 <== NOT EXECUTED
30005cd0: 0a000010 beq 30005d18 <unmount+0x13c> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
30005cd4: e1a00006 mov r0, r6 <== NOT EXECUTED
30005cd8: eb0003de bl 30006c58 <rtems_fatal_error_occurred> <== 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 );
30005cdc: e59f6048 ldr r6, [pc, #72] ; 30005d2c <unmount+0x150>
30005ce0: e1a01004 mov r1, r4
30005ce4: e1a02004 mov r2, r4
30005ce8: e5960000 ldr r0, [r6]
30005cec: eb00025b bl 30006660 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30005cf0: e1a00005 mov r0, r5
30005cf4: eb00048d bl 30006f30 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
30005cf8: e5960000 ldr r0, [r6]
30005cfc: eb00029d bl 30006778 <rtems_semaphore_release>
/*
* 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 );
30005d00: e2850008 add r0, r5, #8
30005d04: ebfff46a bl 30002eb4 <rtems_filesystem_freenode>
free( mt_entry );
30005d08: e1a00005 mov r0, r5
30005d0c: ebfff46d bl 30002ec8 <free>
return 0;
30005d10: e1a00004 mov r0, r4
30005d14: ea000000 b 30005d1c <unmount+0x140>
*/
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 );
return -1;
30005d18: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
30005d1c: e28dd018 add sp, sp, #24
30005d20: e8bd8070 pop {r4, r5, r6, pc}
300058f8 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
300058f8: e92d4030 push {r4, r5, lr}
300058fc: e24dd020 sub sp, sp, #32
30005900: e1a04001 mov r4, r1
30005904: e1a05000 mov r5, r0
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
30005908: eb002415 bl 3000e964 <strlen>
3000590c: e3a03001 mov r3, #1
30005910: e1a01000 mov r1, r0
30005914: e58d3000 str r3, [sp]
30005918: e1a00005 mov r0, r5
3000591c: e3a02000 mov r2, #0
30005920: e28d3004 add r3, sp, #4
30005924: ebfff344 bl 3000263c <rtems_filesystem_evaluate_path>
30005928: e3500000 cmp r0, #0
return -1;
3000592c: 13e04000 mvnne r4, #0
{
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
30005930: 1a00000e bne 30005970 <utime+0x78>
return -1;
if ( times == NULL ) {
30005934: e3540000 cmp r4, #0
30005938: 1a000003 bne 3000594c <utime+0x54>
now.actime = now.modtime = time( NULL );
3000593c: eb00245b bl 3000eab0 <time> <== NOT EXECUTED
30005940: e28d4020 add r4, sp, #32 <== NOT EXECUTED
30005944: e58d001c str r0, [sp, #28] <== NOT EXECUTED
30005948: e5240008 str r0, [r4, #-8]! <== NOT EXECUTED
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
3000594c: e28d5004 add r5, sp, #4
30005950: e8940006 ldm r4, {r1, r2}
30005954: e1a00005 mov r0, r5
30005958: e59d3010 ldr r3, [sp, #16]
3000595c: e1a0e00f mov lr, pc
30005960: e593f030 ldr pc, [r3, #48] ; 0x30
30005964: e1a04000 mov r4, r0
rtems_filesystem_freenode( &temp_loc );
30005968: e1a00005 mov r0, r5
3000596c: ebfff443 bl 30002a80 <rtems_filesystem_freenode>
return result;
}
30005970: e1a00004 mov r0, r4
30005974: e28dd020 add sp, sp, #32
30005978: e8bd8030 pop {r4, r5, pc}
30011960 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
30011960: e92d4030 push {r4, r5, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30011964: e59f4098 ldr r4, [pc, #152] ; 30011a04 <write+0xa4>
30011968: e5944000 ldr r4, [r4]
3001196c: e1500004 cmp r0, r4
30011970: 2a000006 bcs 30011990 <write+0x30>
iop = rtems_libio_iop( fd );
30011974: e59f408c ldr r4, [pc, #140] ; 30011a08 <write+0xa8>
30011978: e3a05038 mov r5, #56 ; 0x38
3001197c: e5944000 ldr r4, [r4]
30011980: e0244095 mla r4, r5, r0, r4
rtems_libio_check_is_open( iop );
30011984: e5940014 ldr r0, [r4, #20]
30011988: e3100c01 tst r0, #256 ; 0x100
3001198c: 1a000002 bne 3001199c <write+0x3c>
30011990: ebffe90f bl 3000bdd4 <__errno>
30011994: e3a03009 mov r3, #9
30011998: ea000007 b 300119bc <write+0x5c>
rtems_libio_check_buffer( buffer );
3001199c: e3510000 cmp r1, #0
300119a0: 0a000003 beq 300119b4 <write+0x54>
rtems_libio_check_count( count );
300119a4: e3520000 cmp r2, #0
300119a8: 0a000013 beq 300119fc <write+0x9c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
300119ac: e3100004 tst r0, #4
300119b0: 1a000004 bne 300119c8 <write+0x68>
300119b4: ebffe906 bl 3000bdd4 <__errno> <== NOT EXECUTED
300119b8: e3a03016 mov r3, #22 <== NOT EXECUTED
300119bc: e5803000 str r3, [r0]
300119c0: e3e00000 mvn r0, #0
300119c4: e8bd8030 pop {r4, r5, pc}
return 0;
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
300119c8: e5943020 ldr r3, [r4, #32]
300119cc: e1a00004 mov r0, r4
300119d0: e1a0e00f mov lr, pc
300119d4: e593f00c ldr pc, [r3, #12]
if ( rc > 0 )
300119d8: e3500000 cmp r0, #0
300119dc: d8bd8030 pople {r4, r5, pc}
iop->offset += rc;
300119e0: e284300c add r3, r4, #12
300119e4: e893000c ldm r3, {r2, r3}
300119e8: e0922000 adds r2, r2, r0
300119ec: e0a33fc0 adc r3, r3, r0, asr #31
300119f0: e584200c str r2, [r4, #12]
300119f4: e5843010 str r3, [r4, #16]
300119f8: e8bd8030 pop {r4, r5, pc}
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 );
300119fc: e1a00002 mov r0, r2
if ( rc > 0 )
iop->offset += rc;
return rc;
}
30011a00: e8bd8030 pop {r4, r5, pc}